Skip to content

Commit

Permalink
web: Ensure we set ourselves as the FSCommand provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinnerbone committed Jul 26, 2023
1 parent 0a21a60 commit 35234dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ extern "C" {
fn is_virtual_keyboard_focused(this: &JavascriptPlayer) -> bool;
}

#[derive(Clone)]
struct JavascriptInterface {
js_player: JavascriptPlayer,
}
Expand Down Expand Up @@ -558,8 +559,10 @@ impl Ruffle {

// Create the external interface.
if allow_script_access && allow_networking == NetworkingAccessMode::All {
let interface = Box::new(JavascriptInterface::new(js_player.clone()));
builder = builder
.with_external_interface(Box::new(JavascriptInterface::new(js_player.clone())));
.with_external_interface(interface.clone())
.with_fs_commands(interface);
}

let trace_observer = Rc::new(RefCell::new(JsValue::UNDEFINED));
Expand Down

0 comments on commit 35234dc

Please sign in to comment.