linter icon indicating copy to clipboard operation
linter copied to clipboard

proposal: `legacy_js_interop`

Open kevmoo opened this issue 3 years ago • 4 comments

legacy_js_interop

Description

Warn on all usage of "legacy" JS-interop features that are not compatible w/ dart2wasm

Details

See https://github.com/dart-lang/sdk/issues/50665

Will need to pull in @srujzs or similar for all details

Kind

Guards against errors when targeting dart2wasm

Bad Examples

TBD – using dart:js features, dart:html

Good Examples

Using new JS interop features TBD

Discussion

See https://github.com/dart-lang/sdk/issues/50665

kevmoo avatar Dec 08 '22 21:12 kevmoo

"legacy" JS-interop features that are not compatible w/ dart2wasm

What features are these?

mnordine avatar Dec 08 '22 22:12 mnordine

@mnordine – we're not quite ready to enumerate them. We're hoping to have a story outlined by end-of-January

kevmoo avatar Dec 08 '22 22:12 kevmoo

@kevmoo I think js_bindings is a good way to avoid dart:js and dart:html.

Please, tell us if you need us to change anything in the lib to make it comp to this new wasm/js standard.

jodinathan avatar Dec 09 '22 13:12 jodinathan

An alternative, but a bit stricter, proposal: https://github.com/dart-lang/sdk/issues/54347

parlough avatar Dec 18 '23 00:12 parlough