-
Notifications
You must be signed in to change notification settings - Fork 153
docs: views API: support setting content view #254
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
Conversation
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.
Makes sense to me.
This seems like a super useful set of APIs to unlock. Very exciting! If I want to use I don't have a strong opinion about how much of that should happen "for free", so long as the delta between |
@itsananderson The const win = new BrowserWindow({show: false})
const web = win.getContentView()
win.setContentView(new ImageView())
win.show()
win.webContents.once('did-finish-load', win.setContentView(web))
win.loadURL('https://github.com') Adding a And yeah it is very reasonable to document all the behaviors of |
@electron/wg-api I have updated the spec:
Also on the behavior when a View with a parent is added to another parent, both Cocoa and |
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.
@zcbenz the example needs to be updated to reflect the changes and I've suggested an update here. The only thing I couldn't figure out is why or where TopLevelWindow.getContentView()
is needed?
When you say "remove" do you mean remove from this spec, or remove from Electron entirely? |
Co-Authored-By: John Kleinschmidt <jkleinsc@github.com>
It would be required if user wants to keep using It would also be required to write tests on how
I mean we won't make the API public as part of this spec. This API is already being used heavily in our tests. |
This spec proposes to make parts of
views
related APIs public, which should be enough to implement a simple splash screen for apps.