I am wanting to pass a JS value to a Stash variable but the following didn't work. Is this possble?
<script>
var w = window.innerWidth;
var x = document.getElementById("demo");
x.innerHTML = w ;
</script>
{exp:stash:set name="foo" id="demo"}{/exp:stash:set}
{exp:stash:get name="foo"}