[Webkit-unassigned] [Bug 131074] New: document.createElement() should always return an element in the HTML namespace

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 1 16:03:38 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=131074

           Summary: document.createElement() should always return an
                    element in the HTML namespace
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: dbates at webkit.org


According to <http://dom.spec.whatwg.org/#dom-document-createelement> (20 March 2014), document.createElement() should always return an element in the HTML namespace:

[[
The createElement(localName) method must run the these steps:

1. If localName does not match the Name production, throw an "InvalidCharacterError" exception.

2. If the context object is an HTML document, let localName be converted to ASCII lowercase.

3. Let interface be the element interface for localName and the HTML namespace.

4. Return a new element that implements interface, with no attributes, namespace set to the HTML namespace, local name set to localName, and node document set to the context object.
]]

At the time of writing, document.createElement() [1] returns an element in the HTML namespace for an XHTML document. Otherwise, it returns an element in the "null namespace".

[1] <http://trac.webkit.org/browser/trunk/Source/WebCore/dom/Document.cpp?rev=166600#L854>

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list