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.