1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-04 01:59:38 +02:00

just to keep track of findings re classList

This commit is contained in:
gorhill 2015-04-26 01:02:35 -04:00
parent fa7106a23c
commit 513d79f5d9

View File

@ -618,6 +618,11 @@ var uBlockCollapser = (function() {
var i = nodes.length;
while ( i-- ) {
node = nodes[i];
// http://jsperf.com/enumerate-classes
// Chromium: classList a bit faster than manually enumerating
// class names.
// Firefox: classList quite slower than manually enumerating
// class names.
vv = node.classList;
if ( typeof vv !== 'object' ) { continue; }
j = vv.length || 0;