1
votes

I have problem with my code which is using 3rd party library. When I use it in the plain Dart itself it already works, but not with Angular.Dart. I have used chapter3 from Dart tutorial and just added my code in recipe_book.dart which is compoment.

Place where the code fails is shown in the picture below. After i get

Breaking on exception: object must be an Node, ArrayBuffer, Blob, ImageData, or IDBKeyRange

I don't have idea how to get rid of this:-( Maybe it is something somebody more familiar with Angulart.dart can answer right away.

Anybody willing to help can check the code here on github

enter image description here

1
Can you please try without the .fromBrowserObject, maybe even without new JsObject... like just event['target'] and add a comment about the outcome? - Günter Zöchbauer
Works, but why is that? It was working in plain Dart. I use it according to your advice here stackoverflow.com/a/28589897/2944265. I am really confused now. - Zveratko
So thanks again for insight. I'm playing with Dart just to get rid of javascript, but forced to use this JS library it is a mess. I didn't thought Angular.Dart handles events, I thought it is javascript's job. - Zveratko
Your screenshot didn't provide enough information. I just had a look at your code in the repo and from this I can tell that Angular isn't involed with the event. I looked briefly at the code examples but I can't tell why the event in the linked question didn't arrive in the same form as in your current code. - Günter Zöchbauer

1 Answers

0
votes

The debugger shows it is already a JsObject, just omit the new JsObject(...) call.