Global

Members

(constant) NB :Object

Contains (and tries to protect) global functions which the message handler uses. Note that self is the global scope of the DedicatedWorker — and, unfortunately, of all boxes.
Type:
  • Object
Properties:
Name Type Description
eval function evaluates a code string in the global scope.
load function needs to be curried.
log function writes a message to the JavaScript console.
map function applies a function to an array.
postMessage function sends a (reply) message.
reduce function applies a function to an array and returns the last result.
String function converts to a string.
Source:

Methods

load(…idsopt)

Function to evaluate source code in file boxes.
Parameters:
Name Type Attributes Description
ids string <optional>
<repeatable>
name(s) of file boxes to load.
Source:
Throws:
error if any, terminates execution.
Type
string
Returns:
result of last evaluation if any, else undefined.

onmessage(_event)

Evaluates a code cell.
Parameters:
Name Type Description
_event Event contains an array with a code string and an optional hash of keys to code strings which can be loaded.
Source:

print(…valsopt)

Function to print one line.
Parameters:
Name Type Attributes Description
vals string <optional>
<repeatable>
string(s) to be printed joined by single blanks.
Source: