Skip to content

docs: document calling JavaScript declared in Java - #6113

Draft
vaadin-bot wants to merge 1 commit into
mainfrom
doc-bot/vaadin-flow/25749-eea9f2f51cdae1fd
Draft

vaadin-bot wants to merge 1 commit into
mainfrom
doc-bot/vaadin-flow/25749-eea9f2f51cdae1fd

Conversation

@vaadin-bot

Copy link
Copy Markdown
Contributor

Documentation for vaadin/flow#25749 by @totally-not-ai[bot].

Note

The source pull request is merged, so this documentation describes the final
shape of the change. Please review it and mark it ready for review.

Change categories: NEW_FEATURE, BEHAVIOR_CHANGE

File Change
articles/flow/component-internals/element-api/calling-javascript.adoc Added a "Declaring JavaScript in Java" section documenting @JsDefinition, @JsExpression, and Element.executeJs(Class) — a way to run JavaScript that the build collects into the bundle instead of compiling an expression in the browser, so the call works under a content security policy without unsafe-eval. Cross-referenced this from the existing executeJs(String, Object...) section, which previously did not mention that limitation.

The other behavior changes in the source pull request (the UIDL wire format for executeJs, and Focusable.focus()/blur() now going through the new call path) are internal protocol/driver details that application code does not observe, so nothing was written for them.

Auto-generated by the Documentation Bot — review before merging.

Generated by Documentation Bot for #25749 · agent · 74.6 AIC · ⌖ 5.68 AIC · ⊞ 11.7K ·

  • expires on Oct 21, 2026, 6:54 PM UTC

Add a section to the Calling JavaScript page explaining @JsDefinition
and @JsExpression, and Element.executeJs(Class), which runs JavaScript
that the build collects into the bundle instead of compiling an
expression in the browser, so the call works under a content security
policy without unsafe-eval. Cross-reference it from the existing
executeJs(String, Object...) section, which had no mention of that
limitation.

Documents vaadin/flow#25749 (`39953e133526e0b268f7c24fd27bbc760bec34ea`).
@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

This PR has been deployed for preview.

URL: https://docs-preview-pr-6113.fly.dev

Changed pages

Added content is highlighted in green; removed content is marked in red on each page.

Built from a038b8a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant