Skip to main content

Home > 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

ParameterTypeDescription
pointerdownListener(e: PointerEvent) => voidAn 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