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.
Look good to me, just wait for lucas to confirm if it's ok to modify WebviewAttributes
…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.