Releases: bcinarli/uxr
Releases · bcinarli/uxr
0.7.0
New
-
Custom Event support
triggermethod now supports custom event creation- You can also send additional parameters as an object while triggering events.
-
New filtering methods introduced
hasis an alias tofind. It finds children elements in a UXR objectnotcreates 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
clonemethod clones all the elements in auxrobject- 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 itsinnerTextorinnerHTML
Changes
- Now
appendappends all elements in auxrobject. Previously only first element in auxrobject appending to target element - Now
prependprepends all elements in auxrobject. Previously only first element in auxrobject prepending to target element
Fixes
- Some broken chaining in manipulation methods fixed.
0.5.0
New
- CSS method introduced
cssfor 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-nameandpropertyNameformat. Always returns property names inpropertyNameformat
- Dimension methods introduced
widthmethod 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.
contentWidthas alias method
innerWidthmethod returns the first element's clientWidth- returns the content width with paddings included, no-borders, no-margin
- returning value is unitless.
clientWidthas alias method
outerWidthmethod 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. offsetWidthas alias method
heightmethod 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.
contentHeightas alias method
innerHeightmethod returns the first element's clientHeight- returns the content height with paddings included, no-borders, no-margin
- returning value is unitless.
clientHeightas alias method
outerHeightmethod 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. offsetHeightas alias method
- Additions to traversing methods
parentmethod for getting the immediate parent. Supportsselectorbased selection.siblingsmethod for getting all siblings of the element. Supportsselectorbased selection.childrenmethod for getting all children of the element. Supportsselectorbased selection.
0.4.2
0.4.1
0.4.0
New
- Traversing methods introduced
closestmethod for finding the parentsnextmethod for getting next siblingprevmethod for getting previous siblingfirstmethod for getting first element in a uxr objectlastmethod for getting last element in a uxr object
replaceWithmethod for swapping an element with a new one
Changes
- Regular expressions in
wrapmethods removed in favor of usingelementFromStringutil function - Now every methods which are mutating the current uxr object, uses a generic
mutatedutil function in order to increase reusability and standardization.
0.3.0
New
aftermethod introduced for inserting element after selectionbeforemethod introduced for inserting element before selectionprependmethod introduced for inserting element inside the selection at the end of its contentappendmethod 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
contextdefinition removed