Skip to content
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

Added toLowerCase for vnode.tagName to support webcomponents #413

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Wildhoney
Copy link

@Wildhoney Wildhoney commented Sep 21, 2016

I actually think this could be a bug in Chrome's implementation of Custom Elements, but I thought I'd open a PR to at least open a discussion on it. If it is indeed a Chrome issue, then of course I don't expect this to be merged — however I couldn't find a related Chrome bug.

The issue:

Whilst in most cases HTML is case insensitive, using Custom Elements v1's customElements.define it seems that custom elements are case-sensitive when using document.createElement as shown in the following Fiddle (note: requires Chrome Canary, as customElements.define won't work in Chrome yet).

By adding toLowerCase in virtual-dom's vnode.tagName the connectedCallback function is invoked as expected. Interestingly, in the Fiddle it doesn't matter how the HTML is written (rightfully so), as both <example-node /> and <EXAMPLE-NODE /> are equals, and thus work perfectly.

Thoughts?

@coveralls
Copy link

coveralls commented Sep 21, 2016

Coverage Status

Coverage remained the same at 97.531% when pulling 1326f2f on Wildhoney:webcomponents-v1-case-sensitivity into 947ecf9 on Matt-Esch:master.

@Wildhoney
Copy link
Author

Raised issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants