From 4e57ced4782c014773ef9b1858e8a8bd6949d1c7 Mon Sep 17 00:00:00 2001
From: Ian Hickson You can take part in this work. Join the working group's discussion list. Web designers! We have a FAQ, a forum, and a help mailing list for you! Returns the current state object.Web Applications 1.0
- Living Standard — Last Updated 24 March 2011
+ Living Standard — Last Updated 25 March 2011
6.4.2 The
interface History {
readonly attribute long length;
+ readonly attribute any state;
void go(in optional long delta);
void back();
void forward();
@@ -60433,6 +60434,14 @@
6.4.2 The
+
history
. state
history
. go
( [ delta ] )6.4.2 The
The actual entries are not accessible from script.
The state
+ attribute of the History
interface must return the last
+ value it was set to by the user agent. Initially, its value must be
+ null.
When the go(delta)
method is invoked, if the
argument to the method was omitted or has the value zero, the user
agent must act as if the location.reload()
method was
@@ -60683,16 +60697,8 @@
- If the current document readiness is not yet set
- to the string "complete", let the Document
's
- pending state object be another structured
- clone of the specified data. (If there
- was already a pending state object, the previous one
- is discarded.)
-
- This ensures that the popstate
event that will be fired
- when the document finally loads will accurately reflect the
- pushed or replaced state object.
+ Set history.state
to
+ another structured clone of the specified data.
@@ -60798,7 +60804,7 @@ 6.4.2 The
@@ -62100,33 +62106,16 @@ 6.5.9 History traversal
<
state object. Otherwise, let state be
null.
-
-
- Run the appropriate steps according to the conditions
- described:
+ Set history.state
to state.
- - If the current document readiness is set to the
- string "complete"
+
Fire a popstate
event at
+ the Window
object of the Document
, using
+ the PopStateEvent
interface, with the state
attribute set to the
+ value of state. This event must bubble but not
+ be cancelable and has no default action.
- Queue a task to fire a popstate
event at the
- Window
object of the Document
, using
- the PopStateEvent
interface, with the state
attribute set to the
- value of state. This event must bubble but
- not be cancelable and has no default action.
-
- Otherwise
-
- Let the Document
's pending state
- object be state. (If there was already
- a pending state object, the previous one is
- discarded.)
-
- The event will then be fired just after the load
event.
-
-
-
- If hash changed is true, then
- queue a task to fire a hashchange
event at the
+
If hash changed is true, then fire a
+ hashchange
event at the
browsing context's Window
object, using
the HashChangeEvent
interface, with the oldURL
attribute set to
old URL and the newURL
attribute set to
@@ -62136,12 +62125,7 @@
6.5.9 History traversal
<
The current entry is now the specified
entry.
- The pending state object is used to keep track of what
- state object to use in the inital popstate
event fired by the parser
- once it stops parsing. The
- pending state object must be initially null.
-
- The task source for the tasks mentioned above is the
+
The task source for the tasks mentioned above is the
DOM manipulation task source.
@@ -86588,14 +86572,6 @@ 13.2.6 The end
attribute set to false. This event must not bubble, must not be
cancelable, and has no default action.
- If the Document
is in a browsing
- context, then queue a task to fire a popstate
event at the
- Document
's Window
object using the
- PopStateEvent
interface, with the state
attribute set to the
- current value of the pending state object. This event
- must bubble but not be cancelable and has no default
- action.
-
If the Document
has any pending
application cache download process tasks, then queue each such task in the order they were added to
the list of pending application cache download process
diff --git a/index b/index
index 55d31b8b9a1..b6717df1786 100644
--- a/index
+++ b/index
@@ -243,7 +243,7 @@
HTML
- Living Standard — Last Updated 24 March 2011
+ Living Standard — Last Updated 25 March 2011
You can take part in this work. Join the working group's discussion list.
Web designers! We have a FAQ, a forum, and a help mailing list for you!
@@ -60398,6 +60398,7 @@ x === this; // true
interface History {
readonly attribute long length;
+ readonly attribute any state;
void go(in optional long delta);
void back();
void forward();
@@ -60413,6 +60414,14 @@ x === this; // true
+ window . history
. state
+
+
+
+ Returns the current state object.
+
+
+
window . history
. go
( [ delta ] )
@@ -60495,6 +60504,11 @@ x === this; // true
The actual entries are not accessible from script.
+ The state
+ attribute of the History
interface must return the last
+ value it was set to by the user agent. Initially, its value must be
+ null.
+
When the go(delta)
method is invoked, if the
argument to the method was omitted or has the value zero, the user
agent must act as if the location.reload()
method was
@@ -60663,16 +60677,8 @@ x === this; // true
- If the current document readiness is not yet set
- to the string "complete", let the Document
's
- pending state object be another structured
- clone of the specified data. (If there
- was already a pending state object, the previous one
- is discarded.)
-
- This ensures that the popstate
event that will be fired
- when the document finally loads will accurately reflect the
- pushed or replaced state object.
+ Set history.state
to
+ another structured clone of the specified data.
@@ -60778,7 +60784,7 @@ x === this; // true
document.forms.F.I.value = newI;
}
</SCRIPT>
-<BODY ONPOPSTATE="recover(event.state)">
+<BODY ONPOPSTATE="set(event.state)">
<FORM NAME=F>
State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON ONCLICK="inc()">
</FORM>
@@ -62080,33 +62086,16 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BU
state object. Otherwise, let state be
null.
-
-
- Run the appropriate steps according to the conditions
- described:
+ Set history.state
to state.
- - If the current document readiness is set to the
- string "complete"
+
Fire a popstate
event at
+ the Window
object of the Document
, using
+ the PopStateEvent
interface, with the state
attribute set to the
+ value of state. This event must bubble but not
+ be cancelable and has no default action.
- Queue a task to fire a popstate
event at the
- Window
object of the Document
, using
- the PopStateEvent
interface, with the state
attribute set to the
- value of state. This event must bubble but
- not be cancelable and has no default action.
-
- Otherwise
-
- Let the Document
's pending state
- object be state. (If there was already
- a pending state object, the previous one is
- discarded.)
-
- The event will then be fired just after the load
event.
-
-
-
- If hash changed is true, then
- queue a task to fire a hashchange
event at the
+
If hash changed is true, then fire a
+ hashchange
event at the
browsing context's Window
object, using
the HashChangeEvent
interface, with the oldURL
attribute set to
old URL and the newURL
attribute set to
@@ -62116,12 +62105,7 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BU
The current entry is now the specified
entry.
- The pending state object is used to keep track of what
- state object to use in the inital popstate
event fired by the parser
- once it stops parsing. The
- pending state object must be initially null.
-
- The task source for the tasks mentioned above is the
+
The task source for the tasks mentioned above is the
DOM manipulation task source.
@@ -82524,14 +82508,6 @@ document.body.appendChild(text);
attribute set to false. This event must not bubble, must not be
cancelable, and has no default action.
- If the Document
is in a browsing
- context, then queue a task to fire a popstate
event at the
- Document
's Window
object using the
- PopStateEvent
interface, with the state
attribute set to the
- current value of the pending state object. This event
- must bubble but not be cancelable and has no default
- action.
-
If the Document
has any pending
application cache download process tasks, then queue each such task in the order they were added to
the list of pending application cache download process
diff --git a/source b/source
index 963c66b37ea..ea8740a5281 100644
--- a/source
+++ b/source
@@ -68578,6 +68578,7 @@ x === this; // true
interface History {
readonly attribute long length;
+ readonly attribute any state;
void go(in optional long delta);
void back();
void forward();
@@ -68595,6 +68596,14 @@ x === this; // true
+ window . history
. state
+
+
+
+ Returns the current state object.
+
+
+
window . history
. go
( [ delta ] )
@@ -68679,6 +68688,11 @@ x === this; // true
The actual entries are not accessible from script.
+ The state
+ attribute of the History
interface must return the last
+ value it was set to by the user agent. Initially, its value must be
+ null.
+
When the go(delta)
method is invoked, if the
argument to the method was omitted or has the value zero, the user
@@ -68895,17 +68909,9 @@ x === this; // true
- If the current document readiness is not yet set
- to the string "complete", let the Document
's
- pending state object be another structured
- clone of the specified data. (If there
- was already a pending state object, the previous one
- is discarded.)
-
- This ensures that the popstate
event that will be fired
- when the document finally loads will accurately reflect the
- pushed or replaced state object.
+ Set history.state
to
+ another structured clone of the specified data.
@@ -69013,7 +69019,7 @@ x === this; // true
document.forms.F.I.value = newI;
}
</SCRIPT>
-<BODY ONPOPSTATE="recover(event.state)">
+<BODY ONPOPSTATE="set(event.state)">
<FORM NAME=F>
State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON ONCLICK="inc()">
</FORM>
@@ -70488,41 +70494,18 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O
state object. Otherwise, let state be
null.
-
-
- Run the appropriate steps according to the conditions
- described:
-
-
-
- - If the current document readiness is set to the
- string "complete"
+
Set history.state
to state.
- Queue a task to fire a popstate
event at the
- Window
object of the Document
, using
- the PopStateEvent
interface, with the state
attribute set to the
- value of state. This event must bubble but
- not be cancelable and has no default action.
-
- Otherwise
-
- Let the Document
's pending state
- object be state. (If there was already
- a pending state object, the previous one is
- discarded.)
-
- The event will then be fired just after the load
event.
-
-
-
-
+ Fire a popstate
event at
+ the Window
object of the Document
, using
+ the PopStateEvent
interface, with the state
attribute set to the
+ value of state. This event must bubble but not
+ be cancelable and has no default action.
- If hash changed is true, then
- queue a task to fire a hashchange
event at the
+
If hash changed is true, then fire a
+ hashchange
event at the
browsing context's Window
object, using
the HashChangeEvent
interface, with the oldURL
attribute set to
@@ -70536,12 +70519,6 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O
-
The pending state object is used to keep track of what
- state object to use in the inital popstate
event fired by the parser
- once it stops parsing. The
- pending state object must be initially null.
-
The task source for the tasks mentioned above is the
DOM manipulation task source.
@@ -98038,16 +98015,6 @@ document.body.appendChild(text);
attribute set to false. This event must not bubble, must not be
cancelable, and has no default action.
- If the Document
is in a browsing
- context, then queue a task to fire a popstate
event at the
- Document
's Window
object using the
- PopStateEvent
interface, with the state
attribute set to the
- current value of the pending state object. This event
- must bubble but not be cancelable and has no default
- action.
-
If the Document
has any pending
application cache download process tasks, then queue each such