Skip to content

Commit

Permalink
New build
Browse files Browse the repository at this point in the history
  • Loading branch information
erikroyall committed Aug 8, 2013
1 parent debd10c commit 4f7ee53
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions build/hilo-dev.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Hilo - 0.1.0-pre-dev-beta-8 - 2013-08-07
* Project started before 1 month and 7 days
* Hilo - 0.1.0-pre-dev-beta-8 - 2013-08-08
* Project started before 1 month and 8 days
* http://erikroyall.github.com/hilo/
* Copyright (c) 2013 Erik Royall
* Licensed under MIT (see LICENSE-MIT)
Expand Down Expand Up @@ -2825,15 +2825,15 @@
/*
* Select elements
*
* !selector - Selector {String}
* selector - Selector {String}
* root - Root element {String|HTMLElement}
*
* This function can be used throughout the code
* to select elements
*/

select = feature.qsa3 ? function (selector, root) {
// Set root to root or document
// Set root to given root or document
root = root || doc;

return root.querySelectorAll(selector);
Expand All @@ -2847,19 +2847,26 @@

hilo = function (input, root, en) {
if (typeof input === "undefined") {
// It's better than not returning anything
return win.Hilo;
} else if (typeof input === "string") {
if (input.trim() === "") {
// Can't pass empty string to querySelectorAll()
return new Dom({length:0});
}

// Most common, return based on selector
return new Dom(select(input, root, en), input);
} else if (typeof input === "function") { // Function
} else if (typeof input === "function") {
if (document.readyState === "complete") {
input();
} else {
callbacks.push(input);
}

// Allows to immediately start executing more code
// It's better than not returning anything!
return win.Hilo;
} else if (input.length) { // DOM Node List | Hilo DOM Object
return new Dom(input);
} else { // DOM Node
Expand Down

0 comments on commit 4f7ee53

Please sign in to comment.