You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/common/CHANGES.md
+7
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,13 @@
1
1
Change Log
2
2
==========
3
3
4
+
2017-xx-yy: v2.13.3
5
+
--------------------
6
+
7
+
*[Fixed bug #435](https://github.com/adam-p/markdown-here/issues/435): On some pages, Markdown Here would spew cross-origin exceptions to the console. This was due to MDH trying to determine if a focused iframe-within-an-iframe was renderable.
8
+
- Thanks to [lincoln-b](https://github.com/lincoln-b) for reporting it.
// If the focus is in an iframe with a different origin, then attempting to
65
-
// access focusedElem.contentDocument will fail with a `SecurityError`:
66
-
// "Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://jsbin.io" from accessing a cross-origin frame."
67
-
// Rather than spam the console with exceptions, we'll treat this as an
68
-
// unrenderable situation (which it is).
69
-
try{
70
-
varaccessTest=focusedElem.contentDocument;
63
+
// Tests if it's possible to access the iframe contentDocument without throwing
// If the focus is in an iframe with a different origin, then attempting to
69
+
// access focusedElem.contentDocument will fail with a `SecurityError`:
70
+
// "Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://jsbin.io" from accessing a cross-origin frame."
71
+
// Rather than spam the console with exceptions, we'll treat this as an
72
+
// unrenderable situation (which it is).
73
+
try{
74
+
var_=focusedElem.contentDocument;
75
+
}
76
+
catch(e){
77
+
// TODO: Check that this is actually a SecurityError and re-throw if it's not?
78
+
returnfalse;
79
+
}
80
+
81
+
returntrue;
71
82
}
72
-
catch(e){
73
-
// TODO: Check that this is actually a SecurityError and re-throw if it's not?
83
+
84
+
if(!iframeAccessOkay(focusedElem)){
74
85
returnnull;
75
86
}
76
87
77
88
// If the focus is within an iframe, we'll have to drill down to get to the
0 commit comments