I believe you can also add a "unresolved" attribute and remove it 5 minutes later. Similar trick. There must be other ways too.
Op woensdag 19 augustus 2015 23:45:46 UTC+2 schreef Ihab Awad: > > Haha -- thanks, good to know! > > On Wed, Aug 19, 2015 at 2:43 PM, Eric Bidelman <[email protected] > <javascript:>> wrote: > >> You've stumbled onto the awesome sauce that is custom element upgrades :) >> >> >> http://www.html5rocks.com/en/tutorials/webcomponents/customelements/#upgrades >> >> Polymer() is simply a convenience + features wrapper for >> document.registerElement(). You can have <your-element> >> declared on the page, but until it's registered, it won't have of any of >> it's special features minted or shady/shadow dom created. >> >> On Wed, Aug 19, 2015 at 1:19 PM <[email protected] <javascript:>> wrote: >> >>> I just realized that the Polymer(...) declaration in a custom element >>> can be asynchronous. In other words, the following works precisely as >>> expected: >>> >>> >>> <dom-module id="foo"> >>> ... >>> </dom-module> >>> <script> >>> window.setTimeout(function() { >>> Polymer({ >>> is: "foo", >>> ... >>> }); >>> }, 5000); >>> </script> >>> >>> >>> All the foo elements are invisible until 5 seconds later, when they pop >>> into place! This means I could enclose it in -- say -- a RequireJS module. >>> Very nice work! >>> >>> Ihab >>> >>> -- >>> Ihab A.B. Awad, Palo Alto, CA >>> >>> Follow Polymer on Google+: plus.google.com/107187849809354688692 >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Polymer" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] <javascript:>. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/polymer-dev/CAG7xX7oDPjqmCKEg1vaoD%3D-xctRGP2zmXZN03J6LY9W5wAf0vQ%40mail.gmail.com >>> >>> <https://groups.google.com/d/msgid/polymer-dev/CAG7xX7oDPjqmCKEg1vaoD%3D-xctRGP2zmXZN03J6LY9W5wAf0vQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> > > > -- > Ihab A.B. Awad, Palo Alto, CA > Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/059d5305-e20e-4bc9-ac1b-1917f05f67a4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
