Index: chrome/common/extensions/docs/server2/templates/intros/webNavigation.html |
diff --git a/chrome/common/extensions/docs/server2/templates/intros/webNavigation.html b/chrome/common/extensions/docs/server2/templates/intros/webNavigation.html |
index 063693f2e155601ec35b318e519ca4563a37ec42..c314ca5eaab9be5a8c213c2a5a22e4404d4aee46 100644 |
--- a/chrome/common/extensions/docs/server2/templates/intros/webNavigation.html |
+++ b/chrome/common/extensions/docs/server2/templates/intros/webNavigation.html |
@@ -1,4 +1,3 @@ |
-<!-- BEGIN AUTHORED CONTENT --> |
<p id="classSummary"> |
Use the <code>chrome.webNavigation</code> module to receive |
notifications about the status of navigations requests in-flight. |
@@ -51,6 +50,19 @@ If the reference fragment of a frame is changed, a |
time after <code>onDOMContentLoaded</code>, even after |
<code>onCompleted</code>. |
</p> |
+<p> |
+If the history API is used to modify the state of a frame (e.g. using |
+<code>history.pushState()</code>, a <code>onHistoryStateUpdated</code> event is |
+fired. This event can fire any time after <code>onDOMContentLoaded</code>. |
+</p> |
+<p> |
+If a navigation was triggered via <a |
+href="https://support.google.com/chrome/bin/answer.py?answer=177873">Chrome |
+Instant</a> or <a |
+href="https://support.google.com/chrome/bin/answer.py?answer=1385029">Instant |
+Pages</a>, a completely loaded page is swapped into the current tab. In that |
+case, an <code>onTabReplaced</code> event is fired. |
+</p> |
<h2>Relation to webRequest events</h2> |
<p> |
There is no defined ordering between events of the <a |
@@ -64,6 +76,15 @@ In general, the webNavigation events are closely related to the navigation |
state that is displayed in the UI, while the webRequest events correspond to |
the state of the network stack which is generally opaque to the user. |
</p> |
+<h2>A note about tab IDs</h2> |
+<p> |
+Not all navigating tabs correspond to actual tabs in Chrome's UI, e.g., a tab |
+that is being pre-rendered. Such tabs are not accessible via the |
+<a href="tabs.html">tabs API</a> nor can you request information about them via |
+<code>webNavigation.getFrame</code> or <code>webNavigation.getAllFrames</code>. |
+Once such a tab is swapped in, an <code>onTabReplaced</code> event is fired and |
+they become accessible via these APIs. |
+</p> |
<h2>A note about timestamps</h2> |
<p> |
It's important to note that some technical oddities in the OS's handling |
@@ -75,6 +96,23 @@ offset between them, but comparing them to the current time inside the |
extension (via <code>(new Date()).getTime()</code>, for instance) might give |
unexpected results. |
</p> |
+<h2>A note about frame and process IDs</h2> |
+<p> |
+Due to the multi-process nature of Chrome, a tab might use different processes |
+to render the source and destination of a web page. Therefore, if a navigation |
+takes place in a new process, you might receive events both from the new and |
+the old page until the new navigation is committed (i.e. the |
+<code>onCommitted</code> event is send for the new main frame). Because frame |
+IDs are only unique for a given process, the webNavigation events include a |
+process ID, so you can still determine which frame a navigation came from. |
+</p> |
+<p> |
+Also note that during a provisional load the process might be switched several |
+times. This happens when the load is redirected to a different site. In this |
+case, you will receive repeated <code>onBeforeNavigate</code> and |
+<code>onErrorOccurred</code> events, until you receive the final |
+<code>onCommitted</code> event. |
+</p> |
<h2>Transition types and qualifiers</h2> |
<p> |
The webNavigation API's <code>onCommitted</code> event has a |
@@ -117,5 +155,4 @@ The following transition qualifiers exist: |
The user initiated the navigation from the address bar (aka Omnibox). |
</td> |
</tr> |
-</table> |
-<!-- END AUTHORED CONTENT --> |
+</table> |