ajax call in worker Thread throws Error "Origin file:// is not allowed by
Access-Control-Allow-Origin."
I am a new bie to webwoker and was trying my first sample on webworker. my
first webworker.html is the main thread doWork2.js is the worker thread.
If a post a message like 'HI ' form main thread to worker, the worker
receives it and returns back the same message to main thread using its own
post message in doWork2.js.
I am trying to use a worker thread to make ajax request. I am trying to
make a synchronous ajax request to retrieve the RSS feeds for itunes.
On the click of the button hi, the main thread posts a message to worker
like"worker.postMessage({'cmd': 'start', 'msg': "Hi"});"
In the worker thread the httpGet() makes an Ajax request and returns the
which is stored in
self.postMessage('WORKER STARTED: ' + data.msg+ myresult);
No comments:
Post a Comment