Add did-attach-webview event
This commit is contained in:
parent
61e606bedc
commit
6326c6727e
4 changed files with 43 additions and 1 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue