Because the image isn't part of the main document, it's not guaranteed to
be available at body.onload time.

Listening for the image's own onload event is the right solution.



On Mon, May 19, 2014 at 7:22 PM, Karan Goel <[email protected]> wrote:

> Yes I did Eric. I used polymer event handler and that seemed to work.
>
> - Karan Goel
> Sent from Nexus 4. Please ignore typos and abbreviations.
> On May 19, 2014 7:17 PM, "Eric Bidelman" <[email protected]> wrote:
>
>> Karan, did you get this squared away? It seems like the demo is working
>> again.
>>
>>
>> On Mon, May 19, 2014 at 7:25 AM, Karan Goel <[email protected]> wrote:
>>
>>> So for x-meme (https://github.com/karan/x-meme), running it locally
>>> works fine but on GH pages, the images are all messed up:
>>> http://karan.github.io/x-meme/components/x-meme/demo.html
>>>
>>> What's happening is I'm getting the width of image after it's loaded to
>>> set width of everything else, but (look in the console when opening demo
>>> page) it actually gets a width of 0px. I think it's because it get's the
>>> width before image has loaded, but I'm not sure why, I am doing everything
>>> after onload event.
>>>
>>> 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/7f75ef36-a831-4f2b-b212-351141205ad5%40googlegroups.com<https://groups.google.com/d/msgid/polymer-dev/7f75ef36-a831-4f2b-b212-351141205ad5%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/CAFhNAVGLnUcW7zexpHb9NC-bPgQp2zcjgPtceEbCCoMUA_pP1A%40mail.gmail.com<https://groups.google.com/d/msgid/polymer-dev/CAFhNAVGLnUcW7zexpHb9NC-bPgQp2zcjgPtceEbCCoMUA_pP1A%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/CAHbmOLZDTJcEf_94AcLMO0-6Mz6h0n_1JZqKVnyu_tLaE4viWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to