mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: consolidate WebContents::{Create,New} (#26521)
This commit is contained in:
@@ -729,8 +729,8 @@ WebContents.prototype._init = function () {
|
||||
};
|
||||
|
||||
// Public APIs.
|
||||
export function create (options = {}) {
|
||||
return binding.create(options);
|
||||
export function create (options = {}): Electron.WebContents {
|
||||
return new (WebContents as any)(options);
|
||||
}
|
||||
|
||||
export function fromId (id: string) {
|
||||
|
||||
Reference in New Issue
Block a user