How can I run a Dart application? Do I need a VM as in Java?
I tried to embed the following code on a html page:
<html>
<body>
<script type="application/dart">
main() {
Element element = document.getElementById('message');
element.innerHTML = 'Hello from Dart';
}
</script>
<div id="message"></div>
</body>
</html>
This doesn’t work – it returns the pure HTML on the page. What am I doing wrong?
My Google Chrome version: Chrome/14.0.835.202 and my platform is Windows.
You can download Dart binaries for Windows (
dart_bin.exe) and Linux from Installing Dart.You can write a small Hello World,
hello.dart:Then you execute the Dart-script with: