4 <title>If document has no registry NotSupportedError is thrown</title>
5 <meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru">
6 <meta name="assert" content="If REGISTRY does not exist, set ERROR to NoRegistry and stop.">
7 <link rel="help" href="http://www.w3.org/TR/custom-elements/#dfn-element-registration-algorithm">
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 = document.implementation.createDocument(null, 'test', null);
18 assert_throws('NotSupportedError', function(){
19 doc.registerElement('x-a');
20 }, 'Registering valid custom element in document ' +
21 'without registry should throw NotSupportedError');
23 }, 'Registering valid custom element without options in document ' +
24 'without registry should throw NotSupportedError');
28 var doc = document.implementation.createDocument(null, 'test', null);
29 var proto = Object.create(HTMLElement.prototype);
31 assert_throws('NotSupportedError', function(){
32 doc.registerElement('x-b', { prototype: proto, extends: 'a'});
33 }, 'Registering valid custom element in document ' +
34 'without registry should throw NotSupportedError');
36 }, 'Registering valid custom element with options in document ' +
37 'without registry should throw NotSupportedError');