Implemented paint worklets invoking worklet scripts.

This commit is contained in:
Alan Jeffrey 2017-06-05 13:49:27 -05:00
parent 9a13cf6bda
commit 3db4761767
20 changed files with 575 additions and 19 deletions

View file

@ -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.");