Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Bootstrap support for Dart scripts on the page as this script. | 5 // Bootstrap support for Dart scripts on the page as this script. |
| 6 if (navigator.webkitStartDart) { | 6 if (navigator.webkitStartDart) { |
| 7 if (!navigator.webkitStartDart()) { | 7 if (!navigator.webkitStartDart()) { |
| 8 document.body.innerHTML = 'This build has expired. Please download a new Da rtium at http://www.dartlang.org/dartium/index.html'; | 8 document.body.innerHTML = 'This build has expired. Please download a new Da rtium at http://www.dartlang.org/dartium/index.html'; |
| 9 } | 9 } |
| 10 } else { | 10 } else { |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 if (scripts[i].src && scripts[i].src != '') { | 26 if (scripts[i].src && scripts[i].src != '') { |
| 27 var script = document.createElement('script'); | 27 var script = document.createElement('script'); |
| 28 script.src = scripts[i].src + '.js'; | 28 script.src = scripts[i].src + '.js'; |
| 29 var parent = scripts[i].parentNode; | 29 var parent = scripts[i].parentNode; |
| 30 parent.replaceChild(script, scripts[i]); | 30 parent.replaceChild(script, scripts[i]); |
| 31 } | 31 } |
| 32 } | 32 } |
| 33 } | 33 } |
| 34 }, false); | 34 }, false); |
| 35 } | 35 } |
| 36 | |
| 37 window._$dart$initialized = true; | |
|
kasperl
2012/07/04 05:13:00
Let's add a comment here that explains what the pu
vsm
2012/07/04 07:43:09
Removed. I'd been using it to verify this script
| |
| OLD | NEW |