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
Parameter |
Type |
Description |
startBlock |
Block |
The block on which to start the search. |
orphanConnection |
Connection |
The connection that is looking for a home. |
Returns:
Connection | null
The suitable connection point on the chain of blocks, or null.
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 `getConnectionForOrphanedConnection` method searches for a compatible connection point for a given orphaned connection, starting from a specified block."],["It considers connection types and connection checks to ensure compatibility between the orphaned connection and potential connection points."],["This method returns the suitable connection if found, otherwise it returns null."]]],[]]