-
Notifications
You must be signed in to change notification settings - Fork 3k
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 for passive event listeners #1982
Add detect for passive event listeners #1982
Conversation
@patrickkettner This is my first naive attempt at modifying modernizr - let me what I'm missing. Eg. do I need to do add anything specific for testing? I verified that the test page shows 'true' in Chrome 52 and false in Firefox and that the existing tests pass on my machine. |
Autobahning my way to Berlin, I'll check it out when I arrive in few hours Thanks!
|
@paulirish, Patrick is travelling, can you review / merge? |
/*! | ||
{ | ||
"async": false, | ||
"authors": ["Rick Byers"], |
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.
we only mark async when true, you can pull this out
just the one tiny nit, otherwise lgtm! |
Great, thanks Patrick, and thanks for fixing the nit too! |
|
||
define(['Modernizr'], function(Modernizr) { | ||
Modernizr.addTest('passiveeventlisteners', function() { | ||
var supportsPassiveOption = false; |
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.
Should this not be cached? Why running this over and over again?
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.
Modernizr caches all results by default
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.
Actually I do not get how to access the result of this test. Cannot find it in the docs either.
Fixes #1894