new mmir.env.grammar.CompileWebWorker()
web-worker for compile jobs
Members
-
_activeTaskIds
-
dictionary for currently active compilations
[id] -> callback-function()
-
mmirLibPath
-
-
workerPath
-
Methods
-
_onerror()
-
Error handler for errors signaled by the webworker
-
_oninit()
-
listener for init-message DEFAULT: prints a message to the console Init Message: * success:
{init:true}
* failed:{init:false,error:"message"}
-
addCallback()
-
HELPER: register a callback (usage: see e.g. jisonGen.compileGrammar())
-
hasPendingCallback()
-
check if the worker has "pending callbacks"
-
onmessage()
-
handler for messages/event from web-worker:
-
prepareOnInit(syncGen, asyncDef){AsyncInitMesssage}
-
HELPER generate & setup oninit signal for sync + async modules. Side Effects: generates and sets #_oninit
Name Type Description syncGen
ParserGen the sync parser generator asyncDef
Deferred the deferred that should be resolved when async generator is initialized Returns:
Type Description AsyncInitMesssage the message object that should be sent to the async generator's WebWorker