()
| 171 | @Watch('ios') |
| 172 | @Watch('md') |
| 173 | loadIcon() { |
| 174 | if (Build.isBrowser && this.isVisible) { |
| 175 | const url = getUrl(this); |
| 176 | |
| 177 | if (url) { |
| 178 | if (ioniconContent.has(url)) { |
| 179 | // sync if it's already loaded |
| 180 | this.svgContent = ioniconContent.get(url); |
| 181 | } else { |
| 182 | // async if it hasn't been loaded |
| 183 | getSvgContent(url, this.sanitize).then(() => (this.svgContent = ioniconContent.get(url))); |
| 184 | } |
| 185 | this.didLoadIcon = true; |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | this.iconName = getName(this.name, this.icon, this.mode, this.ios, this.md); |
| 190 | } |
| 191 | |
| 192 | render() { |
| 193 | const { flipRtl, iconName, inheritedAttributes, el } = this; |
no test coverage detected