Stay organized with collections
Save and categorize content based on your preferences.
blockly > Events > BlockBase > (constructor)
Events.BlockBase.(constructor)
Constructs a new instance of the BlockBase
class
Signature:
constructor(opt_block?: Block);
Parameters
Parameter |
Type |
Description |
opt_block |
Block |
(Optional) The block this event corresponds to. Undefined for a blank event. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["The `Events.BlockBase` class constructor creates a new instance of the `BlockBase` class, representing the base for all block-related events in Blockly."],["This constructor optionally takes a `Block` object as input, which specifies the block associated with the event, or remains undefined for a generic event."]]],["The `BlockBase` class constructor creates a new instance, optionally associating it with a specific block. The constructor, `constructor(opt_block?: Block)`, accepts one optional parameter, `opt_block`, of type `Block`. If provided, `opt_block` represents the block linked to this event; otherwise, it's considered a blank event. This allows for tracking actions related to particular block instances.\n"]]