8.7 released—WinterCG Compliance Part 1
Learn more
Placeholder
Represents a Placeholder, which is used to add a native view to the visual tree.

Summary

Constructors

constructor

Properties

creatingViewEvent
154 properties inherited from View
Click to expand

Methods

on
111 methods inherited from View
Click to expand

Constructors

constructor

new Placeholder(): Placeholder

Properties

creatingViewEvent

Static
creatingViewEvent: string
String value used when hooking to creatingView event.

Methods

on

on(eventNames: string, callback: (args: EventData) => void, thisArg?: any): void
A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
Parameter Default Description
eventNames
string

String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by `,` (e.g. "propertyChange", "change").

callback
(args: EventData) => void

Callback function which will be executed when event is raised.

thisArg
any

An optional parameter which will be used as `this` context for callback execution.

Returns void
on(event: "creatingView", callback: (args: CreateViewEventData) => void, thisArg?: any): void
Raised when a creatingView event occurs.
Parameter Default Description
event
"creatingView"

callback
(args: CreateViewEventData) => void

thisArg
any

Returns void