UNSAFE_TOP_NAVIGATION: Component navigates the top window
| Severity | Fault | Stage |
|---|---|---|
| error | customer (the source package) | build output |
What it means
Section titled “What it means”The component reaches the location of window.top, window.parent or window.opener, so it can send the visitor away from the host site, or out of the frame that holds it, to another page, or keeps the window window.open returns as a value (features such as noopener never excuse it), which is same-origin with the page and runs what is written to it with the page’s cookies (rule top-navigation).
How to fix
Section titled “How to fix”Use a link the visitor clicks (<a href> with target=“_blank” and rel=“noopener”) instead of navigating another window.