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: 37
Registered: ‎01-18-2011
My Device: Huron 8800
My Carrier: IM3

Problem with HTML5 Worker importScript()

I'm currently developing BB WebWorker application for playbook, I'm testing my app using latest Chrome browser and is working well. But, when I install that app in PlayBook simulator, this app immediately exit in less than 2s.

 

I'm leveraging HTML5 Worker thread and I found that, the error always occured in the

 

importScript("aFile.js");

the Javascript code in my worker.js is

 

self.addEventListener('message', function(e) {
importScripts("stringUtil.js");

self.postMessage('OK.');
}, false);

this script will be just fine if I remove the importScript statement.

 

Below is my directory structure

 

script
--customer.js
--worker.js
--stringUtil.js

I'm calling new Worker("worker.js") in customer.js.

 

Any solution for this?

Highlighted
Contributor
Posts: 34
Registered: ‎10-27-2010
My Device: Not Specified

Re: Problem with HTML5 Worker importScript()

Doing some digging into workers for my application I noticed that importScripts() is currently not supported: http://docs.blackberry.com/en/developers/deliverables/20957/HTML5_support_1326451_11.jsp