Skip to content

Allow @JS on class method #24779

Closed
Closed
@a14n

Description

@a14n

Unlike top level function putting @JS on a class method has no effect.
A use case where it is needed is to make a Js member named _m1() on A be used outside of the current dart library.

@JS
class A {
  external A();
  external _m1();
} 

I'd like to be able to have:

@JS
class A {
  external A();
  @JS('_m1') external m1();
} 

Metadata

Metadata

Assignees

Labels

area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-js-interopIssues that impact all js interop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions