mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-06 15:57:50 +02:00
feat(plugins): inject API on window.__TAURI__ (#383)
This commit is contained in:
committed by
GitHub
parent
3c8577bc9a
commit
b131bc8f7c
@@ -67,8 +67,11 @@ impl<R: Runtime, T: Manager<R>> ShellExt<R> for T {
|
||||
}
|
||||
|
||||
pub fn init<R: Runtime>() -> TauriPlugin<R, Option<Config>> {
|
||||
let mut init_script = include_str!("init.js").to_string();
|
||||
init_script.push_str(include_str!("api-iife.js"));
|
||||
|
||||
Builder::<R, Option<Config>>::new("shell")
|
||||
.js_init_script(include_str!("init.js").to_string())
|
||||
.js_init_script(init_script)
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
commands::execute,
|
||||
commands::stdin_write,
|
||||
|
||||
Reference in New Issue
Block a user