refactor(core): do not allow JS API to set additional browser args (#6216)

This was introduced in #5799, but it's dangerous to let the frontend set this option.
This commit is contained in:
Lucas Fernandes Nogueira
2023-03-31 10:05:18 -03:00
committed by GitHub
parent a7ee5ca7c3
commit d788d23071
3 changed files with 2 additions and 10 deletions

View File

@@ -1,5 +0,0 @@
---
"api": minor
---
Added the `additionalBrowserArgs` option when creating a window.

View File

@@ -213,8 +213,9 @@ impl Cmd {
#[module_command_handler(window_create)]
async fn create_webview<R: Runtime>(
context: InvokeContext<R>,
options: Box<WindowConfig>,
mut options: Box<WindowConfig>,
) -> super::Result<()> {
options.additional_browser_args = None;
crate::window::WindowBuilder::from_config(&context.window, *options)
.build()
.map_err(crate::error::into_anyhow)?;

View File

@@ -2144,10 +2144,6 @@ interface WindowOptions {
* The user agent for the webview.
*/
userAgent?: string
/**
* Additional arguments for the webview. **Windows Only**
*/
additionalBrowserArguments?: string
}
function mapMonitor(m: Monitor | null): Monitor | null {