Skip to content

Commit 4dca804

Browse files
committed
support for Opera 10
1 parent e6afbd2 commit 4dca804

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

jquery.postmessage.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,19 @@ THE SOFTWARE.
223223
source_window = "parent";
224224
}
225225
else {
226+
try {
226227
$.each(parent.frames, function(i,n) {
227228
if (n == window) {
228229
source_window = i;
229230
return false;
230231
}
231232
});
233+
}
234+
catch(ex) {
235+
// Opera: security error trying to access parent.frames x-origin
236+
// juse use window.name
237+
source_window = window.name;
238+
}
232239
}
233240
if (source_window == null) {
234241
console.warn("postmessage windows must be direct parent/child windows and the child must be available through the parent window.frames list");

0 commit comments

Comments
 (0)