Skip to content

Commit f96b411

Browse files
committed
[giow] (3) Provide hook for pagevis. Correctly return false for event.persisted in pagehide. Define one of the variables in an algorithm.
Affected topics: HTML, HTML Syntax and Parsing git-svn-id: http://svn.whatwg.org/webapps@8160 340c8d12-0b0e-0410-8428-c7bf67bfef74
1 parent 1aa81f7 commit f96b411

File tree

3 files changed

+93
-16
lines changed

3 files changed

+93
-16
lines changed

complete.html

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256

257257
<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
258258
<hgroup><h1 class=allcaps>HTML</h1>
259-
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 29 August 2013</h2>
259+
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 31 August 2013</h2>
260260
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
261261
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
262262
<dt>Multiple-page version:</dt>
@@ -68652,6 +68652,15 @@ <h4 id=history-traversal><span class=secno>6.6.10 </span>History traversal</h4>
6865268652

6865368653
<li><p>Set the <code><a href=#document>Document</a></code>'s <a href=#page-showing>page showing</a> flag to true.</li>
6865468654

68655+
<li>
68656+
68657+
<p>Run any <dfn id=session-history-document-visibility-change-steps>session history document visibility change steps</dfn> for <code><a href=#document>Document</a></code> that
68658+
are defined by <a href=#other-applicable-specifications>other applicable specifications</a>.</p>
68659+
68660+
<p class=note>This is specifically intended for use by the Page Visibility specification. <a href=#refsPAGEVIS>[PAGEVIS]</a></p>
68661+
68662+
</li>
68663+
6865568664
<li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-pageshow><a href=#event-pageshow>pageshow</a></code> at the <code><a href=#window>Window</a></code> object of that
6865668665
<code><a href=#document>Document</a></code>, but with its <code title=dom-event-target><a href=#dom-event-target>target</a></code> set to the
6865768666
<code><a href=#document>Document</a></code> object (and the <code title=dom-event-currentTarget>currentTarget</code> set to the <code><a href=#window>Window</a></code> object),
@@ -68832,10 +68841,24 @@ <h5 id=event-definitions-1><span class=secno>6.6.10.1 </span>Event definitions</
6883268841

6883368842
<dd>
6883468843

68835-
<p>Returns false if the page is newly being loaded (and the <code title=event-load>load</code>
68836-
event will fire). Otherwise, returns true.</p>
68844+
<p>For the <code title=event-pageshow><a href=#event-pageshow>pageshow</a></code> event, returns false if the page is
68845+
newly being loaded (and the <code title=event-load>load</code> event will fire). Otherwise,
68846+
returns true.</p>
6883768847

68838-
</dd>
68848+
<p>For the <code title=event-pagehide><a href=#event-pagehide>pagehide</a></code> event, returns false if the page is
68849+
going away for the last time. Otherwise, returns true, meaning that (if nothing conspires to
68850+
make the page unsalvageable) the page might be reused if the user navigates back to this
68851+
page.</p>
68852+
68853+
<p>Things that can cause the page to be unsalvageable include:</p>
68854+
68855+
<ul class=brief><li><code title=dom-document-open><a href=#dom-document-open>document.open()</a></code>
68856+
<li>Listening for <code title=event-beforeunload>beforeunload</code> events
68857+
<li>Listening for <code title=event-unload>unload</code> events
68858+
<li>Having <code><a href=#the-iframe-element>iframe</a></code>s that are not salvageable
68859+
<li>Active <code><a href=#websocket>WebSocket</a></code> objects
68860+
<li><a href=#abort-a-document title="abort a document">Aborting a <code>Document</code></a>
68861+
</ul></dd>
6883968862

6884068863
</dl><div class=impl>
6884168864

@@ -68949,7 +68972,8 @@ <h4 id=unloading-documents><span class=secno>6.6.11 </span>Unloading documents</
6894968972
<code><a href=#document>Document</a></code> object (and the <code title=dom-event-currentTarget>currentTarget</code>
6895068973
set to the <code><a href=#window>Window</a></code> object), using the <code><a href=#pagetransitionevent>PageTransitionEvent</a></code> interface,
6895168974
with the <code title=dom-PageTransitionEvent-persisted><a href=#dom-pagetransitionevent-persisted>persisted</a></code> attribute initialized
68952-
to true. This event must not bubble, must not be cancelable, and has no default action.</li>
68975+
to true if the <code><a href=#document>Document</a></code> object's <i title=concept-document-salvageable><a href=#concept-document-salvageable>salvageable</a></i> state is true, and false otherwise. This
68976+
event must not bubble, must not be cancelable, and has no default action.</li>
6895368977

6895468978
<li>
6895568979

@@ -86620,7 +86644,7 @@ <h5 id=the-insertion-mode><span class=secno>12.2.3.1 </span>The insertion mode</
8662086644
<dd><p>All other elements found while parsing an HTML document.</dd>
8662186645

8662286646
</dl><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-the-specific-scope title="has an element in the specific
86623-
scope">have an element in a specific scope</dfn> consisting of a list of element types <var title="">list</var> when the following algorithm terminates in a match state:</p>
86647+
scope">have an element <var title="">target node</var> in a specific scope</dfn> consisting of a list of element types <var title="">list</var> when the following algorithm terminates in a match state:</p>
8662486648

8662586649
<ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current node</a> (the bottommost
8662686650
node of the stack).</li>

index

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256

257257
<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
258258
<hgroup><h1 class=allcaps>HTML</h1>
259-
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 29 August 2013</h2>
259+
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 31 August 2013</h2>
260260
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
261261
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
262262
<dt>Multiple-page version:</dt>
@@ -68652,6 +68652,15 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
6865268652

6865368653
<li><p>Set the <code><a href=#document>Document</a></code>'s <a href=#page-showing>page showing</a> flag to true.</li>
6865468654

68655+
<li>
68656+
68657+
<p>Run any <dfn id=session-history-document-visibility-change-steps>session history document visibility change steps</dfn> for <code><a href=#document>Document</a></code> that
68658+
are defined by <a href=#other-applicable-specifications>other applicable specifications</a>.</p>
68659+
68660+
<p class=note>This is specifically intended for use by the Page Visibility specification. <a href=#refsPAGEVIS>[PAGEVIS]</a></p>
68661+
68662+
</li>
68663+
6865568664
<li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-pageshow><a href=#event-pageshow>pageshow</a></code> at the <code><a href=#window>Window</a></code> object of that
6865668665
<code><a href=#document>Document</a></code>, but with its <code title=dom-event-target><a href=#dom-event-target>target</a></code> set to the
6865768666
<code><a href=#document>Document</a></code> object (and the <code title=dom-event-currentTarget>currentTarget</code> set to the <code><a href=#window>Window</a></code> object),
@@ -68832,10 +68841,24 @@ dictionary <dfn id=pagetransitioneventinit>PageTransitionEventInit</dfn> : <a hr
6883268841

6883368842
<dd>
6883468843

68835-
<p>Returns false if the page is newly being loaded (and the <code title=event-load>load</code>
68836-
event will fire). Otherwise, returns true.</p>
68844+
<p>For the <code title=event-pageshow><a href=#event-pageshow>pageshow</a></code> event, returns false if the page is
68845+
newly being loaded (and the <code title=event-load>load</code> event will fire). Otherwise,
68846+
returns true.</p>
6883768847

68838-
</dd>
68848+
<p>For the <code title=event-pagehide><a href=#event-pagehide>pagehide</a></code> event, returns false if the page is
68849+
going away for the last time. Otherwise, returns true, meaning that (if nothing conspires to
68850+
make the page unsalvageable) the page might be reused if the user navigates back to this
68851+
page.</p>
68852+
68853+
<p>Things that can cause the page to be unsalvageable include:</p>
68854+
68855+
<ul class=brief><li><code title=dom-document-open><a href=#dom-document-open>document.open()</a></code>
68856+
<li>Listening for <code title=event-beforeunload>beforeunload</code> events
68857+
<li>Listening for <code title=event-unload>unload</code> events
68858+
<li>Having <code><a href=#the-iframe-element>iframe</a></code>s that are not salvageable
68859+
<li>Active <code><a href=#websocket>WebSocket</a></code> objects
68860+
<li><a href=#abort-a-document title="abort a document">Aborting a <code>Document</code></a>
68861+
</ul></dd>
6883968862

6884068863
</dl><div class=impl>
6884168864

@@ -68949,7 +68972,8 @@ dictionary <dfn id=pagetransitioneventinit>PageTransitionEventInit</dfn> : <a hr
6894968972
<code><a href=#document>Document</a></code> object (and the <code title=dom-event-currentTarget>currentTarget</code>
6895068973
set to the <code><a href=#window>Window</a></code> object), using the <code><a href=#pagetransitionevent>PageTransitionEvent</a></code> interface,
6895168974
with the <code title=dom-PageTransitionEvent-persisted><a href=#dom-pagetransitionevent-persisted>persisted</a></code> attribute initialized
68952-
to true. This event must not bubble, must not be cancelable, and has no default action.</li>
68975+
to true if the <code><a href=#document>Document</a></code> object's <i title=concept-document-salvageable><a href=#concept-document-salvageable>salvageable</a></i> state is true, and false otherwise. This
68976+
event must not bubble, must not be cancelable, and has no default action.</li>
6895368977

6895468978
<li>
6895568979

@@ -86620,7 +86644,7 @@ dictionary <dfn id=storageeventinit>StorageEventInit</dfn> : <a href=#eventinit>
8662086644
<dd><p>All other elements found while parsing an HTML document.</dd>
8662186645

8662286646
</dl><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-the-specific-scope title="has an element in the specific
86623-
scope">have an element in a specific scope</dfn> consisting of a list of element types <var title="">list</var> when the following algorithm terminates in a match state:</p>
86647+
scope">have an element <var title="">target node</var> in a specific scope</dfn> consisting of a list of element types <var title="">list</var> when the following algorithm terminates in a match state:</p>
8662486648

8662586649
<ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current node</a> (the bottommost
8662686650
node of the stack).</li>

source

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76641,6 +76641,16 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
7664176641

7664276642
<li><p>Set the <code>Document</code>'s <span>page showing</span> flag to true.</p></li>
7664376643

76644+
<li>
76645+
76646+
<p>Run any <dfn>session history document visibility change steps</dfn> for <code>Document</code> that
76647+
are defined by <span>other applicable specifications</span>.</p>
76648+
76649+
<p class="note">This is specifically intended for use by the Page Visibility specification. <a
76650+
href="#refsPAGEVIS">[PAGEVIS]</a></p>
76651+
76652+
</li>
76653+
7664476654
<li><p><span title="concept-event-fire">Fire</span> a <span
7664576655
title="concept-events-trusted">trusted</span> event with the name <code
7664676656
title="event-pageshow">pageshow</code> at the <code>Window</code> object of that
@@ -76867,8 +76877,25 @@ dictionary <dfn>PageTransitionEventInit</dfn> : <span>EventInit</span> {
7686776877

7686876878
<dd>
7686976879

76870-
<p>Returns false if the page is newly being loaded (and the <code title="event-load">load</code>
76871-
event will fire). Otherwise, returns true.</p>
76880+
<p>For the <code title="event-pageshow">pageshow</code> event, returns false if the page is
76881+
newly being loaded (and the <code title="event-load">load</code> event will fire). Otherwise,
76882+
returns true.</p>
76883+
76884+
<p>For the <code title="event-pagehide">pagehide</code> event, returns false if the page is
76885+
going away for the last time. Otherwise, returns true, meaning that (if nothing conspires to
76886+
make the page unsalvageable) the page might be reused if the user navigates back to this
76887+
page.</p>
76888+
76889+
<p>Things that can cause the page to be unsalvageable include:</p>
76890+
76891+
<ul class="brief">
76892+
<li><code title="dom-document-open">document.open()</code>
76893+
<li>Listening for <code title="event-beforeunload">beforeunload</code> events
76894+
<li>Listening for <code title="event-unload">unload</code> events
76895+
<li>Having <code>iframe</code>s that are not salvageable
76896+
<li>Active <code>WebSocket</code> objects
76897+
<li><span title="abort a document">Aborting a <code>Document</code></span>
76898+
</ul>
7687276899

7687376900
</dd>
7687476901

@@ -77004,7 +77031,9 @@ dictionary <dfn>PageTransitionEventInit</dfn> : <span>EventInit</span> {
7700477031
<code>Document</code> object (and the <code title="dom-event-currentTarget">currentTarget</code>
7700577032
set to the <code>Window</code> object), using the <code>PageTransitionEvent</code> interface,
7700677033
with the <code title="dom-PageTransitionEvent-persisted">persisted</code> attribute initialized
77007-
to true. This event must not bubble, must not be cancelable, and has no default action.</p></li>
77034+
to true if the <code>Document</code> object's <i
77035+
title="concept-document-salvageable">salvageable</i> state is true, and false otherwise. This
77036+
event must not bubble, must not be cancelable, and has no default action.</p></li>
7700877037

7700977038
<li>
7701077039

@@ -96664,7 +96693,7 @@ dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {
9666496693
</dl>
9666596694

9666696695
<p>The <span>stack of open elements</span> is said to <dfn title="has an element in the specific
96667-
scope">have an element in a specific scope</dfn> consisting of a list of element types <var
96696+
scope">have an element <var title="">target node</var> in a specific scope</dfn> consisting of a list of element types <var
9666896697
title="">list</var> when the following algorithm terminates in a match state:</p>
9666996698

9667096699
<ol>

0 commit comments

Comments
 (0)