We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f0d78c commit 5127e93Copy full SHA for 5127e93
src/ResizeSensor.js
@@ -125,8 +125,11 @@
125
addEvent(expand, 'scroll', onScroll);
126
addEvent(shrink, 'scroll', onScroll);
127
}
128
-
129
- if ("[object Array]" === Object.prototype.toString.call(element)
+
+ var elementType = Object.prototype.toString.call(element);
130
+ if ('[object Array]' === elementType
131
+ || ('[object NodeList]' === elementTyle)
132
+ || ('[object HTMLCollection]' === elementTyle)
133
|| ('undefined' !== typeof jQuery && element instanceof jQuery) //jquery
134
|| ('undefined' !== typeof Elements && element instanceof Elements) //mootools
135
) {
@@ -151,4 +154,4 @@
151
154
152
155
};
153
156
-})();
157
+})();
0 commit comments