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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Bugzilla from bugzilla@jessica.w3.org
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: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
                CC: [hidden email], [hidden email]

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.

Reply | Threaded
Open this post in threaded view
|

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

nobody
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27743

Anne <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Anne <[hidden email]> ---
https://github.com/whatwg/dom/commit/8f812e6b16ba31270ba60568fb0bdbb78949348e

Thank you for this suggestion.

--
You are receiving this mail because:
You are on the CC list for the bug.