I would like to open an external webapp from my cordova app and handle webapp events directly on the native app. For instance, when a specific URL is loaded the app should handle it by calling a function. Does anyone know if this is possible?
相关问题
- Should I use CSS3 media queries to deliver differe
- apk big size with ionic 4 build
- How to read file in android using PhoneGap Javascr
- Ionic start give error: There was an error with th
- InAppBrowser Allow-Navigation ONLY MY DOMAIN when
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Phonegap - Error - Keystore alias not recognized
- Can't use serve with Cordova / Phonegap hellow
- ionic - Copy/paste in input field in iOS 10 not wo
- PhoneGap iOS 7 and localStorage
- deviceready not firing in cordova
- net::ERR_CONNECTION_REFUSED ionic
- Phonegap - Missing App Store Icon 1024x1024px App
Yes, it is definitly possible to handle some events with the InAppBrowser. If you look at the API docs you'll see an
addEventListener
function that you can use. Currently it looks like the list of events you can listen for on the external page are still somewhat limited:It looks like for your purposes you could just use the
loadStart
orloadStop
events (not sure which would be best for your purpose, probablyloadStart()
.)Here is some example code:
In the HTML page that you are using to open the inAppBrowser: