We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdba41f commit 1ad3998Copy full SHA for 1ad3998
src/api/window_bindings.js
@@ -136,6 +136,14 @@ Window.prototype.handleEvent = function(ev) {
136
this.removeListener(ev, listeners_copy[i]);
137
}
138
139
+ if (ev == 'new-win-policy' && arguments.length > 3) {
140
+ var policy = arguments[3];
141
+ policy.ignore = function () { this.val = 'ignore'; };
142
+ policy.forceCurrent = function () { this.val = 'current'; };
143
+ policy.forceDownload = function () { this.val = 'download'; };
144
+ policy.forceNewWindow = function () { this.val = 'new-window'; };
145
+ policy.forceNewPopup = function () { this.val = 'new-popup'; };
146
+ }
147
// Route events to EventEmitter.
148
this.emit.apply(this, arguments);
149
0 commit comments