Experimental / Exploration APIs on top of mvdom core.
- Those APIs might change a lot, and for external teams, it is recommended to copy/paste (i.e. Cherrypick) what is needed.
- We will try to keep the semver rules when breaking APIs, but no garantee.
- At this point, minimum documentation and unit testing at this point (beside the private applications we are building wit it)
Note: Some of those APIs might move to mvdom core at some point, and will be deprecated/removed for this module.
Convenient method for applying styling one or more html elements with a set of css properties. Uses
;;styleel,;styleels,; // works with array
Extract attribute values:
// extract single value;// extract array of value for a single el;// extract single attribute from multiple els;// extract and array of (values) for the array of els;
Set attribute values:
// set singloe valueattrel, 'name', 'username'; // can use el.setAttribute('name','username') as wellattrel, ;// set the same attribute to all of the elementattrels, ; // true will set empty attribute (i.e. same as '' as value)
Set one or more css value based on the key property.
// value == null or === false, the class name key is removed, otherwise it is added.cssel, ;// <.. class="prime sel"
dnd (Drag And Drop core API)
Enable a one or more HTMLElements (via on-demand CSS selector bindings) drag and drop logic.
Note: Compared to most if not all Drag and Drop JS Libraries, the css selector is on demand, meaning it is one binding on the container, and it is only when the drag trigger events get initiated that the selector is ran. This gives great flexibility and performance benefits (.e.g, O(1) binding vs O(n))