blockly > Events > BlockChange
Events.BlockChange class
Notifies listeners when some element of a block has changed (e.g. field values, comments, etc).
Signature:
export declare class BlockChange extends BlockBase
Extends: BlockBase
Constructors
Constructor | Modifiers | Description |
|---|---|---|
(constructor)(opt_block, opt_element, opt_name, opt_oldValue, opt_newValue) | Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
string | (Optional) The element that changed; one of 'field', 'comment', 'collapsed', 'disabled', 'inline', or 'mutation' | ||
string | (Optional) The name of the field that changed, if this is a change to a field. | ||
unknown | The new value of the element. | ||
unknown | The original value of the element. | ||
EventType |
Methods
Method | Modifiers | Description |
|---|---|---|
Does this event record any change of state? | ||
Run a change event. | ||
Set the language-neutral identifier for the reason why the block was or was not disabled. This is only valid for events where element is 'disabled'. Defaults to 'MANUALLY_DISABLED'. | ||
Encode the event as JSON. |