mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: ensure ready-to-show event is fired (#25932)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
This commit is contained in:
@@ -605,6 +605,15 @@ WebContents.prototype._init = function () {
|
||||
app.emit('login', event, this, ...args);
|
||||
});
|
||||
|
||||
this.on('ready-to-show', () => {
|
||||
const owner = this.getOwnerBrowserWindow();
|
||||
if (owner && !owner.isDestroyed()) {
|
||||
process.nextTick(() => {
|
||||
owner.emit('ready-to-show');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
const event = process.electronBinding('event').createEmpty();
|
||||
app.emit('web-contents-created', event, this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user