946167-1.html (495B)
1 <!DOCTYPE html> 2 <html> 3 <body> 4 <script> 5 // Create a bunch of nested flex containers: 6 var parentNode = document.body; 7 var depth = 50; 8 for (var i = 0; i < depth; i++) { 9 var childNode = document.createElement("div"); 10 childNode.style.display = "flex"; 11 parentNode.appendChild(childNode); 12 parentNode = childNode; 13 } 14 15 // Add some text in the innermost child: 16 childNode.innerHTML = "Text"; 17 18 // Force reflow: 19 var height = document.body.children[0].offsetHeight; 20 </script>