Skip to content

Commit

Permalink
[e] (0) Move some Document concepts to DOM Core.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@6329 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 27, 2011
1 parent 7a21470 commit c542e2d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 273 deletions.
89 changes: 5 additions & 84 deletions complete.html
Expand Up @@ -3538,10 +3538,14 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>

<li><dfn id=event><code>Event</code></dfn> interface</li>
<li><dfn id=eventtarget><code>EventTarget</code></dfn> interface</li>
<li>The <dfn id=concept-event-type title=concept-event-type>type</dfn> of an event
<li>The <dfn id=concept-event-type title=concept-event-type>type</dfn> of an event</li>

<li><dfn id=dom-event-target title=dom-Event-target><code>target</code></dfn> attribute</li>

<li>The <dfn id="document's-character-encoding" title="document's character encoding">character encoding</dfn> of a <code><a href=#document>Document</a></code></li>
<li>The distinction between <dfn id=xml-documents>XML documents</dfn> and <dfn id=html-documents>HTML documents</dfn></li>
<li>The terms <dfn id=quirks-mode>quirks mode</dfn>, <dfn id=limited-quirks-mode>limited-quirks mode</dfn>, and <dfn id=no-quirks-mode>no-quirks mode</dfn></li>

</ul><p>The following <code><a href=#domexception>DOMException</a></code> codes are defined in
the DOM Core specification: <a href=#refsDOMCORE>[DOMCORE]</a></p>

Expand Down Expand Up @@ -8808,12 +8812,6 @@ <h3 id=documents><span class=secno>3.1 </span>Documents</h3>
APIs, <a href="#the-document's-address">the document's address</a> is the same as <a href="#the-document's-address">the
document's address</a> of the <a href="#script's-document">script's document</a>.</p>

<p><code><a href=#document>Document</a></code> objects are assumed to be <dfn id=xml-documents>XML
documents</dfn> unless they are flagged as being <dfn id=html-documents>HTML
documents</dfn> when they are created. Whether a document is an
<a href=#html-documents title="HTML documents">HTML document</a> or an <a href=#xml-documents title="XML documents">XML document</a> affects the behavior of
certain APIs and the case-sensitivity of some selectors.</p>

<p>Each <code><a href=#document>Document</a></code> object has a <dfn id=reload-override-flag>reload override
flag</dfn> that is originally unset. The flag is set by the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> and <code title=dom-document-open><a href=#dom-document-open>document.write()</a></code> methods in certain
situations. When the flag is set, the <code><a href=#document>Document</a></code> also has
Expand Down Expand Up @@ -8863,10 +8861,6 @@ <h3 id=documents><span class=secno>3.1 </span>Documents</h3>
readonly attribute DOMString <a href=#dom-document-referrer title=dom-document-referrer>referrer</a>;
attribute DOMString <a href=#dom-document-cookie title=dom-document-cookie>cookie</a>;
readonly attribute DOMString <a href=#dom-document-lastmodified title=dom-document-lastModified>lastModified</a>;
readonly attribute DOMString <a href=#dom-document-compatmode title=dom-document-compatMode>compatMode</a>;
attribute DOMString <a href=#dom-document-charset title=dom-document-charset>charset</a>;
readonly attribute DOMString <a href=#dom-document-characterset title=dom-document-characterSet>characterSet</a>;
readonly attribute DOMString <a href=#dom-document-defaultcharset title=dom-document-defaultCharset>defaultCharset</a>;
readonly attribute DOMString <a href=#dom-document-readystate title=dom-document-readyState>readyState</a>;

// <a href=#dom-tree-accessors>DOM tree accessors</a>
Expand Down Expand Up @@ -9145,79 +9139,6 @@ <h4 id=resource-metadata-management><span class=secno>3.1.3 </span><dfn>Resource

<hr></div>

<dl class=domintro><dt><var title="">document</var> . <code title=dom-document-compatmode><a href=#dom-document-compatmode>compatMode</a></code></dt>
<dd>
<p>In a conforming document, returns the string "<code title="">CSS1Compat</code>". (In <a href=#quirks-mode>quirks mode</a>
documents, returns the string "<code title="">BackCompat</code>",
but a conforming document can never trigger <a href=#quirks-mode>quirks
mode</a>.)</p>
</dd>

</dl><div class=impl>

<p>A <code><a href=#document>Document</a></code> is always set to one of three modes:
<dfn id=no-quirks-mode>no-quirks mode</dfn>, the default; <dfn id=quirks-mode>quirks mode</dfn>, used
typically for legacy documents; and <dfn id=limited-quirks-mode>limited-quirks mode</dfn>,
also known as "almost standards" mode. The mode is only ever changed
from the default by the <a href=#html-parser>HTML parser</a>, based on the
presence, absence, or value of the DOCTYPE string.</p>

<p>The <dfn id=dom-document-compatmode title=dom-document-compatMode><code>compatMode</code></dfn> IDL
attribute must return the literal string "<code title="">CSS1Compat</code>" unless the document has been set to
<a href=#quirks-mode>quirks mode</a> by the <a href=#html-parser>HTML parser</a>, in which
case it must instead return the literal string "<code title="">BackCompat</code>".</p>

<hr></div>

<dl class=domintro><dt><var title="">document</var> . <code title=dom-document-charset><a href=#dom-document-charset>charset</a></code> [ = <var title="">value</var> ]</dt>
<dd>
<p>Returns the <a href="#document's-character-encoding">document's character encoding</a>.</p>
<p>Can be set, to dynamically change the <a href="#document's-character-encoding">document's
character encoding</a>.</p>
<p>New values that are not IANA-registered aliases supported by the user agent are ignored.</p>
</dd>

<dt><var title="">document</var> . <code title=dom-document-characterSet><a href=#dom-document-characterset>characterSet</a></code></dt>
<dd>
<p>Returns the <a href="#document's-character-encoding">document's character encoding</a>.</p>
</dd>

<dt><var title="">document</var> . <code title=dom-document-defaultCharset><a href=#dom-document-defaultcharset>defaultCharset</a></code></dt>
<dd>
<p>Returns what might be the user agent's default character
encoding. (The user agent might return another character encoding
altogether, e.g. to protect the user's privacy, or if the user
agent doesn't use a single default encoding.)</p>
</dd>

</dl><div class=impl>

<p>Documents have an associated <dfn id="document's-character-encoding" title="document's character
encoding">character encoding</dfn>. When a <code><a href=#document>Document</a></code>
object is created, the <a href="#document's-character-encoding">document's character encoding</a>
must be initialized to UTF-16. Various algorithms during page
loading affect this value, as does the <code title=dom-document-charset><a href=#dom-document-charset>charset</a></code> setter. <a href=#refsIANACHARSET>[IANACHARSET]</a></p>

<p>The <dfn id=dom-document-charset title=dom-document-charset><code>charset</code></dfn>
IDL attribute must, on getting, return the <a href=#preferred-mime-name>preferred MIME
name</a> of the <a href="#document's-character-encoding">document's character encoding</a>. On
setting, if the new value is an IANA-registered alias for a
character encoding supported by the user agent, the <a href="#document's-character-encoding">document's
character encoding</a> must be set to that character
encoding. (Otherwise, nothing happens.)</p>

<p>The <dfn id=dom-document-characterset title=dom-document-characterSet><code>characterSet</code></dfn>
IDL attribute must, on getting, return the <a href=#preferred-mime-name>preferred MIME
name</a> of the <a href="#document's-character-encoding">document's character encoding</a>.</p>

<p>The <dfn id=dom-document-defaultcharset title=dom-document-defaultCharset><code>defaultCharset</code></dfn>
IDL attribute must, on getting, return the <a href=#preferred-mime-name>preferred MIME
name</a> of a character encoding, possibly the user's default
encoding, or an encoding associated with the user's current
geographical location, or any arbitrary encoding name.</p>

<hr></div>

<dl class=domintro><dt><var title="">document</var> . <code title=dom-document-readyState><a href=#dom-document-readystate>readyState</a></code></dt>
<dd>
<p>Returns "loading" while the <code><a href=#document>Document</a></code> is loading, "interactive" once it is finished parsing but still loading sub-resources, and "complete" once it has loaded.</p>
Expand Down
89 changes: 5 additions & 84 deletions index
Expand Up @@ -3440,10 +3440,14 @@ explained in the previous section, which talks about RFC 2119. -->

<li><dfn id=event><code>Event</code></dfn> interface</li>
<li><dfn id=eventtarget><code>EventTarget</code></dfn> interface</li>
<li>The <dfn id=concept-event-type title=concept-event-type>type</dfn> of an event
<li>The <dfn id=concept-event-type title=concept-event-type>type</dfn> of an event</li>

<li><dfn id=dom-event-target title=dom-Event-target><code>target</code></dfn> attribute</li>

<li>The <dfn id="document's-character-encoding" title="document's character encoding">character encoding</dfn> of a <code><a href=#document>Document</a></code></li>
<li>The distinction between <dfn id=xml-documents>XML documents</dfn> and <dfn id=html-documents>HTML documents</dfn></li>
<li>The terms <dfn id=quirks-mode>quirks mode</dfn>, <dfn id=limited-quirks-mode>limited-quirks mode</dfn>, and <dfn id=no-quirks-mode>no-quirks mode</dfn></li>

</ul><p>The following <code><a href=#domexception>DOMException</a></code> codes are defined in
the DOM Core specification: <a href=#refsDOMCORE>[DOMCORE]</a></p>

Expand Down Expand Up @@ -8677,12 +8681,6 @@ interface <dfn id=transferable>Transferable</dfn> { };</pre>
APIs, <a href="#the-document's-address">the document's address</a> is the same as <a href="#the-document's-address">the
document's address</a> of the <a href="#script's-document">script's document</a>.</p>

<p><code><a href=#document>Document</a></code> objects are assumed to be <dfn id=xml-documents>XML
documents</dfn> unless they are flagged as being <dfn id=html-documents>HTML
documents</dfn> when they are created. Whether a document is an
<a href=#html-documents title="HTML documents">HTML document</a> or an <a href=#xml-documents title="XML documents">XML document</a> affects the behavior of
certain APIs and the case-sensitivity of some selectors.</p>

<p>Each <code><a href=#document>Document</a></code> object has a <dfn id=reload-override-flag>reload override
flag</dfn> that is originally unset. The flag is set by the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> and <code title=dom-document-open><a href=#dom-document-open>document.write()</a></code> methods in certain
situations. When the flag is set, the <code><a href=#document>Document</a></code> also has
Expand Down Expand Up @@ -8732,10 +8730,6 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {
readonly attribute DOMString <a href=#dom-document-referrer title=dom-document-referrer>referrer</a>;
attribute DOMString <a href=#dom-document-cookie title=dom-document-cookie>cookie</a>;
readonly attribute DOMString <a href=#dom-document-lastmodified title=dom-document-lastModified>lastModified</a>;
readonly attribute DOMString <a href=#dom-document-compatmode title=dom-document-compatMode>compatMode</a>;
attribute DOMString <a href=#dom-document-charset title=dom-document-charset>charset</a>;
readonly attribute DOMString <a href=#dom-document-characterset title=dom-document-characterSet>characterSet</a>;
readonly attribute DOMString <a href=#dom-document-defaultcharset title=dom-document-defaultCharset>defaultCharset</a>;
readonly attribute DOMString <a href=#dom-document-readystate title=dom-document-readyState>readyState</a>;

// <a href=#dom-tree-accessors>DOM tree accessors</a>
Expand Down Expand Up @@ -9014,79 +9008,6 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {

<hr></div>

<dl class=domintro><dt><var title="">document</var> . <code title=dom-document-compatmode><a href=#dom-document-compatmode>compatMode</a></code></dt>
<dd>
<p>In a conforming document, returns the string "<code title="">CSS1Compat</code>". (In <a href=#quirks-mode>quirks mode</a>
documents, returns the string "<code title="">BackCompat</code>",
but a conforming document can never trigger <a href=#quirks-mode>quirks
mode</a>.)</p>
</dd>

</dl><div class=impl>

<p>A <code><a href=#document>Document</a></code> is always set to one of three modes:
<dfn id=no-quirks-mode>no-quirks mode</dfn>, the default; <dfn id=quirks-mode>quirks mode</dfn>, used
typically for legacy documents; and <dfn id=limited-quirks-mode>limited-quirks mode</dfn>,
also known as "almost standards" mode. The mode is only ever changed
from the default by the <a href=#html-parser>HTML parser</a>, based on the
presence, absence, or value of the DOCTYPE string.</p>

<p>The <dfn id=dom-document-compatmode title=dom-document-compatMode><code>compatMode</code></dfn> IDL
attribute must return the literal string "<code title="">CSS1Compat</code>" unless the document has been set to
<a href=#quirks-mode>quirks mode</a> by the <a href=#html-parser>HTML parser</a>, in which
case it must instead return the literal string "<code title="">BackCompat</code>".</p>

<hr></div>

<dl class=domintro><dt><var title="">document</var> . <code title=dom-document-charset><a href=#dom-document-charset>charset</a></code> [ = <var title="">value</var> ]</dt>
<dd>
<p>Returns the <a href="#document's-character-encoding">document's character encoding</a>.</p>
<p>Can be set, to dynamically change the <a href="#document's-character-encoding">document's
character encoding</a>.</p>
<p>New values that are not IANA-registered aliases supported by the user agent are ignored.</p>
</dd>

<dt><var title="">document</var> . <code title=dom-document-characterSet><a href=#dom-document-characterset>characterSet</a></code></dt>
<dd>
<p>Returns the <a href="#document's-character-encoding">document's character encoding</a>.</p>
</dd>

<dt><var title="">document</var> . <code title=dom-document-defaultCharset><a href=#dom-document-defaultcharset>defaultCharset</a></code></dt>
<dd>
<p>Returns what might be the user agent's default character
encoding. (The user agent might return another character encoding
altogether, e.g. to protect the user's privacy, or if the user
agent doesn't use a single default encoding.)</p>
</dd>

</dl><div class=impl>

<p>Documents have an associated <dfn id="document's-character-encoding" title="document's character
encoding">character encoding</dfn>. When a <code><a href=#document>Document</a></code>
object is created, the <a href="#document's-character-encoding">document's character encoding</a>
must be initialized to UTF-16. Various algorithms during page
loading affect this value, as does the <code title=dom-document-charset><a href=#dom-document-charset>charset</a></code> setter. <a href=#refsIANACHARSET>[IANACHARSET]</a></p>

<p>The <dfn id=dom-document-charset title=dom-document-charset><code>charset</code></dfn>
IDL attribute must, on getting, return the <a href=#preferred-mime-name>preferred MIME
name</a> of the <a href="#document's-character-encoding">document's character encoding</a>. On
setting, if the new value is an IANA-registered alias for a
character encoding supported by the user agent, the <a href="#document's-character-encoding">document's
character encoding</a> must be set to that character
encoding. (Otherwise, nothing happens.)</p>

<p>The <dfn id=dom-document-characterset title=dom-document-characterSet><code>characterSet</code></dfn>
IDL attribute must, on getting, return the <a href=#preferred-mime-name>preferred MIME
name</a> of the <a href="#document's-character-encoding">document's character encoding</a>.</p>

<p>The <dfn id=dom-document-defaultcharset title=dom-document-defaultCharset><code>defaultCharset</code></dfn>
IDL attribute must, on getting, return the <a href=#preferred-mime-name>preferred MIME
name</a> of a character encoding, possibly the user's default
encoding, or an encoding associated with the user's current
geographical location, or any arbitrary encoding name.</p>

<hr></div>

<dl class=domintro><dt><var title="">document</var> . <code title=dom-document-readyState><a href=#dom-document-readystate>readyState</a></code></dt>
<dd>
<p>Returns "loading" while the <code><a href=#document>Document</a></code> is loading, "interactive" once it is finished parsing but still loading sub-resources, and "complete" once it has loaded.</p>
Expand Down

0 comments on commit c542e2d

Please sign in to comment.