Created
August 16, 2019 22:42
-
-
Save lucasfernog/36be16faaf2c55a7764ade80d45f2869 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Ext { | |
} | |
impl tauri::extension::Extension for Ext { | |
fn ready(&self, webview: &mut tauri_ui::WebView<'_, ()>) { | |
println!("ready"); | |
tauri::event::emit(webview.handle(), "test", "'a'".to_string()); | |
} | |
fn extend_api(&self, webview: &mut tauri_ui::WebView<'_, ()>, arg: &str) { | |
// do something | |
} | |
} | |
fn main() { | |
tauri::AppBuilder::new() | |
.extension(Ext{}) | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment