You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importCrittersfrom'critters';constcritters=newCritters({// optional configuration (see below)});consthtml=` <style> .red { color: red } .blue { color: blue } </style> <div class="blue">I'm Blue</div>`;constinlined=awaitcritters.process(html);console.log(inlined);// "<style>.blue{color:blue}</style><div class=\"blue\">I'm Blue</div>"
fails with this message:
file:///C:/Users/.../node_modules/critters/dist/critters.mjs:519
document.documentElement.setAttribute('data-critters-container', '');
^
TypeError: Cannot read properties of undefined (reading 'setAttribute')
at createDocument (file:///C:/Users/.../node_modules/critters/dist/critters.mjs:519:30)
at Critters.process (file:///C:/Users/.../node_modules/critters/dist/critters.mjs:1123:22)
at file:///C:/Users/.../test.js:15:32
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:120:12)
Device: Windows 11, Node.js version 21.6.0
The text was updated successfully, but these errors were encountered:
The Example in readme:
fails with this message:
Device: Windows 11, Node.js version 21.6.0
The text was updated successfully, but these errors were encountered: