onEvent, onStateChange, declareJob, element
4 main changes are provided by this merge request.
- deprecate getElement method. Access the DOM with the .element property directly
- add onEvent service. It simplify the DOM event handler, by no manually writing loopEventListener. The event target will be the gadget event.
- add declareJob, which are method with a deferred execution, triggered when the gadget is inside the DOM
- add a gadget state property. It can be initialized with the setState class method. Gadget state must be modified with the changeState method, which can trigger an onStateChange callback if a modification has been detected
The changes were merged into master.
When can we use this stuff ? :)
I was expecting for somebody to review and find issues before merging.
Unmarked this merge request as a Work In ProgressToggle commit list
Status changed to mergedToggle commit list