This release fixes a number of bugs, improves code optimisation, and adds some documentation:
- Updated
$.fn.attr()
to use a switch statement - Optimised code in
$()
to do less work when no context is specified - The functions for
$.isPlainObject()
,$.isWindow()
,$.isPLainObject()
, and$.parseHTML()
are now stored as standalone methods the internal folder, this is because they are used bydabby.js
and did cause circular references - Rewired all usage of the above functions to use the internal methods
- Updated
dabby.js
to only filter nodes by type in a single place and to check items are nodes by using instanceof instead of checking for thenodeType
property - Fixed issue with how context is handled in
dabby.js
, it was handled manually and if there were no nodes it would be ignored. It is now parsed as a dabby object, and if thecontext
is empty, this will now result in an empty dabby object being returned - Fixed issue in
dabby.js
where if you passed a dabby object as theselector
, it would just return that object, whereas it should copy the nodes to a new object - Simplified the
proxy
object to not allow numeric or thelength
property to be always writeable. - The
length
property is now read only as it is only written when a dabby object is created. - Removed
$.each()
and$.fn.each()
from core.js as it is not used - Added dependencies to
$.each()
and$.fn.each(
) now it is not included in core - Fixed bug in
$.fn.wrapall()
where isfunction.js wasn't imported correctly - Fixed bug in
$.fn.extend()
where the method was a arrow function so don't have a scope. - Updated
class.js
to useslice()
instead ofsubstr()
as it requires less code and is not deprecated - Optimised loops in
$.fn.off()
- Fixed issue in
camelise()
where it shouldn't change the case of CSS variables - Updated code to use
includes()
instead ofindexOf()
where possible - Updated files that contain multiple methods to use the index to determine the method instead of string checks
- Fixed bug in
$.fn.prop()
where the current value in the callback may not have the correct prop name - Fixed bug in
$.fn.val()
and$.fn.offset()
where the current value was called on a node rather than a dabby object $.fn.offsetParent()
now creates an empty dabby object if there are no nodes in the collection, whereas previously it passednull
- Optimised
$.fn.scrollTop()
/$.fn.scrollLeft()
to remove special code for thewindow
object, as it is not needed - Fixed bug in
getProp()
where the input property might not be lowercased - Improved
isFunction()
- Fixed bug in
isWindow()
where a check fornull
shouldn't be strict to coverundefined
- Updated Node type constants to use numbers
- Fixed bug in
$.each()
where it should have iterated over objects with alength
parameter as if it was an array - Various code improvements/optimisations
- Updated build minifier to use Terser instead of Babel minify and uglify.
- Updated
README.md
to show correct start file and how to use attributes when creating elements - Updated package
qunitjs
to bequnit
as its name has changed - Updated tests to include the new qunit
- Added tests for bugs
- Added new documentation
- Pruned and Updated dependencies
- Fixed issues with the benchmark suite
- Bumped version to 0.9.15