-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Is node shadow root check improved #5828
Conversation
src/core/core.helpers.js
Outdated
@@ -486,7 +486,7 @@ module.exports = function() { | |||
*/ | |||
helpers._getParentNode = function(domNode) { | |||
var parent = domNode.parentNode; | |||
if (parent && parent.host) { | |||
if (parent && Object.prototype.toString.call(parent) === '[object ShadowRoot]') { |
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 I prefer if (parent && parent.toString() === '[object ShadowRoot]') {
because it's better minified.
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.
@simonbrunel done
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.
Thanks @karaxuna
Fixes #5826