]> source.dussan.org Git - jquery.git/commitdiff
Avoid potential for breakage if test suite is run in a frame
authorRick Waldron <waldron.rick@gmail.com>
Sun, 3 Feb 2013 22:58:07 +0000 (17:58 -0500)
committerRick Waldron <waldron.rick@gmail.com>
Sun, 3 Feb 2013 22:58:07 +0000 (17:58 -0500)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
test/data/onbeforeunload.html

index 62c424e894b0ae6e9295e4c519f6b232cfdf8c6a..ad3a1caeb54e687a6b1a4e40f56b05fdb01f297d 100644 (file)
@@ -6,7 +6,7 @@
                        var payload = {
                                event: event.type
                        };
-                       return top.postMessage( JSON.stringify(payload), "*" );
+                       return parent.postMessage( JSON.stringify(payload), "*" );
                }
 
                jQuery( window ).on( "beforeunload", function( event ) {