Skip to content

Commit

Permalink
Initial pass to cleanup dom.dart to use newer JS interop styles (flut…
Browse files Browse the repository at this point in the history
…ter#54093)

This only addresses the following:

- Removes `JSVoid` in favor of `void`. `JSVoid`, which is just a
typedef, should be deprecated and removed eventually.
- Removes extra interop methods that were needed to make sure arity was
correct. These are no longer needed as interop methods are
invocation-sensitive and calls to them do not forward more arguments
than were passed by the user.
- Removes unnecessary annotations on extensions.

Still left to do (not comprehensive):

- Migrate to extension types.
- Remove forwarding methods that are only used to convert primitives in
favor of changing the interop method to include the Dart primitive type.
It might be a bit slower in dart2wasm to do this, but will need to
verify and fix it if that's the case.
- Remove usage of `js_util`.
- See if we can replace types with their `package:web` equivalent for
easier maintenance.
  • Loading branch information
srujzs authored Jul 25, 2024
1 parent 97ccbc3 commit 1a490c3
Showing 1 changed file with 169 additions and 226 deletions.
Loading

0 comments on commit 1a490c3

Please sign in to comment.