From c8ae9cbd46ca3175e07b7f205ebe375805013119 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 10 Apr 2016 14:12:42 +0300 Subject: [PATCH] Change createElement() namespace to match implementations Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=19431. See comments 12 and 20 there. Gecko tried switching to the spec's current wording and immediately had to back out due to extension breakage. It does not seem likely the current spec is implementable. --- dom.bs | 6 +++++- dom.html | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dom.bs b/dom.bs index 8c0197026..aca5d6b6b 100644 --- a/dom.bs +++ b/dom.bs @@ -4689,8 +4689,12 @@ invoked, must run these steps:
  • If is is non-null and definition is null, then throw a {{NotFoundError}}. +
  • Let namespace be the HTML namespace, if the context object's + content type is "text/html" or + "application/xhtml+xml", and null otherwise. +
  • Let element be the result of creating an element given the - context object, localName, null, the HTML namespace, is, and + context object, localName, null, namespace, is, and with the synchronous custom elements flag set. Rethrow any exceptions.
  • If is is non-null, then set an attribute value for element using diff --git a/dom.html b/dom.html index 0a7bf8a63..39cf0f767 100644 --- a/dom.html +++ b/dom.html @@ -71,7 +71,7 @@

    DOM

    -

    Living Standard — Last Updated

    +

    Living Standard — Last Updated

    @@ -2603,7 +2603,9 @@

    Let definition be the result of looking up a custom element definition, given the context object, the HTML namespace, localName, and is.
  • If is is non-null and definition is null, then throw a NotFoundError. -
  • Let element be the result of creating an element given the context object, localName, null, the HTML namespace, is, and +
  • Let namespace be the HTML namespace, if the context object’s content type is "text/html" or + "application/xhtml+xml", and null otherwise. +
  • Let element be the result of creating an element given the context object, localName, null, namespace, is, and with the synchronous custom elements flag set. Rethrow any exceptions.
  • If is is non-null, then set an attribute value for element using "is" and is.