Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update next-generation JS interop discussion #5285

Closed
domesticmouse opened this issue Oct 25, 2023 · 5 comments · Fixed by #5436
Closed

Update next-generation JS interop discussion #5285

domesticmouse opened this issue Oct 25, 2023 · 5 comments · Fixed by #5436
Assignees
Labels
dev.interop Relates to use of native code as part of your Dart app e1-hours Can complete in < 8 hours of normal, not dedicated, work p1-high Major but not urgent concern: Resolve in months. Update each month. target.web Target apps on the web platform

Comments

@domesticmouse
Copy link
Member

Page URL

https://dart.dev/web/js-interop.html

Page source

https://github.com/dart-lang/site-www/tree/main/src/web/js-interop.md

Describe the problem

This page mentions "when Dart 3 lands."

Which is checks watch a while ago now.

Expected fix

Update the content of this page to reflect Dart 3.1 as current stable.

Additional context

No response

@parlough parlough added p1-high Major but not urgent concern: Resolve in months. Update each month. e1-hours Can complete in < 8 hours of normal, not dedicated, work target.web Target apps on the web platform dev.interop Relates to use of native code as part of your Dart app labels Oct 25, 2023
@parlough
Copy link
Member

Besides adjusting Dart 3 mention, a general check to make sure the discussion and suggestions in this section are still correct would be good since a lot has changed over the past 9 months.

@parlough parlough changed the title [PAGE ISSUE]: 'JavaScript interoperability' Update next-generation JS interop discussion Oct 25, 2023
@domesticmouse
Copy link
Member Author

Adding dart-lang/sdk#35084 is useful context for this issue.

@parlough
Copy link
Member

@kevmoo @srujzs @sigmundch

Would you be able to take a look at this page and see if everything still is correct and matches the latest suggestions and expectations? Also, should we call out anything else? Suggest trying out package:web, etc?

@srujzs
Copy link
Contributor

srujzs commented Nov 16, 2023

There are a few changes here that I think we need:

  • Dart 3 -> Dart 3.3
  • We want people to move to dart:js_interop and dart:js_interop_unsafe wherever they can instead of package:js and dart:js_util. We want to remove support for the latter two in dart2wasm. dart:js_interop should give you all that you need for @staticInterop interfaces that you could previously define with package:js. Both dart:js_interop and dart:js_interop_unsafe should be enough to cover most of the functionality in dart:js_util. There are a few small pieces missing that I need to add to reach parity.
  • I think we're ready for users to try out extension types pretty soon here (maybe once we hit the 3.3 cutoff EOY).
  • It's worth suggesting package:web but we're still not quite at stable yet. I'd like to migrate that package to extension types and address some of the missing gaps before we're ready to commit to few breaking changes.

I'm chatting with @MaryaBelanger next week to discuss docs for interop in general now that we're basically feature-complete.

@MaryaBelanger
Copy link
Contributor

Adding to note we'll probably continue to work in this draft/outline PR #4578

parlough added a commit that referenced this issue Dec 28, 2023
This is more of a stop gap to correct the page of current inaccuracies
until we have a chance to create the actual static interop docs.
Primarily pushing new uses to `dart:js_interop` rather than
`package:js`.

Fixes #5285
@parlough parlough changed the title Update next-generation JS interop discussion https://github.com/dart-lang/site-www/issues/5438 Jan 16, 2024
@parlough parlough changed the title https://github.com/dart-lang/site-www/issues/5438 Update next-generation JS interop discussion Jan 16, 2024
atsansone pushed a commit to atsansone/site-www that referenced this issue Jan 26, 2024
This is more of a stop gap to correct the page of current inaccuracies
until we have a chance to create the actual static interop docs.
Primarily pushing new uses to `dart:js_interop` rather than
`package:js`.

Fixes dart-lang#5285
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev.interop Relates to use of native code as part of your Dart app e1-hours Can complete in < 8 hours of normal, not dedicated, work p1-high Major but not urgent concern: Resolve in months. Update each month. target.web Target apps on the web platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants