| OLD | NEW |
| 1 | 1 |
| 2 | 2 |
| 3 /* | 3 /* |
| 4 `iron-a11y-keys` provides a normalized interface for processing keyboard command
s that pertain to [WAI-ARIA best | 4 `iron-a11y-keys` provides a normalized interface for processing keyboard command
s that pertain to [WAI-ARIA best |
| 5 practices](http://www.w3.org/TR/wai-aria-practices/#kbd_general_binding). The el
ement takes care of browser differences | 5 practices](http://www.w3.org/TR/wai-aria-practices/#kbd_general_binding). The el
ement takes care of browser differences |
| 6 with respect to Keyboard events and uses an expressive syntax to filter key pres
ses. | 6 with respect to Keyboard events and uses an expressive syntax to filter key pres
ses. |
| 7 | 7 |
| 8 Use the `keys` attribute to express what combination of keys will trigger the ev
ent to fire. | 8 Use the `keys` attribute to express what combination of keys will trigger the ev
ent to fire. |
| 9 | 9 |
| 10 Use the `target` attribute to set up event handlers on a specific node. | 10 Use the `target` attribute to set up event handlers on a specific node. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 | 67 |
| 68 Polymer({ | 68 Polymer({ |
| 69 is: 'iron-a11y-keys', | 69 is: 'iron-a11y-keys', |
| 70 | 70 |
| 71 behaviors: [ | 71 behaviors: [ |
| 72 Polymer.IronA11yKeysBehavior | 72 Polymer.IronA11yKeysBehavior |
| 73 ], | 73 ], |
| 74 | 74 |
| 75 properties: { | 75 properties: { |
| 76 /** @type {?Node} */ |
| 76 target: { | 77 target: { |
| 77 type: Object, | 78 type: Object, |
| 78 observer: '_targetChanged' | 79 observer: '_targetChanged' |
| 79 }, | 80 }, |
| 80 | 81 |
| 81 keys: { | 82 keys: { |
| 82 type: String, | 83 type: String, |
| 83 reflectToAttribute: true, | 84 reflectToAttribute: true, |
| 84 observer: '_keysChanged' | 85 observer: '_keysChanged' |
| 85 } | 86 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 97 | 98 |
| 98 _keysChanged: function() { | 99 _keysChanged: function() { |
| 99 this.removeOwnKeyBindings(); | 100 this.removeOwnKeyBindings(); |
| 100 this.addOwnKeyBinding(this.keys, '_fireKeysPressed'); | 101 this.addOwnKeyBinding(this.keys, '_fireKeysPressed'); |
| 101 }, | 102 }, |
| 102 | 103 |
| 103 _fireKeysPressed: function(event) { | 104 _fireKeysPressed: function(event) { |
| 104 this.fire('keys-pressed', event.detail, {}); | 105 this.fire('keys-pressed', event.detail, {}); |
| 105 } | 106 } |
| 106 }); | 107 }); |
| OLD | NEW |