-
-
Save Kilian/b9c5a45bf59f6ba748041d000414e571 to your computer and use it in GitHub Desktop.
contex menu in browserView containing devtools broke between v12.0.0-beta.31 and v12.0.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {app, BrowserWindow, BrowserView} = require('electron') | |
function createWindow () { | |
const mainWindow = new BrowserWindow({ | |
width: 1000, | |
height: 1000, | |
}) | |
// and load the index.html of the app. | |
mainWindow.loadFile('index.html') | |
devToolsView = new BrowserView(); | |
mainWindow.setBrowserView(devToolsView); | |
mainWindow.webContents.setDevToolsWebContents(devToolsView.webContents); | |
mainWindow.openDevTools(); | |
devToolsView.setBounds({ | |
x:500, | |
y:0, | |
width: 500, | |
height: 1000, | |
}); | |
devToolsView.webContents.focus(); | |
} | |
app.whenReady().then(createWindow) | |
app.on('window-all-closed', function () { | |
app.quit() | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Empty */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment