On a local system, you could compile this and run it in the context of HTML:
#import("dart:dom");
void main() {
window.alert('stuff');
Does it strike anyone else is being odd that you have to explicitly import the dom when including dart via <script type='application/dart'> in a web page?