<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="76" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[76]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakai DOM Extensions</anchor> &gt; Extensions to existing interfaces &gt;
Interfaces implemented by <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code>
objects</p><section><h1>Extension to the <code class="DOMi" xml:lang="en">Document</code> interface</h1><section><h1>Character Encoding</h1><figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="57" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[57]</anchor-end> <pre class="IDL code"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">partial</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">interface</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor> {
  <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">attribute</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOMString</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">inputEncoding</anchor>;
  <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">attribute</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOMString</anchor>? <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiCharset</anchor>;
  <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">attribute</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">boolean</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiHasBOM</anchor>;
};

<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">partial</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">interface</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Entity</anchor> {
  <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">attribute</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOMString</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">inputEncoding</anchor>;
  <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">attribute</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOMString</anchor>? <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiCharset</anchor>;
  <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">attribute</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">boolean</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiHasBOM</anchor>;
};</pre></p></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="17" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[17]</anchor-end> The <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">entity</anchor> has the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">encoding</anchor>.  Unless otherwise specified, it is <code xml:lang="en">utf-8</code>.</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="58" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[58]</anchor-end> On getting, the <dfn><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">inputEncoding</anchor></code></dfn> attribute of a <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Entity</anchor></code> object <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> return the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">encoding</anchor> of the
entity, using the same compatible name as the <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">inputEncoding</anchor></code>
attribute of the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> interface.</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="56" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[56]</anchor-end> On setting, the <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">inputEncoding</anchor></code> attribute of a <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code>
or <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Entity</anchor></code> object <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> run the following steps:<figure><ol><li>Run the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">get an encoding</anchor> steps with the input value and let <var xml:lang="en">name</var> be the result.</li><li>If <var xml:lang="en">name</var> is an encoding name and is one of labels for the encoding, set the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">encoding</anchor> of the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">context object</anchor> to <var xml:lang="en">name</var>.</li></ol></figure></p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="75" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[75]</anchor-end> The <code xmlns="http://www.w3.org/1999/xhtml" class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">inputEncoding</anchor></code> attribute is originally defined by <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOM3 Core</anchor>
and redefined here.  Unlike in <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOM3 Core</anchor>, the <code xmlns="http://www.w3.org/1999/xhtml" class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">inputEncoding</anchor></code> attribute return
<code xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">utf-8</anchor></code> rather than <code xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">null</code> if it is not available.</comment-p><delete xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><p xmlns="http://www.w3.org/1999/xhtml"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="59" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[59]</anchor-end> On getting, the <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">charset</anchor></code> attribute of the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code>
interface <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> return the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">encoding</anchor> of the document.</p></delete><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="26" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[26]</anchor-end> The <dfn xml:lang="en"><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">xmlEncoding</anchor> attribute</code>
of <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> and
<code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Entity</anchor></code> interfaces is now read-write.</dfn></p><p>The setter of the <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">xmlEncoding</anchor></code>
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> behave as if the following algorithm is performed:</p><delete xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ol xmlns="http://www.w3.org/1999/xhtml"><li>If the object is a <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> and
its <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiIsHTML</anchor></code> flag is set to
<code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">true</anchor></code>, then throw a 
<code class="DOMc" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NOT_SUPPORTED_ERR</anchor></code>
<code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOMException</anchor></code>.</li></ol></delete><ol><li>If the object is read-only,
throw a <code class="DOMc" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NO_MODIFICATION_ALLOWED_ERR</anchor></code>.</li><li>Otherwise, set the specified value as the new
attribute value.  Note that the value might be
<code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">null</anchor></code>.</li></ol><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">Note that setting this attribute might make the
document inconsistent or non-serializable.</comment-p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="60" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[60]</anchor-end> The <dfn><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiCharset</anchor></code></dfn> attribute of the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code>
interface and the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Entity</anchor></code> interface represents the <code class="MIME" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">charset</anchor></code>
information included in the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><code xmlns="http://www.w3.org/1999/xhtml" class="MIME" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Content-Type</anchor></code> metadata</anchor> of the resource from
which the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">document</anchor> or <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">entity</anchor> has been created.</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="61" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[61]</anchor-end> For the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> object created by <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">fetch</anchor>ing a resource,
if the resource has the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><code xmlns="http://www.w3.org/1999/xhtml" class="MIME" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Content-Type</anchor></code> metadata</anchor> (i.e.
<code class="MIME" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Content-Type</anchor></code> header field <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">or equivalent</anchor>) including the
<code class="MIME" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">charset</anchor></code> parameter whose definition is equivalent or subset of
at least one of <code class="MIME" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">text/*</anchor></code> and <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XML MIME types</anchor>' <code class="MIME" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">charset</anchor></code>
parameter's definition, then the parameter value <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be set to the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">charset metadata</anchor>
of the document.  Otherwise the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">charset metadata</anchor> of the object <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be initially
set to <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">null</anchor>.</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="62" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[62]</anchor-end> For the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Entity</anchor></code> object representing an external entity, if the
entity has been created from the resource which has the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><code xmlns="http://www.w3.org/1999/xhtml" class="MIME" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Content-Type</anchor></code> metadata</anchor>
including the
<code class="MIME" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">charset</anchor></code> parameter whose definition is equivalent or subset of
at least one of <code class="MIME" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">text/*</anchor></code> and <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XML MIME types</anchor>' <code class="MIME" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">charset</anchor></code>
parameter's definition, then the parameter value <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be set to the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">charset metadata</anchor>
of the entity.  Otherwise the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">charset metadata</anchor> of the object <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be initially
set to <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">null</anchor>.</p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="64" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[64]</anchor-end> Whether the parameter value is valid or not is irrelevant.</comment-p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="65" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[65]</anchor-end> When the transfer protocol does not use <code xmlns="http://www.w3.org/1999/xhtml" class="MIME" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">charset</anchor></code> name that is compatible
with <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">MIME</anchor>'s definition, then the value has to be converted such that the <code xmlns="http://www.w3.org/1999/xhtml" class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiCharset</anchor></code>
attribute exposes the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">MIME</anchor> compatible name representing that character encoding.</comment-p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="63" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[63]</anchor-end> On getting, the <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiCharset</anchor></code> attribute <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor>
return the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">charset metadata</anchor> of the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">context object</anchor>.</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="66" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[66]</anchor-end> On setting, the <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiCharset</anchor></code> attribute <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor>
set the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">charset metadata</anchor> of the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">context object</anchor> to the new value.</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="67" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[67]</anchor-end> The <dfn><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiHasBOM</anchor></code></dfn> attribute of the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code>
and <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Entity</anchor></code> interfaces represents whether the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">context object</anchor>'s byte representation
has the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">BOM</anchor> or not.  These objects has the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">has BOM</anchor> flag, initially unset.</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="68" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[68]</anchor-end> When the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> object is created by <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">fetch</anchor>ing a resource,
or the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Entity</anchor></code> object is created by <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">fetch</anchor>ing a <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">external entity</anchor>,
if the resource is represented as byte sequence and starts with the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">BOM</anchor>, then the
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">has BOM</anchor> flag of the object <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be set.</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="69" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[69]</anchor-end> The <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiHasBOM</anchor></code> attribute, on getting, <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> return the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">has BOM</anchor>
flag is set or not.  On setting, it <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> set the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">has BOM</anchor> flag if the new value is true,
or unset the flag, otherwise.</p></section><section><h1>Metadata accessors</h1><figure><pre class="IDL code">partial interface <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor> {
  void manakaiSetURL(DOMString url);
};</pre></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="74" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[74]</anchor-end> The <dfn><code class="DOMm" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiSetURL</anchor>(<var xml:lang="en">url</var>)</code></dfn> method
of the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> interface <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> run
these steps:<figure><ol><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Resolve</anchor> <var xml:lang="en">url</var> relative to the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">entry script</anchor>'s <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">base URL</anchor>.</li><li>If the previous step fails, throw a <code class="DOMe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SyntaxError</anchor></code> exception and abort these steps.</li><li>Set <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">the document's address</anchor> to the new value.</li></ol></figure></p><ed xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">Scripts in Web pages cannot access this method.  How to implement this is binding dependent ?</ed><delete xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><p xmlns="http://www.w3.org/1999/xhtml"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="15" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[15]</anchor-end>
The <dfn xml:lang="en"><code class="DOMa" xml:lang="en">manakaiEntityBaseURI</code> attribute</dfn>
contains the base DOM URI of the document entity.</p><p xmlns="http://www.w3.org/1999/xhtml">The type of this attribute is <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOMString</anchor></code>.
This attribute is read-write.</p><p xmlns="http://www.w3.org/1999/xhtml">If the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> has the base URI
information (in XML infoset terminology, the
<code class="InfoProp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">base URI</anchor></code> property),
then the getter <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> return that
base URI.  Otherwise, the getter <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor>
return the <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">documentURI</anchor></code>
of the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code>, possibly 
<code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">null</anchor></code>.  Note that these 
result in returning a <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOMString</anchor></code>
that is not a legal absolute URI, if the base URI
information or <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">documentURI</anchor></code>
does not contain a legal absolute URI.</p><p xmlns="http://www.w3.org/1999/xhtml">On setting, if the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> is read-only,
then a <code class="DOMc" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NO_MODIFICATION_ALLOWED_ERR</anchor></code>
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be thrown.  Otherwise,
if the new value is <code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">null</anchor></code>,
then the base URI information, if any, is unset.
If the new value is non-<code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">null</anchor></code>,
then the base URI information is set to that value.
Note that no lexical checking is performed
on that value.  Note also that setting this attribute
does not affect on the <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">documentURI</anchor></code>
attribute.</p><p xmlns="http://www.w3.org/1999/xhtml">It is expected that if the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code>
is created from an XML document entity retrieved from an HTTP
entity, then the <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Content-Location</anchor>:</code>
and / or <code class="HTTP" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Content-Base</anchor>:</code> header fields,
if any, are reflected to this attribute.</p></delete><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="16" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[16]</anchor-end>
The 
<dfn xml:lang="en"><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">allDeclarationsProcessed</anchor></code> attribute</dfn>
contains a value that represents whether the XML
processor has read the complete DTD when the 
XML document is parsed.  This attribute corresponding
to the <code class="InfoProp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">all declarations processed</anchor></code>
property of the document information item
in the XML Information Set.</p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">Note that this attribute only exposes the information
set property.  Its value does <em xmlns="http://www.w3.org/1999/xhtml">not</em> indicate
whether the document is <q xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">complete</q> or not,
or valid or not.  In particular, modifications to the 
DOM tree does not affect the value of this attribute.</comment-p><ed xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">ISSUE: Relationship between 
the <code xmlns="http://www.w3.org/1999/xhtml" class="DOMm" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">normalizeDocument</anchor></code> method
and this attribute.</ed><p>The type of this attribute is <code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">boolean</anchor></code>.
This attribute is read-write.</p><p>The getter <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> return the value.</p><p>On setting, if the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> is read-only,
then a <code class="DOMc" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NO_MODIFICATION_ALLOWED_ERR</anchor></code>
<code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOMException</anchor></code>
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be thrown.  Otherwise,
it <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> set the value to the new value.</p><p>The <code class="DOMm" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">createDocument</anchor></code> method
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> set the 
<code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">allDeclarationsProcessed</anchor></code> attribute 
of the newly created <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code>
object as <code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">false</anchor></code>.</p><p>If a <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> object is 
created from an XML information set,
the <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">allDeclarationsProcessed</anchor></code>
attribute of the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> object
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be set to the value of the
<code class="InfoProp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">all declarations processed</anchor></code>
property of the document information item.
If the property is set to true, then the attribute
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be set to <code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">true</anchor></code>.
Otherwise, including the case the property is missing,
the attribute <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be set to
<code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">false</anchor></code>.</p><p>If a <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> object is mapped
to an XML information set, then the
<code class="InfoProp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">all declarations processed</anchor></code>
property <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be set to the value
of the <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">allDeclarationsProcessed</anchor></code>
attribute.</p></section></section><section><h1>Extensions to the <code class="DOMi" xml:lang="en">HTMLDocument</code> interface</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="25" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[25]</anchor-end> The <dfn xml:lang="en"><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiIsHTML</anchor></code></dfn>
attribute represents whether the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code>
is an HTML document or not.</p><p>The type of this attribute is <code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">boolean</anchor></code>.
This attribute is read-write.</p><p>The getter <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> return <code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">true</anchor></code>
if and only if the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code>
is an HTML document.  Otherwise it <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor>
return <code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">false</anchor></code>.</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="54" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[54]</anchor-end> On setting, following steps <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be performed:<ol><li>If the new value is <code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">true</anchor></code>, run following substeps:<ol><li>Change the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">document</anchor> to <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML document</anchor> if it is <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XML document</anchor>.</li><li>Set the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">content type</anchor> to <code class="MIME" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">text/html</anchor></code>.</li></ol></li><li>Otherwise, run following substeps:<ol><li>Change the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">document</anchor> to <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XML document</anchor> if it is <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML document</anchor>.</li><li>Set the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">content type</anchor> to <code class="MIME" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">application/xml</anchor></code>.</li></ol></li><li>Set the mode to <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">no quirks mode</anchor>.</li></ol></p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="55" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[55]</anchor-end> Since the <code xmlns="http://www.w3.org/1999/xhtml" class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> that has just
been created by <code xmlns="http://www.w3.org/1999/xhtml" class="DOMm" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">createDocument</anchor></code> is
not an HTML document, its <code xmlns="http://www.w3.org/1999/xhtml" class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiIsHTML</anchor></code>
is <code xmlns="http://www.w3.org/1999/xhtml" class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">false</anchor></code>.</comment-p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="53" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[53]</anchor-end>
The <dfn xml:lang="en"><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiCompatMode</anchor></code> attribute</dfn>
of the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTMLDocument</anchor></code> interface
is a read-write attribute of type <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOMString</anchor></code>.
Its value represents the mode [HTML5] in which the document
is interpreted.</p><p>This attribute has three values:<dl><dt><code class="DOM" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">no quirks</anchor></code></dt><dd>The no quirks (or standard)
mode.</dd><dt><code class="DOM" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">limited quirks</anchor></code></dt><dd>The limited quirks
(or almost standard) mode.</dd><dt><code class="DOM" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">quirks</anchor></code></dt><dd>The quirks mode.</dd></dl></p><p>This attribute <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> return one of three
values listed above depending on the mode of the document.
Note that XML documents are always in the no quirks mode.</p><p>On setting, the specified value <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be set
to the attribute if the specified value is one of three
values listed above and the document is an HTML document.
Otherwise, the attribute value <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST NOT</strong></anchor> be changed.</p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">A <code xmlns="http://www.w3.org/1999/xhtml" class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> node created
by the <code xmlns="http://www.w3.org/1999/xhtml" class="DOMm" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">createDocument</anchor></code> method is an
XML document and is in the no quirks mode, therefore
its <code xmlns="http://www.w3.org/1999/xhtml" class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiCompatMode</anchor></code> attribute
value is <code xmlns="http://www.w3.org/1999/xhtml" class="DOM" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">no quirks</anchor></code>.
A <code xmlns="http://www.w3.org/1999/xhtml" class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor></code> node created by an
HTML parser from an HTML document is in one
of three modes and its
<code xmlns="http://www.w3.org/1999/xhtml" class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiCompatMode</anchor></code> attribute
value is a value corresponding to the mode.</comment-p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">Setting the <code xmlns="http://www.w3.org/1999/xhtml" class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiIsHTML</anchor></code>
attribute <code xmlns="http://www.w3.org/1999/xhtml" class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">false</anchor></code> reset the 
mode to the no quirks mode.</comment-p><figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="70" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[70]</anchor-end> <pre class="IDL code"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">partial</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">interface</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Document</anchor> {
  <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">readonly</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">attribute</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTMLHeadElement</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiHead</anchor>;
  <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">readonly</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">attribute</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTMLHtmlElement</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiHTML</anchor>;
  <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">attribute</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">boolean</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiIsSrcdoc</anchor>;
};</pre></p></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="71" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[71]</anchor-end> The <dfn><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiHead</anchor></code></dfn> attribute of the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">document</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor>
return <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">the <code xmlns="http://www.w3.org/1999/xhtml" class="HTMLe" xml:lang="en">head</code> element</anchor> of the document.</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="72" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[72]</anchor-end> The <dfn><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiHTML</anchor></code></dfn> attribute of the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">document</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor>
return <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">the <code xmlns="http://www.w3.org/1999/xhtml" class="HTMLe" xml:lang="en">html</code> element</anchor> of the document.</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="73" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[73]</anchor-end> On getting, the <dfn><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiIsSrcdoc</anchor></code></dfn> attribute of the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">document</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor>
return whether the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">document</anchor> is <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">an <code xmlns="http://www.w3.org/1999/xhtml" class="HTMLe" xml:lang="en">iframe</code> <code xmlns="http://www.w3.org/1999/xhtml" class="HTMLe" xml:lang="en">srcdoc</code> document</anchor> or not.
On setting, if the attribute is invoked by an author script, it <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> do nothing.
Otherwise, the attribute <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> make the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">document</anchor> 
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">an <code xmlns="http://www.w3.org/1999/xhtml" class="HTMLe" xml:lang="en">iframe</code> <code xmlns="http://www.w3.org/1999/xhtml" class="HTMLe" xml:lang="en">srcdoc</code> document</anchor> if the new value is <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">true</anchor>,
or not <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">an <code xmlns="http://www.w3.org/1999/xhtml" class="HTMLe" xml:lang="en">iframe</code> <code xmlns="http://www.w3.org/1999/xhtml" class="HTMLe" xml:lang="en">srcdoc</code> document</anchor> otherwise.</p></section><section><h1>Extension to the <code class="DOMi" xml:lang="en">DocumentTraversal</code> interface</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="13" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[13]</anchor-end>
The <dfn xml:lang="en"><code class="DOMm" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakaiCreateSerialWalker</anchor></code> method</dfn>
creates and returns a new <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SerialWalker</anchor>
object.</code></p><p>This method takes four parameters:
<code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">root</anchor></code>, <code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">whatToShow</anchor></code>,
<code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">filter</anchor></code>, and
<code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">entityReferenceExpansion</anchor></code>.</p><p>The <dfn xml:lang="en"><code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">root</anchor></code> parameter</dfn> is 
the node that will serve as the root for the
<code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SerialWalker</anchor></code>.
It is a <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Node</anchor></code>.</p><p>The <code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">whatToShow</anchor></code> flags and
the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NodeFilter</anchor></code> are not considered
when setting this value; any node type
will be accepted as the <code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">root</anchor></code>.</p><p>The <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">currentNode</anchor></code> of the created
<code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SerialWalker</anchor></code> is initialized to
the <code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">root</anchor></code> <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Node</anchor></code>,
whether or not it is visible.</p><p>The <code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">root</anchor></code> functions as a stopping
point for traversal method that look upwards
in the document structure, i.e. <code class="DOMm" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">nextNode</anchor></code>.</p><p>The <code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">root</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST NOT</strong></anchor>
be <code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">null</anchor></code>.  If it is, then
a <code class="DOMc" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NOT_SUPPORTED_ERR</anchor></code> exception 
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be thrown.</p><p>The <dfn xml:lang="en"><code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">whatToShow</anchor></code> parameter</dfn>
is the flags that specify which node types may appear
in the logical view of the tree presented by the
<code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SerialWalker</anchor></code>.
It is an <code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">unsigned short</anchor></code>.</p><p>The set of the flags are defined in the
<code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NodeFilter</anchor></code> interface.
They can be combined using the binary <code xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">OR</anchor></code>
operation.</p><p>The <dfn xml:lang="en"><code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">filter</anchor></code> parameter</dfn>
is the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NodeFilter</anchor></code> to be used
with the created <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SerialWalker</anchor></code>.
If <code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">null</anchor></code> is set, then no filter is used.</p><p>The 
<dfn xml:lang="en"><code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">entityReferenceExpansion</anchor></code> parameter</dfn>
parameter is the <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">expandEntityReferences</anchor></code>
flag of the created <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">TreeWalker</anchor></code>.
It is a <code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">boolean</anchor></code> value.</p><p>If it is set to <code class="IDL" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">true</anchor></code>,
then the contents of the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">EntityReference</anchor></code>
nodes <em>are</em> presented in the logical view.</p><p>Otherwise, the contents of the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">EntityReference</anchor></code>
nodes are <em>not</em> presented in the logical view.</p><p>The method returns a <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SerialWalker</anchor></code>.
It <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be a new <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SerialWalker</anchor></code>
with following attributes:<ul><li><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">currentNode</anchor></code> is <code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">root</anchor></code>.</li><li><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">expandEntityReferences</anchor></code> is
<code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">entityReferenceExpansion</anchor></code>.</li><li><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">filter</anchor></code> is <code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">filter</anchor></code>.</li><li><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">root</anchor></code> is <code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">root</anchor></code>.</li><li><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">whatToShow</anchor></code> is 
<code class="DOMp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">whatToShow</anchor></code>.</li></ul></p></section><section><h1>memo (informative)</h1></section></body></html>