blockly > IIcon > initView

IIcon.initView() method

Creates the SVG elements for the icon that will live on the block.

Signature:

initView(pointerdownListener: (e: PointerEvent) => void): void;

Parameters

Parameter Type Description
pointerdownListener (e: PointerEvent) => void An event listener that must be attached to the root SVG element by the implementation of initView. Used by Blockly's gesture system to properly handle clicks and drags.

Returns:

void