OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Custom Elements: CEReactions on ChildNode interface</title> | 4 <title>Custom Elements: CEReactions on ChildNode interface</title> |
5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> | 5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> |
6 <meta name="assert" content="before, after, after, replaceWith, and remove of Ch
ildNode interface must have CEReactions"> | 6 <meta name="assert" content="before, after, after, replaceWith, and remove of Ch
ildNode interface must have CEReactions"> |
7 <meta name="help" content="https://dom.spec.whatwg.org/#parentnode"> | 7 <meta name="help" content="https://dom.spec.whatwg.org/#parentnode"> |
8 <script src="/resources/testharness.js"></script> | 8 <script src="/resources/testharness.js"></script> |
9 <script src="/resources/testharnessreport.js"></script> | 9 <script src="/resources/testharnessreport.js"></script> |
| 10 <script src="../resources/custom-elements-helpers.js"></script> |
10 <script src="./resources/reactions.js"></script> | 11 <script src="./resources/reactions.js"></script> |
11 </head> | 12 </head> |
12 <body> | 13 <body> |
13 <div id="log"></div> | 14 <div id="log"></div> |
14 <script> | 15 <script> |
15 | 16 |
16 testNodeConnector(function (newContainer, customElement) { | 17 testNodeConnector(function (newContainer, customElement) { |
17 newContainer.firstChild.before(customElement); | 18 newContainer.firstChild.before(customElement); |
18 }, 'before on ChildNode'); | 19 }, 'before on ChildNode'); |
19 | 20 |
20 testNodeConnector(function (newContainer, customElement) { | 21 testNodeConnector(function (newContainer, customElement) { |
21 newContainer.firstChild.after(customElement); | 22 newContainer.firstChild.after(customElement); |
22 }, 'after on ChildNode'); | 23 }, 'after on ChildNode'); |
23 | 24 |
24 testNodeConnector(function (newContainer, customElement) { | 25 testNodeConnector(function (newContainer, customElement) { |
25 newContainer.firstChild.replaceWith(customElement); | 26 newContainer.firstChild.replaceWith(customElement); |
26 }, 'replaceWith on ChildNode'); | 27 }, 'replaceWith on ChildNode'); |
27 | 28 |
28 testNodeDisconnector(function (customElement) { | 29 testNodeDisconnector(function (customElement) { |
29 customElement.remove(); | 30 customElement.remove(); |
30 }, 'replaceWith on ChildNode'); | 31 }, 'replaceWith on ChildNode'); |
31 | 32 |
32 </script> | 33 </script> |
33 </body> | 34 </body> |
34 </html> | 35 </html> |
OLD | NEW |