blockly > Input > makeConnection

Input.makeConnection() method

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

Parameter Type Description
type ConnectionType

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.