1555757-2.html (565B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <style> 5 #testElem { 6 border: 1px solid black; 7 background: yellow; 8 contain: layout size; 9 width: 300px; 10 } 11 </style> 12 <script> 13 function go() { 14 /* trigger an incremental reflow. 15 * Note: elem.style is undefined for MathML elements, so we have 16 * to use setAttribute(). 17 */ 18 testElem.setAttribute("style", "width:150px"); 19 } 20 </script> 21 </head> 22 <body onload="go()"> 23 <math> 24 <mtable id="testElem">Change my size</mtable> 25 </math> 26 </body> 27 </html>