From 485fa8650ad89466104fcd3fe64f09d701708e7b Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Thu, 29 Jan 2015 02:04:35 +0200 Subject: [PATCH 1/2] Navigation: Clarify the circumstances of and data associated with pagebeforechange Fixes gh-355 --- entries/pagebeforechange.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/entries/pagebeforechange.xml b/entries/pagebeforechange.xml index 9393907e..88fdeb02 100644 --- a/entries/pagebeforechange.xml +++ b/entries/pagebeforechange.xml @@ -5,7 +5,11 @@

When received with data.toPage set to a string, the event indicates that navigation is about to commence. The value stored in data.toPage is the URL of the page that will be loaded.

When received with data.toPage set to a jQuery object, the event indicates that the destination page has been loaded and navigation will continue.

-

During the handling of this event the browser's history has not yet changed.

+

If the page change cycle was initiated programmatically, and, instead of a URL a jQuery object containing a page was given, then the event will be triggered both times with data.toPage set to the jQuery object containing the destination page.

+ +

The event is triggered either by explicit navigation on the part of the user (e.g. by clicking on a link or by running code that results in a call to the pagecontainer change() method), or by implicit navigation caused by the user clicking the browser's "Back" or "Forward" buttons.

+

Explicit navigation results in both events being triggered before a new entry is added to the browser's navigation history.

+

Implicit navigation results in both events being triggered after the browser's navigation history has already been updated.

In addition to the event parameter, handlers of this event will receive a second parameter, data. The second parameter is an object containing the following properties: