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

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: annevk@annevk.nl
          Reporter: d@domenic.me
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, www-dom@w3.org

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 the QA Contact for the bug.

Received on Monday, 5 January 2015 00:18:38 UTC