Interface functions for PlutoBoard.jl - handles communication with Julia and cell management

Methods

(static) exports.callJuliaFunction(func_name, options) → {Promise.<any>}

Calls a Julia function via WebSocket and returns a Promise that resolves with the return value of the function. Callbacks can be provided to handle responses.
Parameters:
NameTypeDescription
func_namestring-
optionsObject-
Properties
NameTypeAttributesDefaultDescription
argsArray<optional>
[]-
kwargsObject<optional>
{}-
response_callbackfunction<optional>
() => {}-
internalboolean<optional>
false-
Returns:
Type: 
Promise.<any>

(static) exports.error(message) → {void}

Logs an error message to the console with a specific prefix.
Parameters:
NameTypeDescription
messagestring-
Returns:
Type: 
void

(static) exports.info(message) → {void}

Logs an informational message to the console with a specific prefix.
Parameters:
NameTypeDescription
messagestring-
Returns:
Type: 
void

(static) exports.placeAlliFrames() → {void}

Places all iFrames needed given the user's index.html file.
Returns:
Type: 
void

(static) exports.placeIframe(targetCellID, destinationDiv) → {void}

Places an iframe in a specific destination div and hides every cell except the one with the given targetCellID.
Parameters:
NameTypeDescription
targetCellIDstring-
destinationDivHTMLElement-
Returns:
Type: 
void

(static) exports.updateCell(cellID) → {Promise.<void>}

Updates cell in a Pluto notebook by its ID
Parameters:
NameTypeDescription
cellIDstring-
Returns:
Type: 
Promise.<void>

(static) exports.updateCellByReactiveVariableAttribute(rv) → {Promise.<void>}

Updates all cells containing a specific reactive variable in their `rv` attribute
Parameters:
NameTypeDescription
rvstring-
Returns:
Type: 
Promise.<void>

(static) exports.updateCellByVariable(varName) → {Promise.<void>}

Updates all cells that contain a specific variable. Must be the the actual variable. `variable` will not work if the cell contains `user_package.variable`.
Parameters:
NameTypeDescription
varNamestring-
Returns:
Type: 
Promise.<void>

(static) exports.updateCellsByID(cellIDs) → {Promise.<void>}

Updates multiple cells in a Pluto notebook by their IDs
Parameters:
NameTypeDescription
cellIDsArray.<string>-
Returns:
Type: 
Promise.<void>

(static) exports.updateCellsByReactiveVariable(rv) → {Promise.<void>}

Updates all cells containing a specific reactive variable in their innerHTML
Parameters:
NameTypeDescription
rvstring-
Returns:
Type: 
Promise.<void>

(static) exports.warn(message) → {void}

Logs a warning message to the console with a specific prefix.
Parameters:
NameTypeDescription
messagestring-
Returns:
Type: 
void

(static) setupWebsocket() → {WebSocket}

Sets up a WebSocket connection to PlutoBoard.jl
Returns:
Type: 
WebSocket

(static) waitForOpenConnection(socket) → {Promise.<void>}

Waits for the WebSocket connection to be open
Parameters:
NameTypeDescription
socketWebSocket-
Returns:
Type: 
Promise.<void>