* Set the CSS class applied to the field's textElement_. * * @param cssClass The new CSS class name, or null to remove.
(cssClass: string | null)
| 142 | * @param cssClass The new CSS class name, or null to remove. |
| 143 | */ |
| 144 | setClass(cssClass: string | null) { |
| 145 | if (this.textElement_) { |
| 146 | if (this.class) { |
| 147 | dom.removeClass(this.textElement_, this.class); |
| 148 | } |
| 149 | if (cssClass) { |
| 150 | dom.addClass(this.textElement_, cssClass); |
| 151 | } |
| 152 | } |
| 153 | this.class = cssClass; |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * Construct a FieldLabel from a JSON arg object, |
no test coverage detected