Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title>INITIAL</title> | |
| 5 <script> | |
| 6 var queryString = location.search; | |
| 7 | |
| 8 if (queryString && queryString.charAt(0) === '?') { | |
| 9 // Fetches the URL provided in query string with a custom header. | |
| 10 fetch(queryString.substring(1), {headers: {'X-Custom-Header': 'foo'}}) | |
| 11 .then(data => data.text()) | |
| 12 .then(text => document.title = text) | |
| 13 .catch(() => document.title = 'FAIL'); | |
| 14 } | |
| 15 </script> | |
| 16 </head> | |
| 17 </html> | |
| OLD | NEW |