Skip to main content

Globals

Global variables that can be accessed using the developer console, for convenience.

These cannot be used from custom extensions.

vm

Refers to the scratch-vm instance.

ScratchBlocks

Refers to the real scratch-blocks (Blockly has very little stuff on it). Only available after opening the editor.

paper

Refers to the paper.js instance. Only available after opening the costume editor.

ReduxStore

Refers to the internal redux store used by scratch-gui.

Get state with ReduxStore.getState() and dispatch events with ReduxStore.dispatch({ type: "..." })