Ox.$: allow for passing nodelist as argument
This commit is contained in:
parent
c041263c79
commit
78c1b55d85
1 changed files with 1 additions and 0 deletions
|
@ -35,6 +35,7 @@ Ox.$ = Ox.element = function $(value) {
|
|||
|
||||
var elementData = {},
|
||||
elements = Ox.isArray(value) ? value // array of elements
|
||||
: Ox.isNodeList(value) ? Ox.slice(value) // nodelist
|
||||
: !Ox.isString(value) ? [value] // window, document or element
|
||||
: value[0] == '<' ? [document.createElement(value.slice(1, -1))]
|
||||
: Ox.slice(document.querySelectorAll(value)),
|
||||
|
|
Loading…
Reference in a new issue