Add did-attach-webview event

This commit is contained in:
Yuya Ochiai 2017-10-07 01:31:41 +09:00
parent 61e606bedc
commit 6326c6727e
4 changed files with 43 additions and 1 deletions

View file

@ -76,7 +76,7 @@ const createGuest = function (embedder, params) {
watchEmbedder(embedder)
// Init guest web view after attached.
guest.on('did-attach', function () {
guest.on('did-attach', function (event) {
params = this.attachParams
delete this.attachParams
@ -114,6 +114,7 @@ const createGuest = function (embedder, params) {
this.loadURL(params.src, opts)
}
guest.allowPopups = params.allowpopups
embedder.emit('did-attach-webview', event, guest)
})
const sendToEmbedder = (channel, ...args) => {