-
Notifications
You must be signed in to change notification settings - Fork 48.7k
add picture element and related attributes #1848
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
Conversation
Nice. We'll also want to make sure we transform Can |
It's enough to open the console and do PS. Also, the answer seems to be no, they're attributes only. |
Whether Chrome stable (which supports
I guess the property will be de-deprecated when picture-support lands in Chrome. |
+1 for this :) |
@zpao Btw, it should've been asked before Or perhaps it shouldn't because because http://www.w3.org/html/wg/drafts/srcset/w3c-srcset/#additions-to-the-img-element says it's a |
@syranide - not a bad idea, might be good to evolve to that. For the time being though, let's keep it as a string since that's the only API in the DOM ( @fgnass - if these can only be set/get via attributes, then we need to make sure we specify |
@fgnass Did you test changing any of these attribute values? That's the real test. Initial render doesn't go through the path the needs to set |
@zpao In Canary everything works fine. In a polyfilled Chrome (stable) changing I guess the most sane behaviour would be if React used the property if it exisited, e.g. So I'd suggest to use |
if attributes work everywhere let's just do that. And there's no need to rebase (unless you want to rebase against master). All the files should still be in the same place... |
Done. And sorry for my confusion – I thought I did the change in DefaultDOMPropertyConfig.js but just realised that it was already in HTMLDOMPropertyConfig.js :) |
@zpao Hmm, an idea would be to have a |
@syranide Keep those ideas in the discussions they belong, otherwise they get lost :) |
add picture element and related attributes
add picture element and related attributes
This PR adds support for the picture element as well as the related media and sizes attributes. The picture element recently landed in Chrome 37 (behind a flag) and can be polyfilled in a wide range of browsers using picturefill.