Skip to content

Dabby.js v0.9.16

Latest
Compare
Choose a tag to compare
@hexydec hexydec released this 24 Dec 19:30

This is a maintenance release to bring the release branch up to date with the changes in the master branch:

  • Fixed bug in $.fn.remove() where if a node was not attached to a parent, an error was produced
  • Updated $.fn.remove() to support removing the attached events from the removed nodes
  • Added new properties to getprop.js, also compressed how properties where only the case is different
  • Fixed issue in $.fn.off() where it had trouble comparing the callback function, it now uses toString() to compare the code as a string
  • Removed code in $.fn.off() that checks if the event list is an array as it is an array when created. Made code shorter
  • Used spread operator instead of Object.assign() or Array.from() where possible
  • Fixed bug in $.fn.off() where removals were missed as it removes items from the list of events you are looping though, which causes the index to change, and the array to be offset by one for every item you remove. It now works on a copy of the array and tracks the offset
  • Fixed issue in width-height.js where the current value callback was called on the native object rather than the dabby object and method
  • Fixed incorrect syntax in README.md
  • Fixed issue in $.fn.trigger() where it didn't attach the extra parameters to the event in the best way
  • Updated $.fn.on() to receive the extra parameters correctly and fixed bug where it was not passed to the event handler correctly, it now spreads the data as separate parameters
  • Updated the documentation to note that it doesn't support objects as extra parameters as jQuery does as it is not clear how this is supposed to work.
  • Replaced all references to core/core.js with core/dabby/dabby.js as the core file is no longer needed
  • Updated $.ajax() to use Object.assign() instead of the spread operator as some older versions of iOS don't support spreading objects
  • Fixed bug in $.fn.on() where the data from the event was picked up with the wrong variable name
  • Fixed issue in $.fn.on() where delegated items were not triggered by their child objects, e.g. if an image was clicked, but the deleted object was an anchor that wrapped it, the anchor would not be triggered. It now considers its parents when seeing if the target element was triggered
  • Fixed issue in $.fn.on() where the trigger arguments were not enforced to be an array, which caused it to crash when the value was spread to the callback
  • Fixed issue in $.fn.map() where in jQuery, a jQuery object can contain an array, as well as a set of nodes, whereas in Dabby it can only be nodes. Therefore this method, whilst it should return a Dabby object, but was just returning an array. It must also restrict the result of the callback to just being either nodes or another Dabby object, which are now all merged together into the output
  • Fixed issue in delegated events where the delegated target was not filtered correctly if a child element was clicked
  • Removed console.log() calls from tests
  • Updated dependencies
  • Added tests