feat: replace BrowserView with WebContentsView (#35658)
This commit is contained in:
parent
a94fb2cb5d
commit
15c6014324
76 changed files with 2987 additions and 1531 deletions
|
@ -4,7 +4,7 @@ const { BaseWindow } = process._linkedBinding('electron_browser_base_window') as
|
|||
|
||||
Object.setPrototypeOf(BaseWindow.prototype, EventEmitter.prototype);
|
||||
|
||||
BaseWindow.prototype._init = function () {
|
||||
BaseWindow.prototype._init = function (this: TLWT) {
|
||||
// Avoid recursive require.
|
||||
const { app } = require('electron');
|
||||
|
||||
|
@ -103,7 +103,7 @@ Object.defineProperty(BaseWindow.prototype, 'movable', {
|
|||
});
|
||||
|
||||
BaseWindow.getFocusedWindow = () => {
|
||||
return BaseWindow.getAllWindows().find((win) => win.isFocused());
|
||||
return BaseWindow.getAllWindows().find((win) => win.isFocused()) ?? null;
|
||||
};
|
||||
|
||||
module.exports = BaseWindow;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue