N
N
ncoxall2016-10-01 13:39:00
JavaScript
ncoxall, 2016-10-01 13:39:00

How to execute code from indexdb or localstorage in webworker?

There is a code that is stored in indexdb or localstorage, it needs to be run inside the worker!
How can I do that?
Answer:
var code = 'var evalfunstart = function (self) { console.log("start code (function) from web worker via eval") }';
eval(code);
evalfunstart();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2016-10-01
@SPAHI4

indexeddb can be launched via eval
https://www.google.ru/search?q=web+worker+indexeddb but it's better not to

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question