Skip to content

Entries: Deprecate page events and note pagecontainer event differences #255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions entries/pagebeforehide.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
<?xml version="1.0"?>
<entry name="pagebeforehide" type="event" return="">
<entry name="pagebeforehide" new-event-name="pagecontainerbeforehide" type="event" return="">
<title>pagebeforehide</title>
<desc>Triggered on the "fromPage" we are transitioning away from, before the actual transition animation is kicked off.</desc>
<longdesc>
<p>Callbacks for this event will receive a data object as their 2nd arg. This data object has the following properties on it: </p>
<ul>
<li><code>nextPage</code> (object)
<ul>
<li>A jQuery collection object that contains the page DOM element that we are transitioning to.</li>
</ul>
</li>
</ul>
<p>Note that this event will not be dispatched during the transition of the first page at application startup since there is no previously active page.</p>

<xi:include href="../includes/pageevent-deprecation.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</longdesc>
<added>1.0</added>
<signature>
Expand Down
5 changes: 2 additions & 3 deletions entries/pagebeforeload.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0"?>
<entry name="pagebeforeload" type="event" return="" deprecated="1.4.0">
<entry name="pagebeforeload" new-event-name="pagecontainerbeforeload" type="event" return="" deprecated="1.4.0">
<title>pagebeforeload</title>
<desc>Triggered before any load request is made.</desc>
<longdesc>
<strong>Note: The triggering of this event is deprecated as of jQuery Mobile 1.4.0. It will no longer be triggered in 1.5.0.</strong>
<p>The replacement for <placeholder name="name"/> is <a href="/pagecontainer/#event-beforeload">pagecontainerbeforeload</a>. In jQuery Mobile 1.4.0, the two events are identical except for their name.</p>
<xi:include href="../includes/pageevent-deprecation.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</longdesc>
<added>1.0</added>
<signature>
Expand Down
11 changes: 2 additions & 9 deletions entries/pagebeforeshow.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
<?xml version="1.0"?>
<entry name="pagebeforeshow" type="event" return="">
<entry name="pagebeforeshow" new-event-name="pagecontainerbeforeshow" type="event" return="">
<title>pagebeforeshow</title>
<desc>Triggered on the "toPage" we are transitioning to, before the actual transition animation is kicked off. </desc>
<longdesc>
<p>Callbacks for this event will receive a data object as their 2nd arg. This data object has the following properties on it: </p>
<ul>
<li><code>prevPage</code> (object)
<ul>
<li>A jQuery collection object that contains the page DOM element that we are transitioning away from. Note that this collection is empty when the first page is transitioned in during application startup.</li>
</ul>
</li>
</ul>
<xi:include href="../includes/pageevent-deprecation.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</longdesc>
<added>1.0</added>
<signature>
Expand Down
5 changes: 2 additions & 3 deletions entries/pagechangefailed.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0"?>
<entry name="pagechangefailed" type="event" return="" deprecated="1.4.0">
<entry name="pagechangefailed" new-event-name="pagecontainerchangefailed" type="event" return="" deprecated="1.4.0">
<title>pagechangefailed</title>
<desc>Triggered when the changePage() request fails to load the page.</desc>
<longdesc>
<strong>Note: The triggering of this event is deprecated as of jQuery Mobile 1.4.0. It will no longer be triggered in 1.5.0.</strong>
<p>The replacement for <placeholder name="name"/> is <a href="/pagecontainer/#event-changefailed">pagecontainerchangefailed</a>. In jQuery Mobile 1.4.0, the two events are identical except for their name.</p>
<xi:include href="../includes/pageevent-deprecation.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</longdesc>
<added>1.0</added>
<signature>
Expand Down
20 changes: 20 additions & 0 deletions entries/pagecontainer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@
</options>

<events>
<event name="beforehide">
<desc>Triggered before the actual transition animation is kicked off.</desc>
<argument name="event" type="Event" />
<argument name="ui" type="Object">
<property name="nextPage">
<desc>A jQuery collection object that contains the destination page DOM element.</desc>
<type name="jQuery"/>
</property>
</argument>
</event>
<event name="beforeload">
<desc>Triggered before any load request is made.
<p>Callbacks bound to this event can call <code>preventDefault()</code> on the event to indicate that they are handling the load request. Callbacks that do this <strong>MUST</strong> make sure they call <code>resolve()</code> or <code>reject()</code> on the deferred object reference contained in the object passed to the callback via its <code>ui</code> parameter.</p>
Expand Down Expand Up @@ -145,6 +155,16 @@ $( document ).on( "pagecontainerbeforeload", function( event, data ) {
</property>
</argument>
</event>
<event name="beforeshow">
<desc>Triggered before the actual transition animation is kicked off.</desc>
<argument name="event" type="Event" />
<argument name="ui" type="Object">
<property name="prevPage">
<desc>A jQuery collection object that contains the source page DOM element.</desc>
<type name="jQuery"/>
</property>
</argument>
</event>
<event name="beforetransition">
<desc>Triggered before the transition between two pages starts.</desc>
<argument name="event" type="Event"/>
Expand Down
5 changes: 2 additions & 3 deletions entries/pagehide.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0"?>
<entry name="pagehide" type="event" return="" deprecated="1.4.0">
<entry name="pagehide" new-event-name="pagecontainerhide" type="event" return="" deprecated="1.4.0">
<title>pagehide</title>
<desc>Triggered on the "fromPage" after the transition animation has completed.</desc>
<longdesc>
<strong>Note: The triggering of this event is deprecated as of jQuery Mobile 1.4.0. It will no longer be triggered in 1.5.0.</strong>
<p>The replacement for <placeholder name="name"/> is <a href="/pagecontainer/#event-hide">pagecontainerhide</a>. In jQuery Mobile 1.4.0, the two events are identical except for their name.</p>
<xi:include href="../includes/pageevent-deprecation.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</longdesc>
<added>1.0</added>
<signature>
Expand Down
5 changes: 2 additions & 3 deletions entries/pageload.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0"?>
<entry name="pageload" type="event" return="" deprecated="1.4.0">
<entry name="pageload" new-event-name="pagecontainerload" type="event" return="" deprecated="1.4.0">
<title>pageload</title>
<desc>Triggered after the page is successfully loaded and inserted into the DOM.</desc>
<longdesc>
<strong>Note: The triggering of this event is deprecated as of jQuery Mobile 1.4.0. It will no longer be triggered in 1.5.0.</strong>
<p>The replacement for <placeholder name="name"/> is <a href="/pagecontainer/#event-load">pagecontainerload</a>. In jQuery Mobile 1.4.0, the two events are identical except for their name.</p>
<xi:include href="../includes/pageevent-deprecation.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</longdesc>
<added>1.0</added>
<signature>
Expand Down
5 changes: 2 additions & 3 deletions entries/pageloadfailed.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0"?>
<entry name="pageloadfailed" type="event" return="" deprecated="1.4.0">
<entry name="pageloadfailed" new-event-name="pagecontainerloadfailed" type="event" return="" deprecated="1.4.0">
<title>pageloadfailed</title>
<desc>Triggered if the page load request failed.</desc>
<longdesc>
<strong>Note: The triggering of this event is deprecated as of jQuery Mobile 1.4.0. It will no longer be triggered in 1.5.0.</strong>
<p>The replacement for <placeholder name="name"/> is <a href="/pagecontainer/#event-load">pagecontainerloadfailed</a>. In jQuery Mobile 1.4.0, the two events are identical except for their name.</p>
<xi:include href="../includes/pageevent-deprecation.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</longdesc>
<added>1.0</added>
<signature>
Expand Down
5 changes: 2 additions & 3 deletions entries/pageshow.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0"?>
<entry name="pageshow" type="event" return="">
<entry name="pageshow" new-event-name="pagecontainershow" type="event" return="">
<title>pageshow</title>
<desc>Triggered on the "toPage" after the transition animation has completed.</desc>
<longdesc>
<strong>Note: The triggering of this event is deprecated as of jQuery Mobile 1.4.0. It will no longer be triggered in 1.5.0.</strong>
<p>The replacement for <placeholder name="name"/> is <a href="/pagecontainer/#event-show">pagecontainershow</a>. In jQuery Mobile 1.4.0, the two events are identical except for their name.</p>
<xi:include href="../includes/pageevent-deprecation.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</longdesc>
<added>1.0</added>
<signature>
Expand Down
5 changes: 5 additions & 0 deletions includes/pageevent-deprecation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<div class="warning">
<strong>Note:</strong> The triggering of this event is deprecated as of jQuery Mobile 1.4.0. It will no longer be triggered in 1.5.0.
<p>The replacement for <code><placeholder name="name"/></code> is the <code><a href="/pagecontainer/">pagecontainer</a></code> widget's <code><placeholder name="new-event-name"/></code> event. In jQuery Mobile 1.4.0, the two events are identical except for their name and the fact that <code><placeholder name="new-event-name"/></code> is triggered on the pagecontainer, whereas <code><placeholder name="name"/></code> is triggered on the page.</p>
</div>