Load a dart script dynamically using dart
Are you running this in Dartium (as Dart) or in another browser (as JavaScript)? I'm going to assume the latter. If you look at (http://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/dart.js), it looks for script tags such as foo.dart and automatically loads foo.dart.js. It does this in a window.addEventListener("DOMContentLoaded", function (e) {...}) callback. That callback happens before your code that dynamically adds a script tag.
Hence, you could load helloworld.dart.js in your code instead, which is what (http://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/dart.js) would do anyway. Note, however, that Dart, ideally, tries to treat each script tag as a separate isolate--it's not like JavaScript.
Another way to dynamically load dart code: http://blog.sethladd.com/2013/04/dynamically-load-code-with-dart.html?m=1
Without manipulating the DOM. Using dart:isolates