html library Null safety

HTML Standard

https://html.spec.whatwg.org/multipage/

Classes

AbstractWorker
AnimationFrameProvider
AssignedNodesOptions
AudioTrack
The interface represents a single audio track from one of the HTML media elements, <audio> or <video>. The most common use for accessing an object is to toggle its enabled property in order to mute and unmute the track.
AudioTrackList
The interface is used to represent a list of the audio tracks contained within a given HTML media element, with each track represented by a separate AudioTrack object in the list. Retrieve an instance of this object with HTMLMediaElement.audioTracks. The individual tracks can be accessed using array syntax.
BarProp
The interface of the Document Object Model represents the web browser user interface elements that are exposed to scripts in web pages. Each of the following interface elements are represented by a object.
BeforeUnloadEvent
The beforeunload event is fired when the window, the document and its resources are about to be unloaded. When a non-empty string is assigned to the returnValue Event property, a dialog box appears, asking the users for confirmation to leave the page (see example below). When no value is provided, the event is processed silently. Some implementations only show the dialog box if the frame or any embedded frame receives a user gesture or user interaction. See Browser compatibility for more information.
BroadcastChannel
The interface represents a named channel that any browsing context of a given origin can subscribe to. It allows communication between different documents (in different windows, tabs, frames or iframes) of the same origin. Messages are broadcasted via a message event fired at all objects listening to the channel. Note: This feature is available in Web Workers
CanvasCompositing
CanvasDrawImage
CanvasDrawPath
CanvasFillStrokeStyles
CanvasFilters
CanvasGradient
The interface represents an opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient(), CanvasRenderingContext2D.createConicGradient() or CanvasRenderingContext2D.createRadialGradient(). It can be used as a fillStyle or strokeStyle.
CanvasImageData
CanvasImageSmoothing
CanvasPath
CanvasPathDrawingStyles
CanvasPattern
The interface represents an opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. It can be used as a fillStyle or strokeStyle.
CanvasRect
CanvasRenderingContext2D
The interface, part of the Canvas API, provides the 2D rendering context for the drawing surface of a <canvas> element. It is used for drawing shapes, text, images, and other objects. See the interface's properties and methods in the sidebar and below. The Canvas tutorial has more explanation, examples, and resources, as well.
CanvasRenderingContext2DSettings
CanvasShadowStyles
CanvasState
CanvasText
CanvasTextDrawingStyles
CanvasTransform
CanvasUserInterface
CustomElementRegistry
The interface provides methods for registering custom elements and querying registered elements. To get an instance of it, use the window.customElements property.
DataTransfer
The object is used to hold the data that is being dragged during a drag and drop operation. It may hold one or more data items, each of one or more data types. For more information about drag and drop, see HTML Drag and Drop API. This object is available from the dataTransfer property of all drag events.
DataTransferItem
The object represents one drag data item. During a drag operation, each drag event has a dataTransfer property which contains a list of drag data items. Each item in the list is a object. This interface has no constructor.
DataTransferItemList
The object is a list of DataTransferItem objects representing items being dragged. During a drag operation, each DragEvent has a dataTransfer property and that property is a . The individual items can be accessed using the array operator []. This interface has no constructor.
DedicatedWorkerGlobalScope
The object (the Worker global scope) is accessible through the self keyword. Some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in the JavaScript Reference. See also: Functions available to workers.
DocumentAndElementEventHandlers
DOMParser
The interface provides the ability to parse XML or HTML source code from a string into a DOM Document. You can perform the opposite operation—converting a DOM tree into XML or HTML source—using the XMLSerializer interface. In the case of an HTML document, you can also replace portions of the DOM with new DOM trees built from HTML by setting the value of the Element.innerHTML and outerHTML properties. These properties can also be read to fetch HTML fragments corresponding to the corresponding DOM subtree. Note that XMLHttpRequest can parse XML and HTML directly from a URL-addressable resource, returning a Document in its response property.
DOMStringList
A type returned by some APIs which contains a list of DOMString (strings).
DOMStringMap
The interface is used for the HTMLElement.dataset/SVGElement.dataset attribute, to represent data for custom attributes added to elements.
DragEvent
The interface is a DOM event that represents a drag and drop interaction. The user initiates a drag by placing a pointer device (such as a mouse) on the touch surface and then dragging the pointer to a new location (such as another DOM element). Applications are free to interpret a drag and drop interaction in an application-specific way. This interface inherits properties from MouseEvent and Event.
DragEventInit
ElementContentEditable
ElementDefinitionOptions
ElementInternals
The interface of the Document_Object_Model gives web developers a way to allow custom elements to fully participate in HTML forms. It provides utilities for working with these elements in the same way you would work with any standard HTML form element, and also exposes the Accessibility Object Model to the element.
ErrorEvent
The interface represents events providing information related to errors in scripts or in files.
ErrorEventInit
EventSource
The interface is web content's interface to server-sent events. An instance opens a persistent connection to an HTTP server, which sends events in text/event-stream format. The connection remains open until closed by calling EventSource.close().
EventSourceInit
External
FocusOptions
FormDataEvent
The interface represents a formdata event — such an event is fired on an HTMLFormElement object after the entry list representing the form's data is constructed. This happens when the form is submitted, but can also be triggered by the invocation of a FormData() constructor. This allows a FormData object to be quickly obtained in response to a formdata event firing, rather than needing to put it together yourself when you wish to submit form data via a method like XMLHttpRequest (see Using FormData objects).
FormDataEventInit
GlobalEventHandlers
The mixin describes the event handlers common to several interfaces like HTMLElement, Document, or Window. Each of these interfaces can, of course, add more event handlers in addition to the ones listed below.
HashChangeEvent
The interface represents events that fire when the fragment identifier of the URL has changed. The fragment identifier is the part of the URL that follows (and includes) the # symbol.
HashChangeEventInit
History
The interface allows manipulation of the browser session history, that is the pages visited in the tab or frame that the current page is loaded in.
HTMLAllCollection
HTMLAnchorElement
The interface represents hyperlink elements and provides special properties and methods (beyond those of the regular HTMLElement object interface that they inherit from) for manipulating the layout and presentation of such elements. This interface corresponds to <a> element; not to be confused with <link>, which is represented by HTMLLinkElement)
HTMLAreaElement
The interface provides special properties and methods (beyond those of the regular object HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <area> elements.
HTMLAudioElement
The interface provides access to the properties of <audio> elements, as well as methods to manipulate them. This element is based on, and inherits properties and methods from, the HTMLMediaElement interface.
HTMLBaseElement
The interface contains the base URI for a document. This object inherits all of the properties and methods as described in the HTMLElement interface.
HTMLBodyElement
The interface provides special properties (beyond those inherited from the regular HTMLElement interface) for manipulating <body> elements.
HTMLBRElement
The interface represents an HTML line break element (<br>). It inherits from HTMLElement.
HTMLButtonElement
The interface provides properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <button> elements.
HTMLCanvasElement
The interface provides properties and methods for manipulating the layout and presentation of <canvas> elements. The interface also inherits the properties and methods of the HTMLElement interface.
HTMLDataElement
The interface provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <data> elements.
HTMLDataListElement
The interface provides special properties (beyond the HTMLElement object interface it also has available to it by inheritance) to manipulate <datalist> elements and their content.
HTMLDetailsElement
The interface provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <details> elements.
HTMLDialogElement
Experimental: This is an experimental technologyCheck the Browser compatibility table carefully before using this in production. The interface provides methods to manipulate <dialog> elements. It inherits properties and methods from the HTMLElement interface.
HTMLDirectoryElement
HTMLDivElement
The interface provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <div> elements.
HTMLDListElement
The interface provides special properties (beyond those of the regular HTMLElement interface it also has available to it by inheritance) for manipulating definition list (<dl>) elements.
HTMLElement
The interface represents any HTML element. Some elements directly implement this interface, while others implement it via an interface that inherits it.
HTMLEmbedElement
The interface provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <embed> elements.
HTMLFieldSetElement
The interface provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <fieldset> elements.
HTMLFontElement
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. Implements the document object model (DOM) representation of the font element. The HTML Font Element <font> defines the font size, font face and color of text.
HTMLFormControlsCollection
The interface represents a collection of HTML form control elements. It represents the lists returned by the HTMLFormElement interface's elements property and the HTMLFieldSetElement interface's elements property. This interface replaces one method from HTMLCollection, on which it is based.
HTMLFormElement
The interface represents a <form> element in the DOM. It allows access to—and, in some cases, modification of—aspects of the form, as well as access to its component elements.
HTMLFrameElement
HTMLFrameSetElement
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. The interface provides special properties (beyond those of the regular HTMLElement interface they also inherit) for manipulating <frameset> elements.
HTMLHeadElement
The interface contains the descriptive information, or metadata, for a document. This object inherits all of the properties and methods described in the HTMLElement interface.
HTMLHeadingElement
The interface represents the different heading elements, <h1> through <h6>. It inherits methods and properties from the HTMLElement interface.
HTMLHRElement
The interface provides special properties (beyond those of the HTMLElement interface it also has available to it by inheritance) for manipulating <hr> elements.
HTMLHtmlElement
The interface serves as the root node for a given HTML document. This object inherits the properties and methods described in the HTMLElement interface. You can retrieve the object for a given document by reading the value of the document.documentElement property.
HTMLHyperlinkElementUtils
HTMLIFrameElement
The interface provides special properties and methods (beyond those of the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of inline frame elements.
HTMLImageElement
The interface represents an HTML <img> element, providing the properties and methods used to manipulate image elements.
HTMLInputElement
The interface provides special properties and methods for manipulating the options, layout, and presentation of <input> elements.
HTMLLabelElement
The interface gives access to properties specific to <label> elements. It inherits methods and properties from the base HTMLElement interface.
HTMLLegendElement
The is an interface allowing to access properties of the <legend> elements. It inherits properties and methods from the HTMLElement interface.
HTMLLIElement
The interface exposes specific properties and methods (beyond those defined by regular HTMLElement interface it also has available to it by inheritance) for manipulating list elements.
HTMLLinkElement
The interface represents reference information for external resources and the relationship of those resources to a document and vice-versa (corresponds to <link> element; not to be confused with <a>, which is represented by HTMLAnchorElement). This object inherits all of the properties and methods of the HTMLElement interface.
HTMLMapElement
The interface provides special properties and methods (beyond those of the regular object HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of map elements.
HTMLMarqueeElement
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. The interface provides methods to manipulate <marquee> elements. It inherits properties and methods from the HTMLElement interface.
HTMLMediaElement
The interface adds to HTMLElement the properties and methods needed to support basic media-related capabilities that are common to audio and video. The HTMLVideoElement and HTMLAudioElement elements both inherit this interface.
HTMLMenuElement
Experimental: This is an experimental technologyCheck the Browser compatibility table carefully before using this in production. The interface provides special properties (beyond those defined on the regular HTMLElement interface it also has available to it by inheritance) for manipulating <menu> elements.
HTMLMetaElement
The interface contains descriptive metadata about a document. It inherits all of the properties and methods described in the HTMLElement interface.
HTMLMeterElement
The HTML <meter> elements expose the interface, which provides special properties and methods (beyond the HTMLElement object interface they also have available to them by inheritance) for manipulating the layout and presentation of <meter> elements.
HTMLModElement
The interface provides special properties (beyond the regular methods and properties available through the HTMLElement interface they also have available to them by inheritance) for manipulating modification elements, that is <del> and <ins>.
HTMLObjectElement
The interface provides special properties and methods (beyond those on the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <object> element, representing external resources.
HTMLOListElement
The interface provides special properties (beyond those defined on the regular HTMLElement interface it also has available to it by inheritance) for manipulating ordered list elements.
HTMLOptGroupElement
The interface provides special properties and methods (beyond the regular HTMLElement object interface they also have available to them by inheritance) for manipulating the layout and presentation of <optgroup> elements.
HTMLOptionElement
The interface represents <option> elements and inherits all properties and methods of the HTMLElement interface.
HTMLOptionsCollection
The interface represents a collection of <option> HTML elements (in document order) and offers methods and properties for selecting from the list as well as optionally altering its items. This object is returned only by the options property of select.
HTMLOrSVGElement
HTMLOutputElement
The interface provides properties and methods (beyond those inherited from HTMLElement) for manipulating the layout and presentation of <output> elements.
HTMLParagraphElement
The interface provides special properties (beyond those of the regular HTMLElement object interface it inherits) for manipulating <p> elements.
HTMLParamElement
The interface provides special properties (beyond those of the regular HTMLElement object interface it inherits) for manipulating <param> elements, representing a pair of a key and a value that acts as a parameter for an <object> element.
HTMLPictureElement
Experimental: This is an experimental technologyCheck the Browser compatibility table carefully before using this in production. The interface represents a <picture> HTML element. It doesn't implement specific properties or methods.
HTMLPreElement
The interface exposes specific properties and methods (beyond those of the HTMLElement interface it also has available to it by inheritance) for manipulating a block of preformatted text (<pre>).
HTMLProgressElement
The interface provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <progress> elements.
HTMLQuoteElement
The interface provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating quoting elements, like <blockquote> and <q>, but not the <cite> element.
HTMLScriptElement
HTML <script> elements expose the interface, which provides special properties and methods for manipulating the behavior and execution of <script> elements (beyond the inherited HTMLElement interface). JavaScript files should be served with the application/javascript MIME type, but browsers are lenient and block them only if the script is served with an image type (image/*), video type (video/*), audio type (audio/*), or text/csv. If the script is blocked, its element receives an error event; otherwise, it receives a load event.
HTMLSelectElement
The interface represents a <select> HTML Element. These elements also share all of the properties and methods of other HTML elements via the HTMLElement interface.
HTMLSlotElement
The interface of the Shadow DOM API enables access to the name and assigned nodes of an HTML <slot> element.
HTMLSourceElement
The interface provides special properties (beyond the regular HTMLElement object interface it also has available to it by inheritance) for manipulating <source> elements.
HTMLSpanElement
The interface represents a <span> element and derives from the HTMLElement interface, but without implementing any additional properties or methods.
HTMLStyleElement
The interface represents a <style> element. It inherits properties and methods from its parent, HTMLElement. This interface doesn't allow to manipulate the CSS it contains (in most case). To manipulate CSS, see Using dynamic styling information for an overview of the objects used to manipulate specified CSS properties using the DOM.
HTMLTableCaptionElement
The interface special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating table caption elements.
HTMLTableCellElement
The interface provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of table cells, either header or data cells, in an HTML document.
HTMLTableColElement
The interface provides properties for manipulating single or grouped table column elements.
HTMLTableElement
The interface provides special properties and methods (beyond the regular HTMLElement object interface it also has available to it by inheritance) for manipulating the layout and presentation of tables in an HTML document.
HTMLTableRowElement
The interface provides special properties and methods (beyond the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of rows in an HTML table.
HTMLTableSectionElement
The interface provides special properties and methods (beyond the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of sections, that is headers, footers and bodies, in an HTML table.
HTMLTemplateElement
The interface enables access to the contents of an HTML <template> element.
HTMLTextAreaElement
The interface provides special properties and methods for manipulating the layout and presentation of <textarea> elements.
HTMLTimeElement
The interface provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <time> elements.
HTMLTitleElement
The interface contains the title for a document. This element inherits all of the properties and methods of the HTMLElement interface.
HTMLTrackElement
The interface represents an HTML <track> element within the DOM. This element can be used as a child of either <audio> or <video> to specify a text track containing information such as closed captions or subtitles.
HTMLUListElement
The interface provides special properties (beyond those defined on the regular HTMLElement interface it also has available to it by inheritance) for manipulating unordered list elements.
HTMLUnknownElement
The interface represents an invalid HTML element and derives from the HTMLElement interface, but without implementing any additional properties or methods.
HTMLVideoElement
The interface provides special properties and methods for manipulating video objects. It also inherits properties and methods of HTMLMediaElement and HTMLElement. The list of supported media formats varies from one browser to the other. You should either provide your video in a single format that all the relevant browsers supports, or provide multiple video sources in enough different formats that all the browsers you need to support are covered.
ImageBitmap
The interface represents a bitmap image which can be drawn to a <canvas> without undue latency. It can be created from a variety of source objects using the createImageBitmap() factory method. provides an asynchronous and resource efficient pathway to prepare textures for rendering in WebGL.
ImageBitmapOptions
ImageBitmapRenderingContext
Experimental: This is an experimental technologyCheck the Browser compatibility table carefully before using this in production. The interface is a canvas rendering context that provides the functionality to replace the canvas's contents with the given ImageBitmap. Its context id (the first argument to HTMLCanvasElement.getContext() or OffscreenCanvas.getContext()) is "bitmaprenderer". This interface is available in both the window and the worker context.
ImageBitmapRenderingContextSettings
ImageData
The interface represents the underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). Note: This feature is available in Web Workers
ImageDataSettings
ImageEncodeOptions
Location
The interface represents the location (URL) of the object it is linked to. Changes done on it are reflected on the object it relates to. Both the Document and Window interface have such a linked , accessible via Document.location and Window.location respectively.
MediaError
The interface represents an error which occurred while handling media in an HTML media element based on HTMLMediaElement, such as <audio> or <video>. A object describes the error in general terms using a numeric code categorizing the kind of error, and a message, which provides specific diagnostics about what went wrong.
MessageChannel
The interface of the Channel Messaging API allows us to create a new message channel and send data through it via its two MessagePort properties. Note: This feature is available in Web Workers
MessageEvent
The interface represents a message received by a target object. This is used to represent messages in:
MessageEventInit
MessagePort
The interface of the Channel Messaging API represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other. Note: This feature is available in Web Workers
MimeType
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. The interface provides contains information about a MIME type associated with a particular plugin. Navigator.mimeTypes returns an array of this object.
MimeTypeArray
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. The interface returns an array of MimeType instances, each of which contains information about a supported browser plugins. This object is returned by Navigator.mimeTypes.
The interface represents the state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. A object can be retrieved using the read-only window.navigator property.
OffscreenCanvas
Experimental: This is an experimental technologyCheck the Browser compatibility table carefully before using this in production. The interface provides a canvas that can be rendered off screen. It is available in both the window and worker contexts. Note: This feature is available in Web Workers
OffscreenCanvasRenderingContext2D
PageTransitionEvent
The event object is available inside handler functions for the pageshow and pagehide events, fired when a document is being loaded or unloaded.
PageTransitionEventInit
Path2D
The interface of the Canvas 2D API is used to declare a path that can then be used on a CanvasRenderingContext2D object. The path methods of the CanvasRenderingContext2D interface are also present on this interface, which gives you the convenience of being able to retain and replay your path whenever desired.
Plugin
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. The interface provides information about a browser plugin.
PluginArray
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. The interface is used to store a list of Plugin objects describing the available plugins; it's returned by the navigator.plugins property. The is not a JavaScript array, but has the length property and supports accessing individual items using bracket notation ([plugins2]), as well as via item(index) and namedItem("name") methods.
PopStateEvent
is an event handler for the popstate event on the window. A popstate event is dispatched to the window every time the active history entry changes between two history entries for the same document. If the history entry being activated was created by a call to history.pushState() or was affected by a call to history.replaceState(), the popstate event's state property contains a copy of the history entry's state object.
PopStateEventInit
PromiseRejectionEvent
The interface represents events which are sent to the global script context when JavaScript Futures are rejected. These events are particularly useful for telemetry and debugging purposes. For details on promise rejection events, see Promise rejection events in Using Promises.
PromiseRejectionEventInit
RadioNodeList
The interface represents a collection of radio elements in a <form> or a <fieldset> element.
SharedWorker
The interface represents a specific kind of worker that can be accessed from several browsing contexts, such as several windows, iframes or even workers. They implement an interface different than dedicated workers and have a different global scope, SharedWorkerGlobalScope.
SharedWorkerGlobalScope
The object (the SharedWorker global scope) is accessible through the self keyword. Some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in the JavaScript Reference. See the complete list of functions available to workers.
Storage
The interface of the Web Storage API provides access to a particular domain's session or local storage. It allows, for example, the addition, modification, or deletion of stored data items. To manipulate, for instance, the session storage for a domain, a call to Window.sessionStorage is made; whereas for local storage the call is made to Window.localStorage.
StorageEvent
The interface is implemented by the storage event, which is sent to a window when a storage area the window has access to is changed within the context of another document.
StorageEventInit
StructuredSerializeOptions
SubmitEvent
The interface defines the object used to represent an HTML form's submit event. This event is fired at the <form> when the form's submit action is invoked.
SubmitEventInit
TextMetrics
The interface represents the dimensions of a piece of text in the canvas; a instance can be retrieved using the CanvasRenderingContext2D.measureText() method.
TextTrack
The interface—part of the API for handling WebVTT (text tracks on media presentations)—describes and controls the text track associated with a particular <track> element.
TextTrackCue
is an abstract class which is used as the basis for the various derived cue types, such as VTTCue; you will instead work with those derived types. These cues represent strings of text presented for some duration of time during the performance of a TextTrack. The cue includes the start time (the time at which the text will be displayed) and the end time (the time at which it will be removed from the display), as well as other information.
TextTrackCueList
The array-like object represents a dynamically updating list of TextTrackCue objects. This interface has no constructor. Retrieve an instance of this object with TextTrack.cues which returns all of the cues in a TextTrack object.
TextTrackList
The interface is used to represent a list of the text tracks defined by the <track> element, with each track represented by a separate textTrack object in the list. Retrieve an instance of this object with the textTracks property of an HTMLMediaElement object. For a given HTMLMediaElement object media, the individual tracks can be accessed using:
TimeRanges
When loading a media resource for use by an <audio> or <video> element, the interface is used for representing the time ranges of the media resource that have been buffered, the time ranges that have been played, and the time ranges that are seekable. A object includes one or more ranges of time, each specified by a starting time offset and an ending time offset. You reference each time range by using the start() and end() methods, passing the index number of the time range you want to retrieve.
TrackEvent
The interface, which is part of the HTML DOM specification, is used for events which represent changes to a set of available tracks on an HTML media element; these events are addtrack and removetrack. It's important not to confuse with the RTCTrackEvent interface, which is used for tracks which are part of an RTCPeerConnection. Events based on are always sent to one of the media track list types:
TrackEventInit
ValidityState
The interface represents the validity states that an element can be in, with respect to constraint validation. Together, they help explain why an element's value fails to validate, if it's not valid.
ValidityStateFlags
VideoTrack
The interface represents a single video track from a <video> element. The most common use for accessing a object is to toggle its selected property in order to make it the active video track for its <video> element.
VideoTrackList
The interface is used to represent a list of the video tracks contained within a <video> element, with each track represented by a separate VideoTrack object in the list. Retrieve an instance of this object with HTMLMediaElement.videoTracks. The individual tracks can be accessed using array syntax or functions such as forEach() for example.
Window
The interface represents a window containing a DOM document; the document property points to the DOM document loaded in that window. A window for a given document can be obtained using the document.defaultView property. A global variable, window, representing the window in which the script is running, is exposed to JavaScript code. The interface is home to a variety of functions, namespaces, objects, and constructors which are not necessarily directly associated with the concept of a user interface window. However, the interface is a suitable place to include these items that need to be globally available. Many of these are documented in the JavaScript Reference and the DOM Reference. In a tabbed browser, each tab is represented by its own object; the global window seen by JavaScript code running within a given tab always represents the tab in which the code is running. That said, even in a tabbed browser, some properties and methods still apply to the overall window that contains the tab, such as resizeTo() and innerHeight. Generally, anything that can't reasonably pertain to a tab pertains to the window instead.
WindowEventHandlers
The mixin describes the event handlers common to several interfaces like Window, or HTMLBodyElement and HTMLFrameSetElement. Each of these interfaces can implement additional specific event handlers.
WindowLocalStorage
WindowOrWorkerGlobalScope
WindowPostMessageOptions
WindowSessionStorage
Worker
The interface of the Web Workers API represents a background task that can be created via script, which can send messages back to its creator. Creating a worker is done by calling the Worker("path/to/worker/script") constructor. Workers may themselves spawn new workers, as long as those workers are hosted at the same origin as the parent page. (Note: nested workers are not yet implemented in WebKit). Not all interfaces and functions are available to scripts inside a . Workers may use XMLHttpRequest for network communication, but its responseXML and channel attributes are always null. (fetch is also available, with no such restrictions.)
WorkerGlobalScope
The interface of the Web Workers API is an interface representing the scope of any worker. Workers have no browsing context; this scope contains the information usually conveyed by Window objects — in this case event handlers, the console or the associated WorkerNavigator object. Each has its own event loop. This interface is usually specialized by each worker type: DedicatedWorkerGlobalScope for dedicated workers, SharedWorkerGlobalScope for shared workers, and ServiceWorkerGlobalScope for ServiceWorker. The self property returns the specialized scope for each context.
WorkerLocation
The interface defines the absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.location property obtained by calling self.location. This interface is only visible from inside a JavaScript script executed in the context of a Web worker.
WorkerNavigator
The interface represents a subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the self.navigator property.
WorkerOptions
Worklet
Experimental: This is an experimental technologyCheck the Browser compatibility table carefully before using this in production. The interface is a lightweight version of Web Workers and gives developers access to low-level parts of the rendering pipeline. With Worklets, you can run JavaScript and WebAssembly code to do graphics rendering or audio processing where high performance is required.
WorkletGlobalScope
WorkletOptions

Extensions

PropsAbstractWorker
PropsAnimationFrameProvider
PropsAssignedNodesOptions
PropsAudioTrack
PropsAudioTrackList
PropsBarProp
PropsBeforeUnloadEvent
PropsBroadcastChannel
PropsCanvasCompositing
PropsCanvasDrawImage
PropsCanvasDrawPath
PropsCanvasFillStrokeStyles
PropsCanvasFilters
PropsCanvasGradient
PropsCanvasImageData
PropsCanvasImageSmoothing
PropsCanvasPath
PropsCanvasPathDrawingStyles
PropsCanvasPattern
PropsCanvasRect
PropsCanvasRenderingContext2D
PropsCanvasRenderingContext2DSettings
PropsCanvasShadowStyles
PropsCanvasState
PropsCanvasText
PropsCanvasTextDrawingStyles
PropsCanvasTransform
PropsCanvasUserInterface
PropsCustomElementRegistry
PropsDataTransfer
PropsDataTransferItem
PropsDataTransferItemList
PropsDedicatedWorkerGlobalScope
PropsDocumentAndElementEventHandlers
PropsDOMParser
PropsDOMStringList
PropsDragEvent
PropsDragEventInit
PropsElementContentEditable
PropsElementDefinitionOptions
PropsElementInternals
PropsErrorEvent
PropsErrorEventInit
PropsEventSource
PropsEventSourceInit
PropsExternal
PropsFocusOptions
PropsFormDataEvent
PropsFormDataEventInit
PropsGlobalEventHandlers
PropsHashChangeEvent
PropsHashChangeEventInit
PropsHistory
PropsHTMLAllCollection
PropsHTMLAnchorElement
PropsHTMLAreaElement
PropsHTMLBaseElement
PropsHTMLBodyElement
PropsHTMLBRElement
PropsHTMLButtonElement
PropsHTMLCanvasElement
PropsHTMLDataElement
PropsHTMLDataListElement
PropsHTMLDetailsElement
PropsHTMLDialogElement
PropsHTMLDirectoryElement
PropsHTMLDivElement
PropsHTMLDListElement
PropsHTMLElement
PropsHTMLEmbedElement
PropsHTMLFieldSetElement
PropsHTMLFontElement
PropsHTMLFormControlsCollection
PropsHTMLFormElement
PropsHTMLFrameElement
PropsHTMLFrameSetElement
PropsHTMLHeadingElement
PropsHTMLHRElement
PropsHTMLHtmlElement
PropsHTMLHyperlinkElementUtils
PropsHTMLIFrameElement
PropsHTMLImageElement
PropsHTMLInputElement
PropsHTMLLabelElement
PropsHTMLLegendElement
PropsHTMLLIElement
PropsHTMLLinkElement
PropsHTMLMapElement
PropsHTMLMarqueeElement
PropsHTMLMediaElement
PropsHTMLMenuElement
PropsHTMLMetaElement
PropsHTMLMeterElement
PropsHTMLModElement
PropsHTMLObjectElement
PropsHTMLOListElement
PropsHTMLOptGroupElement
PropsHTMLOptionElement
PropsHTMLOptionsCollection
PropsHTMLOrSVGElement
PropsHTMLOutputElement
PropsHTMLParagraphElement
PropsHTMLParamElement
PropsHTMLPreElement
PropsHTMLProgressElement
PropsHTMLQuoteElement
PropsHTMLScriptElement
PropsHTMLSelectElement
PropsHTMLSlotElement
PropsHTMLSourceElement
PropsHTMLStyleElement
PropsHTMLTableCaptionElement
PropsHTMLTableCellElement
PropsHTMLTableColElement
PropsHTMLTableElement
PropsHTMLTableRowElement
PropsHTMLTableSectionElement
PropsHTMLTemplateElement
PropsHTMLTextAreaElement
PropsHTMLTimeElement
PropsHTMLTitleElement
PropsHTMLTrackElement
PropsHTMLUListElement
PropsHTMLVideoElement
PropsImageBitmap
PropsImageBitmapOptions
PropsImageBitmapRenderingContext
PropsImageBitmapRenderingContextSettings
PropsImageData
PropsImageDataSettings
PropsImageEncodeOptions
PropsLocation
PropsMediaError
PropsMessageChannel
PropsMessageEvent
PropsMessageEventInit
PropsMessagePort
PropsMimeType
PropsMimeTypeArray
PropsNavigator
PropsNavigatorConcurrentHardware
PropsNavigatorContentUtils
PropsNavigatorCookies
PropsNavigatorID
PropsNavigatorLanguage
PropsNavigatorOnLine
PropsNavigatorPlugins
PropsOffscreenCanvas
PropsOffscreenCanvasRenderingContext2D
PropsPageTransitionEvent
PropsPageTransitionEventInit
PropsPath2D
PropsPlugin
PropsPluginArray
PropsPopStateEvent
PropsPopStateEventInit
PropsPromiseRejectionEvent
PropsPromiseRejectionEventInit
PropsRadioNodeList
PropsSharedWorker
PropsSharedWorkerGlobalScope
PropsStorage
PropsStorageEvent
PropsStorageEventInit
PropsStructuredSerializeOptions
PropsSubmitEvent
PropsSubmitEventInit
PropsTextMetrics
PropsTextTrack
PropsTextTrackCue
PropsTextTrackCueList
PropsTextTrackList
PropsTimeRanges
PropsTrackEvent
PropsTrackEventInit
PropsValidityState
PropsValidityStateFlags
PropsVideoTrack
PropsVideoTrackList
PropsWindow
PropsWindowEventHandlers
PropsWindowLocalStorage
PropsWindowOrWorkerGlobalScope
PropsWindowPostMessageOptions
PropsWindowSessionStorage
PropsWorker
PropsWorkerGlobalScope
PropsWorkerLocation
PropsWorkerNavigator
PropsWorkerOptions
PropsWorklet
PropsWorkletOptions

Enums

CanPlayTypeResult
CanvasDirection
CanvasFillRule
CanvasFontKerning
CanvasFontStretch
CanvasFontVariantCaps
CanvasLineCap
CanvasLineJoin
CanvasTextAlign
CanvasTextBaseline
CanvasTextRendering
ColorSpaceConversion
DocumentReadyState
DocumentVisibilityState
DOMParserSupportedType
ImageOrientation
ImageSmoothingQuality
OffscreenRenderingContextId
PredefinedColorSpace
PremultiplyAlpha
ResizeQuality
ScrollRestoration
SelectionMode
TextTrackKind
TextTrackMode
WorkerType