-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[dart2js] Iterator
is confused with NodeIterator
#53532
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
Comments
due to bug in sdk: dart-lang/sdk#53532 this class was getting cast to `DomIterator` resolves Zekfad/fetch_client#9
Related parts: sdk/tools/dom/web_library_bindings.dart Line 9326 in 96bd779
|
I might be missing some key details here, but doing a similar example prints false instead of throwing for me on dart2js. On Chrome, it looks like the headers iterator is a subtype of I think the right solution is what you have: create a
|
@srujzs thank for your reply. So JS have a "iterator protocol", and only recently Chrome got public So, maybe SDK should add iteration result type? My implementation: https://github.com/Zekfad/fetch_api/blob/master/lib/src/iterator_result.dart |
Yeah I think it'd be useful for users to have a goto |
Coming from Zekfad/fetch_client#9
There are new
Iterator
global class with Chrome 117+JS compiler confuses it with
DomIterator
(which I believe isNodeIterator
)Following code throws in Chrome 117+ and works fine on older versions or on Safari/Firefox:
The text was updated successfully, but these errors were encountered: