* @param {!Array } labels
(labels)
| 7873 | * @param {!Array<string>} labels |
| 7874 | */ |
| 7875 | addLabels(labels) { |
| 7876 | if (labels && labels.length > 0) { |
| 7877 | const newLabels = [].concat(this.context_.getLabelList()); |
| 7878 | for (const label of labels) { |
| 7879 | if (newLabels.indexOf(label) == -1) { |
| 7880 | newLabels.push(label); |
| 7881 | } |
| 7882 | } |
| 7883 | this.context_.setLabelList(newLabels); |
| 7884 | } |
| 7885 | } |
| 7886 | |
| 7887 | /** |
| 7888 | * @return {!HTMLIFrameElement} |
no test coverage detected