wip: ricraf polyfill

This commit is contained in:
Jonathan Kelley committed 2021-08-24 16:36:00 -04:00
1 parent 8b0d04ce58
commit 59219b9ef2
4 files changed
+34 -1727

No files matched your search

+5
View File
@@ -29,6 +29,11 @@ impl RafLoop {
let ric_closure: Closure<dyn Fn(JsValue)> =
Closure::wrap(Box::new(move |v: JsValue| ric_sender.try_send(()).unwrap()));
// execute the polyfill for safari
Function::new_no_args(include_str!("./ricpolyfill.js"))
.call0(&JsValue::NULL)
.unwrap();
Self {
window: web_sys::window().unwrap(),
raf_receiver,