diff --git a/index.bs b/index.bs
index c61e491..16bec3d 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
@@ -1094,9 +1095,10 @@ dictionary MediaMetadataInit {
- A {{MediaMetadata}} has an associated list of artwork
- images, which is a list of type object on the interface
- but a list of type {{MediaImage}} internally.
+ 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
.
@@ -1140,10 +1142,9 @@ dictionary MediaMetadataInit {
Run the convert artwork algorithm with init's
- {{MediaMetadataInit/artwork}} as input,
- where the input is a list of type {{MediaImage}},
- and set metadata's artwork images
- as the result if it succeeded.
+ {{MediaMetadataInit/artwork}} as input and set
+ metadata's artwork images as the
+ result if it succeeded.
Let chapters be an empty list of type {{ChapterInformation}}.
@@ -1166,7 +1167,7 @@ dictionary MediaMetadataInit {
When the convert artwork algorithm with input parameter is
-invoked, where the input is a list of type {{MediaImage}},
+invoked, where the input is a sequence of type {{MediaImage}},
the user agent MUST run the following steps:
-
@@ -1230,62 +1231,56 @@ 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:
-
- Let frozenArtwork be an empty list of type object.
-
- -
- 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}}.
+ Let frozenArtwork be a Javascript Array value.
-
- Set image's {{MediaImage/src}} to entry's
- {{MediaImage/src}}.
-
- -
- Set image's {{MediaImage/sizes}} to entry's
- {{MediaImage/sizes}}.
-
- -
- Set image's {{MediaImage/type}} to entry's
- {{MediaImage/type}}.
-
- -
- Convert image into an object
- whose type is object.
+ For each entry in the {{MediaMetadata}}'s artwork images, perform the following steps:
+
+ -
+ Convert entry into a Javascript object named image.
+
+ -
+ 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 the object 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 following steps:
-
- Convert the frozenArtwork from a list of type object
- into a list of type {{MediaImage}}.
+ Let convertedArtwork be the result of converting
+ frozenArtwork into a sequence of type {{MediaImage}}.
-
- Run convert artwork algorithm with the converted list as
+ Run convert artwork algorithm with the converted sequence as
input, and set the {{MediaMetadata}}'s
- artwork images as the result if it succeeded.
+ artwork images as the result if it succeeds.
+
+ -
+ Set the {{MediaMetadata}}'s converted artwork images to
undefined
.
@@ -1384,11 +1379,12 @@ 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
- images to the result of [=Create a frozen array|creating a frozen
+ images be the result of [=Create a frozen array|creating a frozen
array=] from {{ChapterInformationInit/artwork}}.
-