HexagonJS
Selection Changelog
2.7.1
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
2.7.0
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
2.5.3
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
2.5.2
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
2.5.1
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
2.5.0
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
2.4.0
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
2.3.1
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
2.3.0
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
2.2.0
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
2.1.0
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
2.0.3
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
2.0.2
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
2.0.1
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
2.0.0
Selection
apiAny
Added
A method for and getting an API object from a DOM node.
All hexagon components register an API, the first un-named API to be registered can be retrieved with this method.
Selection
apiAny
Added
A method for and getting an API object from a DOM node under a given name
All hexagon components register an API, the first un-named API to be registered can be retrieved with this method.
Selection
apiSelection
Added
A method for and setting an API object from a DOM node.
All hexagon components register an API, the first un-named API to be registered can be retrieved with this method.
Selection
apiSelection
Added
A method for and setting an API object from a DOM node under a given name
All hexagon components register an API, the first un-named API to be registered can be retrieved with this method.
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
1.20.0
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
1.19.0
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
1.18.1
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
1.17.1
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
1.17.0
Selection
htmlSelection
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
Selection
html
Deprecated
#375
The html method for selections has been removed to prevent XSS attacks.
1.12.0
Selection
setSelection
Added
Add a new method for setting the children of a Selection
Selection
replaceSelection
Added
Added a new method for replacing some DOM with different DOM.
1.11.0
Selection
Updated
#376
Removed warning when calling hx.select on a Selection.
1.10.0
Selection
Bugfix
Resolved a bug with shallowSelect when calling it on nodes without children.
1.3.0
Selection
shallowSelectSelection
Added
#104
Added a new method on selection for selecting the first element from the direct children of an element.
Selection
shallowSelectAllSelection
Added
#104
Added a new method on selection for selecting elements from the direct children of an element.
1.0.0
Updated
Appending undefined to a selection no longer adds an <undefined> element to the DOM
Selection
mapAny / Array[Any]
Removed
The function called for each node will now be passed a Selection instead of an Element The current behavior can be replicated using Selection.nodes.map
Selection
mapAny / Array[Any]
Added
Calls a function for each element in the selection. Returns an array of the results of calling f on the elements. If used on a single selection the result will not be wrapped in an array.
0.15.2
Selection
Updated
Added the ability to attach an array of selections to a selection using the add, append, prepend, insertBefore and insertAfter methods.
Selection
Updated
Added the ability to check for multiple classes at once, e.g. selection.classed('a b')
0.14.1
Bugfix
Fixed an issue in Safari when using hx.select(window).on(...)
0.14.0
Selection
eachSelection
Removed
The each method for selections has been replaced to use a method that provides a selection as the argument to the f function. Use Selection.forEach(f) instead.
0.13.0
Selection
eachSelection
Deprecated
The each method for selections has been replaced to use a method that provides a selection as the argument to the f function Use Selection.forEach(f) instead.
0.12.10
Selection
eachSelection
Deprecated
The each method for selections has been replaced to use a method that provides a selection as the argument to the f function Use Selection.forEach(f) instead.
0.12.9
Selection
eachSelection
Deprecated
The each method for selections has been replaced to use a method that provides a selection as the argument to the f function Use Selection.forEach(f) instead.
0.12.8
Selection
eachSelection
Deprecated
The each method for selections has been replaced to use a method that provides a selection as the argument to the f function Use Selection.forEach(f) instead.
0.12.7
Selection
Updated
Selection now handles namespaced attributes (which are most prevalent in svg). eg
text.attr('xlink:href', '#curvePath')
Updated
Selection now handles removal of styles with undefined (so that it works in the same was as selection.attr). eg
text.style('color', undefined)
Selection
eachSelection
Deprecated
The each method for selections has been replaced to use a method that provides a selection as the argument to the f function Use Selection.forEach(f) instead.
0.12.6
Selection
eachSelection
Deprecated
The each method for selections has been replaced to use a method that provides a selection as the argument to the f function Use Selection.forEach(f) instead.
Selection
forEachSelection
Added
Added a new function that uses selections instead of nodes when iterating over the nodes to make it easier to set properties for elements in a selection.
0.11.0
Selection
classedSelection
Updated
Selection.classed now supports adding and removing lists of space separated classes
0.10.0
Selection
offSelection
Removed
Use selection.off([name], [namespace], [handler]) instead
Selection
containsBoolean
Added
Checks if an element is contained by the current selection
Selection
addSelection
Added
Appends an element to all elements currently selected and returns the original Selection. Use 'div' to append a <div> element for example.
Selection
clearSelection
Added
Removes all child elements from the selected node(s)
Selection
onSelection
Added
Register a callback that will be called whenever an event is emitted under the given name
Provided by extending the EventEmitter
function handler (event) {
  // do something
}
hx.select('#button').on('click', handler)
hx.select('#button').on('click', 'my-namespace', handler)
Selection
offSelection
Added
Deregisters a callback for an event type.
Provided by extending the EventEmitter

hx.select('#button').off('click')
hx.select('#button').off('click', 'my-namespace')
hx.select('#button').off('click', handler)
hx.select('#button').off('click', 'my-namespace', handler)
0.9.0
Selection
prependSelection
Added
Inserts an element at the start of all elements currently selected and returns a new Selection containing the new elements. Use 'div' to append a <div> element for example.
Selection
insertBeforeSelection
Added
Inserts an element before each node in the current selection. The inserted element will be at the same level in the dom tree as the selected element(s).
Selection
insertAfterSelection
Added
Inserts an element after each node in the current selection. The inserted element will be at the same level in the dom tree as the selected element(s).
Selection
attrSelection
Updated
Passing in undefined as the value will now remve the attribute from the element.
Selection
pointerDownSelection
Removed
Use selection.on("pointerdown", function(){}) instead.
Selection
pointerMoveSelection
Removed
Use selection.on("pointermove", function(){}) instead.
Selection
pointerUpSelection
Removed
Use selection.on("pointerup", function(){}) instead.
Selection
pointerLeaveSelection
Removed
Use selection.on("pointerleave", function(){}) instead.
Selection
clickSelection
Removed
Use selection.on("click", function(){}) instead.
Selection
transitionSelection
Removed
Use selection.animate or selection.morph instead.
Selection
durationSelection
Removed
Use selection.animate or selection.morph instead.
Selection
delaySelection
Removed
Use selection.animate or selection.morph instead.
Selection
easeSelection
Removed
Use selection.animate or selection.morph instead.