This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Section4: "If both types of custom element names are provided at the time of element's instantiation, the custom tag must win over the type extension." Thinking about createElement() behavior: Given this being defined: > var FooElement = document.register( > "x-foo", > { prototype: Object.create(HTMLDivElement.prototype) }); Question 1: What kind of element is created when calling this? > var foo = document.createElement("div", "x-foo"); - 1a: <x-foo> of FooElement - 1b: <div is="x-foo"> of FooElement My reading (of Section 4) is 1b. This is fine, but... Given an additional definition: > var BarElement = document.register( > "x-bar", { prototype: Object.create(FooElement.prototype) }); Question 2: What kind of element is created when calling this? > var bar = document.createElement("x-foo", "x-bar"); - 2a: <x-bar> of BarElement - 2b: <x-foo is="x-bar"> of BarElement My reading is 2b. But this contradicts the statement "the custom tag must win over the type extension". It could be 2a by taking the statement. In such case, the behavior is inconsistent to IMO. Also, with same definitions.. Question 3: What kind of element is created when parsing this? someDiv.innerHTML = "<x-foo is='x-bar'></x-foo>"; - 3a: <x-foo is='x-bar'> of BarElement - 3b: <x-foo is="x-bar"> of FooElement I'm not sure which is correct. 3a seems natural. but it also contradicts "custom tag wins" rule. 3b matches the rule. But it is different from what createElement() is doing. My feeling is that we can just drop "custom tag wins" rule. Does this make sense? Or I misunderstand the spec?
Looks like I was confused. Closing.