feat: pake can use external scripts

This commit is contained in:
jeasonnow
2023-06-08 16:48:19 +08:00
parent 8ce401735f
commit 9acca818fd
11 changed files with 99 additions and 21 deletions

View File

@@ -26,10 +26,8 @@ pub fn get_window(app: &mut App, config: PakeConfig, _data_dir: PathBuf) -> Wind
.resizable(window_config.resizable)
.fullscreen(window_config.fullscreen)
.inner_size(window_config.width, window_config.height)
.disable_file_drop_handler() //Very annoying, otherwise dragging files to the window will not work.
.initialization_script(include_str!("../inject/style.js"))
.initialization_script(include_str!("../inject/event.js"))
.initialization_script(include_str!("../inject/component.js"));
.disable_file_drop_handler()
.initialization_script(include_str!("../inject/_INJECT_.js")); //Very annoying, otherwise dragging files to the window will not work.
#[cfg(target_os = "macos")]
{