This is a typical situation in jQuery:
$(\".myClass\").myFunction({
aKey: \'some value\'
});
H
You can use the build-in funcitons querySelector or querySelectorAll instead of the jQuery selector. So it would be:
main(){
querySelector(".myClass").myFunction(){
aKey: 'some value'
}
}
or for mulitple elements:
main(){
querySelectorAll(".myClass").myFunction(){
aKey: 'some value'
}
}
How about use DQuery instead.
DQuery is a porting of jQuery in Dart.
You can do :
main() {
js.context.callMethod(r'$', ['.myClass'])
.callMethod('myFunction', [new js.JsObject.jsify({'aKey': 'some value'})]);
}