()
| 182 | } |
| 183 | |
| 184 | private void launchAd() { |
| 185 | Component c = getComponentAt(0); |
| 186 | if (c instanceof HTMLComponent) { |
| 187 | HTMLComponent h = (HTMLComponent) c; |
| 188 | h.setSupressExceptions(true); |
| 189 | HTMLElement dom = h.getDOM(); |
| 190 | Vector links = dom.getDescendantsByTagName("a"); |
| 191 | if (!links.isEmpty()) { |
| 192 | HTMLElement e = (HTMLElement) links.elementAt(0); |
| 193 | String link = e.getAttribute("href"); |
| 194 | if (link != null) { |
| 195 | Display.getInstance().execute(link); |
| 196 | } |
| 197 | } |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | /// HTML ad received from the server |
| 202 | /// |
no test coverage detected