Update type of MediaMetadata's artwork#343
Merged
Conversation
Since the entries in the MediaMetadata's `artwork` are frozen in the current spec [1], the type of the attribute `artwork` must be `FrozenArray<object>` rather than `FrozenArray<MediaImage>`. Otherwise the entries of artwork can not be frozen [2]. This change will address issue w3c#237 The `artwork` in `MediaMetadataInit` and `MediaMetadata` will be clearly different after changing the `artwork` in `MediaMetadata` to `FrozenArray<object>`, hence the _getter_, _setter_ of `artwork` and the _convert artwork algorithm_ should be updated to match the change. This change will address issue w3c#176 [1] https://github.com/web-platform-tests/wpt/blob/801a2b3b5e1cd0192f31890ddf9ee7b4d0ad9e89/mediasession/mediametadata.html#L148 [2] https://tc39.es/ecma262/#sec-object.freeze
Co-authored-by: Marcos Cáceres <marcos@marcosc.com>
Contributor
Author
|
Also fixes #241. |
71a1d94 to
94700d3
Compare
Contributor
Author
|
May also fix #183 |
Contributor
Author
Fixes w3c#237 Introduce a slot where we store the FrozenArray so that the getter always returns the same object. Make sure the slot is reset when the setter is called.
94700d3 to
a742014
Compare
This was referenced Sep 27, 2024
annevk
reviewed
Sep 27, 2024
Member
annevk
left a comment
There was a problem hiding this comment.
I think this is correct. The one thing I'd change is to link "convert" throughout.
(And maybe I should finally fix whatwg/notifications#125 to say a similar thing.)
cc @domenic
59e9874 to
6f5ac63
Compare
Contributor
Author
|
@annevk, I updated the convert links. |
steimelchrome
approved these changes
Oct 1, 2024
Contributor
Author
|
Testing now actually, Firefox is actually aligned with the spec ( |
Contributor
Author
This was referenced Oct 4, 2024
github-actions bot
added a commit
that referenced
this pull request
Oct 4, 2024
SHA: 3fbd743 Reason: push, by youennf Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Fixes #237
Introduce a slot where we store the FrozenArray so that the getter always returns the same object.
Make sure the slot is reset when the setter is called.
Implement the conversion on setter and on getter.
Based on #243 work from @ChunMinChang
Preview | Diff