- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 05 Jun 2008 23:41:11 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv2046
Modified Files:
Overview.html
Log Message:
onbeforeprint and onafterprint (whatwg r1724)
Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.911
retrieving revision 1.912
diff -u -d -r1.911 -r1.912
--- Overview.html 5 Jun 2008 11:11:16 -0000 1.911
+++ Overview.html 5 Jun 2008 23:41:08 -0000 1.912
@@ -1196,10 +1196,12 @@
<li><a href="#simple0"><span class=secno>4.5.1 </span>Simple
dialogs</a>
- <li><a href="#dialogs"><span class=secno>4.5.2 </span>Dialogs
+ <li><a href="#printing"><span class=secno>4.5.2 </span>Printing</a>
+
+ <li><a href="#dialogs"><span class=secno>4.5.3 </span>Dialogs
implemented using separate documents</a>
- <li><a href="#notifications"><span class=secno>4.5.3
+ <li><a href="#notifications"><span class=secno>4.5.4
</span>Notifications</a>
</ul>
@@ -30220,16 +30222,58 @@
aborts, then the method must return null; otherwise, the method must
return the string that the user responded with.
+ <h4 id=printing><span class=secno>4.5.2 </span>Printing</h4>
+
<p>The <dfn id=print title=dom-print><code>print()</code></dfn> method,
- when invoked, should offer the user the opportunity to <a
- href="#obtain">obtain a physical form</a> of the document. The user agent
- may make the method wait for the user to either accept or decline before
- returning; if so, the user agent must <a href="#pause">pause</a> while the
- method is waiting. (This does not, of course, preclude the user agent from
- <em>always</em> offering the user with the opportunity to convert the
- document to whatever media the user might want.)
+ when invoked, must run the <a href="#printing0">printing steps</a>.
- <h4 id=dialogs><span class=secno>4.5.2 </span>Dialogs implemented using
+ <p>User agents should also run the <a href="#printing0">printing steps</a>
+ whenever the user attempts to obtain a physical form (e.g. printed copy),
+ or the representation of a physical form (e.g. PDF copy), of a document.
+
+ <p>The <dfn id=printing0>printing steps</dfn> are as follows:
+
+ <ol>
+ <li>
+ <p>The user agent may display a message to the user and/or may abort
+ these steps.</p>
+
+ <p class=example>For instance, a kiosk browser could silently ignore any
+ invocations of the <code title=dom-print><a
+ href="#print">print()</a></code> method.</p>
+
+ <p class=example>For instance, a browser on a mobile device could detect
+ that there are no printers in the vicinity and display a message saying
+ so before continuing to offer a "save to PDF" option.</p>
+
+ <li>
+ <p>The user agent must <a href="#firing2">fire a simple event</a> called
+ <code title=event-onbeforeprint>onbeforeprint</code> at the <code><a
+ href="#window">Window</a></code> object of the browsing context of the
+ <code>Document</code> that is being printed, as well as any <a
+ href="#nested0" title="nested browsing context">nested browsing
+ contexts</a> in it.</p>
+
+ <li>
+ <p>The user agent should offer the user the opportunity to <a
+ href="#obtain">obtain a physical form</a> (or the representation of a
+ physical form) of the document. The user agent may wait for the user to
+ either accept or decline before returning; if so, the user agent must <a
+ href="#pause">pause</a> while the method is waiting. Even if the user
+ agent doesn't wait at this point, the user agent must use the state of
+ the relevant documents as they are at this point in the algorithm if and
+ when it eventually creates the alternate form.</p>
+
+ <li>
+ <p>The user agent must <a href="#firing2">fire a simple event</a> called
+ <code title=event-onafterprint>onafterprint</code> at the <code><a
+ href="#window">Window</a></code> object of the browsing context of the
+ <code>Document</code> that is being printed, as well as any <a
+ href="#nested0" title="nested browsing context">nested browsing
+ contexts</a> in it.</p>
+ </ol>
+
+ <h4 id=dialogs><span class=secno>4.5.3 </span>Dialogs implemented using
separate documents</h4>
<p>The <dfn id=showmodaldialog
@@ -30373,7 +30417,7 @@
of its browsing context, and on setting, must set the <a
href="#return">return value</a> to the given new value.
- <h4 id=notifications><span class=secno>4.5.3 </span>Notifications</h4>
+ <h4 id=notifications><span class=secno>4.5.4 </span>Notifications</h4>
<!-- v2 feature requests:
- ability to snooze a notification so it comes again later
Received on Thursday, 5 June 2008 23:41:45 UTC