{"issue":{"user":{"id":1274377,"login":"kojiishi","url":"https://api.github.com/users/kojiishi","avatar_url":"https://secure.gravatar.com/avatar/200a98b2f259777114f894ad0dec7157?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"200a98b2f259777114f894ad0dec7157"},"milestone":null,"created_at":"2011-12-20T04:17:56Z","title":"ChildBrowser.onLocationChange timing inconsistency between iPhone and Android","labels":[],"state":"open","updated_at":"2011-12-21T16:10:44Z","id":2609191,"html_url":"https://github.com/phonegap/phonegap-plugins/issues/292","closed_at":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"ChildBrowser.onLocationChange fires on webViewDidFinishLoad on iPhone, which means when it finished loading the page, while Android uses onPageStarted which means when navigation starts. I wish these two APIs be consistent across platforms.\r\n\r\nI prefer iPhone behavior. Although the naming looks like it should fire when navigation starts, chances are that if you close ChildBrowser in onLocationChange, the navigation may not complete on the server side, and its response may not received.","number":292,"url":"https://api.github.com/repos/phonegap/phonegap-plugins/issues/292","comments":6,"assignee":null},"comment":{"user":{"id":1274377,"login":"kojiishi","url":"https://api.github.com/users/kojiishi","avatar_url":"https://secure.gravatar.com/avatar/200a98b2f259777114f894ad0dec7157?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"200a98b2f259777114f894ad0dec7157"},"created_at":"2011-12-21T16:10:44Z","updated_at":"2011-12-21T16:10:44Z","id":3235592,"body":"Sorry for three posts in a row, but here's my recommendation.\r\n\r\n1. Change onLocationChange to fire in onPageFinished. This makes ChildBrowser for Android compatible with ChildBrowser for iPhone. Also, making it to later timing has less risk to break things, although it may slow the process a bit.\r\n2. Updating address box can stay in onPageStarted, so no changes here.\r\n3. Add another event, say, onLocationChanging, which fires in onPageStarted. Nice to add it to iPhone too.\r\n\r\nDoes this sound reasonable? I can make a patch for 1 if this helps, but I think it's no brainer for anyone. For 3, I think I need to learn a bit more on PhoneGap plugin.","url":"https://api.github.com/repos/phonegap/phonegap-plugins/issues/comments/3235592"},"action":"created"}