| <!DOCTYPE html> |
| <iframe src="data:text/html,If this message appears, then this frame has not been navigated by its parent."></iframe> |
| <script> |
| window.onload = function() { |
| try { |
| document.querySelector("iframe").contentWindow.location.href = "data:text/html,\u003c!DOCTYPE html\u003e\u003cp\u003eIf this message appears, then this frame has been navigated by its parent.\u003c/p\u003e\u003cscript\u003eparent.parent.postMessage('can navigate', '*');\u003c/script\u003e"; |
| } catch(e) { |
| parent.postMessage("can not navigate", "*"); |
| } |
| } |
| </script> |