| OLD | NEW |
| 1 --- | 1 --- |
| 2 layout: default | 2 layout: default |
| 3 title: "Chromium with the Dart VM" | 3 title: "Chromium with the Dart VM" |
| 4 --- | 4 --- |
| 5 | 5 |
| 6 {% include platform-specific-text/_noscript.html %} | 6 {% include platform-specific-text/_noscript.html %} |
| 7 | 7 |
| 8 <h1> {{ page.title }} </h1> | 8 <h1> {{ page.title }} </h1> |
| 9 | 9 |
| 10 <section class="overview"> | 10 <section class="overview"> |
| 11 | 11 |
| 12 <p> | 12 <p> |
| 13 This page tells you how to get and use | 13 This page tells you how to get and use |
| 14 a Chromium-based browser (nicknamed <em>Dartium</em>) | 14 a Chromium-based browser (nicknamed <em>Dartium</em>) |
| 15 that includes the Dart virtual machine (VM). | 15 that includes the Dart virtual machine (VM). |
| 16 This browser can execute Dart web apps directly, | 16 This browser can execute Dart web apps directly, |
| 17 so you don't have to compile your code to JavaScript | 17 so you don't have to compile your code to JavaScript |
| 18 until you're ready to test on other browsers. | 18 until you're ready to test on other browsers. |
| 19 Dartium is available for | 19 Dartium is available for |
| 20 <label> | 20 <input type="radio" name="osChoices" id="win"> |
| 21 <input type="radio" name="osChoices" id="win"> | 21 <label class="os-choice" for="win">Windows</label>, |
| 22 Windows</input></label>, | 22 |
| 23 <label> | 23 <input type="radio" name="osChoices" id="linux" checked="true"> |
| 24 <input type="radio" name="osChoices" id="linux" checked="true"> | 24 <label class="os-choice" for="linux">Linux</label>, or |
| 25 Linux</input></label>, and | 25 |
| 26 <label> | 26 <input type="radio" name="osChoices" id="mac"> |
| 27 <input type="radio" name="osChoices" id="mac"> | 27 <label class="os-choice" for="mac">Mac</label>. |
| 28 Mac</input></label>. | |
| 29 </p> | 28 </p> |
| 30 | 29 |
| 31 <aside class="warning"> | 30 <aside> |
| 32 <b>Important:</b> | 31 <div class="alert"> |
| 33 This browser is a technical preview, | 32 <strong>Warning:</strong> |
| 34 and it might have security and stability issues. | 33 This browser is a technical preview, |
| 34 and it might have security and stability issues. |
| 35 | 35 |
| 36 <blockquote> | 36 <b>Do not use Dartium as your primary browser!</b> |
| 37 <b>Do not use Dartium as your primary browser!</b> | 37 </div> |
| 38 </blockquote> | |
| 39 </aside> | 38 </aside> |
| 40 | 39 |
| 41 <h4> Contents </h4> | 40 <h4> Contents </h4> |
| 42 <ol class="toc"> | 41 <ol class="toc"> |
| 43 <li> <a href="#download">Downloading and installing the browser</a> </li> | 42 <li> <a href="#download">Downloading and installing the browser</a> </li> |
| 44 <li> <a href="#launch">Launching the browser</a> </li> | 43 <li> <a href="#launch">Launching the browser</a> </li> |
| 45 <li> <a href="#bug">Filing bugs</a> </li> | 44 <li> <a href="#bug">Filing bugs</a> </li> |
| 46 <li> <a href="#linking">Linking to Dart source</a> </li> | 45 <li> <a href="#linking">Linking to Dart source</a> </li> |
| 47 <li> <a href="#detect">Detecting Dart support</a> </li> | 46 <li> <a href="#detect">Detecting Dart support</a> </li> |
| 48 <li> <a href="#command">Launching from the command line</a> </li> | 47 <li> <a href="#command">Launching from the command line</a> </li> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 61 | 60 |
| 62 <p> | 61 <p> |
| 63 If you don't have Dart Editor | 62 If you don't have Dart Editor |
| 64 or want a different version of Dartium, | 63 or want a different version of Dartium, |
| 65 you can download it separately: | 64 you can download it separately: |
| 66 </p> | 65 </p> |
| 67 | 66 |
| 68 {% include downloads/_dartium.html %} | 67 {% include downloads/_dartium.html %} |
| 69 | 68 |
| 70 <br> | 69 <br> |
| 71 <aside class="note"> | 70 |
| 72 <b>Note:</b> | 71 <aside> |
| 73 The Dartium binary <b>will expire</b> after a few days. | 72 <div class="alert"> |
| 74 When that happens, | 73 <strong>Warning:</strong> |
| 75 you'll need to download a new copy | 74 The Dartium binary <b>will expire</b> after a few days. |
| 76 if you want to continue using Dartium. | 75 When that happens, |
| 76 you'll need to download a new copy |
| 77 if you want to continue using Dartium. |
| 78 </div> |
| 77 </aside> | 79 </aside> |
| 78 | 80 |
| 79 <p> | 81 <p> |
| 80 You don't usually need to do anything special to install Dartium: | 82 You don't usually need to do anything special to install Dartium: |
| 81 just unarchive the ZIP file. | 83 just unarchive the ZIP file. |
| 82 If you want Dart Editor to launch a particular copy of Dartium, | 84 If you want Dart Editor to launch a particular copy of Dartium, |
| 83 then put that copy inside | 85 then put that copy inside |
| 84 the <b>dart-sdk</b> directory of your | 86 the <b>dart-sdk</b> directory of your |
| 85 <a href="/docs/editor/">Dart Editor | 87 <a href="/docs/editor/">Dart Editor |
| 86 installation directory</a>, | 88 installation directory</a>, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 103 | 105 |
| 104 <p> | 106 <p> |
| 105 If launching fails and you're using 64-bit Linux, | 107 If launching fails and you're using 64-bit Linux, |
| 106 you probably need to install 32-bit libraries. | 108 you probably need to install 32-bit libraries. |
| 107 See <a href="http://dartbug.com/2052">bug #2052</a> | 109 See <a href="http://dartbug.com/2052">bug #2052</a> |
| 108 for details and tips. | 110 for details and tips. |
| 109 </aside> | 111 </aside> |
| 110 | 112 |
| 111 </p> | 113 </p> |
| 112 | 114 |
| 113 <aside class="note"> | 115 <p> |
| 114 <b>If you already use Chromium:</b> | 116 <b>If you already use Chromium:</b> |
| 115 If another version of Chromium is open, | 117 If another version of Chromium is open, |
| 116 then you could have a profile conflict. | 118 then you could have a profile conflict. |
| 117 To avoid this, you can open Dartium or Chromium | 119 To avoid this, you can open Dartium or Chromium |
| 118 from the command line with the | 120 from the command line with the |
| 119 <a href="http://www.chromium.org/user-experience/user-data-directory">--user-dat
a-dir flag</a>. | 121 <a href="http://www.chromium.org/user-experience/user-data-directory">--user-dat
a-dir flag</a>. |
| 120 </aside> | 122 </p> |
| 121 | 123 |
| 122 </section> | 124 </section> |
| 123 | 125 |
| 124 | 126 |
| 125 <section id="bug"> | 127 <section id="bug"> |
| 126 <h2> Filing bugs </h2> | 128 <h2> Filing bugs </h2> |
| 127 | 129 |
| 128 <p> | 130 <p> |
| 129 If you find a bug in Dartium, | 131 If you find a bug in Dartium, |
| 130 create an issue in the Dart project | 132 create an issue in the Dart project |
| (...skipping 22 matching lines...) Expand all Loading... |
| 153 <body> | 155 <body> |
| 154 <script type="application/dart" src="app.dart"></script> | 156 <script type="application/dart" src="app.dart"></script> |
| 155 <!-- bootstraps the Dart VM and handles non-Dart browsers --> | 157 <!-- bootstraps the Dart VM and handles non-Dart browsers --> |
| 156 <script type="text/javascript" | 158 <script type="text/javascript" |
| 157 src="http://dart.googlecode.com/svn/trunk/dart/client/dart.js"> | 159 src="http://dart.googlecode.com/svn/trunk/dart/client/dart.js"> |
| 158 </script> | 160 </script> |
| 159 </body> | 161 </body> |
| 160 </html> | 162 </html> |
| 161 {% endhighlight %} | 163 {% endhighlight %} |
| 162 | 164 |
| 163 <aside class="note"> | 165 <aside> |
| 164 <b>Tip:</b> The Dart Editor automatically adds both | 166 <div class="alert alert-info"> |
| 165 the <code>application/dart</code> script tag and the | 167 <strong>Tip:</strong> |
| 166 bootstrap JavaScript tag into the project's main HTML file. | 168 The Dart Editor automatically adds both |
| 169 the <code>application/dart</code> script tag and the |
| 170 bootstrap JavaScript tag into the project's main HTML file. |
| 171 </div> |
| 167 </aside> | 172 </aside> |
| 168 | 173 |
| 169 </section> | 174 </section> |
| 170 | 175 |
| 171 | 176 |
| 172 <section id="detect"> | 177 <section id="detect"> |
| 173 <h2> Detecting Dart support </h2> | 178 <h2> Detecting Dart support </h2> |
| 174 | 179 |
| 175 <p> | 180 <p> |
| 176 The above example uses a bootstrap script that takes care | 181 The above example uses a bootstrap script that takes care |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 To achieve that, you can enable checked mode | 223 To achieve that, you can enable checked mode |
| 219 (the VM's --enable_type_checks flag) | 224 (the VM's --enable_type_checks flag) |
| 220 and assertion checks (--enable_asserts flag). | 225 and assertion checks (--enable_asserts flag). |
| 221 </p> | 226 </p> |
| 222 | 227 |
| 223 <p> | 228 <p> |
| 224 On Linux, you can specify flags by starting Dartium as follows: | 229 On Linux, you can specify flags by starting Dartium as follows: |
| 225 </p> | 230 </p> |
| 226 | 231 |
| 227 {% highlight bash %} | 232 {% highlight bash %} |
| 228 DART_FLAGS='--enable_type_checks --enable_asserts' <em>path</em>/chrome | 233 DART_FLAGS='--enable_type_checks --enable_asserts' PATH/chrome |
| 229 {% endhighlight %} | 234 {% endhighlight %} |
| 230 | 235 |
| 231 <p> | 236 <p> |
| 232 On the Mac: | 237 On the Mac: |
| 233 </p> | 238 </p> |
| 234 | 239 |
| 235 {% highlight bash %} | 240 {% highlight bash %} |
| 236 DART_FLAGS='--enable_type_checks --enable_asserts' \ | 241 DART_FLAGS='--enable_type_checks --enable_asserts' \ |
| 237 <em>path</em>/Chromium.app/Contents/MacOS/Chromium | 242 PATH/Chromium.app/Contents/MacOS/Chromium |
| 238 {% endhighlight %} | 243 {% endhighlight %} |
| 239 | 244 |
| 240 <p> | 245 <p> |
| 241 Or (also on the Mac): | 246 Or (also on the Mac): |
| 242 </p> | 247 </p> |
| 243 | 248 |
| 244 {% highlight bash %} | 249 {% highlight bash %} |
| 245 DART_FLAG='--enable_type_checks --enable_asserts' \ | 250 DART_FLAG='--enable_type_checks --enable_asserts' \ |
| 246 open PATH/Chromium.app | 251 open PATH/Chromium.app |
| 247 {% endhighlight %} | 252 {% endhighlight %} |
| 248 | 253 |
| 249 <br> | 254 <br> |
| 250 <aside class="note"> | 255 <aside> |
| 251 <b>Tip:</b> | 256 <div class="alert alert-info"> |
| 252 You can see the command-line flags and executable path | 257 <strong>Tip:</strong> |
| 253 of your current Chromium-based browser | 258 You can see the command-line flags and executable path |
| 254 by going to <b>chrome://version</b>. | 259 of your current Chromium-based browser |
| 260 by going to <b>chrome://version</b>. |
| 261 </div> |
| 255 </aside> | 262 </aside> |
| 256 </section> | 263 </section> |
| 257 | 264 |
| 258 <script async src="/js/Switcher.dart.js"></script> | 265 <script async src="/js/Switcher.dart.js"></script> |
| 259 | 266 |
| OLD | NEW |