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
Developer
Posts: 264
Registered: ‎06-04-2009
My Device: Not Specified

Blackberry 10 webworks - loading webview and extending script engine

Can anyone please tell me how to load a url in webview and adding/extending the javascript extension window.external.notify to the url?

Highlighted
Developer
Posts: 134
Registered: ‎05-19-2012
My Device: Torch 9800, PlayBook 64GB, Dev Alpha
My Carrier: VIVO Brazil

Re: Blackberry 10 webworks - loading webview and extending script engine

You need to add the site to the <access> tag in your config.xml:

<access subdomains="true" uri="*" />
<access subdomains="true" uri="https://dropbox.com" />

All the WebWorks APIs are going to be extended to the new page.

If I helped you please click the "Like" button to support my work.
My apps: CherryNotes - Bookmarked - Requests
Social Me: about.me - Twitter
BlackBerry Development Advisor
Posts: 759
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: Blackberry 10 webworks - loading webview and extending script engine

Hello,

 

Here's a sample app that shows how to do this: https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/childBrowser

Developer
Posts: 264
Registered: ‎06-04-2009
My Device: Not Specified

Re: Blackberry 10 webworks - loading webview and extending script engine

I want to load  a url in webview and invoke the javascript methods in that url by adding the script extension method window.external.notify

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

Re: Blackberry 10 webworks - loading webview and extending script engine

I've never done this,  I would assume there would be some security issues you may run into.

 

I would start by first testing out the sample app,  get the url loaded into the childWindow, and then proceed from there.