MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / launchAd

Method launchAd

CodenameOne/src/com/codename1/components/Ads.java:184–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 ///

Callers 3

keyReleasedMethod · 0.95
pointerReleasedMethod · 0.95
linkClickedMethod · 0.95

Calls 9

setSupressExceptionsMethod · 0.95
getDOMMethod · 0.95
isEmptyMethod · 0.95
elementAtMethod · 0.95
getAttributeMethod · 0.95
getInstanceMethod · 0.95
executeMethod · 0.65
getComponentAtMethod · 0.45

Tested by

no test coverage detected