Skip to content
This repository was archived by the owner on Dec 28, 2024. It is now read-only.
This repository was archived by the owner on Dec 28, 2024. It is now read-only.

natural{Width,Height}? #144

@davidmaxwaterman

Description

@davidmaxwaterman

Description

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.

Live Demo

That URL seems to be broken, so my demo is also:

https://jsbin.com/bovihujawa/edit?html,output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions