()
| 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 { |
no test coverage detected