In nuxt.config.js I have the following in the head:
options:
script: [
{innerHTML: "(function(h){h.className=h.className.replace(/| js /,' js ')})(document.documentElement)"},
],
__dangerouslyDisableSanitizers: ["script"],
This produces the desired result of making sure the class "js" is on <html>
on every page. However, when I navigate to another page I get the following error message:
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c659">#c659</a>)</em></sub></div>vue-meta.js:787 Uncaught DOMException: Failed to execute 'setAttribute' on 'Element': '0' is not a valid attribute name.