You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above code works compiled to JS, but in Dartium, in throws this error:
Exception: No top-level getter or setter 'jsMethod' declared.
NoSuchMethodError: method not found: 'jsMethod'
Receiver: top-level
Arguments: [...]
Note the .dart_js_interop_patch.dart file:
import'dart:js'as js_library;
/** * Placeholder object for cases where we need to determine exactly how many * args were passed to a function. */const_UNDEFINED_JS_CONST=constObject();
patch $jsMethod() {
return js_library.JsNative.callMethod(js_library.context, '$jsMethod',[]);}
The dollar sign in $jsMethod should be escaped, otherwise it incorrectly tries to interpolate the rest of the method name.
The text was updated successfully, but these errors were encountered:
The above code works compiled to JS, but in Dartium, in throws this error:
Note the
.dart_js_interop_patch.dart
file:The dollar sign in
$jsMethod
should be escaped, otherwise it incorrectly tries to interpolate the rest of the method name.The text was updated successfully, but these errors were encountered: