Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit ee22d3b

Browse files
committed
Add test for calling document.registerElement without 2nd argument
1 parent c374f7e commit ee22d3b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/js/customElements.js

+10
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ suite('customElements', function() {
3636
assert.ok(false, 'document.registerElement failed to throw when given no arguments');
3737
});
3838

39+
// http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-interface-to-register
40+
test('document.registerElement second argument is optional', function() {
41+
try {
42+
document.registerElement('x-no-proto');
43+
} catch(x) {
44+
return;
45+
}
46+
assert.ok(true, 'document.registerElement failed to function without ElementRegistionOptions argument');
47+
});
48+
3949
test('document.registerElement requires name argument to not conflict with a reserved name', function() {
4050
try {
4151
document.registerElement('font-face', {prototype: Object.create(HTMLElement.prototype)});

0 commit comments

Comments
 (0)