-
Notifications
You must be signed in to change notification settings - Fork 214
Overridable methods
You can implement certain methods on your objects and components that will be called. This is a list of them until we have more JSDoc documentation.
Constructor called after the object is created
Called before the first draw of the component. This is where you should add any event listeners on your DOM elements, except for touch or mouse event listeners (see prepareForActivationEvents).
Called the first time a touch event or mouse event is received on one of your child elements. This is where you should listen for any events that occur after user interaction.
Called before the draw
of the component. This is where you should read any values from the DOM (for example the styles of you element or child elements). See draw
.
This is the only place that your component should modify the DOM. By putting DOM reads in willDraw
and DOM writes in draw
all the reads and all the writes are batched together, which reduces the number of browser repaints and increases the fluidity of your app.
Called after the draw
of the component. This is where you should read any values from the DOM (for example the styles of you element or child elements). See draw
.
Called before the domContent
of the component is changed.
Called after the domContent
of the component is changed.
Called before a child component's willPrepareForDraw
.