@@ -16,12 +16,10 @@ pub mod js {
1616 pub fn add_change_list_range(&self, _start: usize, _len: usize) {}
1717 pub fn init_events_trampoline(&self, _trampoline: &crate::EventsTrampoline) {}
1818 }
19−
20− pub fn eval_change_list() {}
2119 } else {
2220 use wasm_bindgen::prelude::*;
2321
24− #[wasm_bindgen]
22+ #[wasm_bindgen(module = "/js/change-list.js")]
2523 extern "C" {
2624 #[derive(Clone, Debug)]
2725 pub type ChangeList;
@@ -44,20 +42,6 @@ pub mod js {
4442 trampoline: &crate::EventsTrampoline,
4543 );
4644 }
47−
48− pub fn eval_change_list() {
49− use std::sync::Once;
50− // XXX: Because wasm-bindgen-test doesn't support third party JS
51− // dependencies, we can't use `wasm_bindgen(module = "...")` for our
52− // `ChangeList` JS import. Instead, this *should* be a local JS snippet,
53− // but that isn't implemented yet:
54− // https://github.com/rustwasm/rfcs/pull/6
55− static EVAL: Once = Once::new();
56− EVAL.call_once(|| {
57− js_sys::eval(include_str!("../js/change-list.js"))
58− .expect_throw("should eval change-list.js OK");
59− });
60− }
6145 }
6246 }
6347}
@@ -94,7 +78,6 @@ impl fmt::Debug for ChangeList {
9478
9579impl ChangeList {
9680 pub(crate) fn new(container: &crate::Element) -> ChangeList {
97− js::eval_change_list();
9881 let bump = Bump::new();
9982 let strings_cache = FxHashMap::default();
10083 let js = js::ChangeList::new(container);