Skip to content

Commit

Permalink
[giow] (0) Attempt to spec the subtlties of window.print().
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@6350 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 2, 2011
1 parent 1c67649 commit d429d74
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 14 deletions.
24 changes: 19 additions & 5 deletions complete.html
Expand Up @@ -8928,7 +8928,9 @@ <h3 id=documents><span class=secno>3.1 </span>Documents</h3>
<p>When a <code><a href=#document>Document</a></code> is created by a <a href=#concept-script title=concept-script>script</a> using the <code title=dom-DOMImplementation-createDocument><a href=#dom-domimplementation-createdocument>createDocument()</a></code>
or <code title=dom-DOMHTMLImplementation-createHTMLDocument>createHTMLDocument()</code>
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>
document's address</a> of the <a href="#script's-document">script's document</a>, and
the <code><a href=#document>Document</a></code> is both <a href=#ready-for-post-load-tasks>ready for post-load
tasks</a> and <a href=#completely-loaded>completely loaded</a> immediately.</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
Expand Down Expand Up @@ -12622,7 +12624,11 @@ <h4 id=opening-the-input-stream><span class=secno>3.4.1 </span>Opening the input
<li><p>Return the <code><a href=#document>Document</a></code> on which the method was
invoked.</li>

</ol><p>When called with three or more arguments, the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method on the
</ol><p class=note>The <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> method does not
affect whether a <code><a href=#document>Document</a></code> is <a href=#ready-for-post-load-tasks>ready for post-load
tasks</a> or <a href=#completely-loaded>completely loaded</a>.</p>

<p>When called with three or more arguments, the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method on the
<code><a href=#htmldocument>HTMLDocument</a></code> object must call the <code title=dom-open><a href=#dom-open>open()</a></code> method on the <code><a href=#window>Window</a></code>
object of the <code><a href=#htmldocument>HTMLDocument</a></code> object, with the same
arguments as the original call to the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method, and return whatever
Expand Down Expand Up @@ -69313,8 +69319,12 @@ <h4 id=printing><span class=secno>7.4.2 </span>Printing</h4>

</dl><div class=impl>

<p>The <dfn id=dom-print title=dom-print><code>print()</code></dfn> method,
when invoked, must run the <a href=#printing-steps>printing steps</a>.</p>
<p>When the <dfn id=dom-print title=dom-print><code>print()</code></dfn> method
is invoked, if the <code><a href=#document>Document</a></code> is <a href=#ready-for-post-load-tasks>ready for
post-load tasks</a>, then the user agent must synchronously run
the <a href=#printing-steps>printing steps</a>. Otherwise, the user agent must only
set the <dfn id=print-when-loaded>print when loaded</dfn> flag on the
<code><a href=#document>Document</a></code>.</p>

<p>User agents should also run the <a href=#printing-steps>printing steps</a>
whenever the user asks for the opportunity to <a href=#obtain-a-physical-form>obtain a
Expand Down Expand Up @@ -69343,7 +69353,7 @@ <h4 id=printing><span class=secno>7.4.2 </span>Printing</h4>
<p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> named
<code title=event-beforeprint>beforeprint</code> at the
<code><a href=#window>Window</a></code> object of the <code><a href=#document>Document</a></code> that is
being printed, as well as any <a href=#nested-browsing-context title="nested browsing
being printed, as well as any <a href=#nested-browsing-context title="nested browsing
context">nested browsing contexts</a> in it.</p>

<p class=example>The <code title=event-beforeprint>beforeprint</code> event can be used
Expand Down Expand Up @@ -90556,6 +90566,10 @@ <h4 id=the-end><span class=secno>13.2.6 </span>The end</h4>
for these <a href=#concept-task title=concept-task>tasks</a> is the
<a href=#networking-task-source>networking task source</a>.</li>

<li><p>If the <code><a href=#document>Document</a></code>'s <a href=#print-when-loaded>print when
loaded</a> flag is set, then run the <a href=#printing-steps>printing
steps</a>.</li>

<li><p>The <code><a href=#document>Document</a></code> is now <dfn id=ready-for-post-load-tasks>ready for post-load
tasks</dfn>.</li>

Expand Down
24 changes: 19 additions & 5 deletions index
Expand Up @@ -8797,7 +8797,9 @@ interface <dfn id=transferable>Transferable</dfn> { };</pre>
<p>When a <code><a href=#document>Document</a></code> is created by a <a href=#concept-script title=concept-script>script</a> using the <code title=dom-DOMImplementation-createDocument><a href=#dom-domimplementation-createdocument>createDocument()</a></code>
or <code title=dom-DOMHTMLImplementation-createHTMLDocument>createHTMLDocument()</code>
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>
document's address</a> of the <a href="#script's-document">script's document</a>, and
the <code><a href=#document>Document</a></code> is both <a href=#ready-for-post-load-tasks>ready for post-load
tasks</a> and <a href=#completely-loaded>completely loaded</a> immediately.</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
Expand Down Expand Up @@ -12491,7 +12493,11 @@ plaintext = *( %x0000-2029 / %x202F-10FFFF )
<li><p>Return the <code><a href=#document>Document</a></code> on which the method was
invoked.</li>

</ol><p>When called with three or more arguments, the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method on the
</ol><p class=note>The <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> method does not
affect whether a <code><a href=#document>Document</a></code> is <a href=#ready-for-post-load-tasks>ready for post-load
tasks</a> or <a href=#completely-loaded>completely loaded</a>.</p>

<p>When called with three or more arguments, the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method on the
<code><a href=#htmldocument>HTMLDocument</a></code> object must call the <code title=dom-open><a href=#dom-open>open()</a></code> method on the <code><a href=#window>Window</a></code>
object of the <code><a href=#htmldocument>HTMLDocument</a></code> object, with the same
arguments as the original call to the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method, and return whatever
Expand Down Expand Up @@ -69205,8 +69211,12 @@ interface <dfn id=windowtimers>WindowTimers</dfn> {

</dl><div class=impl>

<p>The <dfn id=dom-print title=dom-print><code>print()</code></dfn> method,
when invoked, must run the <a href=#printing-steps>printing steps</a>.</p>
<p>When the <dfn id=dom-print title=dom-print><code>print()</code></dfn> method
is invoked, if the <code><a href=#document>Document</a></code> is <a href=#ready-for-post-load-tasks>ready for
post-load tasks</a>, then the user agent must synchronously run
the <a href=#printing-steps>printing steps</a>. Otherwise, the user agent must only
set the <dfn id=print-when-loaded>print when loaded</dfn> flag on the
<code><a href=#document>Document</a></code>.</p>

<p>User agents should also run the <a href=#printing-steps>printing steps</a>
whenever the user asks for the opportunity to <a href=#obtain-a-physical-form>obtain a
Expand Down Expand Up @@ -69235,7 +69245,7 @@ interface <dfn id=windowtimers>WindowTimers</dfn> {
<p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> named
<code title=event-beforeprint>beforeprint</code> at the
<code><a href=#window>Window</a></code> object of the <code><a href=#document>Document</a></code> that is
being printed, as well as any <a href=#nested-browsing-context title="nested browsing
being printed, as well as any <a href=#nested-browsing-context title="nested browsing
context">nested browsing contexts</a> in it.</p>

<p class=example>The <code title=event-beforeprint>beforeprint</code> event can be used
Expand Down Expand Up @@ -86129,6 +86139,10 @@ document.body.appendChild(text);
for these <a href=#concept-task title=concept-task>tasks</a> is the
<a href=#networking-task-source>networking task source</a>.</li>

<li><p>If the <code><a href=#document>Document</a></code>'s <a href=#print-when-loaded>print when
loaded</a> flag is set, then run the <a href=#printing-steps>printing
steps</a>.</li>

<li><p>The <code><a href=#document>Document</a></code> is now <dfn id=ready-for-post-load-tasks>ready for post-load
tasks</dfn>.</li>

Expand Down
23 changes: 19 additions & 4 deletions source
Expand Up @@ -8914,7 +8914,9 @@ interface <dfn>Transferable</dfn> { };</pre>
or <code
title="dom-DOMHTMLImplementation-createHTMLDocument">createHTMLDocument()</code>
APIs, <span>the document's address</span> is the same as <span>the
document's address</span> of the <span>script's document</span>.</p>
document's address</span> of the <span>script's document</span>, and
the <code>Document</code> is both <span>ready for post-load
tasks</span> and <span>completely loaded</span> immediately.</p>

<p>Each <code>Document</code> object has a <dfn>reload override
flag</dfn> that is originally unset. The flag is set by the <code
Expand Down Expand Up @@ -13140,6 +13142,11 @@ plaintext = *( %x0000-2029 / %x202F-10FFFF )

</ol>

<p class="note">The <code
title="dom-document-open">document.open()</code> method does not
affect whether a <code>Document</code> is <span>ready for post-load
tasks</span> or <span>completely loaded</span>.</p>

<p>When called with three or more arguments, the <code
title="dom-document-open">open()</code> method on the
<code>HTMLDocument</code> object must call the <code
Expand Down Expand Up @@ -78911,8 +78918,12 @@ interface <dfn>WindowTimers</dfn> {

<div class="impl">

<p>The <dfn title="dom-print"><code>print()</code></dfn> method,
when invoked, must run the <span>printing steps</span>.</p>
<p>When the <dfn title="dom-print"><code>print()</code></dfn> method
is invoked, if the <code>Document</code> is <span>ready for
post-load tasks</span>, then the user agent must synchronously run
the <span>printing steps</span>. Otherwise, the user agent must only
set the <dfn>print when loaded</dfn> flag on the
<code>Document</code>.</p>

<p>User agents should also run the <span>printing steps</span>
whenever the user asks for the opportunity to <span>obtain a
Expand Down Expand Up @@ -78944,7 +78955,7 @@ interface <dfn>WindowTimers</dfn> {
<p>The user agent must <span>fire a simple event</span> named
<code title="event-beforeprint">beforeprint</code> at the
<code>Window</code> object of the <code>Document</code> that is
being printed, as well as any <span title="nested browsing
being printed, as well as any <span title="nested browsing
context">nested browsing contexts</span> in it.</p>

<p class="example">The <code
Expand Down Expand Up @@ -102571,6 +102582,10 @@ document.body.appendChild(text);
for these <span title="concept-task">tasks</span> is the
<span>networking task source</span>.</p></li>

<li><p>If the <code>Document</code>'s <span>print when
loaded</span> flag is set, then run the <span>printing
steps</span>.</p></li>

<li><p>The <code>Document</code> is now <dfn>ready for post-load
tasks</dfn>.</p></li>

Expand Down

0 comments on commit d429d74

Please sign in to comment.