You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/04/18 22:25:35 UTC
ios commit: Add research from CB-2389 as code comments.
Updated Branches:
refs/heads/master cce2cdda0 -> 806167588
Add research from CB-2389 as code comments.
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/80616758
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/80616758
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/80616758
Branch: refs/heads/master
Commit: 806167588a83aafb0fc1ff3c25a3b19aeba2693c
Parents: cce2cdd
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Apr 18 16:24:22 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Apr 18 16:24:22 2013 -0400
----------------------------------------------------------------------
CordovaLib/Classes/CDVWebViewDelegate.m | 42 ++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/80616758/CordovaLib/Classes/CDVWebViewDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVWebViewDelegate.m b/CordovaLib/Classes/CDVWebViewDelegate.m
index 2a7cf0d..dd98d43 100644
--- a/CordovaLib/Classes/CDVWebViewDelegate.m
+++ b/CordovaLib/Classes/CDVWebViewDelegate.m
@@ -17,6 +17,48 @@
under the License.
*/
+//
+// Testing shows:
+//
+// In all cases, webView.request.URL is the previous page's URL (or empty) during the didStartLoad callback.
+// When loading a page with a redirect:
+// 1. shouldStartLoading (requestURL is target page)
+// 2. didStartLoading
+// 3. shouldStartLoading (requestURL is redirect target)
+// 4. didFinishLoad (request.URL is redirect target)
+//
+// Note the lack of a second didStartLoading **
+//
+// When loading a page with iframes:
+// 1. shouldStartLoading (requestURL is main page)
+// 2. didStartLoading
+// 3. shouldStartLoading (requestURL is one of the iframes)
+// 4. didStartLoading
+// 5. didFinishLoad
+// 6. didFinishLoad
+//
+// Note there is no way to distinguish which didFinishLoad maps to which didStartLoad **
+//
+// Loading a page by calling window.history.go(-1):
+// 1. didStartLoading
+// 2. didFinishLoad
+//
+// Note the lack of a shouldStartLoading call **
+// Actually - this is fixed on iOS6. iOS6 has a shouldStart. **
+//
+// Loading a page by calling location.reload()
+// 1. shouldStartLoading
+// 2. didStartLoading
+// 3. didFinishLoad
+//
+// Loading a page with an iframe that fails to load:
+// 1. shouldStart (main page)
+// 2. didStart
+// 3. shouldStart (iframe)
+// 4. didStart
+// 5. didFailWithError
+// 6. didFinish
+
#import "CDVWebViewDelegate.h"
#import "CDVAvailability.h"