Skip to content
Permalink
Browse files

custom-elements: document.createElementNS() should set prefixes to cu…

…stom elements.

We had a bug that createElementNS() ignored prefixes.
New behavior matches to the specification and Firefox.

* Document-createElementNS.html:
  Fix a copypasta error.

* ScriptCustomElementDefinition::CreateElementSync:
  Implement Step 6.1.10.

* Document::createElementNS:
  Fix an argument of definition lookup.

* CustomElement::CreateUndefinedElement:
  Use Document::CreateRawElement(), which sets prefixes correctly,
  instead of HTMLElementFactory::createHTMLElement().

* ustomElementDefinition::CreateElementAsync:
  Use Document::CreateRawElement(), which sets prefixes correctly,
  instead of HTMLElementFactory::createRawHTMLElement().

Bug: 806639
Change-Id: I74b431d4475d7cf84f65ab0ff1b24773cbc64079
  • Loading branch information...
tkent-google authored and chromium-wpt-export-bot committed Jan 30, 2018
1 parent db29e4e commit f7b647798d6556a3011881eec691c4521621575a
Showing with 1 addition and 1 deletion.
  1. +1 −1 custom-elements/Document-createElementNS.html
@@ -28,7 +28,7 @@
customElements.define('my-builtin', MyBuiltinElement, { extends: 'address' });
let element = document.createElementNS('http://www.w3.org/1999/xhtml', 'p:address', { is: 'my-builtin'});
assert_true(element instanceof MyElement);
assert_true(element instanceof MyBuiltinElement);
assert_equals(element.prefix, 'p');
}, 'builtin: document.createElementNS should create custom elements with prefixes.');

0 comments on commit f7b6477

Please sign in to comment.
You can’t perform that action at this time.