refactor: consolidate WebContents::{Create,New} (#26521)

This commit is contained in:
Jeremy Rose
2020-11-17 14:14:33 -08:00
committed by GitHub
parent a303813d15
commit 92643a5a1c
5 changed files with 5 additions and 15 deletions

View File

@@ -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) {