blockly > Block > mixin

Block.mixin() method

Add key/values from mixinObj to this block object. By default, this method will check that the keys in mixinObj will not overwrite existing values in the block, including prototype values. This provides some insurance against mixin / extension incompatibilities with future block features. This check can be disabled by passing true as the second argument.

Signature:

mixin(mixinObj: any, opt_disableCheck?: boolean): void;

Parameters

Parameter Type Description
mixinObj any The key/values pairs to add to this block object.
opt_disableCheck boolean (Optional) Option flag to disable overwrite checks.

Returns:

void