Package com.vaadin.flow.js
Annotation Interface JsDefinition
Marks an interface whose methods declare the JavaScript they run with
JsExpression, to be called through Element.executeJs(Class).
The annotation is what makes the interface findable during the build: every
annotated interface is collected into the generated bundle as a function per
method, so the JavaScript an application can invoke from the server is known
before it runs and the client never has to build a function from a string.
That is what keeps a server-initiated call compatible with a content security
policy that does not allow unsafe-eval.
- Since:
- 25.4
- See Also: