Stay organized with collections
Save and categorize content based on your preferences.
blockly > Connection > reconnect
Connection.reconnect() method
Reconnects this connection to the input with the given name on the given block. If there is already a connection connected to that input, that connection is disconnected.
Signature:
reconnect(block: Block, inputName: string): boolean;
Parameters
Parameter |
Type |
Description |
block |
Block |
The block to connect this connection to. |
inputName |
string |
The name of the input to connect this connection to. |
Returns:
boolean
True if this connection was able to connect, false otherwise.
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 `reconnect()` method attempts to connect this connection to a specified input on a given block."],["If the target input is already occupied, the existing connection is disconnected before the new connection is established."],["The method returns `true` if the connection was successful, and `false` otherwise."]]],[]]