qunit/phantom_screenshot.js
function excludeElements(exclude) {
      return Array.isArray(exclude) ? exclude.forEach(function(selector) {
        // Use querySelectorAll to hide all dom element with the specified selector
        var selectorAll = document.querySelectorAll(selector);

        if(selectorAll.length) {
          // Interate through NodeList
          for(var i = 0; i < selectorAll.length; i++) {
            selectorAll.item(i).style.visibility = 'hidden';
          }
        }
      }) : false;
    }
function excludeElements(exclude) {
      return Array.isArray(exclude) ? exclude.forEach(function(selector) {
        // Use querySelectorAll to hide all dom element with the specified selector
        var selectorAll = document.querySelectorAll(selector);

        if(selectorAll.length) {
          // Interate through NodeList
          for(var i = 0; i < selectorAll.length; i++) {
            selectorAll.item(i).style.visibility = 'hidden';
          }
        }
      }) : false;
    }
function excludeElements ( exclude ) { return Array . isArray ( exclude ) ? exclude . forEach ( function ( selector ) { // Use querySelectorAll to hide all dom element with the specified selector var selectorAll = document . querySelectorAll ( selector ) ; if ( selectorAll . length ) { // Interate through NodeList for ( var i = 0 ; i < selectorAll . length ; i ++ ) { selectorAll . item ( i ) . style . visibility = 'hidden' ; } } } ) : false ; }
Loop through the exlude array and
find the dom of the selector and hide it

@param  {Array} exclude - each item in the array should contain selector string
Loop through the exlude array and find the dom of the selector and hide it