Skip to main content

Home > blockly > Workspace > addChangeListener

Workspace.addChangeListener() method

When something in this workspace changes, call a function. Note that there may be a few recent events already on the stack. Thus the new change listener might be called with events that occurred a few milliseconds before the change listener was added.

Signature:

addChangeListener(func: (e: Abstract) => void): (e: Abstract) => void;

Parameters

ParameterTypeDescription
func(e: Abstract) => voidFunction to call.

Returns:

(e: Abstract) => void

Obsolete return value, ignore.