# UNSAFE_INLINE_HANDLER: Event handler from a string

> Event handler from a string

> Esta página ainda não tem tradução para o português; este é o texto em inglês. (This page is not translated yet: the English text follows.)

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

## What it means

The component sets an inline event handler from a string (setAttribute("onclick", …), el.onclick = "…" or an SVG &lt;set attributeName="onclick">), a javascript: URL or a data: HTML document in href, src or action, an xlink:href built at run time, or opens a javascript: URL with window.open (the window it opens is same-origin with the page), which the browser runs as code, an eval in disguise (rule inline-handler).

## How to fix

Pass a function: onClick={() => …} in JSX, or addEventListener("click", handler).
