OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../../../resources/testharness.js"></script> | |
5 <script src="../../../resources/testharnessreport.js"></script> | |
6 <script> | |
7 var records = []; | |
8 | |
9 function addRecord(str) | |
10 { | |
11 console.log(str); | |
12 records.push(str); | |
13 } | |
14 | |
15 function recordElement(element) | |
16 { | |
17 addRecord(element.tagName + ":" + element.id); | |
18 } | |
19 </script> | |
20 <my-custom id="using-toplevel-1"></my-custom> | |
21 <!-- | |
22 -- |using-custom-element-1.html| reaches |def-custom-element.html| with one in direction | |
dominicc (has gone to gerrit)
2014/04/18 00:56:25
in direction -> indirection?
dominicc (has gone to gerrit)
2014/04/18 00:56:25
I'm not crazy about the -- prefixes. Just left ali
Hajime Morrita
2014/04/18 01:48:33
Rietveld wraps it badly. The real code doesn't hav
Hajime Morrita
2014/04/18 01:48:33
Done.
| |
23 -- while |using-custom-element-2.html| imports it directly. | |
24 -- So |using-custom-element-2.html| triggers importing |def-custom-element.htm l| and | |
25 -- |using-custom-element-1.html| finds it and de-dups later. | |
26 --> | |
27 <link rel="import" href="resources/using-custom-element-1.html"> | |
28 <link rel="import" href="resources/using-custom-element-2.html"> | |
29 <my-custom id="using-toplevel-2"></my-custom> | |
30 </head> | |
31 <body> | |
32 <script> | |
33 test(function () { | |
34 assert_array_equals(records, ['MY-CUSTOM:using-toplevel-1', | |
35 'MY-CUSTOM:using-1-before', | |
36 'MY-CUSTOM:pointing-before', | |
37 'MY-CUSTOM:def-before', | |
38 'MY-CUSTOM:def-after', | |
39 'MY-CUSTOM:pointing-after', | |
40 'MY-CUSTOM:using-1-after', | |
41 'MY-CUSTOM:using-2-before', | |
42 'MY-CUSTOM:using-2-after', | |
43 'MY-CUSTOM:using-toplevel-2'], | |
44 'Custom Element invocations preserve tree order across im ports'); | |
45 }, 'Custom Element invocations preserve tree order across imports regardless the loading order.'); | |
46 </script> | |
47 </body> | |
48 </html> | |
OLD | NEW |