Action Invoker: Worker thread issue

Discussions about CSEntry
Post Reply
htuser
Posts: 687
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Action Invoker: Worker thread issue

Post by htuser »

Dear CSPro Developer Team,
I was trying to sync silently as requested here: viewtopic.php?p=19012#p19012. However, calling the synchronous method still displays the sync UI.
As a workaround, I tried to call the Sync function in a worker thread. But, the action-invoker.js can't be run in a worker thread. It displays these errors:
action-invoker.js:2 Uncaught ReferenceError: window is not defined
at Object.createMessage (action-invoker.js:2:67)
at Object.run (action-invoker.js:3:159)
at Object.eval (action-invoker.js:79:50)
at SyncSilent (worker.js:15:28)
at worker.js:7:24

It seems the action-invoker.js was designed to interact with DOM and this specific error is displayed because worker doesn’t have a window object.

Please take a look at this demo:
SilentSync.zip
and let me know if there is some workarounds.
Thanks in advance
You do not have the required permissions to view the files attached to this post.
G.VOLNY, a CSProuser from Haiti, since 2004
Post Reply