Add BrowserWindowProxy window.document management


#1

@Constributors
Is it possible to add in electron/lib/renderer/override.js codes to manage window.document functions?
Like this :
BrowserWindowProxy.prototype.document = function () {
return {
function write(…args){
return ipcRenderer.send(‘ELECTRON_GUEST_WINDOW_MANAGER_DOCUMENT_METHOD’, this.guestId, ‘write’, args);
}
}
}
ipcMain.on(‘ELECTRON_GUEST_WINDOW_MANAGER_DOCUMENT_METHOD’, function (event, guestId, method, …args) {
var ref1
event.returnValue = (ref1 = BrowserWindow.fromId(guestId)) != null ? ref1.document[method].apply(ref1, args) : void 0
})

Because several website use :
var win = window.open(url);
win.document.write(html);

Thanks

Cédric