1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 11:22:38 +01: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; var i = nodes.length;
while ( i-- ) { while ( i-- ) {
node = nodes[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; vv = node.classList;
if ( typeof vv !== 'object' ) { continue; } if ( typeof vv !== 'object' ) { continue; }
j = vv.length || 0; j = vv.length || 0;