diff --git a/spec/custom/index.html b/spec/custom/index.html index c7227622..fc5c7471 100644 --- a/spec/custom/index.html +++ b/spec/custom/index.html @@ -336,11 +336,11 @@
DOMImplementation
's createDocument
method is invoked with namespace set to HTML Namespace or when the createHTMLDocument
method is invoked, use the registry of the associated document to the new instance.In all other cases, new documents must not have a registry.
@@ -531,11 +532,21 @@
+<p is="x-foo">Paragraph of amazement</p>
+
+Or imperatively, in JavaScript:
+
+var foo = document.createElement('p', 'x-foo');
+Elements with SVGElement
prototype deserve a special mention: using custom tag approach results in ignored elements in SVG. Thus, your SVG-based custom elements would almost always be type extensions.
Document
InterfaceTo allow creating both custom tag and type extension-style custom elements, the createElement
or createElementNS
methods have an optional typeExtension
argument:
To allow creating both custom tag and type extension-style custom elements, the createElement
or createElementNS
methods have overloads with a typeExtension
argument:
partial interface Document {
- Element createElement(DOMString localName, optional DOMString typeExtension);
- Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional DOMString typeExtension);
+ Element createElement(DOMString localName, DOMString typeExtension);
+ Element createElementNS(DOMString? namespace, DOMString qualifiedName, DOMString typeExtension);
};