Skip to content

[dart:js_interop] Support allowInteropCaptureThis in some manner #54381

Closed
@srujzs

Description

@srujzs

Previous iterations of JS interop allowed wrapping callbacks that allowed you to capture the calling this object.

external Function allowInteropCaptureThis(Function f);

While we do have support for allowInterop through Function.toJS, we don't support capturing this. Currently, that js_util method is unsupported in dart2wasm and the usage is low, but it would be nice to support the capture through something like .toJSWithThis so users can migrate off of dart:js_util easier.

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

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions