Private #m_Protected m_Protected _disposeProtected _setadd a new child to the component content
emit an event you can stop propagation of event or prevent default
Optional event: CEventMap[K]event data
compute the element style
Optional pseudoElt: stringall styles computed
stop listening to an event
callback to remove (must be the same as in on )
listen for an event
callback to call
handle an event one time
callback to call when event is signaled
Promise if callback is null
take care with that because if the event is never fired and you await it, the system may overflow
remove the previous default handler installed for an event
event name
callback handler to remove (must be the same as in setDefaultHandler)
change the component content
new content or null
set the event default handler
name of the event
callback to call when the event is not handled (and preventDeault has not been called)
append a new dom event handler
this.setDomEvent( 'drag drop', this._handleDrag, this );
this.setDomEvent( 'dblclick', this._handleDblClick, this );
Optional passive: booleansignal en event signaled event are notification : no way to prevent default not stop propagation
event data
Static getStatic getget a component from a DOM element move up to the hierarchy to find the request class type.
with a DOM like that:
Button
Label
Icon <- the DOM you have (dom-icon)
let btn = Component.getElement( dom-icon, Button );
Optional classname: string | Constructor<T>Static getStatic Protected releaseStatic Protected setcapture mouse events
Component.setCapture( this, ( ev: MouseEvent, initiator: Component ) => {
if( ev.type=='mousemove' ) {
this.setStyle( {
left: ev.clientX,
top: ev.clientY
} );
}
else if( ev.type=='mouseup' ) {
Component.releaseCapture( );
}
} );
Generated using TypeDoc
return the DOM associated with the Component (if any)