You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems a little awkward to get the equivalent of an 's naturalWidth and naturalHeight properties. It seems like you need to go into the shadowRoot, something like this, where #img is the id of the iron-image:
$0.shadowRoot.querySelector('#img').naturalHeight
I guess I could also create an Image() with the same URL and test the properties on that.
Expected outcome
I expect properties on the iron-image element.
Actual outcome
Have to dig into the shadow dom, or create another object.
Description
It seems a little awkward to get the equivalent of an 's
naturalWidth
andnaturalHeight
properties. It seems like you need to go into the shadowRoot, something like this, where #img is the id of the iron-image:I guess I could also create an Image() with the same URL and test the properties on that.
Expected outcome
I expect properties on the iron-image element.
Actual outcome
Have to dig into the shadow dom, or create another object.
Live Demo
That URL seems to be broken, so my demo is also:
https://jsbin.com/bovihujawa/edit?html,output
The text was updated successfully, but these errors were encountered: