The Dart app runs fine in Dartium, but I would like to convert it to JS.
C:\dart-sdk\bin\dart2js --out=test.js main.dart generates JS from:
import 'dart:html';
void main() {
querySelector('#myid').text = 'Wake up, sleepy head!';
}
Then I add it to the <head>:
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript" src="test.js"></script>
</head>
<body>
<p id="myid">hello</p>
</body>
</html>
But when I run it in Firefox, it doesn't work. It shows only "Hello" on the page. What am I doing wrong?