img attrs: srcset, currentSrc, sizes, referrerPolicy, decoding, loading#40
Merged
thomashoneyman merged 2 commits intopurescript-web:masterfrom Dec 11, 2020
Merged
Conversation
garyb
reviewed
Dec 5, 2020
Member
garyb
left a comment
There was a problem hiding this comment.
Thanks for adding these, but can we introduce sum types for all the stringy attributes that only actually have a set of acceptable values? CanPlayType in this repo would be an existing example of that.
Contributor
Author
|
I wouldn't disagree, but it seemed like a lot of the APIs exposed in this repo are just stringly-typed. Can do though. |
Contributor
Author
|
I think |
fa818b1 to
7ab3f78
Compare
thomashoneyman
approved these changes
Dec 10, 2020
Contributor
thomashoneyman
left a comment
There was a problem hiding this comment.
This looks good to me, though I would appreciate another look from @garyb.
| "lazy" -> Just Lazy | ||
| _ -> Nothing | ||
|
|
||
|
|
Member
|
All seems reasonable to me! Thanks for adding those sums. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
purescript-webprojects. Although MDN is a great resource, it is not a suitable reference for this project.Description
Adding missing attributes for
HTMLImagehttps://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-currentsrc
It would be nice to include
decode(), but since it returns aPromiseand this project doesn't includeAff, I skipped it.