WebComponentsReady will only fire if you are using the polyfill. If you 
didn't load the polyfill, you would:

Simply place any scripts that manipulate Polymer elements at the end of the 
> page, and all elements should be read
>

from  https://www.polymer-project.org/1.0/docs/migration.html#polymer-ready

If you are not using the web components polyfills (for example, in a Chrome 
> extension), the WebComponentsReady event will not fire. With native HTML 
> imports and custom elements, elements upgrade synchronously, so the event 
> is not required. Simply place any scripts that manipulate Polymer elements 
> at the end of the page, and all elements should be ready.
>

Also, check out other unique ways to load in Eric's gists: 
 https://gist.github.com/ebidel



On Thursday, December 24, 2015 at 10:33:55 AM UTC-6, Daniel Llewellyn wrote:
>
> Jumping in here, is webcomponentsready expected to fire in chrome without 
> the polyfill? If not, as I suspect, what is the best way to get an on load 
> for both scenarios? I.e when you are purposely not including the polyfill 
> for compatible browsers but adding it for those without support...
>
> Sent from my iPhone
>
> On 24 Dec 2015, at 14:25, Eric Bidelman <[email protected] <javascript:>> 
> wrote:
>
> This appears to be an issue with FF 42 Linux. It works fine on FF 43 Mac.
>
> Note that WebComponentsReady is the event to know when all elements are 
> registered and upgraded. DCL won't give you that information and will 
> likely fire before this event.
>
> On Wed, Dec 23, 2015 at 3:43 PM Darin Hensley <[email protected] 
> <javascript:>> wrote:
>
>> Sorry, about the confusion....there is still a issue:
>>
>> When using Firefox 42.0 Linux with the  jsbin 
>> http://jsbin.com/damego/edit?html,output, the alert(e) never fires. 
>> Instead I get browser crash messages. 
>>
>> I made this bug report: https://github.com/Polymer/polymer/issues/3233
>>
>>
>>
>>
>>
>> On Wednesday, December 23, 2015 at 8:02:40 PM UTC, Darin Hensley wrote:
>>>
>>> Please disregard.... my promise was invoking at the time of creation. I 
>>> used to use the defer method which is legacy in Mozilla so I learned 
>>> something new :) 
>>>
>>> On Wednesday, December 23, 2015 at 7:17:00 PM UTC, Darin Hensley wrote:
>>>>
>>>> Still seem to be having a issue in this context.... 
>>>>  
>>>> 'DOMContentLoaded' is firing before the elements are ready....would 
>>>> this have anything to do with polymer? 
>>>>
>>>> document.addEventListener('DOMContentLoaded', function() {
>>>>   console.log(document.getElementById('ripple-element'));
>>>>
>>>> Shows null. But the element is there and it exists, if I do 
>>>> `document.getElementById('ripple-element')` in the browsers developer 
>>>> console the element is returned. 
>>>>
>>>> On Wednesday, December 23, 2015 at 5:14:13 AM UTC, Darin Hensley wrote:
>>>>>
>>>>> Thanks! I had the DOMContentLoaded event listener run after it fired 
>>>>> rather than before. 
>>>>>
>>>>> On Tuesday, December 22, 2015 at 10:04:32 PM UTC-6, Eric Bidelman 
>>>>> wrote:
>>>>>>
>>>>>> Responded on SO.
>>>>>>
>>>>>> On Tue, Dec 22, 2015 at 10:44 PM Darin Hensley <[email protected]> 
>>>>>> wrote:
>>>>>>
>>>>>>> stack overflow post 
>>>>>>> <http://stackoverflow.com/questions/34428255/domcontentloaded-never-fires-can-not-use-webcomponentsready>
>>>>>>>
>>>>>>>
>>>>>>> Using polymer 1.2.3,
>>>>>>>
>>>>>>>
>>>>>>> In linux firefox 42.0, where the polyfill(webcomponents-lite.js) is 
>>>>>>> used:
>>>>>>>
>>>>>>>
>>>>>>> `WebComponentsReady` fires to soon, because I `querySelect` and 
>>>>>>> `getElementById` elements that do not exist yet in `initialize`.
>>>>>>>
>>>>>>>
>>>>>>>     window.addEventListener('WebComponentsReady', function() {
>>>>>>>       initialize
>>>>>>>         .then(attatchListeners)
>>>>>>>
>>>>>>>
>>>>>>> So I am using `DOMContentLoaded` but it never fires:
>>>>>>>
>>>>>>>        document.addEventListener('DOMContentLoaded', function() {
>>>>>>>          initialize
>>>>>>>           .then(attatchListeners)
>>>>>>>      
>>>>>>>
>>>>>>>
>>>>>>> Any ideas on how to make initialize run when the elements are 
>>>>>>> available for `querySelect()`? 
>>>>>>>
>>>>>>> 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/866fb641-5c8f-47bd-ba78-94588daa606b%40googlegroups.com
>>>>>>>  
>>>>>>> <https://groups.google.com/d/msgid/polymer-dev/866fb641-5c8f-47bd-ba78-94588daa606b%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>> 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/984a43f9-d22e-401b-925c-78b3477795d2%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/polymer-dev/984a43f9-d22e-401b-925c-78b3477795d2%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> 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/CACGqRCBc5iedqJ0G6%3D%3DivQGW5SQ3PGjEOYQKLULVgY3mq60KoA%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/polymer-dev/CACGqRCBc5iedqJ0G6%3D%3DivQGW5SQ3PGjEOYQKLULVgY3mq60KoA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

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/d955897a-62c5-4927-b202-f2279e0d57ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to