aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo/javascript_evaluator.rs
Commit message (Collapse)AuthorAgeFilesLines
* libservo: Allow embedders to execute JavaScript scripts via the API (#35720)Narfinger29 hours1-0/+65
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>