work on firefox 3.6 (maybe)

This commit is contained in:
James Campos 2011-05-28 11:52:14 -07:00
parent 60e718bc9f
commit 98c6b7016e
2 changed files with 6 additions and 0 deletions

View File

@ -482,6 +482,9 @@
return _results;
};
}
if (!d.head) {
d.head = $('head', d);
}
$$ = function(selector, root) {
if (root == null) {
root = d.body;

View File

@ -334,6 +334,9 @@ if not Object.keys
Object.keys = (o) ->
key for key in o
# upgrade your firefox god damn it!
if not d.head then d.head = $('head', d)
$$ = (selector, root=d.body) ->
Array::slice.call root.querySelectorAll selector