UNSAFE_DOCUMENT_WRITE: document.write in the component
| Severity | Fault | Stage |
|---|---|---|
| error | customer (the source package) | build output |
What it means
Section titled “What it means”The component calls document.write, document.writeln or document.open, which write into or replace the whole host page outside the component’s shadow root (rule document-write).
How to fix
Section titled “How to fix”Render inside the component with JSX; to print, open a window the component builds with DOM methods, never document.write.