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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/fc66e52d-60ab-4f02-a919-2badf5a4e53f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.