News for hackers. Stuff that matters.
Re:“Implement text editor DOM updates manually instead of vi... by PSeitz on Friday February 27, 2015 @04:01AM (#9117895)
That killed my facebook tab
Re:“Implement text editor DOM updates manually instead of vi... by runeks on Friday February 27, 2015 @08:26AM (#9118672)

    function() { Array.prototype.slice.call(document.querySelectorAll('[data-reactid]')).forEach(function(element) { element.style.background = 'rgba(255,0,0,0.1)'; }) }
is executed every 500 ms using command in question. So if the above function takes 500 ms or more to execute, the tab will get stuck (I would think).

Try just executing this command once:

    Array.prototype.slice.call(document.querySelectorAll('[data-reactid]')).forEach(function(element) { element.style.background = 'rgba(255,0,0,0.1)'; })
Re:“Implement text editor DOM updates manually instead of vi... by dcherman on Friday February 27, 2015 @02:58PM (#9120951)
Instead of using a timer or a one time selector, just add a new CSS rule via a style tag

(function() { var style = document.createElement( "style" );

   style.innerHTML = "[data-reactid] { background: rgba(255,0,0,0.1); }";
   document.head.appendChild( style );
}());
Re:“Implement text editor DOM updates manually instead of vi... by PSeitz on Friday February 27, 2015 @09:29AM (#9118968)
Yes, the attribute selector could be slow and/or the non-opaque drawing, I guess.