-
Notifications
You must be signed in to change notification settings - Fork 46.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
Stop passing null as second argument to document.createElement() #6896
Conversation
Can we just always pass cc @jimfb |
I tried that, it was my first guess: Firefox helpfully gives you |
Haha, got it. Let’s split into two branches to make it a bit easier on eyes? } else if (props.is) {
...
} else {
...
} |
Sure thing, done. |
Is there any way to test this with jsdom so we don’t regress? |
@darobin updated the pull request. |
Not that I can think of, at least not without intercepting |
Thanks! |
Do you know if this Firefox bug been reported to Mozilla? |
Yes, I discussed it on #whatwg this morning to double-check, and reported it in bugzilla. |
…ebook#6896) * Stop passing null as second argument to document.createElement() * rewrap check for props.is to make it more readable (cherry picked from commit 2636155)
* Stop passing null as second argument to document.createElement() * rewrap check for props.is to make it more readable (cherry picked from commit 2636155)
When using the two-parameter variant of
document.createElement()
(which is used for Custom Elements), ifnull
is passed as the second parameter then Firefox will stringify it to the DOM as anis="null"
attribute. I don't believe that this causes any manner of problem, but it is surprising (as exemplified in this discussion thread.This change simply changes the call to avoid passing
null
.