mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Implemented paint worklets invoking worklet scripts.
This commit is contained in:
parent
9a13cf6bda
commit
3db4761767
20 changed files with 575 additions and 19 deletions
|
@ -13,6 +13,7 @@ use dom::testworkletglobalscope::TestWorkletTask;
|
|||
use dom_struct::dom_struct;
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use js::jsapi::JSContext;
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::rust::Runtime;
|
||||
use microtask::Microtask;
|
||||
|
@ -61,6 +62,11 @@ impl WorkletGlobalScope {
|
|||
}
|
||||
}
|
||||
|
||||
/// Get the JS context.
|
||||
pub fn get_cx(&self) -> *mut JSContext {
|
||||
self.globalscope.get_cx()
|
||||
}
|
||||
|
||||
/// Evaluate a JS script in this global.
|
||||
pub fn evaluate_js(&self, script: &str) -> bool {
|
||||
debug!("Evaluating JS.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue