Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't break WebP Polyfill #74

Open
4 tasks done
bobobo1618 opened this issue Apr 21, 2016 · 3 comments
Open
4 tasks done

Don't break WebP Polyfill #74

bobobo1618 opened this issue Apr 21, 2016 · 3 comments

Comments

@bobobo1618
Copy link

Description

WebP is a great image format but only Chrome natively supports it. A Javascript polyfill exists but (I believe) due to iron-image not populating the img element's src tag, the polyfill doesn't work.

Expected outcome

https://jsfiddle.net/t03yybsm/2/ shows two images on all browsers.

Actual outcome

https://jsfiddle.net/t03yybsm/2/ shows two images on Chrome and one broken image on most other browers.

Live Demo

https://jsfiddle.net/t03yybsm/2/

Steps to reproduce

https://jsfiddle.net/t03yybsm/2/

Browsers Affected

  • [-] Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • [?] Edge
  • [?] IE 11
  • [?] IE 10
@TimvdLippe
Copy link

Hm probably https://github.com/PolymerElements/iron-image/blob/master/iron-image.html#L295 should be .setAttribute("src", src) instead?

@bicknellr
Copy link
Contributor

I think this is going to be difficult to support (without making specific concessions for this polyfill) with the sizing case since this polyfill relies on directly accessing the img. Does it even work with Shadow DOM?

@weber-stephen
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants