| OLD | NEW |
| 1 <script> | 1 <script> |
| 2 alert("Executing script in the child window."); | 2 alert("Executing script in the child window."); |
| 3 var x = new XMLHttpRequest(); | 3 var x = new XMLHttpRequest(); |
| 4 x.open("POST", "http://localhost:8000/xmlhttprequest/resources/access-control-al
low-lists.php?origin=*&headers=Content-Type", false); | 4 x.open("POST", "http://example.test:8000/xmlhttprequest/resources/access-control
-allow-lists.php?origin=*&headers=Content-Type", false); |
| 5 alert("XHR POST opened."); | 5 alert("XHR POST opened."); |
| 6 try { | 6 try { |
| 7 x.send(1); | 7 x.send(1); |
| 8 alert("XHR POST sent."); | 8 alert("XHR POST sent."); |
| 9 } catch (e) { | 9 } catch (e) { |
| 10 alert("exception! " + e); | 10 alert("exception! " + e); |
| 11 } | 11 } |
| 12 if (window.opener) | 12 if (window.opener) |
| 13 window.opener.postMessage('done', '*'); | 13 window.opener.postMessage('done', '*'); |
| 14 </script> | 14 </script> |
| OLD | NEW |