OLD | NEW |
(Empty) | |
| 1 <parser-customize></parser-customize> |
| 2 <script> |
| 3 test(() => { |
| 4 assert_equals(constructors.length, 0); |
| 5 |
| 6 class ParserCustomize extends HTMLElement { |
| 7 constructor() { |
| 8 super(); |
| 9 constructors.push(document.currentScript.ownerDocument.title || 'Unknown')
; |
| 10 } |
| 11 } |
| 12 customElements.define('parser-customize', ParserCustomize); |
| 13 |
| 14 assert_equals(constructors.length, 1); |
| 15 }, 'Custom Element definition should upgrade parsed elements in import.'); |
| 16 </script> |
| 17 |
| 18 <parser-customize></parser-customize> |
| 19 |
| 20 <script> |
| 21 test(() => { |
| 22 assert_equals(constructors.length, 2); |
| 23 }, 'Custom Element definition should make parser customize elements.'); |
| 24 </script> |
OLD | NEW |