4 <title>Document.createElement() and Document.createElementNS() create custom element of type, specified by single localName argument</title>
5 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
6 <meta name="assert" content="Let TYPE be typeExtension, or localName if typeExtension is not present">
7 <link rel="help" href="http://www.w3.org/TR/custom-elements/#extensions-to-document-interface-to-instantiate">
8 <script src="../../../../../resources/testharness.js"></script>
9 <script src="../../../../../resources/testharnessreport.js"></script>
10 <script src="../../testcommon.js"></script>
11 <link rel="stylesheet" href="../../../../../resources/testharness.css">
17 var doc = newHTMLDocument();
19 var GeneratedConstructor = doc.registerElement(name);
20 var customElement = doc.createElement(name);
22 assert_equals(Object.getPrototypeOf(customElement), GeneratedConstructor.prototype,
23 'Custom element type should be the local name of the custom element');
24 }, 'Test Document.createElement() creates custom element of type, ' +
25 'specified by single localName argument');
29 var doc = newHTMLDocument();
31 var GeneratedConstructor = doc.registerElement(name);
32 var customElement = doc.createElementNS(HTML_NAMESPACE, name);
33 assert_equals(Object.getPrototypeOf(customElement), GeneratedConstructor.prototype,
34 'Custom element type should be the local name of the custom element');
35 }, 'Test Document.createElementNS() creates custom element of type, ' +
36 'specified by localName argument. Argument typeExtension is not passed');