Set _setDeprecatedOptionsCheck on exports
This commit is contained in:
parent
7668c1ea0b
commit
6aa452cda4
2 changed files with 4 additions and 5 deletions
|
@ -832,12 +832,11 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
|
|||
&mate::TrackableObject<Window>::FromWeakMapID);
|
||||
browser_window.SetMethod("getAllWindows",
|
||||
&mate::TrackableObject<Window>::GetAll);
|
||||
browser_window.SetMethod("_setDeprecatedOptionsCheck",
|
||||
&atom::api::SetDeprecatedOptionsCheck);
|
||||
|
||||
|
||||
mate::Dictionary dict(isolate, exports);
|
||||
dict.Set("BrowserWindow", browser_window);
|
||||
dict.SetMethod("_setDeprecatedOptionsCheck",
|
||||
&atom::api::SetDeprecatedOptionsCheck);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
const ipcMain = require('electron').ipcMain;
|
||||
const deprecate = require('electron').deprecate;
|
||||
const EventEmitter = require('events').EventEmitter;
|
||||
const BrowserWindow = process.atomBinding('window').BrowserWindow;
|
||||
const {BrowserWindow, _setDeprecatedOptionsCheck} = process.atomBinding('window');
|
||||
|
||||
BrowserWindow.prototype.__proto__ = EventEmitter.prototype;
|
||||
|
||||
|
@ -289,6 +289,6 @@ const checkForDeprecatedOptions = function(options) {
|
|||
|
||||
return '';
|
||||
};
|
||||
BrowserWindow._setDeprecatedOptionsCheck(checkForDeprecatedOptions);
|
||||
_setDeprecatedOptionsCheck(checkForDeprecatedOptions);
|
||||
|
||||
module.exports = BrowserWindow;
|
||||
|
|
Loading…
Reference in a new issue