This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22968 - VTTCue::vertical setter's use of enum prevents raising SyntaxError
Summary: VTTCue::vertical setter's use of enum prevents raising SyntaxError
Status: RESOLVED FIXED
Alias: None
Product: TextTracks CG
Classification: Unclassified
Component: WebVTT (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Philip Jägenstedt
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard: v1
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-15 05:08 UTC by Glenn Adams
Modified: 2014-01-29 02:24 UTC (History)
4 users (show)

See Also:


Attachments

Description Glenn Adams 2013-08-15 05:08:37 UTC
Now that the vertical attribute uses an enum type, DirectionSetting, according to WebIDL [1] Section 3.5 Enumerations:

"In the ECMAScript binding [of an Enumeration], assignment of an invalid string value to an attribute is ignored, while passing such a value as an operation argument results in an exception being thrown."

Consequently, the spec describing align needs to change

"If none of the values match, then the user agent must instead throw a SyntaxError exception."

to

"If none of the values match, then the user agent must ignore the attempt to set the attribute."

Note that I've asked the editor of WebIDL if perhaps the "strict" mode in ES should cause an exception rather than ignore the attempt, but have received no response yet.

[1] http://dev.w3.org/2006/webapi/WebIDL/
Comment 2 Philip Jägenstedt 2014-01-29 02:24:14 UTC
Fixed in https://github.com/w3c/webvtt/pull/28

Thanks Glenn!