OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <!-- Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 <!-- Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
4 for details. All rights reserved. Use of this source code is governed by a | 4 for details. All rights reserved. Use of this source code is governed by a |
5 BSD-style license that can be found in the LICENSE file. --> | 5 BSD-style license that can be found in the LICENSE file. --> |
6 | 6 |
7 <html lang="en"> | 7 <html lang="en"> |
8 <head> | 8 <head> |
9 <meta charset="utf-8" /> | 9 <meta charset="utf-8" /> |
10 <title>agent.html</title> | 10 <title>agent.html</title> |
11 </head> | 11 </head> |
12 <body> | 12 <body> |
13 <script> | 13 <script> |
14 window.addEventListener('message', function (event) { | 14 window.addEventListener('message', function (event) { |
15 var xhr = new XMLHttpRequest(); | 15 var xhr = new HttpRequest(); |
16 | 16 |
17 xhr.open('POST', '/log', true); | 17 xhr.open('POST', '/log', true); |
18 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'
); | 18 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'
); |
19 xhr.send(encodeURIComponent(event.data)); | 19 xhr.send(encodeURIComponent(event.data)); |
20 }, false); | 20 }, false); |
21 </script> | 21 </script> |
22 </body> | 22 </body> |
23 </html> | 23 </html> |
OLD | NEW |