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 querySelector test, addresses #1194 #1195

Merged
merged 3 commits into from
Jan 27, 2014

Conversation

triblondon
Copy link
Contributor

Wasn't sure whether document should be an injected dependency, but the convention seems to be to assume it's a global, so have followed that.

@stucox
Copy link
Member

stucox commented Jan 22, 2014

Thanks Andrew.

We have a module for document.documentElement, but not document… so assuming global is fine I think.

Dumb questions:

  • I take it we’re assuming this also implies querySelectorAll() support
  • Any polyfills we should mention? We can define them in lib/polyfills.json then attach them via the polyfills metadata attribute
  • Any documentation we could link to via the notes metadata attribute? e.g. W3C/WHATWG specs or MDN docs

@triblondon
Copy link
Contributor Author

I take it we’re assuming this also implies querySelectorAll() support

Yes. I know of now implementations that don't implement both, but happy to AND the two checks.

Any polyfills we should mention? We can define them in lib/polyfills.json then attach them via the polyfills metadata attribute

I found https://github.com/termi/CSS_selector_engine. To be honest I'm more concerned about declaring requirements in terms of Modernizr tests than providing means of satisfying them, but from a quick search this seems reasonable.

Any documentation we could link to via the notes metadata attribute? e.g. W3C/WHATWG specs or MDN docs

A quick search suggests http://www.w3.org/TR/selectors-api/#queryselectorall, but I'm not sure if that's the canonical spec.

@triblondon
Copy link
Contributor Author

I've addressed the docs and additional property test. Haven't added the polyfill - let me know if you need that and if @termi's one is the right one to use.

@stucox
Copy link
Member

stucox commented Jan 22, 2014

To be honest I'm more concerned about declaring requirements in terms of Modernizr tests than providing means of satisfying them

Me too, generally – I’d probably use jQuery instead of polyfilling querySelector or just avoid it altogether when not supported – but we’re trying to keep the metadata as complete as possible. Yep, just spotted @termi’s is the one we have on our polyfill wiki page so yeah I think it’d be a good one to mention.

@termi
Copy link

termi commented Jan 23, 2014

Hi all! I'm not working on my querySelector Polyfill throughout the year, but I can go back to work on it. Right now I need a feedback: that is good and that need to be improved.

@triblondon
Copy link
Contributor Author

Are you happy to accept this now, @stucox?

@stucox
Copy link
Member

stucox commented Jan 27, 2014

👍

Cheers!

stucox pushed a commit that referenced this pull request Jan 27, 2014
Add querySelector test, addresses #1194
@stucox stucox merged commit ff3b2de into Modernizr:master Jan 27, 2014
@triblondon triblondon deleted the queryselector branch January 27, 2014 09:14
patrickkettner pushed 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.

None yet

3 participants