The renderer file from where I can pass value when rendering the template is not in our control.Only option we have is the client HTML page. So is there any way to access either DOM or local script variables in nunjucks template?
I simply wanted to achieve this
<div id="x">123</div>
{{% set x = ${'#x'} %}}
or using JS?
<script> window.localStorage.set('x', 123) </script>
{{% set x = window.localStorage.get('x') %}}