-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat: expose api to run initialization scripts on all frames. #13076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: expose api to run initialization scripts on all frames. #13076
Conversation
Package Changes Through a846962There are 2 changes which include tauri with minor, tauri-runtime with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
|
there is also #11971 , I am fine to go with any just as long as it is not breaking change. |
|
I removed the breaking change making a new api instead. I named it |
25f774b to
e2989d1
Compare
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
Legend-Master
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look good to me, just wait for lucas to confirm if it's ok to modify WebviewAttributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patience 🙃
…apps#13076) * api!: expose api to run initialisation scripts on all frames. * remove breaking change, add new api instead. * Update .changes/init-script-on-all-frames.md Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com> * use struct `InitializationScript` instead of tuple * Update crates/tauri-runtime/src/webview.rs Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com> * Apply suggestions from code review * Update crates/tauri/src/webview/webview_window.rs --------- Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
…apps#13076) * api!: expose api to run initialisation scripts on all frames. * remove breaking change, add new api instead. * Update .changes/init-script-on-all-frames.md Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com> * use struct `InitializationScript` instead of tuple * Update crates/tauri-runtime/src/webview.rs Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com> * Apply suggestions from code review * Update crates/tauri/src/webview/webview_window.rs --------- Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
I need this to disable webrtc in all frames.
Currently the init script only runs on the main script despite the documentation telling otherwise:
This pr exposes the argument (run_only_on_main_frame) whether to run in all frames or only on the main frame.WebviewBuilder::initialization_script_on_all_framesWebviewWindowBuilder::initialization_script_on_all_framesWebviewAttributes::initialization_script_on_all_framesProgress
.changesdirectory with the appropriate bump, see https://github.com/tauri-apps/tauri/blob/dev/.changes/README.mdcargo testandcargo clippypasses.