-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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(core): add WindowBuilder type #3598
Conversation
core/tauri/src/app.rs
Outdated
/// Initializes a webview window builder with the given window label and URL to load on the webview. | ||
/// | ||
/// Data URLs are only supported with the `window-data-url` feature flag. | ||
pub fn window_builder<L: Into<String>>(&self, label: L, url: WindowUrl) -> WindowBuilder<R> { |
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.
I know we use this exact pattern in other place too, but can we "invert" this interface?
I.e. instead of a method on AppHandle
we pass AppHandle
to the WindowBuilder::new
constructor?
This "inline constructor" feels a bit off to me 🤔
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.
I agree, this is how it is in tao too.
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.
yeah I like that idea, i'll change that
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.
Maybe we can review rest of Tauri and make everything consistent?
Sure that would be a breaking change but a good one maybe 🤔
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.
Well that depends on the size of the refactor/breakingchange and the impact on post v1 work.
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information
This is the first step to allow customizing the CSP #3533