Advertisement
Guest User

Untitled

a guest
May 27th, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. // Paste this into the browser’s JavaScript console
  2.  
  3. function walkTheDOM(node, func) {
  4. func(node);
  5. node = node.firstChild;
  6. while (node) {
  7. walkTheDOM(node, func);
  8. node = node.nextSibling;
  9. }
  10. }
  11.  
  12. walkTheDOM(document.body, function (node) {
  13. if (node.nodeType === 1) {
  14. var willChange = getComputedStyle(node).getPropertyValue('will-change');
  15. if (willChange !== 'auto') {
  16. console.log(`will-change: ${willChange} on element with dimensions: ${node.offsetWidth}x${node.offsetHeight}`);
  17. }
  18. }
  19. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement