(iframe)
| 10615 | } |
| 10616 | |
| 10617 | function isSameOriginFrame(iframe) { |
| 10618 | try { |
| 10619 | // Accessing the contentDocument of a HTMLIframeElement can cause the browser |
| 10620 | // to throw, e.g. if it has a cross-origin src attribute. |
| 10621 | // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g: |
| 10622 | // iframe.contentDocument.defaultView; |
| 10623 | // A safety way is to access one of the cross origin properties: Window or Location |
| 10624 | // Which might result in "SecurityError" DOM Exception and it is compatible to Safari. |
| 10625 | // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl |
| 10626 | return typeof iframe.contentWindow.location.href === 'string'; |
| 10627 | } catch (err) { |
| 10628 | return false; |
| 10629 | } |
| 10630 | } |
| 10631 | |
| 10632 | function getActiveElementDeep() { |
| 10633 | var win = window; |
no outgoing calls
no test coverage detected