-
Notifications
You must be signed in to change notification settings - Fork 162
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
Add Image
facade and additional facades for HTMLImageElement
#621
#725
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM! Thanks :)
The only thing I'm going think on is ImageLoadingMode
. Unless we can find a more "official" name for it somewhere, "mode" seems fine to me.
- MDN calls it a "hint"
https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/loading - Typescript calls it a "policy"
https://github.com/microsoft/TypeScript/blob/4110b80fbb24f2ac6dd284ef3511ca69ac6db517/lib/lib.dom.d.ts#L6869-L6870 - WHATWG doesn't seem to have a name for it at all.
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-loading
Actually finding a name for I was also wondering if it should be |
Ha yeah I thought as much 😂 Looking at the existing enums we have, both "mode" and "policy" are common. So I think either is a fine choice. No "hint". Now it's just a philosophical question of what the difference between those is 🤔 |
I guess "mode" sounds like it can only be certain cases, whereas policy sounds more like "something that just should be followed but might not be"? Naming is hard :P |
lol, well what about this? They seem to call it a "state" The other thing that's notable is that it's not specific to |
Yuck, I don't find state fitting, but spec is spec... Can rename to something like |
Ok ... coming back to this ... 😅 I think I'm in favor of |
@armanbilge I renamed it to LazyLoadingState and changed the Longs to Doubles! |
Image
face and additional facades for HTMLImageElement
#621Image
facade and additional facades for HTMLImageElement
#621
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on this, thanks for reminding me about it! 🚲 🏚️
Another good first issue!