We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Note that under "Show Me" -> "Electron APIs" -> "BrowserView", the example displayed still uses the deprecated API.
The text was updated successfully, but these errors were encountered:
The latest documentation suggests to use the WebContentsView Class to display the web contents.
The BrowserView class is deprecated, and replaced by the new WebContentsView class. https://www.electronjs.org/docs/latest/api/browser-view
BrowserView
WebContentsView
We should remove the browserview/main.js and should add a new file for the WebContentsView Class.
Here is the code provided under the WebContentsView class that we can add under the show-me examples.
const { BaseWindow, WebContentsView } = require('electron') const win = new BaseWindow({ width: 800, height: 400 }) const view1 = new WebContentsView() win.contentView.addChildView(view1) view1.webContents.loadURL('https://electronjs.org') view1.setBounds({ x: 0, y: 0, width: 400, height: 400 }) const view2 = new WebContentsView() win.contentView.addChildView(view2) view2.webContents.loadURL('https://github.com/electron/electron') view2.setBounds({ x: 400, y: 0, width: 400, height: 400 })
Sorry, something went wrong.
Should we remove the BrowserView Class example from the Show-me section or should we leave it as it is.
No branches or pull requests
Note that under "Show Me" -> "Electron APIs" -> "BrowserView", the example displayed still uses the deprecated API.
The text was updated successfully, but these errors were encountered: