blockly > Connection > getParentAndChildConnections
Connection.getParentAndChildConnections() method
Returns the parent connection (superior) and child connection (inferior) given this connection and the connection it is connected to.
Signature:
protected getParentAndChildConnections(): {
parentConnection?: Connection;
childConnection?: Connection;
};
Returns:
{ parentConnection?: Connection; childConnection?: Connection; }
The parent connection and child connection, given this connection and the connection it is connected to.
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 `getParentAndChildConnections()` method identifies and returns the parent and child connections relative to a given connection and its connected counterpart."],["It returns an object containing optional `parentConnection` and `childConnection` properties, which are instances of the `Connection` class."],["This method is designated as `protected`, suggesting its primary use is within the internal workings of Blockly rather than direct external usage."]]],["The `getParentAndChildConnections()` method identifies the parent and child connections within a linked pair. It returns an object containing two optional properties: `parentConnection` and `childConnection`, both of which are of the `Connection` type. This method determines the hierarchical relationship between two connected instances, indicating which is superior (parent) and which is inferior (child). It is a protected method and used internally within a class.\n"]]