You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, I looked to replace AnchorElement(). It's not clear that you can just put HTML in front of the name and it works: HTMLAnchorElement(). The documentation talks about " HTMLElement became HtmlElement", which is not a helpful example, but not about these basic things.
Also, something like replacing an import like 'package:html/parser.dart' is not clear. Where is the parser?
I'm also wondering if conditional imports like this still work with dart:web
import 'package:fiper/utils/html_functions_empty.dart'
if (dart.library.html) 'package:fiper/utils/html_functions.dart' as html;
The migration document is really not clear on these things
The text was updated successfully, but these errors were encountered:
It's not clear that you can just put HTML in front of the name and it works: HTMLAnchorElement()
Well, the strategy doesn't always work. :) There is a dart fix for this you can try applying: https://dart.dev/interop/js-interop/package-web#renames. We hope to continue to add more. In the same section, there is some information on how to find the corresponding type in package:web if the name is different (look and compare the @Native and @JS annotations), but noted that it might not be obvious.
Also, something like replacing an import like 'package:html/parser.dart' is not clear. Where is the parser?
I don't understand. package:html is a separate thing entirely and is intended for parsing HTML. dart:html and package:web contain bindings to interact with the DOM and browser APIs.
I'm also wondering if conditional imports like this still work with dart:web
The documentation on migrating from dart:html is not really clear on https://dart.dev/interop/js-interop/package-web
For example, I looked to replace AnchorElement(). It's not clear that you can just put HTML in front of the name and it works: HTMLAnchorElement(). The documentation talks about " HTMLElement became HtmlElement", which is not a helpful example, but not about these basic things.
Also, something like replacing an import like 'package:html/parser.dart' is not clear. Where is the parser?
I'm also wondering if conditional imports like this still work with dart:web
The migration document is really not clear on these things
The text was updated successfully, but these errors were encountered: