refactor: consolidate WebContents::{Create,New} (#26521)
This commit is contained in:
parent
a303813d15
commit
92643a5a1c
5 changed files with 5 additions and 15 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue