Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Hello 👋, @cure53
I determined that
_isNode
is a function that determines whether the givenobject
argument is aDOM Node
.Can
typeof Node
result inobject
?In my tests,
Node
gets "function" as the result of the "typeof" operator.I checked on
safari
,firefox
,Edge
, andChrome
and found that the result of typeof Node isfunction
. (Of course, in Node.js, theundefined
)e744840
Looking at the previous commit history, I think it's because of the code like
typeof Node === 'object'
that doesn't work properly.We simply need to make sure that the result of "typeof Node" is 'function' and that the object is an instance of Node.
After fixing the code, the tests all passed.
Please review this pull request to see if it's appropriate. 🙏
Firefox
chrome
safari
Edge
Tasks