https://stackblitz.com/edit/js-meta-viewport
In Chrome debugger I can see the meta tag updating when I click "can scale" but am unable to scale on mobile device (Nexus 5 (Chrome 70)).
Ultimate goal is to dynamically allow and disallow scaling in the same spa, on mobile.
Edit:
I have been successfully toggling the meta viewport tag from
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=10.0, minimum-scale=0.0, user-scalable=yes">
to
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
also variations not including minimum-scale
and back but this seems to have no effect or change in behavior specifically the ability for the user to "zoom" on my Nexus 5 (Chrome 70).
I have tried assigning viewportTag.content = content, calling viewportTag.setAttribute('content', content), and re-rendering document.head.removeChild() then document.head.appendChild(). again all successfully toggles the markup but has no behavior
assigning: https://stackblitz.com/edit/js-meta-viewport
setAttribute: https://stackblitz.com/edit/js-meta-viewport-answer (https://stackoverflow.com/a/53899867/6656422)
redraw: https://stackblitz.com/edit/js-meta-viewport-redraw
Update:
The solution here works https://stackblitz.com/edit/js-meta-viewport-answer (https://stackoverflow.com/a/53899867/6656422) but I don't understand why, its not setAttribute() because https://stackblitz.com/edit/js-meta-viewport-setattribute does not work