/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/** * Select accessible object in the tree. * @param {Object} accessible * Accessiblle object to be selected in the inspector tree.
*/
select(accessible) { this._panel.selectAccessible(accessible);
}
/** * Highlight accessible object in the tree. * @param {Object} accessible * Accessiblle object to be selected in the inspector tree.
*/
highlight(accessible) { this._panel.highlightAccessible(accessible);
}
getStr(key) { return L10N.getStr(key);
}
/** * Override the default presentation of the picker button in toolbox's top * level toolbar.
*/
updateButton() { this.pickerButton.description = this.getStr("accessibility.pick"); this.pickerButton.className = "accessibility"; this.pickerButton.disabled = !this.accessibilityProxy.enabled; if (!this.accessibilityProxy.enabled && this.isPicking) { this.cancel();
}
}
/** * Handle an event when a new accessible object is hovered over. * @param {Object} accessible * newly hovered accessible object
*/
onPickerAccessibleHovered(accessible) { if (accessible) { this.emit("picker-accessible-hovered", accessible); this.highlight(accessible);
}
}
/** * Handle an event when a new accessible is picked by the user. * @param {Object} accessible * newly picked accessible object
*/
onPickerAccessiblePicked(accessible) { if (accessible) { this.select(accessible);
} this.stop();
}
/** * Handle an event when a new accessible is previewed by the user. * @param {Object} accessible * newly previewed accessible object
*/
onPickerAccessiblePreviewed(accessible) { if (accessible) { this.select(accessible);
}
}
/** * Handle an event when picking is cancelled by the user.s
*/
onPickerAccessibleCanceled() { this.cancel(); this.emit("picker-accessible-canceled");
}
/** * Toggle between starting and canceling the picker. * @param {Boolean} doFocus * If true, move keyboard focus into content.
*/
toggle(doFocus) { if (this.isPicking) { returnthis.cancel();
}
returnthis.start(doFocus);
}
}
exports.Picker = Picker;
¤ Dauer der Verarbeitung: 0.18 Sekunden
(vorverarbeitet)
¤
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 ist noch experimentell.