[Type Definition] - Updates the manifest types to reflect the current specifications #68273
+42
−37
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.
manifest-types.ts
The current types in
manifest-types.ts
are out of date in places and incorrect in places. This PR resolves the known issues.file_handlers
The
file_handlers
array should contain objects with anaccept
object not anaccept
array.See:
icons and shortcuts.icons
The
icon.purpose
badge
value was replaced bymonochrome
and no longer exists in the specification.See:
launch_handler
The
launch_handler
object currently supports one valueclient_mode
that is a string or array of strings.The strings have to be one of the defined values.
I'm curious where the
platform
andurl
values came from. I could not find those values in any documentation new or old.See:
protocol_handlers
The
protocol_handlers
object does not support atitle
value.I could not find any old or new documentation showing the
title
value.See:
screenshots
The
screenshots
object supportsform_factor
,label
, andplatform
in addition to the other image related values.The
form_factor
value has to be eithernarrow
orwide
if specified.The
platform
value, if specified, has to be one of the defined values.See:
serviceworker
This member was removed from the specification.
See:
share_target
The
share_target.params
had the valuesname
,value
, andrequired
. I could not find any old or new documentation showing these values.The
share_target
had the valuesurl
,title
,text
, andfiles
as direct values. These values should be, instead, values ofshare_target.params
.The
action
andparams
members are required.The
method
string is case insensitive. (See bullet point2.
at https://w3c.github.io/web-share-target/level-2/#share_target-member). For practical reasons the type includes all caps and all lower variants.The
enctype
must beapplication/x-www-form-urlencoded
ormultipart/form-data
. Previouslytext/plain
was included as a valid value but it is not. (See various places where it lists the valid values at https://w3c.github.io/web-share-target/level-2/#share_target-member)The
share_target.params
value should be an object not an array of objects.The
share_target.params.files
value should accept a single file or an array of files. (See bullet point5.
for single file and bullet point6.
for array of files at https://w3c.github.io/web-share-target/level-2/#share_target-member)The
share_target.params.files.accept
value should accept a string or array of strings. (See bullet point7. 2.
for string and bullet point7. 3.
for array of strings at https://w3c.github.io/web-share-target/level-2/#share_target-member)See: