electron/lib/isolated_renderer/init.js
2017-01-16 12:38:16 -08:00

22 lines
453 B
JavaScript

/* global binding */
'use strict'
const {guestInstanceId, hiddenPage, openerId, send, sendSync} = binding
const {parse} = JSON
const ipcRenderer = {
send (...args) {
return send('ipc-message', args)
},
sendSync (...args) {
return parse(sendSync('ipc-message-sync', args))
},
// No-ops since events aren't received
on () {},
once () {}
}
require('../renderer/window-setup')(ipcRenderer, guestInstanceId, openerId, hiddenPage)