-
Notifications
You must be signed in to change notification settings - Fork 32
Handle LegacyFactoryFunction
s in generator
#124
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
Copying your reply from flutter/flutter#139125 :
Now is this a future compatible workaround, in the sense of, wiil the |
Yes, it should. |
Ah, got it. In my head, I was completely off track in what I had thought you meant. Now that I understand what you meant, I guess my question just to confirm is, can I assume that the typecast |
It's worth noting that this package is still not at v1, mostly because we want to keep adding features and migrate to extension types before we do so. |
I had the same issue for
Is this issue for all HTML elements or audio element only? |
The issue states that it's not all, not one, but exactly "three". The surface area is small. ( |
@ryanheise is correct here: this is a different bug even though it has similar results. Responded in #183. |
@srujzs Based on the following description for [LegacyFactoryFunction] values,
Would you say the following would be a correct representation of such factory functions in dart? HTMLAudioElement Audio(String src){
return HTMLAudioElement()..src =src;
} Are there any other specifics that we want to take into account if we have to add support for |
I actually don't think this is needed anymore. These are legacy ways to construct 3 element types. We added default constructors to call |
Some interfaces in the Web IDL have a
LegacyFactoryFunction
defined in their metadata e.g.HTMLAudioElement
that tells us that the factory for that interface is defined differently e.g.HTMLAudioElement
here: https://html.spec.whatwg.org/multipage/media.html#the-audio-element.The surface area of this metadata is small, affecting 3 interfaces today, all of which are elements and can be instantiated using
createElement
.The text was updated successfully, but these errors were encountered: