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
Fix non-passive event listener warning in Chrome #4424
Conversation
src/platforms/platform.dom.js
Outdated
}()); | ||
|
||
function addEventListener(node, type, listener) { | ||
if (node.addEventListener) { |
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.
@etimberg addEventListener
and removeEventListener
seems supported by IE9+ and all other browsers. What do you think to simplify these methods and remove attach/detachEvent
+ ['on' + type] =
?
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 think we can do that. Our official support is IE >=11
src/platforms/platform.dom.js
Outdated
}()); | ||
|
||
function addEventListener(node, type, listener) { | ||
if (node.addEventListener) { |
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 think we can do that. Our official support is IE >=11
5c079ff
to
9657401
Compare
Deprecate `addEvent` and `removeEvent`, and move implementation in `platform.dom.js`. Add 'options' feature detection to register event listeners as passive and prevent warning in Chrome.
9657401
to
9d8ebcb
Compare
Updated: removed old ways to add/remove events. |
Looks good to me |
Deprecate
addEvent
andremoveEvent
, and move implementation inplatform.dom.js
. Add 'options' feature detection to register event listeners as passive and prevent warning in Chrome.Replaces #4356
Fixes #4287