Skip to content

UNSAFE_DOCUMENT_WRITE: document.write in the component

Severity Fault Stage
error customer (the source package) build output

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).

Render inside the component with JSX; to print, open a window the component builds with DOM methods, never document.write.