Releases: bcinarli/uxr
Releases · bcinarli/uxr
0.7.0
New
-
Custom Event support
trigger
method now supports custom event creation- You can also send additional parameters as an object while triggering events.
-
New filtering methods introduced
has
is an alias tofind
. It finds children elements in a UXR objectnot
creates a subset of elements that are not matched the selector in a UXR object
Changes
- Some internal methods duplicate code removed
- Code clean-up and deduplication according to suggestions in CodeClimate
0.6.0
New
- Clone method introduced
clone
method clones all the elements in auxr
object- use
clone(true)
if the children of the node should also be cloned, else it clones only the nodes - By children, it means, if not used
true
, it only clones the node with out itsinnerText
orinnerHTML
Changes
- Now
append
appends all elements in auxr
object. Previously only first element in auxr
object appending to target element - Now
prepend
prepends all elements in auxr
object. Previously only first element in auxr
object prepending to target element
Fixes
- Some broken chaining in manipulation methods fixed.
0.5.0
New
- CSS method introduced
css
for getting or setting the style properties of an element/set of elements- supports an array of style names (e.g.
['property1', 'property2']
) to retrieve the values. Returns an object with{property1:value1, property2:value2}
style - supports setting new properties with an object like
{property1:value1, property2:value2}
- supports property names both in
property-name
andpropertyName
format. Always returns property names inpropertyName
format
- Dimension methods introduced
width
method returns the first element's width or sets the width in a set.- returns the only content width, no-borders, no-padding, no-margin
- returning value is unitless.
- sets the width as css property.
contentWidth
as alias method
innerWidth
method returns the first element's clientWidth- returns the content width with paddings included, no-borders, no-margin
- returning value is unitless.
clientWidth
as alias method
outerWidth
method returns the first element's offsetWidth- returns the content width with paddings and borders included, no-margin
- returning value is unitless.
- if called as
outerWidth(true)
, margins also included. offsetWidth
as alias method
height
method returns the first element's height or sets the heigth in a set.- returns the only content height, no-borders, no-padding, no-margin
- returning value is unitless.
- sets the height as css property.
contentHeight
as alias method
innerHeight
method returns the first element's clientHeight- returns the content height with paddings included, no-borders, no-margin
- returning value is unitless.
clientHeight
as alias method
outerHeight
method returns the first element's offsetHeight- returns the content height with paddings and borders included, no-margin
- returning value is unitless.
- if called as
outerHeight(true)
, margins also included. offsetHeight
as alias method
- Additions to traversing methods
parent
method for getting the immediate parent. Supportsselector
based selection.siblings
method for getting all siblings of the element. Supportsselector
based selection.children
method for getting all children of the element. Supportsselector
based selection.
0.4.2
0.4.1
0.4.0
New
- Traversing methods introduced
closest
method for finding the parentsnext
method for getting next siblingprev
method for getting previous siblingfirst
method for getting first element in a uxr objectlast
method for getting last element in a uxr object
replaceWith
method for swapping an element with a new one
Changes
- Regular expressions in
wrap
methods removed in favor of usingelementFromString
util function - Now every methods which are mutating the current uxr object, uses a generic
mutated
util function in order to increase reusability and standardization.
0.3.0
New
after
method introduced for inserting element after selectionbefore
method introduced for inserting element before selectionprepend
method introduced for inserting element inside the selection at the end of its contentappend
method introduced for inserting element inside the selection at the beginning of its content- Browser Support table added to documentation.
Changes
- Internal methods removed from .internal prototype. Only available privately for now.
- Unused and redundant
context
definition removed