W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2012

[Bug 19431] New: Namespace of elements made via .createElement() in XML documents must be null

From: <bugzilla@jessica.w3.org>
Date: Wed, 10 Oct 2012 13:13:03 +0000
To: www-dom@w3.org
Message-ID: <bug-19431-4009@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=19431

          Priority: P2
            Bug ID: 19431
                CC: mike@w3.org, www-dom@w3.org
          Assignee: annevk@annevk.nl
           Summary: Namespace of elements made via .createElement() in XML
                    documents must be null
        QA Contact: public-webapps-bugzilla@w3.org
          Severity: minor
    Classification: Unclassified
                OS: All
          Reporter: ayg@aryeh.name
          Hardware: All
            Status: NEW
           Version: unspecified
         Component: DOM
           Product: WebAppsWG

createElement() says "Return a new element with no attributes, namespace set to
the HTML namespace, local name set to localName, and node document set to the
context object."  But this test outputs "true" in all browsers:

data:text/html,<!DOCTYPE html>
<script>
document.documentElement.textContent = 
document.implementation
        .createDocument(null, "", null)
        .createElement("x")
        .namespaceURI === null;
</script>

The namespace needs to be null if the context object is not an HTML document.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Wednesday, 10 October 2012 13:13:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 10 October 2012 13:13:13 GMT