- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried using the emulator and App Preview but I can't get InAppBrowser to work.
Here's what I did:
- START NEW PROJECT
- Choose HTML5 + Cordova
- Include InAppBrowser plugin
- Add this code to myEventHandler in app.js:
try {
var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
}
catch (e) {
alert(e.message);
}
I get a message telling me that "open" is not a property of "undefined" (meaning that InAppBrowser is undefined)
What am I missing?
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
use window.open instead of cordova.InAppBrowser.open
cordova.InAppBrowser.open in newer InAppBrowser API implementation in latest plugin which is not implemented in emulator yet, window.open works and is backwards compatible. More details here: https://github.com/apache/cordova-plugin-inappbrowser
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page