mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1225563 - Log error in JS that Doorhangers only support one positive and one negative button if invalid buttons are provided. r=nalexander
This commit is contained in:
parent
a2fda5b5a5
commit
8b8d966746
@ -2283,6 +2283,11 @@ var NativeWindow = {
|
||||
aButtons = [];
|
||||
}
|
||||
|
||||
if (aButtons.length > 2) {
|
||||
console.log("Doorhanger can have a maximum of two buttons!");
|
||||
aButtons.length = 2;
|
||||
}
|
||||
|
||||
aButtons.forEach((function(aButton) {
|
||||
this._callbacks[this._callbacksId] = { cb: aButton.callback, prompt: this._promptId };
|
||||
aButton.callback = this._callbacksId;
|
||||
|
Loading…
Reference in New Issue
Block a user