Search completed in 1.31 seconds.
1014 results for "domstring":
Your results are loading. Please wait...
ConstrainDOMString - Web APIs
The ConstrainDOMString dictionary is used to specify a constraint for a property whose value is a string. It allows you to specify one or more exact string values from which one must be the parameter's value, or a set of ideal values which should be used if possible. You can also specify a single string (or an array of strings) which the user agent will do its best to match once all more stringent constraints have been applied. Properties The value of a ConstrainDOMString can be any of the following: A single DOMString An array of DOMString objects An object with one or both of the following properties: exact Either a single DOMString which must be the value of the property, or an array of DOMString objects one of which must be the property's value. If the property can't be set to one ...
...ring can be any of the following: A single DOMString An array of DOMString objects An object with one or both of the following properties: exact Either a single DOMString which must be the value of the property, or an array of DOMString objects one of which must be the property's value. If the property can't be set to one of the listed values, matching will fail. ideal Either a single DOMString or an arrray of DOMStrings specifying ideal values for the property. If possible, one of the listed values will be used, but if it's not possible, the user agent will use the closest possible match. Specifications Specification Status Comment Media Capture and StreamsThe definition of 'ConstrainDOMString' in that specification. Candidate Recommendation Initial def...
... ideal values for the property. If possible, one of the listed values will be used, but if it's not possible, the user agent will use the closest possible match. Specifications Specification Status Comment Media Capture and StreamsThe definition of 'ConstrainDOMString' in that specification. Candidate Recommendation Initial definition Technically, ConstrainDOMString is actually based on an intermediary dictionary named ConstrainDOMStringParameters, which adds exact and ideal to DOMString. However, for the sake of documentation clarity, the intermediate type (present only because of quirks in WebIDL syntax) is ignored here. ...
DOMString - Web APIs
Web › API › DOMString
DOMString is a UTF-16 String. As JavaScript already uses such strings, DOMString is mapped directly to a String. Passing null to a method or parameter accepting a DOMString typically stringifies to "null". Specifications Specification Status Comment Web IDLThe definition of 'DOMString' in that specification. Candidate Recommendation ...
DOMStringList - Web APIs
A type returned by some APIs which contains a list of DOMString (strings). Properties DOMStringList.length Read only Returns the length of the list. Methods DOMStringList.item() Returns a DOMString. DOMStringList.contains() Returns Boolean indicating if the given string is in the list Specifications Specification Status Comment HTML Living StandardThe definition of 'DOMStringList' in that specification. Living Standard Initial specification ...
DOMStringMap - Web APIs
The DOMStringMap interface is used for the HTMLElement.dataset attribute, to represent data for custom attributes added to elements. Specifications Specification Status Comment HTML Living StandardThe definition of 'DOMStringMap' in that specification. Living Standard ...
Index - Web APIs
Web › API › Index
PI, AnimationEvent, CSSOM, Constructor, Experimental, Reference, Web Animations The AnimationEvent() constructor returns a newly created AnimationEvent, representing an event in relation with an animation. 88 AnimationEvent.animationName API, AnimationEvent, CSSOM, Experimental, Property, Reference, Web Animations The AnimationEvent.animationName read-only property is a DOMString containing the value of the animation-name CSS property associated with the transition. 89 AnimationEvent.elapsedTime API, AnimationEvent, CSSOM, Experimental, Property, Reference, Web Animations The AnimationEvent.elapsedTime read-only property is a float giving the amount of time the animation has been running, in seconds, when this event fired, excluding any time the anima...
...Event, CSSOM, Method, Obsolete, Web Animations The AnimationEvent.initAnimationEvent() method Initializes an animation event created using the deprecated Document.createEvent("AnimationEvent") method. 91 AnimationEvent.pseudoElement API, AnimationEvent, CSS, CSSOM, Experimental, Property, Reference, Web Animations The AnimationEvent.pseudoElement read-only property is a DOMString, starting with '::', containing the name of the pseudo-element the animation runs on. If the animation doesn't run on a pseudo-element but on the element, an empty string: ''. 92 AnimationPlaybackEvent API, Animation, AnimationPlaybackEvent, Experimental, Interface, Reference, events, waapi, web animations api The AnimationPlaybackEvent interface of the Web Animations API rep...
...io, AudioParamDescriptor, AudioWorkletProcessor, Dictionary, Reference, Web Audio API, parameterDescriptors The AudioParamDescriptor dictionary of the Web Audio API specifies properties for an AudioParam objects. 179 AudioParamMap Draft, Experimental The Web Audio API interface AudioParamMap represents a set of multiple audio parameters, each described as a mapping of a DOMString identifying the parameter to the AudioParam object representing its value. 180 AudioProcessingEvent API, Deprecated, Interface, Internationalization, Reference, Reference(2), Web Audio API The Web Audio API AudioProcessingEvent represents events that occur when a ScriptProcessorNode input buffer is ready to be processed. 181 AudioScheduledSourceNode API, Audio,...
...And 123 more matches
nsIDOMElement
dom/interfaces/core/nsIDOMElement.idlScriptable This interface represents an element in an HTML or XML document. ...
... dom/interfaces/core/nsIDOMElement.idlScriptable This interface represents an element in an HTML or XML document. ...
... dom/interfaces/core/nsIDOMElement.idlScriptable This interface represents an element in an HTML or XML document. ...
...And 19 more matches
WebIDL bindings
WebIDL Type Argument Type Return Type Dictionary/Member Type any JS::Handle<JS::Value> JS::MutableHandle<JS::Value> JS::Value boolean bool bool bool byte int8_t int8_t int8_t ByteString const nsACString& nsCString& (outparam) nsACString& (outparam) nsCString Date mozilla::dom::Date DOMString const nsAString& mozilla::dom::DOMString& (outparam) nsAString& (outparam) nsString& (outparam) nsString UTF8String const nsACString& nsACString& (outparam) nsCString double double double double float float float float interface: non-nullable Foo& already_addRefed<Foo> Foo* OwningNonNull<Foo> int...
... They will be in the compartment of the passed-in JSContext. any return values become a JS::MutableHandle<JS::Value> out param appended to the argument list. This comes after all IDL arguments, but befo...
... the C++ type of the same name. So float and unrestricted float become a C++ float, while double and unrestricted double become a C++ double. For example, this WebIDL: interface Test { float myAttr; double myMethod(unrestricted double? arg); }; will correspond to these C++ function declarations: float MyAttr(); void SetMyAttr(float value); double MyMethod(const Nullable<double>& arg); DOMString Strings are reflected in three different ways, depending on use: String arguments become const nsAString&. String return values become a mozilla::dom::DOMString& out param appended to the argument list. This comes after all IDL arguments, but before the ErrorResult&, if any, for the method. Note that this allows callees to declare their methods as taking an nsAString& or nsString& if desired...
...And 17 more matches
nsIDOMNSHTMLDocument
interfaces/html/nsIDOMNSHTMLDocument.idlScriptable This interface defines methods and properties supported by Gecko on the document object that are not part of DOM Level 2. ...
...table This interface defines methods and properties supported by Gecko on the document object that are not part of DOM Level 2. ...
...orted by Gecko on the document object that are not part of DOM Level 2. ...
...And 13 more matches
SVGStringList - Web APIs
SVG string list interface The SVGStringList defines a list of DOMString objects. An SVGStringList object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown. ...
... SVG string list interface The SVGStringList defines a list of DOMString objects. An SVGStringList object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown. ...
... SVG string list interface The SVGStringList defines a list of DOMString objects. An SVGStringList object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown. ...
...And 13 more matches
nsIDOMWindowInternal
butes are well documented in window, those articles are linked to rather than re-documented. However, they are not guaranteed to document all available arguments (i.e. see window.prompt). Method overview Firefox 3.5 note The prompt() and find() methods changed in Firefox 3.5 to make all their parameters optional; in previous versions, all parameters were required. ...
...rticles are linked to rather than re-documented. However, they are not guaranteed to document all available arguments (i.e. see window.prompt). Method overview Firefox 3.5 note The prompt() and find() methods changed in Firefox 3.5 to make all their parameters optional; in previous versions, all parameters were required. ...
...her than re-documented. However, they are not guaranteed to document all available arguments (i.e. see window.prompt). Method overview Firefox 3.5 note The prompt() and find() methods changed in Firefox 3.5 to make all their parameters optional; in previous versions, all parameters were required. ...
...And 12 more matches
StringView - Archive of obsolete content
In the past, this had to be simulated by treating the raw data as a string and ...
...e); } } aWhole = new fTAView(nOutptLen); /* transcription... */ for (var nInptIdx = nStartIdx, nOutptIdx = 0; nOutptIdx < nOutptLen; nInptIdx += fGetInptChrSize(nChrCode)) { nChrCode = fGetInptChrCode(vSource, nInptIdx); nOutptIdx = fPutOutptCode(aWhole, nChrCode, nOutptIdx); } break conversionSwitch; case 4: /* DOMString to ASCII or BinaryString or other unknown encodings */ aWhole = new fTAView(nOutptLen); /* transcription... */ for (var nIdx = 0; nIdx < nOutptLen; nIdx++) { aWhole[nIdx] = vSource.charCodeAt(nIdx) & 0xff; } break conversionSwitch; case 5: /* DOMString to UTF-8 or to UTF-16 */ /* mapping... */ nOutptLen = 0; ...
...arCodeAt(nMapIdx)); if (nMapIdx === nCharEnd) { nEndIdx = nOutptLen; } } aWhole = new fTAView(nOutptLen); /* transcription... */ for (var nOutptIdx = 0, nChrIdx = 0; nOutptIdx < nOutptLen; nChrIdx++) { nOutptIdx = fPutOutptCode(aWhole, vSource.charCodeAt(nChrIdx), nOutptIdx); } break conversionSwitch; case 6: /* DOMString to UTF-32 */ aWhole = new fTAView(nOutptLen); /* transcription... */ for (var nIdx = 0; nIdx < nOutptLen; nIdx++) { aWhole[nIdx] = vSource.charCodeAt(nIdx); } break conversionSwitch; case 7: aWhole = new fTAView(nOutptLen ? vSource : 0); break conversionSwitch; } aRaw = nTranscrType > 3 && (nStartIdx > 0 || nE...
...And 10 more matches
nsIRadioInterfaceLayer
manager;1. ...
...te an instance, use: var radioInterfaceLayer = Components.classes["@mozilla.org/telephony/system-worker-manager;1"] .getService(Components.interfaces.nsIInterfaceRequestor) .createInstance(Components.interfaces.nsIRadioInterfaceLayer); Method overview void answerCall(in unsigned long callIndex); void deactivateDataCall(in DOMString cid, in DOMString reason); void dial(in DOMString number); void enumerateCalls(in nsIRILTelephonyCallback callback); void getDataCallList(); unsigned short getNumberOfMessagesForText(in DOMString text); void hangUp(in unsigned long callIndex); void registerCallback(in nsIRILTelephonyCallback callback); void registerDataCallCallback(in nsIRILDataCallback callback); void rejectCall(in unsigned long c...
...tring number); void enumerateCalls(in nsIRILTelephonyCallback callback); void getDataCallList(); unsigned short getNumberOfMessagesForText(in DOMString text); void hangUp(in unsigned long callIndex); void registerCallback(in nsIRILTelephonyCallback callback); void registerDataCallCallback(in nsIRILDataCallback callback); void rejectCall(in unsigned long callIndex); void sendSMS(in DOMString number, in DOMString message, in long requestId, in unsigned long long processId); void setupDataCall(in long radioTech, in DOMString apn, in DOMString user, in DOMString passwd, in long chappap, in DOMString pdptype); void startTone(in DOMString dtmfChar); void stopTone(); void unregisterCallback(in nsIRILTelephonyCallback callback); void unregisterDataCallCallback(in nsIRILDataCallbac...
...And 10 more matches
IDBDatabaseSync - Web APIs
dDB API was originally intended for use only with Web Workers, and was eventually removed from the spec because its need was questionable. It may however be reintroduced in the future if there is enough demand from web developers. The DatabaseSync interface in the IndexedDB API represents a synchronous connection to a database. ...
...lly intended for use only with Web Workers, and was eventually removed from the spec because its need was questionable. It may however be reintroduced in the future if there is enough demand from web developers. The DatabaseSync interface in the IndexedDB API represents a synchronous connection to a database. ...
... be reintroduced in the future if there is enough demand from web developers. The DatabaseSync interface in the IndexedDB API represents a synchronous connection to a database. ...
...And 10 more matches
nsIDOMXULElement
dom/interfaces/xul/nsIDOMXULElement.idlScriptable Represents a XUL element within the DOM. 66 Introduced Gecko 1.0 Inherits from: nsIDOMElement Last changed in Gecko 1.9 (Firefox 3) Method overview void blur(); void click(); void doCommand(); void focus(); nsIDOMNodeList getElementsByAttribute(in DOMString name, in DOMString value); nsIDOMNodeList getElementsByAttributeNS(in DOMString namespaceURI, in DOMString name, in DOMString value); Attributes Attribute Type Description align DOMString Gets/sets the value of the element's align attribute. allowEvents boolean true if the element's allowevents attribute is the string "true", otherwise false. Removes the attribute if you set it to false. boxObject nsIBoxObject Read only. Gets or creates a...
...e. boxObject nsIBoxObject Read only. Gets or creates a box object for the element; browser, editor, iframe, listbox, menu, menupopup, scrollbox, tooltip and tree elements receive specialized box objects allowing access to additional properties not normally available from script. builder nsIXULTemplateBuilder Read only. Retrives the element's template builder, if it has a template. className DOMString Gets/sets the value of the element's class attribute. collapsed boolean true if the element's collapsed attribute is the string "true", otherwise false. Removes the attribute if you set it to false. contextMenu DOMString Gets/sets the value of the element's contextmenu attribute. controllers nsIControllers Read only. Returns an nsIControllers object that additional controllers may be append...
...it to false. contextMenu DOMString Gets/sets the value of the element's contextmenu attribute. controllers nsIControllers Read only. Returns an nsIControllers object that additional controllers may be appended to so as to provide focus-specific actions for commands. database nsIRDFCompositeDataSource Read only. Returns the template builder's database, if it is an RDF template. datasources DOMString Gets/sets the value of the element's datasources attribute. dir DOMString Gets/sets the value of the element's dir attribute. flex DOMString Gets/sets the value of the element's flex attribute. flexGroup DOMString Gets/sets the value of the element's flexgroup attribute. height DOMString Gets/sets the value of the element's height attribute. hidden boolean true if the element's hidden a...
...And 7 more matches
inIDOMUtils
Inherits from: nsISupports Last changed in Gecko 22.0 (Firefox 22.0 / Thunderbird 22.0 / SeaMonkey 2.19) Implemented by: @mozilla.org/inspector/dom-utils;1 as a service: var inIDOMUtils = Components.classes["@mozilla.org/inspector/dom-utils;1"] .getService(Components.interfaces.inIDOMUtils); Method overview void addPseudoClassLock(in nsIDOMElement aElement, in DOMString aPseudoClass); void clearPseudoClassLocks(in nsIDOMElement aElement); [implicit_jscontext] jsval colorNameToRGB(in DOMString aColorName); nsIArray getBindingURLs(in nsIDOMElement aElement); nsIDOMNodeList getChildrenForNode(in nsIDOMNode aNode, in boolean aShowingAnonymousContent); unsigned long long getContentState(in nsIDOMElement aElement); ...
...st getChildrenForNode(in nsIDOMNode aNode, in boolean aShowingAnonymousContent); unsigned long long getContentState(in nsIDOMElement aElement); void getCSSPropertyNames([optional] in unsigned long aFlags, [optional] out unsigned long aCount, [retval, array, size_is(aCount)] out wstring aProps); nsISupportsArray getCSSStyleRules(in nsIDOMElement aElement, [optional] in DOMString aPseudo); nsIDOMNode getParentForNode(in nsIDOMNode aNode, in boolean aShowingAnonymousContent); unsigned long getRuleLine(in nsIDOMCSSStyleRule aRule); unsigned long getRuleColumn(in nsIDOMCSSStyleRule aRule); unsigned long getSelectorCount(in nsIDOMCSSStyleRule aRule); AString getSelectorText(in nsIDOMCSSStyleRule aRule, in unsigned long aSelectorInd...
... unsigned long getSelectorCount(in nsIDOMCSSStyleRule aRule); AString getSelectorText(in nsIDOMCSSStyleRule aRule, in unsigned long aSelectorIndex); unsigned long long getSpecificity(in nsIDOMCSSStyleRule aRule, in unsigned long aSelectorIndex); nsIDOMFontFaceList getUsedFontFaces(in nsIDOMRange aRange); bool hasPseudoClassLock(in nsIDOMElement aElement, in DOMString aPseudoClass); boolean isIgnorableWhitespace(in nsIDOMCharacterData aDataNode); bool isInheritedProperty(in AString aPropertyName); void parseStyleSheet(in nsIDOMCSSStyleSheet aSheet, in DOMString aInput); void removePseudoClassLock(in nsIDOMElement aElement, in DOMString aPseudoClass); AString rgbToColorName(in octet aR, in octet aG, in octet aB); ...
...And 6 more matches
HTMLImageElement - Web APIs
Image() The Image() constructor creates and returns a new HTMLImageElement object representing an HTML <img> element which is not attached to any DOM tree. It accepts optional width and height parameters. When called without parameters, new Image() is equivalent to calling document.createElement("img"). Properties Inherits properties from its parent, HTMLElement. HTMLImageElement.alt A DOMString that reflects the alt HTML attribute, thus indicating the alternate fallback content to be displayed if the image has not been loaded. HTMLImageElement.complete Read only Returns a Boolean that is true if the browser has finished fetching the image, whether successful or not. That means this value is also true if the image has no src value indicating an image to load. HTMLImageElement.crossOr...
...flects the alt HTML attribute, thus indicating the alternate fallback content to be displayed if the image has not been loaded. HTMLImageElement.complete Read only Returns a Boolean that is true if the browser has finished fetching the image, whether successful or not. That means this value is also true if the image has no src value indicating an image to load. HTMLImageElement.crossOrigin A DOMString specifying the CORS setting for this image element. See CORS settings attributes for further details. This may be null if CORS is not used. HTMLImageElement.currentSrc Read only Returns a USVString representing the URL from which the currently displayed image was loaded. This may change as the image is adjusted due to changing conditions, as directed by any media queries which are in place. H...
...image element. See CORS settings attributes for further details. This may be null if CORS is not used. HTMLImageElement.currentSrc Read only Returns a USVString representing the URL from which the currently displayed image was loaded. This may change as the image is adjusted due to changing conditions, as directed by any media queries which are in place. HTMLImageElement.decoding An optional DOMString representing a hint given to the browser on how it should decode the image. If this value is provided, it must be one of the possible permitted values: sync to decode the image synchronously, async to decode it asynchronously, or auto to indicate no preference (which is the default). Read the decoding page for details on the implications of this property's values. HTMLImageElement.height An int...
...And 6 more matches
HTMLObjectElement - Web APIs
4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLObjectElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. ...
.../div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLObjectElement.align Is a DOMString representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context. The possible values are "left", "right", "justify", and "center". HTMLObjectElement.archive Is a DOMString that reflects the archive HTML attribute, containing a list of archives for resources for this object. ...
...ent.align Is a DOMString representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context. The possible values are "left", "right", "justify", and "center". HTMLObjectElement.archive Is a DOMString that reflects the archive HTML attribute, containing a list of archives for resources for this object. HTMLObjectElement.border Is a DOMString that reflects the border HTML attribute, specifying the width of a border around the object. HTMLObjectElement.code Is a DOMString representing the name of an applet class file, containing either the applet's subclass, or the path to get to the class, including the class file itself. ...
...And 6 more matches
nsISmsService
ts Last changed in Gecko 15.0 (Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) Implemented by: @mozilla.org/sms/smsservice;1. ...
...o 15.0 (Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) Implemented by: @mozilla.org/sms/smsservice;1. ...
.../ Thunderbird 15.0 / SeaMonkey 2.12) Implemented by: @mozilla.org/sms/smsservice;1. ...
...And 5 more matches
HTMLButtonElement - Web APIs
7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLButtonElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLButtonElement.accessKey Is a DOMString indicating the single-character keyboard key to give access to the button. HTMLButtonElement.autofocus Is a Boolean indicating whether or not the control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. Only one form-associated element in a document can have this attribute specified. HTMLButtonElement.disabled Is a Boolea...
...y Is a HTMLFormElement reflecting the form that this button is associated with. If the button is a descendant of a form element, then this attribute is the ID of that form element. If the button is not a descendant of a form element, then the attribute can be the ID of any form element in the same document it is related to, or the null value if none matches. HTMLButtonElement.formAction Is a DOMString reflecting the URI of a resource that processes information submitted by the button. If specified, this attribute overrides the action attribute of the <form> element that owns this element. HTMLButtonElement.formEnctype Is a DOMString reflecting the type of content that is used to submit the form to the server. If specified, this attribute overrides the enctype attribute of the <form> element ...
...If specified, this attribute overrides the method attribute of the <form> element that owns this element. ...
...And 5 more matches
HTMLIFrameElement - Web APIs
4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLIFrameElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLIFrameElement.align Is a DOMString that specifies the alignment of the frame with respect to the surrounding context. HTMLIFrameElement.allow Is a list of origins the the frame is allowed to display content from. This attribute also accepts the values self and src which represent the origin in the iframe's src attribute. The default value is src. HTMLIFrameElement.allowfullscreen Is a Boolean indicating whether the inline ...
...ment.contentDocument Read only Returns a Document, the active document in the inline frame's nested browsing context. HTMLIFrameElement.contentWindow Read only Returns a WindowProxy, the window proxy for the nested browsing context. HTMLIFrameElement.csp Specifies the Content Security Policy that an embedded document must agree to enforce upon itself. HTMLIFrameElement.frameBorder Is a DOMString that indicates whether to create borders between frames. HTMLIFrameElement.height Is a DOMString that reflects the height HTML attribute, indicating the height of the frame. HTMLIFrameElement.longDesc Is a DOMString that contains the URI of a long description of the frame. HTMLIFrameElement.marginHeight Is a DOMString being the height of the frame margin. HTMLIFrameElement.marginWidth ...
...dicates whether to create borders between frames. HTMLIFrameElement.height Is a DOMString that reflects the height HTML attribute, indicating the height of the frame. HTMLIFrameElement.longDesc Is a DOMString that contains the URI of a long description of the frame. HTMLIFrameElement.marginHeight Is a DOMString being the height of the frame margin. HTMLIFrameElement.marginWidth Is a DOMString being the width of the frame margin. HTMLIFrameElement.name Is a DOMString that reflects the name HTML attribute, containing a name by which to refer to the frame. ...
...And 5 more matches
IDBObjectStoreSync - Web APIs
from the spec because its need was questionable. It may however be reintroduced in the future if there is enough demand from web developers. The IDBObjectStoreSync interface of the IndexedDB API provides synchronous access to an object store of a database. ...
...use its need was questionable. It may however be reintroduced in the future if there is enough demand from web developers. The IDBObjectStoreSync interface of the IndexedDB API provides synchronous access to an object store of a database. ...
...nable. It may however be reintroduced in the future if there is enough demand from web developers. The IDBObjectStoreSync interface of the IndexedDB API provides synchronous access to an object store of a database. ...
...And 5 more matches
RTCIceCandidate - Web APIs
andidate, optionally configured based on an object based on the RTCIceCandidateInit dictionary. Note: For backward compatibility, the constructor also accepts as input a string containing the value of the candidate property instead of a RTCIceCandidateInit object, since the candidate includes all of the information that RTCIceCandidateInit does and more. ...
...es all of the information that RTCIceCandidateInit does and more. Properties candidate Read only A DOMString representing the transport address for the candidate that can be used for connectivity checks. The format of this address is a candidate-attribute as defined in RFC 5245. This string is empty ("") if the RTCIceCandidate is an "end of candidates" indicator. component Read only A DOMString which indicates whether the candidate is an RTP or an RTCP candidate; its value is either "rtp" or "rtcp", and is derived from the "component-id" field in the candidate a-line string. The permitted values are listed in the RTCIceComponent enumerated type. ...
...is empty ("") if the RTCIceCandidate is an "end of candidates" indicator. component Read only A DOMString which indicates whether the candidate is an RTP or an RTCP candidate; its value is either "rtp" or "rtcp", and is derived from the "component-id" field in the candidate a-line string. The permitted values are listed in the RTCIceComponent enumerated type. foundation Read only Returns a DOMString containing a unique identifier that is the same for any candidates of the same type, share the same base (the address from which the ICE agent sent the candidate), and come from the same STUN server. ...
...And 5 more matches
nsIDOMXULSelectControlElement
dom/interfaces/xul/nsIDOMXULSelectCntrlEl.idlScriptable Please add a summary to this article. ...
... dom/interfaces/xul/nsIDOMXULSelectCntrlEl.idlScriptable Please add a summary to this article. ...
...is article. Inherits from: nsIDOMXULControlElement Last changed in Gecko 1.9 (Firefox 3) Method overview nsIDOMXULSelectControlItemElement appendItem(in DOMString label, in DOMString value); long getIndexOfItem(in nsIDOMXULSelectControlItemElement item); nsIDOMXULSelectControlItemElement getItemAtIndex(in long index); nsIDOMXULSelectControlItemElement insertItemAt(in long index, in DOMString label, in DOMString value); nsIDOMXULSelectControlItemElement removeItemAt(in long index); Attributes Attribute Type Description itemCount unsigned long Read only. ...
...And 4 more matches
nsIDocShell
Do not create an instance directly. Instead, retrieve an nsIDocShell from a browser or other document container element. Note that out-of-process browsers do not have an nsIDocShell; instead you can access the nsIDocShell object from a frame script. ...
...ance directly. Instead, retrieve an nsIDocShell from a browser or other document container element. Note that out-of-process browsers do not have an nsIDocShell; instead you can access the nsIDocShell object from a frame script. ...
...he XPCOM interface guidelines void finishRestore(); void firePageHideNotification(in boolean isUnload); Native code only! void fireUnloadNotification(); Native code only! ...
...And 4 more matches
AddressErrors - Web APIs
same name in an address described using PaymentAddress. AddressErrors is the type of the object returned by shippingAddressErrors in the PaymentDetailsUpdate passed into PaymentRequestUpdateEvent.updateWith() by the shippingaddresschange event handler if a change to the address resulted in a validation error occurring. See the examples below to see how this works. Properties addressLine A DOMString which, if present, indicates that the addressLine property of the PaymentAddress could not be validated. The contents of the string provide a human-readable explanation of the validation failure, and ideally suggestions to correct the problem. city A DOMString which, if present, indicates that the city property of the PaymentAddress could not be validated. The contents of the string provide a h...
...tents of the string provide a human-readable explanation of the validation failure, and ideally suggestions to correct the problem. city A DOMString which, if present, indicates that the city property of the PaymentAddress could not be validated. The contents of the string provide a human-readable explanation of the validation failure, and ideally suggestions to correct the problem. country A DOMString which, if present, indicates that the country property of the PaymentAddress could not be validated. The contents of the string provide a human-readable explanation of the validation failure, and ideally suggestions to correct the problem. dependentLocality A DOMString which, if present, indicates that the dependentLocality property of the PaymentAddress could not be validated. The contents of ...
...uman-readable explanation of the validation failure, and ideally suggestions to correct the problem. dependentLocality A DOMString which, if present, indicates that the dependentLocality property of the PaymentAddress could not be validated. The contents of the string provide a human-readable explanation of the validation failure, and ideally suggestions to correct the problem. organization A DOMString which, if present, indicates that the organization property of the PaymentAddress could not be validated. The contents of the string provide a human-readable explanation of the validation failure, and ideally suggestions to correct the problem. phone A DOMString which, if present, indicates that the phone property of the PaymentAddress could not be validated. The contents of the string provide ...
...And 4 more matches
FileSystemEntrySync - Web APIs
ot directory of the origin of the app. For example, if your app is in http://ww.html5rocks.com, open filesystem:http://www.html5rocks.com/temporary/ in a tab. Chrome shows a read-only list of all the files and folders stored the origin of your app. ...
.../www.html5rocks.com/temporary/ in a tab. Chrome shows a read-only list of all the files and folders stored the origin of your app. ...
...s a read-only list of all the files and folders stored the origin of your app. Method overview Metadata getMetadata () raises (FileException); FileSystemEntrySync moveTo (in DirectoryEntrySync parent, optional DOMString newName) raises (FileException); FileSystemEntrySync copyTo(in DirectoryEntrySync parent, optional DOMString newName) raises (FileException); DOMString toURL(); void remove() raises (FileException); DirectoryEntrySync getParent(); Attributes Attribute Type Description filesystem readonly FileSystemSync The file system where the entry resides. fullpath readonly DOMString The full absolute path from the root to the entry. An absolute path is a relative path from t...
...And 4 more matches
HTMLTableCellElement - Web APIs
4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLTableCellElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLTableCellElement.abbr A DOMString which can be used on <th> elements (not on <td>), specifying an alternative label for the header cell.. This alternate label can be used in other contexts, such as when describing the headers that apply to a data cell. This is used to offer a shorter term for use by screen readers in particular, and is a valuable accessibility tool. Usually the value of abbr is an abbreviation or acronym, but can...
...ad only Is a DOMSettableTokenList describing a list of id of <th> elements that represents headers associated with the cell. It reflects the headers attribute. HTMLTableCellElement.rowSpan An unsigned long integer indicating the number of rows this cell must span; this lets a cell occupy space across multiple rows of the table. It reflects the rowspan attribute. HTMLTableCellElement.scope A DOMString indicating the scope of a <th> cell. Header cells can be configured, using the scope property, the apply to a specified row or column, or to the not-yet-scoped cells within the current row group (that is, the same ancestor <thead>, <tbody>, or <tfoot> element). If no value is specified for scope, the header is not associated directly with cells in this way. Permitted values for scope are: col...
...) The header cell has no predefined scope; the user agent will establish the scope based on contextual clues. Methods No specific method; inherits methods from its parent, HTMLElement. Deprecated properties Warning: These properties have been deprecated and should no longer be used. They are documented primarily to help understand older code bases. ...
...And 4 more matches
PaymentAddress - Web APIs
The PaymentAddress interface of the Payment Request API is used to store shipping or payment address information. It may be useful to refer to the Universal Postal Union web site's Addressing S42 standard materials, which provide information about international standards for postal addresses. ...
...ies PaymentAddress.addressLine Read only An array of DOMString objects providing each line of the address not included among the other properties. The exact size and content varies by country or location and can include, for example, a street name, house number, apartment number, rural delivery route, descriptive instructions, or post office box number. PaymentAddress.country Read only A DOMString specifying the country in which the address is located, using the ISO-3166-1 alpha-2 standard. The string is always given in its canonical upper-case form. Some examples of valid country values: "US", "GB", "CN", or "JP". PaymentAddress.city Read only A DOMString which contains the city or town portion of the address. ...
...try Read only A DOMString specifying the country in which the address is located, using the ISO-3166-1 alpha-2 standard. The string is always given in its canonical upper-case form. Some examples of valid country values: "US", "GB", "CN", or "JP". PaymentAddress.city Read only A DOMString which contains the city or town portion of the address. PaymentAddress.dependentLocality Read only A DOMString giving the dependent locality or sublocality within a city, for example, a neighborhood, borough, district, or UK dependent locality. PaymentAddress.organization Read only A DOMString specifying the name of the organization, firm, company, or institution at the payment address. PaymentAddress.phone Read only A DOMString specifying the telephone number of the recipient or contact person. Pa...
...And 4 more matches
nsIAccessNode
plementations are instantiated lazily. The nsIAccessNode tree for a given DOM window has a one to one relationship to the DOM tree. If the DOM node for this access node is "accessible", then a QueryInterface to nsIAccessible will succeed. ...
...tiated lazily. The nsIAccessNode tree for a given DOM window has a one to one relationship to the DOM tree. If the DOM node for this access node is "accessible", then a QueryInterface to nsIAccessible will succeed. ...
...ee for a given DOM window has a one to one relationship to the DOM tree. If the DOM node for this access node is "accessible", then a QueryInterface to nsIAccessible will succeed. Method overview nsIAccessNode getChildNodeAt(in long childNum); Obsolete since Gecko 2.0 nsIDOMCSSPrimitiveValue getComputedStyleCSSValue(in DOMString pseudoElt, in DOMString propertyName); DOMString getComputedStyleValue(in DOMString pseudoElt, in DOMString propertyName); void scrollTo(in unsigned long aScrollType); void scrollToPoint(in unsigned long aCoordinateType, in long aX, in long aY); Attributes Note: Attempting to access the attributes of a node that is unattached from the accessible tree will result in an exception - NS_ERROR_FAILURE. Attribute...
...And 3 more matches
nsIDOMStorage
rs, which may be retrieved, modified and removed as needed. A key may only exist once within a storage object, and only one value may be associated with a particular key. Keys are stored in a particular order with the condition that this order not change by merely changing the value associated with a key, but the order may change when a key is added or removed. Method overview void clear(); DOMString getItem(in DOMString key); DOMString key(in unsigned long index); void removeItem(in DOMString key); void setItem(in DOMString key, in DOMString data); Attributes Attribute Type Description length unsigned long The number of keys stored in the session store. Read only. Methods clear() Clear the content of this storage bound to a domain or an origin. void clear(); Parameters None...
...(in DOMString key); void setItem(in DOMString key, in DOMString data); Attributes Attribute Type Description length unsigned long The number of keys stored in the session store. Read only. Methods clear() Clear the content of this storage bound to a domain or an origin. void clear(); Parameters None. getItem() Returns from session storage the data corresponding to the specified key. DOMString getItem( in DOMString key ); Parameters key The key for which data should be returned. Return value An nsIDOMStorageItem object describing the data corresponding to the specified key, or null if no data exists for the given key. key() Returns the key for the item stored at the specified index in the data store. ...
...turns from session storage the data corresponding to the specified key. DOMString getItem( in DOMString key ); Parameters key The key for which data should be returned. Return value An nsIDOMStorageItem object describing the data corresponding to the specified key, or null if no data exists for the given key. key() Returns the key for the item stored at the specified index in the data store. DOMString key( in unsigned long index ); Parameters index The index for which the corresponding key should be returned. Return value A string containing the requested key. Exceptions thrown INDEX_SIZE_ERR There is no key at the specified index. removeItem() Given a key, removes the corresponding entry from the session store. ...
...And 3 more matches
nsIDOMXULSelectControlItemElement
dom/interfaces/xul/nsIDOMXULSelectCntrlItemEl.idlScriptable Please add a summary to this article. ...
... dom/interfaces/xul/nsIDOMXULSelectCntrlItemEl.idlScriptable Please add a summary to this article. ...
... dom/interfaces/xul/nsIDOMXULSelectCntrlItemEl.idlScriptable Please add a summary to this article. ...
...And 3 more matches
nsISelection
void collapseToEnd(); void collapseToStart(); boolean containsNode(in nsIDOMNode node, in boolean partlyContained); void deleteFromDocument(); void extend(in nsIDOMNode parentNode, in long offset); void extendNative(in nsIDOMNode parentNode, in long offset); Native code only! ...
...End(); void collapseToStart(); boolean containsNode(in nsIDOMNode node, in boolean partlyContained); void deleteFromDocument(); void extend(in nsIDOMNode parentNode, in long offset); void extendNative(in nsIDOMNode parentNode, in long offset); Native code only! ...
...Read only...
...And 3 more matches
nsISmsDatabaseService
Inherits from: nsISupports Last changed in Gecko 15.0 (Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) Implemented by: @mozilla.org/sms/smsdatabaseservice;1. ...
...nsISupports Last changed in Gecko 15.0 (Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) Implemented by: @mozilla.org/sms/smsdatabaseservice;1. ...
... SeaMonkey 2.12) Implemented by: @mozilla.org/sms/smsdatabaseservice;1. ...
...And 3 more matches
nsIXSLTProcessor
LT Processor Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/document-transformer;1?type=xslt. ...
...om: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/document-transformer;1?type=xslt. ...
...1?type=xslt. To create an instance, use: var xsltProcessor = Components.classes["@mozilla.org/document-transformer;1?type=xslt"] .createInstance(Components.interfaces.nsIXSLTProcessor); Method overview void clearParameters(); nsIVariant getParameter(in DOMString namespaceURI, in DOMString localName); void importStylesheet(in nsIDOMNode style); void removeParameter(in DOMString namespaceURI, in DOMString localName); void reset(); void setParameter(in DOMString namespaceURI, in DOMString localName, in nsIVariant value); nsIDOMDocument transformToDocument(in nsIDOMNode source); nsIDOMDocumentFragment transformToFragment(in nsIDOMNode source, in nsIDOMDocument output); Methods clearParameters() Removes all set parameters from this nsIXSLTProcessor. This will mak...
...And 3 more matches
CSSCounterStyleRule - Web APIs
D4DDE4" stroke-width="2px" /><text x="211" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">CSSCounterStyleRule</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties This interface also inherits properties from its parent CSSRule. ...
...or="middle" alignment-baseline="middle">CSSCounterStyleRule</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties This interface also inherits properties from its parent CSSRule. CSSCounterStyleRule.name Is a DOMString object that contains the serialization of the <counter-style-name> defined for the associated rule. CSSCounterStyleRule.system Is a DOMString object that contains the serialization of the system descriptor defined for the associated rule. If the descriptor was not specified in the associated rule, the attribute returns an empty string. CSSCounterStyleRule.symbols Is a DOMString object that contains the serialization of the symbols descriptor defined for the associated rule. If the descriptor was not specified in the associated rule, ...
...ssociated rule. If the descriptor was not specified in the associated rule, the attribute returns an empty string. CSSCounterStyleRule.symbols Is a DOMString object that contains the serialization of the symbols descriptor defined for the associated rule. If the descriptor was not specified in the associated rule, the attribute returns an empty string. CSSCounterStyleRule.additiveSymbols Is a DOMString object that contains the serialization of the additive-symbols descriptor defined for the associated rule. If the descriptor was not specified in the associated rule, the attribute returns an empty string. CSSCounterStyleRule.negative Is a DOMString object that contains the serialization of the negative descriptor defined for the associated rule. If the descriptor was not specified in the assoc...
...And 3 more matches
HTMLAnchorElement - Web APIs
<text x="406" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLAnchorElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement, and implements those from HTMLHyperlinkElementUtils. Element.accessKey Is a DOMString representing a single character that switches input focus to the hyperlink. HTMLAnchorElement.download Is a DOMString indicating that the linked resource is intended to be downloaded rather than displayed in the browser. The value represent the proposed name of the file. If the name is not a valid filename of the underlying OS, browser will adapt it. HTMLHyperlinkElementUtils.hash Is a USVS...
...ng representing the hostname and port (if it's not the default port) in the referenced URL. HTMLHyperlinkElementUtils.hostname Is a USVString representing the hostname in the referenced URL. HTMLHyperlinkElementUtils.href Is a USVString that is the result of parsing the href HTML attribute relative to the document, containing a valid URL of a linked resource. HTMLAnchorElement.hreflang Is a DOMString that reflects the hreflang HTML attribute, indicating the language of the linked resource. HTMLAnchorElement.media Is a DOMString that reflects the media HTML attribute, indicating the intended media for the linked resource. HTMLHyperlinkElementUtils.password Is a USVString containing the password specified before the domain name. HTMLHyperlinkElementUtils.origin Read only Returns a USVStr...
...ntUtils.pathname Is a USVString representing the path name component, if any, of the referenced URL. HTMLHyperlinkElementUtils.port Is a USVString representing the port component, if any, of the referenced URL. HTMLHyperlinkElementUtils.protocol Is a USVString representing the protocol component, including trailing colon (':'), of the referenced URL. HTMLAnchorElement.referrerPolicy Is a DOMString that reflects the referrerpolicy HTML attribute indicating which referrer to use. HTMLAnchorElement.rel Is a DOMString that reflects the rel HTML attribute, specifying the relationship of the target object to the linked object. HTMLAnchorElement.relList Read only Returns a DOMTokenList that reflects the rel HTML attribute, as a list of tokens. HTMLHyperlinkElementUtils.search Is a USVStrin...
...And 3 more matches
HTMLAreaElement - Web APIs
/><text x="416" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLAreaElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement, and implements those from HTMLHyperlinkElementUtils. ...
...ext-anchor="middle" alignment-baseline="middle">HTMLAreaElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement, and implements those from HTMLHyperlinkElementUtils. Element.accessKey Is a DOMString containing a single character that switches input focus to the control. HTMLAreaElement.alt Is a DOMString that reflects the alt HTML attribute, containing alternative text for the element. HTMLAreaElement.coords Is a DOMString that reflects the coords HTML attribute, containing coordinates to define the hot-spot region. HTMLAreaElement.download Is a DOMString indicating that the linked resource is intended to be downloaded rather than displayed in the browser. The value represent the proposed n...
...rlinkElementUtils.host Is a USVString containing the hostname and port (if it's not the default port) in the referenced URL. HTMLHyperlinkElementUtils.hostname Is a USVString containing the hostname in the referenced URL. HTMLHyperlinkElementUtils.href Is a USVString containing that reflects the href HTML attribute, containing a valid URL of a linked resource. HTMLAreaElement.hreflang Is a DOMString containing that reflects the hreflang HTML attribute, indicating the language of the linked resource. HTMLAreaElement.media Is a DOMString containing that reflects the media HTML attribute, indicating target media of the linked resource. HTMLAreaElement.noHref Is a Boolean flag indicating if the area is inactive (true) or active (false). HTMLHyperlinkElementUtils.password Is a USVString c...
...And 3 more matches
HTMLLinkElement - Web APIs
troke="#D4DDE4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLLinkElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement, and LinkStyle. ...
... Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLLinkElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement, and LinkStyle. HTMLLinkElement.as Is a DOMString representing the type of content being loaded by the HTML link. HTMLLinkElement.crossOrigin Is a DOMString that corresponds to the CORS setting for this link element. See CORS settings attributes for details. ...
...kElement.as Is a DOMString representing the type of content being loaded by the HTML link. HTMLLinkElement.crossOrigin Is a DOMString that corresponds to the CORS setting for this link element. See CORS settings attributes for details. HTMLLinkElement.disabled Is a Boolean which represents whether the link is disabled; currently only used with style sheet links. HTMLLinkElement.href Is a DOMString representing the URI for the target resource. HTMLLinkElement.hreflang Is a DOMString representing the language code for the linked resource. HTMLLinkElement.media Is a DOMString representing a list of one or more media formats to which the resource applies. HTMLLinkElement.referrerPolicy Is a DOMString that reflects the referrerpolicy HTML attribute indicating which referrer to use. HTM...
...And 3 more matches
MediaTrackSettings - Web APIs
he following will be included in the object, either because it's not supported by the browser or because it's not available due to context. For example, because RTP doesn't provide some of these values during negotiation of a WebRTC connection, a track associated with a RTCPeerConnection will not include certain values, such as facingMode or groupId. ...
...The group ID is a browsing session-unique string identifying the source group of the track. Two devices (as identified by the deviceId) are considered part of the same group if they are from the same physical device. ...
...to 10 decimal places. This is the width of the image in pixels divided by its height in pixels. Common values include 1.3333333333 (for the classic television 4:3 "standard" aspect ratio, also used on tablets such as Apple's iPad), 1.7777777778 (for the 16:9 high-definition widescreen aspect ratio), and 1.6 (for the 16:10 aspect ratio common among widescreen computers and tablets). facingMode A DOMString indicating the current value of the facingMode property, specifying the direction the camera is facing. The value will be one of: "user" A camera facing the user (commonly known as a "selfie cam"), used for self-portraiture and video calling. "environment" A camera facing away from the user (when the user is looking at the screen). This is typically the highest quality camera on the dev...
...And 3 more matches
SVGDocument - Web APIs
an SVGDocument object will not exist; instead, the root object in the document object hierarchy will be a Document object of a different type, such as an HTMLDocument object. ...
...ot exist; instead, the root object in the document object hierarchy will be a Document object of a different type, such as an HTMLDocument object. ...
...ill be a Document object of a different type, such as an HTMLDocument object. ...
...And 3 more matches
mozbrowsercontextmenu
cess a context menu over a browser <iframe>. This event can be used to control what will appear in the menu. General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: clientX The X value of the coordinate...
...presenting a custom menu defined via <menu> / <menuitem> elements and pointed to via a contextmenu attribute on the DOM element clicked on, which contains the menu's id. contextmenuItemSelected An anonymous function that fires when a menu item is selected. The MenuSystem object An object defining a standard context menu that will be displayed. Its properties are as follows: documentURI A DOMString representing the URL of the document the menu is associated with. uri A DOMString. In the case of an image or video context menu, this is the src of the image or video clicked on to get the context menu. In the case of an link context menu, it is the link's href. text A DOMString representing the text of the link clicked on, in the case of a link context menu. hasVideo A Boolean. In the cas...
...t menu, this is the src of the image or video clicked on to get the context menu. In the case of an link context menu, it is the link's href. text A DOMString representing the text of the link clicked on, in the case of a link context menu. hasVideo A Boolean. In the case of a video context menu, this returns true if the video has metadata and is bigger than 0 x 0, or false if not. action A DOMString representing the action of a form, in the case of a form context menu. method A DOMString representing the method of a form, in the case of a form context menu. name A DOMString representing the name of a form, in the case of a form context menu. The Menu object An object representing a custom menu defined via <menu> / <menuitem> elements and pointed to via a contextmenu attribute on the D...
...And 2 more matches
nsIDOMOfflineResourceList
includes methods for adding resources to and removing resources from the cache, as well as for enumerating the dynamically managed resource list. dom/interfaces/offline/nsIDOMOfflineResourceList.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Inherits from: nsISupports Method overview void mozAdd(in DOMString uri); boolean mozHasItem(in DOMString uri); DOMString mozItem(in unsigned long index); void mozRemove(in DOMString uri); void swapCache(); void update(); Attributes Attribute Type Description mozItems nsIDOMOfflineResourceList The list of dynamically-managed entries in the offline resource list. Read only. ...
... DOWNLOADING 3 Resources are being downloaded to be added to the cache. UPDATEREADY 4 There is a new version of the application cache available. OBSOLETE 5 The application cache group is now obsolete. Methods mozAdd() Adds an item to the dynamically managed entries. The resource will be fetched and added to the application cache. ...
...hed and added to the application cache. void mozAdd( in DOMString uri ); Parameters uri The URI of the resource to add to the list. mozHasItem Returns a Boolean value indicating whether or not the specified URI represents a resource that's in the application cache's list. Note: This method has been deprecated. You should use the mozItems attribute instead. void mozHasItem( in DOMString uri ); Parameters uri The URI of the resource to check. Return value true if the resource is in the list, otherwise false. mozItem Returns the URI of the item at the specific offset into the list of cached resources. ...
...And 2 more matches
nsIDOMStorage2
essed by the same origin that created the items in the first place. A DOM window's local storage object can be retrieved from the window's localStorage attribute. dom/public/idl/storage/nsIDOMStorage2.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Inherits from: nsISupports Method overview void clear(); DOMString getItem(in DOMString key); DOMString key(in unsigned long index); void removeItem(in DOMString key); void setItem(in DOMString key, in DOMString data); Attributes Attribute Type Description length unsigned long The number of keys stored in local storage. Methods clear() Clears the contents of this storage context; this removes all values bound to the domain or origin. void clea...
... void setItem(in DOMString key, in DOMString data); Attributes Attribute Type Description length unsigned long The number of keys stored in local storage. Methods clear() Clears the contents of this storage context; this removes all values bound to the domain or origin. void clear(); Parameters None. getItem() Returns from local storage the data corresponding to the specified key. DOMString getItem( in DOMString key ); Parameters key The key for which data should be returned. Return value A string containing the data corresponding to the specified key, or null if no data exists for the given key. key() Returns the key for the item stored at the specified index in the data store. ...
...ers None. getItem() Returns from local storage the data corresponding to the specified key. DOMString getItem( in DOMString key ); Parameters key The key for which data should be returned. Return value A string containing the data corresponding to the specified key, or null if no data exists for the given key. key() Returns the key for the item stored at the specified index in the data store. DOMString key( in unsigned long index ); Parameters index The index for which the corresponding key should be returned. Return value A string containing the requested key. Exceptions thrown INDEX_SIZE_ERRThere is no key at the specified index. ...
...And 2 more matches
nsIWebContentHandlerRegistrar
: nsISupports Last changed in Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5) Implemented by @mozilla.org/embeddor.implemented/web-content-handler-registrar;1 as a service: var nsiwchr = Cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"] .getService(Ci.nsIWebContentHandlerRegistrar); Method overview void registerContentHandler(in DOMString mimeType, in DOMString uri, in DOMString title, in nsIDOMWindow contentWindow) void registerProtocolHandler(in DOMString protocol,in DOMString uri, in DOMString title, in nsIDOMWindow contentWindow) Methods registerContentHandler Summary of registerContentHandler void registerContentHandler( in DOMString ...
... title The title of the handler presented to the user as a string. contentWindow The DOM content window from which the method has been called. ...
...String title, in nsIDOMWindow contentWindow) void registerProtocolHandler(in DOMString protocol,in DOMString uri, in DOMString title, in nsIDOMWindow contentWindow) Methods registerContentHandler Summary of registerContentHandler void registerContentHandler( in DOMString mimeType, in DOMString uri, in DOMString title, in nsIDOMWindow contentWindow ); Parameters mimeType The desired MIME type as a string uri The URI to the handler as a string. title The title of the handler presented to the user as a string. contentWindow The DOM content window from which the method has been called. ...
...And 2 more matches
Element - Web APIs
Web › API › Element
extension that interface's parent, EventTarget. It implements the properties of ParentNode, ChildNode, NonDocumentTypeChildNode, and Animatable. Element.attributes Read only Returns a NamedNodeMap object containing the assigned attributes of the corresponding HTML element. Element.classList Read only Returns a DOMTokenList containing the list of class attributes. Element.className Is a DOMString representing the class of the element. Element.clientHeight Read only Returns a Number representing the inner height of the element. Element.clientLeft Read only Returns a Number representing the width of the left border of the element. Element.clientTop Read only Returns a Number representing the width of the top border of the element. Element.clientWidth Read only Returns a Number r...
...er representing the inner height of the element. Element.clientLeft Read only Returns a Number representing the width of the left border of the element. Element.clientTop Read only Returns a Number representing the width of the top border of the element. Element.clientWidth Read only Returns a Number representing the inner width of the element. ...
...resenting the width of the left border of the element. Element.clientTop Read only Returns a Number representing the width of the top border of the element. Element.clientWidth Read only Returns a Number representing the inner width of the element. Element.computedName Read only Returns a DOMString containing the label exposed to accessibility. Element.computedRole Read only Returns a DOMString containing the ARIA role that has been applied to a particular element. Element.id Is a DOMString representing the id of the element. Element.innerHTML Is a DOMString representing the markup of the element's content. Element.localName Read only A DOMString representing the local part of the qualified name of the element. Element.namespaceURI Read only The namespace URI of the element, o...
...And 2 more matches
HTMLFormElement - Web APIs
a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties This interface also inherits properties from its parent, HTMLElement. HTMLFormElement.elements Read only A HTMLFormControlsCollection holding all form controls belonging to this form element. HTMLFormElement.lengthRead only A long reflecting the number of controls in the form. ...
...es from its parent, HTMLElement. HTMLFormElement.elements Read only A HTMLFormControlsCollection holding all form controls belonging to this form element. HTMLFormElement.lengthRead only A long reflecting the number of controls in the form. HTMLFormElement.name A DOMString reflecting the value of the form's name HTML attribute, containing the name of the form. HTMLFormElement.method A DOMString reflecting the value of the form's method HTML attribute, indicating the HTTP method used to submit the form. ...
...thRead only A long reflecting the number of controls in the form. HTMLFormElement.name A DOMString reflecting the value of the form's name HTML attribute, containing the name of the form. HTMLFormElement.method A DOMString reflecting the value of the form's method HTML attribute, indicating the HTTP method used to submit the form. Only specified values can be set. HTMLFormElement.target A DOMString reflecting the value of the form's target HTML attribute, indicating where to display the results received from submitting the form. ...
...And 2 more matches
HTMLTableElement - Web APIs
is automatically updated when the HTMLTableElement changes. HTMLTableElement.tBodiesRead only Returns a live HTMLCollection containing all the <tbody> of the element. The HTMLCollection is live and is automatically updated when the HTMLTableElement changes. Obsolete Properties Warning: The following properties are obsolete. You should avoid using them. ...
...nges. Obsolete Properties Warning: The following properties are obsolete. You should avoid using them. HTMLTableElement.align Is a DOMString containing an enumerated value reflecting the align attribute. It indicates the alignment of the element's contents with respect to the surrounding context. The possible values are "left", "right", and "center". HTMLTableElement.bgColor Is a DOMString containing the background color of the cells. It reflects the obsolete bgcolor attribute. HTMLTableElement.border Is a DOMString containing the width in pixels of the border of the table. It reflects the obsolete border attribute. HTMLTableElement.cellPadding Is a DOMString containing the width in pixels of the horizontal and vertical sapce between cell content and cell borders. It reflec...
...or attribute. HTMLTableElement.border Is a DOMString containing the width in pixels of the border of the table. It reflects the obsolete border attribute. HTMLTableElement.cellPadding Is a DOMString containing the width in pixels of the horizontal and vertical sapce between cell content and cell borders. It reflects the obsolete cellpadding attribute. HTMLTableElement.cellSpacing Is a DOMString containing the width in pixels of the horizontal and vertical separation between cells. It reflects the obsolete cellspacing attribute. HTMLTableElement.frame Is a DOMString containing the type of the external borders of the table. It reflects the obsolete frame attribute and can take one of the following values: "void", "above", "below", "hsides", "vsides", "lhs", "rhs", "box", or "border". ...
...And 2 more matches
MediaTrackConstraints - Web APIs
roperties will exist on the object. This may be because a given browser doesn't support the property, or because it doesn't apply. For example, because RTP doesn't provide some of these values during negotiation of a WebRTC connection, a track associated with a RTCPeerConnection will not include certain values, such as facingMode or groupId. Properties of all media tracks deviceId A ConstrainDOMString object specifying a device ID or an array of device IDs which are acceptable and/or required. groupId A ConstrainDOMString object specifying a group ID or an array of group IDs which are acceptable and/or required. Properties of audio tracks autoGainControl A ConstrainBoolean object which specifies whether automatic gain control is preferred and/or required. channelCount A ConstrainLong...
... A ConstrainDouble (a double-precision integer) specifying the desired focal length. torch A Boolean defining whether the fill light is continuously connected, meaning it stays on as long as the track is active. Properties of video tracks aspectRatio A ConstrainDouble specifying the video aspect ratio or range of aspect ratios which are acceptable and/or required. facingMode A ConstrainDOMString object specifying a facing or an array of facings which are acceptable and/or required. frameRate A ConstrainDouble specifying the frame rate or range of frame rates which are acceptable and/or required. height A ConstrainLong specifying the video height or range of heights which are acceptable and/or required. width A ConstrainLong specifying the video width or range of widths which are ac...
... which are acceptable and/or required. frameRate A ConstrainDouble specifying the frame rate or range of frame rates which are acceptable and/or required. height A ConstrainLong specifying the video height or range of heights which are acceptable and/or required. width A ConstrainLong specifying the video width or range of widths which are acceptable and/or required. resizeMode A ConstrainDOMString object specifying a mode or an array of modes the UA can use to derive the resolution of a video track. Allowed values are none and crop-and-scale. none means that the user agent uses the resolution provided by the camera, its driver or the OS. crop-and-scale means that the user agent can use cropping and downscaling on the camera output in order to satisfy other constraints that affect the reso...
...And 2 more matches
Node - Web APIs
Web › API › Node
dth="2px" /><text x="188.5" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">Node</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties In addition to the properties below, Node inherits properties from its parent, EventTarget. Node.baseURIRead only Returns a DOMString representing the base URL of the document containing the Node. Node.baseURIObject Read only (Not available to web content.) The nsIURI object representing the base URI for the element. Node.childNodesRead only Returns a live NodeList containing all the children of this node. NodeList being live means that if the children of the Node change, the NodeList object is automatically updated. N...
...ntext object, e.g. the Document object in the case of the normal DOM, or the ShadowRoot in the case of a shadow DOM. Node.lastChildRead only Returns a Node representing the last direct child node of the node, or null if the node has no child. Node.nextSiblingRead only Returns a Node representing the next node in the tree, or null if there isn't such node. Node.nodeNameRead only Returns a DOMString containing the name of the Node. The structure of the name will differ with the node type. E.g. An HTMLElement will contain the name of the corresponding tag, like 'audio' for an HTMLAudioElement, a Text node will have the '#text' string, or a Document node will have the '#document' string. Node.nodeTypeRead only Returns an unsigned short representing the type of the node. Possible values are:...
... the parent of this node. If the node has no parent, or if that parent is not an Element, this property returns null. Node.previousSiblingRead only Returns a Node representing the previous node in the tree, or null if there isn't such node. Node.textContent Returns / Sets the textual content of an element and all its descendants. Obsolete properties Node.localName Read only Returns a DOMString representing the local part of the qualified name of an element. Note: In Firefox 3.5 and earlier, the property upper-cases the local name for HTML elements (but not XHTML elements). In later versions, this does not happen, so the property is in lower case for both HTML and XHTML. Node.namespaceURI Read only The namespace URI of this node, or null if it is no namespace. Note: In Fir...
...And 2 more matches
StorageEvent - Web APIs
The key attribute is null when the change is caused by the storage clear() method. Read only. newValue ...
...The newValue is null when the ...
...The newValue is null when the change has been invo...
...And 2 more matches
<tr>: The Table Row element - HTML: Hypertext Markup Language
Web › HTML › Element › tr
This element includes the global attributes. There are also several deprecated attributes, which you should avoid but may need to know when reading older code. Deprecated attributes The following attributes may still be implemented in browsers but are no longer part of the HTML specification and may be missing or may not work as expected. They should be avoided. alignObsolete since HTML5 A DOMString which specifies how the cell's context should be aligned horizontally within the cells in the row; this is shorthand for using align on every cell in the row individually. Possible values are: left Align the content of each cell at its left edge. center Center the contents of each cell between their left and right edges. right Align the content of each cell at its right edge. just...
... expressly set for align, the parent node's value is inherited. Instead of using the obsolete align attribute, you should instead use the CSS text-align property to establish left, center, right, or justify alignment for the row's cells. To apply character-based alignment, set the CSS text-align property to the alignment character (such as "." or ","). bgcolorObsolete since HTML5 A DOMString specifying a color to apply to the backgrounds of each of the row's cells. This can be either an hexadecimal #RRGGBB or #RGB value or a color keyword. Omitting the attribute or setting it to null in JavaScript causes the row's cells to inherit the row's parent element's background color. The <tr> element should be styled using CSS. To give a similar effect as the bgcolor attribute, use the CS...
...s cells. This can be either an hexadecimal #RRGGBB or #RGB value or a color keyword. Omitting the attribute or setting it to null in JavaScript causes the row's cells to inherit the row's parent element's background color. The <tr> element should be styled using CSS. To give a similar effect as the bgcolor attribute, use the CSS property background-color. charObsolete since HTML5 A DOMString which sets the character to align the cells in each of the row's columns on (each row's centering that uses the same character gets aligned with others using the same character . Typical values for this include a period (".") or comma (",") when attempting to align numbers or monetary values. If align is not set to char, this attribute is ignored. This attribute is not only obsolete, but was ...
...And 2 more matches
JavaScript crypto - Archive of obsolete content
In the add case, the module will be placed in the ...
...In the add case, the module will be placed in the NSS secmod.db datab...
...values could be filled in by the server CGI */ var nickname= "MyCertNickname"; var cert = "Mkjflakdjfiwjflaksufklasf ..."; var forceBackup = false; function LoadCertificate() { window.crypto.importUserCertificates(nickname, cert, forceBackup); return false; } document.forms[0].onsubmit = LoadCertificate; </script> Signing text DOMString signText(DOMString stringToSign, DOMString caOption /* ... */); Loading PKCS #11 modules long deletemodule(DOMString moduleName); long addmodule(DOMString moduleName, DOMString libraryFullPath, long cryptoMechanismFlags, long cipherFlags); Loads or removes a new PKCS #11 module. In the add case, the module will be placed in the NSS secmod.db database and will be loaded automatically on app...
... void logout(); Logs the user out of all the cryptographic tokens. The next private operation on any token will require the user password again. The SSL session cache is also cleared (from Firefox 1.5 upward). This means the master password will be requested the next time a saved password will be access...
nsIDOMNode
entire Document Object Model. It represents a single node in the document tree. ...
... Model. It represents a single node in the document tree. Inherits from: nsISupports Last changed in Gecko 0.9.6 Method overview nsIDOMNode appendChild(in nsIDOMNode newChild) nsIDOMNode cloneNode(in boolean deep); boolean hasAttributes(); boolean hasChildNodes(); nsIDOMNode insertBefore(in nsIDOMNode newChild, in nsIDOMNode refChild) boolean isSupported(in DOMString feature, in DOMString version); void normalize(); nsIDOMNode removeChild(in nsIDOMNode oldChild) nsIDOMNode replaceChild(in nsIDOMNode newChild, in nsIDOMNode oldChild) Attributes Attribute Type Description attributes nsIDOMNamedNodeMap Read only. childNodes nsIDOMNodeList Read only. firstChild nsIDOMNode Read only. lastChild nsIDOMNode Read only. localName DOMString Read only. namespaceURI DOM...
...Node oldChild) nsIDOMNode replaceChild(in nsIDOMNode newChild, in nsIDOMNode oldChild) Attributes Attribute Type Description attributes nsIDOMNamedNodeMap Read only. childNodes nsIDOMNodeList Read only. firstChild nsIDOMNode Read only. lastChild nsIDOMNode Read only. localName DOMString Read only. namespaceURI DOMString Read only. nextSibling nsIDOMNode Read only. nodeName DOMString Read only. nodeType unsigned short Read only. nodeValue DOMString ownerDocument nsIDOMDocument Read only. parentNode nsIDOMNode Read only. prefix DOMString previousSibling nsIDOMNode Read only. Constants Constant Value Description ELEMENT_NODE 1 ATTRIBUTE_NODE 2 TEXT_NODE 3 CDATA_SECTION_NODE 4 ENTITY_REFERENCE_NODE 5 ENTITY_NODE 6 PROCESSING_INSTRU...
...MNode cloneNode( in boolean deep ); Parameters deep Return value hasAttributes() boolean hasAttributes(); Parameters None. Return value hasChildNodes() boolean hasChildNodes(); Parameters None. Return value insertBefore() nsIDOMNode insertBefore( in nsIDOMNode newChild, in nsIDOMNode refChild ); Parameters newChild refChild Return value isSupported() boolean isSupported( in DOMString feature, in DOMString version ); Parameters feature version Return value normalize() void normalize(); Parameters None. removeChild() nsIDOMNode removeChild( in nsIDOMNode oldChild ); Parameters oldChild Return value replaceChild() nsIDOMNode replaceChild( in nsIDOMNode newChild, in nsIDOMNode oldChild ); Parameters newChild oldChild Return value See also Document Objec...
nsIDOMXPathEvaluator
essions against a DOM node. Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/dom/xpath-evaluator;1. ...
... Note: Prior to Gecko 1.9, you could call this method on documents other than the one you planned to run the XPath against; starting with Gecko 1.9, however, yo...
...d short type, in nsISupports result) Methods createExpression() Creates an nsIDOMXPathExpression which can then be used for (repeated) evaluations. Note: Prior to Gecko 1.9, you could call this method on documents other than the one you planned to run the XPath against; starting with Gecko 1.9, however, you must call it on the same document. nsIDOMXPathExpression createExpression( in DOMString expression, in nsIDOMXPathNSResolver resolver ); Parameters expression A string representing the XPath to be created. resolver A name space resolver created by createNSResolver(), or a user defined name space resolver. Read more on Implementing a User Defined Namespace Resolver if you wish to take the latter approach. Return value An XPath expression, as an nsIDOMXPathExpre...
...hat they can be matched with the document. null is common for HTML documents or when no name space prefixes are used. nsIDOMXPathNSResolver createNSResolver( in nsIDOMNode nodeResolver ); Parameters nodeResolver The node to be used as a context for name space resolution. Return value A name space resolver. evaluate() Evaluate the specified XPath expression. nsISupports evaluate( in DOMString expression, in nsIDOMNode contextNode, in nsIDOMXPathNSResolver resolver, in unsigned short type, in nsISupports result ); Parameters expression A string representing the XPath to be evaluated. contextNode A DOM Node to evaluate the XPath expression against. To evaluate against a whole document, use the document.documentElement. resolver A name space resolver cre...
nsIEventListenerService
(in nsIDOMEventTarget aEventTarget, [optional] out unsigned long aCount, [retval, array, size_is(aCount)] out nsIDOMEventTarget aOutArray); void getListenerInfoFor(in nsIDOMEventTarget aEventTarget, [optional] out unsigned long aCount, [retval, array, size_is(aCount)] out nsIEventListenerInfo aOutArray); boolean hasListenersFor(in nsIDOMEventTarget aEventTarget, in DOMString aType); void addSystemEventListener(in nsIDOMEventTarget target, in DOMString type, in nsIDOMEventListener listener, in boolean useCapture); void removeSystemEventListener(in nsIDOMEventTarget target, in DOMString type, in nsIDOMEventListener listener, in boolean useCapture); Attributes Attribute Type Description ...
...entTarget The nsIEventTarget for which to obtain a list of listeners. aCount On return, the number of returned listener descriptors. aOutArray An array of nsIEventListenerInfo objects describing the listeners. hasListenersFor() Returns true if a event target has any listener for the given type. boolean hasListenersFor( in nsIDOMEventTarget aEventTarget, in DOMString aType ); Parameters aEventTarget The nsIDOMEventTarget for which to check if this has any listener for aType. aType An event name. addSystemEventListener() Add a system-group eventlistener to a event target. System-group eventlisteners are called after all eventlisteners in default-group handle the events. So, system-group eventlisteners can implement the default a...
... system-group eventlistener to a event target. System-group eventlisteners are called after all eventlisteners in default-group handle the events. So, system-group eventlisteners can implement the default action of the event. Even if an event is stopped its propagation in default-group, the event will be fired again in system-group. void addSystemEventListener( in nsIDOMEventTarget target, in DOMString type, in nsIDOMEventListener listener, in boolean useCapture ); Parameters target The nsIDOMEventTarget for the event target to listen an event. type The event name to listen. listener The nsIDOMEventListener which listens the event. useCapture True if to listen the event in capture phase, otherwise, false. removeSystemEventListener()...
...r the event target to listen an event. type The event name to listen. listener The nsIDOMEventListener which listens the event. useCapture True if to listen the event in capture phase, otherwise, false. removeSystemEventListener() Remove a system-group eventlistener from a event target. void removeSystemEventListener( in nsIDOMEventTarget target, in DOMString type, in nsIDOMEventListener listener, in boolean useCapture ); Parameters target The nsIDOMEventTarget for the event target listening the event. type The listening event name. listener The nsIDOMEventListener which is listening the event. useCapture True if listening the events in capture phase, otherwise, false. Remarks nsIEventList...
nsITextInputProcessor
boolean beginInputTransactionForTests(in nsIDOMWindow aWindow, [optional] in nsITextInputProcessorCallback aCallback); void cancelComposition([optional] in nsIDOMKeyEvent aDOMKeyEvent, [optional] in unsigned long aKeyFlags); boolean commitComposition([optional] in nsIDOMKeyEvent aDOMKeyEvent, [optional] in unsigned long aKeyFlags); boolean commitCompositionWith(in DOMString aCommitString, [optional] in nsIDOMKeyEvent aDOMKeyEvent, [optional] in unsigned long aKeyFlags); boolean flushPendingComposition([optional] in nsIDOMKeyEvent aDOMKeyEvent, [optional] in unsigned long aKeyFlags); boolean getModifierState(in DOMString aModifierKeyName); boolean keydown([optional] in nsIDOMKeyEvent aDOMKeyEvent, [optional] in unsigned long aKeyFlags); ...
...gs); boolean getModifierState(in DOMString aModifierKeyName); boolean keydown([optional] in nsIDOMKeyEvent aDOMKeyEvent, [optional] in unsigned long aKeyFlags); boolean keyup([optional] in nsIDOMKeyEvent aDOMKeyEvent, [optional] in unsigned long aKeyFlags); void setCaretInPendingComposition(in unsigned long aOffset); void setPendingCompositionString(in DOMString aString); void shareModifierStateOf(in nsITextInputProcessor aOther); boolean startComposition([optional] in nsIDOMKeyEvent aDOMKeyEvent, [optional] in unsigned long aKeyFlags); Attributes Attribute Type Description hasComposition boolean Whether the instance has composition or not. true if it has composition. Read only. Constants...
...ardEvent instance for nsITextInputProcessor. aKeyFlags Optional See KEY_* constants. If this is not specified, the value is assumed as 0. commitCompositionWith() Commits the composition with the specified string. If you call this when there is no composition, this starts composition automatically and commits the composition with specified string immediately. boolean commitCompositionWith(in DOMString aCommitString, in nsIDOMKeyEvent aDOMKeyEvent Optional, in unsigned long aKeyFlags aOptional); Parameters aCommitString The commit string. aDOMKeyEvent Optional When the committing composition is caused by a key operation, this should be specified. If this is specified, keyboard events may be dispatched when Gecko thinks that they...
... When there is no composition which was created by the instance and if compositionstart is consumed by web contents, i.e., failed to start new composition, this returns false. Otherwise, it returns true. getModifierState() Getting modifier state. This is similar to KeyboardEvent.getModifierState() [en-US]. The result is the modifier state of managed by the instance. boolean getModifierState(in DOMString aModifierKeyName); Parameters aModifierKeyName A modifier key name which is defined by DOM Level 3 KeyboardEvents key Values. Return value true if the modifier state is active. Otherwise, false. keydown() Dispatches a keydown event and some keypress event when all of or some of them are necessary. When this dispatches a normal modifier key event, the TextInputProcessor instance activat...
nsIWorkerMessageEvent
dom/interfaces/threads/nsIDOMWorkers.idlScriptable This interface represents an event in a web worker thread's event queue. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsIDOMEvent Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Method overview void initMessageEvent(in DOMString aTypeArg, in boolean aCanBubbleArg, in boolean aCancelableArg, in DOMString aDataArg, in DOMString aOriginArg, in nsISupports aSourceArg); Attributes Attribute Type Description data DOMString The event's data. Read only. origin DOMString The event's origin. Read only. source nsISupports The event's source. Read only. Methods initMessageEvent() Initializes the message event. v...
... aCanBubbleArg Whether or not the event can bubble. aCancelableArg Whether or not the event can be canceled. aDataArg The data to place into the data attribute. ...
... aCanBubbleArg Whether or not the event can bubble. aCancelableArg Whether or not the event can be canceled. aDataArg The data to place into the data attribute. aOriginArg The origin to place into the origin attribute. ...
... aCanBubbleArg Whether or not the event can bubble. aCancelableArg Whether or not the event can be canceled. aDataArg The data to place into the data attribute. aOriginArg The origin to place into the origin attribute. aSourceArg The source to place into the source attribute. ...
BluetoothDevice - Web APIs
name; readonly attribute BluetoothRemoteGATTServer? gatt; readonly attribute FrozenArray uuids; Promise watchAdvertisements(); void unwatchAdvertisements(); readonly attribute boolean watchingAdvertisements; }; BluetoothDevice implements EventTarget; BluetoothDevice implements BluetoothDeviceEventHandlers; BluetoothDevice implements CharacteristicEve...
...="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="226" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">BluetoothDevice</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Interface interface BluetoothDevice { readonly attribute DOMString id; readonly attribute DOMString? name; readonly attribute BluetoothRemoteGATTServer? gatt; readonly attribute FrozenArray uuids; Promise watchAdvertisements(); void unwatchAdvertisements(); readonly attribute boolean watchingAdvertisements; }; BluetoothDevice implements EventTarget; BluetoothDevice implements BluetoothDeviceEventHandlers; BluetoothDevice implements CharacteristicEventHandlers; BluetoothDevice impleme...
... BluetoothDevice.gatt Read only A reference to the device's BluetoothRemoteGATTServer. BluetoothDevice.uuids Read only Lists the UUID's of GATT services provided by the device, that the current origin is allowed to access. BluetoothDevice.watchingAdvertisem...
...ements(); readonly attribute boolean watchingAdvertisements; }; BluetoothDevice implements EventTarget; BluetoothDevice implements BluetoothDeviceEventHandlers; BluetoothDevice implements CharacteristicEventHandlers; BluetoothDevice implements ServiceEventHandlers; Properties BluetoothDevice.id Read only A DOMString that uniquely identifies a device. BluetoothDevice.name Read only A DOMString that provices a human-readable name for the device. BluetoothDevice.gatt Read only A reference to the device's BluetoothRemoteGATTServer. BluetoothDevice.uuids Read only Lists the UUID's of GATT services provided by the device, that the current origin is allowed to access. BluetoothDevice.watchingAdvertisements Read only If advertisments were activated using BluetoothDevice.watchAdver...
CharacterData - Web APIs
x="331" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">CharacterData</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, Node, and implements the ChildNode and NonDocumentTypeChildNode interface. CharacterData.data Is a DOMString representing the textual data contained in this object. CharacterData.length Read only Returns an unsigned long representing the size of the string contained in CharacterData.data. NonDocumentTypeChildNode.nextElementSibling Read only Returns the Element immediately following the specified one in its parent's children list, or null if the specified element is the last one in the list. NonD...
...one in the list. NonDocumentTypeChildNode.previousElementSibling Read only Returns the Element immediately prior to the specified one in its parent's children list, or null if the specified element is the first one in the list. Methods Inherits methods from its parent, Node, and implements the ChildNode and NonDocumentTypeChildNode interface. CharacterData.appendData() Appends the given DOMString to the CharacterData.data string; when this method returns, data contains the concatenated DOMString. CharacterData.deleteData() Removes the specified amount of characters, starting at the specified offset, from the CharacterData.data string; when this method returns, data contains the shortened DOMString. CharacterData.insertData() Inserts the specified characters, at the specified offset, i...
...nated DOMString. CharacterData.deleteData() Removes the specified amount of characters, starting at the specified offset, from the CharacterData.data string; when this method returns, data contains the shortened DOMString. CharacterData.insertData() Inserts the specified characters, at the specified offset, in the CharacterData.data string; when this method returns, data contains the modified DOMString. ChildNode.remove() Removes the object from its parent children list. CharacterData.replaceData() Replaces the specified amount of characters, starting at the specified offset, with the specified DOMString; when this method returns, data contains the modified DOMString. ...
... Specifications Specification Status Comment DOMThe definition of 'CharacterData' in that specification. ...
ChildNode.after() - Web APIs
Web › API › ChildNode › after
Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
... Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
... Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
... Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
ChildNode.before() - Web APIs
Web › API › ChildNode › before
Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
... Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
... Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
... Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
ChildNode.replaceWith() - Web APIs
Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
... Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
... Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
... Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
DataTransfer.getData() - Web APIs
If the drag operation has no data or the operation has no data for the specified format, this method returns an empty string. Caveats Data availability The HTML5 Drag and Drop Specification dictates a drag data store mode. ...
...If the drag operation has no data or the operation has no data for the specified format, this method returns an empty string. Caveats Data availability The HTML5 Drag and Drop Specification dictates a drag data store mode. ...
...If the drag operation has no data or the operation has no data for the specified format, this method returns an empty string. Caveats Data availability The HTML5 Drag and Drop Specification dictates a drag data store mode. ...
...If the drag operation has no data or the operation has no data for the specified format, this method returns an empty string. Caveats Data availability The HTML5 Drag and Drop Specification dictates a drag data store mode. ...
HTMLElement - Web APIs
" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, Element, and implements those from DocumentAndElementEventHandlers, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrForeignElement and TouchEventHandlers. HTMLElement.accessKey Is a DOMString representing the access key assigned to the element. HTMLElement.accessKeyLabel Read only Returns a DOMString containing the element's assigned access key. HTMLElement.contentEditable Is a DOMString, where a value of true means the element is editable and a value of false means it isn't. HTMLElement.isContentEditable Read only Returns a Boolean that indicates whether or not the content of...
...here a value of true means the element is editable and a value of false means it isn't. HTMLElement.isContentEditable Read only Returns a Boolean that indicates whether or not the content of the element can be edited. HTMLElement.contextMenu Is a HTMLMenuElement representing the contextual menu associated with the element. It may be null. HTMLOrForeignElement.dataset Read only Returns a DOMStringMap with which script can read and write the element's custom data attributes (data-*) . HTMLElement.dir Is a DOMString, reflecting the dir global attribute, representing the directionality of the element. Possible values are "ltr", "rtl", and "auto". HTMLElement.draggable Is a Boolean indicating if the element can be dragged. HTMLElement.dropzone Read only Returns a DOMSettableTokenList re...
...rText Represents the "rendered" text content of a node and its descendants. As a getter, it approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard. HTMLElement.itemScope Is a Boolean representing the item scope. HTMLElement.itemType Read only Returns a DOMSettableTokenList... HTMLElement.itemId Is a DOMString representing the item ID. HTMLElement.itemRef Read only Returns a DOMSettableTokenList... HTMLElement.itemProp Read only Returns a DOMSettableTokenList... HTMLElement.itemValue Returns a Object representing the item value. HTMLElement.lang Is a DOMString representing the language of an element's attributes, text, and element contents. HTMLElement.noModule Is a Boolean indicating w...
...MLElement.spellcheck Is a Boolean that controls spell-checking. It is present on all HTML elements, though it doesn't have an effect on all of them. HTMLElement.style Is a CSSStyleDeclaration, an object representing the declarations of an element's style attributes. HTMLOrForeignElement.tabIndex Is a long representing the position of the element in the tabbing order. HTMLElement.title Is a DOMString containing the text that appears in a popup box when mouse is over the element. HTMLElement.translate Is a Boolean representing the translation. Event handlers Most event handler properties, of the form onXYZ, are defined on the DocumentAndElementEventHandlers, GlobalEventHandlers or TouchEventHandlers interfaces and implemented by HTMLElement. In addition, the following handlers are speci...
HTMLMediaElement - Web APIs
face items for controlling the resource should be displayed. HTMLMediaElement.controlsList Read only Returns a DOMTokenList that helps the user agent select what controls to show on the media element whenever the user agent shows its own set of controls. The DOMTokenList takes one or more of three possible values: nodownload, nofullscreen, and noremoteplayback. HTMLMediaElement.crossOrigin A DOMString indicating the CORS setting for this media element. HTMLMediaElement.currentSrc Read only Returns a DOMString with the absolute URL of the chosen media resource. HTMLMediaElement.currentTime A double-precision floating-point value indicating the current playback time in seconds; if the media has not started to play and has not been seeked, this value is the media's initial playback time. Set...
...turns a Boolean that indicates whether the media element has finished playing. HTMLMediaElement.error Read only Returns a MediaError object for the most recent error, or null if there has not been an error. HTMLMediaElement.loop A Boolean that reflects the loop HTML attribute, which indicates whether the media element should start over when it reaches the end. HTMLMediaElement.mediaGroup A DOMString that reflects the mediagroup HTML attribute, which indicates the name of the group of elements it belongs to. A group of media elements shares a common MediaController. HTMLMediaElement.mediaKeys Read only Returns a MediaKeys object or null. MediaKeys is a set of keys that an associated HTMLMediaElement can use for decryption of media data during playback. HTMLMediaElement.mozAudioCaptured ...
...ork. HTMLMediaElement.paused Read only Returns a Boolean that indicates whether the media element is paused. HTMLMediaElement.playbackRate Is a double that indicates the rate at which the media is being played back. HTMLMediaElement.played Read only Returns a TimeRanges object that contains the ranges of the media source that the browser has played, if any. HTMLMediaElement.preload Is a DOMString that reflects the preload HTML attribute, indicating what data should be preloaded, if any. Possible values are: none, metadata, auto. HTMLMediaElement.preservesPitch Is a Boolean that determines if the pitch of the sound will be preserved. If set to false, the pitch will adjust to the speed of the audio. This is implemented with prefixes in Firefox (mozPreservesPitch) and WebKit (webkitPrese...
... unsigned short (enumeration) indicating the readiness state of the media. HTMLMediaElement.seekable Read only Returns a TimeRanges object that contains the time ranges that the user is able to seek to, if any. HTMLMediaElement.seeking Read only Returns a Boolean that indicates whether the media is in the process of seeking to a new position. HTMLMediaElement.sinkId Read only Returns a DOMString that is the unique ID of the audio device delivering output, or an empty string if it is using the user agent default. This ID should be one of the MediaDeviceInfo.deviceid values returned from MediaDevices.enumerateDevices(), id-multimedia, or id-communications. HTMLMediaElement.src Is a DOMString that reflects the src HTML attribute, which contains the URL of a media resource to use. HTMLMed...
HTMLOrForeignElement.dataset - Web APIs
Note that the dataset property itself can be read, but not directly written. Instead, all writes must be to the individual properties within the dataset, which in turn represent the data attributes. ...
...Note that the dataset property itself can be read, but not directly written. Instead, all writes must be to the individual properties within the dataset, which in turn represent the data attributes. ...
... Z). In JavaScript, the name of a custom data attribute is the name of the same HTML attribute, but in camelCase and with no dashes, dots, etc. In addition to the information below, you'll find a how-to guide for using HTML data attributes in our article Using data attributes. Name conversion dash-style to camelCase conversion A custom data attribute name is transformed to a key for the DOMStringMap entry with the following rules The prefix data- is removed (including the dash); For any dash (U+002D) followed by an ASCII lowercase letter a to z, the dash is removed, and the letter is transformed into its uppercase counterpart; Other characters (including other dashes) are left unchanged. camelCase to dash-style conversion The opposite transformation, which maps a key to a...
...t syntax, as in element.dataset[keyname] The in operator can be used to check whether a given attribute exists. Setting values When an attribute is set, its value is always converted into a string. For example: null is converted into the string "null". To remove an attribute, you can use the delete operator. Syntax const dataAttrMap = element.dataset Value A DOMStringMap. Examples <div id="user" data-id="1234567890" data-user="johndoe" data-date-of-birth>John Doe</div> const el = document.querySelector('#user'); // el.id === 'user' // el.dataset.id === '1234567890' // el.dataset.user === 'johndoe' // el.dataset.dateOfBirth === '' // set the data attribute el.dataset.dateOfBirth = '1960-10-03'; // Result: el.dataset.dateOfBirth === 1960-10-03 delete el.da...
HTMLScriptElement - Web APIs
"#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLScriptElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. ...
...o,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLScriptElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLScriptElement.type Is a DOMString representing the MIME type of the script. It reflects the type attribute. HTMLScriptElement.src Is a DOMString representing the URL of an external script. It reflects the src attribute. HTMLScriptElement.event Is a DOMString; an obsolete way of registering event handlers on elements in an HTML document. HTMLScriptElement.charset Is a DOMString representing the character encoding of an external script. It reflects the charset attribute. HTMLScriptElement.async HTMLScriptElement.defer The asy...
...hese attributes are complex, involving many different aspects of HTML, and therefore are scattered throughout the specification. These algorithms describe the core ideas, but they rely on the parsing rules for <script> start and end tags in HTML, in foreign content, and in XML; the rules for the document.write() method; the handling of scripting; and so on. HTMLScriptElement.crossOrigin Is a DOMString reflecting the CORS setting for the script element. For scripts from other origins, this controls if error information will be exposed. HTMLScriptElement.text Is a DOMString that joins and returns the contents of all Text nodes inside the <script> element (ignoring other nodes like comments) in tree order. On setting, it acts the same way as the textContent IDL attribute. Note: When inse...
...e() method, <script> elements execute (typically synchronously), but when inserted using innerHTML or outerHTML, they do not execute at all. HTMLScriptElement.noModule Is a Boolean that if true, stops the script's execution in browsers that support ES2015 modules -- used to run fallback scripts in older browsers that do not support JavaScript modules. HTMLScriptElement.referrerPolicy Is a DOMString that reflects the referrerpolicy HTML attribute indicating which referrer to use when fetching the script, and fetches done by that script. Methods No specific methods; inherits methods from its parent, HTMLElement. Examples Dynamically importing scripts Let's create a function that imports new scripts within a document creating a <script> node immediately before the <script> that hosts the...
HTMLTableRowElement - Web APIs
8" stroke="#D4DDE4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLTableRowElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLTableRowElement.align Is a DOMString containing an enumerated value reflecting the align attribute. It indicates the alignment of the element's contents with respect to the surrounding context. The possible values are "left", "right", and "center". HTMLTableRowElement.bgColor Is a DOMString containing the background color of the cells. It reflects the obsolete bgcolor attribute. HTMLTableRowElement.cells Read only Returns a l...
...lues are "left", "right", and "center". HTMLTableRowElement.bgColor Is a DOMString containing the background color of the cells. It reflects the obsolete bgcolor attribute. HTMLTableRowElement.cells Read only Returns a live HTMLCollection containing the cells in the row. The HTMLCollection is live and is automatically updated when cells are added or removed. HTMLTableRowElement.ch Is a DOMString containing one single character. This character is the one to align all the cell of a column on. It reflects the char and default to the decimal points associated with the language, e.g. '.' for English, or ',' for French. This property was optional and was not very well supported. ...
...This property was optional and was not very well supported. ...
...nt.rowIndex Read only Returns a long value which gives the logical position of the row within the entire table. If the row is not part of a table, returns -1. HTMLTableRowElement.sectionRowIndex Read only Returns a long value which gives the logical position of the row within the table section it belongs to. If the row is not part of a section, returns -1. HTMLTableRowElement.vAlign Is a DOMString representing an enumerated value indicating how the content of the cell must be vertically aligned. It reflects the valign attribute and can have one of the following values: "top", "middle", "bottom", or "baseline". Methods Inherits methods from its parent, HTMLElement. HTMLTableRowElement.deleteCell() Removes the cell at the given position in the row. If the given position is greater (or...
HTMLTableSectionElement - Web APIs
e="#D4DDE4" stroke-width="2px" /><text x="376" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLTableSectionElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLTableSectionElement.align Is a DOMString containing an enumerated value reflecting the align attribute. It indicates the alignment of the element's contents with respect to the surrounding context. The possible values are "left", "right", and "center". HTMLTableSectionElement.rows Read only Returns a live HTMLCollection containing the rows in the section. The HTMLCollection is live and is automatically updated when rows are added or ...
...e align attribute. It indicates the alignment of the element's contents with respect to the surrounding context. The possible values are "left", "right", and "center". HTMLTableSectionElement.rows Read only Returns a live HTMLCollection containing the rows in the section. The HTMLCollection is live and is automatically updated when rows are added or removed. ...
...hen rows are added or removed. HTMLTableSectionElement.ch Is a DOMString containing one single chararcter. This character is the one to align all the cell of a column on. It reflects the char and default to the decimal points associated with the language, e.g. '.' for English, or ',' for French. This property was optional and was not very well supported. HTMLTableSectionElement.chOff Is a DOMString containing a integer indicating how many characters must be left at the right (for left-to-right scripts; or at the left for right-to-left scripts) of the character defined by HTMLTableRowElement.ch. This property was optional and was not very well supported. ...
...It reflects the valign attribute and can have one of the following values: "top", "middle", "bottom", or "baseline". Methods Inherits methods from its parent, HTMLElement. ...
KeyboardEvent.initKeyEvent() - Web APIs
ent.initKeyboardEvent based on early drafts of Document Object Model (DOM) Level 3 Events Specification. Favor the modern constructor structure as the only cross-browser way of building events. Syntax event.initKeyEvent (type, bubbles, cancelable, viewArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, keyCodeArg, charCodeArg) Parameters type Is a DOMString representing the type of event. bubbles Is a Boolean indicating whether the event should bubble up through the event chain or not (see bubbles). cancelable Is a Boolean i indicating whether the event can be canceled (see cancelable). viewArg Specifies the UIEvent.view; this value may be null. ctrlKeyArg Is a Boolean that is true if the virtual key to be generated is a combination of keys ...
...chEvent(event); Specification This implementation of keyboard events is based on the key events spec in the early versions of DOM 2 Events, later removed from that spec. ...
...OM 2 Events, later removed from that spec. ...
...urrent Gecko equivalent of the DOM Level 3 Events (initially drafted and also deprecated in favor of KeyboardEvent() Keyboard.initKeyboardEvent() method with the following arguments : typeArg of type DOMString canBubbleArg of type boolean cancelableArg of type boolean viewArg of type views::AbstractView keyIdentifierArg of type DOMString keyLocationArg of type unsigned long modifiersList of type DOMString); ...
ParentNode.replaceChildren() - Web APIs
If no replacement objects are specified, then the ParentNode is emptied of all child nodes. Exceptions HierarchyRequestError: The constraints of the node tree are violated. ...
...If no replacement objects are specified, then the ParentNode is emptied of all child nodes. Exceptions HierarchyRequestError: The constraints of the node tree are violated. ...
...If no replacement objects are specified, then the ParentNode is emptied of all child nodes. Exceptions HierarchyRequestError: The constraints of the node tree are violated. ...
...If no replacement objects are specified, then the ParentNode is emptied of all child nodes. Exceptions HierarchyRequestError: The constraints of the node tree are violated. ...
TextTrack - Web APIs
Web › API › TextTrack
rackCueList object listing the currently active set of text track cues. Track cues are active if the current playback position of the media is between the cues' start and end times. Thus, for displayed cues such as captions or subtitles, the active cues are currently being displayed. TextTrack.cues Read only A TextTrackCueList which contains all of the track's cues. TextTrack.id Read only A DOMString which identifies the track, if it has one. If it doesn't have an ID, then this value is an empty string (""). If the TextTrack is associated with a <track> element, then the track's ID matches the element's ID. TextTrack.inBandMetadataTrackDispatchType Read only Returns a DOMString which indicates the track's in-band metadata track dispatch type. needs details TextTrack.kind Read only Retur...
...h identifies the track, if it has one. If it doesn't have an ID, then this value is an empty string (""). If the TextTrack is associated with a <track> element, then the track's ID matches the element's ID. TextTrack.inBandMetadataTrackDispatchType Read only Returns a DOMString which indicates the track's in-band metadata track dispatch type. needs details TextTrack.kind Read only Returns a DOMString indicating what kind of text track the TextTrack describes. The value must be one of those in the TextTrackKind enum. ...
...k's ID matches the element's ID. TextTrack.inBandMetadataTrackDispatchType Read only Returns a DOMString which indicates the track's in-band metadata track dispatch type. needs details TextTrack.kind Read only Returns a DOMString indicating what kind of text track the TextTrack describes. The value must be one of those in the TextTrackKind enum. TextTrack.label Read only A human-readable DOMString which contains the text track's label, if one is present; otherwise, this is an empty string (""), in which case a custom label may need to be generated by your code using other attributes of the track, if the track's label needs to be exposed to the user. TextTrack.language Read only A DOMString which specifies the text language in which the text track's contents is written. The value must ad...
...Changing this property's value changes the track's current mode to match. Permitted values are listed under Text track mode constants. The default is disabled, unless the <track> element's default Boolean attribute is specified, in which case the default mode is started. ...
URLUtilsReadOnly - Web APIs
ete URLUtilsReadOnly interface previously defined utility methods for working with URLs. These were then inherited by other interfaces, such as WorkerLocation. URLUtilsReadOnly has been removed from the specification, and the properties it defined are now directly part of the affected interfaces. Properties This interface doesn't inherit any properties. URLUtilsReadOnly.href Read only Is a DOMString containing the whole URL. URLUtilsReadOnly.protocol Read only Is a DOMString containing the protocol scheme of the URL, including the final ':'. URLUtilsReadOnly.host Read only Is a DOMString containing the host, that is the hostname, a ':', and the port of the URL. URLUtilsReadOnly.hostname Read only Is a DOMString containing the domain of the URL. URLUtilsReadOnly.origin Read only R...
...ng the whole URL. URLUtilsReadOnly.protocol Read only Is a DOMString containing the protocol scheme of the URL, including the final ':'. URLUtilsReadOnly.host Read only Is a DOMString containing the host, that is the hostname, a ':', and the port of the URL. URLUtilsReadOnly.hostname Read only Is a DOMString containing the domain of the URL. URLUtilsReadOnly.origin Read only Returns a DOMString containing the canonical form of the origin of the specific location. URLUtilsReadOnly.port Read only Is a DOMString containing the port number of the URL. URLUtilsReadOnly.pathname Read only Is a DOMString containing an initial '/' followed by the path of the URL. URLUtilsReadOnly.search Read only Is a DOMString containing a '?' followed by the parameters of the URL. URLUtilsReadOnly.h...
...It is a synonym for URLUtilsReadOnly.href. ...
...It is a synonym for URLUtilsReadOnly.href. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
WebGLRenderingContext.getParameter() - Web APIs
gl.MAX_VIEWPORT_DIMS Int32Array (with 2 elements) gl.PACK_ALIGNMENT GLint gl.POLYGON_OFFSET_FACTOR GLfloat gl.POLYGON_OFFSET_FILL GLboolean gl.POLYGON_OFFSET_UNITS GLfloat gl.RED_BITS GLint gl.RENDERBUFFER_BINDING WebGLRenderbuffer or null See bindRenderbuffer. ...
...Renderbuffer or null See bindRenderbuffer. ...
... Constant Returned type Description gl.COPY_READ_BUFFER_BINDING WebGLBuffer or null See bindBuffer. gl.COPY_WRITE_BUFFER_BINDING WebGLBuffer or null See b...
... Constant Returned type Description gl.COPY_READ_BUFFER_BINDING WebGLBuffer or null See bindBuffer. gl.COPY_WRITE_BUFFER_BINDING WebGLBuffer or null See bindBuffer. gl.DRAW_BUFFERi ...
WorkerLocation - Web APIs
lable 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. Properties The WorkerLocation interface doesn't inherit any property, but implements properties defined in the URLUtilsReadOnly interface. URLUtilsReadOnly.href Read only Is a stringifier that returns a DOMString containing the whole URL of the script executed in the Worker. URLUtilsReadOnly.protocol Read only Is a DOMString containing the protocol scheme of the URL of the script executed in the Worker, including the final ':'. URLUtilsReadOnly.host Read only Is a DOMString containing the host, that is the hostname, a ':', and the port of the URL of the script executed in the Worker. URLUtilsReadOn...
...the script executed in the Worker. URLUtilsReadOnly.protocol Read only Is a DOMString containing the protocol scheme of the URL of the script executed in the Worker, including the final ':'. URLUtilsReadOnly.host Read only Is a DOMString containing the host, that is the hostname, a ':', and the port of the URL of the script executed in the Worker. URLUtilsReadOnly.hostname Read only Is a DOMString containing the domain of the URL of the script executed in the Worker. URLUtilsReadOnly.origin Read only Returns a DOMString containing the canonical form of the origin of the specific location. ...
...aining the host, that is the hostname, a ':', and the port of the URL of the script executed in the Worker. URLUtilsReadOnly.hostname Read only Is a DOMString containing the domain of the URL of the script executed in the Worker. URLUtilsReadOnly.origin Read only Returns a DOMString containing the canonical form of the origin of the specific location. URLUtilsReadOnly.port Read only Is a DOMString containing the port number of the URL of the script executed in the Worker. URLUtilsReadOnly.pathname Read only Is a DOMString containing an initial '/' followed by the path of the URL of the script executed in the Worker. URLUtilsReadOnly.search Read only Is a DOMString containing a '?' followed by the parameters of the URL of the script executed in the Worker. URLUtilsReadOnly.hash Read ...
...the port number of the URL of the script executed in the Worker. URLUtilsReadOnly.pathname Read only Is a DOMString containing an initial '/' followed by the path of the URL of the script executed in the Worker. URLUtilsReadOnly.search Read only Is a DOMString containing a '?' followed by the parameters of the URL of the script executed in the Worker. URLUtilsReadOnly.hash Read only Is a DOMString containing a '#' followed by the fragment identifier of the URL of the script executed in the Worker. Methods The WorkerLocation interface doesn't inherit any method, but implements methods defined in the URLUtilsReadOnly interface. URLUtilsReadOnly.toString() Returns a DOMString containing the whole URL of the script executed in the Worker. It is a synonym for URLUtilsReadOnly.href. Spe...
mozbrowsercaretstatechanged
age loaded in a browser <iframe>. This is used by the embedder to show a context menu for clipboard actions. General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: rect An object that defines informati...
...Possible values are visibilitychange, updateposition, longpressonemptycontent, taponcaret, presscaret, and releasecaret. zoomFactor A number defining the current zoom factor in the browser <iframe>. collapsed A Boolean indicating whether the current selection is collapsed (true) or not (false.) caretVisible A Boolean indicating whether th...
... sendDoCommandMsg A method allowing you to issue a command via an anonymouse function, i.e. function(command). Possible values are cut, copy, paste and selectAll. Examples var browser = document.querySelector("iframe"); browser.addEventListener("mozbrowsercaretstatechanged", function( event ) { // do stuff with event.details }); Related Even...
mozbrowsermetachange
meta> element related to web applications is added, removed or changed. See below for the applicable types. ...
... type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: name A DOMString representing the <meta> name attribute value. This can be viewmode, theme-color, theme-group, or application-name. content A DOMString representing the <meta> content attribute value, i.e. the content of the meta tag. type A DOMString representing the type of meta change that this event object represents. This can be added, changed, removed, or undefined. ...
...If not included, the value returned is undefined. Example var browser = document.querySelector("iframe"); browser.addEventListener("mozbrowsermetachange", function(event) { console.log("A meta tag has been " + event.details.type + ". ...
mozbrowseropenwindow
embedder must use the <iframe> passed in the event.details.frameElement property as the new window content. ...
...For a complete list of possible features, see window.open(). ...
...hether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: url A DOMString representing the URL of the document loaded within the frameElement property. name A DOMString representing the name of the new browser window. features A DOMString containing features represented by a list of names and values separated by commas. For a complete list of possible features, see window.open(). frameElement An object representing the new browser <iframe> that will embed the new content. Example var browser = document.querySelector("iframe"); browser.addEventListener("m...
mozbrowsersecuritychange
nt is fired when the browser <iframe> has connected to the server, and when the mixed content state changes. ...
...Possible values are: broken: Indicates an unknown security state. This may mean that the request is being loaded as part of a page in which some content was received over an insecure channel. secure: Indicates that the data corresponding to the request was received over a secure channel. ...
... broken: Indicates an unknown security state. This may mean that the request is being loaded as part of a page in which some content was received over an insecure channel. secure: Indicates that the data corresponding to the request was received over a secure channel. insecure: Indicates that the data corresponding to the request was received over an insecure channel. trackingState A DOMString representing the current loading state of tracking content. Possible values are: loaded_tracking_content: Indicates that the tracking content has been loaded. blocked_tracking_content: Indicates that the tracking content has been blocked from loading. mixedState A DOMString representing the current loading state of mixed active content. Possible values are: loaded_mixed_active_con...
mozbrowserusernameandpasswordrequired
using a dialog or a database of username/passwords, and then call authenticate() or cancel() as appropriate. ...
... isProxy A Boolean indicating whether the server dealing with the authentication is a proxy server (true) or not (false). authenticate() A function that is called to enable the authentication to go ahead. ...
...ly Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following members: host A DOMString representing the host requesting the HTTP authentification. realm A DOMString representing the value of the realm HTTP header. isProxy A Boolean indicating whether the server dealing with the authentication is a proxy server (true) or not (false). authenticate() A function that is called to enable the authentication to go ahead. It needs to take two parameters -- the username and password to authenticate. cancel() A function that is called to cancel the authenticatio...
nsIDOMChromeWindow
. ...
...Read only. Constants Constant Value Description STATE_MAXIMIZED 1 The window is maximized. STATE_MINIMIZED 2 The window is minimized. STATE_NORMAL 3 The window is normal. ...
...element of the window. restore() Restores the size and position of the window. void restore(); Parameters None. setCursor() Sets the mouse cursor to the specified cursor. The mouse cursor is locked to the specified cursor if it's not "auto". At that time, the cursor has been never changed by cursor moving. After you call this method with "auto", the cursor will be unlocked. void setCursor( in DOMString cursor ); Parameters cursor You can specify same values of CSS cursor property (including -moz- prefixed values). And there are special values: "grab", "grabbing" and "spinning". But they might be dropped in the future version, if you use the values, you should use -moz-* value instead. ...
nsIDOMEvent
hat interface. See bug 761613. ...
...eStamp Used to specify the time (in milliseconds relative to the epoch) at which the event was created. Due to the fact that some systems may not provide this information the value of timeStamp may be not available for all events. When not available, a value of 0 will be returned. Examples of epoch time are the time of the system start or 0:0:0 UTC 1st January 1970. Read only. type DOMString The name of the event (case-insensitive). The name must be an XML name. Read only. Constants Constant Value Description NONE 0 The event is not being dispatched. CAPTURING_PHASE 1 The current event phase is the capturing phase. AT_TARGET 2 The event is currently being evaluated at the target EventTarget. BUBBLING_PHA...
...method may only be called before the Event has been dispatched via the dispatchEvent method, though it may be called multiple times during that phase if necessary. If called multiple times the final invocation takes precedence. If called from a subclass of Event interface only the values specified in the initEvent method are modified, all other attributes are left unchanged. void initEvent( in DOMString eventTypeArg, in boolean canBubbleArg, in boolean cancelableArg ); Parameters eventTypeArg Specifies the event type. This type may be any event type currently defined in this specification or a new event type. The string must be an XML name. Any new event type must not begin with any upper, lower, or mixed case version of the string "DOM". This prefix is reserved for future DOM event se...
nsIDOMHTMLSourceElement
o media elements in HTML. dom/interfaces/html/nsIDOMHTMLSourceElement.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.1.2 Inherits from: nsIDOMHTMLElement The source element allows authors to specify multiple media resources for media elements. It does not specify anything on its own. ...
... Attribute Type Description src DOMString The src attribute gives the address of the media resource. The value must be a valid URL. This attribute must be present. Note that dynamically manipulating this value after the page has loaded has no effect on the containing element; instead, change the src attribute of that element (audio or video) instead. type DOMString The type attribute gives the type of the media resource, to help the user agent determine if it can play this media resource before fetching it. If specified, its value must be a valid MIME type. The codecs parameter may be specified and might be necessary to specify exactly how the resource is encoded. ...
...Its value must be a valid media query. ...
nsIDOMStorageEventObsolete
OM storage event is received, the recipient can check its domain attribute to determine which domain's data store has changed. If the value of the domain attribute is "#session", then the session storage has changed. Note: This interface describes the old, non-standard form of this event. You should use the nsIDOMStorageEvent interface instead. Method overview void initStorageEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in nsIDOMStorage storageAreaArg); Attributes Attribute Type Description domain DOMString The domain of the storage area which changed, or "#session" if the event represents a change to session storage. Read ...
... canBubbleArg true if the event is allowed to bubble, otherwise false. cancelableArg true if the event can be canceled, otherwise false. domainArg The domain to which the event belongs, or "#session" if the event is associated with session storage. ...
... canBubbleArg true if the event is allowed to bubble, otherwise false. cancelableArg true if the event can be canceled, otherwise false. domainArg The domain to which the event belongs, or "#session" if the event is associated with session storage. ...
nsIDOMWindow
DOM windows are actually based on nsIDOMWindow2, which is a subclass of nsIDOMWindow that adds some new features to this interface. In Gecko 7.0 nsIDOMWindow2 has been merged into this interface. In Gecko 8.0 nsIDOMStorageWindow and nsIDOMWindowInternal have been merged into this interface. ...
...d only. Note: Prior to Gecko 8.0 this attribute was part of nsIDOMStorageWindow. localStorage nsIDOMStorage Local storage for the current browsing context. Data stored in local storage may only be accessed from the same origin that inserted the data into storage in the first place. Read only. Note: Prior to Gecko 8.0 this attribute was part of nsIDOMStorageWindow. name DOMString Get or set the name of this window. This attribute is "replaceable" in JavaScript. parent nsIDOMWindow The window's parent window. If there is no parent window, or if the parent is of a different type, this is the current window. The window hierarchy does not cross chrome-content boundaries. Read only. scrollX long The current horizontal (x) scroll position, in pi...
... window root for this window. This is useful for connecting event listeners to this window as well as every other window nested in that window root. Read only. Native code only! Note: Prior to Gecko 7.0 this attribute was part of nsIDOMWindow2. Methods getComputedStyle() See dom-window-getcomputedstyle for details. nsIDOMCSSStyleDeclaration getComputedStyle( in nsIDOMElement elt, in DOMString pseudoElt Optional ); Parameters elt pseudoElt Optional Return value getSelection() Returns the nsISelection object indicating what if any content is currently selected in the window. nsISelection getSelection(); Parameters None. Return value The nsISelection object for the window. scrollBy() Scrolls the window by a given number of pixels relative to the current scroll p...
nsIPushService
. nsIPushService supports the Push API implementation in Firefox, and can be used directly from privileged code to create system subscriptions. Implemented by @mozilla.org/push/Service;1 as a service: const pushService = Components.classes["@mozilla.org/push/Service;1"] .getService(Components.interfaces.nsIPushService); Method overview void subscribe(in DOMString scope, in nsIPrincipal principal, in nsIPushSubscriptionCallback callback); void getSubscription(in DOMString scope, in nsIPrincipal principal, in nsIPushSubscriptionCallback callback); void unsubscribe(in DOMString scope, in nsIPrincipal principal, in nsIUnsubscribeResultCallback callback); Methods subscribe() Creates a push subscription. void subscribe( in DOMStrin...
...al(), (code, subscription) => { if (!Components.isSuccessCode(code)) { Cu.reportError("Error creating subscription: " + code); return; } // `subscription` implements `nsIPushSubscription`. subscription.endpoint; subscription.getKey("p256dh"); subscription.getKey("auth"); } ); getSubscription() Fetches an existing subscription. void getSubscription( in DOMString scope, in nsIPrincipal principal, in nsIPushSubscriptionCallback callback ); Parameters scope The unique scope URL, as passed to nsIPushService.subscribe(). principal The subscription nsIPrincipal, as passed to nsIPushService.subscribe(). callback The callback to call with the fetched nsIPushSubscription. Example pushService.getSubscription( "chrome://my-module/push", scriptS...
...(), (code, subscription) => { if (!Components.isSuccessCode(code)) { Cu.reportError("Error fetching subscription: " + code); return; } // `subscription == null` if the `(scope, principal)` pair doesn't have a // push subscription. Otherwise, it's an instance of `nsIPushSubscription`. } ); unsubscribe() Drops an existing push subscription. void unsubscribe( in DOMString scope, in nsIPrincipal principal, in nsIUnsubscribeResultCallback callback ); Parameters scope The unique scope URL, as passed to nsIPushService.subscribe(). principal The subscription nsIPrincipal, as passed to nsIPushService.subscribe(). callback The callback to call when the nsIPushSubscription is dropped. Example pushService.unsubscribe( "chrome://my-module/push", scriptS...
nsISelection3
content/base/public/nsISelection3.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 2.0 Obsolete Gecko 8.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) In Gecko 8.0 this Interface was merged into the nsISelection interface. ...
...t/base/public/nsISelection3.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 2.0 Obsolete Gecko 8.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) In Gecko 8.0 this Interface was merged into the nsISelection interface. ...
...on3.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 2.0 Obsolete Gecko 8.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) In Gecko 8.0 this Interface was merged into the nsISelection interface. Method overview void modify(in DOMString alter, in DOMString direction, in DOMString granularity); Methods modify() Modifies the selection. Note that the parameters are case-insensitive. void modify( in DOMString alter, in DOMString direction, in DOMString granularity ); Parameters alter Can be one of { "move", "extend" } "move" collapses the selection to the end of the selection and applies the movement direction/granularity to the collapsed selection. ...
BlobBuilder - Web APIs
ur blob, call getBlob() to retrieve a Blob containing the data you sent into the blob builder. Note: The BlobBuilder interface has been deprecated in favor of the newly introduced Blob constructor. Method overview void append(in ArrayBuffer data); void append(in Blob data); void append(in String data, [optional] in String endings); Blob getBlob([optional] in DOMString contentType); File getFile(in DOMString name, [optional] in DOMString contentType); Methods append() Appends the contents of the specified JavaScript object to the Blob being built. If the value you specify isn't a Blob, ArrayBuffer, or String, the value is coerced to a string before being appended to the blob. void append( in ArrayBuffer data ); void append( in Blob data ...
... data to append to the Blob being constructed. endings Specifies how strings containing \n are to be written out. This can be "transparent" (endings unchanged) or "native" (endings changed to match host OS filesystem convention). The default value is "transparent". getBlob() Returns the Blob object that has been constructed using the data passed through calls to append(). Blob getBlob( in DOMString contentType Optional ); Parameters contentType Optional The MIME type of the data to be returned in the Blob. This will be the value of the Blob object's type property. Return value A Blob object containing all of the data passed to any calls to append() made since the BlobBuilder was created. This also resets the BlobBuilder so that the next call to append() is starting a new, empty blo...
...l The MIME type of the data to be returned in the Blob. This will be the value of the Blob object's type property. Return value A Blob object containing all of the data passed to any calls to append() made since the BlobBuilder was created. This also resets the BlobBuilder so that the next call to append() is starting a new, empty blob. getFile() Returns a File object. File getFile( in DOMString name, [optional] in DOMString contentType ); Parameters name The file name. contentType Optional The MIME type of the data to be returned in the File. This will be the value of the File object's type property. Return value A File object. ...
CSSStyleDeclaration.getPropertyPriority() - Web APIs
"important") if one exists. If none exists, returns the empty string. ...
..."important") if one exists. If none exists, returns the empty string. ...
..."important") if one exists. If none exists, returns the empty string. ...
CSSStyleDeclaration.getPropertyValue() - Web APIs
If not set, returns the empty string. ...
...If not set, returns the empty string. ...
...If not set, returns the empty string. ...
ChildNode - Web APIs
Web › API › ChildNode
ds and properties that are common to all types of Node objects that can have a parent. It's implemented by Element, DocumentType, and CharacterData objects. Properties There are neither inherited, nor specific properties. Methods There are no inherited methods. ChildNode.remove() Removes this ChildNode from the children list of its parent. ChildNode.before() Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just before this ChildNode. DOMString objects are inserted as equivalent Text nodes. ChildNode.after() Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just after this ChildNode. DOMString objects are inserted as equivalent Text nodes. ChildNode.replaceWith() Replaces this ChildNode in the ...
... Specifications Specification Status Comment DOMThe definition of 'ChildNode' in that specification. Living Standard Split the ElementTraversal interface in ParentNode and ChildNode. previousElementSibling and nextElementSibling are now defined on the latter. ...
... Specifications Specification Status Comment DOMThe definition of 'ChildNode' in that specification. Living Standard Split the ElementTraversal interface in ParentNode and ChildNode. previousElementSibling and nextElementSibling are now defined on the latter. ...
DirectoryEntrySync - Web APIs
s.txt', {create: true}); The getDirectory() method returns a DirectoryEntrySync, which represents a file in the file system. The following creates a new directory called superseekrit in the root directory. var dirEntry = fs.root.getDirectory('superseekrit', {create: true}); Method overview DirectoryReaderSync createReader () raises (FileException); FileEntrySync getFile (in DOMString path, in optional Flags options) raises (FileException); DirectoryEntrySync getDirectory (in DOMString path, in optional Flags options) raises (FileException); void removeRecursively () raises (FileException); Methods createReader() Creates a new DirectoryReaderSync to read entries from this directory. DirectoryReaderSync createReader ( ) raises (FileException); Retu...
...Exception with the following codes: Exception Description NOT_FOUND_ERR The directory does not exist. SECURITY_ERR The browser determined that it was not safe to look up the metadata. [ todo: Explain why ] getFile() Depending on how you've set the options parameter, the method either creates a file or looks up an existing file. void getFile ( in DOMString path, in optional Flags options ) raises (FileException); Parameter path Either an absolute path or a relative path from the directory to the file to be looked up or created. You cannot create a file whose immediate parent does not exist. Create the parent directory first. options An object literal describing the behavior of the method. If the file does not exist, it is created. ...
...n to exceed its storage quota. SECURITY_ERR The application does not have permission to access the element referred to by path. [ todo: Explain why ] TYPE_MISMATCH_ERR The path supplied exists, but it is not a directory. getDirectory() Creates or looks up a directory. The method is similar to getFile() with DirectoryEntrySync being passed. void getDirectory ( in DOMString path, in optional Flags options ) raises (FileException); Parameter path Either an absolute path or a relative path from the directory to the file to be looked up or created. You cannot create a file whose immediate parent does not exist. Create the parent directory first. options An object literal describing the behavior of the method if the file does not exist. Object literal ...
HTMLBodyElement - Web APIs
troke-width="2px" /><text x="416" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLBodyElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement and from WindowEventHandlers. HTMLBodyElement.aLink Is a DOMString that represents the color of active hyperlinks. HTMLBodyElement.background Is a DOMString that represents the description of the location of the background image resource. Note that this is not an URI, though some older version of some browsers do expect it. HTMLBodyElement.bgColor Is a DOMString that represents the background color for the document. HTMLBodyElement.link Is a DOMStrin...
... Methods No specific methods; inherits methods from its parent, HTMLElement, and from WindowEventHandlers. Event handlers No specific event handlers; inherits event handlers from its parent, HTMLElement and from WindowEventHandlers. ...
... Methods No specific methods; inherits methods from its parent, HTMLElement, and from WindowEventHandlers. ...
HTMLEmbedElement - Web APIs
#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLEmbedElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. ...
...svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLEmbedElement.align Is a DOMString representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context. The possible values are "left", "right", "center", and "justify". HTMLEmbedElement.height Is a DOMString reflecting the height HTML attribute, containing the displayed height of the resource. HTMLEmbedElement.name Is a DOMString representing the name of the embedded object. ...
...ty indicating alignment of the element's contents with respect to the surrounding context. The possible values are "left", "right", "center", and "justify". HTMLEmbedElement.height Is a DOMString reflecting the height HTML attribute, containing the displayed height of the resource. HTMLEmbedElement.name Is a DOMString representing the name of the embedded object. HTMLEmbedElement.src Is a DOMString that reflects the src HTML attribute, containing the address of the resource. HTMLEmbedElement.type Is a DOMString that reflects the type HTML attribute, containing the type of the resource. HTMLEmbedElement.width Is a DOMString that reflects the width HTML attribute, containing the displayed width of the resource. Methods No specific method; inherits methods from its parent, HTMLElement. ...
HTMLKeygenElement - Web APIs
ement interface, which provides special properties and methods (beyond the regular element object interface they also have available to them by inheritance) for manipulating the layout and presentation of keygen elements. Properties autofocus Is a Boolean that reflects the autofocus HTML attribute, indicating that the form control should have input focus when the page loads. challenge Is a DOMString that reflects the challenge HTML attribute, containing a challenge string that is packaged with the submitted key. form Read only Is a HTMLFormElement that indicates the control's form owner, reflecting the form HTML attribute if it is defined. keytype Is a DOMString that reflects the keytype HTML attribute, containing the type of key used. labels Read only Unimplemented (see bug 556743) ...
...mitted key. form Read only Is a HTMLFormElement that indicates the control's form owner, reflecting the form HTML attribute if it is defined. keytype Is a DOMString that reflects the keytype HTML attribute, containing the type of key used. labels Read only Unimplemented (see bug 556743) Is a NodeList that represents a list of label elements associated with this keygen element. name Is a DOMString that reflects the name HTML attribute, containing the name for the control that is submitted with form data. type Read only Is a DOMString that must be the value keygen. validationMessage Read only Is a DOMString representing a localized message that describes the validation constraints that the control does not satisfy (if any). This is the empty string if the control is not a candidate fo...
...esenting the validity states that this element is in. willValidate Is a Boolean that is always false because keygen objects are never candidates for constraint validation. Methods Name & Arguments Return Description checkValidity() Boolean Always returns true because keygen objects are never candidates for constraint validation. setCustomValidity(in DOMString error) void Sets a custom validity message for the element. If this message is not the empty string, then the element is suffering from a custom validity error, and does not validate. ...
HTMLOutputElement - Web APIs
" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLOutputElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties This interface also inherits properties from its parent, HTMLElement. HTMLOutputElement.defaultValue A DOMString representing the default value of the element, initially the empty string. HTMLOutputElement.formRead only An HTMLFormElement indicating the form associated with the control, reflecting the form HTML attribute if it is defined. HTMLOutputElement.htmlForRead only A DOMTokenList reflecting the for HTML attribute, containing a list of IDs of other elements in the same document that contribute ...
...ontrol, reflecting the form HTML attribute if it is defined. HTMLOutputElement.htmlForRead only A DOMTokenList reflecting the for HTML attribute, containing a list of IDs of other elements in the same document that contribute to (or otherwise affect) the calculated value. HTMLOutputElement.labelsRead only A NodeList of <label> elements associated with the element. HTMLOutputElement.name A DOMString reflecting the name HTML attribute, containing the name for the control that is submitted with form data. HTMLOutputElement.typeRead only The DOMString "output". HTMLOutputElement.validationMessageRead only A DOMString representing a localized message that describes the validation constraints that the control does not satisfy (if any). This is the empty string if the control is not a candid...
...resenting a localized message that describes the validation constraints that the control does not satisfy (if any). This is the empty string if the control is not a candidate for constraint validation (willValidate is false), or it satisfies its constraints. HTMLOutputElement.validityRead only A ValidityState representing the validity states that this element is in. HTMLOutputElement.value A DOMString representing the value of the contents of the elements. Behaves like the Node.textContent property. HTMLOutputElement.willValidateRead only A Boolean indicating whether the element is a candidate for constraint validation. Methods This interface also inherits methods from its parent, HTMLElement. HTMLOutputElement.checkValidity() Checks the validity of the element and returns a Boolean ...
HTMLSelectElement - Web APIs
a <form> element, then it returns null. HTMLSelectElement.labelsRead only A NodeList of <label> elements associated with the element. HTMLSelectElement.length An unsigned long The number of <option> elements in this select element. HTMLSelectElement.multiple A Boolean reflecting the multiple HTML attribute, which indicates whether multiple items can be selected. HTMLSelectElement.name A DOMString reflecting the name HTML attribute, containing the name of this control used by servers and DOM search functions. HTMLSelectElement.optionsRead only An HTMLOptionsCollection representing the set of <option> (HTMLOptionElement) elements contained by this element. HTMLSelectElement.required A Boolean reflecting the required HTML attribute, which indicates whether the user is required to select...
...e value -1 indicates no element is selected. HTMLSelectElement.selectedOptionsRead only An HTMLCollection representing the set of <option> elements that are selected. HTMLSelectElement.size A long reflecting the size HTML attribute, which contains the number of visible items in the control. The default is 1, unless multiple is true, in which case it is 4. HTMLSelectElement.typeRead only A DOMString represeting the form control's type. When multiple is true, it returns "select-multiple"; otherwise, it returns "select-one". HTMLSelectElement.validationMessageRead only A DOMString representing a localized message that describes the validation constraints that the control does not satisfy (if any). This attribute is the empty string if the control is not a candidate for constraint validation...
...ng a localized message that describes the validation constraints that the control does not satisfy (if any). This attribute is the empty string if the control is not a candidate for constraint validation (willValidate is false), or it satisfies its constraints. HTMLSelectElement.validityRead only A ValidityState reflecting the validity state that this control is in. HTMLSelectElement.value A DOMString reflecting the value of the form control. Returns the value property of the first selected option element if there is one, otherwise the empty string. HTMLSelectElement.willValidateRead only A Boolean that indicates whether the button is a candidate for constraint validation. It is false if any conditions bar it from constraint validation. Methods This interface inherits the methods of HTML...
HTMLTableColElement - Web APIs
8" stroke="#D4DDE4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLTableColElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLTableColElement.align Is a DOMString that indicates the horizontal alignment of the cell data in the column. HTMLTableColElement.ch Is a DOMString representing the alignment character for cell data. HTMLTableColElement.chOff Is a DOMString representing the offset for the alignment character. HTMLTableColElement.span Is an unsigned long that reflects the span HTML attribute, indicating the number of columns to apply this...
... Methods No specific method; inherits methods from its parent, HTMLElement. ...
... Methods No specific method; inherits methods from its parent, HTMLElement. ...
KeyboardEvent() - Web APIs
"location", optional and defaulting to 0, of type unsigned long, that sets the value of KeyboardEvent.location. ...
... "location", optional and defaulting to 0, of type unsigned long, that sets the value of KeyboardEvent.location. ...
... "location", optional and defaulting to 0, of type unsigned long, that sets the value of KeyboardEvent.location. "ctrlKey", optional and defaulting to false, of type Boolean, that sets the value of KeyboardEvent.ctrlKey. ...
KeyboardEvent - Web APIs
les include the digits on the numeric keypad, the keypad's Enter key, and the decimal point on the keypad. Properties This interface also inherits properties of its parents, UIEvent and Event. KeyboardEvent.altKey Read only Returns a Boolean that is true if the Alt ( Option or ? on OS X) key was active when the key event was generated. KeyboardEvent.code Read only Returns a DOMString with the code value of the physical key represented by the event. Warning: This ignores the user's keyboard layout, so that if the user presses the key at the "Y" position in a QWERTY keyboard layout (near the middle of the row above the home row), this will always return "KeyY", even if the user has a QWERTZ keyboard (which would mean the user expects a "Z" and all the other properties would in...
...dicate a "Z") or a Dvorak keyboard layout (where the user would expect an "F"). KeyboardEvent.ctrlKey Read only Returns a Boolean that is true if the Ctrl key was active when the key event was generated. KeyboardEvent.isComposing Read only Returns a Boolean that is true if the event is fired between after compositionstart and before compositionend. KeyboardEvent.key Read only Returns a DOMString representing the key value of the key represented by the event. KeyboardEvent.locale Read only Returns a DOMString representing a locale string indicating the locale the keyboard is configured for. This may be the empty string if the browser or device doesn't know the keyboard's locale. Note: This does not describe the locale of the data being entered. A user may be using one keyboard layout ...
...nt() Initializes a KeyboardEvent object. This was implemented only by Firefox, and is no longer supported even there; instead, you should use the KeyboardEvent() constructor. KeyboardEvent.initKeyboardEvent() Initializes a KeyboardEvent object. This is now deprecated. You should instead use the KeyboardEvent() constructor. Obsolete properties KeyboardEvent.char Read only Returns a DOMString representing the character value of the key. If the key corresponds to a printable character, this value is a non-empty Unicode string containing that character. If the key doesn't have a printable representation, this is an empty string. Note: If the key is used as a macro that inserts multiple characters, this attribute's value is the entire string, not just the first character. KeyboardEve...
Notification.Notification() - Web APIs
tings that you want to apply to the notification. The possible options are: dir: The direction in which to display the notification. ...
... icon: A USVString containing the URL of an icon to be displayed in the notification. ...
... icon: A USVString containing the URL of an icon to be displayed in the notification. image: a USVString containing the URL of an image to be displayed in the notification. data: Arbitrary data that you want associated with the notification. This can be of any data type. ...
PerformanceEntry.entryType - Web APIs
This property is read only. Note: This feature is available in Web Workers. Syntax var type = entry.entryType; Return value The return value depends on the subtype of the PerformanceEntry object and affects the value of the PerformanceEntry.name property as shown by the table below. Performance entry type names Value Subtype Type of name property Description of name property frame, navigation PerformanceFrameTiming, PerformanceNavigationTiming URL The document's address. resource PerformanceResourceTiming URL The resolved URL of the requested resource. ...
... Value Subtype Type of name property Description of name property frame, navigation PerformanceFrameTiming, PerformanceNavigationTiming URL The document's address. resource PerformanceResourceTiming URL The resolved URL of the requested resource. This value doesn't change even if the request is redirected. ...
...eFrameTiming, PerformanceNavigationTiming URL The document's address. resource PerformanceResourceTiming URL The resolved URL of the requested resource. This value doesn't change even if the request is redirected. mark PerformanceMark DOMString The name used when the mark was created by calling performance.mark(). measure PerformanceMeasure DOMString name used when the measure was created by calling performance.measure(). paint PerformancePaintTiming DOMString Either 'first-paint' or 'first-contentful-paint'. longtask PerformanceLongTaskTiming DOMString reports instances of long tasks Example The following example shows the use of the entryType property. function run_PerformanceEntry() ...
RTCDataChannel - Web APIs
a channel and ask a remote peer to join you, call the RTCPeerConnection's createDataChannel() method. The peer being invited to exchange data receives a datachannel event (which has type RTCDataChannelEvent) to let it know the data channel has been added to the connection. PropertiesAlso inherits properties from: EventTargetbinaryType The property binaryType on the RTCDataChannel interface is a DOMString which specifies the type of JavaScript object which should be used to represent binary data received on the RTCDataChannel. Values allowed by the WebSocket.binaryType property are also permitted here: "blob" if Blob objects are being used or "arraybuffer" if ArrayBuffer objects are being used. The default is "blob".bufferedAmount Read only The read-only RTCDataChannel property bufferedAmount re...
...These labels are not required to be unique.maxPacketLifeTime Read only The read-only RTCDataChannel property maxPacketLifeTime returns the amount of time, in milliseconds, the browser is allowed to take to attempt to transmit a message, as set when the data channel was created, or null.maxRetransmits Read only The read-only RTCDataChannel propert...
...If no protocol was specified when the data channel was created, then this property's value is "" (the empty string).readyState Read only The read-only RTCDataChannel property readyState returns an enum of type RTCDataChannelState which indicates the state of the data channel's underlying data connection.reliable Read only The read-only RTCDataC...
RTCPeerConnectionIceErrorEvent - Web APIs
onIceErrorEvent() Creates and returns a new RTCPeerConnectionIceErrorEvent object, with its type and other properties initialized as specified in the parameters. You will not normally create an object of this type yourself. Properties The RTCPeerConnectionIceErrorEvent interface includes the properties found on the Event interface, as well as the following properties: address Read only A DOMString providing the local IP address used to communicate with the STUN or TURN server being used to negotiate the connection, or null if the local IP address has not yet been exposed as part of a local ICE candidate. errorCode Read only An unsigned integer value stating the numeric STUN error code returned by the STUN or TURN server. If no host candidate can reach the server, this property is set to...
...E candidate. errorCode Read only An unsigned integer value stating the numeric STUN error code returned by the STUN or TURN server. If no host candidate can reach the server, this property is set to the number 701, which is outside the range of valid STUN error codes. The 701 error is fired only once per server URL, and only while the is icegatheringstate is gathering. errorText Read only A DOMString containing the STUN reason text returned by the STUN or TURN server. If communication with the STUN or TURN server couldn't be established at all, this string will be a browser-specific string explaining the error. port Read only An unsigned integer value giving the port number over which communication with the STUN or TURN server is taking place, using the IP address given in address. null if...
...h the STUN or TURN server couldn't be established at all, this string will be a browser-specific string explaining the error. port Read only An unsigned integer value giving the port number over which communication with the STUN or TURN server is taking place, using the IP address given in address. null if the connection hasn't been established (that is, if address is null). url Read only A DOMString indicating the URL of the STUN or TURN server with which the error occurred. Methods RTCPeerConnectionIceErrorEvent has no methods other than any provided by the parent interface, Event. Examples TBD Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCPeerConnectionIceErrorEvent' in that specification...
SecurityPolicyViolationEvent - Web APIs
e violation occurred. SecurityPolicyViolationEvent.dispositionRead only Indicates how the violated policy is configured to be treated by the user agent. This will be "enforce" or "report". SecurityPolicyViolationEvent.documentURIRead only A USVString representing the URI of the document or worker in which the violation was found. SecurityPolicyViolationEvent.effectiveDirectiveRead only A DOMString representing the directive whose enforcement uncovered the violation. SecurityPolicyViolationEvent.lineNumberRead only The line number in the document or worker at which the violation occurred. SecurityPolicyViolationEvent.originalPolicyRead only A DOMString containing the policy whose enforcement uncovered the violation. SecurityPolicyViolationEvent.referrerRead only A USVString represe...
...This will only be populated if the resource is an inline script, event handler, or style -- external resources causing a violation will not generate a sample. ...
...a violation will not generate a sample. SecurityPolicyViolationEvent.sourceFileRead only A USVString representing the URI of the document or worker in which the violation was found. SecurityPolicyViolationEvent.statusCodeRead only A number representing the HTTP status code of the document or worker in which the violation occurred. SecurityPolicyViolationEvent.violatedDirectiveRead only A DOMString representing the directive whose enforcement uncovered the violation. Examples document.addEventListener("securitypolicyviolation", (e) => { console.log(e.blockedURI); console.log(e.violatedDirective); console.log(e.originalPolicy); }); Specifications Specification Status Comment Content Security Policy Level 2The definition of 'SecurityPolicyViolationEvent' in ...
SharedWorker() - Web APIs
same-origin policy. Note: there is disagreement among browser manufacturers about whether a data URI is of the same origin or not. Although Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7) and later accept data URIs, that's not the case in all other browsers. Syntax var myWorker = new SharedWorker(aURL, name); var myWorker = new SharedWorker(aURL, options); Parameters aURL A DOMString representing the URL of the script the worker will execute. It must obey the same-origin policy. name Optional A DOMString specifying an identifying name for the SharedWorkerGlobalScope representing the scope of the worker, which is mainly useful for debugging purposes. options Optional An object containing option properties that can set when creating the object instance. Available properties...
...script the worker will execute. It must obey the same-origin policy. name Optional A DOMString specifying an identifying name for the SharedWorkerGlobalScope representing the scope of the worker, which is mainly useful for debugging purposes. options Optional An object containing option properties that can set when creating the object instance. Available properties are as follows: type: A DOMString specifying the type of worker to create. The value can be classic or module. If not specified, the default used is classic. credentials: A DOMString specifying the type of credentials to use for the worker. The value can be omit, same-origin, or include. ...
... Return value The created worker. Exceptions A SecurityError is raised if the document is not allowed to start workers, for example if the URL has an invalid syntax or if the same-origin policy is violated. ...
TrackDefault.TrackDefault() - Web APIs
The TrackDefault() constructor of the TrackDefault interface constructs and returns a new TrackDefault object. Syntax var trackDefault = new TrackDefault(type, language, label, kinds, byteStreamTrackID); Parameters type A DOMString specifying a media segment data type for the SourceBuffer to contain. Can be audio, video, or text. language A DOMString specifying a default language for the SourceBuffer to use when an initialization segment does not contain language information for a new track. ...
...ax var trackDefault = new TrackDefault(type, language, label, kinds, byteStreamTrackID); Parameters type A DOMString specifying a media segment data type for the SourceBuffer to contain. Can be audio, video, or text. language A DOMString specifying a default language for the SourceBuffer to use when an initialization segment does not contain language information for a new track. label A DOMString specifying a default label for the SourceBuffer to use when an initialization segment does not contain label information for a new track. ...
...r to contain. Can be audio, video, or text. language A DOMString specifying a default language for the SourceBuffer to use when an initialization segment does not contain language information for a new track. label A DOMString specifying a default label for the SourceBuffer to use when an initialization segment does not contain label information for a new track. kinds An array (sequence) of DOMStrings specifying default kinds for the SourceBuffer to use when an initialization segment does not contain kind information for a new track. byteStreamTrackID Optional A DOMString specifying the ID of the specific track that the SourceBuffer should apply to. If not specified, this value will be an empty string and the SourceBuffer can contain any tracks of the specified type. Errors when this con...
Window.open() - Web APIs
Web › API › Window › open
The Window interface's open() method loads the specified resource into the new or existing browsing context (window, <iframe> or tab) with the specified name. If the name doesn't exist, then a new browsing context is opened in a new tab or a new window, and the specified resource is loaded into it. ...
...into it. Syntax var window = window.open(url, windowName, [windowFeatures]); Parameters url A DOMString indicating the URL of the resource to be loaded. This can be a path or URL to an HTML page, image file, or any other resource that is supported by the browser. If the empty string ("") is specified as url, a blank page is opened into the targeted browsing context. windowName Optional A DOMString specifying the name of the browsing context (window, <iframe> or tab) into which to load the specified resource; if the name doesn't indicate an existing context, a new window is created and is given the name specified by windowName. This name can be used as the target for the target attribute of <a> or <form> elements. The name should not contain whitespace. Keep in mind that this will NOT be...
...rame> or tab) into which to load the specified resource; if the name doesn't indicate an existing context, a new window is created and is given the name specified by windowName. This name can be used as the target for the target attribute of <a> or <form> elements. The name should not contain whitespace. Keep in mind that this will NOT be used as the window's title. windowFeatures Optional A DOMString containing a comma-separated list of window features given with their corresponding values in the form "name=value". These features include options such as the window's default size and position, whether or not to include toolbar, and so forth. There must be no whitespace in the string. See Window features below for documentation of each of the features that can be specified. Return value A Wi...
DOM Interfaces - Archive of obsolete content
The nsIDOMDocumentXBL Interface The nsIDOMDocumentXBL interface contains methods for manipulating XBL bindings. The interface is implemented by all DOM documents. IDL Definition interface nsIDOMDocumentXBL { NodeList getAnonymousNodes(in Element elt); Element getAnonymousElementByAttribute(in Element elt, in DOMString attrName, in DOMString attrValue); Element getBindingParent(in Node node); void loadBindingDocument(in DOMString documentURL); }; Methods getAnonymousNodes The getAnonymousNodes method retrieves the anonymous children of the specified element. Parameters elt - The element to retrieve anonymous children for. Return Value NodeList - The return value of getAnonymousNod...
...o synchronously obtain the specified binding document for use within a particular document (the one on which the loadBindingDocument method was invoked). The binding document can then be modified programmatically using the DOM. Any subsequent bindings that are attached to elements within the document will be constructed from the modified binding document. Parameters documentURL of type DOMString - The URL of a binding document. No Return Value Example The following snippet checks to see if any anonymous child of "element" is itself an element. if (element.ownerDocument instanceof Ci.nsIDOMDocumentXBL) { var anonChildren = element.ownerDocument.getAnonymousNodes(element); if (anonChildren) { for (var i = 0; i < anonChildren.length; i++) { ...
Introduction to XUL - Archive of obsolete content
ter the HTML extensions. At this time these additional DOM methods are available, though the code is of course the most accurate place to look for this information. These interfaces can be found in the directory mozilla/rdf/content/public/idl. XULDocument XULDocument extends Document in a fashion similar to HTMLDocument's extension interface XULDocument : Document { Element getElementById(in DOMString id); NodeList getElementsByAttribute(in DOMString name, in DOMString value); }; getElementById works like HTML's getElementById. getElementsByAttribute returns a list of Elements for which the named attribute has the given value. A value of "*" is a wildcard signifying all elements with the attribute. XULElement XULElement extends Element. interface XULElement : Element { NodeList getEl...
...lementsByAttribute(in DOMString name, in DOMString value); }; getElementById works like HTML's getElementById. getElementsByAttribute returns a list of Elements for which the named attribute has the given value. A value of "*" is a wildcard signifying all elements with the attribute. XULElement XULElement extends Element. interface XULElement : Element { NodeList getElementsByAttribute(in DOMString name, in DOMString value); }; getElementsByAttribute functions as does its namesake in XULDocument, though this version returns only those elements which match the criteria and are descendants (in CSS selector terminology) of the given element. XULElement also supports other methods for hooking up broadcasters; a function performed automatically by the XUL document loader and therefore not nor...
mozbrowsererror
mozbrowsererror event is fired when an error occurs while trying to load content within a browser <iframe>. ...
... type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. detail The detail property returns an anonymous JavaScript object with the following properties: type A DOMString representing the type of error that occurred. Possible values are: fatal(crash) unknownProtocolFound fileNotFound dnsNotFound connectionFailure netInterrupt netTimeout cspBlocked phishingBlocked malwareBlocked unwantedBlocked offline malformedURI redirectLoop unknownSocketType netReset notCached isprinting deniedPortAccess proxyResolveFailure proxyConne...
mozbrowserfindchange
This includes HTMLIFrameElement.findAll(), HTMLIFrameElement.findNext(), and HTMLIFrameElement.clearMatch(). General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: active A Boolean indicating whether a...
...her the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: active A Boolean indicating whether a search is currently active (true), or not (false.) searchString A DOMString representing the string that is currently being searched for. searchLimit A number indicating the maximum number of searches that can be returned. numberOfMatches A number indicating the number of matches returned by the search. activeMatchOrdinal A number indicating the position of the currently highlighted search result, e.g. 3 out of 5. Example var browser = document.querySelector("if...
mozbrowsericonchange
ouch-icon">) is available in the browser <iframe>'s content. It will be fired once for each icon available. ...
... type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: href A DOMString representing the path to the new icon. sizes A DOMString listing the sizes the new icon is available in, e.g. "16x16" or "16x16 32x32". The any keyword can also be used, to represent "any size." rel A DOMString representing the rel attribute value from the <link> element used to link to the icon. Example var browser = document.querySelector("iframe"); browser.addEventListener("mozbrowser...
mozbrowserloadend
ts to stop spinning a loading indicator, or update the UI in some other way to indicate loading is complete. ...
...Can be used to make the theme of the surrounding UI complement the theme of the currently loaded content, for example. ...
mozbrowserlocationchange
hange event is fired when a browser <iframe>'s location changes -- it is fired every time navigation occurs. ...
... canGoBack A Boolean that defines whether it's possible to go back in the navigation history (true) or not (false). canGoForward A Boolean that defines whether it's possible to go forward in the navigation history (true) or not (false). ...
mozbrowseropensearch
-- i.e. when an instance of <link rel="search" type="application/opensearchdescription+xml"> is encountered. ...
... type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: title A DOMString representing the title of the search engine. href A DOMString representing URL of the search engine. Example var browser = document.querySelector("iframe"); browser.addEventListener("mozbrowseropensearch", function( event ) { console.log("New search engine encountered: " + event.details.title); }); Related Events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowse...
mozbrowserscrollviewchange
The mozbrowserscrollviewchange event is fired when asynchronous scrolling (i.e. APCZ) starts or stops. ...
... type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: state A DOMString representing the current state of scrolling in the viewport -- available values are started and stopped. Example var browser = document.querySelector("iframe"); browser.addEventListener("mozbrowserscrollviewchange", function( event ) { console.log("Scrolling has " + event.details.state + "."); }); Related Events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowserer...
mozbrowsershowmodalprompt
en the content of a browser <iframe> calls the window.alert(), window.confirm(), or window.prompt() methods. ...
... type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property is an anonymous JavaScript object with the following properties: promptType A DOMString defining the type of the prompt. It can be alert, confirm, or prompt. title A DOMString representing the title of the prompt. message A DOMString representing the value passed to the window.alert(), window.confirm(), or window.prompt() methods within the browser <iframe>'s content. returnValue A DOMString representing the return value for the window.prompt() methods. This should be set by t...
Extending a Protocol
sage to the OS or spin up something off the main thread - so it's biased towards supporting W3C/WHATWG DOM APIs. What are we going to implement? tl:dr: you can see the final implementation of PEcho.ipdl as a diff in Phabricator. To make this tutorial less abstract (more fun!), we are going to implement a JS method called echo() on the Navigator interface. The method will take one argument, a DOMString, which we will pass to the parent process. Then we will send that same string back to the child process. The WebIDL for this will be: partial interface Navigator { Promise<DOMString> echo(DOMString someString); }; Learning goals are: Extending an existing IPDL protocol. Simple message passing. Working with MozPromises and JS promises. Managing child actors with reference counting. ...
...ng. Visually, it's going to look something like this (except for the Operating System bit, which we are not actually going to do - just to illustrate what we could do): Let's start by implementing the WebIDL above. Implementing the navigator.echo() In your favorite editor, open dom/webidl/Navigator.webidl At the end of the file, add: partial interface Navigator { [Throws] Promise<DOMString> echo(DOMString aString); }; Now we need to implement the Echo() method in C++, so open up ./dom/base/Navigator.h and let's add the method definition, so under public:: already_AddRefed<Promise> Echo(const nsAString& aString, ErrorResult& aRv); We use nsAString& as the DOMString comes in from JS as UTF-16. This will matter later, as we will need to convert it to UTF-8 (using nsCString) t...
nsIAccessibleRetrieval
Create a new accessible of the appropriate type if necessary, or use one from the accessibility cache if it already exists. nsIAccessible getAccessibleFor( in nsIDOMNode aNode ); Parameters aNode The DOM node to get an ...
... accessible relation type constant. Return value Accessible relation type presented as human readable string. getStringRole() Returns accessible role as a string. AString getStringRole( in unsigned long aRole ); Parameters aRole The accessible role constants. Return value Accessible role as a string. getStringStates() Returns a list which contains accessible states as strings. nsIDOMDOMStringList getStringStates( in unsigned long aStates, in unsigned long aExtraStates ); Parameters aStates Accessible states. aExtraStates Accessible extra states. Return value A list which contains accessible states as strings. See also Mozilla Access nsIAccessible nsIAccessNode ...
nsIDOMFontFace
ther or not the font was located in a font group. Read only. fromLanguagePrefs boolean Indicates whether or not the font was located using language preferences. Read only. fromSystemFallback boolean Indicates whether or not the font is the system fallback font. Read only. Attributes available for all fonts These attributes are always available. Attribute Type Description CSSFamilyName DOMString A family name that could be used in CSS font-family (not necessarily the actual name that was used, due to aliases, generics, localized names, and so on). Read only. name DOMString Full font name as obtained from the font resource. Read only. Attributes only available when specified with @font-face These attributes only have meaningful values when the font is a user font defined using @font-...
...-family (not necessarily the actual name that was used, due to aliases, generics, localized names, and so on). Read only. name DOMString Full font name as obtained from the font resource. Read only. Attributes only available when specified with @font-face These attributes only have meaningful values when the font is a user font defined using @font-face. Attribute Type Description format DOMString The font format. Read only. localName DOMString null if not a src:local(...) rule. Read only. metadata DOMString XML metadata from WOFF file(if any). Read only. rule nsIDOMCSSFontFaceRule null if no associated @font-face rule. Read only. srcIndex long Index in the rule's src list, -1 if no @font-face rule. Read only. URI DOMString null if not a downloaded font, that is local. Read only.
nsIDOMGeoPositionAddress
ervice being used. 1.0 66 Introduced Gecko 1.9.2 Obsolete Gecko 14.0 Inherits from: nsISupports Last changed in Gecko 11 (Firefox 11 / Thunderbird 11 / SeaMonkey 2.8) This object is obtained from an nsIDOMGeoPositionAddress object via its address attribute. Note: This needs to be moved into the DOM Reference. Attributes Attribute Type Description city DOMString The city. Read only. country DOMString The country. Read only. countryCode Obsolete since Gecko 11 DOMString Removed in Firefox 11, since it isn't defined in the specification; use country instead. county DOMString The county. Read only. postalCode DOMString The postal or ZIP code. Read only. premises DOMString The premises. Read only. region DOMString The region. Read only. street ...
... The city. Read only. country DOMString The country. Read only. countryCode Obsolete since Gecko 11 DOMString Removed in Firefox 11, since it isn't defined in the specification; use country instead. county DOMString The county. Read only. postalCode DOMString The postal or ZIP code. Read only. premises DOMString The premises. Read only. region DOMString The region. Read only. street DOMString The street of the address. Read only. streetNumber DOMString The street number of the address. Read only. Historical note, which is likely of no interest to most readers: the types of the attributes below all changed from string to DOMString in Gecko 1.9.2 beta 5. See also Using geolocation ...
nsIDOMMouseScrollEvent
lScriptable This interface represents a mouse scroll wheel event. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsIDOMMouseEvent Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Gecko 1.9.2 note Prior to Gecko 1.9.2, this inherited from nsISupports instead of from nsIDOMMouseEvent. ...
...xis changed; this will be either HORIZONTAL_AXIS or VERTICAL_AXIS. Read only. Constants Constant Value Description HORIZONTAL_AXIS 1 The horizontal (X) axis. VERTICAL_AXIS 2 The vertical (Y) axis. Methods initMouseScrollEvent() Initializes the progress event object. ...
nsIDOMMozTouchEvent
hat touch events can be generated independently for each finger touching the screen. This lets you process multi-finger touch gestures and actions. dom/interfaces/events/nsIDOMMozTouchEvent.idlScriptable Please add a summary to this article. ...
...e Description streamId unsigned long A unique identifier for each finger, so that each finger's movement can be tracked separately. This is a random number that is guaranteed to remain the same for each finger during all MozTouchMove events between the corresponding MozTouchDown and MozTouchUp events. Methods initMozTouchEvent() Initializes the touch event. ...
nsIDOMOrientationEvent
can be delivered to DOM windows, providing information from the device's accelerometer, allowing code to determine the orientation of the device. dom/interfaces/events/nsIDOMOrientationEvent.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Inherits from: nsIDOMEvent Method overview void initOrientationEvent(in DOMString eventTypeArg, in boolean canBubbleArg, in boolean cancelableArg, in double x, in double y, in double z); Attributes Attribute Type Description x double The amount of tilt along the X axis. Read only. y double The amount of tilt along the Y axis. Read only. z double The amount of tilt along the Z axis. Read only. The values of x, y, and z can range fro...
...the X axis. Read only. y double The amount of tilt along the Y axis. Read only. z double The amount of tilt along the Z axis. Read only. The values of x, y, and z can range from -1 to 1, where 0 means the device is balanced on that axis. See Accelerometer values explained for details. Methods initOrientationEvent() Initializes the orientation event object. void initProgressEvent( in DOMString eventTypeArg, in boolean canBubbleArg, in boolean cancelableArg, in double x, in double y, in double z ); Parameters eventTypeArg The type of event. Must be "MozOrientation". canBubbleArg Specifies whether or not the created event will bubble. cancelableArg Specifies whether or not the created event can be canceled. x The amount of tilt along the X axis. y The amount of tilt along the...
nsIDOMProgressEvent
vent Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) The nsIDOMProgressEvent is used in the media elements (<video> and <audio>) to inform interested code of the progress of the media download. This implementation is a placeholder until the specification is complete, and is compatible with the WebKit ProgressEvent. Method overview void initProgressEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in boolean lengthComputableArg, in unsigned long long loadedArg, in unsigned long long totalArg); Deprecated since Gecko 22.0 Attributes Attribute Type Description lengthComputable boolean Specifies whether or not the total size of the transfer is known. Read only. loaded unsigned long lo...
...ed during the operation. If the total size is unknown, this value is zero. Read only. Methods initProgressEvent() Deprecated since Gecko 22.0 This method has been removed from use in JavaScript in Gecko 22.0. Use the regular constructor to construct a synthetic ProgressEvent. It still is usable from native C++ code. Initializes the progress event object. void initProgressEvent( in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in boolean lengthComputableArg, in unsigned long long loadedArg, in unsigned long long totalArg ); Parameters typeArg The type of event. Must be one of "abort", "error", "load", "loadstart", or "progress". canBubbleArg Specifies whether or not the created event will bubble. cancelableArg Specifies whether or not the c...
nsIDOMSimpleGestureEvent
the input device. Client coordinates contain the center pivot point of the action. (XXX Not implemented on Mac) Default behavior: Some operating systems support default behaviors for gesture events when they are not handled by the application. Consumers should use event.preventDefault() to prevent default behavior when consuming events. ...
... DIRECTION_LEFT 4 Leftward swipe. DIRECTION_RIGHT 8 Rightward swipe. Rotation constants Constant Value Description ROTATION_COUNTERCLOCKWISE 1 Counter-clockwise rotation. ROTATION_CLOCKWISE 2 Clockwise rotation. Methods initSimpleGestureEvent() Initializes the gesture event. ...
nsIDOMStorageManager
All data owned by a domain with the "offline-app" permission is removed from the database. void clearOfflineApps(); Parameters None. getLocalStorageForPrincipal() Returns the instance of the localStorage object for aURI's origin. This is used to ensure that only one ...
...applications. All data owned by a domain with the "offline-app" permission is removed from the database. void clearOfflineApps(); Parameters None. getLocalStorageForPrincipal() Returns the instance of the localStorage object for aURI's origin. This is used to ensure that only one local storage area exists for a given origin. nsIDOMStorage getLocalStorageForPrincipal( nsIPrincipal aPrincipal, DOMString aDocumentURI ); Parameters aPrincipal The principal for which to return the local storage object. aDocumentURI The document's URI. Return value The local storage object for the specified principal. getUsage() Returns the amount of disk space used by a domain. Usage is checked against the domain of the page that set the key (the owner domain), not the domain of the storage object. long getUsag...
nsIDOMUserDataHandler
dom/interfaces/core/nsIDOMUserDataHandler.idlScriptable The callback function for the setUserData method. 1.0 66 Introduced Gecko 1.5 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void handle(in unsigned short operation, in DOMString key, in nsIVariant data, in nsIDOMNode src, in nsIDOMNode dst); Constants Constant Value Description NODE_CLONED 1 The node was cloned. NODE_IMPORTED 2 The node was cloned into a new document. NODE_DELETED 3 Unimplemented NODE_RENAMED 4 Unimplemented NODE_ADOPTED 5 The node was adopted into a new document. Methods handle() This method is a callback which will be called if a node with user data is being cloned, imported or adopted. void handle( in unsigned short operation...
...on NODE_CLONED 1 The node was cloned. NODE_IMPORTED 2 The node was cloned into a new document. NODE_DELETED 3 Unimplemented NODE_RENAMED 4 Unimplemented NODE_ADOPTED 5 The node was adopted into a new document. Methods handle() This method is a callback which will be called if a node with user data is being cloned, imported or adopted. void handle( in unsigned short operation, in DOMString key, in nsIVariant data, in nsIDOMNode src, in nsIDOMNode dst ); Parameters operation One of the NODE_* operation type constants from the above table. key The key that was used to set the user data. data The data that was set on the original node. src The original node. dst The new node, for clone and import operations. ...
nsIDOMXULLabeledControlElement
dom/interfaces/xul/nsIDOMXULLabeledControlEl.idlScriptable This interface is used as a basis for labeled control elements in XUL. Inherits from: nsIDOMXULControlElement Last changed in Gecko 1.7 Attributes Attribute Type Description accessKey DOMString This should be set to a character that is used as a shortcut key. This should be one of the characters that appears in the label for the element. When the user presses the appropriate modifier and the access key, the element will be focused and/or activated from anywhere in the window. On non-Macintosh platforms, the character on the element's label matching the access key is underlined. Note: The access key is copied to any associated label element. command DOMString This property reflects the element's command attribute. cr...
...lement. When the user presses the appropriate modifier and the access key, the element will be focused and/or activated from anywhere in the window. On non-Macintosh platforms, the character on the element's label matching the access key is underlined. Note: The access key is copied to any associated label element. command DOMString This property reflects the element's command attribute. crop DOMString This property reflects the element's crop attribute. image DOMString This property reflects the element's image attribute. label DOMString This property reflects the element's label attribute. ...
nsIEditorIMESupport
Read only. Methods Native code only!beginComposition Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)This feature is obsol...
... aReply Native code only!setCompositionString Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)This feature is obsolete. ...
nsIEditorMailSupport
port.idlScriptable Provides simple editing actions for the Thunderbird mail editor. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview nsISupportsArray getEmbeddedObjects(); nsIDOMNode insertAsCitedQuotation(in AString aQuotedText, in AString aCitation, in boolean aInsertHTML); nsIDOMNode insertAsQuotation(in AString aQuotedText); void insertTextWithQuotations(in DOMString aStringToInsert); void pasteAsCitedQuotation(in AString aCitation, in long aSelectionType); void pasteAsQuotation(in long aSelectionType); void rewrap(in boolean aRespectNewlines); void stripCites(); Methods getEmbeddedObjects() Get a list of IMG and OBJECT tags in the current document. nsISupportsArray getEmbeddedObjects(); Parameters None. Return value An nsISupportsArray containing...
...de which was inserted. insertTextWithQuotations() Inserts a plain text string at the current location, with special processing for lines beginning with ">", which will be treated as mail quotes and inserted as plain text quoted blocks. If the selection is not collapsed, the selection is deleted and the insertion takes place at the resulting collapsed selection. void insertTextWithQuotations( in DOMString aStringToInsert ); Parameters aStringToInsert The string to be inserted pasteAsCitedQuotation() Paste a string as quoted text, whose representation is dependent on the editor type, replacing the selected text (if any) void pasteAsCitedQuotation( in AString aCitation, in long aSelectionType ); Parameters aCitation The "mid" URL of the source message. aSelectionType Text or html? pasteAsQ...
nsIPushSubscription
y 2.43) Each subscription is associated with a unique URL generated by the Push service. Sending a POST request to this URL routes the message to the instance of Firefox that created the subscription. A subscription also has a public key and secret; these are used to encrypt message payloads. This interface resembles PushSubscription from the Push API. Method overview void getKey(in DOMString name, [optional] out uint32_t keyLen, [array, size_is(keyLen), retval] out uint8_t key); bool quotaApplies(); bool isExpired(); Attributes Attribute Type Description endpoint DOMString The subscription URL. pushCount long long The total number of messages sent to this subscription. lastPush long long The last ti...
...ing the key material for this subscription. The remote server can use these keys to encrypt and authenticate message payloads. The following key names are supported: p256dh The ECDH public key, used as the input keying material in the HKDF invocation during encryption. auth The shared authentication secret, used as the salt in the HKDF invocation. void getKey( in DOMString name, [optional] out uint32_t keyLen, [array, size_is(keyLen), retval] out uint8_t key ); Parameters name The encryption key name. keyLen The keying material length. key The byte array containing the keying material. keyLen and key are out parameters. When called from JavaScript, nsIPushSubscription.getKey() only takes name as a parameter, and returns key. Please see Method param...
nsIVariant
only! nsresult getAsArray(out PRUint16 type, out nsIID iid, out PRUint32 count, out voidPtr ptr); Violates the XPCOM interface guidelines AString getAsAString(); Native code only! AUTF8String getAsAUTF8String(); Native code only! PRBool getAsBool(); Native code only! char getAsChar(); Native code only! DOMString getAsDOMString(); Native code only! double getAsDouble(); Native code only! float getAsFloat(); Native code only! nsresult getAsID(out nsID retval); Violates the XPCOM interface guidelines PRInt16 getAsInt16(); Native code only! PRInt32 getAsInt32(); Native code only! PRInt64 getAsInt64(); Native code ...
... code only!getAsBool PRBool getAsBool(); Parameters None. Return value If possible, the internal value is converted to a double, which is then compared to zero. Native code only!getAsChar char getAsChar(); Parameters None. Return value If the internal value is a string, it is first converted to a double, if possible. If it is of a numeric type, it is cast directly to char. Native code only!getAsDOMString DOMString getAsDOMString(); Parameters None. Return value This returns the same as the getAsAString method. Native code only!getAsDouble double getAsDouble(); Parameters None. Return value If the internal value is a string, it is converted to a double, if possible. If it is of a numeric type it is cast directly to double. Native code only!getAsFloat float getAsFloat(); Parameters None. Return ...
nsIWorker
dom/interfaces/threads/nsIDOMWorkers.idlScriptable This interface represents a DOM worker thread. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsIAbstractWorker Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) For usage details, see worker and the article Using DOM workers. ...
...ew void postMessage(in DOMString aMessage, [optional] in nsIWorkerMessagePort aMessagePort); Attributes Attribute Type Description onmessage nsIDOMEventListener An object to receive notifications when messages are received on the worker's message port. Methods postMessage() Used to allow the worker to send a message back to the web application that created it. void postMessage( in DOMString aMessage, in nsIWorkerMessagePort aMessagePort Optional ); Parameters aMessage The message the worker wishes to post back to its creator. aMessagePort A message port on which to post the message; if not specified, the default message port is used. ...
nsIWorkerScope
dom/interfaces/threads/nsIDOMWorkers.idlScriptable This interface represents the global scope in which a worker's script runs. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsIWorkerGlobalScope Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Method overview void postMessage(in DOMString aMessage, [optional] in nsIWorkerMessagePort aMessagePort); void close(); Attributes Attribute Type Description onclose nsIDOMEventListener A listener object to be called when the worker stops running. onmessage nsIDOMEventListener A listener object to be called when a message is posted on the port. The message is in the event's data member. Methods close() Allows the worker to terminate itself. If a listener has been established by ...
...tListener A listener object to be called when a message is posted on the port. The message is in the event's data member. Methods close() Allows the worker to terminate itself. If a listener has been established by setting the value of the onclose attribute, it gets called. void close(); Parameters None. postMessage() Posts a message to the scope's parent worker object. void postMessage( in DOMString aMessage, in nsIWorkerMessagePort aMessagePort Optional ); Parameters aMessage The message to post. It will be stored as the data member in the event. aMessagePort Optional Specifies the message port onto which to post the message; if not specified, the default port is used. See also Using web workers nsIWorkerMessageEvent nsIWorkerMessagePort nsIWorkerGlobalScope nsIAbstractWorker nsIWorke...
AnimationEvent() - Web APIs
reated AnimationEvent, representing an event in relation with an animation. Syntax animationEvent = new AnimationEvent(type, {animationName: aPropertyName, elapsedTime : aFloat, pseudoElement: aPseudoElementName}); Parameters The AnimationEvent() constructor also inherits arguments from Event(). type A DOMString representing the name of the type of the AnimationEvent. It is case-sensitive and can be: 'animationstart', 'animationend', or 'animationiteration'. animationName Optional A DOMString containing the value of the animation-name CSS property associated with the transition. It defaults to "". elapsedTime Optional A float giving the amount of time the animation has been running, in seconds, when ...
...psedTime Optional A float giving the amount of time the animation has been running, in seconds, when this event fired, excluding any time the animation was paused. For an "animationstart" event, elapsedTime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedTime containing (-1 * delay). It defaults to 0.0. pseudoElement Optional Is a DOMString, starting with "::", containing the name of the pseudo-element the animation runs on. If the animation doesn't run on a pseudo-element but on the element itself, specify an empty string: "". It defaults to "". Return value A new AnimationEvent, initialized per any provided options. Specifications Specification Status Comment CSS AnimationsThe definition of 'Animat...
AnimationEvent.initAnimationEvent() - Web APIs
this method was removed from the specification. It has been deprecated and is in the progress of being removed from most implementations. Do not use this method; instead, use the standard constructor, AnimationEvent(), to create a synthetic AnimationEvent. Syntax animationEvent.initAnimationEvent(typeArg, canBubbleArg, cancelableArg, animationNameArg, elapsedTimeArg); Parameters typeArg A DOMString identifying the specific type of animation event that occurred. The following values are allowed: Value Meaning animationstart The animation has started. animationend The animation completed. animationiteration The current iteration just completed. canBubbleArg A Boolean flag indicating if the event can bubble (tr...
...ationstart The animation has started. animationend The animation completed. animationiteration The current iteration just completed. canBubbleArg A Boolean flag indicating if the event can bubble (true) or not (false). cancelableArg A Boolean flag indicating if the event associated action can be avoided (true) or not (false). animationNameArg A DOMString containing the value of the animation-name CSS property associated with the transition. elapsedTimeArg A float indicating the amount of time the animation has been running, in seconds, as of the time the event was fired, excluding any time the animation was paused. For an "animationstart" event, elapsedTime is 0.0 unless there was a negative value for animation-delay, in which case the event wi...
AnimationEvent - Web APIs
as,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">AnimationEvent</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Constructor AnimationEvent() Creates an AnimationEvent event with the given parameters. Properties Also inherits properties from its parent Event. AnimationEvent.animationName Read only Is a DOMString containing the value of the animation-name that generated the animation. AnimationEvent.elapsedTime Read only Is a float giving the amount of time the animation has been running, in seconds, when this event fired, excluding any time the animation was paused. For an animationstart event, elapsedTime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fi...
...psedTime Read only Is a float giving the amount of time the animation has been running, in seconds, when this event fired, excluding any time the animation was paused. For an animationstart event, elapsedTime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedTime containing (-1 * delay). AnimationEvent.pseudoElement Read only Is a DOMString, starting with '::', containing the name of the pseudo-element the animation runs on. If the animation doesn't run on a pseudo-element but on the element, an empty string: ''. Methods Also inherits methods from its parent Event. AnimationEvent.initAnimationEvent() Initializes a AnimationEvent created using the deprecated Document.createEvent("AnimationEvent") method. Specifications ...
AudioTrack - Web APIs
rface represents a single audio track from one of the HTML media elements, <audio> or <video>. The most common use for accessing an AudioTrack object is to toggle its enabled property in order to mute and unmute the track. Properties enabled A Boolean value which controls whether or not the audio track's sound is enabled. Setting this value to false mutes the track's audio. id Read only A DOMString which uniquely identifies the track within the media. This ID can be used to locate a specific track within an audio track list by calling AudioTrackList.getTrackById(). The ID can also be used as the fragment part of the URL if the media supports seeking by media fragment per the Media Fragments URI specification. kind Read only A DOMString specifying the category into which the track falls. ...
... a specific track within an audio track list by calling AudioTrackList.getTrackById(). The ID can also be used as the fragment part of the URL if the media supports seeking by media fragment per the Media Fragments URI specification. kind Read only A DOMString specifying the category into which the track falls. For example, the main audio track would have a kind of "main". label Read only A DOMString providing a human-readable label for the track. For example, an audio commentary track for a movie might have a label of "Commentary with director John Q. Public and actors John Doe and Jane Eod." This string is empty if no label is provided. language Read only A DOMString specifying the audio track's primary language, or an empty string if unknown. The language is specified as a BCP 47 (RFC 5...
BasicCardRequest - Web APIs
The BasicCardRequest dictionary is a JavaScript object-structure that can be used in the Payment Request API. The properties of BasicCardRequest are defined in the Basic Card Payment spec). Properties BasicCardRequest.supportedNetworks Optional Secure context An optional array of DOMStrings representing the card networks that the retailer supports (e.g. "amex", "mastercard"); see Card network identifiers for a complete list. If the property is missing, it implies that all networks are supported. ...
...mastercard"); see Card network identifiers for a complete list. If the property is missing, it implies that all networks are supported. Obsolete properties These properties have been removed from the Payment Method: Basic Card specification and should no longer be used. BasicCardRequest.supportedTypes Optional Secure context This obsolete property was used to provide an optional array of DOMStrings representing the card types that the retailer supports (e.g. credit, debit, prepaid). If the property is missing, it implies that all the card types are supported. Instead of using this property, it is up to the server to check support for the card given the information coded into the account number. Card network identifiers The W3C maintains an official list of approved card network identifi...
BatteryManager - Web APIs
event type on the EventTarget. EventTarget.removeEventListener() Removes an event listener from the EventTarget. EventTarget.dispatchEvent() Dispatches an event to this EventTarget. ...
...moves an event listener from the EventTarget. EventTarget.dispatchEvent() Dispatches an event to this EventTarget. ...
Beacon API - Web APIs
ad performance for the next navigation. The Beacon API provides a standard way to address these issues. Global context The Beacon API's Navigator.sendBeacon() method is used to send a beacon of data to the server in the global browsing context. The method takes two arguments, the URL and the data to send in the request. The data argument is optional and its type may be an ArrayBufferView, Blob, DOMString, or FormData. If the browser successfully queues the request for delivery, the method returns "true" and returns "false" otherwise. Worker context The Beacon API's Navigator.sendBeacon() method is used to send a beacon of data to the server from the worker global scope. The method takes two arguments, the URL and the data to send in the request. The data argument is optional and its type may be...
...er successfully queues the request for delivery, the method returns "true" and returns "false" otherwise. Worker context The Beacon API's Navigator.sendBeacon() method is used to send a beacon of data to the server from the worker global scope. The method takes two arguments, the URL and the data to send in the request. The data argument is optional and its type may be an ArrayBufferView, Blob, DOMString, or FormData. If the browser successfully queues the request for delivery, the method returns "true" and otherwise returns "false". ...
BeforeInstallPromptEvent - Web APIs
ono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">BeforeInstallPromptEvent</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Constructor BeforeInstallPromptEvent() Creates a new BeforeInstallPromptEvent. Properties Inherits properties from its parent, Event. ...
... Methods BeforeInstallPromptEvent.prompt() Allows a developer to show the install prompt at a time of their own choosing. This method returns a Promise. ...
CSSKeyframesRule - Web APIs
ts the name of the animation, used by the animation-name property. CSSKeyframesRule.cssRules Read only Returns a CSSRuleList of the CSS rules in the media rule. Methods As a CSSRule, CSSKeyframesRule also implements the methods of that interface. It has three specific methods: CSSKeyframesRule.appendRule() Inserts a new keyframe rule into the current CSSKeyframesRule. The parameter is a DOMString containing a keyframe in the same format as an entry of a @keyframes at-rule. If it contains more than one keyframe rule, a DOMException with a SYNTAX_ERR is thrown. CSSKeyframesRule.deleteRule() Deletes a keyframe rule from the current CSSKeyframesRule. The parameter is the index of the keyframe to be deleted, expressed as a DOMString resolving as a number between 0% and 100%. CSSKeyframesRul...
...t contains more than one keyframe rule, a DOMException with a SYNTAX_ERR is thrown. CSSKeyframesRule.deleteRule() Deletes a keyframe rule from the current CSSKeyframesRule. The parameter is the index of the keyframe to be deleted, expressed as a DOMString resolving as a number between 0% and 100%. CSSKeyframesRule.findRule() Returns a keyframe rule corresponding to the given key. The key is a DOMString containing an index of the keyframe to be returned, resolving to a percentage between 0% and 100%. If no such keyframe exists, findRule returns null. Specification Specification Status Comment CSS AnimationsThe definition of 'CSSKeyframesRule' in that specification. Working Draft Initial definition ...
CSSOMString - Web APIs
CSSOMString is used to denote string data in CSSOM specifications and can refer to either DOMString or USVString. When a specification says CSSOMString, it depends on the browser vendors to choose whether to use DOMString or USVString. While browser implementations that use UTF-8 internally to represent strings in memory can use USVString when the specification says CSSOMString, implementations that already represent strings as 16-bit sequences might choose to use DOMString instead. ...
...ys CSSOMString, it depends on the browser vendors to choose whether to use DOMString or USVString. While browser implementations that use UTF-8 internally to represent strings in memory can use USVString when the specification says CSSOMString, implementations that already represent strings as 16-bit sequences might choose to use DOMString instead. Implementation differences Browser DOMString or USVString for CSSOMString Firefox (Gecko) USVString Chrome (Blink) USVString Safari (WebKit) USVString Edge (EdgeHTML) - Opera (Blink) USVString Specifications Specification Status Comment CSS Object Model (CSSOM)The definition of 'CSSOMString' in that specification. Working Draft Initial defi...
CSSStyleDeclaration.removeProperty() - Web APIs
Exceptions DOMException NO_MODIFICATION_ALLOWED_ERR: if the property or declaration block is read only. ...
... Exceptions DOMException NO_MODIFICATION_ALLOWED_ERR: if the property or declaration block is read only. ...
Credential - Web APIs
Valid values are password, federated and public-key. ...
...Valid values are password, federated and public-key. ...
DOMImplementation.createDocument() - Web APIs
documentType Optional Is the DocumentType of the document to be created. ...
... documentType Optional Is the DocumentType of the document to be created. ...
DisplayMediaStreamConstraints.video - Web APIs
TrackConstraints object is given instead, the video track will be processed to match the settings given in the constraints object. Constraints specific to screen sharing These constraints apply to MediaTrackConstraints objects specified as part of the DisplayMediaStreamConstraints object's video property when using getDisplayMedia() to obtain a stream for screen sharing. cursor A ConstrainDOMString which specifies whether or not to include the mouse cursor in the generated track, and if so, whether or not to hide it while not moving. The value may be a single one of the following strings, or an array of them to allow the browser flexibility in deciding what to do about the cursor. always The mouse is always visible in the video content of the {domxref("MediaStream"), unless the mouse...
... to do about the cursor. always The mouse is always visible in the video content of the {domxref("MediaStream"), unless the mouse has moved outside the area of the content. motion The mouse cursor is always included in the video if it's moving, and for a short time after it stops moving. never The mouse cursor is never included in the shared video. displaySurface A ConstrainDOMString which specifies the types of display surface that may be selected by the user. This may be a single one of the following strings, or a list of them to allow multiple source surfaces: application The stream contains all of the windows of the application chosen by the user rendered into the one video track. browser The stream contains the contents of a single browser tab selected by the ...
DocumentType - Web APIs
-baseline="middle">DocumentType</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, Node, and implements the ChildNode interface. DocumentType.entities Read only A NamedNodeMap of entities declared in the DTD. Every node in this map implements the Entity interface. ...
...perties Inherits properties from its parent, Node, and implements the ChildNode interface. DocumentType.entities Read only A NamedNodeMap of entities declared in the DTD. Every node in this map implements the Entity interface. DocumentType.internalSubset Read only A DOMString of the internal subset, or null if there is none. Eg "<!ELEMENT foo (bar)>". DocumentType.name Read only A DOMString, eg "html" for <!DOCTYPE HTML>. DocumentType.notations Read only A NamedNodeMap with notations declared in the DTD. Every node in this map implements the Notation interface. DocumentType.publicId Read only A DOMString, eg "-//W3C//DTD HTML 4.01//EN", empty string for HTML5. DocumentType.systemId Read only A DOMString, eg "http://www.w3.org/TR/html4/strict.dtd", empty string for HTML5. ...
Document Object Model (DOM) - Web APIs
s can also have event handlers attached to them. Once an event is triggered, the event handlers get executed. To learn more about what the DOM is and how it represents documents, see our article Introduction to the DOM. ...
...dlers attached to them. Once an event is triggered, the event handlers get executed. To learn more about what the DOM is and how it represents documents, see our article Introduction to the DOM. ...
EcdsaParams - Web APIs
An identifier for the digest algorithm to use. This should be one of the following: SHA-256: selects the SHA-256 algorithm. SHA-384: selects the SHA-384 algorithm. SHA-512: selects the SHA-512 algorithm. ...
...An identifier for the digest algorithm to use. This should be one of the following: SHA-256: selects the SHA-256 algorithm. SHA-384: selects the SHA-384 algorithm. SHA-512: selects the SHA-512 algorithm. ...
EventTarget - Web APIs
event type on the EventTarget. EventTarget.removeEventListener() Removes an event listener from the EventTarget. EventTarget.dispatchEvent() Dispatches an event to this EventTarget. Additional methods in Mozilla chrome codebase Mozilla includes a couple of extensions for use by JS-implemented event targets to implement onevent properties. See also WebIDL bindings. ...
...moves an event listener from the EventTarget. EventTarget.dispatchEvent() Dispatches an event to this EventTarget. Additional methods in Mozilla chrome codebase Mozilla includes a couple of extensions for use by JS-implemented event targets to implement onevent properties. See also WebIDL bindings. ...
FederatedCredential.protocol - Web APIs
openidconnect). Examples // TBD Specifications Specification Status Comments Credential Management Level 1The definition of 'protocol' in that specification. Working Draft Initial definition. ...
...openidconnect). Examples // TBD Specifications Specification Status Comments Credential Management Level 1The definition of 'protocol' in that specification. Working Draft Initial definition. ...
FetchEvent() - Web APIs
This is always fetch for Fetch events. init Optional An object conforming to the FetchEventInit dictionary, containing options to apply to the event object. Options are as follows: clientId Read only The Client that the current service worker is controlling. isReload Read only A Boolean that signifies whether the page was reloaded or not when the event was dispatched. true if yes, and false if not. ...
...ifies whether the page was reloaded or not when the event was dispatched. true if yes, and false if not. Typically, pressing the refresh button in a browser is a reload, while clicking a link and pressing the back button is not. If not present, it defaults to false. preloadResponse Read only A Promise which returns a previously-loaded response to the client. replacesClientId Read only A DOMString which identifies the client which is being replaced by resultingClientId. resultingClientId Read only A DOMString containing the new clientId if the client changes as a result of the page load. request Read only The Request object that would have triggered the event handler. Specifications Specification Status Comment Service WorkersThe definition of 'Fetc...
FileReaderSync.readAsDataURL() - Web APIs
Exceptions The following exceptions can be raised by this method: NotFoundError is raised when the resource represented by the DOM File or Blob cannot be found, e.g. because it has been erased. ...
... Exceptions The following exceptions can be raised by this method: NotFoundError is raised when the resource represented by the DOM File or Blob cannot be found, e.g. because it has been erased. ...
FileReaderSync - Web APIs
y available in workers as it enables synchronous I/O that could potentially block. Properties This interface does not have any properties. Methods FileReaderSync.readAsArrayBuffer() This method converts a specified Blob or a File into an ArrayBuffer representing the input data as a binary string. FileReaderSync.readAsBinaryString() This method converts a specified Blob or a File into a DOMString representing the input data as a binary string. This method is deprecated, consider using readAsArrayBuffer() instead. FileReaderSync.readAsText() This method converts a specified Blob or a File into a DOMString representing the input data as a text string. The optional encoding parameter indicates the encoding to be used (e.g., iso-8859-1 or UTF-8). If not present, the method will apply a dete...
... Specifications Specification Status Comment File APIThe definition of 'FileReaderSync' in that specification. Working Draft Initial definition. ...
HTMLBaseFontElement - Web APIs
egular HTMLElement interface it also has available to it by inheritance) for manipulating <basefont> elements. The <basefont> element has been deprecated in HTML4 and removed in HTML5. This latest specification requires that this element implements HTMLUnknownElement rather than HTMLBaseFontElement. Properties Inherits properties from its parent, HTMLElement. HTMLBaseFontElement.color Is a DOMString representing the text color using either a named color or a color specified in the hexadecimal #RRGGBB format. HTMLBaseFontElement.face Is a DOMString representing a list of one or more font names. The document text in the default style is rendered in the first font face that the client's browser supports. If no font listed is installed on the local system, the browser typically defaults to the...
...Numeric values range from 1 to 7 with 1 being the smallest and 3 the default. Relative value starts with a '+' or a '-'. Methods No specific method; inherits methods from its parent, HTMLElement. ...
HTMLCanvasElement.mozGetAsFile() - Web APIs
The default type is image/png. For other options, see our Image file type and format guide. ...
...The default type is image/png. For other options, see our Image file type and format guide. ...
HTMLCanvasElement.toDataURL() - Web APIs
resolution of 96 dpi. If the height or width of the canvas is 0 or larger than the maximum canvas size, the string "data:," is returned. If the requested type is not image/png, but the returned value starts with data:image/png, then the requested type is not supported. Chrome also supports the image/webp type. ...
... Exceptions SecurityError The canvas's bitmap is not origin clean; at least some of its contents have or may have been loaded from a site other than the one from which the document itself was loaded. ...
HTMLDataElement.value - Web APIs
Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLDataElement.value' in that specification. ...
... Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLDataElement.value' in that specification. ...
HTMLFieldSetElement - Web APIs
is implemented by the browser. HTMLFieldSetElement.formRead only An HTMLFormControlsCollection or HTMLCollection referencing the containing form element, if this element is in a form. If the field set is not a descendant of a form element, then the attribute can be the ID of any form element in the same document it is related to, or the null value if none matches. ...
..., then the attribute can be the ID of any form element in the same document it is related to, or the null value if none matches. HTMLFieldSetElement.name A DOMString reflecting the name HTML attribute, containing the name of the field set. This can be used when accessing the field set in JavaScript. It is not part of the data which is sent to the server. HTMLFieldSetElement.typeRead only The DOMString "fieldset". HTMLFieldSetElement.validationMessage A DOMString representing a localized message that describes the validation constraints that the element does not satisfy (if any). This is the empty string if the element is not a candidate for constraint validation (willValidate is false), or it satisfies its constraints. HTMLFieldSetElement.validity A ValidityState representing the validity ...
HTMLHRElement - Web APIs
fill="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="426" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLHRElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. ...
...ace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLHRElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLHRElement.align Is a DOMString, an enumerated attribute indicating alignment of the rule with respect to the surrounding context. HTMLHRElement.color Is a DOMString representing the name of the color of the rule. HTMLHRElement.noshade Is a Boolean that sets the rule to have no shading. HTMLHRElement.size Is a DOMString representing the height of the rule. HTMLHRElement.width Is a DOMString representing the width of the rule on the page. Methods No specific method; inherits methods from its parent, HTMLElement. Specifications Spec...
Option() - Web APIs
the value attribute of the equivalent <option>. If this is not specified, the value of text is used as the value, e.g. for the associated <select> element's value when the form is submitted to the server. ...
...the value attribute of the equivalent <option>. If this is not specified, the value of text is used as the value, e.g. for the associated <select> element's value when the form is submitted to the server. ...
HTMLOptionElement - Web APIs
g <select> element, if the option is a descendant of a <select> element, or null if none is found. HTMLOptionElement.index Read only Is a long representing the position of the option within the list of options it belongs to, in tree-order. If the option is not part of a list of options, like when it is part of the <datalist> element, the value is 0. HTMLOptionElement.label Read only Is a DOMString that reflects the value of the label HTML attribute, which provides a label for the option. If this attribute isn't specifically set, reading it returns the element's text content. HTMLOptionElement.selected Is a Boolean that indicates whether the option is currently selected. HTMLOptionElement.text Is a DOMString that contains the text content of the element. HTMLOptionElement.value Is a ...
... that reflects the value of the label HTML attribute, which provides a label for the option. If this attribute isn't specifically set, reading it returns the element's text content. HTMLOptionElement.selected Is a Boolean that indicates whether the option is currently selected. HTMLOptionElement.text Is a DOMString that contains the text content of the element. HTMLOptionElement.value Is a DOMString that reflects the value of the value HTML attribute, if it exists; otherwise reflects value of the Node.textContent property. Methods Inherits methods from its parent, HTMLElement. Option() Is a constructor creating an HTMLOptionElement object. It has four values: the text to display, text, the value associated, value, the value of defaultSelected, and the value of selected. The last three...
HTMLParamElement - Web APIs
l="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLParamElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. ...
...onaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLParamElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLParamElement.name Is a DOMString representing the name of the parameter. It reflects the name attribute. HTMLParamElement.value Is a DOMString representing the value associated to the parameter. It reflects the value attribute. HTMLParamElement.type Is a DOMString containing the type of the parameter when valueType has the "ref" value. It reflects the type attribute. HTMLParamElement.valueType Is a DOMString containing the type of the value. It reflects the valuetype attribute and has one of the values: "data", "ref", or "object...
HTMLSourceElement - Web APIs
#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLSourceElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLSourceElement.media Is a DOMString reflecting the media HTML attribute, containing the intended type of the media resource. HTMLSourceElement.sizes Is a DOMString representing image sizes between breakpoints HTMLSourceElement.src Is a DOMString reflecting the src HTML attribute, containing the URL for the media resource. The HTMLSourceElement.src property has a meaning only when the associated <source> element is nested in a...
...ociated <source> element is nested in a media element that is a <video> or an <audio> element. It has no meaning and is ignored when it is nested in a <picture> element. Note: If the src property is updated (along with any siblings), the parent HTMLMediaElement's load method should be called when done, since <source> elements are not re-scanned automatically. HTMLSourceElement.srcset Is a DOMString reflecting the srcset HTML attribute, containing a list of candidate images, separated by a comma (',', U+002C COMMA). A candidate image is a URL followed by a 'w' with the width of the images, or an 'x' followed by the pixel density. HTMLSourceElement.type Is a DOMString reflecting the type HTML attribute, containing the type of the media resource. Methods No specific method; inherits metho...
HTMLTrackElement - Web APIs
l="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLTrackElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. ...
...MLTrackElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLTrackElement.kind Is a DOMString that reflects the kind HTML attribute, indicating how the text track is meant to be used. Possible values are: subtitles, captions, descriptions, chapters, or metadata. HTMLTrackElement.src Is a DOMString that reflects the src HTML attribute, indicating the address of the text track data. HTMLTrackElement.srclang Is a DOMString that reflects the srclang HTML attribute, indicating the language of the text track data. HTMLTrackElement.label Is a DOMString that reflects the label HTML attribute, indicating a user-readable title for the track. HTMLTrackElement.default A Boolean reflecting the de...
HTMLVideoElement - Web APIs
idth="2px" /><text x="211" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLVideoElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its ancestor interfaces, HTMLMediaElement, and HTMLElement. HTMLVideoElement.height Is a DOMString that reflects the height HTML attribute, which specifies the height of the display area, in CSS pixels. HTMLVideoElement.poster Is a DOMString that reflects the poster HTML attribute, which specifies an image to show while no video data is available. HTMLVideoElement.videoHeight Read only Returns an unsigned integer value indicating the intrinsic height of the resource in CSS pixels, or 0 if...
...ideo data is available. HTMLVideoElement.videoHeight Read only Returns an unsigned integer value indicating the intrinsic height of the resource in CSS pixels, or 0 if no media is available yet. HTMLVideoElement.videoWidth Read only Returns an unsigned integer value indicating the intrinsic width of the resource in CSS pixels, or 0 if no media is available yet. HTMLVideoElement.width Is a DOMString that reflects the width HTML attribute, which specifies the width of the display area, in CSS pixels. Gecko-specific properties HTMLVideoElement.mozParsedFrames Read only Returns an unsigned long with the count of video frames that have been parsed from the media resource. HTMLVideoElement.mozDecodedFrames Read only Returns an unsigned long with the count of parsed video frames that h...
HmacImportParams - Web APIs
The can take a value of SHA-256, SHA-384, or SHA-512. Warning: Although you can technically pass SHA-1 here, this is strongly discouraged as it is considered vulnerable. ...
...The can take a value of SHA-256, SHA-384, or SHA-512. Warning: Although you can technically pass SHA-1 here, this is strongly discouraged as it is considered vulnerable. ...
HmacKeyGenParams - Web APIs
You can pass any of SHA-1, SHA-256, SHA-384, or SHA-512 here. length Optional A Number -- the length in bits of the key. ...
...You can pass any of SHA-1, SHA-256, SHA-384, or SHA-512 here. length Optional A Number -- the length in bits of the key. ...
IDBDatabase - Web APIs
Methods Inherits from: E...
... Methods Inherits from: EventTarget IDBDatabase.close() Returns immediately and closes the connection to a database in a separate thread. ...
IDBFactorySync - Web APIs
ginally intended for use only with Web Workers, and was eventually removed from the spec because its need was questionable. It may however be reintroduced in the future if there is enough demand from web developers. The IDBFactorySync interface of the IndexedDB API provide a synchronous means of accessing the capabilities of indexed databases. Method overview IDBDatabaseSync open (in DOMString name, in DOMString description, in optional boolean modifyDatabase) raises (IDBDatabaseException); Methods open() Opens and returns a connection to a database. Blocks the calling thread until the connection object is ready to return. If there is already a database with the specified name, it uses that one; otherwise, it creates the database using the specified name and description. IDBD...
...ription, in optional boolean modifyDatabase) raises (IDBDatabaseException); Methods open() Opens and returns a connection to a database. Blocks the calling thread until the connection object is ready to return. If there is already a database with the specified name, it uses that one; otherwise, it creates the database using the specified name and description. IDBDatabaseSync open ( in DOMString name, in DOMString description ) raises (IDBDatabaseException); Parameters name The name for the database. description The description for the database. Returns IDBDatabaseSync An object to access the open database. Exceptions This method can raise an IDBDatabaseException with the following codes: NON_TRANSIENT_ERR If the name parameter is not valid. A valid name is any str...
IDBIndexSync - Web APIs
unique readonly boolean If true, a key can have only one value within the index; if false, a key can have duplicate values. Methods add() ...
...ises (IDBDatabaseException); any put (in any value, in optional any key) raises (IDBDatabaseException); void remove (in any key) raises (IDBDatabaseException); Attributes Attribute Type Description keyPath readonly DOMString The key path of this index. If this attribute is null, this index is not auto-populated. name readonly DOMString The name of this index. storeName readonly DOMString This index's referenced object store. unique readonly boolean If true, a key can have only one value within the index; if false, a key can have duplicate values. Methods add() Stores the given value into this index, optionally with the specified key. If a record already exists with the given key, an exc...
IDBTransactionSync - Web APIs
ransactionSync interface of the IndexedDB API provides a synchronous transaction on a database. When an application creates an IDBTransactionSync object, it blocks until the browser is able to reserve the require database objects. Method overview void abort() raises (IDBDatabaseException); void commit() raises (IDBDatabaseException); IDBObjectStoreSync objectStore(in DOMString name) raises (IDBDatabaseException); Attributes Attribute Type Description db IDBDatabaseSync The database connection that this transaction is associated with. static boolean If true, this transaction is static; if false, this transaction is dynamic. Methods abort() Call this method to signal a need to cancel the effects of the ope...
...atabaseException with the following codes: NON_TRANSIENT_ERR If this transaction has already been committed or aborted. RECOVERABLE_ERR If this transaction's scope is dynamic, and the browser cannot commit all of the changes due to another transaction. objectStore() Returns an object store that has already been added to the scope of this transaction. IDBObjectStoreSync objectStore( in DOMString name ) raises (IDBDatabaseException); Parameters name The name of the requested object store. Returns IDBObjectStoreSync An object for accessing the requested object store. Exceptions The method can raise an IDBDatabaseException with the following code: NOT_FOUND_ERR If the requested object store is not in this transaction's scope. ...
LocalFileSystem - Web APIs
llback // And the last one is the error callback // for denial of access and other errors. window.requestFileSystem(window.PERSISTENT, 1024*1024,onInitFs,errorHandler); Method overview void requestFileSystem (in unsigned short type, in unsigned long long size, in FileSystemCallback successCallback, in optional ErrorCallback errorCallback); void resolveLocalFileSystemURL (in DOMString url, in EntryCallback successCallback, in optional ErrorCallback errorCallback); Constants Constant Value Description TEMPORARY 0 Transient storage that can be be removed by the browser at its discretion. PERSISTENT 1 Storage that stays in the browser unless the user or the app expunges it. The user must grant permission before the...
...h the following code: Exception Description SECURITY_ERROR The application does not have permission to access the file system interface. For example, you cannot run from file://. For more details, see the article on basic concepts. resolveLocalFileSystemURL() Lets you look up the entry for a file or directory with a local URL. void resolveLocalFileSystemURL( in DOMString url, in EntryCallback successCallback, in optional ErrorCallback errorCallback ); Parameters url The URL of a local file in the file system. successCallback The success callback that is called when the browser provides the file or directory for the supplied URL. errorCallback The error callback that is called when errors happen or when the request to obtain the entry object is denie...
LocalFileSystemSync - Web APIs
ne is the error callback // for denial of access and other errors. var fs = requestFileSystemSync(TEMPORARY, 1024*1024 /*1MB*/); Because you are using a synchronous API, you don't need success and error callbacks. Method overview FileSystemSync requestFileSystemSync (in unsigned short type, in long long size) raises FileException; EntrySync resolveLocalFileSystemSyncURL (in DOMString url) raises FileException; Constants Constant Value Description TEMPORARY 0 Transient storage that can be be removed by the browser at its discretion. PERSISTENT 1 Storage that stays in the browser unless the user or the app expunges it. Methods requestFileSystemSync() Requests a file system where data should be stored. Yo...
... Exception Description SECURITY_ERROR The application does not have permission to access the file system interface. For example, you cannot run from file://. For more details, see the article on basic concepts. resolveLocalFileSystemSyncURL() Allows the user to look up the Entry for a file or directory referred to by a local URL. void resolveLocalFileSystemURL( in DOMString url ); Parameter url The URL of a local file in the file system. Returns EntrySync An object that represents entries in the file system. Exceptions This method can raise a FileException with the following codes: Exception Description ENCODING_ERR The syntax of the URL was invalid. NOT_FOUND_ERR The URL was structurally correct, but refers to a re...
MediaDeviceInfo.deviceId - Web APIs
Specifications Specification Status Comment Media Capture and StreamsThe definition of 'deviceId' in that specification. Candidate Recommendation Initial definition. ...
... Specifications Specification Status Comment Media Capture and StreamsThe definition of 'deviceId' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. ...
MediaDeviceInfo.groupId - Web APIs
Specifications Specification Status Comment Media Capture and StreamsThe definition of 'groupId' in that specification. Candidate Recommendation Initial definition. Examples In this example, we assemble a list of the devices which are part of the same group as a given device. ...
... Specifications Specification Status Comment Media Capture and StreamsThe definition of 'groupId' in that specification. Candidate Recommendation Initial definition. Examples In this example, we assemble a list of the devices which are part of the same group as a given device. ...
MediaDeviceInfo.label - Web APIs
For security reasons, the label is always an empty string ("") if the user has not obtained permission to use at least one media device, either by starting a stream from the microphone or camera, or by persistent permissions being granted. ...
...For security reasons, the label is always an empty string ("") if the user has not obtained permission to use at least one media device, either by starting a stream from the microphone or camera, or by persistent permissions being granted. ...
MediaDeviceInfo - Web APIs
The MediaDeviceInfo interface contains information that describes a single media input or output device. The list of devices obtained by calling navigator.mediaDevices.enumerateDevices() is an array of MediaDeviceInfo objects, one per media device. Properties MediaDeviceInfo.deviceIdRead only Returns a DOMString that is an identifier for the represented device that is persisted across sessions. It is un-guessable by other applications and unique to the origin of the calling application. It is reset when the user clears cookies (for Private Browsing, a different identifier is used that is not persisted across sessions). MediaDeviceInfo.groupIdRead only Returns a DOMString that is a group identifier. Two devices have the same group identifier if they belong to the same physical device -- fo...
... For security reasons, the label field is always blank unless an active media stream exists or the user has granted persistent permission for media device access. The set of device labels could otherwise be used as part of a fingerprinting mechanism to identify a user. ...
MediaError.message - Web APIs
This is not simply a generic description of the MediaError.code property's value, but instead goes deeper into the specifics of this particular error and its circumstances. If no specific details are available, this string is empty. ...
...This is not simply a generic description of the MediaError.code property's value, but instead goes deeper into the specifics of this particular error and its circumstances. If no specific details are available, this string is empty. ...
MediaStreamTrack.kind - Web APIs
"video": the track is a video track. Specifications Specification Status Comment Media Capture and StreamsThe definition of 'MediaStreamTrack.kind' in that specification. ...
... "video": the track is a video track. Specifications Specification Status Comment Media Capture and StreamsThe definition of 'MediaStreamTrack.kind' in that specification. ...
MediaStreamTrack - Web APIs
t is disabled, that is not rendering the media source stream but silence and blackness. If the track has been disconnected, this value can be changed but has no more effect. Note: You can implement standard "mute" functionality by setting enabled to false. The muted property refers to a condition in which there's no media because of a technical issue. MediaStreamTrack.id Read only Returns a DOMString containing a unique identifier (GUID) for the track; it is generated by the browser. MediaStreamTrack.isolated Read only Returns a Boolean value which is true if the track is isolated; that is, the track cannot be accessed by the document that owns the MediaStreamTrack. This happens when the peerIdentity property is set, or if the track comes from a cross-origin source. MediaStreamTrack.kind ...
...dentifier (GUID) for the track; it is generated by the browser. MediaStreamTrack.isolated Read only Returns a Boolean value which is true if the track is isolated; that is, the track cannot be accessed by the document that owns the MediaStreamTrack. This happens when the peerIdentity property is set, or if the track comes from a cross-origin source. MediaStreamTrack.kind Read only Returns a DOMString set to "audio" if the track is an audio track and to "video", if it is a video track. It doesn't change if the track is deassociated from its source. MediaStreamTrack.label Read only Returns a DOMString containing a user agent-assigned label that identifies the track source, as in "internal microphone". The string may be left empty and is empty as long as no source has been connected. When the...
MediaTrackConstraints.cursor - Web APIs
The MediaTrackConstraints dictionary's cursor property is a ConstrainDOMString describing the requested or mandatory constraints placed upon the value of the cursor constrainable property, which is used to specify whether or not the cursor should be included in the captured video. If needed, you can determine whether or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.cursor as returned by a call to MediaDevices.getSupportedConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. ...
...ther or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.cursor as returned by a call to MediaDevices.getSupportedConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. Syntax var constraintsObject = { cursor: constraint }; constraintsObject.cursor = constraint; Value A ConstrainDOMString which specifies whether or not the mouse cursor should be rendered into the video track in the MediaStream returned by the call to getDisplayMedia(). See How constraints are defined in Capabilities, constraints, and settings for an explanation of how to define constraints. Usage notes You can check the setting selected by the user agent after the display media has been created by getDisplayMedi...
MediaTrackConstraints.deviceId - Web APIs
The MediaTrackConstraints dictionary's deviceId property is a ConstrainDOMString describing the requested or mandatory constraints placed upon the value of the deviceId constrainable property. If needed, you can determine whether or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.deviceId as returned by a call to MediaDevices.getSupportedConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. Because RTP doesn't include this information, tracks associated with a WebRTC RTCPeerConnection will never include this property. ...
...edConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. Because RTP doesn't include this information, tracks associated with a WebRTC RTCPeerConnection will never include this property. Syntax var constraintsObject = { deviceId: constraint }; constraintsObject.deviceId = constraint; Value An object based on ConstrainDOMString specifying one or more acceptable, ideal, and/or exact (mandatory) device IDs which are acceptable as the source of media content. Device IDs are unique for a given origin, and are guaranteed to be the same across browsing sessions on the same origin. However, the value of the deviceId is determined by the source of the track's content, and there's no particular format mandated by the specificat...
MediaTrackConstraints.displaySurface - Web APIs
This is used to specify the type or types of display surfaces which getDisplayMedia() will let the user select among for sharing purposes. If needed, you can determine whether or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.displaySurface as returned by a call to MediaDevices.getSupportedConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. ...
...int is supported by checking the value of MediaTrackSupportedConstraints.displaySurface as returned by a call to MediaDevices.getSupportedConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. Syntax var constraintsObject = { displaySurface: constraint }; constraintsObject.displaySurface = constraint; Value A ConstrainDOMString which specifies the type of display surface that's being captured. This value does not affect the list of display sources in the browser's user interface. See How constraints are defined in Capabilities, constraints, and settings for an explanation of how to define constraints. Usage notes You can check the setting selected by the user agent after the display media has been created by getDispl...
MediaTrackConstraints.facingMode - Web APIs
The MediaTrackConstraints dictionary's facingMode property is a ConstrainDOMString describing the requested or mandatory constraints placed upon the value of the facingMode constrainable property. If needed, you can determine whether or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.facingMode as returned by a call to MediaDevices.getSupportedConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. Because RTP doesn't include this information, tracks associated with a WebRTC RTCPeerConnection will never include this property. ...
...nstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. Because RTP doesn't include this information, tracks associated with a WebRTC RTCPeerConnection will never include this property. Syntax var constraintsObject = { facingMode: constraint }; constraintsObject.facingMode = constraint; Value An object based on ConstrainDOMString specifying one or more acceptable, ideal, and/or exact (mandatory) facing modes are acceptable for a video track. An exact value in this case indicates that the specified facing mode is specifically required; for example: var constraints = { facingMode: { exact: "user" } }; This indicates that only a user-facing camera is acceptable; if there is no user-facing camera, or the user declines pe...
MediaTrackSettings.deviceId - Web APIs
This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.deviceId property you provided when calling either getUserMedia(). If needed, you can determine whether or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.deviceId as returned by a call to MediaDevices.getSupportedConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. ...
...ortedConstraints.deviceId as returned by a call to MediaDevices.getSupportedConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. Because RTP doesn't include this information, tracks associated with a WebRTC RTCPeerConnection will never include this property. Syntax var deviceId = MediaTrackSettings.deviceId; Value A DOMString whose value is an origin-unique identifier for the track's source. This ID is valid across multiple browsing sessions for the same origin and is guaranteed to be different for all other origins, so you can safely use it to request the same source be used for multiple sessions, for example. The actual value of the string, however, is determined by the source of the track, and there is no guarante...
MediaTrackSettings.facingMode - Web APIs
This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.facingMode property you provided when calling either getUserMedia() or MediaStreamTrack.applyConstraints(). If needed, you can determine whether or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.facingMode as returned by a call to MediaDevices.getSupportedConstraints(). ...
...onstraints.facingMode as returned by a call to MediaDevices.getSupportedConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. Because RTP doesn't include this information, tracks associated with a WebRTC RTCPeerConnection will never include this property. Syntax var facingMode = MediaTrackSettings.facingMode; Value A DOMString whose value is one of the strings in VideoFacingModeEnum. VideoFacingModeEnum The following strings are permitted values for the facing mode. These may represent separate cameras, or they may represent directions in which an adjustable camera can be pointed. "user" The video source is facing toward the user; this includes, for example, the front-facing camera on a smartphone. "environment"...
MediaTrackSettings.groupId - Web APIs
This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.groupId property you provided when calling either getUserMedia(). If needed, you can determine whether or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.groupId as returned by a call to MediaDevices.getSupportedConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. ...
...upportedConstraints.groupId as returned by a call to MediaDevices.getSupportedConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. Because RTP doesn't include this information, tracks associated with a WebRTC RTCPeerConnection will never include this property. Syntax var groupId = MediaTrackSettings.groupId; Value A DOMString whose value is a browsing-session unique identifier for a group of devices which includes the source of the track's contents. Two devices share the same group ID if they belong to the same physical hardware device. For example, a headset has two devices on it: a microphone which can serve as a source for audio tracks and a speaker which can serve as an output for audio. The group ID is not usabl...
MouseEvent() - Web APIs
mouseEventInit Optional Is a MouseEventInit dictionary, having the following fields: "screenX", optional and defaulting to 0, of type long, that is the horizontal position of the mouse event on the user's screen; setting this value doesn't move the mouse pointer. "screenY", optional and defaulting to 0, of type long, that is the vertical position of the mouse event on the user's screen; setting this value doesn't move the mouse pointer. ...
... Secondary button pressed (usually the right button) 4 Auxiliary button pressed (usually the middle button) "relatedTarget", optional and defaulting to null, of type EventTarget, that is the element just left (in case of a mouseenter or mouseover) or is entering (in case of a mouseout or mouseleave). "region", optional and defaulting to null, of type DOMString, is the id of the hit region affected by the event. The absence of any hit region is affected, is represented by the null value. In some implementations, passing anything other than a number for the screen and client fields will throw a TypeError. The MouseEventInit dictionary also accepts fields from UIEventInit and from EventInit dictionaries. Specifications Specificatio...
Navigator - Web APIs
Web › API › Navigator
ned in NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorStorage, NavigatorStorageUtils, NavigatorConcurrentHardware, NavigatorPlugins, and NavigatorUserMedia. Standard NavigatorID.appCodeName Read only Returns the internal "code" name of the current browser. Do not rely on this property to return the correct value. NavigatorID.appName Read only Returns a DOMString with the official name of the browser. Do not rely on this property to return the correct value. NavigatorID.appVersion Read only Returns the version of the browser as a DOMString. Do not rely on this property to return the correct value. Navigator.battery Read only Returns a BatteryManager object you can use to get information about the battery charging status. Navigator.connection Read ...
...al processor cores available. NavigatorPlugins.javaEnabled Read only Returns a Boolean flag indicating whether the host browser is Java-enabled or not. Navigator.keyboard Read only Returns a Keyboard object which provides access to functions that retrieve keyboard layout maps and toggle capturing of key presses from the physical keyboard. NavigatorLanguage.language Read only Returns a DOMString representing the preferred language of the user, usually the language of the browser UI. The null value is returned when this is unknown. NavigatorLanguage.languages Read only Returns an array of DOMString representing the languages known to the user, by order of preference. Navigator.locks Read only Returns a LockManager object which provides methods for requesting a new Lock object and q...
PayerErrors - Web APIs
dictionary is used by the Payment Request API to indicate the presence of--and to explain how to correct--validation errors in the payer details. For each field in the payment information that fails validation, the PayerErrors object contains a string explaining the error. The payer details include the payer's name, phone number, and email address. ...
...rror. The payer details include the payer's name, phone number, and email address. Properties email Optional If present, this DOMString is a string describing the validation error from which the payer's email address--as given by PaymentResponse.payerEmail--currently suffers. If this property is absent from the PayerErrors object, the email address passed validation. name Optional If this DOMString is present in the object, the PaymentResponse.payerName property failed validation, and this string explains what needs to be corrected. If this property is absent, the paer name is fine phone Optional If present, this string is an error message explaining why the payer's phone number (PaymentResponse.payerPhone) failed validation. This property is absent if the phone number passed validation. ...
PaymentDetailsUpdate.error - Web APIs
This happens if both of the following are true: The PaymentRequest specifies using its requestShipping property that shipping information is required. The PaymentDetailsUpdate object specifies no valid shipping options in its shippingOptions list. ...
...This happens if both of the following are true: The PaymentRequest specifies using its requestShipping property that shipping information is required. The PaymentDetailsUpdate object specifies no valid shipping options in its shippingOptions list. ...
PerformanceObserver.observe() - Web APIs
The observe() method of the PerformanceObserver interface is used to specify the set of performance entry types to observe. The performance entry types are specified as an array of DOMString objects, each naming one entry type; the type names are documented in Performance entry type names in PerformanceEntry.entryType. When a matching performance entry is recorded, the performance observer's callback function--set when creating the PerformanceObserver--is invoked. ...
...ype names are documented in Performance entry type names in PerformanceEntry.entryType. When a matching performance entry is recorded, the performance observer's callback function--set when creating the PerformanceObserver--is invoked. Syntax observer.observe(options); Parameters options A PerformanceObserverInit dictionary with the following possible members: entryTypes: An array of DOMString objects, each specifying one performance entry type to observe. May not be used together with the "type" or "buffered" options. type: A single DOMString specifying exactly one performance entry type to observe. May not be used together with the entryTypes option. buffered: A Boolean flag to indicate whether buffered entries should be queued into the observer's buffer. Must be used only wit...
PerformanceServerTiming.toJSON - Web APIs
Syntax var json = PerformanceServerTiming.toJSON() Parameters None. Return value A DomString containing JSON. Exceptions None. ...
... The toJSON() method of the PerformanceServerTiming interface returns a DOMString that is the JSON representation of the PerformanceServerTiming object. Syntax var json = PerformanceServerTiming.toJSON() Parameters None. Return value A DomString containing JSON. Exceptions None. Specifications Specification Status Comment Server TimingThe definition of 'toJSON' in that specification. Working Draft Initial definition. ...
PerformanceServerTiming - Web APIs
server metrics that are sent with the response in the Server-Timing HTTP header. This interface is restricted to the same origin, but you can use the Timing-Allow-Origin header to specify the domains that are allowed to access the server metrics. Note that this interface is only available in secure contexts (HTTPS) in some browsers. ...
...ics. Note that this interface is only available in secure contexts (HTTPS) in some browsers. Properties PerformanceServerTiming.descriptionRead only A DOMString value of the server-specified metric description, or an empty string. PerformanceServerTiming.durationRead only A double that contains the server-specified metric duration, or value 0.0. PerformanceServerTiming.nameRead only A DOMString value of the server-specified metric name. Methods PerformanceServerTiming.toJSON() Returns a DOMString that is the JSON representation of the PerformanceServerTiming object. Example Given a server that sends the Server-Timing header, for example a node.js server like this: const http = require('http'); function requestHandler(request, response) { const headers = { 'Server-Timing...
PointerEvent.PointerEvent() - Web APIs
PointerEventInitOptional Is a PointerEventInit dictionary, having the following fields: pointerId -- optional and defaulting to 0, of type long, that sets the value of the instance's PointerEvent.pointerId. width -- optional and defaulting to 1, of type double, that sets the value of the instance's PointerEvent.width. ...
...ure. tiltX -- optional and defaulting to 0, of type long, that sets the value of the instance's PointerEvent.tiltX. tiltY -- optional and defaulting to 0, of type long, that sets the value of the instance's PointerEvent.tiltY. twist -- optional and defaulting to 0, of type long, that sets the value of the instance's PointerEvent.twist. pointerType -- optional and defaulting to "", of type DOMString, that sets the value of the instance's PointerEvent.pointerType. isPrimary -- optional and defaulting to false, of type Boolean, that sets the value of the instance's PointerEvent.isPrimary. Note: The PointerEventInit dictionary also accepts fields from the MouseEvent, UIEventInit and EventInit dictionaries. Example var moveEvent = new PointerEvent("pointermove"); var downEvent = ...
PublicKeyCredentialCreationOptions.user - Web APIs
It may be the full name of the user (e.g. "John Doe"). This is not intended to store the login of the user (see name below). ...
... URL as a USVString value which points to an image resource which can be the avatar image for the user. id A BufferSource uniquely identifying a given user. This an opaque identifier which can be used by the authenticator to link the user account with its corresponding credentials. This value will later be used when fetching the credentials in AuthenticatorAssertionResponse.userHandle. name A DOMString giving a human-readable name for the user's identifier (e.g. "jdoe@example.com").This property is intended for display and may be use to distinguish different account with the same displayName. Examples var publicKey = { challenge: new Uint8Array(26) /* this actually is given from the server */, rp: { name: "Example CORP", id : "login.example.com" }, user: { // To be chang...
PushManager.permissionState() - Web APIs
Possible values are 'prompt', 'denied', or 'granted'. Note: As of Firefox 44, the permissions for Notifications and Push have been merged. If permission is granted for notifications, push will also be enabled. Syntax PushManager.permissionState(options).then(function(PushMessagingState) { ... }); Parameters options Optional An object containing optional configuration parameters. ...
...bscription will only be used for messages whose effect is made visible to the user. applicationServerKey: A public key your push server will use to send messages to client apps via a push server. This value is part of a signing key pair generated by your application server and usable with elliptic curve digital signature (ECDSA) over the P-256 curve. Returns A Promise that resolves to a DOMString with a value of 'prompt', 'denied', or 'granted'. Specifications Specification Status Comment Push APIThe definition of 'permissionState()' in that specification. Working Draft Initial definition. ...
RTCDTMFToneChangeEvent.RTCDTMFToneChangeEvent() - Web APIs
See Tone characters for details on what characters are permitted. ...
...See Tone characters for details on what characters are permitted. ...
RTCIceCandidate.candidate - Web APIs
The candidate string specifies the network connectivity information for the candidate. ...
...The candidate string specifies the network connectivity information for the candidate. If the candidate is an empty string (""), the end of the candidate list has been reached; this candidate is known as the "end-of-candidates" marker. ...
RTCIceCandidate.sdpMid - Web APIs
The read-only property sdpMid on the RTCIceCandidate interface returns a DOMString specifying the media stream identification tag of the media component with which the candidate is associated. This ID uniquely identifies a given stream for the component with which the candidate is associated. This property can be configured by specifying the value of the sdpMid property when constructing the new candidate object using RTCIceCandidate(). If you call the constructor with an m-line string instead of an RTCIceCandidateInit object, the value of sdpMid is extracted from the specified candidate m-line string. ...
...e candidate is associated. This property can be configured by specifying the value of the sdpMid property when constructing the new candidate object using RTCIceCandidate(). If you call the constructor with an m-line string instead of an RTCIceCandidateInit object, the value of sdpMid is extracted from the specified candidate m-line string. Syntax var sdpMid = RTCIceCandidate.sdpMid; Value A DOMString which uniquely identifies the source media component from which the candidate draws data, or null if no such association exists for the candidate. Note: Attempting to add a candidate (using addIceCandidate()) that has a value of null for either sdpMid or sdpMLineIndex will throw a TypeError exception. Example ... Specifications Specification Status Comment WebRTC 1.
RTCIceTransport - Web APIs
rly useful if you need to access state information about the connection. Properties The RTCIceTransport interface inherits properties from its parent, EventTarget. It also offers the following properties: component Read only The ICE component being used by the transport. The value is one of the strings from the RTCIceTransport enumerated type: "RTP" or "RTSP". ...
...ent Read only The ICE component being used by the transport. The value is one of the strings from the RTCIceTransport enumerated type: "RTP" or "RTSP". gatheringState Read only A DOMString indicating which gathering state the ICE agent is currently in. The value is one of those included in the RTCIceGathererState enumerated type: "new", "gathering", or "complete". role Read only Returns a DOMString whose value is one of the members of the RTCIceRole enumerated type: "controlling" or "controlled"; this indicates whether the ICE agent is the one that makes the final decision as to the candidate pair to use or not. state Read only A DOMString indicating what the current state of the ICE agent is. The value of state can be used to determine whether the ICE agent has made an initial connectio...
RTCRtpCodecParameters - Web APIs
. Most of the fields in this property take values which are defined and maintained by the Internet Assigned Numbers Authority (IANA). References to relevant IANA documents are provided in the see also section at the end of this article. Properties payloadType Optional The RTP payload type used to identify this codec. mimeType Optional The codec's MIME media type and subtype specified as a DOMString of the form "type/subtype". IANA maintains a registry of valid MIME types. clockRate Optional An unsigned long integer value specifying the codec's clock rate in hertz (Hz). The clock rate is the rate at which the codec's RTP timestamp advances. Most codecs have specific values or ranges of values they permit; see the IANA payload format media type registry for details. channels Optional An u...
...e at which the codec's RTP timestamp advances. Most codecs have specific values or ranges of values they permit; see the IANA payload format media type registry for details. channels Optional An unsigned short integer indicating the number of channels the codec should support. For example, for audio codecs, a value of 1 specifies monaural sound while 2 indicates stereo. sdpFmtpLine Optional A DOMString containing the format-specific parameters field from the "a=fmtp" line in the codec's SDP, if one is present; see section 5.8 of the IETF specification for JSEP. Note: On an RTCRtpReceiver, the format-specific parameters come from the SDP sent by the remote peer, while for RTCRtpSender, they're provided by the local description. ...
RTCRtpStreamStats - Web APIs
reamStats until a specification update in the spring of 2017. Check the Browser compatibility table to know if and when the name change was implemented in specific browsers. Properties The RTCRtpStreamStats dictionary is based on RTCStats, and inherits its properties. In addition, some or all of the following properties are available. Standard fields included for all media types codecId A DOMString which uniquely identifies the object which was inspected to produce the RTCCodecStats object associated with this RTP stream. kind A DOMString whose value is "audio" if the associated MediaStreamTrack is audio-only or "video" if the track contains video. This value will match that of the media type indicated by RTCCodecStats.codec, as well as the track's kind property. Previously called mediaTy...
...ted MediaStreamTrack is audio-only or "video" if the track contains video. This value will match that of the media type indicated by RTCCodecStats.codec, as well as the track's kind property. Previously called mediaType. ssrc The 32-bit integer which identifies the source of the RTP packets this RTCRtpStreamStats object covers. This value is generated per the RFC 3550 specification. trackId A DOMString which uniquely identifies the RTCMediaStreamTrackStats object representing the associated MediaStreamTrack. This is not the same as the value of MediaStreamTrack.id. transportId A DOMString uniquely identifying the object which was inspected to produce the RTCTransportStats object associated with this RTP stream. Obsolete fields mediaType Renamed to kind in the specification in February ...
RTCSessionDescription.sdp - Web APIs
The property RTCSessionDescription.sdp is a read-only DOMString containing the SDP which describes the session. ...
... The property RTCSessionDescription.sdp is a read-only DOMString containing the SDP which describes the session. ...
RsaHashedKeyGenParams - Web APIs
This should be set to RSASSA-PKCS1-v1_5, RSA-PSS, or RSA-OAEP, depending on the algorithm you want to use. modulusLength A Number. ...
... on the algorithm you want to use. modulusLength A Number. The length in bits of the RSA modulus. This should be at least 2048: see for example see NIST SP 800-131A Rev. 1. Some organizations are now recommending that it should be 4096. publicExponent A Uint8Array. The public exponent. Unless you have a good reason to use something else, specify 65537 here ([0x01, 0x00, 0x01]). hash A DOMString representing the name of the digest function to use. You can pass any of SHA-256, SHA-384, or SHA-512 here. Warning: Although you can technically pass SHA-1 as a value here, this is strongly discouraged as SHA-1 is considered vulnerable. Examples See the examples for SubtleCrypto.generateKey(). Specifications Specification Status Comment Web Cryptography APITh...
SVGAElement - Web APIs
interface provides access to the properties of <a> element, as well as methods to manipulate them. Properties This interface also inherits properties from its parent, SVGGraphicsElement, and implements properties from SVGURIReference and HTMLHyperlinkElementUtils. SVGAElement.download See HTMLAnchorElement.download. SVGAElement.href See HTMLAnchorElement.href. SVGAElement.hreflang Is a DOMString that reflects the hreflang attribute, indicating the language of the linked resource. SVGAElement.ping Is a DOMString that reflects the ping attribute, containing a space-separated list of URLs to which, when the hyperlink is followed, POST requests with the body PING will be sent by the browser (in the background). Typically used for tracking. SVGAElement.referrerPolicy See HTMLAnchorElement...
...lowed, POST requests with the body PING will be sent by the browser (in the background). Typically used for tracking. SVGAElement.referrerPolicy See HTMLAnchorElement.referrerPolicy. SVGAElement.rel See HTMLAnchorElement.rel. SVGAElement.relList See HTMLAnchorElement.relList. SVGAElement.target Read only It corresponds to the target attribute of the given element. SVGAElement.text Is a DOMString being a synonym for the Node.textContent property. SVGAElement.type Is a DOMString that reflects the type attribute, indicating the MIME type of the linked resource. Methods This interface has no methods but inherits methods from its parent, SVGGraphicsElement. Example In the example below, the target attribute of the <a> element is set to _blank and when the link is clicked, it logs to no...
SVGLength - Web APIs
Web › API › SVGLength
sult in an exception being thrown. ...
... The value as a floating point value, in the units expressed by unitType. Setting this attribute will cause value and valueAsString to be updated automatically to reflect this setting. Exceptions on setting: a DOMException with code NO_MODIFICATION_ALLOWED_ERR is raised when the length corresponds to a read only attribute or when the object itself is read only. valueAsString DOMString The value as a string value, in the units expressed by unitType. Setting this attribute will cause value, valueInSpecifiedUnits, and unitType to be updated automatically to reflect this setting. Exceptions on setting: a DOMException with code SYNTAX_ERR is raised if the assigned string cannot be parsed as a valid <length>. a DOMException with code NO_MODIFICATION_ALLO...
SVGPathSeg - Web APIs
SVG path segment interface This is a base interface that corresponds to a single command within a path data specification. ...
...o" (t) path data command. Properties Name Type Description pathSegType unsigned short The type of the path segment as specified by one of the constants defined on this interface. pathSegTypeAsLetter DOMString The type of the path segment as specified by the corresponding one character command name. Methods The SVGPathSeg interface does not provide any specific methods. Browser compatibility Desktop Mobile Chrome Ed...
SVGScriptElement - Web APIs
Methods This interface doesn't implement any specific methods, but inherits...
... Methods This interface doesn't implement any specific methods, but inherits methods from its parent interface, SVGElement. ...
SVGStylable - Web APIs
SVG stylable interface The SVGStylable interface is implemented on all objects corresponding to SVG elements that can have style, class and presentation attributes specified on them. Interface overview Also implement None Methods CSSValue getPresentationAttribute(in DOMString name) Properties readonly SVGAnimatedString className readonly CSSStyleDeclaration style Normative document SVG 1.1 (2nd Edition) Properties Name Type Description className SVGAnimatedString Corresponds to attribute class on the given element. style CSSStyleDeclaration Corresponds to attribute style on the given element. Methods Name & Arguments Return ...
...rmative document SVG 1.1 (2nd Edition) Properties Name Type Description className SVGAnimatedString Corresponds to attribute class on the given element. style CSSStyleDeclaration Corresponds to attribute style on the given element. Methods Name & Arguments Return Description getPresentationAttribute(in DOMString name) CSSValue Returns the base (i.e., static) value of a given presentation attribute as an object of type CSSValue. The returned object is live; changes to the objects represent immediate changes to the objects to which the CSSValue is attached. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, pl...
SVGStyleElement - Web APIs
y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">SVGStyleElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties This interface also inherits properties from its parent interface, SVGElement and implements properties from LinkStyle. SVGStyleElement.type A DOMString corresponding to the type attribute of the given element. SVG 1.1 defined that a DOMException is raised with code NO_MODIFICATION_ALLOWED_ERR on an attempt to change the value of a read-only attribute. This restriction was removed in SVG 2. SVGStyleElement.media A DOMString corresponding to the media attribute of the given element. SVG 1.1 defined that a DOMException is raised with code NO_...
... SVG 1.1 defined that a DOMException is raised with code NO_MODIFICATION_ALLOWED_ERR on an attempt to change the value of a read-only attribute. This restriction was removed in SVG 2. ...
SecurityPolicyViolationEvent.sample - Web APIs
This will only be populated if the resource is an inline script, event handler, or style -- external resources causing a violation will not generate a sample. ...
...This will only be populated if the resource is an inline script, event handler, or style -- external resources causing a violation will not generate a sample. ...
SpeechGrammarList.addFromString() - Web APIs
weight Optional A float representing the weight of the grammar relative to other grammars present in the SpeechGrammarList. The weight means the importance of this grammar, or the likelihood that it will be recognised by the speech recognition service. ...
... weight Optional A float representing the weight of the grammar relative to other grammars present in the SpeechGrammarList. The weight means the importance of this grammar, or the likelihood that it will be recognised by the speech recognition service. ...
Storage.getItem() - Web APIs
Web › API › Storage › getItem
If the key does not exist, null is returned. Example The following function retrieves three data items from local storage, then uses them to set custom styles on a page. ...
...If the key does not exist, null is returned. Example The following function retrieves three data items from local storage, then uses them to set custom styles on a page. ...
Storage.setItem() - Web APIs
Web › API › Storage › setItem
Return value undefined. Exceptions setItem() may throw an exception if the storage is full. ...
... Return value undefined. Exceptions setItem() may throw an exception if the storage is full. ...
StyleSheet - Web APIs
An object implementing the StyleSheet interface represents a single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet interface. Properties StyleSheet.disabled Is a Boolean representing whether the current stylesheet has been applied or not. StyleSheet.href Read only Returns a DOMString representing the location of the stylesheet. ...
... stylesheet. StyleSheet.media Read only Returns a MediaList representing the intended destination medium for style information. StyleSheet.ownerNode Read only Returns a Node associating this style sheet with the current document. StyleSheet.parentStyleSheet Read only Returns a StyleSheet including this one, if any; returns null if there aren't any. StyleSheet.title Read only Returns a DOMString representing the advisory title of the current style sheet. StyleSheet.typeRead only Returns a DOMString representing the style sheet language for this style sheet. Specifications Specification Status Comment CSS Object Model (CSSOM)The definition of 'StyleSheet' in that specification. Working Draft No change from Document Object Model (DOM) Level 2 Style Speci...
TextDecoder - Web APIs
07, 240, 232, 226, 229, 242, 44, 32, 236, 232, 240, 33]); console.log(win1251decoder.decode(bytes)); // ??????, ???! Constructor TextDecoder() Returns a newly constructed TextDecoder that will generate a code point stream with the decoding method specified in parameters. Properties The TextDecoder interface doesn't inherit any properties. TextDecoder.prototype.encodingRead only Is a DOMString containing the name of the decoder, that is a string describing the method the TextDecoder will use. TextDecoder.prototype.fatalRead only Is a Boolean indicating whether the error mode is fatal. TextDecoder.prototype.ignoreBOMRead only Is a Boolean indicating whether the byte order marker is ignored. Methods The TextDecoder interface doesn't inherit any method. TextDecoder.prototype.d...
...e of the decoder, that is a string describing the method the TextDecoder will use. TextDecoder.prototype.fatalRead only Is a Boolean indicating whether the error mode is fatal. TextDecoder.prototype.ignoreBOMRead only Is a Boolean indicating whether the byte order marker is ignored. Methods The TextDecoder interface doesn't inherit any method. TextDecoder.prototype.decode() Returns a DOMString containing the text decoded with the method of the specific TextDecoder object. Specifications Specification Status Comment EncodingThe definition of 'TextDecoder' in that specification. Living Standard Initial definition. ...
TransitionEvent() - Web APIs
itionEvent, representing an event in relation with an transition. Syntax transitionEvent = new TransitionEvent(type, {propertyName: aPropertyName, elapsedTime : aFloat, pseudoElement: aPseudoElementName}); Arguments The TransitionEvent() constructor also inherits arguments from Event(). type Is a DOMString representing the name of the type of the TransitionEvent. It is case-sensitive and can only be: 'transitionend'. propertyName Optional Is a DOMString containing the value of the property-name CSS property associated with the transition. It defaults to "". elapsedTime Optional Is float giving the amount of time the animation has been running, in seconds, when this event fired, excluding any ...
...edTime Optional Is float giving the amount of time the animation has been running, in seconds, when this event fired, excluding any time the animation was paused. For an "animationstart" event, elapsedTime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedTime containing (-1 * delay). It defaults to 0.0. pseudoElement Optional Is a DOMString, starting with "::", containing the name of the pseudo-element the animation runs on. If the animation doesn't run on a pseudo-element but on the element, an empty string: "". It defaults to "". Specifications Specification Status Comment CSS TransitionsThe definition of 'TransitionEvent()' in that specification. Working Draft Initial definition. ...
TransitionEvent.initTransitionEvent() - Web APIs
method has been dropped during the standard process. It has been deprecated and is in the progress of been removed from most implementation. Do not use it anymore, use the standard constructor, TransitionEvent(), to create a synthetic TransitionEvent Syntax transitionEvent.initTransitionEvent(typeArg, canBubbleArg, cancelableArg, transitionNameArg, elapsedTimeArg); Parameters typeArg Is a DOMString identifying the specific type of transition event that occurred. The following value is allowed: Value Meaning transitionend The transition completed. canBubbleArg Is a Boolean flag indicating if the event can bubble (true) or not (false). cancelableArg Is a Boolean flag indicating if the event associated action can be avoided (true) or not (f...
...f transition event that occurred. The following value is allowed: Value Meaning transitionend The transition completed. canBubbleArg Is a Boolean flag indicating if the event can bubble (true) or not (false). cancelableArg Is a Boolean flag indicating if the event associated action can be avoided (true) or not (false). transitionNameArg Is a DOMString containing the name of the CSS property associated with the transition. This value is not affected by the transition-delay property. elapsedTimeArg Is float giving the amount of time the transition has been running, in seconds, when this event fired. Specifications This method is non-standard and not part of any specification, though it was present in early drafts of CSS Transitions. ...
TypeInfo - Web APIs
Web › API › TypeInfo
Methods TypeInfo.isDerivedFrom() Returns a Boolean. ...
... Methods TypeInfo.isDerivedFrom() Returns a Boolean. ...
VideoTrack - Web APIs
object is to toggle its selected property in order to make it the active video track for its <video> element. Properties selected A Boolean value which controls whether or not the video track is active. Only a single video track can be active at any given time, so setting this property to true for one track while another track is active will make that other track inactive. id Read only A DOMString which uniquely identifies the track within the media. This ID can be used to locate a specific track within a video track list by calling VideoTrackList.getTrackById(). The ID can also be used as the fragment part of the URL if the media supports seeking by media fragment per the Media Fragments URI specification. kind Read only A DOMString specifying the category into which the track falls. F...
...e a specific track within a video track list by calling VideoTrackList.getTrackById(). The ID can also be used as the fragment part of the URL if the media supports seeking by media fragment per the Media Fragments URI specification. kind Read only A DOMString specifying the category into which the track falls. For example, the main video track would have a kind of "main". label Read only A DOMString providing a human-readable label for the track. For example, a track whose kind is "sign" might have a label of "A sign-language interpretation". This string is empty if no label is provided. language Read only A DOMString specifying the video track's primary language, or an empty string if unknown. The language is specified as a BCP 47 (RFC 5646) language code, such as "en-US" or "pt-BR". so...
WEBGL_compressed_texture_astc.getSupportedProfiles() - Web APIs
Currently, this can be: "ldr": Low Dynamic Range. "hdr": High Dynamic Range. Dynamic range refers to ratio between the brightest and darkest parts of the scene. ...
...Currently, this can be: "ldr": Low Dynamic Range. "hdr": High Dynamic Range. Dynamic range refers to ratio between the brightest and darkest parts of the scene. ...
Web Video Text Tracks Format (WebVTT) - Web APIs
Cue. ...
... The new keyword can be used for defining a new VTTRegion object which can then be used for containing the multiple cues. ...
Worker() - Web APIs
Web › API › Worker › Worker
ccept data URIs, that's not the case in all other browsers. Syntax var myWorker = new Worker(aURL, options); Parameters aURL A USVString representing the URL of the script the worker will execute. It must obey the same-origin policy. options Optional An object containing option properties that can be set when creating the object instance. ...
...enting the URL of the script the worker will execute. It must obey the same-origin policy. options Optional An object containing option properties that can be set when creating the object instance. Available properties are as follows: type: A DOMString specifying the type of worker to create. The value can be classic or module. If not specified, the default used is classic. credentials: A DOMString specifying the type of credentials to use for the worker. The value can be omit, same-origin, or include. If not specified, or if type is classic, the default used is omit (no credentials required). name: A DOMString specifying an identifying name for the DedicatedWorkerGlobalScope representing the scope of the worker, which is mainly useful for debugging purposes. Exceptions A Securit...
XMLHttpRequest.response - Web APIs
Syntax var body = XMLHttpRequest.response; Value An appropriate object based on the value of responseType. You may attempt to request the data be provided in a specific format by setting the value of responseType after calling open() to initialize the request but before calling send() to send the request to the server. ...
... The response is a Blob object containing the binary data. document The response is an HTML Document or XML XMLDocument, as appropriate based on the MIME type of the received data. See HTML in XMLHttpRequest to learn more about using XHR to fetch HTML content. json The response is a JavaScript object created by parsing the contents of received data as JSON. text The response is a text in a DOMString object. ms-stream The response is part of a streaming download; this response type is only allowed for download requests, and is only supported by Internet Explorer. Example This example presents a function, load(), which loads and processes a page from the server. It works by creating an XMLHttpRequest object and creating a listener for readystatechange events such that that when ready...
XMLHttpRequest - Web APIs
ties This interface also inherits properties of XMLHttpRequestEventTarget and of EventTarget. XMLHttpRequest.onreadystatechange An EventHandler that is called whenever the readyState attribute changes. XMLHttpRequest.readyState Read only Returns an unsigned short, the state of the request. XMLHttpRequest.response Read only Returns an ArrayBuffer, Blob, Document, JavaScript object, or a DOMString, depending on the value of XMLHttpRequest.responseType, that contains the response entity body. XMLHttpRequest.responseText Read only Returns a DOMString that contains the response to the request as text, or null if the request was unsuccessful or has not yet been sent. XMLHttpRequest.responseType Is an enumerated value that defines the response type. XMLHttpRequest.responseURL Read only ...
...the URL is null. XMLHttpRequest.responseXML Read only Returns a Document containing the response to the request, or null if the request was unsuccessful, has not yet been sent, or cannot be parsed as XML or HTML. Not available in workers. XMLHttpRequest.status Read only Returns an unsigned short with the status of the response of the request. XMLHttpRequest.statusText Read only Returns a DOMString containing the response string returned by the HTTP server. Unlike XMLHttpRequest.status, this includes the entire text of the response message ("200 OK", for example). Note: According to the HTTP/2 specification (8.1.2.4 Response Pseudo-Header Fields), HTTP/2 does not define a way to carry the version or reason phrase that is included in an HTTP/1.1 status line. XMLHttpRequest.timeout I...
XRInputSource - Web APIs
ral-purpose gaming device. gripSpaceRead only An XRSpace whose origin tracks the pose which is used to render objects which should appear as if they're held in the hand indicated by handedness. The orientation of this space indicates the angle at which the hand is gripping the object. Read on in the main article on gripSpace for more details on how to use this space. ...
...ted by handedness. The orientation of this space indicates the angle at which the hand is gripping the object. Read on in the main article on gripSpace for more details on how to use this space. handednessRead only A DOMString that indicates which hand the device represented by this XRInputSource is being used in, if any. The value will be left, right, or none. profilesRead only An array of DOMString objects, each specifying the name of an input profile describing the preferred visual representation and behavior of this input source. targetRayModeRead only A DOMString indicating the methodology used to produce the target ray: gaze, tracked-pointer, or screen. targetRaySpaceRead only An XRSpace object defining the origin of the target ray and the direciton in which it extends. This s...
XRSession.environmentBlendMode - Web APIs
The XRSession interface's read-only environmentBlendMode property identifies if--and to what degree--the computer-generated imagery is overlaid atop the real world. This is used to differentiate between fully-immersive VR sessions and AR sessions which render over a pass-through image of the real world, possibly partially transparently. ...
... Permitted values are: opaque The rendered image is drawn without allowing any pass-through imagery. ...
Web APIs
Web › API
SValue CSSValueList CSSVariableReferenceValue Cache CacheStorage CanvasCaptureMediaStreamTrack CanvasGradient CanvasImageSource CanvasPattern CanvasRenderingContext2D CaretPosition ChannelMergerNode ChannelSplitterNode CharacterData ChildNode Client Clients Clipboard ClipboardEvent ClipboardItem CloseEvent Comment CompositionEvent ConstantSourceNode ConstrainBoolean ConstrainDOMString ConstrainDouble ConstrainULong ContentIndex ContentIndexEvent ConvolverNode CountQueuingStrategy CrashReportBody Credential CredentialsContainer Crypto CryptoKey CryptoKeyPair CustomElementRegistry CustomEvent D DOMConfiguration DOMError DOMException DOMHighResTimeStamp DOMImplementation DOMImplementationList DOMLocator DOMMatrix DOMMatrixReadOnly DOMObject DOMParser DOMPoi...
...olverNode CountQueuingStrategy CrashReportBody Credential CredentialsContainer Crypto CryptoKey CryptoKeyPair CustomElementRegistry CustomEvent D DOMConfiguration DOMError DOMException DOMHighResTimeStamp DOMImplementation DOMImplementationList DOMLocator DOMMatrix DOMMatrixReadOnly DOMObject DOMParser DOMPoint DOMPointInit DOMPointReadOnly DOMQuad DOMRect DOMRectReadOnly DOMString DOMStringList DOMStringMap DOMTimeStamp DOMTokenList DOMUserData DataTransfer DataTransferItem DataTransferItemList DedicatedWorkerGlobalScope DelayNode DeprecationReportBody DeviceLightEvent DeviceMotionEvent DeviceMotionEventAcceleration DeviceMotionEventRotationRate DeviceOrientationEvent DeviceProximityEvent DirectoryEntrySync DirectoryReaderSync DisplayMediaStreamConstraints Do...
<input type="email"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › email
properly-formatted e-mail address (or list of addresses) before the form can be submitted. The :valid and :invalid CSS pseudo-classes are automatically applied as appropriate to visually denote whether the current value of the field is a valid e-mail address or not. On browsers that don't support inputs of type email, a email input falls back to being a standard text input. ...
...More specifically, there are three possible value formats that will pass validation: An empty string ("") indicating that the user did not enter a value or that the value was removed. A single properly-formed e-mail address. ...
<input type="file"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › file
their device storage. Once chosen, the files can be uploaded to a server using form submission, or manipulated using JavaScript code and the File API. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Value A DOMString representing the path to the selected file. Events change and input Supported common attributes required Additional Attributes accept, capture, files, multiple IDL attributes files and value DOM interface HTMLInputElement Properties Properties that apply only to elements of type file Methods sele...
...If the user selected multiple files, the value represents the first file in the list of files they selected. The other files can be identified using the input's HTMLInputElement.files property. Note: If multiple files are selected, the string represents the first selected file. JavaScript can access the other files through the input's files pr...
<input type="hidden"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › hidden
is currently being ordered or edited, or a unique security token. Hidden inputs are completely invisible in the rendered page, and there is no way to make it visible in the page's content. Note: There is a live example below the following line of code -- if it is working correctly, you should see nothing! <input id="prodId" name="prodId" type="hidden" value="xm234jq"> Value A DOMString representing the value of the hidden data you want to pass back to the server. Events None. Supported Common Attributes autocomplete IDL attributes value Methods None. Note: The input and change events do not apply to this input type. Hidden inputs cannot be focused even using JavaScript (e.g. hiddenInput.focus()). Value The <input> eleme...
...e hidden data you want to pass back to the server. Events None. Supported Common Attributes autocomplete IDL attributes value Methods None. Note: The input and change events do not apply to this input type. Hidden inputs cannot be focused even using JavaScript (e.g. hiddenInput.focus()). Value The <input> element's value attribute holds a DOMString that contains the hidden data you want to include when the form is submitted to the server. This specifically can't be edited or seen by the user via the user interface, although you could edit the value via browser developer tools. Important: While the value isn't displayed to the user in the page's content, it is visible--and can be edited--using any browser's developer tools or "View Source"...
<input type="month"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › month
be automatic validation of the entered text to ensure it's formatted as expected. For those of you using a browser that doesn't support month, the screenshot below shows what it looks like in Chrome and Opera. Clicking the down arrow on the right hand side brings up a date picker that lets you select the month and year. ...
... a date picker that lets you select the month and year. The Microsoft Edge month control looks like this: Value A DOMString representing a month and year, or empty. Events change and input Supported common attributes autocomplete, list, readonly, and step. IDL attributes value Methods select(), stepDown(), stepUp(). Value A DOMString representing the value of the month and year entered into the input, in the form YYYY-MM (four or more digit year, then a hyphen ("-"), followed by the two-digit month). The format of the month string used by this input type is described in Format of a valid local month string in Date and time formats used in HTML. You can set a default value for the input control by including a month and year i...
<input type="password"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › password
ed the key they meant to press; this is helpful given the small size of keys and the ease with which the wrong one can be pressed, especially on virtual keyboards. Note: Any forms involving sensitive information like passwords (e.g. login forms) should be served over HTTPS; Many browsers now implement mechanisms to warn against insecure login forms; see Insecure passwords. ...
...If the user hasn't entered anything yet, this value is an empty string (""). If the required property is specified, then the password edit box must contain a value other than an empty string to be valid. If the pattern attribute is specified, the content of a password control is only considered vali...
<input type="range"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › range
ed unless the control's exact value isn't important. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. If the user's browser doesn't support type range, it will fall back and treat it as a text input. Value A DOMString containing the string representation of the selected numeric value; use valueAsNumber to get the value as a Number. Events change and input Supported common attributes autocomplete, list, max, min, and step IDL attributes list, value, and valueAsNumber Methods stepDown() and stepUp() Validation There is no pattern validation available; howev...
...ic validation are performed: If the value is set to something which can't be converted into a valid floating-point number, validation fails because the input is suffering from a bad input. The value won't be less than min. The default is 0. The value won't be greater than max. The default is 100. The value will be a multiple of step. The default is 1. Value The value attribute contains a DOMString which contains a string representation of the selected number. The value is never an empty string (""). The default value is halfway between the specified minimum and maximum--unless the maximum is actually less than the minimum, in which case the default is set to the value of the min attribute. The algorithm for determining the default value is: defaultValue = (rangeElem.max < rangeElem.min) ?
<input type="search"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › search
designed for the user to enter search queries into. These are functionally identical to text inputs, but may be styled differently by the user agent. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...You can retrieve this using the HTMLInputElement.value property in JavaScript. searchTerms = mySearch.value; If no validation constraints are in place for the input (see Validation for more details), the value can be any text string or an empty string (""). ...
<input type="tel"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › tel
quickly apparent of these is that mobile browsers -- especially on mobile phones -- may opt to present a custom keypad optimized for entering phone numbers. Using a specific input type for telephone numbers also makes adding custom validation and handling of phone numbers more convenient. Note: Browsers that don't support type tel fall back to being a standard text input. ...
... Additional attributes In addition to the attributes that operate on all <input> elements regardless of their type, telephone number inputs support the following attributes: Attribute Description list The id of the <datalist> element that contains the optional pre-defined autocomplete options ...
<input type="url"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › url
y validated to ensure that it's either empty or a properly-formatted URL before the form can be submitted. The :valid and :invalid CSS pseudo-classes are automatically applied as appropriate to visually denote whether the current value of the field is a valid URL or not. On browsers that don't support inputs of type url, a url input falls back to being a standard text input. Value A DOMString representing a URL, or empty Events change and input Supported Common Attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, required and size IDL attributes list, value, selectionEnd, selectionDirection Methods select(), setRangeText() and setSelectionRange(). Value The <input> element's value attribute contain...
...resenting a URL, or empty Events change and input Supported Common Attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, required and size IDL attributes list, value, selectionEnd, selectionDirection Methods select(), setRangeText() and setSelectionRange(). Value The <input> element's value attribute contains a DOMString which is automatically validated as conforming to URL syntax. More specifically, there are two possible value formats that will pass validation: An empty string ("") indicating that the user did not enter a value or that the value was removed. A single properly-formed absolute URL. This doesn't necessarily mean the URL address exists, but it is at least formatted correctly. In simple terms, t...
Navigator.mozNotification - Archive of obsolete content
) Provides support for creating notification objects, which are used to display desktop notification alerts to the user. Currently, these are only supported on Firefox Mobile and Firefox OS. See Displaying notifications for an example. The support for this property as been dropped in favor of the standard Notification constructor. Method overview notification createNotification(in DOMString title, in DOMString description, in DOMString iconURL Optional); Methods createNotification() Creates and returns a notification object that can be used to display the specified message with an optional URL. notification createNotification( in DOMString title, in DOMString description, in DOMString iconURLOptional ); Parameters title The notification title. description The...
MozAudioAvailable - Archive of obsolete content
s fired when the audio buffer is full and the corresponding raw samples are available. General info Specification DOM L3 Interface Event Bubbles No Cancelable No Target Element Default Action None. Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only boolean Does the event normally bubble? cancelable Read only boolean Is it possible to cancel the event? frameBuffer Read only FrameBuffer (array) The decoded audio sample data (i.e., floats). time Read only float Timestamp for these samples measured from the start in seconds. ...
MozBeforeResize - Archive of obsolete content
The MozBeforeResize event is executed before a browser window is resized. General info Specification Mozilla specific Interface Event Bubbles No Cancelable No Target window Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. ...
JXON - Archive of obsolete content
alue is false for verbosity levels from 0 to 2; true for verbosity level 3). JXON.unbuild syntax JXON.unbuild(objTree[, namespaceURI[, qualifiedNameStr[, documentType]]]) JXON.unbuild description Returns an XML Document based on the given JavaScript Object. JXON.unbuild parameters objTree The JavaScript Object from which you want to create your XML Document. namespaceURI Optional Is a DOMString containing the namespace URI of the document to be created, or null if the document doesn't belong to one. qualifiedNameStr Optional Is a DOMString containing the qualified name, that is an optional prefix and colon plus the local root element name, of the document to be created. documentType Optional Is the DocumentType of the document to be created. It defaults to null. Extend the native ...
CheckboxStateChange - Archive of obsolete content
<checkbox> element has changed. This event is used mainly for an accessibility purpose. General info Specification XUL Interface Event Bubbles Yes Cancelable Yes Target element Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only boolean Does the event normally bubble? cancelable Read only boolean Is it possible to cancel the event? Related events ValueChange RadioStateChange ...
DOMMenuItemActive - Archive of obsolete content
mActive event is executed when a <menu> or a <menuitem> has been hovered or highlighted. General info Specification XUL Interface Event Bubbles Yes Cancelable Yes Target element Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. ...
DOMMenuItemInactive - Archive of obsolete content
ive event is executed when a <menu> or a <menuitem> in no longer hovered or highlighted. General info Specification XUL Interface Event Bubbles Yes Cancelable Yes Target element Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. ...
RadioStateChange - Archive of obsolete content
a <radio> element has changed. This event is used mainly for an accessibility purpose. General info Specification XUL Interface Event Bubbles Yes Cancelable Yes Target element Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only boolean Does the event normally bubble? cancelable Read only boolean Is it possible to cancel the event? Related events CheckboxStateChange ValueChange ...
ValueChange - Archive of obsolete content
ress> for example, has changed. This event is used mainly for an accessibility purpose. General info Specification XUL Interface Event Bubbles Yes Cancelable Yes Target element Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only boolean Does the event normally bubble? cancelable Read only boolean Is it possible to cancel the event? Related events CheckboxStateChange RadioStateChange ...
broadcast - Archive of obsolete content
dcaster) being listened to are changed. The event handler should be placed on an observer. General info Specification XUL Interface Event Bubbles No Cancelable No Target element Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. ...
close - Archive of obsolete content
unload event should be used to capture all attempts to unload the window. General info Specification XUL Interface Event Bubbles No Cancelable No Target window Default Action The window is closed. Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. Example window.addEventListener("close", function( event ) { // make the close button ineffective event.preventDefault(); }, false); ...
command - Archive of obsolete content
Archive › Mozilla › XUL › Events › command
stead of the click event because it will be called in all of the needed cases. General info Specification XUL Interface XULCommandEvent Bubbles Yes Cancelable Yes Target element Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not cancelable Read only Boolean Whether the event is cancellable or not? view Read only WindowProxy document.defaultView (window of the document) detail Read only long (float) Unused; always zero. sourceEvent Read only Event The act...
commandupdate - Archive of obsolete content
n a <commandset>. This event would be used to update the disabled status of its commands. General info Specification XUL Interface Event Bubbles No Cancelable No Target element Default Action None. Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. ...
popuphidden - Archive of obsolete content
idden event is executed when a <menupopup>, <panel> or <tooltip> has become hidden. General info Specification XUL Interface PopupEvent Bubbles Yes Cancelable Yes Target element Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. ...
popuphiding - Archive of obsolete content
g event is executed when a <menupopup>, <panel> or <tooltip> is about to be hidden. General info Specification XUL Interface PopupEvent Bubbles Yes Cancelable Yes Target element Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. ...
popupshowing - Archive of obsolete content
ction of the event can be prevented to prevent the popup to appear. General info Specification XUL Interface PopupEvent Bubbles Yes Cancelable Yes Target element Default Action A popup is displayed Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. ...
popupshown - Archive of obsolete content
hown event is executed when a <menupopup>, <panel> or <tooltip> has become visible. General info Specification XUL Interface PopupEvent Bubbles Yes Cancelable Yes Target element Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. ...
XForms Custom Controls - Archive of obsolete content
controls need to implement additional interfaces. Such elements include upload and case. nsIXFormsAccessors The nsIXFormsAccessors interface allows access to the value and the state of the instance node that the control is bound to (see extensions/xforms/nsIXFormsAccessors.idl). Currently interface is: interface nsIXFormsAccessors : nsISupports { /** * Return value of instance node. */ DOMString getValue(); /** * Set value of instance node. */ void setValue(in DOMString value); /** * Return true if the instance node is readonly as determined by the MDG. */ boolean isReadonly(); /** * Return true if the instance node is relevant as determined by the MDG. */ boolean isRelevant(); /** * Return true if the instance node is required as determined by the ...
Using data attributes - Learn web development
doesn't have any visual representation. Just use data attributes for that: <article id="electric-cars" data-columns="3" data-index-number="12314" data-parent="cars"> ... </article> JavaScript access Reading the values of these attributes out in JavaScript is also very simple. You could use getAttribute() with their full HTML name to read them, but the standard defines a simpler way: a DOMStringMap you can read out via a dataset property. To get a data attribute through the dataset object, get the property by the part of the attribute name after data- (note that dashes are converted to camelCase). const article = document.querySelector('#electric-cars'); article.dataset.columns // "3" article.dataset.indexNumber // "12314" article.dataset.parent // "cars" Each property is a string an...
Creating JavaScript callbacks in components
bserverService. JavaScript functions as callbacks Another common use of the pattern is found in addEventListener / removeEventListener. A nice feature of addEventListener is that you can pass a JavaScript function in place of the callback listener interface. ...
Error codes returned by Mozilla APIs
s error occurs when an attempt is made to read from a non blocking stream yet there is not enough data available to read without waiting for more. Document and Node Errors The following errors can occur when using documents, nodes and elements. NS_ERROR_DOM_INDEX_SIZE_ERR (0x80530001) An attempt was made to adjust the value of a text node using an index that was out of range. NS_ERROR_DOM_DOMSTRING_SIZE_ERR (0x80530002) An attempt was made to create a string larger than is supported. NS_ERROR_DOM_HIERARCHY_REQUEST_ERR (0x80530003) A node was inserted into a location where it cannot go. For instance, a node cannot be inserted into a descendant of itself. NS_ERROR_DOM_WRONG_DOCUMENT_ERR (0x80530004) An operation was performed on a document involving a node that was created in a different...
mozbrowseractivitydone
Firefox OS 2.5. postResult and postError calls made on such an activity will be ignored and have no effect. General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: success A Boolean that indicates whet...
mozbrowserasyncscroll
future. The mozbrowserasyncscroll event is fired when the content of a browser <iframe> is scrolled. General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: top The scroll top position in CSS pi...
mozbrowseraudioplaybackchange
e mozbrowseraudioplaybackchange event is fired when audio starts or stops playing within a browser <iframe>. General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Boolean Indicates whether audio is playing in the browser. Examples var browser = document.querySelector("iframe"); browser.addEventListener("mozbrowseraudioplayba...
mozbrowserclose
when the content of a browser <iframe> calls the window.close() method. General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. Example var browser = document.querySelector("iframe"); browser.addEventListener("mozbrowserclose", function() { console.log("Browser window has been closed; IFrame will be destroyed."); }); Rel...
mozbrowserdocumentfirstpaint
s fired when a new paint occurs on any document in the browser <iframe>. General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. Example var browser = document.querySelector("iframe"); browser.addEventListener("mozbrowserdocumentfirstpaint", function() { console.log("First content painted."); }); Related Events mozbrow...
mozbrowserfirstpaint
he first time (this doesn't include the initial paint from about:blank). General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. Example var browser = document.querySelector("iframe"); browser.addEventListener("mozbrowserfirstpaint", function(event) { console.log("First content painted."); }); Related Events mozbrowser...
mozbrowserloadstart
tor, or update the UI in some other way to indicate loading has started. General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. Example In this example the mozbrowserloadend and mozbrowserloadstart events are used to change the icon shown on the stop/reload button between stop (x) and reload (R), as appropriate. var browser...
mozbrowsermanifestchange
s. By this, we are referring to the href of the manifest, as defined in <link rel="manifest" href=" ... ">. General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: href The URL of the new app manifest.
mozbrowseropentab
as a result of the user issuing a command to open a link target in a new tab (for example ctrl/cmd + click.) General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: url A DOMString representing the URL ...
mozbrowserresize
future. The mozbrowserresize event is fired when a browser <iframe> viewport is resized in some way. General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: width A number representing the new w...
mozbrowserscroll
change in the future. The mozbrowserscroll event is fired when the browser <iframe> content scrolls. General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: top A number representing the new ver...
mozbrowserscrollareachanged
owser <iframe> changes. This can occur on resize and when the page size changes (while loading for example.) General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: width A number representing the new s...
mozbrowserselectionstatechanged
s. Note that this is deprecated, and current implementations should use mozbrowsercaretstatechanged instead. General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: rect An object that represents the bo...
mozbrowsertitlechange
nge event is fired when the title of a browser <iframe> (i.e. the contents of the <title> element) changes. General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. detail Read only String The title of the document. Example var browser = document.querySelector("iframe"); browser.addEventListener("mozbrowsertitlechange", function( event ) { co...
mozbrowservisibilitychange
visibility state of the current browser iframe <iframe> changes, for example due to a call to setVisible(). General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: visible A Boolean that indicates whet...
MozScrolledAreaChanged
es change. Specification Mozilla specific Interface UIEvent Bubbles Yes Cancelable Yes Target DefaultView, Document Default Action None Properties Property Type Description targetRead only EventTarget The event target (the topmost target in the DOM tree). typeRead only DOMString The type of event. bubblesRead only Boolean Whether the event normally bubbles or not. cancelableRead only Boolean Whether the event is cancellable or not. viewRead only WindowProxy document.defaultView (window of the document) detailRead only long (float) 0. widthRead only long (int) The width of the visible regio...
smartcard-insert
bubblesRead only Boolean Whether the event normally bubbles or not. cancelableRead only Boolean Whether the event is cancellable or not. Example document.addEventListener("smartcard-insert", smartcardChangeHandler ); Related Events smartcard-remove ...
smartcard-remove
mart card has been detected. Specification Mozilla specific Interface Event Bubbles No Cancelable No Target document Default Action None Properties Property Type Description targetRead only EventTarget The event target (the topmost target in the DOM tree). typeRead only DOMString The type of event. bubblesRead only Boolean Whether the event normally bubbles or not. cancelableRead only Boolean Whether the event is cancellable or not. Example document.addEventListener("smartcard-remove", smartcardChangeHandler ); Related Events smartcard-insert ...
Mozilla internal string guide
boundaries. wstring char16_t* Raw character pointer to UTF-16 string, no string classes used. AString nsAString UTF-16 string. ACString nsACString 8-bit string. All bits are preserved across XPConnect boundaries. AUTF8String nsACString UTF-8 string. Converted to UTF-16 as necessary when value is used across XPConnect boundaries. DOMString nsAString UTF-16 string type used in the DOM. The same as AString with a few odd XPConnect exceptions: When the special JavaScript value null is passed to a DOMString parameter of an XPCOM method, it becomes a void DOMString. The special JavaScript value undefined becomes the string "undefined". C++ Signatures In IDL, in parameters are read-only, and the C++ signatures for *String p...
nsAString
n removes a section of the string's internal buffer. Operators operator= This operator is a shortcut for the Assign family of functions. operator+= This operator is a shortcut for the Append family of functions. Remarks The nsAString class is never instantiated directly. It should be instantiated using a subclass, such as nsEmbedString . nsAString corresponds to the AString and DOMString XPIDL data types. nsAString by itself does not imply a particular character encoding. That is, it may be used to store UTF-16 characters, UCS-2 characters, or any random double-byte data. The character encoding in use for a particular nsAString instance depends on the context in which it is used. If used with XPIDL, then the character encodings of the corresponding XPIDL data types applies. nsASt...
GetKeyBindings
Return Values Returns array of localized string of global keyboard accelerator. ...
nsIAccessibleTextChangeEvent
accessible/public/nsIAccessibleEvent.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview boolean isInserted(); Attributes Attribute Type Description length unsigned long Returns length of changed text. Read only. modifiedText DOMString The inserted or removed text. Read only. start long Returns offset of changed text in accessible. Read only. Methods isInserted() boolean isInserted(); Parameters None. Return value true if text was inserted, otherwise false. ...
nsIContentFrameMessageManager
face. It enables these scripts to receive messages from the chrome process and send messages back to the chrome process. Frame scripts can send either synchronous or asynchronous messages to the chrome process: for details on these messaging APIs see the documentation for the nsIContentFrameMessageManager's parent classes nsISyncMessageSender and nsIMessageSender. Methods void dump(in DOMString aStr); DOMString atob(in DOMString aAsciiString); DOMString btoa(in DOMString aBase64Data); dump() Prints the specified string to standard output. Parameters Name Type Description aStr String The message to log. atob() Convert ASCII base64 data to binary data. Parameters Name Type Description aAsci...
nsIDOMGeoPositionError
ion operations. dom/interfaces/geolocation/nsIDOMGeoPositionError.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Inherits from: nsISupports Attributes Attribute Type Description code short Numerical error code; see Error constants for a complete list. Read only. message DOMString Human readable error message. Read only. Gecko 1.9.2 note The message attribute was removed in Gecko 1.9.2 (Firefox 3.6). Error constants Constant Value Description PERMISSION_DENIED 1 The user denied permission to retrieve location data. POSITION_UNAVAILABLE 2 Unable to access location data. TIMEOUT 3 A timeout occurred...
nsIDOMMozNetworkStats
ace of the network stats object. Inherits from: nsISupports Last changed in Gecko 1.0 Implemented by: @mozilla.org/networkStats;1. To create an instance, use: var networkStatsManager = Components.classes["@mozilla.org/networkStats;1"] .createInstance(Components.interfaces.nsIDOMNetworkStats); Attributes Attribute Type Description connectionType DOMString Connection type of the stats. Read only. data nsIDOMMozNetworkStatsData array Stats samples. Read only. start Date Start date of the stats samples. Read only. end Date End date of the stats samples. Read only. ...
nsIDOMStorageItem
ype Description secure boolean If true, the item was stored for an HTTPS page. Note: All items, regardless of whether they were stored for an HTTP page or an HTTPS page, are visible from HTTPS pages. However, HTTP pages can only see items stored from HTTP pages, and will not see items stored from HTTPS pages. As such, this attribute is irrelevant for storage that is bound to an origin. value DOMString The value associated with the item. See also DOM Storage Structured client-side storage (HTML 5 specification) nsIDOMStorage nsIDOMStorage2 ...
nsIDOMStorageList
dom/interfaces/storage/nsIDOMStorageList.idlScriptable This interface is used to access the contextual storage areas used by globalStorage by domain. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview nsIDOMStorage namedItem(in DOMString domain); Methods namedItem() Called when the list of available access points changes. nsIDOMStorage namedItem( in DOMString domain ); Parameters domain The name of the domain for whom to return the storage object. Return value The nsIDOMStorage object representing the data store for the specified domain.See also DOM Storage Structured client-side storage (HTML 5 specification) nsIDOMWindow ...
nsIDOMXPathResult
esult; can be any of the Type constants except ANY_TYPE. Read only. singleNodeValue nsIDOMNode If resultType is ANY_UNORDERED_NODE_TYPE or FIRST_ORDERED_NODE_TYPE, a single DOM Node. Read only. snapshotLength unsigned long If resultType is UNORDERED_NODE_SNAPSHOT_TYPE or ORDERED_NODE_SNAPSHOT_TYPE, the length of the snapshort array. Read only. stringValue DOMString If resultType is STRING_TYPE, the boolean value. Read only. Constants Type constants Constant Value Description ANY_TYPE 0 Used when evaluating an XPath expression; the evaluator will return the most appropriate type. NUMBER_TYPE 1 Type is a single number. STRING_TYPE 2 Type is a single string. BOOLEAN_TYPE 3 Type...
nsIDroppedLinkItem
dom/base/nsIDroppedLinkHandler.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Attributes Attribute Type Description url DOMString URL of the dropped link. name DOMString Name of the dropped link. type DOMString MIME-Type of the dropped link. See also nsIDroppedLinkHandler ...
nsIEditor
0 / SeaMonkey 2.15) Method overview [noscript] void init(in nsIDOMDocument doc, in nsIContent aRoot, in nsISelectionController aSelCon, in unsigned long aFlags); void setAttributeOrEquivalent(in nsIDOMElement element, in AString sourceAttrName, in AString sourceAttrValue, in boolean aSuppressTransaction); void removeAttributeOrEquivalent(in nsIDOMElement element, in DOMString sourceAttrName, in boolean aSuppressTransaction); void postCreate(); void preDestroy(in boolean aDestroyingFrames); Selected Content Removal void deleteSelection(in short action, in short stripWrappers); Document Info and File Methods void resetModificationCount(); long getModificationCount(); void incrementModificationCount...
nsIPushMessage
dom/interfaces/push/nsIPushNotifier.idlScriptable A push message sent to a system subscription. Inherits from: nsISupports Last changed in Gecko 46.0 (Firefox 46.0 / Thunderbird 46.0 / SeaMonkey 2.43) nsIPushMessage is the subject of a push-message observer notification. This interface resembles PushMessageData from the Push API. Method overview DOMString text(); jsval json(); void binary([optional] out uint32_t dataLen, [array, retval, size_is(dataLen)] out uint8_t data); Methods text() Extracts the message data as a UTF-8 text string. DOMString text(); Parameters None. json() Parses the message data as JSON. jsval json(); Parameters None. binary() Extracts the message data as a byte array. void binary( [optional] out uint32_t d...
nsITaskbarPreview
the size and contents of the preview, which buttons are displayed, and how the application responds to user actions on the preview. The controller is not allowed to be null. Note: Neither nsITaskbarTabPreview or nsITaskbarWindowPreview makes full use of the controller; see the documentation for each interface for details on which controller methods are used. tooltip DOMString A string containing the text displayed in the tooltip above the preview when the user hovers over it. By default, this is an empty string. visible boolean Indicates whether or not the preview is visible; by default, this is false. Note: Changing this value is computationally expensive for tab previews, because doing so causes the proxy window to ...
nsITaskbarPreviewButton
indicates whether or not the button should be displayed at all. dismissOnClick boolean If true, the array of previews should be dismissed when the button is clicked. This is false by default. hasBorder boolean If true, the taskbar should draw a border around this button's image. This is true by default. image imgIContainer The icon displayed in the button. This is null by default. tooltip DOMString The string displayed in the button's tooltip. By default, this is an empty string. visible boolean If true, the button is displayed. If false, the button doesn't participate in the layout of buttons underneath the preview. This is false by default. See also nsITaskbarPreview nsITaskbarPreviewController nsITaskbarTabPreview nsITaskbarWindowPreview nsIWinTaskbar ...
nsITaskbarTabPreview
verview void EnsureRegistration(); Violates the XPCOM interface guidelines nativeWindow GetHWND(); Violates the XPCOM interface guidelines void move(in nsITaskbarTabPreview aNext); Attributes Attribute Type Description icon imgIContainer The icon displayed next to the title in the preview. This is null by default. title DOMString The title displayed above the thumbnail. By default, this is an empty string. Methods Violates the XPCOM interface guidelines EnsureRegistration() Used internally to ensure that the taskbar knows about this preview. If a preview is not registered, the API call to set its sibling (via the move() method) will fail silently. This method is only invoked when it's safe to make taskb...
nsIWorkerFactory
n't need to use it anymore to create workers from chrome. Instead, you can just do new Worker or new ChromeWorker. Implemented by: threads/workerfactory;1. To create an instance, use: var workerFactory = Components.classes['@mozilla.org/threads/workerfactory;1'] .createInstance(Components.interfaces.nsIWorkerFactory); Method overview nsIWorker newChromeWorker(in DOMString aScriptURL); Methods newChromeWorker() Returns a new ChromeWorker that will run a specified script. nsIWorker newChromeWorker( in DOMString aScriptURL ); Parameters aScriptURL The URL of the script to load into the new worker. Return value An nsIWorker object representing the new ChromeWorker. See also Using web workers Worker SharedWorker ...
nsIWorkerMessagePort
dom/interfaces/threads/nsIDOMWorkers.idlScriptable This interface represents a worker thread's message port, which is used to allow the worker to post messages back to its creator. 1.0 66 Introduced Gecko 1.9.1 Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Method overview void postMessage(in DOMString aMessage); Methods postMessage() Posts a message into the event queue. void postMessage( in DOMString aMessage ); Parameters aMessage The message to post. See also Using web workers nsIWorkerMessageEvent nsIWorkerGlobalScope nsIWorkerScope nsIAbstractWorker nsIWorker ...
nsIXFormsModelElement
extensions/xforms/nsIXFormsModelElement.idlScriptable Defines scriptable methods for manipulating instance data and updating computed and displayed values. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 1.9.1 Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview nsIDOMDocument getInstanceDocument(in DOMString instanceID); void rebuild(); void recalculate(); void refresh(); void revalidate(); Methods getInstanceDocument() nsIDOMDocument getInstanceDocument( in DOMString instanceID ); Parameters instanceID The ID of the instance element to be returned. Return value An nsIDOMDocument. Exceptions thrown DOMException If there is no matching instance data. rebuild() Signals the XForms Proc...
AddressErrors.addressLine - Web APIs
ddress finds one or more errors in the array of strings in the address's addressLine. The returned string explains the error and should offer suggestions for how to correct it. Syntax var addressLineError = AddressErrors.addressLine; Value If an error occurred during validation of the address due to one of the strings in the addressLine array having an invalid value, this property is set to a DOMString providing a human-readable error message explaining the validation error. The text should also include, when possible, advice about how to go about correcting the error. If the PaymentAddress object's addressLine property was determined to be valid, this property is not included in the AddressErrors dictionary. Specifications Specification Status Comment Payment Reques...
AddressErrors.city - Web APIs
based on AddressErrors includes a city property when validation of the address fails for the value given for the address's city property. The returned string explains the error and should offer suggestions for how to correct it. Syntax var cityError = AddressErrors.city; Value If the value specified in the PaymentAddress object's city property could not be validated, this property contains a DOMString offering a human-readable explanation of the validation error and offers suggestions for correcting it. If the city value was validated successfully, this property is not included in the AddressErrors object. Specifications Specification Status Comment Payment Request APIThe definition of 'AddressErrors.city' in that specification. Candidate Recommendation Initial...
AddressErrors.country - Web APIs
ountry property if during validation of the address the specified value of country was determined to be invalid. The value is a string describing the error and should offer suggestions for how to correct it. Syntax var countryError = AddressErrors.country; Value If an error occurred during validation of the address due to the country property having an invalid value, this property is set to a DOMString providing a human-readable error message explaining the validation error. The text should also include, when possible, advice about how to go about correcting the error. If the PaymentAddress object's country property was determined to be valid, this property is not included in the dictionary. Specifications Specification Status Comment Payment Request APIThe definitio...
AddressErrors.dependentLocality - Web APIs
s includes a dependentLocality property when the address's dependentLocality property couldn't be validated. The returned string explains the error and should offer suggestions for how to correct it. Syntax var localityError = AddressErrors.dependentLocality; Value If the value specified in the PaymentAddress object's dependentLocality property could not be validated, this property contains a DOMString offering a human-readable explanation of the validation error and offers suggestions for correcting it. If the dependentLocality value was validated successfully, this property is not included in the AddressErrors object. Specifications Specification Status Comment Payment Request APIThe definition of 'AddressErrors.dependentLocality' in that specification. Candidate...
AddressErrors.languageCode - Web APIs
ased on AddressErrors includes a languageCode property when the address's languageCode property couldn't be validated. The returned string explains the error and should offer suggestions for how to correct it. Syntax var languageError = AddressErrors.languageCode; Value If the value specified in the PaymentAddress object's languageCode property could not be validated, this property contains a DOMString offering a human-readable explanation of the validation error and offers suggestions for correcting it. This validation might be as simple as ensuring the text of the string is compliant with the syntax defined in BCP-47, or as detailed as actually verifying that the specified string matches a value from a database. If the languageCode value was validated successfully, this property is not incl...
AddressErrors.organization - Web APIs
on AddressErrors includes an organization property when the address's organization property couldn't be validated. The returned string explains the error and should offer suggestions for how to correct it. Syntax var organizationError = AddressErrors.organization; Value If the value specified in the PaymentAddress object's organization property could not be validated, this property contains a DOMString offering a human-readable explanation of the validation error and offers suggestions for correcting it. For example, if validation simply ensures that only permitted characters are included in the organization's name, this might return a string such as "The organization name may only contain the letters A-Z, digits, spaces, and commas." If the organization value was validated successfully, this...
AddressErrors.phone - Web APIs
An object based on AddressErrors includes a phone property when the address's phone property couldn't be validated. The returned string explains the error and should offer suggestions for how to correct it. Syntax var phoneError = AddressErrors.phone; Value If the value specified in the PaymentAddress object's phone property could not be validated, this property contains a DOMString offering a human-readable explanation of the validation error and offers suggestions for correcting it. If the phone value was validated successfully, this property is not included in the AddressErrors object. Specifications Specification Status Comment Payment Request APIThe definition of 'AddressErrors.phone' in that specification. Candidate Recommendation Initial definition. ...
AddressErrors.postalCode - Web APIs
n object based on AddressErrors includes a postalCode property when the address's postalCode property couldn't be validated. The returned string explains the error and should offer suggestions for how to correct it. Syntax var postcodeError = AddressErrors.postCode; Value If the value specified in the PaymentAddress object's postalCode property could not be validated, this property contains a DOMString offering a human-readable explanation of the validation error and offers suggestions for correcting it. If the postalCode value was validated successfully, this property is not included in the AddressErrors object. Specifications Specification Status Comment Payment Request APIThe definition of 'AddressErrors.postalCode' in that specification. Candidate Recommendatio...
AddressErrors.recipient - Web APIs
An object based on AddressErrors includes a recipient property when the address's recipient property couldn't be validated. The returned string explains the error and should offer suggestions for how to correct it. Syntax var recipientError = AddressErrors.recipient; Value If the value specified in the PaymentAddress object's recipient property could not be validated, this property contains a DOMString offering a human-readable explanation of the validation error and offers suggestions for correcting it. If the recipient value was validated successfully, this property is not included in the AddressErrors object. Specifications Specification Status Comment Payment Request APIThe definition of 'AddressErrors.recipient' in that specification. Candidate Recommendation ...
AddressErrors.region - Web APIs
An object based on AddressErrors includes a region property when the address's region property couldn't be validated. The returned string explains the error and should offer suggestions for how to correct it. Syntax var regionError = AddressErrors.region; Value If the value specified in the PaymentAddress object's region property could not be validated, this property contains a DOMString offering a human-readable explanation of the validation error and offers suggestions for correcting it. If the region value was validated successfully, this property is not included in the AddressErrors object. Specifications Specification Status Comment Payment Request APIThe definition of 'AddressErrors.region' in that specification. Candidate Recommendation Initial definitio...
AddressErrors.regionCode - Web APIs
ject based on AddressErrors includes a regionCode property when the address's regionCode property couldn't be validated. The returned string explains the error and should offer suggestions for how to correct it. Syntax var regionCodeError = AddressErrors.regionCode; Value If the value specified in the PaymentAddress object's regionCode property could not be validated, this property contains a DOMString offering a human-readable explanation of the validation error and offers suggestions for correcting it. If the regionCode value was validated successfully, this property is not included in the AddressErrors object. Usage notes The region code is derived from the ISO 3166-2 country subdivision name standard. Specifications Specification Status Comment Payment Request A...
AddressErrors.sortingCode - Web APIs
based on AddressErrors includes a sortingCode property when the address's sortingCode property couldn't be validated. The returned string explains the error and should offer suggestions for how to correct it. Syntax var sortingCodeError = AddressErrors.sortingCode; Value If the value specified in the PaymentAddress object's sortingCode property could not be validated, this property contains a DOMString offering a human-readable explanation of the validation error and offers suggestions for correcting it. If the sortingCode value was validated successfully, this property is not included in the AddressErrors object. Specifications Specification Status Comment Payment Request APIThe definition of 'AddressErrors.sortingCode' in that specification. Candidate Recommendat...
AesCbcParams - Web APIs
This should be set to AES-CBC. iv A BufferSource. The initialization vector. Must be 16 bytes, unpredictable, and preferably cryptographically random. ...
AesCtrParams - Web APIs
with the same key. A counter. This part of the block gets incremented each time a block is encrypted. Essentially: the nonce should ensure that counter blocks are not reused from one message to the next, while the counter should ensure that counter blocks are not reused within a single message. Note: See Appendix B of the NIST SP800-38A standard for more information. Properties name A DOMString. This should be set to AES-CTR. counter A BufferSource -- the initial value of the counter block. This must be 16 bytes long (the AES block size). The rightmost length bits of this block are used for the counter, and the rest is used for the nonce. For example, if length is set to 64, then the first half of counter is the nonce and the second half is used for the counter. length A Number -- t...
AesGcmParams - Web APIs
represents the object that should be passed as the algorithm parameter into SubtleCrypto.encrypt(), SubtleCrypto.decrypt(), SubtleCrypto.wrapKey(), or SubtleCrypto.unwrapKey(), when using the AES-GCM algorithm. For details of how to supply appropriate values for this parameter, see the specification for AES-GCM: NIST SP800-38D, in particular section 5.2.1.1 on Input Data. Properties name A DOMString. This should be set to AES-GCM. iv A BufferSource -- the initialization vector. This must be unique for every encryption operation carried out with a given key. Put another way: never reuse an IV with the same key. The AES-GCM specification recommends that the IV should be 96 bits long, and typically contains bits from a random number generator. Section 8.2 of the specification outlines methods...
AesKeyGenParams - Web APIs
This should be set to AES-CBC, AES-CTR, AES-GCM, or AES-KW, depending on the algorithm you want to use. ...
Animation.id - Web APIs
Web › API › Animation › id
The Animation.id property of the Web Animations API returns or sets a string used to identify the animation. Syntax var animationsId = Animation.id; Animation.id = newIdString; Value A DOMString which can be used to identify the animation, or null if the animation has no id. Examples In the Follow the White Rabbit example, you can assign the rabbitDownAnimation an id like so: rabbitDownAnimation.effect.id = "rabbitGo"; Specifications Specification Status Comment Web AnimationsThe definition of 'Animation.id' in that specification. Working Draft Editor's draft. ...
AnimationEvent.animationName - Web APIs
The AnimationEvent.animationName read-only property is a DOMString containing the value of the animation-name CSS property associated with the transition. Syntax name = AnimationEvent.animationName Specifications Specification Status Comment CSS AnimationsThe definition of 'AnimationEvent.animationName' in that specification. Working Draft Initial definition. ...
AnimationEvent.pseudoElement - Web APIs
If the animation doesn't run on a pseudo-element but on the element, an empty string: ''. ...
AnimationPlaybackEvent.AnimationPlaybackEvent() - Web APIs
eventInitDict Optional An optional EventInit dictionary object containing the following fields: bubbles Optional Defaults to false, of type Boolean, indicating if the event bubbles or not. ...
Attr.localName - Web APIs
Web › API › Attr › localName
Example The following example shows "id" in an alert dialog. ...
Attr - Web APIs
Web › API › Attr
r text { fill: #0095DD; pointer-events: all;} Warning: Starting in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4), a number of deprecated properties and methods output warning messages to the console. You should revise your code accordingly. See Deprecated properties and methods for a complete list. Properties name Read only The attribute's name. namespaceURI Read only A DOMString representing the namespace URI of the attribute, or null if there is no namespace. localName Read only A DOMString representing the local part of the qualified name of the attribute. prefix Read only A DOMString representing the namespace prefix of the attribute, or null if no prefix is specified. ownerElement Read only The element holding the attribute. Note: DOM Level 4 removed t...
AudioParamDescriptor - Web APIs
of the Web Audio API specifies properties for an AudioParam objects. It is used to create custom AudioParams on an AudioWorkletNode. If the underlying AudioWorkletProcessor has a parameterDescriptors static getter, then the returned array of objects based on this dictionary is used internally by AudioWorkletNode constructor to populate its parameters property accordingly. Properties name The DOMString which represents the name of the AudioParam. Under this name the AudioParam will be available in the parameters property of the node, and under this name the AudioWorkletProcessor.process method will acquire the calculated values of this AudioParam. automationRate Optional Either "a-rate", or "k-rate" string which represents an automation rate of this AudioParam. Defaults to "a-rate". minValue...
AudioParamMap - Web APIs
Properties The AudioParamMap object is accessed as a Map in which each parameter is identified by a name string which is mapped to an AudioParam containing the value of that parameter. ...
AudioProcessingEvent - Web APIs
the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and is soon to be replaced by AudioWorklet. Properties The list below includes the properties inherited from its parent, Event. Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only boolean Does the event normally bubble? cancelable Read only boolean Is it possible to cancel the event? playbackTime Read only double The time when the audio will be played, as defined by the time of AudioContext.currentTime inputBuffer Read only AudioBuffer The buffer containing the input aud...
AudioTrack.id - Web APIs
Web › API › AudioTrack › id
tains a string which uniquely identifies the track represented by the AudioTrack. This ID can be used with the AudioTrackList.getTrackById() method to locate a specific track within the media associated with a media element. The track ID can also be used as the fragment of a URL that loads the specific track (if the media supports media fragments). Syntax var trackID = AudioTrack.id; Value A DOMString which identifies the track, suitable for use when calling getTrackById() on an AudioTrackList such as the one specified by a media element's audioTracks property. Specifications Specification Status Comment HTML Living StandardThe definition of 'AudioTrack.id' in that specification. Living Standard HTML5The definition of 'AudioTrack.id' in that spe...
AudioTrack.kind - Web APIs
Web › API › AudioTrack › kind
The string is one of those found in Audio track kind strings below. ...
AudioTrack.label - Web APIs
Web › API › AudioTrack › label
Otherwise, an empty string ("") is returned. For example, a track whose kind is "commentary" might have a label such as "Commentary with director Mark Markmarkimark and star Donna Donnalidon". ...
AudioTrack.language - Web APIs
The read-only AudioTrack property language returns a string identifying the language used in the audio track. For tracks that include multiple languages (such as a movie in English in which a few lines are spoken in other languages), this should be the video's primary language. Syntax var audioTrackLanguage = AudioTrack.language; Value A DOMString specifying the BCP 47 (RFC 5646) format language tag of the primary language used in the audio track, or an empty string ("") if the language is not specified or known, or if the track doesn't contain speech. For example, if the primary language used in the track is United States English, this value would be "en-US". For Brazilian Portuguese, the value would be "pt-BR". Example This example locates all of a media element's primary language and tra...
AudioTrackList.getTrackById() - Web APIs
Return value An AudioTrack object indicating the first track found within the AudioTrackList whose id matches the specified string. ...
AudioWorkletProcessor.parameterDescriptors (static getter) - Web APIs
if defined, it is called internally by the AudioWorkletProcessor constructor to create a list of custom AudioParam objects in the parameters property of the associated AudioWorkletNode. Defining the getter is optional. Syntax AudioWorkletProcessorSubclass.parameterDescriptors; Value An iterable of AudioParamDescriptor-based objects. The properties of these objects are as follows: name The DOMString which represents the name of the AudioParam. Under this name the AudioParam will be available in the parameters property of the node, and under this name the AudioWorkletProcessor.process method will acquire the calculated values of this AudioParam. automationRate Optional Either "a-rate", or "k-rate" string which represents an automation rate of this AudioParam. Defaults to "a-rate". minValue...
AuthenticatorResponse.clientDataJSON - Web APIs
party's id to be a suffix of this value. tokenBindingId Optional An object describing the state of the token binding protocol for the communication with the relying party. It has two properties: status: A string which is either "supported" which indicates the client support token binding but did not negotiate with the relying party or "present" when token binding was used already id: A DOMString which is the base64url encoding of the token binding ID which was used for the communication. Should this property be absent, it would indicate that the client does not support token binding. Examples function arrayBufferToStr(buf) { return String.fromCharCode.apply(null, new Uint8Array(buf)); } // pk is a PublicKeyCredential that is the result of a create() or get() Promise var cli...
BaseAudioContext.state - Web APIs
Possible values are: suspended: The audio context has been suspended (with the AudioContext.suspend() method.) running: The audio context is running normally. closed: The audio context has been closed (with the AudioContext.close() method.) Example The following snippet is taken from our AudioContext states demo (see it running live.) The AudioContext.onstatechange hander is used to log the current state to the console every time it changes. ...
BasicCardRequest.supportedNetworks - Web APIs
The supportedNetworks property of the BasicCardRequest dictionary contains an array of DOMStrings representing the card networks that the retailer supports (e.g. amex, mastercard). Syntax supportedNetworks : [value [, ... value]] Value An array containing one or more DOMStrings, which describe the card networks the retailer supports. Legal values are defined in the W3C's document Card Network Identifiers Approved for use with Payment Request API, and are currently: amex cartebancaire diners discover jcb mastercard mir unionpay visa Example The following example shows a sample definition of the first parameter of the PaymentRequest() constructor, the data property of which contains supportedNetworks and supportedTypes properties. var supportedInstruments = [{ supportedMethod...
BasicCardRequest.supportedTypes - Web APIs
The obsolete supportedTypes property of the BasicCardRequest dictionary can optionally be provided to specify an array of DOMStrings representing the card types that the retailer supports (e.g. credit, debit, prepaid). This property is obsolete and should no longer be used. Instead of making the web app or site worry about this, the onus has been transferred to the payment processor. Syntax basicCardRequest.supportedTypes = [cardType1...cardTypeN]; Value An array containing one or more DOMStrings, which describe the card types the retailer supports. Legal values are defined in BasicCardType enum, and are currently: credit debit prepaid Example The following example shows a sample definition of the first parameter of the PaymentRequest() constructor, the data property of which conta...
BasicCardResponse.cardNumber - Web APIs
Example Let's look at a sample payment request: var request = new PaymentRequest(supportedInstruments, details, options); // Call show() to trigger the browser's payment flow. request.show().then(function(instrumentResponse) { // Do something with the response from the UI. console.log(instrumentResponse.details); }) .catch(function(err) { // Do something with the error from request.show(). ...
BasicCardResponse.cardSecurityCode - Web APIs
Example Let's look at a sample payment request: var request = new PaymentRequest(supportedInstruments, details, options); // Call show() to trigger the browser's payment flow. request.show().then(function(instrumentResponse) { // Do something with the response from the UI. ...
BasicCardResponse.cardholderName - Web APIs
Example Let's look at a sample payment request: var request = new PaymentRequest(supportedInstruments, details, options); // Call show() to trigger the browser's payment flow. request.show().then(function(instrumentResponse) { // Do something with the response from the UI. ...
BasicCardResponse.expiryMonth - Web APIs
Example Let's look at a sample payment request: var request = new PaymentRequest(supportedInstruments, details, options); // Call show() to trigger the browser's payment flow. request.show().then(function(instrumentResponse) { // Do something with the response from the UI. ...
BasicCardResponse.expiryYear - Web APIs
Example Let's look at a sample payment request: var request = new PaymentRequest(supportedInstruments, details, options); // Call show() to trigger the browser's payment flow. request.show().then(function(instrumentResponse) { // Do something with the response from the UI. ...
Using the Beacon API - Web APIs
ted before the page unloads. This document contains examples of the Beacon interfaces. See Beacon API for an overview. Navigator.sendBeacon() The Beacon API's Navigator.sendBeacon() method sends a beacon request to the server in the global browsing context. The method takes two arguments: the URL and the data to send. The data argument is optional and its type may be an ArrayBufferView, Blob, DOMString, or FormData. If the browser successfully queues the request for delivery, the method returns true and returns false otherwise. The following example specifies a handler for the load and beforeunload events. The handler calls sendBeacon() with the current URL. window.onload = window.onunload = function analytics(event) { if (!navigator.sendBeacon) return; var url = "https://example.com/an...
Blob() - Web APIs
Web › API › Blob › Blob
rs (\n) within the contents, if the data is text. The default value, transparent, copies newline characters into the blob without changing them. To convert newlines to the host system's native convention, specify the value native. Return value A new Blob object containing the specified data. Example var aFileParts = ['<a id="a"><b id="b">hey!</b></a>']; // an array consisting of a single DOMString var oMyBlob = new Blob(aFileParts, {type : 'text/html'}); // the blob Specification Specification Status Comment File APIThe definition of 'Blob()' in that specification. Working Draft Initial definition. ...
Blob.type - Web APIs
Web › API › Blob › type
Example This example asks the user to select a number of files, then checks each file to make sure it's one of a given set of image file types. ...
id - Web APIs
The BluetoothDevice.id read-only property returns a DOMString that uniquely identifies a device. Syntax var id = instanceOfBluetoothDevice.id Returns A DOMString. Specifications Specification Status Comment Web BluetoothThe definition of 'id' in that specification. Draft Initial definition. ...
BluetoothDevice.name - Web APIs
The BluetoothDevice.name read-only property returns a DOMString that provides a human-readable name for the device. Syntax var name = instanceOfBluetoothDevice.name Returns A DOMString. Specifications Specification Status Comment Web BluetoothThe definition of 'name' in that specification. Draft Initial definition. ...
BluetoothRemoteGATTCharacteristic.uuid - Web APIs
The BluetoothRemoteGATTCharacteristic.uuid read-only property returns DOMString containing the UUID of the characteristic, for example '00002a37-0000-1000-8000-00805f9b34fb' for the Heart Rate Measurement characteristic. Syntax var uuid = BluetoothRemoteGATTCharacteristic.uuid Returns A DOMString. Specifications Specification Status Comment Web BluetoothThe definition of 'uuid' in that specification. Draft Initial definition. ...
BluetoothRemoteGATTCharacteristic - Web APIs
omise<void> startNotifications(); Promise<void> stopNotifications(); }; BluetoothRemoteGATTCharacteristic implements EventTarget; BluetoothRemoteGATTCharacteristic implements CharacteristicEventHandlers; Properties BluetoothRemoteGATTCharacteristic.serviceRead only Returns the BluetoothGATTService this characteristic belongs to. BluetoothRemoteGATTCharacteristic.uuidRead only Returns a DOMString containing the UUID of the characteristic, for example '00002a37-0000-1000-8000-00805f9b34fb' for the Heart Rate Measurement characteristic. BluetoothRemoteGATTCharacteristic.propertiesRead only Returns the properties of this characteristic. BluetoothRemoteGATTCharacteristic.valueRead only The currently cached characteristic value. This value gets updated when the value of the characteristi...
uuid - Web APIs
The BluetoothGATTService.uuid read-only property returns a DOMString representing the UUID of this service. Syntax var uuid = BluetoothGATTService.uuid Returns A DOMString. Specifications Specification Status Comment Web BluetoothThe definition of 'uuid' in that specification. Draft Initial definition. ...
BluetoothRemoteGATTService - Web APIs
TService>> getIncludedServices(optional BluetoothServiceUUID service); }; Properties BluetoothRemoteGATTService.deviceRead only Returns information about a Bluetooth device through an instance of BluetoothDevice. BluetoothRemoteGATTService.isPrimaryRead only Returns a Boolean Indicating whether this is a primary or secondary service. BluetoothRemoteGATTService.uuidRead only Returns a DOMString representing the UUID of this service. Methods BluetoothRemoteGATTService.getCharacteristic() Returns a Promise to an instance of BluetoothGATTCharacteristic for a given universally unique identifier (UUID). BluetoothRemoteGATTService.getCharacteristics() Returns a Promise to an Array of BluetoothGATTCharacteristic instances for an optional universally unique identifier (UUID). Bluetooth...
BroadcastChannel() - Web APIs
Example // create a new channel listening to the "internal_notification" channel. ...
BroadcastChannel.name - Web APIs
This name is passed to the BroadcastChannel() constructor at creation time and is therefore read-only. Note: This feature is available in Web Workers. ...
BroadcastChannel - Web APIs
ale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">BroadcastChannel</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Constructor BroadcastChannel() Creates an object linking to the named channel. Properties This interface also inherits properties from its parent, EventTarget. BroadcastChannel.name Read only Returns a DOMString, the name of the channel. Event handlers BroadcastChannel.onmessage An EventHandler property that specifies the function to execute when a message event is fired on this object. BroadcastChannel.onmessageerror An EventHandler called when a MessageEvent of type MessageError is fired--that is, when it receives a message that cannot be deserialized. Methods This interface also inherits m...
Broadcast Channel API - Web APIs
ed. // Connection to a broadcast channel const bc = new BroadcastChannel('test_channel'); Sending a message It is enough to call the postMessage() method on the created BroadcastChannel object, which takes any object as an argument. An example string message: // Example of sending of a very simple message bc.postMessage('This is a test message.'); Any kind of object can be sent, not just a DOMString. The API doesn't associate any semantics to messages, so it is up to the code to know what kind of messages to expect and what to do with them. Receiving a message When a message is posted, a message event is dispatched to each BroadcastChannel object connected to this channel. A function can be run for this event with the onmessage event handler: // A handler that only logs the event to the ...
CSS.registerProperty() - Web APIs
rit their value. Registering a custom property allows you to tell the browser how the custom property should behave; what are allowed types, whether the custom property inherits its value, and what the default value of the custom property is. Syntax CSS.registerProperty(PropertyDefinition); Parameters A PropertyDefinition dictionary object, which can contain the following members: name A DOMString indicating the name of the property being defined. syntax Optional A DOMString representing the expected syntax of the defined property. Defaults to "*". inherits A boolean value defining whether the defined property should be inherited (true), or not (false). Defaults to false. initialValue Optional A DOMString representing the initial value of the defined property. Return value undefin...
CSS.supports() - Web APIs
Web › API › CSS › supports
The CSS.supports() method returns a Boolean value indicating if the browser supports a given CSS feature, or not. Syntax CSS.supports(propertyName, value); CSS.supports(supportCondition); Parameters There are two distinct sets of parameters. The first one allows to test the support of a pair property-value: propertyName A DOMString containing the name of the CSS property to check. value A DOMString containing the value of the CSS property to check. The second syntax takes one parameter matching the condition of @supports: supportCondition A DOMString containing the condition to check. Return value true if the browser supports the rule, otherwise false. Examples result = CSS.supports("text-decoration-style", "blink"); result = CSS.supports("display: flex"); result = CSS.suppor...
CSSConditionRule - Web APIs
An object implementing the CSSConditionRule interface represents a single condition CSS at-rule, which consists of a condition and a statement block. It is a child of CSSGroupingRule. Two objects derive from it : CSSMediaRule and CSSSupportsRule. Syntax The syntax is described using the WebIDL format. interface CSSConditionRule : CSSGroupingRule { attribute DOMString conditionText; } Properties The CSSConditionRule derives from CSSRule, CSSGroupingRule and inherits all properties of these classes. It has one specific property: CSSConditionRule.conditionText Represents the text of the condition of the rule. Methods The CSSConditionRule derives from CSSRule, CSSGroupingRule and inherits all methods of these classes. It has no specific property of its own. Specifications ...
CSSGroupingRule - Web APIs
SSGroupingRule interface represents any CSS at-rule that contains other rules nested within it. Objects deriving from it : CSSConditionRule and its children: CSSMediaRule, CSSSupportsRule, and CSSDocumentRule. CSSPageRule Syntax The syntax is described using the WebIDL format. interface CSSGroupingRule : CSSRule { readonly attribute CSSRuleList cssRules; unsigned long insertRule (DOMString rule, unsigned long index); void deleteRule (unsigned long index); } Properties common to all CSSGroupingRule instances The CSSGroupingRule derives from CSSRule and inherits all properties of this class. It has one specific property: CSSGroupingRule.cssRules Read only Returns a CSSRuleList of the CSS rules in the media rule. Methods common to all CSSGroupingRule instances The CSSGr...
CSSNamespaceRule.namespaceURI - Web APIs
The CSSNamespaceRule.namespaceURI read-only property returns a DOMString containing the text of the URI of the given namespace. Syntax var namespaceURI = CSSNamespaceRule.namespaceURI Returns A DOMString containing a URI. Specifications Specification Status Comment CSS Object Model (CSSOM)The definition of 'namespaceURI' in that specification. Working Draft Initial definition. ...
CSSNamespaceRule.prefix - Web APIs
The CSSNamespaceRule.prefix read-only property returns a DOMString with the name of the prefix associated to this namespace. If there is no such prefix, returns null. Syntax var prefix = CSSNamespaceRule.prefix Returns A DOMString containing the prefix associated to this namespace. Specifications Specification Status Comment CSS Object Model (CSSOM)The definition of 'namespaceURI' in that specification. Working Draft Initial definition. ...
CSSNamespaceRule - Web APIs
The CSSNamespaceRule interface describes an object representing a single CSS @namespace at-rule. It implements the CSSRule interface, with a type value of 10 (CSSRule.NAMESPACE_RULE). Syntax The syntax is described using the WebIDL format. interface CSSNamespaceRule : CSSRule { readonly attribute DOMString namespaceURI; readonly attribute DOMString? prefix; }; Properties As a CSSRule, CSSNamespaceRule also implements the properties of that interface. It has some specific properties: CSSNamespaceRule.namespaceURI Returns a DOMString containing the text of the URI of the given namespace. CSSNamespaceRule.prefix Returns a DOMString with the name of the prefix associated to this namespace. If there is no such prefix, returns null. Methods As a CSSRule, CSSNamespaceRule also i...
CSSPageRule - Web APIs
It has the following specific properties: CSSPageRule.selectorText Represents the text of the page selector associated with the at-rule. ...
CSSPrimitiveValue.setStringValue() - Web APIs
ingType, stringValue); Parameters stringType An unsigned short representing the type of the value. Possible values are: Constant Description CSS_ATTR The value is an attr() function. CSS_IDENT The value is an identifier. CSS_STRING The value is a <string>. CSS_URI The value is a <uri>. stringValue A DOMString representing the new string value. Return value Void. Exceptions Type Description DOMException An INVALID_ACCESS_ERR is raised if the CSS value doesn't contain a string value or if the string value can't be converted into the specified unit. An NO_MODIFICATION_ALLOWED_ERR is raised if this property is read-only. Specifications Specification ...
CSSStyleDeclaration.getPropertyCSSValue() - Web APIs
The CSSStyleDeclaration.getPropertyCSSValue() method interface returns a CSSValue containing the CSS value for a property. Note that it returns null if the property name is a shorthand property. You should use CSSStyleDeclaration.getPropertyValue() instead. Syntax var value = style.getPropertyCSSValue(property); Parameters property is a DOMString representing the property name to be retrieved. Return value value is a CSSValue containing the CSS value for a property. If none exists, returns null. Example The following JavaScript code gets an object containing the computed RGB values of the color CSS property: var style = window.getComputedStyle(elem, null); var rgbObj = style.getPropertyCSSValue('color').getRGBColorValue(); Specifications Specification Status Com...
CSSStyleDeclaration.item() - Web APIs
erty name from a CSSStyleDeclaration by index. This method doesn't throw exceptions as long as you provide arguments; the empty string is returned if the index is out of range and a TypeError is thrown if no argument is provided. Syntax var propertyName = style.item(index); Parameters index is the index of the node to be fetched. The index is zero-based. Return value propertyName is a DOMString that is the name of the CSS property at the specified index. JavaScript has a special simpler syntax for obtaining an item from a NodeList by index: var propertyName = style[index]; Example var style = document.getElementById('div1').style; var propertyName = style.item(1); // or simply style[1] - returns the second style listed Specifications Specification Status Comment ...
CSSStyleDeclaration.setProperty() - Web APIs
The CSSStyleDeclaration.setProperty() method interface sets a new value for a property on a CSS style declaration object. Syntax style.setProperty(propertyName, value, priority); Parameters propertyName is a DOMString representing the CSS property name (hyphen case) to be modified. value Optional is a DOMString containing the new property value. If not specified, treated as the empty string. Note: value must not contain "!important" -- that should be set using the priority parameter. priority Optional is a DOMString allowing the "important" CSS priority to be set. If not specified, treated as the empty string. The following values are accepted: String value "important" Keyword undefined String empty value "" Return value undefined Exceptions DOMExcepti...
CSSStyleSheet.addRule() - Web APIs
The obsolete CSSStyleSheet interface's addRule() legacy method adds a new rule to the stylesheet. You should avoid using this method, and should instead use the more standard insertRule() method. Syntax var result = cssStyleSheet.addRule(selector, styleBlock, index); Parameters selector A DOMString specifying the selector portion of the CSS rule. The default is the string undefined. styleBlock A DOMString indicating the style block to apply to elements matching the selector. The default is the string undefined. index Optional An optional index into the stylesheet's CSSRuleList at which to insert the new rule. If index is not specified, the next index after the last item currently in the list is used (that is, the value of cssStyleSheet.cssRules.length). Return value Always returns ...
CSSStyleSheet.insertRule() - Web APIs
The CSSStyleSheet.insertRule() method inserts a new CSS rule into the current style sheet, with some restrictions. Note: Although insertRule() is exclusively a method of CSSStyleSheet, it actually inserts the rule into CSSStyleSheet.cssRules -- its internal CSSRuleList. Syntax stylesheet.insertRule(rule [, index]) Parameters rule A DOMString containing the rule to be inserted. What the inserted rule must contain depends on its type: For rule-sets, both a selector and a style declaration. For at-rules, both an at-identifier and the rule content. index Optional A positive integer less than or equal to stylesheet.cssRules.length, representing the newly inserted rule's position in CSSStyleSheet.cssRules. The default is 0. (In older implementations, this was required. See Brows...
CSSValue.cssText - Web APIs
Web › API › CSSValue › cssText
The cssText property of the CSSValue interface represents the current computed CSS property value. Syntax cssText = cssValue.cssText; Value A DOMString representing the current CSS property value. Example var styleDeclaration = document.styleSheets[0].cssRules[0].style; var cssValue = styleDeclaration.getPropertyCSSValue("color"); console.log(cssValue.cssText); Specifications Specification Status Comment Document Object Model (DOM) Level 2 Style SpecificationThe definition of 'CSSValue.cssText' in that specification. Obsolete Initial definition ...
CSSValue - Web APIs
Web › API › CSSValue
CSSValue.cssValueTypeRead only An unsigned short representing a code defining the type of the value. Possible values are: Constant Description CSS_CUSTOM The value is a custom value. CSS_INHERIT The value is inherited and the cssText contains "inherit". CSS_PRIMITIVE_VALUE The value is a primitive value and an instance of the CSSPrimitiveValue interface can be obtained by using binding-specific casting methods on this instance of the CSSValue interface. ...
Cache.delete() - Web APIs
Web › API › Cache › delete
vents matching operations from validating the Request HTTP method (normally only GET and HEAD are allowed.) It defaults to false. ignoreVary: A Boolean that, when set to true, tells the matching operation not to perform VARY header matching. In other words, if the URL matches you will get a match regardless of whether the Response object has a VARY header. It defaults to false. cacheName: A DOMString that represents a specific cache to search within. Note that this option is ignored by Cache.delete(). Return value a Promise that resolves to true if the cache entry is deleted, or false otherwise. Examples caches.open('v1').then(function(cache) { cache.delete('/images/image.png').then(function(response) { someUIUpdateFunction(); }); }) Specifications Specification ...
Cache.keys() - Web APIs
Web › API › Cache › keys
vents matching operations from validating the Request HTTP method (normally only GET and HEAD are allowed.) It defaults to false. ignoreVary: A Boolean that, when set to true, tells the matching operation not to perform VARY header matching. In other words, if the URL matches you will get a match regardless of whether the Response object has a VARY header. It defaults to false. cacheName: A DOMString that represents a specific cache to search within. Note that this option is ignored by Cache.keys(). Return value A Promise that resolves to an array of Cache keys. Examples caches.open('v1').then(function(cache) { cache.keys().then(function(keys) { keys.forEach(function(request, index, array) { cache.delete(request); }); }); }) Specifications Specification ...
CacheStorage.has() - Web APIs
Web › API › CacheStorage › has
Return value a Promise that resolves to true if the cache exists or false if not. ...
CacheStorage.match() - Web APIs
matching operations from validating the Request http method (normally only GET and HEAD are allowed.) It defaults to false. ignoreVary: A Boolean that, when set to true, tells the matching operation not to perform VARY header matching. In other words, if the URL matches you will get a match regardless of whether the Response object has a VARY header or not. It defaults to false. cacheName: A DOMString that represents a specific cache to search within. Return value a Promise that resolves to the matching Response. If no matching response to the specified request is found, the promise resolves with undefined. Examples This example is from the MDN sw-test example (see sw-test running live). Here we wait for a FetchEvent to fire. We construct a custom response like so: Check whether a ...
CanvasRenderingContext2D.createPattern() - Web APIs
o any subsequent drawing. Syntax CanvasPattern ctx.createPattern(image, repetition); Parameters image A CanvasImageSource to be used as the pattern's image. It can be any of the following: HTMLImageElement (<img>) SVGImageElement (<image>) HTMLVideoElement (<video>, by using the capture of the video) HTMLCanvasElement (<canvas>) ImageBitmap OffscreenCanvas repetition A DOMString indicating how to repeat the pattern's image. Possible values are: "repeat" (both directions) "repeat-x" (horizontal only) "repeat-y" (vertical only) "no-repeat" (neither direction) If repetition is specified as an empty string ("") or null (but not undefined), a value of "repeat" will be used. Return value CanvasPattern An opaque object describing a pattern. Examples Creati...
CanvasRenderingContext2D.drawWindow() - Web APIs
itch to tabs.captureTab. If you're writing chrome code, you probably want WindowGlobalParent.drawSnapshot from the parent process. Syntax void ctx.drawWindow(window, x, y, w, h, bgColor [, flags]); Parameters window The Window to render. x The x-axis coordinate of the window. y The y-axis coordinate of the window. w The width of the window. h The height of the window. bgColor A DOMString that specifies the color the canvas is filled with before the window is rendered into it. This color may be transparent/translucent. It is given as a CSS color string (for example, rgb() or rgba()). Notes: If "rgba(0,0,0,0)" is used for the background color, the drawing will be transparent wherever the window is transparent. Top-level browsed documents are usually not transparent because t...
CanvasRenderingContext2D.fillStyle - Web APIs
The CanvasRenderingContext2D.fillStyle property of the Canvas 2D API specifies the color, gradient, or pattern to use inside shapes. The default style is #000 (black). For more examples of fill and stroke styles, see Applying styles and color in the Canvas tutorial. Syntax ctx.fillStyle = color; ctx.fillStyle = gradient; ctx.fillStyle = pattern; Options color A DOMString parsed as CSS <color> value. gradient A CanvasGradient object (a linear or radial gradient). pattern A CanvasPattern object (a repeating image). Examples Changing the fill color of a shape This example applies a blue fill color to a rectangle. HTML <canvas id="canvas"></canvas> JavaScript const canvas = document.getElementById('canvas'); const ctx = canvas.getContext('2d'); ctx.fillStyle = 'blue'; ctx.fill...
CanvasRenderingContext2D.fillText() - Web APIs
so any subsequent fill() or stroke() calls will have no effect on it. The text is rendered using the font and text layout configuration as defined by the font, textAlign, textBaseline, and direction properties. To draw the outlines of the characters in a string, call the context's strokeText() method. Syntax CanvasRenderingContext2D.fillText(text, x, y [, maxWidth]); Parameters text A DOMString specifying the text string to render into the context. The text is rendered using the settings specified by font, textAlign, textBaseline, and direction. x The x-axis coordinate of the point at which to begin drawing the text, in pixels. y The y-axis coordinate of the point at which to begin drawing the text, in pixels. maxWidth Optional The maximum number of pixels wide the text may be onc...
CanvasRenderingContext2D.filter - Web APIs
enderingContext2D.filter property of the Canvas 2D API provides filter effects such as blurring and grayscaling. It is similar to the CSS filter property and accepts the same values. Syntax ctx.filter = "<filter-function1> [<filter-function2>] [<filter-functionN>]"; ctx.filter = "none"; Values The filter property accepts a value of "none" or one or more of the following filter functions in a DOMString. url() A CSS <url>. Takes an IRI pointing to an SVG filter element, which may be embedded in an external XML file. blur() A CSS <length>. Applies a Gaussian blur to the drawing. It defines the value of the standard deviation to the Gaussian function, i.e., how many pixels on the screen blend into each other; thus, a larger value will create more blur. A value of 0 leaves the input unchanged...
CanvasRenderingContext2D.font - Web APIs
The default font is 10px sans-serif. Examples Using a custom font In this example we use the font property to specify a custom font weight, size, and family. ...
CanvasRenderingContext2D.removeHitRegion() - Web APIs
Examples Using the removeHitRegion method This example demonstrates the removeHitRegion() method. ...
CanvasRenderingContext2D.shadowColor - Web APIs
adows. Be aware that the shadow's rendered opacity will be affected by the opacity of the fillStyle color when filling, and of the strokeStyle color when stroking. Note: Shadows are only drawn if the shadowColor property is set to a non-transparent value. One of the shadowBlur, shadowOffsetX, or shadowOffsetY properties must be non-zero, as well. Syntax ctx.shadowColor = color; color A DOMString parsed as a CSS <color> value. The default value is fully-transparent black. Examples Adding a shadow to shapes This example adds a shadow to two squares; the first one is filled, and the second one is stroked. The shadowColor property sets the shadows' color, while shadowOffsetX and shadowOffsetY set their position relative to the shapes. HTML <canvas id="canvas"></canvas> JavaScript co...
CanvasRenderingContext2D.strokeStyle - Web APIs
CanvasRenderingContext2D.strokeStyle property of the Canvas 2D API specifies the color, gradient, or pattern to use for the strokes (outlines) around shapes. The default is #000 (black). For more examples of stroke and fill styles, see Applying styles and color in the Canvas tutorial. Syntax ctx.strokeStyle = color; ctx.strokeStyle = gradient; ctx.strokeStyle = pattern; Options color A DOMString parsed as CSS <color> value. gradient A CanvasGradient object (a linear or radial gradient). pattern A CanvasPattern object (a repeating image). Examples Changing the stroke color of a shape This example applies a blue stroke color to a rectangle. HTML <canvas id="canvas"></canvas> JavaScript var canvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d'); ctx.stro...
CanvasRenderingContext2D.strokeText() - Web APIs
by condensing the text or by using a lower font size. This method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it. Use the fillText() method to fill the text characters rather than having just their outlines drawn. Syntax CanvasRenderingContext2D.strokeText(text, x, y [, maxWidth]); Parameters text A DOMString specifying the text string to render into the context. The text is rendered using the settings specified by font, textAlign, textBaseline, and direction. x The x-axis coordinate of the point at which to begin drawing the text. y The y-axis coordinate of the point at which to begin drawing the text. maxWidth Optional The maximum width the text may be once rendered. If not specified, there i...
Clients.get() - Web APIs
Web › API › Clients › get
Return value A Promise that resolves to a Client object or undefined. ...
Clipboard.readText() - Web APIs
The Clipboard interface's readText() method returns a Promise which resolves with a copy of the textual contents of the system clipboard.. The "clipboard-read" permission of the Permissions API must be granted before you can read data from the clipboard. Syntax var promise = navigator.clipboard.readText() Parameters None. Return value A Promise that resolves with a DOMString containing the textual contents of the clipboard. Returns an empty string if the clipboard is empty, does not contain text, or does not include a textual representation among the DataTransfer objects representing the clipboard's contents. To read non-text contents from the clipboard, use the read() method instead. You can write text to the clipboard using writeText(). Example This example retrieves the textual content...
Clipboard.writeText() - Web APIs
Permissions API, is granted automatically to pages when they are in the active tab. Note: Browser support for the asynchronous clipboard APIs is still in the process of being implemented. Be sure to check the compatibility table as well as Clipboard availability in Clipboard for more information. Syntax var promise = navigator.clipboard.writeText(newClipText) Parameters newClipText The DOMString to be written to the clipboard. Return value A Promise which is resolved once the clipboard's contents have been updated. The promise is rejected if the caller does not have permission to write to the clipboard. Example This example sets the clipboard's contents to the string "<empty clipboard>". navigator.clipboard.writeText("<empty clipboard>").then(function() { /* clipboard success...
Clipboard - Web APIs
Web › API › Clipboard
se interfaces. Methods Clipboard is based on the EventTarget interface, and includes its methods. read() Requests arbitrary data (such as images) from the clipboard, returning a Promise. When the data has been retrieved, the promise is resolved with a DataTransfer object that provides the data. readText() Requests text from the system clipboard; returns a Promise which is resolved with a DOMString containing the clipboard's text once it's available. write() Writes arbitrary data to the system clipboard. This asynchronous operation signals that it's finished by resolving the returned Promise. writeText() Writes text to the system clipboard, returning a Promise which is resolved once the text is fully copied into the clipboard. Clipboard availability The asynchronous clipboard API is ...
ClipboardEvent() - Web APIs
The ClipboardEvent() constructor returns a newly created ClipboardEvent, representing an event providing information related to modification of the clipboard, that is cut, copy, and paste events. Syntax var clipboardEvent = new ClipboardEvent(type[, options]); Parameters The ClipboardEvent() constructor also inherits arguments from Event(). type Is a DOMString representing the name of the type of the ClipboardEvent. It is case-sensitive and can be: 'copy', 'cut', or 'paste'. options Optional Options are as follows: clipboardData: A DataTransfer containing the data concerned by the clipboard event. dataType : A DOMString containing the MIME-type of the data contained in the data argument. data : A DOMString containing the data concerned by the clipboard event. Specificati...
CloseEvent() - Web APIs
The CloseEvent() constructor creates a new CloseEvent. Syntax var event = new CloseEvent(typeArg, closeEventInit); Values typeArg Is a DOMString representing the name of the event. closeEventInit Optional Is a CloseEventInit dictionary, having the following fields: "wasClean", optional and defaulting to false, of type long, indicates if the connection has been closed cleanly or not. "code", optional and defaulting to 0, of type unsigned short, that is the connection close code sent by the server. "reason", optional and defaulting to '', of type DOMString, that is a human-readable reason why the server closed the connection. The CloseEventInit dictionary also accepts fields from the EventInit dictionary. Specifications Specification Status Comment ...
CloseEvent.initCloseEvent() - Web APIs
ossible types for mouse events include: click, mousedown, mouseup, mouseover, mousemove, mouseout. canBubble whether or not the event can bubble. Sets the value of Event.bubbles. cancelable whether or not the event's default action can be prevented. Sets the value of Event.cancelable. wasClean whether or not the connection was cleanly closed. reasonCode the reason of the close. reason a DOMString describing the reason of the close in shuman-readable way. Specifications This is no part of any specifications, though it was in some early drafts. ...
CloseEvent - Web APIs
se by the WebSocket standard. 2000-2999 Reserved for use by WebSocket extensions. 3000-3999 Available for use by libraries and frameworks. May not be used by applications. Available for registration at the IANA via first-come, first-serve. 4000-4999 Available for use by applications. CloseEvent.reason Read only Returns a DOMString indicating the reason the server closed the connection. This is specific to the particular server and sub-protocol. CloseEvent.wasClean Read only Returns a Boolean that Indicates whether or not the connection was cleanly closed. Methods This interface also inherits methods from its parent, Event. CloseEvent.initCloseEvent() Initializes the value of a CloseEvent created. If the event...
Comment() - Web APIs
Web › API › Comment › Comment
The Comment() constructor returns a newly created Comment object with the optional DOMString given in parameter as its textual content. Syntax comment1 = new Comment(); // Create an empty comment comment2 = new Comment("This is a comment"); Example var comment = new Comment("Test"); Specifications Specification Status Comment DOMThe definition of 'Comment: Comment' in that specification. Living Standard Initial definition ...
CompositionEvent.CompositionEvent() - Web APIs
CompositionEventInit Optional A CompositionEventInit dictionary object, which can contain the following members: data Initializes the data attribute of the CompositionEvent object to the characters generated by the IME composition. Note: The CompositionEventInit dictionary inherits from the UIEventInit dictionary, so can also accept members defined on there. ...
CompositionEvent.data - Web APIs
The data read-only property of the CompositionEvent interface returns the characters generated by the input method that raised the event; its exact nature varies depending on the type of event that generated the CompositionEvent object. Syntax myData = CompositionEvent.data Value A DOMString representing the event data: For compositionstart events, this is the currently selected text that will be replaced by the string being composed. This value doesn't change even if content changes the selection range; rather, it indicates the string that was selected when composition started. For compositionupdate, this is the string as it stands currently as editing is ongoing. For compositionend events, this is the string as committed to the editor. Specifications Specification Status...
CompositionEvent.initCompositionEvent() - Web APIs
The initCompositionEvent() method of the CompositionEvent interface initializes the attributes of a CompositionEvent object instance. Syntax compositionEventInstance.initCompositionEvent(typeArg, canBubbleArg, cancelableArg, viewArg, dataArg, localeArg) Parameters typeArg A DOMString representing the type of composition event; this will be one of compositionstart, compositionupdate, or compositionend. canBubbleArg A Boolean specifying whether or not the event can bubble. cancelableArg A Boolean shether or not the event can be canceled. viewArg The Window object from which the event was generated. dataArg A DOMString representing the value of the data attribute. localeArg A DOMString representing the value of the locale attribute. Return value Void. Specifications ...
CompositionEvent.locale - Web APIs
The locale read-only property of the CompositionEvent interface returns the locale of current input method (for example, the keyboard layout locale if the composition is associated with IME). Syntax myLocale = CompositionEvent.locale Value A DOMString representing the locale of current input method. Specifications Specification Status Comment Document Object Model (DOM) Level 3 Events Specification Obsolete No longer in the spec, but still supported. ...
ContentIndexEvent() - Web APIs
For ContentIndexEvent, this is always delete. eventInitDict Optional An options object containing any initialization data you want to populate the ContentIndexEvent object with. ...
Credential.id - Web APIs
Web › API › Credential › id
The id property of the Credential interface returns a DOMString containing the credential's identifier. This might be any one of a GUID, username, or email address. Syntax var id = Credential.id; Value A a DOMString containing the credential's identifier. Specifications Specification Status Comment Credential Management Level 1 Working Draft Initial definition. ...
Credential.name - Web APIs
Web › API › Credential › name
The name property of the Credential interface returns a DOMString, containing the name associated with a credential. It should be a human-readable, public name. Syntax var credName = Credential.name; Value A DOMString containing the credential's given name. Example // TBD Specifications Specification Status Comment Credential Management Level 1 Working Draft Initial definition. ...
Credential.type - Web APIs
Web › API › Credential › type
The type property of the Credential interface returns a DOMString containing the credential's type. Valid values are password, federated and public-key. Syntax var credType = Credential.type; Value A DOMString contains a credential's given name. Example // TBD Specifications Specification Status Comment Credential Management Level 1 Working Draft Initial definition. ...
CredentialsContainer.get() - Web APIs
ed to have, and options for interacting with the user. It can contain the following properties: password: a Boolean indicating that returned Credential instances should include user (as opposed to federated) credentials. federated: A FederatedCredentialRequestOptions object containing requirements for returned federated credentials. The available options are: providers: An array of DOMString instances of identity providers to search for. protocols An array of DOMString instances of federation protocols to search for. publicKey: An PublicKeyCredentialRequestOptions object containing requirements for returned WebAuthn credentials. mediation: A String indicating whether the user will be required to log on for every visit to the website. Valid values are "silent", "option...
CustomEvent() - Web APIs
customEventInit Optional A CustomEventInit dictionary, having the following fields: "detail", optional and defaulting to null, of type any, that is an event-dependent value associated with the event. The CustomEventInit dictionary also accepts fields from the EventInit dictionary. ...
CustomEvent.initCustomEvent() - Web APIs
nt(). Once dispatched, it doesn't do anything anymore. Do not use this method anymore, as it is deprecated. Note: Rather than using the feature, instead use specific event constructors, like CustomEvent(). The page on Creating and triggering events gives more information about the way to use those. Syntax event.initCustomEvent(type, canBubble, cancelable, detail); Parameters type Is a DOMString containing the name of the event. canBubble Is a Boolean indicating whether the event bubbles up through the DOM or not. cancelable Is a Boolean indicating whether the event is cancelable. detail The data passed when initializing the event. Specifications Specification Status Comment DOMThe definition of 'CustomEvent' in that specification. Living Standard ...
DOMConfiguration - Web APIs
-form", "cdata-sections", "check-character-normalization", "comments", "datatype-normalization", "element-content-whitespace", "entities", "error-handler", "infoset", "namespaces", "namespace-declarations", "normalize-characters","schema-location", "schema-type", "split-cdata-sections", "validate", "validate-if-schema", "well-formed" Properties DOMConfiguration.parameterNames Read only Is a DOMStringList Methods DOMConfiguration.canSetParameter() Returns a Boolean DOMConfiguration.getParameter() Returns a DOMUserData DOMConfiguration.setParameter() Sets a parameter Specification http://www.w3.org/TR/DOM-Level-3-Cor...MConfiguration ...
DOMError - Web APIs
Web › API › DOMError
Error types Type Description IndexSizeError The index is not in the allowed range (e.g. thrown in a range object). HierarchyRequestError The node tree hierarchy is not correct. WrongDocumentError The object is in the wrong document. ...
DOMException() - Web APIs
The DOMException() constructor returns a DOMException object with a specified message and name. Syntax var domException = new DOMException(); var domException = new DOMException(message); var domException = new DOMException(message, name); Parameters message Optional A description of the exception. If not present, the empty string '' is used. name Optional Returns a DOMString that contains one of the strings associated with an error constant. Return value DOMException A newly created DOMException object. Example TBD Specifications Specification Status Comment Web IDLThe definition of 'DOMException()' in that specification. Candidate Recommendation Adds the constructor for the DOMException class. Browser Compatibility The compatibility t...
DOMException.message - Web APIs
Specifications Specification Status Comment Web IDLThe definition of 'message' in that specification. Candidate Recommendation Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
DOMException.name - Web APIs
Web › API › DOMException › name
The name read-only property of the DOMException interface returns a DOMString that contains one of the strings associated with an error name. Syntax var domExceptionName = domExceptionInstance.name; Value A DOMString. Specifications Specification Status Comment Web IDLThe definition of 'name' in that specification. Candidate Recommendation ...
DOMException - Web APIs
DOMException() Returns a DOMException object with a specified message and name. Properties DOMException.code Read only Returns a short that contains one of the error code constants, or 0 if none match. This field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the DOMException.name attribute. DOMException.message Read only Returns a DOMString representing a message or description associated with the given error name. DOMException.name Read only Returns a DOMString that contains one of the strings associated with an error name. Error names Common error names are listed here. Some APIs define their own sets of names, so this is not necessarily a complete list. Note: Because historically the errors were identified by a numeric va...
DOMImplementation.createDocumentType() - Web APIs
e DOMImplementation.createDocumentType() method returns a DocumentType object which can either be used with DOMImplementation.createDocument upon document creation or can be put into the document via methods like Node.insertBefore() or Node.replaceChild(). Syntax var doctype = document.implementation.createDocumentType(qualifiedNameStr, publicId, systemId); Parameters qualifiedNameStr Is a DOMString containing the qualified name, like svg:svg. publicId Is a DOMString containing the PUBLIC identifier. systemId Is a DOMString containing the SYSTEM identifiers. Example var dt = document.implementation.createDocumentType('svg:svg', '-//W3C//DTD SVG 1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'); var d = document.implementation.createDocument('http://www.w3.org/2000/sv...
DOMImplementation.createHTMLDocument() - Web APIs
Example This example creates a new HTML document and inserts it into an <iframe> in the current document. ...
DOMImplementation.hasFeature() - Web APIs
e is supported. It is deprecated and modern browsers return true in all cases. The different implementations fairly diverged in what kind of features were reported. The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use. Syntax const flag = document.implementation.hasFeature(feature, version); Parameters feature A DOMString representing the feature name. version A DOMString representing the version of the specification defining the feature. Specifications Specification Status Comment DOMThe definition of 'DOMImplementation.hasFeature' in that specification. Living Standard Modified to always return true except for SVG features. Document Object Model (DOM) Level 3 Core ...
DOMMatrixReadOnly - Web APIs
atrix. The elements are stored into the array as double-precision floating-point numbers in column-major (colexographical access access or "colex") order. (In other words, down the first column from top to bottom, then the second column, and so forth.) DOMMatrixReadOnly.toJSON() Returns a JSON representation of the DOMMatrixReadOnly object. DOMMatrixReadOnly.toString() Creates and returns a DOMString object which contains a string representation of the matrix in CSS matrix syntax, using the appropriate CSS matrix notation. See the matrix() CSS function for details on this syntax. For a 2D matrix, the elements a through f are listed, for a total of six values and the form matrix(a, b, c, d, e, f). For a 3D matrix, the returned string contains all 16 elements and takes the form matrix3d(m1...
DOMParser - Web APIs
Web › API › DOMParser
. These properties can also be read to fetch HTML fragments corresponding to the corresponding DOM subtree. Syntax let domparser = new DOMParser() Methods DOMParser.parseFromString() Syntax let doc = domparser.parseFromString(string, mimeType) Return Either Document or XMLDocument depending on the mimeType argument. Parameters This method has 2 parameters (both required): string The DOMString to be parsed. It must contain either HTML, xml, xhtml+xml, or svg document. mimeType A DOMString. This string determines a class of the the method's return value. The possible values are the following: mimeType doc.constructor text/html Document text/xml XMLDocument application/xml XMLDocument application/xhtm...
DOMTokenList.add() - Web APIs
Web › API › DOMTokenList › add
Return value undefined Examples In the following example we retrieve the list of classes set on a <span> element as a DOMTokenList using Element.classList. We then add a new token to the list, and write the list into the <span>'s Node.textContent. ...
DOMTokenList.contains() - Web APIs
Return value A Boolean, which is true if the calling list contains token, otherwise false. Examples In the following example we retrieve the list of classes set on a <span> element as a DOMTokenList using Element.classList. ...
DOMTokenList.entries() - Web APIs
Syntax tokenList.entries(); Return value Returns an iterator. Examples In the following example we retrieve the list of classes set on a <span> element as a DOMTokenList using Element.classList. We when retrieve an iterator containing the key/value pairs using entries(), then iterate through each one using a for...of loop, writing them to the <span>'s Node.textContent. ...
DOMTokenList.item() - Web APIs
Web › API › DOMTokenList › item
It returns null if the number is greater than or equal to the length of the list. Examples In the following example we retrieve the list of classes set on a <span> element as a DOMTokenList using Element.classList. We then retrieve the last item in the list using item(tokenList.length - 1), and write it into the <span>'s Node.textContent. ...
DOMTokenList.remove() - Web APIs
If the string is not in the list, no error is thrown, and nothing happens. Return value undefined Examples In the following example we retrieve the list of classes set on a <span> element as a DOMTokenList using Element.classList. We then remove a token from the list, and write the list into the <span>'s Node.textContent. ...
DOMTokenList.replace() - Web APIs
The replace() method of the DOMTokenList interface replaces an existing token with a new token. If the first token doesn't exist, replace() returns false immediately, without adding the new token to the token list. Syntax tokenList.replace(oldToken, newToken); Parameters oldToken A DOMString representing the token you want to replace. newToken A DOMString representing the token you want to replace oldToken with. Return value A boolean value, which is true if oldToken was successfully replaced, or false if not. Note: In older browsers, replace() returns void. Examples In the following example we retrieve the list of classes set on a <span> element as a DOMTokenList using Element.classList. We then replace a token in the list, and write the list into the <span>'s Node.textContent. ...
DOMTokenList.supports() - Web APIs
Returns A Boolean indicating whether the token was found. ...
DOMTokenList.toggle() - Web APIs
force Optional A Boolean that, if included, turns the toggle into a one way-only operation. If set to false, then token will only be removed, but not added. If set to true, then token will only be added, but not removed. ...
DOMTokenList.value - Web APIs
The value property of the DOMTokenList interface is a stringifier that returns the value of the list as a DOMString, or clears and sets the list to the given value. Syntax tokenList.value; Value A DOMString Examples In the following example we retrieve the list of classes set on a <span> element as a DOMTokenList using Element.classList, then write the value of the list to the <span>'s Node.textContent. First, the HTML: <span class="a b c"></span> Now the JavaScript: let span = document.querySelector("span"); let classes = span.classList; span.textContent = classes.value; The output looks like this: Specifications Specification Status Comment DOMThe definition of 'value' in that specification. Living Standard Initial definition ...
DOMTokenList.values() - Web APIs
Syntax tokenList.values(); Parameters None. Return value Returns an iterator. Examples In the following example we retrieve the list of classes set on a <span> element as a DOMTokenList using Element.classList. We when retrieve an iterator containing the values using values(), then iterate through those values using a for ... of loop, writing each one to the <span>'s Node.textContent. ...
DOMTokenList - Web APIs
nt.relList, HTMLAreaElement.relList, HTMLIframeElement.sandbox, or HTMLOutputElement.htmlFor. It is indexed beginning with 0 as with JavaScript Array objects. DOMTokenList is always case-sensitive. Properties DOMTokenList.length Read only Is an integer representing the number of objects stored in the object. DOMTokenList.value A stringifier property that returns the value of the list as a DOMString. Methods DOMTokenList.item(index) Returns the item in the list by its index, or undefined if index is greater than or equal to the list's length. DOMTokenList.contains(token) Returns true if the list contains the given token, otherwise false. DOMTokenList.add(token1[, token2[, ...tokenN]]) Adds the specified token(s) to the list. DOMTokenList.remove(token1[, token2[, ...tokenN]]) Remo...
DataTransfer.dropEffect - Web APIs
d than the action that the user is requesting. For the drop and dragend events, dropEffect will be set to the action that was desired, which will be the value dropEffect had after the last dragenter or dragover event. In a dragend event, for instance, if the desired dropEffect is "move", then the data being dragged should be removed from the source. Syntax dataTransfer.dropEffect; Values A DOMString representing the drag operation effect. The possible values are: copy A copy of the source item is made at the new location. move An item is moved to a new location. link A link is established to the source at the new location. none The item may not be dropped. Assigning any other value to dropEffect has no effect and the old value is retained. Example This example shows the use of ...
DataTransfer.effectAllowed - Web APIs
tart event to set the desired drag effect for the drag source. Within the dragenter and dragover event handlers, this property will be set to whatever value was assigned during the dragstart event, thus effectAllowed may be used to determine which effect is permitted. Assigning a value to effectAllowed in events other than dragstart has no effect. Syntax dataTransfer.effectAllowed; Values A DOMString representing the drag operation that is allowed. The possible values are: none The item may not be dropped. copy A copy of the source item may be made at the new location. copyLink A copy or link operation is permitted. copyMove A copy or move operation is permitted. link A link may be established to the source at the new location. linkMove A link or move operation is permitted. mo...
DataTransfer.mozCursor - Web APIs
s. The possible values are: auto Uses the default system behavior. default Uses the default Gecko behavior, which is to set the cursor to an arrow during the drag operation. Note: If any value other than default is set, auto is assumed. Note: This property is currently only implemented on Windows. Note: This property is Gecko-specific. Syntax dataTransfer.mozCursor; Return value A DOMString representing one of the values listed above. Example This example shows the use of the mozCursor property. function drop_handler(event) { var dragData = event.dataTransfer; console.log("mozCursor = " + dragData.mozCursor); } Specifications This property is not defined in any Web standard. ...
DataTransfer.setData() - Web APIs
the drag data store, such that the last item in the types list will be the new type. If data for the given type already exists, the existing data is replaced in the same position. That is, the order of the types list is not changed when replacing data of the same type. Example data types are text/plain and text/uri-list. Syntax void dataTransfer.setData(format, data); Arguments format A DOMString representing the type of the drag data to add to the drag object. data A DOMString representing the data to add to the drag object. Return value void Example This example shows the use of the DataTransfer object's getData(), setData() and clearData() methods. <!DOCTYPE html> <html lang=en> <title>Examples of DataTransfer's setData(), getData() and clearData()</title> <meta content="wid...
DataTransferItem.getAsString() - Web APIs
em's string data as the argument if the item's kind is a Plain unicode string (i.e. kind is string). Syntax dataTransferItem.getAsString(callback); Parameters callback A callback function that has access to the data transfer item's string data. See Callback below for details. Return value undefined Callback The callback parameter is a callback function which accepts one parameter: DOMString The drag data item's string data. The callback return value is undefined. Example This example shows the use of the getAsString() method as an inline function in a drop event handler. function drop_handler(ev) { console.log("Drop"); ev.preventDefault(); var data = ev.dataTransfer.items; for (var i = 0; i < data.length; i += 1) { if ((data[i].kind == 'string') && (data[i].type.
DataTransferItem.kind - Web APIs
It must be one of the following values: 'file' If the drag data item is a file. 'string' If the kind of drag data item is a plain Unicode string. Example This example shows the use of the kind property. ...
DataTransferItem.type - Web APIs
Example This example shows the use of the type property. ...
DedicatedWorkerGlobalScope.name - Web APIs
The name read-only property of the DedicatedWorkerGlobalScope interface returns the name that the Worker was (optionally) given when it was created. This is the name that the Worker() constructor can pass to get a reference to the DedicatedWorkerGlobalScope. Syntax var nameObj = self.name; Value A DOMString. Example If a worker is created using a constructor with a name option: var myWorker = new Worker("worker.js", { name : "myWorker" }); the DedicatedWorkerGlobalScope will now have a name of "myWorker", returnable by running self.name from inside the worker. Specifications Specification Status Comment HTML Living StandardThe definition of 'name' in that specification. Living Standard ...
Document.URL - Web APIs
Web › API › Document › URL
...
Document.dir - Web APIs
Web › API › Document › dir
Possible values are 'rtl', right to left, and 'ltr', left to right. Syntax dirStr = document.dir document.dir = dirStr Specifications Specification Status Comment HTML Living StandardThe definition of 'Document.dir' in that specification. ...
Document.execCommand() - Web APIs
able, execCommand() affects the currently active editable element. Syntax document.execCommand(aCommandName, aShowDefaultUI, aValueArgument) Return value A Boolean that is false if the command is unsupported or disabled. Note: Only returns true if part of a user interaction. Don't try using the return value to verify browser support before calling a command. Parameters aCommandName A DOMString specifying the name of the command to execute. See Commands for a list of possible commands. aShowDefaultUI A Boolean indicating whether the default user interface should be shown. This is not implemented in Mozilla. aValueArgument For commands which require an input argument, is a DOMString providing that information. For example, insertImage requires the URL of the image to insert. Specify ...
Document.location - Web APIs
Web › API › Document › location
This means that you can work with document.location as if it were a string in most cases: document.location = 'http://www.example.com' is a synonym of document.location.href = 'http://www.example.com'. ...
Document.querySelector() - Web APIs
the specified selector, or group of selectors. If no matches are found, null is returned. Note: The matching is done using depth-first pre-order traversal of the document's nodes starting with the first element in the document's markup and iterating through sequential nodes by order of the number of child nodes. Syntax element = document.querySelector(selectors); Parameters selectors A DOMString containing one or more selectors to match. This string must be a valid CSS selector string; if it isn't, a SYNTAX_ERR exception is thrown. See Locating DOM elements using selectors for more about selectors and how to manage them. Note: Characters that are not part of standard CSS syntax must be escaped using a backslash character. Since JavaScript also uses backslash escaping, be especially ca...
Document.querySelectorAll() - Web APIs
The Document method querySelectorAll() returns a static (not live) NodeList representing a list of the document's elements that match the specified group of selectors. Note: This method is implemented based on the ParentNode mixin's querySelectorAll() method. Syntax elementList = parentNode.querySelectorAll(selectors); Parameters selectors A DOMString containing one or more selectors to match against. This string must be a valid CSS selector string; if it's not, a SyntaxError exception is thrown. See Locating DOM elements using selectors for more information about using selectors to identify elements. Multiple selectors may be specified by separating them using commas. Note: Characters which are not part of standard CSS syntax must be escaped using a backslash character. Since JavaSc...
DocumentFragment.querySelector() - Web APIs
the document's nodes) that matches the specified group of selectors. If the selector matches an ID and this ID is erroneously used several times in the document, it returns the first matching element. If the selectors specified in parameter are invalid a DOMException with a SYNTAX_ERR value is raised. Syntax element = documentfragment.querySelector(selectors); Parameters selectors Is a DOMString containing one or more CSS selectors separated by commas. Examples Basic example In this basic example, the first element in the DocumentFragment with the class "myclass" is returned: var el = documentfragment.querySelector(".myclass"); CSS syntax and the method's argument The string argument pass to querySelector must follow the CSS syntax. To match ID or selectors that do not follow the...
DocumentFragment.querySelectorAll() - Web APIs
ntFragment (using depth-first pre-order traversal of the document's nodes) that matches the specified group of selectors. If the selectors specified in parameter are invalid a DOMException with a SYNTAX_ERR value is raised. Note: The definition of this API was moved to the ParentNode interface. Syntax elementList = documentfragment.querySelectorAll(selectors); Parameters selectors Is a DOMString containing one or more CSS selectors separated by commas. Examples This example returns a list of all div elements within the DocumentFragment with a class of either "note" or "alert": var matches = documentfrag.querySelectorAll("div.note, div.alert"); Specifications Specification Status Comment Selectors API Level 1The definition of 'DocumentFragment.querySelectorA...
DragEvent() - Web APIs
ic DragEvent object. Although this interface has a constructor, it is not possible to create a useful DataTransfer object from script, since DataTransfer objects have a processing and security model that is coordinated by the browser during drag-and-drops. This interface inherits properties from MouseEvent and Event. Syntax event = new DragEvent(type, DragEventInit); Arguments type Is a DOMString representing the name of the event (see DragEvent event types). DragEventInitOptional Is a DragEventInit dictionary, having the following fields: "dataTransfer", optional and defaults to "null". The type is DataTransfer. The DragEventInit dictionary inherits from the MouseEventInit dictionary. Specifications Specification Status Comment HTML Living Standa...
EcKeyGenParams - Web APIs
The EcKeyGenParams dictionary of the Web Crypto API represents the object that should be passed as the algorithm parameter into SubtleCrypto.generateKey(), when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as either of ECDSA or ECDH. Properties name A DOMString. This should be set to ECDSA or ECDH, depending on the algorithm you want to use. namedCurve A DOMString representing the name of the elliptic curve to use. This may be any of the following names for NIST-approved curves: P-256 P-384 P-521 Examples See the examples for SubtleCrypto.generateKey(). Specifications Specification Status Comment Web Cryptography APIThe definition of 'SubtleCrypto.EcKeyGenParams' in that specification. Recommendation ...
EcKeyImportParams - Web APIs
The EcKeyImportParams dictionary of the Web Crypto API represents the object that should be passed as the algorithm parameter into SubtleCrypto.importKey() or SubtleCrypto.unwrapKey(), when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as either of ECDSA or ECDH. Properties name A DOMString. This should be set to ECDSA or ECDH, depending on the algorithm you want to use. namedCurve A DOMString representing the name of the elliptic curve to use. This may be any of the following names for NIST-approved curves: P-256 P-384 P-521 Examples See the examples for SubtleCrypto.importKey(). Specifications Specification Status Comment Web Cryptography APIThe definition of 'SubtleCrypto.EcKeyImportParams' in that speci...
EcdhKeyDeriveParams - Web APIs
c and a private key to derive a shared secret. They exchange public keys and use the combination of their private key and the other entity's public key to derive a secret key that they -- and noone else -- share. The parameters for ECDH deriveKey() therefore include the other entity's public key, which is combined with this entity's private key to derive the shared secret. Properties name A DOMString. This should be set to ECDH. public A CryptoKey object representing the public key of the other entity. Examples See the examples for SubtleCrypto.deriveKey(). Specifications Specification Status Comment Web Cryptography APIThe definition of 'SubtleCrypto.EcdhKeyDeriveParams' in that specification. Recommendation ...
EffectTiming.direction - Web APIs
ction. The value of direction corresponds directly to AnimationEffectTimingReadOnly.direction in timing objects returned by AnimationEffectReadOnly, KeyframeEffectReadOnly, and KeyframeEffect. Syntax var timingProperties = { direction: "normal" | "reverse" | "alternate" | "alternate-reverse" }; timingProperties.direction = "normal" | "reverse" | "alternate" | "alternate-reverse"; Value A DOMString which specifies the direction in which the animation should play as well as what to do when the playback reaches the end of the animation sequence in the current direction. It can take one of the following values, with the default being "normal": "normal" The animation runs forwards, from beginning to end, in the way we experience the flow of time. "reverse" The animation runs backwards, or...
EffectTiming.easing - Web APIs
ctTimingReadOnly.easing in timing objects returned by AnimationEffectReadOnly, KeyframeEffectReadOnly, and KeyframeEffect. Syntax var timingProperties = { easing: single-transition-timing-function } timingProperties.easing = single-transition-timing-function Value A string defining the timing function to use for easing transitions during the animation process. Accepts several pre-defined DOMString values, a steps() timing function like steps(5, end), or a custom cubic-bezier value like cubic-bezier(0.42, 0, 0.58, 1). Defaults to linear. Available values include: linear A constant rate of change, neither accelerating nor deccelerating. cubic-bezier(<number>, <number>, <number>, <number>) Specifies a cubic Bezier timing function. The four numbers specify points P1 and P2 of the curv...
EffectTiming.fill - Web APIs
Web › API › EffectTiming › fill
on below for approaches that are simpler and more performant. Element.animate(), and KeyframeEffect() accept an object of timing properties including fill. The value of fill corresponds directly to fill in EffectTiming objects returned by getTiming() in AnimationEffect and KeyframeEffect. Syntax var timingProperties = { fill: "none" | "forwards" | "backwards" | "both" | "auto" } Value A DOMString indicating the fill type to use in order to properly render an affected element when outside the animation's active interval (that is, when it's not actively animating). The default is "auto". "none" The animation's effects are only visible while the animation is iterating or its playhead is positioned over an iteration. The animation's effects are not visible when its playState is pending wi...
Element.animate() - Web APIs
Web › API › Element › animate
te(keyframes, options); Parameters keyframes Either an array of keyframe objects, or a keyframe object whose property are arrays of values to iterate over. See Keyframe Formats for more details. options Either an integer representing the animation's duration (in milliseconds), or an Object containing one or more timing properties: id Optional A property unique to animate(): a DOMString with which to reference the animation. delay Optional The number of milliseconds to delay the start of the animation. Defaults to 0. direction Optional Whether the animation runs forwards (normal), backwards (reverse), switches direction after each iteration (alternate), or runs backwards and switches direction after each iteration (alternate-reverse). Defaults to "normal". duration Opti...
Element.closest() - Web APIs
Web › API › Element › closest
The closest() method traverses the Element and its parents (heading toward the document root) until it finds a node that matches the provided selector string. Will return itself or the matching ancestor. If no such element exists, it returns null. Syntax var closestElement = targetElement.closest(selectors); Parameters selectors is a DOMString containing a selector list. ex: p:hover, .toto + q Return value closestElement is the Element which is the closest ancestor of the selected element. It may be null. Exceptions SyntaxError is thrown if the selectors is not a valid selector list string. Example HTML <article> <div id="div-01">Here is div-01 <div id="div-02">Here is div-02 <div id="div-03">Here is div-03</div> </div> </div> </article> JavaScript var el...
Element.getElementsByClassName() - Web APIs
method getElementsByClassName() returns a live HTMLCollection which contains every descendant element which has the specified class name or names. The method getElementsByClassName() on the Document interface works essentially the same way, except it acts on the entire document, starting at the document root. Syntax var elements = element.getElementsByClassName(names); Parameters names A DOMString containing one or more class names to match on, separated by whitespace. Return value An HTMLCollection providing a live-updating list of every element which is a member of every class in names. Usage notes As always, the returned collection is live, meaning that it always reflects the current state of the DOM tree rooted at the element on which the function was called. As new elements that ...
Element.innerHTML - Web APIs
Web › API › Element › innerHTML
ers (&), (<), or (>), innerHTML returns these characters as the HTML entities "&amp;", "&lt;" and "&gt;" respectively. Use Node.textContent to get a raw copy of these text nodes' contents. To insert the HTML into the document rather than replace the contents of an element, use the method insertAdjacentHTML(). Syntax const content = element.innerHTML; element.innerHTML = htmlString; Value A DOMString containing the HTML serialization of the element's descendants. Setting the value of innerHTML removes all of the element's descendants and replaces them with nodes constructed by parsing the HTML given in the string htmlString. Exceptions SyntaxError An attempt was made to set the value of innerHTML using a string which is not properly-formed HTML. NoModificationAllowedError An attempt wa...
Element.insertAdjacentElement() - Web APIs
'afterbegin': Just inside the targetElement, before its first child. ...
Element.insertAdjacentHTML() - Web APIs
t as HTML or XML and inserts the resulting nodes into the DOM tree at a specified position. It does not reparse the element it is being used on, and thus it does not corrupt the existing elements inside that element. This avoids the extra step of serialization, making it much faster than direct innerHTML manipulation. Syntax element.insertAdjacentHTML(position, text); Parameters position A DOMString representing the position relative to the element; must be one of the following strings: 'beforebegin': Before the element itself. 'afterbegin': Just inside the element, before its first child. 'beforeend': Just inside the element, after its last child. 'afterend': After the element itself. text The string to be parsed as HTML or XML and inserted into the tree. Visualization of ...
Element.insertAdjacentText() - Web APIs
The insertAdjacentText() method of the Element interface inserts a given text node at a given position relative to the element it is invoked upon. Syntax element.insertAdjacentText(position, element); Parameters position A DOMString representing the position relative to the element; must be one of the following strings: 'beforebegin': Before the element itself. 'afterbegin': Just inside the element, before its first child. 'beforeend': Just inside the element, after its last child. 'afterend': After the element itself. element A DOMString representing the text to be inserted into the tree. Return value Void. Exceptions Exception Explanation SyntaxError The position specified is not a recognised value. Visualization of position names <...
Element.localName - Web APIs
Web › API › Element › localName
The Element.localName read-only property returns the local part of the qualified name of an element. In previous DOM specifications this API was defined within the Node interface. Syntax name = element.localName Return value A DOMString representing the local part of the element's qualified name. Example (Must be served with XML content type, such as text/xml or application/xhtml+xml.) <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <head> <script type="application/javascript"><![CDATA[ function test() { var text = document.getElementById('text'); var circle = document.getElementById('circle'); text.value = "<svg:circle> has:\n" + "localName = '" + circle.localName + "'\n" + "namespaceURI = '" + ...
Element.outerHTML - Web APIs
Web › API › Element › outerHTML
ing the element including its descendants. It can also be set to replace the element with nodes parsed from the given string. To only obtain the HTML representation of the contents of an element, or to replace the contents of an element, use the innerHTML property instead. Syntax var content = element.outerHTML; element.outerHTML = htmlString; Value Reading the value of outerHTML returns a DOMString containing an HTML serialization of the element and its descendants. Setting the value of outerHTML replaces the element and all of its descendants with a new DOM tree constructed by parsing the specified htmlString. Exceptions SyntaxError An attempt was made to set outerHTML using an HTML string which is not valid. NoModificationAllowedError An attempt was made to set outerHTML on an elem...
Element.querySelectorAll() - Web APIs
lement method querySelectorAll() returns a static (not live) NodeList representing a list of elements matching the specified group of selectors which are descendants of the element on which the method was called. Note: This method is implemented based on the ParentNode mixin's querySelectorAll() method. Syntax elementList = parentNode.querySelectorAll(selectors); Parameters selectors A DOMString containing one or more selectors to match against. This string must be a valid CSS selector string; if it's not, a SyntaxError exception is thrown. See Locating DOM elements using selectors for more information about using selectors to identify elements. Multiple selectors may be specified by separating them using commas. Note: Characters which are not part of standard CSS syntax must be escap...
Element.removeAttribute() - Web APIs
If the specified attribute does not exist, removeAttribute() returns without generating an error. Return value undefined. Usage notes You should use removeAttribute() instead of setting the attribute value to null either directly or using setAttribute(). Many attributes will not behave as expected if you set them to null. ...
Element.setAttribute() - Web APIs
Sets the value of an attribute on the specified element. If the attribute already exists, the value is updated; otherwise a new attribute is added with the specified name and value. To get the current value of an attribute, use getAttribute(); to remove an attribute, call removeAttribute(). Syntax Element.setAttribute(name, value); Parameters name A DOMString specifying the name of the attribute whose value is to be set. The attribute name is automatically converted to all lower-case when setAttribute() is called on an HTML element in an HTML document. value A DOMString containing the value to assign to the attribute. Any non-string value specified is converted automatically into a string. Boolean attributes are considered to be true if they're present on the element at all, regardles...
Element.slot - Web APIs
Web › API › Element › slot
The slot property of the Element interface returns the name of the shadow DOM slot the element is inserted in. A slot is a placeholder inside a web component that users can fill with their own markup (see Using templates and slots for more information). Syntax var aString = element.slot element.slot = aString Value A DOMString. Examples In our simple-template example (see it live), we create a trivial custom element example called <my-paragraph> in which a shadow root is attached and then populated using the contents of a template that contains a slot named my-text. When <my-paragraph> is used in the document, the slot is populated by a slotable element by including it inside the element with a slot attribute with the value my-text. Here is one such example: <my-paragraph> <span slot="...
Element.toggleAttribute() - Web APIs
The attribute name is automatically converted to all lower-case when toggleAttribute() is called on an HTML element in an HTML document. ...
ErrorEvent - Web APIs
l="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="166" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">ErrorEvent</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Also inherits properties from its parent Event. ErrorEvent.message Read only Is a DOMString containing a human-readable error message describing the problem. ErrorEvent.filename Read only Is a DOMString containing the name of the script file in which the error occurred. ErrorEvent.lineno Read only Is an integer containing the line number of the script file on which the error occurred. ErrorEvent.colno Read only Is an integer containing the column number of the script file on wh...
Event() - Web APIs
Web › API › Event › Event
eventInit Optional This is an EventInit dictionary, having the following optional fields: bubbles Optional A Boolean indicating whether the event bubbles. The default is false. cancelable Optional A Boolean indicating whether the event can be cancelled. The default is false. composed Optional A Boolean indicating whether the event will trigger listeners outside of a shadow root (see Event.composed for more details). The default is false. ...
Event.initEvent() - Web APIs
Web › API › Event › initEvent
d to set the event before it is dispatched, using EventTarget.dispatchEvent(). Once dispatched, it doesn't do anything anymore. Do not use this method anymore as it is deprecated. Instead use specific event constructors, like Event(). The page on Creating and triggering events gives more information about the way to use these. Syntax event.initEvent(type, bubbles, cancelable); type Is a DOMString defining the type of event. bubbles Is a Boolean deciding whether the event should bubble up through the event chain or not. Once set, the read-only property Event.bubbles will give its value. cancelable Is a Boolean defining whether the event can be canceled. Once set, the read-only property Event.cancelable will give its value. Example // Create the event. var event = document.createEven...
Event.msConvertURL() - Web APIs
corresponds to each file in the clipboardData.files collection, allowing otherwise inaccessible files to be converted to blob or data URIs. This proprietary method is specific to Internet Explorer and the Microsoft Edge browser. Syntax var retVal = DragEvent.msConvertURL(file, targetType, targetURL); Parameters file [in] Type: File The file object to be converted. targetType [in] Type: DOMString One of the following values indicating the desired conversion type: "specified", "base64", or "unchanged". targetURL [in, optional] Type: URL The target URL. Return value This method does not return a value. Example var blobList = []; document.getElementById("pasteZone").addEventListener('paste', handlePaste, false); function handlePaste(evt) { var fileList = window.clip...
Event.type - Web APIs
Web › API › Event › type
The type read-only property of the Event interface returns a string containing the event's type. It is set when the event is constructed and is the name commonly used to refer to the specific event, such as click, load, or error. For a list of available event types, see the event reference. Syntax let eventType = event.type; Value A DOMString containing the type of Event. Example This example logs the event type whenever you press a keyboard key or click a mouse button. HTML <p>Press any key or click the mouse to get the event type.</p> <p id="log"></p> JavaScript function getEventType(event) { const log = document.getElementById('log'); log.innerText = event.type + '\n' + log.innerText; } // Keyboard events document.addEventListener('keydown', getEventType, false); // first docu...
EventSource.url - Web APIs
Web › API › EventSource › url
Examples var evtSource = new EventSource('sse.php'); console.log(evtSource.url); Note: You can find a full example on GitHub -- see Simple SSE demo using PHP. ...
EventSource - Web APIs
EventSource() Creates a new EventSource to handle receiving server-sent events from a specified URL, optionally in credentials mode. Properties This interface also inherits properties from its parent, EventTarget. EventSource.readyState Read only A number representing the state of the connection. Possible values are CONNECTING (0), OPEN (1), or CLOSED (2). EventSource.url Read only A DOMString representing the URL of the source. EventSource.withCredentials Read only A Boolean indicating whether the EventSource object was instantiated with cross-origin (CORS) credentials set (true), or not (false, the default). Event handlers EventSource.onerror Is an EventHandler called when an error occurs and the error event is dispatched on an EventSource object. EventSource.onmessage Is ...
ExtendableMessageEvent() - Web APIs
The ExtendableMessageEvent() constructor creates a new ExtendableMessageEvent object instance. Syntax var extendableMessageEvent = new ExtendableMessageEvent(type, init); Parameters type A DOMString that defines the type of the message event being created. init Optional An initialisation object, which should contain the following parameters: data: The event's data -- this can be any data type. origin: A DOMString that defines the origin of the corresponding service worker's environment settings object. lastEventId: A DOMString that defines the last event ID of the event source. source: The Client, ServiceWorker or MessagePort that sent the message. ports: An array containing the MessagePort objects connected to the channel sending the message. Examples var init = { ...
ExtendableMessageEvent.lastEventId - Web APIs
Examples When the following code is used inside a service worker to respond to a push messages by sending the data received via PushMessageData to the main context via a channel message, the event object of onmessage will be a ExtendableMessageEvent. ...
FederatedCredential - Web APIs
erface may be passed in the credential member of the init object for global fetch. Constructor FederatedCredential() Creates a new FederatedCredential object. Properties Inherits properties from its ancestor, Credential. FederatedCredential.provider Read only Returns a USVString containing a credential's federated identity provider. FederatedCredential.protocol Read only Returns a DOMString containing a credential's federated identity protocol. Event handlers None. Methods None. Examples var cred = new FederatedCredential({ id: id, name: name, provider: 'https://account.google.com', iconURL: iconUrl }); // Store it navigator.credentials.store(cred) .then(function() { // Do something else. }); Specifications Specification Status Comment C...
FetchEvent.clientId - Web APIs
The clientId read-only property of the FetchEvent interface returns the id of the Client that the current service worker is controlling. The Clients.get() method could then be passed this ID to retrieve the associated client. Syntax var myClientId = fetchEvent.clientId; Value A DOMString that represents the client ID. Example self.addEventListener('fetch', function(event) { console.log(event.clientId); }); Specifications Specification Status Comment Service WorkersThe definition of 'clientId' in that specification. Working Draft Initial definition. ...
FetchEvent.replacesClientId - Web APIs
tring when navigating from about:blank to another page, as about:blank's client will be reused, rather than be replaced. Additionally, if the fetch isn't a navigation, replacesClientId will be an empty string. This could be used to access/communicate with a client that will imminently be replaced, right before a navigation. Syntax var myReplacedClientId = fetchEvent.replacesClientId; Value A DOMString. Example self.addEventListener('fetch', function(event) { console.log(event.replacesClientId); }); Specifications Specification Status Comment Service WorkersThe definition of 'replacesClientId' in that specification. Working Draft Initial definition. ...
FetchEvent.resultingClientId - Web APIs
id of the client that replaces the previous client during a page navigation. For example, when navigating from page A to page B resultingClientId is the ID of the client associated with page B. If the fetch request is a subresource request or the request's destination is report, resultingClientId will be an empty string. Syntax var myResultingClientId = fetchEvent.resultingClientId; Value A DOMString. Example self.addEventListener('fetch', function(event) { console.log(event.resultingClientId); }); Specifications Specification Status Comment Service WorkersThe definition of 'resultingClientId' in that specification. Working Draft Initial definition. ...
File.File() - Web APIs
Web › API › File › File
ns]); Parameters bits An Array of ArrayBuffer, ArrayBufferView, Blob, USVString objects, or a mix of any of such objects, that will be put inside the File. USVString objects are encoded as UTF-8. name A USVString representing the file name or the path to the file. options Optional An options object containing optional attributes for the file. Available options are as follows: type: A DOMString representing the MIME type of the content that will be put into the file. Defaults to a value of "". lastModified: A number representing the number of milliseconds between the Unix time epoch and when the file was last modified. Defaults to a value of Date.now(). Example var file = new File(["foo"], "foo.txt", { type: "text/plain", }); Specifications Specification Status ...
FileReaderSync.readAsBinaryString() - Web APIs
Note: This method is deprecated in favor of readAsArrayBuffer(). The readAsBinaryString() method of the FileReaderSync interface allows to read File or Blob objects in a synchronous way into an DOMString. This interface is only available in workers as it enables synchronous I/O that could potentially block. Syntax readAsBinaryString(File); readAsBinaryString(Blob); Parameters blob The DOM File or Blob to read. Return value An DOMString representing the input data. Exceptions The following exceptions can be raised by this method: NotFoundError is raised when the resource represented by the DOM File or Blob cannot be found, e.g. because it has been erased. SecurityError is raised when one of the following problematic situation is detected: the resource has been modified b...
FileReaderSync.readAsText() - Web APIs
The readAsText() method of the FileReaderSync interface allows to read File or Blob objects in a synchronous way into an DOMString. This interface is only available in workers as it enables synchronous I/O that could potentially block. Syntax readAsText(File); readAsText(Blob); readAsText(File, encoding); readAsText(Blob, encoding); Parameters blob The DOM File or Blob to read. encoding The optional parameter specifies encoding to be used (e.g., iso-8859-1 or UTF-8). If not present, the method will apply a detection algorithm for it. Return value An DOMString representing the input data. Exceptions The following exceptions can be raised by this method: NotFoundError is raised when the resource represented by the DOM File or Blob cannot be found, e.g. because it has been erased. ...
FileSystemEntry.toURL() - Web APIs
src and href attributes. Syntax FileSystemEntry.toURL([mimeType]); Parameters mimeType Optional An optional string specifying the MIME type to use when interpreting the file. This can be used to help deal with files whose types aren't recognized automatically by the user agent. If this parameter is omitted, the user agent uses its standard algorithms to identify the file. Return value A DOMString containing a URL that can then be used as a document reference in HTML content, or an empty string if the URL can't be generated (such as if the file system implementation doesn't support toURL()). Example If you have a FileSystemFileEntry corresponding to an image file in a file system available to your Web site or app, you can call toURL() to get its URL for use in HTML. If your site is locat...
FileSystemSync - Web APIs
ing Draft) drafted on April 19, 2011. The specification is abandonned for the moment, failing to get significant traction. Basic concepts The FileSystemSync object is your gateway to the entire API and you will use it a lot. So once you have a reference, cache the object in a global variable or class property. Attributes Attribute Type Description name readonly DOMString Name of the file system. The name must be unique across the list of exposed file systems. root readonly DirectoryEntry The root directory of the file system. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull r...
FocusEvent() - Web APIs
The FocusEvent() constructor returns a newly created FocusEvent object with an optional EventTarget. When the event has both a source and a destination, the relatedTarget value must be set to the other target. Syntax var focusEvent = new FocusEvent(typeArg[, focusEventInit]); Properties The FocusEvent() constructor also inherits arguments from UIEvent() and from Event(). typeArg Is a DOMString representing the name of the event. focusEventInit Optional Is a FocusEventInit dictionary, having the following fields: "relatedTarget", optional and defaulting to null, is an EventTarget representing the secondary target of a FocusEvent. The FocusEventInit dictionary also accepts fields from the UIEventInit and EventInit dictionaries. Specifications Specification Sta...
FontFace.family - Web APIs
Web › API › FontFace › family
The FontFace.family property allows the author to get or set the font family of a FontFace object. This is equivalent to the font-family descriptor of @font-face. Syntax instanceOfFontFace.family = 'font family name'; var fontFace = instanceOfFontFace.family; // "font family name" Value A DOMString. Example var fontFace = new FontFace('Roboto', 'url(https://fonts.example.com/roboto.woff2)'); console.log(fontFace.family); // 'Roboto' fontFace.family = 'newRoboto'; console.log(fontFace.family); // 'newRoboto' Specifications Specification Status Comment CSS Font Loading Module Level 3The definition of 'family' in that specification. Working Draft Initial definition ...
FormDataEvent() - Web APIs
formEventInit Optional A FormEventInit dictionary, which can take the following optional fields: bubbles: a Boolean indicating whether the event bubbles. The default is false. cancelable: a Boolean indicating whether the event can be cancelled. The default is false. composed: a Boolean indicating whether the event will trigger listeners outside of a shadow root (see Event.composed for more details). The default is false. ...
Gamepad.id - Web APIs
Web › API › Gamepad › id
ated by dashes (-): Two 4-digit hexadecimal strings containing the USB vendor and product id of the controller The name of the controller as provided by the driver. For example, a PS2 controller returned 810-3-USB Gamepad. This information is intended to allow you to find a mapping for the controls on the device as well as display useful feedback to the user. Syntax readonly attribute DOMString id; Example window.addEventListener("gamepadconnected", function() { var gp = navigator.getGamepads()[0]; gamepadInfo.innerHTML = "Gamepad connected at index " + gp.index + ": " + gp.id + "."; }); Value A string. Specifications Specification Status Comment GamepadThe definition of 'Gamepad.id' in that specification. Working Draft Initial definitio...
Gamepad.mapping - Web APIs
Web › API › Gamepad › mapping
The Gamepad.mapping property of the Gamepad interface returns a string indicating whether the browser has remapped the controls on the device to a known layout. Currently there is only one supported known layout-the standard gamepad. If the browser is able to map controls on the device to that layout the mapping property will be set to the string standard. Syntax readonly attribute DOMString mapping; Example var gp = navigator.getGamepads()[0]; console.log(gp.mapping); Value A string. Specifications Specification Status Comment GamepadThe definition of 'Gamepad.mapping' in that specification. Working Draft Initial definition ...
Gamepad - Web APIs
Web › API › Gamepad
getGamepads() method. Properties Gamepad.axes Read only An array representing the controls with axes present on the device (e.g. analog thumb sticks). Gamepad.buttons Read only An array of gamepadButton objects representing the buttons present on the device. Gamepad.connected Read only A boolean indicating whether the gamepad is still connected to the system. Gamepad.id Read only A DOMString containing identifying information about the controller. Gamepad.index Read only An integer that is auto-incremented to be unique for each device currently connected to the system. Gamepad.mapping Read only A string indicating whether the browser has remapped the controls on the device to a known layout. Gamepad.timestamp Read only A DOMHighResTimeStamp representing the last time the dat...
GamepadEvent() - Web APIs
options Optional Options are as follows: gamepad: An instance of Gamepad describing the gamepad associated with the event. ...
GeolocationPositionError.message - Web APIs
The GeolocationPositionError.message read-only property returns a human-readable DOMString describing the details of the error. Syntax let msg = geolocationPositionErrorInstance.message Value A human-readable DOMString describing the details of the error. Specifications Specification Status Comment Geolocation APIThe definition of 'GeolocationPositionError.message' in that specification. Recommendation Initial definition ...
GeolocationPositionError - Web APIs
VAILABLE The acquisition of the geolocation failed because at least one internal source of position returned an internal error. 3 TIMEOUT The time allowed to acquire the geolocation, defined by PositionOptions.timeout information was reached before the information was obtained. GeolocationPositionError.message Read only Secure context Returns a human-readable DOMString describing the details of the error. Specifications note that this is primarily intended for debugging use and not to be shown directly in a user interface. Methods The GeolocationPositionError interface neither implements nor inherits any method. Specifications Specification Status Comment Geolocation APIThe definition of 'GeolocationPositionError' in that specif...
HTMLAnchorElement.download - Web APIs
The value, if any, specifies the default file name for use in labeling the resource in a local file system. If the name is not a valid file name in the underlying OS, the browser will adjust it. Note: This value might not be used for download. This value cannot be used to determine whether the download will occur. Syntax var dnload = anchorElt.download; anchorElt.download = dnload; Specifications Specification Status Comment HTML Living StandardThe definition of 'download' in that specification. ...
HTMLAnchorElement.rel - Web APIs
Syntax var relstr = anchorElt.rel; anchorElt.rel = relstr; Example var anchors = document.getElementsByTagName("a"); var length = anchors.length; for (var i = 0; i < length; i++) { alert("Rel: " + anchors[i].rel); } Specifications Specification Status Comment HTML Living StandardThe definition of 'rel' in that specification. ...
HTMLAreaElement.rel - Web APIs
The HTMLAreaElement.rel property reflects the rel attribute. It is a DOMString containing a space-separated list of link types indicating the relationship between the resource represented by the <area> element and the current document. Syntax var relstr = areaElt.rel; areaElt.rel = relstr; Example var areas = document.getElementsByTagName("area"); var length = areas.length; for (var i = 0; i < length; i++) { alert("Rel: " + areas[i].rel); } Specifications Specification Status Comment HTML Living StandardThe definition of 'rel' in that specification. Living Standard Initial definition ...
Audio() - Web APIs
The Audio() constructor creates and returns a new HTMLAudioElement which can be either attached to a document for the user to interact with and/or listen to, or can be used offscreen to manage and play audio. Syntax audioObj = new Audio(url); Parameters url Optional An optional DOMString containing the URL of an audio file to be associated with the new audio element. Return value A new HTMLAudioElement object, configured to be used for playing back the audio from the file specified by url.The new object's preload property is set to auto and its src property is set to the specified URL or null if no URL is given. If a URL is specified, the browser begins to asynchronously load the media resource before returning the new object. Usage notes You can also use other element-creation meth...
HTMLBRElement - Web APIs
fill="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="426" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLBRElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLBRElement.clear Is a DOMString indicating the flow of text around floating objects. Methods No specific method; inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLBRElement' in that specification. Living Standard No change from HTML5 HTML5The definition of 'HTMLBRElement' in that specification. Reco...
HTMLBaseElement - Web APIs
ill="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLBaseElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLBaseElement.href Is a DOMString that reflects the href HTML attribute, containing a base URL for relative URLs in the document. HTMLBaseElement.target Is a DOMString that reflects the target HTML attribute, containing a default target browsing context or frame for elements that do not have a target reference specified. Methods No specific method; inherits attributes from its parent, HTMLElement. Specifications S...
HTMLCanvasElement.getContext() - Web APIs
same drawing context instance as was returned the last time the method was invoked with the same contextType argument. To get a different drawing context object you need to pass a different contextType or call the method on a different canvas element. Syntax var ctx = canvas.getContext(contextType); var ctx = canvas.getContext(contextType, contextAttributes); Parameters contextType Is a DOMString containing the context identifier defining the drawing context associated to the canvas. Possible values are: "2d", leading to the creation of a CanvasRenderingContext2D object representing a two-dimensional rendering context. "webgl" (or "experimental-webgl") which will create a WebGLRenderingContext object representing a three-dimensional rendering context. This context is only available ...
HTMLCanvasElement.mozFetchAsStream() - Web APIs
The default type is image/png. ...
HTMLCanvasElement.toBlob() - Web APIs
pecified, the image type is image/png. The created image is in a resolution of 96dpi. The third argument is used when creating images using lossy compression (namely, image/jpeg) to specify the quality of the output. Syntax canvas.toBlob(callback, mimeType, qualityArgument); Parameters callback A callback function with the resulting Blob object as a single argument. mimeType Optional A DOMString indicating the image format. The default type is image/png. qualityArgument Optional A Number between 0 and 1 indicating image quality if the requested type is image/jpeg or image/webp. If this argument is anything else, the default values 0.92 and 0.80 are used for image/jpeg and image/webp respectively. Other arguments are ignored. Return value None. Exceptions SecurityError The canva...
HTMLContentElement.select - Web APIs
The HTMLContentElement.select property reflects the select attribute. It is a DOMString containing a space-separated list of CSS selectors that select the content to insert in place of the <content> element. Syntax object.select = "CSSselector CSSselector ..."; Example // Select <h1> elements and elements with class="error" myContentObject.select = "h1 .error"; Specifications This feature is no longer defined by any standards. ...
HTMLContentElement - Web APIs
The value is a comma-separated list of CSS selectors that select the content to insert in place of the <content> element. Methods This interface inherits the methods of HTMLElement. ...
HTMLDataElement - Web APIs
ll="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLDataElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLDataElement.value Is a DOMString reflecting the value HTML attribute, containing a machine-readable form of the element's value. Methods No specific method; inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLDataElement' in that specification. Living Standard HTML5The definition of 'HTMLDataElement' in...
HTMLDialogElement.close() - Web APIs
Return value Void. Examples The following example shows a simple button that, when clicked, opens a <dialog> containing a form via the showModal() method. From there you can click the Cancel button to close the dialog (via the HTMLDialogElement.close() method), or submit the form via the submit button. ...
HTMLDialogElement.returnValue - Web APIs
Examples The following example displays a button to open a <dialog> containing a form via the showModal() method. From there, either button will close the dialog. ...
HTMLDialogElement - Web APIs
ce" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLDialogElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLDialogElement.open A Boolean reflecting the open HTML attribute, indicating whether the dialog is available for interaction. HTMLDialogElement.returnValue A DOMString that sets or returns the return value for the dialog. Methods Inherits methods from its parent, HTMLElement. HTMLDialogElement.close() Closes the dialog. An optional DOMString may be passed as an argument, updating the returnValue of the the dialog. HTMLDialogElement.show() Displays the dialog modelessly, i.e. still allowing interaction with content outside of the dialog. HTMLDialogElem...
HTMLDivElement - Web APIs
ll="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="421" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLDivElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLDivElement.align Is a DOMString representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context. The possible values are "left", "right", "justify", and "center". Methods No specific method; inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLDivElement' in tha...
HTMLElement.innerText - Web APIs
if they highlighted the contents of the element with the cursor and then copied it to the clipboard. Note: innerText is easily confused with Node.textContent, but there are important differences between the two. Basically, innerText is aware of the rendered appearance of text, while textContent is not. Syntax const renderedText = htmlElement.innerText htmlElement.innerText = string Value A DOMString representing the rendered text content of an element. If the element itself is not being rendered (e.g detached from the document or is hidden from view), the returned value is the same as the Node.textContent property. Example This example compares innerText with Node.textContent. Note how innerText is aware of things like <br> elements, and ignores hidden elements. HTML <h3>Source element:<...
HTMLFontElement.color - Web APIs
The obsolete HTMLFontElement.color property is a DOMString that reflects the color HTML attribute, containing either a named color or a color specified in the hexadecimal #RRGGBB format. The format of the string must follow one of the following HTML microsyntaxes: Microsyntax Description Examples Valid name color string nameOfColor (case insensitive) Green green GREEN Valid hex color string in rgb format: #RRGGBB #008000 RGB using decimal values rgb(x,x,x) (x in 0-255 range) rgb(0,128,0) Syntax colorString = fontObj.color; fontObj.color = colorString; Examples // Assumes there is <font id="f"> element in the HTML var f = document.getElementById("f"); f.color = "green"; Specifications The <font> tag ...
HTMLFontElement.face - Web APIs
The document text, in the default style, is rendered as the first font face that the client's browser supports. If no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system. ...
HTMLFontElement.size - Web APIs
It contains either an integer number in the range of 1-7 or a relative value to increase/decrease the value of the size attribute of the <basefont> element. ...
HTMLFontElement - Web APIs
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. Properties Inherits properties from its parent, HTMLElement. HTMLFontElement.color Is a DOMString that reflects the color HTML attribute, containing either a named color or a color specified in the hexadecimal #RRGGBB format. HTMLFontElement.face Is a DOMString that reflects the face HTML attribute, containing a comma-separated list of one or more font names. HTMLFontElement.size Is a DOMString that reflects the size HTML attribute, containing either a font size number ranging from 1 to 7 or a relative size to the size attribute of the <basefont> element, for example -2 or +1. Methods No specific method; inherits methods from...
HTMLFormControlsCollection.namedItem() - Web APIs
e name or id match the specified name, or null if no node matches. Note that this version of namedItem() hides the one inherited from HTMLCollection. Like that one, in JavaScript, using the array bracket syntax with a String, like collection["value"] is equivalent to collection.namedItem("value"). Syntax var item = collection.namedItem(str); var item = collection[str]; Parameters str is a DOMString Return value item is a RadioNodeList , Element, or null. Example HTML <form> <input id="my-form-control" type="textarea"> </form> JavaScript // Returns the HTMLInputElement representing #my-form-control elem1 = document.forms[0]['my-form-control']; Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLFormControlsCollection...
HTMLFrameSetElement - Web APIs
The HTMLFrameSetElement interface provides special properties (beyond those of the regular HTMLElement interface they also inherit) for manipulating <frameset> elements. Properties Inherits properties from its parent, HTMLElement and from WindowEventHandlers. HTMLFrameSetElement.cols Is a DOMString structured as a comma-seperated list specifing the width of each column inside a frameset. HTMLFrameSetElement.rows Is a DOMString structured as a comma-seperated list specifing the height of each column inside a frameset. Methods No specific method; inherits methods from its parent, HTMLElement and from WindowEventHandlers. Event handlers No specific event handler; inherits event handlers from its parent, HTMLElement and from WindowEventHandlers. WindowEventHandlers.onafterprint ...
HTMLHeadElement - Web APIs
#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLHeadElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLHeadElement.profile Is a DOMString representing the URIs of one or more metadata profiles (white space separated). Methods No specific method; inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLHeadElement' in that specification. Living Standard HTML 5.1The definition of 'HTMLHeadElement' in that specifi...
HTMLHeadingElement - Web APIs
7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="401" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLHeadingElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLHeadingElement.align Is a DOMString representing an enumerated attribute indicating alignment of the heading with respect to the surrounding context. The possible values are "left", "right", "justify", and "center". Methods No specific method; inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLHeadingElement' in that spec...
HTMLHtmlElement - Web APIs
#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLHtmlElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLHtmlElement.version Is a DOMString representing the version of the HTML Document Type Definition (DTD) that governs this document. This property should not be used any more as it is non-conforming. Simply omit it. Methods No specific method; inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLHtmlElement' in that specific...
HTMLImageElement.align - Web APIs
position the image relative to its container. You should instead use the CSS propertiy vertical-align, which does in fact also work on images despite its name. You can also use the float property to float the image to the left or right margin. The align property reflects the HTML align content attribute. Syntax htmlImageElement.align = alignMode; alignMode = htmlImageElement.align; Value A DOMString specifying one of the following strings which set the alignment mode for the image. Baseline alignment These three values specify the alignment of the element relative to the text baseline. These should be replaced by using the CSS vertical-align property. bottom The bottom edge of the image is to be aligned vertically with the current text baseline. Default value. middle The center of th...
HTMLImageElement.alt - Web APIs
ings for your images, imagine what you would say when reading the page to someone over the phone without mentioning that there's an image on the page. The alternate text is displayed in the space the image would occupy and should be able to take the place of the image without altering the meaning of the page. Syntax htmlImageElement.alt = altText; let altText = htmlImageElement.alt; Value A DOMString which contains the alternate text to display when the image is not loaded or for use by assistive devices. The alt attribute is officially mandatory; it's meant to always be specified. If the image doesn't require a fallback (such as for an image which is simply decorative or an advisory icon of minimal importance), you may specify an empty string (""). For compatibility reasons, browsers genera...
HTMLImageElement.border - Web APIs
der-block-start-width, border-block-end-width, border-inline-start-width, and border-inline-end-width properties. For compatibility (or perhaps other) reasons, you can use the older properties instead (or in addition): border-top-width, border-right-width, border-bottom-width, and border-left-width. Syntax htmlImageElement.border = thickness; let thickness = htmlImageElement.border; Value A DOMString containing an integer value specifying the thickness of the border that should surround the image, in CSS pixels. A value of 0, or an empty string, indicates that there should be no border drawn. The default value of border is 0 Usage notes Do not use border. It is obsolete. Instead, use the CSS border property and its longhand properties to establish borders around images. For example, if yo...
HTMLImageElement.crossOrigin - Web APIs
If you don't specify crossOrigin, the image is fetched without CORS (the fetch no-cors mode). ...
HTMLImageElement.decoding - Web APIs
Possible values are: sync: Decode the image synchronously for atomic presentation with other content. async: Decode the image asynchronously to reduce delay in presenting other content. auto: Default mode, which indicates no preference for the decoding mode. The browser decides what is best for the user. ...
HTMLImageElement.loading - Web APIs
tells the browser how to handle loading images which are currently outside the window's visual viewport. This helps to optimize the loading of the document's contents by postponing loading the image until it's expected to be needed, rather than immediately during the initial page load. Syntax let imageLoadScheduling = htmlImageElement.loading; htmlImageElement.loading = eagerOrLazy; Value A DOMString providing a hint to the user agent as to how to best schedule the loading of the image to optimize page performance. The possible values are: eager The default behavior, eager tells the browser to load the image as soon as the <img> element is processed. lazy Tells the user agent to hold off on loading the image until the browser estimates that it will be needed imminently. For instance, if...
HTMLImageElement.longDesc - Web APIs
The obsolete property longDesc on the HTMLImageElement interface specifies the URL of a text or HTML file which contains a long-form description of the image. This can be used to provide optional added details beyond the short description provided in the title attribute. Syntax descURL = htmlImageElement.longDesc; htmlImageElement.longDesc = descURL; Value A DOMString which may be either an empty string (indicating that no long description is available) or the URL of a file containing a long form description of the image's contents. For example, if the image is a PNG of a flowchart. The longDesc property could be used to provide an explanation of the flow of control represented by the chart, using only text. This can be used by readers both as an explanation, but also as a substitute for v...
HTMLImageElement.lowSrc - Web APIs
The HTMLImageElement interface's obsolete lowSrc property can be used to specify the URL of a reduced-quality or otherwise faster-loading version of the image specified by the src property. This property reflects the HTML lowsrc attribute. Syntax htmlImageElement.lowSrc = imageUrl; imageUrl = htmlImageElement.lowSrc; Value A DOMString specifying the URL of a version of the image specified by src which has been modified in some fashion so that it loads significantly more quickly than the primary image. There are a number of ways to achieve this; primary among them: Higher compression levels (for example, a primary image saved as a JPEG using 85% quality might have a lowSrc version saved at 15%. Reduced color depth; a primary image in 32-bit color might have an alternate image in 8-bit...
HTMLImageElement.name - Web APIs
Important: This property is deprecated and is only in the specification still for backward compatibility purposes. Since it functions identically to id, you can and should use it instead. ...
HTMLImageElement.referrerPolicy - Web APIs
Possible values are: "no-referrer" meaning that the Referer: HTTP header will not be sent. "origin" meaning that the referrer will be the origin of the page, that is roughly the scheme, the host and the port. ...
HTMLIsIndexElement - Web APIs
moved in HTML5. This latest specification requires that this element implements HTMLUnknownElement rather than HTMLIsIndexElement. Properties Inherits properties from its parent, HTMLElement. HTMLIsIndexElement.form Read only Is a HTMLFormElement representing the <form> element it belongs too. It can have the null value, if <isindex> isn't part of any form. HTMLIsIndexElement.prompt Is a DOMString representing a text to be prompted for the field. Methods No specific method; inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML5The definition of 'HTMLIsIndexElement' in that specification. Recommendation Removed. <isindex> must now implement HTMLUnknownElement. Document Object Model (DOM) Level 2 HTML Speci...
HTMLLIElement - Web APIs
fill="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="426" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLLIElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLLIElement.type Is a DOMString representing the type of the bullets, "disc", "square" or "circle". As the standard way of defining the list type is via the CSS list-style-type property, use the CSSOM methods to set it via a script. HTMLLIElement.value Is a long indicating the ordinal position of the list element inside a given <ol>. It reflects the value attribute of the HTML <li> element, and can be smaller than 0. If the <...
HTMLLabelElement.htmlFor - Web APIs
The HTMLLabelElement.htmlFor property reflects the value of the for content property. That means that this script-accessible property is used to set and read the value of the content property for, which is the ID of the label's associated control element. Syntax controlId = HTMLLabelElement.htmlFor HTMLLabelElement.htmlFor = newId Value A DOMString which contains the ID string of the element which is associated with the control. If this property has a value, the HTMLLabelElement.control property must refer to the same control. Specifications Specification Status Comment HTML Living StandardThe definition of 'htmlFor' in that specification. Living Standard Initial definition ...
HTMLLegendElement - Web APIs
: all;} Properties Inherits properties from its parent, HTMLElement. HTMLLegendElement.form Read only Is a HTMLFormElement representing the form that this legend belongs to. If the legend has a fieldset element as its parent, then this attribute returns the same value as the form attribute on the parent fieldset element. Otherwise, it returns null. HTMLLegendElement.accessKey Is a DOMString representing a single-character access key to give access to the element. HTMLLegendElement.align Is a DOMString representing the alignment relative to the form set Methods No specific method; inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLLegendElement' in that specification. ...
HTMLLinkElement.as - Web APIs
Specifications Specification Status Comment PreloadThe definition of 'as' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
HTMLLinkElement.referrerPolicy - Web APIs
The HTMLLinkElement.referrerPolicy property reflect the HTML referrerpolicy attribute of the <link> element defining which referrer is sent when fetching the resource. See the HTTP Referrer-Policy header for details. Syntax DOMString HTMLLinkElement.referrerPolicy Example var links = document.getElementsByTagName("link"); links[0].referrerPolicy; // "no-referrer" Specifications Specification Status Comment Referrer PolicyThe definition of 'referrerPolicy attribute' in that specification. Candidate Recommendation ...
HTMLLinkElement.rel - Web APIs
The most common use of this attribute is to specify a link to an external style sheet: the property is set to stylesheet, and the href attribute is set to the URL of an external style sheet to format the page. ...
HTMLMapElement - Web APIs
fill="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="421" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLMapElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLMapElement.name Is a DOMString representing the <map> element for referencing it other context. If the id attribute is set, this must have the same value; and it cannot be null or empty. HTMLMapElement.areas Read only Is a live HTMLCollection representing the <area> elements associated to this <map>. Methods No specific method; inherits methods from its parent, HTMLElement . Specifications Specification Sta...
HTMLMediaElement.canPlayType() - Web APIs
The HTMLMediaElement method canPlayType() reports how likely it is that the current browser will be able to play media of a given MIME type. Note: This feature is not available in Web Workers. Syntax canPlayResponse = audioOrVideo.canPlayType(mediaType); Parameters mediaType A DOMString containing the MIME type of the media. Return value A DOMString indicating how likely it is that the media can be played. The string will be one of the following values: probably Media of the type indicated by the mediaType parameter is probably playable on this device. maybe Not enough information is available to determine for sure whether or not the media will play until playback is actually attempted. "" (empty string) Media of the given type definitely can't be played on the current device. ...
HTMLMediaElement.currentSrc - Web APIs
The HTMLMediaElement.currentSrc property contains the absolute URL of the chosen media resource. This could happen, for example, if the web server selects a media file based on the resolution of the user's display. The value is an empty string if the networkState property is EMPTY. Syntax var mediaUrl = audioObject.currentSrc; Value A DOMString object containing the absolute URL of the chosen media source; this may be an empty string if networkState is EMPTY; otherwise, it will be one of the resources listed by the HTMLSourceElement contained within the media element, or the value or src if no <source> element is provided. Example var obj = document.createElement('video'); console.log(obj.currentSrc); // "" Specifications Specification Status Comment HTML Living St...
HTMLMediaElement.mediaGroup - Web APIs
The HTMLMediaElement.mediaGroup property reflects the mediagroup HTML attribute, which indicates the name of the group of elements it belongs to. A group of media elements shares a common controller. Syntax ... Value A DOMString. Example ... Specifications Specification Status Comment HTML5The definition of 'HTMLMediaElement.mediaGroup' in that specification. Recommendation Initial definition. ...
HTMLMediaElement.msInsertAudioEffect() - Web APIs
ill not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The HTMLMediaElement.msInsertAudioEffect() method inserts the specified audio effect into the media pipeline. This proprietary method is specific to Internet Explorer and Microsoft Edge. Syntax HTMLMediaElement.msInsertAudioEffect(activatableClassId: DOMString, effectRequired: boolean, config); Parameters activatableClassId A DOMString defining the audio effects class. effectRequired A Boolean which if set to true requires an audio effect to be defined. configOptional An optional Object to help with defining any additional configuration needed. Return value This method does not return a value. See also HTMLMediaElement Microsoft API e...
HTMLMediaElement.sinkId - Web APIs
If it is using the user agent default, it returns an empty string. This ID should be one of the MediaDeviceInfo.deviceId values returned from MediaDevices.enumerateDevices(), id-multimedia, or id-communications. Syntax var sinkId = HTMLMediaElement.sinkId Specifications Specification Status Comment Audio Output Devices APIThe definition of 'sinkId' in that specification. Candidate Recommendation Initial definition. ...
HTMLMetaElement - Web APIs
troke-width="2px" /><text x="416" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLMetaElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. Name Type Description content DOMString Gets or sets the value of meta-data property. httpEquiv DOMString Gets or sets the name of an HTTP response header to define for a document. name DOMString Gets or sets the name of a meta-data property to define for a document. scheme DOMString Gets or sets the name of a scheme used to interpret the value of a meta-data property. Methods N...
HTMLModElement - Web APIs
fill="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="421" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLModElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLModElement.cite Is a DOMString reflecting the cite HTML attribute, containing a URI of a resource explaining the change. HTMLModElement.dateTime Is a DOMString reflecting the datetime HTML attribute, containing a date-and-time string representing a timestamp for the change. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLAnchorElement' in that specification. ...
HTMLOListElement - Web APIs
Properties Inherits properties from its parent, HTMLElement. HTMLOListElement.reversed Is a Boolean value reflecting the reversed and defining if the numbering is descending, that is its value is true, or ascending (false). HTMLOListElement.start Is a long value reflecting the start and defining the value of the first number of the first element of the list. HTMLOListElement.type Is a DOMString value reflecting the type and defining the kind of marker to be used to display. It can have the following values: '1' meaning that decimal numbers are used: 1, 2, 3, 4, 5, ... 'a' meaning that the lowercase latin alphabet is used: a, b, c, d, e, ... 'A' meaning that the uppercase latin alphabet is used: A, B, C, D, E, ... 'i' meaning that the lowercase latin numerals are used: i, ii, ...
HTMLObjectElement.data - Web APIs
The data property of the HTMLObjectElement interface returns a DOMString that reflects the data HTML attribute, specifying the address of a resource's data. Syntax var data = HTMLObjectElement.data; HTMLObjectElement.data; Value A DOMString. Specifications Specification Status Comment HTML Living StandardThe definition of 'data' in that specification. Living Standard Initial definition. ...
HTMLObjectElement.height - Web APIs
The height property of the HTMLObjectElement interface Returns a DOMString that reflects the height HTML attribute, specifying the displayed height of the resource in CSS pixels. Syntax var String = HTMLObjectElement.height; HTMLObjectElement.height = String; Value A DOMString. Specifications Specification Status Comment HTML Living StandardThe definition of 'height' in that specification. Living Standard Initial definition. ...
HTMLObjectElement.name - Web APIs
The name property of the HTMLObjectElement interface returns a DOMString that reflects the name HTML attribute, specifying the name of the browsing context. Syntax var String = HTMLObjectElement.name; HTMLObjectElement.name = String; Value A DOMString. Specifications Specification Status Comment HTML Living StandardThe definition of 'name' in that specification. Living Standard Initial definition. ...
HTMLObjectElement.type - Web APIs
The type property of the HTMLObjectElement interface returns a DOMString that reflects the type HTML attribute, specifying the MIME type of the resource. Syntax var String = HTMLObjectElement.type HTMLObjectElement.type = String; Value A DOMString. Specifications Specification Status Comment HTML Living StandardThe definition of 'type' in that specification. Living Standard Initial definition. ...
HTMLObjectElement.useMap - Web APIs
The useMap property of the HTMLObjectElement interface returns a DOMString that reflects the usemap HTML attribute, specifying a <map> element to use. Syntax var String = HTMLObjectElement.useMap; HTMLObjectElement.useMap = String; Value A DOMString. Specifications Specification Status Comment HTML Living StandardThe definition of 'useMap' in that specification. Living Standard Initial definition. ...
HTMLObjectElement.validationMessage - Web APIs
The validationMessage read-only property of the HTMLObjectElement interface returns a DOMString representing a localized message that describes the validation constraints that the control does not satisfy (if any). This is the empty string if the control is not a candidate for constraint validation (willValidate is false), or it satisfies its constraints. Syntax var String = HTMLObjectElement.validationMessage; Value A DOMString. Specifications Specification Status Comment HTML Living StandardThe definition of 'validationMessage' in that specification. Living Standard Initial definition. ...
HTMLObjectElement.width - Web APIs
The width property of the HTMLObjectElement interface returns a DOMString that reflects the width HTML attribute, specifying the displayed width of the resource in CSS pixels. Syntax var String = HTMLObjectElement.width; HTMLObjectElement.width = String; Value A DOMString. Specifications Specification Status Comment HTML Living StandardThe definition of 'width' in that specification. Living Standard Initial definition. ...
HTMLOptGroupElement - Web APIs
4E53" text-anchor="middle" alignment-baseline="middle">HTMLOptGroupElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLOptGroupElement.disabled Is a boolean representing whether or not the whole list of children <option> is disabled (true) or not (false). HTMLOptGroupElement.label Is a DOMString representing the label for the group. Methods No specific method; inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLOptgroupElement' in that specification. Living Standard HTML5The definition of 'HTMLOptGroupElement' in that specification. Recommendation No chang...
HTMLParagraphElement - Web APIs
F8" stroke="#D4DDE4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLParagraphElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLParagraphElement.align A DOMString representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context. The possible values are "left", "right", "justify", and "center". Methods No specific methods, inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLParagraphElement'...
HTMLQuoteElement - Web APIs
l="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLQuoteElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLQuoteElement.cite Is a DOMString reflecting the cite HTML attribute, containing a URL for the source of the quotation. Methods No specific method; inherits properties from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLQuoteElement' in that specification. Living Standard HTML5The definition of 'HTMLQuoteElement' in that...
HTMLScriptElement.referrerPolicy - Web APIs
No referrer information is sent along with requests. ...
HTMLSelectElement.namedItem() - Web APIs
ement.namedItem() method returns the HTMLOptionElement corresponding to the HTMLOptionElement whose name or id match the specified name, or null if no option matches. In JavaScript, using the array bracket syntax with a String, like selectElt["value"] is equivalent to selectElt.namedItem("value"). Syntax var item = collection.namedItem(str); var item = collection[str]; Parameters str is a DOMString. Return value item is a HTMLOptionElement. Example HTML <form> <select id="myFormControl"> <option id="o1">Opt 1</option> <option id="o2">Opt 2</option> </select> </form> JavaScript elem1 = document.forms[0]['myFormControl']['o1']; // Returns the HTMLOptionElement representing #o1 Specifications Specification Status Comment HTML Living StandardTh...
HTMLSelectElement.setCustomValidity() - Web APIs
The HTMLSelectElement.setCustomValidity() method sets the custom validity message for the selection element to the specified message. Use the empty string to indicate that the element does not have a custom validity error. Syntax selectElt.setCustomValidity(string); Parameters string is the DOMString containing the error message. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLSelectElement.setCustomValidity()' in that specification. Living Standard No change since the latest snapshot, HTML5. HTML5The definition of 'HTMLSelectElement.setCustomValidity()' in that specification. Recommendation Initial definition, snapshot of HTML Living Standard ...
HTMLSlotElement.name - Web APIs
Examples The following snippet is taken from our slotchange example (see it live also). ...
HTMLSlotElement - Web APIs
Methods HTMLSlotElement.assignedNodes() Returns a sequence of the nodes assigned to this slot, and if the flatten option is set to true, the assigned nodes of any other slots that are descendants of this slot. If no assigned nodes are found, it returns the slot's fallback content. HTMLSlotElement.assignedElements() Returns a sequence of the elements assigned to this slot (and no other nodes). ...
HTMLStyleElement - Web APIs
" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLStyleElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement, and implements LinkStyle. HTMLStyleElement.media Is a DOMString representing the intended destination medium for style information. HTMLStyleElement.type Is a DOMString representing the type of style being applied by this statement. HTMLStyleElement.disabled Is a Boolean value representing whether or not the stylesheet is disabled (true) or not (false). LinkStyle.sheet Read only Returns the StyleSheet object associated with the given element, or null i...
HTMLTableCaptionElement - Web APIs
e="#D4DDE4" stroke-width="2px" /><text x="376" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLTableCaptionElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLTableCaptionElement.align Is a DOMString which represents an enumerated attribute indicating alignment of the caption with respect to the table. Methods No specific method; inherits properties from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLTableCaptionElement' in that specification. Living Standard No change from HTML5. HTML...
HTMLTableElement.align - Web APIs
The HTMLTableElement.align property represents the alignment of the table. Syntax HTMLTableElement.align = alignment; var alignment = HTMLTableElement.align; Parameters alignment DOMString with one of the following values: left center right Example // Set the alignmnet of a table var t = document.getElementById('TableA'); t.align = 'center'; Specification W3C DOM 2 HTML Specification HTMLTableElement .align. ...
HTMLTableElement.cellSpacing - Web APIs
should instead use the CSS border-spacing property, the obsolete HTMLTableElement interface's cellSpacing property represents the spacing around the individual <th> and <td> elements representing a table's cells. Any two cells are separated by the sum of the cellSpacing of each of the two cells. Syntax HTMLTableElement.cellSpacing = spacing; var spacing = HTMLTableElement.cellSpacing; Value A DOMString which is either a number of pixels (such as "10") or a percentage value (like "10%"). Example This example sets cell spacing for a given table to 10 pixels. var t = document.getElementById('TableA'); t.cellSpacing = "10"; Specification W3C DOM 2 HTML Specification HTMLTableElement .cellSpacing. ...
HTMLTextAreaElement - Web APIs
urns true if the control is not a candidate for constraint validation, or if it satisfies its constraints. reportValidity() This method reports the problems with the constraints on the element, if any, to the user. If there are problems, it fires a cancelable invalid event at the element, and returns false; if there are no problems, it returns true. setCustomValidity(DOMstring) Sets a custom validity message for the element. If this message is not the empty string, then the element is suffering from a custom validity error, and does not validate. The two methods blur() and focus() are inherited from HTMLElement from HTML5 on, but were defined on HTMLTextAreaElement in DOM Level 2 HTML and earlier specifications. Events Listen to these events using addEventL...
HTMLTimeElement.dateTime - Web APIs
The HTMLTimeElement.dateTime property is a DOMString that reflects the datetime HTML attribute, containing a machine-readable form of the element's date and time value. The format of the string must follow one of the following HTML microsyntaxes: Microsyntax Description Examples Valid month string YYYY-MM 2011-11, 2013-05 Valid date string YYYY-MM-DD 1887-12-01 Valid yearless date string MM-DD 11-12 Valid time string HH:MM HH:MM:SS HH:MM:SS.mmm 23:59 12:15:47 12:15:52.998 Valid local date and time string YYYY-MM-DD HH:MM YYYY-MM-DD HH:MM:SS YYYY-MM-DD HH:MM:SS.mmm YYYY-MM-DDTHH:MM YYYY-MM-DDTHH:MM:SS YYYY-MM-DDTHH:MM:SS.mmm 2013-12-25 11:12 1972-07-25 13:43:07 ...
HTMLTimeElement - Web APIs
"#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLTimeElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLTimeElement.dateTime Is a DOMString that reflects the datetime HTML attribute, containing a machine-readable form of the element's date and time value. Methods No specific method; inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLTimeElement' in that specification. Living Standard HTML 5.1The definition ...
HTMLTitleElement - Web APIs
l="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLTitleElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLTitleElement.text Is a DOMString representing the text of the document's title. Methods No specific method; inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLTitleElement' in that specification. Living Standard HTML 5.1The definition of 'HTMLTitleElement' in that specification. Recommendation No...
HTMLTrackElement.src - Web APIs
The HTMLTrackElement.src property reflects the value of the <track> element's src attribute, which indicates the URL of the text track's data. Syntax var textTrackURL = HTMLTrackElement.src; Value A DOMString object containing the URL of the text track data. Example // coming soon Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLTrackElement.src' in that specification. Living Standard No change from HTML5 HTML5The definition of 'HTMLTrackElement.src' in that specification. Recommendation Initial definition. ...
HTMLUListElement - Web APIs
"#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLUListElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLUListElement.type Is a DOMString value reflecting the type and defining the kind of marker to be used to display. The values are browser dependent and have never been standardized. HTMLUListElement.compact Is a Boolean indicating that spacing between list items should be reduced. This property reflects the compact attribute only, it doesn't consider the line-height CSS property used for that behavior in modern pages. Metho...
HTMLVideoElement.msInsertVideoEffect() - Web APIs
t work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The HTMLMediaElement.msInsertVideoEffect() method inserts the specified video effect into the media pipeline. This proprietary method is specific to Internet Explorer and Microsoft Edge. Syntax str = HTMLMediaElement.msInsertVideoEffect(activatableClassId: DOMString, effectRequired: boolean, config); Parameters activatableClassId A DOMString defining the video effects class. effectRequired A Boolean which if set to true requires a video effect to be defined. configOptional An optional Object to help with defining any additional configuration needed. Return value This method does not return a value. Example var oVideo1 = document.getElementById...
HTMLVideoElement.msIsLayoutOptimalForPlayback - Web APIs
not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. msIsLayoutOptimalForPlayback is a read-only property which indicates whether the video can be rendered more efficiently. This proprietary property is specific to Internet Explorer and Microsoft Edge. Syntax HTMLVideoElement.msIsLayoutOptimalForPlayback: DOMString; Value Boolean value set to true indicates that video is being rendered optimally (better performance and using less battery power). If false, improvements can be made to optimize performance. For msIsLayoutOptimalForPlayback to be true, avoid the following: Video elements with Cascading Style Sheets (CSS) outlines set. Rendering a video element through a canvas element. Embedding video ...
The HTML DOM API - Web APIs
Event Web Components interfaces These interfaces are used by the Web Components API to create and manage the available custom elements. CustomElementRegistry Miscellaneous and supporting interfaces These supporting object types are used in a variety of ways in the HTML DOM API. In addition, PromiseRejectionEvent represents the event delivered when a JavaScript Promise is rejected. DOMStringList DOMStringMap ErrorEvent HTMLAllCollection MimeType MimeTypeArray PromiseRejectionEvent Interfaces belonging to other APIs Several interfaces are technically defined in the HTML specification while actually being part of other APIs. Web storage interfaces The Web_Storage_API provides the ability for web sites to store data either temporarily or permanently on the user's device for ...
Drag Operations - Web APIs
an event listener for the dragenter and dragover events, you use the data types of the data being dragged to check whether a drop is allowed. For instance, a drop target that accepts links would check for the type text/uri-list. During a drop event, a listener would retrieve the data being dragged and insert it at the drop location. The drag data's types property returns a list of MIME-type like DOMStrings, such as text/plain or image/jpeg. You can also create your own types. The most commonly used types are listed in the article Recommended Drag Types. A drag may include data items of several different types. This allows data to be provided in more specific types, often custom types, yet still provide fallback data for drop targets that do not support more specific types. It is usually the case ...
Recommended Drag Types - Web APIs
ile is added to the listbox. Note that the instanceof operator is used here as the mozGetDataAt() method will return an nsISupports that needs to be checked and converted into an nsIFile. This is also a good extra check in case someone made a mistake and added a non-file for this type. Updates to DataTransfer.types The latest spec dictates that DataTransfer.types should return a frozen array of DOMStrings rather than a DOMStringList (this is supported in Firefox 52 and above). As a result, the contains method no longer works; the includes method should be used instead to check if a specific type of data is provided, using code like the following: if ([...event.dataTransfer.types].includes('text/html')) { // Do something } You could use feature detection to determine which method is supported...
HashChangeEvent.newURL - Web APIs
The newURL read-only property of the HashChangeEvent interface returns the new URL to which the window is navigating. Syntax let newEventUrl = event.newURL; Value A DOMString. Example window.addEventListener('hashchange', function(event) { console.log('Hash changed to ' + event.newURL); }); Specifications Specification Status Comment HTML Living StandardThe definition of 'HashChangeEvent: newURL' in that specification. Living Standard ...
HashChangeEvent.oldURL - Web APIs
The oldURL read-only property of the HashChangeEvent interface returns the previous URL from which the window was navigated. Syntax let oldEventUrl = event.oldURL; Value A DOMString. Example window.addEventListener('hashchange', function(event) { console.log('Hash changed from ' + event.oldURL); }); Specifications Specification Status Comment HTML Living StandardThe definition of 'HashChangeEvent: oldURL' in that specification. Living Standard ...
HkdfParams - Web APIs
This may be one of: SHA-1 SHA-256 SHA-384 SHA-512 salt A BufferSource. The HKDF specification states that adding salt "adds significantly to the strength of HKDF". Ideally, the salt is a random or pseudo-random value with the same length as the output of the digest function. ...
IDBCursor.direction - Web APIs
See the Values section below for possible values. Note: This feature is available in Web Workers. Syntax var direction = cursor.direction; Value A string (defined by the IDBCursorDirection enum) indicating the direction in which the cursor is traversing the data. Possible values are: Value Description next This direction causes the cursor to be opened at the start of the source. nextunique This direction causes the cursor to be opened at the start of the source. ...
IDBCursor.source - Web APIs
Web › API › IDBCursor › source
e cursor is iterating over. Example In this simple fragment we create a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store. Within each iteration we log the source of the cursor, which will log our IDBobjectStore object to the console, something like this: IDBObjectStore {autoIncrement: false, transaction: IDBTransaction, indexNames: DOMStringList, keyPath: "albumTitle", name: "rushAlbumList"...} The cursor does not require us to select the data based on a key; we can just grab all of it. Also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo. For a complete working example, see our IDBCursor example (view example live.) function displayData() { var tra...
IDBDatabase.name - Web APIs
Web › API › IDBDatabase › name
Example This example shows a database connection being opened, the resulting IDBDatabase object being stored in a db variable, and the name property then being logged. For a full example, see our To-do Notifications app (view example live). ...
IDBDatabase.objectStoreNames - Web APIs
The objectStoreNames read-only property of the IDBDatabase interface is a DOMStringList containing a list of the names of the object stores currently in the connected database. Note: This feature is available in Web Workers. Syntax var list[] = IDBDatabase.objectStoreNames; Value A DOMStringList containing a list of the names of the object stores currently in the connected database. Example // Let us open our database var DBOpenRequest = window.indexedDB.open("toDoList", 4); // these two event handlers act on the database being opened successfully, or not DBOpenRequest.onerror = function(event) { note.innerHTML += '<li>Error loading database.</li>'; }; DBOpenRequest.onsuccess = function(event) { note.innerHTML += '<li>Database initialised.</li>'; // store the result of opening th...
IDBDatabaseException - Web APIs
terface was removed from the specification and was replaced by usage of DOMException. In the IndexedDB API, an IDBDatabaseException object represents exception conditions that can be encountered while performing database operations. Attributes Attribute Type Description code unsigned short The most appropriate error code for the condition. message DOMString Error message describing the exception raised. Constants Note: Do not rely on the numeric values of the constants, which might change as the specifications continue to change. Use the constant names instead. Constant Value Description ABORT_ERR 8 A request was aborted, for example, through a call to IDBTransaction.abort. CONSTRAINT_ERR 4 ...
IDBIndex.locale - Web APIs
Web › API › IDBIndex › locale
erty of the IDBIndex interface returns the locale of the index (for example en-US, or pl) if it had a locale value specified upon its creation (see createIndex()'s optionalParameters.) Note that this property always returns the current locale being used in this index, in other words, it never returns "auto". Syntax var myIndex = objectStore.index('index'); console.log(myIndex.locale); Value A DOMString. Example In the following example we open a transaction and an object store, then get the index lName from a simple contacts database. We then open a basic cursor on the index using IDBIndex.openCursor -- this works the same as opening a cursor directly on an ObjectStore using IDBObjectStore.openCursor except that the returned records are sorted based on the index, not the primary key. The loc...
IDBIndex.name - Web APIs
Web › API › IDBIndex › name
Exceptions There are a several exceptions which can occur when you attempt to change an index's name. InvalidStateError The index, or its object store, has been deleted; or the current transaction is not an upgrade transaction. You can only rename indexes during upgrade transactions; that is, when the mode is "versionchange". ...
IDBIndex.objectStore - Web APIs
basic cursor on the index using IDBIndex.openCursor. This works the same as opening a cursor directly on an ObjectStore using IDBObjectStore.openCursor except that the returned records are sorted based on the index, not the primary key. The current object store is logged to the console: it should be returned something like this: IDBObjectStore { name: "contactsList", keyPath: "id", indexNames: DOMStringList[7], transaction: IDBTransaction, autoIncrement: false } Finally, we iterate through each record, and insert the data into an HTML table. For a complete working example, see our IDBIndex-example demo repo (View the example live.) function displayDataByIndex() { tableEntry.innerHTML = ''; var transaction = db.transaction(['contactsList'], 'readonly'); var objectStore = transaction.objec...
IDBObjectStore.indexNames - Web APIs
Example In the following code snippet, we open a read/write transaction on our database and add some data to an object store using add(). After the object store has been created, we log objectStore.indexNames to the console. ...
IDBObjectStore.name - Web APIs
Exceptions There are a several exceptions which can occur when you attempt to change an object store's name. ...
IDBTransaction.objectStoreNames - Web APIs
Specification Specification Status Comment Indexed Database API 2.0The definition of 'ObjectStoreNames' in that specification. Recommendation Indexed Database API DraftThe definition of 'ObjectStoreNames' in that specification. Recommendation Browser compatibility The compatibility table on this page is generated from structured data. ...
IDBTransaction - Web APIs
unsuccessful transaction. This property is null if the transaction is not finished, is finished and successfully committed, or was aborted with theIDBTransaction.abort() function. IDBTransaction.mode Read only The mode for isolating access to data in the object stores that are in the scope of the transaction. The default value is readonly. IDBTransaction.objectStoreNames Read only Returns a DOMStringList of the names of IDBObjectStore objects associated with the transaction. Methods Inherits from: EventTarget IDBTransaction.abort() Rolls back all the changes to objects in the database associated with this transaction. If this transaction has been aborted or completed, this method fires an error event. IDBTransaction.objectStore() Returns an IDBObjectStore object representing an objec...
IDBVersionChangeRequest.setVersion() - Web APIs
ject store. Warning: The latest draft of the specification has dropped this method. Some not up-to-date browsers still implement this method. The new way is to define the version in the IDBDatabase.open() method and create and delete object stores in the onupgradeneeded event handler associated with the returned request. Syntax IDBVersionChangeRequest setVersion ([TreatNullAs=EmptyString] in DOMString version); Example TBD Parameters version The version to store in the database. Returns IDBVersionChangeRequest The request to change the version of a database. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
InputEvent() - Web APIs
inputEventInitOptional Is a InputEventInit dictionary, having the following fields: inputType: (Optional) A string specifying the type of change for editible content such as, for example, inserting, deleting, or formatting text. data: (Optional) A string containing characters to insert. This may be an empty string if the change doesn't insert text (such as when deleting characters, for example). ...
InputEvent.data - Web APIs
Web › API › InputEvent › data
Examples In the following simple example we've set up an event listener on the input event so that when any change is made to the contents of the <input> element (either by typing or pasting), the text that was added is retrieved via the InputEvent.data property and reported in the paragraph below the input. ...
InputEvent.inputType - Web APIs
There are many possible values, such as insertText, deleteContentBackward, insertFromPaste, and formatBold. For a complete list of the available input types, see the Attributes section of the Input Events Level 1 spec. ...
InputEvent - Web APIs
x" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">InputEvent</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Constructor InputEvent() Creates an InputEvent object. Properties This interface inherits properties from its parents, UIEvent and Event. InputEvent.dataRead only Returns a DOMString with the inserted characters. This may be an empty string if the change doesn't insert text (such as when deleting characters, for example). InputEvent.dataTransferRead only Returns a DataTransfer object containing information about richtext or plaintext data being added to or removed from editable content. InputEvent.inputTypeRead only Returns the type of change for editable content such a...
Timing element visibility with the Intersection Observer API - Web APIs
Started The time in milliseconds, relative to the time at which the document was created, at which the ad's visibility count was last updated, or the ad last became visible. 0 if the ad was not visible as of the last time it was checked. totalViewTime The total number of milliseconds the ad has been visible. These are accessed through each ad's HTMLElement.dataset attribute, which provides a DOMStringMap mapping each custom attribute's name to its value. The values are strings, but we can convert those to numbers easily enough--in fact, JavaScript generally does it automatically, although we'll have one instance where we have to do it ourselves. We start by fetching the time at which the ad's previous visibility status check time (adBox.dataset.lastViewStarted) into a local variable named las...
Location: ancestorOrigins - Web APIs
You can use location.ancestorOrigins in the script for a document to determine, for example, whenever the document is being framed by a site which you don't expect it to be framed by. You can also use it to vary the behavior of the document based on what site or list of sites is framing it. ...
Location: assign() - Web APIs
Web › API › Location › assign
, a DOMException of the SECURITY_ERROR type is thrown. This happens if the origin of the script calling the method is different from the origin of the page originally described by the Location object, mostly when the script is hosted on a different domain. If the provided URL is not valid, a DOMException of the SYNTAX_ERROR type is thrown. Syntax location.assign(url); Parameters url Is a DOMString containing the URL of the page to navigate to. Example // Navigate to the Location.reload article window.location.assign('/docs/Web/API/Location/reload'); Specifications Specification Status Comment HTML Living StandardThe definition of 'Location.assign()' in that specification. Living Standard No change from HTML5. HTML5The definition of 'Location.assi...
Location: replace() - Web APIs
Web › API › Location › replace
n, a DOMException of the SECURITY_ERROR type is thrown. This happens if the origin of the script calling the method is different from the origin of the page originally described by the Location object, mostly when the script is hosted on a different domain. If the provided URL is not valid, a DOMException of the SYNTAX_ERROR type is thrown. Syntax object.replace(url); Parameters url Is a DOMString containing the URL of the page to navigate to. Examples // Navigate to the Location.reload article by replacing this page window.location.replace('/docs/Web/API/Location.reload'); Specifications Specification Status Comment HTML Living StandardThe definition of 'Location.replace()' in that specification. Living Standard No change from HTML5. HTML5The de...
Location - Web APIs
Web › API › Location
Location.href Is a stringifier that returns a USVString containing the entire URL. If changed, the associated document navigates to the new page. It can be set from a different origin than the associated document. Location.protocol Is a USVString containin...
Locks.name - Web APIs
Web › API › Lock › name
he lock is requested. The name is selected by the developer to represent an abstract resource for which use is being coordinated across multiple tabs, workers, or other code within the origin. For example, if only one tab of a web application should be synchronizing network resources with an offline database, it could use a lock name such as "net_db_sync". Syntax var name = Lock.name Value A DOMString. Example The following examples show how the name property passed in the call to LockManager.request(). LockManager is the object returned by navigator.locks. navigator.locks.request("net_db_sync", show_lock_properties); function show_lock_properties(lock) { console.log(`The lock name is: ${lock.name}`); console.log(`The lock mode is: ${lock.mode}`); } Specifications Specifica...
MSManipulationEvent.initMSManipulationEvent() - Web APIs
SManipulationEvent that can be called from JavaScript. This proprietary method is specific to Internet Explorer. Beginning with the Microsoft Edge browser, the initEvent() constructor pattern for synthetic events is deprecated. Syntax MSManipulationEvent.initMSManipulationEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, lastState, currentState); Parameters typeArg [in] Type: DOMString The type of the event being created. canBubbleArg [in] Type: boolean Indicates whether the event can bubble. When true the event should propagate upward. When false the event does not propagate upward. cancelableArg [in] Type: boolean Indicates whether the event's default action can be prevented. When true, the default action can be canceled. When false, the default action cannot be cancel...
MediaDeviceInfo.kind - Web APIs
Specifications Specification Status Comment Media Capture and StreamsThe definition of 'kind' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. ...
MediaError - Web APIs
ed, despite having previously been available. MEDIA_ERR_DECODE 3 Despite having previously been determined to be usable, an error occurred while trying to decode the media resource, resulting in an error. MEDIA_ERR_SRC_NOT_SUPPORTED 4 The associated resource or media provider object (such as a MediaStream) has been found to be unsuitable. MediaError.message A DOMString object containing a human-readable string which provides specific diagnostic information to help the reader understand the error condition which occurred; specifically, it isn't simply a summary of what the error code means, but actual diagnostic information to help in understanding what exactly went wrong. This text and its format is not defined by the specification and will vary from one user a...
MediaKeyMessageEvent() - Web APIs
options Options are as follows: messageType: A developer-defined message type that allows applications to differentiate messages without parsing them. ...
keySystem - Web APIs
The MediaKeySystemAccess.keySystem read-only property returns a DOMString identifying the key system being used. Syntax var keySystem = mediaKeySystemAccess.keySystem; Specifications Specification Status Comment Encrypted Media ExtensionsThe definition of 'keySystem' in that specification. Recommendation Initial definition ...
MediaKeySystemAccess - Web APIs
The MediaKeySystemAccess interface of the EncryptedMediaExtensions API provides access to a Key System for decryption and/or a content protection provider. You can request an instance of this object using the Navigator.requestMediaKeySystemAccess() method. Properties MediaKeySystemAccess.keySystem Read only Returns a DOMString identifying the key system being used. Methods MediaKeySystemAccess.createMediaKeys() Returns a Promise that resolves to a new MediaKeys object. MediaKeySystemAccess.getConfiguration() Returns a MediaKeySystemConfiguration object with the supported combination of configuration options. Specifications Specification Status Comment Encrypted Media ExtensionsThe definition of 'MediaKeySystemAccess' in that specification. Recommendati...
MediaList.mediaText - Web APIs
Each one is separated by a comma, for example screen and (min-width: 480px), print. If you wish to set new media queries on the document, the string value must have the different queries separated by commas, e.g. screen, print. Note that the MediaList is a live list; updating the list via mediaText will immediately update the behavior of the document. ...
MediaList - Web APIs
Web › API › MediaList
The MediaList interface represents the media queries of a stylesheet, e.g. those set using a <link> element's media attribute. Note: MediaList is a live list; updating the list using properties or methods listed below will immediately update the behavior of the document. Properties MediaList.mediaText A stringifier that returns a DOMString representing the MediaList as text, and also allows you to set a new MediaList. MediaList.length Read only Returns the number of media queries in the MediaList. Methods MediaList.appendMedium() Adds a media query to the MediaList. MediaList.deleteMedium() Removes a media query from the MediaList. MediaList.item() A getter that returns a CSSOMString representing a media query as text, given the media query's index value inside the MediaList. ...
MediaQueryList.media - Web APIs
Examples This example runs the media query (max-width: 600px) and displays the value of the resulting MediaQueryList's media property in a <span>. JavaScript let mql = window.matchMedia('(max-width: 600px)'); document.querySelector(".mq-value").innerText = mql.media; The JavaScript code simply passes the media query to match into matchMedia() to compile it, then sets the <span>'s innerText to the value of the result's media property. HTML <span class="mq-value"></span> A simple <span> to receive the output. ...
MediaQueryList - Web APIs
dia queries change, instead of polling the values periodically, and allows you to programmatically make changes to a document based on media query status. Properties The MediaQueryList interface inherits properties from its parent interface, EventTarget. matchesRead only A Boolean that returns true if the document currently matches the media query list, or false if not. mediaRead only A DOMString representing a serialized media query. Methods The MediaQueryList interface inherits methods from its parent interface, EventTarget. addListener() Adds to the MediaQueryList a callback which is invoked whenever the media query status--whether or not the document matches the media queries in the list--changes. This method exists primarily for backward compatibility; if possible, you should ...
MediaQueryListEvent.MediaQueryListEvent() - Web APIs
matches: A Boolean representing the media query status -- true if it matches, false if not. ...
MediaQueryListEvent.media - Web APIs
The media read-only property of the MediaQueryListEvent interface is a DOMString representing a serialized media query. Syntax var media = MediaQueryListEvent.media; Value A DOMString representing a serialized media query. Examples var mql = window.matchMedia('(max-width: 600px)'); function screenTest(e) { if (e.matches) { /* the viewport is 600 pixels wide or less */ para.textContent = 'This is a narrow screen -- less than 600px wide.'; document.body.style.backgroundColor = 'red'; } else { /* the viewport is more than than 600 pixels wide */ para.textContent = 'This is a wide screen -- more than 600px wide.'; document.body.style.backgroundColor = 'blue'; } console.log(e.media); } mql.addListener(screenTest); Specifications Specification Stat...
MediaQueryListEvent - Web APIs
ueryList.addListener() call. Constructor MediaQueryListEvent() Creates a new MediaQueryListEvent instance. Properties The MediaQueryListEvent interface inherits properties from its parent interface, Event. MediaQueryListEvent.matchesRead only A Boolean that returns true if the document currently matches the media query list, or false if not. MediaQueryListEvent.mediaRead only A DOMString representing a serialized media query. Methods The MediaQueryListEvent interface inherits methods from its parent interface, Event. Examples var mql = window.matchMedia('(max-width: 600px)'); function screenTest(e) { if (e.matches) { /* the viewport is 600 pixels wide or less */ para.textContent = 'This is a narrow screen -- less than 600px wide.'; document.body.style.backg...
MediaRecorder.mimeType - Web APIs
type and format guide for information about container and codec support across browsers. Note: The term "MIME type" is officially considered to be historical; these strings are now officially known as media types. MDN Web Docs content uses the terms interchangeably. Syntax var mimeType = mediaRecorder.mimeType Value The MIME media type which describes the format of the recorded media, as a DOMString. This string may include the codecs parameter, giving details about the codecs and the codec configurations used by the media recorder. The media type strings are standardized by the Internet Assigned Numbers Authority (IANA). For their official list of defined media type strings, see the article Media Types on the IANA site. See also media types to learn more about media types and how they're u...
MediaSession.playbackState - Web APIs
The value may be one of the following: none The browsing context doesn't currently know the current playback state, or the playback state is not available at this time. paused The browser's media session is currently paused. Playback may be resumed. ...
MediaSession.setActionHandler() - Web APIs
The setActionHandler() property of the MediaSession interface sets an event handler for a media session action. These actions let a web app receive notifications when the user engages a device's built-in physical or onscreen media controls, such as play, stop, or seek buttons. Syntax navigator.mediaSession.setActionHandler(type, callback) Parameters type A DOMString representing an action type to listen for. It will be one of play, pause, seekbackward, seekforward, seekto, skipad,previoustrack, or nexttrack. Further details on the action types can be found below under Media session actions. callback A function to call when the specified action type is invoked. The callback receives no input parameters, and should not return a value. Return value undefined. Description To remove a pre...
MediaSessionActionDetails.action - Web APIs
pause Pauses playback of the media. ...
MediaSource.addSourceBuffer() - Web APIs
Return value A SourceBuffer object representing the new source buffer that has been created and added to the media source. ...
MediaSource.endOfStream() - Web APIs
The possible values are: network: Terminates playback and signals that a network error has occured. This can be used create a custom error handler related to media streams. For example, you might have a function that handles media chunk requests, separate from other network requests. ...
MediaSource.readyState - Web APIs
the current MediaSource. The three possible values are: closed: The source is not currently attached to a media element. open: The source is attached to a media element and ready to receive SourceBuffer objects. ended: The source is attached to a media element but the stream has been ended via a call to MediaSource.endOfStream(). Syntax var myReadyState = mediaSource.readyState; Value A DOMString. Example The following snippet is from a simple example written by Nick Desaulniers (view the full demo live, or download the source for further investigation.) if ('MediaSource' in window && MediaSource.isTypeSupported(mimeCodec)) { var mediaSource = new MediaSource; //console.log(mediaSource.readyState); // closed video.src = URL.createObjectURL(mediaSource); mediaSource.addEventList...
MediaStream.getTrackById() - Web APIs
Return value If a track is found for which MediaStreamTrack.id matches the specified id string, that MediaStreamTrack object is returned. Otherwise, the returned value is null. ...
MediaStream.id - Web APIs
Web › API › MediaStream › id
Syntax var id = mediaStream.id; Example var p = navigator.mediaDevices.getUserMedia({ audio: true, video: true }); p.then(function(stream) { console.log(stream.id); }) Specifications Specification Status Comment Media Capture and StreamsThe definition of 'MediaStream.id' in that specification. Candidate Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
MediaStream - Web APIs
true if the MediaStream is active, or false otherwise. MediaStream.ended Read only A Boolean value set to true if the end of the stream has been reached. This has been removed from the specification; you should instead check the value of MediaStreamTrack.readyState to see if its value is ended for the track or tracks you want to ensure have finished playing. MediaStream.id Read only A DOMString containing 36 characters denoting a universally unique identifier (UUID) for the object. Event handlers MediaStream.onaddtrack An EventHandler containing the action to perform when an addtrack event is fired when a new MediaStreamTrack object is added. MediaStream.onremovetrack An EventHandler containing the action to perform when a removetrack event is fired when a MediaStreamTrack objec...
MediaStreamConstraints - Web APIs
diaStream. If constraints are specified, an audio track is inherently requested. video Either a Boolean (which indicates whether or not a video track is requested) or a MediaTrackConstraints object providing the constraints which must be met by the video track included in the returned MediaStream. If constraints are specified, a video track is inherently requested. Security peerIdentity A DOMString identifying the peer who has sole access to the stream. If this property is specified, only the indicated peer can receive and use the stream. Streams isolated in this way can only be displayed in a media element (<audio> or <video>) where the content is protected just as if CORS cross-origin rules were in effect. When a peer identity is set, MediaStreamTracks from that peer have their isolated f...
MediaStreamEvent() - Web APIs
mediaStreamEventInit Is a MediaStreamEventInit dictionary, having the following fields: "stream" of type MediaStream representing the stream being concerned by the event. "bubbles", optional and defaulting to false, inherited from EventInit, and indicating if the event must bubble or not. ...
MediaStreamEvent - Web APIs
MediaStream. Two events of this type can be thrown: addstream and removestream. Properties A MediaStreamEvent being an Event, this event also implements these properties. MediaStreamEvent.stream Read only Contains the MediaStream containing the stream associated with the event. Constructors MediaStreamEvent() Returns a new MediaStreamEvent. It takes two parameters, the first being a DOMString representing the type of the event; the second a dictionary containing the MediaStream it refers to. Methods A MediaStreamEvent being an Event, this event also implements these properties. There is no specific MediaStreamEvent method. Examples pc.onaddstream = function( ev ) { alert("A stream (id: '" + ev.stream.id + "') has been added to this connection."); }; ...
MediaStreamTrack.id - Web APIs
Syntax const id = track.id Specifications Specification Status Comment Media Capture and StreamsThe definition of 'MediaStreamTrack.id' in that specification. ...
MediaStreamTrack.label - Web APIs
The string may be left empty and is empty as long as no source has been connected. When the track is deassociated from its source, the label is not changed. Syntax const label = track.label Specifications Specification Status Comment Media Capture and StreamsThe definition of 'MediaStreamTrack.label' in that specification. ...
MediaStreamTrackEvent() - Web APIs
The MediaStreamTrackEvent() constructor returns a newly created MediaStreamTrackEvent object, which represents an event announcing that a MediaStreamTrack has been added to or removed from a MediaStream. Syntax var trackEvent = new MediaStreamTrackEvent(type, {track: aMediaStreamTrack}); Parameters The MediaStreamTrackEvent() constructor also inherits arguments from Event(). type A DOMString representing the name of the type of the MediaStreamTrackEvent. It is case-sensitive and can be "addtrack" or "removetrack". track A MediaStreamTrack object representing the track which was added to or removed from the stream. Return value A new MediaStreamTrackEvent, initialized based on the provided options. Specifications Specification Status Comment Media Capture and...
MediaTrackConstraints.groupId - Web APIs
The MediaTrackConstraints dictionary's groupId property is a ConstrainDOMString describing the requested or mandatory constraints placed upon the value of the groupId constrainable property. If needed, you can determine whether or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.groupId as returned by a call to MediaDevices.getSupportedConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. Syntax var constraintsObject = { groupId: constraint }; constraintsObject.groupId = constraint; Value An object based on ConstrainDOMString specifying one or more acceptable, ideal, and/or exact (mandatory) group IDs which are acceptable as the source of media content. Group IDs are unique fo...
MediaTrackConstraints.logicalSurface - Web APIs
This is used to specify whether or not getDisplayMedia() should allow the user to choose display surfaces which are not necessarily fully visible on the screen, such as occluded windows or the complete content of windows which are large enough to require scrolling to see their entire contents. If needed, you can determine whether or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.logicalSurface as returned by a call to MediaDevices.getSupportedConstraints(). ...
MerchantValidationEvent() - Web APIs
The MerchantValidationEvent() constructor creates a new MerchantValidationEvent object. You should not have to create these events yourself; instead, just handle the merchantvalidation event. Syntax merchantValidationEvent = new MerchantValidationEvent(type, options); Parameters type A DOMString which must be merchantvalidation, the only type of event which uses the MerchantValidationEvent interface. options Optional An optional dictionary which may contain zero or more of the following properties: methodName Optional A DOMString containing the payment method identifier for the payment handler being used. This is an empty string by default. validationURL Optional The URL from which to retrieve payment handler specific verification information used to validate the merchant.
MerchantValidationEvent.methodName - Web APIs
The MerchantValidationEvent property methodName is a read-only value which returns a string indicating the payment method identifier which represents the payment handler that requires merchant validation. Syntax methodID = merchantValidationEvent.methodName; Value A read-only DOMString which uniquely identifies the payment handler which is requesting merchant validation. See Merchant validation in Payment processing concepts for more information on the process. Specifications Specification Status Comment Payment Request APIThe definition of 'MerchantValidationEvent.methodName' in that specification. Candidate Recommendation Initial definition. ...
MerchantValidationEvent - Web APIs
handler. To learn more about merchant validation, see Merchant validation in Payment processing concepts. Constructor MerchantValidationEvent() Secure context Creates a new MerchantValidationEvent object describing a merchantvalidation event that will be sent to the payment handler to request that it validate the merchant. Properties MerchantValidationEvent.methodName Secure context A DOMString providing a unique payment method identifier for the payment handler that's requiring validation. This may be either one of the standard payment method identifier strings or a URL that both identifies and handles requests for the payment handler, such as https://apple.com/apple-pay. MerchantValidationEvent.validationURL Secure context A USVString specifying a URL from which the site or app can ...
MessageEvent.MessageEvent() - Web APIs
ill be created. This can be one of XXX init Optional A dictionary object that can contain the following properties: data: The data you want contained in the MessageEvent. This can be of any data type, and will default to null if not specified. origin: A USVString representing the origin of the message emitter. This defaults to an empty string ("") if not specified. lastEventId: A DOMString representing a unique ID for the event. This defaults to an empty string ("") if not specified. source: An MessageEventSource (which can be a WindowProxy, MessagePort, or ServiceWorker object) representing the message emitter. This defaults to null if not set. ports: An array of MessagePort objects representing the ports associated with the channel the message is being sent through (where app...
MessageEvent.lastEventId - Web APIs
The lastEventId read-only property of the MessageEvent interface is a DOMString representing a unique ID for the event. Syntax var myId = messageEvent.lastEventId; Value A DOMString representing the ID. Example myWorker.onmessage = function(e) { result.textContent = e.data; console.log('Message received from worker'); console.log(e.lastEventId); }; Specifications Specification Status Comment HTML Living StandardThe definition of 'MessageEvent: lastEventId' in that specification. Living Standard ...
MessageEvent - Web APIs
a:hover text { fill: #0095DD; pointer-events: all;} Constructor MessageEvent() Creates a new MessageEvent. Properties This interface also inherits properties from its parent, Event. MessageEvent.data Read only The data sent by the message emitter. MessageEvent.origin Read only A USVString representing the origin of the message emitter. MessageEvent.lastEventId Read only A DOMString representing a unique ID for the event. MessageEvent.source Read only A MessageEventSource (which can be a WindowProxy, MessagePort, or ServiceWorker object) representing the message emitter. MessageEvent.ports Read only An array of MessagePort objects representing the ports associated with the channel the message is being sent through (where appropriate, e.g. in channel messaging or when s...
Microdata DOM API - Web APIs
occurrence of "http://example.com/color" is not included in the list.) HTMLPropertiesCollection The HTMLPropertiesCollection interface is used for collections of elements that add name-value pairs to a particular item in the microdata model. Interface description language interface HTMLPropertiesCollection : HTMLCollection { // inherits length and item() getter PropertyNodeList? namedItem(DOMString name); // shadows inherited namedItem() readonly attribute DOMString[] names; }; typedef sequence<any> PropertyValueArray; interface PropertyNodeList : NodeList { PropertyValueArray getValues(); }; collection . length Returns the number of elements in the collection. element = collection . item(index) collection[index] Returns the element with index index from the collection. The ite...
MouseEvent.region - Web APIs
Web › API › MouseEvent › region
Example Example of using the event.region combined with CanvasRenderingContext2D.addHitRegion() method. ...
MouseScrollEvent - Web APIs
The MouseScrollEvent interface represents events that occur due to the user moving a mouse wheel or similar input device. Do not use this interface for wheel events. Like MouseWheelEvent, this interface is non-standard and deprecated. It was used in Gecko-based browsers only. Instead use the standard WheelEvent. ...
msPlayToPrimary - Web APIs
nd Microsoft Edge. ...
MutationObserverInit.attributeFilter - Web APIs
ributes whose values are to be monitored for changes. If this property is specified, there's no need to also set attributes to true, as it's implied. If the attributes permission is true but no attributeFilter is included in the options object, all attributes' values are watched for changes. Syntax var options = { attributeFilter: [ "list", "of", "attribute", "names" ] } Value An array of DOMString objects, each specifying the name of one attribute whose value is to be monitored for changes. There is no default value. If this property exists on the options object when the MutationObserver() constructor is used to create a new MutationObserver, attribute monitoring is enabled regardless of whether or not the attributes property is true. Example In this example, a Mutation Observer is set ...
NDEFWriter.write() - Web APIs
Web › API › NDEFWriter › write
options Optional ignoreRead -- Boolean specifying whether or not to skip reading for the activated reader objects. Will be ignored if overwrite is false. overwrite -- Boolean specifying whether or not existing record should be overwritten, if such exists. ...
NameList - Web APIs
Web › API › NameList
ko 10.0 The NameList interface provides an abstraction for an ordered collection of name and namespace value pairs. Items can be accessed by a 0-based index. The DOM spec does not specify how the collection is to be implemented. Properties NameList.length Read only Methods NameList.contains() Returns a Boolean. NameList.containsNS() Returns a Boolean. NameList.getName() Returns a DOMString. NameList.getNamespaceURI() Returns a DOMString. Specifications Specification Status Comment Document Object Model (DOM) Level 3 Core SpecificationThe definition of 'NameList' in that specification. Obsolete Initial definition ...
Navigator.msLaunchUri() - Web APIs
ts a service or app, such as an email client, that handles a given protocol. The Uniform Resource Identifier (URI) contains the protocol for the default service or app, such as mailto://test@contoso.com. This proprietary method is specific to Internet Explorer, and Microsoft Edge versions 18 and lower. Syntax navigator.msLaunchUri(uri, successCallback, noHandlerCallback); Parameters uri A DOMString specifying the URL containing including the protocol of the document or resource to be displayed. successCallbackOptional A function matching the signature of MSLaunchUriCallback to be executed if the protocol handler is present. noHandlerCallbackOptional A function matching MSLaunchUriCallback to be executed if the protocol handler is not present. Return value undefined. Usage note...
Navigator.oscpu - Web APIs
Web › API › Navigator › oscpu
The Navigator.oscpu property returns a string that identifies the current operating system. Syntax oscpuInfo = navigator.oscpu Value A DOMString providing a string which identifies the operating system on which the browser is running. Operating system oscpuInfo string format OS/2 OS/2 Warp x (either 3, 4 or 4.5) Windows CE WindowsCE x.y1 Windows 64-bit (64-bit build) Windows NT x.y; Win64; x64 Windows 64-bit (32-bit build) Windows NT x.y; WOW64 Windows 32-bit Windows NT x.y Mac OS X (PPC build) PowerPC Mac OS X version x.y Mac OS X (i386/x64 build) Intel Mac OS X or macOS version x.y Linux 64-bit (32-bit build) Output of uname -s plus "i686 on x86_64" Linux Output of uname ...
Navigator.requestMediaKeySystemAccess() - Web APIs
diaKeySystemAccess(); you don't want those requests to happen at inconvenient times. As a general rule, this function should be called only when it's about time to create and use a MediaKeys object by calling the returned MediaKeySystemAccess object's createMediaKeys() method. Syntax Promise = Navigator.requestMediaKeySystemAccess(keySystem, supportedConfigurations); Parameters keySystem A DOMString identifying the key system. For example com.example.somesystem or org.w3.clearkey. supportedConfigurations A non-empty Array of MediaKeySystemConfiguration objects. The first element with a satisfiable configuration will be used. Return value A Promise that, when resolved, delivers a MediaKeySystemAccess object to your fulfillment handler function. The fulfillment handler receives as input j...
Navigator.sendBeacon() - Web APIs
Return values The sendBeacon() method returns true if the user agent successfully queued the data for transfer. Otherwise, it returns false. ...
NavigatorID.platform - Web APIs
platform is a string that must be an empty string or a string representing the platform on which the browser is executing. ...
NavigatorID.userAgent - Web APIs
that gets sent, and doesn't affect browser detection performed by JavaScript code. Opera 6+ allows users to set the browser identification string via a menu. Microsoft Internet Explorer uses the Windows registry. Safari and iCab allow users to change the browser user agent string to predefined Internet Explorer or Netscape strings via a menu. Syntax var ua = navigator.userAgent; Value A DOMString specifying the complete user agent string the browser provides both in HTTP headers and in response to this and other related methods on the Navigator object. The user agent string is built on a formal structure which can be decomposed into several pieces of info. Each of these pieces of info comes from other navigator properties which are also settable by the user. Gecko-based browsers comply w...
NavigatorLanguage.language - Web APIs
lang stores a string representing the language version as defined in BCP 47. Examples of valid language codes include "en", "en-US", "fr", "fr-FR", "es-ES", etc. Note that in Safari on iOS prior to 10.2, the country code returned is lowercase: "en-us", "fr-fr" etc. ...
NavigatorLanguage.languages - Web APIs
The language is described using BCP 47 language tags. In the returned array they are ordered by preference with the most preferred language first. The value of navigator.language is the first element of the returned array. When its value changes, as the user's preferred languages are changed a languagechange event is fired on the Window object. The Accept-Language HTTP header in every HTTP request from the user's browser uses the same value for the navigator.languages property except for the extra qvalues (quality values) field (e.g. en-US;q=0.8). ...
NavigatorLanguage - Web APIs
NavigatorLanguage contains methods and properties related to the language of the navigator. There is no object of type NavigatorLanguage, but other interfaces, like Navigator or WorkerNavigator, implement it. Properties The NavigatorLanguage interface doesn't inherit any property. NavigatorLanguage.language Read only Returns a DOMString representing the preferred language of the user, usually the language of the browser UI. The null value is returned when this is unknown. NavigatorLanguage.languages Read only Returns an array of DOMString representing the languages known to the user, by order of preference. Methods The NavigatorLanguage interface neither implements, nor inherit any method. Specifications Specification Status Comment HTML Living StandardT...
Node.baseURI - Web APIs
Web › API › Node › baseURI
resolve relative URLs when the browser needs to obtain an absolute URL, for example when processing the HTML <img> element's src attribute or XML xlink:href attribute. In most cases the base URL is simply the location of the document, but it can be affected by many factors, including the <base> element in HTML and the xml:base attribute in XML. Syntax var nodeBaseURI = node.baseURI; Value A DOMString representing the base URL of the specified Node. It may be null if unable to obtain an absolute URI. Although this property is read-only, its value may change in certain situations (see below). Details The base URL of a document The base URL of a document defaults to the document's address (as displayed by the browser and available in window.location), but it can be changed: When an HTML <b...
Node.isSupported() - Web APIs
Web › API › Node › isSupported
The Node.isSupported()returns a Boolean flag containing the result of a test whether the DOM implementation implements a specific feature and this feature is supported by the specific node. Syntax boolValue = element.isSupported(feature, version) Parameters feature Is a DOMString containing the name of the feature to test. This is the same name which can be passed to the method hasFeature on DOMImplementation. Possible values defined within the core DOM specification are listed on the DOM Level 2 Conformance Section. version Is a DOMString containing the version number of the feature to test. In DOM Level 2, version 1, this is the string 2.0. If the version is not specified, supporting any version of the feature will cause the method to return true. Example <div id="doc"> </div> <sc...
Node.lookupNamespaceURI() - Web APIs
The Node.lookupNamespaceURI() method accepts a prefix and returns the namespace URI associated with it on the given node if found (and null if not). Syntax var namespace = node.lookupNamespaceURI(prefix); Parameters prefix The prefix to look for. If this parameter is null, the method will return the default namespace URI, if any. Return value A DOMString containing the the namespace URI. If the prefix is not found, it returns null. Specifications Specification Status Comment DOMThe definition of 'Node: lookupNamespaceURI' in that specification. Living Standard ...
Node.lookupPrefix() - Web APIs
Web › API › Node › lookupPrefix
When multiple prefixes are possible, the result is implementation-dependent. ...
Node.nodeName - Web APIs
Web › API › Node › nodeName
The nodeName read-only property returns the name of the current Node as a string. Syntax var str = node.nodeName; Value A DOMString. Values for the different types of nodes are: Interface nodeName value Attr The value of Attr.name CDATASection "#cdata-section" Comment "#comment" Document "#document" DocumentFragment "#document-fragment" DocumentType The value of DocumentType.name Element The value of Element.tagName Entity The entity name EntityReference The name of entity reference Notation The notation name ProcessingInstruction The value of ProcessingInstruction.target Text "#text" Example Given the following markup: <div id="...
Notation - Web APIs
Web › API › Notation
Represents a DTD notation (read-only). May declare format of an unparsed entity or formally declare the document's processing instruction targets. Inherits methods and properties from Node. Its nodeName is the notation name. Has no parent. Properties Notation.publicId Read only Is a DOMString. Notation.systemId Read only Is a DOMString. Specifications Specification Status Comment Document Object Model (DOM) Level 3 Core SpecificationThe definition of 'Notation' in that specification. Obsolete No change Document Object Model (DOM) Level 2 Core SpecificationThe definition of 'Notation' in that specification. Obsolete No change Document Object Model (DOM) Level 1 SpecificationThe definition of 'Notation' in that specificatio...
Notification.body - Web APIs
Web › API › Notification › body
Note: This feature is available in Web Workers. The body read-only property of the Notification interface indicates the body string of the notification, as specified in the body option of the Notification() constructor. Syntax var body = Notification.body; Value A DOMString. Examples function spawnNotification(theBody, theIcon, theTitle) { var options = { body: theBody, icon: theIcon } var n = new Notification(theTitle, options); console.log(n.body); } Specifications Specification Status Comment Notifications APIThe definition of 'body' in that specification. Living Standard Living standard ...
Notification.dir - Web APIs
Web › API › Notification › dir
Possible values are: auto: adopts the browser's language setting behaviour (the default.) ltr: left to right. rtl : right to left. ...
Notification.lang - Web APIs
Web › API › Notification › lang
Note: This feature is available in Web Workers. The lang read-only property of the Notification interface indicates the language used in the notification, as specified in the lang option of the Notification() constructor. The language itself is specified using a DOMString representing a BCP 47 language tag. See the Sitepoint ISO 2 letter language codes page for a simple reference. Syntax var language = Notification.lang; Value A DOMString specifying the language tag. Examples The following snippet fires a notification; a simple options object is created, then the notification is fired using the Notification() constructor. var options = { body: 'Do you like my body?', lang: 'en-US' } var n = new Notification('Test notification',options); console.log(n.lang) // should return ...
Notification.permission - Web APIs
The value can be: granted: The user has explicitly granted permission for the current origin to display system notifications. ...
Notification.requestPermission() - Web APIs
ermission().then(function(permission) { ... }); Previously, the syntax was based on a simple callback; this version is now deprecated: Notification.requestPermission(callback); Parameters callback Optional Deprecated since Gecko 46 An optional callback function that is called with the permission value. Deprecated in favor of the promise return value. Returns A Promise that resolves to a DOMString with the permission picked by the user. Possible values for this string are: granted denied default Examples Assume this basic HTML: <button onclick="notifyMe()">Notify me!</button> It's possible to send a notification as follows -- here we present a fairly verbose and complete set of code you could use if you wanted to first check whether notifications are supported, then check if perm...
Notification.tag - Web APIs
Web › API › Notification › tag
he notification, as specified in the tag option of the Notification() constructor. The idea of notification tags is that more than one notification can share the same tag, linking them together. One notification can then be programmatically replaced with another to avoid the users' screen being filled up with a huge number of similar notifications. Syntax var tag = Notification.tag; Value A DOMString. Examples Our Using the Notifications API article has a good example of tag usage. Specifications Specification Status Comment Notifications APIThe definition of 'tag' in that specification. Living Standard Living standard ...
Notification.title - Web APIs
Note: This feature is available in Web Workers. The title read-only property of the Notification interface indicates the title of the notification, as specified in the title parameter of the Notification() constructor. Syntax var title = Notification.title; Value A DOMString. Examples function spawnNotification(theBody,theIcon,theTitle) { var options = { body: theBody, icon: theIcon } var n = new Notification(theTitle,options); console.log(n.title) } Specifications Specification Status Comment Notifications APIThe definition of 'title' in that specification. Living Standard Living standard ...
NotificationEvent.action - Web APIs
Returns the string ID of the notification button the user clicked. This value returns an empty string if the user clicked the notification somewhere other than an action button, or the notification does not have a button. The notification id is set during the creation of the Notification via the actions array attribute and can't be modified unless the notification is replaced. Returns A DOMString object. Example self.registration.showNotification("New articles available", { actions: [{action: "get", title: "Get now."}] }); self.addEventListener('notificationclick', function(event) { event.notification.close(); if (event.action === 'get') { synchronizeReader(); } else { clients.openWindow("/reader"); } }, false); Specifications Specification Status Comment ...
OfflineAudioCompletionEvent.OfflineAudioCompletionEvent() - Web APIs
OfflineAudioCompletionEvent() constructor of the Web Audio API creates a new OfflineAudioCompletionEvent object instance. Note: You wouldn't generally use the constructor manually. OfflineAudioCompletionEvents are despatched to OfflineAudioContext instances for legacy reasons. Syntax var offlineAudioCompletionEvent = new OfflineAudioCompletionEvent(type, init) Parameters type Optional A DOMString representing the type of object to create. init Optional Options are as follows: renderedBuffer: The rendered AudioBuffer containing the audio data. Return value A new OfflineAudioCompletionEvent object instance. Specifications Specification Status Comment Web Audio APIThe definition of 'OfflineAudioCompletionEvent()' in that specification. Working Draft ...
OffscreenCanvas.convertToBlob() - Web APIs
b() method creates a Blob object representing the image contained in the canvas. Syntax Promise<Blob> OffscreenCanvas.convertToBlob(options); Parameters optionsOptional You can specify several options when converting your OffscreenCanvas object into a Blob object, for example: const blob = offscreenCanvas.convertToBlob({ type: "image/jpeg", quality: 0.95 }); options: type: A DOMString indicating the image format. The default type is image/png. quality: A Number between 0 and 1 indicating image quality if the type option is image/jpeg or image/webp. If this argument is anything else, the default value for image quality is used. Other arguments are ignored. Return value A Promise returning a Blob object representing the image contained in the canvas. Examples var offs...
OffscreenCanvas.convertToBlob() - Web APIs
ob()method creates a Blob object representing the image contained in the canvas. Syntax Promise<Blob> OffscreenCanvas.convertToBlob(options); Parameters optionsOptional You can specify several options when converting your OffscreenCanvas object into a Blob object, for example: const blob = offscreenCanvas.convertToBlob({ type: "image/jpeg", quality: 0.95 }); options: type: A DOMString indicating the image format. The default type is image/png. quality: A Number between 0 and 1 indicating image quality if the type option is image/jpeg or image/webp. If this argument is anything else, the default value for image quality is used. Other arguments are ignored. Return value A Promise returning a Blob object representing the image contained in the canvas. Examples var offs...
OffscreenCanvas.getContext() - Web APIs
The OffscreenCanvas.getContext() method returns a drawing context for an offscreen canvas, or null if the context identifier is not supported. Note: This API is currently implemented for WebGL1 and WebGL2 contexts only. See bug 801176 for Canvas 2D API support from workers. Syntax offscreen.getContext(contextType, contextAttributes); Parameters contextType Is a DOMString containing the context identifier defining the drawing context associated to the canvas. Possible values are: "2d" creates a CanvasRenderingContext2D object representing a two-dimensional rendering context. "webgl" creates a WebGLRenderingContext object representing a three-dimensional rendering context. This context is only available on browsers that implement WebGL version 1 (OpenGL ES 2.0). "webgl2"...
OffscreenCanvas.convertToBlob() - Web APIs
() method creates a Blob object representing the image contained in the canvas. Syntax Promise<Blob> OffscreenCanvas.convertToBlob(options); Parameters options Optional You can specify several options when converting your OffscreenCanvas object into a Blob object, for example: const blob = offscreenCanvas.convertToBlob({ type: "image/jpeg", quality: 0.95 }); options: type: A DOMString indicating the image format. The default type is image/png. quality: A Number between 0 and 1 indicating image quality if the type option is image/jpeg or image/webp. If this argument is anything else, the default value for image quality is used. Other arguments are ignored. Return value A Promise returning a Blob object representing the image contained in the canvas. Examples var offs...
OscillatorNode.type - Web APIs
The different available values are: sine A sine wave. This is the default value. ...
OverconstrainedError.message - Web APIs
The message read-only property of the OverconstrainedError interface returns the text supplied in the constructor. Syntax var message = OverconstrainedError.message; Value A DOMString. Specifications Specification Status Comment Media Capture and StreamsThe definition of 'message' in that specification. Candidate Recommendation Initial definition. ...
OverconstrainedError.name - Web APIs
The name read-only property of the OverconstrainedError interface will always return 'OverconstrainedError'. Syntax var name = OverconstrainedError.name; Value A DOMString. Specifications Specification Status Comment Media Capture and StreamsThe definition of 'name' in that specification. Candidate Recommendation Initial definition. ...
Page Visibility API - Web APIs
tle. videoElement.addEventListener("play", function(){ document.title = 'Playing'; }, false); } Properties added to the Document interface The Page Visibility API adds the following properties to the Document interface: Document.hidden Read only Returns true if the page is in a state considered to be hidden to the user, and false otherwise. Document.visibilityState Read only A DOMString indicating the document's current visibility state. Possible values are: visible The page content may be at least partially visible. In practice this means that the page is the foreground tab of a non-minimized window. hidden The page's content is not visible to the user, either due to the document's tab being in the background or part of a window that is minimized, or because the devic...
ParentNode.append() - Web APIs
Web › API › ParentNode › append
The ParentNode.append() method inserts a set of Node objects or DOMString objects after the last child of the ParentNode. DOMString objects are inserted as equivalent Text nodes. Differences from Node.appendChild(): ParentNode.append() allows you to also append DOMString objects, whereas Node.appendChild() only accepts Node objects. ParentNode.append() has no return value, whereas Node.appendChild() returns the appended Node object. ParentNode.append() can append several nodes and strings, whereas Node.appendChild() can only append one node. Syntax // [Throws, Unscopable] ParentNode.append(...nodesOrDOMStrings) // returns undefined Parameters nodes A set of Node or DOMString objects to insert. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in t...
ParentNode.prepend() - Web APIs
Syntax ParentNode.prepend(...nodesToPrepend); Parameters nodesToPrepend One or more nodes to insert before the first child node currently in the ParentNode. Each node can be specified as either a Node object or as a string; strings are inserted as new Text nodes. Return value undefined. Exceptions HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy. ...
ParentNode.querySelector() - Web APIs
specified group of selectors which are descendants of the object on which the method was called. If you need all the elements matching the selector list, use querySelectorAll() instead. Note: This method is implemented as Document.querySelector(), DocumentFragment.querySelector() and Element.querySelector(). Syntax element = parentNode.querySelector(selectors); Parameters selectors A DOMString containing one or more selectors to match against. This string must be a valid compound selector list supported by the browser; if it's not, a SyntaxError exception is thrown. See Locating DOM elements using selectors for more information about using selectors to identify elements. Multiple selectors may be specified by separating them using commas. Note: Characters which are not part of stand...
ParentNode.querySelectorAll() - Web APIs
fied group of selectors which are descendants of the object on which the method was called. If you need only a single result, consider the querySelector() method instead. Note: This method is implemented as Element.querySelectorAll(), Document.querySelectorAll(), and DocumentFragment.querySelectorAll() Syntax elementList = parentNode.querySelectorAll(selectors); Parameters selectors A DOMString containing one or more selectors to match against. This string must be a valid CSS selector string; if it's not, a SyntaxError exception is thrown. See Locating DOM elements using selectors for more information about using selectors to identify elements. Multiple selectors may be specified by separating them using commas. Note: Characters which are not part of standard CSS syntax must be escap...
ParentNode - Web APIs
of its non-element nodes. ParentNode.firstElementChild Read only Returns the first node which is both a child of this ParentNode and is also an Element, or null if there is none. ParentNode.lastElementChild Read only Returns the last node which is both a child of this ParentNode and is an Element, or null if there is none. Methods ParentNode.append() Inserts a set of Node objects or DOMString objects after the last child of the ParentNode. DOMString objects are inserted as equivalent Text nodes. ParentNode.prepend() Inserts a set of Node objects or DOMString objects before the first child of the ParentNode. DOMString objects are inserted as equivalent Text nodes. ParentNode.querySelector() Returns the first Element with the current element as root that matches the specified grou...
PayerErrors.email - Web APIs
Web › API › PayerErrors › email
Email property failed validation; in this case, the property should contain a string describing how to correct the problem. If the payer's email address passed validation, this property is not included in the PayerErrors object. Syntax payerEmail = payerErrors.email; Value If validation of the payer's email address (PaymentResponse.payerEmail) found problems, this property should be set to a DOMString that explains the validation problem and how to correct it. If the email address is valid, this property should be omitted from the PayerErrors object. Example function validatePayment(response) { const correctionPromises let paymentErrors = {}; let payerErrors = {}; // Check payer details if (!validEmail(response.payerEmail)) { payerErrors.email = "Please make sure you enter a ...
PayerErrors.name - Web APIs
Web › API › PayerErrors › name
he payerName returned in the response couldn't be validated. The value is a string explaining the problem. If the payer's name validated successfully, the name property is omitted from the PayerErrors object. Syntax payerName = payerErrors.name; Value If this property is present in the PayerErrors object, the payer's name couldn't be successfully validated, and the name property's value is a DOMString explaining the error. This string will be displayed to the user by the user agent's payment handling user interface. If the payer's name is valid, this property is left out of the PayerErrors object. Example function validatePayment(response) { const correctionPromises let paymentErrors = {}; let payerErrors = {}; // Check payer details if (!validEmail(response.payerEmail)) { p...
PayerErrors.phone - Web APIs
Web › API › PayerErrors › phone
s a valid phone number. The value of this property is a string explaining the problem. If the payer's phone number validated successfully, the phone property is omitted from the PayerErrors object. Syntax payerPhone = payerErrors.phone; Value If this property is present in the PayerErrors object, the payer's phone number couldn't be successfully validated, and the phone property's value is a DOMString explaining the error. This string will be displayed to the user by the user agent's payment handling user interface as appropriate. If the phone number is valid, this property is omitted from the PayerErrors object. Example function validatePayment(response) { const correctionPromises let paymentErrors = {}; let payerErrors = {}; // Check payer details if (!validEmail(response.paye...
PaymentAddress.addressLine - Web APIs
The addressLine read-only property of the PaymentAddress interface is an array of DOMString objects, each specifying a line of the address that is not covered by one of the other properties of PaymentAddress. These lines may include the street name, house number, apartment number, rural delivery route, descriptive instructions, or post office box. Syntax var paymentAddressLines = PaymentAddress.addressLine; Value An array of DOMString objects, each containing one line of the address. For example, the addressLine array for the Mozilla Space in London would have the following entries: Example showing addressLine entries for an address in London Index addressLine[] value 0 Metal Box Factory 1 Suite 441, 4th floor 2 30 Great Guildford Street ...
PaymentAddress.city - Web APIs
The city read-only property of the PaymentAddress interface returns a string containing the city or town portion of the address. Syntax var paymentCity = PaymentAddress.city; Value A DOMString indicating the city or town portion of the address described by the PaymentAddress object. Specifications Specification Status Comment Payment Request APIThe definition of 'PaymentAddress.city' in that specification. Candidate Recommendation Initial definition. ...
PaymentAddress.country - Web APIs
The country read-only property of the PaymentAddress interface is a string identifying the address's country using the ISO 3166-1 alpha-2 standard. The string is always in its canonical upper-case form. Some examples of valid country values: "US", "GB", "CN", or "JP". Syntax var paymentCountry = PaymentAddress.country; Value A DOMString which contains the ISO3166-1 alpha-2 code identifying the country in which the address is located, or an empty string if no country is available, which frequently can be assumed to mean "same country as the site owner." Usage notes If the payment handler validates the address and determines that the value of country is invalid, a call to PaymentRequestUpdateEvent.updateWith() will be made with a details object containing a shippingAddressErrors field. That f...
PaymentAddress.dependentLocality - Web APIs
The read-only dependentLocality property of the PaymentAddress interface is a string containing a sublocality designation within a city, such as a neighborhood, borough, district, or, in the United Kingdom, a dependent locality. Also known as a post town. Syntax var paymentDependentLocality = PaymentAddress.dependentLocality; Value A DOMString indicating the sublocality portion of the address. This may be an empty string if no sublocality is available or required. It's used to provide disambiguation when a city may include areas that duplicate street names A sublocality is an area within a city, such as a neighborhood, borough, or district. In the United Kingdom, this is used to indicate the post town in the United Kingdom (known officially by the Royal Mail as the dependent locality). This ...
PaymentAddress.languageCode - Web APIs
The languageCode read-only property of the PaymentAddress interface returns a string containing the BCP-47 language code for the address. This is used while localizing the displayy of the address, allowing the determination of the field separators and the order of fields when formatting the address. Syntax var paymentLanguageCode = PaymentAddress.languageCode; Value A DOMString providing the BCP-47 format language code indicating the language the address was written in, such as "en-US", "pt-BR", or "ja-JP". ...
PaymentAddress.organization - Web APIs
The organization read-only property of the PaymentAddress interface returns a string containing the name of the organization, firm, company, or institution at the address. Syntax var paymentOrganization = PaymentAddress.organization; Value A DOMString whose value is the name of the organization or company located at the address described by the PaymentAddress object. This should be the name of the organization that is to receive the shipment for shipping addresses, or which is repsonsible for payment for payment addresses. Specifications Specification Status Comment Payment Request APIThe definition of 'PaymentAddress.organization' in that specification. Candidate Recommendation Initial definition. ...
PaymentAddress.phone - Web APIs
If no phone number is available, this value is an empty string. ...
PaymentAddress.postalCode - Web APIs
The postalCode read-only property of the PaymentAddress interface returns a string containing a code used by a jurisdiction for mail routing, for example, the ZIP Code in the United States or the Postal Index Number (PIN code) in India. Syntax var paymentPostalCode = PaymentAddress.postalCode; Value A DOMString which contains the postal code portion of the address. A postal code is a string (either numeric or alphanumeric) which is used by a postal service to optimize mail routing and delivery. Various countries use different terms for this. In most of the world, it's known as the "post code" or "postal code." In the United States, the ZIP code is used. India uses PIN codes. Specifications Specification Status Comment Payment Request APIThe definition of 'PaymentAddr...
PaymentAddress.recipient - Web APIs
The read-only recipient property of the PaymentAddress interface returns a string containing the name of the recipient, purchaser, or contact person at the payment address. Syntax var paymentRecipient = PaymentAddress.recipient; Value A DOMString giving the name of the person receiving or paying for the purchase, or the name of a contact person in other contexts. If no name is available, this string is empty. Specifications Specification Status Comment Payment Request APIThe definition of 'PaymentAddress.recipient' in that specification. Candidate Recommendation Initial definition. ...
PaymentAddress.region - Web APIs
The read-only region property of the PaymentAddress interface returns a string containing the top-level administrative subdivision of the country in which the address is located. For example, this may be a state, province, oblast, or prefecture. Syntax var paymentRegion = PaymentAddress.region; Value A DOMString specifying the top-level administrative subdivision within the country in which the address is located. This region has different names in different countries, such as: state, province, oblast, prefecture, or county. Usage notes In some countries, like Belgium, it's uncommon for people to provide a region as part of their postal address. In such cases, the browser returns an empty string as the value of region. However, the address should still be acceptable to use for its intended p...
PaymentAddress.regionCode - Web APIs
The regionCode read-only attribute of the PaymentAddress interface returns a one-, two-, or three-alphanumeric code (DOMString) representing the region of the address (e.g., "CA" for California, or "11" for Lisbon, Portugal). The code is derived from the ISO 3166-2 standard, which defines codes for identifying the subdivisions (e.g., states, provinces, autonomous regions, etc.) of all countries in the world. If the browser can't determine the region code, or the country doesn't use regions for postal addresses, it returns an empty string. Syntax var regionCode = paymentAddress.regionCode; Value A DOMString indicating the one to three character alphanumeric code representing the region portion of the address. This should correspond to region, but should be the ISO 3166--2 standard's region ...
PaymentAddress.sortingCode - Web APIs
The sortingCode read-only property of the PaymentAddress interface returns a string containing a postal sorting code such as is used in France. Syntax var sortingCode = PaymentAddress.sortingCode; Value A DOMString containing the sorting code portion of the address. Specifications Specification Status Comment Payment Request APIThe definition of 'PaymentAddress.sortingCode' in that specification. Candidate Recommendation Initial definition. ...
PaymentCurrencyAmount.currency - Web APIs
This is the currency in which the payment's value is given. All currency values must include the currency system in this property. ...
PaymentCurrencyAmount.currencySystem - Web APIs
the standard being used to specify the currency the value is specified in. For example, the default is urn:iso:std:iso:4217, which specifies that the standard used is ISO 4217. Warning: This property has been removed from the specification and should no longer be used; the currency is now always specified using ISO 4127. Syntax currencySystem = paymentCurrencyAmount.currencySystem; Value A DOMString which specifies the currency standard used to specify the currency in which the payment value is represented. The default, urn:iso:std:iso:4217, indicates the ISO 4217 standard. This obsolete property was removed in the May 3, 2018 update of the Payment Request API specification. Specifications Specification Status Comment Payment Request APIThe definition of 'PaymentCu...
PaymentCurrencyAmount.value - Web APIs
ed to indicate a negative value, such as to represent a refund or discount. Important note: The number given in this string is always specified using the period (".") as the decimal point, rather than the comma (","), even if the user's locale normally uses the comma. You must convert the entered text to this form or it will not be valid. Syntax value = paymentCurrencyAmount.value; Value A DOMString indicating the numeric value of the payment. This must be a valid decimal number, with an optional leading minus sign ("-"), then one or more decimal digits 0 through 9, optionally with a decimal point (".") with at least one digit following it to represent fractional units. There must not be any leading or trailing whitespace in the string. For uniformity and consistency, the value is always gi...
PaymentDetailsUpdate.shippingAddressErrors - Web APIs
The PaymentDetailsUpdate dictionary's shippingAddressErrors property, if present, contains an AddressErrors object whose contents provide error messages for one or more of the values in the PaymentAddress specified as PaymentRequest.shippingAddress. Syntax var addressErrors = PaymentDetailsUpdate.shippingAddressErrors; Value An AddressErrors object, which contains DOMStrings describing errors in the properties of a PaymentAddress. For each property in PaymentAddress, a property by the same name is found in shippingAddressErrors if and only if a validation error occurred for that property. In that case, the property in shippingAddressErrors is a string describing the validation error, ideally including suggestions about fixing the error. Specifications Specification Sta...
PaymentDetailsUpdate - Web APIs
interface is even enabled for the first time. Properties The PaymentDetailsUpdate dictionary is based on the PaymentDetailsBase dictionary, and inherits its properties, which are included in the list below. displayItems Optional An array of PaymentItem objects, each describing one line item for the payment request. These represent the line items on a receipt or invoice. error Optional A DOMString specifying an error message to present to the user. When calling updateWith(), including error in the updated data causes the user agent to display the text as a general error message. For address field specific errors, use shippingAddressErrors. modifiers Optional An array of PaymentDetailsModifier objects, each describing a modifier for particular payment method identifiers. For example, you ...
PaymentMethodChangeEvent - Web APIs
The PaymentMethodChangeEvent() constructor creates a new PaymentMethodChangeEvent object providing details about a paymentmethodchange event. Syntax paymentMethodChangeEvent = new PaymentMethodChangeEvent(type, options); Parameters type A DOMString which must contain the string paymentmethodchange, the name of the only type of event which uses the PaymentMethodChangeEvent interface. options Optional An optional PaymentMethodChangeEventInit dictionary which may contain zero or more of the following properties: methodName Optional A DOMString containing the payment method identifier for the payment handler being used. This is an empty string by default. methodDetails Optional An object providing payment method-specific information describing the changes made to the payment, ...
PaymentMethodChangeEvent.methodName - Web APIs
ich uniquely identifies the payment handler currently selected by the user. The payment handler may be a payment technology, such as Apple Pay or Android Pay, and each payment handler may support multiple payment methods; changes to the payment method within the payment handler are described by the PaymentMethodChangeEvent. Syntax var methodName = paymentMethodChangeEvent.methodName; Value A DOMString which uniquely identifies the currently-selected payment handler. This may be a string chosen from the list of standardized payment method identifiers, or a URL used by the payment processing service. See Payment method identifiers in Payment Request API for more information. The default value is the empty string, "". Example This example uses the paymentmethodchange event to watch for changes...
PaymentMethodChangeEvent - Web APIs
MethodChangeEventInit dictionary. Properties In addition to the properties below, this interface includes properties inherited from PaymentRequestUpdateEvent. methodDetails Read only Secure context An object containing payment method-specific data useful when handling a payment method change. If no such information is available, this value is null. methodName Read only Secure context A DOMString containing the payment method identifier, a string which uniquely identifies a particular payment method. This identifier is usually a URL used during the payment process, but may be a standardized non-URL string as well, such as basic-card. The default value is the empty string, "". Methods This interface includes methods inherited from PaymentRequestUpdateEvent. Specifications Spe...
PaymentRequest.PaymentRequest() - Web APIs
yment methods the merchant web site accepts and any associated payment method specific data. Each item in the array contains the following fields: supportedMethods For early implementations of the spec, this was a sequence of identifiers for payment methods that the merchant website accepts. Starting with more recent browsers, this parameter is more generic than credit cards, it is a single DOMString, and the meaning of the data parameter changes with the supportedMethods. For example, the basic card payment method is selected by specifying the string basic-card here. data A JSON-serializable object that provides optional information that might be needed by the supported payment methods. This has to conform to the type expected by the payment handler indicated by supportedMethods. For bas...
PaymentRequest.prototype.id - Web APIs
Web › API › PaymentRequest › id
re-order-123-12312 The id is then also available in the PaymentResponse returned from the show() method, but under the requestId attribute. const response = await request.show(); console.log(response.requestId === request.id); // And in serialized form too const json = response.toJSON(); console.log(json.requestId,response.requestId, request.id); Syntax var id = paymentRequest.id Value A DOMString. Specifications Specification Status Comment Payment Request APIThe definition of 'id' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send...
paymentRequestId - Web APIs
The paymentRequestId read-only property of the PaymentRequestEvent interface returns the ID of the PaymentRequest object. Syntax var id = paymentRequestEvent.paymentRequestId Value A DOMString contains the ID. Specifications Specification Status Comment Payment Handler APIThe definition of 'paymentRequestId' in that specification. Working Draft Initial definition. ...
PaymentRequestUpdateEvent.updateWith() - Web APIs
s the details of an existing PaymentRequest. Syntax paymentRequestUpdateEvent.updateWith(details); Parameters details A PaymentDetailsUpdate object specifying the changes applied to the payment request: displayItems Optional An array of PaymentItem objects, each describing one line item for the payment request. These represent the line items on a receipt or invoice. error Optional A DOMString specifying an error message to present to the user. When calling updateWith(), including error in the updated data causes the user agent to display the text as a general error message. For address field specific errors, use shippingAddressErrors. modifiers Optional An array of PaymentDetailsModifier objects, each describing a modifier for particular payment method identifiers. For example, you ...
PaymentResponse.complete() - Web APIs
method complete() of the Payment Request API notifies the user agent that the user interaction is over, and causes any remaining user interface to be closed. This method must be called after the user accepts the payment request and the Promise returned by the PaymentRequest.show() method is resolved. Syntax completePromise = paymentRequest.complete(result); Parameters result Optional A DOMString indicating the state of the payment operation upon completion. It must be one of the following: success The payment was successfully processed. The user agent may or may not present some form of "payment successful" indication to the user. fail The payment was not successfully processed. The failure may or may not be announced to the user by the user agent, depending on its design. u...
PaymentResponse.methodName - Web APIs
The methodName read-only property of the PaymentResponse interface returns a string uniquely identifying the payment handler selected by the user. This string may be either one of the standardized payment method identifiers or a URL used by the payment handler to process payments. Syntax var methodName = PaymentResponse.methodName; Value A DOMString uniquely identifying the payment handler being used to process the payment. This may be either a standardized identifier, or a URL used by the payment processor to handle payments. See Merchant validation in Payment processing concepts for more information. Example The following example extracts the method name from the PaymentResponse object to the promise returned from PaymentRequest.show(). In a real-world implementation this data would then...
PaymentResponse.requestId - Web APIs
Specifications Specification Status Comment Payment Request APIThe definition of 'requestId' in that specification. Candidate Recommendation Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. ...
Pbkdf2Params - Web APIs
This may be one of: SHA-1 SHA-256 SHA-384 SHA-512 Warning: SHA-1 is considered vulnerable in most cryptographic applications, but is still considered safe in PBKDF2. However, it's advisable to transition away from it everywhere, so unless you need to use SHA-1, don't. ...
performance.clearMarks() - Web APIs
The clearMarks() method removes the named mark from the browser's performance entry buffer. If the method is called with no arguments, all performance entries with an entry type of "mark" will be removed from the performance entry buffer. Note: This feature is available in Web Workers. Syntax performance.clearMarks(); performance.clearMarks(name); Arguments name Optional A DOMString representing the name of the timestamp. If this argument is omitted, all performance entries with an entry type of "mark" will be removed. Return value void Example The following example shows both uses of the clearMarks() method. // Create a small helper to show how many PerformanceMark entries there are. function logMarkCount() { console.log( "Found this many entries: " + performance.getEnt...
performance.clearMeasures() - Web APIs
The clearMeasures() method removes the named measure from the browser's performance entry buffer. If the method is called with no arguments, all performance entries with an entry type of "measure" will be removed from the performance entry buffer. Note: This feature is available in Web Workers. Syntax performance.clearMeasures(); performance.clearMeasures(name); Arguments name Optional A DOMString representing the name of the timestamp. If this argument is omitted, all performance entries with an entry type of "measure" will be removed. Return value void Example The following example shows both uses of the clearMeasures() method. // Create a small helper to show how many PerformanceMeasure entries there are. function logMeasureCount() { console.log( "Found this many entri...
performance.mark() - Web APIs
Web › API › Performance › mark
in the browser's performance entry buffer with the given name. The application defined timestamp can be retrieved by one of the Performance interface's getEntries*() methods (getEntries(), getEntriesByName() or getEntriesByType()). The mark()'s stores its data internally as PerformanceEntry. Note: This feature is available in Web Workers. Syntax performance.mark(name); Arguments name A DOMString representing the name of the mark. If the name given to this method already exists in the PerformanceTiming interface, SyntaxError is thrown. Return value void Example The following example shows how to use mark() to create and retrieve PerformanceMark entries. // Create a bunch of marks. performance.mark("squirrel"); performance.mark("squirrel"); performance.mark("monkey"); performanc...
performance.measure() - Web APIs
rk timestamp. duration - set to a DOMHighResTimeStamp that is the duration of the measure (typically, the end mark timestamp minus the start mark timestamp). Note: This feature is available in Web Workers. Syntax performance.measure(name); performance.measure(name, startMark); performance.measure(name, startMark, endMark); performance.measure(name, undefined, endMark); Arguments name A DOMString representing the name of the measure. startMark Optional A DOMString representing the name of the measure's starting mark. May also be the name of a PerformanceTiming property. If it is omitted, then the start time will be the navigation start time. endMark Optional A DOMString representing the name of the measure's ending mark. May also be the name of a PerformanceTiming property. If it is o...
PerformanceEntry.name - Web APIs
eEntry.entryType, as shown by the table below. Value Subtype entryType values Description URL PerformanceFrameTiming, PerformanceNavigationTiming frame, navigation The document's address. URL PerformanceResourceTiming resource The resolved URL of the requested resource. This value doesn't change even if the request is redirected. DOMString PerformanceMark mark The name used when the mark was created by calling performance.mark(). DOMString PerformanceMeasure measure name used when the measure was created by calling performance.measure(). DOMString PerformancePaintTiming paint Either 'first-paint' or 'first-contentful-paint'. Example The following example shows the use of the name...
PerformanceEntry - Web APIs
Timing PerformanceNavigationTiming PerformanceResourceTiming PerformancePaintTiming Note: This feature is available in Web Workers. Properties PerformanceEntry.name Read only A value that further specifies the value returned by the PerformanceEntry.entryType property. The value of both depends on the subtype. See property page for valid values. PerformanceEntry.entryType Read only A DOMString representing the type of performance metric such as, for example, "mark". See property page for valid values. PerformanceEntry.startTime Read only A DOMHighResTimeStamp representing the starting time for the performance metric. PerformanceEntry.duration Read only A DOMHighResTimeStamp representing the time value of the duration of the performance event. Methods PerformanceEntry.toJSON(...
PerformanceNavigationTiming - Web APIs
presenting the time value equal to the time immediately after the user agent finishes the unload event of the previous document. PerformanceNavigationTiming.unloadEventStart Read only A DOMHighResTimeStamp representing the time value equal to the time immediately before the user agent starts the unload event of the previous document. Methods PerformanceNavigationTiming.toJSON() Returns a DOMString that is the JSON representation of the PerformanceNavigationTiming object. Specifications Specification Status Comment Navigation Timing Level 2The definition of 'PerformanceNavigationTiming' in that specification. Working Draft Initial definition. ...
PerformanceObserverEntryList.getEntriesByName() - Web APIs
erformance entry objects for a given name and entry type. The list's members are determined by the set of entry types specified in the call to the observe() method. The list is available in the observer's callback function (as the first parameter in the callback). This method is exposed to Window and Worker interfaces. Syntax entries = list.getEntriesByName(name, type); Parameters name A DOMString representing the name of the entry to retrieve. type Optional A DOMString representing the type of entry to retrieve such as "mark". The valid entry types are listed in PerformanceEntry.entryType. Return value A list of explicitly observed performance entry objects that have the specified name and type. If the type argument is not specified, only the name will be used to determine the entrie...
PerformanceResourceTiming - Web APIs
ntent-codings. PerformanceResourceTiming.decodedBodySizeRead only A number that is the size (in octets) received from the fetch (HTTP or cache) of the message body, after removing any applied content-codings. PerformanceResourceTiming.serverTimingRead only An array of PerformanceServerTiming entries containing server timing metrics. Methods PerformanceResourceTiming.toJSON() Returns a DOMString that is the JSON representation of the PerformanceResourceTiming object. Example See the example in Using the Resource Timing API. Specifications Specification Status Comment Resource Timing Level 1The definition of 'PerformanceResourceTiming' in that specification. Candidate Recommendation Initial definition. ...
PerformanceServerTiming.description - Web APIs
Syntax serverTiming.description; Specifications Specification Status Comment Server TimingThe definition of 'description' in that specification. ...
PerformanceServerTiming.name - Web APIs
Syntax serverTiming.name; Specifications Specification Status Comment Server TimingThe definition of 'name' in that specification. ...
ProcessingInstruction - Web APIs
Living Standard XML specification ...
ProgressEvent() - Web APIs
It is case-sensitive. ...
ProgressEvent.initProgressEvent() - Web APIs
ted that way are untrusted. Note: this method has been dropped during the standard process. It has been deprecated and removed from most implementation. Do not use it anymore, use the standard constructor, ProgressEvent(), to create a synthetic ProgressEvent Syntax Progress.initProgressEvent(typeArg, canBubbleArg, cancelableArg, lengthComputable, loaded, total); Parameters typeArg Is a DOMString identifying the specific type of animation event that occurred. The following values are allowed: Value Meaning loadstart The operation has started. progress The operation still is in progress. error The operation failed and didn't complete. abort The operation was cancelled and didn't complete. loa...
PromiseRejectionEvent() - Web APIs
drejection", to match the event names of the possible (non-synthetic) PromiseRejectionEvent events that user agents can actually fire). options An Object specifying details about the rejection which occurred: promise The Promise that was rejected. reason Any value or Object which represents the reason the promise was rejected. This can be anything from a numeric error code to an error DOMString to an object which contains detailed information describing the situation resulting in the promise being rejected. Return value A new PromiseRejectionEvent configured as specified by the parameters. Examples This example creates a new unhandledrejection event for the promise myPromise with the reason being the string "My house is on fire". The reason could just as easily be a number, or ...
PublicKeyCredential.id - Web APIs
The id read-only property of the PublicKeyCredential interface is a DOMString, inherited from Credential, which represents the identifier of the current PublicKeyCredential instance. This property is a base64url encoded version of PublicKeyCredential.rawId. Note: This property may only be used in top-level contexts and will not be available in an <iframe> for example. Syntax id = publicKeyCredential.id Value A DOMString being the base64url encoded version of PublicKeyCredential.rawId. Examples var publicKey = { challenge: new Uint8Array(26) /* this actually is given from the server */, rp: { name: "Example CORP", id : "login.example.com" }, user: { id: new Uint8Array(26), /* To be changed for each user */ name: "jdoe@example.com", displayName: "John Doe", ...
PublicKeyCredentialCreationOptions.rp - Web APIs
e rp property of the PublicKeyCredentialCreationOptions dictionary is an object describing the relying party which requested the credential creation (via navigator.credentials.create()). Syntax relyingPartyObj = publicKeyCredentialCreationOptions.rp Properties icon Optional An URL as a USVString value which points to an image resource which can be the logo/icon of the relying party. id A DOMString uniquely identifying a relying party. The default value of this property is the domain of the current document (e.g. "login.example.com"). It may be overridden with a suffix of the current domain (e.g. "example.com"). name A DOMString giving a human-readable name for the relying party. This property is intended for display (e.g. "Example CORP"). Examples var publicKey = { challenge: /* fro...
PushEvent.PushEvent() - Web APIs
This can be push or pushsubscriptionchange. eventInitDict Optional An options object containing any initialization data you want to populate the PushEvent object with. The options are: data: The data you want the PushEvent to contain, if any. ...
PushManager.subscribe() - Web APIs
yntax PushManager.subscribe(options).then(function(pushSubscription) { ... } ); Parameters options Optional An object containing optional configuration parameters. It can have the following properties: userVisibleOnly: A boolean indicating that the returned push subscription will only be used for messages whose effect is made visible to the user. applicationServerKey: A Base64-encoded DOMString or ArrayBuffer containing an ECDSA P-256 public key that the push server will use to authenticate your application server. If specified, all messages from your application server must use the VAPID authentication scheme, and include a JWT signed with the corresponding private key. This key IS NOT the same ECDH key that you use to encrypt the data. For more information, see "Using VAPID with WebPu...
PushSubscription.getKey() - Web APIs
The value can be: p256dh: An Elliptic curve Diffie-Hellman public key on the P-256 curve (that is, the NIST secp256r1 elliptic curve). The resulting key is an uncompressed point in ANSI X9.62 format. ...
PushSubscription.subscriptionId - Web APIs
Syntax var subId = pushSubscription.subscriptionId; Specifications Specification Status Comment Push API Working Draft Initial definition Browser Compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
PushSubscription - Web APIs
g containing the endpoint associated with the push subscription. PushSubscription.expirationTime Read only A DOMHighResTimeStamp of the subscription expiration time associated with the push subscription, if there is one, or null otherwise. PushSubscription.options Read only An object containing the options used to create the subscription. PushSubscription.subscriptionId Read only A DOMString containing the subscription ID associated with the push subscription. Methods PushSubscription.getKey() Returns an ArrayBuffer which contains the client's public key, which can then be sent to a server and used in encrypting push message data. PushSubscription.toJSON() Standard serializer -- returns a JSON representation of the subscription properties. PushSubscription.unsubscribe() Sta...
RTCConfiguration.bundlePolicy - Web APIs
The RTCConfiguration dictionary's bundlePolicy property is a string value indicating which SDP bundling policy, if any, to use for the underlying RTP streams used by an RTCPeerConnection. The configuration object is used as an input to the RTCPeerConnection() constructor. Syntax let rtcConfiguration = { bundlePolicy: policy }; rtcConfiguration.bundlePolicy = policy; Value A DOMString identifying the SDP bundling policy to use for the RTP streams used by the RTCPeerConnection. This string, which must be a member of the RTCBundlePolicy enumeration, has the following possible values: balanced The ICE agent begins by creating one RTCDtlsTransport to handle each type of content added: one for audio, one for video, and one for the RTC data channel, if applicable. If the remote peer isn't BU...
RTCConfiguration.iceTransportPolicy - Web APIs
policy the ICE agent should use during negotiation of connections. Its value must come from the RTCIceTransportPolicy enumerated type. If this property isn't included in the RTCConfiguration, the default value, all, is used. Syntax let rtcConfiguration = { iceTransportPolicy: policy }; rtcConfiguration.iceTransportPolicy = policy; let policy = rtcConfiguration.iceTransportPolicy; Value A DOMString which indicates what ICE candidate policy the ICE agent should use during the negotiation process, per the JSEP standard. The permitted values are: all The ICE agent is permitted to use any kind of candidate, including both local and relay candidates. The agent--or the browser itself--may still perform some form of IP filtering on the incoming candidates for reasons including privacy and secu...
RTCConfiguration - Web APIs
nection to local peers. iceTransportPolicy Optional The current ICE transport policy; this must be one of the values from the RTCIceTransportPolicy enumeration. If the policy isn't specified, all is assumed by default, allowing all candidates to be considered. A value of relay limits the candidates to those relayed through another server, such as a STUN or TURN server. peerIdentity Optional A DOMString which specifies the target peer identity for the RTCPeerConnection. If this value is set (it defaults to null), the RTCPeerConnection will not connect to a remote peer unless it can successfully authenticate with the given name. rtcpMuxPolicy Optional The RTCP mux policy to use when gathering ICE candidates, in order to support non-multiplexed RTCP. The value must be one of those from the RTCRt...
RTCDTMFSender.insertDTMF() - Web APIs
th tonechange events sent to the RTCDTMFSender every time a tone starts or ends. As long as the connection is active, you can send tones at any time. Calling insertDTMF() will append the specified tones to the end of the current tone buffer, so that those tones play after the previously-enqueued tones. Syntax RTCDTMFSender.insertDTMF(tones[, duration[, interToneGap]]); Parameters tones A DOMString containing the DTMF codes to be transmitted to the recipient. Specifying an empty string as the tones parameter clears the tone buffer, aborting any currently queued tones. A "," character inserts a two second delay. duration Optional The amount of time, in milliseconds, that each DTMF tone should last. This value must be between 40 ms and 6000 ms (6 seconds), inclusive. The default is 100 ms. ...
RTCDTMFSender.toneBuffer - Web APIs
The RTCDTMFSender interface's toneBuffer property returns a string containing a list of the DTMF tones currently queued for sending to the remote peer over the RTCPeerConnection. To place tones into the buffer, call insertDTMF(). Tones are removed from the string as they're played, so only upcoming tones are listed. Syntax var toneBuffer = RTCDTMFSender.toneBuffer; Value A DOMString listing the tones to be played. If the string is empty, there are no tones pending. Tone buffer format The tone buffer is a string which can contain any combination of the characters that are permitted by the DTMF standard. DTMF tone characters The digits 0-9 These characters represent the digit keys on a telephone keypad. The letters A-D These characters represent the "A" through "D" keys which are part ...
RTCDTMFSender - Web APIs
See toneBuffer for details on the format of the tone buffer. Methods RTCDTMFSender.insertDTMF() Given a string describing a set of DTMF codes and, optionally, the duration of and inter-tone gap between the tones, insertDTMF() starts send...
RTCDTMFToneChangeEvent - Web APIs
The RTCDTMFToneChangeEvent interface represents events sent to indicate that DTMF tones have started or finished playing. This interface is used by the tonechange event. Properties In addition to the properties of Event, this interface offers the following: RTCDTMFToneChangeEvent.tone Read only A DOMString specifying the tone which has begun playing, or an empty string ("") if the previous tone has finished playing. Constructors RTCDTMFToneChangeEvent() Returns a new RTCDTMFToneChangeEvent. It takes two parameters, the first being a DOMString representing the type of the event (always "tonechange"); the second a dictionary containing the initial state of the properties of the event. Methods Supports the methods defined in Event. There are no additional methods. Examples This snip...
RTCDataChannel.binaryType - Web APIs
The property binaryType on the RTCDataChannel interface is a DOMString which specifies the type of JavaScript object which should be used to represent binary data received on the RTCDataChannel. Values allowed by the WebSocket.binaryType property are also permitted here: "blob" if Blob objects are being used or "arraybuffer" if ArrayBuffer objects are being used. The default is "blob". When a binary message is received on the data channel, the resulting message event's MessageEvent.data property is an object of the type specified by the binaryType. Syntax var type = aDataChannel.binaryType; aDataChannel.binaryType = type; Value A DOMString that can have one of these values: "blob" Received binary messages' contents will be contained in Blob objects. "arraybuffer" Received binary me...
RTCDataChannel.label - Web APIs
These labels are not required to be unique. You may use the label as you wish; you could use it to identify all the channels that are being used for the same purpose, by giving them all the same name. Or you could give each channel a unique label for tracking purposes. It's entirely up to the design decisions made when building your site or app. A unique ID can be found in the id property. A data channel's label is set when the channel is created by calling RTCPeerConnection.createDataChannel(). It cannot be changed after that. ...
RTCDataChannel.protocol - Web APIs
If no protocol was specified when the data channel was created, then this property's value is "" (the empty string). The permitted values of this property are defined by the Web site or app using the data channel. The ability for each channel to have a defined subprotocol lets your app, for example, use JSON objects as messages on one channel while another channel is plaintext and another is raw binary or even some other format. Syntax var subProtocol = aDataChannel.protocol; Value A string identifying the app-defined subprotocol being used for exchanging data on the channel. ...
RTCDataChannelEvent() - Web APIs
There is only one type of RTCDataChannelEvent, so this will always be "datachannel". ...
RTCError - Web APIs
Web › API › RTCError
l DOM errors. Constructor RTCError() Creates and returns a new RTCError object initialized with the properties of the provided RTCErrorInit dictionary and, optionally, a string to use as the value of the error's message property. Properties In addition to the properties defined by the parent interface, DOMException, RTCError includes the following properties: errorDetail Read only A DOMString specifying the WebRTC-specific error code identifying the type of error that occurred. receivedAlert Read only An unsigned long integer value indicating the fatal DTLS error which was received from the network. Only valid if the errorDetail string is dtls-failure. If null, no DTLS error was received. sctpCauseCode Read only If errorDetail is sctp-failure, this property is a long integer spe...
RTCErrorEvent.error - Web APIs
ject describing the details of the error which the event is announcing. Syntax let errorInfo = rtcErrorEvent.error; Value An RTCError object whose properties provide details about the error which has occurred in the context of a WebRTC operation. Since RTCError is based upon DOMException, it includes those properties. Additional properties defined by RTCError are: errorDetail Read only A DOMString specifying the WebRTC-specific error code identifying the type of error that occurred. receivedAlert Read only An unsigned long integer value indicating the fatal DTLS error which was received from the network. Only valid if the errorDetail string is dtls-failure. If null, no DTLS error was received. sctpCauseCode Read only If errorDetail is sctp-failure, this property is a long integer spe...
RTCIceCandidate.address - Web APIs
s of the device which is the source of the candidate. address is null by default if not otherwise specified. The address field's value is set when the RTCIceCandidate() constructor is used. You can't specify the address in the options object, but the address is automatically extracted from the candidate a-line, if it's formatted properly. Syntax var address = RTCIceCandidate.address; Value A DOMString providing the IP address from which the candidate comes. Note: If port is null -- and port is supported by the user agent -- passing the candidate to addIceCandidate() will fail, throwing an OperationError exception. Security notes It's important to note here that although WebRTC does not require the two peers on an RTCPeerConnection to know one another's true IP addresses, the address prope...
RTCIceCandidate.component - Web APIs
The read-only component property on the RTCIceCandidate interface is a string which indicates whether the candidate is an RTP or an RTCP candidate. If a candidate represents both RTP and RTCP multiplexed together, it is reported as an RTP candidate. Syntax var component = RTCIceCandidate.component; Value A DOMString which is "rtp" for RTP (or RTP and RTCP multiplexed together) candidates or "rtcp" for RTCP candidates. Usage notes Consider this SDP attribute line (a-line): a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host This is an ICE candidate a-line, whose foundation is 4234997325. The next field on the a-line, "1", is the component ID. A value of "1" indicates RTP, which is recorded in the component property as "rtp". If this value were instead "2", the a-line would ...
RTCIceCandidate.foundation - Web APIs
The RTCIceCandidate interface's read-only foundation property is a string which uniquely identifies the candidate across multiple transports. As such, the foundation can be used to correlate candidates that are present on multiple RTCIceTransport objects Syntax var foundation = RTCIceCandidate.foundation; Value A DOMString which uniquely identifies the candidate across all RTCIceTransports on which it is available. Note: If port is null -- and port is supported by the user agent -- passing the candidate to addIceCandidate() will fail, throwing an OperationError exception. Usage notes Consider this SDP attribute line (a-line) which describes an ICE candidate: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host The field "4234997325" is the foundation. Example This code...
RTCIceCandidate.protocol - Web APIs
ult if not specified properly in the SDP, but this is an error condition and will result in a thrown exception when you call RTCPeerConnection.addIceCandidate(). The protocol property's value is set when the RTCIceCandidate() constructor is used. The value is automatically extracted from the candidate a-line, if it's formatted properly. Syntax var protocol = RTCIceCandidate.protocol; Value A DOMString which indicates what network protocol the candidate uses, UDP or TCP. These values are defined by the enumerated type RTCIceProtocol: tcp The candidate, if selected, would use TCP as the transport protocol for its data. The tcpType property provides additional information about the kind of TCP candidate represented by the object. udp The candidate will use the UDP transport protocol for its...
RTCIceCandidate.relatedAddress - Web APIs
he candidate a-line, if it's formatted properly, being taken from its rel-address field. The related address and port (relatedPort) are not used at all by ICE itself; they are provided for analysis and diagnostic purposes only, and their inclusion may be blocked by security systems, so do not rely on them having non-null values. Syntax var relAddress = RTCIceCandidate.relatedAddress; Value A DOMString which contains the candidate's related address. For both peer and server reflexive candidates, the related address (and related port) are the base for that server or peer reflexive candidate. For relay candidates, the related address and port are set to the mapped address selected by the TURN server. For host candidates, relatedAddress is null, meaning the field is not included in the candidate'...
RTCIceCandidate.tcpType - Web APIs
interface's read-only tcpType property is included on TCP candidates to provide additional details about the candidate type. The tcpType field's value is set when the RTCIceCandidate() constructor is used. You can't directly set its value; instead, its value is automatically extracted from the candidate a-line, if it's formatted properly. Syntax var tcpType = RTCIceCandidate.tcpType; Value A DOMString whose value is one of those defined by the RTCIceTcpCandidateType enumerated type. "active" The transport will try to open an outbound connection but won't receive inoming connection requests. "passive" The transport will receive incoming connection requests but won't try to open an outbound connection. "so" The transport will try to open a connection simultaneously with its peer. tcpTy...
RTCIceCandidate.type - Web APIs
e's read-only type specifies the type of candidate the object represents. The type field's value is set when the RTCIceCandidate() constructor is used. You can't specify the value of type in the options object, but the address is automatically extracted from the candidate a-line, if it's formatted properly, being taken from its cand-type field. Syntax var type = RTCIceCandidate.type; Value A DOMString whose value is one of those defined by the RTCIceCandidateType enumerated type. These candidate types are listed in order of priority; the higher in the list they are, the more efficient they are. host The candidate is a host candidate, whose IP address as specified in the RTCIceCandidate.ip property is in fact the true address of the remote peer. srflx The candidate is a server reflexive...
RTCIceCandidate.usernameFragment - Web APIs
ing a new candidate with new RTCIceCandidate(). Note that 24 bits of the username fragment are required to be randomized by the browser. See Randomization below for details. If you instead call RTCIceCandidate() with a string parameter containing the candidate m-line text, the value of usernameFragment is extracted from the m-line. Syntax var ufrag = RTCIceCandidate.usernameFragment; Value A DOMString containing the username fragment (usually referred to in shorthand as "ufrag" or "ice-ufrag") that, along with the ICE password ("ice-pwd"), uniquely identifies a single ongoing ICE interaction, including for any communication with the STUN server. The string may be up to 256 characters long, and has no default value. Randomization At least 24 bits of the text in the ufrag are required to be ra...
RTCIceCandidateInit.candidate - Web APIs
The candidate string specifies the network connectivity information for the candidate. If the candidate is an empty string (""), the end of the candidate list has been reached; this candidate is known as the "end-of-candidates" marker. The syntax of the candidate string is described in RFC 5245, section 15.1. ...
RTCIceCandidateInit.sdpMid - Web APIs
Note: Attempting to add a candidate (using addIceCandidate()) that has a value of null for either sdpMid or sdpMLineIndex will throw a TypeError exception. Example ... ...
RTCIceCandidateInit.usernameFragment - Web APIs
The string may be up to 256 characters long, and has no default value. ...
RTCIceCandidateInit - Web APIs
sdpMid Optional The identification tag of the media stream with which the candidate is associated, or null if there is no associated media stream. The default is null. sdpMLineIndex Optional The zero-based index of the m-line within the SDP of the media description with which the candidate is associated, or null if no such associated exists. The default is null. usernameFragment Optional A DOMString containing a string which uniquely identifies the remote peer. This string is generated by WebRTC at the beginning of the session, and at least 24 bits worth of the string contain random data. The string may be up to 256 characters long. This property has no default value and is not present unless set explicitly. Specifications Specification Status Comment WebRTC 1.0: R...
RTCIceCandidateStats.localCandidateId - Web APIs
The RTCIceCandidatePairStats property localCandidateId is a string that uniquely identifies the local ICE candidate which was analyzed to generate the RTCIceCandidateStats used to compute the statistics for this pair of candidates. Syntax localCandidateId = rtcIceCandidatePairStats.localCandidateId; Value A DOMString giving a unique identifier for the local RTCIceCandidate for the connection described by this RTCIceCandidatePairStats object. This candidate is the source of one of the two RTCIceCandidateStats objects that were used to compute the contents of this RTCIceCandidatePairStats object. Specifications Specification Status Comment Identifiers for WebRTC's Statistics APIThe definition of 'RTCIceCandidatePairStats.localCandidateId' in that specification. ...
RTCIceCandidatePairStats.remoteCandidateId - Web APIs
The RTCIceCandidatePairStats property remoteCandidateId is a string that uniquely identifies the remote ICE candidate which was analyzed to generate the RTCIceCandidateStats used to compute the statistics for this pair of candidates. Syntax remoteCandidateId = rtcIceCandidatePairStats.remoteCandidateId; Value A DOMString uniquely identifies the remote ICE candidate--that is, the candidate describing a configuration for the remote peer--which is represented by the remote end of these statistics. Specifications Specification Status Comment Identifiers for WebRTC's Statistics APIThe definition of 'RTCIceCandidatePairStats.remoteCandidateId' in that specification. Candidate Recommendation Initial specification. ...
RTCIceCandidatePairStats.state - Web APIs
ICE check lists During ICE negotiation, the ICE layer builds up a check list, which is a list of potential pairings of ICE candidates. Each pair has a state, whose value is represented by RTCStatsIceCandidatePairState. When a candidate pair is added to the check list, it begins in the frozen state. ...
RTCIceCandidatePairStats.transportId - Web APIs
The transport-related statistics come from the RTCTransportStats dictionary's properties. ...
RTCIceCandidatePairStats - Web APIs
e Optional A floating-point value indicating the total time, in seconds, that has elapsed between sending STUN requests and receiving responses to them, for all such requests made to date on this candidate pair. This includes botyh connectivity check and consent check requests. You can compute the average round trip time (RTT) by dividing this value by responsesReceived. transportId Optional A DOMString that uniquely identifies the RTCIceTransport that was inspected to obtain the transport-related statistics (as found in RTCTransportStats) used in generating this object. Obsolete properties The following properties have been removed from the specification and should no longer be used. You should update any existing code to avoid using them as soon as is practical. Check the compatibility tabl...
RTCIceCandidateStats.candidateType - Web APIs
The RTCIceCandidateStats interface's candidateType property is a string which indicates the type of ICE candidate the object represents. Syntax candidateType = rtcIceCandidateStats.candidateType; Value A DOMString whose value is one of the strings found in the RTCIceCandidateType enumerated type:host The candidate is a host candidate, whose IP address as specified in the RTCIceCandidate.ip property is in fact the true address of the remote peer. srflx The candidate is a server reflexive candidate; the ip indicates an intermediary address assigned by the STUN server to represent the candidate's peer anonymously. prflx The candidate is a peer reflexive candidate; the ip is an intermediary address assigned by the STUN server to represent the candidate's peer anonymously. relay The candida...
RTCIceCandidateStats.networkType - Web APIs
etworkType property specifies the type of network used by a local candidate to communicate with a remote peer. Note: The networkType property is only included in RTCIceCandidateStats objects for local candidates (that is, candidates generated locally and included in an SDP offer or answer that has been sent to the remote peer). Syntax networkType = rtcIceCandidateStats.networkType; Value A DOMString whose value is taken from the RTCNetworkType enumerated type. The string indicates the type of network connection that the described candidate would use to communicate with the other peer. The permitted values are: bluetooth A Bluetooth connection is used by the described connection. cellular The connection uses a cellular data service to connect. This includes all cellular data services i...
RTCIceCandidateStats.relayProtocol - Web APIs
The RTCIceCandidateStats dictionary's relayProtocol property specifies the protocol being used by a local ICE candidate to communicate with the TURN server. The ICE protocl being used by the candidate otherwise can be obtained from the protocol property. Syntax relayProtocol = rtcIceCandidateStats.relayProtocol; Value A DOMString identifying the protocol being used by the endpoint to communicate with the TURN server. The possible values are: tcp TCP (Transport Control Protocol) is being used to communicate with the TURN server. tls TLS (Transport Layer Security) is being used to communicate with the TURN server. udp UDP (User Datagram Protocol) is being used to communicate with the TURN server. Note: This property is only present on RTCIceCandidateStats objects that represent local...
RTCIceCandidateStats.transportId - Web APIs
The RTCIceCandidateStats dictionary's transportId property is a string that uniquely identifies the transport that produced the RTCTransportStats from which information about this candidate was taken. Syntax transportID = rtcIceCandidateStats.transportId; Value A DOMString whose value uniquely identifies the transport from which any transport-related information accumulated in the RTCIceCandidateStats was taken. This can be used to compare candidates that would use the same transport, for example. Specifications Specification Status Comment Identifiers for WebRTC's Statistics APIThe definition of 'RTCIceCandidateStats.transportId' in that specification. Candidate Recommendation Initial specification. ...
RTCIceCandidateStats.url - Web APIs
This is the same URL that would be received in the icecandidate event's url property. ...
RTCIceCandidateType - Web APIs
These strings are taken directly from the candidate a-line in SDP. Values These candidate types are listed in order of priority; the higher in the list they are, the more efficient they are. host The candidate is a host candidate, whose IP address as specified in the RTCIceCandidate.ip property is in fact the true address of the remote peer. srflx The candidate is a server reflexive candidate; the ip indicates an intermediary address assigned by the STUN server to represent the candidate's peer anonymously. ...
RTCIceComponent - Web APIs
These strings are mapped to corresponding numeric values as they appear in the candidate a-line in SDP. Values "rtp" Identifies an ICE transport which is being used for the Real-time Transport Protocol (RTP), or for RTP multiplexed with the RTP Control Protocol (RTCP). RTP is defined in RFC 3550. An RTCIceComponent of this value corresponds to the component ID field in the candidate a-line with the value 1. "rtcp" Identifies an ICE transport being used for RTCP, which is defined in RFC 3550, section 6. This value of RTCIceComponent corresponds to the component ID 2. ...
RTCIceParameters.password - Web APIs
The RTCIceParameters dictionary's password property specifies the ICE password that, in tandem with the usernameFragment, uniquely identifies an ICE session for its entire duration. Syntax password = RTCIceParameters.password; Value A DOMString containing the password that corresponds to the transport's usernameFragment string Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCIceParameters.password' in that specification. Candidate Recommendation Initial specification. ...
RTCIceParameters.usernameFragment - Web APIs
The string may be up to 256 characters long. ...
RTCIceParameters - Web APIs
TCIceParameters dictionary specifies the username fragment and password assigned to an ICE session. During ICE negotiation, each peer's username fragment and password are recorded in an RTCIceParameters object, which can be obtained from the RTCIceTransport by calling its getLocalParameters() or getRemoteParameters() method, depending on which end interests you. Properties usernameFragment A DOMString specifying the value of the ICE session's username fragment field, ufrag. password A DOMString specifying the session's password string. Usage notes The username fragment and password uniquely identify the remote peer for the duration of the ICE session, and are used to both ensure security and to avoid crosstalk across multiple ongoing ICE sessions. See RTCIceCandidate.usernameFragment for ...
RTCIceProtocol - Web APIs
These strings are taken directly from the candidate a-line in SDP. Values tcp The candidate, if selected, would use TCP as the transport protocol for its data. The tcpType property provides additional information about the kind of TCP candidate represented by the object. udp The candidate will use the UDP transport protocol for its data. This is the preferred protocol for media interactions because of its better performance profile. Usage notes The RTCIceProtocol type is used by the protocol property of RTCIceCandidate objects. ...
RTCIceServer.url - Web APIs
Web › API › RTCIceServer › url
should instead use the newer urls property, which allows you to optionally specify multiple URLs for the server. Try to update any existing code to use that property instead. Syntax var iceServer = { ... url = iceServerUrl, ... }; var serverUrl = iceServer.url; iceServer.url = iceServerUrl; The value of this property is a DOMString containing the full URL of a server to use during ICE negotiation. Example This example creates a new RTCPeerConnection which will use a STUN server at stunserver.example.org to negotiate connections. myPeerConnection = new RTCPeerConnection({ iceServers: [ { url: "stun:stunserver.example.org" } ] }); Unfortunately, the only way to tell ICE that the server has a backup domai...
RTCIceServer - Web APIs
to use when logging into the server. This is only used if the RTCIceServer represents a TURN server. credentialType Optional If the RTCIceServer represents a TURN server, this attribute specifies what kind of credential is to be used when connecting. This must be one of the values defined by the RTCIceCredentialType enum. The default is password. urls This required property is either a single DOMString or an array of DOMStrings, each specifying a URL which can be used to connect to the server. username Optional If the RTCIceServer is a TURN server, then this is the username to use during the authentication process. Avoid specifying an unnecessarily large number of URLs in the urls property; the startup time for your connection will go up substantially. Every server in the list will be conta...
RTCIceTcpCandidateType - Web APIs
Values "active" The transport will try to open an outbound connection but won't receive inoming connection requests. "passive" The transport will receive incoming connection requests but won't try to open an outbound connection. "so" The transport will try to open a connection simultaneously with its peer. Usage notes The RTCIceTcpCandidateType type is used by the tcpType property of RTCIceCandidate objects. ...
RTCIceTransport.component - Web APIs
RTP is defined in RFC 3550. ...
RTCIceTransport.gatheringState - Web APIs
Syntax gatherState = RTCIceTransport.gatheringState; Value A string from the RTCIceGathererState enumerated type whose value indicates the current state of the ICE agent's candidate gathering process: "new" The RTCIceTransport is newly created and has not yet started to gather ICE candidates. "gathering" The transport is in the process of gathering candidates. "complete" The transport has finished gathering ICE candidates and has sent the end-of-candidates indicator to the remote device. ...
RTCIceTransport.role - Web APIs
The read-only RTCIceTransport property role indicates which ICE role the transport is fulfilling: that of the controlling agent, or the agent that is being controlled. You can learn more about ICE roles in Choosing a candidate pair in WebRTC connectivity. Syntax iceRole = RTCIceTransport.role; Value A DOMString specifying whether the RTCIceTransport represents the controlling agent or the controlled agent. The value must be one of those found in the enumerated type RTCIceRole: "controlling" The RTCIceTransport object is serving as the controlling agent. "controlled" The transport is the controlled agent. Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCIceTransport.role' in that specificatio...
RTCIceTransport.state - Web APIs
The read-only RTCIceTransport property state returns the current state of the ICE transport, so you can determine the state of ICE gathering in which the ICE agent currently is operating. This differs from the gatheringState, which only indicates whether or not ICE gathering is currently underway. Syntax iceState = iceTransport.state; Value A DOMString, whose value is one of those found in the enumerated type RTCIceTransportState, which indicates the stage of ICE gathering that's currently underway. Its value will be one of the following: "new" The RTCIceTransport is currently gathering local candidates, or is waiting for the remote device to begin to transmit the remote candidates, or both. In this state, checking of candidates to look for those which might be acceptable has not yet beg...
RTCIdentityErrorEvent.idp - Web APIs
Firefox implements the interface of this property under the following name: RTCPeerConnectionIdentityErrorEvent. It is likely that it will correct this name when it will unprefix RTCPeerConnection, once spec and implementation will have been stabilized. ...
RTCIdentityErrorEvent.loginUrl - Web APIs
It can be null and is provided by the identity provider (idp). Firefox implements the interface of this property under the following name: RTCPeerConnectionIdentityErrorEvent. It is likely that it will correct this name when it will unprefix RTCPeerConnection, once spec and implementation will have been stabilized. ...
RTCIdentityErrorEvent.protocol - Web APIs
Firefox implements the interface of this property under the following name: RTCPeerConnectionIdentityErrorEvent. It is likely that it will correct this name when it will unprefix RTCPeerConnection, once spec and implementation will have been stabilized. ...
RTCIdentityErrorEvent - Web APIs
lidationerror. Firefox implements this interface under the following name: RTCPeerConnectionIdentityErrorEvent. It is likely that it will correct this name when it will unprefix RTCPeerConnection, once spec and implementation will have been stabilized. Properties A RTCIdentityErrorEvent being an Event, this event also implements these properties. RTCIdentityErrorEvent.idp Read only Is a DOMString describing the domain name of the identity provider (idp) generating the error response. RTCIdentityErrorEvent.loginUrl Read only Is a DOMString giving the URL where the user can complete the authentication. It can be null and is provided by the identity provider (idp). RTCIdentityErrorEvent.protocol Read only Is a DOMString describing the Idp protocol in use. Methods A RTCIdentityErrorE...
RTCIdentityEvent.assertion - Web APIs
Firefox implements the interface this property belongs to under the following name: RTCPeerConnectionIdentityEvent. It is likely that it will correct this name when it will unprefix RTCPeerConnection, once spec and implementation will have been stabilized. ...
RTCIdentityEvent - Web APIs
identityresult.. Firefox implements this interface under the following name: RTCPeerConnectionIdentityEvent. It is likely that it will correct this name when it will unprefix RTCPeerConnection, once spec and implementation will have been stabilized. Properties A RTCIdentityEvent being an Event, this event also implements these properties. RTCIdentityEvent.assertion Read only Returns the DOMString containing a blob being the assertion generated. Methods A RTCIdentityEvent being an Event, this event also implements these properties. There is no specific RTCIdentityEvent method. Examples pc.onidentityresult = function( ev ) { alert("A new identity assertion (blob: '" + ev.assertion + "') has been gen...
RTCInboundRtpStreamStats.receiverId - Web APIs
The receiverId property of the RTCInboundRtpStreamStats dictionary specifies the id of the RTCAudioReceiverStats or RTCVideoReceiverStats object representing the RTCRtpReceiver receiving the stream. Syntax var receiverStatsId = rtcInboundRtpStreamStats.receiverId; Value A DOMString which contains the ID of the RTCAudioReceiverStats or RTCVideoReceiverStats object which provides information about the RTCRtpReceiver which is receiving the streamed media. Specifications Specification Status Comment Identifiers for WebRTC's Statistics APIThe definition of 'RTCInboundRtpStreamStats.receiverId' in that specification. Candidate Recommendation Initial definition. ...
RTCInboundRtpStreamStats.remoteId - Web APIs
The remoteId property of the RTCInboundRtpStreamStats dictionary specifies the id of the RTCRemoteOutboundRtpStreamStats object representing the remote peer's RTCRtpSender which is sending the media to the local peer. Syntax var remoteStatsId = rtcInboundRtpStreamStats.remoteId; Value A DOMString containing the ID of the RTCRemoteOutboundRtpStreamStats object that represents the remote peer's RTCRtpSender for the synchronization source represented by this stats object. Specifications Specification Status Comment Identifiers for WebRTC's Statistics APIThe definition of 'RTCInboundRtpStreamStats.remoteId' in that specification. Candidate Recommendation Initial definition. ...
RTCInboundRtpStreamStats.trackId - Web APIs
The trackId property of the RTCInboundRtpStreamStats dictionary indicates the id of the RTCReceiverAudioTrackAttachmentStats or RTCReceiverVideoTrackAttachmentStats object representing the MediaStreamTrack which is receiving the incoming media. Syntax var trackStatsId = rtcInboundRtpStreamStats.trackId; Value A DOMString containing the ID of the RTCReceiverAudioTrackAttachmentStats or RTCReceiverVideoTrackAttachmentStats object representing the track which is receiving the media from this RTP session. Specifications Specification Status Comment Identifiers for WebRTC's Statistics APIThe definition of 'RTCInboundRtpStreamStats.trackId' in that specification. Candidate Recommendation Initial definition. ...
RTCOutboundRtpStreamStats.qualityLimitationReason - Web APIs
This quality reduction may include changes such as reduced frame rate or resolution, or an increase in compression factor. The amount of time the encoded media has had its quality reduced in each of the potential ways that can be done can be found in qualityLimitationDurations. Syntax var qualityLimitationReason = RTCOutboundRtpStreamStats.qualityLimitationReason; Value A Map whose keys are DOMStrings whose values come from the RTCQualityLimitationReason enumerated type, and whose values are the duration of the media, in seconds, whose quality was reduced for that reason. Examples Specifications Specification Status Comment Identifiers for WebRTC's Statistics APIThe definition of 'RTCOutboundRtpStreamStats.qualityLimitationReason' in that specification. Cand...
RTCOutboundRtpStreamStats.remoteId - Web APIs
The remoteId property of the RTCOutboundRtpStreamStats dictionary specifies the id of the RTCRemoteInboundRtpStreamStats object representing the remote peer's RTCRtpReceiver which is sending the media to the local peer for this SSRC. Syntax var remoteStatsId = RTCOutboundRtpStreamStats.remoteId; Value A DOMString containing the ID of the RTCRemoteInboundRtpStreamStats object that represents the remote peer's RTCRtpReceiver for the synchronization source represented by this stats object. Specifications Specification Status Comment Identifiers for WebRTC's Statistics APIThe definition of 'RTCOutboundRtpStreamStats.remoteId' in that specification. Candidate Recommendation Initial definition. ...
RTCOutboundRtpStreamStats.trackId - Web APIs
The trackId property of the RTCOutboundRtpStreamStats dictionary indicates the id of the RTCSenderAudioTrackAttachmentStats or RTCSenderVideoTrackAttachmentStats object representing the MediaStreamTrack which is being sent on this stream. Syntax var trackStatsId = RTCOutboundRtpStreamStats.trackId; Value A DOMString containing the ID of the RTCSenderAudioTrackAttachmentStats or RTCSenderVideoTrackAttachmentStats object representing the track which is the source of the media being sent on this stream. Specifications Specification Status Comment Identifiers for WebRTC's Statistics APIThe definition of 'RTCOutboundRtpStreamStats.trackId' in that specification. Candidate Recommendation Initial definition. ...
RTCPeerConnection() - Web APIs
E agent; these are typically STUN and/or TURN servers. If this isn't specified, the connection attempt will be made with no STUN or TURN server available, which limits the connection to local peers. iceTransportPolicy Optional The current ICE transport policy; this must be one of the values from the RTCIceTransportPolicy enum. If this isn't specified, "all" is assumed. peerIdentity Optional A DOMString which specifies the target peer identity for the RTCPeerConnection. If this value is set (it defaults to null), the RTCPeerConnection will not connect to a remote peer unless it can successfully authenticate with the given name. rtcpMuxPolicy Optional The RTCP mux policy to use when gathering ICE candidates, in order to support non-multiplexed RTCP. The value must be one of those from the RTCRt...
RTCPeerConnection.addTransceiver() - Web APIs
r() creates a new RTCRtpTransceiver and adds it to the set of transceivers associated with the RTCPeerConnection. Each transceiver represents a bidirectional stream, with both an RTCRtpSender and an RTCRtpReceiver associated with it. Syntax rtpTransceiver = RTCPeerConnection.addTransceiver(trackOrKind, init); Parameters trackOrKind A MediaStreamTrack to associate with the transceiver, or a DOMString which is used as the kind of the receiver's track, and by extension of the RTCRtpReceiver itself. init Optional An object that conforms to the RTCRtpTransceiverInit dictionary which provides any options that you may wish to specify when creating the new transceiver. Possible values are: direction Optional The new transceiver's preferred directionality. This value is used to initialize the ne...
RTCPeerConnection.generateCertificate() - Web APIs
The generateCertificate() method of the RTCPeerConnection interface creates and stores an X.509 certificate and corresponding private key then returns an RTCCertificate, providing access to it. Syntax var cert = RTCPeerConnection.generateCertificate(keygenAlgorithm) Parameters keygenAlgorithm A DOMString identifying the algorithm to use in creating the key. RTCPeerConnection.generateCertificate() is a static method, so it is always called on the RTCPeerConnection interface itself, not an instance thereof. Return value A reference to an RTCCertificate object. Example RTCPeerConnection.generateCertificate({ name: 'RSASSA-PKCS1-v1_5', hash: 'SHA-256', modulusLength: 2048, publicExponent: new Uint8Array([1, 0, 1]) }).then(function(cert) { var pc = new RTCPeerConnection...
RTCPeerConnection.getStreamById() - Web APIs
d with local or remote end of the connection. If no stream matches, it returns null. This property has been replaced with the RTCPeerConnection.getLocalStreams and RTCPeerConnection.getRemoteStreams properties. If you have code that uses stream, you will need to update, since browsers have begun to remove support for stream. Syntax var mediaStream = pc.getStream(id); Parameters id Is a DOMString corresponding to the stream to return. Example var stream = pc.getStreamById(myTrackId); if (stream) { console.log("Found stream: " + stream.id); } Polyfill Running the following code before any other code will create RTCPeerConnection.prototype.getStreamById() if it's not natively available. // from: https://bugs.chromium.org/p/chromium/issues/detail?id=698163&desc=5#c10 RTCPeerConnectio...
RTCPeerConnection.peerIdentity - Web APIs
Once this promise resolves successfully, the resulting identity is the target peer identity and cannot change for the duration of the connection. Syntax var identity = rtcPeerConnection.peerIdentity; Value A JavaScript Promise which resolves to an RTCIdentityAssertion that describes the remote peer's identity. If an error occcurs while attempting to validate an incoming identity assertion (that is, the information describing a peer's identity), the promise is rejected. ...
RTCPeerConnection.setIdentityProvider() - Web APIs
to the triplet given in parameter: its name, the protocol used to communicate with it (optional) and an optional username. The IdP will be used only when an assertion is needed. If the signalingState is set to "closed", an InvalidStateError is raised. Syntax pc.setIdentityProvider(domainname [, protocol] [, username]); There is no return value for this method. Parameters domainname Is a DOMString is the domain name where the IdP is. protocol Optional Is a DOMString representing the protocol used to communicate with the IdP. It defaults to "default" and is used to determine the URL where the IdP is listening. username Optional Is a DOMString representing the username associated with the IdP. Example var pc = new PeerConnection(); pc.setIdentityAssertion("developer.mozilla.org"); ...
RTCPeerConnection - Web APIs
s has finished.localDescription Read only The read-only property RTCPeerConnection.localDescription returns an RTCSessionDescription describing the session for the local end of the connection. If it has not yet been set, this is null.peerIdentity Read only The read-only RTCPeerConnection property peerIdentity returns a JavaScript Promise that resolves to an RTCIdentityAssertion which contains a DOMString identifying the remote peer.pendingLocalDescription Read only The read-only property RTCPeerConnection.pendingLocalDescription returns an RTCSessionDescription object describing a pending configuration change for the local end of the connection. This does not describe the connection as it currently stands, but as it may exist in the near future. Use RTCPeerConnection.currentLocalDescription or RT...
RTCPeerConnectionIceErrorEvent.address - Web APIs
The RTCPeerConnectionIceErrorEvent property address is a string which indicates the local IP address being used to communicate with the STUN or TURN server during negotiations. The error which occurred involved this address. Syntax let address = rtcPeerConnectionIceErrorEvent.address; Value A DOMString which specifies the local IP address of the network connection to the ICE server with which negotiations were occurring when the error occurred. This address identifies the network interface on the local device which is being used to attempt to establish the connection to the remote peer. This can be useful on multi-homed systems--devices with more than one network connection--to determine which network interface is being used. For example, on a mobile phone, there are typically at least two ne...
RTCPeerConnectionIceEvent() - Web APIs
options A dictionary of type RTCPeerConnectionInit, which may contain one or more of the following fields: "candidate" (optional, default is null): A RTCIceCandidate representing the ICE candidate being concerned by the event. If null, the event indicates the end of candidate gathering. ...
RTCPeerConnectionIceEvent - Web APIs
ing an Event, this event also implements these properties. RTCPeerConnectionIceEvent.candidate Read only Contains the RTCIceCandidate containing the candidate associated with the event, or null if this event indicates that there are no further candidates to come. Constructors RTCPeerConnectionIceEvent() Returns a new RTCPeerConnectionIceEvent. It takes two parameters, the first being a DOMString representing the type of the event; the second a dictionary containing the RTCIceCandidate it refers to. Methods A RTCPeerConnectionIceEvent being an Event, this event also implements these properties. There is no specific RTCDataChannelEvent method. Examples pc.onicecandidate = function( ev ) { alert("The ICE candidate (transport address: '" + ev.candidate.candidate + "') has bee...
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
The RTCRemoteOutboundRtpStreamStats dictionary's localId property is a string which can be used to identify the RTCInboundRtpStreamStats object whose remoteId matches this value. Together, these two objects provide statistics about the inbound and outbound sides of the same synchronization source (SSRC). Syntax let localId = rtcRemoteOutboundRtpStreamStats.localId; Value A DOMString which can be compared to the value of an RTCInboundRtpStreamStats object's remoteId property to see if the two represent statistics for each of the two sides of the same set of data received by the local peer. Usage notes You can think of the local and remote views of the same RTP stream as pairs, each of which has a reference back to the other one. Thus, if an RTCStatsReport includes an remote-outbound-rtp stat...
RTCRemoteOutboundRtpStreamStats - Web APIs
tics model's RTCRemoteOutboundRtpStreamStats dictionary extends the underlying RTCSentRtpStreamStats dictionary with properties measuring metrics specific to outgoing RTP streams. Properties In addition to the properties defined by RTCSentRtpStreamStats and its underlying RTCRtpStreamstats and RTCStats dictionaries, RTCRemoteOutboundRtpStreamStats defines the following properties. localId A DOMString which is used to find the local RTCInboundRtpStreamStats object which shares the same Synchronization Source (SSRC). remoteTimestamp A DOMHighResTimeStamp specifying the timestamp (on the remote device) at which the statistics in the RTCRemoteOutboundRtpStreamStats object were sent by the remote endpoint. This is different from the timestamp found in the base RTCStats dictionary; it represents ...
RTCRtpCapabilities - Web APIs
tensions for that codec. Properties codecs An array of RTCRtpCodecCapability objects, each describing one of the codecs supported by the RTCRtpSender or RTCRtpReceiver. There are some special entries in this array, described below in the section The codecs array. headerExtensions An array of objects conforming to the RTCRtpHeaderExtensionCapability dictionary. Each object contains a single DOMString, uri, specifying the URI of the header extension, as described in RFC 5285. Description The codecs array The codecs array is an array of objects conforming to the dictionary RTCRtpCodecCapability. Each of these objects describes a single codec and its basic capabilities. Its properties are: The browser will only report distinct capability combinations separately. If two sets of capabilitie...
RTCRtpCodecCapability - Web APIs
Optional An unsigned integer value indicating the maximum number of channels supported by the codec; for example, a codec that supports only mono sound would have a value of 1; stereo codecs would have a 2, etc. clockRate An unsigned long integer specifying the codec's clock rate in Hertz (Hz). The IANA maintains a list of codecs and their parameters, including their clock rates. mimeType A DOMString indicating the codec's MIME media type and subtype. See Codecs used by WebRTC for details about potential codecs that might be referenced here. sdpFmtpLine Optional A DOMString giving the format specific parameters field from the a=fmtp line in the SDP which corresponds to the codec, if such a line exists. If there is no parameters field, this property is left out. Description RTCRtpCodecCap...
RTCRtpEncodingParameters - Web APIs
limitations. maxFramerate A double-precision floating-point value specifying the maximum number of frames per second to allow for this encoding. ptime An unsigned long integer value indicating the preferred duration of a media packet in milliseconds. This is typically only relevant for audio encodings. The user agent will try to match this as well as it can, but there is no guarantee. rid A DOMString which, if set, specifies an RTP stream ID (RID) to be sent using the RID header extension. This parameter cannot be modified using setParameters(). Its value can only be set when the transceiver is first created. scaleResolutionDownBy Only used for senders whose track's kind is video, this is a double-precision floating-point value specifying a factor by which to scale down the video during enc...
RTCRtpReceiver.getCapabilities() static function - Web APIs
The static function RTCRtpReceiver.getCapabilities() returns an RTCRtpCapabilities object describing the codecs and capabilities supported by RTCRtpReceivers on the current device. You can, similarly, obtain the capabilities of RTCRtpSenders by calling the static function RTCRtpSender.getCapabilities(). Syntax let rtpCapabilities = RTCRtpReceiver.getCapabilities(kind); Parameters kind A DOMString indicating the type of media for which you wish to get the device's capability to receive. All browsers support the primary media kinds: audio and video. Return value An RTCRtpCapabilities object stating what capabilities the browser has for receiving the specified media kind over an RTCPeerConnection. If the browser doesn't have any support for the given media kind, the returned value is null.
RTCRtpSendParameters.encodings - Web APIs
limitations. maxFramerate A double-precision floating-point value specifying the maximum number of frames per second to allow for this encoding. ptime An unsigned long integer value indicating the preferred duration of a media packet in milliseconds. This is typically only relevant for audio encodings. The user agent will try to match this as well as it can, but there is no guarantee. rid A DOMString which, if set, specifies an RTP stream ID (RID) to be sent using the RID header extension. This parameter cannot be modified using setParameters(). Its value can only be set when the transceiver is first created. scaleResolutionDownBy Only used for senders whose track's kind is video, this is a double-precision floating-point value specifying a factor by which to scale down the video during enc...
RTCRtpSender.getCapabilities() static function - Web APIs
The static function RTCRtpSender.getCapabilities() returns an RTCRtpCapabilities object describing the codecs and capabilities supported by the RTCRtpSender. You can, similarly, obtain the capabilities of RTCRtpReceivers by calling the static function RTCRtpReceiver.getCapabilities(). Syntax let rtpCapabilities = RTCRtpSender.getCapabilities(kind); Parameters kind A DOMString indicating the type of media for which you wish to get the sender's capability to receive. All browsers support the primary media kinds: audio and video. Return value An RTCRtpCapabilities object stating what capabilities the browser has for sending the specified media kind over an RTCPeerConnection. If the browser doesn't have any support for the given media kind, the returned value is null. Description As a sta...
RTCRtpStreamStats.codecId - Web APIs
The RTCRtpStreamStats dictionary's codecId property is a string which uniquely identifies the object that was inspected to produce the data in the RTCCodecStats for the RTP stream. Syntax var codecID = RTCRtpStreamStats.codecId; Value A DOMString which uniquely identifies the object from which the contents of the stream's RTCCodecStats are derived. Specifications Specification Status Comment Identifiers for WebRTC's Statistics APIThe definition of 'RTCRtpStreamStats.codecId' in that specification. Candidate Recommendation Initial definition. ...
RTCRtpStreamStats.kind - Web APIs
ctionary is a string indicating whether the described RTP stream contains audio or video media. Its value is always either "audio" or "video". This property was previously called mediaType. The name was changed in the specification in February, 2018. See Browser compatibility below to determine how this affects the browsers you're targeting. Syntax mediaKind = RTCRtpStreamStats.kind; Value A DOMString whose value is "audio" if the track whose statistics are given by the RTCRtpStreamStats object contains audio, or "video" if the track contains video media. This string will always be the same as the one provided by the associated MediaStreamTrack object's kind property. It will also match the statistics object's RTCCodecStats.codec property's media type. Specifications Specification ...
RTCRtpStreamStats.trackId - Web APIs
The RTCRtpStreamStats dictionary's trackId property is a string which uniquely identifies the RTCMediaStreamTrackStats object which contains the track statistics for the MediaStreamTrack for which statistics are provided in this object. Syntax var trackID = RTCRtpStreamStats.trackId; Value A DOMString which uniquely identifies the RTCMediaStreamTrackStats object that provides statistics for the track for which statistics are being collected by this RTCStatsReport. Note: This value is not the same as the value of MediaStramTrack.id. Specifications Specification Status Comment Identifiers for WebRTC's Statistics APIThe definition of 'RTCRtpStreamStats.trackId' in that specification. Candidate Recommendation Initial definition. ...
RTCRtpStreamStats.transportId - Web APIs
The RTCRtpStreamStats dictionary's transportId property is a string which uniquely identifies the object from which the statistics contained in the RTCTransportStats properties in the RTCStatsReport. Syntax var transportID = RTCRtpStreamStats.transportId; Value A DOMString uniquely identifying the source of the statistics contained the RTCTransportStats properties in the RTCStatsReport. Specifications Specification Status Comment Identifiers for WebRTC's Statistics APIThe definition of 'RTCRtpStreamStats.transportId' in that specification. Candidate Recommendation Initial definition. ...
RTCRtpTransceiver.currentDirection - Web APIs
The read-only RTCRtpTransceiver property currentDirection is a string which indicates the current directionality of the transceiver. Its value is one of the strings defined by the RTCRtpTransceiverDirection enumeration. You can examine and set the transceiver's preferred directionality using direction property. Syntax var direction = RTCRtpTransceiver.currentDirection Value A DOMString whose value is one of the strings which are a member of the RTCRtpTransceiverDirection enumerated type. The RTCRtpTransceiverDirection type is an enumeration of string values. Each describes how the transceiver's associated RTCRtpSender and RTCRtpReceiver behave as shown in the table below. Value RTCRtpSender behavior RTCRtpReceiver behavior "sendrecv" Offers to send RTP data, an...
RTCRtpTransceiver.direction - Web APIs
The RTCRtpTransceiver property direction is a string which indicates the transceiver's preferred directionality. Its value must be one of the strings defined by the RTCRtpTransceiverDirection enumeration. The transceiver's current direction is indicated by the currentDirection property. Syntax var direction = RTCRtpTransceiver.direction Value A DOMString whose value is one of the strings which are a member of the RTCRtpTransceiverDirection enumerated type, indicating the transceiver's preferred direction. The RTCRtpTransceiverDirection type is an enumeration of string values. Each describes how the transceiver's associated RTCRtpSender and RTCRtpReceiver behave as shown in the table below. Value RTCRtpSender behavior RTCRtpReceiver behavior "sendrecv" Offers to...
RTCRtpTransceiver.mid - Web APIs
Its value is taken from the media ID of the SDP m-line. ...
RTCSctpTransport - Web APIs
rties Also inherits properties from: EventTarget RTCSctpTransport.maxChannelsRead only An integer value indicating the maximum number of RTCDataChannels that can be open simultaneously. RTCSctpTransport.maxMessageSizeRead only An integer value indicating the maximum size, in bytes, of a message which can be sent using the RTCDataChannel.send() method. RTCSctpTransport.stateRead only A DOMString enumerated value indicating the state of the SCTP transport. RTCSctpTransport.transportRead only An RTCDtlsTransport object representing the DTLS transport used for the transmission and receipt of data packets. Event handlers RTCSctpTransport.onstatechange Fired when the RTCSctpTransport.state changes. Methods This interface has no methods, but inherits methods from: EventTarget Exam...
RTCSessionDescription.toJSON() - Web APIs
ethod generates a JSON description of the object. Both properties, type and sdp, are contained in the generated JSON. Syntax var jsonValue = sd.toJSON(); The result value is a JSON object containing the following values: "type", containing the value of the RTCSessionDescription.type property and can be one of the following values: "offer", "answer", "pranswer" or null. "sdp", containing a DOMString, or null, with the SDP message corresponding to RTCSessionDescription.sdp property. Example // sd is a RTCSessionDescriptor alert(JSON.stringify(sd)); // This call the toJSON() method behind the scene. Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCSessionDescription: toJSON()' in that specif...
RTCSessionDescription - Web APIs
tion configuration options that the sender of the description supports. Once the two peers agree upon a configuration for the connection, negotiation is complete. Properties The RTCSessionDescription interface doesn't inherit any properties. RTCSessionDescription.type Read only An enum of type RTCSdpType describing the session description's type. RTCSessionDescription.sdp Read only A DOMString containing the SDP describing the session. Constants RTCSdpType This enum defines strings that describe the current state of the session description, as used in the type property. The session description's type will be specified using one of these values. Value Description answer The SDP contained in the sdp property is the definitive choice in the exchange. In ot...
RTCStats.id - Web APIs
Web › API › RTCStats › id
The id property of the RTCStats dictionary is a string which uniquely identifies the object for which this RTCStats object provides statistics. Using the id, you can correlate two or more RTCStats-based objects in order to monitor statistics over time for a given WebRTC object, such as an RTP stream, an RTCPeerConnection, or an RTCDataChannel. Syntax var id = RTCStats.id; Value A DOMString which uniquely identifies the object for which this RTCStats-based object provides statistics. The format of the ID string is not defined by the specification, so you cannot reliably make any assumptions about the contents of the string, or assume that the format of the string will remain unchanged for a given object type. Specifications Specification Status Comment WebRTC 1.0: Rea...
RTCStats.type - Web APIs
Web › API › RTCStats › type
The RTCStats dictionary's property type is a string which specifies the type of statistic represented by the object, where the permitted values are drawn from the enum type RTCStatsType. The string can be used to determine which of the RTCStats-based dictionaries are the foundation of the statistics object. Syntax var type = RTCStats.type; Value A DOMString which specifies which type of statistic is represented by the object. The string comes from the RTCStatsType enum and corrsponds to one of the RTCStats-based statistic object types. Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCStats.type' in that specification. Candidate Recommendation Initial definition. ...
RTCStats - Web APIs
Web › API › RTCStats
The RTCStats dictionary is the basic statistics object used by WebRTC's statistics monitoring model, providing the properties required of all statistics data objects. Specific classes of statistic are defined as dictionaries based on RTCStats. For example, statistics about a received RTP stream are represented by RTCReceivedRtpStreamStats. Properties id A DOMString which uniquely identifies the object which was inspected to produce this object based on RTCStats. timestamp A DOMHighResTimeStamp object indicating the time at which the sample was taken for this statistics object. type A DOMString indicating the type of statistics the object contains, taken from the enum type RTCStatsType. The statistics type hierarchy The various dictionaries that are used to define the contents of the ob...
RTCStatsReport - Web APIs
r each category of statistic information, there is a dictionary whose properties provide the relevant information. Properties common to all statistic categories All WebRTC statistics objects are fundamentally based on the RTCStats dictionary, which provides the most fundamental information: the timestamp, the statistic type string, and an ID uniquely identifying the source of the data: id A DOMString which uniquely identifies the object which was inspected to produce this object based on RTCStats. timestamp A DOMHighResTimeStamp object indicating the time at which the sample was taken for this statistics object. type A DOMString indicating the type of statistics the object contains, taken from the enum type RTCStatsType. The statistic categories The type gives the name of the statistic...
ReadableStream.ReadableStream() - Web APIs
fetched. cancel(reason) Optional This method, also defined by the developer, will be called if the app signals that the stream is to be cancelled (e.g. if ReadableStream.cancel() is called). The contents should do whatever is necessary to release access to the stream source. If this process is asynchronous, it can return a promise to signal success or failure. The reason parameter contains a DOMString describing why the stream was cancelled. type Optional This property controls what type of readable stream is being dealt with. If it is included with a value set to "bytes", the passed controller object will be a ReadableByteStreamController capable of handling a BYOB (bring your own buffer)/byte stream. If it is not included, the passed controller will be a ReadableStreamDefaultController. ...
ReadableStream.cancel() - Web APIs
finished with the stream and don't need any more data from it, even if there are chunks enqueued waiting to be read. That data is lost after cancel is called, and the stream is not readable any more. To read those chunks still and not completely get rid of the stream, you'd use ReadableStreamDefaultController.close(). Syntax var promise = readableStream.cancel(reason); Parameters reason A DOMString providing a human-readable reason for the cancellation. Return value A Promise, which fulfills with the value given in the reason parameter. Exceptions TypeError The stream you are trying to cancel is not a ReadableStream, or it is locked. Examples In Jake Archibald's cancelling a fetch example, a stream is used to fetch the WHATWG HTML spec chunk by chunk; each chunk is searched for t...
ReadableStream.getReader() - Web APIs
The getReader() method of the ReadableStream interface creates a reader and locks the stream to it. While the stream is locked, no other reader can be acquired until this one is released. Syntax var reader = readableStream.getReader({mode}); Parameters {mode} Optional An object containing a property mode, which takes as its value a DOMString specifying the type of reader to create. Values can be: "byob", which results in a ReadableStreamBYOBReader being created that can read readable byte streams (i.e. can handle "bring your own buffer" reading). undefined (or not specified at all -- this is the default), which results in a ReadableStreamDefaultReader being created that can read individual chunks from a stream. Return value A ReadableStreamDefaultReader or ReadableStreamBYOBRe...
ReadableStreamBYOBReader.cancel() - Web APIs
e cancels the stream, signaling a loss of interest in the stream by a consumer. The supplied reason parameter will be given to the underlying source, which may or may not use it. Note: If the reader is active, the cancel() method behaves the same as that for the associated stream (ReadableStream.cancel()). Syntax var promise = readableStreamBYOBReader.cancel(reason); Parameters reason A DOMString providing a human-readable reason for the cancellation. Return value A Promise, which fulfills with the value given in the reason parameter. Exceptions TypeError The source object is not a ReadableStreamBYOBReader, or the stream has no owner. Examples TBD. Specifications Specification Status Comment StreamsThe definition of 'cancel()' in that specification. ...
ReadableStreamDefaultReader.cancel() - Web APIs
called, and the stream is not readable any more. To read those chunks still and not completely get rid of the stream, you'd use ReadableStreamDefaultController.close(). Note: If the reader is active, the cancel() method behaves the same as that for the associated stream (ReadableStream.cancel()). Syntax var promise = readableStreamDefaultReader.cancel(reason); Parameters reason Optional A DOMString providing a human-readable reason for the cancellation. Return value A Promise, which fulfills with the value given in the reason parameter. Exceptions TypeError The source object is not a ReadableStreamDefaultReader, or the stream has no owner. Examples In the following simple example, a previously-created custom ReadableStream is read using a ReadableStreamDefaultReader created using...
Request.referrer - Web APIs
Web › API › Request › referrer
The referrer read-only property of the Request interface is set by the user agent to be the referrer of the Request. (e.g., client, no-referrer, or a URL.) Note: If referrer's value is no-referrer, it returns an empty string. Syntax var myReferrer = request.referrer; Value A DOMString representing the request's referrer. Example In the following snippet, we create a new request using the Request.Request() constructor (for an image file in the same directory as the script), then save the request referrer in a variable: var myRequest = new Request('flowers.jpg'); var myReferrer = myRequest.referrer; // returns "about:client" by default Specifications Specification Status Comment FetchThe definition of 'referrer' in that specification. Living Standard Initial...
Request.referrerPolicy - Web APIs
For more information and possible values, see the Referrer-Policy HTTP header page. ...
RsaHashedImportParams - Web APIs
The RsaHashedImportParams dictionary of the Web Crypto API represents the object that should be passed as the algorithm parameter into SubtleCrypto.importKey() or SubtleCrypto.unwrapKey(), when importing any RSA-based key pair: that is, when the algorithm is identified as any of RSASSA-PKCS1-v1_5, RSA-PSS, or RSA-OAEP. Properties name A DOMString. This should be set to RSASSA-PKCS1-v1_5, RSA-PSS, or RSA-OAEP, depending on the algorithm you want to use. hash A DOMString representing the name of the digest function to use. This can be one of SHA-256, SHA-384, or SHA-512. Warning: Although you can technically pass SHA-1 here, this is strongly discouraged as it is considered vulnerable. Examples See the examples for SubtleCrypto.importKey(). Specifications Specification ...
RsaOaepParams - Web APIs
This should be set to RSA-OAEP. label Optional A BufferSource -- an array of bytes that does not itself need to be encrypted but which should be bound to the ciphertext. ...
RsaPssParams - Web APIs
This should be set to RSA-PSS. saltLength A long integer representing the length of the random salt to use, in bytes. RFC 3447 says that "Typical salt lengths" are either 0 or the length of the output of the digest algorithm that was selected when this key was generated. ...
format - Web APIs
It has the same meaning as the 'format' property of SVGGlyphRefElement property. If the font is in one of the formats listed in CSS2([CSS2], section15.3.5), then its value is the corresponding <string> parameter of the font. Syntax string = myGlyph.format; myGlyph.format = string; Value The format values listed below are taken from CSS2([CSS2], section15.3.5). ...
SVGAltGlyphElement.glyphRef - Web APIs
It has the same meaning as the 'glyphRef' property on the SVGGlyphRefElement interface of the <glyphRef> element. Syntax string = myGlyph.glyphRef; myGlyph.glyphRef = string; Value The return value is a Glyph Identifier, the value of which depends on the format of the given font. ...
SVGAngle - Web APIs
Web › API › SVGAngle
he value as a floating point value, in the units expressed by unitType. Setting this attribute will cause value and valueAsString to be updated automatically to reflect this setting. Exceptions on setting: A DOMException with code NO_MODIFICATION_ALLOWED_ERR is raised when the length corresponds to a read-only attribute, or when the object itself is read-only. valueAsString The value as a DOMString value, in the units expressed by unitType. Setting this attribute will cause value, valueInSpecifiedUnits, and unitType to be updated automatically to reflect this setting. Exceptions on setting: A DOMException with code SYNTAX_ERR is raised if the assigned string cannot be parsed as a valid <angle>. A DOMException with code NO_MODIFICATION_ALLOWED_ERR is raised when the length correspond...
SVGAnimatedString - Web APIs
The SVGAnimatedString interface represents string attributes which can be animated from each SVG declaration. You need to create SVG attribute before doing anything else, everything should be declared inside this. Properties SVGAnimatedString.animVal Read only This is a DOMString representing the animation value. If the given attribute or property is being animated it contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, it contains the same value as baseVal. SVGAnimatedString.baseVal This is a DOMString representing the base value. The base value of the given attribute before applying any animations. Setter throws DOMException. Methods The SVGAnimatedString interface do not provide any specific methods. ...
SVGColorProfileElement - Web APIs
SVGColorProfileElement.renderingIntent An unsigned short corresponding to the rendering-intent attribute of the given element. It takes one of the RENDERING_INTENT_* constants defined on the SVGRenderingIntent interface that corresponds to the value of the rendering-intent attribute. ...
SVGElement - Web APIs
These can also be defined in SVG using attributes of the form data-*, where * is the key name for the pair. This works just like HTML's HTMLElement.dataset property and HTML's data-* global attribute. SVGElement.className Read only An SVGAnimatedStrin...
SVGEvent - Web APIs
Web › API › SVGEvent
The SVGEvent interface represents the event object for most SVG-related events. Properties Property Type Description target Read only EventTarget The event target (the topmost target in the DOM tree). type Read only DOMString The type of event. bubbles Read only Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. ...
SVGGlyphRefElement - Web APIs
" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">SVGGlyphRefElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties This interface also inherits properties from its parent, SVGElement and implements properties from SVGURIReference and SVGStylable. SVGGlyphRefElement.glyphRef A DOMString corresponding to the glyphRef attribute of the given element. SVGGlyphRefElement.format A DOMString corresponding to the format attribute of the given element. SVGGlyphRefElement.x A float corresponding to the x attribute of the given element. SVGGlyphRefElement.y A float corresponding to the y attribute of the given element. SVGGlyphRefElement.dx A float corresponding to the dx attribute...
SVGImageElement.decoding - Web APIs
Possible values are: sync: Decode the image synchronously for atomic presentation with other content. async: Decode the image asynchronously to reduce delay in presenting other content. auto: Default mode, which indicates no preference for the decoding mode. The browser decides what is best for the user. ...
SVGImageElement - Web APIs
stroke-width="2px" /><text x="186" y="94" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">SVGImageElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties This interface also inherits properties from its parent, SVGGraphicsElement. SVGImageElement.crossOrigin A DOMString corresponding to the crossorigin attribute of the given <image> element. SVGImageElement.decoding Returns a DOMString representing a hint given to the browser on how it should decode the image. SVGImageElement.height Read only An SVGAnimatedLength corresponding to the height attribute of the given <image> element. SVGImageElement.preserveAspectRatio Read only An SVGAnimatedPreserveAspectR...
SVGViewElement - Web APIs
The SVGViewElement interface provides access to the properties of <view> elements, as well as methods to manipulate them. Properties This interface also inherits properties from its parent interface, SVGElement. SVGViewElement.viewTarget An SVGStringList corresponding to the viewTarget attribute of the given <view> element. A list of DOMString values which contain the names listed in the viewTarget attribute. Each of the DOMString values can be associated with the corresponding element using the getElementById() method call. Methods This interface doesn't implement any specific methods, but inherits methods from its parent interface, SVGElement. Specifications Specification Status Comment Scalable Vector Graphics (SVG) 2The definition of 'SVGViewElement' in that ...
Screen.lockOrientation() - Web APIs
entation will change from an orientation to another as long as the orientations are amongst the orientations the device has been locked to. Return value Returns true if the orientation was authorized to be locked or false if the orientation locking was denied. Note that the return value doesn't indicate that the screen orientation is indeed locked: there may be a delay. ...
Screen.orientation - Web APIs
The orientation read-only property of the Screen interface returns the current orientation of the screen. Syntax var orientation = window.screen.orientation; Return value An instance of ScreenOrientation representing the orientation of the screen. Note that older, prefixed versions returned a DOMString equivalent to ScreenOrientation.type. Example var orientation = (screen.orientation || {}).type || screen.mozOrientation || screen.msOrientation; if (orientation === "landscape-primary") { console.log("That looks good."); } else if (orientation === "landscape-secondary") { console.log("Mmmh... the screen is upside down!"); } else if (orientation === "portrait-secondary" || orientation === "portrait-primary") { console.log("Mmmh... you should rotate your device to landscape"); } else ...
Screen - Web APIs
Web › API › Screen
event type on the EventTarget. EventTarget.removeEventListener() Removes an event listener from the EventTarget. EventTarget.dispatchEvent() Dispatches an event to this EventTarget. Additional methods in Mozilla chrome codebase Mozilla includes a couple of extensions for use by JS-implemented event targets to implement onevent properties. See also WebIDL bindings. void setEventHandler(DOMString type, EventHandler handler) EventHandler getEventHandler(DOMString type) Example if (screen.pixelDepth < 8) { // use low-color version of page } else { // use regular, colorful page } Specification Specification Status Comment CSS Object Model (CSSOM) View ModuleThe definition of 'Screen' in that specification. Working Draft Initial definition. ...
Screen Capture API - Web APIs
ace. Similar to getUserMedia(), this method creates a promise that resolves with a MediaStream containing the display area selected by the user, in a format that matches the specified options. Additions to existing dictionaries The Screen Capture API adds properties to the following dictionaries defined by other specifications. MediaTrackConstraints MediaTrackConstraints.cursor A ConstrainDOMString indicating whether or not the cursor should be included in the captured display surface's stream, and if it should always be visible or if it should only be visible while the mouse is in motion. MediaTrackConstraints.displaySurface A ConstrainDOMString indicating what type of display surface is to be captured. The value is one of application, browser, monitor, or window. MediaTrackConstraints.
SecurityPolicyViolationEvent.SecurityPolicyViolationEvent() - Web APIs
eventInitDict Optional A dictionary object containing information about the properties of the SecurityPolicyViolationEvent to be constructed. ...
SecurityPolicyViolationEvent.effectiveDirective - Web APIs
The effectiveDirective read-only property of the SecurityPolicyViolationEvent interface is a DOMString representing the directive whose enforcement uncovered the violation. Syntax let effDir = violationEventInstance.effectiveDirective; Value A DOMString representing the directive whose enforcement uncovered the violation. Example document.addEventListener("securitypolicyviolation", (e) => { console.log(e.effectiveDirective); }); Specifications Specification Status Comment Content Security Policy Level 3The definition of 'effectiveDirective' in that specification. Working Draft Initial definition ...
SecurityPolicyViolationEvent.originalPolicy - Web APIs
The originalPolicy read-only property of the SecurityPolicyViolationEvent interface is a DOMString containing the policy whose enforcement uncovered the violation. Syntax let origPolicy = violationEventInstance.originalPolicy; Value A DOMString representing the policy whose enforcement uncovered the violation. Example document.addEventListener("securitypolicyviolation", (e) => { console.log(e.originalPolicy); }); Specifications Specification Status Comment Content Security Policy Level 3The definition of 'originalPolicy' in that specification. Working Draft Initial definition ...
SecurityPolicyViolationEvent.violatedDirective - Web APIs
The violatedDirective read-only property of the SecurityPolicyViolationEvent interface is a DOMString representing the directive whose enforcement uncovered the violation. Syntax let violatedDir = violationEventInstance.violatedDirective; Value A DOMString representing the directive whose enforcement uncovered the violation. Example document.addEventListener("securitypolicyviolation", (e) => { console.log(e.violatedDirective); }); Specifications Specification Status Comment Content Security Policy Level 3The definition of 'violatedDirective' in that specification. Working Draft Initial definition ...
Selection.type - Web APIs
Web › API › Selection › type
Possible values are: None: No selection has currently been made. Caret: The selection is collapsed (i.e. the caret is placed on some text, but no range has been selected). Range: A range has been selected. Example In this example, the event handler will fire each time a new selection is made. console.log(selection.type) will return Caret or Range depending on whether the caret is placed at a single point in the text, or a range has been selected. ...
Selection - Web APIs
Web › API › Selection
characters within focusNode preceding the focus. If focusNode is an element, this is the number of child nodes of the focusNode preceding the focus. Selection.isCollapsedRead only Returns a Boolean indicating whether the selection's start and end points are at the same position. Selection.rangeCountRead only Returns the number of ranges in the selection. Selection.typeRead only Returns a DOMString describing the type of the current selection. Methods Selection.addRange() A Range object that will be added to the selection. Selection.collapse() Collapses the current selection to a single point. Selection.collapseToEnd() Collapses the selection to the end of the last range in the selection. Selection.collapseToStart() Collapses the selection to the start of the first range in the ...
ServiceWorkerMessageEvent.ServiceWorkerMessageEvent() - Web APIs
Important: In modern browsers, this property has been deprecated. Service worker messages will now use the MessageEvent interface, for consistency with other web messaging features. The ServiceWorkerMessageEvent() constructor creates a new ServiceWorkerMessageEvent object instance. Syntax var mySWME = new ServiceWorkerMessageEvent(type, init); Parameters type A DOMString that defines the type of the message event being created. init Optional An initialisation object, which should contain the following parameters: data: The event's data -- this can be any type. origin: A DOMString that defines the origin of the corresponding service worker's environment settings object. lastEventId: A DOMString that defines the last event ID of the event source. source: The ServiceWorker or ...
ServiceWorkerMessageEvent.lastEventId - Web APIs
rowsers, this property has been deprecated. Service worker messages will now use the MessageEvent interface, for consistency with other web messaging features. The lastEventID read-only property of the ServiceWorkerMessageEvent interface represents, in server-sent events, the last event ID of the event source. Syntax var myLastEventId = ServiceWorkerMessageEventInstance.lastEventId; Value A DOMString. Examples When the following code is used inside the main thread to set up a message channel between it and a service worker for sending messages between the two, the event object of onmessage will be a ServiceWorkerMessageEvent. navigator.serviceWorker.ready.then(function(reg) { ... // set up a message channel to communicate with the SW var channel = new MessageChannel(); ...
ServiceWorkerMessageEvent.origin - Web APIs
tant: In modern browsers, this property has been deprecated. Service worker messages will now use the MessageEvent interface, for consistency with other web messaging features. The origin read-only property of the ServiceWorkerMessageEvent interface returns the origin of the service worker's environment settings object. Syntax var myOrigin = ServiceWorkerMessageEventInstance.origin; Value A DOMString. Examples When the following code is used inside the main thread to set up a message channel between it and a service worker for sending messages between the two, the event object of onmessage will be a ServiceWorkerMessageEvent. navigator.serviceWorker.ready.then(function(reg) { ... // set up a message channel to communicate with the SW var channel = new MessageChannel(); ...
ServiceWorkerRegistration.getNotifications() - Web APIs
er registrations. Notifications created by one service worker on the same origin will not be available to other active services workers on that same origin. Syntax serviceWorkerRegistration.getNotifications(options) .then(function(notificationsList) { ... }); Parameters options Optional An object containing options to filter the notifications returned. The available options are: tag: A DOMString representing a notification tag. If specified, only notifications that have this tag will be returned. Return value A Promise that resolves to a list of Notification objects. Example navigator.serviceWorker.register('sw.js'); var options = { tag : 'user_alerts' }; navigator.serviceWorker.ready.then(function(registration) { registration.getNotifications(options).then(function(notifica...
ServiceWorkerRegistration.showNotification() - Web APIs
ation.showNotification(title, [options]); Parameters title The title that must be shown within the notification options Optional An object that allows configuring the notification. It can have the following properties: actions: An array of actions to display in the notification. The members of the array should be an object literal. It may contain the following values: action: A DOMString identifying a user action to be displayed on the notification. title: A DOMString containing action text to be shown to the user. icon: A USVString containing the URL of an icon to display with the action. Appropriate responses are built using event.action within the notificationclick event. badge: a USVString containing the URL of an image to represent the notification when ther...
ShadowRoot.innerHTML - Web APIs
The innerHTML property of the ShadowRoot interface sets or returns a reference to the DOM tree inside the ShadowRoot. Syntax var domString = shadowRoot.innerHTML shadowRoot.innerHTML = domString Value A DOMString. Examples let customElem = document.querySelector('my-shadow-dom-element'); let shadow = customElem.shadowRoot; shadow.innerHTML = '<strong>This element should be more important!</strong>'; Specifications This property is not defined by any specifications yet; see this open spec issue to specify it. ...
SharedWorkerGlobalScope.name - Web APIs
The name read-only property of the SharedWorkerGlobalScope interface returns the name that the SharedWorker was (optionally) given when it was created. This is the name that the SharedWorker() constructor can pass to get a reference to the SharedWorkerGlobalScope. Syntax var nameObj = self.name; Value A DOMString. Example If a shared worker is created using a constructor with a name option: var myWorker = new SharedWorker("worker.js", { name : "mySharedWorker" }); the SharedWorkerGlobalScope will now have a name of "mySharedWorker", returnable by running self.name from inside the shared worker. Specifications Specification Status Comment HTML Living StandardThe definition of 'name' in that specification. Living Standard ...
SourceBuffer.changeType() - Web APIs
ture calls to appendBuffer() should expect the new media data to conform to. This makes it possible to change codecs or container type mid-stream. One scenario in which this is helpful is to support adapting the media source to changing bandwidth availability, by transitioning from one codec to another as resource constraints change. Syntax sourceBuffer.changeType(type); Parameters type A DOMString specifying the MIME type that future buffers will conform to. Return value undefined. Exceptions TypeError The specified string is empty, rather than indicating a valid MIME type. InvalidStateError The SourceBuffer is not a member of the parent media source's sourceBuffers list, or the buffer's updating property indicates that a previously queued appendBuffer() or remove() is still bein...
SourceBuffer.mode - Web APIs
Web › API › SourceBuffer › mode
order must be maintained in sequence mode. You can, however, change the value from segments to sequence. It just means the play order will be fixed, and new timestamps generated to reflect this. This property cannot be changed during while the SourceBuffer is processing either an appendBuffer() or remove() call. Syntax var myMode = sourceBuffer.mode; sourceBuffer.mode = 'sequence'; Value A DOMString. Exceptions The following exceptions may be thrown when setting a new value for this property. Exception Explanation InvalidAccessError An attempt was made to set the value to segments when the initial value is sequence. InvalidStateError The SourceBuffer object is being updated (i.e. its SourceBuffer.updating property is currently true), the last media ...
SpeechGrammar.src - Web APIs
Web › API › SpeechGrammar › src
The src property of the SpeechGrammar interface sets and returns a string containing the grammar from within in the SpeechGrammar object. Syntax var myGrammar = speechGrammarInstance.src; Value A DOMString representing the grammar. Examples var grammar = '#JSGF V1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new SpeechRecognition(); var speechRecognitionList = new SpeechGrammarList();...
SpeechGrammarList.addFromURI() - Web APIs
The addFromURI() method of the SpeechGrammarList interface takes a grammar present at a specific URI and adds it to the SpeechGrammarList as a new SpeechGrammar object. Note that some speech recognition services may support built-in grammars that can be specified by URI. Syntax speechGrammarListInstance.addFromURI(src,weight); Returns Void. Parameters src A DOMString representing the URI of the grammar to be added. weight Optional A float representing the weight of the grammar relative to other grammars present in the SpeechGrammarList. The weight means the importance of this grammar, or the likelihood that it will be recognised by the speech recognition service. The value can be between 0.0 and 1.0; If not specified, the default used is 1.0. Examples var grammar = '#JSGF V1.0; gr...
SpeechGrammarList - Web APIs
he SpeechGrammarList. Methods SpeechGrammarList.item() Standard getter -- allows individual SpeechGrammar objects to be retrieved from the SpeechGrammarList using array syntax. SpeechGrammarList.addFromURI() Takes a grammar present at a specific URI and adds it to the SpeechGrammarList as a new SpeechGrammar object. SpeechGrammarList.addFromString() Takes a grammar present in a specific DOMString within the code base (e.g. stored in a variable) and adds it to the SpeechGrammarList as a new SpeechGrammar object. Examples In our simple Speech color changer example, we create a new SpeechRecognition object instance using the SpeechRecognition() constructor, create a new SpeechGrammarList, add our grammar string to it using the SpeechGrammarList.addFromString method, and set it to be the g...
SpeechRecognition.lang - Web APIs
The lang property of the SpeechRecognition interface returns and sets the language of the current SpeechRecognition. If not specified, this defaults to the HTML lang attribute value, or the user agent's language setting if that isn't set either. Syntax var myLang = mySpeechRecognition.lang; mySpeechRecognition.lang = 'en-US'; Value A DOMString representing the BCP 47 language tag for the current SpeechRecognition. Examples This code is excerpted from our Speech color changer example. var grammar = '#JSGF V1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | oliv...
SpeechRecognition.serviceURI - Web APIs
Examples var recognition = new SpeechRecognition(); recognition.serviceURI = 'http://www.example.com'; ... ...
SpeechRecognitionAlternative.transcript - Web APIs
of the SpeechRecognitionResult interface returns a string containing the transcript of the recognised word(s). For continuous recognition, leading or trailing whitespace will be included where necessary so that concatenation of consecutive SpeechRecognitionResults produces a proper transcript of the session. Syntax var myTranscript = speechRecognitionAlternativeInstance.transcript; Returns A DOMString. Examples This code is excerpted from our Speech color changer example. recognition.onresult = function(event) { // The SpeechRecognitionEvent results property returns a SpeechRecognitionResultList object // The SpeechRecognitionResultList object contains SpeechRecognitionResult objects. // It has a getter so it can be accessed like an array // The first [0] returns the SpeechRecogniti...
SpeechRecognitionError.error - Web APIs
The possible error types are: no-speech No speech was detected. aborted Speech input was aborted in some manner, perhaps by some user-agent-specific behavior like a button the user can press to cancel speech input. ...
SpeechRecognitionError.message - Web APIs
The message read-only property of the SpeechRecognitionError interface returns a message describing the error in more detail. This SpeechRecognitionError interface was renamed to SpeechRecognitionErrorEvent in the Web Speech API specification. Syntax var myErrorMsg = event.message; Value A DOMString containing more details about the error that was raised. Note that the spec does not define the exact wording of these messages -- this is up to the implementors to decide upon. Examples var recognition = new SpeechRecognition(); recognition.onerror = function(event) { console.log('Speech recognition error detected: ' + event.error); console.log('Additional information: ' + event.message); } ...
SpeechRecognitionErrorEvent.error - Web APIs
The possible error types are: no-speech No speech was detected. aborted Speech input was aborted in some manner, perhaps by some user-agent-specific behavior like a button the user can press to cancel speech input. audio-capture Audio capture failed. network Network communication required for completing the recognition failed. ...
SpeechRecognitionErrorEvent.message - Web APIs
Note that the spec does not define the exact wording of these messages -- this is up to the implementors to decide upon. ...
SpeechSynthesisErrorEvent.error - Web APIs
Possible codes are: canceled A SpeechSynthesis.cancel method call caused the SpeechSynthesisUtterance to be removed from the queue before it had begun being spoken. interrupted A SpeechSynthesis.cancel method call caused the SpeechSynthesisUtterance to be interrupted after it had begun being spoken and before it completed. ...
SpeechSynthesisEvent.name - Web APIs
Examples utterThis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedTime + ' milliseconds.'); } Specifications Specification Status Comment Web Speech APIThe definition of 'name' in that specification. Draft ...
SpeechSynthesisUtterance.SpeechSynthesisUtterance() - Web APIs
Examples The following snippet is excerpted from our Speech synthesizer demo. ...
SpeechSynthesisUtterance.lang - Web APIs
The lang property of the SpeechSynthesisUtterance interface gets and sets the language of the utterance. If unset, the app's (i.e. the <html> lang value) lang will be used, or the user-agent default if that is unset too. Syntax var myLang = speechSynthesisUtteranceInstance.lang; speechSynthesisUtteranceInstance.lang = 'en-US'; Value A DOMString representing a BCP 47 language tag. Examples var synth = window.speechSynthesis; var inputForm = document.querySelector('form'); var inputTxt = document.querySelector('input'); var voiceSelect = document.querySelector('select'); var voices = synth.getVoices(); ... inputForm.onsubmit = function(event) { event.preventDefault(); var utterThis = new SpeechSynthesisUtterance(inputTxt.value); var selectedOption = voiceSelect.selecte...
SpeechSynthesisUtterance.text - Web APIs
of the SpeechSynthesisUtterance interface gets and sets the text that will be synthesised when the utterance is spoken. The text may be provided as plain text, or a well-formed SSML document. The SSML tags will be stripped away by devices that don't support SSML. Syntax var myText = speechSynthesisUtteranceInstance.text; speechSynthesisUtteranceInstance.text = 'Hello I am speaking'; Value A DOMString representing the text to the synthesised. The maximum length of the text that can be spoken in each utterance is 32,767 characters. Examples var synth = window.speechSynthesis; var inputForm = document.querySelector('form'); var inputTxt = document.querySelector('input'); var voiceSelect = document.querySelector('select'); var voices = synth.getVoices(); ... inputForm.onsubmit = function(...
SpeechSynthesisVoice.lang - Web APIs
The lang read-only property of the SpeechSynthesisVoice interface returns a BCP 47 language tag indicating the language of the voice. Syntax var myLang = speechSynthesisVoiceInstance.lang; Value A DOMString representing the language of the device. Examples for(i = 0; i < voices.length ; i++) { var option = document.createElement('option'); option.textContent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textContent += ' -- DEFAULT'; } option.setAttribute('data-lang', voices[i].lang); option.setAttribute('data-name', voices[i].name); voiceSelect.appendChild(option); } Specifications Specification Status Comment Web Speech APIThe definition of 'lang' in that specification. Draft ...
SpeechSynthesisVoice.name - Web APIs
The name read-only property of the SpeechSynthesisVoice interface returns a human-readable name that represents the voice. Syntax var voiceName = speechSynthesisVoiceInstance.name; Value A DOMString representing the name of the voice. Examples for(i = 0; i < voices.length ; i++) { var option = document.createElement('option'); option.textContent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textContent += ' -- DEFAULT'; } option.setAttribute('data-lang', voices[i].lang); option.setAttribute('data-name', voices[i].name); voiceSelect.appendChild(option); } Specifications Specification Status Comment Web Speech APIThe definition of 'name' in that specification. Draft ...
SpeechSynthesisVoice.voiceURI - Web APIs
This is a generic URI and can point to local or remote services, e.g. it could be a proprietary system URN or a a URL to a remote service. ...
Storage.key() - Web APIs
Web › API › Storage › key
The key() method of the Storage interface, when passed a number n, returns the name of the nth key in a given Storage object. The order of keys is user-agent defined, so you should not rely on it. Syntax var aKeyName = storage.key(index); Parameters index An integer representing the number of the key you want to get the name of. This is a zero-based index. Return value A DOMString containing the name of the key. If the index does not exist, null is returned. Examples The following function iterates over the local storage keys: function forEachKey(callback) { for (var i = 0; i < localStorage.length; i++) { callback(localStorage.key(i)); } } The following function iterates over the local storage keys and gets the value set for each key: for(var i =0; i < localStorage.length; i...
Storage.removeItem() - Web APIs
The removeItem() method of the Storage interface, when passed a key name, will remove that key from the given Storage object if it exists. The Storage interface of the Web Storage API provides access to a particular domain's session or local storage. If there is no item associated with the given key, this method will do nothing. Syntax storage.removeItem(keyName); Parameters keyName A DOMString containing the name of the key you want to remove. Return value undefined. Example The following function creates three data items inside local storage, then removes the image data item. function populateStorage() { localStorage.setItem('bgcolor', 'red'); localStorage.setItem('font', 'Helvetica'); localStorage.setItem('image', 'myCat.png'); localStorage.removeItem('image'); } We can ...
SubmitEvent() - Web APIs
For SubmitEvent, this is always submit. eventInitDict Optional An optional dictionary of initial values for the event's properties. Return value A SubmitEvent object configured using the given inputs. ...
SubtleCrypto.digest() - Web APIs
ographic digests should exhibit collision-resistance, meaning that it's hard to come up with two different inputs that have the same digest value. It takes as its arguments an identifier for the digest algorithm to use and the data to digest. It returns a Promise which will be fulfilled with the digest. Syntax const digest = crypto.subtle.digest(algorithm, data); Parameters algorithm is a DOMString defining the hash function to use. Supported values are: SHA-1 (but don't use this in cryptographic applications) SHA-256 SHA-384 SHA-512. data is an ArrayBuffer or ArrayBufferView containing the data to be digested. Return value digest is a Promise that fulfills with an ArrayBuffer containing the digest. Supported algorithms Digest algorithms, also known as cryptogr...
SubtleCrypto.verify() - Web APIs
erface verifies a digital signature. It takes as its arguments a key to verify the signature with, some algorithm-specific parameters, the signature, and the original signed data. It returns a Promise which will be fulfilled with a Boolean value indicating whether the signature is valid. Syntax const result = crypto.subtle.verify(algorithm, key, signature, data); Parameters algorithm is a DOMString or object defining the algorithm to use, and for some algorithm choices, some extra parameters. The values given for the extra parameters must match those passed into the corresponding sign() call. To use RSASSA-PKCS1-v1_5, pass the string "RSASSA-PKCS1-v1_5" or an object of the form { "name": "RSASSA-PKCS1-v1_5" }. To use RSA-PSS, pass an RsaPssParams object. To use ECDSA, pass an E...
SyncManager.getTags() - Web APIs
Parameters None. ...
TaskAttributionTiming.containerId - Web APIs
Specifications Specification Status Comment Long Tasks API 1The definition of 'containerId' in that specification. ...
TaskAttributionTiming.containerName - Web APIs
The containerName readonly property of the TaskAttributionTiming interface returns the container's name attribute. A container is the iframe, embed or object etc. that is being implicated, on the whole, for a long task. Syntax var containerName = TaskAttributionTiming.containerName; Value A DOMString containing the container's name attribute. Specifications Specification Status Comment Long Tasks API 1The definition of 'containerName' in that specification. Working Draft Initial definition. ...
TaskAttributionTiming.containerSrc - Web APIs
The containerSrc readonly property of the TaskAttributionTiming interface returns the container's src attribute. A container is the iframe, embed or object etc. that is being implicated, on the whole, for a long task. Syntax var containerSrc = TaskAttributionTiming.containerSrc; Value A DOMString containing the container's src attribute. Specifications Specification Status Comment Long Tasks API 1The definition of 'containerSrc' in that specification. Working Draft Initial definition. ...
TaskAttributionTiming.containerType - Web APIs
Specifications Specification Status Comment Long Tasks API 1The definition of 'containerType' in that specification. Working Draft Initial definition. Browser Compatibility The compatibility table on this page is generated from structured data. ...
Text() - Web APIs
Web › API › Text › Text
The Text() constructor returns a newly created Text object with the optional DOMString given in parameter as its textual content. Syntax text1 = new Text(); // Create an empty text node text2 = new Text("This is a text node"); Example let text = new Text("Test"); Specifications Specification Status Comment DOMThe definition of 'Text()' in that specification. Living Standard Initial definition. ...
Text - Web APIs
Web › API › Text
div> a:hover text { fill: #0095DD; pointer-events: all;} Constructor Text() Returns a Text node with the parameter as its textual content. Properties Inherits properties from its parent, CharacterData. Text.isElementContentWhitespace Read only Returns a Boolean flag indicating whether or not the text node contains only whitespace. Text.wholeText Read only Returns a DOMString containing the text of all Text nodes logically adjacent to this Node, concatenated in document order. Text.assignedSlot Read only Returns the HTMLSlotElement object associated with the element. Properties included from Slotable The Text interface includes the following property, defined on the Slotable mixin. Slotable.assignedSlot Read only Returns a HTMLSlotElement representing the <...
TextDecoder() - Web APIs
er() constructor returns a newly created TextDecoder object for the encoding specified in parameter. If the value for utfLabel is unknown, or is one of the two values leading to a 'replacement' decoding algorithm ( "iso-2022-cn" or "iso-2022-cn-ext"), a DOMException with the "TypeError" value is thrown. Syntax decoder = new TextDecoder(utfLabel, options); Parameters utfLabelOptional Is a DOMString, defaulting to "utf-8", containing the label of the encoder. Each label is associated with a specific encoding type: Possible values of utfLabel Encoding "unicode-1-1-utf-8", "utf-8", "utf8" 'utf-8' "866", "cp866", "csibm866", "ibm866" 'ibm866' "csisolatin2", "iso-8859-2", "iso-ir-101", "iso8859-2", "iso88592", "iso_8859-2", "iso_...
TextDecoder.prototype.decode() - Web APIs
Syntax b1 = decoder.decode(buffer, options); b2 = decoder.decode(buffer); b3 = decoder.decode(); Parameters buffer Optional Is either an ArrayBuffer or an ArrayBufferView containing the text to decode. options Optional Is a TextDecodeOptions dictionary with the property: stream A Boolean flag indicating that additional data will follow in subsequent calls to decode(). Set to true if processing the data in chunks, and false for the final chunk or if the data is not chunked. It defaults to false. ...
TextDecoder.prototype.encoding - Web APIs
It can be one of the following values: The recommended encoding for the Web: 'utf-8'. The legacy single-byte encodings: 'ibm866', 'iso-8859-2', 'iso-8859-3', 'iso-8859-4', 'iso-8859-5', 'iso-8859-6', 'iso-8859-7', 'iso-8859-8'', 'iso-8859-8i', 'iso-8859-10', 'iso-8859-13', 'iso-8859-14', 'iso-8859-15', 'iso-8859-16', 'koi8-r', 'koi8-u', 'macintosh', 'windows-874', 'windows-1250', 'windows-1251', 'windows-1252', 'windows-1253', 'windows-1254', 'windows-1255', 'windows-1256', 'windows-1257', 'windows-1258', or 'x-mac-cyrillic'. ...
TextEncoder.encoding - Web APIs
It can only have the following value utf-8. ...
TextRange - Web APIs
Web › API › TextRange
a Boolean indicating whether the specified command can be executed successfully with the execCommand method in the current state of the given document. You can also see Document.queryCommandEnabled(). TextRange.queryCommandState() Returns the Boolean indicating the current state of the specified command. You can also see Document.queryCommandState(). TextRange.queryCommandValue() Returns the DOMString indicating the current value of the specified command. You can also see Document.queryCommandValue(). TextRange.scrollIntoView() Scroll the range to the visible range (top or bottom). It can be used as an alternative to Element.scrollIntoView in the lower version of IE. TextRange.select() Select the current range (i.e. the blue selection seen by the user). TextRange.setEndPoint() Sets the e...
TextTrack.mode - Web APIs
Web › API › TextTrack › mode
abled, hidden, or showing. You can read this value to determine the current mode, and you can change this value to switch modes. Safari additionally requires the default boolean attribute to be set to true when implementing your own video player controls in order for the subtitles cues to be shown. Syntax var mode = textTrack.mode; textTrack.mode = "disabled" | "hidden" | "showing"; Value A DOMString which indicates the track's current mode. The text track mode is one of the values listed below, under Text track mode constants. Text track mode constants The text track mode--sometimes identified using the IDL enum TextTrackMode--must be one of the following values: disabled The text track is currently disabled. While the track's presence is exposed in the DOM, the user agent is otherwise...
TextTrackCue - Web APIs
f 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. Properties This interface also inherits properties from EventTarget. TextTrackCue.track Read only The TextTrack that this cue belongs to, or null if it doesn't belong to any. TextTrackCue.id A DOMString that identifies the cue. TextTrackCue.startTime A double that represents the video time that the cue will start being displayed, in seconds. TextTrackCue.endTime A double that represents the video time that the cue will stop being displayed, in seconds. TextTrackCue.pauseOnExit A boolean for whether the video will pause when this cue stops being displayed. Event handlers TextTrackCue.o...
getTrackById() - Web APIs
Return value A TextTrack object indicating the first track found within the TextTrackList whose id matches the specified string. If no match is found, this method returns null. ...
TimeEvent - Web APIs
Web › API › TimeEvent
text { fill: #0095DD; pointer-events: all;} Properties TimeEvent.detail Read only Is a long that specifies some detail information about the Event, depending on the type of the event. For this event type, indicates the repeat number for the animation. TimeEvent.view Read only Is a WindowProxy that identifies the Window from which the event was generated. Methods initTimeEvent(DOMString typeArg, AbstractView viewArg, long detailArg) The initTimeEvent method is used to initialize the value of a TimeEvent created through the DocumentEvent interface. This method may only be called before the TimeEvent has been dispatched via the dispatchEvent method, though it may be called multiple times during that phase if necessary. ...
TouchEvent() - Web APIs
touchEventInit Optional Is a TouchEventInit dictionary, having the following fields: "touches", optional and defaulting to [], of type Touch[], that is a list of objects for every point of contact currently touching the surface. "targetTouches", optional and defaulting to [], of type Touch[], that is a list of objects for every point of contact that is touching the surface and started on the element that is the target of the current event. ...
TrackDefault.byteStreamTrackID - Web APIs
Example TBD ...
TrackDefault.kinds - Web APIs
Example TBD ...
TrackDefault.label - Web APIs
Example TBD ...
TrackDefault.language - Web APIs
Example TBD ...
TrackDefault.type - Web APIs
Web › API › TrackDefault › type
Example TBD ...
TransitionEvent.transitionName - Web APIs
The TransitionEvent.transitionName read-only property is a DOMString containing the name of the CSS property associated with the transition. Syntax name = TransitionEvent.transitionName Specifications Specification Status Comment CSS TransitionsThe definition of 'TransitionEvent.transitionName' in that specification. Working Draft Initial definition. ...
TransitionEvent.pseudoElement - Web APIs
If the transition doesn't run on a pseudo-element but on the element, an empty string: ''. ...
TransitionEvent - Web APIs
The TransitionEvent interface represents events providing information related to transitions. Constructor TransitionEvent() Creates a TransitionEvent event with the given parameters. Properties Also inherits properties from its parent Event. TransitionEvent.propertyName Read only Is a DOMString containing the name CSS property associated with the transition. TransitionEvent.elapsedTime Read only Is a float giving the amount of time the transition has been running, in seconds, when this event fired. This value is not affected by the transition-delay property. TransitionEvent.pseudoElement Read only Is a DOMString, starting with ::, containing the name of the pseudo-element the animation runs on. If the transition doesn't run on a pseudo-element but on the element, an em...
UIEvent() - Web APIs
Web › API › UIEvent › UIEvent
UIEventInit Optional Is a UIEventInit dictionary, having the following fields: detail: optional and defaulting to 0, of type long, that is a event-dependant value associated with the event. UIEvent.detail lists the semantic for standard events. view: optional and defaulting to null, of type WindowProxy, that is the Window associated with the event . ...
UIEvent.initUIEvent() - Web APIs
dispatched, using EventTarget.dispatchEvent(). Once dispatched, it doesn't do anything anymore. Do not use this method anymore as it is deprecated. Instead use specific event constructors, like UIEvent(). The page on Creating and triggering events gives more information about the way to use these. Syntax event.initUIEvent(type, canBubble, cancelable, view, detail) Parameters type Is a DOMString defining the type of event. canBubble Is a Boolean deciding whether the event should bubble up through the event chain or not. Once set, the read-only property Event.bubbles will give its value. cancelable Is a Boolean defining whether the event can be canceled. Once set, the read-only property Event.cancelable will give its value. view Is the WindowProxy associated with the event. detail ...
URL.createObjectURL() - Web APIs
The URL.createObjectURL() static method creates a DOMString containing a URL representing the object given in the parameter. The URL lifetime is tied to the document in the window on which it was created. The new object URL represents the specified File object or Blob object. To release an object URL, call revokeObjectURL(). Note: This feature is available in Web Workers. Note: This feature is not available in Service Workers due to its potential to create memory leaks. Syntax const objectURL = URL.createObjectURL(object) Parameters object A File, Blob, or MediaSource object to create an object URL for. Return value A DOMString containing an object URL that can be used to reference the contents of the specified source object. Examples See Using object URLs to display images. ...
URL.revokeObjectURL() - Web APIs
ctURL(). Call this method when you've finished using an object URL to let the browser know not to keep the reference to the file any longer. Note: This feature is available in Web Workers. Note: This method is not available from service workers, due to issues with the Blob interface's life cycle and the potential for leaks. Syntax URL.revokeObjectURL(objectURL) Parameters objectURL A DOMString representing a object URL that was previously created by calling createObjectURL(). Examples See Using object URLs to display images. Specification Specification Status Comment File APIThe definition of 'revokeObjectURL()' in that specification. Working Draft Initial definition ...
URL - Web APIs
Web › API › URL
found in search. username A USVString containing the username specified before the domain name. Methods toString() Returns a USVString containing the whole URL. It is a synonym for URL.href, though it can't be used to modify the value. toJSON() Returns a USVString containing the whole URL. It returns the same string as the href property. Static methods createObjectURL() Returns a DOMString containing a unique blob URL, that is a URL with blob: as its scheme, followed by an opaque string uniquely identifying the object in the browser. revokeObjectURL() Revokes an object URL previously created using URL.createObjectURL(). Usage notes The constructor takes a url parameter, and an optional base parameter to use as a base if the url parameter is a relative URL: const url = new URL...
URLSearchParams.toString() - Web APIs
The toString() method of the URLSearchParams interface returns a query string suitable for use in a URL. Note: This method returns the query string without the question mark. This is different from window.location.search, which includes it. Note: This feature is available in Web Workers. Syntax URLSearchParams.toString() Parameters None. Return value A DOMString, without the question mark. (Returns an empty string if no search parameters have been set.) Examples let url = new URL('https://example.com?foo=1&bar=2'); let params = new URLSearchParams(url.search.slice(1)); //Add a second foo parameter. params.append('foo', 4); console.log(params.toString()); //Prints 'foo=1&bar=2&foo=4' // note: params can also be directly created let url = new URL('https://example.com?foo=1&bar=2'); let...
URLUtilsReadOnly.hash - Web APIs
The hash is not percent encoded. Syntax string = object.hash; Examples // In a Web worker, on the page https://developer.mozilla.org/docs/URLUtilsReadOnly.hash#example var result = window.self.hash; // Returns:'#hash' Specifications Specification Status Comment URLThe definition of 'URLUtilsReadOnly.hash' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. ...
URLUtilsReadOnly.host - Web APIs
Syntax string = object.host; Examples // In a Web worker, on the page https://developer.mozilla.org/URLUtilsReadOnly.host var result = window.self.host; // Returns:'developer.mozilla.org:80' Specifications Specification Status Comment URLThe definition of 'URLUtilsReadOnly.host' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
URLUtilsReadOnly.hostname - Web APIs
Syntax string = object.hostname; Examples // In a Web worker, on the page https://developer.mozilla.org/URLUtilsReadOnly.hostname var result = window.self.hostname; // Returns:'developer.mozilla.org' Specifications Specification Status Comment URLThe definition of 'URLUtilsReadOnly.hostname' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
URLUtilsReadOnly.href - Web APIs
Syntax string = object.href; Examples // In a Web worker, on the page https://developer.mozilla.org/URLUtilsReadOnly.href var result = window.self.href; // Returns:'https://developer.mozilla.org/URLUtilsReadOnly.href' Specifications Specification Status Comment URLThe definition of 'URLUtilsReadOnly.href' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. ...
URLUtilsReadOnly.origin - Web APIs
For URL using file: scheme, the value is browser dependant. This version of origin is implemented by WorkerLocation for use on workers. ...
URLUtilsReadOnly.pathname - Web APIs
Syntax string = object.pathname; Examples // In a Web worker, on the page https://developer.mozilla.org/URLUtilsReadOnly.pathname var result = window.self.pathname; // Returns:'/URLUtilsReadOnly.pathname' Specifications Specification Status Comment URLThe definition of 'URLUtilsReadOnly.pathname' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. ...
URLUtilsReadOnly.port - Web APIs
Syntax string = object.port; Examples // In a Web worker, on the page https://developer.mozilla.org/URLUtilsReadOnly.port var result = window.self.port; // Returns:'80' Specifications Specification Status Comment URLThe definition of 'URLUtilsReadOnly.port' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
URLUtilsReadOnly.protocol - Web APIs
Syntax string = object.protocol; Examples // In a Web worker, on the page https://developer.mozilla.org/URLUtilsReadOnly.href var result = window.self.protocol; // Returns:'https:' Specifications Specification Status Comment URLThe definition of 'URLUtilsReadOnly.protocol' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
URLUtilsReadOnly.search - Web APIs
Syntax string = object.search; Examples // In a Web worker, on the page https://developer.mozilla.org/docs/URLUtilsReadOnly.href?t=67 var result = window.self.search; // Returns:'?t=67' Specifications Specification Status Comment URLThe definition of 'URLUtilsReadOnly.search' in that specification. Living Standard Initial definition. Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
URLUtilsReadOnly.toString() - Web APIs
It is a synonym for URLUtilsReadOnly.href. Syntax string = object.toString(); Examples // In a Web worker, on the page https://developer.mozilla.org/URLUtilsReadOnly.href var result = window.self.toString(); // Returns:'https://developer.mozilla.org/URLUtilsReadOnly.href' Browser compatibility The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
USBDevice.manufacturerName - Web APIs
The manufacturerName read only property of the USBDevice interface the of the organization that manufactured the USB device. Syntax var serialNumber = USBDevice.manufacturerName Value A DOMString. Specifications Specification Status Comment WebUSBThe definition of 'manufacturerName' in that specification. Draft Initial definition. ...
USVString - Web APIs
Web › API › USVString
USVString corresponds to the set of all possible sequences of unicode scalar values. USVString maps to a String when returned in JavaScript; it's generally only used for APIs that perform text processing and need a string of unicode scalar values to operate on. USVString is equivalent to DOMString except for not allowing unpaired surrogate codepoints. Unpaired surrogate codepoints present in USVString are converted by the browser to Unicode 'replacement character' U+FFFD, (?). Specifications Specification Status Comment Web IDLThe definition of 'USVString' in that specification. Candidate Recommendation Initial definition. ...
UserDataHandler - Web APIs
ent.importNode() and Node.cloneNode(), although user data is not copied over, the handler will be called. Properties None. Methods handle (operation, key, data, src, dst) (no return value) This method is a callback which will be called if a node is being cloned, imported, renamed and as well, if deleted or adopted. operation (unsigned short) is an operation type integer (see below). key (DOMString) is the user key. data (DOMUserData) is the user data. src (Node) is the source node (null if being deleted). dst (Node) is the destination node (if any, or null). Constants Constant Value Operation NODE_CLONED 1 Node.cloneNode() NODE_IMPORTED 2 Document.importNode() NODE_DELETED Unimplemented (see bug 550400) 3 NODE_REN...
VTTCue() - Web APIs
Web › API › VTTCue › VTTCue
ble from 50 seconds to a one minute, five and a half seconds in the media's playback, startTime will be 50.0. endTime This is a double representing the ending time for this text track cue. This is the time at which the cue should stop being presented to the user, given in seconds and fractions thereof. Given the example cue mentioned under startTime, the value of endTime would be 65.5. text A DOMString providing the text that will be shown during the time span indicated by startTime and endTime. Return value A new VTTCue object representing a cue which will be presented during the time span given. Example // Create a cue that is shown from 2 to 3 seconds and uses the given text. var cue = new VTTCue(2, 3, 'Cool text to be displayed'); Specifications Specification Status Co...
VTTCue - Web APIs
Web › API › VTTCue
l. VTTCue.positionAlign Returns an enum representing the alignment of the cue. This is used to determine what the VTTCue.position is anchored to. The default is auto. VTTCue.size Returns a double representing the size of the cue, as a percentage of the video size. VTTCue.textAlign Returns an enum representing the alignment of all the lines of text within the cue box. VTTCue.text Returns a DOMString with the contents of the cue. Methods getCueAsHTML() Returns the cue text as a DocumentFragment. Example HTML <video controls src="https://udn.realityripple.com/samples/c6/f8a3489533.webm"></video> CSS video { width: 320px; height: 180px; } JavaScript let video = document.querySelector('video'); video.addEventListener('loadedmetadata', () => { const track = video.addTextTrack(...
VTTRegion - Web APIs
Web › API › VTTRegion
VTTRegion.width A double representing the width of the region, as a percentage of the video. VTTRegion.lines A double representing the height of the region, in number of lines. ...
VideoTrack.id - Web APIs
Web › API › VideoTrack › id
tains a string which uniquely identifies the track represented by the VideoTrack. This ID can be used with the VideoTrackList.getTrackById() method to locate a specific track within the media associated with a media element. The track ID can also be used as the fragment of a URL that loads the specific track (if the media supports media fragments). Syntax var trackID = VideoTrack.id; Value A DOMString which identifies the track, suitable for use when calling getTrackById() on an VideoTrackList such as the one specified by a media element's videoTracks property. Specifications Specification Status Comment HTML Living StandardThe definition of 'VideoTrack: id' in that specification. Living Standard ...
VideoTrack.kind - Web APIs
Web › API › VideoTrack › kind
The string is one of those found in Video track kind strings below. ...
VideoTrack.label - Web APIs
Web › API › VideoTrack › label
Otherwise, an empty string ("") is returned. For example, a track whose kind is "sign" might have a label such as "A sign-language interpretation.". ...
Videotrack.language - Web APIs
The read-only VideoTrack property language returns a string identifying the language used in the video track. For tracks that include multiple languages (such as a movie in English in which a few lines are spoken in other languages), this should be the video's primary language. Syntax var videoTrackLanguage = VideoTrack.language; Value A DOMString specifying the BCP 47 (RFC 5646) format language tag of the primary language used in the video track, or an empty string ("") if the language is not specified or known, or if the track doesn't contain speech. For example, if the primary language used in the track is United States English, this value would be "en-US". For Brazilian Portuguese, the value would be "pt-BR". Specifications Specification Status Comment HTML L...
getTrackById - Web APIs
Return value A VideoTrack object indicating the first track found within the VideoTrackList whose id matches the specified string. ...
WebGL2RenderingContext.getActiveUniformBlockName() - Web APIs
The WebGL2RenderingContext.getActiveUniformBlockName() method of the WebGL 2 API retrieves the name of the active uniform block at a given index within a WebGLProgram. Syntax DOMString gl.getActiveUniformBlockName(program, uniformBlockIndex); Parameters program A WebGLProgram containing the uniform block. uniformBlockIndex A GLuint specifying the index of the uniform block to whose name to retrieve. Return value A DOMString indicating the active uniform block name. Examples var blockName = gl.getActiveUniformBlockName(program, 0); Specifications Specification Status Comment WebGL 2.0The definition of 'getActiveUniformBlockName' in that specification. Editor's Draft Initial definition for WebGL. OpenGL ES 3.0The definition of 'glGetAc...
WebGL2RenderingContext.getFragDataLocation() - Web APIs
Return value A GLint indicating the assigned color number binding, or -1 otherwise. ...
WebGL2RenderingContext.getUniformBlockIndex() - Web APIs
Return value A GLuint indicating the uniform block index. ...
WebGL2RenderingContext.getUniformIndices() - Web APIs
Return value An Array of GLuint containing the uniform indices. ...
WebGL2RenderingContext.transformFeedbackVaryings() - Web APIs
bufferMode A GLenum specifying the mode to use when capturing the varying variables. Either gl.INTERLEAVED_ATTRIBS or gl.SEPARATE_ATTRIBS. ...
WebGLRenderingContext.bindAttribLocation() - Web APIs
The WebGLRenderingContext.bindAttribLocation() method of the WebGL API binds a generic vertex index to an attribute variable. Syntax void gl.bindAttribLocation(program, index, name); Parameters program A WebGLProgram object to bind. index A GLuint specifying the index of the generic vertex to bind. name A DOMString specifying the name of the variable to bind to the generic vertex index. This name cannot start with "webgl_" or "_webgl_", as these are reserved for use by WebGL. Return value None. Examples gl.bindAttribLocation(program, colorLocation, 'vColor'); Specifications Specification Status Comment WebGL 1.0The definition of 'bindAttribLocation' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'g...
WebGLRenderingContext.getAttribLocation() - Web APIs
Return value A GLint number indicating the location of the variable name if found. Returns -1 otherwise. ...
WebGLRenderingContext.getProgramInfoLog() - Web APIs
The WebGLRenderingContext.getProgramInfoLog returns the information log for the specified WebGLProgram object. It contains errors that occurred during failed linking or validation of WebGLProgram objects. Syntax gl.getProgramInfoLog(program); Parameters program The WebGLProgram to query. Return value A DOMString that contains diagnostic messages, warning messages, and other information about the last linking or validation operation. When a WebGLProgram object is initially created, its information log will be a string of length 0. Examples Checking program errors var program = gl.createProgram(); // Attach pre-existing shaders gl.attachShader(program, vertexShader); gl.attachShader(program, fragmentShader); gl.linkProgram(program); gl.getProgramInfoLog(program); Specifications ...
WebGLRenderingContext.getShaderInfoLog() - Web APIs
When a WebGLShader object is initially created, its information log will be a string of length 0. ...
WebGLRenderingContext.getShaderSource() - Web APIs
Examples var shader = gl.createShader(gl.VERTEX_SHADER); gl.shaderSource(shader, originalSource); var source = gl.getShaderSource(shader); Specifications Specification Status Comment WebGL 1.0The definition of 'getShaderSource' in that specification. Recommendation Initial definition. ...
WebGLRenderingContext.getUniformLocation() - Web APIs
's value to the specified matrix, possibly with transposition. The value is represented as a sequence of GLfloat values or as a Float32Array. The uniform itself is declared in the shader program using GLSL. Syntax WebGLUniformLocation = WebGLRenderingContext.getUniformLocation(program, name); Parameters program The WebGLProgram in which to locate the specified uniform variable. name A DOMString specifying the name of the uniform variable whose location is to be returned. The name can't have any whitespace in it, and you can't use this function to get the location of any uniforms starting with the reserved string "gl_", since those are internal to the WebGL layer. The possible values correspond to the uniform names returned by getActiveUniform; see that function for specifics on how d...
WebGLRenderingContext.shaderSource() - Web APIs
Return value None. ...
WebGLRenderingContext - Web APIs
rimitives from element array data. WebGLRenderingContext.finish() Blocks execution until all previously called commands are finished. WebGLRenderingContext.flush() Empties different buffer commands, causing all commands to be executed as quickly as possible. Working with extensions These methods manage WebGL extensions: WebGLRenderingContext.getSupportedExtensions() Returns an Array of DOMString elements with all the supported WebGL extensions. WebGLRenderingContext.getExtension() Returns an extension object. Examples WebGL context feature detection In this first example we are going to check whether the browser supports WebGL. To that end we will try to obtain the WebGL rendering context from a canvas element. The WebGL rendering context is an interface, through which you can set ...
WebSocket.binaryType - Web APIs
"arraybuffer" If ArrayBuffer objects are used. ...
WebSocket.extensions - Web APIs
The WebSocket.extensions read-only property returns the extensions selected by the server. This is currently only the empty string or a list of extensions as negotiated by the connection. Syntax var extensions = aWebSocket.extensions; Value A DOMString. Specifications Specification Status Comment HTML Living StandardThe definition of 'WebSocket: extensions' in that specification. Living Standard Initial definition ...
WebSocket.protocol - Web APIs
Specifications Specification Status Comment HTML Living StandardThe definition of 'WebSocket: protocol' in that specification. Living Standard Initial definition ...
WebSocket.url - Web APIs
Web › API › WebSocket › url
The WebSocket.url read-only property returns the absolute URL of the WebSocket as resolved by the constructor. Syntax var url = aWebSocket.url; Value A DOMString. Specifications Specification Status Comment HTML Living StandardThe definition of 'WebSocket: url' in that specification. Living Standard Initial definition ...
WheelEvent() - Web APIs
wheelEventInit Optional Is a WheelEventInit dictionary, having the following fields: "deltaX", optional and defaulting to 0.0, is a double representing the horizontal scroll amount in the deltaMode unit. "deltaY", optional and defaulting to 0.0, is a double representing the vertical scroll amount in the deltaMode unit. ...
Window.localStorage - Web APIs
cognito" session is cleared when the last "private" tab is closed.) Data stored in either localStorage is specific to the protocol of the page. In particular, data stored by a script on a site accessed with HTTP (e.g., http://example.com) is put in a different localStorage object from the same site accessed with HTTPS (e.g., https://example.com). The keys and the values are always in the UTF-16 DOMString format, which uses two bytes per character. As with objects, integer keys are automatically converted to strings. Syntax myStorage = window.localStorage; Value A Storage object which can be used to access the current origin's local storage space. Exceptions SecurityError The request violates a policy decision, or the origin is not a valid scheme/host/port tuple (this can happen if the or...
window.location - Web APIs
Web › API › Window › location
This means that you can work with location as if it were a string in most cases: location = 'http://www.example.com' is a synonym of location.href = 'http://www.example.com'. See Location for all available properties. ...
Window.sessionStorage - Web APIs
g a tab/window ends the session and clears objects in sessionStorage. Data stored in sessionStorage is specific to the protocol of the page. In particular, data stored by a script on a site accessed with HTTP (e.g., http://example.com) is put in a different sessionStorage object from the same site accessed with HTTPS (e.g., https://example.com). The keys and the values are always in the UTF-16 DOMString format, which uses two bytes per character. As with objects, integer keys are automatically converted to strings. Syntax myStorage = window.sessionStorage; Value A Storage object which can be used to access the current origin's session storage space. Exceptions SecurityError The request violates a policy decision, or the origin is not a valid scheme/host/port tuple (this can happen if t...
WindowClient.visibilityState - Web APIs
The visibilityState read-only property of the WindowClient interface indicates the visibility of the current client. This value can be one of "hidden", "visible", or "prerender". Syntax var myVisState = windowClient.visibilityState; Value A DOMString (See Document.visibilityState for values). Example event.waitUntil(clients.matchAll({ type: "window" }).then(function(clientList) { for (let i = 0; i < clientList.length; i++) { let client = clientList[i]; if (client.url == '/' && 'focus' in client) { if (client.visibilityState === 'hidden') return client.focus(); } } } if (clients.openWindow) { return clients.openWindow('/'); } })); }); Specifications Specification Status Comment Service Workers...
WindowEventHandlers.onhashchange - Web APIs
addEventListener('hashchange', hashHandler, false); Overriding the hash This function sets a new hash dynamically, setting it randomly to one of two values. function changeHash() { location.hash = (Math.random() > 0.5) ? 'location1' : 'location2'; } The hashchange event The dispatched hashchange event has the following properties: Field Type Description newURL DOMString The new URL to which the window is navigating. oldURL DOMString The previous URL from which the window was navigated. Polyfill for event.newURL and event.oldURL // Let this snippet run before your hashchange event binding code if (!window.HashChangeEvent)(function(){ var lastURL = document.URL; window.addEventListener("hashchange", function(event){ Object.defineP...
WorkerGlobalScope.dump() - Web APIs
Returns Void. Example To write an output from your worker to your computer's terminal, you first have to run an instance of Firefox started from your command line/terminal. ...
WorkerGlobalScope.importScripts() - Web APIs
These paths are relative to html document base URL. Return value None. Exceptions NetworkError Imported scripts were not served with a valid JavaScript MIME type (i.e. text/javascript). ...
WorkerNavigator - Web APIs
he official name of the browser. Do not rely on this property to return the correct value. NavigatorID.appVersion Read only Returns the version of the browser as a string. Do not rely on this property to return the correct value. NavigatorConcurrentHardware.hardwareConcurrencyRead only Returns the number of logical processor cores available. NavigatorLanguage.languageRead only Returns a DOMString representing the language version of the browser. The null value is returned when this is unknown. NavigatorLanguage.languagesRead only Returns an array of DOMStrings representing the languages known to the user, in order of preference. NavigatorOnLine.onLineRead only Returns a Boolean indicating whether the browser is online. NavigatorID.platform Read only Returns a string representing...
WritableStream.WritableStream() - Web APIs
ined by the developer, will be called if the app signals that it wishes to abruptly close the stream and put it in an errored state. It can clean up any held resources, much like close(), but abort() will be called even if writes are queued up -- those chunks will be thrown away. If this process is asynchronous, it can return a promise to signal success or failure. The reason parameter contains a DOMString describing why the stream was aborted. queuingStrategy Optional An object that optionally defines a queuing strategy for the stream. This takes two parameters: highWaterMark A non-negative integer -- this defines the total number of chunks that can be contained in the internal queue before backpressure is applied. size(chunk) A method containing a parameter chunk -- this indicates...
WritableStream.abort() - Web APIs
Return value A Promise, which fulfills with the value given in the reason parameter. ...
WritableStreamDefaultController.error() - Web APIs
actions with the associated stream to error. This method is rarely used, since usually it suffices to return a rejected promise from one of the underlying sink's methods. However, it can be useful for suddenly shutting down a stream in response to an event outside the normal lifecycle of interactions with the underlying sink. Syntax writableStreamDefaultController.error(e); Parameters e A DOMString representing the error you want future interactions to fail with. Return value undefined. Exceptions TypeError The stream you are trying to error is not a WritableStream. Examples const writableStream = new WritableStream({ start(controller) { // do stuff with controller // error stream if necessary controller.error('My error is broken'); }, write(chunk, controller) ...
WritableStreamDefaultWriter.abort() - Web APIs
er can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded. If the writer is active, the abort() method behaves the same as that for the associated stream (WritableStream.abort()). If not, it returns a rejected promise. Syntax var promise = writableStreamDefaultWriter.abort(reason); Parameters reason Optional A DOMString representing a human-readable reason for the abort. Return value A Promise, which fulfills with the value given in the reason parameter. Exceptions TypeError The stream you are trying to abort is not a WritableStream, or it is locked. Examples const writableStream = new WritableStream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingStrategy...
XMLHttpRequest.open() - Web APIs
ted request, or re-initializes an existing one. Note: Calling this method for an already active request (one for which open() has already been called) is the equivalent of calling abort(). Syntax XMLHttpRequest.open(method, url[, async[, user[, password]]]) Parameters method The HTTP request method to use, such as "GET", "POST", "PUT", "DELETE", etc. Ignored for non-HTTP(S) URLs. url A DOMString representing the URL to send the request to. async Optional An optional Boolean parameter, defaulting to true, indicating whether or not to perform the operation asynchronously. If this value is false, the send() method does not return until the response is received. If true, notification of a completed transaction is provided using event listeners. This must be true if the multipart attribute ...
XMLHttpRequest.overrideMimeType() - Web APIs
ies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. This may be used, for example, to force a stream to be treated and parsed as "text/xml", even if the server does not report it as such. This method must be called before calling send(). Syntax XMLHttpRequest.overrideMimeType(mimeType) Parameters mimeType A DOMString specifying the MIME type to use instead of the one specified by the server. If the server doesn't specify a type, XMLHttpRequest assumes "text/xml". Return value undefined. Example This example specifies a MIME type of "text/plain", overriding the server's stated type for the data being received. Note: If the server doesn't provide a Content-Type header, XMLHttpRequest assumes that the MIM...
XMLHttpRequest.responseText - Web APIs
While handling an asynchronous request, the value of responseText always has the current content received from the server, even if it's incomplete because the data has not been completely received yet. ...
XMLHttpRequest.responseType - Web APIs
The response is a Blob object containing the binary data. document The response is an HTML Document or XML XMLDocument, as appropriate based on the MIME type of the received data. See HTML in XMLHttpRequest to learn more about using XHR to fetch HTML content. json The response is a JavaScript object created by parsing the contents of received data as JSON. text The response is a text in a DOMString object. ms-stream The response is part of a streaming download; this response type is only allowed for download requests, and is only supported by Internet Explorer. Exceptions InvalidAccessError An attempt was made to change the value of responseType on anXMLHttpRequest which is in synchronous mode but not in a Worker. For additional details, see Synchronous XHR restrictions below. U...
XMLHttpRequest.sendAsBinary() - Web APIs
od now supports binary data and should now be used instead. This method makes it possible to read and upload any type of file and to stringify the raw data. Warning: This method is obsolete and should not be used. You should instead simply use the send() method, which now supports binary data in various forms. Syntax XMLHttpRequest.sendAsBinary(binaryString); Parameters binaryString A DOMString which encodes the binary content to be sent. You can create the binary string using the FileReader method readAsBinaryString(). The string is converted to binary for transfer by removing the high-order byte of each character. Return value undefined. Polyfill Since sendAsBinary() is an experimental feature, here is a polyfill for browsers that don't support the sendAsBinary() method but suppo...
XMLHttpRequest.statusText - Web APIs
Unlike XMLHTTPRequest.status which indicates a numerical status code, this property contains the text of the response status, such as "OK" or "Not Found". If the request's readyState is in UNSENT or OPENED state, the value of statusText will be an empty string. If the server response doesn't explicitly specify a status text, statusText will assume the default value "OK". ...
XMLHttpRequestResponseType - Web APIs
The response is a Blob object containing the binary data. document The response is an HTML Document or XML XMLDocument, as appropriate based on the MIME type of the received data. See HTML in XMLHttpRequest to learn more about using XHR to fetch HTML content. json The response is a JavaScript object created by parsing the contents of received data as JSON. text The response is a text in a DOMString object. ms-stream The response is part of a streaming download; this response type is only allowed for download requests, and is only supported by Internet Explorer. Deprecated values moz-chunked-arraybuffer A Firefox-only value which instructs XMLHttpRequest to deliver ArrayBuffer objects containing chunks of the incoming data. Accessing response during a progress event returns the...
XMLSerializer.serializeToString() - Web APIs
Exceptions TypeError The specified rootNode is not a compatible node type. ...
XPathEvaluator.createExpression() - Web APIs
resolver Optional Permits translation of all prefixes, including the xml namespace prefix, within the XPath expression into appropriate namespace URIs. Return value A XPathExpression representing the compiled form of the XPath expression. ...
XPathEvaluator.evaluate() - Web APIs
contextNode A Node representing the context to use for evaluating the expression. ...
XPathNSResolver.lookupNamespaceURI() - Web APIs
The lookupNamespaceURI method looks up the namespace URI associated to the given namespace prefix within an XPath expression evaluated by the XPathEvaluator interface. Syntax DOMString XPathNSResolver.lookupNamespaceURI(prefix); Parameters prefix A DOMString representing the prefix to look for. Return value A DOMString representing the associated namespace URI or null if none is found. Specifications Specification Status Comment Document Object Model (DOM) Level 3 XPath SpecificationThe definition of 'XPathNSResolver.lookupNamespaceURI()' in that specification. Recommendation Initial definition ...
XRInputSource.handedness - Web APIs
The value, which comes from the XRHandedness enumerated type, is one of the following: none The input controller is not associated with one of the user's hands. ...
XRInputSource.profiles - Web APIs
The read-only XRInputSource property profiles returns an array of strings, each describing a configuration profile for the input source. The profile stings are listed in order of specificity, with the most specific profile listed first. Note: The profiles list is always empty when the WebXR session is in inline mode. Syntax let profileList = xrInputSource.profiles; Value An array of DOMString objects, each describing one configuration profile for the input device represented by the XRInputSource object. Each input profile specifies the preferred visual representation and behavior of the input source. Usage notes Input profile names An input profile name is a string describing a visual representation and behavior the input source may be configured to use. Each string: Has no spaces; ...
XRInputSource.targetRayMode - Web APIs
The possible values are: gaze The user is using a gaze-tracking system (or gaze input) which detects the direction in which the user is looking. ...
XRInputSourceEvent() - Web APIs
Permitted values are listed under Event types below. ...
XRInputSourcesChangeEvent() - Web APIs
XRInputSourcesChangeEvent() constructor creates and returns a new XRInputSourcesChangeEvent object, representing an update to the list of available WebXR input devices. You won't typically call this constructor yourself, as these events are created and sent to you by the WebXR system. Syntax newInputSourcesChangeEvent = new XRInputSourcesChangeEvent(type, eventInitDict); Parameters type A DOMString indicating the type of event which has occurred. This string must always be inputsourceschange. eventInitDict An object conforming to the XRInputSourcesChangeEventInit dictionary, prodividing the initial values for the event. Return value A newly-created XRInputSourcesChangeEvent object configured based upon the input parameters provided. Event types inputsourceschange Delivered to the ...
XRPermissionDescriptor.mode - Web APIs
ring taken from the XRSessionMode enumerated type, specifying which Web XR session mode (inline, immersive-vr, or immersive-ar) the described permissions will be used for. Syntax xrPermissionDescriptor = { mode: xrSessionMode, requiredFeatures: reqFeatureList, optionalFeatures: optFeatureList }; xrPermissionDescriptor.mode = xrSessionMode; xrMode = xrPermissionDescriptor.mode; Value A DOMString whose value is one of the strings found in the XRSessionMode enumerated type: immersive-ar The session's output will be given exclusive access to the immersive device, but the rendered content will be blended with the real-world environment. The session's environmentBlendMode indicates the method to be used to blend the content together. Important: The immersive-ar mode is defined by ...
XRPermissionStatus.granted - Web APIs
The WebXR Device API's XRPermissionStatus interface's granted property is an array of strings, each identifying one of the WebXR features for which permission has been granted as of the time at which the Permission API's navigator.permissions.query() method was called. Syntax grantedFeatures = xrPermissionStatus.granted; Value An array of DOMString objects, each identifying a single WebXR feature which the app or site has been granted permission to use. Currently, all of these strings come from the XRReferenceSpaceType enumerated type. The types of reference space are listed in the table below, with brief information about their use cases and which interface is used to implement them. XRReferenceSpaceType Description Interface bounded-floor Similar to the ...
XRReferenceSpaceEvent() - Web APIs
Currently, this is always reset. ...
XRSession.requestReferenceSpace() - Web APIs
The requestReferenceSpace() method of the XRSession interface returns a promise that resolves with an instance of either XRReferenceSpace or XRBoundedReferenceSpace as appropriate given the type of reference space requested. Syntax refSpacePromise = xrSession.requestReferenceSpace(referenceSpaceType); Parameters type A DOMString specifying the type of reference space for which an instance is to be returned. The string must be one of those found in the XRReferenceSpaceType enumerated type. The reference space returned by XRSession.requestReferenceSpace() is either XRReferenceSpace or XRBoundedReferenceSpace. The "Interface" column in the table below indicates which of the two types is returned for each reference space type constant.. Reference space descriptors The types of reference ...
XRSession.visibilityState - Web APIs
The read-only visibilityState property of the XRSession interface is a string indicating whether the WebXR content is currently visible to the user, and if it is, whether it's the primary focus. Every time the visibility state changes, a visibilitychange event is fired on the XRSession object. Syntax visibilityState = xrSession.visibilityState; Value A DOMString containing one of the values defined in the enumerated type XRVisibilityState; this string indicates whether or not the XR content is visible to the user and if it is, whether or not it's currently the primary focus. The possible values of visibilityState are: hidden The virtual scene generated by the XRSession is not currently visible to the user, so its requestAnimationFrame() callbacks are not being executed until th...
XRSession - Web APIs
Web › API › XRSession
epresenting an input device used to control the camera and/or scene. renderState Read only An XRRenderState object which contains options affecting how the imagery is rendered. This includes things such as the near and far clipping planes (distances defining how close and how far away objects can be and still get rendered), as well as field of view information. visibilityState Read only A DOMString whose value is one of those found in the XRVisibilityState enumerated type, indicating whether or not the session's imagery is visible to the user, and if so, if it's being visible but not currently the target for user events. Methods XRSession provides the following methods in addition to those inherited from its parent interface, EventTarget. cancelAnimationFrame() Removes a callback fro...
XRSessionEvent() - Web APIs
The WebXR Device API's XRSessionEvent() constructor creates and returns a new XRSessionEvent object. These objects represent events announcing state changes in an XRSession representing an augmented or virtual reality session. Syntax newXRSessionEvent = new XRSessionEvent(type, eventInitDict); Parameters type A DOMString indicating which of the events represented by objects of type XRSessionEvent this particular object represents. See Event types for a list of the permitted values. eventInitDict An object conforming to the XRSessionEventInit dictionary which contains values to be applied to the newly-created event object. Permitted values are: session The XRSession to which the event is to be delivered. Return value A newly-created XRSessionEvent object representing an obje...
XRSystem: isSessionSupported() - Web APIs
which resolves to true if the specified WebXR session mode is supported by the user's WebXR device. Otherwise, the promise resolves with false. If the no devices are available or the browser doesn't have permission to use the XR device, the promise is rejected with an appropriate DOMException. Syntax var isSupportedPromise = xr.isSessionSupported(xrSessionMode) Parameters xrSessionMode A DOMString specifying the WebXR session mode for which support is to be checked. This string must be one of inline (to present the WebXR content inline within the context of an HTML document) or immersive-vr for a fully-immersive virtual experience. Return value A Promise that resolves to true if the specified session mode is supported; otherwise the promise resolves to false. Exceptions Rather than th...
XRSystem: requestSession() - Web APIs
The XRSystem interface's requestSession() method returns a promise which resolves to an XRSession object through which you can manage the requested type of WebXR session. While only one immersive VR session can be active at a time, multiple inline sessions can be in progress at once. Syntax var sessionPromise = xr.requestSession(sessionMode, sessionInit) Parameters sessionMode A DOMString whose value is one of those included in the XRSessionMode enum. The supported modes are: immersive-ar The session's output will be given exclusive access to the immersive device, but the rendered content will be blended with the real-world environment. The session's environmentBlendMode indicates the method to be used to blend the content together. Important: The immersive-ar mode is defi...
XRView.eye - Web APIs
Web › API › XRView › eye
The XRView interface's read-only eye property is a string taken from the XREye enumerated type, indicating which eye's viewpoint the XRView represents: left or right. For views which represent neither eye, such as monoscopic views, this property's value is none. Syntax let eye = xrView.eye; Value A DOMString whose value is one of the strings enumerated by the XREye type: left The XRView represents the point-of-view of the viewer's left eye. right The view represents the viewer's right eye. none The XRView describes a monoscopic view, or the view otherwise doesn't represent a particular eye's point-of-view. Usage notes The primary purpose of this property is to allow the correct area of any pre-rendered stereo content to be presented to the correct eye. For dynamically-rendered 3D...
msCaching - Web APIs
Web › API › msCaching
ll not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The msCaching read/write property specifies whether stream data downloaded using XMLHttpRequestis cached to disk or not. This proprietary method is specific to Internet Explorer and Microsoft Edge. Syntax cacheState = object.msCaching Values Type: DOMString Property value Description auto Disables caching for stream or ms-stream data. enabled Enables caching for stream or ms-stream data. disabled Disables caching for any data. See also msCachingEnabled Microsoft API extensions ...
msRegionOverflow - Web APIs
n production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The msRegionOverflow read-only property determines if content fully fits into the region or not. This proprietary property is specific to Internet Explorer. Syntax string = object.msRegionOverflow Values Type:DOMString overflow: The region element's content overflows the region's content box. Note that the region's overflow property value can be used to control the visibility of the overflowing content. This means that the region is the last one in the region chain and not able to fit the remaining content from the named flow. fit: The region element's content fits into the region's content box. It does not...
Parsing and serializing XML - Developer guides
You can get HTML corresponding to the <body> and its descendants with this code: var docHTML = document.documentElement.outerHTML; ...
<input type="button"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › button
les project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Note: While <input> elements of type button are still perfectly valid HTML, the newer <button> element is now the favored way to create buttons. Given that a <button>'s label text is inserted between the opening and closing tags, you can include HTML in the label, even images. Value A DOMString used as the button's label Events click Supported common attributes type, and value IDL attributes value Methods None Value An <input type="button"> elements' value attribute contains a DOMString that is used as the button's label. <input type="button" value="Click Me"> If you don't specify a value, you get an empty button: <input ty...
<input type="checkbox"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › checkbox
dio buttons are similar to checkboxes, but with an important distinction -- radio buttons are grouped into a set in which only one radio button can be selected at a time, whereas checkboxes allow you to turn single values on and off. Where multiple controls exist, radio buttons allow one to be selected out of them all, whereas checkboxes allow multiple values to be selected. Value A DOMString representing the value of the checkbox. Events change and input Supported common attributes checked IDL attributes checked, indeterminate and value Methods select() Value A DOMString representing the value of the checkbox. This is never seen on the client-side, but on the server this is the value given to the data submitted with the checkbox...
<input type="color"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › color
hat the color information is entered in the proper format, or a platform-standard color picker, or some kind of custom color picker window. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Value A 7-character DOMString specifying a <color> in lower-case hexadecimal notation Events change and input Supported common attributes autocomplete and list IDL attributes list and value Methods select() Value The value of an <input> element of type color is always a DOMString which contains a 7-character string specifying an RGB color in hexadecimal format. While you...
<input type="date"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › date
ut UI generally varies from browser to browser; see Browser compatibility for further details. In unsupported browsers, the control degrades gracefully to <input type="text">. Among browsers with custom interfaces for selecting dates are Chrome and Opera, whose data control looks like so: The Edge date control looks like: And the Firefox date control looks like this: Value A DOMString representing a date in YYYY-MM-DD format, or empty Events change and input Supported common attributes autocomplete, list, readonly, and step IDL attributes list, value, valueAsDate, valueAsNumber. Methods select(), stepDown(), stepUp() Value A DOMString representing the date entered in the input. The date is formatted according to ISO8601, ...
<input type="datetime-local"> - HTML: Hypertext Markup Language
up a date picker to allow you to choose a date; you have to enter the time manually. The Edge datetime-local control looks like the below; clicking the date and the time parts of the value bring up two separate pickers for you, so you can easily set both the date and the time. This is somewhat like having date and time widgets both created for you and merged into one. Value A DOMString representing a date and time (in the local time zone), or empty. Events change and input Supported common attributes autocomplete, list, readonly, and step IDL attributes list, value, valueAsNumber. Methods select(), stepDown(), stepUp() Value A DOMString representing the value of the date entered into the input. The format of the date and t...
<input type="radio"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › radio
he one shown below. Note: Checkboxes are similar to radio buttons, but with an important distinction: radio buttons are designed for selecting one value out of a set, whereas checkboxes let you turn individual values on and off. Where multiple controls exist, radio buttons allow one to be selected out of them all, whereas checkboxes allow multiple values to be selected. Value A DOMString representing the value of the radio button. Events change and input Supported common attributes checked and value IDL attributes checked and value Methods select() Value The value attribute is a DOMString containing the radio button's value. The value is never shown to the user by their user agent. Instead, it's used to identify which radio ...
<input type="reset"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › reset
tHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. You should usually avoid including reset buttons in your forms. They're rarely useful, and are instead more likely to frustrate users who click them by mistake (often while trying to click the submit button). Value A DOMString used as the button's label Events click Supported common attributes type and value IDL attributes value Methods None Value An <input type="reset"> element's value attribute contains a DOMString that is used as the button's label. Buttons such as reset don't have a value otherwise. <input type="reset" value="Reset the form"> If you don'...
<input type="submit"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › submit
<input> elements of type submit are rendered as buttons. When the click event occurs (typically because the user clicked the button), the user agent attempts to submit the form to the server. <input type="submit" value="Send Request"> Value A DOMString used as the button's label Events click Supported common attributes type and value IDL attributes value Methods None Value An <input type="submit"> element's value attribute contains a DOMString which is displayed as the button's label. Buttons do not have a true value otherwise. <input type="submit" value="Send Request"> If you don't specify a value, the button will have a default label, chosen by the user agent. This label is likely to be something along the lines of "...
<input type="text"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › text
<input> elements of type text create basic single-line text fields. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Value A DOMString representing the text contained in the text field. Events change and input Supported Common Attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, required and size IDL attributes list, value Methods select(), setRangeText() and setSelectionRange(). Value The value attribute is a DOMString that contains the current value of the text entered into the text field. You can retrieve this using the ...
<input type="time"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › time
lso uses a 12- or 24-hour format for inputting times, based on system locale. An "X" button is provided to clear the control's value. 12-hour 24-hour Edge The Edge time control is somewhat more elaborate, opening up an hour and minute picker with sliding reels. It, like Chrome, uses a 12- or 24-hour format for inputting times, based on system locale: 12-hour 24-hour Value A DOMString representing a time, or empty. Events change and input Supported common attributes autocomplete, list, readonly, and step IDL attributes value, valueAsDate, valueAsNumber, and list. Methods select(), stepDown(), and stepUp(). Value A DOMString containing the value of the time entered into the input. You can set a default value for the input...
<input type="week"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › week
s, the control degrades gracefully to function identically to <input type="text">. In Chrome/Opera the week control provides slots to fill in week and year values, a pop-up calendar interface to select them more visually, and an "X" button to clear the control's value. The Edge week control is somewhat more elaborate, opening up week and year pickers with sliding reels. Value A DOMString representing a week and year, or empty Events change and input Supported common attributes autocomplete, list, readonly, and step IDL attributes value, valueAsDate, valueAsNumber, and list. Methods select(), stepDown(), and stepUp() Value A DOMString representing the value of the week/year entered into the input. The format of the date and t...
<select>: The HTML Select element - HTML: Hypertext Markup Language
Web › HTML › Element › select
should be shown at once. It also accepts most of the general form input attributes such as required, disabled, autofocus, etc. You can further nest <option> elements inside <optgroup> elements to create separate groups of options inside the dropdown. For further examples, see The native form widgets: Drop-down content. Attributes This element includes the global attributes. autocomplete A DOMString providing a hint for a user agent's autocomplete feature. See The HTML autocomplete attribute for a complete list of values and details on how to use autocomplete. autofocus This Boolean attribute lets you specify that a form control should have input focus when the page loads. Only one form element in a document can have the autofocus attribute. disabled This Boolean attribute indicates that...
data-* - HTML: Hypertext Markup Language
is set on. The HTMLElement.dataset property gives access to them. The * may be replaced by any name following the production rule of XML names with the following restrictions: the name must not start with xml, whatever case is used for these letters; the name must not contain any semicolon (U+003A); the name must not contain capital letters. Note that the HTMLElement.dataset property is a DOMStringMap, and the name of the custom data attribute data-test-value will be accessible via HTMLElement.dataset.testValue (or by HTMLElement.dataset["testValue"]) as any dash (U+002D) is replaced by the capitalization of the next letter, converting the name to camelcase. Usage By adding data-* attributes, even ordinary HTML elements can become rather complex and powerful program-objects. For example,...
CSP: trusted-types - HTTP
f the web application codebase, facilitating their monitoring and code review. This directive declares a white-list of trusted type policy names created with TrustedTypes.createPolicy from Trusted Types API. Syntax Content-Security-Policy: trusted-types; Content-Security-Policy: trusted-types <policyName>; Content-Security-Policy: trusted-types <policyName> <policyName> 'allow-duplicates'; <DOMString> Any string can be a Trusted Type policy name. 'allow-duplicates' Allows for creating policies with a name that was already used Examples TODO Polyfill A polyfill for Trusted Types is available on Github. Specifications Specification Status Comment Trusted Types Draft Initial definition. ...
data-* - SVG: Scalable Vector Graphics
Web › SVG › Attribute › data-*
sually for scripting purposes. Their custom data are available via the SVGElement interface of the element the attributes belong to, with the SVGElement.dataset property. The * can be replaced by any characters allowed in XML's rules for names, with the following restrictions: Can't start with xml. No semicolons (;, U+003A). No capital A to Z letters. The SVGElement.dataset property is a DOMStringMap that provides the attribute data-test-value via SVGElement.dataset.testValue. Hyphen characters (-, U+002D) are removed and the next letter is capitalized, resulting in the camelCase format. Specifications Specification Status Comment Scalable Vector Graphics (SVG) 2The definition of 'data-*' in that specification. Candidate Recommendation Custom data attribute...
Using custom elements - Web Components
only autonomous custom elements. High-level view The controller of custom elements on a web document is the CustomElementRegistry object -- this object allows you to register a custom element on the page, return information on what custom elements are registered, etc. To register a custom element on the page, you use the CustomElementRegistry.define() method. This takes as its arguments: A DOMString representing the name you are giving to the element. Note that custom element names require a dash to be used in them (kebab-case); they can't be single words. A class object that defines the behaviour of the element. Optionally, an options object containing an extends property, which specifies the built-in element your element inherits from, if any (only relevant to customized built-in element...