Skip to content

Specify divergent conversion behavior in dart:js_interop APIs within the docs and not in a note #61494

@srujzs

Description

@srujzs

Currently, divergent behavior is written in a note e.g. https://api.flutter.dev/flutter/dart-js_interop/ListToJSArray/toJS.html. We've historically treated this as unspecified behavior to signal to users that they shouldn't rely on one set of behavior and have it break when switching to a different compiler.

Instead, we should be explicit about said divergent behavior and make that part of the documentation itself. If users do want to rely on one set of behavior with the caveat that they are not targeting other platforms (e.g. only JS and not Wasm), that should be okay.

This came from the discussion around List.toJS in dart-lang/co19#3307.

Metadata

Metadata

Assignees

Labels

area-dart2wasmIssues for the dart2wasm compiler.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

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions