OLD | NEW |
1 <script> | 1 <script> |
| 2 // Capture window.window and window.opener: once this context is navigated,
these properties |
| 3 // always return null. |
| 4 var w = window; |
| 5 var o = opener; |
2 opener.accessFrame = function() | 6 opener.accessFrame = function() |
3 { | 7 { |
4 function normalizeURL(url) | 8 function normalizeURL(url) |
5 { | 9 { |
6 return url.substring(url.lastIndexOf("LayoutTests")); | 10 return url.substring(url.lastIndexOf("LayoutTests")); |
7 } | 11 } |
8 | 12 |
9 try { | 13 try { |
10 opener.log("document.URL: " + normalizeURL(document.URL)); | 14 o.log("document.URL: " + normalizeURL(document.URL)); |
11 opener.log("window.document.URL: " + normalizeURL(window.document.UR
L)); | 15 o.log("window.document.URL: " + normalizeURL(w.document.URL)); |
12 opener.log("name: " + name); | 16 o.log("name: " + name); |
13 opener.log("window.name: " + window.name); | 17 o.log("window.name: " + w.name); |
14 } catch (e) { | 18 } catch (e) { |
15 opener.log("An exception was thrown: " + e.message); | 19 o.log("An exception was thrown: " + e.message); |
16 } | 20 } |
17 } | 21 } |
18 | 22 |
19 window.location = "notify-opener-done.html"; | 23 window.location = "notify-opener-done.html"; |
20 </script> | 24 </script> |
OLD | NEW |