[Bug 27743] New: It would be clearer if Documents had mode and type explicitly included in their list of "internal slots"

[email protected]
Newsgroups gmane.comp.web.dom.general
Message-ID <[email protected]/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27743

            Bug ID: 27743
           Summary: It would be clearer if Documents had mode and type
                    explicitly included in their list of "internal slots"
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DOM
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected]

https://dom.spec.whatwg.org/#interface-document

[[
A document is assumed to be an XML document unless it is flagged as being an
HTML document. Whether a document is an HTML document or an XML document
affects the behavior of certain APIs. 

A document is always set to one of three modes: no-quirks mode, the default;
quirks mode, used typically for legacy documents; and limited-quirks mode.
Unless stated otherwise, a document must be in no-quirks mode. 
]]

It would be good to include these "type" and "mode" variables in the list of
things associated to a document, viz. "Each document has an associated
encoding, content type, and URL."

They are later referenced in https://dom.spec.whatwg.org/#concept-node-clone in
a way that encourages them to be thought of the same way.

>From an ES perspective, I'd say that mode/type are internal slots, just as
encoding, content type, and URL are. I am working to bring jsdom up to spec in
this regard and I found myself assigning doc._mode and doc._type properties
alongside doc._encoding, doc._contentType, and doc._url. (I'm not suggesting
switching to internal slot notation, but just using it as a point of view that
might be helpful.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.