/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Cut off the end of the undo stack at the current index, // and the beginning to prevent a stack larger than maxUndo. const start = Math.max(this._index + 1 - this.maxUndo, 0); this._stack = this._stack.slice(start, this._index);
const batch = this._batch; deletethis._batch; const entry = { do() { for (const item of batch) {
item.do();
}
},
undo() { for (let i = batch.length - 1; i >= 0; i--) {
batch[i].undo();
}
},
}; this._stack.push(entry); this._index = this._stack.length;
entry.do();
}
/** *Installthisobjectasacommandcontroller.
*/
installController(controllerWindow) { const controllers = controllerWindow.controllers; // Only available when running in a Firefox panel. if (!controllers || !controllers.appendController) { return;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.