+
+ /**
+ * Toggle the visibility of this item
+ *
+ * @param {boolean} [isVisible] Item is visible
+ */
+ mw.rcfilters.dm.FilterItem.prototype.toggleVisible = function ( isVisible ) {
+ isVisible = isVisible === undefined ? !this.visible : !!isVisible;
+
+ if ( this.visible !== isVisible ) {
+ this.visible = isVisible;
+ this.emit( 'update' );
+ }
+ };
+
+ /**
+ * Check whether the item is visible
+ *
+ * @return {boolean} Item is visible
+ */
+ mw.rcfilters.dm.FilterItem.prototype.isVisible = function () {
+ return this.visible;
+ };
+