-
Notifications
You must be signed in to change notification settings - Fork 16.5k
Open
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Problem Description
WebContentsView does not currently support the ability to configure that it should automatically resize with its parent window. This was available on BrowserViews via setAutoResize
.
Proposed Solution
Expose a setAutoResize
instance method on View/WebContentsView that automatically resizes the View when the dimensions of the parent window changes.
Alternatives Considered
Currently using an event listener on the parent window's resize event to manually resize the WebContentsView.
this.browserWindow.on("resize", () => {
const bounds = this.browserWindow.getBounds()
this.webContentsView.setBounds({
x: 0,
y: 0,
width: bounds.width,
height: bounds.height,
})
})
Additional Information
No response
benji, aadcg, pushkin-, cm and koscos