Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
Posts: 11
Registered: ‎11-15-2012
My Device: Blackberry 10 Alpha Device
My Carrier: ATT

InAppBrowser Events Do Not Fire window.open opens url, but addEventListener callbacks are not executed

If I try and run the full example from the Blackberry Documentation:

 

https://developer.blackberry.com/html5/apis/v2_0/cordova_inappbrowser_inappbrowser.md.html#addEventL...

 

The window.open works, but none of the events are fired. e.g. nothing happens upon loadstart, loadstop, loaderror, and exit

 

Am I missing a permission or something?

Retired
Posts: 203
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3
My Carrier: Bell

Re: InAppBrowser Events Do Not Fire window.open opens url, but addEventListener callbacks are not executed

Hi,

 

Those events aren't actually supported by BB10. The Apache Cordova docs have been updated to make this clear but they haven't been pulled into developer.blackberry.com yet.

 

https://github.com/apache/cordova-plugin-inappbrowser/blob/master/doc/index.md

 

We are looking into adding this functionality in the future.

 

Sorry for the confusion.

 

 

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
Contributor
Posts: 11
Registered: ‎11-15-2012
My Device: Blackberry 10 Alpha Device
My Carrier: ATT

Re: InAppBrowser Events Do Not Fire window.open opens url, but addEventListener callbacks are not executed

Thank you for the reply. I spent several hours trying to figure out why it wasn't working. I thought it might have been a configuration problem on my end. Thank you for updating the docs as well.

Is there any other way to determine when the InAppBrowser url has changed or at the very least when the window has been closed?

I am trying to utilize the InAppBrowser to do an oath authentication on my server to authenticate the app. It works great with IOS and Android, but if I can't at least detect when the window has been closed, I won't be able to authenticate with BB10.
Contributor
Posts: 11
Registered: ‎11-15-2012
My Device: Blackberry 10 Alpha Device
My Carrier: ATT

Re: InAppBrowser Events Do Not Fire window.open opens url, but addEventListener callbacks are not executed

Is there any other way to determine when the InAppBrowser url has changed or at the very least when the window has been closed?

BlackBerry Development Advisor
Posts: 647
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: InAppBrowser Events Do Not Fire window.open opens url, but addEventListener callbacks are not executed

I've got an example of checking for url changes here, it's from the OAuth sample(s).

 

https://github.com/blackberry/BB10-WebWorks-Samples/blob/master/OAuth-Facebook/www/js/app.js#L111-L1...