refactor: The injection process does not affect the logic of the development environment.

This commit is contained in:
jeasonnow
2023-06-10 10:35:27 +08:00
parent 3202fcdb73
commit 3b2e305a0c
5 changed files with 4 additions and 8 deletions

View File

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