Skip to content

chirashi.js 6.5.0 - 🚀🍣

Latest
Compare
Choose a tag to compare
@alextoudic alextoudic released this 12 Mar 15:19
· 1 commit to master since this release

This release brings some API changes, performances updates, a better documentation and a logo 🎉

CHANGES

forEach, forElements and forIn aren't going backward anymore so there is no more forceOrder arguments.

addClass, removeClass and hasClass takes multiple classes as arguments and not string anymore. For example addClass('.maki', 'salmon, cheese') is now addClass('.maki', 'salmon', 'cheese').

createElement can now append text with CSS-like syntax. The text should be between curly brackets, like this createElement('a.button[href="#"]{click here!}'). Also some bugs have been fixed.

empty added to remove each child from an element.

setStyleProp replaces setStyle.

getComputedStyle returns the element's computed style.

getStyleProp replaces getStyle.

getStyleProp, getProp, getAttr and getData now support multiple names arguments. When only one is passed they'll returns the value like before. But if multiple arguments are provided they'll returns an object with name and value pairs.

parents added to get every element's ancestors as array.

removeAttr and removeData now takes multiple attributes names as arguments and not string anymore.

delegate replaces bind.

delegate, once and on now returns function for unbinding and not an object containing this function anymore. They also can receive objects instead of callbacks to set options (capture, once or passive).

clearStyle also get multiple properties as arguments and not string anymore.

setCssVariable added to set CSS variables to elements allowing to use an object with camelCase variables' names.