This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-interface-to-instantiate says: partial interface Document { Element createElement(DOMString localName, optional DOMString typeExtension); Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional DOMString typeExtension); }; This will fail in a conformant WebIDL implementation, because for example it creates two overloads of createElement: [NewObject] Element createElement(DOMString localName); Element createElement(DOMString localName, optional DOMString typeExtension); but WebIDL says: If there is more than one entry in an effective overload set that has a given type list length, then for those entries there MUST be an index i such that for each pair of entries the types at index i are distinguishable. and in this case the overload set for type list length == 1 has two entries which are identical. In practice, Gecko instead has this IDL: partial interface Document { [NewObject] Element createElement(DOMString localName, DOMString typeExtension); [NewObject] Element createElementNS(DOMString? namespace, DOMString qualifiedName, DOMString typeExtension); }; (note lack of "optional", which is key); I'm sorry that we didn't provide feedback on this when we implemented something different from the spec. That said Blink's IDL here is: [CustomElementCallbacks, PerWorldBindings, ActivityLogging=ForIsolatedWorlds, RaisesException] Element createElement(DOMString localName, [TreatNullAs=NullString] DOMString typeExtension); which also has a non-optional typeExtension....
Make sense. I was originally just monkeypatching createElement, but then turned it into partial, if I recall this correctly. https://github.com/w3c/webcomponents/pull/10 PTAL?
https://github.com/w3c/webcomponents/commit/b282d45f9aa96ac9f19ea2ceacad2966b7ea45f6