Skip to content

Instantly share code, notes, and snippets.



Last active Jun 27, 2019
What would you like to do?
webview/OOPIF events issue with electron4 and higher
<!DOCTYPE html>
<title>Split Pane</title>
<link rel="stylesheet" href="" />
html, body {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
height: 100%;
min-height: 100%;
margin: 0;
padding: 0;
.split-pane-divider {
background: #aaa;
#left-component {
padding: 10px;
background-color: #DDDDDD;
width: 15em;
#my-divider {
background-color: #000;
left: 15em; /* Same as left component width */
width: 5px;
#right-component {
padding: 10px;
background-color: #AAAAAA;
left: 15em; /* Same as left component width */
margin-left: 5px; /* Same as divider width */
<script src=""></script>
<script src=""></script>
<div class="split-pane fixed-left">
<div class="split-pane-component" id="left-component">
This is the left component
<div class="split-pane-divider" id="my-divider"></div>
<div class="split-pane-component" id="right-component">
<iframe src=""></iframe>
$(function() {
const { app, BrowserWindow } = require('electron')
let window = null
// Wait until the app is ready
app.once('ready', () => {
// Create a new window
window = new BrowserWindow({
// Set the initial width to 500px
width: 600,
// Set the initial height to 400px
height: 600,
// Don't show the window until it's ready, this prevents any white flickering
show: false,
webPreferences: {
nodeIntegration: true
window.once('ready-to-show', () => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.