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
CustomElementRegistry.prototype.get() and case sensitivity #604
Comments
As far as I can tell and implemented, it's not case-insensitive:
|
Would be good to test, but yeah, I wonder how Chrome ended up not matching this. |
As a consumer of the APIs, I would assume case-insensitive because it would seem that's how other parts of the DOM API behave. For example |
Also here, as the library using this method, we don't know what case the consumer used and since |
If we had something like #566, then we could get the exact casing with only a constructor reference. |
You should use localName, not tagName. |
Calling By the way, |
Yep, my bad. Fixed.
Awesome, thank you all for being so quick to respond and sorry for any ignorance on my part. So looks like a bug in Blink then, or should we just continue to be defensive like we are? EDIT I assume |
|
@treshugart will you file a bug against Chrome? Would be good to mention it here. We should probably close this once that is done or maybe wait until there's test coverage. |
Hmm, I went to reproduce a reduced test case and it seems to be working fine now. That's really odd because Chrome worked and toLowerCase() made Safari work. That was literally the only difference in the code. I'll close this for now. If I end up reproducing it I'll raise an issue and link to this. |
I was hoping to get clarification on whether or not the name passed into
customElements.get()
is case-sensitive. In Chrome it is not, and in Safari Tech Preview it is. Depending on the outcome of this issue, I'll file a bug in the appropriate bug tracker. Thanks!The text was updated successfully, but these errors were encountered: