customElements.get requires lowerCase, while nodeName is upper case
Reported by
pfigh...@gmail.com,
Oct 25 2017
|
||||
Issue descriptionUserAgent: 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:
,
Oct 26 2017
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.
,
Oct 26 2017
,
Oct 26 2017
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 |
||||
Comment 1 by dtapu...@chromium.org
, Oct 25 2017