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

Function whenReady

Ports/JavaScriptPort/src/main/webapp/js/fontmetrics.js:1561–1571  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1559 iframe.contentWindow.document.close();
1560 doc = iframe.contentWindow.document;
1561 var whenReady = function() {
1562 var links = doc.querySelectorAll('a[href]');
1563 [].forEach.call(links, function(el, index, array) {
1564 el.addEventListener("click", function(evt) {
1565 var absUrl = resolve(el.getAttribute('href'), url, doc);
1566 $(iframe).trigger('cn1load', [$rt_str(absUrl)]);
1567 evt.preventDefault();
1568 return false;
1569 });
1570 });
1571 };
1572 if (doc.readyState == 'complete') {
1573 whenReady();
1574 } else {

Callers 1

fontmetrics.jsFile · 0.85

Calls 8

resolveFunction · 0.70
$Function · 0.70
querySelectorAllMethod · 0.65
callMethod · 0.65
addEventListenerMethod · 0.65
getAttributeMethod · 0.65
preventDefaultMethod · 0.65
triggerMethod · 0.45

Tested by

no test coverage detected