Permalink
Show file tree
Hide file tree
3 comments
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix #13265 #13332: traversing methods with text nodes. Close gh-1145.
- Loading branch information
Showing
3 changed files
with
68 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b734666
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.
Via the docs here it looks like IE 10's behavior is by the spec:http://dom.spec.whatwg.org/#node
Wouldn't it be possible to simply do
elem[elem.nodeType === 1? 'parentElement': 'parentNode']
?b734666
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've got no problem with that pattern...
parentNode
areparentElement
are both plenty fast, so whichever yields a smaller file size wins.How do you get IE10 being correct here, though? http://dom.spec.whatwg.org/#node clearly specifies
parentElement
as a property of allNode
s, but IE10 doesn't expose it on#text
(see http://bugs.jquery.com/ticket/13265).b734666
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.
@gibson042
By bad. I read the
Element ?
as conditional :PI'll pass it along to the IE folks.