(iframe)
| 7043 | } |
| 7044 | |
| 7045 | function isSameOriginFrame(iframe) { |
| 7046 | try { |
| 7047 | // Accessing the contentDocument of a HTMLIframeElement can cause the browser |
| 7048 | // to throw, e.g. if it has a cross-origin src attribute. |
| 7049 | // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g: |
| 7050 | // iframe.contentDocument.defaultView; |
| 7051 | // A safety way is to access one of the cross origin properties: Window or Location |
| 7052 | // Which might result in "SecurityError" DOM Exception and it is compatible to Safari. |
| 7053 | // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl |
| 7054 | return typeof iframe.contentWindow.location.href === 'string'; |
| 7055 | } catch (err) { |
| 7056 | return false; |
| 7057 | } |
| 7058 | } |
| 7059 | |
| 7060 | function getActiveElementDeep() { |
| 7061 | var win = window; |
no outgoing calls
no test coverage detected