blob: e7f249278a54b5990aed719114d6fa64bb9a8c34 [file] [log] [blame]
<!DOCTYPE html>
<style>
#table { display: table; }
#table > div { display: table-row; }
#table > div > div { display: table-cell; }
</style>
<div id="table">
<div>
<div><img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAwJyBoZWlnaHQ9JzEwMCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJz48cmVjdCBmaWxsPSdncmVlbicgd2lkdGg9JzEwMCcgaGVpZ2h0PScxMDAnPjwvcmVjdD48L3N2Zz4="></div>
<div><img id="imagetoset"></img></div>
</div>
</div>
<script>
document.documentElement.offsetWidth;
document.querySelector('#imagetoset').src = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAwJyBoZWlnaHQ9JzEwMCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJz48cmVjdCBmaWxsPSdncmVlbicgd2lkdGg9JzEwMCcgaGVpZ2h0PScxMDAnPjwvcmVjdD48L3N2Zz4=';
</script>