tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

VTTCue.webidl (1698B)


      1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      4 * You can obtain one at http://mozilla.org/MPL/2.0/.
      5 *
      6 * The origin of this IDL file is
      7 * http://dev.w3.org/html5/webvtt/#the-vttcue-interface
      8 */
      9 
     10 enum AutoKeyword { "auto" };
     11 
     12 enum LineAlignSetting {
     13  "start",
     14  "center",
     15  "end"
     16 };
     17 
     18 enum PositionAlignSetting {
     19  "line-left",
     20  "center",
     21  "line-right",
     22  "auto"
     23 };
     24 
     25 enum AlignSetting {
     26  "start",
     27  "center",
     28  "end",
     29  "left",
     30  "right"
     31 };
     32 
     33 enum DirectionSetting {
     34  "",
     35  "rl",
     36  "lr"
     37 };
     38 
     39 [Exposed=Window]
     40 interface VTTCue : TextTrackCue {
     41  [Throws]
     42  constructor(double startTime, double endTime, DOMString text);
     43 
     44  attribute VTTRegion? region;
     45  attribute DirectionSetting vertical;
     46  attribute boolean snapToLines;
     47  attribute (double or AutoKeyword) line;
     48  [SetterThrows]
     49  attribute LineAlignSetting lineAlign;
     50  [SetterThrows]
     51  attribute (double or AutoKeyword) position;
     52  [SetterThrows]
     53  attribute PositionAlignSetting positionAlign;
     54  [SetterThrows]
     55  attribute double size;
     56  attribute AlignSetting align;
     57  attribute DOMString text;
     58  DocumentFragment getCueAsHTML();
     59 };
     60 
     61 // Mozilla extensions.
     62 partial interface VTTCue {
     63  [ChromeOnly]
     64  attribute HTMLDivElement? displayState;
     65  [ChromeOnly]
     66  readonly attribute boolean hasBeenReset;
     67  [ChromeOnly]
     68  readonly attribute double computedLine;
     69  [ChromeOnly]
     70  readonly attribute double computedPosition;
     71  [ChromeOnly]
     72  readonly attribute PositionAlignSetting computedPositionAlign;
     73  [ChromeOnly]
     74  readonly attribute boolean getActive;
     75 };