New issue
Advanced search Search tips

Issue 778194 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

customElements.get requires lowerCase, while nodeName is upper case

Reported by pfigh...@gmail.com, Oct 25 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36

Steps to reproduce the problem:
https://codepen.io/anon/pen/LzKKJK?editors=1010#0

What is the expected behavior?
customElements.get(elem.nodeName) should return custom element constructor

What went wrong?
customElements.get(elem.nodeName) returns undefined. It is required to call customElements.get(elem.nodeName.toLowerCase()) to fix problem.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 60.0.3112.101  Channel: n/a
OS Version: 6.3
Flash Version:
 
Components: Blink>DOM

Comment 2 by ajha@chromium.org, Oct 26 2017

Cc: ajha@chromium.org
Labels: Needs-Milestone M-64 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on the latest canary(64.0.3249.0/.2) on Windows-10, Mac OS 10.12.6 and Linux Ubuntu 14.04.

Older chrome version(50.0.2624.0) doesn't return anything with the give codepen and on chrome version: 55.0.2883.87 customElements.get(elem.nodeName) returns undefined. Hence marking this as Untriaged and as Non-Regression issue.  

Comment 3 by kochi@chromium.org, Oct 26 2017

Components: -Blink>DOM Blink>HTML>CustomElements
Status: Available (was: Untriaged)
Status: WontFix (was: Available)
This is working per spec. https://html.spec.whatwg.org/#dom-customelementregistry-get

We don't do any kind of normalization or case-folding or other error-correction on the argument.

Use elem.localName instead of elem.nodeName.

Sign in to add a comment