Skip to content

Instantly share code, notes, and snippets.

@deepak1556 deepak1556/index.html
Last active Jun 27, 2019

Embed
What would you like to do?
webview/OOPIF events issue with electron4 and higher
<!DOCTYPE html>
<html>
<head>
<title>Split Pane</title>
<link rel="stylesheet" href="http://rawgithub.com/shagstrom/split-pane/master/split-pane.css" />
<style>
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 */
}
</style>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://rawgithub.com/shagstrom/split-pane/master/split-pane.js"></script>
</head>
<body>
<div class="split-pane fixed-left">
<div class="split-pane-component" id="left-component">
This is the left component
</div>
<div class="split-pane-divider" id="my-divider"></div>
<div class="split-pane-component" id="right-component">
<iframe src="http://example.com"></iframe>
</div>
</div>
</body>
<script>
$(function() {
$('div.split-pane').splitPane();
});
</script>
</html>
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.loadFile('index.html')
window.once('ready-to-show', () => {
window.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.