You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/07/18 15:09:28 UTC
[GitHub] wvengen commented on issue #276: CB-14188: add beforeload event,
catching navigation before it happens
wvengen commented on issue #276: CB-14188: add beforeload event, catching navigation before it happens
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/276#issuecomment-405965660
Thanks a lot for your review, @brodybits. I agree that the current approach is not ideal, and have struggled with how to add the callback. Indeed, a synchronous callback would be the best option, that would first need some research to whether Android's and iOS's WebView implementation allow this to take a little time (because it involves a Javascript invocation).
If this is not possible (or if this is ported to a platform requiring near-immediate return from its do-I-need-to-load-this-URL-function), for Cordova users it can still be a synchronous function, with the help of a workaround similar to what happens now, but without the concurrency issue you mentioned (I have an idea to do this using a custom URL scheme).
Interesting you mention the `beforeunload` event, that would be familiar to many. In our case, the confirm dialog would not be shown. It also makes sense to skip this on first page load, as that is always controlled by the inAppBrowser-invoking code.
I'll delve into this. Since I'll be on holiday for about two weeks, it may take a little time.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org