Skip to content

Commit 7930c57

Browse files
committed
Fix for new createCustomEvent API
Ref nwjs#7050
1 parent 7ad36ee commit 7930c57

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

src/resources/api_nw_menuitem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var util = nw.require('util');
55
var EventEmitter = nw.require('events').EventEmitter;
66

77
var menuItems = { objs : {}, clickEvent: {} };
8-
menuItems.clickEvent = bindingUtil.createCustomEvent("NWObjectclick", undefined, false, false);
8+
menuItems.clickEvent = bindingUtil.createCustomEvent("NWObjectclick", false, false);
99
menuItems.clickEvent.addListener(function(id) {
1010
var obj = menuItems.objs[id];
1111
if (!obj)

src/resources/api_nw_newwin.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,18 @@ forEach(currentNWWindowInternal, function(key, value) {
110110
NWWindow.prototype[key] = value;
111111
});
112112

113-
NWWindow.prototype.onNewWinPolicy = bindingUtil.createCustomEvent("nw.Window.onNewWinPolicy", undefined, false, false);
114-
NWWindow.prototype.onNavigation = bindingUtil.createCustomEvent("nw.Window.onNavigation", undefined, false, false);
115-
NWWindow.prototype.LoadingStateChanged = bindingUtil.createCustomEvent("nw.Window.LoadingStateChanged", undefined, false, false);
116-
NWWindow.prototype.onDocumentStart = bindingUtil.createCustomEvent("nw.Window.onDocumentStart", undefined, false, false);
117-
NWWindow.prototype.onDocumentEnd = bindingUtil.createCustomEvent("nw.Window.onDocumentEnd", undefined, false, false);
118-
NWWindow.prototype.onZoom = bindingUtil.createCustomEvent("nw.Window.onZoom", undefined, false, false);
119-
NWWindow.prototype.onClose = bindingUtil.createCustomEvent("nw.Window.onClose", undefined, true, false);
120-
NWWindow.prototype.onMinimized = bindingUtil.createCustomEvent("nw.Window.onMinimized", undefined, false, false);
121-
NWWindow.prototype.onMaximized = bindingUtil.createCustomEvent("nw.Window.onMaximized", undefined, false, false);
122-
NWWindow.prototype.onFullscreen = bindingUtil.createCustomEvent("nw.Window.onFullscreen", undefined, false, false);
123-
NWWindow.prototype.onResized = bindingUtil.createCustomEvent("nw.Window.onResized", undefined, false, false);
124-
NWWindow.prototype.onRestore = bindingUtil.createCustomEvent("nw.Window.onRestore", undefined, false, false);
113+
NWWindow.prototype.onNewWinPolicy = bindingUtil.createCustomEvent("nw.Window.onNewWinPolicy", false, false);
114+
NWWindow.prototype.onNavigation = bindingUtil.createCustomEvent("nw.Window.onNavigation", false, false);
115+
NWWindow.prototype.LoadingStateChanged = bindingUtil.createCustomEvent("nw.Window.LoadingStateChanged", false, false);
116+
NWWindow.prototype.onDocumentStart = bindingUtil.createCustomEvent("nw.Window.onDocumentStart", false, false);
117+
NWWindow.prototype.onDocumentEnd = bindingUtil.createCustomEvent("nw.Window.onDocumentEnd", false, false);
118+
NWWindow.prototype.onZoom = bindingUtil.createCustomEvent("nw.Window.onZoom", false, false);
119+
NWWindow.prototype.onClose = bindingUtil.createCustomEvent("nw.Window.onClose", true, false);
120+
NWWindow.prototype.onMinimized = bindingUtil.createCustomEvent("nw.Window.onMinimized", false, false);
121+
NWWindow.prototype.onMaximized = bindingUtil.createCustomEvent("nw.Window.onMaximized", false, false);
122+
NWWindow.prototype.onFullscreen = bindingUtil.createCustomEvent("nw.Window.onFullscreen", false, false);
123+
NWWindow.prototype.onResized = bindingUtil.createCustomEvent("nw.Window.onResized", false, false);
124+
NWWindow.prototype.onRestore = bindingUtil.createCustomEvent("nw.Window.onRestore", false, false);
125125

126126
NWWindow.prototype.close = function (force) {
127127
currentNWWindowInternal.close(force, this.cWindow.id);

src/resources/api_nw_tray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var EventEmitter = nw.require('events').EventEmitter;
66

77
var trayEvents = { objs: {}, clickEvent: {} };
88

9-
trayEvents.clickEvent = bindingUtil.createCustomEvent("NWObjectTrayClick", undefined, false, false);
9+
trayEvents.clickEvent = bindingUtil.createCustomEvent("NWObjectTrayClick", false, false);
1010
trayEvents.clickEvent.addListener(function(id) {
1111
var tray = trayEvents.objs[id];
1212
if (!tray)

src/resources/api_nw_window.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ apiBridge.registerCustomHook(function(bindingsAPI) {
158158
NWWindow.prototype[key] = value;
159159
});
160160

161-
NWWindow.prototype.onNewWinPolicy = bindingUtil.createCustomEvent('nw.Window.onNewWinPolicy', undefined, false, false);
162-
NWWindow.prototype.onNavigation = bindingUtil.createCustomEvent('nw.Window.onNavigation', undefined, false, false);
163-
NWWindow.prototype.LoadingStateChanged = bindingUtil.createCustomEvent('nw.Window.LoadingStateChanged', undefined, false, false);
164-
NWWindow.prototype.onDocumentStart = bindingUtil.createCustomEvent('nw.Window.onDocumentStart', undefined, false, false);
165-
NWWindow.prototype.onDocumentEnd = bindingUtil.createCustomEvent('nw.Window.onDocumentEnd', undefined, false, false);
166-
NWWindow.prototype.onZoom = bindingUtil.createCustomEvent('nw.Window.onZoom', undefined, false, false);
167-
NWWindow.prototype.onClose = bindingUtil.createCustomEvent("nw.Window.onClose", undefined, true, false);
161+
NWWindow.prototype.onNewWinPolicy = bindingUtil.createCustomEvent('nw.Window.onNewWinPolicy', false, false);
162+
NWWindow.prototype.onNavigation = bindingUtil.createCustomEvent('nw.Window.onNavigation', false, false);
163+
NWWindow.prototype.LoadingStateChanged = bindingUtil.createCustomEvent('nw.Window.LoadingStateChanged', false, false);
164+
NWWindow.prototype.onDocumentStart = bindingUtil.createCustomEvent('nw.Window.onDocumentStart', false, false);
165+
NWWindow.prototype.onDocumentEnd = bindingUtil.createCustomEvent('nw.Window.onDocumentEnd', false, false);
166+
NWWindow.prototype.onZoom = bindingUtil.createCustomEvent('nw.Window.onZoom', false, false);
167+
NWWindow.prototype.onClose = bindingUtil.createCustomEvent("nw.Window.onClose", true, false);
168168

169169
NWWindow.prototype.once = function (event, listener, record) {
170170
if (typeof listener !== 'function')

0 commit comments

Comments
 (0)