-
Notifications
You must be signed in to change notification settings - Fork 24
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
JSImmutableListWrapper
should index using []
instead of .item
#316
Comments
There are for (var i = 0; i < textTracks.length; i++) {
print(textTracks[i]);
} There's a small Dart list wrapper we use for many other list types to make it more ergonomic, but it looks like Note that this wrapper can never emulate the exact semantics of |
The operator It does have a |
You'll likely need to update your pubspec version to at least v1.1.0: Line 3983 in d3a61aa
external indexing operators can be defined either in interop extension types or in extensions on one: https://dart.dev/interop/js-interop/usage#interop-type-members
|
You are right, the template for plugins was created with an old compatiblity of the web dependency. I created a PR in flutter. |
Thank you for the hint and indeed, it would be good to have such a wrapper for all lists. As far as I understood, there is a common TS/JS type for iterables based on This enables the helper to just use the |
Nice! It does look like that may be the case (I'll need to double-check but your linked PR gives me more confidence). I'll rename this bug to reflect tracking this change. Edit: Alas, it may not be true for |
TrackList
s are not iterableJSImmutableListWrapper
should index using []
instead of .item
Thank you! Yes, this should be double-checked, I'm no expert in TS ^^ |
This adds support for web 1.x.x to be included in the plugin template, when creating a web plugin. I don't have an issue referenced. Related to dart-lang/web#316
The
HTMLVideoElement
textTracks
/TextTrackList
,audioTracks
/AudioTrackList
,videoTracks
/VideoTrackList
are not iterable.This is a regression comparing to the dart:html directive.
https://api.flutter.dev/flutter/dart-html/TextTrackList-class.html
https://pub.dev/documentation/web/latest/web/TextTrackList-extension-type.html
The consequence is, that we cannot return a list of available tracks, as the list is basically not accessible.
The method
getTrackById
is only searching the tracks by their DOM id (as far as I understood).All these track lists should implement some form of iterable.
The text was updated successfully, but these errors were encountered: