Skip to content
Permalink
Browse files

[giow] (3) Make document.open() do nothing on non-active documents

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=20285
Affected topics: HTML Syntax and Parsing

git-svn-id: http://svn.whatwg.org/webapps@7626 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Dec 31, 2012
1 parent 307be9c commit ea9f9d319f6bbd3ec952e2b6f2a522abc2ba0927
Showing with 15 additions and 6 deletions.
  1. +5 −2 complete.html
  2. +5 −2 index
  3. +5 −2 source

<p>When called with two or fewer arguments, the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> method must act as follows:</p>

<ol><li>If the <code><a href=#document>Document</a></code> object is not flagged as an <a href=#html-documents title="HTML documents">HTML
<ol><li><p>If the <code><a href=#document>Document</a></code> object is not flagged as an <a href=#html-documents title="HTML documents">HTML
document</a>, throw an <code><a href=#invalidstateerror>InvalidStateError</a></code> exception and abort these steps.</li>

<li><p>If the <code><a href=#document>Document</a></code> object is not an <a href=#active-document>active document</a>, then abort
these steps.</li>

<li><p>Let <var title="">type</var> be the value of the first argument, if there is one, or
"<code><a href=#text/html>text/html</a></code>" otherwise.</li>

attribute's allowed keywords correspond to alignment points in the
font:</p>

<p><img alt="The top of the em square is roughly at the top of the glyphs in a font, the hanging baseline is where some glyphs like &#2310; are anchored, the middle is half-way between the top of the em square and the bottom of the em square, the alphabetic baseline is where characters like &Aacute;, &yuml;, f, and " height=300 src=http://images.whatwg.org/baselines.png width=738>03A9; are anchored, the ideographic baseline is where glyphs like &#31169; and &#36948; are anchored, and the bottom of the em square is roughly at the bottom of the glyphs in a font. The top and bottom of the bounding box can be far from these baselines, due to glyphs extending far outside the em square."&gt;</p>
<p><img alt="The top of the em square is roughly at the top of the glyphs in a font, the hanging baseline is where some glyphs like &#2310; are anchored, the middle is half-way between the top of the em square and the bottom of the em square, the alphabetic baseline is where characters like &Aacute;, &yuml;, f, and &Omega; are anchored, the ideographic baseline is where glyphs like &#31169; and &#36948; are anchored, and the bottom of the em square is roughly at the bottom of the glyphs in a font. The top and bottom of the bounding box can be far from these baselines, due to glyphs extending far outside the em square." height=300 src=http://images.whatwg.org/baselines.png width=738></p>

<p>The keywords map to these alignment points as follows:</p>

7 index

<p>When called with two or fewer arguments, the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> method must act as follows:</p>

<ol><li>If the <code><a href=#document>Document</a></code> object is not flagged as an <a href=#html-documents title="HTML documents">HTML
<ol><li><p>If the <code><a href=#document>Document</a></code> object is not flagged as an <a href=#html-documents title="HTML documents">HTML
document</a>, throw an <code><a href=#invalidstateerror>InvalidStateError</a></code> exception and abort these steps.</li>

<li><p>If the <code><a href=#document>Document</a></code> object is not an <a href=#active-document>active document</a>, then abort
these steps.</li>

<li><p>Let <var title="">type</var> be the value of the first argument, if there is one, or
"<code><a href=#text/html>text/html</a></code>" otherwise.</li>

attribute's allowed keywords correspond to alignment points in the
font:</p>

<p><img alt="The top of the em square is roughly at the top of the glyphs in a font, the hanging baseline is where some glyphs like &#2310; are anchored, the middle is half-way between the top of the em square and the bottom of the em square, the alphabetic baseline is where characters like &Aacute;, &yuml;, f, and " height=300 src=http://images.whatwg.org/baselines.png width=738>03A9; are anchored, the ideographic baseline is where glyphs like &#31169; and &#36948; are anchored, and the bottom of the em square is roughly at the bottom of the glyphs in a font. The top and bottom of the bounding box can be far from these baselines, due to glyphs extending far outside the em square."&gt;</p>
<p><img alt="The top of the em square is roughly at the top of the glyphs in a font, the hanging baseline is where some glyphs like &#2310; are anchored, the middle is half-way between the top of the em square and the bottom of the em square, the alphabetic baseline is where characters like &Aacute;, &yuml;, f, and &Omega; are anchored, the ideographic baseline is where glyphs like &#31169; and &#36948; are anchored, and the bottom of the em square is roughly at the bottom of the glyphs in a font. The top and bottom of the bounding box can be far from these baselines, due to glyphs extending far outside the em square." height=300 src=http://images.whatwg.org/baselines.png width=738></p>

<p>The keywords map to these alignment points as follows:</p>

7 source

<ol>

<li>If the <code>Document</code> object is not flagged as an <span title="HTML documents">HTML
document</span>, throw an <code>InvalidStateError</code> exception and abort these steps.</li>
<li><p>If the <code>Document</code> object is not flagged as an <span title="HTML documents">HTML
document</span>, throw an <code>InvalidStateError</code> exception and abort these steps.</p></li>

<li><p>If the <code>Document</code> object is not an <span>active document</span>, then abort
these steps.</p></li>

<li><p>Let <var title="">type</var> be the value of the first argument, if there is one, or
"<code>text/html</code>" otherwise.</p></li>

0 comments on commit ea9f9d3

Please sign in to comment.
You can’t perform that action at this time.