mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2025-01-23 07:08:28 +00:00
Dev tools should show for the webview
instead of the main browser window
This commit is contained in:
parent
b5ed2277bd
commit
b9d0f70580
@ -16,12 +16,14 @@ ipc.on('params', function(event, message) {
|
||||
webView.setAttribute('minwidth', '100');
|
||||
webView.setAttribute('minheight', '100');
|
||||
|
||||
if (appArgs.userAgent) {
|
||||
webView.addEventListener('dom-ready', function() {
|
||||
webView.setUserAgent(appArgs.userAgent);
|
||||
if (appArgs.userAgent) {
|
||||
webView.setUserAgent(appArgs.userAgent);
|
||||
}
|
||||
if (appArgs.showDevTools) {
|
||||
webView.openDevTools();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
webView.addEventListener('new-window', function(e) {
|
||||
require('shell').openExternal(e.url);
|
||||
});
|
||||
|
@ -34,10 +34,8 @@ app.on('ready', function() {
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
if (appArgs.showDevTools) {
|
||||
mainWindow.openDevTools();
|
||||
}
|
||||
// uncomment to show dev tools for the main window
|
||||
//mainWindow.openDevTools();
|
||||
|
||||
mainWindow.loadUrl('file://' + __dirname + '/index.html');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user