OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Custom Elements: CEReactions on HTMLElement interface</title> |
| 5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> |
| 6 <meta name="assert" content="title, lang, translate, dir, hidden, tabIndex, acce
ssKey, draggable, dropzone, contextMenu, spellcheck, innerText, and outerText of
HTMLElement interface must have CEReactions"> |
| 7 <meta name="help" content="https://html.spec.whatwg.org/#htmlelement"> |
| 8 <script src="/resources/testharness.js"></script> |
| 9 <script src="/resources/testharnessreport.js"></script> |
| 10 <script src="../resources/custom-elements-helpers.js"></script> |
| 11 <script src="./resources/reactions.js"></script> |
| 12 </head> |
| 13 <body> |
| 14 <div id="log"></div> |
| 15 <script> |
| 16 |
| 17 testReflectAttribute('title', 'title', 'foo', 'bar', 'title on HTMLElement'); |
| 18 testReflectAttribute('lang', 'lang', 'en', 'zh', 'lang on HTMLElement'); |
| 19 testReflectAttributeWithContentValues('translate', 'translate', true, 'yes', fal
se, 'no', 'translate on HTMLElement'); |
| 20 testReflectAttribute('dir', 'dir', 'ltr', 'rtl', 'dir on HTMLElement'); |
| 21 testReflectBooleanAttribute('hidden', 'hidden', 'hidden on HTMLElement'); |
| 22 testReflectAttribute('tabIndex', 'tabindex', '0', '1', 'tabIndex on HTMLElement'
); |
| 23 testReflectAttribute('accessKey', 'accesskey', 'a', 'b', 'accessKey on HTMLEleme
nt'); |
| 24 testReflectAttributeWithContentValues('draggable', 'draggable', true, 'true', fa
lse, 'false', 'draggable on HTMLElement'); |
| 25 testReflectAttribute('dropzone', 'dropzone', 'copy', 'move', 'dropzone on HTMLEl
ement'); |
| 26 testReflectAttribute('contextMenu', 'contextmenu', 'menu1', 'menu2', 'contextMen
u on HTMLElement'); |
| 27 testReflectAttributeWithContentValues('spellcheck', 'spellcheck', true, 'true',
false, 'false', 'spellcheck on HTMLElement'); |
| 28 |
| 29 testNodeDisconnector(function (customElement) { |
| 30 customElement.parentNode.innerText = ''; |
| 31 }, 'innerText on HTMLElement'); |
| 32 |
| 33 if ('outerText' in HTMLElement.prototype) { |
| 34 // Not yet to be in the standard but all but Gecko supports this property: h
ttps://github.com/whatwg/html/issues/668 |
| 35 testNodeDisconnector(function (customElement) { |
| 36 customElement.outerText = ''; |
| 37 }, 'outerText on HTMLElement'); |
| 38 } |
| 39 |
| 40 </script> |
| 41 </body> |
| 42 </html> |
OLD | NEW |