Stay organized with collections Save and categorize content based on your preferences.

blockly > Input

Input class

Class for an input with an optional field.


export declare class Input 


Constructor Modifiers Description
(constructor)(type, name, block, connection) Constructs a new instance of the Input class


Property Modifiers Type Description
align Input.Align Alignment of input's fields (left, right or centre).
connection Connection | null
fieldRow Field[]
name string
type number


Method Modifiers Description
appendField(field, opt_name) Add a field (or label from string), and all prefix and suffix fields, to the end of the input's field row.
dispose() Sever all links to this input.
getShadowDom() Returns the XML representation of the connection's shadow block.
getSourceBlock() Get the source block for this input.
init() Initialize the fields on this input.
insertFieldAt(index, field, opt_name) Inserts a field (or label from string), and all prefix and suffix fields, at the location of the input's field row.
isVisible() Gets whether this input is visible or not.
removeField(name, opt_quiet) Remove a field from this input.
setAlign(align) Change the alignment of the connection's field(s).
setCheck(check) Change a connection's compatibility.
setShadowDom(shadow) Changes the connection's shadow block.