Commit 1c6d493b authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

custom-elements: Customized built-in elements should work in innerHTML.

HTMLConstructionSite should call CustomElementDefinition::
CreateElementAsync() if it's in fragment parsing mode.

- Separate HTMLElementFactory::createHTMLElement() into two.
  CreateElementAsync() uses the first part of separated functions.

Bug: 805280
Change-Id: I2e2dafcd33c033c87c3accaca7c1b00c56474591
Reviewed-on: https://chromium-review.googlesource.com/890680Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532308}
parent 8a854532
This is a testharness.js-based test. This is a testharness.js-based test.
Harness Error. harness_status.status = 1 , harness_status.message = Uncaught TypeError: Illegal constructor: localName does not match the HTML element interface Harness Error. harness_status.status = 1 , harness_status.message = Uncaught TypeError: Illegal constructor: localName does not match the HTML element interface
Found 442 tests; 307 PASS, 135 FAIL, 0 TIMEOUT, 0 NOTRUN. Found 442 tests; 402 PASS, 40 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS a: Define a customized built-in element PASS a: Define a customized built-in element
PASS a: Operator 'new' should instantiate a customized built-in element PASS a: Operator 'new' should instantiate a customized built-in element
PASS a: document.createElement() should instantiate a customized built-in element PASS a: document.createElement() should instantiate a customized built-in element
FAIL a: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyA extends HTMLAnchorElement { PASS a: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLAnchorElement() { [native code] }"
PASS abbr: Define a customized built-in element PASS abbr: Define a customized built-in element
PASS abbr: Operator 'new' should instantiate a customized built-in element PASS abbr: Operator 'new' should instantiate a customized built-in element
PASS abbr: document.createElement() should instantiate a customized built-in element PASS abbr: document.createElement() should instantiate a customized built-in element
FAIL abbr: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyAbbr extends HTMLElement { PASS abbr: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS address: Define a customized built-in element PASS address: Define a customized built-in element
PASS address: Operator 'new' should instantiate a customized built-in element PASS address: Operator 'new' should instantiate a customized built-in element
PASS address: document.createElement() should instantiate a customized built-in element PASS address: document.createElement() should instantiate a customized built-in element
FAIL address: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyAddress extends HTMLElement { PASS address: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS area: Define a customized built-in element PASS area: Define a customized built-in element
PASS area: Operator 'new' should instantiate a customized built-in element PASS area: Operator 'new' should instantiate a customized built-in element
PASS area: document.createElement() should instantiate a customized built-in element PASS area: document.createElement() should instantiate a customized built-in element
FAIL area: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyArea extends HTMLAreaElement { PASS area: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLAreaElement() { [native code] }"
PASS article: Define a customized built-in element PASS article: Define a customized built-in element
PASS article: Operator 'new' should instantiate a customized built-in element PASS article: Operator 'new' should instantiate a customized built-in element
PASS article: document.createElement() should instantiate a customized built-in element PASS article: document.createElement() should instantiate a customized built-in element
FAIL article: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyArticle extends HTMLElement { PASS article: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS aside: Define a customized built-in element PASS aside: Define a customized built-in element
PASS aside: Operator 'new' should instantiate a customized built-in element PASS aside: Operator 'new' should instantiate a customized built-in element
PASS aside: document.createElement() should instantiate a customized built-in element PASS aside: document.createElement() should instantiate a customized built-in element
FAIL aside: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyAside extends HTMLElement { PASS aside: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS audio: Define a customized built-in element PASS audio: Define a customized built-in element
PASS audio: Operator 'new' should instantiate a customized built-in element PASS audio: Operator 'new' should instantiate a customized built-in element
PASS audio: document.createElement() should instantiate a customized built-in element PASS audio: document.createElement() should instantiate a customized built-in element
FAIL audio: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyAudio extends HTMLAudioElement { PASS audio: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLAudioElement() { [native code] }"
PASS b: Define a customized built-in element PASS b: Define a customized built-in element
PASS b: Operator 'new' should instantiate a customized built-in element PASS b: Operator 'new' should instantiate a customized built-in element
PASS b: document.createElement() should instantiate a customized built-in element PASS b: document.createElement() should instantiate a customized built-in element
FAIL b: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyB extends HTMLElement { PASS b: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS base: Define a customized built-in element PASS base: Define a customized built-in element
PASS base: Operator 'new' should instantiate a customized built-in element PASS base: Operator 'new' should instantiate a customized built-in element
PASS base: document.createElement() should instantiate a customized built-in element PASS base: document.createElement() should instantiate a customized built-in element
FAIL base: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyBase extends HTMLBaseElement { PASS base: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLBaseElement() { [native code] }"
PASS bdi: Define a customized built-in element PASS bdi: Define a customized built-in element
FAIL bdi: Operator 'new' should instantiate a customized built-in element Illegal constructor: localName does not match the HTML element interface FAIL bdi: Operator 'new' should instantiate a customized built-in element Illegal constructor: localName does not match the HTML element interface
FAIL bdi: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyBdi extends HTMLElement { FAIL bdi: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyBdi extends HTMLElement {
...@@ -88,38 +52,22 @@ FAIL bdi: innerHTML should instantiate a customized built-in element assert_equa ...@@ -88,38 +52,22 @@ FAIL bdi: innerHTML should instantiate a customized built-in element assert_equa
PASS bdo: Define a customized built-in element PASS bdo: Define a customized built-in element
PASS bdo: Operator 'new' should instantiate a customized built-in element PASS bdo: Operator 'new' should instantiate a customized built-in element
PASS bdo: document.createElement() should instantiate a customized built-in element PASS bdo: document.createElement() should instantiate a customized built-in element
FAIL bdo: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyBdo extends HTMLElement { PASS bdo: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS blockquote: Define a customized built-in element PASS blockquote: Define a customized built-in element
PASS blockquote: Operator 'new' should instantiate a customized built-in element PASS blockquote: Operator 'new' should instantiate a customized built-in element
PASS blockquote: document.createElement() should instantiate a customized built-in element PASS blockquote: document.createElement() should instantiate a customized built-in element
FAIL blockquote: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyBlockquote extends HTMLQuoteElement { PASS blockquote: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLQuoteElement() { [native code] }"
PASS body: Define a customized built-in element PASS body: Define a customized built-in element
PASS body: Operator 'new' should instantiate a customized built-in element PASS body: Operator 'new' should instantiate a customized built-in element
PASS body: document.createElement() should instantiate a customized built-in element PASS body: document.createElement() should instantiate a customized built-in element
PASS br: Define a customized built-in element PASS br: Define a customized built-in element
PASS br: Operator 'new' should instantiate a customized built-in element PASS br: Operator 'new' should instantiate a customized built-in element
PASS br: document.createElement() should instantiate a customized built-in element PASS br: document.createElement() should instantiate a customized built-in element
FAIL br: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyBr extends HTMLBRElement { PASS br: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLBRElement() { [native code] }"
PASS button: Define a customized built-in element PASS button: Define a customized built-in element
PASS button: Operator 'new' should instantiate a customized built-in element PASS button: Operator 'new' should instantiate a customized built-in element
PASS button: document.createElement() should instantiate a customized built-in element PASS button: document.createElement() should instantiate a customized built-in element
FAIL button: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyButton extends HTMLButtonElement { PASS button: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLButtonElement() { [native code] }"
PASS canvas: Define a customized built-in element PASS canvas: Define a customized built-in element
FAIL canvas: Operator 'new' should instantiate a customized built-in element Illegal constructor FAIL canvas: Operator 'new' should instantiate a customized built-in element Illegal constructor
FAIL canvas: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyCanvas extends HTMLCanvasElement { FAIL canvas: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyCanvas extends HTMLCanvasElement {
...@@ -135,115 +83,59 @@ FAIL canvas: innerHTML should instantiate a customized built-in element assert_e ...@@ -135,115 +83,59 @@ FAIL canvas: innerHTML should instantiate a customized built-in element assert_e
PASS caption: Define a customized built-in element PASS caption: Define a customized built-in element
PASS caption: Operator 'new' should instantiate a customized built-in element PASS caption: Operator 'new' should instantiate a customized built-in element
PASS caption: document.createElement() should instantiate a customized built-in element PASS caption: document.createElement() should instantiate a customized built-in element
FAIL caption: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyCaption extends HTMLTableCaptionElement { PASS caption: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTableCaptionElement() { [native code] }"
PASS cite: Define a customized built-in element PASS cite: Define a customized built-in element
PASS cite: Operator 'new' should instantiate a customized built-in element PASS cite: Operator 'new' should instantiate a customized built-in element
PASS cite: document.createElement() should instantiate a customized built-in element PASS cite: document.createElement() should instantiate a customized built-in element
FAIL cite: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyCite extends HTMLElement { PASS cite: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS code: Define a customized built-in element PASS code: Define a customized built-in element
PASS code: Operator 'new' should instantiate a customized built-in element PASS code: Operator 'new' should instantiate a customized built-in element
PASS code: document.createElement() should instantiate a customized built-in element PASS code: document.createElement() should instantiate a customized built-in element
FAIL code: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyCode extends HTMLElement { PASS code: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS col: Define a customized built-in element PASS col: Define a customized built-in element
PASS col: Operator 'new' should instantiate a customized built-in element PASS col: Operator 'new' should instantiate a customized built-in element
PASS col: document.createElement() should instantiate a customized built-in element PASS col: document.createElement() should instantiate a customized built-in element
FAIL col: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyCol extends HTMLTableColElement { PASS col: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTableColElement() { [native code] }"
PASS colgroup: Define a customized built-in element PASS colgroup: Define a customized built-in element
PASS colgroup: Operator 'new' should instantiate a customized built-in element PASS colgroup: Operator 'new' should instantiate a customized built-in element
PASS colgroup: document.createElement() should instantiate a customized built-in element PASS colgroup: document.createElement() should instantiate a customized built-in element
FAIL colgroup: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyColgroup extends HTMLTableColElement { PASS colgroup: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTableColElement() { [native code] }"
PASS data: Define a customized built-in element PASS data: Define a customized built-in element
PASS data: Operator 'new' should instantiate a customized built-in element PASS data: Operator 'new' should instantiate a customized built-in element
PASS data: document.createElement() should instantiate a customized built-in element PASS data: document.createElement() should instantiate a customized built-in element
FAIL data: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyData extends HTMLDataElement { PASS data: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLDataElement() { [native code] }"
PASS dd: Define a customized built-in element PASS dd: Define a customized built-in element
PASS dd: Operator 'new' should instantiate a customized built-in element PASS dd: Operator 'new' should instantiate a customized built-in element
PASS dd: document.createElement() should instantiate a customized built-in element PASS dd: document.createElement() should instantiate a customized built-in element
FAIL dd: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyDd extends HTMLElement { PASS dd: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS del: Define a customized built-in element PASS del: Define a customized built-in element
PASS del: Operator 'new' should instantiate a customized built-in element PASS del: Operator 'new' should instantiate a customized built-in element
PASS del: document.createElement() should instantiate a customized built-in element PASS del: document.createElement() should instantiate a customized built-in element
FAIL del: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyDel extends HTMLModElement { PASS del: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLModElement() { [native code] }"
PASS details: Define a customized built-in element PASS details: Define a customized built-in element
PASS details: Operator 'new' should instantiate a customized built-in element PASS details: Operator 'new' should instantiate a customized built-in element
PASS details: document.createElement() should instantiate a customized built-in element PASS details: document.createElement() should instantiate a customized built-in element
FAIL details: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyDetails extends HTMLDetailsElement { PASS details: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLDetailsElement() { [native code] }"
PASS dfn: Define a customized built-in element PASS dfn: Define a customized built-in element
PASS dfn: Operator 'new' should instantiate a customized built-in element PASS dfn: Operator 'new' should instantiate a customized built-in element
PASS dfn: document.createElement() should instantiate a customized built-in element PASS dfn: document.createElement() should instantiate a customized built-in element
FAIL dfn: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyDfn extends HTMLElement { PASS dfn: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS div: Define a customized built-in element PASS div: Define a customized built-in element
PASS div: Operator 'new' should instantiate a customized built-in element PASS div: Operator 'new' should instantiate a customized built-in element
PASS div: document.createElement() should instantiate a customized built-in element PASS div: document.createElement() should instantiate a customized built-in element
FAIL div: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyDiv extends HTMLDivElement { PASS div: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLDivElement() { [native code] }"
PASS dl: Define a customized built-in element PASS dl: Define a customized built-in element
PASS dl: Operator 'new' should instantiate a customized built-in element PASS dl: Operator 'new' should instantiate a customized built-in element
PASS dl: document.createElement() should instantiate a customized built-in element PASS dl: document.createElement() should instantiate a customized built-in element
FAIL dl: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyDl extends HTMLDListElement { PASS dl: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLDListElement() { [native code] }"
PASS dt: Define a customized built-in element PASS dt: Define a customized built-in element
PASS dt: Operator 'new' should instantiate a customized built-in element PASS dt: Operator 'new' should instantiate a customized built-in element
PASS dt: document.createElement() should instantiate a customized built-in element PASS dt: document.createElement() should instantiate a customized built-in element
FAIL dt: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyDt extends HTMLElement { PASS dt: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS em: Define a customized built-in element PASS em: Define a customized built-in element
PASS em: Operator 'new' should instantiate a customized built-in element PASS em: Operator 'new' should instantiate a customized built-in element
PASS em: document.createElement() should instantiate a customized built-in element PASS em: document.createElement() should instantiate a customized built-in element
FAIL em: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyEm extends HTMLElement { PASS em: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS embed: Define a customized built-in element PASS embed: Define a customized built-in element
FAIL embed: Operator 'new' should instantiate a customized built-in element Illegal constructor FAIL embed: Operator 'new' should instantiate a customized built-in element Illegal constructor
FAIL embed: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyEmbed extends HTMLEmbedElement { FAIL embed: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyEmbed extends HTMLEmbedElement {
...@@ -259,35 +151,19 @@ FAIL embed: innerHTML should instantiate a customized built-in element assert_eq ...@@ -259,35 +151,19 @@ FAIL embed: innerHTML should instantiate a customized built-in element assert_eq
PASS fieldset: Define a customized built-in element PASS fieldset: Define a customized built-in element
PASS fieldset: Operator 'new' should instantiate a customized built-in element PASS fieldset: Operator 'new' should instantiate a customized built-in element
PASS fieldset: document.createElement() should instantiate a customized built-in element PASS fieldset: document.createElement() should instantiate a customized built-in element
FAIL fieldset: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyFieldset extends HTMLFieldSetElement { PASS fieldset: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLFieldSetElement() { [native code] }"
PASS figcaption: Define a customized built-in element PASS figcaption: Define a customized built-in element
PASS figcaption: Operator 'new' should instantiate a customized built-in element PASS figcaption: Operator 'new' should instantiate a customized built-in element
PASS figcaption: document.createElement() should instantiate a customized built-in element PASS figcaption: document.createElement() should instantiate a customized built-in element
FAIL figcaption: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyFigcaption extends HTMLElement { PASS figcaption: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS figure: Define a customized built-in element PASS figure: Define a customized built-in element
PASS figure: Operator 'new' should instantiate a customized built-in element PASS figure: Operator 'new' should instantiate a customized built-in element
PASS figure: document.createElement() should instantiate a customized built-in element PASS figure: document.createElement() should instantiate a customized built-in element
FAIL figure: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyFigure extends HTMLElement { PASS figure: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS footer: Define a customized built-in element PASS footer: Define a customized built-in element
PASS footer: Operator 'new' should instantiate a customized built-in element PASS footer: Operator 'new' should instantiate a customized built-in element
PASS footer: document.createElement() should instantiate a customized built-in element PASS footer: document.createElement() should instantiate a customized built-in element
FAIL footer: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyFooter extends HTMLElement { PASS footer: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS form: Define a customized built-in element PASS form: Define a customized built-in element
FAIL form: Operator 'new' should instantiate a customized built-in element Illegal constructor FAIL form: Operator 'new' should instantiate a customized built-in element Illegal constructor
FAIL form: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyForm extends HTMLFormElement { FAIL form: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyForm extends HTMLFormElement {
...@@ -303,86 +179,46 @@ FAIL form: innerHTML should instantiate a customized built-in element assert_equ ...@@ -303,86 +179,46 @@ FAIL form: innerHTML should instantiate a customized built-in element assert_equ
PASS h1: Define a customized built-in element PASS h1: Define a customized built-in element
PASS h1: Operator 'new' should instantiate a customized built-in element PASS h1: Operator 'new' should instantiate a customized built-in element
PASS h1: document.createElement() should instantiate a customized built-in element PASS h1: document.createElement() should instantiate a customized built-in element
FAIL h1: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyH1 extends HTMLHeadingElement { PASS h1: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLHeadingElement() { [native code] }"
PASS h2: Define a customized built-in element PASS h2: Define a customized built-in element
PASS h2: Operator 'new' should instantiate a customized built-in element PASS h2: Operator 'new' should instantiate a customized built-in element
PASS h2: document.createElement() should instantiate a customized built-in element PASS h2: document.createElement() should instantiate a customized built-in element
FAIL h2: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyH2 extends HTMLHeadingElement { PASS h2: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLHeadingElement() { [native code] }"
PASS h3: Define a customized built-in element PASS h3: Define a customized built-in element
PASS h3: Operator 'new' should instantiate a customized built-in element PASS h3: Operator 'new' should instantiate a customized built-in element
PASS h3: document.createElement() should instantiate a customized built-in element PASS h3: document.createElement() should instantiate a customized built-in element
FAIL h3: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyH3 extends HTMLHeadingElement { PASS h3: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLHeadingElement() { [native code] }"
PASS h4: Define a customized built-in element PASS h4: Define a customized built-in element
PASS h4: Operator 'new' should instantiate a customized built-in element PASS h4: Operator 'new' should instantiate a customized built-in element
PASS h4: document.createElement() should instantiate a customized built-in element PASS h4: document.createElement() should instantiate a customized built-in element
FAIL h4: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyH4 extends HTMLHeadingElement { PASS h4: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLHeadingElement() { [native code] }"
PASS h5: Define a customized built-in element PASS h5: Define a customized built-in element
PASS h5: Operator 'new' should instantiate a customized built-in element PASS h5: Operator 'new' should instantiate a customized built-in element
PASS h5: document.createElement() should instantiate a customized built-in element PASS h5: document.createElement() should instantiate a customized built-in element
FAIL h5: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyH5 extends HTMLHeadingElement { PASS h5: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLHeadingElement() { [native code] }"
PASS h6: Define a customized built-in element PASS h6: Define a customized built-in element
PASS h6: Operator 'new' should instantiate a customized built-in element PASS h6: Operator 'new' should instantiate a customized built-in element
PASS h6: document.createElement() should instantiate a customized built-in element PASS h6: document.createElement() should instantiate a customized built-in element
FAIL h6: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyH6 extends HTMLHeadingElement { PASS h6: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLHeadingElement() { [native code] }"
PASS header: Define a customized built-in element PASS header: Define a customized built-in element
PASS header: Operator 'new' should instantiate a customized built-in element PASS header: Operator 'new' should instantiate a customized built-in element
PASS header: document.createElement() should instantiate a customized built-in element PASS header: document.createElement() should instantiate a customized built-in element
FAIL header: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyHeader extends HTMLElement { PASS header: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS hgroup: Define a customized built-in element PASS hgroup: Define a customized built-in element
PASS hgroup: Operator 'new' should instantiate a customized built-in element PASS hgroup: Operator 'new' should instantiate a customized built-in element
PASS hgroup: document.createElement() should instantiate a customized built-in element PASS hgroup: document.createElement() should instantiate a customized built-in element
FAIL hgroup: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyHgroup extends HTMLElement { PASS hgroup: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS hr: Define a customized built-in element PASS hr: Define a customized built-in element
PASS hr: Operator 'new' should instantiate a customized built-in element PASS hr: Operator 'new' should instantiate a customized built-in element
PASS hr: document.createElement() should instantiate a customized built-in element PASS hr: document.createElement() should instantiate a customized built-in element
FAIL hr: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyHr extends HTMLHRElement { PASS hr: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLHRElement() { [native code] }"
PASS html: Define a customized built-in element PASS html: Define a customized built-in element
PASS html: Operator 'new' should instantiate a customized built-in element PASS html: Operator 'new' should instantiate a customized built-in element
PASS html: document.createElement() should instantiate a customized built-in element PASS html: document.createElement() should instantiate a customized built-in element
PASS i: Define a customized built-in element PASS i: Define a customized built-in element
PASS i: Operator 'new' should instantiate a customized built-in element PASS i: Operator 'new' should instantiate a customized built-in element
PASS i: document.createElement() should instantiate a customized built-in element PASS i: document.createElement() should instantiate a customized built-in element
FAIL i: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyI extends HTMLElement { PASS i: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS iframe: Define a customized built-in element PASS iframe: Define a customized built-in element
FAIL iframe: Operator 'new' should instantiate a customized built-in element Illegal constructor FAIL iframe: Operator 'new' should instantiate a customized built-in element Illegal constructor
FAIL iframe: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyIframe extends HTMLIFrameElement { FAIL iframe: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyIframe extends HTMLIFrameElement {
...@@ -398,11 +234,7 @@ FAIL iframe: innerHTML should instantiate a customized built-in element assert_e ...@@ -398,11 +234,7 @@ FAIL iframe: innerHTML should instantiate a customized built-in element assert_e
PASS img: Define a customized built-in element PASS img: Define a customized built-in element
PASS img: Operator 'new' should instantiate a customized built-in element PASS img: Operator 'new' should instantiate a customized built-in element
PASS img: document.createElement() should instantiate a customized built-in element PASS img: document.createElement() should instantiate a customized built-in element
FAIL img: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyImg extends HTMLImageElement { PASS img: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLImageElement() { [native code] }"
PASS input: Define a customized built-in element PASS input: Define a customized built-in element
FAIL input: Operator 'new' should instantiate a customized built-in element Illegal constructor FAIL input: Operator 'new' should instantiate a customized built-in element Illegal constructor
FAIL input: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyInput extends HTMLInputElement { FAIL input: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyInput extends HTMLInputElement {
...@@ -418,107 +250,55 @@ FAIL input: innerHTML should instantiate a customized built-in element assert_eq ...@@ -418,107 +250,55 @@ FAIL input: innerHTML should instantiate a customized built-in element assert_eq
PASS ins: Define a customized built-in element PASS ins: Define a customized built-in element
PASS ins: Operator 'new' should instantiate a customized built-in element PASS ins: Operator 'new' should instantiate a customized built-in element
PASS ins: document.createElement() should instantiate a customized built-in element PASS ins: document.createElement() should instantiate a customized built-in element
FAIL ins: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyIns extends HTMLModElement { PASS ins: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLModElement() { [native code] }"
PASS kbd: Define a customized built-in element PASS kbd: Define a customized built-in element
PASS kbd: Operator 'new' should instantiate a customized built-in element PASS kbd: Operator 'new' should instantiate a customized built-in element
PASS kbd: document.createElement() should instantiate a customized built-in element PASS kbd: document.createElement() should instantiate a customized built-in element
FAIL kbd: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyKbd extends HTMLElement { PASS kbd: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS label: Define a customized built-in element PASS label: Define a customized built-in element
PASS label: Operator 'new' should instantiate a customized built-in element PASS label: Operator 'new' should instantiate a customized built-in element
PASS label: document.createElement() should instantiate a customized built-in element PASS label: document.createElement() should instantiate a customized built-in element
FAIL label: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyLabel extends HTMLLabelElement { PASS label: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLLabelElement() { [native code] }"
PASS legend: Define a customized built-in element PASS legend: Define a customized built-in element
PASS legend: Operator 'new' should instantiate a customized built-in element PASS legend: Operator 'new' should instantiate a customized built-in element
PASS legend: document.createElement() should instantiate a customized built-in element PASS legend: document.createElement() should instantiate a customized built-in element
FAIL legend: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyLegend extends HTMLLegendElement { PASS legend: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLLegendElement() { [native code] }"
PASS li: Define a customized built-in element PASS li: Define a customized built-in element
PASS li: Operator 'new' should instantiate a customized built-in element PASS li: Operator 'new' should instantiate a customized built-in element
PASS li: document.createElement() should instantiate a customized built-in element PASS li: document.createElement() should instantiate a customized built-in element
FAIL li: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyLi extends HTMLLIElement { PASS li: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLLIElement() { [native code] }"
PASS link: Define a customized built-in element PASS link: Define a customized built-in element
PASS link: Operator 'new' should instantiate a customized built-in element PASS link: Operator 'new' should instantiate a customized built-in element
PASS link: document.createElement() should instantiate a customized built-in element PASS link: document.createElement() should instantiate a customized built-in element
FAIL link: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyLink extends HTMLLinkElement { PASS link: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLLinkElement() { [native code] }"
PASS main: Define a customized built-in element PASS main: Define a customized built-in element
PASS main: Operator 'new' should instantiate a customized built-in element PASS main: Operator 'new' should instantiate a customized built-in element
PASS main: document.createElement() should instantiate a customized built-in element PASS main: document.createElement() should instantiate a customized built-in element
FAIL main: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyMain extends HTMLElement { PASS main: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS map: Define a customized built-in element PASS map: Define a customized built-in element
PASS map: Operator 'new' should instantiate a customized built-in element PASS map: Operator 'new' should instantiate a customized built-in element
PASS map: document.createElement() should instantiate a customized built-in element PASS map: document.createElement() should instantiate a customized built-in element
FAIL map: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyMap extends HTMLMapElement { PASS map: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLMapElement() { [native code] }"
PASS mark: Define a customized built-in element PASS mark: Define a customized built-in element
PASS mark: Operator 'new' should instantiate a customized built-in element PASS mark: Operator 'new' should instantiate a customized built-in element
PASS mark: document.createElement() should instantiate a customized built-in element PASS mark: document.createElement() should instantiate a customized built-in element
FAIL mark: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyMark extends HTMLElement { PASS mark: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS menu: Define a customized built-in element PASS menu: Define a customized built-in element
PASS menu: Operator 'new' should instantiate a customized built-in element PASS menu: Operator 'new' should instantiate a customized built-in element
PASS menu: document.createElement() should instantiate a customized built-in element PASS menu: document.createElement() should instantiate a customized built-in element
FAIL menu: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyMenu extends HTMLMenuElement { PASS menu: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLMenuElement() { [native code] }"
PASS meta: Define a customized built-in element PASS meta: Define a customized built-in element
PASS meta: Operator 'new' should instantiate a customized built-in element PASS meta: Operator 'new' should instantiate a customized built-in element
PASS meta: document.createElement() should instantiate a customized built-in element PASS meta: document.createElement() should instantiate a customized built-in element
FAIL meta: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyMeta extends HTMLMetaElement { PASS meta: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLMetaElement() { [native code] }"
PASS meter: Define a customized built-in element PASS meter: Define a customized built-in element
PASS meter: Operator 'new' should instantiate a customized built-in element PASS meter: Operator 'new' should instantiate a customized built-in element
PASS meter: document.createElement() should instantiate a customized built-in element PASS meter: document.createElement() should instantiate a customized built-in element
FAIL meter: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyMeter extends HTMLMeterElement { PASS meter: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLMeterElement() { [native code] }"
PASS nav: Define a customized built-in element PASS nav: Define a customized built-in element
PASS nav: Operator 'new' should instantiate a customized built-in element PASS nav: Operator 'new' should instantiate a customized built-in element
PASS nav: document.createElement() should instantiate a customized built-in element PASS nav: document.createElement() should instantiate a customized built-in element
FAIL nav: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyNav extends HTMLElement { PASS nav: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS noscript: Define a customized built-in element PASS noscript: Define a customized built-in element
FAIL noscript: Operator 'new' should instantiate a customized built-in element Illegal constructor: localName does not match the HTML element interface FAIL noscript: Operator 'new' should instantiate a customized built-in element Illegal constructor: localName does not match the HTML element interface
FAIL noscript: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyNoscript extends HTMLElement { FAIL noscript: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyNoscript extends HTMLElement {
...@@ -546,91 +326,47 @@ FAIL object: innerHTML should instantiate a customized built-in element assert_e ...@@ -546,91 +326,47 @@ FAIL object: innerHTML should instantiate a customized built-in element assert_e
PASS ol: Define a customized built-in element PASS ol: Define a customized built-in element
PASS ol: Operator 'new' should instantiate a customized built-in element PASS ol: Operator 'new' should instantiate a customized built-in element
PASS ol: document.createElement() should instantiate a customized built-in element PASS ol: document.createElement() should instantiate a customized built-in element
FAIL ol: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyOl extends HTMLOListElement { PASS ol: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLOListElement() { [native code] }"
PASS optgroup: Define a customized built-in element PASS optgroup: Define a customized built-in element
PASS optgroup: Operator 'new' should instantiate a customized built-in element PASS optgroup: Operator 'new' should instantiate a customized built-in element
PASS optgroup: document.createElement() should instantiate a customized built-in element PASS optgroup: document.createElement() should instantiate a customized built-in element
FAIL optgroup: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyOptgroup extends HTMLOptGroupElement { PASS optgroup: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLOptGroupElement() { [native code] }"
PASS option: Define a customized built-in element PASS option: Define a customized built-in element
PASS option: Operator 'new' should instantiate a customized built-in element PASS option: Operator 'new' should instantiate a customized built-in element
PASS option: document.createElement() should instantiate a customized built-in element PASS option: document.createElement() should instantiate a customized built-in element
FAIL option: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyOption extends HTMLOptionElement { PASS option: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLOptionElement() { [native code] }"
PASS output: Define a customized built-in element PASS output: Define a customized built-in element
PASS output: Operator 'new' should instantiate a customized built-in element PASS output: Operator 'new' should instantiate a customized built-in element
PASS output: document.createElement() should instantiate a customized built-in element PASS output: document.createElement() should instantiate a customized built-in element
FAIL output: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyOutput extends HTMLOutputElement { PASS output: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLOutputElement() { [native code] }"
PASS p: Define a customized built-in element PASS p: Define a customized built-in element
PASS p: Operator 'new' should instantiate a customized built-in element PASS p: Operator 'new' should instantiate a customized built-in element
PASS p: document.createElement() should instantiate a customized built-in element PASS p: document.createElement() should instantiate a customized built-in element
FAIL p: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyP extends HTMLParagraphElement { PASS p: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLParagraphElement() { [native code] }"
PASS param: Define a customized built-in element PASS param: Define a customized built-in element
PASS param: Operator 'new' should instantiate a customized built-in element PASS param: Operator 'new' should instantiate a customized built-in element
PASS param: document.createElement() should instantiate a customized built-in element PASS param: document.createElement() should instantiate a customized built-in element
FAIL param: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyParam extends HTMLParamElement { PASS param: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLParamElement() { [native code] }"
PASS picture: Define a customized built-in element PASS picture: Define a customized built-in element
PASS picture: Operator 'new' should instantiate a customized built-in element PASS picture: Operator 'new' should instantiate a customized built-in element
PASS picture: document.createElement() should instantiate a customized built-in element PASS picture: document.createElement() should instantiate a customized built-in element
FAIL picture: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyPicture extends HTMLPictureElement { PASS picture: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLPictureElement() { [native code] }"
PASS pre: Define a customized built-in element PASS pre: Define a customized built-in element
PASS pre: Operator 'new' should instantiate a customized built-in element PASS pre: Operator 'new' should instantiate a customized built-in element
PASS pre: document.createElement() should instantiate a customized built-in element PASS pre: document.createElement() should instantiate a customized built-in element
FAIL pre: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyPre extends HTMLPreElement { PASS pre: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLPreElement() { [native code] }"
PASS progress: Define a customized built-in element PASS progress: Define a customized built-in element
PASS progress: Operator 'new' should instantiate a customized built-in element PASS progress: Operator 'new' should instantiate a customized built-in element
PASS progress: document.createElement() should instantiate a customized built-in element PASS progress: document.createElement() should instantiate a customized built-in element
FAIL progress: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyProgress extends HTMLProgressElement { PASS progress: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLProgressElement() { [native code] }"
PASS q: Define a customized built-in element PASS q: Define a customized built-in element
PASS q: Operator 'new' should instantiate a customized built-in element PASS q: Operator 'new' should instantiate a customized built-in element
PASS q: document.createElement() should instantiate a customized built-in element PASS q: document.createElement() should instantiate a customized built-in element
FAIL q: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyQ extends HTMLQuoteElement { PASS q: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLQuoteElement() { [native code] }"
PASS rp: Define a customized built-in element PASS rp: Define a customized built-in element
PASS rp: Operator 'new' should instantiate a customized built-in element PASS rp: Operator 'new' should instantiate a customized built-in element
PASS rp: document.createElement() should instantiate a customized built-in element PASS rp: document.createElement() should instantiate a customized built-in element
FAIL rp: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyRp extends HTMLElement { PASS rp: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS rt: Define a customized built-in element PASS rt: Define a customized built-in element
FAIL rt: Operator 'new' should instantiate a customized built-in element Illegal constructor: localName does not match the HTML element interface FAIL rt: Operator 'new' should instantiate a customized built-in element Illegal constructor: localName does not match the HTML element interface
FAIL rt: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyRt extends HTMLElement { FAIL rt: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyRt extends HTMLElement {
...@@ -658,19 +394,11 @@ FAIL ruby: innerHTML should instantiate a customized built-in element assert_equ ...@@ -658,19 +394,11 @@ FAIL ruby: innerHTML should instantiate a customized built-in element assert_equ
PASS s: Define a customized built-in element PASS s: Define a customized built-in element
PASS s: Operator 'new' should instantiate a customized built-in element PASS s: Operator 'new' should instantiate a customized built-in element
PASS s: document.createElement() should instantiate a customized built-in element PASS s: document.createElement() should instantiate a customized built-in element
FAIL s: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyS extends HTMLElement { PASS s: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS samp: Define a customized built-in element PASS samp: Define a customized built-in element
PASS samp: Operator 'new' should instantiate a customized built-in element PASS samp: Operator 'new' should instantiate a customized built-in element
PASS samp: document.createElement() should instantiate a customized built-in element PASS samp: document.createElement() should instantiate a customized built-in element
FAIL samp: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MySamp extends HTMLElement { PASS samp: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS script: Define a customized built-in element PASS script: Define a customized built-in element
PASS script: Operator 'new' should instantiate a customized built-in element PASS script: Operator 'new' should instantiate a customized built-in element
PASS script: document.createElement() should instantiate a customized built-in element PASS script: document.createElement() should instantiate a customized built-in element
...@@ -682,67 +410,35 @@ FAIL script: innerHTML should instantiate a customized built-in element assert_e ...@@ -682,67 +410,35 @@ FAIL script: innerHTML should instantiate a customized built-in element assert_e
PASS section: Define a customized built-in element PASS section: Define a customized built-in element
PASS section: Operator 'new' should instantiate a customized built-in element PASS section: Operator 'new' should instantiate a customized built-in element
PASS section: document.createElement() should instantiate a customized built-in element PASS section: document.createElement() should instantiate a customized built-in element
FAIL section: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MySection extends HTMLElement { PASS section: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS select: Define a customized built-in element PASS select: Define a customized built-in element
PASS select: Operator 'new' should instantiate a customized built-in element PASS select: Operator 'new' should instantiate a customized built-in element
PASS select: document.createElement() should instantiate a customized built-in element PASS select: document.createElement() should instantiate a customized built-in element
FAIL select: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MySelect extends HTMLSelectElement { PASS select: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLSelectElement() { [native code] }"
PASS small: Define a customized built-in element PASS small: Define a customized built-in element
PASS small: Operator 'new' should instantiate a customized built-in element PASS small: Operator 'new' should instantiate a customized built-in element
PASS small: document.createElement() should instantiate a customized built-in element PASS small: document.createElement() should instantiate a customized built-in element
FAIL small: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MySmall extends HTMLElement { PASS small: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS source: Define a customized built-in element PASS source: Define a customized built-in element
PASS source: Operator 'new' should instantiate a customized built-in element PASS source: Operator 'new' should instantiate a customized built-in element
PASS source: document.createElement() should instantiate a customized built-in element PASS source: document.createElement() should instantiate a customized built-in element
FAIL source: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MySource extends HTMLSourceElement { PASS source: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLSourceElement() { [native code] }"
PASS span: Define a customized built-in element PASS span: Define a customized built-in element
PASS span: Operator 'new' should instantiate a customized built-in element PASS span: Operator 'new' should instantiate a customized built-in element
PASS span: document.createElement() should instantiate a customized built-in element PASS span: document.createElement() should instantiate a customized built-in element
FAIL span: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MySpan extends HTMLSpanElement { PASS span: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLSpanElement() { [native code] }"
PASS strong: Define a customized built-in element PASS strong: Define a customized built-in element
PASS strong: Operator 'new' should instantiate a customized built-in element PASS strong: Operator 'new' should instantiate a customized built-in element
PASS strong: document.createElement() should instantiate a customized built-in element PASS strong: document.createElement() should instantiate a customized built-in element
FAIL strong: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyStrong extends HTMLElement { PASS strong: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS style: Define a customized built-in element PASS style: Define a customized built-in element
PASS style: Operator 'new' should instantiate a customized built-in element PASS style: Operator 'new' should instantiate a customized built-in element
PASS style: document.createElement() should instantiate a customized built-in element PASS style: document.createElement() should instantiate a customized built-in element
FAIL style: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyStyle extends HTMLStyleElement { PASS style: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLStyleElement() { [native code] }"
PASS sub: Define a customized built-in element PASS sub: Define a customized built-in element
PASS sub: Operator 'new' should instantiate a customized built-in element PASS sub: Operator 'new' should instantiate a customized built-in element
PASS sub: document.createElement() should instantiate a customized built-in element PASS sub: document.createElement() should instantiate a customized built-in element
FAIL sub: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MySub extends HTMLElement { PASS sub: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS summary: Define a customized built-in element PASS summary: Define a customized built-in element
FAIL summary: Operator 'new' should instantiate a customized built-in element Illegal constructor: localName does not match the HTML element interface FAIL summary: Operator 'new' should instantiate a customized built-in element Illegal constructor: localName does not match the HTML element interface
FAIL summary: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MySummary extends HTMLElement { FAIL summary: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MySummary extends HTMLElement {
...@@ -758,131 +454,67 @@ FAIL summary: innerHTML should instantiate a customized built-in element assert_ ...@@ -758,131 +454,67 @@ FAIL summary: innerHTML should instantiate a customized built-in element assert_
PASS sup: Define a customized built-in element PASS sup: Define a customized built-in element
PASS sup: Operator 'new' should instantiate a customized built-in element PASS sup: Operator 'new' should instantiate a customized built-in element
PASS sup: document.createElement() should instantiate a customized built-in element PASS sup: document.createElement() should instantiate a customized built-in element
FAIL sup: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MySup extends HTMLElement { PASS sup: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS table: Define a customized built-in element PASS table: Define a customized built-in element
PASS table: Operator 'new' should instantiate a customized built-in element PASS table: Operator 'new' should instantiate a customized built-in element
PASS table: document.createElement() should instantiate a customized built-in element PASS table: document.createElement() should instantiate a customized built-in element
FAIL table: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyTable extends HTMLTableElement { PASS table: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTableElement() { [native code] }"
PASS tbody: Define a customized built-in element PASS tbody: Define a customized built-in element
PASS tbody: Operator 'new' should instantiate a customized built-in element PASS tbody: Operator 'new' should instantiate a customized built-in element
PASS tbody: document.createElement() should instantiate a customized built-in element PASS tbody: document.createElement() should instantiate a customized built-in element
FAIL tbody: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyTbody extends HTMLTableSectionElement { PASS tbody: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTableSectionElement() { [native code] }"
PASS td: Define a customized built-in element PASS td: Define a customized built-in element
PASS td: Operator 'new' should instantiate a customized built-in element PASS td: Operator 'new' should instantiate a customized built-in element
PASS td: document.createElement() should instantiate a customized built-in element PASS td: document.createElement() should instantiate a customized built-in element
FAIL td: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyTd extends HTMLTableCellElement { PASS td: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTableCellElement() { [native code] }"
PASS template: Define a customized built-in element PASS template: Define a customized built-in element
PASS template: Operator 'new' should instantiate a customized built-in element PASS template: Operator 'new' should instantiate a customized built-in element
PASS template: document.createElement() should instantiate a customized built-in element PASS template: document.createElement() should instantiate a customized built-in element
FAIL template: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyTemplate extends HTMLTemplateElement { PASS template: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTemplateElement() { [native code] }"
PASS textarea: Define a customized built-in element PASS textarea: Define a customized built-in element
PASS textarea: Operator 'new' should instantiate a customized built-in element PASS textarea: Operator 'new' should instantiate a customized built-in element
PASS textarea: document.createElement() should instantiate a customized built-in element PASS textarea: document.createElement() should instantiate a customized built-in element
FAIL textarea: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyTextarea extends HTMLTextAreaElement { PASS textarea: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTextAreaElement() { [native code] }"
PASS tfoot: Define a customized built-in element PASS tfoot: Define a customized built-in element
PASS tfoot: Operator 'new' should instantiate a customized built-in element PASS tfoot: Operator 'new' should instantiate a customized built-in element
PASS tfoot: document.createElement() should instantiate a customized built-in element PASS tfoot: document.createElement() should instantiate a customized built-in element
FAIL tfoot: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyTfoot extends HTMLTableSectionElement { PASS tfoot: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTableSectionElement() { [native code] }"
PASS th: Define a customized built-in element PASS th: Define a customized built-in element
PASS th: Operator 'new' should instantiate a customized built-in element PASS th: Operator 'new' should instantiate a customized built-in element
PASS th: document.createElement() should instantiate a customized built-in element PASS th: document.createElement() should instantiate a customized built-in element
FAIL th: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyTh extends HTMLTableCellElement { PASS th: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTableCellElement() { [native code] }"
PASS thead: Define a customized built-in element PASS thead: Define a customized built-in element
PASS thead: Operator 'new' should instantiate a customized built-in element PASS thead: Operator 'new' should instantiate a customized built-in element
PASS thead: document.createElement() should instantiate a customized built-in element PASS thead: document.createElement() should instantiate a customized built-in element
FAIL thead: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyThead extends HTMLTableSectionElement { PASS thead: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTableSectionElement() { [native code] }"
PASS time: Define a customized built-in element PASS time: Define a customized built-in element
PASS time: Operator 'new' should instantiate a customized built-in element PASS time: Operator 'new' should instantiate a customized built-in element
PASS time: document.createElement() should instantiate a customized built-in element PASS time: document.createElement() should instantiate a customized built-in element
FAIL time: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyTime extends HTMLTimeElement { PASS time: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTimeElement() { [native code] }"
PASS title: Define a customized built-in element PASS title: Define a customized built-in element
PASS title: Operator 'new' should instantiate a customized built-in element PASS title: Operator 'new' should instantiate a customized built-in element
PASS title: document.createElement() should instantiate a customized built-in element PASS title: document.createElement() should instantiate a customized built-in element
FAIL title: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyTitle extends HTMLTitleElement { PASS title: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTitleElement() { [native code] }"
PASS tr: Define a customized built-in element PASS tr: Define a customized built-in element
PASS tr: Operator 'new' should instantiate a customized built-in element PASS tr: Operator 'new' should instantiate a customized built-in element
PASS tr: document.createElement() should instantiate a customized built-in element PASS tr: document.createElement() should instantiate a customized built-in element
FAIL tr: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyTr extends HTMLTableRowElement { PASS tr: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTableRowElement() { [native code] }"
PASS track: Define a customized built-in element PASS track: Define a customized built-in element
PASS track: Operator 'new' should instantiate a customized built-in element PASS track: Operator 'new' should instantiate a customized built-in element
PASS track: document.createElement() should instantiate a customized built-in element PASS track: document.createElement() should instantiate a customized built-in element
FAIL track: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyTrack extends HTMLTrackElement { PASS track: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLTrackElement() { [native code] }"
PASS u: Define a customized built-in element PASS u: Define a customized built-in element
PASS u: Operator 'new' should instantiate a customized built-in element PASS u: Operator 'new' should instantiate a customized built-in element
PASS u: document.createElement() should instantiate a customized built-in element PASS u: document.createElement() should instantiate a customized built-in element
FAIL u: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyU extends HTMLElement { PASS u: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS ul: Define a customized built-in element PASS ul: Define a customized built-in element
PASS ul: Operator 'new' should instantiate a customized built-in element PASS ul: Operator 'new' should instantiate a customized built-in element
PASS ul: document.createElement() should instantiate a customized built-in element PASS ul: document.createElement() should instantiate a customized built-in element
FAIL ul: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyUl extends HTMLUListElement { PASS ul: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLUListElement() { [native code] }"
PASS var: Define a customized built-in element PASS var: Define a customized built-in element
PASS var: Operator 'new' should instantiate a customized built-in element PASS var: Operator 'new' should instantiate a customized built-in element
PASS var: document.createElement() should instantiate a customized built-in element PASS var: document.createElement() should instantiate a customized built-in element
FAIL var: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyVar extends HTMLElement { PASS var: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLElement() { [native code] }"
PASS video: Define a customized built-in element PASS video: Define a customized built-in element
FAIL video: Operator 'new' should instantiate a customized built-in element Illegal constructor FAIL video: Operator 'new' should instantiate a customized built-in element Illegal constructor
FAIL video: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyVideo extends HTMLVideoElement { FAIL video: document.createElement() should instantiate a customized built-in element assert_equals: expected function "class MyVideo extends HTMLVideoElement {
...@@ -910,26 +542,14 @@ FAIL wbr: innerHTML should instantiate a customized built-in element assert_equa ...@@ -910,26 +542,14 @@ FAIL wbr: innerHTML should instantiate a customized built-in element assert_equa
PASS datalist: Define a customized built-in element PASS datalist: Define a customized built-in element
PASS datalist: Operator 'new' should instantiate a customized built-in element PASS datalist: Operator 'new' should instantiate a customized built-in element
PASS datalist: document.createElement() should instantiate a customized built-in element PASS datalist: document.createElement() should instantiate a customized built-in element
FAIL datalist: innerHTML should instantiate a customized built-in element assert_equals: expected function "class extends HTMLDataListElement { PASS datalist: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLDataListElement() { [native code] }"
PASS dialog: Define a customized built-in element PASS dialog: Define a customized built-in element
PASS dialog: Operator 'new' should instantiate a customized built-in element PASS dialog: Operator 'new' should instantiate a customized built-in element
PASS dialog: document.createElement() should instantiate a customized built-in element PASS dialog: document.createElement() should instantiate a customized built-in element
FAIL dialog: innerHTML should instantiate a customized built-in element assert_equals: expected function "class MyDialog extends HTMLDialogElement { PASS dialog: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLDialogElement() { [native code] }"
PASS slot: Define a customized built-in element PASS slot: Define a customized built-in element
PASS slot: Operator 'new' should instantiate a customized built-in element PASS slot: Operator 'new' should instantiate a customized built-in element
PASS slot: document.createElement() should instantiate a customized built-in element PASS slot: document.createElement() should instantiate a customized built-in element
FAIL slot: innerHTML should instantiate a customized built-in element assert_equals: expected function "class extends HTMLSlotElement { PASS slot: innerHTML should instantiate a customized built-in element
constructor() {
super();
}
}" but got function "function HTMLSlotElement() { [native code] }"
Harness: the test ran to completion. Harness: the test ran to completion.
...@@ -67,7 +67,7 @@ static void create{{namespace}}FunctionMap() { ...@@ -67,7 +67,7 @@ static void create{{namespace}}FunctionMap() {
g_{{namespace}}_constructors->Set(data[i].tag.LocalName(), data[i].func); g_{{namespace}}_constructors->Set(data[i].tag.LocalName(), data[i].func);
} }
{{namespace}}Element* {{namespace}}ElementFactory::create{{namespace}}Element( {{namespace}}Element* {{namespace}}ElementFactory::CreateRaw{{namespace}}Element(
const AtomicString& localName, const AtomicString& localName,
Document& document, Document& document,
CreateElementFlags flags) { CreateElementFlags flags) {
...@@ -75,6 +75,15 @@ static void create{{namespace}}FunctionMap() { ...@@ -75,6 +75,15 @@ static void create{{namespace}}FunctionMap() {
create{{namespace}}FunctionMap(); create{{namespace}}FunctionMap();
if ({{namespace}}ConstructorFunction function = g_{{namespace}}_constructors->at(localName)) if ({{namespace}}ConstructorFunction function = g_{{namespace}}_constructors->at(localName))
return function(document, flags); return function(document, flags);
return nullptr;
}
{{namespace}}Element* {{namespace}}ElementFactory::create{{namespace}}Element(
const AtomicString& localName,
Document& document,
CreateElementFlags flags) {
if (auto* element = {{namespace}}ElementFactory::CreateRaw{{namespace}}Element(localName, document, flags))
return element;
{% if namespace == 'HTML' %} {% if namespace == 'HTML' %}
// createElement handles custom element creation itself in order to // createElement handles custom element creation itself in order to
...@@ -85,7 +94,7 @@ static void create{{namespace}}FunctionMap() { ...@@ -85,7 +94,7 @@ static void create{{namespace}}FunctionMap() {
if (flags != kCreatedByCreateElement && CustomElement::ShouldCreateCustomElement(localName)) { if (flags != kCreatedByCreateElement && CustomElement::ShouldCreateCustomElement(localName)) {
QualifiedName tagName(g_null_atom, localName, HTMLNames::xhtmlNamespaceURI); QualifiedName tagName(g_null_atom, localName, HTMLNames::xhtmlNamespaceURI);
if (flags & kAsynchronousCustomElements) if (flags & kAsynchronousCustomElements)
return CustomElement::CreateCustomElementAsync(document, tagName); return CustomElement::CreateCustomElementAsync(document, tagName, flags);
return CustomElement::CreateCustomElementSync(document, tagName); return CustomElement::CreateCustomElementSync(document, tagName);
} }
{% endif %} {% endif %}
......
...@@ -6,18 +6,24 @@ ...@@ -6,18 +6,24 @@
#ifndef BLINK_CORE_{{namespace|upper}}_ELEMENT_FACTORY_H_ #ifndef BLINK_CORE_{{namespace|upper}}_ELEMENT_FACTORY_H_
#define BLINK_CORE_{{namespace|upper}}_ELEMENT_FACTORY_H_ #define BLINK_CORE_{{namespace|upper}}_ELEMENT_FACTORY_H_
#include "core/dom/Document.h" #include "core/dom/CreateElementFlags.h"
#include "platform/wtf/Forward.h" #include "platform/wtf/Forward.h"
namespace blink { namespace blink {
class Document;
class {{namespace}}Element; class {{namespace}}Element;
{% if namespace == 'HTML' %}
class HTMLFormElement;
{% endif %}
class {{namespace}}ElementFactory { class {{namespace}}ElementFactory {
public: public:
// If |localName| is unknown, nullptr is returned.
static {{namespace}}Element* CreateRaw{{namespace}}Element(
const AtomicString& localName,
Document&,
CreateElementFlags flags);
// CreateRaw{{namespace}}Element() + custom element processing.
// If |localName| is unknown, a {{fallback_interface}} instance is returned.
static {{namespace}}Element* create{{namespace}}Element( static {{namespace}}Element* create{{namespace}}Element(
const AtomicString& localName, const AtomicString& localName,
Document&, Document&,
......
...@@ -138,7 +138,8 @@ HTMLElement* CustomElement::CreateCustomElementSync( ...@@ -138,7 +138,8 @@ HTMLElement* CustomElement::CreateCustomElementSync(
HTMLElement* CustomElement::CreateCustomElementAsync( HTMLElement* CustomElement::CreateCustomElementAsync(
Document& document, Document& document,
const QualifiedName& tag_name) { const QualifiedName& tag_name,
CreateElementFlags flags) {
DCHECK(ShouldCreateCustomElement(tag_name)); DCHECK(ShouldCreateCustomElement(tag_name));
// To create an element: // To create an element:
...@@ -148,7 +149,7 @@ HTMLElement* CustomElement::CreateCustomElementAsync( ...@@ -148,7 +149,7 @@ HTMLElement* CustomElement::CreateCustomElementAsync(
if (CustomElementDefinition* definition = DefinitionFor( if (CustomElementDefinition* definition = DefinitionFor(
document, document,
CustomElementDescriptor(tag_name.LocalName(), tag_name.LocalName()))) CustomElementDescriptor(tag_name.LocalName(), tag_name.LocalName())))
return definition->CreateElementAsync(document, tag_name); return definition->CreateElementAsync(document, tag_name, flags);
return CreateUndefinedElement(document, tag_name); return CreateUndefinedElement(document, tag_name);
} }
...@@ -257,8 +258,11 @@ void CustomElement::TryToUpgrade(Element* element) { ...@@ -257,8 +258,11 @@ void CustomElement::TryToUpgrade(Element* element) {
CustomElementRegistry* registry = CustomElement::Registry(*element); CustomElementRegistry* registry = CustomElement::Registry(*element);
if (!registry) if (!registry)
return; return;
if (CustomElementDefinition* definition = registry->DefinitionFor( const AtomicString& is_value = element->FastGetAttribute(HTMLNames::isAttr);
CustomElementDescriptor(element->localName(), element->localName()))) if (CustomElementDefinition* definition =
registry->DefinitionFor(CustomElementDescriptor(
is_value.IsNull() ? element->localName() : is_value,
element->localName())))
definition->EnqueueUpgradeReaction(element); definition->EnqueueUpgradeReaction(element);
else else
registry->AddCandidate(element); registry->AddCandidate(element);
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define CustomElement_h #define CustomElement_h
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/dom/CreateElementFlags.h"
#include "core/dom/Element.h" #include "core/dom/Element.h"
#include "platform/text/Character.h" #include "platform/text/Character.h"
#include "platform/wtf/ASCIICType.h" #include "platform/wtf/ASCIICType.h"
...@@ -74,7 +75,9 @@ class CORE_EXPORT CustomElement { ...@@ -74,7 +75,9 @@ class CORE_EXPORT CustomElement {
static HTMLElement* CreateCustomElementSync(Document&, static HTMLElement* CreateCustomElementSync(Document&,
const QualifiedName&, const QualifiedName&,
CustomElementDefinition*); CustomElementDefinition*);
static HTMLElement* CreateCustomElementAsync(Document&, const QualifiedName&); static HTMLElement* CreateCustomElementAsync(Document&,
const QualifiedName&,
CreateElementFlags);
static HTMLElement* CreateFailedElement(Document&, const QualifiedName&); static HTMLElement* CreateFailedElement(Document&, const QualifiedName&);
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "core/html/custom/CustomElementReaction.h" #include "core/html/custom/CustomElementReaction.h"
#include "core/html/custom/CustomElementReactionStack.h" #include "core/html/custom/CustomElementReactionStack.h"
#include "core/html/custom/CustomElementUpgradeReaction.h" #include "core/html/custom/CustomElementUpgradeReaction.h"
#include "core/html_element_factory.h"
namespace blink { namespace blink {
...@@ -106,8 +107,30 @@ HTMLElement* CustomElementDefinition::CreateElementForConstructor( ...@@ -106,8 +107,30 @@ HTMLElement* CustomElementDefinition::CreateElementForConstructor(
HTMLElement* CustomElementDefinition::CreateElementAsync( HTMLElement* CustomElementDefinition::CreateElementAsync(
Document& document, Document& document,
const QualifiedName& tag_name) { const QualifiedName& tag_name,
CreateElementFlags flags) {
// https://dom.spec.whatwg.org/#concept-create-element // https://dom.spec.whatwg.org/#concept-create-element
// 5. If definition is non-null, and definition’s name is not equal to
// its local name (i.e., definition represents a customized built-in
// element), then:
if (!descriptor_.IsAutonomous()) {
// 5.1. Let interface be the element interface for localName and the
// HTML namespace.
// 5.2. Set result to a new element that implements interface, with
// no attributes, namespace set to the HTML namespace, namespace
// prefix set to prefix, local name set to localName, custom element
// state set to "undefined", custom element definition set to null,
// is value set to is, and node document set to document.
auto* result = HTMLElementFactory::CreateRawHTMLElement(
tag_name.LocalName(), document, flags);
result->SetCustomElementState(CustomElementState::kUndefined);
// 5.4. Otherwise, enqueue a custom element upgrade reaction given
// result and definition.
EnqueueUpgradeReaction(result);
return result;
}
// 6. If definition is non-null, then: // 6. If definition is non-null, then:
// 6.2. If the synchronous custom elements flag is not set: // 6.2. If the synchronous custom elements flag is not set:
// 6.2.1. Set result to a new element that implements the HTMLElement // 6.2.1. Set result to a new element that implements the HTMLElement
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "bindings/core/v8/ScriptValue.h" #include "bindings/core/v8/ScriptValue.h"
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/dom/CreateElementFlags.h"
#include "core/html/custom/CustomElementDescriptor.h" #include "core/html/custom/CustomElementDescriptor.h"
#include "platform/bindings/ScriptWrappable.h" // For TraceWrapperBase #include "platform/bindings/ScriptWrappable.h" // For TraceWrapperBase
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
...@@ -54,7 +55,9 @@ class CORE_EXPORT CustomElementDefinition ...@@ -54,7 +55,9 @@ class CORE_EXPORT CustomElementDefinition
HTMLElement* CreateElementForConstructor(Document&); HTMLElement* CreateElementForConstructor(Document&);
virtual HTMLElement* CreateElementSync(Document&, const QualifiedName&) = 0; virtual HTMLElement* CreateElementSync(Document&, const QualifiedName&) = 0;
HTMLElement* CreateElementAsync(Document&, const QualifiedName&); HTMLElement* CreateElementAsync(Document&,
const QualifiedName&,
CreateElementFlags);
void Upgrade(Element*); void Upgrade(Element*);
......
...@@ -870,9 +870,7 @@ Element* HTMLConstructionSite::CreateElement( ...@@ -870,9 +870,7 @@ Element* HTMLConstructionSite::CreateElement(
QualifiedName tag_name(g_null_atom, token->GetName(), namespace_uri); QualifiedName tag_name(g_null_atom, token->GetName(), namespace_uri);
// "3. Let is be the value of the "is" attribute in the given token ..." etc. // "3. Let is be the value of the "is" attribute in the given token ..." etc.
// "4. Let definition be the result of looking up a custom element ..." etc. // "4. Let definition be the result of looking up a custom element ..." etc.
CustomElementDefinition* definition = auto* definition = LookUpCustomElementDefinition(document, token);
is_parsing_fragment_ ? nullptr
: LookUpCustomElementDefinition(document, token);
// "5. If definition is non-null and the parser was not originally created // "5. If definition is non-null and the parser was not originally created
// for the HTML fragment parsing algorithm, then let will execute script // for the HTML fragment parsing algorithm, then let will execute script
// be true." // be true."
...@@ -910,8 +908,13 @@ Element* HTMLConstructionSite::CreateElement( ...@@ -910,8 +908,13 @@ Element* HTMLConstructionSite::CreateElement(
// "9. If will execute script is true, then ..." etc. The CEReactionsScope // "9. If will execute script is true, then ..." etc. The CEReactionsScope
// and ThrowOnDynamicMarkupInsertionCountIncrementer destructors implement // and ThrowOnDynamicMarkupInsertionCountIncrementer destructors implement
// steps 9.1-3. // steps 9.1-3.
} else {
if (definition) {
element = definition->CreateElementAsync(document, tag_name,
GetCreateElementFlags());
} else { } else {
element = document.createElement(tag_name, GetCreateElementFlags()); element = document.createElement(tag_name, GetCreateElementFlags());
}
// Definition for the created element does not exist here and it cannot be // Definition for the created element does not exist here and it cannot be
// custom or failed. // custom or failed.
DCHECK_NE(element->GetCustomElementState(), CustomElementState::kCustom); DCHECK_NE(element->GetCustomElementState(), CustomElementState::kCustom);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment