Skip to content

Commit

Permalink
fix windows, linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Aug 28, 2024
1 parent fc4eac7 commit 592822f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/webkitgtk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ impl InnerWebView {
if let Some(manager) = self.webview.user_content_manager() {
let script = UserScript::new(
js,
UserContentInjectedFrames::ALL_FRAMES,
UserContentInjectedFrames::AllFrames,
UserScriptInjectionTime::Start,
&[],
&[],
Expand Down
3 changes: 2 additions & 1 deletion src/webview2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ impl InnerWebView {
if let Some(on_page_load_handler) = attributes.on_page_load_handler.take() {
let on_page_load_handler = Rc::new(on_page_load_handler);
let on_page_load_handler_ = on_page_load_handler.clone();
let scripts = attributes.initialization_scripts.clone();
webview.add_ContentLoading(
&ContentLoadingEventHandler::create(Box::new(move |webview, _| {
let Some(webview) = webview else {
Expand All @@ -585,7 +586,7 @@ impl InnerWebView {

on_page_load_handler_(PageLoadEvent::Started, Self::url_from_webview(&webview)?);

for script in attributes.initialization_scripts.clone() {
for script in scripts {
Self::execute_script(&webview, script, |_| ())?;
}

Expand Down

0 comments on commit 592822f

Please sign in to comment.