Stay organized with collections
Save and categorize content based on your preferences.
blockly > inputs > Input > makeConnection
Constructs a connection based on the type of this input's source block. Properly handles constructing headless connections for headless blocks and rendered connections for rendered blocks.
Signature:
protected makeConnection(type: ConnectionType): Connection;
Parameters
Returns:
Connection
a connection of the given type, which is either a headless or rendered connection, based on the type of this input's source block.
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 `inputs.Input.makeConnection()` method creates a connection for a block input, determining whether it's headless or rendered based on the block's type."],["It takes a `ConnectionType` as a parameter to specify the type of connection to be created."],["The method returns a `Connection` object, representing either a headless or rendered connection, ready for block interactions."]]],[]]