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 detect/tests for prefetch #2610
Conversation
Hey, just stumbled upon this. This check may exclude IE11 which appears to support prefetch, but not relList :( This isn’t an issue for preload because IE supports neither. |
Do any of the detects do browser detection for a case like this?
|
feature-detects/rel/prefetch.js
Outdated
@@ -0,0 +1,27 @@ | |||
/*! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
creating a "rel" directory for this test only seems overkill. isnt there a better place for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can move it, just was thinking a follow up pr would be for rel=preload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I propose putting it in a "link" subdirectory, since it is a test on the link element ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
yeah, that UAparser is onyl used during testing of Modernizr to check against the caniuse database. It is generally not advised to use it in normal feature tests. |
Looks like https://github.com/Modernizr/Modernizr/search?q=navigator.userAgent |
Yes, that sounds reasonable :-) |
a87bf2f
to
98b0341
Compare
@rejas Added ie11 check using |
Thanks for the PR and your persistence :-) Merged! |
* Add detect/tests for prefetch * Move to link directory * Add in check for ie11 edge case
* Add detect/tests for prefetch * Move to link directory * Add in check for ie11 edge case
* Add detect/tests for prefetch * Move to link directory * Add in check for ie11 edge case
* Add avif detection (#2539) * Add avif detection * Add tests Both the integration test and the caniuse test * Add polyfill * Add support for ResizeObserver (#2582) * Add Clipboard API (#2573) * Add Clipboard API testing * Implement sub-modules (but badly) * Solve ESLint errors 🙄 * Improve the sub-properties detection * Move feature detect location * Add detection for support of scrollToOptions mode of window.scrollTo() (#2575) * Add detect/tests for prefetch (#2610) * Add detect/tests for prefetch * Move to link directory * Add in check for ie11 edge case * Add feature detection for IndexedDB 2.0 (#2607) * Add a|area[ping] detection (#2671) * Add a|area[ping] detect * add aping|areaping to integration tests * Add author tag * Add Mediastream feature detect (#2669) * Create mediastream.js * added mediarecorder as test * Update config-all.json * Added metadata to mediastream.js * Update mediastream.js * Removed extra line, added a new tag 'media' * moved mediastream.js to /webrtc dir * Update config-all.json * Add test for :focus-visible and fix wrong references in :focus-within (#2665) * Create focusvisible.js * Fix wrong reference to CSS focus-within feature * Fix wrong reference for CSS focus-within feature * Add css-focus-visible to caniuse integration tests * Include focusvisible in config-all.json * Add authors tag to focusvisible.js Co-authored-by: Markel F <github@markel.dev> Co-authored-by: Christian Andersson <chris.chris.90@hotmail.com> Co-authored-by: Chris Smith <chris13524@users.noreply.github.com> Co-authored-by: Jordan Tepper <jstepper91@gmail.com> Co-authored-by: Tan Zhen Yong <Xenonym@users.noreply.github.com> Co-authored-by: Hélio Correia <dev@heliocorreia.org> Co-authored-by: Onkar Dahale <dahaleonkar@gmail.com>
Closes #2536