Skip to main content

Home > blockly > Connection > getConnectionForOrphanedConnection

Connection.getConnectionForOrphanedConnection() method

Returns the connection (starting at the startBlock) which will accept the given connection. This includes compatible connection types and connection checks.

Signature:

static getConnectionForOrphanedConnection(startBlock: Block, orphanConnection: Connection): Connection | null;

Parameters

ParameterTypeDescription
startBlockBlockThe block on which to start the search.
orphanConnectionConnectionThe connection that is looking for a home.

Returns:

Connection | null

The suitable connection point on the chain of blocks, or null.