Index: sky/examples/flights-app/index.sky |
diff --git a/sky/examples/flights-app/index.sky b/sky/examples/flights-app/index.sky |
index 7aa09b339f26ca1b85ebdd190afbea00d68e7f5c..9f262528d3f9c386d7aa8ab53432531c42c3b0ea 100644 |
--- a/sky/examples/flights-app/index.sky |
+++ b/sky/examples/flights-app/index.sky |
@@ -1,5 +1,5 @@ |
<sky> |
- <import src="flights-app.sky" /> |
+ <import src="flights-app.sky" as="FlightsAppElement"/> |
<style> |
sky { |
height: 100%; |
@@ -8,8 +8,8 @@ |
<script> |
// TODO(esprehn): Work around a bug where having <flights-app /> in the |
// page doesn't render anything until the first input event. |
- addEventListener("load", function() { |
- document.querySelector("sky").appendChild(document.createElement("flights-app")); |
+ window.addEventListener("load", function() { |
+ document.querySelector("sky").appendChild(new FlightsAppElement()); |
}); |
</script> |
</sky> |