Skip to content

Releases: bcinarli/uxr

0.7.0

13 Feb 09:00
Compare
Choose a tag to compare

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 to find. It finds children elements in a UXR object
    • not 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

05 Feb 22:19
Compare
Choose a tag to compare
0.6.0 Pre-release
Pre-release

New

  • Clone method introduced
    • clone method clones all the elements in a uxr 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 its innerText or innerHTML

Changes

  • Now append appends all elements in a uxr object. Previously only first element in a uxr object appending to target element
  • Now prepend prepends all elements in a uxr object. Previously only first element in a uxr object prepending to target element

Fixes

  • Some broken chaining in manipulation methods fixed.

0.5.0

04 Feb 14:56
Compare
Choose a tag to compare
0.5.0 Pre-release
Pre-release

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 and propertyName format. Always returns property names in propertyName 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. Supports selector based selection.
    • siblings method for getting all siblings of the element. Supports selector based selection.
    • children method for getting all children of the element. Supports selector based selection.

0.4.2

24 Jan 13:28
Compare
Choose a tag to compare
0.4.2 Pre-release
Pre-release

Changes

  • Fix: Broken chaining in CSS Class methods

0.4.1

24 Jan 10:46
Compare
Choose a tag to compare
0.4.1 Pre-release
Pre-release

Changes

  • Fix: Undefined uxr error fixed when using minified version.
  • Fix: Broken chaining fixed when using closest method
  • Fix: Missing returning of parent node when closest method called without selector.

0.4.0

23 Jan 23:38
Compare
Choose a tag to compare
0.4.0 Pre-release
Pre-release

New

  • Traversing methods introduced
    • closest method for finding the parents
    • next method for getting next sibling
    • prev method for getting previous sibling
    • first method for getting first element in a uxr object
    • last 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 using elementFromString 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

22 Jan 23:43
Compare
Choose a tag to compare
0.3.0 Pre-release
Pre-release

New

  • after method introduced for inserting element after selection
  • before method introduced for inserting element before selection
  • prepend method introduced for inserting element inside the selection at the end of its content
  • append 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

0.2.0

21 Jan 20:35
Compare
Choose a tag to compare
0.2.0 Pre-release
Pre-release

Changes

  • Wrapper methods added.
  • Documentation added.

0.1.0

12 Jan 09:58
Compare
Choose a tag to compare
0.1.0 Pre-release
Pre-release
0.1.0