null node.getAttribute("skipintoolbarset") != "true" && node.id) .map(node => node.id); CustomizableUI.registerToolbarNode(this, children); ]]> currentWidgets.has(w)).join(","); ]]> x); let oldIds = CustomizableUI.getWidgetIdsInArea(this.id); // Get a list of items only in the new list let newIds = newVal.filter(id => !oldIds.includes(id)); CustomizableUI.beginBatchUpdate(); try { for (let newId of newIds) { oldIds = CustomizableUI.getWidgetIdsInArea(this.id); let nextId = newId; let pos; do { // Get the next item nextId = newVal[newVal.indexOf(nextId) + 1]; // Figure out where it is in the old list pos = oldIds.indexOf(nextId); // If it's not in the old list, repeat: } while (pos == -1 && nextId); if (pos == -1) { pos = null; // We didn't find anything, insert at the end } CustomizableUI.addWidgetToArea(newId, this.id, pos); } let currentIds = this.currentSet.split(","); let removedIds = currentIds.filter(id => !newIds.includes(id) && !newVal.includes(id)); for (let removedId of removedIds) { CustomizableUI.removeWidgetFromArea(removedId); } } finally { CustomizableUI.endBatchUpdate(); } ]]> this._setInactive(); this._setActive(); null true