Sha256: 5fb07147d4ee15c8f26433928c842c5c5a6c703813f2e342a2aa917573b9ced7
Contents?: true
Size: 1.75 KB
Versions: 1
Compression:
Stored size: 1.75 KB
Contents
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <!-- Copyright 2010 The Closure Library Authors. All Rights Reserved. Use of this source code is governed by the Apache License, Version 2.0. See the COPYING file for details. --> <head> <title>PasteHandler Test</title> <link rel="stylesheet" href="css/demo.css"> <script src="../base.js"></script> <script> goog.require('goog.debug.DivConsole'); goog.require('goog.debug.LogManager'); goog.require('goog.dom'); goog.require('goog.events.PasteHandler'); goog.require('goog.log'); goog.require('goog.ui.KeyboardShortcutEvent'); </script> </head> <body> <h2>Demo of goog.events.PasteHandler</h2> <fieldset> <legend>Demo of the <strong>goog.events.PasteHandler</strong>:</legend> <label>goog.events.PasteHandler detects paste events in textareas. Try pasting text in the textarea below and watch the event log at the bottom of the page.<br></label> <textarea id="foo" rows="10" cols="100"></textarea> </fieldset> <fieldset class="goog-debug-panel"> <legend>Event Log</legend> <div id="log" style="height: 200px;"></div> </fieldset> <script type="text/javascript"> var textarea = goog.dom.getElement('foo'); var pasteHandler = new goog.events.PasteHandler(textarea); var logger = goog.log.getLogger('demo') goog.events.listen(pasteHandler, goog.events.PasteHandler.EventType.PASTE, function(e) { goog.log.log(logger, goog.log.Level.SHOUT, 'pasted!'); }); goog.debug.LogManager.getRoot().setLevel(goog.log.Level.SEVERE); var logconsole = new goog.debug.DivConsole(goog.dom.getElement('log')); logconsole.setCapturing(true); </script> </body> </html>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
k4compiler-0.0.1 | third_party/closure-library/closure/goog/demos/pastehandler.html |