-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Refine createWebview #44579
Comments
I'll add back a title parameter. Unsure about not automatically showing though. Definitely can't fit in the change for this iteration. The current model assumes that a webview is always backed by webview editor (although this editor could be in a background tab). When the editor is closed, either programmatically or by the user, the webview is destroyed. We can discuss this further in March as we work to finalize the API (Also note that the current design assumes webviews will only be used in editors. If we want to support them elsewhere, such as in a tree view for example, we would need to change things up) |
Automatically showing the webview feels more natural to me. Also see a similar API for For 2 I think it should ask for a title and an icon on creation, if the default behavior is to present the webview immediately after creating it. |
I am on the other side, you create your webview, compute and set all its state (like html which the create method doesn't take) and when you are ready you show it. For me this like calling |
Yeah, depending on the way you create the Webview. If you pass in all the initialization info during creation having creation and presentation together makes sense, but with the current API having creation separate from presentation definitely feels more natural. However if that's the way to go having |
Added title back. Our current model still assumes that a webview is much more like a |
re #44466
The text was updated successfully, but these errors were encountered: