fix: ensure ready-to-show event is fired (#25632)
This commit is contained in:
parent
ac25f4d2ff
commit
b85195ee5f
8 changed files with 31 additions and 33 deletions
|
@ -615,6 +615,15 @@ WebContents.prototype._init = function () {
|
|||
app.emit('login', event, this, ...args);
|
||||
});
|
||||
|
||||
this.on('ready-to-show' as any, () => {
|
||||
const owner = this.getOwnerBrowserWindow();
|
||||
if (owner && !owner.isDestroyed()) {
|
||||
process.nextTick(() => {
|
||||
owner.emit('ready-to-show');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
const event = process._linkedBinding('electron_browser_event').createEmpty();
|
||||
app.emit('web-contents-created', event, this);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue