Skip to content

Commit

Permalink
Merge branch 'dm_fix_ff'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ianfeather committed Aug 11, 2013
2 parents 2dabbea + b0efb99 commit 49c9a5e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/$.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ $$ = (function (document, window, $$) {
// Node covers all elements, but also the document objects
var node = Node.prototype,
nodeList = NodeList.prototype,
htmlCollection = HTMLCollection.prototype,
forEach = 'forEach',
trigger = 'trigger',
each = [][forEach],
cookies = {},
// note: createElement requires a string in Firefox
dummy = document.createElement('i');

nodeList[forEach] = each;
nodeList[forEach] = htmlCollection[forEach] = each;

// we have to explicitly add a window.on as it's not included
// in the Node object.
Expand All @@ -21,7 +22,7 @@ $$ = (function (document, window, $$) {
return this;
};

nodeList.on = function (event, fn) {
nodeList.on = htmlCollection.on = function (event, fn) {
this[forEach](function (el) {
el.on(event, fn);
});
Expand Down

0 comments on commit 49c9a5e

Please sign in to comment.