-
Notifications
You must be signed in to change notification settings - Fork 791
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: Avoid IE problems by using nodeName instead of tagName #1219
Conversation
I'm seeing additional usage in |
@@ -5,7 +5,7 @@ if (ariaHeadingLevel !== null) { | |||
return true; | |||
} | |||
|
|||
var headingLevel = node.tagName.match(/H(\d)/); | |||
var headingLevel = node.nodeName.match(/H(\d)/); |
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.
do you need toUpperCase()
here?
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 am going to leave this on as is (no need to uppercase).
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 disagree. In xhtml nodeName is lower case, which means this won't match.
@marcysutton - the usage in |
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.
This is a maintenance PR, to update
node.tagName
usages tonode.nodeName
.Did not update the usages in:
lib/core/utils/css-parser.js
- as this is a copy/pasted (imported) module.lib/core/utils/qsa.js
- as this seems to break a lot of tests.Closes issue:
Reviewer checks
Required fields, to be filled out by PR reviewer(s)