servo/components/servo
Narfinger 991be359a3
libservo: Allow embedders to execute JavaScript scripts via the API (#35720)
This change adds a new `WebView` API `evaluate_javascript()`, which
allows embedders to
execute JavaScript code and wait for a reply asynchronously. Ongoing
script execution is
tracked by a libservo `JavaScriptEvaluator` struct, which maps an id to
the callback passed
to the `evaluate_javascript()` method. The id is used to track the
script and its execution
through the other parts of Servo.

Testing: This changes includes `WebView` unit tests.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-05-13 12:54:18 +00:00
..
examples libservo: Expose a ServoBuilder (#36549) 2025-04-16 16:58:52 +00:00
tests libservo: Allow embedders to execute JavaScript scripts via the API (#35720) 2025-05-13 12:54:18 +00:00
build.rs Don't generate gstreamer data when dummy media backend enabled. (#35056) 2025-01-18 14:14:45 +00:00
Cargo.toml libservo: Add a basic WebView API test (#36791) 2025-05-02 16:06:26 +00:00
clipboard_delegate.rs libservo: Add a ClipboardDelegate and a default implementation (#35297) 2025-02-07 10:43:46 +00:00
javascript_evaluator.rs libservo: Allow embedders to execute JavaScript scripts via the API (#35720) 2025-05-13 12:54:18 +00:00
lib.rs libservo: Allow embedders to execute JavaScript scripts via the API (#35720) 2025-05-13 12:54:18 +00:00
proxies.rs constellation: Rename messages sent to the Constellation (#36341) 2025-04-04 19:39:38 +00:00
responders.rs libservo: Notify delegates of send errors in request objects (#35668) 2025-03-19 06:41:14 +00:00
servo_delegate.rs libservo: Move animation tracking from WindowMethods to delegates (#36400) 2025-04-09 19:41:53 +00:00
webview.rs libservo: Allow embedders to execute JavaScript scripts via the API (#35720) 2025-05-13 12:54:18 +00:00
webview_delegate.rs libservo: Move animation tracking from WindowMethods to delegates (#36400) 2025-04-09 19:41:53 +00:00