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

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 UTC