Skip to content

Commit

Permalink
Rename eval to evaluate_script
Browse files Browse the repository at this point in the history
  • Loading branch information
geieredgar committed Jun 8, 2021
1 parent 4b26923 commit 61f93ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/multi_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ fn main() -> wry::Result<()> {
.unwrap();
webviews.insert(id, webview2);
} else if trigger && instant.elapsed() >= eight_secs {
webviews.get_mut(&id).unwrap().eval("openWindow()").unwrap();
webviews
.get_mut(&id)
.unwrap()
.evaluate_script("openWindow()")
.unwrap();
trigger = false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/webview/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ impl WebView {
/// [`WebView`]. Use [`EventLoopProxy`] and a custom event to send scripts from other threads.
///
/// [`EventLoopProxy`]: crate::application::event_loop::EventLoopProxy
pub fn eval(&self, js: &str) -> Result<()> {
pub fn evaluate_script(&self, js: &str) -> Result<()> {
self.webview.eval(js)
}

Expand Down

0 comments on commit 61f93ab

Please sign in to comment.