Haha -- thanks, good to know! On Wed, Aug 19, 2015 at 2:43 PM, Eric Bidelman <[email protected]> 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]> 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]. >> 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/CAG7xX7oUTc1BxUqv%2BB_7ULPpF_vT8D0XP_o9w_N3TbZu2sJQoA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
