Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw exception when setting region id "-->" ? #405

Closed
bechen opened this issue Oct 31, 2017 · 5 comments
Closed

Throw exception when setting region id "-->" ? #405

bechen opened this issue Oct 31, 2017 · 5 comments

Comments

@bechen
Copy link

bechen commented Oct 31, 2017

Hi all, I'm implementing region id attribute for firefox.
https://w3c.github.io/webvtt/#dom-vttregion-id
https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/region.html#webvtt-region-identifier

It says region id doesn't allow "-->" substring, so on setter, should we throw or just set it to null string?

@fsoder
Copy link

fsoder commented Oct 31, 2017

You should set it to the string "-->"?

@bechen
Copy link
Author

bechen commented Nov 1, 2017

https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/region.html#webvtt-region-identifier
" The string must not contain the substring "-->" "
So what UA should do if the string contain "-->"?

@fsoder
Copy link

fsoder commented Nov 1, 2017

AFAIK, that's only a parsing restriction. Setting "-->" on a VTTRegion needn't care about it. (Post parsing, the region id is only for CSS matching.)

(Also, you should probably be looking at https://w3c.github.io/webvtt/#regions and not the link above.)

@silviapfeiffer
Copy link
Member

The parsing is specified in the spec - you just need to follow it. It's an authoring error when a --> is included, but you can pretty much ignore that. Just follow the parsing specification and the result will fall out.

@silviapfeiffer
Copy link
Member

Also, what @fsoder said. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants