blockly > Block > getInput
Fetches the named input object.
Signature:
getInput(name: string): Input | null;
Parameters
Parameter |
Type |
Description |
name |
string |
The name of the input. |
Returns:
Input | null
The input object, or null if input does not exist.
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.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `Block.getInput()` method retrieves a specific input object from a block using its name."],["It accepts the input name as a string parameter and returns the corresponding Input object if found, otherwise null."],["Developers can use this method to access and manipulate individual inputs within a block for customization and interaction."]]],["The `Block.getInput()` method retrieves a specific input object from a block. It accepts a string `name` parameter, which identifies the desired input. The method then returns either the corresponding `Input` object or `null` if no input with the given name exists within the block. This allows you to access and manipulate individual inputs associated with the Block.\n"]]