diff --git a/index.bs b/index.bs index 6468441..0b9abdc 100644 --- a/index.bs +++ b/index.bs @@ -50,6 +50,7 @@ table td, table th {
spec:html; type:element; text:link +spec:webidl; type:interface; text:object
@@ -1063,7 +1064,7 @@ interface MediaMetadata { attribute DOMString title; attribute DOMString artist; attribute DOMString album; - attribute FrozenArray<MediaImage> artwork; + attribute FrozenArray<object> artwork; [SameObject] readonly attribute FrozenArray<ChapterInformation> chapterInfo; }; @@ -1094,8 +1095,11 @@ dictionary MediaMetadataInit {- A {{MediaMetadata}} has an associated list of artwork - images. + A {{MediaMetadata}} has an associated sequence of artwork images, which is a sequence of type + {{MediaImage}}. A {{MediaMetadata}} also has has an associated + converted artwork images which is initially
undefined
.@@ -1164,7 +1168,8 @@ dictionary MediaMetadataInit {
When the convert artwork algorithm with input parameter is -invoked, the user agent MUST run the following steps: +invoked, where the input is a sequence of type {{MediaImage}}, the +user agent MUST run the following steps:
- Let output be an empty list of type {{MediaImage}}. @@ -1227,52 +1232,65 @@ invoked, the user agent MUST run the following steps:
The artwork attribute reflects the {{MediaMetadata}}'s artwork - images. On getting, it MUST return the result of the following steps: + images. On getting, it MUST run the following steps:
+ On setting, it MUST run the following steps with value being the + new value being set: +
- - Let frozenArtwork be an empty list of type {{MediaImage}}. -
-- - For each entry in the {{MediaMetadata}}'s artwork images, perform the following steps: + If the {{MediaMetadata}}'s converted artwork images is +
undefined
, run the following steps:
- - Let image be a new {{MediaImage}}. -
-- - Set image's {{MediaImage/src}} to entry's - {{MediaImage/src}}. -
-- - Set image's {{MediaImage/sizes}} to entry's - {{MediaImage/sizes}}. + Let frozenArtwork be a JavaScript Array value.
- - Set image's {{MediaImage/type}} to entry's - {{MediaImage/type}}. + For each entry in the {{MediaMetadata}}'s artwork images, perform the following steps: +
-+
- + Let image be the result of [=converted to a JavaScript + value|converting to a JavaScript object=] entry. +
+- + Perform [=!=] SetIntegrityLevel(image, + "
+frozen
"), to prevent accidental mutation by scripts. +- + Push image to frozenArtwork. +
+- - Call {{Object/freeze(O)}} on image, to prevent accidental - mutation by scripts. + Perform [=!=] SetIntegrityLevel(frozenArtwork, + "
frozen
").- - Append image to frozenArtwork. + Set the {{MediaMetadata}}'s converted artwork images to + frozenArtwork.
- - Create a frozen array from frozenArtwork. + Return the {{MediaMetadata}}'s converted artwork images. +
++
- On setting, it MUST run the - convert artwork algorithm with the new value as input, and - set the {{MediaMetadata}}'s artwork images as the - result if it succeeded.- + Let convertedArtwork be the result of [=converted to an IDL + value|converting=] value to a sequence of type {{MediaImage}}. +
+- + Run convert artwork algorithm with convertedArtwork, and + set the {{MediaMetadata}}'s artwork images as + the result if it succeeds. +
+- + Set the {{MediaMetadata}}'s converted artwork images to +
undefined
.@@ -1369,7 +1387,8 @@ dictionary ChapterInformationInit {
- Let {{ChapterInformationInit/artwork}} be the result of running the - convert artwork algorithm. + convert artwork algorithm with init's + {{ChapterInformation/artwork}} as input.
- Set chapterInfo's artwork