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

add srcset test #1105

Merged
merged 1 commit into from
Dec 2, 2013
Merged

add srcset test #1105

merged 1 commit into from
Dec 2, 2013

Conversation

patrickkettner
Copy link
Member

fixes #661, since <picture> seems to be being abandoned.~

edit: struck out unnecessary speculative information.


*/
define(['Modernizr', 'createElement'], function( Modernizr, createElement ) {
Modernizr.addTest('srcset', function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really necessary to use a function just pass the boolean to addTest

Modernizr.addTest('srcset', 'srcset' in createElement('img'));

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pft, wtf is this.

thanks for catching that

@roblarsen
Copy link
Contributor

Fwiw <picture> is staging a comeback. Latest: http://geekhood.net/picture-element.html

@patrickkettner
Copy link
Member Author

Sorry, that was too presumptive of me to say without being more embedded with the RICG. My point was more that until a browser ships, or announces an intent-to-ship of the <picture> element, I don't think it is a good idea to have it in Modernizr.

src-N is being implemented by firefox and blink, and webkit already has srcset. Therefore, we should have tests for these.

Thank you very much for correcting me, however. I really don't want to be the source of misinformation.

@roblarsen
Copy link
Contributor

Yeah, it's actually a very late development so you'd have to be following it day-to-day to know where that whole mess had gotten to. src-N was called an abomination against all that's holy or something similar by webkit and that put the brakes on it (blink won't implement without webkit doing so as well). Much table-flipping happened and people went back to the drawing board. Improbably <picture> came out of the fog, reanimated and full of promise.

@patrickkettner
Copy link
Member Author

where has blink said they wouldn't implement src-n without webkit doing so?

@roblarsen
Copy link
Contributor

Unfortunately, src-N is no-go because WebKit refuses to implement it. Now, it's possible you'll convince them that it's not "a grotesque perversion of the HTML language" (which does seems a bit hyperbolic), but that seems unlikely to happen in the near term. Given the tenor of that discussion, I'd expect we'll need to come up with a new approach and involve stakeholders from the WebKit community earlier in the design process.

http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-November/041397.html

@patrickkettner
Copy link
Member Author

well snap.

hot drama, indeed.

patrickkettner added a commit that referenced this pull request Dec 2, 2013
@patrickkettner patrickkettner merged commit 6dec526 into Modernizr:master Dec 2, 2013
@patrickkettner patrickkettner deleted the srcset branch December 2, 2013 03:04
patrickkettner added a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

img srcset and picture
3 participants