You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An arbitrary string of one or more characters other than U+0020 SPACE or U+0009 CHARACTER TABULATION character. The string must not contain the substring "-->" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN). An identifier is required for a region to exist.
One or more characters means it can't be the empty string. So what is then the initial value when creating a VTTRegion with the constructor?
This part also doesn't make sense to me:
An identifier is required for a region to exist.
"required" is an RFC2119 keyword, but what is this requiring, from whom (author or UA)? If it's intended to be a statement of fact, which requirements does it follow from?
So I think we can choose one of the following approaches:
Allow empty identifiers, but say that from parsing, a cue cannot be associated with a region if the identifier is the empty string, but they can be associated with the API.
Enforce non-empty identifiers during parsing and in the API. The parser would drop the region on the floor as a last step in https://w3c.github.io/webvtt/#collect-webvtt-region-settings if the identifier is the empty string. In the API we would add a required argument to the constructor and have it throw if the empty string is given, and the id setter would also throw if it's set to the empty string.
I don't see what the value is of (2) over (1); when using the API there's no reason to mint an identifier, and the change to require a non-empty identifier would be a breaking change. So I suggest we opt for (1).
The text was updated successfully, but these errors were encountered:
#349 introduced VTTRegion id
In web-platform-tests/wpt#6885 I tried to write a test for it.
The spec says that the identifier (in the model) is: https://w3c.github.io/webvtt/#webvtt-region-identifier
One or more characters means it can't be the empty string. So what is then the initial value when creating a
VTTRegion
with the constructor?This part also doesn't make sense to me:
"required" is an RFC2119 keyword, but what is this requiring, from whom (author or UA)? If it's intended to be a statement of fact, which requirements does it follow from?
From parsing, a region can well be created with an empty identifier:
https://w3c.github.io/webvtt/#collect-a-webvtt-block
So I think we can choose one of the following approaches:
id
setter would also throw if it's set to the empty string.I don't see what the value is of (2) over (1); when using the API there's no reason to mint an identifier, and the change to require a non-empty identifier would be a breaking change. So I suggest we opt for (1).
The text was updated successfully, but these errors were encountered: