OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <import src="/sky/framework/dom-serializer.sky" as="DomSerializer" /> | 3 <import src="/sky/framework/dom-serializer.sky" as="DomSerializer" /> |
4 <import src="/sky/framework/sky-element/sky-binder.sky" as="binder" /> | 4 <import src="/sky/framework/elements/sky-element/sky-binder.sky" as="binder" /> |
5 | 5 |
6 <div id="host"></div> | 6 <div id="host"></div> |
7 | 7 |
8 <template id="template"> | 8 <template id="template"> |
9 <style> | 9 <style> |
10 .blue { border: 1px solid blue; } | 10 .blue { border: 1px solid blue; } |
11 .orange { border: 1px solid orange; } | 11 .orange { border: 1px solid orange; } |
12 .repeat { margin: 8px; } | 12 .repeat { margin: 8px; } |
13 </style> | 13 </style> |
14 <span style="color: {{ red }}">{{ value }}</span> | 14 <span style="color: {{ red }}">{{ value }}</span> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 }; | 57 }; |
58 var instance = binder.createInstance(template, window.model); | 58 var instance = binder.createInstance(template, window.model); |
59 host.ensureShadowRoot().appendChild(instance.fragment); | 59 host.ensureShadowRoot().appendChild(instance.fragment); |
60 var target = host.shadowRoot.getElementById("target"); | 60 var target = host.shadowRoot.getElementById("target"); |
61 target.dispatchEvent(new CustomEvent("test-event", { | 61 target.dispatchEvent(new CustomEvent("test-event", { |
62 bubbles: true, | 62 bubbles: true, |
63 })); | 63 })); |
64 internals.notifyTestComplete(DomSerializer.serializeNode(host.shadowRoot)); | 64 internals.notifyTestComplete(DomSerializer.serializeNode(host.shadowRoot)); |
65 }); | 65 }); |
66 </script> | 66 </script> |
OLD | NEW |