Conversion of JS code to Dart. New features.