Class: CompileWebWorker

CompileWebWorker

new mmir.env.grammar.CompileWebWorker()

web-worker for compile jobs

Members

_activeTaskIds

dictionary for currently active compilations
[id] -> callback-function()

mmirLibPath

workerPath

Methods

Error handler for errors signaled by the webworker
listener for init-message DEFAULT: prints a message to the console Init Message: * success: {init:true} * failed: {init:false,error:"message"}
HELPER: register a callback (usage: see e.g. jisonGen.compileGrammar())

hasPendingCallback()

check if the worker has "pending callbacks"
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