Sha256: a0a742635e8039b45d259dc1919499f976dfd1448693d362cfae6c4716a6574c
Contents?: true
Size: 1.4 KB
Versions: 5
Compression:
Stored size: 1.4 KB
Contents
<!-- @license Copyright (c) 2014 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Core A11y Keys demo</title> <script src="../webcomponentsjs/webcomponents.js"></script> <link rel="import" href="core-a11y-keys.html"> <style> div { height: 100px; width: 100px; background: gray; } </style> </head> <body> <template is="auto-binding"> <span>Press any of these keys: {{keys}}</span> <core-a11y-keys id="a11y" keys="{{keys}}" on-keys-pressed="{{print}}"></core-a11y-keys> <pre id="output"></pre> </template> <script> addEventListener('template-bound', function(ev) { ev.target.keys = "* pageup pagedown left right down up shift+a alt+a home end space enter" ev.target.print = function(ev) { console.log(ev.detail); this.$.output.textContent += ev.detail.key + ' pressed!\n'; } }); </script> </body> </html>
Version data entries
5 entries across 5 versions & 1 rubygems