I am using a Bootstrap Modal dialog in Dart via js interop. All works OK apart from listening for the custom events. I am trying to listen to the "shown" event using the following code:
js.scoped(() {
js.context.jQuery("#myModal").on("shown", new js.Callback.once(() {
print("Dialog Shown");
}));
});
However, I get the following Dart error when the event is fired:
Class '() => dynamic' has no instance method 'call'.
NoSuchMethodError : method not found: 'call'
Receiver: Closure: (dynamic) => dynamic
Arguments: [Instance of 'Proxy']
Any ideas what I'm doing wrong?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…