In my CSS I set the width of the html like this:
html {width: 1000px; }
I would like to be able to change this width dynamically with javascript similar to setting the style.width of an element. The window.document node doesn't have a style property and I can't find the width anywhere.
Where in the DOM is the 1000px stored and can I change it dynamically?
You can always get it like:
or:
or even:
So to get the CSS width, just do:
Docs: https://developer.mozilla.org/en-US/docs/Web/API/document.documentElement