All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- If the second argument of
d.data()
is an array of keys, returns an object with all {key: value} - If the second argument of
d.data()
is undefined, returns an object with all values
- Restore the second argument in
d.get()
andd.getAll()
to define a context - Added a polyfill to
:scope
selector
- Fixed
Element.prototype.closest
.
- Added a polyfill to
Element.prototype.closest
- Added a polyfill to
Element.prototype.replaceWith
- Added a polyfill to
NodeList.prototype.forEach
- Drop support for IE10
- Drop dist folder
- Removed
d.is()
and implemented a polyfill forElement.prototype.matches
instead. - Removed
d.remove()
and implemented a polyfill forElement.prototype.remove
instead. - Removed
d.append()
and implemented a polyfill forElement.prototype.append
instead. - Removed
d.prepend()
and implemented a polyfill forElement.prototype.prepend
instead. - Removed
d.insertBefore()
and implemented a polyfill forElement.prototype.before
instead. - Removed
d.insertAfter()
and implemented a polyfill forElement.prototype.after
instead. - Removed the ability to create instances to chain functions
d.getAll()
returns a NodeList, instead an arrayd.parse()
returns a documentFragment, instead an array
- Fixed custom events in IE
- The callback of
d.delegate()
includes a second argument with the target.
- Removed code for Opera 11.5 compatibility.
- Removed the functions
d.getData()
andd.setData()
.
- New function
d.data()
to set/get data - Added
.data()
to the prototype
- Fixed
d.delegate()
with custom events
- New functions
d.getData()
andd.setData()
.
- New function
d.siblings()
- Removed the second argument of
d.get
andd.getAll
(to select the context). Now you have to use a plain object. For example:d.get({'li': document})
. This allows to use context in other functions liked.on
,d.insertAfterTo
, etc...
- New function
d.delegate()
- Allow to attach multiple events at once
get
andgetAll
functions from OOP API
- ESLint code fixes
- Ability to use arrays for css values
- Added a second argument in
d.parse()
to return always an array
- Fixed error on manipulating not-found nodes
- Allow to use html code as the argument of
insertAfter
,insertBefore
,append
andprepend
(in addition to node elements), and changed the argument order - New methods
insertAfterTo
,insertBeforeTo
,appendTo
andprependTo
.
- Improved events
- Ability to create
d
instances. For example: - New functions:
insertAfter
,insertBefore
,append
,prepend
First stable version