Search completed in 1.32 seconds.
Boolean - JavaScript
The
Boolean object is an object wrapper for a
boolean value. Description The value passed as the first parameter is converted to a
boolean value, if necessary. If the value is omitted or is 0, -0, null, false, NaN, undefined, or the empty string (""), the object has an initial value of false. All other values, including any object, an empty array ([]), or the string "false", create an object with an initial value of true. Do not confuse the primitive
Boolean values true and false with the true and false values of the
Boolean object. Any object of which the value is not undefined or null, including a
Boolean object whose value is false, evaluates to true when passed to a conditional statement. ...
...t with an initial value of true. Do not confuse the primitive
Boolean values true and false with the true and false values of the
Boolean object. Any object of which the value is not undefined or null, including a
Boolean object whose value is false, evaluates to true when passed to a conditional statement. For example, the condition in the following if statement evaluates to true: var x = new
Boolean(false); if (x) { // this code is executed } This behavior does not apply to
Boolean primitives. For example, the condition in the following if statement evaluates to false: var x = false; if (x) { // this code is not executed } Do not use a
Boolean object to convert a non-
boolean value to a
boolean value. ...
...tatement evaluates to true: var x = new
Boolean(false); if (x) { // this code is executed } This behavior does not apply to
Boolean primitives. For example, the condition in the following if statement evaluates to false: var x = false; if (x) { // this code is not executed } Do not use a
Boolean object to convert a non-
boolean value to a
boolean value. To perform this task, instead, use
Boolean as a function, or a double NOT operator: var x =
Boolean(expression); // use this... var x = !!(expression); // ...or this var x = new
Boolean(expression); // don't use this! ...
...And 11 more matches
Boolean() constructor - JavaScript
The
Boolean() constructor is used to create
Boolean objects. 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. Syntax new
Boolean([value]) Parameters value Optional The initial value of the
Boolean object. ...
...() constructor is used to create
Boolean objects. 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. Syntax new
Boolean([value]) Parameters value Optional The initial value of the
Boolean object. ...
... 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. Syntax new
Boolean([value]) Parameters value Optional The initial value of the
Boolean object. ...
...And 5 more matches
Boolean - MDN Web Docs Glossary: Definitions of Web-related terms
Below is some JavaScript pseudocode (it's not truly executable code) demonstrating this concept. ...
... Below is some JavaScript pseudocode (it's not truly executable code) demonstrating this concept. ...
...n computer science, a
Boolean is a logical data type that can have only the values true or false. For example, in JavaScript,
Boolean conditionals are often used to decide which sections of code to execute (such as in if statements) or repeat (such as in for loops). Below is some JavaScript pseudocode (it's not truly executable code) demonstrating this concept. ...
...And 4 more matches
SVGAnimatedBoolean - Web APIs
If the given attribute or property is not currently being animated, contains the same value as baseVal. ...
...If the given attribute or property is not currently being animated, contains the same value as baseVal. ...
...If the given attribute or property is not currently being animated, contains the same value as baseVal. ...
...And 4 more matches
JS_ValueToBoolean
Obsolete since JSAPI 28This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Replaced by JS::To
Boolean Convert any JavaScript value to a
boolean value. Syntax JSBool JS_ValueTo
Boolean(JSContext *cx, jsval v, JSBool *bp); Name Type Description cx JSContext * The context in which to perform the conversion. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. v jsval The value to convert. bp JSBool * Out parameter. On success, *bp receives the converted
boolean value. Description JS_ValueTo
Boolean converts a specified JavaScript value, v, to a
boolean value. It implements the To...
...context in which to perform the conversion. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. v jsval The value to convert. bp JSBool * Out parameter. On success, *bp receives the converted
boolean value. Description JS_ValueTo
Boolean converts a specified JavaScript value, v, to a
boolean value. It implements the To
Boolean operator specified in ECMA 262-3 ?9.2. On success, JS_ValueTo
Boolean stores the converted value in *bp and returns JS_TRUE. On error or exception, it returns JS_FALSE, and the value left in *bp is undefined. For versions greater than JSVERSION_1_2, all objects convert to JS_TRUE, even
Boolean wrapper objects like the one produced by new
Boolean(false). This is the behavior specified in ECMA 262-...
... value in *bp and returns JS_TRUE. On error or exception, it returns JS_FALSE, and the value left in *bp is undefined. ...
...nd returns JS_TRUE. On error or exception, it returns JS_FALSE, and the value left in *bp is undefined. For versions greater than JSVERSION_1_2, all objects convert to JS_TRUE, even
Boolean wrapper objects like the one produced by new
Boolean(false). ...
ConstrainBoolean - Web APIs
If possible, this value will be used, but the user agent will use the other value if it needs to in order to come up with a workable configuration. ...
...If possible, this value will be used, but the user agent will use the other value if it needs to in order to come up with a workable configuration. ...
...If possible, this value will be used, but the user agent will use the other value if it needs to in order to come up with a workable configuration. ...
... in order to come up with a workable configuration. You can also specify the value of the property as simply true or false, in which case the user agent will use that value if possible once all efforts have been made to match the exact and ideal values for other properties. Specifications Specification Status Comment Media Capture and StreamsThe definition of 'Constrain
Boolean' in that specification. Candidate Recommendation Initial definition Technically, Constrain
Boolean is actually based on an intermediary dictionary named Constrain
BooleanParameters, which adds exact and ideal to the simple
Boolean type. However, for the sake of documentation clarity, the intermediate type (present only because of quirks in WebIDL syntax) is ignored here. ...
Boolean.prototype.toString() - JavaScript
The toString() method returns a string representing the specified
Boolean object. 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. Syntax bool.toString() Return value A string representing the specified
Boolean object. Description The
Boolean object overrides the toString method of the Object object; it does not inherit Object.prototype.toString(). For
Boolean objects, the toString method returns a string representation of the object. ...
... send us a pull request. Syntax bool.toString() Return value A string representing the specified
Boolean object. Description The
Boolean object overrides the toString method of the Object object; it does not inherit Object.prototype.toString(). For
Boolean objects, the toString method returns a string representation of the object. JavaScript calls the toString() method automatically when a
Boolean is to be represented as a text value or when a
Boolean is referred to in a string concatenation. For
Boolean objects and values, the built-in toString() method returns the string "true" or "false" depending on the value of the
boolean object. ...
...alls the toString() method automatically when a
Boolean is to be represented as a text value or when a
Boolean is referred to in a string concatenation. For
Boolean objects and values, the built-in toString() method returns the string "true" or "false" depending on the value of the
boolean object. Examples Using toString() In the following code, flag.toString() returns "true": var flag = new
Boolean(true); var myVar = flag.toString(); Specifications Specification ECMAScript (ECMA-262)The definition of '
Boolean.prototype.toString' in that specification. ...
JSVAL_TO_BOOLEAN
Obsolete since JSAPI 32This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Cast a
boolean JavaScript value to a C integer, either 0 or 1, without any type checking or error handling. Syntax JSBool JSVAL_TO_
BOOLEAN(jsval v); Description JSVAL_TO_
BOOLEAN casts the value v to a C integer, either 0 or 1. As a precondition, JSVAL_IS_
BOOLEAN(v) must be true. That is, v must be either JSVAL_TRUE or JSVAL_FALSE. Otherwise the behavior is undefined. The result is JS_TRUE or JS_FALSE respectively. These are constants of type JSBool, which is an integer type, the SpiderMonkey version of bool. JS_FALSE is 0; JS_TRUE is 1. To convert any value to a
boolean, use JS_ValueTo
Boolean instead. T...
...behavior is undefined. The result is JS_TRUE or JS_FALSE respectively. These are constants of type JSBool, which is an integer type, the SpiderMonkey version of bool. JS_FALSE is 0; JS_TRUE is 1. To convert any value to a
boolean, use JS_ValueTo
Boolean instead. That function has well-defined behavior even when the argument is an object, number, or something else. To convert a JSBool to jsval, use
BOOLEAN_TO_JSVAL. See Also bug 952650 ...
XPathResult.booleanValue - Web APIs
The read-only
booleanValue property of the XPathResult interface returns the
boolean value of a result with XPathResult.resultType being
BOOLEAN_TYPE. Note: This feature is available in Web Workers. Syntax var value = result.
booleanValue; Return value The return value is the
boolean value of the XPathResult returned by Document.evaluate(). Exceptions TYPE_ERR In case XPathResult.resultType is not
BOOLEAN_TYPE, an XPathException of type TYPE_ERR is thrown. Example The following example shows the use of the
booleanValue property. HTML <div>XPath example</div> <p>Text is 'XPath example': <output></output></p> JavaScript var xpath = "//div/text() = 'XPath example'"; var result = document.evaluate(xpath, document, null, XPathResult.
BOOLEAN_TYPE, null); document.querySelector("output")...
...athException of type TYPE_ERR is thrown. Example The following example shows the use of the
booleanValue property. HTML <div>XPath example</div> <p>Text is 'XPath example': <output></output></p> JavaScript var xpath = "//div/text() = 'XPath example'"; var result = document.evaluate(xpath, document, null, XPathResult.
BOOLEAN_TYPE, null); document.querySelector("output").textContent = result.
booleanValue; Result Specifications Specification Status Comment Document Object Model (DOM) Level 3 XPath SpecificationThe definition of 'XPathResult.
booleanValue' in that specification. Recommendation Initial definition ...
Boolean.prototype.valueOf() - JavaScript
The valueOf() method returns the primitive value of a
Boolean object. 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. Syntax bool.valueOf() Return value The primitive value of the given
Boolean object Description The valueOf() method of
Boolean returns the primitive value of a
Boolean object or literal
Boolean as a
Boolean data type. This method is usually called internally by JavaScript and not explicitly in code. ...
...om/mdn/interactive-examples and send us a pull request. Syntax bool.valueOf() Return value The primitive value of the given
Boolean object Description The valueOf() method of
Boolean returns the primitive value of a
Boolean object or literal
Boolean as a
Boolean data type. This method is usually called internally by JavaScript and not explicitly in code. Examples Using valueOf() x = new
Boolean(); myVar = x.valueOf(); // assigns false to myVar Specifications Specification ECMAScript (ECMA-262)The definition of '
Boolean.prototype.valueOf' in that specification. ...
BOOLEAN_TO_JSVAL
Obsolete since JSAPI 42This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Cast a C integer to a
boolean JS::Value without any type checking or error handling. Please use JS::
BooleanValue/JS::TrueValue/JS::FalseValue instead in SpiderMonkey 45 or later. Syntax jsval
BOOLEAN_TO_JSVAL(bool b); Name Type Description b bool C integer value to be converted to a
boolean jsval. Description
BOOLEAN_TO_JSVAL converts a bool argument, b, to a
boolean jsval. If b is false, the result is JSVAL_FALSE. If b is true, the result is JSVAL_TRUE. See Also MXR ID Search for
BOOLEAN_TO_JSVAL JS::
BooleanValue bug 1177892 -- removed ...
JS::BooleanValue
This article covers features introduced in SpiderMonkey 24 Convert a C
boolean of type bool to a JS::Value. Syntax JS::Value JS::
BooleanValue(bool boo) Name Type Description boo bool C bool to convert. Description JS::
BooleanValue converts a C
boolean of type bool to JS::Value, the type of JavaScript values. See Also MXR ID Search for JS::
BooleanValue JS::Value JS::TrueValue JS::FalseValue ...
JS::ToBoolean
This article covers features introduced in SpiderMonkey 17 Convert any JavaScript value to a
boolean. Syntax bool JS::To
Boolean(JS::HandleValue v) Name Type Description v JS::HandleValue The value to convert. Description JS::To
Boolean converts a JavaScript value to a
boolean. It implements the To
Boolean operation described in ECMA 262 ?7.1.2.This function can not fail and the return value is always the
boolean conversion of the argument. MXR ID Search for JS::To
Boolean bug 749536 ...
JSVAL_IS_BOOLEAN
Obsolete since JSAPI 32This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Determines if a given jsval is a JavaScript
boolean. Syntax JSVAL_IS_
BOOLEAN(v) Description JSVAL_IS_
BOOLEAN(v) is true if the given JavaScript value, v, is a
boolean value (that is, it is either JSVAL_TRUE or JSVAL_FALSE). To convert between JavaScript
boolean values (jsval) and C
boolean values, use JSVAL_TO_
BOOLEAN and
BOOLEAN_TO_JSVAL. See Also bug 952650 ...
Boolean.prototype.toSource() - JavaScript
The toSource() method returns a string representing the source code of the object. Syntax
booleanObj.toSource()
Boolean.toSource() Return value A string representing the source code of the object. Examples Native function For the built-in
Boolean object, toSource returns the following string indicating that the source code is not available: function
Boolean() { [native code] } Specifications Not part of any standard. ...
boolean - XPath
XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes The
boolean function evaluates an expression and returns true or false. Syntax
boolean( expression ) Arguments expression The expression to be evaluated. The expression can refer to numbers and node-sets as well as
booleans. Returns
Boolean true or false after evaluating expression. Notes A number evaluates to false if it is positive or negative zero or NaN. Otherwise, it evaluates true. A node-set evaluates to true if it is non-empty. A string evaluates to false if it an empty string. Otherwise, it evaluates to true. An object of a type other than the four basic types is converted to a
boolean in a way that is dependent on that type. Defined XPath 1.0 4.3 Gecko support Supp...
Index - Web APIs
rtSignal API, AbortSignal, DOM, Experimental, Interface, Reference The AbortSignal interface represents a signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. 11 AbortSignal.aborted API, AbortSignal, Experimental, Property, Reference, aborted The aborted read-only property returns a
Boolean that indicates whether the DOM request(s) the signal is communicating with is/are aborted (true) or not (false). 12 AbortSignal.onabort API, AbortSignal, Event Handler, Experimental, Fetch, Property, Reference, onabort The onabort read-only property of the FetchSignal interface is an event handler Invoked when an abort event fires, i.e. when the fetch request(s) the signal is...
...es before the battery runs out in order to prevent data loss. 264 BatteryManager API, Battery API, Device API, Interface, Obsolete, Reference, Reference(2) The BatteryManager interface provides ways to get information about the system's battery charge level. 265 BatteryManager.charging API, Battery API, NeedsMarkupWork, Property, Reference, Reference(2) A
Boolean value indicating whether or not the device's battery is currently being charged. 266 BatteryManager.chargingTime API, Battery API, NeedsMarkupWork, Property, Reference, Reference(2) Indicates the amount of time, in seconds, that remain until the battery is fully charged. 267 BatteryManager.dischargingTime API, Battery API, NeedsMarkupWork, Property, Reference, ...
..., BluetoothDevice, Experimental, Property, Reference, Web Bluetooth API, name The BluetoothDevice.name read-only property returns a DOMString that provides a human-readable name for the device. 311 BluetoothDevice.paired API, Bluetooth, BluetoothDevice, Non-standard, Obsolete, Property, Reference, Web Bluetooth API The BluetoothDevice.paired read-only property returns a
Boolean value indicating whether the device is paired with the system. 312 BluetoothDevice.uuids API, BluetoothDevice, Experimental, Property, Reference, UUIDs, Web Bluetooth API The BluetoothDevice.uuids read-only property lists the UUIDs of GATT services provided by the device, that the current origin is allowed to access. 313 adData API, Bluetooth, BluetoothDevice, ...
...And 140 more matches
Editor Embedding Guide - Archive of obsolete content
to aCommand (see list below for legal params). 3. Verify if a command is enabled -- IsCommandEnabled: commandManager->IsCommandDisabled(aCommand, retval) 4. Get the current command state of a given command -- GetCommandState: commandManager->GetCommandState(aCommand,aCommandParams) Index of Commands and Parameters cmd_bold Toggles bold style on selection. ...
...elow for legal params). 3. Verify if a command is enabled -- IsCommandEnabled: commandManager->IsCommandDisabled(aCommand, retval) 4. Get the current command state of a given command -- GetCommandState: commandManager->GetCommandState(aCommand,aCommandParams) Index of Commands and Parameters cmd_bold Toggles bold style on selection. ...
.... 3. Verify if a command is enabled -- IsCommandEnabled: commandManager->IsCommandDisabled(aCommand, retval) 4. Get the current command state of a given command -- GetCommandState: commandManager->GetCommandState(aCommand,aCommandParams) Index of Commands and Parameters cmd_bold Toggles bold style on selection. GetCommandState "state_all"(
boolean), "state_begin"(
boolean), "state_end"(
boolean), "state_mixed"(
boolean), "state_enabled" (
boolean) DoCommand no parameters Example normal bold cmd_italics Toggles italics style on selection. GetCommandState "state_all"(
boolean), "state_begin"(
boolean), "state_end"(
boolean), "state_mixed"(
boolean), "state_enabled" (
boolean) DoCommand no parameters Example normal italics cmd_underline Toggles underline on selection. GetComm...
...And 59 more matches
nsIMsgFolder
dFolderLoading(); void updateFolder(in nsIMsgWindow aWindow); nsIMsgFilterList getFilterList(in nsIMsgWindow msgWindow); void setFilterList(in nsIMsgFilterList filterList); void ForceDBClosed(); void Delete(); void deleteSubFolders(in nsISupportsArray folders, in nsIMsgWindow msgWindow); void propagateDelete(in nsIMsgFolder folder, in
boolean deleteStorage,in nsIMsgWindow msgWindow); void recursiveDelete(in
boolean deleteStorage, in nsIMsgWindow msgWindow); void createSubfolder(in AString folderName, in nsIMsgWindow msgWindow); nsIMsgFolder addSubfolder(in AString folderName); void createStorageIfMissing(in nsIUrlListener urlListener); void compact(in nsIUrlListener aListener, in nsIMsgWind...
... void createSubfolder(in AString folderName, in nsIMsgWindow msgWindow); nsIMsgFolder addSubfolder(in AString folderName); void createStorageIfMissing(in nsIUrlListener urlListener); void compact(in nsIUrlListener aListener, in nsIMsgWindow aMsgWindow); void compactAll(in nsIUrlListener aListener, innsIMsgWindow aMsgWindow,in nsISupportsArray aFolderArray, in
boolean aCompactOfflineAlso,in nsISupportsArray aOfflineFolderArray); void compactAllOfflineStores(in nsIMsgWindow aMsgWindow,in nsISupportsArray aOfflineFolderArray); void emptyTrash(in nsIMsgWindow aMsgWindow, in nsIUrlListener aListener); void rename(in AString name, in nsIMsgWindow msgWindow); void renameSubFolders( in nsIMsgWindow msgWindow, in nsIMsgFolder oldFol...
...pportsArray aOfflineFolderArray); void emptyTrash(in nsIMsgWindow aMsgWindow, in nsIUrlListener aListener); void rename(in AString name, in nsIMsgWindow msgWindow); void renameSubFolders( in nsIMsgWindow msgWindow, in nsIMsgFolder oldFolder); AString generateUniqueSubfolderName(in AString prefix,in nsIMsgFolder otherFolder); void updateSummaryTotals(in
boolean force); void summaryChanged(); long getNumUnread(in
boolean deep); long getTotalMessages(in
boolean deep); void clearNewMessages(); void clearRequiresCleanup(); void setFlag(in unsigned long flag); void clearFlag(in unsigned long flag);
boolean getFlag(in unsigned long flag); void toggleFlag(in unsigned long flag); ...
...And 45 more matches
nsIMsgDatabase
The nsIMsgDatabase interface is an abstract interface used to access the mail database backend. mailnews/db/msgdb/public/nsIMsgDatabase.idlScriptable Please add a summary to this article. ...
... The nsIMsgDatabase interface is an abstract interface used to access the mail database backend. mailnews/db/msgdb/public/nsIMsgDatabase.idlScriptable Please add a summary to this article. ...
...erface used to access the mail database backend. mailnews/db/msgdb/public/nsIMsgDatabase.idlScriptable Please add a summary to this article. ...
...And 40 more matches
nsIHTMLEditor
TMLEditor.idlScriptable Please add a summary to this article. ...
...article. ...
... void addInsertionListener(in nsIContentFilter inFilter); void align(in AString aAlign);
boolean breakIsVisible(in nsIDOMNode aNode);
boolean canDrag(in nsIDOMEvent aEvent); void checkSelectionStateForAnonymousButtons(in nsISelection aSelection); nsIDOMElement createAnonymousElement(in AString aTag, in nsIDOMNode aParentNode, in AString aAnonClass, in
boolean aIsCreatedHidden); nsIDOMElement createElementWithDefaults(in AString aTagName); void decreaseFontSize(); void doDrag(in nsIDOMEvent aEvent); void getAlignment(out
boolean aMixed, out short aAlign); AString getBackgroundColorState(out
boolean aMixed); nsIDOMElement getElementOrParentByTagName(in AString aTagName, in nsIDOMNode aNode); ...
...And 29 more matches
nsIDOMWindowUtils
pareCanvases(in nsIDOMHTMLCanvasElement aCanvas1, in nsIDOMHTMLCanvasElement aCanvas2, out unsigned long aMaxDifference); double computeAnimationDistance(in nsIDOMElement element, in AString property, in AString value1, in AString value2); nsICompositionStringSynthesizer createCompositionStringSynthesizer(); Obsolete since Gecko 38.0 void disableNonTestMouseEvents(in
boolean aDisable);
boolean dispatchDOMEventViaPresShell(in nsIDOMNode aTarget, in nsIDOMEvent aEvent, in
boolean aTrusted); nsIDOMElement elementFromPoint(in float aX, in float aY, in
boolean aIgnoreRootScrollFrame, in
boolean aFlushLayout); void enterModalState(); nsIDOMElement findElementWithViewId(in nsViewID aId); void focus(in nsIDOMElement aElement)...
...eCollectorListener aListener); short getCursorType(); AString getDocumentMetadata(in AString aName); nsIDOMWindow getOuterWindowWithId(in unsigned long long aOuterWindowID); long getPCCountScriptCount(); AString getPCCountScriptSummary(in long aScript); AString getPCCountScriptContents(in long aScript); void getScrollXY(in
boolean aFlushLayout, out long aScrollX, out long aScrollY); AString getVisitedDependentComputedStyle(in nsIDOMElement aElement, in AString aPseudoElement, in AString aPropertyName);
boolean isInModalState(); void leaveModalState(); void loadSheet(in nsIURI sheetURI, in unsigned long type); nsIDOMNodeList nodesFromRect(in float aX, in float aY, in float a...
... void removeSheet(in nsIURI s...
...And 26 more matches
nsIDocShell
ead, 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. ...
...t. Note that out-of-process browsers do not have an nsIDocShell; instead you can access the nsIDocShell object from a frame script. ...
...ring aURL, in
boolean aReplace); void beginRestore(in nsIContentViewer viewer, in
boolean top); void createAboutBlankContentViewer(in nsIPrincipal aPrincipal); void createLoadInfo(out nsIDocShellLoadInfo loadInfo); void DetachEditorFromWindow(); Violates the XPCOM interface guidelines void finishRestore(); void firePageHideNotification(in
boolean isUnload); Native code only! void fireUnloadNotification(); Native code only! ...
...And 24 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
onResultAt, getSessionStatusAt, getSessionValueAt, removeSession, select, setSelectionRange, syncSessions Examples (example needed) Attributes accesskey Type: character 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 attribute for the element. alwaysopenpopup Obsolete since Gecko 1.9.1 Type:
boolean Note: Applies to: Thunderbird and SeaMonkeyIf true, the autocomplete popup will be displayed even when there are no matches. If false, the default value, the popup will be hidden. This attribute is obsolete as of Gecko 1.9.1; to control the display of the popup, use the minresultsforpopup attribute instead. autocompletesearch New in Thunderbird 2Requires SeaMonkey 1.1 Type: sp...
...derbird 3 Requires SeaMonkey 2.0 The user's address book is searched. ldap New in Thunderbird 25 Requires SeaMonkey 2.22 The user's LDAP directory is searched. autocompletesearchparam New in Thunderbird 2 Requires SeaMonkey 1.1 Type: string A string which is passed to the search component. ...
...If false, only the text that hasn't been entered yet will be filled in. The textbox.autoFill attribute must be set to true to use this feature. As of Gecko 1.9.1, this attribute is superseded by the completedefaultindex attribute. ...
...And 23 more matches
nsISelectionController
content/base/public/nsISelectionController.idlScriptable Please add a summary to this article. ...
...nsISelectionController.idlScriptable Please add a summary to this article. ...
...ble Please add a summary to this article. ...
...And 23 more matches
Parser API
e Reflect object currently consists of a single method. Reflect.parse(src[, options]) Coerces src to a string and parses the result as a JavaScript program. By default, the parsing returns a Program object (see below) representing the parsed abstract syntax tree (AST). Additional options may be provided via the options object, which can include any of the following properties: loc
Boolean Default: true When loc is true, the parser includes source location information in the returned AST nodes. source String Default: null A description of the input source; typically a filename, path, or URL. This string is not meaningful to the parsing process, but is produced as part of the source location information in the returned AST nodes. line ...
... interface Position { line: uint32 >= 1; column: uint32 >= 0; } Programs interface Program <: Node { type: "Program"; body: [ Statement ]; } A complete program source tree. Functions interface Function <: Node { id: Identifier | null; params: [ Pattern ]; defaults: [ Expression ]; rest: Identifier | null; body: BlockStatement | Expression; generator:
boolean; expression:
boolean; } A function declaration or expression. The body of the function may be a block statement, or in the case of an expression closure, an expression. Note: Expression closures are SpiderMonkey-specific. If the generator flag is true, the function is a generator function, i.e., contains a yield expression in its body (other than in a nested function). Note: Generators a...
...face ContinueStatement <: Statement { type: "ContinueStatement"; label: Identifier | null; } A continue statement. interface WithStatement <: Statement { type: "WithStatement"; object: Expression; body: Statement; } A with statement. interface SwitchStatement <: Statement { type: "SwitchStatement"; discriminant: Expression; cases: [ SwitchCase ]; lexical:
boolean; } A switch statement. The lexical flag is metadata indicating whether the switch statement contains any unnested let declarations (and therefore introduces a new lexical scope). interface ReturnStatement <: Statement { type: "ReturnStatement"; argument: Expression | null; } A return statement. interface ThrowStatement <: Statement { type: "ThrowStatement"; argument: Express...
...And 21 more matches
Places utilities for JavaScript
lkit application PlacesUIUtils: only in Firefox PlacesUtils This is a gigantic object full of usefulness if you need to do any bookmark work from within browser.xul. As such, it gets its own special section. ...
... This is a gigantic object full of usefulness if you need to do any bookmark work from within browser.xul. As such, it gets its own special section. ...
... any bookmark work from within browser.xul. As such, it gets its own special section. ...
...And 20 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
SeaMonkey 2.0 The user's address book is searched. ldap New in Thunderbird 25 Requires SeaMonkey 2.22 The user's LDAP directory is searched. autocompletesearchparam New in Thunderbird 2 Requires SeaMonkey 1.1 Type: string A string which is passed to the search component. ...
...m New in Thunderbird 2 Requires SeaMonkey 1.1 Type: string A string which is passed to the search component. completedefaultindex New in Thunderbird 3 Requires SeaMonkey 2.0 Type:
boolean If true, the best match value will be filled into the textbox as the user types. If set to false or omitted, the value must be selected from the list. completeselectedindex Type:
boolean If true, the text in the text field will be autocompleted as the user selects from the popup list. crop Type:
boolean This attribute is not used and is only provided for compatibility with the menulist element. disableautocomplete New in Thunderbird 3Requires SeaMonkey 2.0 Type:
boolean If true, the autocomplete behavior will be disabled. You might use a scri...
...If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. ...
...And 18 more matches
source-editor.jsm
ctly import that code module; it is essentially an implementation detail. Its functionality is all exposed through source-editor.jsm. ...
...y an implementation detail. Its functionality is all exposed through source-editor.jsm. ...
...Callback); Search operations Number find(String aString, [optional] Object options); Number findNext(
Boolean aWrap); Number findPrevious(
Boolean aWrap); Event management void addEventListener(String aEventType, Function aCallback); void removeEventListener(String aEventType, Function aCallback); Undo stack operations
Boolean canRedo();
Boolean canUndo(); void endCompoundChange();
Boolean redo(); void resetUndo(); void startCompoundChange();
Boolean undo(); Display management operations void focus(); Number getTopIndex();
Boolean hasFocus(); void setTopIndex(Number aTopIndex); Content management operations ...
...And 18 more matches
nsIMsgIncomingServer
1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Method overview void clearAllValues(); void clearTemporaryReturnReceiptsFilter(); void closeCachedConnections(); void configureTemporaryFilters(in nsIMsgFilterList filterList); void configureTemporaryReturnReceiptsFilter(in nsIMsgFilterList filterList); Obsolete since Gecko 1.8 void displayOfflineMsg(in nsIMsgWindow aWindow);
boolean equals(in nsIMsgIncomingServer server); void forgetPassword(); void forgetSessionPassword(); AString generatePrettyNameForMigration();
boolean getBoolAttribute(in string name);
boolean getBoolValue(in string attr); ACString getCharAttribute(in string name); ACString getCharValue(in string attr); nsILocalFile getFileValue(in string relpref, in string abspref); nsIMsgFilterList ge...
...ow aMsgWindow); long getIntAttribute(in string name); long getIntValue(in string attr); nsIMsgFolder getMsgFolderFromURI(in nsIMsgFolder aFolderResource, in ACString aURI); void getNewMessages(in nsIMsgFolder aFolder, in nsIMsgWindow aMsgWindow, in nsIUrlListener aUrlListener); ACString getPasswordWithUI(in AString aPromptString, in AString aPromptTitle, in nsIMsgWindow aMsgWindow, out
boolean okayValue); AString getUnicharAttribute(in string name); AString getUnicharValue(in string attr);
boolean isNewHdrDuplicate(in nsIMsgDBHdr aNewHdr); void onUserOrHostNameChanged(in ACString oldName, in ACString newName); void performBiff(in nsIMsgWindow aMsgWindow); void performExpand(in nsIMsgWindow aMsgWindow); void removeFiles(); void setBoolAttribute(in string name, in boolea...
...ing name); AString getUnicharValue(in string attr);
boolean isNewHdrDuplicate(in nsIMsgDBHdr aNewHdr); void onUserOrHostNameChanged(in ACString oldName, in ACString newName); void performBiff(in nsIMsgWindow aMsgWindow); void performExpand(in nsIMsgWindow aMsgWindow); void removeFiles(); void setBoolAttribute(in string name, in
boolean value); void setBoolValue(in string attr, in
boolean value); void setCharAttribute(in string name, in ACString value); void setCharValue(in string attr, in ACString value); void setDefaultLocalPath(in nsILocalFile aDefaultLocalPath); void setFileValue(in string relpref, in string abspref, in nsILocalFile aValue); void setFilterList(in nsIMsgFilterList aFilterList); void setIntAttribute(in string name, in long value); void setIntValue(...
...And 18 more matches
NSS environment variables
oduced in version NSRANDCOUNT Integer (byte count) Sets the maximum number of bytes to read from the file named in the environment variable NSRANDFILE (see below). Makes NSRANDFILE usable with /dev/urandom. 3.12.3 NSRANDFILE String (file name) Uses this file to seed the Pseudo Random Number Generator. Before 3.0 NSS_ALLOW_WEAK_SIGNATURE_ALG
Boolean (any non-empty value to enable) Enables the use of MD2 and MD4 inside signatures. This was allowed by default before NSS 3.12.3. 3.12.3 NSS_DEBUG_PKCS11_MODULE String (module name) Name the PKCS#11 module to be traced. PKCS #11 Module Logger 3.6 NSS_DEFAULT_DB_TYPE String ("dbm", "sql", or "extern") Determines the default Database type to open i...
...ine this variable to get accurate leak allocation stacks when using leak reporting software. NSS_Memory_allocation 3.4 NSS_DISABLE_UNLOAD String (any non-empty value) Disable unloading of dynamically loaded NSS shared libraries during shutdown. Necessary on some platforms to get correct function names when using leak reporting software. 3.11.8 NSS_ENABLE_AUDIT
Boolean (1 to enable) Enable auditing of activities of the NSS cryptographic module in FIPS mode. Audit Data 3.11.2 NSS_ENABLE_PKIX_VERIFY
Boolean (any non-empty value to enable) Use libPKIX, rather than the old cert library, to verify certificates. 3.12 NSS_FIPS String ("fips","true","on","1") Will start NSS in FIPS mode. 3.12.5 NSS_HASH_ALG...
...with vulnerable servers. This value should only be used during the transition period when few servers have been upgraded. [2|r|R]: SSL_RENEGOTIATE_REQUIRES_XTN (default) Only allows renegotiation if the peer's hello bears the TLS renegotiation_info extension. This is the safe renegotiation. 3.12.5 Modified in 3.12.6 NSS_SSL_REQUIRE_SAFE_NEGOTIATION
Boolean (1 to enable) It controls whether safe renegotiation indication is required for initial handshake. In other words a connection will be dropped at initial handshake if a server or client do not support safe renegotiation. The default setting for this option is FALSE. 3.12.5 NSS_SSL_SERVER_CACHE_MUTEX_TIMEOUT Integer (seconds) Timeout time to detect dead or hung process...
...And 13 more matches
nsIDOMEvent
s interface is the primary data type for all events in the Document Object Model. Inherits from: nsISupports Last changed in Gecko 16.0 (Firefox 16.0 / Thunderbird 16.0 / SeaMonkey 2.13) Note: As of Gecko 16.0, the nsIPrivateDOMEvent interface was merged into this interface. Everything marked as Gecko 16.0 was previously available in that interface. See bug 761613. ...
...d into this interface. Everything marked as Gecko 16.0 was previously available in that interface. See bug 761613. ...
...13. ...
...And 13 more matches
nsIPromptService
e, use: var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); Method overview void alert(in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); void alertCheck(in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout
boolean aCheckState);
boolean confirm(in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText);
boolean confirmCheck(in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout
boolean aCheckState); PRInt32 confirmEx(in nsIDOMWindow aParent,in wstring aDialogTitle,in wstring aText, in unsigned long aButtonFlags,in wstring aButton0T...
...itle, in wstring aText);
boolean confirmCheck(in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout
boolean aCheckState); PRInt32 confirmEx(in nsIDOMWindow aParent,in wstring aDialogTitle,in wstring aText, in unsigned long aButtonFlags,in wstring aButton0Title, in wstring aButton1Title,in wstring aButton2Title,in wstring aCheckMsg, inout
boolean aCheckState);
boolean prompt(in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aValue, in wstring aCheckMsg, inout
boolean aCheckState);
boolean promptUsernameAndPassword(in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aUsername, inout wstring aPassword, in wstring aCheckMsg, inout
boolean aCheckState); b...
...eckMsg, inout
boolean aCheckState);
boolean promptUsernameAndPassword(in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aUsername, inout wstring aPassword, in wstring aCheckMsg, inout
boolean aCheckState);
boolean promptPassword(in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aPassword, in wstring aCheckMsg, inout
boolean aCheckState);
boolean select(in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in PRUint32 aCount, [array, size_is(aCount)] in wstring aSelectList, out long aOutSelection); Constants The following flags are combined to form the aButtonFlags parameter passed to confirmEx. All flags are defined as unsigned long constants and can be accessed as Components.interfaces.
...And 13 more matches
lang/type - Archive of obsolete content
Functions for working with type detection. Globals Functions isUndefined(value) Returns true if value is undefined, false otherwise. let { isUndefined } = require('sdk/lang/type'); var foo; isUndefined(foo); // true isUndefined(0); // false Parameters value : mixed The variable to check. Returns
boolean :
Boolean indicating if value is undefined. isNull(value) Returns true if value is null, false otherwise. let { isNull } = require('sdk/lang/type'); isNull(null); // true isNull(false); // false Parameters value : mixed The variable to check. Returns
boolean :
Boolean indicating if value is null. isString(value) Returns true if value is a String, false otherwise. Uses typeof operator to check type, and will only properly detect string primitives: for example, a string cre...
... Returns true if value is a String, false otherwise. Uses typeof operator to check type, and will only properly detect string primitives: for example, a string created with new String() will always return false. let { isString } = require('sdk/lang/type'); isString('my string'); // true isString(100); // false isString('100'); // true Parameters value : mixed The variable to check. Returns
boolean :
Boolean indicating if value is a String. isNumber(value) Returns true if value is a Number, false otherwise. Uses typeof operator to check type, and will only properly detect number primitives: for example, a number created with new Number() will always return false. let { isNumber } = require('sdk/lang/type'); isNumber(3.1415); // true isNumber(100); // true isNumber('100'); // false Para...
...lue) Returns true if value is a Number, false otherwise. Uses typeof operator to check type, and will only properly detect number primitives: for example, a number created with new Number() will always return false. let { isNumber } = require('sdk/lang/type'); isNumber(3.1415); // true isNumber(100); // true isNumber('100'); // false Parameters value : mixed The variable to check. Returns
boolean :
Boolean indicating if value is a Number. isRegExp(value) Returns true if value is a RegExp, false otherwise. let { isRegExp } = require('sdk/lang/type'); isRegExp(/[^\.]*\.js$/); // true isRegExp(new RegExp('substring')); // true isRegExp(1000); // false Parameters value : mixed The variable to check. Returns
boolean :
Boolean indicating if value is a RegExp. isDate(value) Returns tr...
...And 12 more matches
LiveConnect Overview - Archive of obsolete content
ther language when you use LiveConnect. These conversions are described in the following sections: JavaScript to Java Conversions Java to JavaScript Conversions JavaScript to Java Conversions When you call a Java method and pass it parameters from JavaScript, the data types of the parameters you pass in are converted according to the rules described in the following sections: Number Values
Boolean Values String Values Undefined Values Null Values JavaArray and JavaObject objects JavaClass objects Other JavaScript objects The return values of methods of netscape.javascript.JSObject are always converted to instances of java.lang.Object. The rules for converting these return values are also described in these sections. For example, if JSObject.eval returns a JavaScript number, you can ...
... byte char int long short Values are rounded using round-to-negative-infinity mode. Values which are too large or small to be represented result in a run-time error. NaN can not be converted and results in a run-time error. java.lang.String Values are converted to strings. For example: 237 becomes "237"
boolean 0 and NaN values are converted to false. Other values are converted to true. When a JavaScript number is passed as a parameter to a Java method which expects an instance of java.lang.String, the number is converted to a string. Use the equals() method to compare the result of this conversion with other string values.
Boolean Values When you pass JavaScript Boolea...
...h expects an instance of java.lang.String, the number is converted to a string. Use the equals() method to compare the result of this conversion with other string values.
Boolean Values When you pass JavaScript
Boolean types as parameters to Java methods, Java converts the values according to the rules described in the following table: Java parameter type Conversion rules
boolean All values are converted directly to the Java equivalents. java.lang.
Boolean java.lang.Object A new instance of java.lang.
Boolean is created. Each parameter creates a new instance, not one instance with the same primitive value. java.lang.String Values are converted to strings. For example: true becomes "true" false becomes "false" b...
...And 11 more matches
nsITextInputProcessor
evel 3 Events. However, it's the best for every TextInputProcessor user to specify KeyboardEvent every time because when Gecko will change the behavior of keyboard events during composition, TextInputProcessor must not need to change for the new behavior in most cases. ...
...ecause when Gecko will change the behavior of keyboard events during composition, TextInputProcessor must not need to change for the new behavior in most cases. ...
...aLength, in unsigned long aAttribute);
boolean beginInputTransaction(in nsIDOMWindow aWindow, in nsITextInputProcessorCallback aCallback);
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 getModi...
...And 11 more matches
nsITreeView
rits from: nsISupports Last changed in Gecko 22 (Firefox 22 / Thunderbird 22 / SeaMonkey 2.19) Implementing a nsITreeView in lieu of DOM methods for tree creation can improve performance dramatically, and removes the need to make changes to the tree manually when changes to the database occur. Further information about creating treeviews is given in the XUL Tutorial. ...
...plementing a nsITreeView in lieu of DOM methods for tree creation can improve performance dramatically, and removes the need to make changes to the tree manually when changes to the database occur. Further information about creating treeviews is given in the XUL Tutorial. ...
...ds for tree creation can improve performance dramatically, and removes the need to make changes to the tree manually when changes to the database occur. Further information about creating treeviews is given in the XUL Tutorial. ...
...And 11 more matches
nsIFile
merged with this interface in Gecko 14. Much of the documentation has not been updated to reflect this change. ...
...e newParentDir, in AString newName); void copyToFollowingLinksNative(in nsIFile newParentDir, in ACString newName); Native code only! void CopyToNative(in nsIFile newParentDir, in ACString newName); Native code only! ...
... void copyToFollowingLinksNative(in nsIFile newParentDir, in ACString newName); Native code only! void CopyToNative(in nsIFile newParentDir, in ACString newName); Native code only! ...
...And 10 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
the id attribute of the <datalist> of autocomplete options max numeric types Maximum value maxlength password, search, tel, text, url Maximum length (number of characters) of value min numeric types Minimum value minlength password, search, tel, text, url Minimum length (number of characters) of value multiple email, file
Boolean. Whether to allow multiple values name all Name of the form control. Submitted with the form as part of a name/value pair. pattern password, text, tel Pattern the value must match to be valid placeholder password, search, tel, text, url Text that appears in the form control when it has no value set readonly almost all
Boolean. The value ...
... all Name of the form control. Submitted with the form as part of a name/value pair. pattern password, text, tel Pattern the value must match to be valid placeholder password, search, tel, text, url Text that appears in the form control when it has no value set readonly almost all
Boolean. The value is not editable required almost all
Boolean. A value is required or must be check for the form to be submittable size email, password, tel, text Size of the control src image Same as src attribute for <img>; address of image resource step numeric types Incremental values that are valid. type all Type of form control value all Current value of the form control. Submi...
... Valid for the file input type only, the accept attribute defines which file types are selectable in a file upload control. See the file input type. alt Valid for the image button only, the alt attribute provides alternative text for the image, displaying the value of the attribute if the image src is missing or otherwise fails to load. See the image input type. autocomplete (Not a
Boolean attribute!) The autocomplete attribute takes as its value a space-separated string that describes what, if any, type of autocomplete functionality the input should provide. A typical implementation of autocomplete simply recalls previous values entered in the same input field, but more complex forms of autocomplete can exist. For instance, a browser could integrate with a device's contacts list t...
...And 10 more matches
JXON - Archive of obsolete content
This is a possible technique to use if you partially know the structure of the XML document. Algorithm #3: a synthetic technique Here is another method of conversion. This algorithm is the closest to the Parker convention. It is very similar to the previous one, except that nodes which do not contain other recognizable nodes than Text or CDATASection are not treated as objects, but directly as
booleans, strings, numbers or Date objects (see the Parker convention). Empty nodes (i.e. which do not contain other Element nodes, Text nodes, CDATASection nodes or Attr nodes) have the default value true (see the Code considerations). Also, this time we use a function instead of a constructor. The function's argument can be the entire XML Document, a DocumentFragment, or simply an Element node within i...
...turn 0; }\n}" } } } This is a recommended technique if you know the structure of the XML document. Algorithm #4: a very minimalist way The following is another possible way to do the conversion. It is very close to the Parker convention, too. With this algorithm, all Element nodes that contain other child Element, Text, or CDATASection nodes in the same level are treated as instances of
Boolean, Number, String, or Date Constructors. So any child Element node, if exists, will be nested in these types of objects. For example: <employee type="usher">John Smith</employee> <manager>Lisa Carlucci</manager> becomes var myObject = { "employee": new String("John Smith"), "manager": "Lisa Carlucci" }; myObject.employee["@type"] = "usher"; // test alert(myObject.manager); // "Lisa Carl...
...epresents a special case of conversion. The generated JavaScript Object tree is not stringifyable (see the Code considerations). It is very practical for internal JavaScript access, but don't use it if you want to transfer the tree via JSON string! As for the third algorithm, nodes which do not contain other recognizable nodes than Text or CDATASection are not treated as objects, but directly as
booleans, strings, numbers (primitive values) or Date objects; and empty nodes (i.e. which do not contain other Element nodes, Text nodes, CDATASection nodes or Attr nodes) have the default value true. As for the third algorithm it is not used a constructor, but a function. The function's argument can be the entire XML Document, a DocumentFragment or simply an Element node of it. nodeAttributes have the ...
...And 9 more matches
textbox - Archive of obsolete content
</vbox> Attributes cols Type: integer For multiline textboxes, the number of columns to display. decimalplaces Type: integer The number of decimal places to display. The default is 0, which doesn't show any decimal places. The value Infinity may be used if you want no limit on the number of decimal places. Note that decimal numbers are stored as floats. disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
... for form controls. Using it with an anchor tag (an <a> link) will have no effect. The element will, however, still respond to mouse events. To enable the element, leave this attribute out entirely. Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. ...
...The value may still be adjusted with the keyboard. The default value is false. ...
...And 9 more matches
nsIMsgDBView
sgWindow aMsgWindow, in nsIMsgDBViewCommandUpdater aCommandUpdater); void sort(in nsMsgViewSortTypeValue sortType, in nsMsgViewSortOrderValue sortOrder); void doCommand(in nsMsgViewCommandTypeValue command); void doCommandWithFolder(in nsMsgViewCommandTypeValue command, in nsIMsgFolder destFolder); void getCommandStatus(in nsMsgViewCommandTypeValue command, out
boolean selectable_p, out nsMsgViewCommandCheckStateValue selected_p); void viewNavigate(in nsMsgNavigationTypeValue motion, out nsMsgKey resultId, out nsMsgViewIndex resultIndex, out nsMsgViewIndex threadIndex, in
boolean wrap);
boolean navigateStatus(in nsMsgNavigationTypeValue motion); nsMsgKey getKeyAt(in nsMsgViewIndex index); nsIMsgDBHdr getMsgHdrAt(in nsMsgViewI...
... void loadMessageByMsgKey(in nsMsgKey aMsgKey); void loadMessageByViewIndex(in nsMsgViewIndex aIndex); void loadMessageByUrl(in string aUrl); void reloadMessage(); void reloadMessageWithAllParts(); void selectMsgByKey(in nsMsgKey key); void selectFolderMsgByKey(in nsIMsgFolder aFolder, in nsMsgKey aKey); void onDeleteCompleted(in
boolean succeeded); nsMsgViewIndex findIndexFromKey(in nsMsgKey aMsgKey, in
boolean aExpand); void ExpandAndSelectThreadByIndex(in nsMsgViewIndex aIndex, in
boolean aAugment); void addColumnHandler(in AString aColumn, in nsIMsgCustomColumnHandler aHandler); void removeColumnHandler(in AString aColumn); nsIMsgCustomColumnHandler getColumnHandler(in AString aCol...
...gToSelectAfterDelete nsMsgViewIndex Readonly: The index of the message to select after the current one is deleted. nsMsgViewIndex is defined as a unsigned long in MailNewsTypes2.idl. currentlyDisplayedMessage nsMsgViewIndex Readonly: The index of the currently displayed message. nsMsgViewIndex is defined as a unsigned long in MailNewsTypes2.idl. ...
...And 9 more matches
nsIMsgSearchSession
.createInstance(Components.interfaces.nsIMsgSearchSession); To use the instance append search terms, set the scope, and then call search(). ...
...eInstance(Components.interfaces.nsIMsgSearchSession); To use the instance append search terms, set the scope, and then call search(). ...
...sion.createTerm(); var value = searchTerm.value; value.str = aValue; searchTerm.value = value; searchTerm.op = searchSession.
BooleanOR; searchTerm.
booleanAnd = false; searchSession.appendTerm(searchTerm); searchSession.search(null); Inherits from: nsISupports Method overview void addSearchTerm(in nsMsgSearchAttribValue attrib, in nsMsgSearchOpValue op, in nsIMsgSearchValue value, in
boolean BooleanAND, in string arbitraryHeader); nsIMsgSearchTerm createTerm(); void appendTerm(in nsIMsgSearchTerm term); void registerListener(in nsIMsgSearchNotify listener); void unregisterListener(in nsIMsgSearchNotify listener); void getNthSearchTerm(in long whichTerm, in nsMsgSearchAttribValue attrib, in nsMsgSearchOpValue op, in nsIMsgSearchValue value)...
...And 9 more matches
nsIMsgSearchTerm
Defined in mozilla/ mailnews/ base/ search/ public/ nsIMsgSearchTerm.idl Attributes attrib attribute nsMsgSearchAttribValue attrib; op attribute nsMsgSearchOpValue op; value attribute nsIMsgSearchValue value;
booleanAnd attribute
boolean booleanAnd; arbitraryHeader attribute ACString arbitraryHeader; hdrProperty /** * Not to be confused with arbitraryHeader, which is a header in the * rfc822 message. This is a property of the nsIMsgDBHdr, and may have * nothing to do the message headers, e.g., gloda-id. ...
...itraryHeader, which is a header in the * rfc822 message. This is a property of the nsIMsgDBHdr, and may have * nothing to do the message headers, e.g., gloda-id. * value.str will be compared with nsIMsgHdr::GetProperty(hdrProperty). */ attribute ACString hdrProperty; customId /// identifier for a custom id used for this term, if any. ...
...essage. This is a property of the nsIMsgDBHdr, and may have * nothing to do the message headers, e.g., gloda-id. * value.str will be compared with nsIMsgHdr::GetProperty(hdrProperty). */ attribute ACString hdrProperty; customId /// identifier for a custom id used for this term, if any. ...
...And 9 more matches
Component; nsIPrefBranch
f the preference. For example, if this object is created with the root "browser.startup.", the preferences "browser.startup.page", "browser.startup.homepage", and "browser.startup.homepage_override" can be accessed by simply passing "page", "homepage", or "homepage_override" to the various Get/Set methods. ...
..."browser.startup.homepage", and "browser.startup.homepage_override" can be accessed by simply passing "page", "homepage", or "homepage_override" to the various Get/Set methods. ...
...e accessed by simply passing "page", "homepage", or "homepage_override" to the various Get/Set methods. ...
...And 9 more matches
Dehydra Object Reference - Archive of obsolete content
st way to become familiar with the Dehydra objects is to print out the objects: Dehydra example code an online tool for pretty-printing dehydra data Understanding Properties Dehydra only sets properties that are applicable. For example, class types and typedefs are declared and will have a .loc property. Intrinsic types such as "int" are not declared and will not have a .loc. Dehydra only sets
boolean flags when they are true. For example, a pointer type will have .isPointer == true, but a class type will not have an .isPointer property. Common Properties Property Type Description .loc location object Source location of a type or declaration. .attributes array of objects Attributes of the type or declaration. Each member of the array has the following properties: { name: string, ...
... arbitrary user attributes: __attribute__((user("customstring"))). Variable Objects Dehydra presents AST nodes as variables. These types are used to represent variables, functions, assignments, etc. The following properties are usually available: Property Type Description .name string The function or variable name. .type type object The type of this function or variable. .isStatic
boolean flag .isReturn
boolean flag The variable is being returned. .isDecl
boolean flag The variable is being declared (local variables only). .assign array of variable objects This variable is the LHS of an assignment. The value is an array of values that were assigned. .isFcall
boolean flag The variable is being used as a function call. .arguments array of variable objects Arguments u...
...will be true (see Function Variable). Variables can identified by their DehydraDecl() prototype. Function Variable Function objects are an extension of Variable Objects. The following additional properties are available on functions: Property Type Description .isVirtual true or "pure" true for virtual methods, or "pure" for pure virtuals (e.g. virtual void foo() = 0;). .isConstructor
boolean flag Constructors generally have a .fieldOf attribute (see Variable Objects). .isFunction
boolean flag true for function variables. Type Objects Dehydra provides detailed type objects. Dehydra Type objects use the DehydraType() prototype. Common Type Properties Property Type Description .name string If applicable, the name of of the type. For typedefs and classes, this is the declar...
...And 8 more matches
nsIMessenger
essenger object is defined as messenger via the createMessenger function in mailWindow.js. ...
...s messenger via the createMessenger function in mailWindow.js. ...
...ean canRedo(); unsigned long getUndoTransactionType(); unsigned long getRedoTransactionType(); void undo(in nsIMsgWindow msgWindow); void redo(in nsIMsgWindow msgWindow); void sendUnsentMessages(in nsIMsgIdentity aIdentity, in nsIMsgWindow aMsgWindow); void setDocumentCharset(in ACString characterSet); void saveAs(in ACString aURI, in
boolean aAsFile, in nsIMsgIdentity aIdentity, in AString aMsgFilename); void openAttachment(in ACString contentTpe, in ACString url, in ACString displayName, in ACString messageUri, in
boolean isExternalAttachment); void saveAttachment(in ACString contentTpe, in ACString url, in ACString displayName, in ACString messageUri, in
boolean isExternalAttachment); void saveAllAttachme...
...And 8 more matches
HTMLInputElement - Web APIs
ement's formenctype attribute, containing the type of content that is used to submit the form to the server. This overrides the enctype attribute of the parent form. formMethod string: Returns / Sets the element's formmethod attribute, containing the HTTP method that the browser uses to submit the form. This overrides the method attribute of the parent form. formNoValidate
Boolean: Returns / Sets the element's formnovalidate attribute, indicating that the form is not to be validated when it is submitted. This overrides the novalidate attribute of the parent form. formTarget string: Returns / Sets the element's formtarget attribute, containing a name or keyword indicating where to display the response that is received after submitting the form. This overrides th...
... Properties that apply to any type of input element that is not hidden name string: Returns / Sets the element's name attribute, containing a name that identifies the element when submitting the form. type string: Returns / Sets the element's type attribute, indicating the type of control to display. See type attribute of <input> for possible values. ...
... type string: Returns / Sets the element's type attribute, indicating the type of control to display. See type attribute of <input> for possible values. disabled
Boolean: Returns / Sets the element's disabled attribute, indicating that the control is not available for interaction. The input values will not be submitted with the form. See also readonly autofocus
Boolean: Returns / Sets the element's autofocus attribute, which specifies that a form 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 element in a document can have the autofocus attribute. It cannot be applied if the type attribute is set to hidden (that is, you cannot automatically set focus to a hidden cont...
...And 8 more matches
WebGLRenderingContext.getParameter() - Web APIs
meters when using a WebGLRenderingContext. ...
... When using the WEBGL_compressed_texture_s3tc extension: ext.COMPRESSED_RGB_S3TC_DXT1_EXT ext.COMPRESSED_RGBA_S3TC_DXT1_EXT ext.COMPRESSED_RGBA_S3TC_DXT3_EXT ext.COMPRESSED_RGBA_S3TC_DXT5_EXT When using the WEBGL_compressed_texture_s3tc_s...
...ASTC_10x6_KHR ext.COMPRESSED_RGBA_ASTC_10x6_KHR ext.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR ext.COMPRESSED_RGBA_ASTC_10x10_KHR ext.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR ext.COMPRESSED_RGBA_ASTC_12x10_KHR ext.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR ext.COMPRESSED_RGBA_ASTC_12x12_KHR ext.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR gl.CULL_FACE GL
boolean gl.CULL_FACE_MODE GLenum gl.FRONT, gl.BACK or gl.FRONT_AND_BACK. See also cullFace gl.CURRENT_PROGRAM WebGLProgram or null See useProgram. gl.DEPTH_BITS GLint gl.DEPTH_CLEAR_VALUE GLfloat gl.DEPTH_FUNC GLenum gl.DEPTH_RANGE Float32Array (with 2 elements) gl.DEPTH_TEST GL
boolean ...
...And 8 more matches
Bytecode Descriptions
Int32 Operands: (int32_t val) Stack: => val Push the int32_t immediate operand as an Int32Value. JSOp::Zero, JSOp::One, JSOp::Int8, JSOp::Uint16, and JSOp::Uint24 are all compact encodings for JSOp::Int32. Zero Stack: => 0 Push the number 0. One Stack: => 1 Push the number 1. ...
...e result on success is always numeric. Format: JOF_IC BitNot Stack: val => (~val) The bitwise NOT operator (~). val is converted to an integer, then bitwise negated. The conversion can call .toString()/.valueOf() methods and can throw. The result on success is always an Int32 or BigInt value. Format: JOF_IC Not Stack: val => (!val) The logical NOT operator (!). val is first converted with To
Boolean, then logically negated. The result is always a
boolean value. This does not call user-defined methods and can't throw. Format: JOF_IC Binary operators BitOr, BitXor, BitAnd Stack: lval, rval => (lval OP rval) Binary bitwise operations (|, ^, &). The arguments are converted to integers first. The conversion can call .toString()/.valueOf() methods and can throw. The result on success is alway...
..., BitAnd Stack: lval, rval => (lval OP rval) Binary bitwise operations (|, ^, &). The arguments are converted to integers first. The conversion can call .toString()/.valueOf() methods and can throw. The result on success is always an Int32 or BigInt Value. Format: JOF_IC Eq, Ne Stack: lval, rval => (lval OP rval) Loose equality operators (== and !=). Pop two values, compare them, and push the
boolean result. The comparison may perform conversions that call .toString()/.valueOf() methods and can throw. Implements: Abstract Equality Comparison. Format: JOF_IC StrictEq, StrictNe Stack: lval, rval => (lval OP rval) Strict equality operators (=== and !==). Pop two values, check whether they're equal, and push the
boolean result. This does not call user-defined methods and can't throw (except po...
...And 7 more matches
nsIMsgMessageService
Objects that implements nsIMsgMessageService give the user top level routines related to messages like copying, displaying, attachment's manipulation, printing, streaming the message content to eml format string, etc. ...
...sage content to eml format string, etc. ...
...sumer, in nsIMsgWindow aMsgWindow, in nsIUrlListener aUrlListener, in string aCharsetOverride, out nsIURI aURL); void openAttachment(in string aContentType, in string aFileName, in string aUrl, in string aMessageUri, in nsISupports aDisplayConsumer, in nsIMsgWindow aMsgWindow, in nsIUrlListener aUrlListener); void SaveMessageToDisk(in string aMessageURI, in nsIFileSpec aFile, in
boolean aGenerateDummyEnvelope, in nsIUrlListener aUrlListener, out nsIURI aURL, in
boolean canonicalLineEnding, in nsIMsgWindow aMsgWindow); void GetUrlForUri(in string aMessageURI, out nsIURI aURL, in nsIMsgWindow aMsgWindow); void DisplayMessageForPrinting(in string aMessageURI, in nsISupports aDisplayConsumer, in nsIMsgWindow aMsgWindow, in nsIUrlListener aUrlListener, out nsIURI aU...
...And 7 more matches
nsIPrincipal
pal is comprised of an URL scheme, host, and port. Inherits from: nsISerializable Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) For details on principals, how they work, and how to get the appropriate one, see Security check basics. ...
...priate one, see Security check basics. ...
...oidPtr annotation); Native code only! void enableCapability(in string capability, inout voidPtr annotation); Native code only!
boolean equals(in nsIPrincipal other); JSPrincipals getJSPrincipals(in JSContext cx); Native code only! void getPreferences(out string prefBranch, out string id, out string subjectName, out string grantedList, out string deniedList, out
boolean isTrusted);
boolean isCapabilityEnabled(in string capability, in voidPtr annotation); Native code only! void revertCapability(in string capability, inout voidPtr annotation); Native code only! ...
...And 7 more matches
nsISupportsArray
xpcom/ds/nsISupportsArray.idlScriptable Please add a summary to this article. ...
...from: nsICollection Last changed in Gecko 1.7 Method overview
boolean AppendElements(in nsISupportsArray aElements); Violates the XPCOM interface guidelines nsISupportsArray clone(); void Compact(); void DeleteElementAt(in unsigned long aIndex); void DeleteLastElement(in nsISupports aElement); nsISupports ElementAt(in unsigned long aIndex); Violates the XPCOM interface guidelines
boolean EnumerateBackwards(in nsISupportsArrayEnumFunc aFunc, in voidPtr aData); Violates the XPCOM interface guidelines
boolean EnumerateForwards(in nsISupportsArrayEnumFunc aFunc, in voidPtr aData); Violates the XPCOM interface guidelines
boolean Equals([const] in nsISupportsArray other); Violates the XPCOM interface guidelines long GetIndexOf(in nsISupports aPossibleElement); long GetIndexOfSt...
...ssibleElement); long GetIndexOfStartingAt(in nsISupports aPossibleElement, in unsigned long aStartIndex); long GetLastIndexOf(in nsISupports aPossibleElement); long IndexOf([const] in nsISupports aPossibleElement); Violates the XPCOM interface guidelines long IndexOfStartingAt([const] in nsISupports aPossibleElement, in unsigned long aStartIndex); Violates the XPCOM interface guidelines
boolean InsertElementAt(in nsISupports aElement, in unsigned long aIndex); Violates the XPCOM interface guidelines
boolean InsertElementsAt(in nsISupportsArray aOther, in unsigned long aIndex); Violates the XPCOM interface guidelines long LastIndexOf([const] in nsISupports aPossibleElement); Violates the XPCOM interface guidelines
boolean MoveElement(in long aFrom, in long aTo); Violates the XPCOM ...
...And 7 more matches
nsIZipWriter
t to add the directory entries explicitly first. Implemented by: @mozilla.org/zipwriter;1. ...
...ate an instance, use: var zipWriter = Components.classes["@mozilla.org/zipwriter;1"] .createInstance(Components.interfaces.nsIZipWriter); Method overview void addEntryChannel(in AUTF8String aZipEntry, in PRTime aModTime, in PRInt32 aCompression, in nsIChannel aChannel, in
boolean aQueue); void addEntryDirectory(in AUTF8String aZipEntry, in PRTime aModTime, in
boolean aQueue); void addEntryFile(in AUTF8String aZipEntry, in PRInt32 aCompression, in nsIFile aFile, in
boolean aQueue); void addEntryStream(in AUTF8String aZipEntry, in PRTime aModTime, in PRInt32 aCompression, in nsIInputStream aStream, in
boolean aQueue); void close(); nsIZipEntry getEntry(in AUTF8String aZipEntry);
boolean hasEntry(in AUTF8String aZipEn...
...Int32 aCompression, in nsIInputStream aStream, in
boolean aQueue); void close(); nsIZipEntry getEntry(in AUTF8String aZipEntry);
boolean hasEntry(in AUTF8String aZipEntry); void open(in nsIFile aFile, in PRInt32 aIoFlags); void processQueue(in nsIRequestObserver aObserver, in nsISupports aContext); void removeEntry(in AUTF8String aZipEntry, in
boolean aQueue); Attributes Attribute Type Description comment ACString Gets or sets the comment associated with the currently open Zip file. Exceptions thrown NS_ERROR_NOT_INITIALIZED If no zip file has been opened. file nsIFile The Zip file being written to. Read only. ...
...And 7 more matches
Using the Multiple Accounts API
"keys" such as "identity1,identity2". ...
...of the server Preference: mail.server.server.username - user login name Preference: mail.server.server.password - user login password Preference: mail.server.server.check_new_mail -
boolean, should we check for new mail on a regular basis? Preference: mail.server.server.check_time - integer, number of minutes between checks for new mail Preference: mail.server.server.remember_password -
boolean, should we remember the password? Preference: mail.server.server.download_on_biff. -
boolean, Should we download new messags on biff (true) or just alert user that there is new mail (false) Preference: mail.server.server.directory - local platform-specific path to store messages and folder indexes Preference: mail.server.server.name - User-visible name of server The following are specif...
... just alert user that there is new mail (false) Preference: mail.server.server.directory - local platform-specific path to store messages and folder indexes Preference: mail.server.server.name - User-visible name of server The following are specific to IMAP: Preference: mail.server.server.admin_url - administration URL for server Preference: mail.server.server.using_subscription -
boolean, should we use subscriptions? (i.e. use LSUB instead of LIST) Preference: mail.server.server.cleanup_inbox_on_exit -
boolean, should we purge the inbox when we quit? Preference: mail.server.server.dual_use_folders -
boolean - can folders contain both folders and messages? Preference: mail.server.server.empty_trash_on_exit
boolean, (should not be imap-specific) - should we empty this serve...
...And 7 more matches
WebIDL bindings
call C++ methods with the same name and different signatures. ...
...value if the argument was not in fact passed in. Variadic WebIDL arguments are treated as a const Sequence<>& around the actual argument type. Here's a table, see the specific sections below for more details and explanations. ...
...; will correspond to these C++ function declarations: void MyAttr(JSContext* cx, JS::MutableHandle<JS::Value> retval); void SetMyAttr(JSContext* cx, JS::Handle<JS::Value> value); void MyMethod(JSContext* cx, JS::Handle<JS::Value> arg1, const Sequence<JS::Value>& arg2, const Optional<JS::Handle<JS::Value> >& arg3, JS::MutableHandle<JS::Value> retval);
boolean The
boolean WebIDL type is represented as a C++ bool. For example, this WebIDL: interface Test { attribute
boolean myAttr;
boolean myMethod(optional
boolean arg); }; will correspond to these C++ function declarations: bool MyAttr(); void SetMyAttr(bool value); JS::Value MyMethod(const Optional<bool>& arg); Integer types Integer WebIDL types are mapped to the corresponding C99 stdint ...
...And 7 more matches
JavaScript data types and data structures - JavaScript
erever possible, comparisons with other languages are drawn. Dynamic typing JavaScript is a loosely typed and dynamic language. ...
...Special primitive type having additional usage for its value: if object is not inherited, then null is shown; Object : typeof instance === "object". Special no...
...ssigned (and re-assigned) values of all types: let foo = 42; // foo is now a number foo = 'bar'; // foo is now a string foo = true; // foo is now a
boolean Data and Structure types The latest ECMAScript standard defines nine types: Six Data Types that are primitives, checked by typeof operator: undefined : typeof instance === "undefined"
Boolean : typeof instance === "
boolean" Number : typeof instance === "number" String : typeof instance === "string" BigInt : typeof instance === "bigint" Symbol : typeof instance === "symbol" null : typeof instance === "object". Special primitive type having additional usage for its value: if object is not inherited, then null is shown; Object : typeof instance === "object". Special non-data but structural type for ...
...And 7 more matches
Inline options - Archive of obsolete content
vailable in Firefox on the desktop as well. Options file The XUL allowed for the inline options is limited to a few new tags. Here is an example of an options.xul file: <?xml version="1.0"?> <!DOCTYPE mydialog SYSTEM "chrome://myaddon/locale/mydialog.dtd"> <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <setting type="bool" pref="extensions.myaddon.bool" title="
Boolean" desc="Stored as a
boolean preference" /> </vbox> Note that it's limited to <setting> tags. The root <vbox> just acts as a container, it isn't merged into the main window. If you need script support, see the display notifications section. Setting types There are several types of <setting>s, each with a different type attribute: type attribute displayed as preference stored as ...
...reference" /> </vbox> Note that it's limited to <setting> tags. The root <vbox> just acts as a container, it isn't merged into the main window. If you need script support, see the display notifications section. ...
...ol button no pref stored The pref attribute should have the full name of the preference to be stored. The title attribute is used as a label for the controls. To set a description, either use the desc attribute, or a text node as a child of the <setting> tag. Settings are tied to actual preferences, except the button setting, which is designed more for actions. ...
...And 6 more matches
preference - Archive of obsolete content
y, inverted, name, onchange, readonly, tabindex, type Properties defaultValue, disabled, hasUserValue, inverted, locked, name, preferences, readOnly, tabIndex, type, value, valueFromPreferences Methods reset Examples <preferences> <preference id="pref_id" name="preference.name" type="int"/> </preferences> See Preferences System for a complete example. Attributes disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...orm controls. Using it with an anchor tag (an <a> link) will have no effect. The element will, however, still respond to mouse events. To enable the element, leave this attribute out entirely. Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. instantApply Type:
boolean If true, the preference will be changed as soon as the user interface is modified. inverted Type:
boolean For
boolean preferences, if this attribute is set to true, it indicates that the value of the preference is the reverse of the user interface element attached to it. For instance, checking the checkbox disables the preference instead of enabling it. name Type: string The na...
...However, the value may still be modified by a script. tabindex Type: integer The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "tab" key. Elements with a higher tabindex are later in the tab sequence. type Type: one of the values below The preferenc...
...And 6 more matches
tab - Archive of obsolete content
Properties accessKey, accessibleType, command, control, crop, disabled, image, label, linkedPanel, selected, tabIndex, value Examples (example needed) Attributes accesskey Type: character 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 attribute for the element. afterselected Type:
boolean This is set to true if the tab is immediately after the currently selected tab. This is automatically set when needed and you shouldn't adjust it manually. This is primarily useful for themes so that they can adjust the appearance of the area around the selected tab. beforeselected Type:
boolean This is set to true if the tab is immediately before the currently selected tab. This is set...
...d. If you wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. For example, for a menuitem in a menu you can add the following CSS rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...ly for form controls. Using it with an anchor tag (an <a> link) will have no effect. The element will, however, still respond to mouse events. To enable the element, leave this attribute out entirely. Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. fadein Type:
boolean This attribute is set to true if the tab is fading in or out. This typically means that the tab is in the process of appearing or disappearing. first-tab Type:
boolean This attribute will be set to true for the first tab. This attribute should not be set manually, but is useful in a theme if the first tab should be styled differently. image Type: URI The URI of the image to a...
...And 6 more matches
Index
JSAPI Cookbook SpiderMonkey This article shows the JSAPI equivalent for a tiny handful of common JavaScript idioms. 16 JSAPI User Guide JSAPI, SpiderMonkey This document explains how to embed SpiderMonkey, the Mozilla JavaScript engine, in your C++ program. 17 JSAPI reference NeedsContent, SpiderMonkey JS::DeflateStringToUTF8Buffer 18
BOOLEAN_TO_JSVAL JSAPI Reference, Obsolete, SpiderMonkey
BOOLEAN_TO_JSVAL converts a bool argument, b, to a
boolean jsval. 19 DOUBLE_TO_JSVAL JSAPI Reference, Obsolete, SpiderMonkey DOUBLE_TO_JSVAL is the inverse of JS::ToNumber. 20 INT_FITS_IN_JSVAL JSAPI Reference, Obsolete, SpiderMonkey Determines if a specified C integer value, i, lies within the ra...
...piderMonkey JS::AutoValueArray<N> holds a rooted array of JS::Value. This is typically used for local variables being passed to function which requires JS::HandleValueArray or a pointer to JS::Value array. 26 JS::AutoVectorRooter JSAPI Reference, Reference, Reference(2), SpiderMonkey JS::AutoVectorRooter<T> holds a variable-size rooted array of type T. 27 JS::
BooleanValue JSAPI Reference, Reference, Reference(2), SpiderMonkey JS::
BooleanValue converts a C
boolean of type bool to JS::Value, the type of JavaScript values. 28 JS::Call JSAPI Reference, Reference, SpiderMonkey JS::Call calls a specified function, fun, on an object, thisObj. In terms of function execution, the object is treated as this. 29 JS::CallArgs ...
...es for use: 70 JS::StringValue JSAPI Reference, Reference, Reference(2), SpiderMonkey JS::StringValue converts a given JSString to JS::Value. The conversion always succeeds. 71 JS::SymbolValue JSAPI Reference, Reference, Reference(2), SpiderMonkey JS::SymbolValue converts a given JS::Symbol to JS::Value. The conversion always succeeds. 72 JS::To
Boolean JSAPI Reference, SpiderMonkey JS::To
Boolean converts a JavaScript value to a
boolean. It implements the To
Boolean operation described in ECMA 262 ?7.1.2.This function can not fail and the return value is always the
boolean conversion of the argument. 73 JS::ToInt32 JSAPI Reference, Reference, Reference(2), SpiderMonkey JS::ToInt32 converts a JavaScript value to a si...
...And 6 more matches
JS::Value
JS::Value is the type of JavaScript values in the JSAPI. A C++ variable of type JS::Value represents a value in JavaScript: a string, number, object (including arrays and functions),
boolean, symbol, null, or undefined. JS::Value is a class whose internal structure is an implementation detail. Embeddings should not rely on observed representation details or upon the size of JS::Value. ...
... rely on observed representation details or upon the size of JS::Value. ...
... representation details or upon the size of JS::Value. ...
...And 6 more matches
nsIContentViewer
xpcom] nsIDocumentPtr getDocument(); void hide(); void init(in nsIWidgetPtr aParentWidget, [const] in nsIntRectRef aBounds); Native code only! void loadComplete(in unsigned long aStatus); void loadStart(in nsISupports aDoc); void move(in long aX, in long aY); void open(in nsISupports aState, in nsISHEntry aSHEntry); void pageHide(in
boolean isUnload);
boolean permitUnload([optional] in
boolean aCallerClosesWindow);
boolean requestWindowClose(); void resetCloseWindow(); void setBounds([const] in nsIntRectRef aBounds); Native code only! void setDocumentInternal(in nsIDocumentPtr aDocument, in
boolean aForceReuseInnerWindow); Native code only! [noscript,notxpcom,nostdcall] void s...
...
boolean requestWindowClose(); void resetCloseWindow(); void setBounds([const] in nsIntRectRef aBounds); Native code only! void setDocumentInternal(in nsIDocumentPtr aDocument, in
boolean aForceReuseInnerWindow); Native code only! ...
... presContext nsPresContextPtr Read only. ...
...And 6 more matches
nsIDBFolderInfo
derInfo = Components.classes["@mozilla.org/????????????????????????????"] .createInstance(Components.interfaces.nsIDBFolderInfo); Method overview long AndFlags(in long flags); void ChangeExpungedBytes(in long delta); void ChangeNumMessages(in long delta); void ChangeNumUnreadMessages(in long delta);
boolean get
BooleanProperty(in string propertyName, in
boolean defaultValue); void getCharacterSet(out ACString charSet, out
boolean overriden); void getCharacterSetOverride(out
boolean characterSetOverride); Obsolete since Gecko 1.8 string getCharPtrCharacterSet(); string getCharPtrProperty(in string propertyName); void getLo...
...ve code only! ...
... AString getProperty(in string propertyName); nsIDBFolderInfo GetTransferInfo(); unsigned long getUint32Property(in string propertyName, in unsigned long defaultValue); void initFromTransferInfo(in nsIDBFolderInfo transferInfo); long OrFlags(in long flags); void set
BooleanProperty(in string propertyName, in
boolean aPropertyValue); void setCharacterSet(in string charSet); void setCharacterSetOverride(in
boolean characterSetOverride); Obsolete since Gecko 1.8 void setCharPtrProperty(in string aPropertyName, in string aPropertyValue); void SetHighWater(in nsMsgKey highwater, in
boolean force); void setLocale(in nsString locale); N...
...And 6 more matches
nsIDOMNSHTMLDocument
dom/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. ...
...HTMLDocument.idlScriptable This interface defines methods and properties supported by Gecko on the document object that are not part of DOM Level 2. ...
...nes methods and properties supported by Gecko on the document object that are not part of DOM Level 2. ...
...And 6 more matches
nsIDOMSimpleGestureEvent
ent 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. ...
...he 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. ...
...en they are not handled by the application. Consumers should use event.preventDefault() to prevent default behavior when consuming events. Method overview void initSimpleGestureEvent(in DOMString typeArg, in
boolean canBubbleArg, in
boolean cancelableArg, in nsIDOMAbstractView viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in
boolean ctrlKeyArg, in
boolean altKeyArg, in
boolean shiftKeyArg, in
boolean metaKeyArg, in unsigned short buttonArg, in nsIDOMEventTarget relatedTargetArg, in unsigned long directionArg, in double deltaArg); Attributes Attribute Type Description delta double The delta value indicating how far the gesture moved. For update events, this indicates the movement sin...
...And 6 more matches
nsIEditorSpellCheck
nged in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) Implemented by: @mozilla.org/editor/editorspellchecker;1. ...
...ed by: @mozilla.org/editor/editorspellchecker;1. ...
... instance, use: var editorSpellCheck = Components.classes["@mozilla.org/editor/editorspellchecker;1"] .createInstance(Components.interfaces.nsIEditorSpellCheck); Method overview void AddWordToDictionary(in wstring word);
boolean canSpellCheck(); void checkCurrentDictionary();
boolean CheckCurrentWord(in wstring suggestedWord);
boolean CheckCurrentWordNoSuggest(in wstring suggestedWord); AString GetCurrentDictionary(); void GetDictionaryList([array, size_is(count)] out wstring dictionaryList, out PRUint32 count); wstring GetNextMisspelledWord(); void GetPersonalDictionary(); wstring GetPersonalDictionaryWord(); wstring GetSuggestedWord(); void IgnoreWordAllOccurren...
...And 6 more matches
nsIMsgIdentity
identity.<id>.replyTo. Inherits from: nsISupports Method overview void clearAllValues(); void copy(in nsIMsgIdentity identity); AString getUnicharAttribute(in string name); void setUnicharAttribute(in string name, in AString value); ACString getCharAttribute(in string name); void setCharAttribute(in string name, in ACString value);
boolean getBoolAttribute(in string name); void setBoolAttribute(in string name, in
boolean value); long getIntAttribute(in string name); void setIntAttribute(in string name, in long value); AString toString(); Attributes Attribute Type Description identityName AString fullName AString User's full name, i.e. John Do...
...(); Attributes Attribute Type Description identityName AString fullName AString User's full name, i.e. John Doe email AString User's e-mail address, i.e. john@doe.com replyTo AString Optional replyTo address, i.e. johnNOSPAM@doe.com organization AString Optional organization composeHtml
boolean Should we compose with HTML by default? attachSignature
boolean Should we attach a signature by default? attachVCard
boolean Should we attach a vCard by default? autoQuote
boolean Should we automatically quote the original message? replyOnTop long Should replies appear above or below the quoted message. (1 - replies appear above the q...
... Should we attach a signature by default? attachVCard
boolean Should we attach a vCard by default? autoQuote
boolean Should we automatically quote the original message? replyOnTop long Should replies appear above or below the quoted message. (1 - replies appear above the quoted message. 0 - replies appear below the quoted message. sigBottom
boolean What should our signature be at the end of the quoted text when replying above it? signature nsILocalFile The file containing the current signature. signatureDate long escapedVCard AString doFcc
boolean fccFolder AString fccFolderPickerMode AString fccReplyFollowsParent
boolean ...
...And 6 more matches
nsITransactionListener
hod overview void didBeginBatch(in nsITransactionManager aManager, in nsresult aResult); void didDo(in nsITransactionManager aManager, in nsITransaction aTransaction, in nsresult aDoResult); void didEndBatch(in nsITransactionManager aManager, in nsresult aResult); void didMerge(in nsITransactionManager aManager, in nsITransaction aTopTransaction, in nsITransaction aTransactionToMerge, in
boolean aDidMerge, in nsresult aMergeResult); void didRedo(in nsITransactionManager aManager, in nsITransaction aTransaction, in nsresult aRedoResult); void didUndo(in nsITransactionManager aManager, in nsITransaction aTransaction, in nsresult aUndoResult);
boolean willBeginBatch(in nsITransactionManager aManager);
boolean willDo(in nsITransactionManager aManager, in nsITransaction aTransaction);...
...idMerge, in nsresult aMergeResult); void didRedo(in nsITransactionManager aManager, in nsITransaction aTransaction, in nsresult aRedoResult); void didUndo(in nsITransactionManager aManager, in nsITransaction aTransaction, in nsresult aUndoResult);
boolean willBeginBatch(in nsITransactionManager aManager);
boolean willDo(in nsITransactionManager aManager, in nsITransaction aTransaction);
boolean willEndBatch(in nsITransactionManager aManager);
boolean willMerge(in nsITransactionManager aManager, in nsITransaction aTopTransaction, in nsITransaction aTransactionToMerge);
boolean willRedo(in nsITransactionManager aManager, in nsITransaction aTransaction);
boolean willUndo(in nsITransactionManager aManager, in nsITransaction aTransaction); Methods didBeginBatch() Called after a nsIT...
...meters aManager The nsITransactionManager ending a batch. aResult The nsresult returned after ending a batch. didMerge() Called after a nsITransactionManager tries to merge a transaction, that was just executed, with the transaction at the top of the undo stack. void didMerge( in nsITransactionManager aManager, in nsITransaction aTopTransaction, in nsITransaction aTransactionToMerge, in
boolean aDidMerge, in nsresult aMergeResult ); Parameters aManager The nsITransactionManager ending a batch. aTopTransaction The transaction at the top of the undo stack. aTransactionToMerge The transaction to merge. aDidMerge true if transaction was merged, else false. aMergeResult The nsresult returned after the merge attempt. didRedo() Called after a nsITransactionManager calls the nsITransaction...
...And 6 more matches
HTMLMediaElement - Web APIs
or="middle" alignment-baseline="middle">HTMLMediaElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties This interface also inherits properties from its ancestors HTMLElement, Element, Node, and EventTarget. HTMLMediaElement.audioTracks A AudioTrackList that lists the AudioTrack objects contained in the element. HTMLMediaElement.autoplay A
Boolean that reflects the autoplay HTML attribute, indicating whether playback should automatically begin as soon as enough media is available to do so without interruption. Note: Automatically playing audio when the user doesn't expect or desire it is a poor user experience and should be avoided in most cases, though there are exceptions. See the Autoplay guide for media and Web Audio APIs for more in...
...oplay working. HTMLMediaElement.buffered Read only Returns a TimeRanges object that indicates the ranges of the media source that the browser has buffered (if any) at the moment the buffered property is accessed. HTMLMediaElement.controller Is a MediaController object that represents the media controller assigned to the element, or null if none is assigned. HTMLMediaElement.controls Is a
Boolean that reflects the controls HTML attribute, indicating whether user interface 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: nodownlo...
...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. Setting this value seeks the media to the new time. The time is specified relative to the media's timeline. ...
...And 6 more matches
ValidityState - Web APIs
The ValidityState interface represents the validity states that an element can be in, with respect to constraint validation. Together, they help explain why an element's value fails to validate, if it's not valid. Properties For each of these
Boolean properties, a value of true indicates that the specified reason validation may have failed is true, with the exception of the valid property, which is true if the element's value obeys all constraints. ...
... in, with respect to constraint validation. Together, they help explain why an element's value fails to validate, if it's not valid. Properties For each of these
Boolean properties, a value of true indicates that the specified reason validation may have failed is true, with the exception of the valid property, which is true if the element's value obeys all constraints. badInput Read only A
Boolean that is true if the user has provided input that the browser is unable to convert. customError Read only A
Boolean indicating whether the element's custom validity message has been set to a non-empty string by calling the element's setCustomValidity() method. patternMismatch Read only A
Boolean that is true if the value does not match the specified pattern, and false if it does match. If tr...
... customError Read only A
Boolean indicating whether the element's custom validity message has been set to a non-empty string by calling the element's setCustomValidity() method. patternMismatch Read only A
Boolean that is true if the value does not match the specified pattern, and false if it does match. If true, the element matches the :invalid CSS pseudo-class. rangeOverflow Read only A
Boolean that is true if the value is greater than the maximum specified by the max attribute, or false if it is less than or equal to the maximum. If true, the element matches the :invalid and :out-of-range and CSS pseudo-classes. ...
...And 6 more matches
JavaScript Daemons Management - Archive of obsolete content
use = function () { clearInterval(this.SESSION); this.PAUSED = true; }; /* SYSTEM NOT REQUIRED Daemon instances methods */ /** * Basic user interface. You could remove this method, but your daemon will be virtually unusable. * All other optional instances methods depend on this one or on the previous ones. ...
... this.BACKW; }; Daemon.prototype.getPosition = function () { return this.INDEX; }; /* Instantaneous movement (synchronous). ...
...be called the callback function. It can be an object or null. If is null, the this object will point to the global Daemon.context object (see below). callback The function which will be invoked repeatedly. It will be called with three parameters: index (the iterative index of each invocation), length (the number of total invocations assigned to the daemon - finite or Infinity), and backwards (a
boolean expressing whether the process is going backwards or not). It will be something like callback.call(thisObject, index, length, backwards). If the callback function returns a false value, the daemon will be paused. rate Optional The time lapse (in number of milliseconds) between each invocation. The default value is 100. length Optional The total number of invocations. It can be a positive inte...
...And 5 more matches
XUL element attributes - Archive of obsolete content
s. center The elements are centered horizontally. right The elements are aligned on their right edges. The pack attribute is related to the alignment but is used to specify the position in the opposite direction. You can also specify the value of align using the style property -moz-box-align. allowevents Type:
boolean If true, events are passed to children of the element. Otherwise, events are passed to the element only. allownegativeassertions Type:
boolean Valid on any element that has a datasources attribute. When multiple datasources are used, one may override an assertion from another. This attribute, if true, which is the default, allows a datasource to negate an earlier assertion. ...
...an Valid on any element that has a datasources attribute. When multiple datasources are used, one may override an assertion from another. This attribute, if true, which is the default, allows a datasource to negate an earlier assertion. class Type: string The style class of the element. Multiple classes may be specified by separating them with spaces. coalesceduplicatearcs Type:
boolean Valid on any element that has a datasources attribute. When multiple datasources are used, one may override an assertion from another. This attribute, if true, which is the default, allows a datasource to negate an earlier assertion. collapsed Type:
boolean If true, then the element is collapsed and does not appear. It is equivalent to setting the CSS visibility property to collapse. ...
...This would be used for folders. ...
...And 5 more matches
menulist - Archive of obsolete content
u wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. ...
...If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. ...
...for form controls. Using it with an anchor tag (an <a> link) will have no effect. The element will, however, still respond to mouse events. To enable the element, leave this attribute out entirely. Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. editable Type:
boolean Indicates that the value of the menulist can be modified by typing directly into the value field. This is rendered as a textbox with a drop-down arrow beside it. The user may enter text into the textbox or select one of the choices by clicking from the drop-down. focused Type:
boolean This attribute is true if the element is focused. image Type: URI The URI of the image to appe...
...And 5 more matches
inIDOMUtils
nterfaces.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); 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 getParentForN...
... 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 aSelectorIndex); unsigned long long getSpecificity(in nsIDOMCSSStyleRule aRule, in...
...(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); bool selectorMatchesEleme...
...And 5 more matches
mozIStorageConnection
: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) For a general overview on how to use this interface, see Storage. ...
...eStatement(in AUTF8String aSQLStatement); void createTable(in string aTableName, in string aTableSchema); mozIStoragePendingStatement executeAsync([array, size_is(aNumStatements)] in mozIStorageBaseStatement aStatements, in unsigned long aNumStatements, [optional] in mozIStorageStatementCallback aCallback ); void executeSimpleSQL(in AUTF8String aSQLStatement);
boolean indexExists(in AUTF8String aIndexName); void preload(); Obsolete since Gecko 1.9 void removeFunction(in AUTF8String aFunctionName); mozIStorageProgressHandler removeProgressHandler(); void rollbackTransaction(); void setGrowthIncrement(in PRInt32 aIncrement, in AUTF8String aDatabaseName); mozIStorageProgressHandler setProgressHandler(in PRI...
...This will be false if the connection failed to open, or it has been closed. Read only. databaseFile nsIFile The current database nsIFile. null if the database connection refers to an in-memo...
...And 5 more matches
nsIEditor
cko 1.0 Inherits from: nsISupports Last changed in Gecko 18.0 (Firefox 18.0 / Thunderbird 18.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...
...election(in short action, in short stripWrappers); Document Info and File Methods void resetModificationCount(); long getModificationCount(); void incrementModificationCount(in long aModCount); void incrementModificationCount(in long aModCount); Transaction Methods void doTransaction(in nsITransaction txn); void enableUndo(in
boolean enable); void undo(in unsigned long count); void canUndo(out
boolean isEnabled, out
boolean canUndo); void redo(in unsigned long count); void canRedo(out
boolean isEnabled, out
boolean canRedo); void beginTransaction(); void endTransaction(); void beginPlaceHolderTransaction(in nsIAtom name); void endPlaceHolderTransaction();...
... void undo(in unsigned long count); void canUndo(out
boolean isEnabled, out
boolean canUndo); void redo(in unsigned long count); void canRedo(out
boolean isEnabled, out
boolean canRedo); void beginTransaction(); void endTransaction(); void beginPlaceHolderTransaction(in nsIAtom name); void endPlaceHolderTransaction();
boolean shouldTxnSetSelection(); void setShouldTxnSetSelection(in
boolean should); Inline Spellchecking Methods nsIInlineSpellChecker getInlineSpellChecker(in
boolean autoCreate); void syncRealTimeSpell(); void setSpellcheckUserOverride(in
boolean enable); Clipboard Methods void cut();
boolean canCut(); void copy(); ...
...And 5 more matches
nsIFrameLoader
frame. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Note: This interface works in tandem with the nsIContentView interface to manage frames across processes if Electrolysis is in use to support per-frame processes. ...
...trolysis is in use to support per-frame processes. ...
...This can be used to decide what operations may or may not be allowed on the ...
...And 5 more matches
nsINavBookmarksService
efox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11) Implemented by: @mozilla.org/browser/nav-bookmarks-service;1. ...
...amed from getBookmarkFolders in Gecko 1.9 void getBookmarkIdsForURITArray(in nsIURI aURI, in PRInt64Array aResult); Native code only! ...
...ko 1.9 PRInt32 indexOfItem(in PRInt64 folder, in nsIURI uri); Obsolete since Gecko 1.9 long long insertBookmark(in long long aParentId, in nsIURI aURI, in long aIndex, in AUTF8String aTitle); void insertItem(in PRInt64 folder, in nsIURI item, in PRInt32 index); Obsolete since Gecko 1.9 long long insertSeparator(in long long aParentId, in long aIndex);
boolean isBookmarked(in nsIURI aURI); void moveFolder(in PRInt64 folder, in PRInt64 newParent, in PRInt32 index); Obsolete since Gecko 1.9 void moveItem(in long long aItemId, in long long aNewParentId, in long aIndex); void removeChildAt(in long long aFolder, in long aIndex); Obsolete since Gecko 2.0 void removeFolder(in long long aFolder); Obsolete since Gecko 2.0 ...
...And 5 more matches
nsISHEntry
od overview void addChildShell(in nsIDocShellTreeItem shell); nsIDocShellTreeItem childShellAt(in long index); void clearChildShells(); nsISHEntry clone(); void create(in nsIURI URI, in AString title, in nsIInputStream inputStream, in nsILayoutHistoryState layoutHistoryState, in nsISupports cacheKey, in ACString contentType, in nsISupports owner, in unsigned long long docshellID, in
boolean dynamicCreation); Native code only! nsDocShellEditorDataPtr forgetEditorData(); Violates the XPCOM interface guidelines nsIContentViewer getAnyContentViewer(out nsISHEntry ownerEntry); void getScrollPosition(out long x, out long y); void getViewerBounds(in nsIntRect bounds); Native code only!
boolean hasDetachedEditor(); Violates the XPCOM interface guidelines
boolean hasDynamical...
...Native code only! nsDocShellEditorDataPtr forgetEditorData(); Violates the XPCOM interface guidelines nsIContentViewer getAnyContentViewer(out nsISHEntry ownerEntry); void getScrollPosition(out long x, out long y); void getViewerBounds(in nsIntRect bounds); Native code only!
boolean hasDetachedEditor(); Violates the XPCOM interface guidelines
boolean hasDynamicallyAddedChild();
boolean isDynamicallyAdded(); void setEditorData(in nsDocShellEditorDataPtr aData); Violates the XPCOM interface guidelines void setIsSubFrame(in
boolean aFlag); void setScrollPosition(in long x, in long y); void setTitle(in AString aTitle); void setUniqueDocIdentifier(); void setURI(in nsIURI aURI); void setViewerBounds(in nsIntRect bounds); Native code only! void syncPresentationSta...
...e docshell if and only if the two entries are entries for the same document. In practice, two entries A and B will have the same docIdentifier if we arrived at B by clicking an anchor link in A or if B was created by A's calling history.pushState(). docshellID unsigned long long The history ID of the docshell. document nsIDOMDocument DOM Document. Obsolete since Gecko 1.8 expirationStatus
boolean Indicates whether the page is already expired in cache. ID unsigned long An ID to help identify this entry from others during subframe navigation. layoutHistoryState nsILayoutHistoryState LayoutHistoryState for scroll position and form values. loadType unsigned long The loadType for this entry. This is typically loadHistory except when reload is pressed, it has the appropriate reload flag. ...
...And 5 more matches
nsISHistoryListener
y listener is notified when pages are added to, removed from, and loaded from session history. The listener can prevent any action (except adding a new session history entry) from happening by returning false from the corresponding callback method. A session history listener can be registered on a particular nsISHistory instance via the nsISHistory.addSHistoryListener() method. ...
... removed from, and loaded from session history. The listener can prevent any action (except adding a new session history entry) from happening by returning false from the corresponding callback method. A session history listener can be registered on a particular nsISHistory instance via the nsISHistory.addSHistoryListener() method. ...
...istener can prevent any action (except adding a new session history entry) from happening by returning false from the corresponding callback method. A session history listener can be registered on a particular nsISHistory instance via the nsISHistory.addSHistoryListener() method. ...
...And 5 more matches
MediaTrackSupportedConstraints - Web APIs
rence between silently ignoring a constraint and a constraint being accepted. An actual constraint set is described using an object based on the MediaTrackConstraints dictionary. To learn more about how constraints work, see Capabilities, constraints, and settings. Properties Some combination--but not necessarily all--of the following properties will exist on the object. ...
...bed using an object based on the MediaTrackConstraints dictionary. To learn more about how constraints work, see Capabilities, constraints, and settings. Properties Some combination--but not necessarily all--of the following properties will exist on the object. autoGainControl A
Boolean whose value is true if the autoGainControl constraint is supported in the current environment. width A
Boolean value whose value is true if the width constraint is supported in the current environment. ...
...see Capabilities, constraints, and settings. Properties Some combination--but not necessarily all--of the following properties will exist on the object. autoGainControl A
Boolean whose value is true if the autoGainControl constraint is supported in the current environment. width A
Boolean value whose value is true if the width constraint is supported in the current environment. height A
Boolean value whose value is true if the height constraint is supported in the current environment. aspectRatio A
Boolean value whose value is true if the aspectRatio constraint is supported in the current environment. ...
...And 5 more matches
Logical OR (||) - JavaScript
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. ...
... 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. ...
... 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. ...
...And 5 more matches
Download Manager preferences - Archive of obsolete content
There are several preferences used by the Download Manager. This article provides a list of them. Preference Description browser.download.antivirus.dontclean Note: in Gecko 1.9.1. A
boolean value that indicates whether the anti virus software should try to clean a downloaded file when a virus is detected. Default value is false. browser.download.manager.addToRecentDocs A
boolean value that indicates whether or not new downloads should be added to the recent documents list. Default value is true. browser.download.manager.alertOnEXEOpen A
boolean value that indicates whether the UI Should alert the user about the dangers of opening (executing) an EXE. The user may check a "don't ask" box on the UI to toggle this. D...
... In Thunderbird the default value is true. In Other Applications the default value is false. ...
...n downloads are completed. In Thunderbird the default value is true. In Other Applications the default value is false. browser.download.manager.flashCount Indicates the number of times the appropriate user interface element should be "flashed" to get the user's attention when a download completes. Default value is 2. browser.download.manager.focusWhenStarting A
boolean value that indicates whether or not to focus the Download Manager window when a download begins. In Firefox,Thunderbird and SeaMonkey the default value is false. In Other Applications the default value is true. browser.download.manager.quitBehavior Indicates what should happen to in-progress downloads if the application is quit while they're ongoing. 0 indicates that the downl...
...And 4 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
uch as the children property. Table 2. Methods used to traverse the DOM Property/Method Description childNodes Returns an array of all child nodes of the element. firstChild Returns the first child node of the element. getAttribute( aAttributeName ) Returns the value for the specified attribute. hasAttribute( aAttributeName ) Returns a
boolean stating if the current node has an attribute defined with the specified name. hasChildNodes() Returns a
boolean stating whether the current node has any child nodes. lastChild Returns the last child node of the element. nextSibling Returns the node immediately following the current one. nodeName Returns the name of the current node as a string. ...
...ent(aEvent) { var myEvent = window.event ? window.event : aEvent; } </script> The properties and functions that the event object exposes are also often named differently in Mozilla and Internet Explorer, as Table 4 shows. Table 4. Event properties differences between Mozilla and Internet Explorer Internet Explorer Name Mozilla Name Description altKey altKey
Boolean property that returns whether the alt key was pressed during the event. cancelBubble stopPropagation() Used to stop the event from bubbling farther up the tree. clientX clientX The X coordinate of the event, in relation to the element viewport. clientY clientY The Y coordinate of the event, in relation to the element viewport. ctrlKey ctrlK...
...rty that returns whether the alt key was pressed during the event. cancelBubble stopPropagation() Used to stop the event from bubbling farther up the tree. clientX clientX The X coordinate of the event, in relation to the element viewport. clientY clientY The Y coordinate of the event, in relation to the element viewport. ctrlKey ctrlKey
Boolean property that returns whether the Ctrl key was pressed during the event. fromElement relatedTarget For mouse events, this is the element from which the mouse moved away. keyCode keyCode For keyboard events, this is a number representing the key that was pressed. It is 0 for mouse events. For keypress events (not keydown/keyup) of keys that produce output, the Mozilla...
...And 4 more matches
button - Archive of obsolete content
, dir, disabled, dlgType, group, image, label, open, orient, tabIndex, type Examples <button label="Press Me" oncommand="alert('You pressed me!');"/> Attributes accesskey Type: character 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 attribute for the element. autocheck Type:
boolean If this attribute is true or left out, the checked state of the button will be switched each time the button is pressed. If this attribute is false, the checked state must be adjusted manually. When autocheck is true, the button type should be "checkbox" or "radio". checkState Type: integer, values 0, 1, or 2 This attribute may be used to create three state buttons, numbered 0, 1 and 2.
...te which must be set manually by adjusting the check state. If you wish to have different behavior for how the states are adjusted, set the autoCheck attribute to false and adjust the state with a script. The type attribute must be set to checkbox for buttons with a check state. Constants for the possible values for this attribute are in the nsIDOMXULButtonElement interface. checked Type:
boolean Indicates whether the element is checked or not. Use hasAttribute() to determine whether this attribute is set instead of getAttribute(). For buttons, the type attribute must be set to checkbox or radio for this attribute to have any effect. command Type: id Set to the id of a command element that is being observed by the element. crop Type: one of the values belo...
...elements are placed left to right or top to bottom in the order they appear in the XUL code. reverse For scales, the scale's values are ordered from right to left (for horizontal scales) or from bottom to top (for vertical scales). For other elements, they are placed right to left or bottom to top. This is reverse of the order in which they appear in the XUL code. disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...And 4 more matches
timepicker - Archive of obsolete content
change event handlers. Attributes disabled, hideseconds, increment, readonly, tabindex, value Properties amIndicator, dateValue, disabled, hideSeconds, hour, hourLeadingZero, increment, is24HourClock, isPM, minute, minuteLeadingZero, pmIndicator, readOnly, second, secondLeadingZero, tabIndex, value Examples <timepicker value="12:05"/> Attributes disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...ls. Using it with an anchor tag (an <a> link) will have no effect. The element will, however, still respond to mouse events. To enable the element, leave this attribute out entirely. Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. hideseconds Type:
boolean Indicates whether to show the seconds field. readonly Type:
boolean If set to true, then the user cannot change the value of the element. However, the value may still be modified by a script. increment Type: integer Indicates the number of minutes to skip each time the arrows are pressed. This should be used in combination with setting hideseconds to true...
...picker in either the form HH:MM:SS or HH:MM. Properties amIndicator Type: string The string value displayed for hours between midnight and noon, defaulting to AM. This value is determined from the user's locale. dateValue Type: Date The date that is currently entered or selected in the datepicker as a Date object. ...
...And 4 more matches
toolbarbutton - Archive of obsolete content
lbarbutton accesskey="2" label="Radio 2" type="radio" group="RadioGroup"/> <toolbarbutton accesskey="3" label="Radio 3" type="radio" group="RadioGroup"/> </toolbar> Attributes accesskey Type: character 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 attribute for the element. autocheck Type:
boolean If this attribute is true or left out, the checked state of the button will be switched each time the button is pressed. If this attribute is false, the checked state must be adjusted manually. When autocheck is true, the button type should be "checkbox" or "radio". checkState Type: integer, values 0, 1, or 2 This attribute may be used to create three state buttons, numbered 0, 1 and 2. ...
...ate which must be set manually by adjusting the check state. If you wish to have different behavior for how the states are adjusted, set the autoCheck attribute to false and adjust the state with a script. The type attribute must be set to checkbox for buttons with a check state. Constants for the possible values for this attribute are in the nsIDOMXULButtonElement interface. checked Type:
boolean Indicates whether the element is checked or not. Use hasAttribute() to determine whether this attribute is set instead of getAttribute(). For buttons, the type attribute must be set to checkbox or radio for this attribute to have any effect. command Type: id Set to the id of a command element that is being observed by the element. crop Type: one of the values below ...
... elements are placed left to right or top to bottom in the order they appear in the XUL code. reverse For scales, the scale's values are ordered from right to left (for horizontal scales) or from bottom to top (for vertical scales). For other elements, they are placed right to left or bottom to top. This is reverse of the order in which they appear in the XUL code. disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...And 4 more matches
tree - Archive of obsolete content
If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...trols. Using it with an anchor tag (an <a> link) will have no effect. The element will, however, still respond to mouse events. To enable the element, leave this attribute out entirely. Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. disableKeyNavigation Type:
boolean If this attribute is not used, the user can navigate to specific items within the element by pressing keys corresponding to letters in the item's label. This is done incrementally, so typing more letters with select more specific items. This feature may be disabled by setting this attribute to true. editable Type:
boolean Indicates that the cells of the tree may be edited. enableCo...
...ute is not used, the user can navigate to specific items within the element by pressing keys corresponding to letters in the item's label. This is done incrementally, so typing more letters with select more specific items. This feature may be disabled by setting this attribute to true. editable Type:
boolean Indicates that the cells of the tree may be edited. enableColumnDrag Type:
boolean When set to true, the user may drag the column headers around to change the order in which they are displayed. flags Type: space-separated list of the values below A set of flags used for miscellaneous purposes. Two flags are defined, which may be the value of this attribute. dont-test-empty: For template generated content, the builder will not check that a container is empty. dont...
...And 4 more matches
window - Archive of obsolete content
activetitlebarcolor Type: color string Specify background color of the window's titlebar when it is active (foreground). Moreover this hides separator between titlebar and window contents. This only affects Mac OS X. chromemargin Type: margin string Controls the amount of chrome that should be visibl...
...ow, respectively. This value may be -1 to use the default margin for that side on the current platform, 0 to have no system border (that is, to extend the client area to the edge of the window), or a value greater than zero to indicate how much less than the default default width you wish the margin on that side to be. If this value turns out to be less than 0, 0 is used. ...
...used. disablechrome Type:
boolean Set this attribute to true to disable chrome in the window. This is used to hide chrome when showing in-browser UI such as the about:addons page, and causes the toolbars to be hidden, with only the tab strip (and, if currently displayed, the add-on bar) left showing. Note: This has no effect if the tabs on top preference is turned off. disablefastfindType:
booleanPut disablefastfind="true" on the root element of a XUL document, which is intended to be loaded in a tab, to disable the find bar for the tab with this document. This is used to prevent the find bar from being displayed when it's not supported by the content (such as in the Add-ons manager tab). ...
...And 4 more matches
AddonListener
be registered with addAddonListener() and will then receive notification of changes to the add-ons currently installed. These notifications come in the form of calls to methods on the listener object. A listener only needs to implement the methods corresponding to the events it cares about; missing methods will not cause any problems. ...
...ly installed. These notifications come in the form of calls to methods on the listener object. A listener only needs to implement the methods corresponding to the events it cares about; missing methods will not cause any problems. ...
...y needs to implement the methods corresponding to the events it cares about; missing methods will not cause any problems. Method Overview void onEnabling(in Addon addon, in
boolean needsRestart) void onEnabled(in Addon addon) void onDisabling(in Addon addon, in
boolean needsRestart) void onDisabled(in Addon addon) void onInstalling(in Addon addon, in
boolean needsRestart) void onInstalled(in Addon addon) void onUninstalling(in Addon addon, in
boolean needsRestart) void onUninstalled(in Addon addon) void onOperationCancelled(in Addon addon) void onPropertyChanged(in Addon addon, in string properties[]) Methods onEnabling() Called when an add-on is about to be enabled. void onEnabling( in Addon a...
...And 4 more matches
nsIAnnotationService
URI aURI, in AUTF8String aName, in nsIVariant aValue, in long aFlags, in unsigned short aExpiration); void setItemAnnotation(in long long aItemId, in AUTF8String aName, in nsIVariant aValue, in long aFlags, in unsigned short aExpiration); void setPageAnnotationString(in nsIURI aURI, in AUTF8String aName, in AString aValue, in long aFlags, in unsigned short aExpiration);
boolean setItemAnnotationString(in long long aItemId, in AUTF8String aName, in AString aValue, in long aFlags, in unsigned short aExpiration); void setPageAnnotationInt32(in nsIURI aURI, in AUTF8String aName, in long aValue, in long aFlags, in unsigned short aExpiration); void setItemAnnotationInt32(in long long aItemId, in AUTF8String aName, in long aValue, in long aFlags, in unsigned ...
...] out unsigned long resultCount, [retval, array, size_is(resultCount)] out long long results); void getPageAnnotationNames(in nsIURI aURI, [optional] out unsigned long count, [retval, array, size_is(count)] out nsIVariant result); void getItemAnnotationNames(in long long aItemId, [optional] out unsigned long count, [retval, array, size_is(count)] out nsIVariant result);
boolean pageHasAnnotation(in nsIURI aURI, in AUTF8String aName);
boolean itemHasAnnotation(in long long aItemId, in AUTF8String aName); void removePageAnnotation(in nsIURI aURI, in AUTF8String aName); void removeItemAnnotation(in long long aItemId, in AUTF8String aName); void removePageAnnotations(in nsIURI aURI); void removeItemAnnotations(in long long aItemI...
...nnotation(in long long aItemId, in AUTF8String aName); void removePageAnnotation(in nsIURI aURI, in AUTF8String aName); void removeItemAnnotation(in long long aItemId, in AUTF8String aName); void removePageAnnotations(in nsIURI aURI); void removeItemAnnotations(in long long aItemId); void copyPageAnnotations(in nsIURI aSourceURI, in nsIURI aDestURI, in
boolean aOverwriteDest); void copyItemAnnotations(in long long aSourceItemId, in long long aDestItemId, in
boolean aOverwriteDest); void addObserver(in nsIAnnotationObserver aObserver); void removeObserver(in nsIAnnotationObserver aObserver); nsIURI getAnnotationURI(in nsIURI aURI, in AUTF8String aName); Constants Constant Value Description ...
...And 4 more matches
nsIAppShellService
a.org/appshell/appShellService;1 as a service: var appShellService = Components.classes["@mozilla.org/appshell/appShellService;1"] .getService(Components.interfaces.nsIAppShellService); Method overview void closeTopLevelWindow(in nsIXULWindow aWindow); Obsolete since Gecko 1.8 void createHiddenWindow(in nsIAppShell aAppShell); Native code only! ...
...ng aWindowHeight); Obsolete since Gecko 1.8 nsIXULWindow createTopLevelWindow(in nsIXULWindow aParent, in nsIURI aUrl, in PRUint32 aChromeMask, in long aInitialWidth, in long aInitialHeight, in nsIAppShell aAppShell); nsIWebNav createWindowlessBrowser (in bool aIsChrome) void destroyHiddenWindow(); void doProfileStartup(in nsICmdLineService aCmdLineService, in
boolean canInteract); Obsolete since Gecko 1.8 void ensure1Window(in nsICmdLineService aCmdLineService); Obsolete since Gecko 1.8 void enterLastWindowClosingSurvivalArea(); Obsolete since Gecko 1.8 void exitLastWindowClosingSurvivalArea(); Obsolete since Gecko 1.8 void getHiddenWindowAndJSContext(out nsIDOMWindow aHiddenDOMWindow, out JSContext aJSContext); Native code...
...solete since Gecko 1.8 void initialize(in nsICmdLineService aCmdLineService, in nsISupports nativeAppSupportOrSplashScreen); Obsolete since Gecko 1.8 void quit(in PRUint32 aFerocity); Obsolete since Gecko 1.8 void registerTopLevelWindow(in nsIXULWindow aWindow); void run(); Obsolete since Gecko 1.8 void topLevelWindowIsModal(in nsIXULWindow aWindow, in
boolean aModal); Obsolete since Gecko 1.9.1 void unregisterTopLevelWindow(in nsIXULWindow aWindow); Note: Prior to Gecko 8.0, all references to nsIDOMWindow used in this interface were nsIDOMWindowInternal. Attributes Attribute Type Description applicationProvidedHiddenWindow
boolean Return true if the application hidden window was provided by the applica...
...And 4 more matches
nsIAutoCompleteInput
ete/public/nsIAutoCompleteInput.idlScriptable This interface monitors the input in a text field and displays an autocomplete panel at the appropriate time. ...
...able This interface monitors the input in a text field and displays an autocomplete panel at the appropriate time. ...
...String getSearchAt(in unsigned long index); void onSearchBegin(); void onSearchComplete();
boolean onTextEntered();
boolean onTextReverted(); void selectTextRange(in long startIndex, in long endIndex); Attributes Attribute Type Description completeDefaultIndex
boolean If a search result has its defaultIndex set, this will optionally try to complete the text in the textbox to the entire text of the result at the default index as the user types. This means that auto-fill is enabled. completeSelectedIndex
boolean If true, the text in the text field will be autocompleted as the user selects from the popup list. co...
...And 4 more matches
nsICookieManager2
.1 / Fennec 1.0) Inherits from: nsICookieManager This interface is included in The Services.jsm JavaScript code module. ...
...erits from: nsICookieManager This interface is included in The Services.jsm JavaScript code module. ...
...ager This interface is included in The Services.jsm JavaScript code module. ...
...And 4 more matches
nsIHttpChannel
org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var ch = ios.newChannel("https://www.example.com/", null, null); Method overview void getOriginalResponseHeader(in ACString aHeader, in nsIHttpHeaderVisitor aVisitor); ACString getRequestHeader(in ACString aHeader); ACString getResponseHeader(in ACString header);
boolean isNoCacheResponse();
boolean isNoStoreResponse(); void redirectTo(in nsIURI aNewURI); void setEmptyRequestHeader(in ACString aHeader); void setReferrerWithPolicy(in nsIURI referrer, in unsigned long referrerPolicy); void setRequestHeader(in ACString aHeader, in ACString aValue, in
boolean aMerge); void setResponseHeader(in ACString header, ...
...
boolean isNoStoreResponse(); void redirectTo(in nsIURI aNewURI); void setEmptyRequestHeader(in ACString aHeader); void setReferrerWithPolicy(in nsIURI referrer, in unsigned long referrerPolicy); void setRequestHeader(in ACString aHeader, in ACString aValue, in
boolean aMerge); void setResponseHeader(in ACString header, in ACString value, in
boolean merge); void visitOriginalResponseHeaders(in nsIHttpHeaderVisitor aVisitor); void visitRequestHeaders(in nsIHttpHeaderVisitor aVisitor); void visitResponseHeaders(in nsIHttpHeaderVisitor aVisitor); Constants Constant Description REFERRER_POLICY_NO_REFERRER_WHEN_DOWNGRADE Default; indicates not to pass on the referrer when downgrading fro...
...This should be set to false, for example, if the application knows that the corresponding document is likely to be very large. This attribute is true by default, though other factors may prevent pipelining. This attribute ma...
...And 4 more matches
nsIMimeConverter
The nsIMimeConverter service allows you to convert headers into and out of MIME format. Inherits from: nsISupports Implemented by: @mozilla.org/messenger/mimeconverter;1. ...
...imeConverter service allows you to convert headers into and out of MIME format. Inherits from: nsISupports Implemented by: @mozilla.org/messenger/mimeconverter;1. ...
... string encodeMIMEPartIIStr(in string header, in
boolean structured, in string mailCharset, in long fieldnamelen, in long encodedwordsize); string encodeMIMEPartIIStr_UTF8(in AUTF8String header, in
boolean structured, in string mailCharset, in long fieldnamelen, in long encodedwordsize); string decodeMimeHeaderToCharPtr(in string header, in string default_charset, in
boolean override_charset, in
boolean eatContinuations); AString decodeMimeHeader(in string header, in string default_charset, in
boolean override_charset, in
boolean eatContinuations); MimeEncoderData *B64EncoderInit(in MimeConverterOutputCallback output_fn, in void *closure); MimeEncoderData *QPEncoderInit(in MimeConverterOutputCallback output_fn, in void *closure); v...
...And 4 more matches
nsINavHistoryService
yService = Components.classes["@mozilla.org/browser/nav-history-service;1"] .getService(Components.interfaces.nsINavHistoryService); Method overview AString getPageTitle(in nsIURI aURI); void markPageAsFollowedBookmark(in nsIURI aURI); void markPageAsFollowedLink(in nsIURI aURI); void markPageAsTyped(in nsIURI aURI);
boolean canAddURI(in nsIURI aURI); long long addVisit(in nsIURI aURI, in PRTime aTime, in nsIURI aReferringURI, in long aTransitionType, in
boolean aIsRedirect, in long long aSessionID); Obsolete since Gecko 22.0 nsINavHistoryQuery getNewQuery(); nsINavHistoryQueryOptions getNewQueryOptions(); nsINavHistoryResult executeQuery(in nsINavHistoryQuery aQuery, in nsINavHist...
... AUTF8String aQueryString, [array, size_is(aResultCount)] out nsINavHistoryQuery aQueries, out unsigned long aResultCount, out nsINavHistoryQueryOptions options); AUTF8String queriesToQueryString([array, size_is(aQueryCount)] in nsINavHistoryQuery aQueries, in unsigned long aQueryCount, in nsINavHistoryQueryOptions options); void addObserver(in nsINavHistoryObserver observer, in
boolean ownsWeak); void removeObserver(in nsINavHistoryObserver observer); void runInBatchMode(in nsINavHistoryBatchCallback aCallback, in nsISupports aClosure); void importHistory(in nsIFile file); AString getCharsetForURI(in nsIURI aURI); AString setCharsetForURI(in nsIURI aURI, in AString aCharset); Attributes Attribute Type Descripti...
...currently, history is disabled if the br...
...And 4 more matches
nsIParentalControlsService
ft Windows Vista and newer as well as Android 4.3 and newer. Implemented by: @mozilla.org/parental-controls-service;1. ...
...y: @mozilla.org/parental-controls-service;1. ...
...onents.classes["@mozilla.org/parental-controls-service;1"] .createInstance(Components.interfaces.nsIParentalControlsService); Method overview void log(in short aEntryType, in
boolean aFlag, in nsIURI aSource, [optional] in nsIFile aTarget);
boolean requestURIOverride(in nsIURI aTarget, [optional] in nsIInterfaceRequestor aWindowContext);
boolean requestURIOverrides(in nsIArray aTargets, [optional] in nsIInterfaceRequestor aWindowContext); Attributes Attribute Type Description blockFileDownloadsEnabled
boolean true if the current user account's parental controls restrictions include the blocking of all file downloads. Read only. loggingEnabled
boolean true if the current user account ha...
...And 4 more matches
nsIProcess
eaMonkey 2.1) Implemented by: @mozilla.org/process/util;1. ...
... Method overview void init(in nsIFile executable); void initWithPid(in unsigned long pid); Obsolete since Gecko 1.9.2 void kill(); void run(in
boolean blocking, [array, size_is(count)] in string args, in unsigned long count); void runAsync([array, size_is(count)] in string args, in unsigned long count, [optional] in nsIObserver observer, [optional] in
boolean holdWeak); void runw(in
boolean blocking, [array, size_is(count)] in wstring args, in unsigned long count); void runwAsync([array, size_is(count)] in wstring args, in unsigned long count, [optional] in nsIObserver observer, [optional] in
boolean holdWeak); Attributes Attribute Type Description exitValue long The value returned by the proc...
...Only accurate if the process was run with blocking disabled. Read only. location nsIFile The location of the executable file on disk. Read only. ...
...And 4 more matches
nsISelection
instance, use: Implemented by: ????????????????????????????????????? ...
...Instance(Components.interfaces.nsISelection); Method overview void addRange(in nsIDOMRange range); void collapse(in nsIDOMNode parentNode, in long offset); [noscript,notxpcom,nostdcall]
boolean collapsed(); void collapseNative(in nsIDOMNode parentNode, in long offset); Native code only! 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! nsIDOMRange getRangeAt(in long index); void modify(in DOMString alter, in DOMString direction, in DOMString granularity); ...
...Read only. anchorOffset long The offset within the (text) node where the selection begins. Read only. focusNode nsIDOMNode Returns the node in which the selection ends. Read only. ...
...And 4 more matches
nsITelemetry
s Last changed in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) Implemented by: @mozilla.org/base/telemetry;1 as a service: let telemetry = Components.classes["@mozilla.org/base/telemetry;1"] .getService(Components.interfaces.nsITelemetry); Method overview jsval getHistogramById(in ACString id); jsval snapshotHistograms(in uint32_t aDataset, in
boolean aSubsession, in
boolean aClear); jsval getKeyedHistogramById(in ACString id); void captureStack(in ACString name); jsval snapshotCapturedStacks([optional] in
boolean clear); nsISupports getLoadedModules(); jsval snapshotKeyedHistograms(in uint32_t aDataset, in
boolean aSubsession, in
boolean aClear); void setHistogramRecordingEnabled(in ACStr...
...n, in
boolean aClear); jsval getKeyedHistogramById(in ACString id); void captureStack(in ACString name); jsval snapshotCapturedStacks([optional] in
boolean clear); nsISupports getLoadedModules(); jsval snapshotKeyedHistograms(in uint32_t aDataset, in
boolean aSubsession, in
boolean aClear); void setHistogramRecordingEnabled(in ACString id, in
boolean enabled); void asyncFetchTelemetryData(in nsIFetchTelemetryDataCallback aCallback); double msSinceProcessStart(); void scalarAdd(in ACString aName, in jsval aValue); void scalarSet(in ACString aName, in jsval aValue); void scalarSetMaximum(in ACString aName, in jsval aValue); jsval snapshotScalars(in uint32_t aDataset, [optional] in
boolean ...
...al snapshotScalars(in uint32_t aDataset, [optional] in
boolean aClear); void keyedScalarAdd(in ACString aName, in AString aKey, in jsval aValue); void keyedScalarSet(in ACString aName, in AString aKey, in jsval aValue); void keyedScalarSetMaximum(in ACString aName, in AString aKey, in jsval aValue); jsval snapshotKeyedScalars(in uint32_t aDataset, [optional] in
boolean aClear); void clearScalars(); test only void flushBatchedChildTelemetry(); void recordEvent(in ACString aCategory, in ACString aMethod, in ACString aObject, [optional] in jsval aValue, [optional] in jsval extra); void setEventRecordingEnabled(in ACString aCategory, in
boolean aEnabled); jsval snapshotEvents(in uint32_t aDataset, [optional] in
boolean a...
...And 4 more matches
nsIURI
Follows the IDNA draft specification for converting internationalized ...
...Follows the IDNA draft specification for converting internationalized domain names (UTF-8) to ASCII for compatib...
...Follows the IDNA draft specification for converting internationalized domain names (UTF-8) to ASCII for compatibility with existing Internet infrastructure. Read only. Note: IPv6 addresses are not enclosed in squa...
...And 4 more matches
nsIAbCard/Thunderbird3
ype CellularNumber, CellularNumberType JobTitle, Department, Company _AimScreenName Dates: AnniversaryYear, AnniversaryMonth, AnniversaryDay BirthYear, BirthMonth, BirthDay WebPage1 (work), WebPage2 (home) Custom1, Custom2, Custom3, Custom4 Notes Integral properties: LastModifiedDate PopularityIndex PreferMailFormat (see nsIAbPreferMailFormat)
Boolean properties: AllowRemoteContent Inherits from: nsIAbItem Method overview nsIVariant getProperty(in AUTF8String name, in nsIVariant defaultValue); [noscript] AString getPropertyAsAString(in string name); [noscript] AUTF8String getPropertyAsAUTF8String(in string name); [noscript] PRUint32 getPropertyAsUint32(in string name); [noscript] bool...
...(in string name); void setProperty(in AUTF8String name, in nsIVariant value); [noscript] void setPropertyAsAString(in string name, in AString value); [noscript] void setPropertyAsAUTF8String(in string name, in AUTF8String value); [noscript] void setPropertyAsUint32(in string name, in PRUint32 value); [noscript] void setPropertyAsBool(in string name, in
boolean value); void deleteProperty(in AUTF8String name); AUTF8String translateTo(in AUTF8String aType); void copy(in nsIAbCard srcCard)
boolean equals(in nsIAbCard card) AString generatePhoneticName(in
boolean aLastNameFirst) Attributes Attribute Type Description properties nsISimpleEnumerator Readonly: A list of all the ...
...ard has as an enumerator, whose members are all nsIProperty objects. firstName AString Shorthand for getProperty and setProperty. lastName AString Shorthand for getProperty and setProperty. displayName AString Shorthand for getProperty and setProperty. primaryEmail AString Shorthand for getProperty and setProperty. isMailList
boolean If isMailList is true then mailListURI will contain the URI of the associated mail list. This will be removed from the interface at a later date. mailListURI string If isMailList is true then mailListURI will contain the URI of the associated mail list. This will be removed from the interface at a later date. Methods getProperty() Returns a property for ...
...And 4 more matches
HTMLElement - Web APIs
ntHandlers. 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 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 d...
...xtual 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". ...
...e 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 reflecting the dropzone global attribute and describing the behavior of the element regarding a drop operation. HTMLElement.hidden Is a
Boolean indicating if the element is hidden or not. HTMLElement.inert Is a
Boolean indicating whether the user agent must act as though the given node is absent for the purposes of user interaction events, in-page text searches ("find in page"), and text selection. HTMLElement.innerText Represents the "rendered" text content of a node and its descendants. As a getter, it approximates the text the use...
...And 4 more matches
KeyboardEvent.initKeyEvent() - Web APIs
bject 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. ...
...f 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). ...
... 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 containing the Ctrl key. altKeyArg Is a
Boolean that is true if the virtual key to be generated is a combination of keys containing the Alt key. ...
...And 4 more matches
Index - XPath
6 Comparison of CSS Selectors and XPath CSS, Draft, NeedsContent, Reference, Selectors, XPath This article seeks to document the difference between CSS Selectors and XPath for web developers to be able to better choose the right tool for the right job. 17 Functions Transforming_XML_with_XSLT, XPath, XPath_Reference, XSLT, XSLT_Reference No summary! 18
boolean XSLT, XSLT_Reference The
boolean function evaluates an expression and returns true or false. 19 ceiling XSLT, XSLT_Reference The ceiling function evaluates a decimal number and returns the smallest integer greater than or equal to the decimal number. 20 choose Function, XPath, XSLT The choose function returns one of the specified objects bas...
...T, XSLT_Reference The
boolean function evaluates an expression and returns true or false. 19 ceiling XSLT, XSLT_Reference The ceiling function evaluates a decimal number and returns the smallest integer greater than or equal to the decimal number. 20 choose Function, XPath, XSLT The choose function returns one of the specified objects based on a
boolean parameter. 21 concat XSLT, XSLT_Reference The concat function concatenates two or more strings and returns the resulting string. 22 contains XSLT, XSLT_Reference The contains function determines whether the first argument string contains the second argument string and returns
boolean true or false. 23 count XSLT, XSLT_Reference ...
...nt XSLT, XSLT_Reference The document finds a node-set in an external document, or multiple external documents, and returns the resulting node-set. 26 element-available XSLT, XSLT_Reference The element-available function determines if an element is available and returns true or false. 27 false XSLT, XSLT_Reference The false function returns
boolean false. 28 floor XSLT, XSLT_Reference The floor function evaluates a decimal number and returns the largest integer less than or equal to the decimal number. 29 format-number XSLT, XSLT_Reference The format-number function evaluates a number and returns a string representing the number in a given format. 30 function-available XSLT, XSLT_...
...And 4 more matches
datepicker - Archive of obsolete content
fired for the grid and popup datepickers whenever a new month is navigated to or displayed. Attributes disabled, firstdayofweek, readonly, type, tabindex, value Properties date, dateLeadingZero, dateValue, disabled, month, monthLeadingZero, open, readOnly, tabIndex, value, year, yearLeadingZero Examples <datepicker type="grid" value="2007-03-26"/> Attributes disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. firstdayofweek Type: integer which day of the week to display as the first day in the grid. The values range from 0 to 6, where 0 is Sunday and 6 is Saturday. The default value is determined by the locale, so only use this attribute if you want to override it. readonly Type:
boolean If set to true, then the user cannot change the value of the element. However, the value may still be modified by a script. tabindex Type: integer The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "tab" key. Elements with a higher tabindex are later in the tab sequence. type Type: one of the values below ...
...n additional dropdown button, which, when pressed, will display a popup calendar grid. value Type: string The initial value of the datepicker in the form YYYY-MM-DD. Properties date Type: integer The currently selected date of the month from 1 to 31. Set this property to change the selected date. dateLeadingZero Type:
boolean A read only value indicating whether a leading zero should be displayed before the date when it is less than 10. dateValue Type: Date The date that is currently entered or selected in the datepicker as a Date object. disabled Type:
boolean Gets and sets the value of the disabled attribute. month Type: integer The curr...
...And 3 more matches
listitem - Archive of obsolete content
listbox id="theList"> <listitem label="Ruby"/> <listitem label="Emerald"/> <listitem label="Sapphire" selected="true"/> <listitem label="Diamond"/> </listbox> Attributes accesskey Type: character 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 attribute for the element. checked Type:
boolean Indicates whether the element is checked or not. Use hasAttribute() to determine whether this attribute is set instead of getAttribute(). For buttons, the type attribute must be set to checkbox or radio for this attribute to have any effect. command Type: id Set to the id of a command element that is being observed by the element. crop Type: one of the values below ...
...ped. If you wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. For example, for a menuitem in a menu you can add the following CSS rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } current Type:
boolean This attribute will be set to true if the listitem is the current item. This is typically used by a theme to customize the focus ring. To change the currently selected item in a listbox, use the listbox property selectedItem. disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with...
...eft out, no text appears. For an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. preference Type: id Connects the element to a corresponding preference. This attribute only has any effect when used inside a prefwindow. More information is available in the Preferences System article. selected Type:
boolean Indicates whether the element is selected or not. This value is read-only. To change the selection, set either the selectedIndex or selectedItem property of the containing element. tabindex Type: integer The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "tab" key. Elements with a higher tabindex are later in the tab sequence.
...And 3 more matches
menu - Archive of obsolete content
ey) to use to invoke the command. If this value is set, it overrides an assigned key set in the key attribute. This attribute does not apply to menus directly on the menubar. accesskey Type: character 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 attribute for the element. allowevents Type:
boolean If true, events are passed to children of the element. Otherwise, events are passed to the element only. crop Type: one of the values below If the label of the element is too big to fit in its given space, the text will be cropped on the side specified by the crop attribute. An ellipsis will be used in place of the cropped text. If the box direction is reversed, the...
...ed. If you wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. For example, for a menuitem in a menu you can add the following CSS rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...h, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. label Type: string The label that will appear on the element. If this is left out, no text appears. For an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. ...
...And 3 more matches
menuitem - Archive of obsolete content
ey) to use to invoke the command. If this value is set, it overrides an assigned key set in the key attribute. This attribute does not apply to menus directly on the menubar. accesskey Type: character 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 attribute for the element. allowevents Type:
boolean If true, events are passed to children of the element. Otherwise, events are passed to the element only. autocheck Type:
boolean If this attribute is true or left out, the checked state of the button will be switched each time the button is pressed. If this attribute is false, the checked state must be adjusted manually. When autocheck is true, the button type should be "checkbox" o...
... Use hasAttribute() to determine whether this attribute is set instead of getAttribute(). For buttons, the type attribute must be set to checkbox or radio for this attribute to have any effect. ...
...h, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. For example, for a menuitem in a menu you can add the following CSS rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } description Type: string Descriptive text to appear in addition to the dialog title. disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...And 3 more matches
treecol - Archive of obsolete content
pped. If you wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. ...
... cycler Type:
boolean If true, then the column is a cycler column. In the case, clicking on a cell in the column will alternate its state between on and off. This is used, for example, in a mail window, for a column that indicates that the message is read or unread with a small mark in the cell. If the cycler attribute is not set, the cell is a regular text cell. dragging Type:
boolean This attribute will be set to true if the column is being dragged. This attribute is set automatically; you shouldn't adjust it yourself. editable Type:
boolean Allows the contents of cells in the column to be changed, especially useful when type="checkbox". When the user double-clicks an editable cell, a text field appears in which the user can edit the contents of the cell. The tre...
...ontents of cells in the column to be changed, especially useful when type="checkbox". When the user double-clicks an editable cell, a text field appears in which the user can edit the contents of the cell. The tree must also be marked as editable in order for this to work. Individual treecell elements in the column may be marked editable="false" in order to disable editing. fixed Type:
boolean If true, the size of the column in the tree cannot be adjusted by the user. Any splitter to either side will resize those columns while keeping the fixed column at a constant size. If false or not specified, the user can adjust the size of the column, typically by dragging the column header with the mouse. hidden Type:
boolean If set to true, the element is not displayed. This is similar...
...And 3 more matches
Download
be managed by the user interface and persisted across sessions. A new Download object can be created using the Downloads.createDownload() function. Method overview Promise start(); Promise launch(); Promise showContainingDirectory(); Promise cancel(); Promise removePartialData(); Promise whenSucceeded(); Promise finalize([optional]
boolean aRemovePartialData); Properties Attribute Type Description canceled Read only
boolean Indicates that the download has been canceled. This property can become true, then it can be reset to false when a canceled download is restarted. This property becomes true as soon as the cancel() method is called, though the stopped property might remain false u...
...ted after the last piece of data is transferred. error Read only DownloadError When the download fails, this is set to a DownloadError instance indicating the cause of the failure. If the download has been completed successfully or has been canceled, this property is null. This property is reset to null when a failed download is restarted. hasPartialData Read only
boolean Indicates whether, at this time, there is any partially downloaded data that can be used when restarting a failed or canceled download. This property is relevant while the download is in progress, and also if it failed or has been canceled. If the download has been completed successfully, this property is not relevant anymore. Whether partial data can actually be retained depend...
...ed download. This property is relevant while the download is in progress, and also if it failed or has been canceled. If the download has been completed successfully, this property is not relevant anymore. Whether partial data can actually be retained depends on the saver and the download source, and may not be known before the download is started. hasProgress Read only
boolean Indicates whether this download's progress property is able to report partial progress while the download proceeds, and whether the value in totalBytes is relevant. This depends on the saver and the download source. launchWhenSucceeded
boolean If this property is true when the download finishes successfully, the target file will be opened or executed automatically. laun...
...And 3 more matches
JSAPI Cookbook
ake life easier when using SpiderMonkey and JSAPI. Basics Working with values The basic, undifferentiated value type in the JSAPI is JS::Value. ...
...ng SpiderMonkey and JSAPI. Basics Working with values The basic, undifferentiated value type in the JSAPI is JS::Value. ...
... === "string"; var isNumber = typeof v === "number"; var isNull = v === null; var is
Boolean = typeof v === "
boolean"; var isObject = typeof v === "object" && v !== null; /* JSAPI */ JS::RootedValue v(cx, ComputeSomeValue()); bool isString = v.isString(); bool isNumber = v.isNumber(); bool isInt32 = v.isInt32(); // NOTE: internal representation, not numeric value bool isNull = v.isNull(); bool is
Boolean = v.is
Boolean(); bool isObject = v.isObject(); // NOTE: not broken like typeof === "object" is :-) To set a value use a correspondingly named member mutator function, or assign the result of the correspondingly named standalone function: // JavaScript var v; v = 0; v = 0.5; v = someString; v = null; v = undefined; v = false; /* JSAPI */ JS::RootedValue v(cx); JS::RootedString someString(cx, .
...And 3 more matches
JSAPI reference
ExceptionState JS_RestoreExceptionState JS_DropExceptionState These functions translate errors into exceptions and vice versa: JS_ReportPendingException JS_ErrorFromException JS_ThrowReportedError Obsolete since JSAPI 29 Values and types typedef jsval JS::Value JS::Value constructors: JS::NullValue Added in SpiderMonkey 24 JS::UndefinedValue Added in SpiderMonkey 24 JS::
BooleanValue Added in SpiderMonkey 24 JS::TrueValue Added in SpiderMonkey 24 JS::FalseValue Added in SpiderMonkey 24 JS::NumberValue Added in SpiderMonkey 24 JS::Int32Value Added in SpiderMonkey 24 JS::DoubleValue Added in SpiderMonkey 24 JS::Float32Value Added in SpiderMonkey 24 JS::StringValue Added in SpiderMonkey 24 JS::ObjectValue Added in SpiderMonkey 24 JS::ObjectOrNullValue Added in Spid...
...L_TRUE Obsolete since JSAPI 42 JSVAL_FALSE Obsolete since JSAPI 42 JSVAL_ZERO Obsolete since JSAPI 42 JSVAL_ONE Obsolete since JSAPI 42 Function and macros for checking the type of a jsval: enum JSType JS_TypeOfValue All of the following are deprecated. See JS::Value for their modern replacements. JSVAL_IS_NULL Obsolete since JSAPI 32 JSVAL_IS_VOID Obsolete since JSAPI 32 JSVAL_IS_
BOOLEAN Obsolete since JSAPI 32 JSVAL_IS_NUMBER Obsolete since JSAPI 32 JSVAL_IS_INT Obsolete since JSAPI 32 JSVAL_IS_DOUBLE Obsolete since JSAPI 32 JSVAL_IS_STRING Obsolete since JSAPI 32 JSVAL_IS_OBJECT Obsolete since JSAPI 15 JSVAL_IS_PRIMITIVE Obsolete since JSAPI 32 JSVAL_IS_GCTHING Obsolete since JSAPI 32 High-level type-conversion routines for packing and unpacking function arguments. ...
...emoveArgumentFormatter Obsolete since JSAPI 18 The following functions convert JS values to various types. They can be safely applied to jsvals of any type. They may return new objects. For example, JS_ValueToObject(cx, s) where s is a string creates a new String wrapper object. These functions may call JavaScript methods. For example, JS_ValueToString(cx, obj) may call obj.toString(). ...
...And 3 more matches
IAccessibleTable
mnDescription([in] long column, [out] BSTR description ); [propget] HRESULT columnExtentAt([in] long row, [in] long column, [out] long nColumnsSpanned ); [propget] HRESULT columnHeader([out] IAccessibleTable accessibleTable, [out] long startingRowIndex ); [propget] HRESULT columnIndex([in] long cellIndex, [out] long columnIndex ); [propget] HRESULT isColumnSelected([in] long column, [out]
boolean isSelected ); [propget] HRESULT isRowSelected([in] long row, [out]
boolean isSelected ); [propget] HRESULT isSelected([in] long row, [in] long column, [out]
boolean isSelected ); [propget] HRESULT modelChange([out] IA2TableModelChange modelChange ); [propget] HRESULT nColumns([out] long columnCount ); [propget] HRESULT nRows([out] long rowCount ); [propget] HRESULT nSelectedChildren([...
...ng columnCount ); [propget] HRESULT nRows([out] long rowCount ); [propget] HRESULT nSelectedChildren([out] long cellCount ); [propget] HRESULT nSelectedColumns([out] long columnCount ); [propget] HRESULT nSelectedRows([out] long rowCount ); [propget] HRESULT rowColumnExtentsAtIndex([in] long index, [out] long row, [out] long column, [out] long rowExtents, [out] long columnExtents, [out]
boolean isSelected ); [propget] HRESULT rowDescription([in] long row, [out] BSTR description ); [propget] HRESULT rowExtentAt([in] long row, [in] long column, [out] long nRowsSpanned ); [propget] HRESULT rowHeader([out] IAccessibleTable accessibleTable, [out] long startingColumnIndex ); [propget] HRESULT rowIndex([in] long cellIndex, [out] long rowIndex ); HRESULT selectColumn([in] long column ...
...the "table-cell-index" object attribute obtained from parsing the attributes string returned by calling IAccessible2.attributes() on the cell object. columnIndex Returns the 0 based column index of the cell of the specified child or the index of the first column if the child spans multiple columns. Return value E_INVALIDARG if bad [in] passed, [out] value is 0. S_OK. isColumnSelected() Returns a
boolean value indicating whether the specified column is completely selected. [propget] HRESULT isColumnSelected( [in] long column, [out]
boolean isSelected ); Parameters column 0 based index of the column for which to determine whether it is selected. isSelected Returns true if the specified column is selected completely and false otherwise. Return value E_INVALIDARG if bad [in] passed, [out] val...
...And 3 more matches
nsIAuthPrompt
rompt to obtain the values needed for authentication. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) This interface is implemented by @mozilla.org/login-manager/prompter;1. ...
...lla.org/login-manager/prompter;1. ...
... .createInstance(Components.interfaces.nsIAuthPrompt); Method overview
boolean prompt(in wstring dialogTitle, in wstring text, in wstring passwordRealm, in PRUint32 savePassword, in wstring defaultText, out wstring result);
boolean promptPassword(in wstring dialogTitle, in wstring text, in wstring passwordRealm, in PRUint32 savePassword, inout wstring pwd);
boolean promptUsernameAndPassword(in wstring dialogTitle, in wstring text, in wstring passwordRealm, in PRUint32 savePassword, inout wstring user, inout wstring pwd); Constants Constant Value Description SAVE_PASSWORD_NEVER 0 Never saves the password. SAVE_PASSWORD_FOR_SESSION 1 Saves the password for the session. SAVE_PASSWORD_PERMANENTLY ...
...And 3 more matches
nsIClipboardCommands
webshell/public/nsIClipboardCommands.idlScriptable An interface for embedding clients who wish to interact with the system-wide OS clipboard. Mozilla does not use a private clipboard, instead it places its data directly onto the system clipboard. The webshell implements this interface. ...
...webshell/public/nsIClipboardCommands.idlScriptable An interface for embedding clients who wish to interact with the system-wide OS clipboard. Mozilla does not use a private clipboard, instead it places its data directly onto the system clipboard. The webshell implements this interface. ...
...ds.idlScriptable An interface for embedding clients who wish to interact with the system-wide OS clipboard. Mozilla does not use a private clipboard, instead it places its data directly onto the system clipboard. The webshell implements this interface. ...
...And 3 more matches
nsIClipboardDragDropHooks
ow, the hooks will be called in the order they are added. Adding the same hook to the same window will not add a second call. Each hook can only be called once per user action/api. Not all hooks are guaranteed to be called. If there are multiple hooks set for a window, any of them has an opportunity to cancel the action so no further processing will occur. ...
...alled once per user action/api. Not all hooks are guaranteed to be called. If there are multiple hooks set for a window, any of them has an opportunity to cancel the action so no further processing will occur. If any errors occur (without setting the
boolean result) the default action will occur. AllowDrop() will be called MANY times during drag so ensure that it is efficient. ...
...led. If there are multiple hooks set for a window, any of them has an opportunity to cancel the action so no further processing will occur. If any errors occur (without setting the
boolean result) the default action will occur. AllowDrop() will be called MANY times during drag so ensure that it is efficient. Method overview
boolean allowDrop(in nsIDOMEvent event, in nsIDragSession session);
boolean allowStartDrag(in nsIDOMEvent event);
boolean onCopyOrDrag(in nsIDOMEvent aEvent, in nsITransferable trans);
boolean onPasteOrDrop(in nsIDOMEvent event, in nsITransferable trans); Methods allowDrop() Tells gecko whether a drop is allowed on this content area.
boolean allowDrop( in nsIDOMEvent event, in nsIDragSession session ); Parameters event The DOM event (drag gesture). session T...
...And 3 more matches
nsICommandLine
SeaMonkey 1.0) Components may implement the nsICommandLineHandler interface to add custom command line handling behavior. Definitions arguments Any values found on the command line. switches Flags. In normalized form, these are preceded by a single dash. Some flags may take parameters; for example: "-url <param>" or "-install-xpi <param>". ...
...r interface to add custom command line handling behavior. Definitions arguments Any values found on the command line. switches Flags. In normalized form, these are preceded by a single dash. Some flags may take parameters; for example: "-url <param>" or "-install-xpi <param>". Method overview long findFlag(in AString aFlag, in
boolean aCaseSensitive); AString getArgument(in long aIndex);
boolean handleFlag(in AString aFlag, in
boolean aCaseSensitive); AString handleFlagWithParam(in AString aFlag, in
boolean aCaseSensitive); void removeArguments(in long aStart, in long aEnd); nsIFile resolveFile(in AString aArgument); nsIURI resolveURI(in AString aArgument); Attributes Attribute Type Description length long Number of arguments in the command line. The application name is n...
...This flag allows the default action to be prevented. state unsigned long The type of command line being processed. See State constants. Read only. ...
...And 3 more matches
nsIDOMMouseScrollEvent
erface 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. ...
... 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. ...
...ird 3.0 / SeaMonkey 2.0) Gecko 1.9.2 note Prior to Gecko 1.9.2, this inherited from nsISupports instead of from nsIDOMMouseEvent. Method overview void initMouseScrollEvent(in DOMString typeArg, in
boolean canBubbleArg, in
boolean cancelableArg, in nsIDOMAbstractView viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in
boolean ctrlKeyArg, in
boolean altKeyArg, in
boolean shiftKeyArg, in
boolean metaKeyArg, in unsigned short buttonArg, in nsIDOMEventTarget relatedTargetArg, in long axis); Attributes Attribute Type Description axis long Indicates which mouse wheel axis changed; this will be either HORIZONTAL_AXIS or VERTICAL_AXIS. Read only. Constan...
...And 3 more matches
nsIDOMMozTouchEvent
ly 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. ...
...s you process multi-finger touch gestures and actions. dom/interfaces/events/nsIDOMMozTouchEvent.idlScriptable Please add a summary to this article. ...
...typeArg, in
boolean canBubbleArg, in
boolean cancelableArg, in nsIDOMAbstractView viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in
boolean ctrlKeyArg, in
boolean altKeyArg, in
boolean shiftKeyArg, in
boolean metaKeyArg, in unsigned short buttonArg, in nsIDOMEventTarget relatedTargetArg, in unsigned long streamIdArg); Attributes Attribute Type Description streamId unsigned long A unique ...
...And 3 more matches
nsIDOMWindowInternal
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. ...
...esource into the browsing context (window, <iframe> or tab) with the specified name. ...
...ab) with the specified name. ...
...And 3 more matches
nsIEventListenerService
ce. ...
...Read only. Obsolete since Gecko 7.0 Methods getEventTarget...
...Read only. ...
...And 3 more matches
nsIExternalProtocolService
ng and launching web handlers (a la registerProtocolHandler in the HTML5 draft) or platform-specific applications for handling particular protocols. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) You can ask the external protocol service if it has an external handler for a given protocol scheme. And you can ask it to load the url using the default handler. ...
...nal handler for a given protocol scheme. And you can ask it to load the url using the default handler. Method overview
boolean externalProtocolHandlerExists(in string aProtocolScheme); AString getApplicationDescription(in AUTF8String aScheme); nsIHandlerInfo getProtocolHandlerInfo(in ACString aProtocolScheme); nsIHandlerInfo getProtocolHandlerInfoFromOS(in ACString aProtocolScheme, out
boolean aFound);
boolean isExposedProtocol(in string aProtocolScheme); void loadURI(in nsIURI aURI, [optional] in nsIInterfaceRequestor aWindowContext); void loadUrl(in nsIURI aURL); void setProtocolHandlerDefaults(in nsIHandlerInfo aHandlerInfo, in
boolean aOSHandlerExists); Methods externalProtocolHandlerExists() Check whether a handler for a specific protocol exists. Specifically, this l...
...Note: aProtocolScheme should not include a trailing colon, which is part of the URI syntax, not part of the scheme itself. ...
...And 3 more matches
nsILoginManager
.getService(Components.interfaces.nsILoginManager); Method overview void addLogin(in nsILoginInfo aLogin); nsIAutoCompleteResult autoCompleteSearch(in AString aSearchString, in nsIAutoCompleteResult aPreviousResult, in nsIDOMHTMLInputElement aElement); unsigned long countLogins(in AString aHostname, in AString aActionURL, in AString aHttpRealm);
boolean fillForm(in nsIDOMHTMLFormElement aForm); void findLogins(out unsigned long count, in AString aHostname, in AString aActionURL, in AString aHttpRealm, [retval, array, size_is(count)] out nsILoginInfo logins); void getAllDisabledHosts([optional] out unsigned long count, [retval, array, size_is(count)] out wstring hostnames); void getAllLogins([optional] out unsigned lon...
...igned long count, in AString aHostname, in AString aActionURL, in AString aHttpRealm, [retval, array, size_is(count)] out nsILoginInfo logins); void getAllDisabledHosts([optional] out unsigned long count, [retval, array, size_is(count)] out wstring hostnames); void getAllLogins([optional] out unsigned long count, [retval, array, size_is(count)] out nsILoginInfo logins);
boolean getLoginSavingEnabled(in AString aHost); void modifyLogin(in nsILoginInfo oldLogin, in nsISupports newLoginData); void removeAllLogins(); void removeLogin(in nsILoginInfo aLogin); void searchLogins(out unsigned long count, in nsIPropertyBag matchData, [retval, array, size_is(count)] out nsILoginInfo logins); void setLoginSavingEnabled(in AString aHost...
... Note: Default values for the nsILoginMetaInfo properties are created if the specified login doesn't explicitly specify them. void addLogin( in nsILoginInfo aLogin ); Parameters aLogin The login to store. Exceptions thrown An exception is thrown if the login information is already stored in the Login...
...And 3 more matches
nsINavHistoryQuery
ons, in unsigned long count); Attributes Attribute Type Description absoluteBeginTime PRTime Read only: Retrieves the begin time value that the currently loaded reference points + offset resolve to. absoluteEndTime PRTime Read only: Retrieves the end time value that the currently loaded reference points + offset resolve to. annotation AUTF8String The annotation name. annotationIsNot
boolean Test for existance or non-existance of a given annotation. We don't currently support >1 annotation name per query. If annotationIsNot is true, we test for the non-existance of the specified annotation. Testing for not annotation will do the same thing as a normal query and remove everything that doesn't have that annotation. Asking for things that DO have a given annotation is a little different...
... by domainIsHost). When domainIsHost, domain only does exact matching on host names. Otherwise, it will return anything whose host name ends in domain. This one is a little different than most. Setting it to an empty string is a real query and will match any URI that has no host name (local files and such). Set this to NULL (in C++ use SetIsVoid) if you don't want domain matching. ...
...atching. domainIsHost
boolean This controls the meaning of domain, and whether it is an exact match domainIsHost = true, or hierarchical (= false). endTime PRTime End time range for results (INCLUSIVE). endTimeReference long One of the constants TIME_RELATIVE_* which indicates how to interpret the corresponding end time value. folderCount long Read only: Count of folders. hasAnnotation
boolean Read only: Whether or not, annotation exists. hasBeginTime
boolean Read only: Whether or not, the corresponding begin time is considered. hasDomain
boolean Read only: Whether or not, domain exists. hasEndTime
boolean Read only: Whether or not, the corresponding end time is considered. hasSearchTerms
boolean Read only: Whether or not, text search terms exists. ...
...And 3 more matches
nsINavHistoryQueryOptions
presents the global options for executing a query. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10) Method overview nsINavHistoryQueryOptions clone(); Attributes Attribute Type Description applyOptionsToContainers
boolean If true, the query options are only applied to the containers. asyncEnabled
boolean When true, the root container node generated by these options and all of its descendant containers are opened asynchronously if they support doing so. By default, this is false. Note: Currently, only bookmark folder containers support being opened async...
...t being opened asynchronously. excludeItemIfParentHasAnnotation Obsolete since Gecko 13.0 AUTF8String This option excludes items from a bookmarks query if the parent of the item has this annotation. An example is to exclude livemark items (parent folders have the "livemark/feedURI" annotation). Ignored for queries over history. excludeItems
boolean This option excludes all URIs and separators from a bookmarks query. This would be used if you just wanted a list of bookmark folders and queries (such as the left pane of the places page). Ignored for queries over history. Defaults to false. excludeQueries
boolean Set to true to exclude queries ("place:" URIs) from the query results. Simple folder queries (bookm...
...This is designed for cases where you want to give the user the option of filing something into a list of folders. ...
...And 3 more matches
nsIPlacesImportExportService
void backupBookmarksFile(); Param...
... void backupBookmarksFile(); Parameters None. exportHTMLToFile() Saves the current bookmarks hierarchy to a bookmarks.html file. void exportHTMLToFile( in nsILocalFile ...
... void backupBookmarksFile(); Parameters None. ...
...And 3 more matches
nsIProfile
Service(Components.interfaces.nsIProfile); Note: This interface was used by SeaMonkey up through SeaMonkey 1.1 versions, which were based off Gecko 1.8.1. However, it hasn't been used in Firefox since before Firefox 1.0. ...
...ed by SeaMonkey up through SeaMonkey 1.1 versions, which were based off Gecko 1.8.1. However, it hasn't been used in Firefox since before Firefox 1.0. ...
.... Method overview void cloneProfile(in wstring profileName); void createNewProfile(in wstring profileName, in wstring nativeProfileDir, in wstring langcode, in
boolean useExistingDir); void deleteProfile(in wstring name, in
boolean canDeleteFiles); void getProfileList(out unsigned long length, [retval, array, size_is(length)] out wstring profileNames);
boolean profileExists(in wstring profileName); void renameProfile(in wstring oldName, in wstring newName); void shutDownCurrentProfile(in unsigned long shutDownType); Attributes Attribute Type Description currentProfile wstring The name of the profile currently in use. profileCount long The number of profiles. Read only. Constants...
...And 3 more matches
nsIPrompt
y you would use the prompt service as it is more flexible, but sometimes a callback will request an nsIPrompt via nsIInterfaceRequestor.getInterface(). To get an instance, call the nsIWindowWatcher.getNewPrompter(). ...
... it is more flexible, but sometimes a callback will request an nsIPrompt via nsIInterfaceRequestor.getInterface(). To get an instance, call the nsIWindowWatcher.getNewPrompter(). ...
...ia nsIInterfaceRequestor.getInterface(). To get an instance, call the nsIWindowWatcher.getNewPrompter(). ...
...And 3 more matches
nsISelectionPrivate
on(); Native code only! void GetRangesForInterval(in nsIDOMNode beginNode, in PRInt32 beginOffset, in nsIDOMNode endNode, in PRInt32 endOffset, in PRBool allowAdjacent, out PRUint32 resultCount, [retval, array, size_is(resultCount)] out nsIDOMRange results); void GetRangesForIntervalArray(in nsINode beginNode, in PRInt32 beginoffset, in nsINode endNode, in PRInt32 endOffset, in
boolean allowAdjacent, in RangeArray results); Native code only! void GetRangesForIntervalCOMArray(in nsIDOMNode beginNode, in PRInt32 beginOffset, in nsIDOMNode endNode, in PRInt32 endOffset, in PRBool allowAdjacent, in RangeArray results); Native code only! Obsolete since Gecko 12.0 long getTableSelectionType(in nsIDOMRange range); void removeSelectionListener(in nsISelectio...
...gesForIntervalCOMArray(in nsIDOMNode beginNode, in PRInt32 beginOffset, in nsIDOMNode endNode, in PRInt32 endOffset, in PRBool allowAdjacent, in RangeArray results); Native code only! Obsolete since Gecko 12.0 long getTableSelectionType(in nsIDOMRange range); void removeSelectionListener(in nsISelectionListener listenerToRemove); void scrollIntoView(in short aRegion, in
boolean aIsSynchronous, in short aVPercent, in short aHPercent); void setAncestorLimiter(in nsIContent aContent); Native code only! void setPresShell(in nsIPresShell aPresShell); Native code only! void setTextRangeStyle(in nsIDOMRange range, in constTextRangeStyleRef textRangeStyle); Native code only! void startBatchChanges(); wstring toStringWithFormat(in ...
...ll(in nsIPresShell aPresShell); Native code only! void setTextRangeStyle(in nsIDOMRange range, in constTextRangeStyleRef textRangeStyle); Native code only! ...
...And 3 more matches
nsIWindowsRegKey
in32 specific. ...
... void close(); void create(in unsigned long rootKey, in AString relPath, in unsigned long mode); nsIWindowsRegKey createChild(in AString relPath, in unsigned long mode); AString getChildName(in unsigned long index); AString getValueName(in unsigned long index); unsigned long getValueType(in AString name);
boolean hasChanged();
boolean hasChild(in AString name);
boolean hasValue(in AString name);
boolean isWatching(); void open(in unsigned long rootKey, in AString relPath, in unsigned long mode); nsIWindowsRegKey openChild(in AString relPath, in unsigned long mode); ACString readBinaryValue(in AString name); unsigned long long readInt64Value(in AString name); unsign...
...egKey openChild(in AString relPath, in unsigned long mode); ACString readBinaryValue(in AString name); unsigned long long readInt64Value(in AString name); unsigned long readIntValue(in AString name); AString readStringValue(in AString name); void removeChild(in AString relPath); void removeValue(in AString name); void startWatching(in
boolean recurse); void stopWatching(); void writeBinaryValue(in AString name, in ACString data); void writeInt64Value(in AString name, in unsigned long long data); void writeIntValue(in AString name, in unsigned long data); void writeStringValue(in AString name, in AString data); Attributes Attribute Type Description childCount ...
...And 3 more matches
EventTarget.addEventListener() - Web APIs
s a notification (an object that implements the Event interface) when an event of the specified type occurs. This must be an object implementing the EventListener interface, or a JavaScript function. See The event listener callback for details on the callback itself. options Optional An options object specifies characteristics about the event listener. ...
..., or a JavaScript function. See The event listener callback for details on the callback itself. options Optional An options object specifies characteristics about the event listener. The available options are: capture A
Boolean indicating that events of this type will be dispatched to the registered listener before being dispatched to any EventTarget beneath it in the DOM tree. once A
Boolean indicating that the listener should be invoked at most once after being added. If true, the listener would be automatically removed when invoked. passive A
Boolean that, if true, indicates that the function specified by listener will never call preventDefault(). If a passive listener does call preventDefault(), the user agent will do nothing other than generate a console warning. See Improvin...
...ue, the listener would be automatically removed when invoked. passive A
Boolean that, if true, indicates that the function specified by listener will never call preventDefault(). If a passive listener does call preventDefault(), the user agent will do nothing other than generate a console warning. See Improving scrolling performance with passive listeners to learn more. mozSystemGroup A
Boolean indicating that the listener should be added to the system group. Available only in code running in XBL or in the chrome of the Firefox browser. useCapture Optional A
Boolean indicating whether events of this type will be dispatched to the registered listener before being dispatched to any EventTarget beneath it in the DOM tree. Events that are bubbling upward through the tree will not trig...
...And 3 more matches
HTML documentation index - HTML: Hypertext Markup Language
r or the HTML Drag and Drop API. 16 dropzone Deprecated, Global attributes, HTML, Reference The dropzone global attribute is an enumerated attribute indicating what types of content can be dropped on an element, using the HTML Drag and Drop API. It can have the following values: 17 hidden Global attributes, HTML, Reference The hidden global attribute is a
Boolean attribute indicating that the element is not yet, or is no longer, relevant. For example, it can be used to hide elements of the page that can't be used until the login process has been completed. 18 id Global attributes, HTML, Reference, Web, id The id global attribute defines an identifier (ID) which must be unique in the whole document. Its purpose is to identify the eleme...
...rce> , <track>, and <video>. 23 itemref Attribute, Global attribute, HTML, HTML Microdata, Microdata, Reference Properties that are not descendants of an element with the itemscope attribute can be associated with an item using the global attribute itemref. 24 itemscope Attribute, Global attribute, HTML, HTML Microdata, Microdata, Reference itemscope is a
boolean global attribute that defines the scope of associated metadata. Specifying the itemscope attribute for an element creates a new item, which results in a number of name-value pairs that are associated with the element. 25 itemtype Attribute, Global attribute, HTML, HTML Microdata, Microdata, Reference The global attribute itemtype specifies the URL of the vocabulary that will ...
... <textarea>. This must be an integer value 0 or higher. If no minlength is specified, or an invalid value is specified, the input has no minimum length. This value must be less than or equal to the value of maxlength, otherwise the value will never be valid, as it is impossible to meet both criteria. 44 HTML attribute: multiple Attribute, Attributes, Constraint validation The
Boolean multiple attribute, if set, means the form control accepts one or more values. Valid for the email and file input types and the <select>, the manner by which the user opts for multiple values depends on the form control. 45 HTML attribute: pattern Attribute, Attributes, Constraint Validation API, Reference The pattern attribute specifies a regular expression the form control'...
...And 3 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
rototypical inheritance and ES2015 classes). JavaScript also supports functional programming -- because they are objects, functions may be stored in variables and passed around like any other object. Let's start off by looking at the building blocks of any language: the types. JavaScript programs manipulate values, and those values all belong to a type. ...
...Things are a lot easier if we stick with the first diagram, however, so we'll discuss the types listed there for now. ...
...ssible through the null keyword), and undefined, which is a value of type undefined that indicates an uninitialized variable -- that is, a value hasn't even been assigned yet. We'll talk about variables later, but in JavaScript it is possible to declare a variable without assigning a value to it. If you do this, the variable's type is undefined. undefined is actually a constant. JavaScript has a
boolean type, with possible values true and false (both of which are keywords.) Any value can be converted to a
boolean according to the following rules: false, 0, empty strings (""), NaN, null, and undefined all become false. All other values become true. You can perform this conversion explicitly using the
Boolean() function:
Boolean(''); // false
Boolean(234); // true However, this is rarely...
...And 3 more matches
Logical AND (&&) - JavaScript
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. ...
... 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. ...
... 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. ...
...And 3 more matches
panel - Archive of obsolete content
- the top edge 40px from the top // of the content window // - a height of 400px require("sdk/panel").Panel({ position: { top: 40, bottom: 100, }, height: 400 }).show(); // This is equivalent to: require("panel").Panel({ position { top: 40 }, height: 400 }).show(); The same principle is applied in the horizontal axis with width, left and right. focus
boolean Set to false to prevent taking the focus away when the panel is shown. Only turn this off if necessary, to prevent accessibility issue. Optional, default to true. contentURL string,URL The URL of the content to load in the panel. That is, they can't refer to remote scripts. The URLs are usually constructed using self.data.url(). From Firefox 34, you can u...
...the content to load in the panel. That is, they can't refer to remote scripts. The URLs are usually constructed using self.data.url(). From Firefox 34, you can use "./my-file.html" as an alias for self.data.url("my-file.html"). allow object An optional object describing permissions for the content. It should contain a single key named script whose value is a
boolean that indicates whether or not to execute script in the content. script defaults to true. contentScriptFile string,array A URL or an array of URLs. The URLs point to scripts to load into the panel. The scripts must be packaged with the add-on under the add-on's data directory. That is, they can't refer to remote scripts. The URLs are usually constructed using self.data...
...t (DOM, JS, CSS, images) for the panel has been loaded, at the time the window.onload event fires This property is optional and defaults to "end". contentScriptOptions object Read-only value exposed to content scripts under addon.options property. Any kind of jsonable value (object, array, string, etc.) can be used here. Optional. contextMenu
boolean New in Firefox 33 Whether to show a context menu when the user context-clicks in the panel. The context menu will be the same one that's displayed in web pages. Optional, defaults to false. onMessage function Include this to listen to the panel's message event. onShow function Include this to listen to the panel's show event. ...
...And 2 more matches
arrowscrollbox - Archive of obsolete content
If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respon...
...If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. ...
.... Using it with an anchor tag (an <a> link) will have no effect. The element will, however, still respond to mouse events. To enable the element, leave this attribute out entirely. Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. smoothscroll Type:
boolean true initially enables smooth scrolling for the corresponding arrowscrollbox, false disables it. Currently, smooth scrolling supports horizontal arrowscrollboxes only. tabindex Type: integer The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "tab" key. Elements with a higher tabindex are later in the tab sequence. Prop...
...And 2 more matches
browser - Archive of obsolete content
If this attribute is set to true or omitted, autoscroll will be enabled or depending on the user preference general.autoScroll. d...
... --> <groupbox flex="1"> <caption label="Mozilla homepage"/> <browser type="content" src="http://www.mozilla.org" flex="1"/> </groupbox> Attributes autocompleteenabled Type:
boolean Set to true to enable autocomplete of fields. autocompletepopup Type: id The id of a popup element used to hold autocomplete results for the element. autoscroll Type:
boolean Set to false to disable autoscroll for this browser. If this attribute is set to true or omitted, autoscroll will be enabled or depending on the user preference general.autoScroll. ...
...ble autocomplete of fields. autocompletepopup Type: id The id of a popup element used to hold autocomplete results for the element. autoscroll Type:
boolean Set to false to disable autoscroll for this browser. If this attribute is set to true or omitted, autoscroll will be enabled or depending on the user preference general.autoScroll. disablehistory Type:
boolean Disables both session and global history for the docshell attached to the browser. disableglobalhistory Type:
boolean Disables global history for the docshell attached to the browser while keeping session history active. disablesecurity Type:
boolean Set this attribute to true to disable the security UI for this browser. Omit this attribute off to enable it. droppedLinkHandle...
...And 2 more matches
listbox - Archive of obsolete content
If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...trols. Using it with an anchor tag (an <a> link) will have no effect. The element will, however, still respond to mouse events. To enable the element, leave this attribute out entirely. Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. disableKeyNavigation Type:
boolean If this attribute is not used, the user can navigate to specific items within the element by pressing keys corresponding to letters in the item's label. This is done incrementally, so typing more letters with select more specific items. This feature may be disabled by setting this attribute to true. preference Type: id Connects the element to a corresponding preference. This attribute on...
...ault in listbox and richlistbox.) multiple Multiple rows may be selected at once. (Default in tree.) For trees, you can also use the following values: cell Individual cells can be selected text Rows are selected; however, the selection highlight appears only over the text of the primary column. For richlistbox, this is new in Firefox 3.5. suppressonselect Type:
boolean If this attribute is not specified, a select event is fired whenever an item is selected, either by the user or by calling one of the select methods. If set to true, the select event is never fired. tabindex Type: integer The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "tab" key. Elements with a higher tabindex are later in t...
...And 2 more matches
menuseparator - Archive of obsolete content
) to use to invoke the command. If this value is set, it overrides an assigned key set in the key attribute. This attribute does not apply to menus directly on the menubar. accesskey Type: character 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 attribute for the element. allowevents Type:
boolean If true, events are passed to children of the element. Otherwise, events are passed to the element only. command Type: id Set to the id of a command element that is being observed by the element. crop Type: one of the values below If the label of the element is too big to fit in its given space, the text will be cropped on the side specified by the crop ...
...d. If you wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. For example, for a menuitem in a menu you can add the following CSS rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...attribute is empty or left out, no image appears. The position of the image is determined by the dir and orient attributes. label Type: string The label that will appear on the element. If this is left out, no text appears. For an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. selected Type:
boolean Indicates whether the element is selected or not. This value is read-only. To change the selection, set either the selectedIndex or selectedItem property of the containing element. tabindex Type: integer The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "tab" key. Elements with a higher tabindex are later in the tab sequence...
...And 2 more matches
panel - Archive of obsolete content
a panel may be attached to a label. ...
...s."/> <hbox> <button label="Read Mail"/> <button label="New Message"/> </hbox> </vbox> </hbox> </panel> <description value="6 New Messages" popup="thepanel"/> Attributes backdrag Type:
boolean Setting the backdrag attribute on a XUL panel lets the user move the panel by clicking and dragging anywhere on its background area. close Type:
boolean If the panel has a titlebar, set the panel's close attribute to true to have a close button appear on the titlebar. Pressing the close button will close the panel. consumeoutsideclicks Type:
boolean Controls whether or not the event that caused the popup to be automatically dismissed (or "rolled up") should be consumed or be dispatched as a normal event. If it is ...
...a width which is greater than the distance from the anchor to the right of the screen (or window), so the panel extends past the left of the anchor, and the arrow slides towards the middle of the panel such that it is still aligned with the anchor. Without flip="slide", the panel would have had its width truncated and the panel would not extend to the left of the anchor. ignorekeys Type:
boolean If false, the default value, the Escape key may be used to close the panel. If true, the Escape key cannot be used to close the panel. label Type: string For panels with titlebars, the label on the titlebar. left Type: integer Overrides the horizontal position of the popup specified by the showPopup method. level Type: one of the values below Specifies whether the p...
...And 2 more matches
radio - Archive of obsolete content
d. If you wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. For example, for a menuitem in a menu you can add the following CSS rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...for form controls. Using it with an anchor tag (an <a> link) will have no effect. The element will, however, still respond to mouse events. To enable the element, leave this attribute out entirely. Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. focused Type:
boolean This attribute is true if the element is focused. group Type: string group name Buttons with type="radio" and the same value for their group attribute are put into the same group. Only one button from each group can be checked at a time. If the user selects one the buttons, the others in the group are unchecked. image Type: URI The URI of the image to appear on the element. ...
...attribute is empty or left out, no image appears. The position of the image is determined by the dir and orient attributes. label Type: string The label that will appear on the element. If this is left out, no text appears. For an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. selected Type:
boolean Indicates whether the element is selected or not. This value is read-only. To change the selection, set either the selectedIndex or selectedItem property of the containing element. tabindex Type: integer The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "tab" key. Elements with a higher tabindex are later in the tab sequence...
...And 2 more matches
richlistbox - Archive of obsolete content
ox> <richlistitem> <description>A XUL Description!</description> </richlistitem> <richlistitem> <button label="A XUL Button"/> </richlistitem> </richlistbox> The richlistbox element contains multiple richlistitem elements, which can contain any content. You can click on any richlistitem element and use the keyboard to move the selection around. Attributes disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...rols. Using it with an anchor tag (an <a> link) will have no effect. The element will, however, still respond to mouse events. To enable the element, leave this attribute out entirely. Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. disableKeyNavigation Type:
boolean If this attribute is not used, the user can navigate to specific items within the element by pressing keys corresponding to letters in the item's label. This is done incrementally, so typing more letters with select more specific items. This feature may be disabled by setting this attribute to true. preference Type: id Connects the element to a corresponding preference. This attribute o...
...ult in listbox and richlistbox.) multiple Multiple rows may be selected at once. (Default in tree.) For trees, you can also use the following values: cell Individual cells can be selected text Rows are selected; however, the selection highlight appears only over the text of the primary column. For richlistbox, this is new in Firefox 3.5. suppressonselect Type:
boolean If this attribute is not specified, a select event is fired whenever an item is selected, either by the user or by calling one of the select methods. If set to true, the select event is never fired. tabindex Type: integer The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "tab" key. Elements with a higher tabindex are later in ...
...And 2 more matches
NPVariant - Archive of obsolete content
iantType type; union { bool boolValue; int32_t intValue; double_t doubleValue; NPString stringValue; NPObject *objectValue; } value; } NPVariant; Fields The data structure has the following fields: type A member of the NPVariantType enumeration specifying the data type contained in the NPVariant. value The value contained in the NPVariant structure. It may be a
boolean, integer, double, string, or object, depending on the variant type. JavaScript type to NPVariantType enumeration mapping When using NPVariants to access JavaScript objects in the browser, or vise versa, the mapping of JavaScript values to NPVariants is as follows: JavaScript type NPVariantType undefined NPVariantType_Void null NP...
...ect, depending on the variant type. ...
...PN_IntFromIdentifier() Macros Plugin developers are not expected to directly manipulate or access the members of the NPVariant instance, instead, the function NPN_ReleaseVariantValue(), and the following macros are provided: NPVARIANT_IS_VOID() Evaluates to true if v is of type NPVariantType_Void. NPVARIANT_IS_NULL() Evaluates to true if v is of type NPVariantType_Null. NPVARIANT_IS_
BOOLEAN() Evaluates to true if v is of type NPVariantType_Bool. NPVARIANT_IS_INT32() Evaluates to true if v is of type NPVariantType_Int32. NPVARIANT_IS_DOUBLE() Evaluates to true if v is of type NPVariantType_Double. NPVARIANT_IS_STRING() Evaluates to true if v is of type NPVariantType_String. NPVARIANT_IS_OBJECT() Evaluates to true if v is of type NPVariantType_Object. NPVARIANT_TO_...
...And 2 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
k if the condition is true, or skip the whole block if the condition is false. 35 Block cipher mode of operation Block cipher mode of operation, Cryptography, Glossary, Security A block cipher mode of operation, usually just called a "mode" in context, specifies how a block cipher should be used to encrypt or decrypt messages that are longer than the block size. 36
Boolean Boolean, CodingScripting, Glossary, JavaScript, Programming Languages, data types In computer science, a
Boolean is a logical data type that can have only the values true or false. 37 Boot2Gecko Boot2Gecko, Firefox OS, Glossary, Infrastructure, Intro Boot2Gecko (B2G) is the engineering codename for Firefox OS and refers to builds that haven't yet received official F...
...ot be fullfilled. For example, if you specify justify-content: space-between there must be more than one alignment subject. If there is not, the fallback alignment is used. This is specified per alignment method, as detailed below. 141 Falsy CodingScripting, Glossary, JavaScript A falsy (sometimes written falsey) value is a value that is considered false when encountered in a
Boolean context. 142 Favicon Glossary, Intro, favicon, user agent A favicon (favorite icon) is a tiny icon included along with a website, which is displayed in places like the browser's address bar, page tabs and bookmarks menu. 143 Fetch directive CSP, HTTP, Security CSP fetch directives are used in a Content-Security-Policy header and control locations from whi...
... layout engine used to power the Opera browser until version 15. Since then, the Opera browser is based on Chromium, which uses the Blink layout engine. 331 Primitive CodingScripting, Glossary, JavaScript In JavaScript, a primitive (primitive value, primitive data type) is data that is not an object and has no methods. There are 6 primitive data types: string, number, bigint,
boolean, undefined, and symbol. There also is null, which is seemingly primitive, but indeed is a special case for every Object: and any structured type is derived from null by the Prototype Chain. 332 Privileged Glossary, Security Users are said to be privileged when they are granted additional rights to a system, or given ultimate access to content in a higher priority level when c...
...And 2 more matches
TypeScript support in Svelte - Learn web development
not explicitly define the type. We'll define a TodoType type to see how TypeScript enforces that anything passed to a component expecting a TodoType will be structurally compatible with it. Inside the src folder create a types folder. Add a todo.type.ts file inside it. Give todo.type.ts the following content: export type TodoType = { id: number name: string completed:
boolean } Note: the Svelte template uses svelte-preprocess 4.0.0 to support TypeScript. From that version onward you have to use export/import type syntax to import types and interfaces. Check this section of the troubleshooting guide for more information. Now we'll use TodoType from our Todo.svelte component. First add the lang="ts" to our <script> tag. Let's import the type and use...
...plicitly has an 'any' type, but a better type may be inferred from usage. (ts) Change = (message, ms) => { ./svelte-todo-typescript/src/components/Alert.svelte:11:37 Warn: Parameter 'ms' implicitly has an 'any' type, but a better type may be inferred from usage. (ts) (message, ms) => { You can fix these by specifying the corresponding types, like so: export let ms = 3000 let visible:
boolean let timeout: number const onMessageChange = (message: string, ms: number) => { clearTimeout(timeout) if (!message) { // hide Alert if message is empty Note: There's no need to specify the ms type with export let ms:number = 3000 because TypeScript is already inferring it from its default value. MoreActions.svelte Now we'll do the same for the MoreActions.s...
...IVE ? todos.filter(t => !t.completed) : filter === Filter.COMPLETED ? todos.filter(t => t.completed) : todos $: { if (filter === Filter.ALL) $alert = 'Browsing all todos' else if (filter === Filter.ACTIVE) $alert = 'Browsing active todos' else if (filter === Filter.COMPLETED) $alert = 'Browsing completed todos' } const checkAllTodos = (completed:
boolean) => { todos = todos.map(t => ({...t, completed})) $alert = `${completed ? 'Checked' : 'Unchecked'} ${todos.length} todos` } const removeCompletedTodos = () => { $alert = `Removed ${todos.filter(t => t.completed).length} todos` todos = todos.filter(t => !t.completed) } </script> TodosStatus.svelte We are encountering the following errors related to passing todos to the T...
...And 2 more matches
mozbrowsercaretstatechanged
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 information about the bounding rectangle of the current selection. Its...
...ition of the bounding rectangle, in CSS pixels. bottom: The bottom position of the bounding rectangle, in CSS pixels. left: The left position of the bounding rectangle, in CSS pixels. right: The right position of the bounding rectangle, in CSS pixels. commands An object that defines what commands can currently be executed in the browser <iframe>. ...
...tangle, in CSS pixels. left: The left position of the bounding rectangle, in CSS pixels. right: The right position of the bounding rectangle, in CSS pixels. commands An object that defines what commands can currently be executed in the browser <iframe>. Its properties are canSelectAll: A
Boolean indicating whether the selectAll command is available (true) or not (false.) canCut: A
Boolean indicating whether the cut command is available (true) or not (false.) canCopy: A
Boolean indicating whether the copy command is available (true) or not (false.) canPaste: A
Boolean indicating whether the paste command is available (true) or not (false.) reason A DOMString that defines the reason for the state being changed. Possible values are visibilitychange, updateposition, longpres...
...And 2 more matches
Addon
istence of these methods or properties before relying on them. Overview of required methods void isCompatibleWith(in string appVersion, in string platformVersion) void findUpdates(in UpdateListener listener, in integer reason, in string appVersion, in string platformVersion) Overview of optional methods void uninstall() void cancelUninstall()
boolean hasResource(in string path) nsIURI getResourceURI(in string path) void getDataDirectory(in DataDirectoryCallback callback) Required properties Attribute Type Description appDisabled Read only
boolean True if this add-on cannot be used in the application based on version compatibility, dependencies, and blocklisting. blocklistState...
...isabled Read only
boolean True if this add-on cannot be used in the application based on version compatibility, dependencies, and blocklisting. blocklistState Read only integer The current blocklist state of this add-on; see nsIBlocklistService for possible values. creator Read only AddonAuthor The creator of the add-on. foreignInstall Read only
boolean True or false depending on whether the add-on is a third party add-on installation or not. id Read only string The ID of the add-on. No other installed add-on will have the same ID. isActive Read only
boolean True if the add-on is currently functional. For some add-ons this will change immediately based on the appDisabled and userDisabled properties; for others...
...or not. id Read only string The ID of the add-on. No other installed add-on will have the same ID. isActive Read only
boolean True if the add-on is currently functional. For some add-ons this will change immediately based on the appDisabled and userDisabled properties; for others it will only change after an application restart. isCompatible Read only
boolean True or false depending on whether the add-on is compatible with the current application version and platform version. isPlatformCompatible Read only
boolean True or false depending on whether the add-on is compatible with the current operating system. name Read only string The name of the add-on. pendingOperations Read only integer A bitfield ho...
...And 2 more matches
nsIAbCard
of them. Complex properties are expected to be accessed through a call to getProperty. See //github.com/RealityRipple/UXP/blob/master//mailnews/addrbook/public/nsIAbCard.idl for more details. ...
... void setCardValue(in string attrname, in AString value) void copy(in nsIAbCard srcCard)
boolean equals(in nsIAbCard card) string convertToBase64EncodedXML() AString convertToXMLPrintData() string convertToEscapedVCard() AString generateName(in long aGenerateFormat,[optional] in nsIStringBundle aBundle) AString generatePhoneticName(in
boolean aLastNameFirst) Attributes Attribute Type Description firstName AString lastName AString phoneticFirstName AString phoneticLastName AString displayName AString nickName AString primaryEmail AString secondEmail AString workPhone ...
... AString custom3 AString custom4 AString notes AString lastModifiedDate unsigned long popularityIndex unsigned long popularityIndex is bumped every time e-mail is sent to this recipient . preferMailFormat unsigned long Allowed values are stored in nsIAbPreferMailFormat. isMailList
boolean mailListURI string If isMailList is true then mailListURI will contain the URI of the associated mailing list. allowRemoteContent
boolean Allow remote content to be displayed in HTML mail received from this contact Methods getCardValue() AString getCardValue(in string name) Parameters name The attribute you want the value for. Return value Th...
...And 2 more matches
nsIAccessibleTable
in Gecko 1.9.2 void getSelectedColumnIndices(out unsigned long columnsArraySize, [retval, array, size_is(columnsArraySize)] out long columnsArray); Note: Renamed from getSelectedColumns in Gecko 1.9.2 void getSelectedRowIndices(out unsigned long rowsArraySize, [retval, array, size_is(rowsArraySize)] out long rowsArray); Note: Renamed from getSelectedRows in Gecko 1.9.2
boolean isCellSelected(in long rowIndex, in long columnIndex);
boolean isColumnSelected(in long columnIndex);
boolean isProbablyForLayout();
boolean isRowSelected(in long rowIndex); void selectColumn(in long columnIndex); void selectRow(in long rowIndex); void unselectColumn(in long columnIndex); void unselectRow(in long rowIndex); ...
...ers columnsArraySize Length of array. columnsArray Array of indices of selected columns. Return an array of row indices currently selected. void getSelectedRowIndices( out unsigned long rowsArraySize, [retval, array, size_is(rowsArraySize)] out long rowsArray ); Parameters rowsArraySize Length of array. rowsArray Array of indices of selected rows. ...
...indices of selected columns. Return an array of row indices currently selected. void getSelectedRowIndices( out unsigned long rowsArraySize, [retval, array, size_is(rowsArraySize)] out long rowsArray ); Parameters rowsArraySize Length of array. rowsArray Array of indices of selected rows. isCellSelected() Return a
boolean value indicating whether the specified cell is selected. ...
...And 2 more matches
nsIAppStartup
ecko 1.8 Inherits from: nsISupports Last changed in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) Implemented by: @mozilla.org/toolkit/app-startup;1. ...
...= Components.classes["@mozilla.org/toolkit/app-startup;1"] .getService(Components.interfaces.nsIAppStartup); Method overview void createHiddenWindow();
boolean createStartupState(in long aWindowWidth, in long aWindowHeight); Obsolete since Gecko 1.9.1 void destroyHiddenWindow(); void doProfileStartup(in nsICmdLineService aCmdLineService, in
boolean canInteract); Obsolete since Gecko 1.9.1 void ensure1Window(in nsICmdLineService aCmdLineService); Obsolete since Gecko 1.9.1 void enterLastWindowClosingSurvivalArea(); void exitLastWindowClosingSurvivalArea(); void getStartupInfo(); void hideSplashScreen(); Obsolete since Gecko 1.9.1 void initialize(in nsISupports nativeAppSupportOrSplashScr...
...This can be used, for example, when doing performance testing of the startup process to discount numbers for tests that were interrupted by a user prompt. nativeAppSupport nsINativeAppSupport Getter for "native application support." Read only. Obsolete since Gecko 1.9.1 Constants The following flags m...
...And 2 more matches
nsIApplicationUpdateService
handles performing background update checks. It also provides utilities for selecting and downloading update patches. ...
... update, in
boolean background); void pauseDownload(); void removeDownloadListener(in nsIRequestObserver listener); nsIUpdate selectUpdate([array, size_is(updateCount)] in nsIUpdate updates, in unsigned long updateCount); Attributes Attribute Type Description backgroundChecker nsIUpdateChecker The update checker being used for background update checking. Read only. canApplyUpdates
boolean true if the Update Service can download and install updates. Indicates if the current user has access privileges to the install directory. Read only. canCheckForUpdates
boolean true if the Update Service can check for updates. Application updates might be disabled by the application and the platform the application is running on. Read only. ...
...Read only. ...
...And 2 more matches
nsICategoryManager
in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Implemented by: @mozilla.org/categorymanager;1. ...
... 4 / Thunderbird 3.3 / SeaMonkey 2.1) Implemented by: @mozilla.org/categorymanager;1. ...
...The category and/or entry are created if they do not exist. string addCategoryEntry( ...
...And 2 more matches
nsIContentSecurityPolicy
content/base/public/nsIContentSecurityPolicy.idlScriptable Describes an XPCOM component used to model and enforce Content Security Policies. ...
...Calls to this may trigger violation reports when queried, so this value should not be cached. Read only. isInitialized bo...
...entLocation, in nsIURI aRequestOrigin, in nsISupports aContext, in ACString aMimeType, in nsISupports aExtra); Attributes Attribute Type Description allowsEval
boolean Whether this policy allows eval and eval-like functions such as setTimeout("code string", time). Calls to this may trigger violation reports when queried, so this value should not be cached. Read only. allowsInlineScript
boolean Whether this policy allows in-page script. Calls to this may trigger violation reports when queried, so this value should not be cached. Read only. isInitialized
boolean Set to true when the Content Security Policy has been read in and parsed and is ready to enforce. This is a barrier for the nsDocument so it doesn't load any sub-content until either it knows that a Content Security Policy is ...
...And 2 more matches
nsIDOMXPathResult
For example, modifying a node invalidates the iterator. Read only. numberValue double If resultType is NUMBER_TYPE, the numeric value of the XPath value. Read only. resultType unsigned short The type of ...
...For example, modifying a node invalidates the iterator. Read only. numberValue double If resultType is NUMBER_TYPE, the numeric value of the XPath value. Read only. resultType unsigned short The type of result; can...
...Read only. invalidIteratorState
boolean true if the iterator state has become invalid. For example, modifying a node invalidates the iterator. Read only. numberValue double If resultType is NUMBER_TYPE, the numeric value of the XPath value. Read only. resultType unsigned short The type of result; can be any of the Type constant...
...And 2 more matches
nsIDispatchSupport
js/src/xpconnect/idl/nsIDispatchSupport.idlNot scriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void COMVariant2JSVal(in COMVARIANTPtr comvar, out jsval val); unsigned long getHostingFlags(in string aContext);
boolean isClassMarkedSafeForScripting(in nsCIDRef cid, out
boolean classExists);
boolean isClassSafeToHost(in JSContextPtr cx, in nsCIDRef cid, in
boolean capsCheck, out
boolean classExists);
boolean isObjectSafeForScripting(in voidPtr theObject, in nsIIDRef id); void JSVal2COMVariant(in jsval var, out COMVARIANT comvar); Methods COMVariant2JSVal() Converts a COM Variant to a jsval. void COMVariant2JSVal( in COMVARIANTPtr comvar, out jsval val ); Parameters comvar The COM Variant to be...
... ); Parameters comvar The COM Variant to be converted. val The jsval to receive the converted value. getHostingFlags() Return the ActiveX security and hosting flags. See nsIActiveXSecurityPolicy for list of flags. unsigned long getHostingFlags( in string aContext ); Parameters aContext Return value isClassMarkedSafeForScripting() Test if the specified class is marked safe for scripting. ...
... jsval to receive the converted value. getHostingFlags() Return the ActiveX security and hosting flags. See nsIActiveXSecurityPolicy for list of flags. unsigned long getHostingFlags( in string aContext ); Parameters aContext Return value isClassMarkedSafeForScripting() Test if the specified class is marked safe for scripting. ...
...And 2 more matches
nsIDownloadManager
var downloadManager = Components.classes["@mozilla.org/download-manager;1"] .getService(Components.interfaces.nsIDownloadManager); Method overview nsIDownload addDownload(in short aDownloadType, in nsIURI aSource, in nsIURI aTarget, in AString aDisplayName, in nsIMIMEInfo aMIMEInfo, in PRTime aStartTime, in nsILocalFile aTempFile, in nsICancelable aCancelable, in
boolean aIsPrivate); void addListener(in nsIDownloadProgressListener aListener); void cancelDownload(in unsigned long aID); void cleanUp(); void endBatchUpdate(); Obsolete since Gecko 1.9.1 void flush(); Obsolete since Gecko 1.8 nsIDownload getDownload(in unsigned long aID); void onClose(); Obsolete since Gecko 1.9.1 void open(in n...
... void endBatchUpdate(); Obsolete since Gecko 1.9.1 void flush(); Obsolete since Gecko 1.8 nsIDownload getDownload(in unsigned long aID); void onClose(); Obsolete since Gecko 1.9.1 void open(in nsIDOMWindow aParent, in nsIDownload aDownload); Obsolete since Gecko 1.9.1 void openProgressDialogFor(in nsIDownload aDownload, in nsIDOMWindow aParent, in
boolean aCancelDownloadOnClose); Obsolete since Gecko 1.9.1 void pauseDownload(in unsigned long aID); void removeDownload(in unsigned long aID); void removeDownloadsByTimeframe(in long long aBeginTime, in long long aEndTime); void removeListener(in nsIDownloadProgressListener aListener); void resumeDownload(in unsigned long aID); void retryDownload...
...; void saveState(); Obsolete since Gecko 1.8 void startBatchUpdate(); Obsolete since Gecko 1.9.1 Attributes Attribute Type Description activeDownloadCount long The number of files currently being downloaded. Read only. activeDownloads nsISimpleEnumerator An enumeration of active nsIDownloads. Read only. canCleanUp
boolean Whether or not there are downloads that can be cleaned up (removed) that is downloads that have completed, have failed or have been canceled. Read only. datasource nsIRDFDataSource Read only. Obsolete since Gecko 1.8 DBConnection mozIStorageConnection The database connection to the downloads database. Read only. defaultDownloadsDirectory nsILocalFile ...
...And 2 more matches
nsIDroppedLinkHandler
dom/base/nsIDroppedLinkHandler.idlScriptable Please add a summary to this article. ...
...dler.idlScriptable Please add a summary to this article. ...
...ed Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview
boolean canDropLink(in nsIDOMDragEvent aEvent, in PRBool aAllowSameDocument); AString dropLink(in nsIDOMDragEvent aEvent, out AString aName, [optional] in
boolean aDisallowInherit); void dropLinks(in nsIDOMDragEvent aEvent, [optional] in
boolean aDisallowInherit, [optional] out unsigned long aCount, [retval, array, size_is(aCount)] out nsIDroppedLinkItem aLinks); Methods canDropLink() Determines if a link being dragged can be dropped.
boolean canDropLink( in nsIDOMDragEvent aEvent, in PRBool aAllowSameDocument ); Parameters aEvent A dragenter or dragover event. aAllowSameDocument If false, drops are only allowed if ...
...And 2 more matches
nsIGSettingsCollection
xpcom/system/nsIGSettingsService.idlScriptable Please add a summary to this article. ...
... xpcom/system/nsIGSettingsService.idlScriptable Please add a summary to this article. ...
... xpcom/system/nsIGSettingsService.idlScriptable Please add a summary to this article. ...
...And 2 more matches
nsIJumpListBuilder
hat have been removed since the last commit. To prevent repeatedly adding entires users have removed, applications are encouraged to track removed items internally. Each list is made up of an array of nsIWinJumpListItems representing items such as shortcuts, links, and separators. See nsIJumpListItem for information on adding additional jump list types. ...
...applications are encouraged to track removed items internally. Each list is made up of an array of nsIWinJumpListItems representing items such as shortcuts, links, and separators. See nsIJumpListItem for information on adding additional jump list types. Method overview void abortListBuild();
boolean addListToBuild(in short aCatType, in nsIArray items Optional, in AString catName Optional);
boolean commitListBuild();
boolean deleteActiveList();
boolean initListBuild(in nsIMutableArray removedItems); Attributes Attribute Type Description available short Indicates whether jump list taskbar features are supported by the current host. Read only. isListCommitted
boolean JumpList management. Indicates if a commit has already occurred in this session. Read only. Exceptions thrown N...
...dToRecentDocs shell api. JUMPLIST_CATEGORY_CUSTOMLIST 3 Custom lists can be made up of tasks, links, and separators. The title of of the list is passed through the optional string parameter of addBuildList. Methods abortListBuild() Aborts and clears the current jump list build. void abortListBuild(); Parameters None. addListToBuild() Adds a list and if required, a set of items for the list.
boolean addListToBuild( in short aCatType, in nsIArray items, Optional in AString catName Optional ); Parameters aCatType The type of list to add. items Optional An array of nsIJumpListItem items to add to the list. catName Optional For custom lists, the title of the list. Return value true if the operation completed successfully. Exceptions thrown NS_ERROR_UNEXPECTED On internal errors. NS_ERR...
...And 2 more matches
nsILocalFileMac
getFSRef(); Native code only! FSSpec getFSSpec(); Native code only! void initToAppWithCreatorCode(in OSType aAppCreator); Native code only! Obsolete since Gecko 2.0 void initWithCFURL(in CFURLRef aCFURL); Native code only! void initWithFSRef([const] in FSRefPtr aFSRef); Native code only! void initWithFSSpec([const] in FSSpecPtr aFileSpec); Native code only! ...
...void initToAppWithCreatorCode(in OSType aAppCreator); Native code only! Obsolete since Gecko 2.0 void initWithCFURL(in CFURLRef aCFURL); Native code only! void initWithFSRef([const] in FSRefPtr aFSRef); Native code only! void initWithFSSpec([const] in FSSpecPtr aFileSpec); Native code only! ...
... bundl...
...And 2 more matches
nsILoginManagerStorage
ize_is(count)] out nsILoginInfo logins); void getAllDisabledHosts([optional] out unsigned long count, [retval, array, size_is(count)] out wstring hostnames); void getAllEncryptedLogins([optional] out unsigned long count, [retval, array, size_is(count)] out nsILoginInfo logins); void getAllLogins([optional] out unsigned long count, [retval, array, size_is(count)] out nsILoginInfo logins);
boolean getLoginSavingEnabled(in AString aHost); void init(); void initWithFile(in nsIFile aInputFile, in nsIFile aOutputFile); void modifyLogin(in nsILoginInfo oldLogin, in nsISupports newLoginData); void removeAllLogins(); void removeLogin(in nsILoginInfo aLogin); void searchLogins(out unsigned long count, in nsIPropertyBag matchData, [retval, array, size_is(count)] out nsILoginInfo logins)...
...Read only. Methods addLogin() Called by the Login Manager to store a new login. Gecko 1.9.1 note Default values for the nsILoginMetaInfo properties are created if the specified login doesn't explicitly specify them. void addLogin( in nsILoginInfo aLogin ); Param...
...Read only. ...
...And 2 more matches
nsINavHistoryContainerResultNode
laces service that describes a container (which is any kind of grouping, including bookmark folders). ...
...Read-only. This is false for bookmark folder nodes unless the setFolderReadOnly() method has been called to specifically make the folder read-only. ...
...them), or true if the user interface should not allow the list of children to be altered. Read-only. This is false for bookmark folder nodes unless the setFolderReadOnly() method has been called to specifically make the folder read-only. It's true for non-folder nodes. If this container is a remote container, this flag may be redefined by the remote container provider. Read-only. containerOpen
boolean Set this to true to allow descent into this container. When closed, attempting to call getChild() or access childCount results in an error. When you're done reading the container's children, set this to false. For HOST and DAY groupings, doing this has no performance cost since the children have already been computed. For queries and bookmark folders, however, being open means they must keep them...
...And 2 more matches
nsITaskbarPreviewController
66 Introduced Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Clients should provide their own implementation of this interface. Depending on whether the controller is connected to an nsITaskbarTabPreview or nsITaskbarWindowPreview, only certain methods and attributes need to be implemented. ...
...st changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Clients should provide their own implementation of this interface. Depending on whether the controller is connected to an nsITaskbarTabPreview or nsITaskbarWindowPreview, only certain methods and attributes need to be implemented. Method overview
boolean drawPreview(in nsIDOMCanvasRenderingContext2D ctx);
boolean drawThumbnail(in nsIDOMCanvasRenderingContext2D ctx, in unsigned long width, in unsigned long height);
boolean onActivate(); void onClick(in nsITaskbarPreviewButton button); void onClose(); Attributes Attribute Type Description height unsigned long The height in pixels of the preview image. This value may change at any time. See dra...
...by an nsITaskbarPreviewController cannot alter these values. The controller and its supporting code, however, may change this values at any time. Methods drawPreview() Invoked by nsITaskbarPreview when it needs to render the preview. The specified context is attached to a surface with the controller's width and height, the values of which are obtained immediately prior to calling this method.
boolean drawPreview( in nsIDOMCanvasRenderingContext2D ctx ); Parameters ctx An nsIDOMCanvasRenderingContext2D object representing the drawing context into which the preview is to be rendered. Note that this context is not actually attached to a canvas element. Return value true if you want a frame drawn around the preview, otherwise false. drawThumbnail() Invoked by the taskbar preview when...
...And 2 more matches
nsIWindowMediator
of a given type and getting the most recent / any window of a given type. ...
...g aWindowType); nsIDOMWindow getMostRecentWindow(in wstring aWindowType); nsIDOMWindow getOuterWindowWithId(in unsigned long long aOuterWindowID); nsISimpleEnumerator getXULWindowEnumerator(in wstring aWindowType); PRUint32 getZLevel(in nsIXULWindow aWindow); Native code only! nsISimpleEnumerator getZOrderDOMWindowEnumerator(in wstring aWindowType, in
boolean aFrontToBack); nsISimpleEnumerator getZOrderXULWindowEnumerator(in wstring aWindowType, in
boolean aFrontToBack); void registerWindow(in nsIXULWindow aWindow); Native code only! void removeListener(in nsIWindowMediatorListener aListener); void setZLevel(in nsIXULWindow aWindow, in PRUint32 aZLevel); Native code only! void setZPosition(in nsIXULWindow i...
... in native window code. They are expected to hand us comparison values which are pulled from general storage in the native widget, and may not correspond to an nsIWidget at all. For that reason this interface requires only objects one step removed from the native window (nsIWidgets), and its implementation must be very understanding of what may be completely invalid pointers in those parameters.
boolean calculateZPosition( in nsIXULWindow inWindow, in unsigned long inPosition, in nsIWidget inBelow, out unsigned long outPosition, out nsIWidget outBelow ); Parameters inWindow The window in question. inPosition Requested position one of the zLevel constants. zLevelTop send the window to the top window, zLevelBottom to the bottom. If set to zLevelBelow the window will be placed bel...
...And 2 more matches
DevTools API - Firefox Developer Tools
split console. Return value: A Promise that is fulfilled once the operation has finished. switchHost(hostType) Switches the location of the toolbox Parameters: hostType {Toolbox.HostType} - The type of the new host. Return value: A Promise that is fulfilled once the new host is ready. reloadTarget(force) Reloads the current target of the toolbox. Parameters: force {
Boolean} - If true the target is shift-reloaded i.e. the cache is bypassed during the reload. zoomIn() Increases the zoom level of the Toolbox document. zoomOut() Decreases the zoom level of the Toolbox document. zoomReset() Resets the zoom level of the Toolbox document. setZoom(value) Set the zoom level to an arbitrary value. Parameters: value {Number} - The zoom level such a...
...yed. destroyed The Toolbox has been destroyed. ToolDefinition A ToolDefinition object contains all the required information for a tool to be shown in the toolbox. Methods isTargetSupported(target) A method that is called during toolbox construction to check if the tool supports debugging the given target. Parameters: target {Target} - The target to check. Return value: A
boolean indicating if the tool supports the given target. build(window, toolbox) A method that builds the ToolPanel for this tool. Parameters: window {Window} - The Window object for frame the tool is being built into. toolbox {Toolbox} - The Toolbox the tool is being built for. Return value: A ToolPanel for the tool. onKey(panel, toolbox) Optional. A method that is called when the k...
...ing, optional. A preference name that controls the visiblity of the tool. Default: devtools.{id}.enabled icon String, optional. An URL for the icon to show in the toolbox tab. If undefined the label should be defined. highlightedicon String, optional. An URL for an icon that is to be used when the tool is highlighted (see e.g. paused, inactive debugger). Default: {icon} iconOnly
Boolean, optional. If true, the label won't be shown in the tool's tab. Default: false invertIconForLightTheme
Boolean, optional. If true the colors of the icon will be inverted for the light theme. Default: false key String, optional. The key used for keyboard shortcut. Either key or keycode value. modifiers String, optional. Modifiers for the keyboard shortcut. preventClosingOnKey ...
...And 2 more matches
Element - Web APIs
adowRootRead only Returns the open shadow root that is hosted by the element, or null if no open shadow root is present. Element.openOrClosedShadowRoot Read only Returns the shadow root that is hosted by the element, regardless if its open or closed. Available only to WebExtensions. Element.slot Returns the name of the shadow DOM slot the element is inserted in. Element.tabStop Is a
Boolean indicating if the element can receive input focus via the tab key. Element.tagName Read only Returns a String with the name of the tag for the given element. Element.undoManager Read only Returns the UndoManager associated with the element. Element.undoScope Is a
Boolean indicating if the element is an undo scope host, or not. Note: DOM Level 3 defined namespaceURI, localName and p...
...nt.createShadowRoot() Creates a shadow DOM on on the element, turning it into a shadow host. Returns a ShadowRoot. Element.computedStyleMap() Returns a StylePropertyMapReadOnly interface which provides a read-only representation of a CSS declaration block that is an alternative to CSSStyleDeclaration. EventTarget.dispatchEvent() Dispatches an event to this node in the DOM and returns a
Boolean that indicates whether no handler canceled the event. Element.getAnimations() Returns an array of Animation objects currently active on the element. Element.getAttribute() Retrieves the value of the named attribute from the current node and returns it as an Object. Element.getAttributeNames() Returns an array of attribute names from the current element. Element.getAttributeNS() Retrieve...
...ss the list of classes given in the parameter. Element.getElementsByTagName() Returns a live HTMLCollection containing all descendant elements, of a particular tag name, from the current element. Element.getElementsByTagNameNS() Returns a live HTMLCollection containing all descendant elements, of a particular tag name and namespace, from the current element. Element.hasAttribute() Returns a
Boolean indicating if the element has the specified attribute or not. Element.hasAttributeNS() Returns a
Boolean indicating if the element has the specified attribute, in the specified namespace, or not. Element.hasAttributes() Returns a
Boolean indicating if the element has one or more HTML attributes present. Element.hasPointerCapture() Indicates whether the element on which it is invoked has poi...
...And 2 more matches
HTMLSelectElement - Web APIs
e-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">HTMLSelectElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties This interface inherits the properties of HTMLElement, and of Element and Node. ...
...If it is disabled, it does not accept clicks. HTMLSelectElement.formRead only An HTMLFormElement referencing the form that this element is associated with. ...
...mRead only An HTMLFormElement referencing the form that this element is associated with. If the element is not associated with of 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. ...
...And 2 more matches
KeyboardEvent - Web APIs
could originate from. The NumLock key does not fall into this group and is always encoded with the location DOM_KEY_LOCATION_STANDARD. Examples 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), t...
...f 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 indicate 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 repres...
...s not describe the locale of the data being entered. A user may be using one keyboard layout while typing text in a different language. KeyboardEvent.location Read only Returns a Number representing the location of the key on the keyboard or other input device. A list of the constants identifying the locations is shown above in Keyboard locations. ...
...And 2 more matches
MediaStreamTrack - Web APIs
See Capabilities, constraints, and settings to learn how to correctly work with constrainable properties. Not doing so correctly will result in your code being unreliable. MediaStreamTrack.contentHint A string that may be used by the web application to provide a hint as to what type of content the track contains to guide how it should be treated by API consumers. MediaStreamTrack.enabled A
Boolean whose value of true if the track is enabled, that is allowed to render the media source stream; or false if it 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 c...
...anged 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 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 track is deassociated from its source, the label is not changed. ...
...And 2 more matches
Node - Web APIs
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. Node.firstChildRead only Returns a Node representing the first direct child node of the node, or null if the node has no child. Node.isConnectedRead only A
boolean indicating whether or not the Node is connected (directly or indirectly) to the context 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 ...
...ment referenced an existing node on the DOM tree, the node will be detached from its current position and attached at the new position. Node.cloneNode() Clone a Node, and optionally, all of its contents. By default, it clones the content of the node. Node.compareDocumentPosition() Compares the position of the current node against another node in any other document. Node.contains() Returns a
Boolean value indicating whether or not a node is a descendant of the calling node. Node.getBoxQuads() Returns a list of the node's CSS boxes relative to another node. Node.getRootNode() Returns the context object's root which optionally includes the shadow root if it is available. Node.hasChildNodes() Returns a
Boolean indicating whether or not the element has any child nodes. Node.insertBefor...
...Node.getRootNode() Returns the context object's root which optionally includes the shadow root if it is available. Node.hasChildNodes() Returns a
Boolean indicating whether or not the element has any child nodes. Node.insertBefore() Inserts a Node before the reference node as a child of a specified parent node. Node.isDefaultNamespace() Accepts a namespace URI as an argument and returns a
Boolean with a value of true if the namespace is the default namespace on the given node or false if not. Node.isEqualNode() Returns a
Boolean which indicates whether or not two nodes are of the same type and all their defining data points match. Node.isSameNode() Returns a
Boolean value indicating whether or not the two nodes are the same (that is, they reference the same object). Node.lookupPrefix...
...And 2 more matches
WebGLRenderingContext - Web APIs
ngContext.bufferData() Updates buffer data. WebGLRenderingContext.bufferSubData() Updates buffer data starting at a passed offset. WebGLRenderingContext.createBuffer() Creates a WebGLBuffer object. WebGLRenderingContext.deleteBuffer() Deletes a WebGLBuffer object. WebGLRenderingContext.getBufferParameter() Returns information about the buffer. WebGLRenderingContext.isBuffer() Returns a
Boolean indicating if the passed buffer is valid. Framebuffers WebGLRenderingContext.bindFramebuffer() Binds a WebGLFrameBuffer object to a given target. WebGLRenderingContext.checkFramebufferStatus() Returns the status of the framebuffer. WebGLRenderingContext.createFramebuffer() Creates a WebGLFrameBuffer object. WebGLRenderingContext.deleteFramebuffer() Deletes a WebGLFrameBuffer object. ...
...WebGLFrameBuffer object. WebGLRenderingContext.framebufferRenderbuffer() Attaches a WebGLRenderingBuffer object to a WebGLFrameBuffer object. WebGLRenderingContext.framebufferTexture2D() Attaches a textures image to a WebGLFrameBuffer object. WebGLRenderingContext.getFramebufferAttachmentParameter() Returns information about the framebuffer. WebGLRenderingContext.isFramebuffer() Returns a
Boolean indicating if the passed WebGLFrameBuffer object is valid. WebGLRenderingContext.readPixels() Reads a block of pixels from the WebGLFrameBuffer. Renderbuffers WebGLRenderingContext.bindRenderbuffer() Binds a WebGLRenderBuffer object to a given target. WebGLRenderingContext.createRenderbuffer() Creates a WebGLRenderBuffer object. WebGLRenderingContext.deleteRenderbuffer() Deletes a Web...
...bGLRenderingContext.bindRenderbuffer() Binds a WebGLRenderBuffer object to a given target. WebGLRenderingContext.createRenderbuffer() Creates a WebGLRenderBuffer object. WebGLRenderingContext.deleteRenderbuffer() Deletes a WebGLRenderBuffer object. WebGLRenderingContext.getRenderbufferParameter() Returns information about the renderbuffer. WebGLRenderingContext.isRenderbuffer() Returns a
Boolean indicating if the passed WebGLRenderingBuffer is valid. WebGLRenderingContext.renderbufferStorage() Creates a renderbuffer data store. Textures WebGLRenderingContext.bindTexture() Binds a WebGLTexture object to a given target. WebGLRenderingContext.compressedTexImage2D() Specifies a 2D texture image in a compressed format. WebGLRenderingContext.compressedTexSubImage2D() Specifies a 2D...
...And 2 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
s to specify information such as video width and height, whether we want it to autoplay and loop, whether we want to show the browser's default video controls, etc. The content inside the opening and closing <video></video> tags is shown as a fallback in browsers that don't support the element. Attributes Like all other HTML elements, this element supports the global attributes. autoplay A
Boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data. Note: Sites that automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so should be avoided when possible. If you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enabl...
...lay guide for additional information about how to properly use autoplay. To disable video autoplay, autoplay="false" will not work; the video will autoplay if the attribute is there in the <video> tag at all. To remove autoplay, the attribute needs to be removed altogether. In some browsers (e.g. Chrome 70.0) autoplay doesn't work if no muted attribute is present. autoPictureInPicture A
Boolean attribute which if true indicates that the element should automatically toggle picture-in-picture mode when the user switches back and forth between this document and another document or application. buffered An attribute you can read to determine the time ranges of the buffered media. This attribute contains a TimeRanges object. controls If this attribute is present, the browser will offer c...
...meline that doesn't start at 0 seconds, so setting currentTime to a time before that would fail. The getStartDate() method can be used to determine the beginning point of the media timeline's reference frame. disablePictureInPicture Prevents the browser from suggesting a Picture-in-Picture context menu or to request Picture-in-Picture automatically in some cases. disableRemotePlayback A
Boolean attribute used to disable the capability of remote playback in devices that are attached using wired (HDMI, DVI, etc.) and wireless technologies (Miracast, Chromecast, DLNA, AirPlay, etc). In Safari, you can use x-webkit-airplay="deny" as a fallback. duration Read only A double-precision floating-point value which indicates the duration (total length) of the media in seconds, on the media's...
...And 2 more matches
Autoplay guide for media and Web Audio APIs - Web media technologies
rowsers may have preferences that control the way autoplay works, or how autoplay blocking is handled. Here, any such preferences that may be of special significance or importance to you as a web developer are listed. These include any that may aid in testing or debugging as well as any that could be set in a way that you need to be prepared to handle. Firefox media.allowed-to-play.enabled A
Boolean preference which specifies whether or not the HTMLMediaElement.allowedToPlay property is exposed to the web. This is currently false by default (except in nightly builds, where it's true by default). If this is false, the allowedToPlay property is missing from the HTMLMediaElement interface, and is thus not present on either <audio> or <video> elements. media.autoplay.allow-extension-background-...
...which specifies whether or not the HTMLMediaElement.allowedToPlay property is exposed to the web. This is currently false by default (except in nightly builds, where it's true by default). If this is false, the allowedToPlay property is missing from the HTMLMediaElement interface, and is thus not present on either <audio> or <video> elements. media.autoplay.allow-extension-background-pages This
Boolean preference, if true, allows browser extensions' background scripts to autoplay audio media. Setting this value to false disables this capability. The default value is true. media.autoplay.allow-muted A
Boolean preference which if true (the default) allows audio media which is currently muted to be automatically played. If this has been changed to false, media with an audio track will not be per...
...pts to autoplay audio media. Setting this value to false disables this capability. The default value is true. media.autoplay.allow-muted A
Boolean preference which if true (the default) allows audio media which is currently muted to be automatically played. If this has been changed to false, media with an audio track will not be permitted to play even if muted. media.autoplay.block-webaudio A
Boolean preference which indicates whether or not to apply autoplay blocking to the Web Audio API. The default is true. ...
...And 2 more matches
preferences/service - Archive of obsolete content
ers in the about:config page. preferences/service gives you full access to the preferences system. You can also use the simple-prefs module to access just the preferences for your own add-on and expose them to the user in the Add-on Manager. Globals Functions set(name, value) Sets the application preference name to value. Parameters name : string Preference name. ...
...s set(name, value) Sets the application preference name to value. Parameters name : string Preference name. value : string,number,
boolean Preference value. Example: var name = "extensions.checkCompatibility.nightly"; require("sdk/preferences/service").set(name, false); get(name, defaultValue) Gets the application preference name. Parameters name : string defaultValue : string,number,
boolean Preference value. Returns string,number,
boolean : Preference value, returns defaultValue if no preference is set, returns undefined if defaultValue is not provided. ...
... defaultValue Example: var name = "extensions.checkCompatibility.nightly"; if (require("sdk/preferences/service").has(name)) { // ... } keys(root) Parameters root : string Preference root name. ...
...ference name exists. defaultValue Example: var name = "extensions.checkCompatibility.nightly"; if (require("sdk/preferences/service").has(name)) { // ... } keys(root) Parameters root : string Preference root name. Returns array : Returns an array of strings representing the child preferences of the root of this branch. isSet(name) Parameters name : string Preference name. Returns
boolean : Returns whether or not the application preference name both exists and has been set to a non-default value by the user (or a program acting on the user's behalf). Example: var name = "extensions.checkCompatibility.nightly"; if (require("sdk/preferences/service").isSet(name)) { // ... } reset(name) Clears a non-default, user-set value from the application preference name. If no user-set va...
util/array - Archive of obsolete content
array, element) Returns true if the given Array contains the element or false otherwise. A simplified version of array.indexOf(element) >= 0. let { has } = require('sdk/util/array'); let a = ['rock', 'roll', 100]; has(a, 'rock'); // true has(a, 'rush'); // false has(a, 100); // true Parameters array : array The array to search. element : * The element to search for in the array. Returns
boolean : A
boolean indicating whether or not the element was found in the array. hasAny(array, elements) Returns true if the given Array contains any of the elements in the elements array, or false otherwise. let { hasAny } = require('sdk/util/array'); let a = ['rock', 'roll', 100]; hasAny(a, ['rock', 'bright', 'light']); // true hasAny(a, ['rush', 'coil', 'jet']); // false Parameters array : arra...
...ue if the given Array contains any of the elements in the elements array, or false otherwise. let { hasAny } = require('sdk/util/array'); let a = ['rock', 'roll', 100]; hasAny(a, ['rock', 'bright', 'light']); // true hasAny(a, ['rush', 'coil', 'jet']); // false Parameters array : array The array to search for elements. elements : array An array of elements to search for in array. Returns
boolean : A
boolean indicating whether or not any of the elements were found in the array. add(array, element) If the given array does not already contain the given element, this function adds the element to the array and returns true. Otherwise, this function does not add the element and returns false. let { add } = require('sdk/util/array'); let a = ['alice', 'bob', 'carol']; add(a, 'dave'); // tru...
...y and returns true. Otherwise, this function does not add the element and returns false. let { add } = require('sdk/util/array'); let a = ['alice', 'bob', 'carol']; add(a, 'dave'); // true add(a, 'dave'); // false add(a, 'alice'); // false console.log(a); // ['alice', 'bob', 'carol', 'dave'] Parameters array : array The array to add the element to. element : * The element to add Returns
boolean : A
boolean indicating whether or not the element was added to the array. remove(array, element) If the given array contains the given element, this function removes the element from the array and returns true. Otherwise, this function does not alter the array and returns false. let { remove } = require('sdk/util/array'); let a = ['alice', 'bob', 'carol']; remove(a, 'dave'); // false remove(a...
...unction does not alter the array and returns false. let { remove } = require('sdk/util/array'); let a = ['alice', 'bob', 'carol']; remove(a, 'dave'); // false remove(a, 'bob'); // true remove(a, 'bob'); // false console.log(a); // ['alice', 'carol'] Parameters array : array The array to remove the element from. element : * The element to remove from the array if it contains it. Returns
boolean : A
boolean indicating whether or not the element was removed from the array. unique(array) Produces a duplicate-free version of the given array. let { unique } = require('sdk/util/array'); let a = [1, 1, 1, 1, 3, 4, 7, 7, 10, 10, 10, 10]; let b = unique(a); console.log(a); // [1, 1, 1, 1, 3, 4, 7, 7, 10, 10, 10, 10]; console.log(b); // [1, 3, 4, 7, 10]; Parameters array : array Source ar...
richlistitem - Archive of obsolete content
If this attribute is set, the element is disabled. ...
...and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. searchlabel Type: string Text used for 'find-as-you-type' (FAYT) searching. In situations where the search text is ambiguous or missing, searchlabel can be used to give context to FAYT. If searchlabel is not present, FAYT falls back to use the label property. selected Type:
boolean Indicates whether the element is selected or not. This value is read-only. To change the selection, set either the selectedIndex or selectedItem property of the containing element. tabindex Type: integer The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "tab" key. Elements with a higher tabindex are later in the tab sequence...
...yntax. For those elements, setAttribute("value", myValue) and getAttribute("value") do not access or affect the contents displayed to the user. Properties accessible Type: nsIAccessible Returns the accessibility object for the element. control Type: element id Gets and sets the value of the control attribute. ...
...This property is read only. This property is available for menuitem and menuseparator elements in Firefox 3. tabIndex Type: integer Gets and sets the value of the tabindex attribute. ...
tabbrowser - Archive of obsolete content
If this attribute is set to true or omitted, autoscroll will be enabled or depending on the user preference general.autoScroll. ...
...If this attribute is set to true or omitted, autoscroll will be enabled or depending on the user preference general.autoScroll. ...
...f Tabs" command. onnewtab Not in Firefox Type: script code This script will be called when the new tab button is clicked. tabmodalPromptShowing Type: integer The number of tab modal prompts currently attached to the current tab. Properties browsers Type: nodelist of browser elements Holds a list of the browser elements inside the tabbrowser. canGoBack Type:
boolean This read-only property is true if there is a page to go back to in the session history and the Back button should be enabled. canGoForward Type:
boolean This read-only property is true if there is a page to go forward to in the session history and the Forward button should be enabled. contentDocument Type: document This read-only property contains the document...
... loadTabs( uris, loadInBackground, replace ) loadTabs( uris, params ) Return type: no return value Loads a set of URIs, specified by the array uris, into tabs. If loadInBackground is true, the tabs are loaded in the background, and if replace is true, the currently displayed tabs are replaced with the specified URIs instead of adding new tabs. The properties of params are following:
boolean inBackground
boolean replace
boolean allowThirdPartyFixup tab targetTab number newIndex object postDatas number userContextId NOTE: This is the XUL method on <browser> / <tabbrowser>, not the global function in chrome://browser/content/browser.js. Please check which one you're documenting! (This one has no post data parameter, see loadURIWithFlags for a version that does) ...
tabs - Archive of obsolete content
etab, onnewtab, onselect, setfocus, selectedIndex, tabbox, tabindex, tooltiptextnew, value, Properties accessibleType, disabled, itemCount, selectedIndex, selectedItem, tabIndex, value, Methods advanceSelectedTab, appendItem, getIndexOfItem, getItemAtIndex, insertItemAt, removeItemAt Examples (example needed) Attributes closebutton Obsolete since Gecko 1.9.2 Type:
boolean If this attribute is set to true, the tabs row will have a "new tab" button and "close" button on the ends. This feature is used by the tabbrowser to provide the facilities for adding and closing tabs. You can set an image to the "new tab" and "close" buttons by applying them to the tabs-newbutton and tabs-closebutton classes respectively. disableclose Type:
boolean If this attrib...
...w tab" button and "close" button on the ends. This feature is used by the tabbrowser to provide the facilities for adding and closing tabs. You can set an image to the "new tab" and "close" buttons by applying them to the tabs-newbutton and tabs-closebutton classes respectively. disableclose Type:
boolean If this attribute is true the close button will be disabled. disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...en the close tab button is clicked. onnewtab Not in Firefox Type: script code This script will be called when the new tab button is clicked. onselect Type: script code This event is sent to the tabs element when this tab is changed. selectedIndex Type: integer Gets and sets the index of the currently selected panel. The first item is at index 0. setfocus Type:
boolean If true or omitted, the focus will be given to the first element in the corresponding tabpanel when the tabs are navigated via the keyboard. If this attribute is false, the focus does not change during navigation. tabindex Type: integer The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "tab" key. Elements with a higher tabin...
...ements with a higher tabindex are later in the tab sequence. tooltiptextnew Not in Firefox Type: string Used to set the text which appears in the tooltip when the user moves the mouse over the new button in the tab row. Properties accessibleType Type: integer A value indicating the type of accessibility object for the element. disabled Type:
boolean Gets and sets the value of the disabled attribute. itemCount Type: integer Read only property holding the number of child items. selectedIndex Type: integer Returns the index of the currently selected item. You may select an item by assigning its index to this property. By assigning -1 to this property, all items will be deselected. Returns -1 if no item...
wizard - Archive of obsolete content
onkeyup="checkCode();"/> </wizardpage> <wizardpage> <label value="That is the correct secret code."/> </wizardpage> </wizard> Attributes activetitlebarcolor Type: color string Specify background color of the window's titlebar when it is active (foreground). Moreover this hides separator between titlebar and window contents. This only affects Mac OS X. firstpage Type:
boolean true if the wizard is on the first page. inactivetitlebarcolor Type: color string Specify background color of the window's titlebar when it is inactive (background). Moreover this hides separator between titlebar and window contents. This affects only on Mac OS X. lastpage Type:
boolean True if the wizard is on the last page. Use the canCancel property to indicate to the us...
...andling functions use this attribute to group windows of the same type together. Values for window type as found on MXR: http://mxr.mozilla.org/mozilla-release/search?string=windowtype navigator:browser - Looks like if window has gBrowser it has this window type devtools:scratchpad - Scratchpad windows navigator:view-source - The view source windows Properties canAdvance Type:
boolean This property is set to true if the user can press the Next button to go to the next page. If this property is false, the user cannot navigate to the next page. Set this property to true to indicate that the user can go to the next page. Set to false to disallow moving to the next page. This has the effect of enabling or disabling the Next button, or, on the last page of the wizard, the Finish b...
... if the user can press the Next button to go to the next page. If this property is false, the user cannot navigate to the next page. Set this property to true to indicate that the user can go to the next page. Set to false to disallow moving to the next page. This has the effect of enabling or disabling the Next button, or, on the last page of the wizard, the Finish button. canRewind Type:
boolean This property is set to true if the user can press the Back button to go to the previous page. If this property is false, the user cannot navigate to the previous page. Set this property to true to indicate that the user can go back a page. Set to false to disallow moving to the previous page. This has the effect of enabling or disabling the Back button. currentPage Type: wizardpage eleme...
...revious page. Set this property to true to indicate that the user can go back a page. Set to false to disallow moving to the previous page. This has the effect of enabling or disabling the Back button. currentPage Type: wizardpage element This property returns the wizardpage element that is currently displayed. You can modify this value to change the current page. onFirstPage Type:
boolean This property is set to true if the user is on the first page, which may or may not be the first index. onLastPage Type:
boolean This property is set to true if the user is on the last page of the wizard. pageCount Type: integer This property holds the number of pages in the wizard. pageIndex Type: integer This property returns the index of the currently selected page. Yo...
Old Proxy API - Archive of obsolete content
in ECMAScript 5. Like getOwnPropertyNames, but should also return non-overridden inherited properties. Object.defineProperty(proxy,name,pd) defineProperty: function(name, propertyDescriptor) -> any Define a new property whose attributes are determined by the given propertyDescriptor. The return value of this method is ignored. delete proxy.name delete: function(name) ->
boolean Delete the named property from the proxy. The
boolean return value of this method should indicate whether or not the name property was successfully deleted. Object.freeze(proxy) Object.seal(proxy) Object.preventExtensions(proxy) fix: function() -> PropertyDescriptor map (indexed on property names) | undefined Should return an object that maps property nam...
... fix() returns undefined, the call throws a TypeError exception. Derived traps Default implementation refers to the code that is called for that trap when the trap isn't explicitly defined. In these functions, this refers to the handler object. ...
...n't explicitly defined. In these functions, this refers to the handler object. ...
... } else { if (desc.get === undefined) { return undefined; } return desc.get.call(receiver); } } receiver is either the proxy or an object that inherits from the proxy. ...
XForms Custom Controls - Archive of obsolete content
rface. As always, please refer directly to the source code to be sure that you are using the latest, up-to-date version: extensions/xforms/nsIXFormsUIWidget.idl. interface nsIXFormsUIWidget : nsIDOMElement { /** * Is called when control should be updated to reflect the value of the bound node. */ void refresh(); /** * Is called when focus is advanced to the XForms element. */
boolean focus(); /** * Is called when control should be disabled. * This really only applies to the submit element. */ void disable(in
boolean disable); /** * Is called to get current value of control. */ string getCurrentValue(); } Notes: getCurrentValue() should return the current value of the control as seen by a user. The current value of a control could differ from the val...
...ce 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. ...
...rface 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 MDG. */
boolean isRequired(); /** * Return true if instance node is valid as determined by the MDG. */
boolean isValid(); /** * Return true if the control is bound to an instance node. */
boolean hasBoundNode(); /** * Return the bound instance node. */ nsIDOMNode getBo...
...Please see the comments in the source .idl file for more information on using this method. XBL Bindings Most XForms control elements have at least two bindings applied to themselves. ...
Implementing controls using the Gamepad API - Game development
API.controller = evt.gamepad; gamepadAPI.turbo = true; console.log('Gamepad connected.'); }, The connect() function takes the event as a parameter and assigns the gamepad object to the gamepadAPI.controller variable. We are using only one gamepad for this game, so it's a single object instead of an array of gamepads. We then set the turbo property to true. ...
... The disconnect function sets the gamepad.turbo property to false and removes the variable containing the gamepad object. Gamepad object There's lots of useful information contained in the gamepad object, with the states of buttons and axes being the most important: id: A string containing information about the controller. index: A unique indentifier for the connected device. connected: A
boolean variable, true if the device is connected. mapping: The layout type of the buttons; standard is the only available option for now. axes: The state of each axis, represented by an array of floating-point values. buttons : The state of each button, represented by an array of GamepadButton objects containing pressed and value properties. The index variable is useful if we're connecting more tha...
... holding the button is accepted. Without it you'd have to release the button and press it again to have the desired effect. buttonPressed: function(button, hold) { var newPress = false; // loop through pressed buttons for(var i=0,s=gamepadAPI.buttonsStatus.length; i<s; i++) { // if we found the button we're looking for... ...
...es from the previous frame for(var j=0,p=gamepadAPI.buttonsCache.length; j<p; j++) { // if the button was already pressed, ignore new press if(gamepadAPI.buttonsCache[j] == button) { newPress = false; } } } } } return newPress; }, There are two types of action to consider for a button: a single press and a hold. The newPress
boolean variable will indicate whether there's a new press of a button or not. Next, we loop through the array of pressed buttons -- if the given button is the same as the one we're looking for, the newPress variable is set to true. To check if the press is a new one, so the player is not holding the key, we loop through the cached states of the buttons from the previous frame of the game loop. If we fin...
Visual typescript game engine - Game development
th classic socket connection methodology. webRTC can be used for any proportion. Already implemented: -video chat webRTC (SIP) chat and data communication. Look back on main staff : -Class 'Connector' (native WebSocket) used for user session staff. For main account session staff like login, register etc. Client config If you want web app without any networking then setup: appUseNetwork:
boolean = false; You want to use communication for multiplayer but you don't want to use server database account sessions. The setup this on false in main client config class. appUseAccountsSystem:
boolean = false; Networking is disabled by default. Find configuration at ./src/lib/client-config.ts /** * Addson * All addson are ansync loaded scripts. * - Cache is based on webWorkers. * - hackerTi...
...ue, can be changed in run time. */ private aspectRatio: number = 1.333; /** * domain is simple url address, * recommendent to use for local propose LAN ip * like : 192.168.0.XXX if you wanna run ant test app with server. */ private domain: string = "maximumroulette.com"; /** * networkDeepLogs control of dev logs for webRTC context only. */ private networkDeepLogs:
boolean = false; /** * masterServerKey is channel access id used to connect * multimedia server channel. */ private masterServerKey: string = "multi-platformer-sever1.maximum"; /** * rtcServerPort Port used to connect multimedia server. * Default value is 12034 */ private rtcServerPort: number = 12034; /** * connectorPort is access port used to connect * session web s...
...t note for this property: if you * disable (false) you cant use Account system or any other * network. Use 'false' if you wanna make single player game. * In other way keep it 'true'. */ private appUseNetwork = false; /** * appUseAccountsSystem If you don't want to use session * in your application just setup this variable to the false. ...
...make single player game. * In other way keep it 'true'. */ private appUseNetwork = false; /** * appUseAccountsSystem If you don't want to use session * in your application just setup this variable to the false. */ private appUseAccountsSystem:
boolean = false; /** * appUseBroadcaster Disable or enable broadcaster for * video chats. */ private appUseBroadcaster:
boolean = false; /** * Possible variant by default : * "register", "login" */ private startUpHtmlForm: string = "register"; private gameList: any[]; /** * Implement default gamePlay variable's */ private defaultGamePlayLevelName: string = "level1"; private autoStartGamePlay:
boolean = true; Start the dependency system from app.ts The first game template is Platformer. Th...
Falsy - MDN Web Docs Glossary: Definitions of Web-related terms
There are 8 falsy values: false The keyword false 0 The number zero -0 The number negative zero 0n BigInt, when used as a
boolean, follows the same rule as a Number. 0n is falsy. ...
...mes written falsey) value is a value that is considered false when encountered in a
Boolean context. JavaScript uses type conversion to coerce any value to a
Boolean in contexts that require it, such as conditionals and loops. There are 8 falsy values: false The keyword false 0 The number zero -0 The number negative zero 0n BigInt, when used as a
boolean, follows the same rule as a Number. 0n is falsy. "" Empty string value null null - the absence of any value undefined undefined - the primitive value NaN NaN - not a number Objects are falsy if and only if they have the [[IsHTMLDDA]] internal slot. This slot only exists in document.all and cannot be set using JavaScript. Examples ...
...mpty string value null null - the absence of any value undefined undefined - the primitive value NaN NaN - not a number Objects are falsy if and only if they have the [[IsHTMLDDA]] internal slot. This slot only exists in document.all and cannot be set using JavaScript. Examples Examples of falsy values in JavaScript (which are coerced to false in
Boolean contexts, and thus bypass the if block): if (false) if (null) if (undefined) if (0) if (-0) if (0n) if (NaN) if ("") The logical AND operator, && If the first object is falsy, it returns that object false && "dog" // ? false 0 && "dog" // ? 0 Specifications Specification ECMAScript (ECMA-262)The definition of 'To
Boolean abstract operation' in that specification. ...
... the if block): if (false) if (null) if (undefined) if (0) if (-0) if (0n) if (NaN) if ("") The logical AND operator, && If the first object is falsy, it returns that object false && "dog" // ? false 0 && "dog" // ? 0 Specifications Specification ECMAScript (ECMA-262)The definition of 'To
Boolean abstract operation' in that specification. Learn more Truthy
Boolean ...
Creating our first Vue component - Learn web development
tells Vue that we expect the value of this property to be a string. Now on to the done prop. First add a default field, with a value of false. This means that when no done prop is passed to a ToDoItem component, the done prop will will have a value of false (bear in mind that this is not required -- we only need default on non-required props). Next add a type field with a value of
Boolean. ...
... Now on to the done prop. First add a default field, with a value of false. This means that when no done prop is passed to a ToDoItem component, the done prop will will have a value of false (bear in mind that this is not required -- we only need default on non-required props). Next add a type field with a value of
Boolean. This tells Vue we expect the value prop to be a JavaScript
boolean type. Your component object should now look like this: <script> export default { props: { label: { required: true, type: String }, done: { default: false, type:
Boolean } } }; </script> Using registered props With these props defined inside the component object, we can now use these variable values inside our template. Let's start by adding the label prop to the ...
...data if you used an arrow function. So don't use an arrow function for the data property. So let's add a data property to our ToDoItem component. This will return an object containing a single property that we'll call isDone, whose value is this.done. Update the component object like so: export default { props: { label: { required: true, type: String }, done: { default: false, type:
Boolean } }, data() { return { isDone: this.done }; } }; Vue does a little magic here -- it binds all of your props directly to the component instance, so we don't have to call this.props.done. It also binds other attributes (data, which you've already seen, and others like methods, computed, etc.) directly to the instance. This is, in part, to make them available to your template. T...
...e's <script> element: import uniqueId from 'lodash.uniqueid'; Next, add add an id field to our data property, so the component object ends up looking like so (uniqueId() returns the specified prefix -- todo- -- with a unique string appended to it): import uniqueId from 'lodash.uniqueid'; export default { props: { label: { required: true, type: String }, done: { default: false, type:
Boolean } }, data() { return { isDone: this.done, id: uniqueId('todo-') }; } }; Next, bind the id to both our checkbox's id attribute and the label's for attribute, updating the existing id and for attributes as shown: <template> <div> <input type="checkbox" :id="id" :checked="isDone" /> <label :for="id">{{label}}</label> </div> </template> Summary And that will ...
Accessibility API cross-reference
accept input at this time. Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. BUSY BUSY BUSY aria-busy Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. CHECKED CHECKED CHECKED aria-checked checked (
boolean attribute) Defines the total number of columns in a table, grid, or treegrid. n/a n/a aria-colcount Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. n/a n/a aria-colindex Defines the number of columns spanned by a cell or gridcell...
...hanged for mouseover HOTTRACKED n/a n/a Especially used for sliders, scrollbars, toolbars, tablists... n/a HORIZONTAL HORIZONTAL aria-orientation=horizontal Indicates whether the element is exposed to an accessibility API. Note the reversed logic in some APIs INVISIBLE VISIBLE VISIBLE aria-hidden hidden (
boolean attribute) Indicates whether the object is in an iconified or minimized state. Minimized n/a ICONIFIED ICONIFIED Can be expressed with aria-expanded MARQUEED n/a n/a 3rd state in a tri-state checkbox MIXED n/a n/a aria-checked=mixed n/a Must do something with control bef...
... (Compare with blockquote). n/a <q> <Quote> Note the reversed logic in some APIs READONLY EDITABLE EDITABLE aria-readonly=true This object can be selected SELECTABLE SELECTABLE SELECTABLE This object is selected SELECTED SELECTED SELECTED aria-selected=true selected (
boolean attribute) For a button that is "consistent". The button is inconsistent when it will act on a group of objects (such as a list of mail messages) that are not in the same state. n/a n/a SENSITIVE Don't speak for this item, it will take care of text-to-speech on its own SELFVOICING n/a n/a Object can be re...
...e used with higher level containers. n/a TRANSIENT TRANSIENT The descendents of composite roles behave rather like this. For grayed-out (disabled) vs. available (enabled) items. HTML attribute also removes element from tab sequence and 'grays it out'. ARIA attribute keeps it 'perceivable'. ...
mozbrowserselectionstatechanged
ould 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 bounding rectangle of the selection. Its properties are: wi...
...ing box, in CSS pixels. bottom: The Y coordinate of the bottom of the bounding box, in CSS pixels. left: The X coordinate of the left of the bounding box, in CSS pixels. right: The X coordinate of the right of the bounding box, in CSS pixels. commands An object that stores information about what commands can be executed on the current selection. Its properties are: canSelectAll: A
Boolean Indicating whether the select all command can be issued (true) or not (false). canCut: A
Boolean Indicating whether the cut command can be issued (true) or not (false). canCopy: A
Boolean Indicating whether the copy command can be issued (true) or not (false). canPaste: A
Boolean Indicating whether the paste command can be issued (true) or not (false). zoomFactor A number representing...
... states The current state of the selection. ...
... states The current state of the selection. ...
Dict.jsm
strings as keys; these are converted to strings before being used, so they're documented here as if they were a string parameter. In Firefox 19 and above, you may also pass a JSON String to initialize the dictionary: var someJSON = '{key1: "foo", key2: {}}'; var newDict = new Dict(someJSON); Note: Any String you pass will be assumed to be JSON. ...
...if they were a string parameter. In Firefox 19 and above, you may also pass a JSON String to initialize the dictionary: var someJSON = '{key1: "foo", key2: {}}'; var newDict = new Dict(someJSON); Note: Any String you pass will be assumed to be JSON. Method overview Dict copy();
boolean del(String aKey); Object get(String aKey, [optional] Object aDefault);
boolean has(String aKey); Array listitems(); Array listkeys(); Array listvalues(); void set(String aKey, Object aValue); String toJSON(); String toString(); Properties Attribute Type Description count Number The number of items in the dictionary. items Iterator Returns an iterator over all of ...
...of the dictionary including the items immediately included within the dictionary; however, any objects referenced by those top-level objects are not copied. Dict copy(); Parameters None. Return value A new dictionary object containing the same top-level items as the original dictionary on which the copy() method was called. del() Deletes a key/value pair from the dictionary, given a key.
boolean del( String aKey ); Parameters aKey The key for the item to delete from the dictionary. Return value true if an entry was found and removed; false if no match was found. get() Returns the value corresponding to the specified key. Object get( String aKey, [optional] Object aDefault ); Parameters aKey The key whose value should be returned. aDefault Optional The value to r...
...lt ); Parameters aKey The key whose value should be returned. aDefault Optional The value to return if the specified key isn't found. If you don't specify a default value, undefined is returned for keys that aren't found. Return value The value of the specified key, or undefined if no matching key was found. has() Determines whether or not the specified key exists in the dictionary.
boolean has( String aKey ); Parameters aKey The key for which to determine existence in the dictionary. Return value true if the specified key is in the dictionary, otherwise false. listitems() Returns an array of the key/value pairs in the dictionary. Note: The order in which items are returned is arbitrary. Array listitems(); Parameters None. Return value An array of the key/value p...
Sqlite.jsm
on: openConnection. This function takes an object defining connection options: path (required) The database file to open. This can be an absolute or relative path. If a relative path is given, it is interpreted as relative to the current profile's directory. If the path does not exist, a new SQLite database will be created. The value typically ends with .sqlite. sharedMemoryCache (optional)
Boolean indicating whether multiple connections to the database share the same memory cache. Sharing the memory cache likely results in less memory utilization. However, sharing also requires connections to obtain a lock, possibly making database access slower. Defaults to true. shrinkMemoryOnConnectionIdleMS (optional) If defined, the connection will attempt to minimize its memory usage after this man...
...e functions receive the following arguments: readOnly (optional) If true the clone will be read-only, default is false. If the original connection is already read-only, the clone will be, regardless of this option. If the original connection is using the shared cache, this parameter will be ignored and the clone will be as privileged as the original connection. transactionInProgress This
boolean property indicates whether a transaction is in progress. This is rarely needed by external callers. shrinkMemory() This function can be called to shrink the memory usage of the connection. This is a glorified wrapper around the PRAGMA shrink_memory statement, which tells SQLite to shrink its memory usage (by clearing caches, etc). While calling this has the benefit of shrinking memory, it can ...
...or the current database. If no schema version has been set, this will return the string "0". setSchemaVersion(value) Sets value as the new version associated with the schema for the current database. This is a wrapper around the PRAGMA user_version statement. tableExists(name) This function determines whether a table exists in the current database. It returns a promise that is resolved with a
boolean indicating whether the table exists. indexExists(name) This functions determines whether a named index exists in the current database. It returns a promise that is resolved with a
boolean indicating whether the index exists. Statement Execution These APIs facilitate execution of statements on the connection. These are arguably the most important APIs in this type. executeCached(sql, params, ...
... be rejected with an Error instance if the statement did not finish execution fully. The Error may have an errors property. If defined, it will be an Array of objects describing individual errors. Each object has the properties result and message. result is a numeric error code and message is a string description of the problem. If onRow is specified, the returned promise will be resolved with a
boolean indicating whether the onRow handler was called. Else, the resolved value will be an array of mozIStorageRow. executeTransaction(func, type) This function is used to execute a database transaction. A transaction is a series of related statements treated as one functional unit. If the transaction succeeds, all the statements contained within it are committed as one unit. If the transaction fails...
JS_GetTypeName
Returns a pointer to the string literal description of a specified JS data type. Syntax const char * JS_GetTypeName(JSContext *cx, JSType type); Name Type Description cx JSContext * Pointer to a JS context from which to derive runtime information. type JSType One of JSTYPE_VOID, JSTYPE_OBJECT, JSTYPE_FUNCTION, JSTYPE_STRING, JSTYPE_NUMBER, or JSTYPE_
BOOLEAN. Description JS_GetTypeName returns a pointer to a string literal description of a specified JS data type, type. The following table lists JSTypes and the string literals reported by JS_GetTypeName: Type Literal JSTYPE_VOID "undefined" JSTYPE_OBJECT "object" JSTYPE_FUNCTION "function" JSTYPE_STRING "string" JSTYPE_NUMBER ...
...ypeName returns a pointer to a string literal description of a specified JS data type, type. ...
...rns a pointer to a string literal description of a specified JS data type, type. ...
...e lists JSTypes and the string literals reported by JS_GetTypeName: Type Literal JSTYPE_VOID "undefined" JSTYPE_OBJECT "object" JSTYPE_FUNCTION "function" JSTYPE_STRING "string" JSTYPE_NUMBER "number" JSTYPE_
BOOLEAN "
boolean" Any other value NULL See Also JS_ConvertValue JS_TypeOfValue JS_ValueTo
Boolean JS_ValueToFunction JS_ValueToInt32 JS_ValueToNumber JS_ValueToObject JS_ValueToString bug 1037718 ...
Querying Places
the visit, such as the referring visit, and how the transition happened (typed, redirect, link, etc). Not yet implemented -- see bug 320831. ...
... Search Parameters const unsigned long TIME_RELATIVE_EPOCH = 0 const unsigned long TIME_RELATIVE_TODAY = 1 const unsigned long TIME_RELATIVE_NOW = 2 attribute PRTime beginTime attribute unsigned long beginTimeReference readonly attribute
boolean hasBeginTime readonly attribute PRTime absoluteBeginTime attribute PRTime endTime attribute unsigned long endTimeReference readonly attribute
boolean hasEndTime readonly attribute PRTime absoluteEndTime attribute AString searchTerms readonly attribute
boolean hasSearchTerms attribute long minVisits attribute long maxVisits attribute
boolean onlyBookmarked attribute
boolean domainIsHost attribute AUTF8String domain readonly attribute
boolean hasDomain attribute
boolean uriIsPrefix attribute nsIURI uri readonly attribute
boolean hasU...
...eadonly attribute PRTime absoluteEndTime attribute AString searchTerms readonly attribute
boolean hasSearchTerms attribute long minVisits attribute long maxVisits attribute
boolean onlyBookmarked attribute
boolean domainIsHost attribute AUTF8String domain readonly attribute
boolean hasDomain attribute
boolean uriIsPrefix attribute nsIURI uri readonly attribute
boolean hasUri attribute
boolean annotationIsNot attribute AUTF8String annotation readonly attribute
boolean hasAnnotation readonly attribute unsigned long folderCount Basic Query Configuration Options const unsigned short GROUP_BY_DAY = 0 const unsigned short GROUP_BY_HOST = 1 const unsigned short GROUP_BY_DOMAIN = 2 const unsigned short GROUP_BY_FOLDER = 3 const unsigned short SORT_BY_NONE = 0 const unsigned short...
...ned short SORT_BY_ANNOTATION_ASCENDING = 15 const unsigned short SORT_BY_ANNOTATION_DESCENDING = 16 const unsigned short RESULTS_AS_URI = 0 const unsigned short RESULTS_AS_VISIT = 1 const unsigned short RESULTS_AS_FULL_VISIT = 2 (Not yet implemented -- see bug 320831) attribute unsigned short sortingMode attribute AUTF8String sortingAnnotation attribute unsigned short resultType attribute
boolean excludeItems attribute
boolean excludeQueries attribute
boolean excludeReadOnlyFolders attribute
boolean expandQueries attribute
boolean includeHidden attribute
boolean showSessions attribute unsigned long maxResults const unsigned short QUERY_TYPE_HISTORY = 0 const unsigned short QUERY_TYPE_BOOKMARKS = 1 const unsigned short QUERY_TYPE_UNIFIED = 2 (Not yet implemented -- see bug 378798)...
Starting WebLock
* is generally used to determine whether or not to initiate or * continue iteration over the enumerator, though it can be * called without subsequent getNext() calls. Does not affect * internal state of enumerator. * * @see getNext() * @return PR_TRUE if there are remaining elements in the enumerator. * PR_FALSE if there are no more elements in the enumerator. */
boolean hasMoreElements(); /** * Called to retrieve the next element in the enumerator. The "next" * element is the first element upon the first call. Must be * preceded by a call to hasMoreElements() which returns PR_TRUE. * This method is generally called within a loop to iterate over * the elements in the enumerator. * * @see hasMoreElements() * @return NS_OK if the call suc...
...he * found property fails to QI to the * given iid. */ void get(in string prop, in nsIIDRef iid, [iid_is(iid),retval] out nsQIResult result); /** * Sets a property with a given name to a given value. */ void set(in string prop, in nsISupports value); /** * Returns true if the property with the given name exists. */
boolean has(in string prop); /** * Undefines a property. * @return NS_ERROR_FAILURE if a property with that name doesn't * already exist. */ void undefine(in string prop); /** * Returns an array of the keys. */ void getKeys(out PRUint32 count, [array, size_is(count), retval] out string keys); }; Directory Service Hierarchy There are t...
...ebLock is designed so that the user interface notifies this service when we should go into lock mode. During this time, any new URL request that is not in our list of "good" URLs will be denied. Through scriptable access to the iWebLock interface, the user interface can also add, remove, and enumerate the list of URLs that it knows about. Lock and Unlock The lock and unlock methods simply set a
Boolean representing state in the object. This
Boolean value will be used later to determine if we should be denying URL requests: /* void lock (); */ NS_IMETHODIMP WebLock::Lock() { mLocked = PR_TRUE; return NS_OK; } /* void unlock (); */ NS_IMETHODIMP WebLock::Unlock() { mLocked = PR_FALSE; return NS_OK; } AddSite For AddSite, we add a new node to our linked list. The link list nodes conta...
... node = node->next; } return NS_ERROR_FAILURE; } SetSites The purpose of SetSites is to allow clients to pass an enumeration, or set, of URL strings to add to the white list of URLs. SetSites uses an nsISimpleEnumerator and shows how primitive data can be passed as an nsISupports object. The nsISimpleEnumerator interface is shown in The Web Locking Interface. The first method returns a
Boolean if there are more elements in the set. Internally, the object knows the number of elements it has in its enumeration, and every time a client calls getNext, it decrements a counter - or adjusts a pointer to the next element. When the counter goes to zero or the pointer points to a non-element, hasMoreElements will return false. There is no way to reset an nsISimpleEnumerator. For example, you ca...
IAccessibleTable2
. If you want to support older applications you should also support the IAccessibleTable interface. ...
...ssibleTable interface. ...
... Parameters column The 0 based index of the column for which to retrieve the description. description Returns the description text of the specified column in the table if such a description exists. Otherwise a null pointer is returned. Return value E_INVALIDARG if bad [in] passed, [out] value is null. S_FALSE if there is nothing to return, [out] value is null. S_OK. isColumnSelected() Returns a
boolean value indicating whether the specified column is completely selected. [propget] HRESULT isColumnSelected( [in] long column, [out]
boolean isSelected ); Parameters column 0 based index of the column for which to determine whether it is selected. isSelected Returns true if the specified column is selected completely and false otherwise. Return value E_INVALIDARG if bad [in] passed, [out] val...
...n is completely selected. [propget] HRESULT isColumnSelected( [in] long column, [out]
boolean isSelected ); Parameters column 0 based index of the column for which to determine whether it is selected. isSelected Returns true if the specified column is selected completely and false otherwise. Return value E_INVALIDARG if bad [in] passed, [out] value is false. S_OK. isRowSelected() Returns a
boolean value indicating whether the specified row is completely selected. [propget] HRESULT isRowSelected( [in] long row, [out]
boolean isSelected ); Parameters row 0 based index of the row for which to determine whether it is selected. isSelected Returns true if the specified row is selected completely and false otherwise. Return value E_INVALIDARG if bad [in] passed, [out] value is false. S_OK.
amIInstallTrigger
toolkit/mozapps/extensions/amIInstallTrigger.idlScriptable Called when an install completes or fails. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview
boolean enabled();
boolean install(in nsIVariant aArgs, [optional] in amIInstallCallback aCallback);
boolean installChrome(in PRUint32 aType, in AString aUrl, in AString aSkin); Deprecated since Gecko 2.0
boolean startSoftwareUpdate(in AString aUrl, [optional] in PRInt32 aFlags); Deprecated since Gecko 2.0
boolean updateEnabled(); Deprecated since Gecko 2.0 Constants Retained for backwards compatibility. Constant Value Description SKIN 1 ...
...n AString aUrl, [optional] in PRInt32 aFlags); Deprecated since Gecko 2.0
boolean updateEnabled(); Deprecated since Gecko 2.0 Constants Retained for backwards compatibility. Constant Value Description SKIN 1 LOCALE 2 CONTENT 4 PACKAGE 7 Methods enabled() Tests if installation is enabled.
boolean enabled(); Parameters None. Return value install() Starts a new installation of a set of add-ons.
boolean install( in nsIVariant aArgs, in amIInstallCallback aCallback Optional ); Parameters aArgs The add-ons to install. This should be a JS object, each property is the name of an add-on to be installed. The value of the property should either be a string URL, or an object with ...
...ject with the following properties: URL for the add-on's URL IconURL for an icon for the add-on Hash for a hash of the add-on. aCallback Optional A callback to call as each installation succeeds or fails. Return value true if the installations were successfully started. installChrome Starts installing a new add-on. This method is deprecated, please use install() in the future. ...
...d, please use install() in the future.
boolean installChrome( in PRUint32 aType, in AString aUrl, in AString aSkin ); Parameters aType Unused, retained for backwards compatibility. aUrl The URL of the add-on. aSkin Unused, retained for backwards compatibility. Return value true if the installation was successfully started. startSoftwareUpdate Starts installing a new add-on.
boolean startSoftwareUpdate( in AString aUrl, in PRInt32 aFlags Optional ); Parameters aUrl The URL of the add-on. aFlags Optional Unused, retained for backwards compatibility. Return value true if the installation was successfully started. updateEnabled Tests if installation is enabled.
boolean updateEnabled(); Parameters None. Return value ...
amIWebInstallListener
to notify about new installs triggered by websites. The default implementation displays a confirmation dialog when add-ons are ready to install and uses the observer service to notify when installations are blocked. ...
...cko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5) Method overview
boolean onWebInstallBlocked(in nsIDOMWindow aWindow, in nsIURI aUri, [array, size_is(aCount)] in nsIVariant aInstalls, [optional] in PRUint32 aCount); void onWebInstallDisabled(in nsIDOMWindow aWindow, in nsIURI aUri, [array, size_is(aCount)] in nsIVariant aInstalls, [optional] in PRUint32 aCount);
boolean onWebInstallRequested(in nsIDOMWindow aWindow, in nsIURI aUri, [array, size_is(aCount)] in nsIVariant aInstalls, [optional] in PRUint32 aCount); Note: Prior to Gecko 8.0, all references to nsIDOMWindow used in this interface were nsIDOMWindowInternal. ...
... aUri The URI of the site that triggered the installs. aInstalls The AddonInstalls that were blocked. ...
...e_is(aCount)] in nsIVariant aInstalls, in PRUint32 aCount Optional ); Parameters aWindow The window that triggered the installs. aUri The URI of the site that triggered the installs. aInstalls The AddonInstalls that were blocked. aCount Optional The number of AddonInstalls. onWebInstallRequested() Called when a website wants to ask the user to install add-ons.
boolean onWebInstallRequested( in nsIDOMWindow aWindow, in nsIURI aUri, [array, size_is(aCount)] in nsIVariant aInstalls, in PRUint32 aCount Optional ); Parameters aWindow The window that triggered the installs. aUri The URI of the site that triggered the installs. aInstalls The AddonInstalls that were requested. aCount Optional The number of AddonInstalls. Retu...
amIWebInstaller
toolkit/mozapps/extensions/amIWebInstaller.idlScriptable This interface is used to allow web pages to start installing add-ons. ...
...
boolean installAddonsFromWebpage(in AString aMimetype, in nsIDOMWindow aWindow, in nsIURI aReferer, [array, size_is(aInstallCount)] in wstring aUris, [array, size_is(aInstallCount)] in wstring aHashes, [array, size_is(aInstallCount)] in wstring aNames, [array, size_is(aInstallCount)] in wstring aIcons, [optional] in amIInstallCallback aCallback, [optional] in PRUint32 aInstallCount);
boolean isInstallEnabled(in AString aMimetype, in nsIURI aReferer); Note: Prior to Gecko 8.0, all references to nsIDOMWindow used in this interface were nsIDOMWindow. Methods installAddonsFromWebpage() Installs an array of add-ons at the request of a webpage. ...
..._is(aInstallCount)] in wstring aIcons, [optional] in amIInstallCallback aCallback, [optional] in PRUint32 aInstallCount);
boolean isInstallEnabled(in AString aMimetype, in nsIURI aReferer); Note: Prior to Gecko 8.0, all references to nsIDOMWindow used in this interface were nsIDOMWindow. Methods installAddonsFromWebpage() Installs an array of add-ons at the request of a webpage. ...
...be installed. aIcons The icons for the add-ons to be installed. aCallback Optional An optional callback to notify about installation success and failure. aInstallCount Optional An optional argument including the number of add-ons to install. Return value true if the installation was successfully started. isInstallEnabled() Checks if installation is enabled for a web page.
boolean isInstallEnabled( in AString aMimetype, in nsIURI aReferer ); Parameters aMimetype The MIME type for the add-on to be installed. aReferer The URI of the web page for which to see if installation is allowed. Return value true if installation is enabled. ...
imgIDecoderObserver
onous, depending on the situation. If imgIDecoder::FLAG_SYNC_DECODE is passed to a function that triggers a decode, all notifications that can be generated from the currently loaded data fire before the call returns. If FLAG_SYNC_DECODE is not passed, all, some, or none of the notifications may fire before the call returns. ...
... aCurrentFrame Missing Description aRec...
...void onStopDecode(in imgIRequest aRequest, in nsresult status, in wstring statusArg); void onStopFrame(in imgIRequest aRequest, in unsigned long aFrame); void onStopRequest(in imgIRequest aRequest, in
boolean aIsLastPart); Methods Native code only!onDataAvailable Decode notification. Called when there is more to paint. void onDataAvailable( in imgIRequest aRequest, in
boolean aCurrentFrame, [const] in nsIntRect aRect ); Parameters aRequest The request on which data is available, or null if being called for an imgIDecoder object. aCurrentFrame Missing Description aRect Missing Description onDiscard() Called when the decoded image data is discarded. This means that the frames no longer exist in decoded form, and any attempt to access or draw...
...t The request on which data is available, or null if being called for an imgIDecoder object. aFrame Missing Description onStopRequest() A load notification that is called at the same time that nsIRequestObserver.onStopRequest() would be (used only for observers of imgIRequest objects, which are nsIRequests, not imgIDecoder objects). void onStopRequest( in imgIRequest aRequest, in
boolean aIsLastPart ); Parameters aRequest The request on which data is available, or null if being called for an imgIDecoder object. aIsLastPart Missing Description See also imgIRequest imgIDecoder imgIContainer ...
mozIStorageStatement
Read only. parameterCount unsigned long Number of parameters. Read only. params mozIStorageStatementParams The current list of named parameters, which may be set. Only avail...
...Read only. parameterCount unsigned long Number of parameters. Read only. params mozIStorageStatementParams The current list of named parameters, which may be set. Only available to JavaScript code. Read on...
... and query completion. This parameter is optional. Return value A mozIStoragePendingStatement object that can be used to cancel the execution of the statement. executeStep() Executes a query with the currently bound parameters, and steps through the results one row at a time. For sample code and more details, see the overview document. Note: The statement must be reset before being reused. ...
.... Return value A mozIStoragePendingStatement object that can be used to cancel the execution of the statement. executeStep() Executes a query with the currently bound parameters, and steps through the results one row at a time. For sample code and more details, see the overview document. Note: The statement must be reset before being reused.
boolean executeStep(); Return value Returns a
boolean indicating whether there are more rows or not. Row data may be accessed using mozIStorageValueArray methods on the statement. step() Identical to calling executeStep(), and then calling reset() when no more rows are returned. Note: This method may only be called from JavaScript code.
boolean step() Return value true if there are more rows left in the results, otherwise false. execute() Ex...
mozIThirdPartyUtil
netwerk/base/public/mozIThirdPartyUtil.idlScriptable Utility functions for determining whether a given URI, channel, or window hierarchy is third party with respect to a known URI. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview
boolean isThirdPartyChannel(in nsIChannel aChannel, [optional] in nsIURI aURI);
boolean isThirdPartyURI(in nsIURI aFirstURI, in nsIURI aSecondURI);
boolean isThirdPartyWindow(in nsIDOMWindow aWindow, [optional] in nsIURI aURI); Methods isThirdPartyChannel() Determine whether the given channel and its content window hierarchy is third party. This is done as follows: If aChannel is an nsIHttpChannel and has the 'forceAllowThirdPartyCoo...
...ith arguments of the channel's bottommost window and the channel URI, respectively. Therefore, both the channel's URI and each level in the window hierarchy associated with the channel is tested. For example, if aURI is "http://mail.google.com/", aChannel has a URI of "http://google.com/", and its parent is the topmost content window with a URI of "http://mozilla.com", the result will be true.
boolean isThirdPartyChannel( in nsIChannel aChannel, in nsIURI aURI Optional ); Parameters aChannel The channel associated with the load. aURI Optional A URI to test against. If null, the URI of the channel will be used. Return value true if aURI is third party with respect to the channel URI or any of the URIs associated with the same-type window hierarchy of the channel. isThirdPartyURI() Deter...
...rty. If it cannot be determined because one or both URIs do not have a base domain (for instance, in the case of IP addresses, host aliases such as 'localhost', or a file:// URI), an exact string comparison on host is performed. For example, the URI "http://mail.google.com/" is not third party with respect to "http://images.google.com/", but "http://mail.yahoo.com/" and "http://192.168.1.1/" are.
boolean isThirdPartyURI( in nsIURI aFirstURI, in nsIURI aSecondURI ); Parameters aFirstURI Missing Description aSecondURI Missing Description Return value true if aFirstURI is third party with respect to aSecondURI. isThirdPartyWindow() Determine whether the given window hierarchy is third party. This is done as follows: Obtain the URI of the principal associated with aWindow. Call this the 'bot...
...ch level in the window hierarchy is tested. (This means that nested iframes with different base domains, even though the bottommost and topmost URIs might be equal, will be considered third party.) For example, if aURI is "http://mail.google.com/", 'aWindow' has a URI of "http://google.com/", and its parent is the topmost content window with a URI of "http://mozilla.com", the result will be true.
boolean isThirdPartyWindow( in nsIDOMWindow aWindow, in nsIURI aURI Optional ); Parameters aWindow The bottommost window in the hierarchy. aURI Optional A URI to test against. If null, the URI of the principal associated with aWindow will be used. Return value true if aURI is third party with respect to any of the URIs associated with aWindow and its same-type parents. ...
nsIAccessibleHyperLink
accessible/public/nsIAccessibleHyperLink.idlScriptable A cross-platform interface that supports hyperlink-specific properties and methods. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview nsIAccessible getAnchor(in long index); Note: Renamed from getObject in Gecko 1.9 nsIURI getURI(in long index);
boolean isSelected(); Obsolete since Gecko 1.9
boolean isValid(); Obsolete since Gecko 1.9 Attributes Attribute Type Description anchorCount long The number of anchors within this Hyperlink. Is normally 1 for anchors. This anchor is, for example, the visible output of the html:a tag. With an Image Map, reflects the actual areas within the map. Read only. Note: Renamed from anc...
...ed value is related to the nsIAccessibleHyperLink interface of the object that owns this hyperlink. Read only. Note: The link itself is represented by one embedded character within the parent text, so the endIndex should be startIndex + 1. Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. selected
boolean Determines whether the element currently has the focus, for example after returning from the destination page. Read only. Note: ARIA links can only be focused if they have the tabindex attribute set. Also, state_focused should then be set on the accessible for this link. Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the acces...
...sible tree. startIndex long The offset of the hyperlink accessible within the parent accessible. The returned value is related to the nsIAccessibleHyperLink interface of the object that owns this hyperlink. Read only. Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. valid
boolean Determines whether the hyperlink is valid, for example points to a valid URL. Read only. Note: Currently only used with ARIA links, and the author has to specify that the link is invalid via the aria-invalid='true' attribute. In all other cases, true is returned. Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tr...
...clicks are processed via JavaScript. Therefore this property does not work on ARIA links. nsIURI getURI( in long index ); Parameters index The 0-based index of the URI to be returned. Return value The nsIURI object containing the specifications for the URI. isSelected() Obsolete since Gecko 1.9 (Firefox 3) Note: Has been replaced by the selected attribute.
boolean isSelected(); Parameters None. Return value true if the element currently has the focus. isValid() Obsolete since Gecko 1.9 (Firefox 3) Note: Has been replaced by the valid attribute.
boolean isValid(); Parameters None. Return value true if the hyperlink is valid. Remarks Anchors, image maps, xul:labels with class="text-link" implement this interface. See...
nsIBinaryOutputStream
This might be used, for example, to implement network protocols or to produce architecture-neutral binary disk files, that is ones that can be read and written by both big-endian and little-endian platforms. Output is written in big-endian order (high-order byte first), as this is traditional network order. ...
...endian platforms. Output is written in big-endian order (high-order byte first), as this is traditional network order. ...
...utput is written in big-endian order (high-order byte first), as this is traditional network order. ...
... stream. void write16( in PRUint16 a16 ); Parameters a16 The 16-bit integer to write to the stream. write32() Writes a 32-bit integer to the stream. void write32( in PRUint32 a32 ); Parameters a32 The 32-bit integer to write to the stream. write64() Writes a 64-bit integer to the stream. void write64( in PRUint64 a64 ); Parameters a64 The 64-bit integer to write to the stream. write
Boolean() Writes a
boolean value (as a byte) to the stream. void write
Boolean( in PRBool a
Boolean ); Parameters a
Boolean The
Boolean value to write to the stream; the value will consist of one byte in the output stream. writeByteArray() Writes an opaque byte array to the stream. void writeByteArray( [array, size_is(aLength)] in PRUint8 aBytes, in PRUint32 aLength ); Parameters aBytes The bytes...
nsICRLManager
summary to this article. ...
... Method overview wstring computeNextAutoUpdateTime(in nsICRLInfo info, in unsigned long autoUpdateType, in double noOfDays); void deleteCrl(in unsigned long crlIndex); nsIArray getCrls(); void importCrl([array, size_is(length)] in octet data, in unsigned long length, in nsIURI uri, in unsigned long type, in
boolean doSilentDownload, in wstring crlKey); void rescheduleCRLAutoUpdate();
boolean updateCRLFromURL(in wstring url, in wstring key); Constants Constant Value Description TYPE_AUTOUPDATE_TIME_BASED 1 TYPE_AUTOUPDATE_FREQ_BASED 2 Methods computeNextAutoUpdateTime() wstring computeNextAutoUpdateTime( in nsICRLInfo info, in unsigned long autoUpdateType, in double noOfDays ); Parameters info autoUpdateType noOfDays Return value deleteCrl() Delete the cr...
...Return value deleteCrl() Delete the crl. void deleteCrl( in unsigned long crlIndex ); Parameters crlIndex getCrls() Get a list of Crl entries in the DB. nsIArray getCrls(); Parameters None. Return value importCrl() Import a CRL into the certificate database. ...
... unsigned long type, in
boolean doSilentDownload, in wstring crlKey ); Parameters data length uri type doSilentDownload crlKey rescheduleCRLAutoUpdate() This would reschedule the autoupdate of crls with auto update enable. void rescheduleCRLAutoUpdate(); Parameters None. updateCRLFromURL() Update an existing crl from the last fetched url. Needed for the update button in crl manager. ...
nsIClipboard
matching and supporting clipboard data. ...
...oard(in long aWhichClipboard); Obsolete since Gecko 1.8 void getData(in nsITransferable aTransferable, in long aWhichClipboard);
boolean hasDataMatchingFlavors([array, size_is(aLength)] in string aFlavorList, in unsigned long aLength, in long aWhichClipboard); void setData(in nsITransferable aTransferable, in nsIClipboardOwner anOwner, in long aWhichClipboard);
boolean supportsSelectionClipboard();
boolean supportsFindClipboard(); Constants Most clipboard operations in Firefox use kGlobalClipboard, which is the one also used by the typical control-C/control-V keyboard shortcuts. The kSelectionClipboard is peculiar to the X Windows System, where it refers to the PRIMARY selection, which is the one that simple mouse selection and middle-click pa...
...ard. aWhichClipboard Specifies the clipboard to which this operation applies. hasDataMatchingFlavors() This method provides a way to give correct UI feedback about, for instance, whether a paste should be allowed. It does not actually retrieve the data and should be a very inexpensive call. All it does is check if there is data on the clipboard matching any of the flavors in the given list.
boolean hasDataMatchingFlavors( [array, size_is(aLength)] in string aFlavorList, in unsigned long aLength, in long aWhichClipboard ); Parameters aFlavorList An array of ASCII strings. aLength The length of the aFlavorList. aWhichClipboard Specifies the clipboard to which this operation applies. Return value Returns true, if data is present and it matches the specified flavor. Otherwise...
...Owner, in long aWhichClipboard ); Parameters aTransferable The transferable containing the data to put on the clipboard. anOwner The owner of the transferable. aWhichClipboard Specifies the clipboard to which this operation applies. supportsSelectionClipboard() This method allows clients to determine if the implementation supports the concept of a separate clipboard for selection.
boolean supportsSelectionClipboard(); Parameters None. Return value Returns true if kSelectionClipboard is available. Otherwise it returns false. supportsFindClipboard() This method allows clients to determine if the implementation supports the concept of a separate clipboard for find search strings.
boolean supportsFindClipboard(); Parameters None. Return value Returns true if the separate ...
nsIComponentRegistrar
s methods to access and modify the XPCOM component registry. ...
...ent registry. ...
...or the nsISupportsCString interface. From the nsISupportsCString interface, you can obtain the actual ContractID string. nsISimpleEnumerator enumerateContractIDs(); Parameters None. Return value An nsISimpleEnumerator over the list of registered classes. Elements of the enumerator implement nsISupportsCString. isCIDRegistered() This method is used to test for the existence of a specific ClassID. ...
... Return value true if a factory is registered for the ContractID, false otherwise. ...
nsIDirectoryIterator
The nsIDirectoryIterator interface provides a way to iterate over the entries in a directory. xpcom/obsolete/nsIFileSpec.idlScriptable Please add a summary to this article. ...
... The nsIDirectoryIterator interface provides a way to iterate over the entries in a directory. xpcom/obsolete/nsIFileSpec.idlScriptable Please add a summary to this article. ...
...iptable Please add a summary to this article. ...
...fox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Inherits from: nsISupports Method overview void init(in nsIFileSpec parent, in
boolean resolveSymlink);
boolean exist(); void next(); Attributes Attribute Type Description currentSpec nsIFileSpec init() void init( in nsIFileSpec parent, in
boolean resolveSymlink ); Parameters parent resolveSymlink exist()
boolean exists(); next() void next(); ...
nsIExternalHelperAppService
E content type. Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/uriloader/external-helper-app-service;1. ...
... ...
... aEncodingType The encoding type to check. ...
...; otherwise false. doContent() Binds an external helper application to a stream listener. The caller should pump data into the returned stream listener. When the OnStopRequest is issued, the stream listener implementation will launch the helper app with this data. nsIStreamListener doContent( in ACString aMimeContentType, in nsIRequest aRequest, in nsIInterfaceRequestor aWindowContext, in
boolean aForceSave ); Parameters aMimeContentType The content type of the incoming data. aRequest The request corresponding to the incoming data. aWindowContext Use nsIServiceManager.getInterface() to retrieve properties like the DOM window or parent window; the service might need this in order to bring up dialogs. aForceSave true to always save this content to disk, reg...
nsIFormHistory2
st for a single name. 1.0 66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Note: This interface provides no means to access stored values. Stored values are used by the FormFillController to generate autocomplete matches. ...
...Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Note: This interface provides no means to access stored values. Stored values are used by the FormFillController to generate autocomplete matches. Method overview void addEntry(in AString name, in AString value);
boolean entryExists(in AString name, in AString value);
boolean nameExists(in AString name); void removeAllEntries(); void removeEntriesByTimeframe(in long long aBeginTime, in long long aEndTime); void removeEntriesForName(in AString name); void removeEntry(in AString name, in AString value); Attributes Attribute Type Description DBConnection mozIStorageConnection Returns the underlying DB connection the form history module is using. Read onl...
...tring name); void removeAllEntries(); void removeEntriesByTimeframe(in long long aBeginTime, in long long aEndTime); void removeEntriesForName(in AString name); void removeEntry(in AString name, in AString value); Attributes Attribute Type Description DBConnection mozIStorageConnection Returns the underlying DB connection the form history module is using. Read only. ...
...tion Returns the underlying DB connection the form history module is using. Read only. hasEntries
boolean Returns true if the form history has any entries. Read only. Methods addEntry() Adds a name and value pair to the form history. void addEntry( in AString name, in AString value ); Parameters name value entryExists() Gets whether a name and value pair exists in the form history.
boolean entryExists( in AString name, in AString value ); Parameters name value Return value nameExists() Returns true if there is no entry that is paired with a name.
boolean nameExists( in AString name ); Parameters name Return value removeAllEntries() Removes all entries in the entire form history. void removeAllEntries(); Parameters None. removeEntriesByTimeframe() Removes entries t...
nsIIDNService
This combines two operations: running the RFC 3490 "ToUnicode" operation on the original string, then converting the ...
...This combines two operations: running the RFC 3490 "ToUnicode" operation on the original string, then converting the resulting Unicode string into UTF-8 format. AUTF8String convertACEtoUTF8...
...UTF-8 encoded equivalent of the hostname. convertToDisplayIDN() Normalizes a hostname into UTF-8 format if the hostname is in the IDN whitelist. If the hostname isn't in the whitelist, it's converted into ACE format. The resulting string is useful for display purposes, and ensures that the encoding is consistent with nsIURI.GetHost(). AUTF8String convertToDisplayIDN( in AUTF8String input, out
boolean isASCII ); Parameters input The string to convert to display format. isASCII On return, this is set to true if the result is ASCII or ACE encoded; otherwise it's false. Return value The display formatted hostname. convertUTF8toACE() Converts the specified hostname from UTF-8 to ACE format, using the IDNA "ToASCII" algorithm. ACString convertUTF8toACE( in AUTF8String input ); Parameters inp...
.... Return value The display formatted hostname. convertUTF8toACE() Converts the specified hostname from UTF-8 to ACE format, using the IDNA "ToASCII" algorithm. ACString convertUTF8toACE( in AUTF8String input ); Parameters input The hostname to convert to ACE format. Return value The ACE encoded version of the hostname. isACE() Determines whether or not the specified hostname is ACE encoded.
boolean isACE( in ACString input ); Parameters input The string to check. Return value Returns true if the specified string is ACE encoded; otherwise, returns false. normalize() Performs the Unicode normalization needed for hostnames in IDN. This is useful if you need to normalize a hostname separately from converting it to display format. AUTF8String normalize( in AUTF8String input ); Parameters...
nsIInstallLocation
This is different from restricted because it's not whether or not the location *might* be restricted, it's ...
... Method overview AString getIDForLocation(in nsIFile file); nsIFile getItemFile(in AString id, in AString path); nsIFile getItemLocation(in AString id); nsIFile getStageFile(in AString id);
boolean itemIsManagedIndependently(in AString id); void removeFile(in nsIFile file); nsIFile stageFile(in nsIFile file, in AString id); Attributes Attribute Type Description canAccess
boolean Whether or not the user can write to the Install Location with the current access privileges. This is different from restricted because it's not whether or not the location *might* be restricted, it's whether or not it actually *is* restricted right now. Read only. itemLocations nsIDirectoryEnumerator An enumeration of nsIFiles for: Locations that contain items Potential dropped-in XPIs Note...
...ion where items live. Items can be dropped in at this location. Can be null for Install Locations that don't have a file system presence. Note: This is a clone of the actual location which the caller can modify freely. Read only. name AString The string identifier of this Install Location. Read only. priority long The priority level of this Install Location in loading. Read only. restricted
boolean Whether or not this Install Location is on an area of the file system that could be restricted on a restricted-access account, regardless of whether or not the location is restricted with the current user privileges. Read only. Constants Constants representing priority of some default Install Locations. You should not use the exact values here, you should offset from these values each time you...
...taged package. Return value An nsIFile if the package exists otherwise null. itemIsManagedIndependently() Determines whether or not an item's resources are managed by the Extension System or by some other user or process. For example, items linked to by text links are managed by the user, and items linked to from Registry Install Locations are usually managed by other applications or installers.
boolean itemIsManagedIndependently( in AString id ); Parameters id The GUID of the item. Return value true if the item's resources are managed independently of the Extension System, false otherwise. removeFile() Removes a file from the stage. This cleans up the stage if there is nothing else left after the remove operation. void removeFile( in nsIFile file ); Parameters file The file to remove. ...
nsILoginInfo
Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Inherits from: nsISupports Implemented by: @mozilla.org/login-manager/loginInfo;1. ...
...login-manager/loginInfo;1"] .createInstance(Components.interfaces.nsILoginInfo); Method overview nsILoginInfo clone();
boolean equals(in nsILoginInfo aLoginInfo); void init(in AString aHostname, in AString aFormSubmitURL, in AString aHttpRealm, in AString aUsername, in AString aPassword, in AString aUsernameField, in AString aPasswordField);
boolean matches(in nsILoginInfo aLoginInfo, in
boolean ignorePassword); Attributes Attribute Type Description formSubmitURL AString The origin, not URL, a form-based login was submitted to. For logins obtained from HTML forms, this field is the action attribute from the form element, with the path removed (for example, "https://www.site.com"). Forms with no action at...
...he name attribute for the username input in a form. Non-form logins should specify an empty string (""). Methods clone() Returns a clone of this login. nsILoginInfo clone(); Parameters None. Return value An nsILoginInfo containing a clone of the login on which this method was invoked. equals() Tests to determine whether this login is exactly equal to another nsILoginInfo object.
boolean equals( in nsILoginInfo aLoginInfo ); Parameters aLoginInfo The login to which to compare for equality. Return value true if the two logins are exactly equal or false if they're not. init() Initializes a newly created nsILoginInfo object. void init( in AString aHostname, in AString aFormSubmitURL, in AString aHttpRealm, in AString aUsername, in AString aPassword, in AStr...
...dField field. matches() Tests to determine whether this login is loosely equivalent to another nsILoginInfo object. The passwordField and usernameField values are ignored, and the password values may be optionally ignored. If one login's formSubmitURL is an empty string (but not null), it will be treated as a wildcard. A blank value indicates the login was stored before bug 360493 was fixed.
boolean matches( in nsILoginInfo aLoginInfo, in
boolean ignorePassword ); Parameters aLoginInfo The login to which to compare for equality. ignorePassword If true, do not examine the password value when matching. Return value true if the two logins are equivilant or false if they're not. See also nsILoginManager Using nsILoginManager ...
nsIMsgDBHdr
me); void setProperty(in string propertyName, in AString propertyStr); void setStringProperty(in string propertyName, in string propertyValue); string getStringProperty(in string propertyName); unsigned long getUint32Property(in string propertyName); void setUint32Property(in string propertyName, in unsigned long propertyVal); void markRead(in
boolean read); void markFlagged(in
boolean flagged); void markHasAttachments(in
boolean hasAttachments); void setPriorityString(in string priority); unsigned long OrFlags(in unsigned long flags); unsigned long AndFlags(in unsigned long flags); void setReferences(in string references); ACString getStringReference(in long refNum); void...
...If you want to know whether the message is the root of an ignored subthread then you should check for ...
...onKey(out octetPtr key, out unsigned long len); [noscript] void getSubjectCollationKey(out octetPtr key, out unsigned long len); [noscript] void getRecipientsCollationKey(out octetPtr key, out unsigned long len); Attributes Attribute Type Description isRead
boolean Readonly: Indicates whether or not the message is read. isFlagged
boolean Readonly: Indicates whether or not the message is starred in the UI. isKilled
boolean Readonly: Indicates whether or not this message belongs to a subthread that has been ignored in the UI. If you want to know whether the message is the root of an ignored subthread then you should check for the Ignored flag. Any children of the ignored message will be marked as read when added t...
...perty() void setUint32Property(in string propertyName, in unsigned long propertyVal); Parameters propertyName The name of the property to set. propertyVal The value of the property. markRead() Marks this header as read. Thunderbird provides a utility function which performs this for the currently selected message: MarkCurrentMessageAsRead(). void markRead(in
boolean read); Parameters read If true, mark as read. If false mark as undread. markFlagged() void markFlagged(in
boolean flagged); Parameters flagged If true, mark as flagged. If false remove flag. markHasAttachments() void markHasAttachments(in
boolean hasAttachments); Parameters hasAttachments If true, mark as having attachments. If false mark as not having attachments. set...
nsIMsgHeaderParser
If any of the addresses doesn't have a mailbox, then the user name is used instead. AUTF8String extractHeaderAddress...
...If any of the addresses doesn't have a mailbox, then the user name is used instead. AUTF8String extractHeaderAddressMailboxes( in string line ); Parameters line The header line to parse. Return valu...
...e duplicate addresses. Exceptions thrown Missing Exception Missing Description Native code only!unquotePhraseOrAddr This function removes the quoting if you want to show the names to users. e.g. summary file, address book. If preserveIntegrity is set to true, quote will not be removed in case the name part of the email contains a comma. string unquotePhraseOrAddr( in string line, in
boolean preserveIntegrity ); Parameters line The header line to parse. preserveIntegrity Set to true, quote will not be removed Return value User friendly names Exceptions thrown Missing Exception Missing Description unquotePhraseOrAddrWString() This function removes the quoting if you want to show the names to users. e.g. summary file, address book. If preserveIntegrity is set to true...
...e User friendly names Exceptions thrown Missing Exception Missing Description unquotePhraseOrAddrWString() This function removes the quoting if you want to show the names to users. e.g. summary file, address book. If preserveIntegrity is set to true, quote will not be removed in case the name part of the email contains a comma. wstring unquotePhraseOrAddrWString( in wstring line, in
boolean preserveIntegrity ); Parameters line The header line to parse. preserveIntegrity Missing Description Return value Missing Description Exceptions thrown Missing Exception Missing Description Remarks I think some of the charset parameters might be obsolete... So this page is still W.I.P. See also ...
nsIMsgProtocolInfo
The nsIMsgProtocolInfo interface describes the capabilities of an account type. Inherits from: nsISupports Implemented by: @mozilla.org/messenger/protocol/info;1?type=acct, where acct is the account type that are you are interested in. Method overview long getDefaultServerPort(in
boolean isSecure); Attributes Attribute Type Description canDelete
boolean True if an account of this type may be deleted. Read only. canDuplicate
boolean Unused. Read only. canGetIncomingMessages
boolean True if Junk UI actions should be enabled for the account type. Read only. canGetMessages
boolean True if "Get Messages" UI actions should be enabled for the account type. Read only. canLoginAtStartUp boo...
... Unused. Read only. canGetIncomingMessages
boolean True if Junk UI actions should be enabled for the account type. Read only. canGetMessages
boolean True if "Get Messages" UI actions should be enabled for the account type. Read only. canLoginAtStartUp
boolean True if the account type can perform biff during startup. Read only. defaultDoBiff
boolean True if the biff should be enabled by default for the account type. Read only. defaultLocalFilePath nsILocalFile The default path under which all server data for this account type will be stored. foldersCreateAsync
boolean New in Thunderbird 24 (bug 832034) preflightPrettyNameWithEmailAddress
boolean Unused. Read only. requiresUsername b...
... foldersCreateAsync
boolean New in Thunderbird 24 (bug 832034) preflightPrettyNameWithEmailAddress
boolean Unused. Read only. requiresUsername
boolean True if the server requires a username to log on. Read only. serverIID nsIIDPtr The IID of the server-specific interface, used during account creation. Read only. showComposeMsgLink
boolean True if Compose UI actions should be enabled for the account type. Read only. specialFoldersDeletionAllowed
boolean True if the user can delete folders like Inbox, Trash, etc. Read only. Methods getDefaultServerPort() Returns the default port for a connection to a server of this account type. ...
... Return value The default port number for connections of this account type. Remarks This is one of the interfaces that is required to create a new account type. ...
nsIMsgSearchCustomTerm
es are not allowed, the id must not * parse to an integer, and names of standard search * attributes in SearchAttribEntryTable in nsMsgSearchTerm.cpp * are not allowed. */ readonly attribute ACString id; name /// name to display in term list. This should be localized. ...
...oes this term need the message body? readonly attribute
boolean needsBody; Methods getEnabled /** * Is this custom term enabled? * * @param scope search scope (nsMsgSearchScope) * @param op search operator (nsMsgSearchOp). If null, determine * if term is available for any operator. * * @return true if enabled */
boolean getEnabled(in nsMsgSearchScopeValue scope, in nsMsgSearchOpValue op); getAvailable /** * Is this custom term available? * * @param scope search scope (nsMsgSearchScope) * @param op search operator (nsMsgSearchOp). If null, determine * if term is available for any operator. * * @return true if ...
...sgSearchScopeValue scope, in nsMsgSearchOpValue op); getAvailable /** * Is this custom term available? * * @param scope search scope (nsMsgSearchScope) * @param op search operator (nsMsgSearchOp). If null, determine * if term is available for any operator. * * @return true if available */
boolean getAvailable(in nsMsgSearchScopeValue scope, in nsMsgSearchOpValue op); getAvailableOperators /** * List the valid operators for this term. * * @param scope search scope (nsMsgSearchScope) * @param length object to hold array length * * @return array of operators */ void getAvailableOperators(in nsMsgSearchScopeValue ...
...sgSearchOpValue operators); match /** * Apply the custom search term to a message * * @param msgHdr header database reference representing the message * @param searchValue user-set value to use in the search * @param searchOp search operator (Contains, IsHigherThan, etc.) * * @return true if the term matches the message, else false */
boolean match(in nsIMsgDBHdr msgHdr, in AUTF8String searchValue, in nsMsgSearchOpValue searchOp); ...
nsIMsgThread
The nsIMsgFolder interface is used to interact with threads in Thunderbird. ...
... flags unsigned long Flags attached to the thread. subject ACString Subject of the thread newestMsgDate...
...t of the thread newestMsgDate unsigned long numChildren unsigned long Readonly: Number of messages in the thread. numUnreadChildren unsigned long Readonly: Number of unread messages in the thread. Methods addChild() Add a message to the thread. void addChild(in nsIMsgDBHdr child, in nsIMsgDBHdr inReplyTo, in
boolean threadInThread, in nsIDBChangeAnnouncer announcer); Parameters child The message to add inReplyTo The message this should be in reply to threadInThread announcer An nsIDBChangeAnnouncer to receive notification when the change is made. getChildAt() Returns the message at an index. nsIMsgDBHdr getChildAt(in long index); Parameters index The index to get the m...
... of the root. removeChildAt() void removeChildAt(in long index); Parameters index The index to remove the message from removeChildHdr() void removeChildHdr(in nsIMsgDBHdr child, in nsIDBChangeAnnouncer announcer); Parameters child The message to remove announcer An nsIDBChangeAnnouncer to receive notification when the change is made. markChildRead() void markChildRead(in
boolean bRead); Parameters bRead true if the messages should be marked read. false if unread. getFirstUnreadChild() nsIMsgDBHdr getFirstUnreadChild(); enumerateMessages() nsISimpleEnumerator enumerateMessages(in nsMsgKey parent); Parameters parent A key representing the message to start enumerating with. ...
nsIMutableArray
mentAt(). Conversely, if insertElementAt() is never used, and null elements are never explicitly added to the array, then it is guaranteed that nsIArray.queryElementAt() will never return a null value. Any of these methods may throw NS_ERROR_OUT_OF_MEMORY when the array must grow to complete the call, but the allocation fails. Method overview void appendElement(in nsISupports element, in
boolean weak); void clear(); void insertElementAt(in nsISupports element, in unsigned long index, in
boolean weak); void removeElementAt(in unsigned long index); void replaceElementAt(in nsISupports element, in unsigned long index, in
boolean weak); Methods appendElement() Append an element at the end of the array. void appendElement( in nsISupports element, ...
... weak Whether or not to store the element using a weak reference. Exceptions thrown NS_ERROR_FAILURE When a weak reference is requested, but the element does not support nsIWeakReference. ...
...s requested, but the element does not support nsIWeakReference. clear() Clear the entire array, releasing all stored objects. void clear(); Parameters None. insertElementAt() Insert an element at the given position, moving the element currently located in that position, and all elements in higher position, up by one. void insertElementAt( in nsISupports element, in unsigned long index, in
boolean weak ); Parameters element The element to insert. index The position in the array: If the position is lower than the current length of the array, the elements at that position and onwards are bumped one position up. If the position is equal to the current length of the array, the new element is appended. An index lower than 0 or higher than the current length of the array is inv...
...l elements stored at a higher position down one. To remove a specific element, use nsIArray.indexOf() to find the index first, then call removeElementAt. void removeElementAt( in unsigned long index ); Parameters index The position of the item. replaceElementAt() Replace the element at the given position. void replaceElementAt( in nsISupports element, in unsigned long index, in
boolean weak ); Parameters element The new element to insert. index The position in the array. If the position is lower than the current length of the array, an existing element will be replaced. If the position is equal to the current length of the array, the new element is appended. If the position is higher than the current length of the array, empty elements are appended followed by...
nsITreeSelection
nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void adjustSelection(in long index, in long count); void clearRange(in long startIndex, in long endIndex); void clearSelection(); void getRangeAt(in long i, out long min, out long max); long getRangeCount(); void invalidateSelection(); void invertSelection();
boolean isSelected(in long index); void rangedSelect(in long startIndex, in long endIndex, in
boolean augment); void select(in long index); void selectAll(); void timedSelect(in long index, in long delay); void toggleSelect(in long index); Attributes Attribute Type Description count long The number of rows currently selected...
...Column nsITreeColumn The current column. currentIndex long The current item (the one with focus). Note: This property indicates only the index of the row with tree cursor around it. This is not a reliable method of determining the selected row, as the selection may include multiple rows, or the focused row may not even be selected. selectEventsSuppressed
boolean This attribute is a
boolean indicating whether or not the "select" event should fire when the selection is changed using one of our methods. A view can use this to temporarily suppress the selection while manipulating all of the indices, for example, on a sort. Note: Setting this attribute to false will fire a select event. shiftSelectPivot long The selection "pivot". T...
... the selection is changed using one of our methods. A view can use this to temporarily suppress the selection while manipulating all of the indices, for example, on a sort. Note: Setting this attribute to false will fire a select event. shiftSelectPivot long The selection "pivot". This is the first item the user selected as part of a ranged select. Read only. single
boolean This attribute is a
boolean indicating single selection. Read only. tree nsITreeBoxObject The tree widget for this selection. Methods adjustSelection() Called when the row count changes to adjust selection indices. void adjustSelection( in long index, in long count ); Parameters index Index of the change. count Number of rows changed. clearRange() Cl...
...ount of selection ranges. long getRangeCount(); Parameters None. Return value long - number of selection ranges invalidateSelection() Can be used to invalidate the selection. void invalidateSelection(); Parameters None. invertSelection() Inverts the selection. void invertSelection(); Parameters None. isSelected() Indicates whether or not the row at the specified index is part of the selection.
boolean isSelected( in long index ); Parameters index Index of the row to check. Return value rangedSelect() Select the range specified by the indices. void rangedSelect( in long startIndex, in long endIndex, in
boolean augment ); Parameters startIndex Index to start selecting at. endIndex Index to stop selecting at. This parameter is inclusive; to select one item, s...
nsIUserCertPicker
security/manager/ssl/public/nsIUserCertPicker.idlScriptable Please add a summary to this article. ...
... security/manager/ssl/public/nsIUserCertPicker.idlScriptable Please add a summary to this article. ...
... security/manager/ssl/public/nsIUserCertPicker.idlScriptable Please add a summary to this article. ...
... Inherits from: nsISupports Last changed in Gecko 1.7 Method overview nsIX509Cert pickByUsage(in nsIInterfaceRequestor ctx, in wstring selectedNickname, in long certUsage, in
boolean allowInvalid, in
boolean allowDuplicateNicknames, out
boolean canceled); Methods pickByUsage() nsIX509Cert pickByUsage( in nsIInterfaceRequestor ctx, in wstring selectedNickname, in long certUsage, in
boolean allowInvalid, in
boolean allowDuplicateNicknames, out
boolean canceled ); Parameters ctx selectedNickname certUsage allowInvalid allowDuplicateNicknames canceled Return value ...
nsIWebBrowserFind
rts Last changed in Gecko 1.7 Get one by doing a GetInterface on an nsIWebBrowser. By default, the implementation will search the focused frame, or if there is no focused frame, the web browser content area. It does not by default search subframes or iframes. To change this behavior, and to explicitly set the frame to search, QueryInterface to nsIWebBrowserFindInFrames. Method overview
boolean findNext(); Attributes Attribute Type Description entireWord
boolean Whether to match entire words only. Default is false. findBackwards
boolean Whether to find backwards (towards the beginning of the document). Default is false (search forward). matchCase
boolean Whether to match case (case sensitive) when searching. Default is fa...
...Default is true. Note: That you can control whether the search propagates into child or parent frames explicitly using nsIWebBrowserFindInFrames, but if one, but not both, of searchSubframes and searchParentFrames are set, this returns false. ...
...ugh all frames in the content area. Default is true. Note: That you can control whether the search propagates into child or parent frames explicitly using nsIWebBrowserFindInFrames, but if one, but not both, of searchSubframes and searchParentFrames are set, this returns false. searchString wstring The string to search for. This must be non-empty to search. ...
...Return value Whether an occurrence was found. ...
nsIXPConnect
nfo aClassInfo, in nsIXPConnectJSObjectHolder aPrototype); void setDebugModeWhenPossible(in PRBool mode); Native code only! void setDefaultSecurityManager(in nsIXPCSecurityManager aManager, in PRUint16 flags); nsIXPCFunctionThisTranslator setFunctionThisTranslator(in nsIIDRef aIID, in nsIXPCFunctionThisTranslator aTranslator); void setReportAllJSExceptions(in
boolean reportAllJSExceptions); void setSafeJSContextForCurrentThread(in JSContextPtr cx); void setSecurityManagerForJSContext(in JSContextPtr aJSContext, in nsIXPCSecurityManager aManager, in PRUint16 flags); void syncJSContexts(); void updateXOWs(in JSContextPtr aJSContext, in nsIXPConnectWrappedNative aObject, in PRUint32 aWay); Native code only! Obsolete since Ge...
... CurrentNativeCallContext nsAXPCNativeCallContextPtr Read only. deferReleasesUntilAfterGarbageCollection P...
...escription Return value Missing Description Exceptions thrown Missing Exception Missing Description setReportAllJSExceptions() Whether or not XPConnect should report all JS exceptions when returning from JS into C++. False by default, although any value set in the MOZ_REPORT_ALL_JS_EXCEPTIONS environment variable will override the value passed here. void setReportAllJSExceptions( in
boolean reportAllJSExceptions ); Parameters reportAllJSExceptions Missing Description Exceptions thrown Missing Exception Missing Description setSafeJSContextForCurrentThread() Set fallback JSContext to use when xpconnect can't find an appropriate context to use to execute JavaScript. Note: This method is DEPRECATED. Use nsIThreadJSContextStack::safeJSContext instead. void setSafeJSConte...
...in the proper type of security wrapper on top of the XPCWrappedNative (if needed). This method doesn't push aJSContext on the context stack, so the caller is required to push it if the top of the context stack is not equal to aJSContext. ...
nsIXULWindow
ndow. When the window is destroyed, it will fire a "xul-window-destroyed" notification through the global observer service. This signals the application in case it needs to quit. ...
...w is destroyed, it will fire a "xul-window-destroyed" notification through the global observer service. This signals the application in case it needs to quit. Method overview void addChildWindow(in nsIXULWindow aChild); void applyChromeFlags(); Native code only! void assumeChromeFlagsAreFrozen(); void center(in nsIXULWindow aRelative, in
boolean aScreen, in
boolean aAlert); nsIXULWindow createNewWindow(in PRInt32 aChromeFlags, in nsIAppShell aAppShell); nsIDocShellTreeItem getContentShellById(in wstring ID); void removeChildWindow(in nsIXULWindow aChild); void showModal(); Attributes Attribute Type Description chromeFlags PRUint32 chromeFlags are from nsIWebBrowserChrome. co...
...Window(in nsIXULWindow aChild); void showModal(); Attributes Attribute Type Description chromeFlags PRUint32 chromeFlags are from nsIWebBrowserChrome. contextFlags PRUint32 contextFlags are from nsIWindowCreator2. docShell nsIDocShell The docshell owning the XUL for this window. Read only. intrinsicallySized
boolean Indicates if this window is instrinsically sized. primaryContentShell nsIDocShellTreeItem The primary content shell. Note: That this is a docshell tree item and therefore can not be assured of what object it is. It could be an editor, a docshell, or a browser object. Or down the road any other object that supports being a DocShellTreeItem Query accordingly to determine ...
...ent in its docshell could cause problems. void applyChromeFlags(); Parameters None. assumeChromeFlagsAreFrozen() Begin assuming chromeFlags do not change hereafter, and assert if they do change. The state change is one-way and idempotent. void assumeChromeFlagsAreFrozen(); Parameters None. center() Move the window to a centered position. void center( in nsIXULWindow aRelative, in
boolean aScreen, in
boolean aAlert ); Parameters aRelative If not null, the window relative to which the window is moved. See aScreen parameter for details. aScreen true to center the window relative to the screen containing aRelative if aRelative is not null. If aRelative is null then relative to the screen of the opener window if it was initialized by passing it to nsWebShellWindow::Initializ...
nsIXmlRpcClient
null if the last call didn't return an XML-RPC fault. result readonly nsISupports The most recent XML-RPC call result returned from this server. null if the last call didn't return a valid result. responseStatus readonly unsigned long The most recent HTTP status c...
...t. responseStatus readonly unsigned long The most recent HTTP status code returned from this server. null if the server was unreachable or not yet contacted. responseString readonly unsigned long The most recent HTTP status code returned from this server. null if the server was unreachable or not yet contacted. Constants Constant Type Description INT unsigned long nsISupportsPRInt32
BOOLEAN unsigned long nsISupportsPRBool STRING unsigned long nsISupportsCString DOUBLE unsigned long nsISupportsDouble DATETIME unsigned long nsISupportsPRTime ARRAY readonly unsigned long nsISupportsArray STRUCT readonly unsigned long nsISupportsDictionary Methods init() Set server URL. Call this before using this object void getData ( in string serverURL ) ; Parameters serverURL ...
...et character encoding. The default charset if this function is not called is "UTF-8" void setAuthentication ( in string encoding ) ; Parameters encoding encoding charset to be used asyncCall() Call remote method methodName asynchronously with given arguments. ...
...Via nsIXPConnect::GetPendingException()->data a nsIXmlRpcFault object can be retreieved with more information on the fault. ...
XPIDL
perties applied to them. Types There are three ways to make types: a typedef, a native, or an interface. In addition, there are a few built-in native types. The built-in native types are those listed under the type_spec production above. ...
...pes There are three ways to make types: a typedef, a native, or an interface. In addition, there are a few built-in native types. The built-in native types are those listed under the type_spec production above. ...
...reflected as objects having the .value property which contains the real value of the parameter; it is not initialized in the case of out parameters and is initialized to the passed-in-value for inout parameters. The script code would need to set this property to assign a value to the parameter. Regular in parameters are reflected more or less normally, with numeric types all representing numbers,
booleans as true or false, the various strings (including AString et al) as a JavaScript string, and nsid types as a Components.ID instance. In addition, the jsval type is translated as the appropriate JavaScript value (since a jsval is the internal representation of all JavaScript values), and objects that are marked nsIVariant have their types automatically boxed and unboxed as appropriate. The equiv...
...nboxed as appropriate. The equivalent representations of all IDL types in native code is given in the earlier tables; parameters of type inout follow their out form. Native code should pay particular attention to not passing in null values for out parameters (although some parts of the codebase are known to violate this, it is strictly enforced at the JS<->native barrier), and also ensuring that
boolean types only receive values of 0 (false) or 1 (true). Representations of types additionally depend on some of the many types of properties they may have. The array property turns the parameter into an array; the parameter must also have a corresponding size_is property whose argument is the parameter that has the size of the array. In native code, the type gains another pointer indirection, and Ja...
BluetoothCharacteristicProperties - Web APIs
The BluetoothCharacteristicProperties interface of the the Web Bluetooth API provides the operations that are valid on the given BluetoothRemoteGATTCharacteristic. This interface is returned by calling BluetoothRemoteGATTCharacteristic.properties. Properties authenticatedSignedWritesRead only Returns a
boolean that is true if signed writing to the characteristic value is permitted. ...
...sticProperties interface of the the Web Bluetooth API provides the operations that are valid on the given BluetoothRemoteGATTCharacteristic. This interface is returned by calling BluetoothRemoteGATTCharacteristic.properties. Properties authenticatedSignedWritesRead only Returns a
boolean that is true if signed writing to the characteristic value is permitted. broadcastRead only Returns a
boolean that is true if the broadcast of the characteristic value is permitted using the Server Characteristic Configuration Descriptor. indicateRead only Returns a
boolean that is true if indications of the characteristic value with acknowledgement is permitted. notifyRead only Returns a
boolean that is true if notifications of the characteristic value without acknowledgement is permitted. readRe...
... broadcast of the characteristic value is permitted using the Server Characteristic Configuration Descriptor. indicateRead only Returns a
boolean that is true if indications of the characteristic value with acknowledgement is permitted. notifyRead only Returns a
boolean that is true if notifications of the characteristic value without acknowledgement is permitted. readRead only Returns a
boolean that is true if the reading of the characteristic value is permitted. reliableWriteRead only Returns a
boolean that is true if reliable writes to the characteristic is permitted. ...
...mitted. notifyRead only Returns a
boolean that is true if notifications of the characteristic value without acknowledgement is permitted. readRead only Returns a
boolean that is true if the reading of the characteristic value is permitted. reliableWriteRead only Returns a
boolean that is true if reliable writes to the characteristic is permitted. writableAuxiliariesRead only Returns a
boolean that is true if reliable writes to the characteristic descriptor is permitted. writeRead only Returns a
boolean that is true if the writing to the characteristic with response is permitted. writeWithoutResponseRead only Returns a
boolean that is true if the writing to the characteristic without response is permitted. Examples The following example shows how tell if a GATT characteristic ...
Document.execCommand() - Web APIs
e region, such as form inputs or contentEditable elements. Most commands affect the document's selection (bold, italics, etc.), while others insert new elements (adding a link), or affect an entire line (indenting). When using contentEditable, execCommand() affects the currently active editable element. ...
...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 null if no argument is needed. ...
...sed in as a value argument. Note that Internet Explorer uses this to set the text background color. bold Toggles bold on/off for the selection or at the insertion point. Internet Explorer uses the <strong> tag instead of <b>. ClearAuthenticationCache Clears all authentication credentials from the cache. contentReadOnly Makes the content document either read-only or editable. This requires a
boolean true/false as the value argument. (Not supported by Internet Explorer.) copy Copies the current selection to the clipboard. Conditions of having this behavior enabled vary from one browser to another, and have evolved over time. Check the compatibility table to determine if you can use it in your case. createLink Creates an hyperlink from the selection, but only if there is a selection. Requi...
...or the selection or at the insertion point. superscript Toggles superscript on/off for the selection or at the insertion point. underline Toggles underline on/off for the selection or at the insertion point. undo Undoes the last executed command. unlink Removes the anchor element from a selected hyperlink. useCSS Toggles the use of HTML tags or CSS for the generated markup. Requires a
boolean true/false as a value argument. NOTE: This argument is logically backwards (i.e. use false to use CSS, true to use HTML) and unsupported by Internet Explorer. This has been deprecated in favor of styleWithCSS. styleWithCSS Replaces the useCSS command. true modifies/generates style attributes in markup, false generates presentational elements. Example An example of how to use it on CodePen. ...
HTMLButtonElement - Web APIs
no,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
Boolean indicating whether or not the control is disabled, meaning that it does not accept any clicks. HTMLButtonElement.fo...
... submit the form to the server. If specified, this attribute overrides the enctype attribute of the <form> element that owns this element. HTMLButtonElement.formMethod Is a DOMString reflecting the HTTP method that the browser uses to submit the form. If specified, this attribute overrides the method attribute of the <form> element that owns this element. HTMLButtonElement.formNoValidate Is a
Boolean indicating that the form is not to be validated when it is submitted. If specified, this attribute overrides the novalidate attribute of the <form> element that owns this element. HTMLButtonElement.formTarget Is a DOMString reflecting a name or keyword indicating where to display the response that is received after submitting the form. If specified, this attribute overrides the target attribute...
...his is an enumerated attribute with the following possible values: submit: The button submits the form. This is the default value if the attribute is not specified, HTML5 or if it is dynamically changed to an empty or invalid value. reset: The button resets the form. button: The button does nothing. menu: The button displays a menu. HTMLButtonElement.willValidate Read only Is a
Boolean indicating whether the button is a candidate for constraint validation. It is false if any conditions bar it from constraint validation, including: its type property is reset or button; it has a <datalist> ancestor; or the disabled property is set to true. HTMLButtonElement.validationMessage Read only Is a DOMString representing the localized message that describes the validation constraints t...
...idate is false), or it satisfies its constraints. HTMLButtonElement.validity Read only Is a ValidityState representing the validity states that this button is in. HTMLButtonElement.value Is a DOMString representing the current form control value of the button. Methods Inherits methods from its parent, HTMLElement Name Return Type Description checkValidity()
Boolean Not supported for reset or button elements. reportValidity()
Boolean Not supported for reset or button elements. setCustomValidity(in DOMString error) void Not supported for reset or button elements. With Gecko-based browser, use the :-moz-submit-invalid pseudo-class to style submit buttons based on the validation of a form. Specifications Specif...
HTMLCanvasElement.getContext() - Web APIs
test suite conformance, or the graphics drivers on the platform are not yet stable. The Khronos Group certifies WebGL implementations under certain conformance rules. ...
...t attributes when creating your rendering context, for example: const gl = canvas.getContext('webgl', { antialias: false, depth: false }); 2d context attributes: alpha:
Boolean that indicates if the canvas contains an alpha channel. If set to false, the browser now knows that the backdrop is always opaque, which can speed up drawing of transparent content and images. desynchronized:
Boolean that hints the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop (Gecko only) willReadFrequently:
Boolean that indicates whether or not a lot of read-back operations are planned. This will force the use of a software (instead of hardware accelerated) 2D canvas and can save memory when calling getImageData() frequently. This option is only availabl...
...ware (instead of hardware accelerated) 2D canvas and can save memory when calling getImageData() frequently. This option is only available, if the flag gfx.canvas.willReadFrequently.enable is set to true (which, by default, is only the case for B2G/Firefox OS). (Blink only) storage: String that indicates which storage is used ("persistent" by default). WebGL context attributes: alpha:
Boolean that indicates if the canvas contains an alpha buffer. desynchronized:
Boolean that hints the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop antialias:
Boolean that indicates whether or not to perform anti-aliasing. depth:
Boolean that indicates that the drawing buffer has a depth buffer of at least 16 bits. failIfMajorPerformanceCaveat: Bo...
... user agent indicating what configuration of GPU is suitable for the WebGL context. Possible values are: "default": Let the user agent decide which GPU configuration is most suitable. This is the default value. "high-performance": Prioritizes rendering performance over power consumption. "low-power": Prioritizes power saving over rendering performance. premultipliedAlpha:
Boolean that indicates that the page compositor will assume the drawing buffer contains colors with pre-multiplied alpha. preserveDrawingBuffer: If the value is true the buffers will not be cleared and will preserve their values until cleared or overwritten by the author. stencil:
Boolean that indicates that the drawing buffer has a stencil buffer of at least 8 bits. Return value A RenderingCo...
MediaTrackConstraints - Web APIs
t 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 Constrain
Boolean object which specifies whether automatic gain control is preferred and/or required. channelCount A ConstrainLong specifying the channel count or range of channel counts which are acceptable and/or required. echoCancellation A Constrain
Boolean object specifying whether or not echo cancellation is preferred and/or required. latency A ConstrainDouble specifying the latency or range of latencie...
... sampleRate A ConstrainLong specifying the sample rate or range of sample rates which are acceptable and/or required. ...
...saturation A ConstrainDouble (a double-precision integer) specifying the degree of color intensity. sharpness A ConstrainDouble (a double-precision integer) specifying the intensity of edges. focusDistance A ConstrainDouble (a double-precision integer) specifying distance to a focused object. zoom 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. fram...
...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 user. monitor The stream's video track contains the entire contents of one or more of the user's screens. window The stream contains a single window selected by the user for sharing. logicalSurface A Constrain
Boolean value which may contain a single
Boolean value or a set of them, indicating whether or not to allow the user to choose source surfaces which do not directly correspond to display areas. These may include backing buffers for windows to allow capture of window contents that are hidden by other windows in front of them, or buffers containing larger documents that need to be scrolled through to see t...
MediaTrackSettings - Web APIs
o a phone would share the same group ID, since they're part of the same physical device. The microphone on a headset would have a different ID, though. This value is specific to the source of the track's data and is not usable for setting constraints; it can, however, be used for initially selecting media when calling MediaDevices.getUserMedia(). Properties of audio tracks autoGainControl A
Boolean which indicates the current value of the autoGainControl property, which is true if automatic gain control is enabled and is false otherwise. channelCount A long integer value indicating the current value of the channelCount property, specifying the number of audio channels present on the track (therefore indicating how many audio samples exist in each audio frame). This is 1 for mono, 2 for st...
... autoGainControl property, which is true if automatic gain control is enabled and is false otherwise. channelCount A long integer value indicating the current value of the channelCount property, specifying the number of audio channels present on the track (therefore indicating how many audio samples exist in each audio frame). This is 1 for mono, 2 for stereo, and so forth. echoCancellation A
Boolean indicating the current value of the echoCancellation property, specifying true if echo cancellation is enabled, otherwise false. latency A double-precision floating point value indicating the current value of the latency property, specifying the audio latency, in seconds. Latency is the amount of time which elapses between the start of processing the audio and the data being available to the ne...
...ision floating point value indicating the current value of the latency property, specifying the audio latency, in seconds. Latency is the amount of time which elapses between the start of processing the audio and the data being available to the next stop in the audio utilization process. This value is a target value; actual latency may vary to some extent for various reasons. noiseSuppression A
Boolean which indicates the current value of the noiseSupression property, which is true if noise suppression is enabled and is false otherwise. sampleRate A long integer value indicating the current value of the sampleRate property, specifying the sample rate in samples per second of the audio data. Standard CD-quality audio, for example, has a sample rate of 41,000 samples per second. sampleSize ...
...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 user. monitor The stream's video track contains the entire contents of one or more of the user's screens. window The stream contains a single window selected by the user for sharing. logicalSurface A
Boolean value which, if true, indicates that the video contained in the stream's video track contains a background rendering context, rather than a user-visible one. This is false if the video being captured is coming from a foreground (user-visible) source. Specifications Specification Status Comment Screen CaptureThe definition of 'MediaTrackSettings' in that specification. ...
OffscreenCanvas.getContext() - Web APIs
graphic drivers situation on the platform is not yet stable. The Khronos Group certifies WebGL implementations under certain conformance rules. contextAttributes You can use several context attributes when creating your rendering context, for example: offscreen.getContext("webgl", { antialias: false, depth: false }); 2d context attributes: alpha:
Boolean that indicates if the canvas contains an alpha channel. If set to false, the browser now knows that the backdrop is always opaque, which can speed up drawing of transparent content and images then. (Gecko only) willReadFrequently:
Boolean that indicates whether or not a lot of read-back operations are planned. This will force the use of a software (instead of hardware accelerated) 2D canvas a...
...ware (instead of hardware accelerated) 2D canvas and can save memory when calling getImageData() frequently. This option is only available, if the flag gfx.canvas.willReadFrequently.enable is set to true (which, by default, is only the case for B2G/Firefox OS). (Blink only) storage: String that indicates which storage is used ("persistent" by default). ...
...n calling getImageData() frequently. This option is only available, if the flag gfx.canvas.willReadFrequently.enable is set to true (which, by default, is only the case for B2G/Firefox OS). (Blink only) storage: String that indicates which storage is used ("persistent" by default). WebGL context attributes: alpha:
Boolean that indicates if the canvas contains an alpha buffer. depth:
Boolean that indicates that the drawing buffer has a depth buffer of at least 16 bits. stencil:
Boolean that indicates that the drawing buffer has a stencil buffer of at least 8 bits. antialias:
Boolean that indicates whether or not to perform anti-aliasing. premultipliedAlpha:
Boolean that indicates that the page compositor will assume the drawing buffer contains colors with pre-multiplied alpha. ...
... Return value A RenderingContext which is either a CanvasRenderingContext2D for "2d", WebGLRenderingContext for "webgl" and "experimental-webgl", WebGL2RenderingContext for "webgl2" and "experimental-webgl2" , or ImageBitmapRenderingContext for "bitmaprenderer". ...
Screen Capture API - Web APIs
ntly being captured includes the mouse cursor, and if so, whether it's only visible while the mouse is in motion or if it's always visible. The value is one of always, motion, or never. MediaTrackSettings.displaySurface A string indicating what type of display surface is currently being captured. The value is one of application, browser, monitor, or window. ...
...kSettings.displaySurface A string indicating what type of display surface is currently being captured. The value is one of application, browser, monitor, or window. MediaTrackSettings.logicalSurface A
Boolean value which is true if the video being captured doesn't directly correspond to a single onscreen display area. MediaTrackSupportedConstraints MediaTrackSupportedConstraints.cursor A
Boolean which is true if the user agent and device support the MediaTrackConstraints.cursor constraint. ...
... Dictionaries The following dictionaries are defined by the Screen Capture API. ...
... Dictionaries The following dictionaries are defined by the Screen Capture API. ...
WebGLRenderingContext.getUniform() - Web APIs
of a uniform variable at a given location. Syntax any gl.getUniform(program, location); Parameters program A WebGLProgram containing the uniform attribute. location A WebGLUniformLocation object containing the location of the uniform attribute to get. ...
...variable at a given location. Syntax any gl.getUniform(program, location); Parameters program A WebGLProgram containing the uniform attribute. location A WebGLUniformLocation object containing the location of the uniform attribute to get. ...
...tion object containing the location of the uniform attribute to get. ...
...type Returned type WebGL 1 only
boolean GL
Boolean int GLint float GLfloat vec2 Float32Array (with 2 elements) ivec2 Int32Array (with 2 elements) bvec2 Array of GL
Boolean (with 2 elements) vec3 Float32Array (with 3 elements) ivec3 Int32Array (with 3 elements) bvec3 Array of GL
Boolean (with 3 elements) vec4 Float32Array (with 4 elements) ivec4 Int32Array (with 4 elements) bvec4 Array of GL
Boolean (with 4 elements) mat2 Float32Array (with 4 elements) mat3 Float32Array (with 9 elements) mat4 Float32Array (with 16 elements) sampler2D GLint samplerCube GLint Additionally availa...
WindowOrWorkerGlobalScope.setInterval() - Web APIs
If you want to work on it with browsers that natively do not support this feature, use one of the methods proposed above. Syntax var myDaemon = new MiniDaemon(thisObject, callback[, ...
... callback function, the length, the frame-rate). Arguments thisObject The this object on which the callback function is called. It can be an object or null. callback The function that is repeatedly invoked . It is called with three arguments: index (the iterative index of each invocation), length (the number of total invocations assigned to the daemon - finite or Infinity) and backwards (a
boolean expressing whether the index is increasing or decreasing). It is something like callback.call(thisObject, index, length, backwards). If the callback function returns a false value the daemon is paused. rate (optional) The time lapse (in number of milliseconds) between each invocation. The default value is 100. length (optional) The total number of invocations. It can be a positive integer or ...
... MiniDaemon instances properties myDaemon.owner The this object on which is executed the daemon (read/write). It can be an object or null. myDaemon.task The function that is repeatedly invoked (read/write). It is called with three arguments: index (the iterative index of each invocation), length (the number of total invocations assigned to the daemon - finite or Infinity) and backwards (a
boolean expressing whether the index is decreasing or not) - see above. If the myDaemon.task function returns a false value the daemon is paused. myDaemon.rate The time lapse (in number of milliseconds) between each invocation (read/write). myDaemon.length The total number of invocations. It can be a positive integer or Infinity (read/write). MiniDaemon instances methods myDaemon.isAtEnd() Retu...
...ssing whether the index is decreasing or not) - see above. If the myDaemon.task function returns a false value the daemon is paused. myDaemon.rate The time lapse (in number of milliseconds) between each invocation (read/write). myDaemon.length The total number of invocations. It can be a positive integer or Infinity (read/write). MiniDaemon instances methods myDaemon.isAtEnd() Returns a
boolean expressing whether the daemon is at the start/end position or not. myDaemon.synchronize() Synchronize the timer of a started daemon with the time of its invocation. myDaemon.pause() Pauses the daemon. myDaemon.start([reverse]) Starts the daemon forward (index of each invocation increasing) or backwards (index decreasing). MiniDaemon global object methods MiniDaemon.forceCall(minidaemon...
HTML attribute reference - HTML: Hypertext Markup Language
wner. formmethod <button>, <input> If the button/input is a submit button (type="submit"), this attribute sets the submission method to use during form submission (GET, POST, etc.). If this attribute is specified, it overrides the method attribute of the button's form owner. formnovalidate <button>, <input> If the button/input is a submit button (type="submit"), this
boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the novalidate attribute of the button's form owner. formtarget <button>, <input> If the button/input is a submit button (type="submit"), this attribute specifies the browsing context (for example, tab, window, or inline frame) in which to display the response...
... (a signed long). When using IDL attributes, you read or set values of the desired type, so input.maxlength is always going to return a number and when you set input.maxlength, it wants a number. If you pass another type, it is automatically converted to a number as specified by the standard JavaScript rules for type conversion. IDL attributes can reflect other types such as unsigned long, URLs,
booleans, etc. Unfortunately, there are no clear rules and the way IDL attributes behave in conjunction with their corresponding content attributes depends on the attribute. Most of the time, it will follow the rules laid out in the specification, but sometimes it doesn't. HTML specifications try to make this as developer-friendly as possible, but for various reasons (mostly historical), some attributes ...
...ng content attributes depends on the attribute. Most of the time, it will follow the rules laid out in the specification, but sometimes it doesn't. HTML specifications try to make this as developer-friendly as possible, but for various reasons (mostly historical), some attributes behave oddly (select.size, for example) and you should read the specifications to understand how exactly they behave.
Boolean Attributes Some content attributes (e.g. required, readonly, disabled) are called
boolean attributes. If a
boolean attribute is present, its value is true, and if it's absent, its value is false. HTML5 defines restrictions on the allowed values of
boolean attributes: If the attribute is present, its value must either be the empty string (equivalently, the attribute may have an unassigned value)...
...s value is false. HTML5 defines restrictions on the allowed values of
boolean attributes: If the attribute is present, its value must either be the empty string (equivalently, the attribute may have an unassigned value), or a value that is an ASCII case-insensitive match for the attribute's canonical name, with no leading or trailing whitespace. The following examples are valid ways to mark up a
boolean attribute: <div itemscope> This is valid HTML but invalid XML. </div> <div itemscope=itemscope> This is also valid HTML but invalid XML. </div> <div itemscope=""> This is valid HTML and also valid XML. </div> <div itemscope="itemscope"> This is also valid HTML and XML, but perhaps a bit verbose. </div> To be clear, the values "true" and "false" are not allowed on
boolean attributes. To represen...
<input type="email"> - HTML: Hypertext Markup Language
The <datalist> provides a list of predefined values to suggest to the user for this input. Any values in the list that ...
...r value smaller than or equal to the value specified by maxlength. If no minlength is specified, or an invalid value is specified, the email input has no minimum length. The input will fail constraint validation if the length of the text entered into the field is fewer than minlength UTF-16 code units long. Constraint validation is only applied when the value is changed by the user. multiple A
Boolean attribute which, if present, indicates that the user can enter a list of multiple e-mail addresses, separated by commas and, optionally, whitespace characters. See Allowing multiple e-mail addresses for an example, or HTML attribute: multiple for more details. Note: Normally, if you specify the required attribute, the user must enter a valid e-mail address for the field to be considered valid.
... BiDi using Unicode control characters in The Unicode Bidirectional Text Algorithm for those characters. Note: Avoid using the placeholder attribute if you can. It is not as semantically useful as other ways to explain your form, and can cause unexpected technical issues with your content. See Labels and placeholders in <input>: The Input (Form Input) element for more information. readonly A
Boolean attribute which, if present, means this field cannot be edited by the user. Its value can, however, still be changed by JavaScript code directly setting the HTMLInputElement.value property. Note: Because a read-only field cannot have a value, required does not have any effect on inputs with the readonly attribute also specified. size The size attribute is a numeric value indicating how many ...
...ed like this: <input id="emailAddress" type="email"> Notice that it's considered valid when empty and when a single validly-formatted e-mail address is entered, but is otherwise not considered valid. By adding the required attribute, only validly-formed e-mail addresses are allowed; the input is no longer considered valid when empty. Allowing multiple e-mail addresses By adding the multiple
Boolean attribute, the input can be configured to accept multiple e-mail addresses. <input id="emailAddress" type="email" multiple> The input is now considered valid when a single e-mail address is entered, or when any number of e-mail addresses separated by commas and, optionally, some number of whitespace characters are present. Note: When multiple is used, the value is allowed to be empty. Som...
<input type="file"> - HTML: Hypertext Markup Language
This string is a comma-separated list of unique file type specifiers. Because a given file type may be identified in more than one manner, it's useful to provide a thorough set of type specifiers when you need file...
... user indicates that the user-facing camera and/or microphone should be used. A value of environment specifies that the outward-facing camera and/or microphone should be used. If this attribute is missing, the user agent is free to decide on its own what to do. If the requested facing mode isn't available, the user agent may fall back to its preferred default mode. ...
... Non-standard attributes In addition to the attributes listed above, the following non-standard attributes are available on some browsers. ...
...the user to select more than one file. Non-standard attributes In addition to the attributes listed above, the following non-standard attributes are available on some browsers. You should try to avoid using them when possible, since doing so will limit the ability of your code to function in browsers that don't implement them. Attribute Description webkitdirectory A
Boolean indicating whether or not to only allow the user to choose a directory (or directories, if multiple is also present) webkitdirectory The
Boolean webkitdirectory attribute, if present, indicates that only directories should be available to be selected by the user in the file picker interface. See HTMLInputElement.webkitdirectory for additional details and examples. Note: Though origin...
<input type="password"> - HTML: Hypertext Markup Language
This must be an integer value 0 or higher. If no maxlength is specified, or an invalid value is specified, the password ...
... BiDi using Unicode control characters in The Unicode Bidirectional Text Algorithm for those characters. Note: Avoid using the placeholder attribute if you can. It is not as semantically useful as other ways to explain your form, and can cause unexpected technical issues with your content. See Labels and placeholders in <input>: The Input (Form Input) element for more information. readonly A
Boolean attribute which, if present, means this field cannot be edited by the user. Its value can, however, still be changed from JavaScript code that directly sets the value of the HTMLInputElement.value property. Note: Because a read-only field cannot have a value, required does not have any effect on inputs with the readonly attribute also specified. size The size attribute is a numeric value ind...
...er in use. It may simply fill in a new suggested password, or it might show the user an interface for creating one. <label for="userPassword">Password:</label> <input id="userPassword" type="password" autocomplete="current-password"> Making the password mandatory To tell the user's browser that the password field must have a valid value before the form can be submitted, simply specify the
Boolean required attribute. <label for="userPassword">Password: </label> <input id="userPassword" type="password" required> <input type="submit" value="Submit"> Specifying an input mode If your recommended (or required) password syntax rules would benefit from an alternate text entry interface than the standard keyboard, you can use the inputmode attribute to request a specific one. The most obvious...
... automatically ensure that your passwords meet those requirements. In this example, only values consisting of at least four and no more than eight hexadecimal digits are valid. <label for="hexId">Hex ID: </label> <input id="hexId" type="password" pattern="[0-9a-fA-F]{4,8}" title="Enter an ID consisting of 4-8 hexadecimal digits" autocomplete="new-password"> disabled This
Boolean attribute indicates that the password field is not available for interaction. Additionally, disabled field values aren't submitted with the form. Examples Requesting a Social Security number This example only accepts input which matches the format for a valid United States Social Security Number. These numbers, used for tax and identification purposes in the US, are in the form "123-45-6789...
Expressions and operators - JavaScript
erand the specified number of bits to the right. Excess bits shifted off to the right are discarded. Zero bits are shifted in from the left. 19>>>2 yields 4, because 10011 shifted 2 bits to the right becomes 100, which is 4. For non-negative numbers, zero-fill right shift and sign-propagating right shift yield the same result. Logical operators Logical operators are typically used with
Boolean (logical) values; when they are, they return a
Boolean value. However, the && and || operators actually return the value of one of the specified operands, so if these operators are used with non-
Boolean values, they may return a non-
Boolean value. The logical operators are described in the following table. Logical operators Operator Usage Description Logical AND (&&)...
...value of one of the specified operands, so if these operators are used with non-
Boolean values, they may return a non-
Boolean value. The logical operators are described in the following table. Logical operators Operator Usage Description Logical AND (&&) expr1 && expr2 Returns expr1 if it can be converted to false; otherwise, returns expr2. Thus, when used with
Boolean values, && returns true if both operands are true; otherwise, returns false. Logical OR (||) expr1 || expr2 Returns expr1 if it can be converted to true; otherwise, returns expr2. Thus, when used with
Boolean values, || returns true if either operand is true; if both are false, returns false. Logical NOT (!) !expr Returns false if its single operand that can be conve...
...the following results for these variables: typeof myFun; // returns "function" typeof shape; // returns "string" typeof size; // returns "number" typeof foo; // returns "object" typeof today; // returns "object" typeof doesntExist; // returns "undefined" For the keywords true and null, the typeof operator returns the following results: typeof true; // returns "
boolean" typeof null; // returns "object" For a number or string, the typeof operator returns the following results: typeof 62; // returns "number" typeof 'Hello world'; // returns "string" For property values, the typeof operator returns the type of value the property contains: typeof document.lastModified; // returns "string" typeof window.length; // returns "number" typeof Mat...
...void operator is used in either of the following ways: void (expression) void expression The void operator specifies an expression to be evaluated without returning a value. expression is a JavaScript expression to evaluate. The parentheses surrounding the expression are optional, but it is good style to use them. Relational operators A relational operator compares its operands and returns a
Boolean value based on whether the comparison is true. in The in operator returns true if the specified property is in the specified object. The syntax is: propNameOrNumber in objectName where propNameOrNumber is a string, numeric, or symbol expression representing a property name or array index, and objectName is the name of an object. The following examples show some uses of the in operator. // ...
Grammar and types - JavaScript
ned console.log('The value of y is ' + y); // Uncaught ReferenceError: y is not defined let y; You can use undefined to determine whether a variable has a value. In the following code, the variable input is not assigned a value, and the if statement evaluates to true. var input; if (input === undefined) { doThis(); } else { doThat(); } The undefined value behaves as false when used in a
boolean context. For example, the following code executes the function myFunction because the myArray element is undefined: var myArray = []; if (!myArray[0]) myFunction(); The undefined value converts to NaN when used in numeric context. var a; a + 2; // Evaluates to NaN When you evaluate a null variable, the null value behaves as 0 in numeric contexts and as false in
boolean contexts. For example...
...JECT.key = 'otherValue'; Also, the contents of an array are not protected, so the following statement is executed without problems. const MY_ARRAY = ['HTML','CSS']; MY_ARRAY.push('JAVASCRIPT'); console.log(MY_ARRAY); //logs ['HTML','CSS','JAVASCRIPT']; Data structures and types Data types The latest ECMAScript standard defines eight data types: Seven data types that are primitives:
Boolean. true and false. null. A special keyword denoting a null value. (Because JavaScript is case-sensitive, null is not the same as Null, NULL, or any other variant.) undefined. A top-level property whose value is not defined. Number. An integer or floating point number. For example: 42 or 3.14159. BigInt. An integer with arbitrary precision. For example: 9007199254740992n. String. A se...
... of retrieving a number from a string is with the + (unary plus) operator: '1.1' + '1.1' // '1.11.1' (+'1.1') + (+'1.1') // 2.2 // Note: the parentheses are added for clarity, not required. Literals Literals represent values in JavaScript. These are fixed values--not variables--that you literally provide in your script. This section describes the following types of literals: Array literals
Boolean literals Floating-point literals Numeric literals Object literals RegExp literals String literals Array literals An array literal is a list of zero or more expressions, each of which represents an array element, enclosed in square brackets ([]). When you create an array using an array literal, it is initialized with the specified values as its elements, and its length is set to the number...
... the array is four, and myList[1] and myList[3] are missing. Only the last comma is ignored. let myList = ['home', , 'school', , ]; Understanding the behavior of extra commas is important to understanding JavaScript as a language. However, when writing your own code, you should explicitly declare the missing elements as undefined. Doing this increases your code's clarity and maintainability.
Boolean literals The
Boolean type has two literal values: true and false. Be careful: Do not confuse the primitive
Boolean values true and false with the true and false values of the
Boolean object. The
Boolean object is a wrapper around the primitive
Boolean data type. See
Boolean for more information. Numeric literals Number and BigInt types can be written in decimal (base 10), hexadecimal (base...
Logical NOT (!) - JavaScript
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. Syntax !expr Description Returns false if its single operand can be converted to true; otherwise, returns true. ...
... its single operand can be converted to true; otherwise, returns true. If a value can be converted to true, the value is so-called truthy. If a value can be converted to false, the value is so-called falsy. Examples of expressions that can be converted to false are: null; NaN; 0; empty string ("" or '' or ``); undefined. Even though the ! operator can be used with operands that are not
Boolean values, it can still be considered a
boolean operator since its return value can always be converted to a
boolean primitive. To explicitly convert its return value (or any expression in general) to the corresponding
boolean value, use a double NOT operator or the
Boolean constructor. Examples Using NOT The following code shows examples of the ! (logical NOT) operator. n1 = !true ...
...ing NOT The following code shows examples of the ! (logical NOT) operator. n1 = !true // !t returns false n2 = !false // !f returns true n3 = !'' // !f returns true n4 = !'Cat' // !t returns false Double NOT (!!) It is possible to use a couple of NOT operators in series to explicitly force the conversion of any value to the corresponding
boolean primitive. The conversion is based on the "truthyness" or "falsyness" of the value (see truthy and falsy). The same conversion can be done through the
Boolean function. n1 = !!true // !!truthy returns true n2 = !!{} // !!truthy returns true: any object is truthy... n3 = !!(new
Boolean(false)) // ...even
Boolean objects with a false .valueOf()! n4 = !!fals...
.... The same conversion can be done through the
Boolean function. n1 = !!true // !!truthy returns true n2 = !!{} // !!truthy returns true: any object is truthy... n3 = !!(new
Boolean(false)) // ...even
Boolean objects with a false .valueOf()! n4 = !!false // !!falsy returns false n5 = !!"" // !!falsy returns false n6 = !!
Boolean(false) // !!falsy returns false Converting between NOTs The following operation involving
booleans: !!bCondition is always equal to: bCondition Specifications Specification ECMAScript (ECMA-262)The definition of 'Logical NOT expression' in that specification. ...
typeof - JavaScript
rand) Parameters operand An expression representing the object or primitive whose type is to be returned. Description The following table summarizes the possible return values of typeof. For more information about types and primitives, see also the JavaScript data structure page. ...
...meters operand An expression representing the object or primitive whose type is to be returned. Description The following table summarizes the possible return values of typeof. For more information about types and primitives, see also the JavaScript data structure page. ...
...oerced to a number typeof 42n === 'bigint'; // Strings typeof '' === 'string'; typeof 'bla' === 'string'; typeof `template literal` === 'string'; typeof '1' === 'string'; // note that a number within a string is still typeof string typeof (typeof 1) === 'string'; // typeof always returns a string typeof String(1) === 'string'; // String converts anything into a string, safer than toString //
Booleans typeof true === '
boolean'; typeof false === '
boolean'; typeof
Boolean(1) === '
boolean'; //
Boolean() will convert values based on if they're truthy or falsy typeof !!(1) === '
boolean'; // two calls of the ! (logical NOT) operator are equivalent to
Boolean() // Symbols typeof Symbol() === 'symbol' typeof Symbol('foo') === 'symbol' typeof Symbol.iterator === 'symbol' // Undefined typeof undefi...
...able === 'undefined'; // Objects typeof {a: 1} === 'object'; // use Array.isArray or Object.prototype.toString.call // to differentiate regular objects from arrays typeof [1, 2, 4] === 'object'; typeof new Date() === 'object'; typeof /regex/ === 'object'; // See Regular expressions section for historical results // The following are confusing, dangerous, and wasteful. Avoid them. ...
MathML attribute reference - MathML
See values for notes on values and units in MathML. The attributes background, color, fontfamily, fontsize, fontstyle, fontweight and xlink:href are deprecated. The XLink attributes on MathML elements: xlink:actuate, xlink:href, xlink:show and xlink:type are deprecated as well. Name Elements accepting attribute Description accent <mo>, <mover>, <munderover> A
Boolean value specifying whether the operator should be treated as an accent. accentunder <munder>, <munderover> A
Boolean value specifying whether the operator should be treated as an accent. actiontype <maction> A string value specifying the action happening for this element. align <mtable> <munder>, <mover>, <munderover> <mstack> Specifies differe...
... Unimplemented altimg altimg-width altimg-height altimg-valign alttext <math> Visual and textual fall-back options. bevelled <mfrac> Specifies the style how the fraction should be displayed. Deprecated. Use U+2044 (fraction slash) instead. ...
...ator under the fraction. depth <mpadded> Sets or increments the depth. See length. dir <math>, <mi>, <mo>, <mrow>, <ms>, <mtext> The text direction. Possible values are either ltr (left to right) or rtl (right to left). display <math> Specifies the rendering mode. The values block and inline are allowed. ...
... display <math> Specifies the rendering mode. The values block and inline are allowed. displaystyle <mstyle>, <mtable> A
Boolean value specifying whether more vertical space is used for displayed equations or, if set to false, a more compact layout is used to display formulas. Unimplemented edge <malignmark> Unimplemented equalcolumns <mtable> A
Boolean value indicating whether to force all columns to have the same total height. Unimplemented equalrows <mtable> A
Boolean value indicating whether to force all rows to have the same total height. fence <mo> A
Boolean value specifying whether the operator is a fence (such as parentheses). There is no visual effect for this attribute. Unimplemented form <mo> ...
simple-prefs - Archive of obsolete content
This gives users a consistent way to access and modify preferences across different add-ons. This API is for your add-on's preferences. If you need to get and set the general browser preferences, use preferences/service. Usage Defining and initializing preferences To define preferences and give them initial values, add a new JSON array called preferences to your package.json file, and give it one entry for each preference: { "fullName": "Example Add-on", ... ...
...the preference in the Add-ons Manager user interface. Optional Common Attributes These are attributes that all preferences may have: Attribute Description description This appears below the preference title in the Add-ons Manager UI. value A default value for the preference. Depending on the preference type, this may be an integer, string, or
boolean value. hidden A
Boolean value which, if present and set to true, means that the preference won't appear in the Add-ons Manager interface, so users of your add-on won't be able to see or alter it. { "name": "myHiddenInteger", "type": "integer", "title": "How Many?", "hidden": true } Your add-on's code will still be able to access and modify it, just like ...
...c Attributes These are settings that are only applicable to certain preference types. They are documented along with the preference types themselves. Preference Types The setting types map to the inline settings types used by the Add-on Manager. All the inline preferences are supported. Type Description Example Specification bool Displayed as a checkbox and stores a
boolean. { "description": "Does it have tentacles?", "type": "bool", "name": "hasTentacles", "value": true, "title": "Tentacles" } boolint Displayed as a checkbox and stores an integer. A boolint is presented to the user as a checkbox, but instead of storing true or false, the "on" or "off" checkbox states are mapped to integers using "on" or "off" pr...
tabs - Archive of obsolete content
p://www.mysite.com", isPinned: true, onOpen: function onOpen(tab) { // do stuff like listen for content // loading. } }); Parameters options : object Required options: Name Type url string String URL to be opened in the new tab. This is a required property. Optional options: Name Type isPrivate
boolean Boolean which will determine whether the new tab should be private or not. If your add-on does not support private browsing this will have no effect. See the private-browsing documentation for more information. Defaults to false. inNewWindow
boolean If present and true, a new browser window will be opened and the URL will be opened in the first tab in that window. ...
...hould be private or not. If your add-on does not support private browsing this will have no effect. See the private-browsing documentation for more information. Defaults to false. inNewWindow
boolean If present and true, a new browser window will be opened and the URL will be opened in the first tab in that window. This is an optional property. inBackground
boolean If present and true, the new tab will be opened to the right of the active tab and will not be active. This is an optional property. isPinned
boolean If present and true, then the new tab will be pinned as an app tab. onOpen function A callback function that will be registered for the 'open' event. This is an optional property. ...
...ge, while the load and ready events are not. This event is not emitted when the tab is made the active tab: to get notified about that, you need to listen to the activate event. After this event has been emitted, all properties relating to the tab's content can be used. It is emitted after load and ready. Arguments Tab : Listeners are passed the tab object. persisted : Listeners are passed a
boolean value indicating whether or not the page was loaded from the bfcache. activate This event is emitted when the tab is made active. Note that you cannot guarantee that a tab's content, or even its url, are initialized at the time activate is emitted. This is because when a new tab is opened, its activate event may be emitted before the content is loaded. You can use the tab's readyState propert...
widget - Archive of obsolete content
event. onAttach function Include this to listen to the widget's attach event. tooltip string Optional text to show when the user's mouse hovers over the widget. If not given, the label is used. allow object An optional object describing permissions for the content. It should contain a single key named script whose value is a
boolean that indicates whether or not to execute script in the content. script defaults to true. contentScriptFile string,array A local file URL or an array of local file URLs of content scripts to load. Content scripts specified by this property are loaded before those specified by the contentScript property. contentScript string,array A string or an array...
.... This issue is currently tracked as bug 825434. panel A panel to open when the user clicks on the widget. width The widget's width in pixels. Setting it updates the widget's appearance immediately. tooltip The text of the tooltip that appears when the user hovers over the widget. allow A object describing permissions for the content. It contains a single key named script whose value is a
boolean that indicates whether or not to execute script in the content. contentScriptFile A local file URL or an array of local file URLs of content scripts to load. contentScript A string or an array of strings containing the texts of content scripts to load. contentScriptWhen When to load the content scripts. This may have one of the following values: "start": load content scripts immediately ...
...ently tracked as bug 825434. panel A panel to open when the user clicks on the widget view. width The widget view's width in pixels. Setting it updates the widget view's appearance immediately. tooltip The text of the tooltip that appears when the user hovers over the widget view. allow A object describing permissions for the content. It contains a single key named script whose value is a
boolean that indicates whether or not to execute script in the content. contentScriptFile A local file URL or an array of local file URLs of content scripts to load. contentScript A string or an array of strings containing the texts of content scripts to load. contentScriptWhen When to load the content scripts. This may have one of the following values: "start": load content scripts immediately ...
window/utils - Archive of obsolete content
icular: null: get all window types navigator:browser: get "normal" browser windows devtools:scratchpad: get Scratchpad windows navigator:view-source: get view source windows If you're not also passing options, you can omit this, and it's the same as passing null. options : object Options object containing the following property: Name Type includePrivate
boolean Whether to include private windows. Defaults to false. The add-on must also have opted into private windows for this to have an effect. Returns Array: array of nsIDOMWindow instances. isDocumentLoaded(window) Check if the given window's document is completely loaded. This means that its "load" event has been fired and all content is loaded, including the whole DOM document, images, a...
...t also have opted into private windows for this to have an effect. Returns Array: array of nsIDOMWindow instances. isDocumentLoaded(window) Check if the given window's document is completely loaded. This means that its "load" event has been fired and all content is loaded, including the whole DOM document, images, and any other sub-resources. ...
...l content is loaded, including the whole DOM document, images, and any other sub-resources. Parameters window : nsIDOMWindow Returns
boolean: true if the document is completely loaded. isBrowser(window) Returns true if the given window is a Firefox browser window: that is, its document has a "windowtype" of "chrome://browser/content/browser.xul". Parameters window : nsIDOMWindow Returns
boolean getWindowTitle(window) Get the title of the document hosted by the given window Parameters window: nsIDOMWindow Returns string: this document's title. isXULBrowser(window) Returns true if the given window is a XUL window. Parameters window : nsIDOMWindow Returns
boolean getFocusedWindow() Gets the child window within the topmost browser window that is focused. See nsIFocusManager fo...
package.json - Archive of obsolete content
be used as the add-on's em:name element in its install.rdf. harnessClassID Note: This is deprecated along with cfx; it's not available when using jpm. String in the GUID format. This is used as a classID of the "harness service" XPCOM component. Defaults to a random GUID generated by cfx. hasEmbeddedWebExtension New in jpm 1.2.0.
Boolean value: true if the add-on contains an embedded WebExtension. homepage The URL of the add-on's website. This value will be used as the add-on's em:homepageURL element in its install.rdf. icon The path to an image file containing the icon for the add-on. Optional: you can have no icon field in package.json and put your icon named "icon.png" in the root...
...ame is used as the add-on's em:name element in its install.rdf. packages Note: This is deprecated along with cfx and is not available when using jpm. A string pointing to a directory containing additional packages. Defaults to "packages". permissions An object describing the set of permissions that the add-on needs. private-browsing: a
boolean indicating whether or not the add-on supports private browsing. If this value is not true or is omitted, then the add-on will not see any private windows or objects, such as tabs, that are associated with private windows. See the documentation for the private-browsing module. cross-domain-content: a list of domains for which content scripts are given cross-domain privileges to access content...
... not see any private windows or objects, such as tabs, that are associated with private windows. See the documentation for the private-browsing module. cross-domain-content: a list of domains for which content scripts are given cross-domain privileges to access content in iframes or to make XMLHTTPRequests. See the documentation for enabling cross-domain content scripts. multiprocess: a
Boolean value declaring whether this add-on is, or is not, compatible with multiprocess Firefox. Note the multiprocess permission is not supported by cfx. preferences An array of JSON objects that use the following keys: name,type, value, title, and description. These JSON objects will be used to create a preferences interface for the add-on in the Add-ons Manager unle...
Preferences - Archive of obsolete content
.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); // Get the "extensions.myext." branch var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); prefs = prefs.getBranch("extensions.myext."); Simple types There are three types of preferences: string, integer, and
boolean. Each entry in the preferences database (prefs.js) has one of those types. There are six methods in nsIPrefBranch that read and write preferences: getBoolPref(), setBoolPref(), getCharPref(), setCharPref(), getIntPref(), and setIntPref(). Using them is as easy as: // Get the "accessibility." branch var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getServi...
...efs is an nsIPrefBranch. // Look in the above section for examples of getting one. var value = prefs.getBoolPref("typeaheadfind"); // get a pref (accessibility.typeaheadfind) prefs.setBoolPref("typeaheadfind", !value); // set a pref (accessibility.typeaheadfind) Complex types As noted in the previous section, each entry in the preferences database (prefs.js) must have a string, an integer, or a
boolean value. However, there is a concept of complex types, which makes it easier for developers to save and load nsILocalFile and nsISupportsString objects in preferences (as strings -- note that from the preferences system's point of view, complex values have a nsIPrefBranch.PREF_STRING type.) There are two nsIPrefBranch methods implementing the concept -- setComplexValue() and getComplexValue(). You...
... */ PrefListener.prototype.register = function(trigger) { this._branch.addObserver('', this, false); if (trigger) { let that = this; this._branch.getChildList('', {}). forEach(function (pref_leaf_name) { that._callback(that._branch, pref_leaf_name); }); } }; P...
StringView - Archive of obsolete content
t: a new typedArray will be created. */ aWhole = new fTAView(vInput); nInptLen = aWhole.length; aRaw = nStartIdx === 0 && (!isFinite(nLength) || nLength === nInptLen) ? aWhole : aWhole.subarray(nStartIdx, isFinite(nLength) ? nStartIdx + nLength : nInptLen); } break typeSwitch; default: /* the input argument is a number, a
boolean or a function: a new typedArray will be created. */ aWhole = aRaw = new fTAView(Number(vInput) || 0); } if (nTranscrType < 8) { var vSource, nOutptLen, nCharStart, nCharEnd, nEndIdx, fGetInptChrSize, fGetInptChrCode; if (nTranscrType & 4) { /* input is string */ vSource = vInput; nOutptLen = nInptLen = vSource.length; nTranscrType ^= this.encoding === "UTF...
...signed char StringView.getUTF16CharLength(unsigned long charCode); unsigned char StringView.b64ToUint6(unsigned char charCode); unsigned char StringView.uint6ToB64(unsigned char uint6); Instances' methods unsigned long stringView.makeIndex(optional unsigned long charactersLength, optional unsigned long startFrom); DOMString stringView.toBase64(optional
boolean wholeBuffer); stringView stringView.subview(unsigned long characterOffset, optional unsigned long charactersLength); void stringView.forEachChar(function callback, optional object thisObject, optional unsigned long characterOffset, optional unsigned long charactersLength); DOMString stringView.valueOf(); DOMString stringView.toString(); Properties overvi...
...startFrom and startFrom + charactersLength. Dont't use stringView.makeIndex() in a cycle as if it were a normal length property. For custom cycles, look at the example proposed here. toBase64() Syntax stringView.toBase64([wholeBuffer]) Description Returns a base64-encoded string corresponding to the stringView or to its buffer. Arguments wholeBuffer Optional A
boolean expressing whether the returned base64-encoded string will correspond to the whole buffer (true) or to the stringView (false or omitted). Examples var myStringView = new StringView("\u6432\u6432\u6432\u6432"); alert(StringView.makeFromBase64(myStringView.toBase64())) // ???? See also: Base64 encoding and decoding. subview() Syntax stringView.subview(characterOffs...
Install Manifests - Archive of obsolete content
log box. This is only useful to extensions. If this property is specified, in the about:addons extensions list, the About... link in the extension's context menu will show this dialog, rather than the default. Note: As of Gecko 2.0, the dialog receives the Addon object representing your add-on as a parameter. Examples <em:aboutURL>chrome://myext/content/about.xul</em:aboutURL> bootstrap A
Boolean value that tells the application whether the extension is boot-strappable. At the moment this only works for add-ons with em:type="2". The default value is false. For more information, see Bootstrapped extensions. contributor The name(s) of additional contributors. You may specify more than one of this value to specify multiple contributors. Examples <em:contributor>John Doe</em:contributor> ...
.../myext/content/options.xul</em:optionsURL> Gecko 7 note In Firefox 7 you can also simply include your options XUL as a file named options.xul, in the base directory of the add-on. skinnable A true or false value property that tells the application whether the (complete) theme can be skinned by lightweight themes/personas: Examples <em:skinnable>true</em:skinnable> strictCompatibility A
Boolean value indicating if the add-on should be enabled when the version of the application is greater than its max version. By default, the value of this property is false meaning that the compatibility checking will not be performed against the max version. <em:strictCompatibility>true</em:strictCompatibility> Usually, there is no need to restrict the compatibility: not all new releases will break y...
.... Examples <em:file> <Description about="urn:mozilla:extension:file:myext.jar"> <em:package>content/myext/</em:package> <em:locale>locale/myext/</em:locale> <em:skin>skin/classic/myext/<em:skin> </Description> </em:file> An Install Manifest may specify multiple file properties, one for each jar file or subdirectory that contains chrome to register. hidden Firefox 1.0 - 3.5 A
boolean value that when true makes the add-on not show up in the add-ons list, provided the add-on is installed in a restricted access area (so it does not work for add-ons installed in the profile). This is for bundling integration hooks to larger applications where having an entry in the Extensions list does not make sense. Note: This property is no longer supported under Gecko 1.9.2 (Firefox 3.6) or...
XPCOM Objects - Archive of obsolete content
ameter to be used, so we just pass it an empty object that we won't use. The second parameter is only necessary for callers from within C++ code that use pointers instead of high-level arrays. Some commonly used XPCOM methods require other XPCOM types as parameters. The addObserver method in nsIPrefBranch2 is an example of this. void addObserver(in string aDomain, in nsIObserver aObserver, in
boolean aHoldWeak); Luckily, you don't have to do anything special if you want to register your JS object as a preference observer. The nsIObserver has a single method observe, so all you need to do is have an observe method in your object and you'll be OK. XULSchool.PrefObserver = { init: function() { this._prefService = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBr...
...ave been several string types in XPCOM. The currently favored type for most cases is AUTF8String. You can read more about it in the XPCOM String Guide. Integers short, unsigned short, long, unsigned long, PRInt32, PRUInt32 PRInt32 is the equivalent to long. Most PR* types have an easier to read equivalent, so it is better to use those. Floating point float
Boolean boolean, PRBool Void void Timestamps PRTime This type is used to pass timestamps measured in milliseconds, such as the output of the getTime() method in a Javascript Date object. There are more details about XPIDL in the XPDIL Syntax definition. Creating Your Own Components JavaScript XPCOM Components As we've said before, we recommend using JSM w...
...he interface. You must generate a new one for each interface, and you should change it every time the interface changes. In this case you're forced to use UUID, the email address format used for extension ids won't work. We included a constant, an attribute and a method to display examples of the 3, but this is clearly an overly elaborate way to keep a simple counter. You can define numeric and
boolean constants in IDL files, but not string constants. This is a known limitation of XPIDL, and a simple workaround is to define a readonly attribute instead. This means you have to define a getter in the implementation file, though. You can access constants through a reference of the component, or directly from the interface: // these are equivalent. max = Ci.xsIHelloCounter.MAX_COUNT; max = count...
Updating addons broken by private browsing changes - Archive of obsolete content
existing public ones. nsIDownloadManager's addListener method is deprecated. addPrivacyAwareListener should be used instead, or no notifications will be received for private downloads. There is a new download-manager-remove-download-guid notification, which passes an nsISupportsCString subject for the GUID or null. nsIHttpAuthManager: setAuthIdentity and getAuthIdentity now take an optional
boolean parameter to indicate whether the identity is classified as private. nsIStrictTransportSecurityService: processStsHeader, removeStsState, isStsHost, and isStsUri now take a flags parameter that understands nsISocketProvider.NO_PERMANENT_STORAGE or nothing. nsIPrivateBrowsingService: This service is deprecated, and as of Firefox 20 it is now an empty interface. If your code depends on this i...
...0 it is now an empty interface. If your code depends on this interface, it will break. The global private browsing service is actively being removed, and may not even exist as of Firefox 21. nsIRecentBadCertsService: This is no longer a global service, and has been renamed to nsIRecentBadCerts. To obtain this, acquire the nsIX509CertDB service, and use the new getRecentBadCerts method, passing a
boolean indicating whether the private bad certificates or public ones are desired. Observer notifications None of the ones listed above will be sent as of Firefox 20. The supporting per-window private browsing article explains further about the equivalent notifications, which are all backwards compatible through to Firefox 12 (and are sent side-by-side with the global private browsing notifications in...
...rsions). Chrome APIs OpenBrowserWindow: Takes an optional parameter to indicate desired properties of the window. Passing {private: true} will cause a private window to open, otherwise the window will always be non-private. Use {private: PrivateBrowsingUtils.isWindowPrivate(window)} to open a window that matches the current window's privacy status. openLinkIn: Can receive an extra private
boolean property in the parameter object. internalSave: Takes a new required Document argument (prior to the optional
boolean and string arguments) indicating the document that originated the save action. gPrivateBrowsingUI: Can no longer be used to control private browsing of any kind. Any new private browsing session should be opened using OpenBrowserWindow, and any queries for private browsing s...
Microsummary XML grammar reference - Archive of obsolete content
hould update microsummaries generated by the generator. The element can be used to specify both an absolute update interval and a series of conditional intervals based on the content of the page being summarized. Attributes: interval (optional) An absolute interval of time, in minutes, that must elapse between updates. Child Elements: <condition> (optional) An XPath
boolean expression along with a conditional interval of time, in minutes, that must elapse between updates if the expression evaluates to true. The interval attribute defines an absolute interval in minutes. Its value must be a number greater than or equal to 1. Fractional values (e.g. 5.5 minutes) are permitted, although they probably aren't useful. The <update> element may contain any number of <condi...
...al values (e.g. 5.5 minutes) are permitted, although they probably aren't useful. The <update> element may contain any number of <condition> child elements. Firefox determines which interval to apply to a microsummary generated by a generator according to the following rules: Firefox processes each <condition> child element in document order. For each one, Firefox evaluates the element's XPath
boolean expression against the page being summarized. If the expression evaluates to true, Firefox applies that element's interval and stops processing child elements. Thus, the first matching <condition> determines the update interval. If there are no <condition> child elements, or if none of their expressions evaluate to true, Firefox applies the value of the <update> element's interval attribute. ...
...ecks for expired microsummaries every 15 seconds, it is possible for a microsummary update to begin up to 15 seconds later than its interval indicates; Firefox respects the browser cache when updating microsummaries, so it will not reload a page to update its microsummary if the cache contains a fresh copy of the page. The <condition> element The optional <condition> element specifies an XPath
boolean expression along with a conditional interval of time, in minutes, that must elapse between updates if the expression evaluates to true when evaluated against the page being summarized. It must be a child of the <update> element. Attributes: expression (required) An XPath
boolean expression to be evaluated against the page being summarized. interval (required) An inter...
command - Archive of obsolete content
e 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 activation event that caused this command event to be generated.
... 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 activation event that caused this command event to be generated. Currently only set when a command event is redirected though use of the command attribute. ...
...only long (float) Unused; always zero. sourceEvent Read only Event The activation event that caused this command event to be generated. Currently only set when a command event is redirected though use of the command attribute. ctrlKey Read only
boolean true if the control key was down when the event was fired. false otherwise. shiftKey Read only
boolean true if the shift key was down when the event was fired. false otherwise. altKey Read only
boolean true if the alt key was down when the event was fired. false otherwise. metaKey Read only
boolean true if the meta key was down when the event was fired. false otherwise. Example menuitem.oncommand = function() { console.log("the menu item has been activa...
loadTabs - Archive of obsolete content
home loadTabs( uris, loadInBackground, replace ) loadTabs( uris, params ) Return type: no return value Loads a set of URIs, specified by the array uris, into tabs. ...
... loadInBackground, replace ) loadTabs( uris, params ) Return type: no return value Loads a set of URIs, specified by the array uris, into tabs. ...
... replace ) loadTabs( uris, params ) Return type: no return value Loads a set of URIs, specified by the array uris, into tabs. ...
checkbox - Archive of obsolete content
d, command, crop, disabled, src, label, tabIndex Examples <checkbox label="Enable JavaScript" checked="true"/> <checkbox label="Enable Java" checked="false"/> Attributes accesskey Type: character 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 attribute for the element. checked Type:
boolean Indicates whether the element is checked or not. Use hasAttribute() to determine whether this attribute is set instead of getAttribute(). For buttons, the type attribute must be set to checkbox or radio for this attribute to have any effect. command Type: id Set to the id of a command element that is being observed by the element. crop Type: one of the values belo...
...d. If you wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. For example, for a menuitem in a menu you can add the following CSS rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...in which the focus is moved when the user presses the "tab" key. Elements with a higher tabindex are later in the tab sequence. Properties accessKey Type: character Gets and sets the value of the accesskey attribute. accessibleType Type: integer A value indicating the type of accessibility object for the element. checked Type:
boolean Gets and sets the value of the checked attribute. command Type: element id Gets and sets the value of the command attribute. crop Type: string Gets and sets the value of the crop attribute. disabled Type:
boolean Gets and sets the value of the disabled attribute. src Type: URL Gets and sets the value of the src attribute. ...
prefpane - Archive of obsolete content
el that will appear on the element. If this is left out, no text appears. For an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. onpaneload Type: script code Code defined here is called when the pane has been loaded, much like the load event for a window. selected Type:
boolean This attribute will be set to true for the currently selected prefpane. To change the selected pane, use the prefwindow's showPane method. src Type: URI The URI of the overlay contents of preference pane. If this is not specified, the contents of the prefpane element is used. Properties contentHeight (readonly) The height (in pixels) of current p...
... Gets and sets the value of the label attribute. loaded Indicates whether the pane is fully loaded. preferenceElements Type: DOM Nodelist Holds a list of the UI elements in the pane that are attached to preferences. preferences Type: DOM Nodelist Holds a list of the preference elements in the pane. selected Type:
boolean This property's value is true if this element is selected, or false if it is not. This property is read only. This property is available for menuitem and menuseparator elements in Firefox 3. src Type: URL Gets and sets the value of the src attribute. Methods DOMElement getPreferenceElement(in DOMElement startElement) preferenceForElement( uielement ) ...
...at returns the value to be written to the preference element, and then call the userChangedValue function every time you edit the list in a way that should cause the preference's value to change. (1) an example of a widget that has state changes tracked for it includes the checkbox element, whose state is tracked automatically when the "command" event fires. void writePreferences(in
boolean flushToDisk); Writes all changes in this pane to preferences, optionally flushes to disk. Inherited Methods addEventListener(), appendChild(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsB...
prefwindow - Archive of obsolete content
te as it will be set automatically such that the default pane is the same as the one showing when the preferences dialog was last closed. More information is available in the Preferences System article. Important note for XULrunner-based applications: the Preferences System - part of the toolkit - still relies on two browser.* preferences. The first one is browser.preferences.instantApply, a
boolean preference. The preference window will not run correctly if you do not set this preference in your application's defaults (see bug 485150 for more information). A true value for this preference makes the preference window apply immediately the user choices, without waiting for the dialog to close with OK. The second preference is browser.preferences.animateFadeIn, again a
boolean preference. Thi...
...second optional additional button. You can set its label with the buttonlabelextra2 attribute and its command with the ondialogextra2 attribute. Note: If you don't want to display any buttons in the dialog box, set the value of this attribute to "," (a single comma). Warning: If the accept and cancel buttons are actually shown is system dependent and is mainly controlled by the value of the
boolean preference browser.preferences.instantApply. If it is set to true any changes to settings are supposed to be applied immediately. The accept button is therefore unnecessary and is hidden. The cancel button might be shown as an additional possibility to close the dialog in this situation (Windows and Linux) or might be hidden, too (Mac OS). The default setting of browser.preferences.instantApply ...
...ttribute should not be set, but if it is, it specifies the default button in the dialog. Typically, this means that the button will be activated when the Enter key is pressed. This should be set to one of the same values as those for the buttons attribute. instantApply (readonly) Indicates whether the window is in "instant apply" mode. The value is read from browser.preferences.instantApply
boolean user preference. (?? It's declared as a <field>, so you can set the value, however I don't believe it's valid to do that.) lastSelected Type: string Set this to the id of the last selected pane. It will be opened by default the next time the preferences dialog is opened. preferencePanes Type: DOM NodeList Holds a list of all the prefpane elements in the window. type ...
radiogroup - Archive of obsolete content
If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...for form controls. Using it with an anchor tag (an <a> link) will have no effect. The element will, however, still respond to mouse events. To enable the element, leave this attribute out entirely. Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. focused Type:
boolean This attribute is true if the element is focused. preference Type: id Connects the element to a corresponding preference. This attribute only has any effect when used inside a prefwindow. More information is available in the Preferences System article. tabindex Type: integer The tab order of the element. The tab order is the order in which the focus is moved when the user press...
... the contents, as visible to the user, are read and set using the Menulist.value syntax. For those elements, setAttribute("value", myValue) and getAttribute("value") do not access or affect the contents displayed to the user. Properties accessibleType Type: integer A value indicating the type of accessibility object for the element. disabled Type:
boolean Gets and sets the value of the disabled attribute. focusedItem Type: radio element Holds the currently focused item in the radiogroup, which may or may not be the same as the selected item. You can change the focused item by setting this property. itemCount Type: integer Read only property holding the number of child items. selectedIndex Type: integer ...
scale - Archive of obsolete content
elements are placed left to right or top to bottom in the order they appear in the XUL code. reverse For scales, the scale's values are ordered from right to left (for horizontal scales) or from bottom to top (for vertical scales). For other elements, they are placed right to left or bottom to top. This is reverse of the order in which they appear in the XUL code. disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...tribute changes when the arrows are clicked(or scales are dragged). The default value is 1. min Type: integer The minimum value the control's value may take. The default value is 0. Type: integer The maximum value that the scale or number box may be set to. The default value is 100 for scales and Infinity for number boxes. movetoclick Type:
boolean If true, clicking the slide area of the scale moves the thumb directly to that position. If false, clicking the slide area moves the thumb only one increment in that direction. If not specified, the default value is used, which varies for each platform. pageincrement Type: integer The amount by which the value of the curpos or value attribute changes when the tray of the scroll bar (the...
...re-proof); 3) Use setUserData() (future-proof and clean, but not easily serializable). For user editable menulist elements, the contents, as visible to the user, are read and set using the Menulist.value syntax. For those elements, setAttribute("value", myValue) and getAttribute("value") do not access or affect the contents displayed to the user. Properties disabled Type:
boolean Gets and sets the value of the disabled attribute. increment Type: integer Gets and sets the value of the increment attribute. min Type: integer Gets and sets the value of the min attribute. max Type: integer Gets and sets the value of the max attribute. pageIncrement Type: integer Gets and set...
toolbar - Archive of obsolete content
When set to false, the default, the toolbar is visible. This only has an effect on Windows and needs to be combined with type="menubar" and a menubar element. currentset Not in SeaMonkey 1.x Type: comma-separated string The current set of displayed items on the toolbar. This will be modified when ...
...hould be a comma-separated list of item IDs from the toolbarpalette or, additionally, any of the following strings: "separator", "spring", "spacer". customindex Not in SeaMonkey 1.x Type: integer This value is the index of the toolbar in the list of the custom toolbars. The value is updated automatically by the toolbar customization dialog. customizable Not in SeaMonkey 1.x Type:
boolean Set this attribute to true on toolbars that can be customized. This causes the set of buttons to be persisted across sessions. defaultset Not in SeaMonkey 1.x Type: comma-separated list of item ids The default set of displayed items on the toolbar. This should be set to a comma-separated list of item IDs from the toolbarpalette. For example, back-button,forward-button,print-button. ...
...rs that can be customized. This causes the set of buttons to be persisted across sessions. defaultset Not in SeaMonkey 1.x Type: comma-separated list of item ids The default set of displayed items on the toolbar. This should be set to a comma-separated list of item IDs from the toolbarpalette. For example, back-button,forward-button,print-button. grippyhidden SeaMonkey only Type:
boolean When set to true, the grippy will be hidden. When set to false, the default, the grippy will be shown. grippytooltiptext SeaMonkey only Type: string The text to appear on the tooltip for the toolbar's grippy when the toolbar is collapsed. This would be used to label the grippy so that the user knows which toolbar it represents. height Type: string (representing an integer) The p...
tooltip - Archive of obsolete content
ped. If you wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. ...
...If this attribute is set to true, this will not happen and the tooltip will only hide when the user moves the mouse to another element. onpopuphidden Type: script code This event is sent to a popup after it has been hidden. ...
...sent to a popup just before it is opened. This handler is usually used to dynamically set the contents when the user requests to display it. Returning false from this event handler prevents the popup from appearing. onpopupshown Type: script code This event is sent to a popup after it has been opened, much like the onload event is sent to a window when it is opened. page Type:
boolean Setting the page attribute to true will result in the tooltip being filled automatically as appropriate for a browser content area tooltip, i.e. the tooltip text is set according to the DOM element in the browser that the user hovered over. Example <tooltip id="pageTooltip" page="true"/> <browser tooltip="pageTooltip"/> position Type: string The position attribute determines w...
XForms Input Element - Archive of obsolete content
ommon appearance - the value of this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control accesskey - used to specify the keyboard shortcut for focusing this control Single-Node Binding Special inputmode - not supported for this control incremental - supported. The default value is 'false'. Mozilla Extensions labelposition - only for
boolean types: show the label before or after the checkbox (see below) Type restrictions The input element can be bound to a node containing simple content of any data type except xsd:base64Binary, xsd:hexBinray or any data type derived from these. Representations The xforms input element can be represented by the following widgets for the spcified data types (or types derived from these data types): ...
...taining simple content of any data type except xsd:base64Binary, xsd:hexBinray or any data type derived from these. Representations The xforms input element can be represented by the following widgets for the spcified data types (or types derived from these data types): text field - the default widget when no type is specified or the data is of type xsd:string (xhtml/xul) checkbox - used for xsd:
boolean instance data. (xhtml/xul) datepicker - used to represent data of type xsd:date (xhtml/xul) calendar - used to represent data of type xsd:date when appearance attribute also has the value 'full' (xhtml/xul) month list - used to represent data of type xsd:gMonth (xhtml only) days list - used to represent data of type xsd:gDay (xhtml only) number field - used to represent data of numeric type (fx 3...
...ce node will be updated on each character typed by the user. If "false", or the incremental attribute is omitted on this element then the bound instance node will be updated when the control loses the focus. checkbox Most often used when the form author only needs a simple 'true', 'false', '1', or '0' response from the user (xhtml/xul). Characteristics used when the instance node is of type xsd:
boolean or a type derived from it analogous widgets are <xhtml:input type="checkbox"/> and <xul:checkbox/> The corresponding label can be displayed before or after the checkbox by using the labelposition attribute. Specific handling of attributes incremental - if "true" or this attribute is omitted from this element, then the instance node will be updated when the user checks or un-checks the checkbox.
Desktop gamepad controls - Game development
The connect() and disconnect() functions are bound to the following events: window.addEventListener("gamepadconnected", GamepadAPI.connect); window.addEventListener("gamepaddisconnected", GamepadAPI.disconnect); They are fired when the gamepad is connected and disconnected respectively. The next function is update(), which updat...
...If we want to check the button is not held already (so it's a new press), then looping through the cached states from the previous frame does the job -- if the button was already pressed, then we ignore the new press and set it to false. Implementation We now know what the GamepadAPI object looks like and what variables and functions it contain, so let's learn how all t...
... if(GamepadAPI.axes.status[1] > 0.5) { // move player left } else if(GamepadAPI.axes.status[1] < -0.5) { // move player right } } They can now move the ship on the screen by using the DPad buttons, or the left stick axes. Have you noticed that the current value of the axes is evaluated against 0.5? It's because axes are having floating point values while buttons are
booleans. After a certain threshold is reached we can assume the input is done deliberately by the user and can act accordingly. For the shooting controls, we used the A button -- when it is held down, a new bullet is spawned, and everything else is handled by the game: if(GamepadAPI.buttons.pressed('A','hold')) { this.spawnBullet(); } Showing the screen with all the controls looks exactly the sam...
Getting started with HTML - Learn web development
For example, consider the disabled attribute, which you can assign to form input elements. (You use this to disable the form input elements so the user can't make entri...
... to save the state when the user code is being shown, // not the solution, so that solution is not saved over the user code if(solution.value === 'Show solution') { userEntry = textarea.value; } else { solutionEntry = textarea.value; } updateCode(); };
Boolean attributes Sometimes you will see attributes written without values. This is entirely acceptable. These are called
Boolean attributes.
Boolean attributes can only have one value, which is generally the same as the attribute name. For example, consider the disabled attribute, which you can assign to form input elements. (You use this to disable the form input elements so the user can't make entries. The disabled elements typically have a grayed-out appearance.) For example: <input type="text" disabled="disabled"> As...
...Obviously, this is not intended! It will cause errors or unexpected behavior, as you can see in the live example below. Try hovering over the link to view the title text! Always include the attribute quotes. It avoids such problems, and results in more readable code. Single or double quotes? In this article you will also notice that the attributes are wrappe...
Gecko info for Windows accessibility vendors
le information for the default media type (usually screen), or a set of alternative media types specified in nsISimpleDOMDocument::set_alternateViewMediaType(mediaTypeString) . See the W3C's website for a list of official media type name. Unfortunately, at this time the argument useAlternateView is ignored. ...
...et_computedStyleForProperties, which lets turns the styleProperties array into an [in] parameter, letting you specify only those style properties you're interested in. This helps minimize the cost of marshalling for those times in which you're interested in only a few style properties per node. HRESULT get_computedStyleForProperties( /* [in] */ unsigned short numStyleProperties, /* [in] */
boolean useAlternateView, // If TRUE, returns properties for media // as set in nsIDOMDocument::set_alternateViewMediaTypes /* [in] */ BSTR *styleProperties, /* [out] */ BSTR *styleValues); To scroll the document in order make a specific element visible in the window, use scrollTo(
boolean placeTopLeft). If the parameter placeTopLeft is TRUE the document will be scrolled so that the element is pla...
...placeTopLeft). If the parameter placeTopLeft is TRUE the document will be scrolled so that the element is placed in the top left corner of the window. If placeTopLeft is FALSE, the document will only be scrolled if the element is not already visible, or the document will be scrolled the minimum amount to make the element visible anywhere within the current window. HRESULT scrollTo([in]
boolean placeTopLeft); You can also get to any other node by traversing the ISimpleDOMNode structure. The DOM content tree is a superset of the MSAA tree. In other words, you can always QueryInterface from an IAccessible to an ISimpleDOMNode, but often not the other way around. HRESULT get_parentNode (/* [in] */ ISimpleDOMNode *newNodePtr); HRESULT get_firstChild (/* [in] */ ISimpleDOMN...
mozbrowserlocationchange
-- it is fired every time navigation occurs. 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. ...
...rd 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. detail The detail property returns an anonymous JavaScript object with the following properties: url A DOMString representing the URL of the new location. canGoBack A
Boolean that defines whether it's possible to go back in the navigation history (true) or not (false). canGoForward...
...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: url A DOMString representing the URL of the new location. 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). Example This example updates the URL bar so that it will always display the correct URL for the current location. var browser = document.querySelector("iframe"); browser.addEventListener('mozbrowserlocationchange', function (event) { urlBar.value = event.detail.url; }); Related Events mozb...
HTTP Cache
the intermediate cache below) nsILoadContextInfo Distinguishes the scope of the storage demanded to open. Mandatory argument to *Storage methods of nsICacheStorageService. ...
... nsILoadContextInfo Distinguishes the scope of the storage demanded to open. Mandatory argument to *Storage methods of nsICacheStorageService. ...
...n. Mandatory argument to *Storage methods of nsICacheStorageService. //github.com/RealityRipple/UXP/blob/master/netwerk/base/public/nsILoadContextInfo.idl It is a helper interface wrapping following four arguments into a single one: private-browsing
boolean flag anonymous load
boolean flag app ID number (0 for no app) is-in-browser
boolean flag Helper functions to create nsILoadContextInfo objects: C++ consumers: functions at LoadContextInfo.h exported header JS consumers: resource://gre/modules/LoadContextInfo.jsm module methods Two storage objects created with the same set of nsILoadContextInfo arguments are identical, containing the same cache entries. Two storage obj...
NSS 3.30 release notes
_3_30_RTM. NSS 3.30 requires Netscape Portable Runtime (NSPR); 4.13.1 or newer. NSS 3.30 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_30_RTM/src/ New in NSS 3.30 New Functionality In the PKCS#11 root CA module (nssckbi), CAs with positive trust are marked with a new
boolean attribute, CKA_NSS_MOZILLA_CA_POLICY, set to true. Applications that need to distinguish them from other other root CAs, may use the exported function PK11_HasAttributeSet. Support for callback functions that can be used to monitor SSL/TLS alerts that are sent or received. New Functions in cert.h CERT_CompareAVA - performs a comparison of two CERTAVA structures, and returns a SECComp...
...the exported function PK11_HasAttributeSet. Support for callback functions that can be used to monitor SSL/TLS alerts that are sent or received. New Functions in cert.h CERT_CompareAVA - performs a comparison of two CERTAVA structures, and returns a SECComparison result. in pk11pub.h PK11_HasAttributeSet - allows to check if a PKCS#11 object in a given slot has a specific
boolean attribute set. in ssl.h SSL_AlertReceivedCallback - register a callback function, that will be called whenever an SSL/TLS alert is received SSL_AlertSentCallback - register a callback function, that will be called whenever an SSL/TLS alert is sent SSL_SetSessionTicketKeyPair - configures an asymmetric key pair, for use in wrapping session ticket keys, used by the server. This fu...
...n ticket keys, used by the server. This function currently only accepts an RSA public/private key pair. New Macros in ciferfam.h PKCS12_AES_CBC_128, PKCS12_AES_CBC_192, PKCS12_AES_CBC_256 - cipher family identifiers corresponding to the PKCS#5 v2.1 AES based encryption schemes used in the PKCS#12 support in NSS in pkcs11n.h CKA_NSS_MOZILLA_CA_POLICY - identifier for a
boolean PKCS#11 attribute, that should be set to true, if a CA is present because of it's acceptance according to the Mozilla CA Policy Notable Changes in NSS 3.30 The TLS server code has been enhanced to support session tickets when no RSA certificate (e.g. only an ECDSA certificate) is configured. RSA-PSS signatures produced by key pairs with a modulus bit length that is not a multiple of 8 ...
NSS_3.12.3_release_notes.html
Environment Variable Value Type Description NSRANDCOUNT Integer (byte count) Sets the maximum number of bytes to read from the file named in the environment variable NSRANDFILE (see below). Makes NSRANDFILE usable with /dev/urandom. NSS_ALLOW_WEAK_SIGNATURE_ALG
Boolean (any non-empty value to enable) Enables the use of MD2 and MD4 hash algorithms inside signatures. This was allowed by default before NSS 3.12.3. NSS_HASH_ALG_SUPPORT String Specifies algorithms allowed to be used in certain applications, such as in signatures on certificates and CRLs. See documentation at this link. ...
...ger an assertion failure in debug builds, and will report an error in non-DEBUG builds. If set to "DISABLED", Softoken will ignore forks, and behave as it did in older versions. If set to any other non-empty value, Softoken will report an error in both DEBUG and non-DEBUG builds. ...
...This behavior was the default before NSS 3.12.3. The new behavior conforms to RFC 2818. ...
JSProtoKey
le standard object prototype types. Value Prototype in JavaScript JSProto_Null A Dummy key for invalid prototype. ...
... object prototype types. Value Prototype in JavaScript JSProto_Null A Dummy key for invalid prototype. ...
...Value Prototype in JavaScript JSProto_Null A Dummy key for invalid prototype. ...
Shell global objects
ate an array buffer that mmaps the given file. addPromiseReactions(promise, onResolve, onReject) Calls the JS::AddPromiseReactions JSAPI function with the given arguments. getMaxArgs() Return the maximum number of supported args for a call. objectEmulatingUndefined() Return a new object obj for which typeof obj === "undefined", obj == null and obj == undefined (and vice versa for !=), and To
Boolean(obj) === false. isCachingEnabled() Return whether JS caching is enabled. setCachingEnabled(b) Enable or disable JS caching. cacheEntry(code) Return a new opaque object which emulates a cache entry of a script. This object encapsulates the code and its cached content. The cache entry is filled and read by the evaluate function by using it in place of the source, and by setting saveBytecode a...
...cording to the asm.js spec. isAsmJSModuleLoadedFromCache(fn) Return whether the given asm.js module function has been loaded directly from the cache. This function throws an error if fn is not a validated asm.js module. isAsmJSFunction(fn) Returns whether the given value is a nested function in an asm.js module that has been both compile- and link-time validated. wasmIsSupported() Returns a
boolean indicating whether WebAssembly is supported on the current device. wasmTextToBinary(str) Translates the given text wasm module into its binary encoding. wasmBinaryToText(bin) Translates binary encoding to text format wasmExtractCode(module) Extracts generated machine code from WebAssembly.Module. isLazyFunction(fun) True if fun is a lazy JSFunction. isRelazifiableFunction(fun) Ture if f...
...d return the scope. If global is present, clone the script to global before executing. cloneAndExecuteScript(source, global) Compile source in the current compartment, clone it into global's compartment, and run it there. backtrace() Dump out a brief backtrace. getBacktrace([options]) Return the current stack as a string. Takes an optional options object, which may contain any or all of the
boolean properties options.args - show arguments to each function options.locals - show local variables in each frame options.thisprops - show the properties of the this object of each frame byteSize(value) Return the size in bytes occupied by value, or undefined if value is not allocated in memory. byteSizeOfScript(f) Return the size in bytes occupied by the function f's JSScript. setImmutableProto...
extIPreferenceBranch
he application-level preferences have an empty root. All preference "aName" parameters used in this interface are relative to the root branch. extIPreferenceBranch is defined in toolkit/components/exthelper/extIApplication.idl. Implemented via XPCOM service for extIApplication: see the instructions on the FUEL (Firefox), STEEL (Thunderbird) and SMILE (SeaMonkey) pages. Method overview
boolean has(in AString aName) extIPreference get(in AString aName) nsIVariant getValue(in AString aName, in nsIVariant aDefaultValue) void setValue(in AString aName, in nsIVariant aValue) void reset() Attributes Attribute Type Description root readonly attribute AString The name of the branch root. all readonly attribut...
... Attribute Type Description root readonly attribute AString The name of the branch root. all readonly attribute nsIVariant Array of extIPreference listing all preferences in this branch. events readonly attribute extIEvents The events object for the preferences supports: "change" Methods has() Check to see if a preference exists.
boolean has(in AString aName) Parameters aName The name of preference Return value true if the preference exists, false if not get() Gets an object representing a preference extIPreference get(in AString aName) Parameters aName The name of preference Return value a preference object, or null if the preference does not exist getValue() Gets the value of a preference. Returns a defau...
...preference does not exists. The use of a variant as the return value means that to JavaScript code the value will appear as a value of the same type as is used in the preferences file and no coercion will occur. A quoted string in the preference file will always appear as a string, even if the value of the string is "true" or "false". An integer preference appears as a JavaScript Number, and a
boolean appears as a JavaScript
Boolean. There are no other types supported by the preference subsystem. setValue() Sets the value of a preference with the given name. void setValue(in AString aName, in nsIVariant aValue) Parameters aName The name of a preference aValue The value of a preference Return value reset() Resets all preferences in a branch back to their default values. Note:...
IAccessibleTableCell
from: IUnknown Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Method overview [propget] HRESULT columnExtent([out] long nColumnsSpanned ); [propget] HRESULT columnHeaderCells([out, size_is(, nColumnHeaderCells,)] IUnknown cellAccessibles, [out] long nColumnHeaderCells ); [propget] HRESULT columnIndex([out] long columnIndex ); [propget] HRESULT isSelected([out]
boolean isSelected ); [propget] HRESULT rowColumnExtents([out] long row, [out] long column, [out] long rowExtents, [out] long columnExtents, [out]
boolean isSelected ); [propget] HRESULT rowExtent([out] long nRowsSpanned ); [propget] HRESULT rowHeaderCells([out, size_is(, nRowHeaderCells,)] IUnknown cellAccessibles, [out] long nRowHeaderCells ); [propget] HRESULT rowIndex([out] long rowIndex ); ...
...ader, [out] values are null and 0 respectively. S_OK. columnIndex() Translates this cell accessible into the corresponding column index. [propget] HRESULT columnIndex( [out] long columnIndex ); Parameters columnIndex Returns the 0 based column index of the cell of the specified cell or the index of the first column if the cell spans multiple columns. Return value S_OK. isSelected() Returns a
boolean value indicating whether this cell is selected. [propget] HRESULT isSelected( [out]
boolean isSelected ); Parameters isSelected Returns true if the specified cell is selected and false otherwise. Return value S_OK. rowColumnExtents() Gets the row and column indexes and extents of this cell accessible and whether or not it is selected. This is a convenience function. It is not mandatory to im...
... the specified cell is selected and false otherwise. Return value S_OK. rowColumnExtents() Gets the row and column indexes and extents of this cell accessible and whether or not it is selected. This is a convenience function. It is not mandatory to implement it. [propget] HRESULT rowColumnExtents( [out] long row, [out] long column, [out] long rowExtents, [out] long columnExtents, [out]
boolean isSelected ); Parameters row 0 based row index. column 0 based column index. rowExtents Number of cells spanned by this cell in this row. columnExtents Number of cells spanned by this cell in this column. isSelected Indicates if the specified cell is selected. Return value S_OK. rowExtent() Returns the number of rows occupied by this cell accessible. [propget] HRESULT rowExtent( [out] long n...
jsdIStackFrame
ERFACE exception. Stack frame objects. These are only valid inside the jsdIExecutionHook which gave it to you. After you return from that handler the bottom frame, and any frame you found attached through it, are invalidated via the jsdIEphemeral interface. Once a jsdIStackFrame has been invalidated all method and property accesses will throw a NS_ERROR_NOT_AVAILABLE exception. Method overview
boolean eval(in AString bytes, in AUTF8String fileName, in unsigned long line, out jsdIValue result); Attributes Attribute Type Description callee jsdIValue Function object running in this stack frame. Read only. callingFrame jsdIStackFrame Link to the caller's stack frame. Read only. executionContext jsdIContext Executon context. Read only. functionName AUTF8String Function name executing ...
...in unsigned long line, out jsdIValue result); Attributes Attribute Type Description callee jsdIValue Function object running in this stack frame. Read only. callingFrame jsdIStackFrame Link to the caller's stack frame. Read only. executionContext jsdIContext Executon context. Read only. functionName AUTF8String Function name executing in this stack frame. Read only. isConstructing
boolean True if stack frame is constructing a new object. Read only. isDebugger
boolean True if stack frame represents a frame created as a result of a debugger evaluation. Read only. isNative
boolean True if stack frame represents a native frame. Read only. Obsolete since Gecko 2.0 JSDContext JSDContext Internal use only. Read only. Native code only! JSDStackFrameInfo JSDStackFrameInfo Internal ...
...cript's pc to line map.) Read only. pc unsigned long Current program counter in this stack frame. Read only. scope jsdIValue Top object in the scope chain. Read only. script jsdIScript Script running in this stack frame, null for native frames. Read only. thisValue jsdIValue |this| object for this stack frame. Read only. Methods eval() Evaluate arbitrary JavaScript in this stack frame.
boolean eval( in AString bytes, in AUTF8String fileName, in unsigned long line, out jsdIValue result ); Parameters bytes Script to be evaluated. fileName Filename to compile this script under. This is the filename you'll see in error messages, and so on. line result Return value ...
mozISpellCheckingEngine
new spell checking engine. Inherits from: nsISupports Last changed in Gecko 1.7 This interface represents a spell checking engine. The built in Hunspell engine has contract ID "@mozilla.org/spellchecker/engine;1". Extensions can use this interface to check spelling or provide its own spell checker to editors. ...
...ecking. This is the language of dictionary. Read only. When this changes, the spell checker sends a "spellcheck-dictionary-update" notification. name wstring The name of the engine. Not currently used. Read only. personalDictionary mozIPersonalDictionary The personal dictionary. providesPersonalDictionary
boolean Does the engine provide its own personalDictionary? Read only. providesWordUtils
boolean Does the engine provide its own word utilities? Read only. Methods addDirectory() Adds all the dictionaries in the specified directory to the spell checker. void addDirectory( nsIFile dir ); Parameters dir An nsIFile object indicating the directory...
... Methods addDirectory() Adds all the dictionaries in the specified directory to the spell checker. void addDirectory( nsIFile dir ); Parameters dir An nsIFile object indicating the directory from which to add dictionaries. check() Checks a word to determine if it's spelled correctly. When this changes, the spell checker sends a "spellcheck-dictionary-update" notification.
boolean check( in wstring word ); Parameters word A word to check for correct spelling. Return value Returns true if word is spelled correctly according to the dictionary attribute, and returns false if word is misspelled. getDictionaryList() Gets the list of dictionaries. void getDictionaryList( [array, size_is(count)] out wstring dictionaries, out PRUint32 count ); Parameters ...
mozIStorageVacuumParticipant
erface to provide information to allow a database to be periodically vacuumed by the Storage service. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) To create an instance of this interface, use the Category Manger, with the category "vacuum-participant". Add more details here. Method overview
boolean onBeginVacuum(); void onEndVacuum(in
boolean aSucceeded); Attributes Attribute Type Description databaseConnection mozIStorageConnection A connection to the database file to be vacuumed. expectedDatabasePageSize long The expected page size, in bytes, for the database. The vacuum manager will try to correct the page size when the browser is idle, using this value as a target. Valid pa...
... allow page size changes. The vacuum manager will try to restore WAL mode, but this will only work reliably if the participant properly resets statements. If the attempt to restore the journal node fails, it will remain TRUNCATE. Methods onBeginVacuum() Called when a vacuum operation begins. Once you receive this notification, you should avoid using the database until onEndVacuum() is called. ...
... until onEndVacuum() is called.
boolean onBeginVacuum(); Parameters None. Return value Return true to allow the vacuum operation to proceed, or false if you don't want the database to be vacuumed. You may wish to return false, for example, if you're in the middle of an operation that you don't want to (or can't) interrupt. onEndVacuum() Called when a vacuum operation ends. void onEndVacuum( in
boolean aSucceeded ); Parameters aSucceeded true if the vacuum operation was successful, or false if it wasn't successful. ...
nsIAccessibleDocument
Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) You can QueryInterface to nsIAccessibleDocument from the nsIAccessible or nsIAccessNode for the root node of a document. You can also get one from nsIAccessNode.GetAccessibleDocument() or nsIAccessibleEvent.GetAccessibleDocument() Method overview nsIAccessible getAccessibleInParentChain(in nsIDOMNode aDOMNode, in
boolean aCanCreate); Obsolete since Gecko 2.0 nsIAccessNode getCachedAccessNode(in voidPtr aUniqueID); Native code only! Obsolete since Gecko 2.0 AString getNameSpaceURIForID(in short nameSpaceID); Attributes Attribute Type Description caretAccessible nsIAccessible Read only. Obsolete since Gecko 1.9 docType AString The doc type of th...
... Attribute Type Description caretAccessible nsIAccessible Read only. Obsolete since Gecko 1.9 docType AString The doc type of the document, as specified in the document. Read only. DOMDocument nsIDOMDocument The nsIDOMDocument interface associated with this document. Read only. Note: Renamed from document in Gecko 2.0 isEditable
boolean True if the document is live in an editor. False if the document is being displayed but not edited. If a <div> is contentEditable, then it has its own document, with isEditable == true. Read only. Obsolete since Gecko 1.9 mimeType AString The mime type of the document. Read only. title AString The title of the document, as specified in the document. Read only. ...
...ows you can static cast it to an HWND. Read only. Native code only! Methods getAccessibleInParentChain() Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Returns the first accessible parent of a DOM node. Guaranteed not to return null if the DOM node is in a document. nsIAccessible getAccessibleInParentChain( in nsIDOMNode aDOMNode, in
boolean aCanCreate ); Parameters aDOMNode The DOM node we need an accessible for. aCanCreate If true, this method can create a new accessible. Otherwise, it will return the first cached accessible in the parent chain. Return value The first nsIAccessible found by crawling up the DOM node to the document root. Native code only!getCachedAccessNode Obsolete since Gecko 2.0 (Firefox 4 / Thunde...
nsIAccessibleSelectable
accessible/public/nsIAccessibleSelectable.idlScriptable An interface for the accessibility module and in-process accessibility clients for dealing with getting and changing the selection of accessible nodes. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void addChildToSelection(in long index); void clearSelection(); nsIArray GetSelectedChildren();
boolean isChildSelected(in long index); nsIAccessible refSelection(in long index); void removeChildFromSelection(in long index);
boolean selectAllSelection(); Attributes Attribute Type Description selectionCount long The number of accessible children currently selected. Read only. Constants Constant Value Description eSelection_Add 0 eSelection_Remove 1 eSelection_GetState 2 ...
...ct is not selectable. clearSelection() Clears the selection in the object so that no children in the object are selected. void clearSelection(); Parameters None. GetSelectedChildren() Returns an nsIArray of the selected nsIAccessible children. nsIArray GetSelectedChildren(); Parameters None. Return value An nsIArray. isChildSelected() Determines if the current child of this object is selected.
boolean isChildSelected( in long index ); Parameters index The zero-based accessible child index. Return value True if the child is selected, false if not. refSelection() Returns a reference to the accessible object representing the specified selected child of the object. nsIAccessible refSelection( in long index ); Parameters index Zero-based selected accessible child index. Return value The s...
...ble child. removeChildFromSelection() Removes the specified child of the object from the object's selection. If the specified object was not selected, then it does nothing. void removeChildFromSelection( in long index ); Parameters index Zero-based accessible child index. Exceptions thrown NS_ERROR_FAILURE If the specified object is not selectable. selectAllSelection() Select all children.
boolean selectAllSelection(); Parameters None. Return value If the object does not accept multiple selection, return false. Otherwise, returns true. ...
nsIAlertsService
tions are provided by Firefox and have become platform-independent. ...
...nsIAlertsService); Method overview void showAlertNotification(in AString imageUrl, in AString title, in AString text, [optional] in
boolean textClickable, [optional] in AString cookie, [optional] in nsIObserver alertListener, [optional] in AString name, [optional] in AString dir, [optional] in AString lang, [optional] in AString data, [optional] in nsIPrincipal principal,[optional] in
boolean inPrivateBrowsing); void closeAlert([optional] in AString name, [optional] in nsIPrincipal principal); Methods showAlertNotification() Displays a notification window. Note: If you are calling this function from JavaScript, you should wrap it in a try/catch because it can fail on Mac OS X prior to Firefox 22. void showAlertNotification( in AString imageUrl, in AString title...
... void closeAlert([optional] in AString name, [optional] in nsIPrincipal principal); Methods showAlertNotification() Displays a notification window. Note: If you are calling this function from JavaScript, you should wrap it in a try/catch because it can fail on Mac OS X prior to Firefox 22. void showAlertNotification( in AString imageUrl, in AString title, in AString text, in
boolean textClickable, Optional in AString cookie, Optional in nsIObserver alertListener, Optional in AString name, Optional in AString dir, Optional in AString lang, Optional in AString data, Optional in nsIPrincipal principal, Optional in
boolean inPrivateBrowsing, Optional ); Parameters imageUrl A URL identifying the image to display in the notification alert. title The title f...
nsIBrowserHistory
void markPageAsFollowedLink(in nsIURI aURI); Obsolete since Gecko 22.0 void markPageAsTyped(in nsIURI aURI); Obsolete since Gecko 22.0 void registerOpenPage(in nsIURI aURI); Obsolete since Gecko 9.0 void removeAllPages(); void removePage(in nsIURI aURI); void removePages([array, size_is(aLength)] in nsIURI aURIs, in unsigned long aLength, in
boolean aDoBatchNotify); void removePagesByTimeframe(in long long aBeginTime, in long long aEndTime); void removePagesFromHost(in AUTF8String aHost, in
boolean aEntireDomain); void removeVisitsByTimeframe(in long long aBeginTime, in long long aEndTime); void unregisterOpenPage(in nsIURI aURI); Obsolete since Gecko 9.0 Note: The markPageAsFollowedLink and mar...
... is to be removed. removePages() Removes multiple pages from history using a batch. Note: If removing fewer than 10 pages, calling removePage() repeatedly is preferable over calling this, since that's about the point at which the overhead of setting up a batch operation doesn't make sense anymore. void removePages( [array, size_is(aLength)] in nsIURI aURIs, in unsigned long aLength, in
boolean aDoBatchNotify /* parameter removed in Gecko 9.0 */ ); Parameters aURIs An array of page URIs to be removed from history. aLength The number of pages listed in the aURIs array. aDoBatchNotify Obsolete since Gecko 9.0 If set to true, the BeginUpdateBatch and EndUpdateBatch events are sent; otherwise, no notification of changes to the history is provided. This parameter was removed in Ge...
...method removes all the pages from the given host. It is called from the UI when the user deletes a group associated with a host or domain. This method lets you delete pages from a specific host, or pages from all hosts in a given domain. If aEntireDomain is true, it will assume aHost is a domain, and remove all pages from the entire domain. void removePagesFromHost( in AUTF8String aHost, in
boolean aEntireDomain ); Parameters aHost The name of the host to be removed. An empty value for this parameter means local files and anything else without a hostname. You can also pass in the localized "(local files)" title given to you by a history query to remove all history information for local files. aEntireDomain If set to true, it will assume aHost is a domain, and remove all pages from t...
nsIBrowserSearchService
eraction, as initialization is complete by then, but this is an issue if your code is executed during startup. If you need to write code that is executed during startup and makes use of nsIBrowserSearchService, you should make sure that this code is executed from the callback to init(). ...
...) Adds a new search engine from the file at the supplied URI, optionally asking the user for confirmation first. If a confirmation dialog is shown, it will offer the option to begin using the newly added engine right away; if no confirmation dialog is shown, the new engine will be used right away automatically. void addEngine( in AString engineURL, in long dataType, in AString iconURL, in
boolean confirm, [optional] in nsISearchInstallCallback callback ); Parameters engineURL The URL to the search engine's description file. dataType An integer representing the plugin file format. Must be one of the supported search engine data types defined above. iconURL A URL string to an icon file to be used as the search engine's icon. This value may be ov...
...ineURL The URL to the search engine's description file. dataType An integer representing the plugin file format. Must be one of the supported search engine data types defined above. iconURL A URL string to an icon file to be used as the search engine's icon. This value may be overridden by an icon specified in the engine description file. confirm A
boolean value indicating whether the user should be asked for confirmation before this engine is added to the list. If this value is false, the engine will be added to the list upon successful load, but it will not be selected as the current engine. callback A nsISearchInstallCallback that will be notified when the addition is complete, or if the addition fails. It will not be called if add...
nsICacheSession
chronous cache entry operations along with evicting cache entries and checking for cache devices instantiation according to the session storage policies. Inherits from: nsISupports Last changed in Gecko 14 (Firefox 14 / Thunderbird 14 / SeaMonkey 2.11) Method overview void asyncOpenCacheEntry(in ACString key, in nsCacheAccessMode accessRequested, in nsICacheListener listener, [optional] in
boolean noWait); void evictEntries(); PRBool isStorageEnabled(); nsICacheEntryDescriptor openCacheEntry(in ACString key, in nsCacheAccessMode accessRequested, in
boolean blockingMode); void doomEntry(in ACString key, in nsICacheListener listener); Attributes Attribute Type Description doomEntriesIfExpired PRBool Expired entries will be doomed or evicted if this attribute is set to true. ...
...pdate the valid lifetime of cached content). This attribute defaults to true. Methods asyncOpenCacheEntry() This method gives an asynchronous cache access. Does not block the calling thread. Instead, the listener will be notified when the descriptor is available. void asyncOpenCacheEntry( in ACString key, in nsCacheAccessMode accessRequested, in nsICacheListener listener, [optional] in
boolean noWait ); Parameters key The key for cache entry. accessRequested The requested access. listener The cache listener to be notified. noWait Do not wait for the cache entry when it is in use and waits for validation. doomEntry() Asynchronously dooms an entry specified by the key. void doomEntry( in ACString key, in nsICacheListener listener ); Parameters key The key for cache entry. listen...
...ng on I/O on the calling thread. This will streamline overall application performance. A cache session can only give out one descriptor with WRITE access to a given cache entry at a time. Until the client calls MarkValid on its descriptor, other attempts to open the same cache entry will block. nsICacheEntryDescriptor openCacheEntry( in ACString key, in nsCacheAccessMode accessRequested, in
boolean blockingMode ); Parameters key The key for cache entry. accessRequested The requested access. blockingMode True or False value to turn blocking mode for calling the thread to ON/OFF respectively. Return value Returns a unique descriptor each time it is called. See also nsICache nsICacheEntryDescriptor nsICacheListener nsICacheService ...
nsICachingChannel
tream as file" semantics (for JAR and plugins). Support for "pinning" cached data in the cache (for printing and save-as). Support for uniquely identifying cached data in cases when the URL is insufficient. For example a HTTP form submission. A channel may optionally implement this interface to allow clients to affect its behavior with respect to how it uses the cache service. Method overview
boolean isFromCache(); Obsolete since Gecko 2.0 Attributes Attribute Type Description cacheAsFile
boolean Specifies whether or not the data should be cached to a file. This may fail if the disk cache is not present. The value of this attribute is usually only settable during the processing of a channel's OnStartRequest. The default value of this attribute depends on the particular implementation ...
... is usually only settable during the processing of a channel's OnStartRequest. The default value of this attribute depends on the particular implementation of nsICachingChannel. cacheFile nsIFile Get the "file" where the cached data can be found. This is valid for as long as a reference to the cache token is held. This may return an error if cacheAsFile is false. Read only. cacheForOfflineUse
boolean Specifies whether or not the data should be placed in the offline cache, in addition to normal memory/disk caching. This may fail if the offline cache is not present. The value of this attribute should be set before opening the channel. cacheKey nsISupports Uniquely identifies the data in the cache for this channel. Holding a reference to this key does not prevent the cached data from being r...
...his flag has been set, and the request can be satisfied via the cache, then the OnDataAvailable events will be skipped. The listener will only see OnStartRequest followed by OnStopRequest. Methods isFromCache() Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) This method finds out whether or not this channel's data is being loaded from the cache.
boolean isFromCache(); Parameters None. Return value Returns true if this channel's data is being loaded from the cache, otherwise returns false. This value is undefined before the channel fires its OnStartRequest notification and after the channel fires its OnStopRequest notification. See also nsICache ...
nsIContentPrefService
.getService(Components.interfaces.nsIContentPrefService); Method overview void addObserver(in AString aName, in nsIContentPrefObserver aObserver); nsIVariant getPref(in nsIVariant aGroup, in AString aName, [optional] in nsIContentPrefCallback aCallback); nsIPropertyBag2 getPrefs(in nsIVariant aGroup); nsIPropertyBag2 getPrefsByName(in AString aName);
boolean hasPref(in nsIVariant aGroup, in AString aName); void removeGroupedPrefs(); void removeObserver(in AString aName, in nsIContentPrefObserver aObserver); void removePref(in nsIVariant aGroup, in AString aName); void removePrefsByName(in AString aName); void setPref(in nsIVariant aGroup, in AString aName, in nsIVariant aValue); Attributes ...
...ence from the global preference space; those preferences apply to all sites. aName The name of the preference whose value is to be retrieved. aCallback An optional nsIContentPrefCallback to receive the result. If desired, JavaScript callers can instead provide a function to call upon completion. Return value The preference's value is returned; this value may be a string, integer,
boolean, or any other value. The result may be null (nsIDataType:VTYPE_EMPTY) if the preference's value is either null, or undefined (nsIDataType:VTYPE_VOID) if there is no saved preference by the specified name. Exceptions thrown NS_ERROR_ILLEGAL_VALUE If aGroup is not a string, nsIURI, or null. Or if aName is null or an empty string getPrefs() Get all preferences and their values for the spec...
...e The name for which all values are to be returned. Return value The result is an nsIPropertyBag2 containing the preferences and their values. Exceptions thrown NS_ERROR_ILLEGAL_VALUE If aName is null or an empty string. hasPref() Determines whether or not a preference exists. Note: Prior to Gecko 2.0, the site could only be specified by nsIURI. Now a string can be used as well.
boolean hasPref( in nsIVariant aGroup, in AString aName ); Parameters aGroup The group for which to see if a preference exists; this may be specified as either a URI or as a string. In either case, the group consists of all sites matching the hostname portion of the specified URI. Specify null to check for the preference in the global preference space; those preferences apply to all sites. ...
nsIController
content/xul/document/public/nsIController.idlScriptable An interface that can be implemented to receive and process commands and events. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void doCommand(in string command);
boolean isCommandEnabled(in string command); void onEvent(in string eventName);
boolean supportsCommand(in string command); Methods doCommand() When this method is called, your implementation should execute the command with the specified name. ...
... Return value Return true if the specified command is currently available to be used; otherwise, it should return false. onEvent() Implement this method to process the event with the specified name. ...
...ue Return true if the specified command is currently available to be used; otherwise, it should return false. onEvent() Implement this method to process the event with the specified name. void onEvent( in string eventName ); Parameters eventName The name of the event to process. supportsCommand() Implement this method to report whether or not the command with the specified name is supported.
boolean supportsCommand( in string command ); Parameters command The name of the command to determine whether or not it is supported. Return value true if the specified command is supported; otherwise false. See also nsICommandController nsIControllers XUL Tutorial/Commands ...
nsICookiePermission
The nsICookiePermission interface is used to test for cookie permissions netwerk/cookie/nsICookiePermission.idlScriptable Please add a summary to this article. ...
...iePermission interface is used to test for cookie permissions netwerk/cookie/nsICookiePermission.idlScriptable Please add a summary to this article. ...
...e() Tests whether or not the given URI/channel may set a specific cookie. This method is always preceded by a call to canAccess(). It may modify the isSession and expiry attributes of the cookie via the aIsSession and aExpiry parameters, in order to limit or extend the lifetime of the cookie. This is useful, for instance, to downgrade a cookie to session-only if it fails to meet certain criteria.
boolean canSetCookie( in nsIURI aURI, in nsIChannel aChannel, in nsICookie2 aCookie, inout
boolean aIsSession, inout PRInt64 aExpiry ); Parameters aURI The URI trying to set the cookie. aChannel The channel corresponding to aURI. aCookie The cookie being added to the cookie database. aIsSession When canSetCookie is invoked, this is the current isSession attribute of the cookie. canSetCookie m...
nsIDOMElement
g getAttribute(in DOMString name); nsIDOMAttr getAttributeNode(in DOMString name); nsIDOMAttr getAttributeNodeNS(in DOMString namespaceURI, in DOMString localName); DOMString getAttributeNS(in DOMString namespaceURI, in DOMString localName); nsIDOMNodeList getElementsByTagName(in DOMString name); nsIDOMNodeList getElementsByTagNameNS(in DOMString namespaceURI, in DOMString localName);
boolean hasAttribute(in DOMString name);
boolean hasAttributeNS(in DOMString namespaceURI, in DOMString localName); void removeAttribute(in DOMString name) nsIDOMAttr removeAttributeNode(in nsIDOMAttr oldAttr) void removeAttributeNS(in DOMString namespaceURI, in DOMString localName) void setAttribute(in DOMString name, in DOMString value) nsIDOMAttr setAttributeNode(in nsIDOMAttr newAttr) n...
...ndants of this tag name. getElementsByTagNameNS() Get all descendants of a tag name in a given namespace. nsIDOMNodeList getElementsByTagNameNS( in DOMString namespaceURI, in DOMString localName ); Parameters namespaceURI Namespace URI localName Tag name Return value A nsIDOMNodeList containg all the descendants of this tag name. hasAttribute() Check if the element have this attribute set. ...
... namespace. nsIDOMNodeList getElementsByTagNameNS( in DOMString namespaceURI, in DOMString localName ); Parameters namespaceURI Namespace URI localName Tag name Return value A nsIDOMNodeList containg all the descendants of this tag name. hasAttribute() Check if the element have this attribute set.
boolean hasAttribute( in DOMString name ); Parameters name Attribute name Return value A
boolean, true if the given attribute is set. hasAttributeNS() Check if the element for a given namespace have this attribute set.
boolean hasAttributeNS( in DOMString namespaceURI, in DOMString localName ); Parameters namespaceURI Namespace URI localName Attribute name Return value A
boolean, true if the given attribute is set. removeAttribute() Remove an attribute. void removeAttribute( in DOMS...
nsIDOMXULElement
od 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 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...
...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 appended to so as to provide focus-specific actions for commands. database nsI...
... 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 attribute is the string "true", otherwise false. Removes the attribute if you set it to false. id DOMString Gets/sets the value of the element's id attribute. left DOMString Gets/sets the value of the element's left attribute. maxHeight DOMString Gets/sets the value of the element's maxheight attribute. maxWidth DOMString Gets/sets the value of the element's m...
nsIDragSession
widget/public/nsIDragSession.idlScriptable Provides support for interacting with an ongoing drag session during a drag and drop operation. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void getData( in nsITransferable aTransferable, in unsigned long aItemIndex );
boolean isDataFlavorSupported( in string aDataFlavor ); Attributes Attribute Type Description canDrop
boolean Set the current state of the drag, whether it can be dropped or not. Usually the target "frame" sets this so the native system can render the correct feedback. dataTransfer nsIDOMDataTransfer The data transfer object for the current drag operation. dragAction uns...
...ive system can render the correct feedback. dataTransfer nsIDOMDataTransfer The data transfer object for the current drag operation. dragAction unsigned long Sets the action (copy, move, link and so on) for the current drag. (See nsIDragService) numDropItems unsigned long Get the number of items that were dropped. Read only. onlyChromeDrop
boolean Indicates if the drop event should be dispatched only to chrome. This allows chrome to handle a drag that was refused by content. sourceDocument nsIDOMDocument The document where the drag was started, which will be null if the drag originated outside the application. Useful for determining if a drop originated in the same document. Read only. sourceNode nsIDOMNode ...
...temIndex ); Parameters aTransferable The transferable for the data to be put into. aItemIndex Which of multiple drag items, zero-based. Must be less than numDropItems. isDataFlavorSupported() Checks to see if any of the native data on the clipboard matches a given data flavor. If numDropItems is greater than one, there is no indication as to which of the items matches the data flavor.
boolean isDataFlavorSupported( in string aDataFlavor ); Parameters aDataFlavor A string representing the MIME type of the data to be matched, such as "text/unicode". Return value true if the specified flavor matches any of the native data on the clipboard, otherwise false. ...
nsIEditorMailSupport
editor/idl/nsIEditorMailSupport.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. Retur...
...s(); Parameters None. Return value An nsISupportsArray containing the IMG and OBJECT tags of the current document. insertAsCitedQuotation() Insert a string as quoted text (whose representation is dependent on the editor type), replacing the selected text (if any), including, if possible, a "cite" attribute. nsIDOMNode insertAsCitedQuotation( in AString aQuotedText, in AString aCitation, in
boolean aInsertHTML ); Parameters aQuotedText The actual text to be quoted. aCitation The "mid" URL of the source message. aInsertHTML Insert as html? (vs plaintext) Return value The nsIDOMNode which was inserted. insertAsQuotation() Insert a string as quoted text (whose representation is dependent on the editor type), replacing the selected text (if any). nsIDOMNode insertAsQuotation( in AString aQ...
...ctionType Text or html? pasteAsQuotation() Paste the text in the OS clipboard at the cursor position, as a quotation (whose representation is dependent on the editor type), replacing the selected text (if any). void pasteAsQuotation( in long aSelectionType ); Parameters aSelectionType Text or html? rewrap() Rewrap the selected part of the document, re-quoting if necessary. void rewrap( in
boolean aRespectNewlines ); Parameters aRespectNewlines Try to maintain newlines in the original? stripCites() Strip any citations in the selected part of the document. void stripCites(); Parameters None. ...
nsIFaviconService
retval,size_is(aDataLen)] out octet aData); Obsolete since Gecko 22.0 AString getFaviconDataAsDataURL(in nsIURI aFaviconURI); Obsolete since Gecko 22.0 nsIURI getFaviconForPage(in nsIURI aPageURI); Obsolete since Gecko 22.0 nsIURI getFaviconImageForPage(in nsIURI aPageURI); Obsolete since Gecko 22.0 nsIURI getFaviconLinkForIcon(in nsIURI aFaviconURI);
boolean isFailedFavicon(in nsIURI aFaviconURI); void removeFailedFavicon(in nsIURI aFaviconURI); void setAndLoadFaviconForPage(in nsIURI aPageURI, in nsIURI aFaviconURI, in
boolean aForceReload, in unsigned long aFaviconLoadType, [optional] in nsIFaviconDataCallback aCallback); Obsolete since Gecko 22.0 void setFaviconData(in nsIURI aFaviconURI, [const,array,size_is(aDataLen)] ...
...icon URI that we've never seen, you'll get back a URI that references an invalid icon. The moz-anno protocol handler's special case for "favicon" annotations will detect most invalid icons and it will resolve to the default icon, although without caching. For invalid chrome URIs, you'll get a broken image. isFailedFavicon() This method checks to see if this favicon is in the failed favicon cache.
boolean isFailedFavicon( in nsIURI aFaviconURI ); Parameters aFaviconURI The URI of an icon in the favicon service. Can be null. Return value Returns true if the favicon is in the failed cache, meaning you probably shouldn't try to load it. A false return value means that it's worth trying to load it. This allows you to avoid trying to load "foo.com/favicon.ico" for every page on a site that...
...bal/skin/icons/warning-16.png). Icons that fail to load will automatically be added to the failed favicon cache. This function will not save favicons for non-bookmarked URLs when history is disabled (expiration time is 0 days). The rest of the functions here will always store favicons even when history is disabled. void setAndLoadFaviconForPage( in nsIURI aPageURI, in nsIURI aFaviconURI, in
boolean aForceReload, in unsigned long aFaviconLoadType, in nsIFaviconDataCallback aCallback Optional from Gecko 2.0 ); Parameters aPageURI URI of the page whose favicon is being set. aFaviconURI URI of the favicon to associate with the page. aForceReload Unset is normal behavior, we will only try to reload the favicon if we don't have it or if it has expired from the cache...
nsIFrameScriptLoader
Frame scripts are loaded as soon as loadFrameScript() is called. ...
...Frame scripts are loaded as soon as loadFrameScript() is called. ...
...when the user navigates. If you want a frame script to do something whenever a new document is loaded, you can listen for the document-element-inserted notification. Parameters Name Type Description aURL String URL for the script to load. aURL must be the absolute URL. data: URLs are also supported. For example data:,dump("foo\n"); aAllowDelayedLoad
Boolean If true, this flag means that the frame script will be loaded into any new frames opened after the loadFrameScript() call, until removeDelayedFrameScript() is called for that script. aRunInGlobalScope
Boolean Optional, defaults to false. By default, frame scripts each have their own scope, so they can declare global variables without causing conflicts with any other fr...
nsIGlobalHistory2
docshell/base/nsIGlobalHistory2.idlScriptable This interface provides information about global history to Gecko. It was split off from nsIGlobalHistory during the transition to toolkit interfaces. Inherits from: nsISupports Last changed in Gecko 1.7 This interface replaces and deprecates nsIGlobalHistory Method overview void addURI(in nsIURI aURI, in
boolean aRedirect, in
boolean aToplevel, in nsIURI aReferrer);
boolean isVisited(in nsIURI aURI); void setPageTitle(in nsIURI aURI, in AString aTitle); Methods addURI() Add a URI to global history. Note: Docshell will not filter out URI schemes like chrome:, data:, about: and view-source:. Embedders should consider filtering out these schemes and others, for example mailbox:, for...
...d(in nsIURI aURI); void setPageTitle(in nsIURI aURI, in AString aTitle); Methods addURI() Add a URI to global history. Note: Docshell will not filter out URI schemes like chrome:, data:, about: and view-source:. Embedders should consider filtering out these schemes and others, for example mailbox:, for the main nsIURI and the referrer. void addURI( in nsIURI aURI, in
boolean aRedirect, in
boolean aToplevel, in nsIURI aReferrer ); Parameters aURI The nsIURI of the page being added. aRedirect Whether the URI was redirected to another location; this is true for the original URI which is redirected. aToplevel Whether the URI is loaded in a top-level window. aReferrer The URI of the referring page. isVisited(...
...rrer ); Parameters aURI The nsIURI of the page being added. aRedirect Whether the URI was redirected to another location; this is true for the original URI which is redirected. aToplevel Whether the URI is loaded in a top-level window. aReferrer The URI of the referring page. isVisited() Checks to see whether the given URI is in history.
boolean isVisited( in nsIURI aURI ); Parameters aURI The nsIURI of the page. Return value true if a URI has been visited. setPageTitle() Set the page title for the given uri. URIs that are not already in global history will not be added. void setPageTitle( in nsIURI aURI, in AString aTitle ); Parameters aURI The nsIURI for which to set to the title. aTitle ...
nsIIOService
ewURI() inspects the scheme in order to delegate creation of the new URI to the appropriate protocol handler). Note: nsIIOService may only be used from the main thread. ...
...When in offline mode, attempts to access the network will fail (although this does not necessarily correlate with whether there is actually a network available -- that's hard to detect without causing the dialer to come up). Observers will be notified of changes to this attribute. Methods allowPort() Checks if a port number is banned. T...
...ork services that may be easily exploitable. If the given port is considered unsafe, then the protocol handler (corresponding to aScheme) will be asked whether it wishes to override the IO service's decision to block the port. This gives the protocol handler ultimate control over its own security policy while ensuring reasonable, default protection. Is similar to nsIProtocolHandler.allowPort().
boolean allowPort( in long aPort, in string aScheme ); Parameters aPort The port to check aScheme The scheme for the protocol handler that could override the IOService's decision. Return value true if the port is allowed, false otherwise. extractScheme() Utility to extract the scheme from a URL string, consistently and according to spec (see RFC 3986). Note: Most URL parsing is done vi...
nsIMemory
Gecko 0.9.6 nsIMemory is used to allocate and deallocate memory segments from a heap. The implementation is free to define the heap. NS_GetMemoryManager returns the global nsIMemory instance. Method overview voidPtr alloc(in size_t size); Violates the XPCOM interface guidelines void free(in voidPtr ptr); Violates the XPCOM interface guidelines void heapMinimize(in
boolean immediate);
boolean isLowMemory(); Deprecated since Gecko 2.0 voidPtr realloc(in voidPtr ptr, in size_t newSize); Violates the XPCOM interface guidelines Methods alloc Allocates a block of memory of a particular size. voidPtr alloc( in size_t size ); Parameters size The size of the block to allocate. Return value If the memory cannot be allocated (because of...
... a call to free() when it is no longer needed. free Frees a previously allocated block of memory. void free( in voidPtr ptr ); Parameters ptr The address of the memory block to free. This may be null, in which case nothing happens. heapMinimize() Attempts to shrink the size of the heap. A particular nsIMemory instance may choose not to implement this method. void heapMinimize( in
boolean immediate ); Parameters immediate If true, heap minimization will occur immediately if the call was made on the main thread. If false, the flush will be scheduled to happen when the app is idle. isLowMemory Determine if we are in a low-memory situation (what constitutes low-memory is platform dependent). This can be used to trigger the memory pressure observers. Note: This method was d...
...eduled to happen when the app is idle. isLowMemory Determine if we are in a low-memory situation (what constitutes low-memory is platform dependent). This can be used to trigger the memory pressure observers. Note: This method was deprecated in Gecko 2.0. If you need to monitor low memory conditions, you should watch for the Low memory notifications "memory-pressure" notifications instead.
boolean isLowMemory(); Parameters None. Return value true if we are in a low-memory situation. Otherwise false. Note: From Gecko 2.0 always returns false. See bug 592308. realloc() Reallocates a block of memory to a new size. voidPtr realloc( in voidPtr ptr, in size_t newSize ); Parameters ptr The address of the memory block to reallocate. This may be null, in which case realloc behav...
nsIMicrosummary
osummaries generated by an nsIMicrosummaryGenerator. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 6.0 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Warning: Microsummary support was removed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Method overview void addObserver(in nsIMicrosummaryObserver observer);
boolean equals(in nsIMicrosummary aOther); void removeObserver(in nsIMicrosummaryObserver observer); void update(); Attributes Attribute Type Description content AString The content of the microsummary. Since generators and pages can be remote resources, and we need them to generate the content, this may not always be available. Read only. g...
...tributes Attribute Type Description content AString The content of the microsummary. Since generators and pages can be remote resources, and we need them to generate the content, this may not always be available. Read only. generator nsIMicrosummaryGenerator The generator that generates this microsummary. May need to be loaded. needsRemoval
boolean Used when a site author has indicated that a microsummary (or an associated generator) will no longer be available. Read only. pageURI nsIURI The URI of the page being summarized. Read only. updateInterval long The minimum interval after which this microsummary would like to be refreshed or null if it doesn't care. Read only. Methods addObserver() Add a mic...
...sn't care. Read only. Methods addObserver() Add a microsummary observer to this microsummary. void addObserver( in nsIMicrosummaryObserver observer ); Parameters observer The microsummary observer to add. equals() Microsummary equivalence test. Microsummaries equal if they summarize the same page with the same microsummary-generator (see also nsIMicrosummaryGenerator.equals()).
boolean equals( in nsIMicrosummary aOther ); Parameters aOther The microsummary to compare against. Return value Returns true if the microsummaries are equal. false if they aren't. Note: This method returns false if either objects don't have a generator removeObserver() Remove a microsummary observer from this microsummary. void removeObserver( in nsIMicrosummaryObserver observer ); Par...
nsIMicrosummaryGenerator
des access to a microsummary that has been installed in Firefox. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 6.0 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Warning: Microsummary support was removed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3) Method overview long calculateUpdateInterval(in nsIDOMNode aPageContent);
boolean equals(in nsIMicrosummaryGenerator aOther); AString generateMicrosummary(in nsIDOMNode aPageContent); Attributes Attribute Type Description loaded
boolean Has the generator itself (which may be a remote resource) been loaded. Read only. localURI nsIURI For generators installed by the user or bundled with the browser, the local URI points to the location of the local file containing t...
...Microsummaries generated by XSLT templates need page content, while those which represent the actual microsummary do not. Read only. uri nsIURI The canonical location and unique identifier of the generator. It tells us where the generator comes from and where to go for updates. Read only. ...
... generator doesn't specify an interval, null is returned. long calculateUpdateInterval( in nsIDOMNode aPageContent ); Parameters aPageContent The content of the page being summarized. Return value The interval in milliseconds until the next update request. equals() Microsummary-generator equivalence test. Generators are considered equal if their canonical locations (uri attribute) are equal.
boolean equals( in nsIMicrosummaryGenerator aOther ); Parameters aOther The generator to compare against. Return value A
boolean indicating if the two generators are equal. generateMicrosummary() Generate a microsummary by processing the generator template against the page content. If a generator doesn't need content, pass null as the parameter to this method. Note: In the future, this may be expand...
nsIMicrosummaryService
(in nsIURI generatorURI); nsIMicrosummary createMicrosummary(in nsIURI pageURI, in nsIURI generatorURI); nsISimpleEnumerator getBookmarks(); nsIMicrosummaryGenerator getGenerator(in nsIURI generatorURI); nsIMicrosummarySet getMicrosummaries(in nsIURI pageURI, in long long bookmarkID); nsIMicrosummary getMicrosummary(in long long bookmarkID);
boolean hasMicrosummary(in long long bookmarkID); nsIMicrosummaryGenerator installGenerator(in nsIDOMDocument xmlDefinition);
boolean isMicrosummary(in long long bookmarkID, in nsIMicrosummary microsummary); nsIMicrosummary refreshMicrosummary(in long long bookmarkID); void removeMicrosummary(in long long bookmarkID); void setMicrosummary(in long long bookmark...
...rrent microsummary for the given bookmark. nsIMicrosummary getMicrosummary( in long long bookmarkID ); Parameters bookmarkID The bookmark for which to get the current microsummary. Return value Returns the current microsummary for the bookmark, or null if the bookmark does not have a current microsummary. hasMicrosummary() Whether or not the given bookmark has a current microsummary.
boolean hasMicrosummary( in long long bookmarkID ); Parameters bookmarkID The bookmark for which to set the current microsummary. Return value Returns a
boolean representing whether or not the given bookmark has a current microsummary. installGenerator() Install the microsummary generator in the given XML definition. nsIMicrosummaryGenerator installGenerator( in nsIDOMDocument xmlDefinitio...
...mary generator in the given XML definition. nsIMicrosummaryGenerator installGenerator( in nsIDOMDocument xmlDefinition ); Parameters xmlDefinition An nsIDOMDocument XML document defining the generator. Return value Returns the nsIMicrosummaryGenerator that was installed. isMicrosummary() Reports whether or not the given microsummary is the current microsummary for the given bookmark.
boolean isMicrosummary( in long long bookmarkID, in nsIMicrosummary microsummary ); Parameters bookmarkID The bookmark to check. microsummary The microsummary to check. Return value Returns whether or not the microsummary is the current one for the bookmark. refreshMicrosummary() Refreshes a microsummary, updating its value in the datastore and UI. If this method can refresh the mi...
nsIMsgFilterCustomAction
recommended form: ExtensionName@example.com#ActionName */ readonly attribute ACString id; /* action name to display in action list. This should be localized. */ readonly attribute AString name; /** * Is this custom action valid for a particular filter type? * * @param type the filter type * @param scope the search scope * * @return true if valid */
boolean isValidForType(in nsMsgFilterTypeType type, in nsMsgSearchScopeValue scope); /** * After the user inputs a particular action value for the action, determine * if that value is valid. * * @param actionValue The value entered. * @param actionFolder Folder in the filter list * @param filterType Filter Type (Manual, OfflineMail, etc.) * * @return ...
... A localized message to display if invalid * Set to null if the actionValue is valid */ AUTF8String validateActionValue(in AUTF8String actionValue, in nsIMsgFolder actionFolder, in nsMsgFilterTypeType filterType); /* allow duplicate actions in the same filter list? Default No. */ attribute
boolean allowDuplicates; /* * The custom action itself * * Generally for the apply method, folder-based methods give correct * results and are preferred if available. Otherwise, be careful * that the action does correct notifications to maintain counts, and correct * manipulations of both IMAP and local non-database storage of message * metadata. */ /** * Apply the custom...
...copyListener, in nsMsgFilterTypeType filterType, in nsIMsgWindow msgWindow); /* does this action start an async action? If so, a copy listener must * be used to continue filter processing after the action. This only * applies to after-the-fact (manual) filters. Call OnStopCopy when done * using the copyListener to continue. */ readonly attribute
boolean isAsync; /// Does this action need the message body? readonly attribute
boolean needsBody; }; ...
nsIMsgWindow
by: @mozilla.org/messenger/msgwindow;1. To create an instance, use: msgWindow = Components.classes["@mozilla.org/messenger/msgwindow;1"] .createInstance(Components.interfaces.nsIMsgWindow); In Thunderbird the default message window is stored in the global variable msgWindow. Method overview void displayHTMLInMessagePane(in AString title, in AString body, in
boolean clearMsgHdr); void StopUrls(); void closeWindow(); Attributes Attribute Type Description windowCommands nsIMsgWindowCommands This allows the backend code to send commands to the UI, such as clearMsgPane. statusFeedback nsIMsgStatusFeedback This allows the backend code to sen...
...ndle things like bad cert exceptions. promptDialog nsIPrompt Readonly: This is the equivalent of calling GetInterface on the rootDocShell object. mailCharacterSet ACString This is used to track the character set of the currently displayed message. If set to an alias, the actual character set is returned. charsetOverride
boolean Remember the message's charset was overridden, so it can be inherited (e.g for quoting). stopped
boolean Check if a running url been stopped. If you are checking this flag, you need to clear it before you start your operation since there's no convenient place to clear it. domWindow nsIDOMWindow The message window's global chrome window...
...ow's global chrome window object. Set this to initialize the rootDocShell. Methods displayHTMLInMessagePane() Loads the specified HTML in the message pane. This is equivalent to calling LoadURI on the nsIWebNavigation object with a data: URL specifying the HTML. void displayHTMLInMessagePane(in AString title, in AString body, in
boolean clearMsgHdr); Parameters title Not used. body The HTML to display in the message pane. Note that the HTML is wrapped in <html> and <body> tags for you. clearMsgHdr Whether or not the existing message pane and header should be cleared before the HTML is displayed. StopUrls() This is equivalent to calling Stop(nsIWebNavigation::STOP_NETWORK) on the nsIWe...
nsINavHistoryResult
iewer as the viewer; this provides a prepackaged interaction with a nsiTreeBoxObject. If you need a different view, you'll need to create your own viewer interface. The viewer provides notifications to the controller when view events occur; this is done using the nsINavHistoryResultViewObserver interface. Method overview void addObserver(in nsINavHistoryResultObserver aObserver, in
boolean aOwnsWeak); void removeObserver(in nsINavHistoryResultObserver aObserver); Attributes Attribute Type Description root nsINavHistoryContainerResultNode The root of the results. This container gives you access to all the results in the tree. Note: Keep in mind that you need to open containers for th...
...sortingMode attribute. sortingMode unsigned short Specifies the sorting mode for the result. This value must be one of nsINavHistoryQueryOptions.SORT_BY_*. Changing this value updates the corresponding options for the result so that reusing the current options and queries will always return results based on the current view. suppressNotifications
boolean If true, notifications are suppressed. This is used to prevent rapid flickering of changes when performing batch or temporary operations on the result structure. viewer nsINavHistoryResultViewer The viewer for this result. The viewer is responsible for actually updating the view object itself, as well as for handling events on the view. Obsolete since Gecko 2.0 ...
...sult structure. viewer nsINavHistoryResultViewer The viewer for this result. The viewer is responsible for actually updating the view object itself, as well as for handling events on the view. Obsolete since Gecko 2.0 Methods addObserver() Adds an observer for changes that occur on the result. void addObserver( in nsINavHistoryResultObserver aObserver, in
boolean aOwnsWeak ); Parameters aObserver An object that implements the nsINavHistoryResultObserver interface, which will receive notifications of changes on the result. aOwnsWeak If false, the result will keep an owning reference to the observer, which must be removed by calling removeObserver(). If true, the result will keep a weak reference to the observer, which must imp...
nsIPipe
xpcom/io/nsIPipe.idlScriptable This interface represents an in-process buffer that can be read using nsIInputStream and written using nsIOutputStream. ...
... xpcom/io/nsIPipe.idlScriptable This interface represents an in-process buffer that can be read using nsIInputStream and written using nsIOutputStream. ...
...IMemory segmentAllocator); Attributes Attribute Type Description inputStream nsIAsyncInputStream The pipe's input end, which also implements nsISearchableInputStream. Read only. outputStream nsIAsyncOutputStream The pipe's output end. Read only. Methods init() initialize this pipe. void init( in
boolean nonBlockingInput, in
boolean nonBlockingOutput, in unsigned long segmentSize, in unsigned long segmentCount, in nsIMemory segmentAllocator ); Parameters nonBlockingInput true specifies non-blocking input stream behavior. nonBlockingOutput true specifies non-blocking output stream behavior. segmentSize Specifies the segment size in bytes (pass 0 ...
nsIPluginHost
n string aMimeType); Native code only! void loadPlugins(); Native code only! void newPluginNativeWindow(out nsPluginNativeWindowPtr aPluginNativeWindow); Native code only! void parsePostBufferToFixHeaders(in string aInPostData, in unsigned long aInPostDataLen, out string aOutPostData, out unsigned long aOutPostDataLen); Native code only! void reloadPlugins(in
boolean reloadPages); void setIsScriptableInstance(in nsIPluginInstance aInstance, in
boolean aScriptable); Native code only! Obsolete since Gecko 2.0 void setUpPluginInstance(in string aMimeType, in nsIURI aURL, in nsIPluginInstanceOwner aOwner); Native code only! void stopPluginInstance(in nsIPluginInstance aInstance); Native code only! void UserAgent(in nativeChar...
...string aInPostData, in unsigned long aInPostDataLen, out string aOutPostData, out unsigned long aOutPostDataLen ); Parameters aInPostData The post data. aInPostDataLen The length aInPostData. aOutPostData The buffer. aOutPostDataLen The length of aOutPostData. reloadPlugins() Causes the plugins directory to be searched again for new plugin libraries. void reloadPlugins( in
boolean reloadPages ); Parameters reloadPages Indicates whether currently visible pages should also be reloaded. Native code only!setIsScriptableInstance Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. To notify the...
...nly!setIsScriptableInstance Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. To notify the plugin manager that the plugin created a script object. ...
nsIPrintingPrompt
void showPageSetup( in nsIPrintSettings printSettings, in nsIObserver aObs ); Parameters printSettings PrintSettings for page setup. aObs Optional An observer to know if the contents...
...tSettings, in nsIObserver aObs); void showPrintDialog(in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings); void showProgress(in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings, in nsIObserver openDialogObserver, in
boolean isForPrinting, out nsIWebProgressListener webProgressListener, out nsIPrintProgressParams printProgressParams, out
boolean notifyOnOpen); Methods showPageSetup() Shows the print progress dialog. void showPageSetup( in nsIPrintSettings printSettings, in nsIObserver aObs ); Parameters printSettings PrintSettings for page setup. aObs Optional An observer to know if the contents of the Print Settings object has changed while the dialog is being shown. For example, some platforms may implement an "Ap...
...ntDialog( in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings ); Parameters webBrowserPrint Represents the document to be printed. printSettings PrintSettings for print "job". showProgress() Shows the print progress dialog. void showProgress( in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings, in nsIObserver openDialogObserver, in
boolean isForPrinting, out nsIWebProgressListener webProgressListener, out nsIPrintProgressParams printProgressParams, out
boolean notifyOnOpen ); Parameters webBrowserPrint Represents the document to be printed. printSettings PrintSettings for print "job" openDialogObserver An observer that will be notifed when the dialog is opened. isForPrinting true - for printing, false for print pr...
nsIScrollable
eric interface without concern for the type of content that may be inside. ...
...n for the type of content that may be inside. ...
... An integer representing the orientation of the scrollbar. Return value getDefaultScrollbarPreferences() long getDefaultScrollbarPreferences( in long scrollOrientation ); Parameters scrollOrientation An integer representing the orientation of the scrollbar. Return value An integer representing the state of the scrollbar. getScrollbarVisibility() void getScrollbarVisibility( out
boolean verticalVisible, out
boolean horizontalVisible ); Parameters verticalVisible
Boolean specifying the visibility of the vertical scrollbar. horizontalVisible
Boolean specifying the visibility of the horizontal scrollbar. getScrollRange() Obsolete since Gecko 29.0 (Firefox 29.0 / Thunderbird 29.0 / SeaMonkey 2.26) void getScrollRange( in long scrollOr...
nsISearchEngine
ease add a summary to this article. ...
... iconURI nsIURI A nsIURI corresponding to the engine's icon, stored locally. May be null. Read only. name AString The display name of the search engine. This is a unique identifier. Read only. ...
...A string meant to indicate the context of the search request. This allows the search service to provide a different nsISearchSubmission depending on e.g. where the search is triggered in the UI. Possible values depend on the application's installed search engines. Return value An nsISearchSubmission supportsResponseType() Determines whether the engine can return responses in the given MIME type.
boolean supportsResponseType( in AString responseType ); Parameters responseType The MIME type to check for. Return value Returns true if the engine spec has a URL with the given responseType, false otherwise. See also nsISearchSubmission nsIBrowserSearchService ...
nsIServiceManager
r depends on the repository to find and instantiate factories to obtain services. Inherits from: nsISupports Last changed in Gecko 1.0 Method overview void getService(in nsCIDRef aClass, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result); void getServiceByContractID(in string aContractID, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result);
boolean isServiceInstantiated(in nsCIDRef aClass, in nsIIDRef aIID);
boolean isServiceInstantiatedByContractID(in string aContractID, in nsIIDRef aIID); Methods getService() This method returns a reference to a particular XPCOM service given the ClassID of the service. Unlike createInstance, this will always return the same object each time it is called with the same arguments. void ge...
...Parameters aContractID The ContractID of the service that is being requested. aIID The interface type to be returned. result The resulting interface pointer. Exceptions thrown NS_ERROR_FACTORY_NOT_REGISTERED Indicates that the specified class is not registered. isServiceInstantiated() This method tests whether or not a XPCOM service, identified by ClassID, has been instantiated.
boolean isServiceInstantiated( in nsCIDRef aClass, in nsIIDRef aIID ); Parameters aClass The ClassID of the service that is being tested. aIID The interface type to be tested. Return value true if the service has already been created. Exceptions thrown NS_ERROR_SERVICE_NOT_AVAILABLE Indicates that the service hasn't been instantiated. NS_NOINTERFACE Indicates that the IID given isn'...
...interface type to be tested. Return value true if the service has already been created. Exceptions thrown NS_ERROR_SERVICE_NOT_AVAILABLE Indicates that the service hasn't been instantiated. NS_NOINTERFACE Indicates that the IID given isn't supported. isServiceInstantiatedByContractID() This method tests whether or not a XPCOM service, identified by ContractID, has been instantiated.
boolean isServiceInstantiatedByContractID( in string aContractID, in nsIIDRef aIID ); Parameters aContractID The ContractID of the service that is being tested. aIID The interface type to be tested. Return value true if the service has already been created. Exceptions thrown NS_ERROR_SERVICE_NOT_AVAILABLE Indicates that the service hasn't been instantiated. NS_NOINTERFACE Indicates ...
nsISmsDatabaseService
ng aBody, in unsigned long long aDate); long saveSentMessage(in DOMString aReceiver, in DOMString aBody, in unsigned long long aDate); void getMessage(in long messageId, in long requestId, [optional] in unsigned long long processId); void deleteMessage(in long messageId, in long requestId, [optional] in unsigned long long processId); void createMessageList(in nsIDOMMozSmsFilter filter, in
boolean reverse, in long requestId, [optional] in unsigned long long processId); void getNextMessageInList(in long listId, in long requestId, [optional] in unsigned long long processId); void clearMessageList(in long listId); void markMessageRead(in long messageId, in
boolean value, in long requestId, [optional] in unsigned long long processId) Methods saveReceivedMessage() void saveReceivedMes...
...ss. deleteMessage() void deleteMessage( in long messageId, in long requestId, [optional] in unsigned long long processId ); Parameters messageId A number representing the id of the message. requestId A number representing the id of the request. processId Optional A number representing the id of the process. createMessageList() void createMessageList( in nsIDOMMozSmsFilter filter, in
boolean reverse, in long requestId, [optional] in unsigned long long processId ); Parameters filter A SmsFilter to filter out SMS messages from a list. reverse A
Boolean indicating whether to reverse the ordering. requestId A number representing the id of the request. processId Optional A number representing the id of the process. getNextMessageInList() void getNextMessageInList( in long listId,...
...estId A number representing the id of the request. processId Optional A number representing the id of the process. clearMessageList() void getNextMessageInList( in long listId, ); Parameters listId A number representing the id of the message list. markMessageRead() Requires Gecko 15.0(Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) void markMessageRead( in long messageId, in
boolean value, in long requestId, [optional] in unsigned long long processId ); Parameters messageId A number representing the id of the message. value A
Boolean indicating whether a message is read or unread. requestId A number representing the id of the request. processId Optional A number representing the id of the process. ...
nsISmsService
zilla.org/sms/smsservice;1"] .createInstance(Components.interfaces.nsISmsService); Method overview [implicit_jscontext] nsIDOMMozSmsMessage createSmsMessage(in long id, in DOMString delivery, in DOMString sender, in DOMString receiver, in DOMString body, in jsval timestamp, in bool read ); unsigned short getNumberOfMessagesForText(in DOMString text);
boolean hasSupport(); void send(in DOMString number, in DOMString message, in long requestId, [optional] in unsigned long long processId); Methods createSmsMessage() [implicit_jscontext] nsIDOMMozSmsMessage createSmsMessage( in long id, in DOMString delivery, in DOMString sender, in DOMString receiver, in DOMString body, in jsval timestamp, in bool read ); Parameters ...
...rameters id A number representing the id of the message. delivery A DOMString which can either be "received" or "sent" and is representing the way the SMS was delivered. sender A DOMString with the name of the sender. receiver A DOMString with the name of the receiver. body A DOMString with the text of the message. timestamp A Date object with the timestamp of the message. read A
Boolean indicating whether a message is marked as read or unread. Return value A SmsMessage getNumberOfMessagesForText() unsigned short getNumberOfMessagesForText( in DOMString text ); Parameters text A DOMString text to check. Return value The number of multi-part SMS needed for a given text (160 characters for one SMS). hasSupport() Checks if the current platform has SMS support. boo...
...rked as read or unread. Return value A SmsMessage getNumberOfMessagesForText() unsigned short getNumberOfMessagesForText( in DOMString text ); Parameters text A DOMString text to check. Return value The number of multi-part SMS needed for a given text (160 characters for one SMS). hasSupport() Checks if the current platform has SMS support.
boolean hasSupport(); Return value
Boolean. send() void send( in DOMString number, in DOMString message, in long requestId, in unsigned long long processId Optional ); Parameters number A DOMString with a telephone number to send to. message A DOMString with the text message. requestId Missing Description processId Optional Missing Description See also SmsManager SmsMessage ...
nsIThread
ve a built-in event queue, and a thread is an event target that can receive nsIRunnable objects (events) to be processed on the thread. To create a thread, use the nsIThreadManager interface. xpcom/threads/nsIThread.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsIEventTarget Method overview void shutdown()
boolean hasPendingEvents()
boolean processNextEvent(in
boolean mayWait) Attributes Attribute Type Description PRThread PRThread The NSPR thread object corresponding to the nsIThread. Read only. Methods shutdown() Shuts down the thread. This causes events to stop being dispatched to the thread, and causes any pending events to run to completion befor...
...as erroneously called from within the thread itself, the thread was not created with the Thread Manager's nsIThreadManager.newThread() method, or the thread is already in the process of being shut down. hasPendingEvents() Determines whether or not the thread has events that are ready to be processed. Note: This method must be called from within the thread itself, and not from another thread.
boolean hasPendingEvents() Parameters None. Return value true if there are pending events at the time the function was called. Since other threads may add events to the current thread, it's possible that by the time this method returns, the event queue may no longer be empty, even if a false result is reported. Exceptions thrown NS_ERROR_UNEXPECTED The method was called when this thread wasn't ...
...is re-entrant but may only be called if this thread is the current thread. Warning: Calling nsIThread.processNextEvent allows network and UI events to run which can modify data structures that your code isn't expecting to be modified during a synchronous method call. This can cause random crashes and other bugs that may be hard to find and fix. Consider use asynchronous callbacks instead.
boolean processNextEvent( in
boolean mayWait ); Parameters mayWait If true, this method blocks until an event is available to process if the event queue is empty. If false, this method returns immediately if the queue is empty. Return value Returns true if an event was processed, or false if there were no pending events. Exceptions thrown NS_ERROR_UNEXPECTED This method was called when th...
nsITransaction
This attribute is checked by the transaction manager after the transaction's Execute() method is called. ...
...This attribute is checked by the transaction manager after the transaction's Execute() method is called. ...
...ead only. Methods doTransaction() Executes the transaction. void doTransaction(); Parameters None. merge() Attempts to merge a transaction into "this" transaction. Both transactions must be in their undo state, doTransaction() methods already called. The transaction manager calls this method to coalesce a new transaction with the transaction on the top of the undo stack. This method returns a
boolean value that indicates the merge result. A true value indicates that the transactions were merged successfully, a false value if the merge was not possible or failed. If true, the transaction manager will Release() the new transaction instead of pushing it on the undo stack.
boolean merge( in nsITransaction aTransaction ); Parameters aTransaction The previously executed transaction to merge. R...
nsITransferable
DataFlavor ); nsISupportsArray flavorsTransferableCanExport( ); nsISupportsArray flavorsTransferableCanImport( ); void getAnyTransferData( out string aFlavor, out nsISupports aData, out unsigned long aDataLen ); void getTransferData( in string aFlavor, out nsISupports aData, out unsigned long aDataLen ); void init(in nsILoadContext aContext);
boolean isLargeDataSet( ); void removeDataFlavor( in string aDataFlavor ); void setTransferData( in string aFlavor, in nsISupports aData, in unsigned long aDataLen ); Attributes Attribute Type Description converter nsIFormatConverter An nsIFormatConverter instance which implements the code needed to convert data into and out of the transferable give...
... in string aDataFlavor ); void setTransferData( in string aFlavor, in nsISupports aData, in unsigned long aDataLen ); Attributes Attribute Type Description converter nsIFormatConverter An nsIFormatConverter instance which implements the code needed to convert data into and out of the transferable given the supported flavors. isPrivateData
boolean Although this is not a read-only attribute, you should generally avoid changing it, since doing so may cause it not to actually reflect the status of the context in which the transferable was created. Native code only! requestingNode nsIDOMNode The source DOM Node this transferable was created from. Native code only! Note: Currently, this can only be used on Win...
...he document like this: var loadContext = doc.defaultView.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsILoadContext); In C++ callers, if you have the corresponding document, you can just call nsIDocument.GetLoadContext() to get to the load context object. isLargeDataSet() Returns true if the data is large.
boolean isLargeDataSet(); Parameters None. Return value true if the data is large; otherwise, the result is false. removeDataFlavor() Removes the data flavor matching the given one (as determined by a string comparison), along with the corresponding data. void removeDataFlavor( in string aDataFlavor ); Parameters aDataFlavor The data flavor to remove. setTransferData() Sets the data...
nsITreeBoxObject
view nsITreeView The view that backs t...
... void clearStyleAndImageCaches(); Attributes Attribute Type Description columns nsITreeColumns Readonly: Obtain the columns. view nsITreeView The view that backs the tree and that supplies it with its data. It is dynamically settable, either using a view attribute on the tree tag or by setting this attribute to a new value. focused
boolean Whether or not we are currently focused. treeBody nsIDOMElement Readonly: Obtain the treebody content node. This is a node that corresponds to the treechildren tag. rowHeight long Readonly: Obtain the height of a row. rowWidth long Readonly: Obtain the width of a row. horizontalPosition long Readonly: Get the pixel position of the ho...
...t); Parameters row The index of the row col The nsITreeColumn element The pseudoelement. This can have values of "cell", "twisty", "image", and "text". Returns x The x coordinate col The y coordinate. width The width of the element height The height of the element isCellCropped() Determine if the text of a cell is being cropped or not.
boolean isCellCropped(in long row, in nsITreeColumn col); Parameters row The index of the row col The nsITreeColumn rowCountChanged() Notify the tree that the number of rows changed. The view is responsible for calling this notification method when rows are added or removed. For non-contiguous additions/removals, this method should be called multiple times. void rowCountChanged(in lon...
nsITreeColumn
tring idConst); Native code only! nsITreeColumn getNext(); nsITreeColumn getPrevious(); void invalidate(); Attributes Attribute Type Description atom nsIAtom The atom attribute of nsITreeColumn which returns an nsIAtom for the column, making it fast to do comparisons. Read only. Native code only! columns nsITreeColumns The nsITreeColumns containing this column. Read only. cycler
boolean If true, then the column is a cycler column. If the cycler attribute is not set, the column cells are regular text cells. Read only. editable
boolean If true the nsITreeColumn content is editable. If the editable attribute is not set, the column cells are not editable. Read only. element nsIDOMElement The treecol element. Read only. id AString The id attribute of the nsITreeColumn. Read on...
...If the selectable attribute is not set, the column cells are not selectable. Read only. ...
...If the selectable attribute is not set, the column cells are not selectable. Read only. ...
nsIUpdate
R (7) An error occurred while writing the patched application. UNEXPECTED_ERROR (8) An unanticipate type of error occurred. extensionVersion AString The add-on version of this update. Used by the extension system to track compatibility of installed add-ons with this update. Obsolete since Gecko 2.0 installDate long long The date and time at which the update was installed. isCompleteUpdate
boolean true if the update is a complete replacement of the existing installation; false if the update is a patch representing the difference between the new version and the existing version. isSecurityUpdate
boolean true if the update is a security update. If the update is a security update, a more seriously-worded user interface message is used to present the update to the user. licenseURL AString ...
... number of patches supplied by this update. Read only. platformVersion AString The toolkit version of this update. previousAppVersion AString The Application version prior to the application being updated. selectedPatch nsIUpdatePatch The currently selected patch for this update. Read only. serviceURL AString The URL to the update service that supplied this update. ...
... to the application being updated. selectedPatch nsIUpdatePatch The currently selected patch for this update. Read only. serviceURL AString The URL to the update service that supplied this update. showNeverForVersion
boolean Whether to show the "No Thanks" button in the update prompt. This allows the user to never receive a notification for that specific update version again. showPrompt
boolean Whether to show the update prompt which requires user confirmation when an update is found during a background update check. This overrides the default setting to download the update in the background. showSurvey
boolean Whether to show the survey link in the update prompt. The url must also be present in the app.update.surveyURL preference. state AString The state of the selected patch: "...
nsIXULTemplateBuilder
aResult, in nsIDOMNode aQueryNode); void removeResult(in nsIXULTemplateResult aResult); void replaceResult(in nsIXULTemplateResult aOldResult, in nsIXULTemplateResult aNewResult, in nsIDOMNode aQueryNode); void resultBindingChanged(in nsIXULTemplateResult aResult); nsIXULTemplateResult getResultForId(in AString aId); nsIXULTemplateResult getResultForContent(in nsIDOMElement aElement);
boolean hasGeneratedContent(in nsIRDFResource aNode, in nsIAtom aTag); void addRuleFilter(in nsIDOMNode aRule, in nsIXULTemplateRuleFilter aFilter); [noscript] void init(in nsIContent aElement); [noscript] void createContents(in nsIContent aElement, in
boolean aForceCreation); void addListener(in nsIXULBuilderListener aListener); void removeListener(in nsIXULBuilderListener aListener); Attri...
...arameters aContent Element to result the result of Return value The result for the specified element. hasGeneratedContent() Determines whether or not the node has content generated for it. This method is intended to be called only by the RDF query processor. If aTag is set, the content must have a tag name that matches aTag. aTag may be ignored for builders that don't generate real DOM content.
boolean hasGeneratedContent( in nsIRDFResource aNode, in nsIAtom aTag ); Parameters aNode Node to check. aTag Tag that must match. Return value Returns true if the node has content generated for it; otherwise returns false. addRuleFilter() Adds a rule filter for a given rule, which may be used for specialized rule filtering. Any existing filter on the rule is removed. The default conditions specifi...
...presumably has a datasources attribute, which the builder will parse to set up the template builder's data sources. [noscript] void init( in nsIContent aElement ); Parameters aElement The root element from which to derive the data. Native code only!createContents Invoked lazily by a XUL element that needs its child content built. [noscript] void createContents( in nsIContent aElement, in
boolean aForceCreation ); Parameters aElement The element whose contents need to be built. aForceCreation If true, the contents of the element are generated even if the element is closed; this behavior is used with menus. If false, the element's contents are only generated if it's open. addListener() Adds a listener to this template builder. The template builder holds a strong reference to the listener...
nsIXULTemplateQueryProcessor
A binding allows an additional variable t...
...A binding allows an additional variable to be set for a result, outside of those defined within the ...
...sibility of the query processor if it needs to load the content of the URI. If the query processor needs to load the datasource asynchronously, it may set the aShouldDelayBuilding returned parameter to true to delay building the template content, and call the builder's Rebuild method when the data is available. nsISupports getDatasource( in nsIArray aDataSources, in nsIDOMNode aRootNode, in
boolean aIsTrusted, in nsIXULTemplateBuilder aBuilder, out
boolean aShouldDelayBuilding ); Parameters aDataSources The list of nsIURI objects and/or nsIDOMNode objects. aRootNode The root node the builder is attached to. aIsTrusted true if the template is in a trusted document. aBuilder The template builder. aShouldDelayBuilding Whether the builder should wait to build the content or not. Return v...
Type conversion
r someCFunction = library.declare("someCFunction", ctypes.default_abi, ctypes.void_t, ctypes.char.ptr); someCFunction(buffer); // here ctypes.char.array(10)() is converted to ctypes.char.ptr type Implicit conversion can be tested in the following way: var myStruct = ctypes.StructType("myStructType", [ { "v": ctypes.bool } ])(); myStruct.v = 1; console.log(myStruct.v.toString()); // 'true'
Boolean type Target Type Source Converted value ctypes.bool JS
boolean src JS number (0 or 1) if src == 0: false if src == 1: true var myStruct = ctypes.StructType("myStructType", [ { "v": ctypes.bool } ])(); myStruct.v = true; console.log(myStruct.v.toString()); // 'true' myStruct.v = false; console.log(myStruct.v.toString()); // 'false' myStr...
... 'true' myStruct.v = 0; console.log(myStruct.v.toString()); // 'false' myStruct.v = 10; // throws Error myStruct.v = "a"; // throws Error Integer types Target Type Source Converted value ctypes.char16_t JS string (only if its length == 1) src.charCodeAt(0) any integer types JS number (only if fits to the size) src JS
boolean if src == true: 1 if src == false: 0 var myStruct = ctypes.StructType("myStructType", [ { "v": ctypes.char16_t } ])(); myStruct.v = 0x41; console.log(myStruct.v.toString()); // "A" myStruct.v = true; console.log(myStruct.v.toString()); // "\x01" myStruct.v = "X"; console.log(myStruct.v.toString()); // "X" myStruct.v = "XX"; // throws Error var myStruct = ctype...
... properties for all fields and no other properties) implicitly convert each enumerable property to corresponding field Explicit convert In js-ctypes, data could be converted explicitly, when passing to CData constructor: ctypes.int32_t("123"); // string "123" is parsed as 10-base string Explicit convert tries implicit convert first, and if it fails, the following rules are applied:
Boolean type Target Type Source Converted value ctype.bool JS value To
Boolean(src) console.log(ctypes.bool("123").toString()); // 'ctypes.bool(true)' console.log(ctypes.bool("").toString()); // 'ctypes.bool(false)' Integer types Target Type Source Converted value any integer types JS number except -Infinity, Infinity, NaN C-style c...
Debugger - Firefox Developer Tools
en called as a constructor, the Debugger object creates a new Debugger instance. new Debugger([global, ...]) Create a debugger object, and apply its addDebuggee method to each of the givenglobal objects to add them as the initial debuggees. Accessor Properties of the Debugger Prototype Object A Debugger instance inherits the following accessor properties from its prototype: enabled A
boolean value indicating whether this Debugger instance's handlers, breakpoints, and the like are currently enabled. It is an accessor property with a getter and setter: assigning to it enables or disables this Debugger instance; reading it produces true if the instance is enabled, or false otherwise. This property is initially true in a freshly created Debugger instance. This property gives debugger c...
... or disables this Debugger instance; reading it produces true if the instance is enabled, or false otherwise. This property is initially true in a freshly created Debugger instance. This property gives debugger code a single point of control for disentangling itself from the debuggee, regardless of what sort of events or handlers or "points" we add to the interface. allowUnobservedAsmJS A
boolean value indicating whether asm.js code running inside this Debugger instance's debuggee globals is invisible to Debugger API handlers and breakpoints. Setting this to false inhibits the ahead-of-time asm.js compiler and forces asm.js code to run as normal JavaScript. This is an accessor property with a getter and setter. It is initially false in a freshly created Debugger instance. Setting this f...
...head-of-time asm.js compiler and forces asm.js code to run as normal JavaScript. This is an accessor property with a getter and setter. It is initially false in a freshly created Debugger instance. Setting this flag to true is intended for uses of subsystems of the Debugger API (e.g, Debugger.Source) for purposes other than step debugging a target JavaScript program. allowWasmBinarySource A
boolean value indicating whether WebAssembly sources will be available in binary form. The WebAssembly text generation will be disabled. collectCoverageInfo A
boolean value indicating whether code coverage should be enabled inside each debuggee of this Debugger instance. Changing this flag value will recompile all JIT code to add or remove code coverage instrumentation. Changing this flag when any fr...
BudgetService.reserve() - Web APIs
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. ...
... 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. ...
... 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. ...
CSSNumericValue.equals() - Web APIs
Return value A
Boolean. Exceptions None. Examples As stated earlier, all passed values must be of the same type and value and must be in the same order. Some of the following examples illustrate what happens when they are not. ...
... Return value A
Boolean. Exceptions None. Examples As stated earlier, all passed values must be of the same type and value and must be in the same order. Some of the following examples illustrate what happens when they are not. ...
... CSSNumericValue interface returns a
boolean indicating whether the passed value are strictly equal. To return a value of true, all passed values must be of the same type and value and must be in the same order. This allows structural equality to be tested quickly. Syntax var
boolean = CSSNumericValue.equals(number); Parameters number Either a Number or a CSSNumericValue. Return value A
Boolean. Exceptions None. Examples As stated earlier, all passed values must be of the same type and value and must be in the same order. Some of the following examples illustrate what happens when they are not. let cssMathSum = new CSSMathSum(CSS.px(1), CSS.px(2)); let matchingCssMathSum = new CSSMathSum(CSS.px(1), CSS.px(2)); // Prints true console.log(cssMathSum.equals(matchingCssMathSum)); let ...
CustomEvent - Web APIs
The CustomEvent interface represents events initialized by an application for any purpose. Note: This feature is available in Web Workers. Constructor CustomEvent() Creates a CustomEvent. Properties CustomEvent.detail Read only Any data passed when initializing the event. ...
...passed when initializing the event. This interface inherits properties from its parent, Event: Event.bubbles Read only A
boolean indicating whether or not the event bubbles up through the DOM. Event.cancelBubble A historical alias to Event.stopPropagation(). Setting its value to true before returning from an event handler prevents propagation of the event. Event.cancelable Read only A
boolean indicating whether the event is cancelable. Event.composed Read only A
boolean indicating whether or not the event can bubble across the boundary between the shadow DOM and the regular DOM. Event.currentTarget Read only A reference to the currently registered target for the event. This is the object to which the event is currently slated to be sent. It's possible this has been changed along...
...change this to be a DOMHighResTimeStamp instead. Event.type Read only The name of the event. Case-insensitive. Event.isTrusted Read only Indicates whether or not the event was initiated by the browser (after a user click, for instance) or by a script (using an event creation method, like Event.initEvent). Obsolete properties Event.scoped Read only Obsolete; use composed instead. (A
Boolean indicating whether the given event will bubble across through the shadow root into the standard DOM.) Methods CustomEvent.initCustomEvent() Initializes a CustomEvent object. If the event has already being dispatched, this method does nothing. This interface inherits methods from its parent, Event: Event.createEvent() Creates a new event, which must then be initialized by cal...
DisplayMediaStreamConstraints.video - Web APIs
Since a video track must always be included, a value of false results in a TypeError exception being thrown. ...
...providing a MediaTrackConstraints object, which is used to process the video data after obtaining it from the device but prior to adding it to the stream. Syntax displayMediaStreamConstraints.video = allowVideoFlag; displayMediaStreamConstraints.video = mediaTrackConstraints; displayMediaStreamConstraints = { video: allowVideoFlag | mediaTrackConstraints; } Value The value may be either a
Boolean or a MediaTrackConstraints object. If a
Boolean is specified, a value of true (the default) indicates that the stream returned by getDisplayMedia() should be in whatever format the user agent feels is best. A value of false is not permitted and will throw a TypeError. If a MediaTrackConstraints object is given instead, the video track will be processed to match the settings given in the constra...
...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 user. monitor The stream's video track contains the entire contents of one or more of the user's screens. window The stream contains a single window selected by the user for sharing. logicalSurface A Constrain
Boolean value which may contain a single
Boolean value or a set of them, indicating whether or not to allow the user to choose source surfaces which do not directly correspond to display areas. These may include backing buffers for windows to allow capture of window contents that are hidden by other windows in front of them, or buffers containing larger documents that need to be scrolled through to see t...
Document - Web APIs
string. Document.embedsRead only Returns a list of the embedded <embed> elements within the current document. Document.fonts Returns the FontFaceSet interface of the current document. Document.formsRead only Returns a list of the <form> elements within the current document. Document.headRead only Returns the <head> element of the current document. Document.hiddenRead only Returns a
Boolean value indicating if the page is considered hidden or not. Document.imagesRead only Returns a list of the images in the current document. Document.implementationRead only Returns the DOM implementation associated with the current document. Document.lastStyleSheetSetRead only Returns the name of the style sheet set that was last enabled. Has the value null until the style sheet is changed ...
...ly Returns the DOM implementation associated with the current document. Document.lastStyleSheetSetRead only Returns the name of the style sheet set that was last enabled. Has the value null until the style sheet is changed by setting the value of selectedStyleSheetSet. Document.linksRead only Returns a list of all the hyperlinks in the document. Document.mozSyntheticDocument Returns a
Boolean that is true only if this document is synthetic, such as a standalone image, video, audio file, or the like. Document.pluginsRead only Returns a list of the available plugins. Document.featurePolicy Read only Returns the FeaturePolicy interface which provides a simple API for introspecting the feature policies applied to a specific document. Document.preferredStyleSheetSetRead only Retu...
...ose target elements are descendants of the document. Document.getElementsByClassName() Returns a list of elements with the given class name. Document.getElementsByTagName() Returns a list of elements with the given tag name. Document.getElementsByTagNameNS() Returns a list of elements with the given tag name and namespace. Document.hasStorageAccess() Returns a Promise that resolves with a
boolean value indicating whether the document has access to its first-party storage. Document.importNode() Returns a clone of a node from an external document. Document.normalizeDocument() Replaces entities, normalizes text nodes, etc. Document.releaseCapture() Releases the current mouse capture if it's on an element in this document. Document.releaseEvents() See Window.releaseEvents(). ...
Event - Web APIs
ressEvent RelatedEvent RTCDataChannelEvent RTCIdentityErrorEvent RTCIdentityEvent RTCPeerConnectionIceEvent SensorEvent StorageEvent SVGEvent SVGZoomEvent TimeEvent TouchEvent TrackEvent TransitionEvent UIEvent UserProximityEvent WebGLContextEvent WheelEvent Constructor Event() Creates an Event object, returning it to the caller. ...
...ent Constructor Event() Creates an Event object, returning it to the caller. Properties Event.bubbles Read only A
boolean indicating whether or not the event bubbles up through the DOM. Event.cancelBubble A historical alias to Event.stopPropagation(). Setting its value to true before returning from an event handler prevents propagation of the event. Event.cancelable Read only A
boolean indicating whether the event is cancelable. Event.composed Read only A
boolean indicating whether or not the event can bubble across the boundary between the shadow DOM and the regular DOM. Event.currentTarget Read only A reference to the currently registered target for the event. This is the object to which the event is currently slated to be sent. It's possible this has been changed along...
... addition, work is underway to change this to be a DOMHighResTimeStamp instead. Event.type Read only The name of the event. Case-insensitive. Event.isTrusted Read only Indicates whether or not the event was initiated by the browser (after a user click, for instance) or by a script (using an event creation method, like Event.initEvent). Deprecated properties Event.scoped Read only A
Boolean indicating whether the given event will bubble across through the shadow root into the standard DOM. Use composed instead. Methods Event.composedPath() Returns the event's path (objects on which listeners will be invoked). This does not include nodes in shadow trees if the shadow root was created with its ShadowRoot.mode closed. Event.preventDefault() Cancels the event (if it is cancel...
HTMLObjectElement - Web APIs
object element's nested browsing context, if any; otherwise null. HTMLObjectElement.contentWindow Read only Returns a WindowProxy representing the window proxy of the object element's nested browsing context, if any; otherwise null. HTMLObjectElement.data Returns a DOMString that reflects the data HTML attribute, specifying the address of a resource's data. HTMLObjectElement.declare Is a
Boolean that reflects the declare HTML attribute, indicating that this is a declaration, not an instantiation, of the object. HTMLObjectElement.form Read only Retuns a HTMLFormElement representing the object element's form owner, or null if there isn't one. HTMLObjectElement.height Returns a DOMString that reflects the height HTML attribute, specifying the displayed height of the resource in CSS pix...
...ing that reflects the standby HTML attribute, specifying a message to display while the object loads. HTMLObjectElement.tabindex Is a long representing the position of the element in the tabbing navigation order for the current document. HTMLObjectElement.type Is a DOMString that reflects the type HTML attribute, specifying the MIME type of the resource. HTMLObjectElement.typeMustMatch Is a
Boolean that reflects the typemustmatch HTML attribute, indicating if the resource specified by data must only be played if it matches the type attribute. HTMLObjectElement.useMap Is a DOMString that reflects the usemap HTML attribute, specifying a <map> element to use. HTMLObjectElement.validationMessage Read only Returns a DOMString representing a localized message that describes the validation co...
...ment.validity Read only Returns a ValidityState with the validity states that this element is in. HTMLObjectElement.vspace Is a long representing the horizontal space in pixels around the control. HTMLObjectElement.width Is a DOMString that reflects the width HTML attribute, specifying the displayed width of the resource in CSS pixels. HTMLObjectElement.willValidate Read only Returns a
Boolean that indicates whether the element is a candidate for constraint validation. Always false for HTMLObjectElement objects. Methods Inherits methods from its parent, HTMLElement. HTMLObjectElement.checkValidity() Retuns a
Boolean that always is true, because object objects are never candidates for constraint validation. HTMLObjectElement.setCustomValidity() Sets a custom validity message fo...
HTMLTextAreaElement - Web APIs
Element</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties accessKey string: Returns / Sets the element's accesskey attribute. autocapitalize string: Returns / Sets the element's capitalization behavior for user input. Valid values are: none, off, characters, words, sentences. autocomplete autofocus
boolean: Returns / Sets the element's autofocus attribute, indicating that the control should have input focus when the page loads cols unsigned long: Returns / Sets the element's cols attribute, indicating the visible width of the text area. defaultValue string: Returns / Sets the control's default value, which behaves like the Node.textContent property. disabled bool...
... indicating the minimum number of characters the user can enter. This constraint is evaluated only when the value changes. name string: Returns / Sets the element's name attribute, containing the name of the control. placeholder string: Returns / Sets the element's placeholder attribute, containing a hint to the user about what to enter in the control. readOnly
boolean: Returns / Sets the element's readonly attribute, indicating that the user cannot modify the value of the control. required
boolean: Returns / Sets the element's required attribute, indicating that the user must specify a value before submitting the form. rows unsigned long: Returns / Sets the element's rows attribute, indicating the number of visible text lines for the co...
... 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. validity Read only ValidityState object: Returns the validity states that this element is in. value string: Returns / Sets the raw value contained in the control. willValidate Read only
boolean: Returns whether the element is a candidate for constraint validation. false if any conditions bar it from constraint validation, including its readOnly or disabled property is true. wrap string: Returns / Sets the wrap HTML attribute, indicating how the control wraps text. HTMLTextAreaElement.labelsRead only NodeList: Returns a list of label elements associated with...
KeyboardEvent() - Web APIs
g the following fields: "key", optional and defaulting to "", of type DOMString, that sets the value of KeyboardEvent.key. "code", optional and defaulting to "", of type DOMString, that sets the value of KeyboardEvent.code. "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. "shiftKey", optional and defaulting to false, of type
Boolean, that sets the value of KeyboardEvent.shiftKey. "altKey", optional and defaulting to false, of type
Boolean, that sets the value of KeyboardEvent.altKey. "metaKey", optional and defaulting to false, of type
Boolean, that sets the value of KeyboardEvent.metaKey. "repeat", optional a...
... "charCode", optional and defaulting to 0, of type unsigned long, that sets the value of the deprecated KeyboardEvent.charCode. ...
... "charCode", optional and defaulting to 0, of type unsigned long, that sets the value of the deprecated KeyboardEvent.charCode. "keyCode", optional and defaulting to 0, of type unsigned long, that sets the value of the deprecated KeyboardEvent.keyCode. ...
MSManipulationEvent.initMSManipulationEvent() - Web APIs
ethod 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 canceled. viewArg [in] Type: AbstractView The view in which the event is ta...
...ate [in] Type: Integer Indicates the current state of the manipulation event. Return value This method does not return a value. ...
... Indicates the current state of the manipulation event. Return value This method does not return a value. ...
MediaRecorder.ignoreMutedMedia - Web APIs
Browser Compatibility The compatibility table in this page is generated from structured data. ...
... Browser Compatibility The compatibility table in this page is generated from structured data. ...
... The ignoreMutedMedia property of the MediaRecorder interface indicates whether the MediaRecorder instance will record input, when the input MediaStreamTrack is muted. If this attribute is false, MediaRecorder will record silence for audio and black frames for video. The default is false. Syntax var
boolean = MediaRecorder.ignoreMutedMedia MediaRecorder.ignoreMutedMedia =
boolean Value A
Boolean. 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. DesktopMobileChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetignoreMutedMedia De...
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. ...
...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. ...
...seWheelEvent, this interface is non-standard and deprecated. It was used in Gecko-based browsers only. Instead use the standard WheelEvent. Method overview void initMouseScrollEvent(in DOMString typeArg, in
boolean canBubbleArg, in
boolean cancelableArg, in nsIDOMAbstractView viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in
boolean ctrlKeyArg, in
boolean altKeyArg, in
boolean shiftKeyArg, in
boolean metaKeyArg, in unsigned short buttonArg, in nsIDOMEventTarget relatedTargetArg, in long axis); Attributes Attribute Type Description axis Read only long Indicates scroll direction. Constants Delta modes Constant Value Description HORIZONTAL_AXIS 0x01 T...
Navigator - Web APIs
a device. Navigator.cookieEnabled Read only Returns false if setting a cookie will be ignored and true otherwise. Navigator.geolocation Read only Returns a Geolocation object allowing accessing the location of the device. NavigatorConcurrentHardware.hardwareConcurrency Read only Returns the number of logical 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 bro...
...pose information about the decoding and encoding capabilities for a given format and output capabilities. Navigator.maxTouchPoints Read only Returns the maximum number of simultaneous touch contact points are supported by the current device. NavigatorPlugins.mimeTypes Read only Returns an MimeTypeArray listing the MIME types supported by the browser. Navigator.onLine Read only Returns a
Boolean indicating whether the browser is working online. Navigator.permissions Read only Returns a Permissions object that can be used to query and update permission status of APIs covered by the Permissions API. NavigatorID.platform Read only Returns a string representing the platform of the browser. Do not rely on this function to return a significant value. NavigatorPlugins.plugins Read only...
...o deliver notifications to the user from your web application. Navigator.oscpu Returns a string that represents the current operating system. Navigator.productSub Returns the build number of the current browser (e.g., "20060909"). Navigator.securitypolicy Returns an empty string. In Netscape 4.7x, returns "US & CA domestic policy" or "Export policy". Navigator.standalone Returns a
boolean indicating whether the browser is running in standalone mode. Available on Apple's iOS Safari only. Navigator.storageQuota Read only Returns a StorageQuota interface which provides means to query and request storage usage and quota information. Navigator.vendor Returns the vendor name of the current browser (e.g., "Netscape6"). Navigator.vendorSub Returns the vendor version number (e...
PaymentRequest.PaymentRequest() - Web APIs
the BasicCardRequest dictionary. total A total amount for the payment request that overrides value in details.total. This is typically used when details.modifiers.additionalItems adds a discount or a surchase to the request. options Optional Lets you set options that control the behavior of the user agent. ...
...modifiers.additionalItems adds a discount or a surchase to the request. options Optional Lets you set options that control the behavior of the user agent. This parameter contains the following fields: requestPayerName A
Boolean indicating whether the user agent should collect the payer's name and submit it with the payment request. The default is false. requestPayerEmail A
Boolean indicating whether the user agent should collect the payer's email address and submit it with the payment request. The default is false. ...
...is parameter contains the following fields: requestPayerName A
Boolean indicating whether the user agent should collect the payer's name and submit it with the payment request. The default is false. requestPayerEmail A
Boolean indicating whether the user agent should collect the payer's email address and submit it with the payment request. The default is false. requestPayerPhone A
Boolean indicating whether the user agent should collect the payer's phone number and submit it with the payment request. The default is false. requestShipping A
Boolean indicating whether the user agent should collect the payer's shipping address and submit it with the payment request. If you set this type to true, you should select an appropriate shippingType. The default is false. shippingType ...
PublicKeyCredentialCreationOptions.extensions - Web APIs
xtension. Also Chrome doesn't plan to support any other extension in future Extension identifier Type Description authnSel Array of BufferSource Authenticator selection. Restricts the list of authenticator models which may be used. If no matching authenticator is available, the credential is still generated with another available authenticator. exts
Boolean Supported extensions. If true, the client outputs an array of strings containing the extensions which are supported by the authenticator. uvi
Boolean User verification index. If true, the client outputs an ArrayBuffer which contains a value uniquely identifying a user verification data record. In other words, this may be used server side to check if the current operation is base...
...If true, the client outputs an array of arrays with 3 values containing information about how the user was verified (e.g. ...
...tputs an ArrayBuffer which contains a value uniquely identifying a user verification data record. In other words, this may be used server side to check if the current operation is based on the same biometric data that the previous authentication. loc
Boolean Location. If true, the client outputs a Coordinates object representing the geolocation of the authenticator. uvm
Boolean User verification method. If true, the client outputs an array of arrays with 3 values containing information about how the user was verified (e.g. fingerprint, pin, pattern), how the key is protected, how the matcher (tool used for the authentication operation) is protected. biometricPerfBounds Object with two numerical properties: FAR and FRR Biometric authenticator performanc...
RTCIceCandidatePairStats - Web APIs
MHighResTimeStamp value that specifies the time at which the last (most recent) STUN response was received by the local candidate from the remote candidate in this pair. localCandidateId Optional The unique ID string corresponding to the RTCIceCandidate from the data included in the RTCIceCandidateStats object providing statistics for the candidate pair's local candidate. nominated Optional A
Boolean value which, if true, indicates that the candidate pair described by this object is one which has been proposed for use, and will be (or was) used if its priority is the highest among the nominated candidate pairs. See RFC 5245, section 7.1.3.2.4 for details. packetsReceived Optional The total number of packets received on this candidate pair. packetsSent Optional The total number of packets ...
...bsolete 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 table for details on which browsers support them and in which versions. priority Optional An integer value indicating the candidate pair's priority. ...
...any existing code to avoid using them as soon as is practical. Check the compatibility table for details on which browsers support them and in which versions. priority Optional An integer value indicating the candidate pair's priority. readable Optional A
Boolean value indicating whether or not data can be sent over the connection described by the candidate pair. writable Optional A
Boolean value indicating whether or not data can be received on the connection described by the candidate pair. Non-standard properties selected Optional A Firefox-specific
Boolean value which is true if the candidate pair described by this object is the one currently in use. The spec-compliant way to determine the selected candidate pair is to look for a stats object of type transport, which is ...
StorageEvent - Web APIs
The key attribute is null when the change is caused by the storage clear() method. Read only. newValue DOMString The n...
...The key attribute is null when the change is caused by the storage clear() method. Read only. newValue DOMString The new value of the key. The...
...URL of the document whose key changed. Read only. Methods initStorageEvent() Initializes the event in a manner analogous to the similarly-named initEvent() method in the DOM Events interfaces. Syntax storageEvent.initStorageEvent(type[, canBubble[, cancelable[, key[, oldValue[, newValue[, url[, storageArea]]]]]]]) Parameters typeArg The name of the event. canBubble Optional A
boolean indicating whether the event bubbles up through the DOM or not. cancelable Optional A
boolean indicating whether the event is cancelable. key Optional The key whose value is changing as a result of this event. oldValue Optional The key's old value. newValue Optional The key's new value. url Optional The URL of the document initiating the change. storageArea Optional The Storage object...
TextTrack.mode - Web APIs
The TextTrack interface's mode property is a string specifying and controlling the text track's mode: disabled, 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 tex...
...es 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 ignoring it. No cues are active, no events are being fired, and the user agent won't attempt to obtain the track's cues. This is the default value, unless the text track has the default
Boolean attribute is specified, in which case the default is showing. hidden The text track is currently active but the cues aren't being displayed. If the user agent hasn't tried to obtain the track's cues yet, it will do so soon (thereby populating the track's TextTrack.cues property). The user agent is keeping a list of the active cues (in the track's activeCues property) and events are being fired ...
...h the text isn't being displayed. showing The text track is currently enabled and is visible. If the track's cues list hasn't been obtained yet, it will be soon. The activeCues list is being maintained and events are firing at the appropriate times; the track's text is also being drawn appropriately based on the styling and the track's kind. This is the default value if the text track's default
Boolean attribute is specified. Usage notes The default mode is disabled, unless the default
Boolean attribute is specified, in which case the default mode is showing. When a text track is loaded in the disabled state, the corresponding WebVTT file is not loaded until the state changes to either showing or hidden. This way, the resource fetch and memory usage are avoided unless the cues are actually n...
WebGLRenderingContext.getVertexAttrib() - Web APIs
bGL API returns information about a vertex attribute at a given position. Syntax any gl.getVertexAttrib(index, pname); Parameters index A GLuint specifying the index of the vertex attribute. pname A GLenum specifying the information to query. Possible values: gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: Returns the currently bound WebGLBuffer. gl.VERTEX_ATTRIB_ARRAY_ENABLED: Returns a GL
boolean that is true if the vertex attribute is enabled at this index. Otherwise false. gl.VERTEX_ATTRIB_ARRAY_SIZE: Returns a GLint indicating the size of an element of the vertex array. gl.VERTEX_ATTRIB_ARRAY_STRIDE: Returns a GLint indicating the number of bytes between successive elements in the array. 0 means that the elements are sequential. gl.VERTEX_ATTRIB_ARRAY_TYPE: Returns a GLenum repre...
...rray. gl.VERTEX_ATTRIB_ARRAY_STRIDE: Returns a GLint indicating the number of bytes between successive elements in the array. 0 means that the elements are sequential. gl.VERTEX_ATTRIB_ARRAY_TYPE: Returns a GLenum representing the array type. One of gl.BYTE, gl.UNSIGNED_BYTE, gl.SHORT, gl.UNSIGNED_SHORT, gl.FLOAT. ...
... gl.VERTEX_ATTRIB_ARRAY_DIVISOR: Returns a GLint describing the frequency divisor used for instanced rendering. ...
WebGL types - Web APIs
GLbitfield unsigned long A bit field that stores multiple, logical bits. Used for example in WebGLRenderingContext.clear(). GLbyte byte 8-bit twos complement signed integer. ...
... GLbitfield unsigned long A bit field that stores multiple, logical bits. Used for example in WebGLRenderingContext.clear(). GLbyte byte 8-bit twos complement signed integer. ...
... GLbitfield unsigned long A bit field that stores multiple, logical bits. Used for example in WebGLRenderingContext.clear(). GLbyte byte 8-bit twos complement signed integer. ...
XMLHttpRequest - Web APIs
status line. XMLHttpRequest.timeout Is an unsigned long representing the number of milliseconds a request can take before automatically being terminated. XMLHttpRequestEventTarget.ontimeout Is an EventHandler that is called whenever the request times out. XMLHttpRequest.upload Read only Is an XMLHttpRequestUpload, representing the upload process. XMLHttpRequest.withCredentials Is a
Boolean that indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies or authorization headers. Non-standard properties XMLHttpRequest.channelRead only Is a nsIChannel. The channel used by the object when performing the request. XMLHttpRequest.mozAnonRead only Is a
boolean. If true, the request will be sent without cookie and authentication he...
...Control requests should be made using credentials such as cookies or authorization headers. Non-standard properties XMLHttpRequest.channelRead only Is a nsIChannel. The channel used by the object when performing the request. XMLHttpRequest.mozAnonRead only Is a
boolean. If true, the request will be sent without cookie and authentication headers. XMLHttpRequest.mozSystemRead only Is a
boolean. If true, the same origin policy will not be enforced on the request. XMLHttpRequest.mozBackgroundRequest Is a
boolean. It indicates whether or not the object represents a background service request. XMLHttpRequest.mozResponseArrayBuffer Obsolete since Gecko 6 Read only ArrayBuffer. The response to the request, as a JavaScript typed array. XMLHttpRequest.multipartObsolete since Gecko 22 Th...
...Please use Server-Sent Events, Web Sockets, or responseText from progress events instead. Event handlers onreadystatechange as a property of the XMLHttpRequest instance is supported in all browsers. ...
XRWebGLLayer() - Web APIs
or WebGL2RenderingContext identifying the WebGL drawing context to use for rendering the scene for the specified WebXR session. layerInit Optional An object conforming to the XRWebGLLayerInit dictionary, providing configuration options for the new XRWebGLLayer. ...
...nit Optional An object conforming to the XRWebGLLayerInit dictionary, providing configuration options for the new XRWebGLLayer. The options available are: alpha Optional The frame buffer's color buffer will be established with an alpha channel if the alpha
Boolean property is true. Otherwise, the color buffer will not have an alpha channel. The default value is true. antialias Optional A
Boolean value which is true if anti-aliasing is to be used when rendering in the context; otherwise false. The browser selects the anti-aliasing method to use; there is no support for requesting a specific mode yet. The default value is true. depth Optional A
Boolean value which, if true, requests that the new layer have a depth buffer; otherwise, no depth layer is allocated. The default is true. fra...
...ich is used to scale the image during compositing, with a value of 1.0 represents the default pixel size for the frame buffer. The static XRWebGLLayer function XRWebGLLayer.getNativeFramebufferScaleFactor() returns the scale that would result in a 1:1 pixel ratio, thereby ensuring that the rendering is occurring at the device's native resolution. The default is 1.0. ignoreDepthValues Optional A
Boolean value which indicates whether or not to ignore the contents of the depth buffer while compositing the scene. The default is false. stencil Optional A
Boolean value which, if true, requests that the new layer include a stencil buffer. Otherwise, no stencil buffer is allocated. The default is false. Return value A newly-created XRWebGLLayer which links the specified XRSession to the WebGL con...
XRWebGLLayerInit - Web APIs
The WebXR Device API's XRWebGLLayerInit dictionary is used to provide configuration options when creating a new XRWebGLLayer object with the XRWebGLLayer() constructor. The constructor's optional layerInit parameter takes an object which must conform to this dictionary. Properties alpha Optional The frame buffer's color buffer will be established with an alpha channel if the alpha
Boolean property is true. ...
...bject with the XRWebGLLayer() constructor. The constructor's optional layerInit parameter takes an object which must conform to this dictionary. Properties alpha Optional The frame buffer's color buffer will be established with an alpha channel if the alpha
Boolean property is true. Otherwise, the color buffer will not have an alpha channel. The default value is true. antialias Optional A
Boolean value which is true if anti-aliasing is to be used when rendering in the context; otherwise false. The browser selects the anti-aliasing method to use; there is no support for requesting a specific mode yet. The default value is true. depth Optional A
Boolean value which, if true, requests that the new layer have a depth buffer; otherwise, no depth layer is allocated. The default is true. fra...
...ich is used to scale the image during compositing, with a value of 1.0 represents the default pixel size for the frame buffer. The static XRWebGLLayer function XRWebGLLayer.getNativeFramebufferScaleFactor() returns the scale that would result in a 1:1 pixel ratio, thereby ensuring that the rendering is occurring at the device's native resolution. The default is 1.0. ignoreDepthValues Optional A
Boolean value which indicates whether or not to ignore the contents of the depth buffer while compositing the scene. The default is false. stencil Optional A
Boolean value which, if true, requests that the new layer include a stencil buffer. Otherwise, no stencil buffer is allocated. The default is false. Examples Given an XRSession, xrSession, and a WebGL rendering context, gl, this snippet sets th...
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
attribute; we can include other attributes to specify information such as whether we want it to autoplay and loop, whether we want to show the browser's default audio controls, etc. The content inside the opening and closing <audio></audio> tags is shown as a fallback in browsers that don't support the element. Attributes This element's attributes include the global attributes. autoplay A
Boolean attribute: if specified, the audio will automatically begin playback as soon as it can do so, without waiting for the entire audio file to finish downloading. Note: Sites that automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so should be avoided when possible. If you must offer autoplay functionality, you should make it opt-in (requiring a user ...
...setting currentTime to a time before that would fail. For example, if the audio's media timeline starts at 12 hours, setting currentTime to 3600 would be an attempt to set the current playback position well before the beginning of the media, and would fail. The getStartDate() method can be used to determine the beginning point of the media timeline's reference frame. disableRemotePlayback A
Boolean attribute used to disable the capability of remote playback in devices that are attached using wired (HDMI, DVI, etc.) and wireless technologies (Miracast, Chromecast, DLNA, AirPlay, etc). See this proposed specification for more information. In Safari, you can use x-webkit-airplay="deny" as a fallback. duration Read only A double-precision floating-point value which indicates the duration ...
... only A double-precision floating-point value which indicates the duration (total length) of the audio in seconds, on the media's timeline. If no media is present on the element, or the media is not valid, the returned value is NaN. If the media has no known end (such as for live streams of unknown duration, web radio, media incoming from WebRTC, and so forth), this value is +Infinity. loop A
Boolean attribute: if specified, the audio player will automatically seek back to the start upon reaching the end of the audio. muted A
Boolean attribute that indicates whether the audio will be initially silenced. Its default value is false. preload This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have o...
<button>: The Button element - HTML: Hypertext Markup Language
nding tag are mandatory. Permitted parents Any element that accepts phrasing content. Implicit ARIA role button Permitted ARIA roles checkbox, link, menuitem, menuitemcheckbox, menuitemradio, option, radio, switch, tab DOM interface HTMLButtonElement Attributes This element's attributes include the global attributes. autofocus HTML5 This
Boolean attribute specifies that the button should have input focus when the page loads. Only one element in a document can have this attribute. autocomplete This attribute on a <button> is nonstandard and Firefox-specific. Unlike other browsers, Firefox persists the dynamic disabled state of a <button> across page loads. Setting autocomplete="off" on the button disables this feature; see bug 654072.
...s that the button should have input focus when the page loads. Only one element in a document can have this attribute. autocomplete This attribute on a <button> is nonstandard and Firefox-specific. Unlike other browsers, Firefox persists the dynamic disabled state of a <button> across page loads. Setting autocomplete="off" on the button disables this feature; see bug 654072. disabled This
Boolean attribute prevents the user from interacting with the button: it cannot be pressed or focused. Firefox, unlike other browsers, persists the dynamic disabled state of a <button> across page loads. Use the autocomplete attribute to control this feature. form HTML5 The <form> element to associate the button with (its form owner). The value of this attribute must be the id of a <form> in the sa...
...houldn't be public, like login credentials. get: The form data are appended to the form's action URL, with a ? as a separator, and the resulting URL is sent to the server. Use this method when the form has no side effects, like search forms. If specified, this attribute overrides the method attribute of the button's form owner. formnovalidate HTML5 If the button is a submit button, this
Boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the novalidate attribute of the button's form owner. This attribute is also available on <input type="image"> and <input type="submit"> elements. formtarget HTML5 If the button is a submit button, this attribute is a author-defined name or standardized, underscore-prefixe...
<input type="image"> - HTML: Hypertext Markup Language
utton inputs support the following attributes: Attribute Description alt Alternate string to display when the image can't be shown formaction The URL to which to submit the data formenctype The encoding method to use when submitting the form data formmethod The HTTP method to use when submitting the form formnovalidate A
Boolean which, if present, indicates that the form shouldn't be validated before submission formtarget A string indicating a browsing context from where to load the results of submitting the form height The height, in CSS pixels, at which to draw the image src The URL from which to load the image width The width, in CSS pixels, at which to draw the image ...
...the URL given by the formaction or action attribute using an HTTP post request. This method supports complex data and file attachments. dialog This method is used to indicate that the button simply closes the dialog with which the input is associated, and does not transmit the form data at all. This attribute is also available on <input type="submit"> and <button> elements. formnovalidate A
Boolean attribute which, if present, specifies that the form should not be validated before submission to the server. This overrides the value of the novalidate attribute on the element's owning form. This attribute is also available on <input type="submit"> and <button> elements. formtarget A string which specifies a name or keyword that indicates where to display the response received after submitti...
...d in the body of the form and is sent to the server. get: The data from the form is appended to the form attribute URI, with a '?' as a separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters. If specified, this attribute overrides the method attribute of the element's form owner. formnovalidate HTML5 A
Boolean attribute specifying that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the novalidate attribute of the element's form owner. formtarget HTML5 A name or keyword indicating where to display the response that is received after submitting the form. This is a name of, or keyword for, a browsing context (for example, tab, window, or inline frame).
<input type="search"> - HTML: Hypertext Markup Language
ons maxlength The maximum number of characters the input should accept minlength The minimum number of characters long the input can be and still be considered valid pattern A regular expression the input's contents must match in order to be valid placeholder An exemplar value to display in the input field whenever it is empty readonly A
Boolean attribute indicating whether or not the contents of the input should be read-only size A number indicating how many characters wide the input field should be spellcheck Controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used list The values of the list attribute is the id of a <datalist> el...
... BiDi using Unicode control characters in The Unicode Bidirectional Text Algorithm for those characters. Note: Avoid using the placeholder attribute if you can. It is not as semantically useful as other ways to explain your form, and can cause unexpected technical issues with your content. See Labels and placeholders in <input>: The Input (Form Input) element for more information. readonly A
Boolean attribute which, if present, means this field cannot be edited by the user. Its value can, however, still be changed by JavaScript code directly setting the HTMLInputElement.value property. Note: Because a read-only field cannot have a value, required does not have any effect on inputs with the readonly attribute also specified. size The size attribute is a numeric value indicating how many ...
...y. autocorrect A Safari extension, the autocorrect attribute is a string which indicates whether or not to activate automatic correction while the user is editing this field. Permitted values are: on Enable automatic correction of typos, as well as processing of text substitutions if any are configured. off Disable automatic correction and text substitutions. incremental The
Boolean attribute incremental is a WebKit and Blink extension (so supported by Safari, Opera, Chrome, etc.) which, if present, tells the user agent to process the input as a live search. As the user edits the value of the field, the user agent sends search events to the HTMLInputElement object representing the search box. This allows your code to update the search results in real time as the user edits t...
<script>: The Script element - HTML: Hypertext Markup Language
s present then the scripts and all their dependencies will be executed in the defer queue, therefore they will get fetched in parallel to parsing and evaluated as soon as they are available. This attribute allows the elimination of parser-blocking JavaScript where the browser would have to load and evaluate scripts before continuing to parse. defer has a similar effect in this case. This is a
boolean attribute: the presence of a
boolean attribute on an element represents the true value, and the absence of the attribute represents the false value. See Browser compatibility for notes on browser support. See also Async scripts for asm.js. crossorigin Normal script elements pass minimal information to the window.onerror for scripts which do not pass the standard CORS checks. To allow error ...
... on browser support. See also Async scripts for asm.js. crossorigin Normal script elements pass minimal information to the window.onerror for scripts which do not pass the standard CORS checks. To allow error logging for sites which use a separate domain for static media, use this attribute. See CORS settings attributes for a more descriptive explanation of its valid arguments. defer This
Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing DOMContentLoaded. Scripts with the defer attribute will prevent the DOMContentLoaded event from firing until the script has loaded and finished evaluating. This attribute must not be used if the src attribute is absent (i.e. for inline scripts), in this cas...
... attribute allows the elimination of parser-blocking JavaScript where the browser would have to load and evaluate scripts before continuing to parse. async has a similar effect in this case. integrity This attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered free of unexpected manipulation. See Subresource Integrity. nomodule This
Boolean attribute is set to indicate that the script should not be executed in browsers that support ES2015 modules -- in effect, this can be used to serve fallback scripts to older browsers that do not support modular JavaScript code. nonce A cryptographic nonce (number used once) to whitelist scripts in a script-src Content-Security-Policy. The server must generate a unique nonce value each time it t...
<select>: The HTML Select element - HTML: Hypertext Markup Language
ts 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 the user cannot interact with the control. If this attribute is not specified, the control inherits its setting from the containing element, for example <fieldset>; if there is no containi...
...iate the <select> with (its form owner). The value of this attribute must be the id of a <form> in the same document. (If this attribute is not set, the <select> is associated with its ancestor <form> element, if any.) This attribute lets you associate <select> elements to <form>s anywhere in the document, not just inside a <form>. It can also override an ancestor <form> element. ...
... size If the control is presented as a scrolling list box (e.g. when multiple is specified), this attribute represents the number of rows in the list that should be visible at one time. ...
<textarea> - HTML: Hypertext Markup Language
e is not specified on a <textarea> element, then the browser uses the autocomplete attribute value of the <textarea> element's form owner. The form owner is either the <form> element that this <textarea> element is a descendant of or the form element whose id is specified by the form attribute of the input element. For more information, see the autocomplete attribute in <form>. ...
...If this attribute is not specified, the control inherits its setting from the containing element, for example <fieldset>; if there is no containing element when the disabled attribute is set, the control is enabled. form The form element that the <textarea> element is associated with (its "form owner"). ...
...or line-feeds within the placeholder text must be treated as line breaks when rendering the hint. Note: Placeholders should only be used to show an example of the type of data that should be entered into a form; they are not a substitute for a proper <label> element tied to the input. See Labels and placeholders in <input>: The Input (Form Input) element for a full explanation. readonly This
Boolean attribute indicates that the user cannot modify the value of the control. Unlike the disabled attribute, the readonly attribute does not prevent the user from clicking or selecting in the control. The value of a read-only control is still submitted with the form. required This attribute specifies that the user must fill in a value before submitting a form. rows The number of visible text line...
Control flow and error handling - JavaScript
wo conditional statements: if...else and switch. if...else statement Use the if statement to execute a statement if a logical condition is true. Use the optional else clause to execute a statement if the condition is false. An if statement looks like this: if (condition) { statement_1; } else { statement_2; } Here, the condition can be any expression that evaluates to true or false. (See
Boolean for an explanation of what evaluates to true and false.) If condition evaluates to true, statement_1 is executed. Otherwise, statement_2 is executed. statement_1 and statement_2 can be any statement, including further nested if statements. You can also compound the statements using else if to have multiple conditions tested in sequence, as follows: if (condition_1) { statement_1; } else if (...
...practice is to put additional parentheses around the assignment, like this: if ((x = y)) { /* statements here */ } Falsy values The following values evaluate to false (also known as Falsy values): false undefined null 0 NaN the empty string ("") All other values--including all objects--evaluate to true when passed to a conditional statement. Caution: Do not confuse the primitive
boolean values true and false with the true and false values of the
Boolean object! For example: var b = new
Boolean(false); if (b) // this condition evaluates to true if (b == true) // this condition evaluates to false Example In the following example, the function checkData returns true if the number of characters in a Text object is three. Otherwise, it displays an alert and returns fals...
... exceptions DOMException and DOMError throw statement Use the throw statement to throw an exception. A throw statement specifies the value to be thrown: throw expression; You may throw any expression, not just expressions of a specific type. The following code throws several exceptions of varying types: throw 'Error2'; // String type throw 42; // Number type throw true; //
Boolean type throw {toString: function() { return "I'm an object!"; } }; Note: You can specify an object when you throw an exception. You can then reference the object's properties in the catch block. // Create an object type UserException function UserException(message) { this.message = message; this.name = 'UserException'; } // Make the exception convert to a pretty string when used as a stri...
Array.prototype.some() - JavaScript
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. Syntax arr.some(callback(element[, index[, array]])[, thisArg]) Parameters callback A function to test for each element, taking three arguments: element The current element being processed in the array. ...
...rgOptional A value to use as this when executing callback. Return value true if the callback function returns a truthy value for at least one element in the array. Otherwise, false. Description The some() method executes the callback function once for each element present in the array until it finds the one where callback returns a truthy value (a value that becomes true when converted to a
Boolean). If such an element is found, some() immediately returns true. Otherwise, some() returns false. callback is invoked only for indexes of the array with assigned values. It is not invoked for indexes which have been deleted or which have never been assigned values. callback is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed. ...
...ailability(fruits, 'kela'); // false checkAvailability(fruits, 'banana'); // true Checking whether a value exists using an arrow function const fruits = ['apple', 'banana', 'mango', 'guava']; function checkAvailability(arr, val) { return arr.some(arrVal => val === arrVal); } checkAvailability(fruits, 'kela'); // false checkAvailability(fruits, 'banana'); // true Converting any value to
Boolean const TRUTHY_VALUES = [true, 'true', 1]; function get
Boolean(value) { 'use strict'; if (typeof value === 'string') { value = value.toLowerCase().trim(); } return TRUTHY_VALUES.some(function(t) { return t === value; }); } get
Boolean(false); // false get
Boolean('false'); // false get
Boolean(1); // true get
Boolean('true'); // true Specifications Specificati...
JSON.stringify() - JavaScript
en value. Exceptions Throws a TypeError ("cyclic object value") exception when a circular reference is found. Throws a TypeError ("BigInt value can't be serialized in JSON") when trying to stringify a BigInt value. Description JSON.stringify() converts a value to JSON notation representing it: If the value has a toJSON() method, it's responsible to define what data will be serialized.
Boolean, Number, and String objects are converted to the corresponding primitive values during stringification, in accord with the traditional conversion semantics. undefined, Functions, and Symbols are not valid JSON values. If any such values are encountered during conversion they are either omitted (when found in an object) or changed to null (when found in an array). JSON.stringify() can return unde...
...y('foo'); // '"foo"' JSON.stringify([1, 'false', false]); // '[1,"false",false]' JSON.stringify([NaN, null, Infinity]); // '[null,null,null]' JSON.stringify({ x: 5 }); // '{"x":5}' JSON.stringify(new Date(2006, 0, 2, 15, 4, 5)) // '"2006-01-02T15:04:05.000Z"' JSON.stringify({ x: 5, y: 6 }); // '{"x":5,"y":6}' JSON.stringify([new Number(3), new String('false'), new
Boolean(false)]); // '[3,"false",false]' // String-keyed array elements are not enumerable and make no sense in JSON let a = ['foo', 'bar']; a['baz'] = 'quux'; // a: [ 0: 'foo', 1: 'bar', baz: 'quux' ] JSON.stringify(a); // '["foo","bar"]' JSON.stringify({ x: [10, undefined, function(){}, Symbol('')] }); // '{"x":[10,null,null,null]}' // Standard data structures JSON.stringify([new Set([1]), new ...
...ified. The object in which the key was found is provided as the replacer's this parameter. Initially, the replacer function is called with an empty string as key representing the object being stringified. It is then called for each property on the object or array being stringified. It should return the value that should be added to the JSON string, as follows: If you return a Number, String,
Boolean, or null, the stringified version of that value is used as the property's value. If you return a Function, Symbol, or undefined, the property is not included in the output. If you return any other object, the object is recursively stringified, calling the replacer function on each property. Note: You cannot use the replacer function to remove values from an array. If you return undefined or ...
Object - JavaScript
ction with a property that, when set, executes that function which modifies the property. Object.prototype.__lookupGetter__() Returns the function associated with the specified property by the __defineGetter__() method. Object.prototype.__lookupSetter__() Returns the function associated with the specified property by the __defineSetter__() method. ...
...defineGetter__() method. Object.prototype.__lookupSetter__() Returns the function associated with the specified property by the __defineSetter__() method. Object.prototype.hasOwnProperty() Returns a
boolean indicating whether an object contains the specified property as a direct property of that object and not inherited through the prototype chain. Object.prototype.isPrototypeOf() Returns a
boolean indicating whether the object this method is called upon is in the prototype chain of the specified object. Object.prototype.propertyIsEnumerable() Returns a
boolean indicating if the internal ECMAScript [[Enumerable]] attribute is set. Object.prototype.toLocaleString() Calls toString(). Object.prototype.toString() Returns a string representation of the object. Object.prototype.unwatch() ...
...roperty of the object. Object.prototype.valueOf() Returns the primitive value of the specified object. Object.prototype.watch() Adds a watchpoint to a property of the object. Examples Using Object given undefined and null types The following examples store an empty Object object in o: let o = new Object() let o = new Object(undefined) let o = new Object(null) Using Object to create
Boolean objects The following examples store
Boolean objects in o: // equivalent to o = new
Boolean(true) let o = new Object(true) // equivalent to o = new
Boolean(false) let o = new Object(
Boolean()) Object prototypes When altering the behavior of existing Object.prototype methods, consider injecting code by wrapping your extension before or after the existing logic. For example, this (untested) ...
Reflect.defineProperty() - JavaScript
The static Reflect.defineProperty() method is like Object.defineProperty() but returns a
Boolean. 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. Syntax Reflect.defineProperty(target, propertyKey, attributes) Parameters target The target object on which to define the property. propertyKey The name of the property to be defined or modified. attributes The attributes for the property being defined or modified. Return value A
Boolean indicating whether or not the property was successfully defined. Exceptions A TypeError, if target is not an Object. Description The Reflect.defineProperty method allows pre...
... if target is not an Object. Description The Reflect.defineProperty method allows precise addition to or modification of a property on an object. For more details, see the Object.defineProperty which is similar. One key difference: Object.defineProperty returns the object or throws a TypeError if the property has not been successfully defined. Reflect.defineProperty, however, simply returns a
Boolean indicating whether or not the property was successfully defined. Examples Using Reflect.defineProperty() let obj = {} Reflect.defineProperty(obj, 'x', {value: 7}) // true obj.x // 7 Checking if property definition has been successful With Object.defineProperty, which returns an object if successful, or throws a TypeError otherwise, you would use a t...
... ...
Reflect - JavaScript
with arguments as specified by the argumentsList parameter. See also Function.prototype.apply(). Reflect.construct(target, argumentsList[, newTarget]) The new operator as a function. Equivalent to calling new target(...argumentsList). Also provides the option to specify a different prototype. Reflect.defineProperty(target, propertyKey, attributes) Similar to Object.defineProperty(). Returns a
Boolean that is true if the property was successfully defined. Reflect.deleteProperty(target, propertyKey) The delete operator as a function. Equivalent to calling delete target[propertyKey]. Reflect.get(target, propertyKey[, receiver]) Returns the value of the property. Works like getting a property from an object (target[propertyKey]) as a function. Reflect.getOwnPropertyDescriptor(target, propert...
...y. Works like getting a property from an object (target[propertyKey]) as a function. Reflect.getOwnPropertyDescriptor(target, propertyKey) Similar to Object.getOwnPropertyDescriptor(). Returns a property descriptor of the given property if it exists on the object, undefined otherwise. Reflect.getPrototypeOf(target) Same as Object.getPrototypeOf(). Reflect.has(target, propertyKey) Returns a
Boolean indicating whether the target has the property. Either as own or inherited. Works like the in operator as a function. Reflect.isExtensible(target) Same as Object.isExtensible(). Returns a
Boolean that is true if the target is extensible. Reflect.ownKeys(target) Returns an array of the target object's own (not inherited) property keys. Reflect.preventExtensions(target) Similar to Object.prev...
...get has the property. Either as own or inherited. Works like the in operator as a function. Reflect.isExtensible(target) Same as Object.isExtensible(). Returns a
Boolean that is true if the target is extensible. Reflect.ownKeys(target) Returns an array of the target object's own (not inherited) property keys. Reflect.preventExtensions(target) Similar to Object.preventExtensions(). Returns a
Boolean that is true if the update was successful. Reflect.set(target, propertyKey, value[, receiver]) A function that assigns values to properties. Returns a
Boolean that is true if the update was successful. Reflect.setPrototypeOf(target, prototype) A function that sets the prototype of an object. Returns a
Boolean that is true if the update was successful. Examples Detecting whether an object c...
Equality (==) - JavaScript
Unlike the strict equality operator, it attempts to convert and compare operands that are of different types. 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. Syntax x == y Description The equality operators (== and !=) use the Abstract Equality Comparison Algorithm to compare two operands. This can be roughly summarised as follows: If the operands are both objects, return true only if both operands reference the same object. ...
...summarised as follows: If the operands are both objects, return true only if both operands reference the same object. If one operand is null and the other is undefined, return true. If the operands are of different types, try to convert them to the same type before comparing: When comparing a number to a string, try to convert the string to a numeric value. If one of the operands is
Boolean, convert the
Boolean operand to 1 if it is true and +0 if it is false. If one of the operands is an object and the other is a number or a string, try to convert the object to a primitive using the object's valueOf() and toString() methods. If the operands have the same type, they are compared as follows: String: return true only if both operands have the same characters in the same...
...onvert the object to a primitive using the object's valueOf() and toString() methods. If the operands have the same type, they are compared as follows: String: return true only if both operands have the same characters in the same order. Number: return true only if both operands have the same value. +0 and -0 are treated as the same value. If either operand is NaN, return false.
Boolean: return true only if operands are both true or both false. The most notable difference between this operator and the strict equality (===) operator is that the strict equality operator does not attempt type conversion. Instead, the strict equality operator always considers operands of different types to be different. Examples Comparison with no type conversion 1 == 1; // tr...
Expressions and operators - JavaScript
erator. Arithmetic operators Arithmetic operators take numerical values (either literals or variables) as their operands and return a single numerical value. + Addition operator. - Subtraction operator. / Division operator. * Multiplication operator. % Remainder operator. ** Exponentiation operator. Relational operators A comparison operator compares its operands and returns a
Boolean value based on whether the comparison is true. in The in operator determines whether an object has a given property. instanceof The instanceof operator determines whether an object is an instance of another object. < Less than operator. > Greater than operator. <= Less than or equal operator. >= Greater than or equal operator. Note: => is not an operator, but the notation for Arr...
...has a given property. instanceof The instanceof operator determines whether an object is an instance of another object. < Less than operator. > Greater than operator. <= Less than or equal operator. >= Greater than or equal operator. Note: => is not an operator, but the notation for Arrow functions. Equality operators The result of evaluating an equality operator is always of type
Boolean based on whether the comparison is true. == Equality operator. != Inequality operator. === Identity operator. !== Nonidentity operator. Bitwise shift operators Operations to shift all bits of the operand. << Bitwise left shift operator. >> Bitwise right shift operator. >>> Bitwise unsigned right shift operator. Binary bitwise operators Bitwise operators treat their operand...
...operand. << Bitwise left shift operator. >> Bitwise right shift operator. >>> Bitwise unsigned right shift operator. Binary bitwise operators Bitwise operators treat their operands as a set of 32 bits (zeros and ones) and return standard JavaScript numerical values. & Bitwise AND. | Bitwise OR. ^ Bitwise XOR. Binary logical operators Logical operators are typically used with
boolean (logical) values, and when they are, they return a
boolean value. && Logical AND. || Logical OR. Conditional (ternary) operator (condition ? ifTrue : ifFalse) The conditional operator returns one of two values based on the logical value of the condition. Assignment operators An assignment operator assigns a value to its left operand based on the value of its right operand. =...
if...else - JavaScript
n1) statement1 else if (condition2) statement2 else if (condition3) ... To execute multiple statements within a clause, use a block statement ({ ... }) to group those statements. ...
...if (condition3) ... To execute multiple statements within a clause, use a block statement ({ ... }) to group those statements. In general, it is a good practice to always use block statements, especially in code involving nested if statements: if (condition) { statements1 } else { statements2 } Do not confuse the primitive
Boolean values true and false with truthiness or falsiness of the
Boolean object. ...
... In general, it is a good practice to always use block statements, especially in code involving nested if statements: if (condition) { statements1 } else { statements2 } Do not confuse the primitive
Boolean values true and false with truthiness or falsiness of the
Boolean object. Any value that is not false, undefined, null, 0, -0, NaN, or the empty string (""), and any object, including a
Boolean object whose value is false, is considered truthy when used as the condition. For example: var b = new
Boolean(false); if (b) // this condition is truthy Examples Using if...else if (cipher_char === from_char) { result = result + to_char; x++; } else { result = result + clear_char; } Using else if Note that there is no elseif syntax in JavaScript. However, you can write it with a sp...
not - XPath
You can test if an element doesn't have some attribute. ...
... You can test if an element doesn't have some attribute. ...
... You can test if an element doesn't have some attribute. <xsl:for-each match="//a[not(@name and @name = 'badname')]"> <!-- iterates over any <a> element in the document, that either has no 'name' attribute at all, or it has one, but its value is not "badname". ...
Introduction to using XPath in JavaScript - XPath
lookupNamespaceURI is called. Also correctly resolves the implicit xml prefix. Specifying the Return Type The returned variable xpathResult from document.evaluate can either be composed of individual nodes (simple types), or a collection of nodes (node-set types). Simple Types When the desired result type in resultType is specified as either: NUMBER_TYPE - a double STRING_TYPE - a string
BOOLEAN_TYPE - a
boolean We obtain the returned value of the expression by accessing the following properties respectively of the XPathResult object. numberValue stringValue
booleanValue Example The following uses the XPath expression count(//p) to obtain the number of <p> elements in an HTML document: var paragraphCount = document.evaluate( 'count(//p)', document, null, XPathResult.ANY_TYPE, ...
...RDERED_NODE_TYPE, null ); alert( 'The first phone number found is ' + firstPhoneNumber.singleNodeValue.textContent ); The ANY_TYPE Constant When the result type in the resultType parameter is specified as ANY_TYPE, the XPathResult object returned, will be whatever type that naturally results from the evaluation of the expression. It could be any of the simple types (NUMBER_TYPE, STRING_TYPE,
BOOLEAN_TYPE), but, if the returned result type is a node-set then it will only be an UNORDERED_NODE_ITERATOR_TYPE. To determine that type after evaluation, we use the resultType property of the XPathResult object. The constant values of this property are defined in the appendix. None Yet =====Any_Type Example===== <pre> </pre> Examples Within an HTML Document The following code is intended to be pla...
...aining whatever type naturally results from the evaluation of the expression. Note that if the result is a node-set then UNORDERED_NODE_ITERATOR_TYPE is always the resulting type. NUMBER_TYPE 1 A result containing a single number. This is useful for example, in an XPath expression using the count() function. STRING_TYPE 2 A result containing a single string.
BOOLEAN_TYPE 3 A result containing a single
boolean value. This is useful for example, in an XPath expression using the not() function. UNORDERED_NODE_ITERATOR_TYPE 4 A result node-set containing all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document. ORDERED_NODE_ITERATOR_TYPE 5 A result node-set cont...
page-worker - Archive of obsolete content
le option in the Page() constructor. Globals Constructors Page(options) Creates an uninitialized page worker instance. Parameters options : object Optional options: Name Type contentURL string The URL of the content to load in the panel. allow object An object with keys to configure the permissions on the page worker. The
boolean key script controls if scripts from the page are allowed to run. script defaults to true. include string, RegExp, array of (String or RegExp) This is useful when your page worker loads a page which will redirect to other pages. A match pattern string or an array of match pattern strings. These define the documents to which the page-worker's con...
...s from the content script using the port.on function See the guide to communicating using port for details. contentURL The URL of content to load. This can point to local content loaded from your add-on's "data" directory or remote content. Setting it loads the content immediately. allow A object describing permissions for the content. It contains a single key named script whose value is a
boolean that indicates whether or not to execute script in the content. script defaults to true. include A set of match patterns to define the urls which the page-worker's content script will be applied. This is useful when using pages which redirect to other pages in your page-worker. contentScriptFile A local file URL or an array of local file URLs of content scripts to load. contentScript A stri...
request - Archive of obsolete content
cters will not display correctly. To force the response to be interpreted as Latin-1, use overrideMimeType: var Request = require("sdk/request").Request; var quijote = Request({ url: "http://www.latin1files.org/quijote.txt", overrideMimeType: "text/plain; charset=latin1", onComplete: function (response) { console.log(response.text); } }); quijote.get(); anonymous
boolean If true, the request will be sent without cookies or authentication headers. This option sets the mozAnon property in the underlying XMLHttpRequest object. Defaults to false. Request The Request object is used to make GET, HEAD, POST, PUT, or DELETE network requests. It is constructed with a URL to which the request is sent. Optionally the user may specify a collection of headers and c...
... document cannot be processed by JSON.parse. status The HTTP response status code (e.g. 200). statusText The HTTP response status line (e.g. OK). headers The HTTP response headers represented as key/value pairs. To print all the headers you can do something like this: for (var headerName in response.headers) { console.log(headerName + " : " + response.headers[headerName]); } anonymous
Boolean indicating if the request was anonymous. ...
simple-storage - Archive of obsolete content
Web, except that it's only available for add-ons. Usage The simple storage module exports an object called storage that is persistent and scoped to your add-on. It's a normal JavaScript object, and you can treat it as you would any other. To store a value, just assign it to a property on storage: var ss = require("sdk/simple-storage"); ss.storage.myArray = [1, 1, 2, 3, 5, 8, 13]; ss.storage.my
Boolean = true; ss.storage.myNull = null; ss.storage.myNumber = 3.1337; ss.storage.myObject = { a: "foo", b: { c: true }, d: null }; ss.storage.myString = "O frabjous day!"; You can store array,
boolean, number, object, null, and string values. If you'd like to store other types of values, you'll first have to convert them to strings or another one of these types. Be careful to set properties on the st...
... Web history, personal information, or other sensitive data, your add-on should respect private browsing. To read about how to opt into private browsing mode and how to use the SDK to avoid storing user data associated with private windows, refer to the documentation for the private-browsing module. Globals Properties storage A persistent object private to your add-on. Properties with array,
boolean, number, object, null, and string values will be persisted. quotaUsage A number in the range [0, Infinity) that indicates the percentage of quota occupied by storage. A value in the range [0, 1] indicates that the storage is within quota. A value greater than 1 indicates that the storage exceeds quota. Events OverQuota The module emits this event when your add-on's storage goes over its quot...
content/symbiont - Archive of obsolete content
event fires This property is optional and defaults to "end". contentScriptOptions object Read-only value exposed to content scripts under self.options property. Any kind of jsonable value (object, array, string, etc.) can be used here. Optional. allow object Permissions for the content, with the following keys: script
boolean Whether or not to execute script in the content. Defaults to true. Optional. Optional. Symbiont Symbiont is composed from the Worker trait, therefore instances of Symbiont and their descendants expose all the public properties exposed by Worker along with additional public properties that are listed below: Properties contentScriptFile The local file URLs of content scripts ...
... ...
platform/xpcom - Archive of obsolete content
ss ID. Users of XPCOM can use this value to retrieve the factory using Components.classesByID: var factory = components.classesByID[id]; var component = factory.createInstance(Ci.nsIRequest); This parameter is optional. If you don't supply it, the factory constructor will generate a fresh ID. Either way, it's accessible as the value of the factory's id property. register
boolean By default, the factory is registered as soon as it is constructed. By including this option, set to false, the factory is not automatically registered and you must register it manually using the register() function. unregister
boolean By default, the factory is unregistered as soon as the add-on which created it is unloaded. By including this option, set to false,...
...ry or service supplied. If the factory or service is not registered, this function does nothing. By default, factories and services are unregistered automatically when the add-on that registered them is unloaded. Parameters factory : object The factory or service to unregister. isRegistered(factory) Find out whether a factory or service is registered. Parameters factory : object Returns
boolean : True if the factory or service is registered, false otherwise. autoRegister(path) Register a component (.manifest) file or all component files in a directory. See nsIComponentRegistrar.autoRegister() for details. Parameters path : string Path to a component file to be registered or a directory containing component files to be registered. factoryByID(id) Given a class ID, this function re...
remote/child - Archive of obsolete content
sdk/remote/child have a port object that you can use to receive messages from, and send messages to, code in the parent. See the documentation for sdk/remote/parent for more details. Globals Properties process A Process object. frames A Frames object. Process A link to the main process. Properties port An event emitter that sends and receives events from the main process. isRemote A
boolean property indicating whether this process is remote from the main process or not. Frames A list of the content frames in this process. Each element in this list is a Frame. Listen to attach and detach events to hear as frames are created and destroyed. Methods forEvery Calls the callback for every existing frame and any new frames created in the future. This is a shortcut for enumerating exis...
...he frame. Listeners are automatically removed when this frame is destroyed. removeEventListener(event, listener, isCapturing) Removes an event listener that was previously registered. Properties port An event emitter that can be used to send and receive frame specific events to and from code in the main process. content The top level DOM window currently displaying in this frame. isTab A
boolean property indicating whether this frame displays in one of the application's main browser tabs. Events detach Event emitted when this frame disconnects from the application. ...
remote/parent - Archive of obsolete content
etach Event emitted when a frame is removed. For example, the user might have closed a content tab. The event handler is called with the Frame that detached. Process A Process provides a way to communicate with code running in one of the application's processes. Properties port An event emitter that can be used to send and receive events to and from code running in the process. isRemote A
boolean property that indicates whether the attached process is remote from the main process. Events detach Event emitted when this process disconnects from the application. It may have been closed normally or it may have crashed. Frame A Frame provides a way to pass frame specific messages to code in other processes. The frame this relates to may be in any of the application's processes. Propertie...
...ss frame specific messages to code in other processes. The frame this relates to may be in any of the application's processes. Properties port An event emitter that can be used to send and receive frame specific events to and from code running in any process. frameElement The DOM element that displays this frame in the main process. For example, this may be a XUL <browser> element. isTab A
boolean property indicating if this frame displays in one of the application's main browser tabs. Events detach Event emitted when this frame is detached: for example, because the user closed its corresponding tab. ...
system/events - Archive of obsolete content
bject emitting the event). on(type, listener, strong) Listen to events of a given type Parameters type : string The event type name to watch. listener : function Function that will be called when an event is fired, with a single event object as argument. This object has three attributes: type: the event type name subject: the event subject object data: the event data string strong :
boolean Default is false, a weak reference, which means it can be garbage collected at any time if there are no other references to it. Determines if we should keep a strong or weak reference to the listener method. once(type, listener, strong) Listen only once to a particular event type Parameters type : string The event type name to watch. listener : function Function that will be called when a...
...eference, which means it can be garbage collected at any time if there are no other references to it. Determines if we should keep a strong or weak reference to the listener method. once(type, listener, strong) Listen only once to a particular event type Parameters type : string The event type name to watch. listener : function Function that will be called when an event is fired. strong :
boolean Default is false, a weak reference, which means it can be garbage collected at any time if there are no other references to it. Determines if we should keep a strong or weak reference to the listener method. off(type, listener) Stop listening for an event Parameters type : string The event type name to unsubscribe to. listener : function The function we registered to listen for events. ...
system/xul-app - Archive of obsolete content
l Information about the application on which your add-on is running. With the exception of ids, each of these properties exposes the attribute of the same name on the nsIXULAppInfo interface. For more information, see the MDN documentation. Globals Functions is(name) Checks whether the host application is the given application. Parameters name : string A host application name. Returns
boolean : True if the host application is name and false otherwise. isOneOf(names) Checks whether the host application is one of the given applications. Parameters names : array An array of host application names. Returns
boolean : True if the host application is one of the names and false otherwise. versionInRange(version, lowInclusive, highExclusive) Compares a given version to a version range...
...xclusive) Compares a given version to a version range. See the MDN documentation for details on version comparisons. Parameters version : string The version to compare. lowInclusive : string The lower bound of the version range to compare. The range includes this bound. highExclusive : string The upper bound of the version range to compare. The range does not include this bound. Returns
boolean : True if version falls in the given range and false otherwise. Properties ID The GUID of the host application. For example, for Firefox this value is "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}". name The host application name. The possible values here are: "Firefox" "Fennec" "Mozilla" "SeaMonkey" "Sunbird" "Thunderbird" "Firefox"and"Fennec"` are the most commonly used values. versio...
tabs/utils - Archive of obsolete content
that owns the specified tab. Parameters tab : tab A browser tab. Returns window : A browser window. openTab(window, url, options) Open a new tab in the specified browser window. Parameters window : window The browser window in which to open the tab. url : String URL for the document to load. ...
... Parameters window : window The browser window in which to open the tab. url : String URL for the document to load. options : object Optional options: Name Type inBackground
boolean If true, open the new tab, but keep the currently selected tab selected. If false, make the new tab the selected tab. Optional, defaults to false. pinned
boolean Pin this tab. Optional, defaults to false. Returns tab : The new tab. isTabOpen(tab) Test whether the specified tab is open. Parameters tab : tab A XUL tab element. Returns
boolean : true if the tab is open, otherwise false. closeTab(tab) Close the specified tab. Parameters tab : tab A XUL tab element. getURI(tab) Get the specified tab's URI. Parameters tab : t...
ui/button/action - Archive of obsolete content
Disabled buttons appear disabled in the UI, and do not respond to clicks. Defaults to false. onClick function Click handler for the button. badge Number or String New in Firefox 36. Badge to attach to the button. The badge can contain as many characters (or digits) as you like, b...
... listener to remove. destroy() Destroy the button. After calling this function, the button will no longer appear in the UI, and accessing any of its properties or methods will throw an error. Properties id The button's unique ID. This is read-only. label The button's label. icon The button's icon or icons, as a URL, relative path, or object containing a set of key-value pairs. disabled
Boolean property indicating whether or not the button is disabled. badge New in Firefox 36. Value to attach to the button as a badge. May be a number or a string. The badge can contain as many characters (or digits) as you like, but only the first four will be displayed. badgeColor New in Firefox 36. Color for the badge, specified as a CSS <color> value. Events click This event is emitted w...
ui/button/toggle - Archive of obsolete content
Disabled buttons appear disabled in the UI, and do not respond to clicks. Defaults to false. onChange function Change handler for the button. onClick function Click handler for the button. badge Number or String New in Firefox 36. Badge to attach to the button.
... to remove. destroy() Destroy the button. After calling this function, the button will no longer appear in the UI, and accessing any of its properties or methods will throw an error. Properties id The button's unique ID. This property is read-only. label The button's label. icon The button's icon or icons, as a URL, relative path, or object containing a set of key-value pairs. disabled
Boolean property indicating whether or not the button is disabled. checked
Boolean property indicating whether or not the button is checked. It's initialized to false, or the value of the checked option to the button's constructor. It is then flipped, on a per-window basis, whenever the user clicks the button or when the button's click() method is called. badge New in Firefox 36. Value to attach t...
ui/toolbar - Archive of obsolete content
tons to toolbars is only supported from Firefox 30 onwards. In Firefox 29, you can only add frames. An array of items to appear in the toolbar. Each item in items must be an action button, a toggle button, or a frame instance. Buttons each take up a fixed width. If more than one frame is supplied here, the frames each occupy an equal vertical strip of the toolbar. hidden
boolean Boolean indicating whether the frame should be hidden initially or not. Defaults to false. onAttach function Assign a listener to the attach event. onDetach function Assign a listener to the detach event. onShow function Assign a listener to the show event. onHide function Assign a listener to ...
... appear in the Firefox "Toolbars" menu. Calling this function also causes the detach event to be emitted. Properties title The toolbar's title. This is read-only and must be unique. It's also not available until after the attach event is emitted. items The array of frames hosted by this toolbar. This property is read-only and is not available until after the attach event is emitted. hidden
Boolean indicating whether the toolbar is hidden. This property is read-only and is not available until after the attach event is emitted. Events attach This event is emitted when the toolbar is first loaded. Note that since there is only one toolbar for the whole browser, opening another browser window does not cause this event to be emitted again. After this event the toolbar's properties are availa...
Listening to events in Firefox extensions - Archive of obsolete content
herefore don't want to use the unload handler, use the new pagehide event. pageshow event This event works the same as the load event, except that it fires every time the page is loaded (whereas the load event doesn't fire in Firefox 1.5 when the page is loaded from cache). The first time the page loads, the pageshow event fires just after the firing of the load event. The pageshow event uses a
boolean property called persisted that is set to false on the initial load. It is set to true if it is not the initial load (in other words, it is set to true when the page is cached). Set any JavaScript that you want to run every time a page loads to run when the pageshow event fires. If you call JavaScript functions as part of the pageshow event, you can ensure these functions are called when the pag...
...rs other than Firefox 1.5 by calling the pageshow event as part of the load event, as shown in the sample later in this article. pagehide event If you want to define behavior that occurs when the user navigates away from the page, but you don't want to use the unload event (which would cause the page to not be cached), you can use the new pagehide event. Like pageshow, the pagehide event uses a
boolean property called persisted. This property is set to false if the page is not cached by the browser and set to true if the page is cached by the browser. When this property is set to false, the unload handler, if present, fires immediately after the pagehide event. Firefox 1.5 tries to simulate load events in the same order they would occur when the page is initially loaded. Frames are treated the...
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
or output from JavaScript True Table 1: Preferences to set for developing extensions To make these changes, start your development profile, type about:config into Firefox's location bar and open the preferences window; find the preferences listed in Table 1 and double-click on them to set them accordingly. Some of these preferences do not exist--to create them, right-click, select "New>
Boolean", and type in the name and set the value accordingly. Install the DOM Inspector The DOM Inspector is an extension that lets you examine HTML and XUL DOM tree structures, JavaScript objects and CSS properties, etc. This is not required for developing extensions, but it is handy to have around. Install extensions for Firefox from the Mozilla Add-ons website. Optional - Install Firebug and Chrom...
...ermine the names, types, and values for your preferences (Table 6). Each preference should be prefixed with something that uniquely identifies your extension--in this case, we'll use extensions.sessionstore. Table 6: Preference formats FIXME: Make the table cleaner Preference name Type Value extensions.sessionstore.warnOnClear
Boolean Activated when deleting sessions. If true, causes a confirmation dialog to appear; if false, deletes immediately. extensions.sessionstore.replaceTabs Integer Activated when restoring sessions. 0: Leave current tabs 1: Overwrite current tabs 2: Ask each time Defaults definition file Listing 25 gives the contents for t...
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
reverse, converting from text saved as ISO-2022-JP to Unicode. Listing 18: Converting text from ISO-2022-JP to Unicode converter.charset = 'ISO-2022-JP'; var unicode_str = converter.ConvertToUnicode(iso2022jp_str); Reading and writing preferences You can use the nsIPrefBranch function to access Firefox's preferences system. This function can get and set preferences with three types of values:
Boolean, integer, and text; there are specific methods for each, as shown in Table 2. Reading preferences Listing 19 shows how to get a text string stored in the preferences. Type about:config into the location bar to confirm that the value has been stored correctly. Note: The value returned by nsIPrefBranch.getCharPref() is a UTF-8 bytestring; here, we are converting it to UTF-16 using escape() and d...
...orrectly. Note: The value for the second parameter of nsIPrefBranch.setCharPref() is a UTF-8 bytestring; here, we are converting a UTF-16 to UTF-8 using unescape() and encodeURIComponent(). Listing 20: Writing a text-string setting var string = 'This is test.'; pref.setCharPref('extensions.myextension.testPref', unescape(encodeURIComponent(string))); Data type Get Set
Boolean getBoolPref(prefname) setBoolPref(prefname) Integer getIntPref(prefname) setIntPref(prefname) Text string getCharPref(prefname) setCharPref(prefname) Using methods from XUL elements XPCOM gives you access to sophisticated functions in XUL elements. For example, using the loadURI() method on the browser element introduced in Chapter 3 can open a page spe...
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
t preferences file, with a default value of false. You should also change the preference value before you run any other first run code. Keep in mind that the user could have set multiple Firefox windows to open at startup, so there's a race condition on which window will run the first run code. If you need to run code on every update, or some of them, the code would be very similar. Instead of a
boolean preference, it would be best to use a string preference with the last-installed add-on version. And then do a version comparison to decide which code to run. The current version number can be hard-coded in the first run function, or you can use the Add-on Manager to dynamically get it. This can get tricky with the Firefox 4 AddonManager, so it's probably best to keep it simple. Uninstall Scripts...
...ion being performed. If you detect your add-on is going to be uninstalled at this stage, it's a good time to show the uninstall feedback form. It is not a good time to clean up your files, at least not without prior user consent. Remember that the user can revert this decision. So, you should listen to other events, like canceling the operation, to make sure that you know what is going on. Set a
boolean flag that indicates if your add-on is set to be uninstalled or not, and reset it when necessary. The second stage is knowing when the application is actually going to be closed. Then you'll have reasonable certainty that the add-on will be removed and you can perform any cleanup operations safely. For this, you need to add an observer for the quit-application topic. This is when you'll know the ...
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
, scrolling to anchors (if the load is an anchor within the current page), and session history issues. It calls DoURILoad(). DoURILoad() creates a channel, massages it to have the right POST data, load flags, cache key, referrer, etc. It then passes the channel to DoChannelLoad, which does some more flag massaging and then calls into the URILoader. nsURILoader::OpenURI gets a channel to open, a
boolean indicating whether this load is the result of a link click, and an nsISupports "window context" (the docshell triggering the load, actually, but in drag and heavy makeup). It immediately hands off to nsURILoader::OpenChannel. nsURILoader::OpenChannel notifies the nsIURIContentListener hanging off the window context, if any, of the start of the load; this gives embedders a chance to abort the lo...
...ff to nsURILoader::OpenChannel. nsURILoader::OpenChannel notifies the nsIURIContentListener hanging off the window context, if any, of the start of the load; this gives embedders a chance to abort the load if this URI type is something they want to handle in the embedding app. If the load is not aborted, we create an nsDocumentOpenInfo object for this load, passing it the "this is a link click"
boolean and the window context. We then set the channel's nsILoadGroup to the one from the window context. nsDocumentOpenInfo::Prepare is passed the channel to open. It calls GetInterface on the window context to get and save that context's nsIURIContentListener. OpenChannel returns to OpenURI which just opens the channel, setting the nsDocumentOpenInfo as the stream listener. OnStartRequest notifi...
Menu - Archive of obsolete content
invoked just before the menu is shown. If the menu is a context menu, it is called as beforeShow(menu, context) and otherwise as beforeShow(menu). menu is the Menu object to which beforeShow is attached. context is an object describing the context in which the menu was shown. beforeShow may modify the menu, and when the menu is shown, it will reflect the changes. isShowing
boolean True if the menu is currently visible and false otherwise. Read-only. items array An array of menuitems in the menu. Read-only. Methods add(items) clear() contextOn(node) hide() insertBefore(newItems, target) item(target) popupOn(node) ...
... Due to a platform bug in Firefox, on OS X only, for menus in the menu bar only, command functions defined on menuitems with submenus are not called when descendant menuitems are clicked. See bug 534014 for details and a workaround. data string An arbitrary string that the feature may associate with the menuitem. disabled
boolean If true, the menuitem is disabled. icon string The URL of an icon to display in the menuitem. Note that some environments, notably Gnome 2.28, do not support menuitem icons either by default or at all. label string The label of the menuitem. menu jetpack.Menu If defined, the menuitem expands into a submen...
jspage - Archive of obsolete content
nts); return b.prototype[c].apply(d.shift(),d);};}};Native.implement=function(d,c){for(var b=0,a=d.length;b<a;b++){d[b].implement(c);}};Native.typize=function(a,b){if(!a.type){a.type=function(c){return($type(c)===b); };}};(function(){var a={Array:Array,Date:Date,Function:Function,Number:Number,RegExp:RegExp,String:String};for(var h in a){new Native({name:h,initialize:a[h],protect:true}); }var d={"
boolean":
Boolean,"native":Native,object:Object};for(var c in d){Native.typize(d[c],c);}var f={Array:["concat","indexOf","join","lastIndexOf","pop","push","reverse","shift","slice","sort","splice","toString","unshift","valueOf"],String:["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","valueOf"]}; for(var e i...
...floor(a.charCodeAt()/16).toString(16)+(a.charCodeAt()%16).toString(16); },encode:function(b){switch($type(b)){case"string":return'"'+b.replace(/[\x00-\x1f\\"]/g,JSON.$replaceChars)+'"';case"array":return"["+String(b.map(JSON.encode).clean())+"]"; case"object":case"hash":var a=[];Hash.each(b,function(e,d){var c=JSON.encode(e);if(c){a.push(JSON.encode(d)+":"+c);}});return"{"+a+"}";case"number":case"
boolean":return String(b); case false:return"null";}return null;},decode:function(string,secure){if($type(string)!="string"||!string.length){return null;}if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))){return null; }return eval("("+string+")");}});Native.implement([Hash,Array,String,Number],{toJSON:function(){return JSON.encode(this);}})...
Venkman Introduction - Archive of obsolete content
the object's prototype and parent chains, check the "Include ECMA Properties" menu item in the view's context menu. If a property shows up in a bold red font, an exception occurred when Venkman tried to read the value. The exception object will appear as the value of the property. Icon Data Type Icon Data Type Void (undefined) value Null value
Boolean value String value Integer value Double value Object value Function value Figure 9. Type Icons The column picker for this view (the box on the top right) can be used to display Type and Flags columns. The Type column contains a textual description of the type of the object. Flags lists one or more applicable flags for this object. Flags are...
...s Animator-0.03.js and the scope is the pause function. There will also be "stopped for breakpoint" in red in the interactive session, along with the file name, line number, and snippet source code from where it stopped. Figure 13. (from Step 5) Stopped at a breakpoint. In the interactive session's input field, enter this.fPaused Venkman evaluates the expression, giving you [
boolean] false back. Press Step Into to follow the steps until you have finished debugging the function, and the fishes have paused. In addition to Step In, which will execute a single line of JavaScript and stop, Step Over can be used to step over a impending function call, and return control to the debugger when the call returns. Step Out executes until the current function call exits. Click t...
addFile - Archive of obsolete content
addFile Unpacks a single subcomponent into a temporary location. Queues the subcomponent for addition to the Client Version Registry and installation to its final destination. ...
...try and installation to its final destination. ...
confirm - Archive of obsolete content
ttons wherever possible, and to keep in mind that button 1 has the same return value as "window closed" (see below). aButton0Title Custom title for button 0. aButton1Title Custom title for button 1. aButton2Title Custom title for button 2. aCheckMsg A string to display as a checkbox label. aCheckState An object with a
boolean value property representing the state of the checkbox: When the dialog box is shown, its checkbox will be checked when this object's value is true. After the user presses a button (or closes the window), the value property is updated according to the checkbox. var check = { value: false }; var button = confirm("Are you sure you want to install FooBar 0.1?", "Confirm", ...
... check); Returns The return value is an integer indicating which button the user selected: Value Button 0 'Cancel' or button 1. Also: user closed the dialog window 1 'OK' or button 0 2 The third button Previous versions of the XPInstall API stated the return value of confirm() to be a
Boolean. That is incorrect, confirm() always returned a plain integer (in pre-Gecko-1.8 versions either 0 or 1). Notes The preferred method for detecting support for custom dialog boxes is querying the existence of the button constants. Other approaches (e.g. buildID comparisons) are not recommended. if ("BUTTON_POS_0" in Install) { // Use extended confirm() method } else { // Use classic confirm() m...
execute - Archive of obsolete content
(Note that this path points into the XPI itself.) args A parameter string that is passed to the executable. (Ignored on Mac OS). See note below. blocking A
boolean value that specifies whether the installation should wait for the execution of the file to finish before it resumes. Default is false. ...
...Path [,
Boolean blocking]); int execute ( String xpiSourcePath, String args [,
Boolean blocking]); Parameters The execute method has the following parameters: xpiSourcePath The pathname of the file to extract and execute. (Note that this path points into the XPI itself.) args A parameter string that is passed to the executable. (Ignored on Mac OS). See note below. blocking A
boolean value that specifies whether the installation should wait for the execution of the file to finish before it resumes. Default is false. See note below. The blocking parameter is not available as part of this method in versions of Netscape before 6.1/Mozilla 0.9.3. Returns An integer error code. For a list of possible values, see Return Codes. Description The execute method extracts the named ...
valueExists - Archive of obsolete content
value A string representing the value being queried. Returns
Boolean value: true if the key exists and the user has read access to it, otherwise false. ...
... valueExists Returns whether a value for the given key exists. Method of WinReg object Syntax
boolean valueExists ( string key, string value ); Parameters The method has the following parameters: key A string representing the path to the key. value A string representing the value being queried. Returns
Boolean value: true if the key exists and the user has read access to it, otherwise false. Example winreg = getWinRegistry(); if ( winreg != null ) { winreg.setRootKey( winreg.HKEY_LOCAL_MACHINE); if(winreg.valueExists("SOFTWARE\\mozilla", "value name")) { //valueExists returned true } else { //valueExists returned false } } ...
OpenClose - Archive of obsolete content
s, for instance, a popup attached via the context attribute. The openPopup method takes six arguments which are used to specify how and where the popup should be positioned. These will be described below. The openPopup method is defined as follows: void openPopup(in DOMElement anchorElement, in String position, in long x, in long y, in
boolean isContextMenu, in
boolean attributesOverride); First an example: somepopup.openPopup(anchor, "after_start", 0, 0, false, false); This example will open a popup located just underneath another element referenced by 'anchor'. This emulates how a menu is opened, where 'anchor' is the menu element. It is possible to use the openPopup method with a menu, however, it is easier to ju...
...pup(null, "", event.clientX, event.clientY, false, false); } The openPopupAtScreen method A second method, openPopupAtScreen, may be used to open up a popup and place it at a specific screen coordinate. In this case, the popup is not anchored to an element and just appears at a specific location specified by the x and y arguments to this method. void openPopupAtScreen(in long x, in long y, in
boolean isContextMenu); The isContextMenu argument indicates that a context menu is being opened, and functions the same as the corresponding argument for the openPopup method. In the following example, the popup is opened at horizontal positon 100 and vertical position 200: popup.openPopupAtScreen(100, 200, false); Note that if the supplied coordinates would cause the popup to be partially or compl...
Modifying a XUL Interface - Archive of obsolete content
ode may only be in one place at a time, the insertion call will always remove the node from its existing location first. This is a convenient way to move nodes around in the document. Copying Nodes To copy nodes however, you may call the cloneNode() function. This function makes a copy of an existing node so that you can add it somewhere else. The original node will stay where it is. It takes one
boolean argument which indicates whether to copy all of the node's children or not. If false, only the node is copied, such that the copy won't have any children. If true, all of the children are copied as well. This is done recursively, so for large tree structures make sure that this is desired before passing true to the cloneNode() function. Here is an example: Example 2 : Source View <hbox height="40...
...ew <button label="Hello" oncommand="alert(this.label);"/> Toggling a checkbox Checkboxes have a checked property which may be used to check or uncheck the checkbox. It should be easy to determine how this is used. In this next example, we reverse the state of the checked property whenever the button is pressed. Note that while the label and value properties are strings, the checked property is a
boolean property which will be set either true or false. Note: If you're creating the checkbox dynamically and it's not yet added to the DOM, you must use setAttribute("checked", "false") instead, because the XBL isn't initiated yet.) Example 6 : Source View <button label="Change" oncommand="this.nextSibling.checked = !this.nextSibling.checked;"/> <checkbox label="Check for messages"/> Radio buttons ...
Simple Menu Bars - Archive of obsolete content
utes but it is a type of box. This means that you could create a vertical menubar by setting the orient attribute to vertical. menu element The menu element works much like the button element. It accepts some of the same attributes plus some additional ones: id The unique identifier of the menu title button. label The text to appear on the menu, such as File or Edit. disabled This
boolean attribute determines whether the menu is disabled. Although you can, there's rarely a need to disable an entire menu. This attribute can be set to either true or false. Of course, the latter is the default. accesskey This is the key that the user can press to activate the menu item. This letter is typically shown underlined on the menu title. Mozilla will look at the label attribute and add ...
...lly only menuitems and menuseparators would be placed on a menupopup. You can place any element on a menupopup, however they will be ignored on a Macintosh. menuitem element The menuitem element is much like the menu element and has some of the same attributes. id The unique identifier of the menu item. label The text to appear on the menu item, such as Open or Save. disabled This
boolean attribute determines whether the menu item is disabled. This attribute can be set to either true or false where the latter is the default. accesskey This is the key that the user can press to activate the menu item. This letter is typically shown underlined on the menu title. Mozilla will look at the label attribute and add an underline character to the character specified here. For that rea...
XULBrowserWindow - Archive of obsolete content
mplements the following interfaces: nsISupports nsIXULBrowserWindow nsIWebProgressListener nsIWebProgressListener2 nsISupportsWeakReference Note: This page is not complete at this time. See the linked interfaces for the definition of the implemented methods. You may also wish to refer to the implementation of XULBrowserWindow in browser/base/content/browser.js. Method overview
boolean hideChromeForLocation(in String aLocation); Attributes Attribute Type Description inContentWhitelist String[] An array of URL strings for which chrome is automatically hidden. Defaults to about:addons but extensions can append specific URLs to the array. Methods hideChromeForLocation Determines whether or not browser chrome should be hidden for the ...
...s to the array. Methods hideChromeForLocation Determines whether or not browser chrome should be hidden for the specified location. By default, chrome is hidden for about:addons and any other pages in the in content whitelist. You can augment the functionality of this method using chaining in order to hide chrome for other locations. See Hiding browser chrome for details and an example.
boolean hideChromeForLocation( in String aLocation ); Parameters aLocation The URL to check to see if chrome should be hidden while that location is displayed. Return value true if chrome should be hidden while displaying the specified location; otherwise false. ...
colorpicker - Archive of obsolete content
<< XUL Reference home [ Examples | Attributes | Properties | Methods | Related ] A palette of colors from which a user may select by clicking on one of the grid cells. Attributes disabled, color, onchange, preference, tabindex, type Properties accessibleType, color, disabled, open, tabIndex, value Examples <colorpicker/> Attributes disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you can set...
...ct a color. Properties accessibleType Type: integer A value indicating the type of accessibility object for the element. color Type: color string The currently selected color. This is modified when the user selects a color. You can assign a string of the form #RRGGBB to this property to change the selected color. disabled Type:
boolean Gets and sets the value of the disabled attribute. open Type:
boolean Returns true if the popup for a button-type colorpicker is open. Set this property to true to open the popup or false to close the popup. tabIndex Type: integer Gets and sets the value of the tabindex attribute. value property gets and sets color attribute Methods Inherited Methods ...
description - Archive of obsolete content
d. If you wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. For example, for a menuitem in a menu you can add the following CSS rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
...For those elements, setAttribute("value", myValue) and getAttribute("value") do not access or affect the contents displayed to the user. Properties accessibleType Type: integer A value indicating the type of accessibility object for the element. crop Type: string Gets and sets the value of the crop attribute. disabled Type:
boolean Gets and sets the value of the disabled attribute. tabIndex Type: integer Gets and sets the value of the tabindex attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. M...
dialog - Archive of obsolete content
cesskeyextra2 Type: string The access key to use for the second extra button. buttonaccesskeyhelp Type: string The access key to use for the "help" button. buttonalign Type: string The value of the align attribute for the box containing the buttons. buttondir Type: string The value of the dir attribute for the box containing the buttons. buttondisabledaccept Type:
boolean If true, the accept button is disabled. buttonlabelaccept Type: string The label to appear on the "accept" button. buttonlabelcancel Type: string The label to appear on the "cancel" button. buttonlabeldisclosure Type: string The label to appear on the "disclosure" button. buttonlabelextra1 Type: string The label to appear on the first extra button. buttonlab...
...the buttonlabelextra1 attribute. extra2: A second optional additional button. You can set its label with the buttonlabelextra2 attribute. Note: If you don't want to display any buttons in the dialog box, set the value of this attribute to "," (a single comma). Warning: If the accept and cancel buttons are actually shown is system dependent and is mainly controlled by the value of the
boolean preference browser.preferences.instantApply. If it is set to true any changes to settings are supposed to be applied immediately. The accept button is therefore unnecessary and is hidden. The cancel button might be shown as an additional possibility to close the dialog in this situation (Windows and Linux) or might be hidden, too (Mac OS). The default setting of browser.preferences.instantApply c...
label - Archive of obsolete content
d. If you wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. For example, for a menuitem in a menu you can add the following CSS rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
... Gets and sets the value of the accesskey attribute. accessibleType Type: integer A value indicating the type of accessibility object for the element. control Type: element id Gets and sets the value of the control attribute. crop Type: string Gets and sets the value of the crop attribute. disabled Type:
boolean Gets and sets the value of the disabled attribute. value Type: string Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax. Methods Inherited Methods addEventListener(), appendChild(), blur, click, cloneNode(), compare...
listcell - Archive of obsolete content
d. If you wish to use the value none and the displayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. For example, for a menuitem in a menu you can add the following CSS rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
... label Type: string The label that will appear on the element. If this is left out, no text appears. For an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. type Type: string This attribute is reserved for use by anonymous children of listitem; do not use. Properties disabled Type:
boolean Gets and sets the value of the disabled attribute. Inherited Properties align, , allowEvents, , boxObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , st...
listhead - Archive of obsolete content
If this attribute is set, the element is disabled. ...
...s, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortDirection, sortResource, sortResource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width Properties accessibleType Type: integer A value indicating the type of accessibility object for the element. disabled Type:
boolean Gets and sets the value of the disabled attribute. Inherited Properties align, , allowEvents, , boxObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , st...
rule - Archive of obsolete content
indings element is optional and may specify additional variable bindings to be used. When no query element is used in a template, a default query is used and the simple query syntax may be used for RDF datasources. For more information about this, see the Simple Query Syntax. ...
...If not specified, the rule may match regardless of whether a node has children or not. true: The rule will only match nodes that contain no child elements. false: The rule will only match nodes that contain one or more child elements. ...
tabbox - Archive of obsolete content
ply. parent Keyboard navigation is captured at the parent of the tabbox. window Keyboard navigation is captured at the window level. Tab navigation will occur as long as any element in the window is focused. document Keyboard navigation is captured at the document level. Tab navigation will occur as long as any element in the document is focused. handleCtrlTab Type:
boolean If set to true or omitted, the tabbox will switch to the next tab when the Control and Tab keys are pressed. If the Shift key is also held down, the previous tab will be displayed. If this attribute is set to false, these keys do not navigate between tabs. Properties accessibleType Type: integer A value indicating the type of accessibility object for the element. ...
... do not navigate between tabs. Properties accessibleType Type: integer A value indicating the type of accessibility object for the element. eventNode Type: EventTarget Indicates the node where keyboard navigation events listener is set up. The initial value for this property is determined by the value of the eventnode attribute. handleCtrlPageUpDown Type:
boolean Gets and sets the value of the handleCtrlPageUpDown attribute. handleCtrlTab Type:
boolean Gets and sets the value of the handleCtrlTab attibute. selectedIndex Type: integer Returns the index of the currently selected item. You may select an item by assigning its index to this property. By assigning -1 to this property, all items will be deselected. Returns -1 if n...
treeitem - Archive of obsolete content
row's descendants. In a template condition, you should use a treeitem instead of a content element when the dont-build-content flag is specified. Set the uri attribute to the variable name to bind to a content node during matching. More information is available in the XUL tutorial. Attributes container, empty, label, open, uri Examples (example needed) Attributes container Type:
boolean Set to true if the element is to act as a container which can have child elements. This would be used for folders. This will be set by the template builder as needed. empty Type:
boolean Set to true if the element is a container that contains no children. This will be set by the template builder as needed. label Tipo: string (concatenacion de caracteres) Para un arbol tree con...
...The open attribute is not present if the menu is closed. uri Type: string For template-generated content, the attribute should be placed on the element where content generation should begin. Thus, it should be placed on an element that is a descendant of a template. ...
Implementation Status - Archive of obsolete content
Model Item Properties Section Title Status Notes Bugs 6.1.1 ...
...ls inside a repeat won't be bound correctly 333638; 7.4.5 UI Binding in other XML vocabularies unsupported not a compliance requirement for an XForms processor 7.4.6 Binding Examples supported 7.5 XForms Core Function Library supported 7.6.1
boolean-from-string() supported 7.6.2 is-card-number() unsupported 7.7.1 avg() supported 7.7.2 min() supported 7.7.3 max() supported 7.7.4 count-non-empty() supported ...
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
There also is null, which is seemingly primitive, but indeed is a special case for every Object: and any structured type is derived from null by the Prototype Chain. Most of the time, a primitive value is represented directly at the lowest level of the language implementation. All primitives are immutable, i.e., they cannot be altered. ...
... of it That's why primitives are immutable - instead of changing them directly, we're modifying a copy, without affecting the original. Primitive wrapper objects in JavaScript Except for null and undefined, all primitive values have object equivalents that wrap around the primitive values: String for the string primitive. Number for the number primitive. BigInt for the bigint primitive.
Boolean for the
boolean primitive. Symbol for the symbol primitive. The wrapper's valueOf() method returns the primitive value. Learn more General knowledge Introduction to JavaScript data types Primitive data type on Wikipedia ...
JavaScript basics - Learn web development
Steve'; Note that variables may hold values that have different data types: Variable Explanation Example String This is a sequence of text known as a string. To signify that the value is a string, enclose it in single quote marks. let myVariable = 'Bob'; Number This is a number. Numbers don't have quotes around them. let myVariable = 10;
Boolean This is a True/False value. The words true and false are special keywords that don't need quote marks. let myVariable = true; Array This is a structure that allows you to store multiple values in a single reference. let myVariable = [1,'Bob','Steve',10]; Refer to each member of the array like this: myVariable[0], myVariable[1], etc. Object This can be anyt...
...rld!'; Subtraction, Multiplication, Division These do what you'd expect them to do in basic math. -, *, / 9 - 3; 8 * 2; // multiply in JS is an asterisk 9 / 3; Assignment As you've seen already: this assigns a value to a variable. = let myVariable = 'Bob'; Equality This performs a test to see if two values are equal. It returns a true/false (
Boolean) result. === let myVariable = 3; myVariable === 4; Not, Does-not-equal This returns the logically opposite value of what it precedes. It turns a true into a false, etc.. When it is used alongside the Equality operator, the negation operator tests whether two values are not equal. !, !== For "Not", the basic expression is true, but the comparison returns false beca...
Basic math in JavaScript — numbers and operators - Learn web development
=/!==. The former versions test whether the values are the same but not whether the values' datatypes are the same. The latter, strict versions test the equality of both the values and their datatypes. The strict versions tend to result in fewer errors, so we recommend you use them. ...
...types. The strict versions tend to result in fewer errors, so we recommend you use them. If you try entering some of these values in a console, you'll see that they all return true/false values -- those
booleans we mentioned in the last article. These are very useful, as they allow us to make decisions in our code, and they are used every time we want to make a choice of some kind. ...
Displaying Places information using views
of the nsINavHistoryResultNode to select. Convenience properties In addition to the methods above, some properties of convenience are implemented directly on the built-in tree view. Warning: Until bug 476952 is fixed, you may experience problems using some of these properties in conjunction with the place attribute and property. Property Type Description flatList
boolean If true the view does not recurse into containers. The action to take when a container is toggled can be set via the onOpenFlatContainer property. At least one of flatList and showRoot must be false. onOpenFlatContainer string The body of function that will be called when a container is toggled. Only applies if property flatList is true. The function will be passed one nsINavHis...
...ner property. At least one of flatList and showRoot must be false. onOpenFlatContainer string The body of function that will be called when a container is toggled. Only applies if property flatList is true. The function will be passed one nsINavHistoryResultNode argument named aContainer. You can QueryInterface aContainer to an nsINavHistoryContainerResultNode. showRoot
boolean If true the root nsINavHistoryContainerResultNode is shown as the first row in the tree. At least one of showRoot and flatList must be false. Example uses To get the nsINavHistoryResultNode at a specific row: var treeView = document.getElementById("myPlacesTreeView"); var rowIndex = 0; var historyResultNode = treeView.view.nodeForTreeIndex(rowIndex); To get the row index of a specifi...
mozbrowseractivitydone
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. ...
...rd 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 whether the activity has completed successfully (true) or not (false). Examples var browser = document.querySelector("iframe"); browser.addEventListe...
mozbrowsercontextmenu
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 that was clicked inside the browser <iframe>'s viewport. cl...
...entURI 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 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. ...
mozbrowserfindchange
ndNext(), 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. ...
...rd 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 search is currently active (true), or not (false.) searchString A DOMString representing the string that is currently being searched for. searchL...
mozbrowsersecuritychange
er, and when the mixed content state 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. 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 SSL security. Possible values are: broken:...
...ndicates 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_content: Indicates that the mixed active content has been loaded. blocked_mixed_active_content: Indicates that the mixed active content has been blocked from loading. extendedValidation A
Boolean indicating if the current SSL certificate is an Extended Validation certificate (true) or not (false). trackingContent A
Boolean indicating if tracking content is present on the current page (true) or not (false). mixedContent A
Boolean indicating if mixed content is present on the current page (true) or not (false). Example var browser = document.querySelector("iframe"); browser.addEvent...
mozbrowserusernameandpasswordrequired
ll authenticate() or cancel() as appropriate. 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 members: host A DOMString representing the host requesting the HTTP authentification. realm A DOMString repr...
... 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 authentication. ...
smartcard-insert
Example document.addEventListener("smartcard-insert", smartcardChangeHandler ); Related Events smartcard-remove ...
... 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-insert", smartcardChangeHandler ); Related Events smartcard-remove ...
smartcard-remove
Example document.addEventListener("smartcard-remove", smartcardChangeHandler ); Related Events smartcard-insert ...
... 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 ...
AddonUpdateChecker
parse update information for an add-on's update manifest. If all you care about is finding the newest version for an Addon then you probably want to use findUpdates() instead. ...
...e update information was not in any known format. ERROR_SECURITY_ERROR The update information was not signed by the update key used for retrieval. Methods getCompatibilityUpdate() Retrieves the best matching compatibility update for the application from a list of available update objects. ...
InstallListener
void onNewInstall( in AddonInstall install ) Parameters install The AddonInstall representing the install onDownloadStarted() Called when downloading begins for an add-on install. Only called for add-ons that need to be...
...ll representing the install onInstallFailed() Called when there is a failure installing the add-on. ...
AsyncShutdown.jsm
not been resolved, and all the additional debug information returned by calls to info(). Instances of Phase Note that you cannot create an instance of Phase yourself. See Attributes for the instances of Phase. If you need a new Phase added to AsyncShutdown, please file a bug. Methods overview void addBlocker(string name, function|promise condition, optional function info)
boolean removeBlocker(function|promise condition) Methods addBlocker () Register a blocker for the completion of a phase. void addBlocker( in string name, in function|promise|* condition, optional in function info ) Arguments name The human-readable name of the blocker. Used for debugging/error reporting. Please make sure that the name respects the following model: "Some Service: s...
...turning v. info Optionally, a function returning information about the current state of the blocker as an object. Used for providing more details when logging errors or crashing. removeBlocker () Remove the blocker for a condition. If several blockers have been registered for the same condition, remove all these blockers. If no blocker has been registered for this condition, this is a noop.
boolean removeBlocker( in function|promise|* condition ) Arguments condition A condition blocking the completion of the phase. This must be the same condition as was passed to addBlocker prior. Return Value Returns true if a blocker has been removed, or false otherwise. Note that a result of false may mean either that the blocker has never been installed or that the phase has completed and the ...
PopupNotifications.jsm
refox chrome windows, so you don't have to do it yourself in most extensions. Method overview void locationChange(); Notification getNotification(id, browser); void remove(notification); Notification show(browser, id, message, anchorID, mainAction, secondaryActions, options); Properties Attribute Type Description isPanelOpen
Boolean Returns true if the notification panel is currently visible, false if it is not. Methods locationChange() The consumer can call this method to let the popup notification module know that the current browser's location has changed. This lets the notification service update the active notifications as appropriate. Note: You shouldn't need to call this when using the PopupNotifications ...
...omatically dismissed. Notifications that specify a timeout value will not be automatically dismissed until this time. The user may manually dismiss the notification, however. For most use cases, the value of this parameter should be Date.now() plus an offset indicating the amount of time the notification should be kept open (for example, Date.now() + 30000 for 30 seconds). persistWhileVisible A
Boolean value indicating whether or not the notification should persist across location changes. If true, the notification will remain visible even if the browser navigates to a different location. dismissed A
Boolean value indicating whether or not the notification should be added as a dismissed notification. Dismissed notifications can be activated by clicking on their anchor. This lets you create a ...
Introduction to NSPR
read synchronization. To access the data in the monitor, the thread performing the access must hold the mutex, also described as being "in the monitor." Mutual exclusion guarantees that only one thread can be in the monitor at a time and that no thread may observe or modify the monitored data without being in the monitor. Monitoring is about protecting data, not code. A monitored invariant is a
Boolean expression over the monitored data. The expression may be false only when a thread is in the monitor (holding the monitor's mutex). This requirement implies that when a thread first enters the monitor, an evaluation of the invariant expression must yield a true. The thread must also reinstate the monitored invariant before exiting the monitor. Therefore, evaluation of the expression must also yie...
...ondition do not accumulate. Nor is it required that any thread be waiting on a condition when the notification occurs. The design of the code that waits on a condition must take these facts into account. Therefore, the pseudocode for the waiting thread might look like this: enter(monitor) while (!expression) wait(condition); ... manipulate monitored data exit(monitor); The need to evaluate the
Boolean expression again after rescheduling from a wait may appear unnecessary, but it is vital to the correct execution of the program. The notification promotes a thread waiting on a condition to a ready state. When that thread actually gets scheduled is determined by the thread scheduler and cannot be predicted. If multiple threads are actually processing the notifications, one or more of them could b...
NSPR Types
This chapter describes the most common NSPR types. Other chapters describe more specialized types when describing the functions that use them. Calling Convention Types are used for externally visible functions and globals. Algebraic Types of various lengths are used for integer algebra. Miscellaneous Types are used for representing size, pointer difference,
Boolean values, and return values. For information on naming conventions for NSPR types, functions, and macros, see NSPR Naming Conventions. Calling Convention Types These types are used to support cross-platform declarations of prototypes and implementations: PR_EXTERN is used for declarations of external functions or variables. PR_IMPLEMENT is used for definitions of external functions or variables. PR_CALLBACK is used for def...
...point type is always 64 bits. PRFloat64 Native OS Integer Types These types are most appropriate for automatic variables. They are guaranteed to be at least 16 bits, though various architectures may define them to be wider (for example, 32 or even 64 bits). These types are never valid for fields of a structure. PRIntn PRUintn Miscellaneous Types Size Type Pointer Difference Types
Boolean Types Status Type for Return Values Size Type PRSize Pointer Difference Types Types for pointer difference. Variables of these types are suitable for storing a pointer or pointer subtraction. These are the same as the corresponding types in libc. PRPtrdiff PRUptrdiff
Boolean Types Type and constants for
Boolean values. PRBool PRPackedBool Status Type for Return Values PRS...
PR_Wait
s lock with the same entry count it had before the wait began. A thread waiting on the monitor resumes when the monitor is notified or when the timeout specified by the ticks parameter elapses. The resumption from the wait is merely a hint that a change of state has occurred. It is the responsibility of the programmer to evaluate the data and act accordingly. This is usually done by evaluating a
Boolean expression involving the monitored data. While the
Boolean expression is false, the thread should wait. The thread should act on the data only when the expression is true. The
boolean expression must be evaluated while in the monitor and within a loop. In pseudo-code, the sequence is as follows: PR_EnterMonitor(&ml); while (!expression) wait; ... act on the state change ... PR_ExitMonitor(&...
... is as follows: PR_EnterMonitor(&ml); while (!expression) wait; ... act on the state change ... PR_ExitMonitor(&ml); A thread can be resumed from a wait for a variety of reasons. The most obvious is that it was notified by another thread. If the value of timeout is not PR_INTERVAL_NO_TIMEOUT, PR_Wait resumes execution after the specified interval has expired. If a timeout value is used, the
Boolean expression must include elapsed time as part of the monitored data. Resuming from the wait is merely an opportunity to evaluate the expression, not an assertion that the expression is true. ...
Scripting Java
e: js> importPackage(java.io) js> File [JavaClass java.io.File] Here importPackage(java.io) makes all the classes in the java.io package (such as File) available at the top level. It's equivalent in effect to the Java declaration import java.io.*;. It's important to note that Java imports java.lang.* implicitly, while Rhino does not. The reason is that JavaScript has its own top-level objects
Boolean, Math, Number, Object, and String that are different from the classes by those names defined in the java.lang package. Because of this conflict, it's a good idea not to use importPackage on the java.lang package. One thing to be careful of is Rhino's handling of errors in specifying Java package or class names. If java.MyClass is accessed, Rhino attempts to load a class named java.MyClass. If th...
...base class java.lang.Object (like wait). This makes it easier to work with objects in deeply nested inheritance hierarchies since you can see all the methods that are available for that object. Rhino provides another convenience by allowing properties of JavaBeans to be accessed directly by their property names. A JavaBean property foo is defined by the methods getFoo and setFoo. Additionally, a
boolean property of the same name can be defined by an isFoo method. For example, the following code actually calls the File object's getName and isDirectory methods. js> f.name test.txt js> f.directory false Calling Overloaded Methods The process of choosing a method to call based upon the types of the arguments is called overload resolution. In Java, overload resolution is performed at compile time...
JSAPI User Guide
Script is a dynamically typed language: variables and properties do not have a type that is fixed at compile time. How can a statically typed language, like C or C++, in which all variables have types, interact with JavaScript? The JSAPI provides a data type, JS::Value (also with a deprecated jsval typedef), which can contain JavaScript values of any type. A JS::Value can be a number, a string, a
boolean value, a reference to an object (like an Object, Array, Date, or Function), or one of the special values null or undefined. For integers and
boolean values, a jsval contains the value itself. In other cases, the jsval is a pointer to an object, string, or number. Warning: Like C++ pointers, and unlike JavaScript vars, a JS::Value is not automatically initialized to a safe value, and can become...
...rbage collector recycles objects, strings, and numbers that don't appear to be in use, and a JS::Value by itself does not protect its referent from the garbage collector. See Garbage collection below for crucial information on how to use JS::Values safely. JS::Value includes member functions to test the JavaScript data type. These are isObject(), isNumber(), isInt32(), isDouble(), isString(), is
Boolean(), isNull(), and isUndefined(). If a JS::Value contains a JSObject, double, or JSString, you can cast it to its underlying data type using the toObject(), toDouble(), and toString() member functions, respectively. This is useful in some cases where your application or a JSAPI function requires a variable or argument of a specific data type, rather than a JS::Value. Similarly, you can create a JS...
JS::OrdinaryToPrimitive
type JSType The type of converted value. vp JS::MutableHandleValue Out parameter. On success, *vp receives the converted value. Description JS::OrdinaryToPrimitive converts a JavaScript object to a specified type value, by the algorithm specified in ES6 draft rev 28 (2014 Oct 14) 7.1.1, second algorithm. Most users should not call this -- use JS::ToNumber, JS::To
Boolean, or JS::ToString instead. This should only be called from custom convert hooks. It implements the default conversion behavior shared by most objects in JS, so it's useful as a fallback. On success, JS::OrdinaryToPrimitive stores the converted value in *vp and returns true. On error or exception, it returns false, and the value left in *vp is undefined. See Also MXR ID Search for JS::Ordinary...
...hould only be called from custom convert hooks. ...
JSClass.flags
DOM. MXR ID Search for JSCLASS_IS_DOMJSCLASS JSCLASS_EMULATES_UNDEFINED Added in SpiderMonkey 24 Causes objects which have this class to emulate undefined in certain circumstances. ...
...rch for JSCLASS_IS_DOMJSCLASS JSCLASS_EMULATES_UNDEFINED Added in SpiderMonkey 24 Causes objects which have this class to emulate undefined in certain circumstances. ...
JS_ConvertValue
cx JSContext * The context in which to perform the conversion. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. v JS::HandleValue The value to convert. type JSType The type to which the value is to be converted. type must be one of JSTYPE_VOID, JSTYPE_OBJECT, JSTYPE_FUNCTION, JSTYPE_STRING, JSTYPE_NUMBER, or JSTYPE_
BOOLEAN. Otherwise JS_ConvertValue reports an error. vp JS::MutableHandleValue Out parameter. On success, *vp receives the converted value. Description JS_ConvertValue converts a JavaScript value, v, to the specified type. On success, the converted value is stored in *vp. Typically users of this function set vp to point to v, so that if conversion is successful, v now contains the ...
...s false, otherwise the result is nullptr. Converting to JSTYPE_FUNCTION works like JS_ValueToFunction, but better: the result is a function object that has not been stripped of its lexical scope. It is safe to call the result (e.g. using JS_CallFunctionValue). Converting to JSTYPE_STRING works like JS::ToString. Converting to JSTYPE_NUMBER works exactly like JS::ToNumber. Converting to JSTYPE_
BOOLEAN works exactly like JS::To
Boolean. On success, JS_ConvertValue stores the converted value in *vp and returns true. On error or exception, it returns false, and the value left in *vp is undefined. See Also MXR ID Search for JS_ConvertValue JS_ConvertArguments JS_GetTypeName JS_TypeOfValue bug 1125784 ...
JS_ExecuteRegExp
inter to a RegExp object. chars const char16_t * A pointer to the string contains a input string. length size_t The length of bytes or chars, in characters. indexp size_t * In/Out parameter. A pointer to the lastIndex for the execution, and received the updated lastIndex. test bool Pass true to avoid creating match result array and store
boolean value to rval. rval JS::MutableHandleValue Out parameter. Receives the result match result array or
boolean value. Description JS_ExecuteRegExp and JS_NewRegExpObjectNoStatics execute the RegExp object, reobj, to the specified input string, chars, from *indexp index. If test is false, JS_ExecuteRegExp and JS_NewRegExpObjectNoStatics store the match result array to *rval if m...
... JS_ExecuteRegExp updates the built-in RegExp object's properties. ...
SpiderMonkey 31
tionalization library. This is unlikely to be of interest to embedders unless you are doing detailed memory profiling. It must be called before JS_Init is called. ...
...s is unlikely to be of interest to embedders unless you are doing detailed memory profiling. It must be called before JS_Init is called. ...
Places Developer Guide
// Observers can use this to suspend updates to the user-interface, for example // while a batch change is occurring. }, onEndUpdateBatch: function() { this._inBatch = false; }, onItemAdded: function(id, folder, index) { }, onItemRemoved: function(id, folder, index) { }, onItemChanged: function(id, property, isAnnotationProperty, value) { // isAnnotationProperty is a
boolean value that is true of the changed property is an annotation. // You can access a bookmark item's annotations with the <code>nsIAnnotationService</code>. }, onItemVisited: function(id, visitID, time) { // The visit id can be used with the History service to access other properties of the visit. // The time is the time at which the visit occurred, in microseconds. }, onItemMoved...
...dObserver(observer, false); // Un-register the observer when done. bmsvc.removeObserver(observer); HTML Import/Export The nsIPlacesImportExportService service is used for import and export of bookmarks in the Netscape Bookmarks HTML format. Note that this service is only currently available for Firefox, not other toolkit-based applications. Importing: importHTMLFromFile (nsILocalFile aFile,
boolean aIsInitialImport) - This imports all the bookmarks in the specified file into the current bookmarks collection. If aIsInitialImport is true, all pre-existing bookmarks in the toolbar and menu folders will be deleted. Note: The method importHTMLFromFileToFolder() method was removed in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11). Exporting: exportHTMLToFile (nsILocalFile aF...
extIApplication
This content covers features introduced in Thunderbird 3 The extIApplication is defined in toolkit/components/exthelper/extIApplication.idl. Implemented via XPCOM service for extIApplication: see the instructions on the FUEL (Firefox), STEEL (Thunderbird) and SMILE (SeaMonkey) pages. Method overview
boolean quit()
boolean restart() void getExtensions(extIExtensionsCallback aCallback) Attributes The following interfaces are available to all applications: Attribute Type Description id readonly attribute AString The id of the application. name readonly attribute AString The name of the application. version readonly attribute AString The version number of the application. console read...
...eadonly attribute fuelIBookmarkRoots The root bookmarks object for the application. windows readonly attribute nsIVariant An array of browser windows within the application. activeWindow readonly attribute fuelIWindow The currently active browser window. Methods quit() Attempts to shutdown the application. It is possible for the shutdown to be canceled.
boolean quit() Return value
boolean value indicating whether the shutdown was successful. restart() Attempts to restart the application. It is possible for the restart to be canceled.
boolean restart() Return value
boolean value indicating whether the restart was successful. getExtensions(aCallback) Calls aCallback with the list of installed extensions. void getExtensions(extIExtensionsCallba...
extISessionStorage
for the life time of the application (e.g. browser). extISessionStorage is defined in toolkit/components/exthelper/extIApplication.idl. Implemented via XPCOM service for extIApplication: see the instructions on the FUEL (Firefox), STEEL (Thunderbird) and SMILE (SeaMonkey) pages. Method overview These methods are usually accessed via Application.storage. ...
...in AString aName) void set(in AString aName, in nsIVariant aValue) nsIVariant get(in AString aName, in nsIVariant aDefaultValue) Attributes Attribute Type Description events readonly attribute extIEvents The events object for the storage supports: "change" Methods has() Determines if a storage item exists with the given name.
boolean has(in AString aName) Parameters aName The name of an item Return value true if an item exists with the given name, false otherwise. set() Sets the value of a storage item with the given name. void set(in AString aName, in nsIVariant aValue) Parameters aName The name of an item Return value get() Gets the value of a storage item with the given name. Returns a default value...
Mozilla internal string guide
write access pattern instead of a non-linear back-and-forth sequence resulting from using SetLength() followed by BeginWriting(). Low-level means that writing via a raw pointer is possible as with BeginWriting(). BulkWrite() takes four arguments: The new capacity (which may be rounded up), the number of code units at the beginning of the string to preserve (typically the old logical length), a
boolean indicating whether reallocating a smaller buffer is OK if the requested capacity would fit in a buffer that's smaller than current one, and a reference to an nsresult for indicating failure on OOM. (Don't access the return value if the nsresult indicates failure. Unfortunately mozilla::Result is not versatile enough to be used here.) BulkWrite() returns a mozilla::BulkWriteHandle<T>, where T is ...
...the first three arguments of BulkWrite(). It returns mozilla::Result<mozilla::Ok, nsresult> to indicate success or OOM. Calling RestartBulkWrite() invalidates previously-obtained span, raw pointer or length. Once you are done writing, call Finish(). It takes two arguments: the new logical length of the string (which must not exceed the capacity retuned by the Length() method of the handle) and a
boolean indicating whether it's OK to attempt to reallocate a smaller buffer in case a smaller mozjemalloc bucket could accommodate the new logical length. Helper Classes and Functions Converting Cocoa strings Use mozilla::CopyCocoaStringToXPCOMString() in mozilla/MacStringHelpers.h to convert Cocoa strings to XPCOM strings. Searching strings - looking for substrings, characters, etc. FindInReadable...
Components.utils.Sandbox
andbox. The sandbox will inherit the contents of this object if it's provided. Passing a content window object, setting wantXrays:true (default) and using an extended principal provides a clean, isolated execution environment in which javascript code that needs Web APIs (such as accessing the window's DOM) can be executed without interference from untrusted content code. wantComponents A
Boolean indicating whether the Components object is available or not in the sandbox. Default: true. If the sandbox interacts with untrusted content this should be set to false when possible to further reduce possible attack surface. wantExportHelpers A
Boolean: if true, then createObjectIn(), evalInWindow(), and exportFunction() are available in the sandbox. Default: false. wantGlobalProperti...
...ns = { "wantGlobalProperties": ["atob", "btoa"] } var sandbox = Components.utils.Sandbox("https://example.org/", options); Components.utils.evalInSandbox(sandboxScript, sandbox); console.log(sandbox.encoded); // "SGVsbG8=" console.log(sandbox.decoded); // "Hello" wantXHRConstructor This option was removed in Gecko version 26. Use wantGlobalProperties instead. wantXrays A
Boolean value indicating whether the sandbox wants Xray vision with respect to same-origin objects outside the sandbox. Default: true. "Xray vision" is exactly the same Xray behavior that script always gets, by default, when working with DOM objects across origin boundaries. This is primarily visible for chrome code accessing content. However, it also occurs during cross-origin access between two conte...
Components.utils.exportFunction
onal parameter that supplies additional options. The following options are currently defined: defineAs: determines the name of the function in targetScope. If this is omitted, you need to assign the return value of exportFunction() to an object in the target scope. allowCallbacks: deprecated/redundant from Firefox 34. This option allows the exported function to accept callbacks as arguments.
Boolean, defaulting to false. This option is new in Firefox 33. From Firefox 34 onwards this option has no effect: the exported function is always able to accept callbacks as arguments. allowCrossOriginArguments: do not check that arguments to the exported function are subsumed by the caller: this allows the caller to pass objects with a different origin into the exported function, which can then use it...
... Firefox 34 onwards this option has no effect: the exported function is always able to accept callbacks as arguments. allowCrossOriginArguments: do not check that arguments to the exported function are subsumed by the caller: this allows the caller to pass objects with a different origin into the exported function, which can then use its privileged status to make cross-origin requests with them.
Boolean, defaulting to false. This option is new in Firefox 34. Returns The placeholder function which has been created in the target context. Exporting functions that take arguments Until Firefox 34, any arguments that the function takes are structured-cloned across the security boundary unless they are native objects such as DOM nodes. Because structured cloning does not clone functions, this mean...
IAccessibleHyperlink
later version of the IDL and it is suggested that implementations should not rely on the inheritance. Method overview [propget] HRESULT anchor([in] long index, [out] VARIANT anchor ); [propget] HRESULT anchorTarget([in] long index, [out] VARIANT anchorTarget ); [propget] HRESULT endIndex([out] long index ); [propget] HRESULT startIndex([out] long index ); [propget] HRESULT valid([out]
boolean valid ); Methods anchor() Returns an object that represents the link anchor, as appropriate for the link at the specified index. [propget] HRESULT anchor( [in] long index, [out] VARIANT anchor ); Parameters index A 0 based index identifies the anchor when, as in the case of an image map, there is more than one link represented by this object. The valid maximal index is indicated by IAcce...
...ased character offset at which the textual representation of the hyperlink starts. The returned value is related to the IAccessibleText interface of the object that owns this hyperlink. Return value S_OK. valid() Returns whether the target object referenced by this link is still valid. This is a volatile state that may change without sending an appropriate event. [propget] HRESULT valid( [out]
boolean valid ); Parameters valid true if the referenced target is still valid and false otherwise. This has also been used to indicate whether or not the URI of the anchorTarget is malformed. Return value S_FALSE if there is nothing to return, [out] value is false. S_OK. See also IAccessibleAction IAccessibleText ...
imgIContainer
You can only be guaranteed that querying this will not throw if STATUS_DECODE_COMPLETE is set on the imgIRequest. Read only. Exceptions thrown NS_ERROR_NOT_AVAILABLE If the animated state cannot be determined. animationMode unsigned short currentFrame gfxASurface Get a surface for the curr...
...me gfxASurface Get a surface for the current frame. This may be a platform-native, optimized frame, so you cannot inspect its pixel data. Read only. Native code only! Obsolete since Gecko 2.0 currentFrameIndex unsigned long The index of the current frame that would be drawn if the image was to be drawn now. Read only. Obsolete since Gecko 2.0 currentFrameIsOpaque
boolean Whether the current frame is opaque; that is, needs the background painted behind it. Read only. height PRInt32 The height of the container rectangle. In the case of any error, zero is returned, and an exception will be thrown. Read only. loopCount long number of times to loop the image. Note: -1 means forever. Obsolete since Gecko 2.0 numFrames...
imgILoader
imgIRequest loadImage( in nsIURI aURI, in nsIURI aInitialDocumentURL, in nsIURI aReferrerURI, in nsIPrincipal aLoadingPrincipal, in nsILoadGroup aLoadGroup, in imgIDeco...
...Observer The observer (may be null) cx Some random data. aListener A listener that you must send the channel's notifications and data to. Can be null, in which case imagelib has found a cached image and is not interested in the data. aChannel will be canceled for you in this case. Return value supportImageWithMimeType() Checks if a decoder for the an image with the given mime type is available.
boolean supportImageWithMimeType( in string mimeType ); Parameters mimeType The type to find a decoder for. Return value true if a decoder is available, false otherwise. ...
mozIAsyncFavicons
this interface. As an alternative, you can just use PlacesUtils.favicons from JavaScript. ...
...n URI (see FAVICON_ERRORPAGE_URL in nsIFaviconService.idl). Icons that fail to load will automatically be added to the failed favicon cache, and this function will not save favicons for non-bookmarked URIs when history is disabled. Note: This function is identical to nsIFaviconService.setAndLoadFaviconForPage() void setAndFetchFaviconForPage( in nsIURI aPageURI, in nsIURI aFaviconURI, in
boolean aForceReload, in unsigned long afaviconLoadType, in nsIFaviconDataCallback aCallback Optional ); Parameters aPageURI URI of the page whose favicon is being set. aFaviconURI URI of the favicon to associate with the page. aForceReload If false, we try to reload the favicon only if we do not have it or it has expired from the cache. Setting to true cau...
mozIPersonalDictionary
spellchecker/personaldictionary;1. ...
...spelling of the word to add to the list of corrections. correction The correct spelling of the word. lang The language of the word. addWord() Add a word to the personal dictionary. void addWord( in wstring word, in wstring lang ); Parameters word The word to add to the dictionary. lang The language of the word. Note that this parameter is currently unused. check() Checks a Unicode string.
boolean check( in wstring word, in wstring lang ); Parameters word The word to check. lang The language of the word. Note that this parameter is currently ignored. Return value true if the word is in either the dictionary or the ignore list, false if it is not in either list. endSession() Clears the ignore list. void endSession(); Parameters None. getCorrection() Gets a list of previous correctio...
mozIStorageProgressHandler
The mozIStorageProgressHandler interface lets storage consumers receive callbacks during the execution of sqlite requests. storage/public/mozIStorageProgressHandler.idlScriptable Please add a summary to this article. ...
... article. Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Inherits from: nsISupports Method overview
boolean onProgress(in mozIStorageConnection aConnection); Methods onProgress() The onProgress() method is called periodically while an sqlite operation is ongoing. This allows you to monitor the progress and possibly display status information to the user.
boolean onProgress( in mozIStorageConnection aConnection ); Parameters <tt>aConnection</tt> A mozIStorageConnection connection indicating the connection for which the callback was invoked. Return value Return true to abort the request or false to allow it to continue. See also Storage mozStorage introduction and how-to article mozIStorageConnection Database connection to a specific file or in-m...
mozIStorageStatementWrapper
to the mozIStorageStatement interface, so this interface is essentially deprecated. storage/public/mozIStorageStatementWrapper.idlScriptable Please add a summary to this article. Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Inherits from: nsISupports Method overview void initialize(in mozIStorageStatement aStatement); void reset();
boolean step(); void execute(); Attributes Attribute Type Description statement mozIStorageStatement The statement that is wrapped. row mozIStorageStatementRow The current row. Throws an exception if no row is currently available. Useful only from script. The value of this is only valid while the statement is still executing, and is still on the...
...these can be set in lieu of using the call notation on this. Methods initialize() This method initializes this wrapper with aStatement. void initialize( in mozIStorageStatement aStatement ); Parameters aStatement The statement to be initialized. reset() This method resets the wrapped statement. void reset(); Parameters None. step() This method steps the wrapped statement.
boolean step(); Parameters None. Return value Returns true if the stepping the wrapped statement was successful, otherwise returns false. execute() This method executes the wrapped statement. void execute(); Parameters None. See also Storage mozIStorageStatement mozIStorageStatementRow mozIStorageStatementParams ...
mozIStorageValueArray
Constants Constant Value Description VALUE_TYPE_NULL 0 Null data type. VALUE_TYPE_INTEGER 1 INTEGER data type. VALUE_TYPE_FLOAT 2 FLOAT data type. VA...
... a blob from the specified index. void getBlob( in unsigned long aIndex, out unsigned long aDataSize, [array,size_is(aDataSize)] out octet aData ); Parameters aIndex The zero-based numerical index for the column to get the data from. aDataSize The size of the returned array. Return value The blob for the specified entry. getIsNull() Checks if given column index is NULL.
boolean getIsNull( in unsigned long aIndex ); Parameters aIndex The zero-based numerical index for the column to get the data from. Return value Returns true if the column specified by aIndex is NULL, or false otherwise. See also Storage introduction and how-to article mozIStorageConnection Database connection to a specific file or in-memory data storage mozIStorageStatement Create and...
mozIVisitStatusCallback
aVisitedStatus true if the specified UR...
...cko 11.0 (Firefox 11.0 / Thunderbird 11.0 / SeaMonkey 2.8) Method overview void isVisited(in nsIURI aURI, in
boolean aVisitedStatus); Methods isVisited() Called when the mozIAsyncHistory.isURIVisited() method's check to determine whether a given URI has been visited has completed. Implement this method to determine the results of the request. void isVisited( in nsIURI aURI, in
boolean aVisitedStatus ); Parameters aURI The URI that was checked to see if it's been visited. aVisitedStatus true if the specified URI has been visited; otherwise false. See also mozIAsyncHistory ...
nsIAccessibleTableCell
The result differs from 1 if the specified cell spans multiple columns. Read only. ...
...nly. rowExtent long Return the number of rows occupied by this accessible cell. The result differs from 1 if the specified cell spans multiple rows. Read only. rowHeaderCells nsIArray Return an array of row header cells for this cell. Read only. rowIndex long Return row index of this cell. Read only. table nsIAccessibleTable Return host table accessible. Read only. Methods isSelected()
boolean isSelected(); Parameters None. Return value A
boolean value indicating whether this cell is selected. ...
nsIAccessibleText
ng startOffset, out long endOffset); AString getText(in long startOffset, in long endOffset); AString getTextAfterOffset(in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); AString getTextAtOffset(in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); nsIPersistentProperties getTextAttributes(in
boolean includeDefAttrs, in long offset, out long rangeStartOffset, out long rangeEndOffset); AString getTextBeforeOffset(in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); void removeSelection(in long selectionNum); void scrollSubstringTo(in long startIndex, in long endIndex, in unsigned long scrollType); void scrollSubstringToPoint(in long sta...
...re UTF-8. AString getTextAtOffset( in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset ); Parameters offset boundaryType startOffset endOffset Return value getTextAttributes() Get the accessible start/end offsets around the given offset, return the text attributes for this range of text. nsIPersistentProperties getTextAttributes( in
boolean includeDefAttrs, in long offset, out long rangeStartOffset, out long rangeEndOffset ); Parameters includeDefAttrs Points whether text attributes applied to the entire accessible should be included or not. offset Text offset. rangeStartOffset Start offset of the range of text. rangeEndOffset End offset of the range of text. Return value Exceptions thrown Missing Exception getTextBefor...
nsIAppShell
face is designed to be used on the main application thread only. ...
...ormance vs. native event starvation this hint tells the native dispatch code which to favor. The default is to prevent native event starvation. Calls to this function may be nested. When the number of calls that pass PR_TRUE is subtracted from the number of calls that pass PR_FALSE is greater than 0, performance is given precedence over preventing event starvation. void favorPerformanceHint( in
boolean favorPerfOverStarvation, in unsigned long starvationDelay ); Parameters favorPerfOverStarvation true to favor event performance over event starvation, false to favor event starvation over event performance. starvationDelay Is only used when favorPerfOverStarvation is PR_FALSE. It is the amount of time in milliseconds to wait before the PR_FALSE actually takes effect. GetNativeEvent(...
nsIApplicationCacheChannel
table This interface is implemented by communication channels that support application caches. ...
...The default value is true. Exceptions thrown NS_ERROR_ALREADY_OPENED If set after calling AsyncOpen() on the channel. loadedFromApplicationCache PRBool true if the resource was loaded from the application cache, otherwise false. ...
nsIAsyncStreamCopier
ncStreamCopier.idlScriptable This interface is used to copy the contents of one stream to another. Inherits from: nsIRequest Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Method overview void asyncCopy(in nsIRequestObserver aObserver, in nsISupports aObserverContext); void init(in nsIInputStream aSource, in nsIOutputStream aSink, in nsIEventTarget aTarget, in
boolean aSourceBuffered, in
boolean aSinkBuffered, in unsigned long aChunkSize, in
boolean aCloseSource, in
boolean aCloseSink); Methods asyncCopy() Starts the copy operation. The specified observer is notified when the copy completes. void asyncCopy( in nsIRequestObserver aObserver, in nsISupports aObserverContext ); Parameters aObserver Receives notifications. aObserverContext The object to re...
...aObserver, in nsISupports aObserverContext ); Parameters aObserver Receives notifications. aObserverContext The object to receive notifications with information about the progress of the copy operation. init() Initializes the stream copier. Note: At least one of the streams must be buffered. void init( in nsIInputStream aSource, in nsIOutputStream aSink, in nsIEventTarget aTarget, in
boolean aSourceBuffered, in
boolean aSinkBuffered, in unsigned long aChunkSize, in
boolean aCloseSource, in
boolean aCloseSink ); Parameters aSource Contains the data to be copied. aSink Specifies the destination for the data. aTarget Specifies the thread on which the copy will occur. A null value is permitted and causes the copy to occur on an unspecified background thread. aSourceBuffered tru...
nsIAuthModule
REQ_MUTUAL_AUTH (1 << 0) Client and server will be authenticated. REQ_DELEGATE (1 << 1) The server is allowed to impersonate the client. The REQ_MUTUAL_AUTH flag may also need to be specified in order for this flag to take effect. Methods ge...
...MENTED If the underlying authentication mechanism does not support security layers. wrap() Once a security context has been established through calls to getNextToken() it may be used to protect data exchanged between client and server. Calls to this method are used to protect items of data to be sent to the server. void wrap( [const] in voidPtr aInToken, in unsigned long aInTokenLength, in
boolean confidential, out voidPtr aOutToken, out unsigned long aOutTokenLength ); Parameters aInToken A buffer containing the data to be sent to the server. aInTokenLength The length of the input token. confidential If set to true, it will encrypt the data, otherwise data will just be integrity protected (checksummed). aOutToken A buffer containing the resulting data to be sent to the server. aOutT...
nsIAuthPrompt2
ager/prompter;1. To create an instance, use: var authPrompt2 = Components.classes["@mozilla.org/login-manager/prompter;1"] .createInstance(Components.interfaces.nsIAuthPrompt2); Method overview nsICancelable asyncPromptAuth(in nsIChannel aChannel, in nsIAuthPromptCallback aCallback, in nsISupports aContext, in PRUint32 level, in nsIAuthInformation authInfo);
boolean promptAuth(in nsIChannel aChannel, in PRUint32 level, in nsIAuthInformation authInfo); Constants Constant Value Description LEVEL_NONE 0 The password will be sent unencrypted. No security provided. LEVEL_PW_ENCRYPTED 1 Password will be sent encrypted, but the connection is otherwise insecure. LEVEL_SECURE 2 The connection, both f...
...rmation object. The implementation should fill in this object with the information entered by the user before returning. Return value promptAuth() Requests a username and a password. Implementations will commonly show a dialog with a username and password field, depending on flags also a domain field. Note: Exceptions thrown from this function will be treated like a return value of false.
boolean promptAuth( in nsIChannel aChannel, in PRUint32 level, in nsIAuthInformation authInfo ); Parameters aChannel The channel that requires authentication. level One of the level constants. authInfo Authentication information object. The implementation should fill in this object with the information entered by the user before returning. Return value false, authentication should be c...
nsIAuthPromptCallback
ports Last changed in Gecko 1.9 (Firefox 3) Callers must call exactly one method if nsIAuthPrompt2.asyncPromptAuth() returns successfully. They must not call any method on this interface before nsIAuthPrompt2.asyncPromptAuth() returns. Method overview void onAuthAvailable(in nsISupports aContext, in nsIAuthInformation aAuthInfo); void onAuthCancelled(in nsISupports aContext, in
boolean userCancel); Methods onAuthAvailable() Authentication information is available. Note: Any exceptions thrown from this method should be ignored. void onAuthAvailable( in nsISupports aContext, in nsIAuthInformation aAuthInfo ); Parameters aContext The context as passed to nsIAuthPrompt2.asyncPromptAuth(). aAuthInfo Authentication information. Must be the same object that...
...lable( in nsISupports aContext, in nsIAuthInformation aAuthInfo ); Parameters aContext The context as passed to nsIAuthPrompt2.asyncPromptAuth(). aAuthInfo Authentication information. Must be the same object that was passed to nsIAuthPrompt2.asyncPromptAuth(). onAuthCancelled() Notification that the prompt was cancelled. void onAuthCancelled( in nsISupports aContext, in
boolean userCancel ); Parameters aContext The context that was passed to nsIAuthPrompt2.asyncPromptAuth(). userCancel If false, this prompt was cancelled by calling the the cancel method on the nsICancelable; otherwise, it was cancelled by the user. See also nsIAuthPrompt2 ...
nsIBadCertListener2
tener2.idlScriptable This interface is used to is report a broken SSL status. It can also be used to obtain the SSL handshake status of a connection that will be canceled because of improper certificate status. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Replaces the obsolete nsIBadCertListener interface. ...
...mproper certificate status. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Replaces the obsolete nsIBadCertListener interface. Method overview
boolean notifyCertProblem(in nsIInterfaceRequestor socketInfo, in nsISSLStatus status, in AUTF8String targetSite); Methods notifyCertProblem() Called in case of a broken ssl status.
boolean notifyCertProblem( in nsIInterfaceRequestor socketInfo, in nsISSLStatus status, in AUTF8String targetSite ); Parameters socketInfo A network communication context that can be used to obtain more information about the active connection. This object usually supports nsISSLSocketControl, nsITransportSecurityInfo, nsIIdentityInfo, nsISSLStatusProvider, nsIClientAuthUserDecision and possibly o...
nsIBidiKeyboard
er users, and do some magic for them. A user is a bidirectional writer if they have keyboard layouts in both left-to-right and right-to-left directions (that is users who use Arabic, Iranian (Persian), or Israel (Hebrew) keyboard layout, beside an US (English) layout.) Inherits from: nsISupports Last changed in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) Method overview
boolean isLangRTL(); void setLangFromBidiLevel(in PRUint8 aLevel); Attributes Attribute Type Description haveBidiKeyboards
boolean Indicates whether or not the system has at least one keyboard for each direction (left-to-right and right-to-left) installed. Read only. Note: This throws NS_ERROR_NOT_IMPLEMENTED if the widget layer doesn't provide...
... installed. Read only. Note: This throws NS_ERROR_NOT_IMPLEMENTED if the widget layer doesn't provide this information. Currently, this is only implemented on Windows. Methods isLangRTL() Determines if the current keyboard language is right-to-left. (supported on: win32, mac, gtk2) Note: Prior to Gecko 1.9 this method used a parameter 'out PRBool aIsRTL' to return the value.
boolean isLangRTL(); Parameters None. Return value true if the current keyboard is right-to-left, false if it is not. Exceptions thrown NS_ERROR_FAILURE If no right-to-left keyboards are installed. setLangFromBidiLevel() Sets the keyboard language to left-to-right or right-to-left. (supported on: win32) void setLangFromBidiLevel( in PRUint8 aLevel ); Parameters aLevel If odd set th...
nsIBinaryInputStream
utral disk files, that is ones that can be read and written by both big-endian and little-endian platforms. ...
...teger read from the stream. readArrayBuffer() Read opaque bytes from the stream, storing the results in an ArrayBuffer. unsigned long readArrayBuffer(in PRUint32 aLength, in jsval aArrayBuffer); Parameters aLength The number of bytes that should be read. aArrayBuffer The arraybuffer in which to store the results. Return value The number of bytes actually read into aArrayBuffer. read
Boolean() Reads an 8-bit value from the stream, treating it as a
Boolean value. PRBool read
Boolean(); Parameters None. Return value A
boolean value read from the stream. readByteArray() Reads an opaque byte array from the stream, storing the results as an array of PRUint8s. void readByteArray( in PRUint32 aLength, [array, size_is(aLength), retval] out PRUint8 aBytes ); Parameters aLeng...
nsIBlocklistService
unsigned long...
... are checking in the blocklist. If this parameter is null, the version of the running application is used. toolkitVersion Optional The version of the toolkit we are checking in the blocklist. If this parameter is null, the version of the running toolkit is used. Return value The blocklist state of the plugin, one of the Constants. isAddonBlocklisted() Determine if an item is blocklisted.
boolean isAddonBlocklisted( in jsval addon, in AString appVersion, Optional from Gecko 1.9.1 in AString toolkitVersion Optional from Gecko 1.9.1 ); Parameters addon The addon object to be checked. appVersion Optional from Gecko 1.9.1 The version of the application we are checking in the blocklist. If this parameter is null, the version of the running application is used. toolk...
nsICacheEntryInfo
Read only. dataSize unsigned long Get the cache entry data size. Read only. deviceID string Get the id for the device that stores this cache entry. Read only. expirationTime PRUint32 Get the expiration time of the cache entry (in seconds since the Epoch). Read only. ...
...ed. Read only. key ACString Get the key identifying the cache entry. Read only. lastFetched PRUint32 Get the last time the cache entry was opened (in seconds since the Epoch). Read only. lastModified PRUint32 Get the last time the cache entry was modified (in seconds since the Epoch). Read only. Methods isStreamBased() This method finds out whether or not the cache entry is stream based.
boolean isStreamBased(); Parameters None. Return value Returns true if the cache entry is stream based, otherwise returns false. See also nsICache nsICacheVisitor ...
nsICacheService
e is no longer supported and planned to be removed soon: use nsICacheStorageService instead. At the time of writing there is no documentation for nsICacheStorageService but comments are available in the source. Note: Starting in Gecko 2.0, cache I/O is handled asynchronously. ...
...session. A cache session represents a client's access into the cache. The cache session is not "owned" by the cache service. Hence, it is possible to create duplicate cache sessions. Entries created by a cache session are invisible to other cache sessions, unless the cache sessions are equivalent. nsICacheSession createSession( in string clientID, in nsCacheStoragePolicy storagePolicy, in
boolean streamBased ); Parameters clientID Specifies the name of the client using the cache. storagePolicy Limits the storage policy for all entries accessed via the returned session. As a result, devices excluded by the storage policy will not be searched when opening entries from the returned session. streamBased Indicates whether or not the data being cached can be represented as a stream. T...
nsICacheVisitor
netwerk/cache/nsICacheVisitor.idlScriptable This interface provides information about cache devices and entries. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview
boolean visitDevice(in string deviceID, in nsICacheDeviceInfo deviceInfo);
boolean visitEntry(in string deviceID, in nsICacheEntryInfo entryInfo); Methods visitDevice() This method is called to provide information about a cache device.
boolean visitDevice( in string deviceID, in nsICacheDeviceInfo deviceInfo ); Parameters deviceID Specifies the device being visited. deviceInfo Specifies information about this device. Return value Returns true to start visiting all entries for this device, otherwise returns false to advance to the next device. visitEntry() This method is called to provide...
...entryInfo Specifies information about this entry. Return value Returns true to visit the next entry on the current device, or if the end of the device has been reached, advance to the next device, otherwise returns false to advance to the next device. ...
nsICharsetResolver
intl/chardet/public/nsICharsetResolver.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void notifyResolvedCharset(in ACString charset, in nsISupports closure); ACString requestCharset(in nsIWebNavigation aWebNavigation, in nsIChannel aChannel, out
boolean aWantCharset, out nsISupports aClosure); Methods notifyResolvedCharset() Some implementations may request that they be notified when the charset is actually detected. void notifyResolvedCharset( in ACString charset, in nsISupports closure ); Parameters charset The detected charset. closure The closure returned by requestCharset(). requestCharset() Called to resolve the charset that should be used for parsing the document being loaded from aC...
...sICharsetResolver wants to be notified of the final resolved charset when one is available, it can set aWantCharset to true. If this is done, the caller of requestCharset is responsible for calling notifyResolvedCharset() and passing it the final resolved charset and the closure that requestCharset set. ACString requestCharset( in nsIWebNavigation aWebNavigation, in nsIChannel aChannel, out
boolean aWantCharset, out nsISupports aClosure ); Parameters aWebNavigation The nsIWebNavigation the document is being loaded in. May be null. aChannel The channel the document is coming in from. aWantCharset Gets set to true if notifyResolvedCharset() should be called with the given aClosure object. aClosure A resulting object which should be passed to notifyResolvedCharset() if aWantCharset is set ...
nsIChromeRegistry
Con...
... a "skin" package. dtd For a "locale" package. nsIURI convertChromeURL( in nsIURI aChromeURL ); Parameters aChromeURL The URL that is to be converted. Return value A new nsIURI object containing the loadable URI for the specified chrome URL. Violates the XPCOM interface guidelines wrappersEnabled() Returns whether XPCNativeWrappers are enabled for the specified URI.
boolean wrappersEnabled( in nsIURI aURI ); Parameters aURI The URI for which to determine if XPCNativeWrappers are enabled. Return value true if XPCNativeWrappers are enabled for the specified URI; otherwise false. See also Chrome Registration ...
nsICompositionStringSynthesizer
This means that the clause is not converted. I.e., raw text of user input. ATTR_SELECTEDRAWTEXT 0x03 A clause attribute but thi...
...se information. In other words, commits composition string. If appendClause() and/or setCaret() are not called properly, e.g., sum of aLength of calls of appendClause() is not same as composition string set by setString(), this throws an exception. After a call of this, all stored composition string information is cleared. Therefore, you can reuse the instance for modifying composition string.
boolean dispatchEvent(); Return value If dispatched event's default is prevented, returns true. However, this must always return false since all dispatching DOM events are not cancelable. setCaret() Sets caret position in the composition string set by setString(). This is optional. I.e., you may not call this before dispatchEvent(). void setCaret(in unsigned long aOffset, in unsigned ...
nsICookieManager
Manager.idlScriptable Please add a summary to this article. Last changed in Gecko 1.7 Inherits from: nsISupports This interface is intended to be used as a service. It is implemented by the @mozilla.org/cookiemanager;1 component, but should generally be accessed via Services.cookies Method overview void remove(in AUTF8String aHost, in ACString aName, in AUTF8String aPath, in
boolean aBlocked, in jsval aOriginAttributes); void removeAll(); Attributes Attribute Type Description enumerator nsISimpleEnumerator Called to enumerate through each cookie in the cookie list. The objects enumerated over are of type nsICookie. Read only. Methods remove() This method is called to remove an individual cookie from the cookie list, s...
...ICookie. Read only. Methods remove() This method is called to remove an individual cookie from the cookie list, specified by host, name, and path. If the cookie cannot be found, no exception is thrown. Typically, the arguments to this method will be obtained directly from the desired nsICookie object. void remove( in AUTF8String aHost, in ACString aName, in AUTF8String aPath, in
boolean aBlocked, in jsval aOriginAttributes ); Parameters aHost The host or domain for which the cookie was set. See nsICookieManager2.add() for a description of acceptable host strings. If the target cookie is a domain cookie, a leading dot must be present. aName The name specified in the cookie. aPath The path for which the cookie was set. aBlocked Indicates if cookies from this host sho...
nsICookiePromptService
The nsICookiePromptService interface is to open a dialog to ask to permission to accept the cookie. extensions/cookie/nsICookiePromptService.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports Method overview long cookieDialog(in nsIDOMWindow parent, in nsICookie cookie, in ACString hostname, in long cookiesFromHost, in
boolean changingCookie, out
boolean rememberDecision); Constants Constant Value Description DENY_COOKIE 0 Holds the value for a denying the cookie. ACCEPT_COOKIE 1 Holds the value for accepting the cookie. ACCEPT_SESSION_COOKIE 2 Holds the value for accepting the session cookie. Methods cookieDialog() Opens a dialog that asks for permission to accept a cookie. long cookieDialog( in nsI...
...KIE 0 Holds the value for a denying the cookie. ACCEPT_COOKIE 1 Holds the value for accepting the cookie. ACCEPT_SESSION_COOKIE 2 Holds the value for accepting the session cookie. Methods cookieDialog() Opens a dialog that asks for permission to accept a cookie. long cookieDialog( in nsIDOMWindow parent, in nsICookie cookie, in ACString hostname, in long cookiesFromHost, in
boolean changingCookie, out
boolean rememberDecision ); Parameters parent The parent window for the dialog. cookie The cookie about which permission is being requested. hostname The host that wants to set the cookie, not the domain; this is part of the cookie. cookiesFromHost The number of cookies there are already for this host. changingCookie Are we changing this cookie? rememberDecision Should w...
nsICrashReporter
minidumpPath nsILocalFile Get or set the path on the local system to which minidumps will be written when a crash happens. Exceptions thrown NS_ERROR_NOT_INITIALIZED If crash reporting is not initialized. serverURL nsIURL Get or set the URL to which crash reports will be submitted. Only https and http URLs are allowed, as the submission is ...
...tialized. serverURL nsIURL Get or set the URL to which crash reports will be submitted. Only https and http URLs are allowed, as the submission is handled by OS-native networking libraries. Exceptions thrown NS_ERROR_FAILURE On get if no URL is set. NS_ERROR_INVALID_ARG On set if a non-http(s) URL is assigned. NS_ERROR_NOT_INITIALIZED If crash reporting is not initialized. submitReports
boolean User preference for submitting crash reports. Methods annotateCrashReport() Add some extra data to be submitted with a crash report. void annotateCrashReport( in ACString key, in ACString data ); Parameters key Name of the data to be added. data Data to be added. Exceptions thrown NS_ERROR_INVALID_ARG If key or data contain invalid characters. Invalid characters for key are '=' and '\...
nsICycleCollectorListener
ng at that node; then a call to beginDescriptions(); then for every black node in the cycle collector graph a call to either describeRefcountedObject() or to describeGCedObject(); and then a call to end(). If begin() returns an error none of the other functions will be called. Method overview void begin(); void beginDescriptions(); void describeGCedObject(in unsigned long long aAddress, in
boolean aMarked); void describeRefcountedObject(in unsigned long long aAddress, in unsigned long aKnownEdges, in unsigned long aTotalEdges); void end(); void noteEdge(in unsigned long long aFromAddress, in unsigned long long aToAddress, in string aEdgeName); void noteObject(in unsigned long long aAddress, in string aObjectDescription); Methods begin() void begin(); Parameters None. beginDescr...
...oid end(); void noteEdge(in unsigned long long aFromAddress, in unsigned long long aToAddress, in string aEdgeName); void noteObject(in unsigned long long aAddress, in string aObjectDescription); Methods begin() void begin(); Parameters None. beginDescriptions() void beginDescriptions(); Parameters None. describeGCedObject() void describeGCedObject( in unsigned long long aAddress, in
boolean aMarked ); Parameters aAddress aMarked describeRefcountedObject() void describeRefcountedObject( in unsigned long long aAddress, in unsigned long aKnownEdges, in unsigned long aTotalEdges ); Parameters aAddress aKnownEdges aTotalEdges end() void end(); Parameters None. noteEdge() void noteEdge( in unsigned long long aFromAddress, in unsigned long long aToAddress, in string...
nsIDNSRecord
e This interface represents the result of a DNS lookup. Since a DNS query may return more than one resolved IP address, the record acts like an enumerator, allowing the caller to easily step through the list of IP addresses. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview PRNetAddr getNextAddr(in PRUint16 aPort); Native code only! ACString getNextAddrAsString();
boolean hasMore(); void rewind(); Attributes Attribute Type Description canonicalName ACString for example, www.mozilla.org --> rheet.mozilla.org. Read only. Methods Native code only!getNextAddr This function copies the value of the next IP address into the given PRNetAddr struct and increments the internal address iterator. PRNetAddr getNextAddr( in PRUint16 aPort ); Parameters aPort A ...
...r to initialize the PRNetAddr with. Return value The value of the next IP address. getNextAddrAsString() This function returns the value of the next IP address as a string and increments the internal address iterator. ACString getNextAddrAsString(); Parameters None. Return value The value of the next IP address as a string. hasMore() This method checks if there is another address in the record.
boolean hasMore(); Parameters None. Return value true if there is another address in the record. rewind() This function resets the internal address iterator to the first address in the record. void rewind(); Parameters None. ...
nsIDOMNode
dom/interfaces/core/nsIDOMNode.idlScriptable This interface is the primary datatype for the entire Document Object 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...
...NODE 2 TEXT_NODE 3 CDATA_SECTION_NODE 4 ENTITY_REFERENCE_NODE 5 ENTITY_NODE 6 PROCESSING_INSTRUCTION_NODE 7 COMMENT_NODE 8 DOCUMENT_NODE 9 DOCUMENT_TYPE_NODE 10 DOCUMENT_FRAGMENT_NODE 11 NOTATION_NODE 12 Methods appendChild() nsIDOMNode appendChild( in nsIDOMNode newChild ); Parameters newChild Return value cloneNode() nsIDOMNode 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 DOMSt...
nsIDOMOfflineResourceList
ng 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. mozLength unsig...
... 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. 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...
nsIDOMOrientationEvent
dows, 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 from -1 to 1, where 0 means ...
...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 Y axis. z The amount of ti...
nsIDOMProgressEvent
ecko 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 long The number of ...
... 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 created event can be ca...
nsIDOMStorageEventObsolete
ceived, 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 only. Methods...
...ValueArg, 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 only. Methods initStorageEvent() Initializes a storage event. void initStorageEvent( in DOMString typeArg, in
boolean canBubbleArg, in
boolean cancelableArg, in DOMString domainArg ); Parameters typeArg The type argument. 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. See also Storage StorageE...
nsIDictionary
as key/value pairs. Objects can be located and managed by referencing them by key. 66 Introduced Gecko 1.0 Obsolete Gecko 1.9.1 Inherits from: nsISummary Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Note: This interface was removed in Firefox 3.5; use Dict.jsm instead. See bug 668424 for further information. ...
... Return value true if present, false if absent. getKeys() Retrieve all keys in the dictionary. void getKeys( out PRUint32 count, [retval, array, size_is(count)] out string keys ); Return value Array of all keys, unsorted. getValue() Find the value indicated by the key. ...
nsIDocumentLoader
documentChannel nsIChannel Read only. loadGroup nsILoadGroup Read only. Methods clearParentDocLoader() Obsolete since Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) ...
...Return value stop() void stop(); Parameters None. ...
nsIEditorDocShell
docshell/base/nsIEditorDocShell.idlScriptable Provides a way to get an editor from a specific frame in a docShell hierarchy. It is intended to be only used internally. Inherits from: nsISupports Last changed in Gecko 1.7 Use nsIEditingSession.makeWindowEditable() and nsIEditingSession.getEditorForWindow() from out side. Method overview void makeEditable(in
boolean inWaitForUriLoad); Attributes Attribute Type Description editable
boolean This docShell is editable. Read only. editor nsIEditor Gets or sets the editor for the content document. hasEditingSession
boolean This docShell has an editing session. Read only. Methods makeEditable() Make this docShell editable, setting a flag that causes an editor to get created, either immediately, or after a url has been loa...
... Description editable
boolean This docShell is editable. Read only. editor nsIEditor Gets or sets the editor for the content document. hasEditingSession
boolean This docShell has an editing session. Read only. Methods makeEditable() Make this docShell editable, setting a flag that causes an editor to get created, either immediately, or after a url has been loaded. void makeEditable( in
boolean inWaitForUriLoad ); Parameters inWaitForUriLoad true to wait for a URI before creating the editor. ...
nsIEnvironment
rrent process environment. Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/process/environment;1 as a service: var env = Components.classes["@mozilla.org/process/environment;1"]. getService(Components.interfaces.nsIEnvironment); Method overview void set(in AString aName, in AString aValue); AString get(in AString aName);
boolean exists(in AString aName); Methods set() Set the value of an environment variable. void set( in AString aName, in AString aValue ); Parameters aName The variable name to set. aValue The value to set. get() Get the value of an environment variable. AString get( in AString aName ); Parameters aName the variable name to retrieve. Return value Returns the...
...t. Note: * For Unix/Linux platforms we follow the Unix definition: An environment variable exists when getenv() returns a non-NULL value. An environment variable does not exist when getenv() returns NULL. For non-Unix/Linux platforms we have to fall back to a "portable" definition (which is incorrect for Unix/Linux!!!!) which simply checks whether the string returned by Get() is empty or not.
boolean exists( in AString aName ); Parameters aName The variable name to probe. Return value If the variable has been set, the value returned is PR_TRUE. If the variable was not defined in the environment PR_FALSE will be returned. Examples Windows This example gets the path to the Porgram Files directory on Windows. Credit to morat from mozillazine. var nsIEnvironment = Components.class...
nsIEventTarget
nts. Events may be sent to this target from any thread by calling the dispatch method. Implement this interface in order to support receiving events from other threads. 1.0 66 Introduced Gecko 1.6 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void dispatch(in nsIRunnable event, in unsigned long flags);
boolean isOnCurrentThread(); void postEvent(in PLEventPtr aEvent); Native code only! Obsolete since Gecko 1.9 Constants Dispatch flags Constant Value Description DISPATCH_NORMAL 0 This flag specifies the default mode of event dispatch, whereby the event is simply queued for later processing. When this flag is specified, disp...
...s The dispatch flags modifying the event. Exceptions thrown NS_ERROR_UNEXPECTED Indicates that the thread is shutting down and has finished processing events, so this event would never run and has not been dispatched. NS_ERROR_INVALID_ARG Indicates that event is null. isOnCurrentThread() Check to see if this event target is associated with the current thread.
boolean isOnCurrentThread(); Parameters None. Return value Returns true if events dispatched to this event target will run on the current thread (that is, the thread calling this method). If events dispatched to this target will be processed on another thread, returns false. Native code only!postEvent Obsolete since Gecko 1.9 (Firefox 3)This feature is obsolete. Although it may still work in some brow...
nsIFeedProgressListener
If the document is a standalone item or entry, the HandleFeedAtFirstEntry() method will not already have been called, and the received nsIFeedEntry will have a null parent value. void handleEntry( in nsIFeedEntry entry, in nsIFeedResult result ); Parameters entry Pointer to an nsIFeedEntry containing in...
...l feed rather than some other sort of document. void handleStartFeed( in nsIFeedResult result ); Parameters result An nsIFeedResult describing the current state of the feed at the moment parsing begins. reportError() Called by the feed processor when a fatal XML parsing error occurs, or if the document isn't a feed. void reportError( in AString errorText, in long lineNumber, in
boolean bozo ); Parameters errorText A short description of the error. lineNumber The line on which the error occurred. bozo The bozo bit will be set if the error was due to a fatal error. See also nsIFeedResultListener Interwiki lin ...
nsIFileView
w so that it can be passed as a tree view. Implemented by: @mozilla.org/filepicker/fileview;1. To create an instance, use: var fileView = Components.classes["@mozilla.org/filepicker/fileview;1"] .createInstance(Components.interfaces.nsIFileView); Method overview void setDirectory(in nsIFile directory); void setFilter(in AString filterString); void sort(in short sortType, in
boolean reverseSort); Attributes Attribute Type Description reverseSort
boolean If true results will be sorted in ascending order. Read only. selectedFiles nsIArray An nsIArray of selected files, which contains nsIArray instances. Read only. showHiddenFiles
boolean If true hidden files will be shown. showOnlyDirectories
boolean If true only directory entries will be returned. sortType sho...
.... void setDirectory( in nsIFile directory ); Parameters directory The directory to be browsed. setFilter() Set the filter to be applied to the file list, for example "*.jpg" would only return jpg files. void setFilter( in AString filterString ); Parameters filterString The filter to be applied to the file list. sort() Set the method used for sorting. void sort( in short sortType, in
boolean reverseSort ); Parameters sortType One of the sort* constants. reverseSort true, results will be sorted in ascending order. Example <?xml version="1.0" ?> <?xml-stylesheet href="chrome://global/skin/" type="text/css" ?> <window id="test" title="Test" width="640" height="480" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <tree flex="1" id="ftree"> <treecols> ...
nsIFrameMessageManager
Obsolete Gecko 17.0 Inherits from: nsISupports Last changed in Gecko 17.0 (Firefox 17.0 / Thunderbird 17.0 / SeaMonkey 2.14) This interface is obsolete and was removed in Firefox 17. You should use nsIMessageListenerManager or nsIMessageSender instead. Method overview void addMessageListener(in AString aMessage, in nsIFrameMessageListener aListener, [optional] in
boolean listenWhenClosed); void removeMessageListener(in AString aMessage, in nsIFrameMessageListener aListener); void sendAsyncMessage(in AString aMessage, in AString json); Methods addMessageListener() Adds a message listener to the local frame. This listener will receive messages sent from the remote frame. void addMessageListener( in AString aMessage, in nsIFrameMessag...
...emoveMessageListener(in AString aMessage, in nsIFrameMessageListener aListener); void sendAsyncMessage(in AString aMessage, in AString json); Methods addMessageListener() Adds a message listener to the local frame. This listener will receive messages sent from the remote frame. void addMessageListener( in AString aMessage, in nsIFrameMessageListener aListener [optional in
boolean listenWhenClosed ); Parameters aMessage The name of the message for which to add a listener. aListener An object implementing nsIFrameMessageListener whose receiveMessage method will be called when the message is received. listenWhenClosed Default is false. Set to oo if you want to receive messages during the short period after a frame has been removed from the DOM and before its frame ...
nsIGlobalHistory3
0 66 Introduced Gecko 1.8 Obsolete Gecko 9.0 Inherits from: nsIGlobalHistory2 Last changed in Gecko 1.9 (Firefox 3) This interface was originally created as part of nsIGlobalHistory2, but was split off during the transition to Places. Method overview void addDocumentRedirect(in nsIChannel aOldChannel, in nsIChannel aNewChannel, in PRInt32 aFlags, in
boolean aTopLevel); unsigned long getURIGeckoFlags(in nsIURI aURI); void setURIGeckoFlags(in nsIURI aURI, in unsigned long aFlags); Methods addDocumentRedirect() Notifies the history system that the page loading via aOldChannel redirected to aNewChannel. Implementations should generally add the URI for aOldChannel to history for link coloring, but are advised no...
...irect(). Implementors who wish to implement this interface but rely on nsIGlobalHistory2.addURI() for redirect processing may throw NS_ERROR_NOT_IMPLEMENTED from this method. If they do so, then callers must call nsIGlobalHistory2.addURI() upon getting the NS_ERROR_NOT_IMPLEMENTED result. void addDocumentRedirect( in nsIChannel aOldChannel, in nsIChannel aNewChannel, in PRInt32 aFlags, in
boolean aTopLevel ); Parameters aOldChannel aNewChannel aFlags Flags to add. These are defined by the history that is implementing this interface. aTopLevel Whether the URI is loaded in a top-level window. If false, the load is in a subframe. getURIGeckoFlags() Get the Gecko flags for this URI. These flags are used by Gecko as hints to optimi...
nsIInputStream
ote: Blocking input streams are often read on a background thread to avoid locking up the main application thread. For this reason, it is generally the case that a blocking input stream should be implemented using thread-safe AddRef and Release. Method overview unsigned long available();Deprecated since Gecko 17.0 unsigned long long available(); void close();
boolean isNonBlocking(); unsigned long read(in charPtr aBuf, in unsigned long aCount); Native code only! unsigned long readSegments(in nsWriteSegmentFun aWriter, in voidPtr aClosure, in unsigned long aCount); Native code only! Methods available() Determine number of bytes available in the stream. In addition to the number of bytes available in the stream, this method also info...
...ror> If the stream is closed due to some error condition. NS_BASE_STREAM_CLOSED If the stream is closed normally. close() Close the stream. This method causes subsequent calls to read() and readSegments() to return 0 bytes read to indicate end-of-file. Note: The close method may be called more than once, but subsequent calls are ignored. void close(); Parameters None. isNonBlocking()
boolean isNonBlocking(); Parameters None. Return value true if stream is non-blocking. Native code only!read This method copies data from the stream into a buffer. unsigned long read( in charPtr aBuf, in unsigned long aCount ); Parameters aBuf The buffer into which the data from the stream is copied. aCount The size of the buffer, or the maximum number of bytes to copy from the stream...
nsIJSID
[contract] Components.interfacesById[uuid] Components.classesById[cid] The first two cases create a named JSID while the last two cases create an unnamed JSID. An unnamed JSID also results when you implement a function that is passed an nsIIDRef parameter, such as QueryInterface(). Note that for these cases of JSID the specified class or interface must exist and be scriptable. Method overview
boolean equals(in nsIJSID other); const nsID* getID(); Violates the XPCOM interface guidelines void initialize(in string idString); string toString(); Attributes Attribute Type Description id nsIDPtr Read only. Native code only! Obsolete since Gecko 1.9 The internal nsID. name string Read only. The name of the JSID, if it was set. number string Read only. The string representation of t...
... const nsID* getID(); Violates the XPCOM interface guidelines void initialize(in string idString); string toString(); Attributes Attribute Type Description id nsIDPtr Read only. Native code only! Obsolete since Gecko 1.9 The internal nsID. name string Read only. The name of the JSID, if it was set. number string Read only. The string representation of the internal nsID. valid
boolean Read only. Returns true if the JSID has been initialised. Methods equals() This method determines if this nsIJSID has the same nsID as another nsIJSID.
boolean equals( in nsIJSID other ); Parameters other The other nsIJSID to compare to. Return value true if the nsIJSID's are valid and have the same nsID, otherwise false. Violates the XPCOM interface guidelines getID() const nsID* ...
nsIJSON
jsval decodeToJSVal(in AString str, in JSContext cx); Native code only! JSObject decodeFromStream(in nsIInputStream stream, in long contentLength); AString encode(in JSObject value); Obsolete since Gecko 7.0 AString encodeFromJSVal(in Jsvaljsval value, in JSContext cx); Native code only! void encodeToStream(in nsIOutputStream stream, in string charset, in
boolean writeBOM, in JSObject value); jsval legacyDecode(in AString str); Deprecated since Gecko 2.0 jsval legacyDecodeFromStream(in AString str); Deprecated since Gecko 2.0 jsval legacyDecodeToJSVal(in AString str, in JSContext cx); Native code only! Deprecated since Gecko 2.0 Methods decode() Obsolete since Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 ...
...deFromJSVal( in jsval value, in JSContext cx ); Parameters value A pointer to the jsval to encode. cx The JavaScript runtime context to use to encode the value. Return value A JSON string representing the value. encodeToStream() Encodes a JavaScript object into JSON format, writing it to a stream. void encodeToStream( in nsIOutputStream stream, in string charset, in
boolean writeBOM in JSObject value ); Parameters stream The nsIOutputStream to which to write the JSON string. charset The string encoding to use. Only the five Unicode encodings "UTF-8", "UTF-16LE", "UTF-16BE", "UTF-32LE" and "UTF-32BE" are supported. writeBOM Specify true if you wish to write a byte-order mark (BOM) into the stream, otherwise specify false. value The JavaScript object t...
nsIJumpListItem
pports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Note: To consumers: it's reasonable to expect we'll need support for other types of jump list items (an audio file, an email message, etc.). To add types, create the specific interface here, add an implementation class to WinJumpListItem, and add support to addListBuild and removed items processing. Method overview
boolean equals(in nsIJumpListItem item); Attributes Attribute Type Description type short Retrieves the jump list item type. Read only. Constants Constant Value Description JUMPLIST_ITEM_EMPTY 0 Empty list item. JUMPLIST_ITEM_SEPARATOR 1 Separator. JUMPLIST_ITEM_LINK 2 Web link item. JUMPLIST_ITEM_SHORTCUT 3 Application shortcut. Methods equals() Compare this item to another. Com...
...nts Constant Value Description JUMPLIST_ITEM_EMPTY 0 Empty list item. JUMPLIST_ITEM_SEPARATOR 1 Separator. JUMPLIST_ITEM_LINK 2 Web link item. JUMPLIST_ITEM_SHORTCUT 3 Application shortcut. Methods equals() Compare this item to another. Compares the type and other properties specific to this item's type: separator - type link - type, uri, title shortcut - type, handler application
boolean equals( in nsIJumpListItem item ); Parameters item Another nsIJumpListItem to compare to. Return value true if items are the same, otherwise false ...
nsILivemarkService
long long cr...
...alid site URI, null will be returned. Exceptions thrown NS_ERROR_INVALID_ARG If the folder ID isn't known or identifies a folder that isn't a livemark container. NS_ERROR_MALFORMED_URI If the site URI annotation has somehow been corrupted (and can't be turned into an nsIURI) isLivemark() This method determines whether the folder with the given folder ID identifies a livemark container.
boolean isLivemark( in long long folder ); Parameters folder A folder ID. Return value true if the given folder is a livemark folder, otherwise it returns false. Exceptions thrown NS_ERROR_INVALID_ARG If the folder ID isn't known. reloadAllLivemarks() This method reloads all livemark subscriptions, whether or not they have expired. void reloadAllLivemarks(); Parameters None. reloa...
nsIMacDockSupport
d in Gecko 11.0 (Firefox 11.0 / Thunderbird 11.0 / SeaMonkey 2.8) Implemented by: @mozilla.org/cookie-monster;1. To create an instance, use: var dock = Components.classes["@mozilla.org/widget/macdocksupport;1"] .getService(Components.interfaces.nsIMacDockSupport); See Working with the Mac OS X Dock for details and examples. Method summary void activateApplication(in
boolean aIgnoreOtherApplications); Attributes Attribute Type Description badgeText AString Text to display in a badge on the application's dock icon. This can be used, for example, to display the number of unread messages in an email client. dockMenu nsIStandaloneMenu The menu to display when the user right-clicks on the application's icon in the dock. ...
...nsIStandaloneMenu The menu to display when the user right-clicks on the application's icon in the dock. Methods activateApplication() Activates the application, making it the frontmost application. The application should call this to activate itself when one of its dock menu items are selected, since doing so does not automatically activate the application. void activateApplication( in
boolean aIgnoreOtherApplications ); Parameters aIgnoreOtherApplications If true, the application is activated regardless of the state of other applications. If false, the application is only activated if other applications are not currently active. About dockMenu By default Firefox adds two menu items to the dock menu. The menu items are "New Window" and "New Private Window". If permanent priv...
nsIMenuBoxObject
layout/xul/base/public/nsIMenuBoxObject.idlScriptable Represents the box object for a XUL menu. Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) To get access to the box object for a given menu, use code like this: var boxObject = xulMenu.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject); Method overview
boolean handleKeyPress(in nsIDOMKeyEvent keyEvent); void openMenu(in
boolean openFlag); Attributes Attribute Type Description activeChild nsIDOMElement The currently active menu or menuitem child of the menu box. openedWithKey
boolean true if the menubar was opened using the keyboard; otherwise false. Note: For Gecko 2.0, the openedWithK...
...t The currently active menu or menuitem child of the menu box. openedWithKey
boolean true if the menubar was opened using the keyboard; otherwise false. Note: For Gecko 2.0, the openedWithKey attribute exists on the nsIMenuBoxObject_MOZILLA_2_0_BRANCH interface. Subsequent Gecko versions will have the attribute on the nsIMenuBoxObject interface. Methods handleKeyPress()
boolean handleKeyPress( in nsIDOMKeyEvent keyEvent ); Parameters keyEvent The key event to handle for the menu. Return value true if the event was handled, false if not. openMenu() void openMenu( in
boolean openFlag ); Parameters openFlag true to open the menu or false to close it. See also nsIBoxObject menu ...
nsIMessageListenerManager
d by: @mozilla.org/globalmessagemanager;1. ...
...essageName. All listener callbacks for a particular message are invoked when that message is received. The message manager holds a strong reference to listener. If the same listener registers twice for the same message, the second registration is ignored. void addMessageListener(in AString messageName, in nsIMessageListener listener, [optional] in
boolean listenWhenClosed); Parameters messageName A string indicating the name of the message to listen for. listener An nsIMessageListener to invoke when a message is received. See nsIMessageListener for details of the message syntax. listenWhenClosed Specify true to receive messages during the short period after a frame has been removed from the DOM and before its frame script has finished unl...
nsIMimeHeaders
o 1.7 Implemented by: ?????????????????????????????????????. ...
... string extractHeader([const] in string headerName, in
boolean getAllOfThem); void initialize([const] in string allHeaders, in long allHeadersSize); Attributes Attribute Type Description allHeaders string Read only. ...
nsIModule
xpcom/components/nsIModule.idlScriptable This interface must be implemented by each XPCOM component. It is the main entry point by which the system accesses an XPCOM component. ...
...al, iid_is(aIID)] out nsQIResult aResult); void registerSelf(in nsIComponentManager aCompMgr, in nsIFile aLocation, in string aLoaderStr, in string aType); void unregisterSelf(in nsIComponentManager aCompMgr, in nsIFile aLocation, in string aLoaderStr); Methods canUnload() This method may be queried to determine whether or not the component module can be unloaded by XPCOM.
boolean canUnload( in nsIComponentManager aCompMgr ); Parameters aCompMgr The global component manager. Return value Indicates to the caller whether or not the component module can be unloaded. Returning true is not a guarantee that the module will be unloaded. It constitues only willingness of the module to be unloaded. It is very important to ensure that no outstanding references to the mo...
nsIMsgAccountManagerExtension
ount Manager Extensions via the the category manager at start up. Simply add a new Entry with the Contact ID of the component to the "mailnews-accountmanager-extensions" category. //github.com/RealityRipple/UXP/blob/master/mailnews/base/public/nsIMsgAccountManager.idlScriptable Please add a summary to this article. Last changed in Gecko ??? Inherits from: nsISupports Method overview
boolean showPanel(in nsIMsgIncomingServer server); Attributes Attribute Type Description name ACString name of the account manager extension. It has to be unique and defines the file name of the property file and the XUL Page as well as the name of the localized string contained in the property file. This attribute is readonly! chromePackageName ACString chrome package, where the files for the ...
... Page as well as the name of the localized string contained in the property file. This attribute is readonly! chromePackageName ACString chrome package, where the files for the new panel are located. This is usually GUID of the ID of the addons which adds the new Panel. This attribute is readonly! Methods showPanel() Before displaying a panel in the Account Manager this method is triggered.
boolean showPanel( in nsIMsgIncomingServer server ); Parameters server The account for which the panel should be displayed. Return value A true indicates, that the Account Manager can display the panel for the given account, while false prevents the panel to be loaded. See also nsIMsgAccountManager Building an Account Manager Extension ...
nsIMsgCustomColumnHandler
AString getSortStringForRow(in nsIMsgDBHdr aHdr); Parameters aHdr The message's nsIMsgDBHdr. Return value The string value that sorting will be done with. getSortLongForRow() If the column displays a number, this will return the number that the column ...
... Parameters aHdr The message's nsIMsgDBHdr. Return value The string value that sorting will be done with. getSortLongForRow() If the column displays a number, this will return the number that the column should be sorted by. unsigned long getSortLongForRow(in nsIMsgDBHdr aHdr); Parameters aHdr The message's nsIMsgDBHdr. Return value The long value that sorting will be done with. isString()
boolean isString(); Parameters None. Return value true if the column displays a string value. false otherwise. This affects whether getSortStringForRow or getSortLongForRow is used to determine the sort key for the column. It does not affect whether getCellText vs. getImageSrc is used to determine what to display. See Also Extensions:Thunderbird:Creating_a_Custom_Column ...
nsIMsgFilter
ion id if type is Custom attribute ACString customId; customAction // custom action associated with customId // (which must be set prior to reading this attribute) readonly attribute nsIMsgFilterCustomAction customAction; Methods AddTerm() void nsIMsgFilter::AddTerm ( in nsMsgSearchAttribValue attrib, in nsMsgSearchOpValue op, in nsIMsgSearchValue value, in
boolean BooleanAND, in ACString arbitraryHeader ) GetTerm() void nsIMsgFilter::GetTerm ( in long termIndex, in nsMsgSearchAttribValue attrib, in nsMsgSearchOpValue op, in nsIMsgSearchValue value, out
boolean BooleanAND, out ACString arbitraryHeader ) appendTerm() void ns...
...
BooleanAND, out ACString arbitraryHeader ) appendTerm() void nsIMsgFilter::appendTerm (in nsIMsgSearchTerm term) createTerm() nsIMsgSearchTerm nsIMsgFilter::createTerm ( ) MatchHdr() void nsIMsgFilter::MatchHdr ( in nsIMsgDBHdr msgHdr, in nsIMsgFolder folder, in nsIMsgDatabase db, in string headers, in unsigned long headerSize, out
boolean result ) logRuleHit() void nsIMsgFilter::logRuleHit ( in nsIMsgRuleAction aFilterAction, in nsIMsgDBHdr aHeader ) createAction() nsIMsgRuleAction nsIMsgFilter::createAction ( ) getActionAt() nsIMsgRuleAction nsIMsgFilter::getActionAt (in long aIndex) appendAction() void nsIMsgFilter::appendAction (in nsIMsgRuleAction action ) clearActionList() void nsIMsgF...
nsIMsgFilterList
Defined in comm-central/ mailnews/ base/ search/ public/ nsIMsgFilterList.idl Attributes folder attribute nsIMsgFolder nsIMsgFilterList::folder version readonly attribute short nsIMsgFilterList::version arbitraryHeaders readonly attribute ACString nsIMsgFilterList::arbitraryHeaders shouldDownloadAllHeaders readonly attribute
boolean nsIMsgFilterList::shouldDownloadAllHeaders filterCount readonly attribute unsigned long nsIMsgFilterList::filterCount loggingEnabled attribute
boolean nsIMsgFilterList::loggingEnabled defaultFile attribute nsILocalFile nsIMsgFilterList::defaultFile logStream attribute nsIOutputStream nsIMsgFilterList::logStream logURL readonly attribute ACString nsIMsgFilterList::logURL Methods getFilterAt() nsIMsgFilter nsIMsgFilterList::getFilterAt (in unsigned lo...
... writeStrAttr() void nsIMsgFilterList::writeStrAttr ( in nsMsgFilterFileAttribValue attrib, in string value, in nsIOutputStream stream ) writeWStrAttr() void nsIMsgFilterList::writeWStrAttr ( in nsMsgFilterFileAttribValue attrib, in string value, in nsIOutputStream stream ) matchOrChangeFilterTarget()
boolean nsIMsgFilterList::matchOrChangeFilterTarget ( in ACString oldUri, in ACString newUri, in
boolean caseInsensitive ) clearLog() void nsIMsgFilterList::clearLog () ensureLogFile() void nsIMsgFilterList::ensureLogFile () flushLogIfNecessary () void nsIMsgFilterList::flushLogIfNecessary () Const const nsMsgFilterFileAttribValue nsIMsgFilterList::attribNo...
nsINavBookmarkObserver
id onFolderRemoved(in PRInt64 folder, in PRInt64 parent, in PRInt32 index); Obsolete since Gecko 1.9 void onItemAdded(in long long aItemId, in long long aParentId, in long aIndex, in unsigned short aItemType, in nsIURI aURI, in AUTF8String aTitle, in PRTime aDateAdded, in ACString aGUID, in ACString aParentGUID); void onItemChanged(in long long aItemId, in ACString aProperty, in
boolean aIsAnnotationProperty, in AUTF8String aNewValue, in PRTime aLastModified, in unsigned short aItemType, in long long aParentId, in ACString aGUID, in ACString aParentGUID); void onItemMoved(in long long aItemId, in long long aOldParentId, in long aOldIndex, in long long aNewParentId, in long aNewIndex, in unsigned short aItemType, in ACString aGUID, in ACString aOldParentGUID, in ACString...
... added value, in microseconds from the epoch. aGUID The unique ID associated with the item. aParentGUID The unique ID associated with the item's parent. onItemChanged() This method notifies this observer that an item's information has changed. It is called whenever any attributes like "title" are changed. void onItemChanged( in long long aItemId, in ACString aProperty, in
boolean aIsAnnotationProperty, in AUTF8String aNewValue, in PRTime aLastModified, in unsigned short aItemType, in long long aParentId, in ACString aGUID, in ACString aParentGUID ); Parameters aItemId The id of the item that was changed. aProperty The property which changed. If this string is empty, all properties have been deleted. In this situation, you should not attempt t...
nsINavHistoryObserver
void onBeginUpdateBatch(); void onClearHistory(); void onDeleteURI(in nsIURI aURI, in ACString aGUID); void onDeleteVisits(in nsIURI aURI, in PRTime aVisitTime, in ACString aGUID); void onEndUpdateBatch(); void onPageChanged(in nsIURI aURI, in unsigned long aWhat, in AString aValue); void onPageExpired(in nsIURI aURI, in PRTime aVisitTime, in
boolean aWholeEntry); Obsolete since Gecko 2.0 void onTitleChanged(in nsIURI aURI, in AString aPageTitle); void onVisit(in nsIURI aURI, in long long aVisitID, in PRTime aTime, in long long aSessionID, in long long aReferringID, in unsigned long aTransitionType, in ACString aGUID, out unsigned long aAdded); Constants Constant Value Description ATTRIBUTE_FAV...
...es being deleted instead of individual visits, you can simply act only when aWholeEntry is true. It's possible for a history entry to be deleted even though it has no visits if something is out of sync after a bookmark with no visits is deleted; this results in the entire history entry being freed). In such cases, aVisitTime is 0. void onPageExpired( in nsIURI aURI, in PRTime aVisitTime, in
boolean aWholeEntry ); Parameters aURI The URI of the page that expired. aVisitTime The visit time that expired; this may (or may not) be 0 if a bookmark with no visits is deleted. aWholeEntry true if this expiration will result in the entire history entry being deleted from the history store; if false, only the specified visit is being deleted. onTitleChanged() Called whenever...
nsINavHistoryResultObserver
d history system events. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 11.0 (Firefox 11.0 / Thunderbird 11.0 / SeaMonkey 2.8) Note: In Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), this interface replaced the older nsINavHistoryResultViewer interface, which only allowed one client at a time. ...
...t to start or end. The observer can then pause updates or events until the batch is completed, so that it won't handle the large number of updates that are about to be notified. This is especially useful when updating user interfaces, to avoid flicker or continuous selection changes, which may result in performance degradation (for example, if updating a view for each update). void batching( in
boolean aToggleMode ); Parameters aToggleMode Specify true to start batch mode or false to finish the batch. containerClosed() Obsolete since Gecko 11.0 (Firefox 11.0 / Thunderbird 11.0 / SeaMonkey 2.8) Called when a container node's state changes from opened to closed. Note: This method was deprecated in Gecko 2.0 and removed in Gecko 11.0 (Firefox 11.0 / Thunderbird 11.0 / ...
nsINavHistoryResultViewObserver
toolkit/components/places/public/nsINavHistoryService.idlScriptable This interface is used by clients of the history results to define domain-specific handling of specific nsITreeView methods that the history result doesn't implement. ...
...indicated row. Methods canDrop() Implement this method to report whether or not a drop is permitted onto the specified location. To provide behavior similar to the folder pane in Thunderbird, where drops are only permitted on items themselves instead of on the pane as a whole, always return false when the orientation isn't DROP_ON. Warning: Do not change the content of the observer list.
boolean canDrop( in long index, in long orientation ); Parameters index The item over which the drag is currently located. orientation Whether the drag target is before, after, or on the indicated row. Return value Return true if the drop is permitted or false if it isn't. onDrop() Called when the user drops something onto the view being observed. void onDrop( in long row, ...
nsINetworkLinkService
The link is only up when network connections can be established. For example, the link is down during DHCP configuration (unless there is another usable interface already configured). If the link status is not currently known, we generally assume that it is up. Read only. linkStatusKnown ...
... This is set to true when the system is believed to have a usable network connection. The link is only up when network connections can be established. For example, the link is down during DHCP configuration (unless there is another usable interface already configured). If the link status is not currently known, we generally assume that it is up. Read only. linkStatusKnown
boolean This is set to true when we believe that isLinkUp is accurate. Read only. linkType unsigned long The type of network connection, one of the LINK_TYPE_* constants. Read only. Note: As of Gecko 8.0, all Operating Systems currently return LINK_TYPE_UNKNOWN. Android support was backed out due to perceived security concerns, see bug 691054. As of Gecko 28.0 Android sup...
nsIObserverService
ce implements this interface to provide global notifications for a variety of subsystems. Implemented by @mozilla.org/observer-service;1 as a service: var observerService = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); Method overview void addObserver( in nsIObserver anObserver, in string aTopic, in
boolean ownsWeak); nsISimpleEnumerator enumerateObservers( in string aTopic ); void notifyObservers( in nsISupports aSubject, in string aTopic, in wstring someData ); void removeObserver( in nsIObserver anObserver, in string aTopic ); Methods addObserver() Registers a given listener for a notifications regarding the specified topic. See nsIObserver for a JavaScript exa...
...; void notifyObservers( in nsISupports aSubject, in string aTopic, in wstring someData ); void removeObserver( in nsIObserver anObserver, in string aTopic ); Methods addObserver() Registers a given listener for a notifications regarding the specified topic. See nsIObserver for a JavaScript example. void addObserver( in nsIObserver anObserver, in string aTopic, in
boolean ownsWeak ); Parameters anObserver The nsIObserver object which will receive notifications. aTopic The notification topic or subject. ownsWeak If set to false, the nsIObserverService will hold a strong reference to anObserver. If set to true and anObserver supports the nsISupportsWeakReference interface, a weak reference will be held. Otherwise an error will be returned. (In most cases, ...
nsIOutputStream
am, on the other hand, must not block the calling thread of execution. Note: Blocking output streams are often written to on a background thread to avoid locking up the main application thread. For this reason, it is generally the case that a blocking output stream should be implemented using thread-safe AddRef and Release. Method overview void close(); void flush();
boolean isNonBlocking(); unsigned long write(in string aBuf, in unsigned long aCount); unsigned long writeFrom(in nsIInputStream aFromStream, in unsigned long aCount); unsigned long writeSegments(in nsReadSegmentFun aReader, in voidPtr aClosure, in unsigned long aCount); Native code only! Methods close() Close the stream. Forces the output stream to flush() any buffere...
...hrown if isNonBlocking() returns true. isNonBlocking() Note: Writing to a blocking output stream will block the calling thread until all given data can be consumed by the stream. Note: A non-blocking output stream may implement nsIAsyncOutputStream to provide consumers with a way to wait for the stream to accept more data once its write() method is unable to accept any data without blocking.
boolean isNonBlocking(); Parameters None. Return value true if stream is non-blocking. Exceptions thrown NS_BASE_STREAM_WOULD_BLOCK A non-blocking stream may throw this exception when written to if space for the data is not immediately available. write() This method copies data from a buffer into the stream. Note: Though this method is scriptable, JavaScript code must only pass an ASCII cha...
nsIParserUtils
SanitizerAllowStyle (1 << 1) Flag for sanitizer: Allow <style> elements and style attributes (with contents s...
...the same string for the return value.) flags Conversion option flags defined in nsIDocumentEncoder. wrapCol Number of characters per line; 0 for no auto-wrapping. Return value The plain text conversion of the HTML specified in src. parseFragment() Parses markup into a sanitized document fragment. nsIDOMDocumentFragment parseFragment( in AString fragment, in unsigned long flags, in
boolean isXML, in nsIURI baseURI, in nsIDOMElement element ); Parameters fragment The input markup. flags Sanitization option flags defined above. isXML true if |fragment| is XML and false if HTML. baseURI The base URL for this fragment. element The context node for the fragment parsing algorithm. Return value An nsIDOMDocumentFragment object for the resulting sanitized document frag...
nsIPrefBranch2
On preference changes, the following arguments will be passed to nsIObserver.observe(): aSubject - The nsIPrefBranch object (this). aTopic - The string defined by NS_PREFBRANCH_PREFCHANGE_TOPIC_ID aData - The name of the preference which has changed, relative to the "root" of the aSubject branch. ...
...ve to the "root" of the aSubject branch. aSubject.get*Pref(aData) will get the new value of the modified preference. For example, if your observer is registered with addObserver("bar.", ...) on a branch with root "foo.", modifying the preference "foo.bar.baz" will trigger the observer, and aData parameter will be "bar.baz". void addObserver( in string aDomain, in nsIObserver aObserver, in
boolean aHoldWeak ); Parameters aDomain The preference on which to listen for changes. This can be the name of an entire branch to observe. For example holding the "root" prefbranch and calling addObserver("foo.bar.", ...) will observe changes to foo.bar.baz and foo.bar.bzip. aObserver The object to be notified if the preference changes. aHoldWeak true holds a weak reference to aObserver. The o...
nsIPrivateBrowsingService
lasses["@mozilla.org/privatebrowsing;1"] .getService(Components.interfaces.nsIPrivateBrowsingService); C++ callers should use the contract ID @mozilla.org/privatebrowsing-wrapper;1 instead. ...
... void removeDataFromDomain(in AUTF8String aDomain); Attributes Attribute Type Description autoStarted
boolean Indicates whether or not private browsing was started automatically at application launch time. This is only ever true if privateBrowsingEnabled is also true. Read only. lastChangedByCommandLine
boolean Indicates whether or not the last private browsing mode transition was performed on the command line (using either the -private or -private-toggle switches) rather than the user interface. Read only. privateBrowsingEnabled
boolean Indicates whether or not private browsing mode is currently enabled. You may also turn private browsing mode on and off by setting th...
nsIProcess2
d its method added to nsIProcess. Implemented by: @mozilla.org/process/util;1. ...
...This array must have count entries. count The number of arguments passed in the args array. ...
nsIProcessScriptLoader
IDL file: mozilla-central/source/dom/base/nsIMessageManager.idl Inherits from: nsISupports This interface is used by parent process message managers to load scripts into a child process. The scripts run only once per process. The global object for process scripts is a ContentProcessMessageManager. Methods void loadProcessScript(in AString aURL, in
boolean aAllowDelayedLoad) void removeDelayedProcessScript(in AString aURL); jsval getDelayedProcessScripts(); loadProcessScript() Load a script in the child process. Process scripts are loaded as soon as loadProcessScript() is called. If this function is called on a ChromeMessageBroadcaster, : it will load the process script into all child processes. if aAllowDelayedLo...
...in this situation, your process script won't be loaded. For example: let ppmm = Services.ppmm.getChildAt(1); ppmm.loadProcessScript('data:,dump("foo\n");', true); Parameters Name Type Description aURL String URL for the script to load. aURL must be the absolute URL. data: URLs are also supported. For example data:,dump("foo\n"); aAllowDelayedLoad
Boolean If this flag is false, the process script will only be loaded into child processes that are already running at the time of the call. If this flag is true, the process script will be loaded into any new child processes created after the loadProcessScript() call, until removeDelayedProcessScript() is called for that script. If you are calling loadProcessScript() on a ChromeMessage...
nsIProperties
ozilla.org/file/directory_service;1. To get an instance, use: var properties = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties); Method overview void get(in string prop, in nsIIDRef iid, [iid_is(iid),retval] out nsQIResult result); void getKeys(out PRUint32 count, [array, size_is(count), retval] out string keys);
boolean has(in string prop); void set(in string prop, in nsISupports value); void undefine(in string prop); Methods get() Gets the XPCOM object associated with a particular name. void get( in string prop, in nsIIDRef iid, [iid_is(iid),retval] out nsQIResult result ); Parameters prop The property name. iid The desired interface. result The resulting object instance. Exceptions thrown NS_E...
...ted interface. getKeys() Returns an array of property names. nsMemory.h defines the macro NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY, which can be used to free aKeys when it is no longer needed. void getKeys( out PRUint32 count, [array, size_is(count), retval] out string keys ); Parameters count The length of the result array. keys The resulting array of keys. has() Tests if a property exists.
boolean has( in string prop ); Parameters prop The property name. Return value true if the property exists, false if the property does not exist. set() Sets the XPCOM object associated with a particular name. void set( in string prop, in nsISupports value ); Parameters prop The property name. value The XPCOM object value to associate with prop. undefine() Undefines a property. void undefine( ...
nsIPropertyBag2
terface extends nsIPropertyBag with some methods for getting properties in specific formats. ...
...e as a String. Note: Accessing a property of a different type may attempt conversion to this type. getPropertyAsAUTF8String() AUTF8String getPropertyAsAUTF8String( in AString prop ); Parameters prop Property to return the value of. Return value The property value as an AUTF8String. Note: Accessing a property of a different type may attempt conversion to this type. getPropertyAsBool()
boolean getPropertyAsBool( in AString prop ); Parameters prop Property to return the value of. Return value The property value as a
Boolean. Note: Accessing a property of a different type may attempt conversion to this type. getPropertyAsDouble() double getPropertyAsDouble( in AString prop ); Parameters prop Property to return the value of. Return value The property value as a D...
nsIProtocolHandler
netwerk/base/nsIProtocolHandler.idlScriptable This interface is used to implement protocol handlers. If you wish to create a new protocol handler, you need to implement this interface. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview
boolean allowPort(in long port, in string scheme); nsIChannel newChannel(in nsIURI aURI); nsIURI newURI(in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); Attributes Attribute Type Description defaultPort long The default port is the port the protocol uses by default. If the protocol doesn't need a port (for example, the "about" protocol), this attribute is -1. Read only. protocolFlags unsign...
..._PROXY is not set. Methods allowPort() Lets a protocol override blacklisted ports. This method is called when there's an attempt to connect to a port that is blacklisted. For example, for most protocols, port 25 (Simple Mail Transfer Protocol) is banned. When a URI containing this port number is encountered, this method is called to ask if the protocol handler wants to override the ban.
boolean allowPort( in long port, in string scheme ); Parameters port The port for which an override is being requested. scheme The scheme for which an override is being requested. Return value Return true if the override is approved; otherwise, return false. newChannel() Constructs a new channel from the given URI for this protocol handler. nsIChannel newChannel( in nsIURI aURI ); P...
nsIRequest
ed by the request initiator to control the request. Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) For example nsIChannel typically passes itself as the nsIRequest argument to the nsIStreamListener on each onStartRequest, onDataAvaliable, and onStopRequest invocation. Method overview void cancel(in nsresult aStatus);
boolean isPending(); void resume(); void suspend(); Attributes Attribute Type Description loadFlags nsLoadFlags The load flags of this request. Bits 0-15 are reserved. When added to a load group, this request's load flags are merged with the load flags of the load group. loadGroup nsILoadGroup The load group of this request. ...
...tstanding asynchronous event that will make the request no longer be pending. Requests do not necessarily start out pending; in some cases, requests have to be explicitly initiated (for example nsIChannel implementations are only pending once asyncOpen returns successfully). Requests can become pending multiple times during their lifetime. Note: Suspended requests are still considered pending.
boolean isPending(); Parameters None. Return value true if the request has yet to reach completion. resume() Resumes the current request. This may have the effect of re-opening any underlying transport and will resume the delivery of data to any open streams. void resume(); Parameters None. suspend() Suspends the current request. This may have the effect of closing any underlying transport (...
nsISHistory
it and set it in the nsIWebNavigation object. Implemented by: @mozilla.org/browser/shistory;1. To create an instance, use: var sHistory = Components.classes["@mozilla.org/browser/shistory;1"] .createInstance(Components.interfaces.nsISHistory); Method overview void addSHistoryListener(in nsISHistoryListener aListener); nsISHEntry getEntryAtIndex(in long index, in
boolean modifyIndex); void PurgeHistory(in long numEntries); void reloadCurrentEntry(); void removeSHistoryListener(in nsISHistoryListener aListener); Attributes Attribute Type Description count long The number of toplevel documents currently available in session history. Read only. index long The index of the current document...
... Note: A listener object must implement nsISHistoryListener and nsSupportsWeakReference. void addSHistoryListener( in nsISHistoryListener aListener ); Parameters aListener Listener object to be notified for all page loads that initiate in session history. getEntryAtIndex() Called to obtain handle to the history entry at a given index. nsISHEntry getEntryAtIndex( in long index, in
boolean modifyIndex ); Parameters index The index value whose entry is requested. modifyIndex A
boolean flag that indicates if the current index of session history should be modified to the parameter index. Exceptions thrown NS_OK history entry for the index is obtained successfully. NS_ERROR_FAILURE Error in obtaining history entry for the given index. PurgeHistory() Called to purge o...
nsISelection2
Read only. Methods GetRangesForInterval() Return array of ranges intersecting with the given DOM interval. void GetRangesForInterval( in nsIDOMNode begin...
...ers represent the range to compare against the selection. allowAdjacent Specifies whether the returned ranges are allowed to touch the input range rather than merely overlapping it. results Returns the ranges that overlap (or touch) the input range. scrollIntoView() Scrolls a region of the selection, so that it is visible in the scrolled view. void scrollIntoView( in short aRegion, in
boolean aIsSynchronous, in short aVPercent, in short aHPercent ); Parameters aRegion The region inside the selection to scroll into view (see selection region constants defined in nsISelectionController). aIsSynchronous When true, scrolls the selection into view before returning. If false, posts a request which is processed at some point after the method returns. aVPercent How to align the ...
nsIServerSocket
ease add a summary to this article. Last changed in Gecko 1.6 Inherits from: nsISupports Implemented by: @mozilla.org/network/server-socket;1. To create an instance, use: var serverSocket = Components.classes["@mozilla.org/network/server-socket;1"] .createInstance(Components.interfaces.nsIServerSocket); Method overview void init(in long aPort, in
boolean aLoopbackOnly, in long aBackLog); void initWithAddress([const] in PRNetAddrPtr aAddr, in long aBackLog);Native code only! void close(); void asyncListen(in nsIServerSocketListener aListener); PRNetAddr getAddress();Native code only! Attributes Attribute Type Description port long Returns the port of this server socket. Read...
...d be zeroed out to indicate a server socket bound to all network devices. Therefore, this method cannot be used to determine the IP address of the local system. See nsIDNSService.myHostName() if this is what you need. PRNetAddr getAddress(); Parameters None. Return value The network address to which the socket is bound. init() Initializes a server socket. void init( in long aPort, in
boolean aLoopbackOnly, in long aBackLog ); Parameters aPort The port of the server socket. Pass -1 to indicate no preference, and a port will be selected automatically. aLoopbackOnly If true, the server socket will only respond to connections on the local loopback interface. Otherwise, it will accept connections from any interface. To specify a particular network interface, use initWithAddress(...
nsISessionStartup
66 Introduced Gecko 1.8 Inherits from: nsISupports Last changed in Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5) Implemented by: @mozilla.org/browser/sessionstartup;1. To use this service, use: var sessionStartup = Components.classes["@mozilla.org/browser/sessionstartup;1"] .getService(Components.interfaces.nsISessionStartup); Method overview
boolean doRestore(); Attributes Attribute Type Description sessionType unsigned long The type of session being restored; this will be one of the Session type constants. Read only. state jsval The session state, as a JavaScript object. Read only. Note: Prior to Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5), this was a string. It was changed in order to improve performance, which wa...
...d. It will either be restored or about:sessionrestore will be displayed. RESUME_SESSION 2 The previous session should be restored at startup. DEFER_SESSION 3 The previous session is viable but shouldn't be restored without explicit action (with the exception of app tabs, which are always restored in this case). Methods doRestore() Determines whether or not there is a session to restore.
boolean doRestore(); Parameters None. Return value true if the session should be restored, otherwise false. ...
nsISessionStore
t(in nsIDOMWindow aWindow); void persistTabAttribute(in AString aName); void restoreLastSession(); void setBrowserState(in AString aState); void setTabState(in nsIDOMNode aTab, in AString aState); void setTabValue(in nsIDOMNode aTab, in AString aKey, in AString aStringValue); void setWindowState(in nsIDOMWindow aWindow, in AString aState, in
boolean aOverwrite); void setWindowValue(in nsIDOMWindow aWindow, in AString aKey, in AString aStringValue); nsIDOMNode undoCloseTab(in nsIDOMWindow aWindow, in unsigned long aIndex); nsIDOMWindow undoCloseWindow(in unsigned long aIndex); Attributes Attribute Type Description canRestoreLastSession
boolean Is it possible to restore the prev...
...ers aTab The tab for which the value is to be set. aKey The key whose value is to be set. aStringValue A string to set as the value for the key aKey.To assign more complex data (ie JavaScript objects) serialize them using JSON.stringify. setWindowState() Sets the state of a single window to a given stored state. void setWindowState( in nsIDOMWindow aWindow, in AString aState, in
boolean aOverwrite ); Parameters aWindow The nsIDOMWindow whose state is to be set to the state indicated by aState. aState The saved state to apply to the specified window. aOverwrite If this parameter is true, all existing tabs are removed and replaced with the tabs in the state aState. If it's false, the tabs in aState are added to the tabs already in the window. setWindowValue() Sets the...
nsISimpleEnumerator
The "next" element is the first element upon the first call. Must be preceded by a call to hasMoreElements() which returns PR_TRUE. ...
...S_ERROR_FAILURE if there are no more elements to enumerate. hasMoreElements() Called to determine whether or not the enumerator has any elements that can be returned via getNext(). This method is generally used to determine whether or not to initiate or continue iteration over the enumerator, though it can be called without subsequent getNext() calls. Does not affect internal state of enumerator.
boolean hasMoreElements(); Parameters None. Return value PR_TRUE if there are remaining elements in the enumerator. PR_FALSE if there are no more elements in the enumerator. Remarks This interface was frozen for Gecko 0.9.6. See bug 154047 for details. From Gecko 2.0 interfaces are no longer frozen. See also Code example of nsISimpleEnumerator ...
nsISmsRequestManager
ong aRequestId, in nsIDOMMozSmsMessage aMessage ); Parameters aRequestId A number representing the id of the request. aMessage An SmsMessage. notifyMarkedMessageRead() Requires Gecko 15.0(Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) void notifyMarkedMessageRead( in long aRequestId in bool aRead ); Parameters aRequestId A number representing the id of the request. aRead A
Boolean indicating whether a message is read or unread. notifyMarkMessageReadFailed() Requires Gecko 15.0(Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) void notifyMarkMessageReadFailed( in long aRequestId in long aError ); Parameters aRequestId A number representing the id of the request. aError A number with an error code. See constants. notifyNoMessageInList() void notifyNoMessage...
...uest. notifyReadMessageListFailed() void notifyReadMessageListFailed( in long aRequestId, in long aError ); Parameters aRequestId A number representing the id of the request. aError A number with an error code. See constants. notifySmsDeleted() void notifySmsDeleted( in long aRequestId, in bool aDeleted ); Parameters aRequestId A number representing the id of the request. aDeleted A
Boolean indictating whether the SMS is deleted. notifySmsDeleteFailed() void notifySmsDeleteFailed( in long aRequestId, in long aError ); Parameters aRequestId A number representing the id of the request. aError A number with an error code. See constants. notifySmsSendFailed() void notifySmsSendFailed( in long aRequestId, in long aError ); Parameters aRequestId A number representing the id ...
nsISocketTransport
mpletion of the connection setup is indicated by a STATUS_CONNECTED_TO notification to the event sink (if set). To create an instance, call nsISocketTransportService.createTransport() Method overview PRNetAddr getPeerAddr(); Native code only! PRNetAddr getSelfAddr(); Native code only! unsigned long getTimeout(in unsigned long aType);
boolean isAlive(); void setTimeout(in unsigned long aType, in unsigned long aValue); Attributes Attribute Type Description connectionFlags unsigned long A bitmask that can be used to modify underlying behavior of the socket connection. See Connection Flag Constants for more details. host AUTF8String ...
.... unsigned long getTimeout( in unsigned long aType ); Parameters aType The timeout type, who's associated value should be retrieved. Can be one of the constants TIMEOUT_CONNECT or TIMEOUT_READ_WRITE. Return value Returns the timeout in seconds for the given Type. A value of PR_UINT32_MAX is equivalent to no timeout. isAlive() Test if this socket transport is (still) connected.
boolean isAlive(); Parameters None. Return value Returns true if the socket is connected. Otherwise false. setTimeout() Sets a Socket timeout. void setTimeout( in unsigned long aType, in unsigned long aValue ); Parameters aType The timeout type which should be set to aValue. Can be one of the constants TIMEOUT_CONNECT or TIMEOUT_READ_WRITE. aValue Defines the timeout in...
nsIStringEnumerator
The "next" element is the first string upon the first call. Must be preceded by a call to hasMoreElements() which returns PR_TRUE. This method is generally called within a loop to iterate over the strings in the enumerator. AString getNext(); Parameters None. Return value The next string in the enumerator. ...
...in the enumerator. Throws an exception if there are no more strings. hasMore() Called to determine whether or not the enumerator has any strings that can be returned via getNext(). This method is generally used to determine whether or not to initiate or continue iteration over the enumerator, though it can be called without subsequent getNext() calls. Does not affect internal state of enumerator.
boolean hasMore(); Parameters None. Return value True if there are remaining strings in the enumerator. False if there are no more strings in the enumerator. ...
nsIStyleSheetService
erits from: nsISupports Implemented by: @mozilla.org/content/style-sheet-service;1. ...
...ts loaded via this API is undefined. Sheets added via this API take effect on all documents, including already-loaded ones, immediately. void loadAndRegisterSheet( in nsIURI sheetURI, in unsigned long type ); Parameters sheetURI URI of the stylesheet to load and register. type One of the type constants. sheetRegistered() Check if a stylesheet has been registered
boolean sheetRegistered( in nsIURI sheetURI, in unsigned long type ); Parameters sheetURI URI of the stylesheet to check. type One of the type constants. Return value Returns true if a style sheet at sheetURI has previously been added to the list of style sheets specified by type. unregisterSheet() Remove the style sheet at sheetURI from the list of style sheets specifi...
nsITaskbarPreview
Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) You can not directly instantiate this interface. Instead, you use nsITaskbarTabPreview or nsITaskbarWindowPreview as appropriate. Method overview void invalidate(); Attributes Attribute Type Description active
boolean Indicates whether or not the preview is marked as active (currently selected) in the taskbar. controller nsITaskbarPreviewController The controller for this preview. The controller provides the behavior and appearance for the taskbar preview, and is responsible for determining the size and contents of the preview, which buttons are displayed, and how the...
...e: 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 be destroyed and rebuilt, then re-registered with the taskbar. If any step of that process fails, an exception is thrown. For window previews, changing this value is computationally t...
nsITaskbarPreviewButton
ttons are displayed below the window preview. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) You can't directly instantiate this interface. Instead, you use the nsITaskbarWindowPreview.getButton() to get the objects representing the buttons. Attributes Attribute Type Description disabled
boolean If true, the button is disabled. This is not the same as visible, which 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 imgIContai...
...If false, the button doesn't participate in the layout of buttons underneath the preview. This is false by default. ...
nsITextInputProcessorCallback
tComposition: function simpleIME_setComposition(aText, aClauses, aCaret) { if (!this._TIP) { this._TIP = Components.classes["@mozilla.org/text-input-processor;1"]. createInstance(Components.interfaces.nsITextInputProcessor); } if (!this._TIP.beginInputTransaction(window, this._callback)) { return false; } ... ...
...(Components.interfaces.nsITextInputProcessor); } if (!this._TIP.beginInputTransaction(window, this._callback)) { return false; } ... }, } Method overview
boolean onNotify(in nsITextInputProcessor aTextInputProcessor, in nsITextInputProcessorNotification aNotification); Methods onNotify() This is called when Gecko requests or notifies something to IME.
boolean onNotify(in nsITextInputProcessor aTextInputProcessor, in nsITextInputProcessorNotification aNotification); Parameters aTextInputProcessor The instance which receives the notification. If the handler needs to do something with composition, you can use this. aNotification A notification or request. See the document of nsITextInputProcessorNotification for the details. Re...
nsIThreadEventFilter
ccepted by a nested event queue; see nsIThreadInternal.PushEventQueue() for more information. You should implement this interface and its acceptEvent() method, then pass the object implementing it as the filter. xpcom/threads/nsIThreadInternal.idlScriptable Please add a summary to this article. ...
... Return value Implement this method to return true if the event is accepted, or false to reject it. ...
nsIThreadObserver
com/threads/nsIThreadInternal.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports Method overview void afterProcessNextEvent(in nsIThreadInternal thread, in unsigned long recursionDepth); void onDispatchedEvent(in nsIThreadInternal thread); void onProcessNextEvent(in nsIThreadInternal thread, in
boolean mayWait, in unsigned long recursionDepth); Methods afterProcessNextEvent() Called by the nsIThread method nsIThread.ProcessNextEvent() after an event is processed. This method is only called on the target thread. Note: It is valid to change the thread's observer during a call to this method. void afterProcessNextEvent( in nsIThreadInternal thread, in unsigned long recursionDepth );...
...IThreadInternal thread ); Parameters thread The nsIThread on which the event was dispatched. onProcessNextEvent() Called by the nsIThread method nsIThread.ProcessNextEvent() before an event is processed. This method is only called on the target thread. It is valid to change the thread\'s observer during a call to this method. void onProcessNextEvent( in nsIThreadInternal thread, in
boolean mayWait, in unsigned long recursionDepth ); Parameters thread The nsIThread on which the event is going to be processed. mayWait true if the method is allowed to block the calling thread. This parameter will be false during thread shutdown. recursionDepth The number of calls to nsIThread.ProcessNextEvent() on the call stack in addition to the current call. Example It is possible to...
nsIToolkitProfile
ToolkitProfile.idlScriptable Represents a user profile. Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) You should not create these objects yourself; to obtain them, use the nsIToolkitProfileService interface to create and obtain them. Method overview nsIProfileLock lock(out nsIProfileUnlocker aUnlocker); void remove(in
boolean removeFiles); Attributes Attribute Type Description localDir nsILocalFile The location of the profile local directory, which may be the same as the root directory. See nsIProfileLock.localDirectory(). Read only. name AUTF8String The profile's name. rootDir nsILocalFile The location of the profile directory. Read only. Method...
...The unlocker object is only available in Gecko 34 or later when running on Windows Vista or later. Return value An nsIProfileLock object which holds a profile lock as long as you hold a reference to it. Example: var profile = profileList.getNext().QueryInterface(Ci.nsIToolkitProfile); var locker = profile.lock({}); remove() Removes the profile from the registry of profiles. void remove( in
boolean removeFiles ); Parameters removeFiles Indicates whether or not the profile directory should be removed when the profile is removed from the profile list. See also Profile management nsIToolkitProfileService nsIProfileLock nsIProfileUnlocker ...
nsITransactionList
Read only. ...
... at aIndex has. itemIsBatch() Returns true if the item at aIndex is a batch. Note that currently there is no requirement for a TransactionManager implementation to associate a toplevel nsITransaction with a batch so it is possible for itemIsBatch to return true and getItem() to return null. However, you can still access the transactions contained in the batch with a call to getChildListForItem().
boolean itemIsBatch( in long aIndex ); Parameters aIndex The index of the item in the list. Return value true if the item at aIndex is a batch. See also nsITransaction nsITransactionListener nsITransactionManager ...
nsIUTF8StringEnumerator
The "next" element is the first string upon the first call. Must be preceded by a call to hasMore(), which returns PR_TRUE. ...
...r. Throws an exception if there are no more strings. hasMore() Reports whether or not the enumerator has any strings that can be returned via getNext(). This method is generally used to determine whether or not to initiate or continue iteration over the enumerator, athough it can be called without subsequent getNext() calls. Calling this method doesn't affect the internal state of the enumerator.
boolean hasMore(); Parameters None. Return value true if there are remaining strings in the enumerator, otherwise false. ...
nsIUpdateChecker
toolkit/mozapps/update/nsIUpdateService.idlScriptable This interface describes an object that knows how to check for software updates. 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 void checkForUpdates(in nsIUpdateCheckListener listener, in
boolean force); void stopChecking(in unsigned short duration); Constants Constant Value Description CURRENT_CHECK 1 Constant for the stopChecking() method indicating that only the current update check should be stopped. CURRENT_SESSION 2 Constant for the stopChecking() method indicating that all update checks during the current session should be stopped. ANY_CHECKS 3 Constant for the stopChecking() method indicat...
...od indicating that all update checks during the current session should be stopped. ANY_CHECKS 3 Constant for the stopChecking() method indicating that all update checking should be stopped. This disables the update checking preferences. Methods checkForUpdates() Checks for available updates, notifying a listener of the results. void checkForUpdates( in nsIUpdateCheckListener listener, in
boolean force ); Parameters listener An object implementing nsIUpdateCheckListener to be notified of the results of an update check. force If true, the update checker checks for updates, regardless of the current value of the user's update settings. This is used by any user interface that offers the user the opportunity to check for updates immediately. The force option doesn't work if the system admin...
nsIUpdatePrompt
scribes an object that can be used to show various update-related notifications to the user. 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 void checkForUpdates(); void showUpdateAvailable(in nsIUpdate update); void showUpdateDownloaded(in nsIUpdate update, [optional] in
boolean background); void showUpdateError(in nsIUpdate update); void showUpdateHistory(in nsIDOMWindow parent); void showUpdateInstalled(); Methods checkForUpdates() Presents a user interface that checks for and displays the available updates. void checkForUpdates(); Parameters None. showUpdateAvailable() Shows a message advising the user that an update is available to be downloaded and install...
...ibing the update that's available. showUpdateDownloaded() Shows a message advising the user that an update has been downloaded, and that the user should restart the application in order to install it. If background is true (for example the download was not user initiated) and the app.update.silent preference is true the call will be a no-op. void showUpdateDownloaded( in nsIUpdate update, in
boolean background Optional ); Parameters update An nsIUpdate describing the update that was downloaded. background Optional An optional parameter that, if provided and true, presents a less-obtrusive, non-modal notification alert. showUpdateError() Displays an error message telling the user about an update failure, such as a failure to successfully apply a patch. If the app.update.silent preference ...
nsIUploadChannel2
netwerk/base/public/nsIUploadChannel2.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Method overview void explicitSetUploadStream(in nsIInputStream aStream, in ACString aContentType, in long long aContentLength, in ACString aMethod, in
boolean aStreamHasHeaders); Methods explicitSetUploadStream() Sets a stream to be uploaded by this channel with the specified Content-Type and Content-Length header values. Most implementations of this interface require that the stream: implement threadsafe addRef and release implement nsIInputStream.readSegments() implement nsISeekableStream.seek(). void explicitSetUploadStream( in nsIInputStream...
...annel with the specified Content-Type and Content-Length header values. Most implementations of this interface require that the stream: implement threadsafe addRef and release implement nsIInputStream.readSegments() implement nsISeekableStream.seek(). void explicitSetUploadStream( in nsIInputStream aStream, in ACString aContentType, in long long aContentLength, in ACString aMethod, in
boolean aStreamHasHeaders ); Parameters aStream The stream to be uploaded by this channel. aContentType This value will replace any existing Content-Type header on the HTTP request, regardless of whether or not its empty. aContentLength A value of -1 indicates that the length of the stream should be determined by calling the stream's available method. aMethod The HTTP request method to set on the strea...
nsIWebBrowserChrome
embedding/browser/webBrowser/nsIWebBrowserChrome.idlScriptable Corresponds to the top-level, outermost window containing an embedded Gecko web browser. Inherits from: nsISupports Last changed in Gecko 0.9.6 Method overview void destroyBrowserWindow(); void exitModalEventLoop(in nsresult aStatus);
boolean isWindowModal(); void setStatus(in unsigned long statusType, in wstring status); void showAsModal(); void sizeBrowserTo(in long aCX, in long aCY); Attributes Attribute Type Description chromeFlags unsigned long The chrome flags for this browser chrome. The implementation should reflect the value of this attribute by hiding or showing its chrome appropriately. webBrowser nsIWebBrow...
...ct. void destroyBrowserWindow(); Parameters None. exitModalEventLoop() Exit a modal event loop if we're in one. The implementation should also exit out of the loop if the window is destroyed. void exitModalEventLoop( in nsresult aStatus ); Parameters aStatus The result code to return from showAsModal(). isWindowModal() Is the window modal (that is, currently executing a modal loop)?
boolean isWindowModal(); Parameters None. Return value true if it's a modal window. setStatus() Called when the status text in the chrome needs to be updated. void setStatus( in unsigned long statusType, in wstring status ); Parameters statusType Indicates what is setting the text. status Status string. null is an acceptable value meaning no status. showAsModal() Shows the window ...
nsIWebProgressListener2
loader/base/nsIWebProgressListener2.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsIWebProgressListener Method overview void onProgressChange64(in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long long aCurSelfProgress, in long long aMaxSelfProgress, in long long aCurTotalProgress, in long long aMaxTotalProgress);
boolean onRefreshAttempted(in nsIWebProgress aWebProgress, in nsIURI aRefreshURI, in long aMillis, in
boolean aSameURI); Methods onProgressChange64() Notification that the progress has changed for one of the requests associated with aWebProgress. Progress totals are reset to zero when all requests in aWebProgress complete (corresponding to onStateChange being called with aStateFlags including the STA...
...est. aMaxSelfProgress The maximum progress for aRequest. aCurTotalProgress The current progress for all requests associated with aWebProgress. aMaxTotalProgress The total progress for all requests associated with aWebProgress. onRefreshAttempted() Notification that a refresh or redirect has been requested in aWebProgress. For example, via a <meta http-equiv="refresh"> or an HTTP Refresh: header.
boolean onRefreshAttempted( in nsIWebProgress aWebProgress, in nsIURI aRefreshURI, in long aMillis, in
boolean aSameURI ); Parameters aWebProgress The nsIWebProgress instance that fired the notification. aRefreshURI The new URI that aWebProgress has requested redirecting to. aMillis The delay (in milliseconds) before refresh. aSameURI True if aWebProgress is requesting a refresh of the current ...
nsIWebappsSupport
toolkit/components/webapps/nsIWebappsSupport.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) Method overview void installApplication(in wstring title, in wstring uri, in wstring iconUri, in wstring iconData);
boolean isApplicationInstalled(in wstring uri); Methods installApplication() This method installs a web application. void installApplication( in wstring title, in wstring uri, in wstring iconUri, in wstring iconData ); Parameters title The user-friendly name of the application. uri The uri of the web application. iconUri The uri of icon of the web application. iconData A base64 encoded representation of the appl...
...void installApplication( in wstring title, in wstring uri, in wstring iconUri, in wstring iconData ); Parameters title The user-friendly name of the application. uri The uri of the web application. iconUri The uri of icon of the web application. iconData A base64 encoded representation of the application's icon. isApplicationInstalled() Checks is a web application is already installed.
boolean isApplicationInstalled( in wstring uri ); Parameters uri The uri of the web application. Return value true if the web application is installed, false if it's not installed. ...
nsIWindowsShellService
browser/components/shell/public/nsIWindowsShellService.idlScriptable Please add a summary to this article. Inherits from: nsIShellService Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview string getRegistryEntry(in long aHKeyConstant, in string aSubKeyName, in string aValueName); Obsolete since Gecko 1.8 void restoreFileSettings(in
boolean aForAllUsers); Obsolete since Gecko 1.9 void shortcutMaintenance(); Attributes Attribute Type Description desktopBackgroundColor unsigned long The desktop background color, visible when no background image is used, or if the background image is centered and does not fill the entire screen. A rgb value, where (r << 24 | g << 16 | b) Obsolete since Gecko 1.8 unreadMailCount unsigned long The n...
... The sub key to locate. aValueName The value to locate in the sub key. The empty string returns the default value of the sub key. Return value The value of the specified sub key/value, truncated to 4096 bytes. restoreFileSettings() Obsolete since Gecko 1.9 (Firefox 3) Restores system settings to what they were before Firefox modified them. void restoreFileSettings( in
boolean aForAllUsers ); Parameters aForAllUsers Whether or not Firefox should restore settings for all users on a multi-user system. shortcutMaintenance() Provides the shell service an opportunity to do some Win7+ shortcut maintenance needed on initial startup of the browser. void shortcutMaintenance(); Parameters None. ...
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. ...
...g, 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. void initMessageEvent( in DOMString aTypeArg, in
boolean aCanBubbleArg, in
boolean aCancelableArg, in DOMString aDataArg, in DOMString aOriginArg, in nsISupports aSourceArg ); Parameters aTypeArg The event type. 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. aSo...
nsIWritablePropertyBag2
Inherits from: nsIPropertyBag2 Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void setPropertyAsACString(in AString prop, in ACString value); void setPropertyAsAString(in AString prop, in AString value); void setPropertyAsAUTF8String(in AString prop, in AUTF8String value); void setPropertyAsBool(in AString prop, in
boolean value); void setPropertyAsDouble(in AString prop, in double value); void setPropertyAsInt32(in AString prop, in PRInt32 value); void setPropertyAsInt64(in AString prop, in PRInt64 value); void setPropertyAsInterface(in AString prop, in nsISupports value); void setPropertyAsUint32(in AString prop, in PRUint32 value); void setPropertyAsUint64(in...
...rop, in AString value ); Parameters prop Property to set the value of. value Value to set the property to. setPropertyAsAUTF8String() void setPropertyAsAUTF8String( in AString prop, in AUTF8String value ); Parameters prop Property to set the value of. value Value to set the property to. setPropertyAsBool() void setPropertyAsBool( in AString prop, in
boolean value ); Parameters prop Property to set the value of. value Value to set the property to. setPropertyAsDouble() void setPropertyAsDouble( in AString prop, in double value ); Parameters prop Property to set the value of. value Value to set the property to. setPropertyAsInt32() void setPropertyAsInt32( in AString prop, in PRInt32 value ); Parameters ...
nsIXULRuntime
/ Thunderbird 3.3 / SeaMonkey 2.1) Implemented by: @mozilla.org/xre/app-info;1. ...
... var xulRuntime = Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIXULRuntime); Method overview void invalidateCachesOnRestart(); Attributes Attribute Type Description accessibilityEnabled
boolean If true, the accessibility service is running. Read only. browserTabsRemoteAutostart
boolean If true, browser tabs may be opened by default in a different process from the main browser UI. Read only. inSafeMode
boolean Whether the application was launched in safe mode. Read only. is64Bit
boolean Indicates whether the current Firefox build is 64-bit. Read only. logConsoleErrors
boolean Whether to write console errors to a log file. ...
nsIXULSortService
public/nsIXULSortService.idlScriptable A service used to sort the contents of a XUL widget. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void insertContainerNode(in nsIRDFCompositeDataSource db, in nsRDFSortState sortStatePtr, in nsIContent root, in nsIContent trueParent, in nsIContent container, in nsIContent node, in
boolean aNotify); Native code only! Obsolete since Gecko 1.9 void sort(in nsIDOMNode aNode, in AString aSortKey, in AString aSortHints); Constants Constant Value Description SORT_COMPARECASE 0x0001 SORT_INTEGER 0x0100 Methods Native code only!insertContainerNode Obsolete since Gecko 1.9 (Firefox 3)This feature is obsolete. Although it may still work in some browsers, its use is discour...
...fox 3)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Used internally for insertion sorting. void insertContainerNode( in nsIRDFCompositeDataSource db, in nsRDFSortState sortStatePtr, in nsIContent root, in nsIContent trueParent, in nsIContent container, in nsIContent node, in
boolean aNotify ); Parameters db sortStatePtr root trueParent container node aNotify sort() Sort the contents of the widget containing aNode using aSortKey as the comparison key, and aSortHints as how to sort. void sort( in nsIDOMNode aNode, in AString aSortKey, in AString aSortHints ); Parameters aNode A node in the XUL widget whose children are to be sorted. aSortKey The value to be u...
nsIZipReader
ipEntry); Obsolete since Gecko 10 nsIInputStream getInputStream(in AUTF8String zipEntry); nsIInputStream getInputStream(in string zipEntry); Obsolete since Gecko 10 nsIInputStream getInputStreamWithSpec(in AUTF8String aJarSpec, in AUTF8String zipEntry); nsIInputStream getInputStreamWithSpec(in AUTF8String aJarSpec, in string zipEntry); Obsolete since Gecko 10
boolean hasEntry(in AUTF8String zipEntry); void init(in nsIFile zipFile); Obsolete since Gecko 1.9 void open(in nsIFile zipFile); void openInner(in nsIZipReader zipReader, in AUTF8String zipEntry); void openInner(in nsIZipReader zipReader, in string zipEntry); Obsolete since Gecko 10 void test(in AUTF8String aEntryName); void test(in string aEntryName); Obs...
...tInputStreamWithSpec( in AUTF8String aJarSpec, in AUTF8String zipEntry ); Parameters aJarSpec The Spec of the URI for the JAR (only used for directory streams). zipEntry The name of the entry to open() the stream from. Return value The nsIInputStream containing the contents of the specified zip entry. hasEntry() Checks whether the zipfile contains an entry specified by zipEntry.
boolean hasEntry( in AUTF8String zipEntry ); Parameters zipEntry The zip entry. Return value
Boolean value, true if the zip entry exists, false is it does not exist. init() Obsolete since Gecko 1.9 (Firefox 3) Initializes a zip reader after construction. void init( in nsIFile zipFile ); Parameters zipFile Zip file to initialize. open() Opens a zip file f...
nsIMsgCloudFileProvider
gCloudFileProvider is the interface that must be implemented by new Filelink providers. ...
...ovider, returns undefined. cancelFileUpload() Cancels an upload currently in progress for some nsILocalFile. void cancelFileUpload(in nsILocalFile aFile); Parameters aFile The nsILocalFile that is currently being uploaded to cancel. refreshUserInfo() Refreshes the data for this user account - for example, the storage quota, or the amount of storage being used. void refreshUserInfo(in
boolean aWithUI, in nsIRequestObserver aCallback); Parameters aWithUI Whether or not the provider should prompt the user for credentails in the event that the stored credentials have gone stale. If aWithUI is false, and the credentials are stale, the onStopRequest of the aCallback nsIRequestListener will get the authErr status code passed to it. aCallback The nsIRequestObser...
Taking screenshots - Firefox Developer Tools
e :screenshot helper function in the Web Console. Type :screenshot in the Web Console to create a screenshot of the current page. By default, the image file will be named Screen Shot yyy-mm-dd at hh.mm.ss.png. Tip: You could type :s and then hit Tab to autocomplete :screenshot. The command has the following optional parameters: Command Type Description --clipboard
boolean When present, this parameter will cause the screenshot to be copied to the clipboard. Prevents saving to a file unless you use the --file option to force file writing. --delay number The number of seconds to delay before taking the screenshot; you can use an interger or floating point number. This is useful if you want to pop open a menu or invoke a hover state for the screensho...
... The number of seconds to delay before taking the screenshot; you can use an interger or floating point number. This is useful if you want to pop open a menu or invoke a hover state for the screenshot. --dpr number The device pixel ratio to use when taking the screenshot. Values above 1 yield "zoomed-in" images, whereas values below 1 create "zoomed-out" images. --file
boolean When present, the screenshot will be saved to a file, even if other options (e.g. --clipboard) are included. --filename string The name to use in saving the file. The file should have a ".png" extension. --fullpage
boolean If included, the full webpage will be saved. With this parameter, even the parts of the webpage which are outside the current bounds of the win...
Web Console Helpers - Firefox Developer Tools
s useful for dumping the contents of objects and arrays. :screenshot Creates a screenshot of the current page with the supplied filename. If you don't supply a filename, the image file will be named with the following format: Screen Shot yyy-mm-dd at hh.mm.ss.png The command has the following optional parameters: Command Type Description --clipboard
boolean When present, this parameter will cause the screenshot to be copied to the clipboard. --delay number The number of seconds to delay before taking the screenshot. --dpr number The device pixel ratio to use when taking the screenshot. --file
boolean When present, the screenshot will be saved to a file, even if other options (e.g. --cli...
...With this parameter, even the parts of the webpage which are outside the current bounds of the window will be included in the screenshot. When used, "-fullpage" will be appended to the file name. ...
The JavaScript input interpreter - Firefox Developer Tools
typed. Use this function to clear the console's command history. :screenshot New in Firefox 62. Create a screenshot of the current page with the supplied filename. If you don't supply a filename, the image file will be named: Screen Shot yyy-mm-dd at hh.mm.ss.png The command has the following optional parameters: Command Type Description --clipboard
boolean When present, this parameter will cause the screenshot to be copied to the clipboard. --delay number The number of seconds to delay before taking the screenshot. --dpr number The device pixel ratio to use when taking the screenshot. --file
boolean When present, the screenshot will be saved to a file, even if other options (e.g. --cli...
...With this parameter, even the parts of the webpage which are outside the current bounds of the window will be included in the screenshot. When used, "-fullpage" will be appended to the file name. ...
AbortSignal.aborted - Web APIs
Later on we check whether or not it the signal has been aborted using the aborted property, and send an appropriate log to the console. var controller = new AbortController(); var signal = controller.signal; // ... ...
...Later on we check whether or not it the signal has been aborted using the aborted property, and send an appropriate log to the console. var controller = new AbortController(); var signal = controller.signal; // ... ...
AudioBufferSourceNode.loop - Web APIs
When looping is enabled, the sound begins playing at the time specified as the start point when start() is called. ...
... When looping is enabled, the sound begins playing at the time specified as the start point when start() is called. ...
Bluetooth - Web APIs
The Bluetooth interface of the Web Bluetooth API returns a Promise to a BluetoothDevice object with the specified options. Interface interface Bluetooth : EventTarget { Promise<
boolean> getAvailability(); attribute EventHandler onavailabilitychanged; [SameObject] readonly attribute BluetoothDevice? referringDevice; Promise<sequence<BluetoothDevice>> getDevices(); Promise<BluetoothDevice> requestDevice(optional RequestDeviceOptions options = {}); }; Bluetooth includes BluetoothDeviceEventHandlers; Bluetooth includes CharacteristicEventHandlers; Bluetooth includes ServiceEventHandlers; Properties Inherits properties from its parent EventTarget. Bluetooth.referringDevice Read only Returns a reference to the device, if any, from which the user opened the current page. For ex...
... an Eddystone beacon might advertise a URL, which the user agent allows the user to open. A BluetoothDevice representing the beacon would be available through navigator.bluetooth.referringDevice. Events Bluetooth.onavailabilitychanged An event handler that runs when an event of type availabilitychanged has fired. Methods Bluetooth.getAvailability() Returns a Promise that resolved to a
Boolean indicating whether the user-agent has the ability to support Bluetooth. Some user-agents let the user configure an option that affects what is returned by this value. If this option is set, that is the value returned by this method. Bluetooth.getDevices() Returns a Promise that resolved to an array of BluetoothDevices which the origin already obtained permission for via a call to Bluetooth.requ...
BluetoothCharacteristicProperties.authenticatedSignedWrites - Web APIs
Syntax var a
Boolean = BluetoothCharacteristicProperties.authenticatedSignedWrites; Value A
Boolean. ...
... The authenticatedSignedWrites read-only property of the BluetoothCharacteristicProperties interface returns a
boolean that is true if signed writing to the characteristic value is permitted. Syntax var a
Boolean = BluetoothCharacteristicProperties.authenticatedSignedWrites; Value A
Boolean. Specifications Specification Status Comment Web BluetoothThe definition of 'authenticatedSignedWrites' in that specification. Draft Initial definition. ...
BluetoothCharacteristicProperties.broadcast - Web APIs
Syntax var a
Boolean = BluetoothCharacteristicProperties.broadcast; Value A
Boolean. ...
... The broadcast read-only property of the BluetoothCharacteristicProperties interface returns a
boolean that is true if the broadcast of the characteristic value is permitted using the Server Characteristic Configuration Descriptor. Syntax var a
Boolean = BluetoothCharacteristicProperties.broadcast; Value A
Boolean. Specifications Specification Status Comment Web BluetoothThe definition of 'broadcast' in that specification. Draft Initial definition. ...
BluetoothCharacteristicProperties.indicate - Web APIs
Syntax var a
Boolean = BluetoothCharacteristicProperties.indicate; Value A
Boolean. ...
... The indicate read-only property of the BluetoothCharacteristicProperties interface returns a
boolean that is true if indications of the characteristic value with acknowledgement is permitted. Syntax var a
Boolean = BluetoothCharacteristicProperties.indicate; Value A
Boolean. Specifications Specification Status Comment Web BluetoothThe definition of 'indicate' in that specification. Draft Initial definition. ...
BluetoothCharacteristicProperties.notify - Web APIs
Syntax var a
Boolean = BluetoothCharacteristicProperties.notify; Value A
Boolean. ...
... The notify read-only property of the BluetoothCharacteristicProperties interface returns a
boolean that is true if notifications of the characteristic value without acknowledgement is permitted. Syntax var a
Boolean = BluetoothCharacteristicProperties.notify; Value A
Boolean. Specifications Specification Status Comment Web BluetoothThe definition of 'notify' in that specification. Draft Initial definition. ...
BluetoothCharacteristicProperties.read - Web APIs
Syntax var a
Boolean = BluetoothCharacteristicProperties.read; Value A
Boolean. ...
... The read read-only property of the BluetoothCharacteristicProperties interface returns a
boolean that is true if the reading of the characteristic value is permitted. Syntax var a
Boolean = BluetoothCharacteristicProperties.read; Value A
Boolean. Specifications Specification Status Comment Web BluetoothThe definition of 'read' in that specification. Draft Initial definition. ...
BluetoothCharacteristicProperties.writableAuxiliaries - Web APIs
Syntax var a
Boolean = BluetoothCharacteristicProperties.writableAuxiliaries; Value A
Boolean. ...
... The writableAuxiliaries read-only property of the BluetoothCharacteristicProperties interface returns a
boolean that is true if reliable writes to the characteristic descriptor is permitted. Syntax var a
Boolean = BluetoothCharacteristicProperties.writableAuxiliaries; Value A
Boolean. Specifications Specification Status Comment Web BluetoothThe definition of 'writableAuxiliaries' in that specification. Draft Initial definition. ...
BluetoothCharacteristicProperties.write - Web APIs
Syntax var a
Boolean = BluetoothCharacteristicProperties.write; Value A
Boolean. ...
... The write read-only property of the BluetoothCharacteristicProperties interface returns a
boolean that is true if the writing to the characteristic with response is permitted. Syntax var a
Boolean = BluetoothCharacteristicProperties.write; Value A
Boolean. Specifications Specification Status Comment Web BluetoothThe definition of 'write' in that specification. Draft Initial definition. ...
BluetoothCharacteristicProperties.writeWithoutResponse - Web APIs
Syntax var a
Boolean = BluetoothCharacteristicProperties.writeWithoutResponse; Value A
Boolean. ...
... The writeWithoutResponse read-only property of the BluetoothCharacteristicProperties interface returns a
boolean that is true if the writing to the characteristic without response is permitted. Syntax var a
Boolean = BluetoothCharacteristicProperties.writeWithoutResponse; Value A
Boolean. Specifications Specification Status Comment Web BluetoothThe definition of 'authenticatedSignedWrites' in that specification. Draft Initial definition. ...
BluetoothDevice - Web APIs
BluetoothDevice.name Read only A DOMString that provices a human-readab...
... Vendor ID field in the pnp_id characteristic in the device_information service. BluetoothDevice.productID Read only The 16-bit Product ID field in the pnp_id characteristic in the device_information service. BluetoothDevice.productVersion Read only The 16-bit Product Version field in the pnp_id characteristic in the device_information service. BluetoothDevice.paired Read only A
Boolean value indicating whether the device is paired with the system. BluetoothDevice.gattServer Read only A reference to the device's GATT server or null if the device is disconnected. Methods BluetoothDevice.watchAdvertisments() A Promise that resolves to undefined or is rejected with an error if advetisments can't shown for any reason. BluetoothDevice.unwatchAdvertisments() Stops wa...
BluetoothRemoteGATTService - Web APIs
The BluetoothRemoteGATTService interface of the Web Bluetooth API represents a service provided by a GATT server, including a device, a list of referenced services, and a list of the characteristics of this service. ...
...ristic); Promise<BluetoothGATTService> getIncludedService(BluetoothServiceUUID service); Promise<sequence<BluetoothGATTService>> 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 P...
Cache.delete() - Web APIs
is found, it resolves to false. Syntax cache.delete(request, {options}).then(function(found) { // your cache entry has been deleted if found }); Parameters request The Request you are looking to delete. This can be a Request object or a URL. options Optional An object whose properties control how matching is done in the delete operation. ...
...or a URL. options Optional An object whose properties control how matching is done in the delete operation. The available options are: ignoreSearch: A
Boolean that specifies whether the matching process should ignore the query string in the url. If set to true, the ?value=bar part of http://foo.com/?value=bar would be ignored when performing a match. It defaults to false. ignoreMethod: A
Boolean that, when set to true, prevents 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 defaul...
Cache.keys() - Web APIs
t on them. Syntax cache.keys(request, {options}).then(function(keys) { // do something with your array of requests }); Parameters request Optional The Request want to return, if a specific key is desired. This can be a Request object or a URL. options Optional An object whose properties control how matching is done in the keys operation. ...
...t or a URL. options Optional An object whose properties control how matching is done in the keys operation. The available options are: ignoreSearch: A
Boolean that specifies whether the matching process should ignore the query string in the url. If set to true, the ?value=bar part of http://foo.com/?value=bar would be ignored when performing a match. It defaults to false. ignoreMethod: A
Boolean that, when set to true, prevents 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 defaul...
Cache.match() - Web APIs
, the Promise resolves to undefined. Syntax cache.match(request, {options}).then(function(response) { // Do something with the response }); Parameters request The Request for which you are attempting to find responses in the Cache. This can be a Request object or a URL. options Optional An object that sets options for the match operation. The available options are: ignoreSearch: A
Boolean that specifies whether to ignore the query string in the URL. For example, if set to true the ?value=bar part of http://foo.com/?value=bar would be ignored when performing a match. It defaults to false. ignoreMethod: A
Boolean that, when set to true, prevents matching operations from validating the Request http method (normally only GET and HEAD are allowed.) It defaults to false. ignoreVary...
...t specifies whether to ignore the query string in the URL. For example, if set to true the ?value=bar part of http://foo.com/?value=bar would be ignored when performing a match. It defaults to false. ignoreMethod: A
Boolean that, when set to true, prevents 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 -- i.e. if the URL matches you will get a match regardless of whether the Response object has a VARY header. It defaults to false. Return value A Promise that resolves to the first Response that matches the request or to undefined if no match is found. Note: Cache.match() is basically identical to Cach...
Cache.matchAll() - Web APIs
ponse array }); Parameters request Optional The Request for which you are attempting to find responses in the Cache. This can be a Request object or a URL. If this argument is omitted, you will get a copy of all responses in this cache. options Optional An options object allowing you to set specific control options for the matching performed. ...
... options Optional An options object allowing you to set specific control options for the matching performed. The available options are: ignoreSearch: A
Boolean that specifies whether the matching process should ignore the query string in the url. If set to true, the ?value=bar part of http://foo.com/?value=bar would be ignored when performing a match. It defaults to false. ignoreMethod: A
Boolean that, when set to true, prevents 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 -- i.e. if the URL matches you will get a match regardless of the Response object having a VARY header or not. It defaults to false...
CacheStorage.match() - Web APIs
aches.keys()) until a Response is returned. Syntax caches.match(request, options).then(function(response) { // Do something with the response }); Parameters request The Request you want to match. This can be a Request object or a URL string. options Optional An object whose properties control how matching is done in the match operation. ...
...ptions Optional An object whose properties control how matching is done in the match operation. The available options are: ignoreSearch: A
Boolean that specifies whether the matching process should ignore the query string in the url. For example, if set to true, the ?value=bar part of http://foo.com/?value=bar would be ignored when performing a match. It defaults to false. ignoreMethod: A
Boolean that, when set to true, prevents 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 d...
CredentialsContainer.get() - Web APIs
ame> element will resolve without effect. Syntax var promise = CredentialsContainer.get([options]) Parameters options Optional An object of type CredentialRequestOptions that contains options for the request. The options include criteria that the credentials are required or allowed 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 pr...
...arch 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", "optional", or "required". unmediated: A
Boolean indicating the returned Credential instance should not require user mediation. signal: An instance of AbortSignal that can indicate that an ongoing get() operation should be halted. An aborted operation may complete normally (generally if the abort was received after the operation finished) or reject with an "AbortError" DOMException. Returns A Promise that resolves with a Credential ins...
DOMTokenList.contains() - Web APIs
Examples In the following example we retrieve the list of classes set on a <span> element as a DOMTokenList using Element.classList. We then test for the existence of "c" in the list, and write the result into the <span>'s Node.textContent. ...
... Examples In the following example we retrieve the list of classes set on a <span> element as a DOMTokenList using Element.classList. We then test for the existence of "c" in the list, and write the result into the <span>'s Node.textContent. ...
DisplayMediaStreamConstraints.audio - Web APIs
More precise control over the audio data may be exercised by instead providing a MediaTrackConstraints object, which is used to process the audio prior to adding it to the stream. ...
... user agent to decide. Likely sources are the computer's system audio output and the user's microphone, but there is no way to specify which source to use. Syntax displayMediaStreamConstraints.audio = allowAudioFlag; displayMediaStreamConstraints.audio = mediaTrackConstraints; displayMediaStreamConstraints = { audio: allowAudioFlag|mediaTrackConstraints; } Value The value may be either a
Boolean or a MediaTrackConstraints object. If a
Boolean is specified, a value of true indicates that an audio track should be included in the stream returned by getDisplayMedia(), if an appropriate audio source exists and the user agent supports audio on display media. A value of false--the default--indicates that no audio track is to be included in the stream. If a MediaTrackConstraints object is give...
Document.hasStorageAccess() - Web APIs
If the promise gets resolved and a user gesture event was being processed when the function was originally called, the resolve handler will run as if a user gesture was being processed, so it will be able to call APIs that require user activation. ...
... If the promise gets resolved and a user gesture event was being processed when the function was originally called, the resolve handler will run as if a user gesture was being processed, so it will be able to call APIs that require user activation. ...
EXT_disjoint_timer_query.isQueryEXT() - Web APIs
Return value A GL
boolean indicating whether the given object is a WebGLQuery object (true) or not (false). Examples var ext = gl.getExtension('EXT_disjoint_timer_query'); var query = ext.createQueryEXT(); // ... ...
... The EXT_disjoint_timer_query.isQueryEXT() method of the WebGL API returns true if the passed object is a WebGLQuery object. Syntax GL
Boolean ext.isQueryEXT(query); Parameters query A WebGLQuery object to test. Return value A GL
boolean indicating whether the given object is a WebGLQuery object (true) or not (false). Examples var ext = gl.getExtension('EXT_disjoint_timer_query'); var query = ext.createQueryEXT(); // ... ext.isQueryEXT(query); Specifications Specification Status Comment EXT_disjoint_timer_queryThe definition of 'EXT_disjoint_timer_query' in that specification. Working Draft Initial definition. ...
Element.hasAttributeNS() - Web APIs
namespace is a string specifying the namespace of the attribute. localName is the name of the attribute. ...
... namespace is a string specifying the namespace of the attribute. localName is the name of the attribute. ...
Element.setAttribute() - Web APIs
tAttribute(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, regardless of their actual value; as a rule, you should specify the empty string ("") in value (some people use the attribute's name; this works but is non-standard). See the example below for a practical demonstration. Since the specified value gets converted into a string, specifying null doesn't necessarily do what...
... <button>Hello World</button> JavaScript var b = document.querySelector("button"); b.setAttribute("name", "helloButton"); b.setAttribute("disabled", ""); This demonstrates two things: The first call to setAttribute() above shows changing the name attribute's value to "helloButton". You can see this using your browser's page inspector (Chrome, Edge, Firefox, Safari). To set the value of a
Boolean attribute, such as disabled, you can specify any value. An empty string or the name of the attribute are recommended values. All that matters is that if the attribute is present at all, regardless of its actual value, its value is considered to be true. The absence of the attribute means its value is false. By setting the value of the disabled attribute to the empty string (""), we are setting di...
Event.composed - Web APIs
(That is, the first node in the shadow DOM in which the event began to propagate.) All UA-dispatched UI events are composed (click/touch/mouseover/copy/paste, etc.). Most other types of events are not composed, and so will return false. ...
...(That is, the first node in the shadow DOM in which the event began to propagate.) All UA-dispatched UI events are composed (click/touch/mouseover/copy/paste, etc.). Most other types of events are not composed, and so will return false. ...
Event.defaultPrevented - Web APIs
Example This example logs attempts to visit links from two <a> elements. JavaScript is used to prevent the second link from working. ...
... Example This example logs attempts to visit links from two <a> elements. JavaScript is used to prevent the second link from working. ...
Event.isTrusted - Web APIs
Living Standard Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'Trusted events' in that specification. ...
... Living Standard Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'Trusted events' in that specification. ...
EventSource.withCredentials - Web APIs
Examples var evtSource = new EventSource('sse.php'); console.log(evtSource.withCredentials); Note: You can find a full example on GitHub -- see Simple SSE demo using PHP. ...
... Examples var evtSource = new EventSource('sse.php'); console.log(evtSource.withCredentials); Note: You can find a full example on GitHub -- see Simple SSE demo using PHP. ...
FormData.has() - Web APIs
Note: This method is available in Web Workers. Syntax formData.has(name); Parameters name A USVString representing the name of the key you want to test for. Returns A
Boolean. ...
... The has() method of the FormData interface returns a
boolean stating whether a FormData object contains a certain key. Note: This method is available in Web Workers. Syntax formData.has(name); Parameters name A USVString representing the name of the key you want to test for. Returns A
Boolean. Example The following line creates an empty FormData object: var formData = new FormData(); The following snippet shows the results of testing for the existence of username in the FormData object, before and after appending a username value to it with FormData.append: formData.has('username'); // Returns false formData.append('username', 'Chris'); formData.has('username'); // Returns true Specifications Specification Status Comment XMLHttpRequestThe definition ...
HTMLElement.hidden - Web APIs
This is quite different from using the CSS property display to control the visibility of an element. The hidden property applies to all presentation modes and should not be used to hide content that is meant to be directly accessible to the user. ...
...of the page in a template-like fashion Creating an offscreen canvas as a drawing buffer Inappropriate use cases include: Hiding panels in a tabbed dialog box Hiding content in one presentation while intending it to be visible in others Elements that are not hidden must not link to elements which are. Syntax isHidden = HTMLElement.hidden; HTMLElement.hidden = true | false; Value A
Boolean which is true if the element is hidden from view; otherwise, the value is false. Example Here's an example where a hidden block is used to contain a thank you message that is displayed after a user agrees to an unusual request. JavaScript document.getElementById("okButton") .addEventListener("click", function() { document.getElementById("welcome").hidden = true; document.getElemen...
HTMLFieldSetElement - Web APIs
7F8" 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">HTMLFieldSetElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLFieldSetElement.disabled A
Boolean reflecting the disabled HTML attribute, indicating whether the user can interact with the control. HTMLFieldSetElement.elementsRead only The elements belonging to this field set. The type of this property depends on the version of the spec that is implemented by the browser. HTMLFieldSetElement.formRead only An HTMLFormControlsCollection or HTMLCollection referencing the containing form ele...
...esenting 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 states that this element is in. HTMLFieldSetElement.willValidate A
Boolean false, because <fieldset> objects are never candidates for constraint validation. Methods Inherits methods from its parent, HTMLElement. HTMLFieldSetElement.checkValidity() Always returns true because <fieldset> objects are never candidates for constraint validation. HTMLFieldSetElement.reportValidity() Always returns true because <fieldset> objects are never candidates for constraint va...
HTMLImageElement - Web APIs
ht 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.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 ...
...mitted 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 integer value that reflects the height HTML attribute, indicating the rendered height of the image in CSS pixels. HTMLImageElement.isMap A
Boolean that reflects the ismap HTML attribute, indicating that the image is part of a server-side image map. This is different from a client-side image map, specified using an <img> element and a corresponding <map> which contains <area> elements indicating the clickable areas in the image. The image must be contained within an <a> element; see the ismap page for details. HTMLImageElement.loading A DO...
HTMLKeygenElement - Web APIs
terface as specified, not as currently implemented by Gecko. See bug 101019 for details and status. The <keygen> elements expose the HTMLKeygenElement 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. k...
...y 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 for constraint validation (willValidate is false), or it satisfies its constraints. validity Read only Is a ValidityState representing 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 th...
HTMLOListElement - 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">HTMLOListElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} 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 ...
...t 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, iii, iv, v, ... 'I' meaning that the uppercase latin numerals are used: I, II, III, IV, V, ... HTMLOListElement.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. Methods No specific method; inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLOListE...
Option() - Web APIs
ayed text. If this is not specified, a default value of "" (empty string) is used. value Optional A DOMString representing the value of the HTMLOptionElement, i.e. 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. ...
...If omitted, even if the defaultSelected argument is true, the option is not selected. ...
HTMLOptionElement - Web APIs
troke="#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">HTMLOptionElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLOptionElement.defaultSelected Is a
Boolean that contains the initial value of the selected HTML attribute, indicating whether the option is selected by default or not. HTMLOptionElement.disabled Is a
Boolean representing the value of the disabled HTML attribute, which indicates that the option is unavailable to be selected. An option can also be disabled if it is a child of an <optgroup> element that is disabled. HTMLOptionElement.fo...
...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 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 ...
HTMLScriptElement - Web APIs
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 async and defer attributes are
Boolean attributes that control how the script should be executed. The defer and async attributes must not be specified if the src attribute is absent. There are three possible execution modes: If the async attribute is present, then the script will be executed asynchronously as soon as it downloads. If the async attribute is absent but the defer attribute is present, then the script is exec...
...e 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 inserted using the document.write() 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; inh...
Headers.has() - Web APIs
For security reasons, some headers can only be controlled by the user agent. These headers include the forbidden header names and forbidden response header names. Syntax myHeaders.has(name); Parameters name The name of the HTTP header you want to test for. If the given name is not a valid HTTP header name, this method throws a TypeError. Returns A
Boolean. ...
...ders object contains a certain header. For security reasons, some headers can only be controlled by the user agent. These headers include the forbidden header names and forbidden response header names. Syntax myHeaders.has(name); Parameters name The name of the HTTP header you want to test for. If the given name is not a valid HTTP header name, this method throws a TypeError. Returns A
Boolean. Example Creating an empty Headers object is simple: var myHeaders = new Headers(); // Currently empty You could add a header to this using Headers.append, then test for the existence of it using has(): myHeaders.append('Content-Type', 'image/jpeg'); myHeaders.has('Content-Type'); // Returns true myHeaders.has('Accept-Encoding'); // Returns false Specifications Specification S...
IDBDatabaseSync - Web APIs
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. ...
...es that exist in the connected database. version readonly DOMString The version of the connected database. Has the null value when the database is first created. Methods createObjectStore() Creates and returns a new object store with the given name in the connected database. IDBObjectStoreSync createObjectStore( in DOMString name, in DOMString keypath, in optional
boolean autoIncrement ) raises (IDBDatabaseException); Parameters name The name of a new object store. keypath The key path used by the new object store. If a null path is specified, then the object store does not have a key path, and uses out-of-line keys. autoIncrement If true, the object store uses a key generator; if false, it does not use one. Returns IDBObjectStoreSync An object to...
IDBIndex.multiEntry - Web APIs
This is decided when the index is created, using the IDBObjectStore.createIndex method. This method takes an optional options parameter whose multiEntry property is set to true/false. Note: This feature is available in Web Workers. Syntax var isMultiEntry = myIndex.multiEntry; Value A
Boolean: Value Effect true There is one record in the index for each item in an array of keys. false There is one record for each key that is an array. ...
...lue that affects how the index behaves when the result of evaluating the index's key path yields an array. This is decided when the index is created, using the IDBObjectStore.createIndex method. This method takes an optional options parameter whose multiEntry property is set to true/false. Note: This feature is available in Web Workers. Syntax var isMultiEntry = myIndex.multiEntry; Value A
Boolean: Value Effect true There is one record in the index for each item in an array of keys. false There is one record for each key that is an array. 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 w...
IDBKeyRange.lowerOpen - Web APIs
false The lower-bound value is included in the key range. Example The following example illustrates how you'd use a key range. ...
... false The lower-bound value is included in the key range. Example The following example illustrates how you'd use a key range. ...
IDBKeyRange.upperOpen - Web APIs
false The upper-bound value is included in the key range. Example The following example illustrates how you'd use a key range. ...
... false The upper-bound value is included in the key range. Example The following example illustrates how you'd use a key range. ...
IDBObjectStoreSync - Web APIs
oduced 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. ...
...t store. DATA_ERR If this object store uses out-of-line keys, and the key parameter was not passed. SERIAL_ERR If the data being stored could not be serialized by the internal structured cloning algorithm. createIndex() Creates and returns a new index with the given name in the connected database. IDBIndexSync createIndex ( in DOMString name, in DOMString keypath, in optional
boolean unique ); Parameters name The name of a new index. keyPath The key path used by the new index. unique If true, keys in the index must be unique; if false, duplicate keys are allowed. Returns IDBIndexSync An object to access the newly created index. get() Retrieves and returns the value from this object store for the record that corresponds to the given key. any get ( in any...
IdleDeadline.didTimeout - Web APIs
If didTimeout is true, the IdleDeadline object's timeRemaining() method will return approximately 0. Idle callbacks support the concept of a timeout in order to ensure that whatever task they're meant to perform actually happens, even if the user agent never has enough idle time available. ...
... will typically check the value of didTimeout if it needs to perform an action even if the browser is too busy to grant you the time; you should react by performing the needed task or, ideally, a minimal amount of work that can be done to keep things moving along, then schedule a new callback to try again to get the rest of the work done. Syntax var timedOut = IdleDeadline.didTimeout; Value A
Boolean which is true if the callback is running due to the callback's timeout period elapsing or false if the callback is running because the user agent is idle and is offering time to the callback. Example See our complete example in the article Cooperative Scheduling of Background Tasks API. Specifications Specification Status Comment Cooperative Scheduling of Background Ta...
firesTouchEvents - Web APIs
The InputDeviceCapabilities.firesTouchEvents read-only property returns a
Boolean that indicates whether the device dispatches touch events. You can use this property to detect mouse events that represent an action that may already have been handled by touch event handlers. This doesn't necessarily mean the device is a touch screen. For example, stylus and mouse devices typically generate touch events on mobile browsers. ...
...vents read-only property returns a
Boolean that indicates whether the device dispatches touch events. You can use this property to detect mouse events that represent an action that may already have been handled by touch event handlers. This doesn't necessarily mean the device is a touch screen. For example, stylus and mouse devices typically generate touch events on mobile browsers. Syntax var
boolean = InputDeviceCapabilities.firesTouchEvents Returns A
Boolean Example myButton.addEventListener('mousedown', function(e) { if (!e.sourceCapabilities.firesTouchEvents) myButton.classList.add("pressed"); }); Specifications Specification Status Comment InputDeviceCapabilitiesThe definition of 'fireTouchEvents' in that specification. Draft Initial definition. ...
KeyboardEvent.ctrlKey - Web APIs
The KeyboardEvent.ctrlKey read-only property returns a
Boolean that indicates if the control key was pressed (true) or not (false) when the event occured. ...
... The KeyboardEvent.ctrlKey read-only property returns a
Boolean that indicates if the control key was pressed (true) or not (false) when the event occured. ...
KeyboardEvent.metaKey - Web APIs
Command key. On Windows keyboards, this is the Windows key (? Windows). At least as of Firefox 48, the ? ...
...g systems may intercept the key so it is never detected. Note: On Macintosh keyboards, this is the ? Command key. On Windows keyboards, this is the Windows key (? Windows). At least as of Firefox 48, the ? Windows key is not considered the "Meta" key. KeyboardEvent.metaKey is false when the ? Windows is pressed. Syntax var metaKeyPressed = instanceOfKeyboardEvent.metaKey Return value A
Boolean Example function ismetaKey(e) { alert("metaKey = " + e.metaKey); } <button onclick="ismetaKey(event)">Click me with the meta key</button> Specifications Specification Status Comment Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'KeyboardEvent.metaKey' in that specification. Obsolete Initial definition ...
KeyboardEvent.shiftKey - Web APIs
The KeyboardEvent.shiftKey read-only property is a
Boolean that indicates if the shift key was pressed (true) or not (false) when the event occurred. ...
... The KeyboardEvent.shiftKey read-only property is a
Boolean that indicates if the shift key was pressed (true) or not (false) when the event occurred. ...
KeyboardLayoutMap.has() - Web APIs
A list of valid keys is found in the UI Events KeyboardEvent code Values spec. Syntax var a
Boolean = KeyboardLayoutMap.has(key) Parameters key The key of an element to search for in the map. Return value A
Boolean indicating whether the specifed key was found. ...
... The has() method of the KeyboardLayoutMap interface returns a
boolean indicating whether the object has an element with the specified key. A list of valid keys is found in the UI Events KeyboardEvent code Values spec. Syntax var a
Boolean = KeyboardLayoutMap.has(key) Parameters key The key of an element to search for in the map. Return value A
Boolean indicating whether the specifed key was found. Example Specification Status Comment Keyboard MapThe definition of 'has()' in that specification. Editor's Draft Initial definition. ...
MSManipulationEvent - Web APIs
after the inertia phase completes. lastStateRead only Returns the last state after a manipulation change event. ...
... completes. lastStateRead only Returns the last state after a manipulation change event. ...
MediaCapabilities.decodingInfo() - Web APIs
The MediaCapabilities.decodingInfo() method, part of the Media Capabilities API, returns a promise with the tested media configuration's mediaCapabilitiesInfo; this contains the three
Boolean properties supported, smooth, and powerefficient, which describe whether decoding the media described would be supported, smooth, and powerefficient. ...
... Syntax mediaCapabilities.decodingInfo(MediaDecodingConfiguration) Parameters MediaDecodingConfiguration A valid MediaDecodingConfiguration dictionary containing a valid media decoding type of file or media-source and a valid media configuration: either an AudioConfiguration or a VideoConfiguration. ...
MediaCapabilities.encodingInfo() - Web APIs
The MediaCapabilities.encodingInfo() method, part of the MediaCapabilities interface of the Media Capabilities API, returns a promise with the tested media configuration's MediaCapabilitiesInfo; this contains the three
Boolean properties supported, smooth, and powerefficient, which describe how compatible the device is with the type of media. ...
...diaCapabilities.encodingInfo(mediaEncodingConfiguration) Parameters mediaEncodingConfiguration A valid MediaEncodingConfiguration dictionary containing a valid media encoding type of record or transmission and a valid media configuration: either an AudioConfiguration or VideoConfiguration dictionary. Return value A Promise fulfilling with a MediaCapabilitiesInfo interface containing three
Boolean attributes: supported smooth powerEfficient Exceptions A TypeError is raised if the MediaConfiguration passed to the encodingInfo() method is invalid, either because the type is not video or audio, the contentType is not a valid codec MIME type, or any other error in the media configuration passed to the method, including omitting any of the media encoding configuration elements. ...
MediaSessionActionDetails.fastSeek - Web APIs
The
Boolean property fastSeek in the MediaSessionActionDetails dictionary is an optional value which, when specified and true, indicates that the requested seekto operation is part of an ongoing series of seekto operations. Your handler should take steps to return as quickly as possible by skipping any steps of its operation which are only necessary when the seek operation is complete. Once fastSeek is false or not present, the repeating series of seekto actions is complete and you can finalize the state of your web app or content. ...
...possible by skipping any steps of its operation which are only necessary when the seek operation is complete. Once fastSeek is false or not present, the repeating series of seekto actions is complete and you can finalize the state of your web app or content. Syntax let mediaSessionActionDetails = { fastSeek: shouldFastSeek }; let shouldFastSeek = mediaSessionActionDetails.fastSeek; Value A
Boolean which is true if the action is part of an ongoing series of seek actions which should be treated as part of an overall seek operation. If the value is false or this property isn't present, the seek is final. Specifications Specification Status Comment Media Session StandardThe definition of 'MediaSessionActionDetails.fastSeek' in that specification. Draft Initial d...
active - Web APIs
Example In this example, a new stream whose source is the user's local camera and microphone is requested using getUserMedia(). ...
... Example In this example, a new stream whose source is the user's local camera and microphone is requested using getUserMedia(). ...
MediaStream.ended - Web APIs
Specifications No longer part of any specification. ...
...se if the end of the stream has not been reached. This value once the ended event has been fired. This property has been removed from the specification; you should instead rely on the ended event or 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. Syntax var hasEnded = MediaStream.ended; Value A
Boolean value that returns true if the end of the stream has been reached. Specifications No longer part of any specification. This property was part of earlier drafts of the Media Capture and Streams specification. ...
MediaStreamConstraints.audio - Web APIs
ionary's audio property is used to indicate what kind of audio track, if any, should be included in the MediaStream returned by a call to getUserMedia(). To learn more about how constraints work, see Capabilities, constraints, and settings. Syntax var audioConstraints = true | false | MediaTrackConstraints; Value The value of the audio property can be specified as either of two types:
Boolean If a
Boolean value is specified, it simply indicates whether or not an audio track should be included in the returned stream; if it's true, an audio track is included; if no audio source is available or if permission is not given to use the audio source, the call to getUserMedia() will fail. If false, no audio track is included. MediaTrackConstraints A constraints dictionary detailing the pref...
...ailing the preferable and/or required values or ranges of values for the track's constrainable properties. If you specify constraints, an audio track meeting the constraints is required. Examples For browsers with Feature Policy enabled, the samples below need the microphone feature enabled. See Security in MediaDevices.getUserMedia() for details and examples on how to configure this. Using a
Boolean value In this example, we provide a simple value of true for the audio property. This tells getUserMedia() that we require an audio track, but we don't care about any specifics beyond that. HTML content <p>Click the start button below to begin the demonstration.</p> <div id="startButton" class="button"> Start </div> <audio id="audio" autoplay controls></audio><br> <div id="log"></div> CSS ...
MediaStreamConstraints.video - Web APIs
ionary's video property is used to indicate what kind of video track, if any, should be included in the MediaStream returned by a call to getUserMedia(). To learn more about how constraints work, see Capabilities, constraints, and settings. Syntax var videoConstraints = true | false | MediaTrackConstraints; Value The value of the video property can be specified as either of two types:
Boolean If a
Boolean value is specified, it simply indicates whether or not a video track should be included in the returned stream; if it's true, a video track is included; if no video source is available or if permission is not given to use the video source, the call to getUserMedia() will fail. If false, no video track is included. MediaTrackConstraints A constraints dictionary detailing the prefer...
...vailable or if permission is not given to use the video source, the call to getUserMedia() will fail. If false, no video track is included. MediaTrackConstraints A constraints dictionary detailing the preferable and/or required values or ranges of values for the track's constrainable properties. If you specify constraints, a video track meeting these constraints is required. Examples Using a
Boolean value In this example, we provide a simple value of true for the video property. This tells getUserMedia() that we require a video track, but we don't care about any specifics beyond that. HTML content <p>Click the start button below to begin the demonstration.</p> <div id="startButton" class="button"> Start </div> <video id="video" width="160" height="120" autoplay></video><br> <div id="lo...
MediaStreamConstraints - Web APIs
etUserMedia() to specify what kinds of tracks should be included in the returned MediaStream, and, optionally, to establish constraints for those tracks' settings. To learn more about how constraints work, see Capabilities, constraints, and settings. Properties Some combination--but not necessarily all--of the following properties will exist on the object. ...
...If constraints are specified, a video track is inherently requested. ...
MediaStreamTrack.muted - Web APIs
When possible, avoid polling muted to monitor the track's muting status. Instead, add event listeners for the mute and unmute events. ...
...an value indicating whether or not the track is currently unable to provide media output. To implement a way for users to mute and unmute a track, use the enabled property. When a track is disabled by setting enabled to false, it generates only empty frames (audio frames in which every sample is 0, or video frames in which every pixel is black). Syntax const mutedFlag = track.muted Value A
Boolean which is true if the track is currently muted, or false if the track is currently unmuted. When possible, avoid polling muted to monitor the track's muting status. Instead, add event listeners for the mute and unmute events. Example This example counts the number of tracks in an array of MediaStreamTrack objects which are currently muted. let mutedCount = 0; trackList.forEach((track) => { ...
MediaTrackConstraints.autoGainControl - Web APIs
If needed, you can determine whether or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.autoGainControl as returned by a call to MediaDevices.getSupportedConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. Automatic gain control is typically a feature provided by microphones, although it can be provided by other input sources as well. ...
...tax var constraintsObject = { autoGainControl: constraint }; constraintsObject.autoGainControl = constraint; Value If this value is a simple true or false, the user agent will attempt to obtain media with automatic gain control enabled or disabled as specified, if possible, but will not fail if this can't be done. If, instead, the value is given as an object with an exact field, that field's
Boolean value indicates a required setting for the automatic gain control feature; if it can't be met, then the request will result in an error. Example See Example: Constraint exerciser in Capabilities, constraints, and settings for an example. Specifications Specification Status Comment Media Capture and StreamsThe definition of 'autoGainControl' in that specification. ...
MediaTrackConstraints.echoCancellation - Web APIs
If needed, you can determine whether or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.echoCancellation 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 constraintsObject = { echoCancellation: constraint }; constraintsObject.echoCancellation = constraint; Value If this value is a simple true or false, the user agent will attempt to obtain media with echo cancellation enabled or disabled as specified, if possible, but will not fail if this can't be done. If, instead, the value is given as an object with an exact field, that field's
Boolean value indicates a required setting for the echo cancellation feature; if it can't be met, then the request will result in an error. Example See Example: Constraint exerciser in Capabilities, constraints, and settings for an example. Specifications Specification Status Comment Media Capture and StreamsThe definition of 'echoCancellation' in that specification. Ca...
MediaTrackConstraints.noiseSuppression - Web APIs
If needed, you can determine whether or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.noiseSuppression as returned by a call to MediaDevices.getSupportedConstraints(). However, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. Noise suppression is typically provided by microphones, although it can be provided by other input sources as well. ...
...Syntax var constraintsObject = { noiseSuppression: constraint }; constraintsObject.noiseSuppression = constraint; Value If this value is a simple true or false, the user agent will attempt to obtain media with noise suppression enabled or disabled as specified, if possible, but will not fail if this can't be done. If, instead, the value is given as an object with an exact field, that field's
Boolean value indicates a required setting for the noise suppression feature; if it can't be met, then the request will result in an error. Example See Example: Constraint exerciser in Capabilities, constraints, and settings for an example. Specifications Specification Status Comment Media Capture and StreamsThe definition of 'noiseSuppression' in that specification. Ca...
MediaTrackSettings.autoGainControl - 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.autoGainControl property you provided when calling either getUserMedia() or MediaStreamTrack.applyConstraints(). Automatic gain control is a feature in which a sound source automatically manages changes in the volume of its source media to maintain a steady overall volume level. This feature is typically used on microphones, although it can be provided by other input sources as well. ...
... needed, you can determine whether or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.autoGainControl 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 autoGainControl = MediaTrackSettings.autoGainControl; Value A
Boolean value which is true if the track has automatic gain control enabled or false if AGC is disabled. Example See Example: Constraint exerciser in Capabilities, constraints, and settings for an example. Specifications Specification Status Comment Media Capture and StreamsThe definition of 'autoGainControl' in that specification. Candidate Recommendation Initial sp...
MediaTrackSettings.echoCancellation - 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.echoCancellation property you provided when calling either getUserMedia() or MediaStreamTrack.applyConstraints(). Echo cancellation is a feature which attempts to prevent echo effects on a two-way audio connection by attempting to reduce or eliminate crosstalk between the user's output device and their input device. ...
...cellation 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 echoCancellation = MediaTrackSettings.echoCancellation; Value A
Boolean value which is true if the track has echo cancellation functionality enabled or false if echo cancellation is disabled. Example See Example: Constraint exerciser in Capabilities, constraints, and settings for an example. Specifications Specification Status Comment Media Capture and StreamsThe definition of 'echoCancellation' in that specification. Candidate Reco...
MediaTrackSettings.noiseSuppression - 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.noiseSuppression property you provided when calling either getUserMedia() or MediaStreamTrack.applyConstraints(). Noise suppression automatically filters the audio to remove background noise, hum caused by equipment, and the like from the sound before delivering it to your code. ...
...eded, you can determine whether or not this constraint is supported by checking the value of MediaTrackSupportedConstraints.noiseSuppression 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 noiseSuppression = MediaTrackSettings.noiseSuppression; Value A
Boolean value which is true if the input track has noise suppression enabled or false if AGC is disabled. Example See Example: Constraint exerciser in Capabilities, constraints, and settings for an example. Specifications Specification Status Comment Media Capture and StreamsThe definition of 'noiseSuppression' in that specification. Candidate Recommendation Initial ...
MouseEvent() - Web APIs
ng, that is the horizontal position of the mouse event on the client window of user's screen; setting this value doesn't move the mouse pointer. "clientY", optional and defaulting to 0, of type long, that is the vertical position of the mouse event on the client window of the user's screen; setting this value doesn't move the mouse pointer. ...
...e the mouse pointer. "clientY", optional and defaulting to 0, of type long, that is the vertical position of the mouse event on the client window of the user's screen; setting this value doesn't move the mouse pointer. "ctrlKey", optional and defaulting to false, of type
Boolean, that indicates if the ctrl key was simultaneously pressed. "shiftKey", optional and defaulting to false, of type
Boolean, that indicates if the shift key was simultaneously pressed. "altKey", optional and defaulting to false, of type
Boolean, that indicates if the alt key was simultaneously pressed. "metaKey", optional and defaulting to false, of type
Boolean, that indicates if the meta key was simultaneously pressed. "button", optional and defaulting to 0, of type short, that describes which button is presse...
MouseEvent.altKey - Web APIs
Example This example logs the altKey property when you trigger a click event. ...
...ressed or not when a given mouse event occurs. Be aware that the browser can't always detect the alt key on some operating systems. On some Linux variants, for example, a left mouse click combined with the alt key is used to move or resize windows. Note: On Macintosh keyboards, this key is also known as the option key. Syntax var altKeyPressed = instanceOfMouseEvent.altKey Return value A
Boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed. Example This example logs the altKey property when you trigger a click event. HTML <p>Click anywhere to test the <code>altKey</code> property.</p> <p id="log"></p> JavaScript let log = document.querySelector('#log'); document.addEventListener('click', logKey); function logKey(e) { log.textCont...
MouseEvent.ctrlKey - Web APIs
Example This example logs the ctrlKey property when you trigger a click event. ...
... Example This example logs the ctrlKey property when you trigger a click event. ...
MouseEvent.metaKey - Web APIs
Example This example logs the metaKey property when you trigger a click event. ...
...e that many operating systems bind special functionality to the meta key, so this property may be false even when the key is actually pressed. On Windows, for example, this key may open the Start menu. Note: On Macintosh keyboards, this key is the command key (?). On Windows keyboards, this key is the Windows key (?). Syntax var metaKeyPressed = instanceOfMouseEvent.metaKey Return value A
Boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed. Example This example logs the metaKey property when you trigger a click event. HTML <p>Click anywhere to test the <code>metaKey</code> property.</p> <p id="log"></p> JavaScript let log = document.querySelector('#log'); document.addEventListener('click', logKey); function logKey(e) { log.textCo...
MouseEvent.shiftKey - Web APIs
Example This example logs the shiftKey property when you trigger a click event. ...
... Example This example logs the shiftKey property when you trigger a click event. ...
Navigator.onLine - Web APIs
The property sends updates whenever the browser's ability to connect to the network changes. The update occurs when the user follows links or when a script requests a remote page. For example, the property should return false when users click links soon after they lose internet connection. Browsers implement this property differently. In Chrome and Safari, if the browser is not able to connect to a local area network (LAN) or a router, it is offline; all other conditions return true. ...
...ode sends a false value. Until Firefox 41, all other conditions return a true value; testing actual behavior on Nightly 68 on Windows shows that it only looks for LAN connection like Chrome and Safari giving false positives. You can see changes in the network state by listening for the events on window.ononline and window.onoffline. Syntax online = window.navigator.onLine; Value online is a
boolean true or false. Example View a live example. To check if you are online, query window.navigator.onLine, as in the following example: if (navigator.onLine) { console.log('online'); } else { console.log('offline'); } If the browser doesn't support navigator.onLine the above example will always come out as false/undefined. To see changes in the network state, use addEventListener to listen...
Node.isConnected - Web APIs
Syntax var isItConnected = nodeObjectInstance.isConnected Return value A
Boolean that is true if the node is connected to its relevant context object, and false if not. ...
... The isConnected read-only property of the Node interface returns a
boolean indicating whether the node is connected (directly or indirectly) to the context object, for example the Document object in the case of the normal DOM, or the ShadowRoot in the case of a shadow DOM. Syntax var isItConnected = nodeObjectInstance.isConnected Return value A
Boolean that is true if the node is connected to its relevant context object, and false if not. Examples Standard DOM A standard DOM example: let test = document.createElement('p'); console.log(test.isConnected); // Returns false document.body.appendChild(test); console.log(test.isConnected); // Returns true Shadow DOM A shadow DOM example: // Create a shadow root var shadow = this.attachShadow({mode: 'open'}); // Create some CSS to apply to ...
NodeIterator - Web APIs
part of the document tree, they do not appear when traversing over the document tree. NodeFilter.SHOW_PROCESSING_INSTRUCTION 64 Shows ProcessingInstruction nodes. NodeFilter.SHOW_TEXT 4 Shows Text nodes. NodeIterator.filter Read only Returns a NodeFilter used to select the relevant nodes. ...
... Methods This interface doesn't inherit any method. NodeIterator.detach() This operation is a no-op. It doesn't do anything. ...
Notification.Notification() - Web APIs
ification. 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. vibrate: A vibration pattern for the device's vibration hardware to emit with the notification. renotify: A
Boolean specifying whether the user should be notified after a new notification replaces an old one. The default is false, which means they won't be notified. requireInteraction: Indicates that a notification should remain active until the user clicks or dismisses it, rather than closing automatically. The default value is false. actions: An array of NotificationActions representing the actions avail...
...ult value is false. actions: An array of NotificationActions representing the actions available to the user when the notification is presented. These are options the user can choose among in order to act on the action within the context of the notification itself. The action's name is sent to the service worker notification handler to let it know the action was selected by the user. silent: A
Boolean specifying whether the notification is silent (no sounds or vibrations issued), regardless of the device settings. The default is false, which means it won't be silent. Example In our Emogotchi demo (see source code), we run a spawnNotification() function when we want to trigger a notification. The function is passed parameters to specify the body, icon, and title we want, and then it crea...
OES_vertex_array_object.isVertexArrayOES() - Web APIs
Return value A GL
boolean indicating whether the given object is a WebGLVertexArrayObject object (true) or not (false). Examples var ext = gl.getExtension('OES_vertex_array_object'); var vao = ext.createVertexArrayOES(); ext.bindVertexArrayOES(vao); // ... ...
... The OES_vertex_array_object.isVertexArrayOES() method of the WebGL API returns true if the passed object is a WebGLVertexArrayObject object. Syntax GL
Boolean ext.isVertexArrayOES(arrayObject); Parameters arrayObject A WebGLVertexArrayObject (VAO) object to test. Return value A GL
boolean indicating whether the given object is a WebGLVertexArrayObject object (true) or not (false). Examples var ext = gl.getExtension('OES_vertex_array_object'); var vao = ext.createVertexArrayOES(); ext.bindVertexArrayOES(vao); // ... ext.isVertexArrayOES(vao); Specifications Specification Status Comment OES_vertex_array_objectThe definition of 'OES_vertex_array_object' in that specification. Recommendation Initial definition. ...
PositionOptions.enableHighAccuracy - Web APIs
If true and if the device is able to provide a more accurate position, it will do so. Note that this can result in slower response times or increased power consumption (with a GPS chip on a mobile device for example). On the other hand, if false (the default value), the device can take the liberty to save resources by responding more quickly and/or using less power. ...
...the device is able to provide a more accurate position, it will do so. Note that this can result in slower response times or increased power consumption (with a GPS chip on a mobile device for example). On the other hand, if false (the default value), the device can take the liberty to save resources by responding more quickly and/or using less power. Syntax positionOptions.enableHighAccuracy =
booleanValue Specifications Specification Status Comment Geolocation APIThe definition of 'PositionOptions.enableHighAccuracy' in that specification. Recommendation Initial definition ...
PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() - Web APIs
is writing, this method's result only resolves to true on Windows when Windows Hello capabilities are available (on recent versions of this OS). Note: This method may only be used in top-level contexts and will not be available in an <iframe> for example. Syntax PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() Parameters None. Return value A Promise which resolves to a
Boolean indicating whether or a not a user-verifying platform authenticator is available. As of today (March 2019), this is basically indicating if Windows Hello may be used with the Web Authentication API and that the user has accepted its use. Note: This is a static method which is directly called on the PublicKeyCredential interface and not on an instance. Note: In earlier versions of the specifi...
...whether or a not a user-verifying platform authenticator is available. As of today (March 2019), this is basically indicating if Windows Hello may be used with the Web Authentication API and that the user has accepted its use. Note: This is a static method which is directly called on the PublicKeyCredential interface and not on an instance. Note: In earlier versions of the specification, the
boolean also conveyed the consent of the user to disclose such an authenticator existed. Examples PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() .then(function(available){ if(available){ // We can proceed with the creation of a PublicKeyCredential // with this authenticator } else { // Use another kind of authenticator or a classical login/password ...
PublicKeyCredentialRequestOptions.extensions - Web APIs
orization. This is used to display an image or some non-textual content on the authenticator before verifying the user or testing their presence. The contentType gives the MIME type of the resource to be displayed while content gives its actual content. The client outputs the hash of the content which was displayed (hashing with the same algorithm which is used for the signature). uvi
Boolean User verification index. If true, the client outputs an ArrayBuffer which contains a value uniquely identifying a user verification data record. In other words, this may be used server side to check if the current operation is based on the same biometric data that the previous authentication. loc
Boolean Location. If true, the client outputs a Coordinates object representing the...
...tputs an ArrayBuffer which contains a value uniquely identifying a user verification data record. In other words, this may be used server side to check if the current operation is based on the same biometric data that the previous authentication. loc
Boolean Location. If true, the client outputs a Coordinates object representing the geolocation of the authenticator. uvm
Boolean User verification method. If true, the client outputs an array of arrays with 3 values containing information about how the user was verified (e.g. fingerprint, pin, pattern), how the key is protected, how the matcher (tool used for the authentication operation) is protected. Note: Extensions are optional and different browsers may recognize different extensions. All extensions are opt...
RTCOfferOptions.iceRestart - Web APIs
Usage notes When the RTCPeerConnection object's ICE connection state changes to failed, you should try to trigger an ICE restart. ...
... Usage notes When the RTCPeerConnection object's ICE connection state changes to failed, you should try to trigger an ICE restart. ...
RTCPeerConnection.canTrickleIceCandidates - Web APIs
ICE trickling is the process of continuing to send candidates after the initial offer or answer has already been sent to the other peer. This property is only set after having called RTCPeerConnection.setRemoteDescription(). Ideally, your signaling protocol provides a way to detect trickling support, so that you don't need to rely on this property. A WebRTC browser will always support trickle ICE. ...
...owser will always support trickle ICE. If trickling isn't supported, or you aren't able to tell, you can check for a falsy value for this property and then wait until the value of iceGatheringState changes to "completed" before creating and sending the initial offer. That way, the offer contains all of the candidates. Syntax var canTrickle = RTCPeerConnection.canTrickleIceCandidates; Value A
Boolean that is true if the remote peer can accept trickled ICE candidates and false if it cannot. If no remote peer has been established, this value is null. Note: This property's value is determined once the local peer has called RTCPeerConnection.setRemoteDescription(); the provided description is used by the ICE agent to determine whether or not the remote peer supports trickled ICE candidates. E...
RTCPeerConnection.createOffer() - Web APIs
reated by this method. iceRestart Optional To restart ICE on an active connection, set this to true. This will cause the returned offer to have different credentials than those already in place. If you then apply the returned offer, ICE will restart. Specify false to keep the same credentials and therefore not restart ICE. The default is false. offerToReceiveAudio Optional (Legacy) A legacy
Boolean option which used to control whether or not to offer to the remote peer the opportunity to try to send audio. If this value is false, the remote peer will not be offered to send audio data, even if the local side will be sending audio data. If this value is true, the remote peer will be offered to send audio data, even if the local side will not be sending audio data. The default behavior is to o...
...). In modern implementations, the presence of this member with a value true, will ensure there is at least one transceiver set to receive audio that has not been stopped, and if there isn't one, one will be created. Note: You shouldn't use this legacy property. Instead, use RTCRtpTransceiver to control whether or not to accept incoming audio. offerToReceiveVideo Optional (Legacy) A legacy
Boolean option which used to control whether or not to offer to the remote peer the opportunity to try to send video. If this value is false, the remote peer will not be offered to send video data, even if the local side will be sending video data. If this value is true, the remote peer will be offered to send video data, even if the local side will not be sending video data. The default behavior is to o...
Range - Web APIs
contain nodes and parts of text nodes. A range can be created by using the Document.createRange() method. Range objects can also be retrieved by using the getRangeAt() method of the Selection object or the caretRangeFromPoint() method of the Document object. There also is the Range() constructor available. Properties There are no inherited properties. Range.collapsed Read only Returns a
Boolean indicating whether the range's start and end points are at the same position. Range.commonAncestorContainer Read only Returns the deepest Node that contains the startContainer and endContainer nodes. Range.endContainer Read only Returns the Node within which the Range ends. Range.endOffset Read only Returns a number representing where in the endContainer the Range ends. Range.startConta...
... given string of code. Range.getBoundingClientRect() Returns a DOMRect object which bounds the entire contents of the Range; this would be the union of all the rectangles returned by range.getClientRects(). Range.getClientRects() Returns a list of DOMRect objects that aggregates the results of Element.getClientRects() for all the elements in the Range. Range.intersectsNode() Returns a
boolean indicating whether the given node intersects the Range. Range.isPointInRange() Returns a
boolean indicating whether the given point is in the Range. Specifications Specification Status Comment DOMThe definition of 'Range' in that specification. Living Standard Do not use RangeException anymore, use DOMException instead. Made the second parameter of col...
Response.useFinalURL - Web APIs
This property applies only to ServiceWorkers. In other contexts it will return undefined. Syntax var isfinalURL = Response.useFinalURL; Value A
Boolean indicating whether or not the URL is final rather than a redirect. ...
... The useFinalURL property of the Response interface contains a
boolean stating whether this is the final URL of the response. This property applies only to ServiceWorkers. In other contexts it will return undefined. Syntax var isfinalURL = Response.useFinalURL; Value A
Boolean indicating whether or not the URL is final rather than a redirect. Example Consider a script residing in page index.html: fetch('/test').then((r) => console.log(r.url)) test.html is being controlled by the service worker sw.js: onfetch = (e) => { e.respondWith(fetch('/page2').then((r) => { r.usefinalURL = true; return r; }) } The output will be /page2 and not /test in index.html, since setting the usefinalURL means that the response's URL is not set to request's URL. ...
Response - Web APIs
tructor, but you are more likely to encounter a Response object being returned as the result of another API operation--for example, a service worker FetchEvent.respondWith, or a simple WindowOrWorkerGlobalScope.fetch(). Constructor Response() Creates a new Response object. Properties Response.headers Read only The Headers object associated with the response. Response.ok Read only A
boolean indicating whether the response was successful (status in the range 200-299) or not. Response.redirected Read only Indicates whether or not the response is the result of a redirect (that is, its URL list has more than one entry). Response.status Read only The status code of the response. (This will be 200 for a success). Response.statusText Read only The status message corresponding to t...
...nse.statusText Read only The status message corresponding to the status code. (e.g., OK for 200). Response.trailers A Promise resolving to a Headers object, associated with the response with Response.headers for values of the HTTP Trailer header. Response.type Read only The type of the response (e.g., basic, cors). Response.url Read only The URL of the response. Response.useFinalURL A
boolean indicating whether this is the final URL of the response. Body Interface Properties Response implements Body, so it also has the following properties available to it: Body.body Read only A simple getter exposing a ReadableStream of the body contents. Body.bodyUsed Read only Stores a
Boolean that declares whether the body has been used in a response yet. Methods Response.clone() C...
ServiceWorkerRegistration.unregister() - Web APIs
on was found, otherwise it resolves to true irrespective of whether unregistration happened or not (it may not unregister if someone else just called ServiceWorkerContainer.register() with the same scope.) The service worker will finish any ongoing operations before it is unregistered. Note: This feature is available in Web Workers. Syntax serviceWorkerRegistration.unregister().then(function(
boolean) { }); Parameters None. Return value Promise resolves with a
boolean indicating whether the service worker has unregistered or not. Example The following simple example registers a service worker example, but then immediately unregisters it again: if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/sw-test/sw.js', {scope: 'sw-test'}).then(function(registration) { /...
...r has unregistered or not. Example The following simple example registers a service worker example, but then immediately unregisters it again: if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/sw-test/sw.js', {scope: 'sw-test'}).then(function(registration) { // registration worked console.log('Registration succeeded.'); registration.unregister().then(function(
boolean) { // if
boolean = true, unregister is successful }); }).catch(function(error) { // registration failed console.log('Registration failed with ' + error); }); }; Specifications Specification Status Comment Service WorkersThe definition of 'ServiceWorkerRegistration.unregister()' in that specification. Working Draft Initial definition. ...
ShadowRoot.delegatesFocus - Web APIs
Examples let customElem = document.querySelector('my-shadow-dom-element'); let shadow = customElem.shadowRoot; ... ...
... Examples let customElem = document.querySelector('my-shadow-dom-element'); let shadow = customElem.shadowRoot; ... ...
SpeechRecognitionResult.isFinal - Web APIs
Examples recognition.onresult = function(event) { // The SpeechRecognitionEvent results property returns a SpeechRecognitionResultList object // The SpeechRecognitionResultList object contains SpeechRecognitionResult objects. ...
... Examples recognition.onresult = function(event) { // The SpeechRecognitionEvent results property returns a SpeechRecognitionResultList object // The SpeechRecognitionResultList object contains SpeechRecognitionResult objects. ...
SubtleCrypto.verify() - Web APIs
The verify() method of the SubtleCrypto interface 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...
...{ "name": "HMAC" }. key is a CryptoKey containing the key that will be used to verify the signature. It is the secret key for a symmetric algorithm and the public key for a public-key system. signature is a ArrayBuffer containing the signature to verify. data is a ArrayBuffer containing the data whose signature is to be verified. Return value result is a Promise that fulfills with a
Boolean: true if the signature is valid, false otherwise. Exceptions The promise is rejected when the following exception is encountered: InvalidAccessError Raised when the encryption key is not a key for the requested verifying algorithm or when trying to use an algorithm that is either unknown or isn't suitable for a verify operation. Supported algorithms The verify() method supports the same...
TouchEvent() - Web APIs
al 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. "changedTouches", optional and defaulting to [], of type Touch[], that is a list of objects for every point of contact which contributed to the event. ...
...and started on the element that is the target of the current event. "changedTouches", optional and defaulting to [], of type Touch[], that is a list of objects for every point of contact which contributed to the event. "ctrlKey", optional and defaulting to false, of type
Boolean, that indicates if the ctrl key was simultaneously pressed. "shiftKey", optional and defaulting to false, of type
Boolean, that indicates if the shift key was simultaneously pressed. "altKey", optional and defaulting to false, of type
Boolean, that indicates if the alt key was simultaneously pressed. "metaKey", optional and defaulting to false, of type
Boolean, that indicates if the meta key was simultaneously pressed. The TouchEventInit dictionary also accepts fields from UIEventInit and from EventInit dict...
TouchEvent - Web APIs
ze="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">TouchEvent</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Constructor TouchEvent() Creates a TouchEvent object. Properties This interface inherits properties from its parent, UIEvent and Event. ...
...rits properties from its parent, UIEvent and Event. TouchEvent.altKey Read only A
Boolean value indicating whether or not the alt key was down when the touch event was fired. TouchEvent.changedTouches Read only A TouchList of all the Touch objects representing individual points of contact whose states changed between the previous touch event and this one. TouchEvent.ctrlKey Read only A
Boolean value indicating whether or not the control key was down when the touch event was fired. TouchEvent.metaKey Read only A
Boolean value indicating whether or not the meta key was down when the touch event was fired. TouchEvent.shiftKey Read only A
Boolean value indicating whether or not the shift key was down when the touch event was fired. TouchEvent.targetTouchesRead only A TouchList of ...
WebGL2RenderingContext.isSampler() - Web APIs
Examples gl must be a WebGL2RenderingContext. WebGLSampler objects are not available in WebGL 1. var sampler = gl.createSampler(); // ... ...
... Examples gl must be a WebGL2RenderingContext. WebGLSampler objects are not available in WebGL 1. var sampler = gl.createSampler(); // ... ...
WebGL2RenderingContext.isTransformFeedback() - Web APIs
Examples gl must be a WebGL2RenderingContext. WebGLTransformFeedback objects are not available in WebGL 1. var transformFeedback = gl.createTransformFeedback(); // ... ...
... Examples gl must be a WebGL2RenderingContext. WebGLTransformFeedback objects are not available in WebGL 1. var transformFeedback = gl.createTransformFeedback(); // ... ...
WebGL2RenderingContext.isVertexArray() - Web APIs
Return value A GL
boolean indicating whether the given object is a valid WebGLVertexArrayObject object (true) or not (false). Examples var vao = gl.createVertexArray(); gl.bindVertexArray(vao); // ... ...
... Examples var vao = gl.createVertexArray(); gl.bindVertexArray(vao); // ... ...
WebGLRenderingContext.depthMask() - Web APIs
Default value: true, meaning that writing is enabled. Return value None. Examples gl.depthMask(false); To get the current depth mask, query the DEPTH_WRITEMASK constant which returns a
Boolean. ...
... API sets whether writing into the depth buffer is enabled or disabled. Syntax void gl.depthMask(flag); Parameters flag A GL
boolean specifying whether or not writing into the depth buffer is enabled. Default value: true, meaning that writing is enabled. Return value None. Examples gl.depthMask(false); To get the current depth mask, query the DEPTH_WRITEMASK constant which returns a
Boolean. gl.getParameter(gl.DEPTH_WRITEMASK); // false Specifications Specification Status Comment WebGL 1.0The definition of 'depthMask' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glDepthMask' in that specification. Standard Man page of the OpenGL API. ...
WebGLRenderingContext.isEnabled() - Web APIs
Possible values: Constant Description gl.BLEND Blending of the computed fragment color values. See WebGLRenderingContext.blendFunc(). gl.CULL_FACE Culling of polygons. See WebGLRenderingContext.cullFace(). ...
...fer. See WebGLRenderingContext.stencilFunc(). When using a WebGL 2 context, the following values are available additionally: Constant Description gl.RASTERIZER_DISCARD Primitives are discarded immediately before the rasterization stage, but after the optional transform feedback stage. gl.clear() commands are ignored. Return value A GL
boolean indicating if the capability cap is enabled (true), or not (false). Examples gl.isEnabled(gl.STENCIL_TEST); // false To activate or deactivate a specific capability, use the WebGLRenderingContext.enable() and WebGLRenderingContext.disable() methods: gl.enable(gl.STENCIL_TEST); gl.disable(gl.STENCIL_TEST); Specifications Specification Status Comment WebGL 1.0The de...
Movement, orientation, and motion: A WebXR example - Web APIs
/const SESSION_TYPE = "immersive-vr"; const SESSION_TYPE = "inline"; const MOUSE_SPEED = 0.003; xRotationDegreesPerSecond The number of degrees of rotation to apply around the X axis per second. yRotationDegreesPerSecond The number of degrees to rotate around the Y axis each second. zRotationDegreesPerSecond The number of degrees per second to rotate around the Z axis. enableRotation A
Boolean indicating whether or not to enable the rotation of the cube at all. allowMouseRotation If true, you can use the mouse to pitch and yaw the view angle. allowKeyboardMotion If true, the W, A, S, and D keys move the viewer forward, left, backward, and to the right, while the up and down arrow keys move up and down. If false, only XR device changes to the view are permitted. enableForcePolyfill...
...g whether or not to enable the rotation of the cube at all. allowMouseRotation If true, you can use the mouse to pitch and yaw the view angle. allowKeyboardMotion If true, the W, A, S, and D keys move the viewer forward, left, backward, and to the right, while the up and down arrow keys move up and down. If false, only XR device changes to the view are permitted. enableForcePolyfill If this
Boolean is true, the example will attempt to use the WebXR polyfill even if the browser actually has support for WebXR. If false, the polyfill is only used if the browser doesn't implement navigator.xr. SESSION_TYPE The type of XR session to create: inline for an inline session presented in the context of the document and immersive-vr to present the scene to an immersive VR headset. MOUSE_SPEED A mul...
WindowOrWorkerGlobalScope.isSecureContext - Web APIs
Syntax var isItSecure = self.isSecureContext; // or just isSecureContext Value A
Boolean. ...
... The isSecureContext read-only property of the WindowOrWorkerGlobalScope interface returns a
boolean indicating whether the current context is secure (true) or not (false). Syntax var isItSecure = self.isSecureContext; // or just isSecureContext Value A
Boolean. Specifications Specification Status Comment Secure ContextsThe definition of 'WindowOrWorkerGlobalScope.isSecureContext' in that specification. Candidate Recommendation Initial definition. ...
WindowOrWorkerGlobalScope - Web APIs
ined on the WindowOrWorkerGlobalScope mixin, and implemented by Window and WorkerGlobalScope. WindowOrWorkerGlobalScope.caches Read only Returns the CacheStorage object associated with the current context. This object enables functionality such as storing assets for offline use, and generating custom responses to requests. ...
... WindowOrWorkerGlobalScope.origin Read only Returns the origin of the global scope, serialized as a string. Methods These methods are defined on the WindowOrWorkerGlobalScope mixin, and implemented by Window and WorkerGlobalScope. ...
WorkerGlobalScope.self - Web APIs
etc. This provides a full list of the objects available to that worker scope, so it is quite a useful test if you want to...
...etc. This provides a full list of the objects available to that worker scope, so it is quite a useful test if you want to see whether somet...
XPathResult - Web APIs
The XPathResult interface represents the results generated by evaluating an XPath expression within the context of a given node. Since XPath expressions can result in a variety of result types, this interface makes it possible to determine and handle the type and value of the result. Properties XPathResult.
booleanValueRead only A
boolean representing the value of the result if resultType is
BOOLEAN_TYPE. XPathResult.invalidIteratorStateRead only Signifies that the iterator has become invalid. It is true if resultType is UNORDERED_NODE_ITERATOR_TYPE or ORDERED_NODE_ITERATOR_TYPE and the document has been modified since this result was returned. XPathResult.numberValueRead only A number representing the value of the result if resultType is NUMBER_TYPE. XPathResult.resultTypeRead only ...
...containing whatever type naturally results from evaluation of the expression. Note that if the result is a node-set then UNORDERED_NODE_ITERATOR_TYPE is always the resulting type. NUMBER_TYPE 1 A result containing a single number. This is useful for example, in an XPath expression using the count() function. STRING_TYPE 2 A result containing a single string.
BOOLEAN_TYPE 3 A result containing a single
boolean value. This is useful for example, in an XPath expression using the not() function. UNORDERED_NODE_ITERATOR_TYPE 4 A result node-set containing all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document. ORDERED_NODE_ITERATOR_TYPE 5 A result node-set cont...
XRPose.emulatedPosition - Web APIs
If the position is precisely gbased on direct sensor inputs, the value is false. Usage notes There are two basic categories of XR tracking systems. A basic XR headset provides three degrees of freedom (3DoF), tracking the pitch, yaw, and roll of the user's head. ...
...If the position is precisely gbased on direct sensor inputs, the value is false. Usage notes There are two basic categories of XR tracking systems. A basic XR headset provides three degrees of freedom (3DoF), tracking the pitch, yaw, and roll of the user's head. ...
XRWebGLLayer.antialias - Web APIs
Otherwise, this property is false. When the WebXR compositor is enabled, this value corresponds to the value of the antialias property on the object returned by the WebGL context's getContentAttributes() method. ...
...Otherwise, this property is false. When the WebXR compositor is enabled, this value corresponds to the value of the antialias property on the object returned by the WebGL context's getContentAttributes() method. ...
XRWebGLLayer.ignoreDepthValues - Web APIs
The read-only XRWebGLLayer property ignoreDepthValues is a
Boolean value which is true if the session has been configured to ignore the values in the depth buffer while rendering the scene. If the depth buffer is being used to determine the position of vertices, this property is false. The value of ignoreDepthValues can only be set when the XRWebGLLayer is instantiated, by setting the corresponding value in the XRWebGLLayerInit object specified as the constructor's layerInit parameter. As a parameter you're likely to set yourself, it is unlikely you'll need to read it later, but it's available if the need arises. ...
...f ignoreDepthValues can only be set when the XRWebGLLayer is instantiated, by setting the corresponding value in the XRWebGLLayerInit object specified as the constructor's layerInit parameter. As a parameter you're likely to set yourself, it is unlikely you'll need to read it later, but it's available if the need arises. Syntax let ignoringDepthBuffer = xrWebGLLayer.ignoreDepthValues; Value A
Boolean value which is true if the WebGL context's depth buffer is being used while computing the locations of points in the 3D world. Otherwise, if this is true, the depth buffer's values are being used to assist in placing objects in the scene. Since the XR compositor uses the depth buffer by default, this value is false unless explicitly set otherwise when creating the XRWebGLLayer using its construct...
XRWebGLLayer - Web APIs
d by WebGL, it's entirely possible that future updates to the WebXR specification may allow for other layer types and corresponding image sources. Constructor new XRWebGLLayer() Creates and returns a new XRWebGLLayer object for use by the specified XRSession, using a particular WebGLRenderingContext or WebGL2RenderingContext as the destination context. Properties antialias Read only A
Boolean value indicating whether or not the WebGL context's framebuffer supports anti-aliasing. The specific type of anti-aliasing is determined by the user agent. framebuffer Read only Returns a WebGLFramebuffer suitable for passing into the bindFrameBuffer() method. framebufferWidth Read only Returns the width of the XRWebGLLayer's framebuffer. framebufferHeight Read only Returns the height of...
...uffer supports anti-aliasing. The specific type of anti-aliasing is determined by the user agent. framebuffer Read only Returns a WebGLFramebuffer suitable for passing into the bindFrameBuffer() method. framebufferWidth Read only Returns the width of the XRWebGLLayer's framebuffer. framebufferHeight Read only Returns the height of the layer's framebuffer. ignoreDepthValues Read only A
Boolean which Indicates whether or not the WebXR compositor should make use of the contents of the layer's depth buffer while compositing the scene. Methods getViewport() Returns a new XRViewport instance representing the position, width, and height to which the WebGL context's viewport must be set to contain drawing to the area of the framebuffer designated for the specified view's contents. In th...
XRWebGLLayerInit.alpha - Web APIs
Example In this example, a new XRWebGLLayer is created for a WebXR session, xrSession, without an alpha channel. ...
...it dictionary passed into the XRWebGLLayer() constructor, specifies that the new layer's color buffer is to include an alpha channel. Otherwise, the color buffer won't have an alpha channel. The default is true. Syntax let layerInit = { alpha: boolValue }; let glLayer = new XRWebGLLayer(xrSession, gl, layerInit); let glLayer = new XRWebGLLayer(xrSession, gl, { alpha: boolValue }); Value A
Boolean which can be set to true to request that the new WebGL layer for rendering the WebXR scene is to have an alpha channel. Example In this example, a new XRWebGLLayer is created for a WebXR session, xrSession, without an alpha channel. xrSession.updateRenderState({ baseLayer: new XRWebGLLayer(xrSession, gl, { alpha: false }); }); Specifications Specification Status Comm...
XRWebGLLayerInit.antialias - Web APIs
If false, anti-aliasing is not desired. ...
...ort anti-aliasing. If this property is missing or is false, anti-aliasing is not desired. There is no way to request a specific anti-aliasing format or level; this decision is left up to the user agent. Syntax let layerInit = { antialias: boolValue }; let glLayer = new XRWebGLLayer(xrSession, gl, layerInit); let glLayer = new XRWebGLLayer(xrSession, gl, { antialias: boolValue }); Value A
Boolean value which can be set to true to request anti-aliasing support in the new WebGL rendering layer. If false, anti-aliasing is not desired. Usage notes The state of anti-aliasing for the context after being created can be read from the XRWebGLLayer property antialias. Example In this example, before creating a new XRWebGLLayer to use for rendering, the value of a user preference from a configur...
XRWebGLLayerInit.ignoreDepthValues - Web APIs
The depth buffer is typically used to assist in ordering vertices and, by extension, polygons while compositing, to ensure that the scene is correctly composited, with objects the correct distance away and with clipping and other distance-related computations performed as accurately as possible. Without the depth buffer, these computations must rely entirely on the coordinates of each pixel. ...
...ixel. This property differs from depth in that depth requests a WebGL layer that does not have a depth buffer at all, while ignoreDepthValues merely asks that the depth layer be ignored. Syntax let layerInit = { ignoreDepthValues: boolValue }; let glLayer = new XRWebGLLayer(xrSession, gl, layerInit); let glLayer = new XRWebGLLayer(xrSession, gl, { ignoreDepthValues: boolValue }); Value A
Boolean value which can be set to true to disable the use of the depth buffer by the WebGL rendering layer created by the XRWebGLLayer() constructor. The default value, false, means the depth buffer will be used, if available. Usage notes If ignoreDepthValues is true, the WebXR compositor will ignore the contents of the depth buffer, if it exists, while compositing and rendering the scene. If false, th...
Web APIs
nparsedValue CSSValue CSSValueList CSSVariableReferenceValue Cache CacheStorage CanvasCaptureMediaStreamTrack CanvasGradient CanvasImageSource CanvasPattern CanvasRenderingContext2D CaretPosition ChannelMergerNode ChannelSplitterNode CharacterData ChildNode Client Clients Clipboard ClipboardEvent ClipboardItem CloseEvent Comment CompositionEvent ConstantSourceNode Constrain
Boolean 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...
...Observer ReportingObserverOptions Request RequestDestination ResizeObserver ResizeObserverEntry Response RsaHashedImportParams RsaHashedKeyGenParams RsaOaepParams RsaPssParams S SVGAElement SVGAltGlyphDefElement SVGAltGlyphElement SVGAltGlyphItemElement SVGAngle SVGAnimateColorElement SVGAnimateElement SVGAnimateMotionElement SVGAnimateTransformElement SVGAnimatedAngle SVGAnimated
Boolean SVGAnimatedEnumeration SVGAnimatedInteger SVGAnimatedLength SVGAnimatedLengthList SVGAnimatedNumber SVGAnimatedNumberList SVGAnimatedPoints SVGAnimatedPreserveAspectRatio SVGAnimatedRect SVGAnimatedString SVGAnimatedTransformList SVGAnimationElement SVGCircleElement SVGClipPathElement SVGColorProfileElement SVGComponentTransferFunctionElement SVGCursorElement SVGDefsElement SVGDescElement SVGEl...
@import - CSS: Cascading Style Sheets
'='? <mf-value> | <mf-value> [ '<' | '>' ]? '='? <mf-name> | <mf-value> '<' '='? <mf-name> '<' '='? <mf-value> | <mf-value> '>' '='? <mf-name> '>' '='? <mf-value>where <mf-name> = <ident><mf-value> ...
...'='? <mf-value> | <mf-value> [ '<' | '>' ]? '='? <mf-name> | <mf-value> '<' '='? <mf-name> '<' '='? ...
-webkit-animation - CSS: Cascading Style Sheets
Values true The browser supports -webkit prefixed CSS animations. false The browser doesn't support these prefixed CSS animations. ...
... Values true The browser supports -webkit prefixed CSS animations. false The browser doesn't support these prefixed CSS animations. ...
-webkit-transform-3d - CSS: Cascading Style Sheets
Values true The browser supports the 3D CSS transforms with the -webkit prefix. false The 3D CSS transforms prefixed with -webkit are not supported by the browser. ...
... Values true The browser supports the 3D CSS transforms with the -webkit prefix. false The 3D CSS transforms prefixed with -webkit are not supported by the browser. ...
@media - CSS: Cascading Style Sheets
'='? <mf-value> | <mf-value> [ '<' | '>' ]? '='? <mf-name> | <mf-value> '<' '='? <mf-name> '<' '='? <mf-value> | <mf-value> '>' '='? <mf-name> '>' '='? <mf-value>where <mf-name> = <ident><mf-value> ...
...'='? <mf-value> | <mf-value> [ '<' | '>' ]? '='? <mf-name> | <mf-value> '<' '='? <mf-name> '<' '='? ...
Box-shadow generator - CSS: Cascading Style Sheets
false : true; } Shadow.prototype.copy = function copy(obj) { if(obj instanceof Shadow !== true) { console.log("Typeof instance not Shadow"); return; } this.inset = obj.inset; this.posX = obj.posX; this.posY = obj.posY; this.blur = obj.blur; this.spread = obj.spread; this.color.copy(obj.color); ...
... '-webkit-transform', cssvalue); OutputManager.updateProperty(this.id, '-ms-transform', cssvalue); this.rotate = value; } CssClass.prototype.setzIndex = function setzIndex(value) { this.node.style.zIndex = value; OutputManager.updateProperty(this.id, 'z-index', value); this.zIndex = value; } CssClass.prototype.toggleDisplay = function toggleDisplay(value) { if (typeof value !== "
boolean" || this.display === value) return; this.display = value; var display = this.display === true ? "block" : "none"; this.node.style.display = display; this.object.style.display = display; } CssClass.prototype.toggleBorder = function toggleBorder(value) { if (typeof value !== "
boolean" || this.border === value) return; this.border = value; var border = this.border === true ?
Creating a cross-browser video player - Developer guides
thod, so to mimic this the video is paused, and its currentTime (i.e. the video's current playing position) and the <progress> element's position is set to 0 (more on the <progress> element later). Mute mute.addEventListener('click', function(e) { video.muted = !video.muted; }); The mute button is a simple toggle button that uses the Media API's muted attribute to mute the video: this is a
Boolean indicating whether the video is muted or not. To get it to toggle, we set it to the inverse of itself. Volume volinc.addEventListener('click', function(e) { alterVolume('+'); }); voldec.addEventListener('click', function(e) { alterVolume('-'); }); Two volume control buttons have been defined, one for increasing the volume and another for decreasing it. A user defined function, alterVolu...
...The final tested value, document.createElement('video').webkitRequestFullScreen is required for the last Presto version of Opera (12.14). Note the different letter casing in the various values. The visibility of the fullscreen button depends on whether the browser supports the Fullscreen API and that it is enabled: if (!fullScreenEnabled) { fullscreen.style...
Constraint validation - Developer guides
valueMissing constraint violation step date An integer number of days Unless the step is set to the any literal, the value must be min + an integral multiple of the step. stepMismatch constraint violation month An integer number of months week An integer n...
...t itself. The constraint validation is done in the following ways: By a call to the checkValidity() or reportValidity() method of a form-associated DOM interface, (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, HTMLOutputElement or HTMLTextAreaElement), which evaluates the constraints only on this element, allowing a script to get this information. The checkValidity() method returns a
Boolean indicating whether the element's value passes its constraints. (This is typically done by the user-agent when determining which of the CSS pseudo-classes, :valid or :invalid, applies.) In contrast, the reportValidity() method reports any constraint failures to the user. By a call to the checkValidity() or reportValidity() method on the HTMLFormElement interface. By submitting the form itself. ...
disabled - HTML: Hypertext Markup Language
The
Boolean disabled attribute, when present, makes the element not mutable, focusable, or even submitted with the form. The user can neither edit nor focus on the control, nor it's form control descendants. If the disabled attribute is specified on a form control, the element and its form control descendants do not participate in constraint validation. Often browsers grey out such controls and it won't receive any browsing events, like mouse clicks or focus-related ones. The disabled attribute is supported by <button>, <command>, <fieldset>, <keygen>, <optgroup>, <option>, <select>, <textarea> and <input>. This
Boolean disabled attribute indicates that the user cannot interact with the control or it's descendant controls. If this attribute is not specified, the control inherits its set...
...up are selectable. Note: If a <fieldset> is disabled, the descendant form controls are all disabled, with the exception of form controls within the <legend>. When a supporting element has the disabled attribute applied, the :disabled pseudo-class also applies to it. Conversely, elements that support the disabled attribute but don't have the attribute set match the :enabled pseudo-class. This
Boolean attribute prevents the user from interacting with the button. If this attribute isn't set, the button can still be disabled from a containing element, for example <fieldset>; if there is no containing element with the disabled attribute set, then the button is enabled. Firefox will, unlike other browsers, persist the dynamic disabled state of a <button> across page loads. Use the autocomplete at...
<details>: The Details disclosure element - HTML: Hypertext Markup Language
mmary> element followed by flow content. Tag omission None, both the starting and ending tag are mandatory. Permitted parents Any element that accepts flow content. Implicit ARIA role group Permitted ARIA roles No role permitted DOM interface HTMLDetailsElement Attributes This element includes the global attributes. open This
Boolean attribute indicates whether or not the details -- that is, the contents of the <details> element -- are currently visible. The default, false, means the details are not visible. Events In addition to the usual events supported by HTML elements, the <details> element supports the toggle event, which is dispatched to the <details> element whenever its state changes between open and closed. It is...
...details> <summary>System Requirements</summary> <p>Requires a computer running an operating system. The computer must have some memory and ideally some kind of long-term storage. An input device as well as some form of output device is recommended.</p> </details> The result from this HTML is this: Creating an open disclosure box To start the <details> box in its open state, add the
Boolean open attribute: <details open> <summary>System Requirements</summary> <p>Requires a computer running an operating system. The computer must have some memory and ideally some kind of long-term storage. An input device as well as some form of output device is recommended.</p> </details> This results in: Customizing the appearance Now let's apply some CSS to customize the appearance ...
<input type="checkbox"> - HTML: Hypertext Markup Language
wanted to submit a default value for the checkbox when it is unchecked, you could include an <input type="hidden"> inside the form with the same name and value, generated by JavaScript perhaps. ...
...ude an <input type="hidden"> inside the form with the same name and value, generated by JavaScript perhaps. Additional attributes In addition to the common attributes shared by all <input> elements, "checkbox" inputs support the following attributes: Attribute Description checked
Boolean; if present, the checkbox is toggled on by default indeterminate A
Boolean which, if present, indicates that the value of the checkbox is indeterminate rather than true or false value The string to use as the value of the checkbox when submitting the form, if the checkbox is currently toggled on checked A
Boolean attribute indicating whether or not this checkbox is checked by default (when the page loads). It does not indicate whether this checkbox i...
<input type="month"> - HTML: Hypertext Markup Language
The <datalist> provides a list of predefined values to suggest to the user for this input. Any values in the list...
...atest year and month to accept, in the same "yyyy-MM" format described above. If the value of the element is less than this, the element fails constraint validation. If a value is specified for min that isn't a valid year and month string, the input has no minimum value. This value must be a year-month pairing which is earlier than or equal to the one specified by the max attribute. readonly A
Boolean attribute which, if present, means this field cannot be edited by the user. Its value can, however, still be changed from JavaScript code that directly sets the value of the HTMLInputElement.value property. Note: Because a read-only field cannot have a value, required does not have any effect on inputs with the readonly attribute also specified. step The step attribute is a number that speci...
<input type="number"> - HTML: Hypertext Markup Language
The <datalist> provides a list of predefined values to suggest to the user for this input. Any values in the list th...
... BiDi using Unicode control characters in The Unicode Bidirectional Text Algorithm for those characters. Note: Avoid using the placeholder attribute if you can. It is not as semantically useful as other ways to explain your form, and can cause unexpected technical issues with your content. See Labels and placeholders in <input>: The Input (Form Input) element for more information. readonly A
Boolean attribute which, if present, means this field cannot be edited by the user. Its value can, however, still be changed by JavaScript code directly setting the HTMLInputElement.value property. Note: Because a read-only field cannot have a value, required does not have any effect on inputs with the readonly attribute also specified. step The step attribute is a number that specifies the granula...
<input type="submit"> - HTML: Hypertext Markup Language
tton inputs support the following attributes: Attribute Description formaction The URL to which to submit the form's data; overrides the form's action attribute, if any formenctype A string specifying the encoding type to use for the form data formmethod The HTTP method (get or post) to use when submitting the form. formnovalidate A
Boolean which, if present, means the form's fields will not be subjected to constraint validation before submitting the data to the server formtarget The browsing context into which to load the response returned by the server after submitting the form formaction A string indicating the URL to which to submit the data. This takes precedence over the action attribute on the <form> eleme...
...o the URL given by the formaction or action attribute using an HTTP post method. This method supports complex data and file attachments. dialog This method is used to indicate that the button simply closes the dialog with which the input is associated, and does not transmit the form data at all. This attribute is also available on <input type="image"> and <button> elements. formnovalidate A
Boolean attribute which, if present, specifies that the form should not be validated before submission to the server. This overrides the value of the novalidate attribute on the element's owning form. This attribute is also available on <input type="image"> and <button> elements. formtarget A string which specifies a name or keyword that indicates where to display the response received after submittin...
<input type="tel"> - HTML: Hypertext Markup Language
The <datalist> provides a list of predefined values to suggest to the user for this input. Any values in the list ...
... BiDi using Unicode control characters in The Unicode Bidirectional Text Algorithm for those characters. Note: Avoid using the placeholder attribute if you can. It is not as semantically useful as other ways to explain your form, and can cause unexpected technical issues with your content. See Labels and placeholders in <input>: The Input (Form Input) element for more information. readonly A
Boolean attribute which, if present, means this field cannot be edited by the user. Its value can, however, still be changed by JavaScript code directly setting the HTMLInputElement.value property. Note: Because a read-only field cannot have a value, required does not have any effect on inputs with the readonly attribute also specified. size The size attribute is a numeric value indicating how many ...
<input type="text"> - HTML: Hypertext Markup Language
ons maxlength The maximum number of characters the input should accept minlength The minimum number of characters long the input can be and still be considered valid pattern A regular expression the input's contents must match in order to be valid placeholder An exemplar value to display in the input field whenever it is empty readonly A
Boolean attribute indicating whether or not the contents of the input should be read-only size A number indicating how many characters wide the input field should be spellcheck Controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used list The values of the list attribute is the id of a <datalist> el...
... BiDi using Unicode control characters in The Unicode Bidirectional Text Algorithm for those characters. Note: Avoid using the placeholder attribute if you can. It is not as semantically useful as other ways to explain your form, and can cause unexpected technical issues with your content. See Labels and placeholders in <input>: The Input (Form Input) element for more information. readonly A
Boolean attribute which, if present, means this field cannot be edited by the user. Its value can, however, still be changed by JavaScript code directly setting the HTMLInputElement.value property. Note: Because a read-only field cannot have a value, required does not have any effect on inputs with the readonly attribute also specified. size The size attribute is a numeric value indicating how many ...
<input type="time"> - HTML: Hypertext Markup Language
For example,...
...de a different value. max A string indicating the latest time to accept, specified in the same time value format as described above. If the specified string isn't a valid time, no maximum value is set. min A string specifying the earliest time to accept, given in the time value format described previously. If the value specified isn't a valid time string, no minimum value is set. readonly A
Boolean attribute which, if present, means this field cannot be edited by the user. Its value can, however, still be changed by JavaScript code directly setting the HTMLInputElement.value property. Note: Because a read-only field cannot have a value, required does not have any effect on inputs with the readonly attribute also specified. step The step attribute is a number that specifies the granular...
<input type="url"> - HTML: Hypertext Markup Language
ons maxlength The maximum number of characters the input should accept minlength The minimum number of characters long the input can be and still be considered valid pattern A regular expression the input's contents must match in order to be valid placeholder An exemplar value to display in the input field whenever it is empty readonly A
Boolean attribute indicating whether or not the contents of the input should be read-only size A number indicating how many characters wide the input field should be spellcheck Controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used list The values of the list attribute is the id of a <datalist> el...
... BiDi using Unicode control characters in The Unicode Bidirectional Text Algorithm for those characters. Note: Avoid using the placeholder attribute if you can. It is not as semantically useful as other ways to explain your form, and can cause unexpected technical issues with your content. See Labels and placeholders in <input>: The Input (Form Input) element for more information. readonly A
Boolean attribute which, if present, means this field cannot be edited by the user. Its value can, however, still be changed by JavaScript code directly setting the HTMLInputElement.value property. Note: Because a read-only field cannot have a value, required does not have any effect on inputs with the readonly attribute also specified. size The size attribute is a numeric value indicating how many ...
<input type="week"> - HTML: Hypertext Markup Language
If the value entered into the element exceeds this, the elemen...
...e must be greater than or equal to the year and week specified by the min attribute. min The earliest year and week to accept. If the value of the element is less than this, the element fails constraint validation. If a value is specified for min that isn't a valid week string, the input has no minimum value. This value must be less than or equal to the value of the max attribute. readonly A
Boolean attribute which, if present, means this field cannot be edited by the user. Its value can, however, still be changed by JavaScript code directly setting the HTMLInputElement.value property. Note: Because a read-only field cannot have a value, required does not have any effect on inputs with the readonly attribute also specified. step The step attribute is a number that specifies the granular...
<menuitem> - HTML: Hypertext Markup Language
cified, the type attribute of the <menu> element must be popup; if missing, the parent element of the <menu> must itself be a <menu> in the popup menu state.) Permitted ARIA roles None DOM interface HTMLMenuItemElement Attributes This element includes the global attributes; in particular title can be used to describe the command, or provide usage hints. ...
... or provide usage hints. checked
Boolean attribute which indicates whether the command is selected. May only be used when the type attribute is checkbox or radio. command Specifies the ID of a separate element, indicating a command to be invoked indirectly. May not be used within a menu item that also includes the attributes checked, disabled, icon, label, radiogroup or type. default This
Boolean attribute indicates use of the same command as the menu's subject element (such as a button or input). disabled
Boolean attribute which indicates that the command is not available in the current state. Note that disabled is distinct from hidden; the disabled attribute is appropriate in any context where a change in circumstances might render the command relevant. icon Image URL, used to provi...
<object> - HTML: Hypertext Markup Language
path used to resolve relative URIs specified by classid, data, or archive. If not specified, the default is the base URI of the current document. codetypeHTML 4 onlyObsolete since HTML5 The content type of the data specified by classid. data The address of the resource as a valid URL. At least one of data and type must be defined. declareHTML 4 onlyObsolete since HTML5 The presence of this
Boolean attribute makes this element a declaration only. The object must be instantiated by a subsequent <object> element. In HTML5, repeat the <object> element completely each that that the resource is reused. formHTML5 The form element, if any, that the object element is associated with (its form owner). The value of the attribute must be an ID of a <form> element in the same document. height The h...
... (HTML 4). standbyHTML 4 onlyObsolete since HTML5 A message that the browser can show while loading the object's implementation and data. tabindexHTML 4 onlyObsolete since HTML5 The position of the element in the tabbing navigation order for the current document. type The content type of the resource specified by data. At least one of data and type must be defined. typemustmatchHTML5 This
Boolean attribute indicates if the type attribute and the actual content type of the resource must match to be used. usemap A hash-name reference to a <map> element; that is a '#' followed by the value of a name of a map element. width The width of the display resource, in CSS pixels. -- (Absolute values only. NO percentages) Examples Embed a flash movie <!-- Embed a flash movie --> <object data=...
<option>: The HTML Option element - HTML: Hypertext Markup Language
followed by another <option> element or an <optgroup>, or if the parent element has no more content. Permitted parents A <select>, an <optgroup> or a <datalist> element. Implicit ARIA role option Permitted ARIA roles No role permitted DOM interface HTMLOptionElement Attributes This element includes the global attributes. disabled If this
Boolean attribute is set, this option is not checkable. Often browsers grey out such control and it won't receive any browsing event, like mouse clicks or focus-related ones. If this attribute is not set, the element can still be disabled if one of its ancestors is a disabled <optgroup> element. label This attribute is text for the label indicating the meaning of the option. If the label attribute isn'...
...and it won't receive any browsing event, like mouse clicks or focus-related ones. If this attribute is not set, the element can still be disabled if one of its ancestors is a disabled <optgroup> element. label This attribute is text for the label indicating the meaning of the option. If the label attribute isn't defined, its value is that of the element text content. selected If present, this
Boolean attribute indicates that the option is initially selected. If the <option> element is the descendant of a <select> element whose multiple attribute is not set, only one single <option> of this <select> element may have the selected attribute. value The content of this attribute represents the value to be submitted with the form, should this option be selected. If this attribute is omitted, the ...
HTTP headers - HTTP
ixels of the selected image response. DPR A number that indicates the client's current Device Pixel Ratio (DPR), which is the ratio of physical pixels over CSS pixels (Section 5.2 of [CSSVAL]) of the layout viewport (Section 9.1.1 of [CSS2]) on the device. Device-Memory Technically a part of Device Memory API, this header represents an approximate amount of RAM client has. Save-Data A
boolean that indicates the user agent's preference for reduced data usage. Viewport-Width A number that indicates the layout viewport width in CSS pixels. The provided pixel value is a number rounded to the smallest following integer (i.e. ceiling value). If Viewport-Width occurs in a message more than once, the last value overrides all previous occurrences. Width The Width requ...
...one. Sec-Fetch-Mode It is a request header that indicates the request's mode to a server. It is a Structured Header whose value is a token with possible values cors, navigate, nested-navigate, no-cors, same-origin, and websocket. Sec-Fetch-User It is a request header that indicates whether or not a navigation request was triggered by user activation. It is a Structured Header whose value is a
boolean so possible values are ?0 for false and ?1 for true. Sec-Fetch-Dest It is a request header that indicates the request's destination to a server. It is a Structured Header whose value is a token with possible values audio, audioworklet, document, embed, empty, font, image, manifest, object, paintworklet, report, script, serviceworker, sharedworker, style, track, video, worker, xslt, and nested-d...
Equality comparisons and sameness - JavaScript
rsions), the final equality comparison is performed exactly as === performs it. Loose equality is symmetric: A == B always has identical semantics to B == A for any values of A and B (except for the order of applied conversions). ...
...Its behavior is equivalent to +A (the unary + operator). T...
TypeError: can't assign to property "x" on "y": not an object - JavaScript
Primitive values cannot hold any property. ...
...Primitive values cannot hold any property. The problem might be that an unexpected value is flowing at an unexpected place, or that an object variant of a String or a Number is expected. Examples Invalid cases 'use strict'; var foo = "my string"; // The following line does nothing if not in strict mode. ...
Array.prototype.every() - JavaScript
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. Syntax arr.every(callback(element[, index[, array]])[, thisArg]) Parameters callback A function to test for each element, taking three arguments: element The current element being processed in the array. index Optional The index of the current element being processed in the array. ...
...[k]; // ii. Let testResult be the result of calling the Call internal method // of callbackfn with T as the this value if T is not undefined // else is the result of calling callbackfn // and argument list containing kValue, k, and O. if(T) testResult = callbackfn.call(T, kValue, k, O); else testResult = callbackfn(kValue,k,O) // iii. If To
Boolean(testResult) is false, return false. if (!testResult) { return false; } } k++; } return true; }; } Examples Testing size of all array elements The following example tests whether all elements in the array are bigger than 10. function isBigEnough(element, index, array) { return element >= 10; } [12, 5, 8, 130, 44].every(isBigEnough); // false...
Object.prototype.constructor - JavaScript
{ this.name = name } Changing the constructor of an object The following example shows how to modify the constructor value of generic objects. Only true, 1, and "test" will not be affected (as they have read-only native constructors). This example shows that it is not always safe to rely on the constructor property of an object. ...
...i] = [types[i].constructor, types[i] instanceof Type, types[i].toString()] } console.log(types.join('\n')) This example displays the following output (comments added for reference): function Type() {},false, // new Array() function Type() {},false, // [] function Type() {},false,false // new
Boolean() function
Boolean() { [native code] },false,true // true function Type() {},false,Mon Sep 01 2014 16:03:49 GMT+0600 // new Date() function Type() {},false,Error // new Error() function Type() {},false,function anonymous() { } // new Function() functi...
Object.prototype.propertyIsEnumerable() - JavaScript
Description Every object has a propertyIsEnumerable method. ...
...ed property is enumerable and is the object's own property. 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. Syntax obj.propertyIsEnumerable(prop) Parameters prop The name of the property to test. Return value A
Boolean indicating whether the specified property is enumerable and is the object's own property. Description Every object has a propertyIsEnumerable method. This method can determine whether the specified property in an object can be enumerated by a for...in loop, with the exception of properties inherited through the prototype chain. If the object does not have the specified property, this method ret...
RegExp.prototype.test() - JavaScript
se clone https://github.com/mdn/interactive-examples and send us a pull request. Syntax regexObj.test(str) Parameters str The string against which to match the regular expression. Returns true if there is a match between the regular expression and the string str. Otherwise, false. Description Use test() whenever you want to know whether a pattern is found in a string. test() returns a
boolean, unlike the String.prototype.search() method (which returns the index of a match, or -1 if not found). To get more information (but with slower execution), use the exec() method. (This is similar to the String.prototype.match() method.) As with exec() (or in combination with it), test() called multiple times on the same global regular expression instance will advance past the previous match. E...
...ormation (but with slower execution), use the exec() method. (This is similar to the String.prototype.match() method.) As with exec() (or in combination with it), test() called multiple times on the same global regular expression instance will advance past the previous match. Examples Using test() Simple example that tests if "hello" is contained at the very beginning of a string, returning a
boolean result. const str = 'hello world!'; const result = /^hello/.test(str); console.log(result); // true The following example logs a message which depends on the success of the test: function testInput(re, str) { let midstring; if (re.test(str)) { midstring = 'contains'; } else { midstring = 'does not contain'; } console.log(`${str} ${midstring} ${re.source}`); } Using test()...
Symbol - JavaScript
If you really want to create a Symbol wrapper object, you can use the Object() function: let sym = Symbol('foo') typeof sym // "symbol" let symObj = Object(sym) typeof symObj // "object" Shared symbols in the global symbol registry The above syntax using the Symbol() function will not create a global symbol that is available in your whole codebase. To crea...
...tes a new Symbol object. It is incomplete as a constructor because it does not support the syntax "new Symbol()". Static properties Symbol.asyncIterator A method that returns the default AsyncIterator for an object. Used by for await...of. Symbol.hasInstance A method determining if a constructor object recognizes an object as its instance. Used by instanceof. Symbol.isConcatSpreadable A
Boolean value indicating if an object should be flattened to its array elements. Used by Array.prototype.concat(). Symbol.iterator A method returning the default iterator for an object. Used by for...of. Symbol.match A method that matches against a string, also used to determine if an object may be used as a regular expression. Used by String.prototype.match(). Symbol.matchAll A method that returns...
WeakMap.prototype.has() - JavaScript
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. Syntax wm.has(key); Parameters key Required. The key of the element to test for presence in the WeakMap object. Return value
Boolean Returns true if an element with the specified key exists in the WeakMap object; otherwise false. ...
...xists in the WeakMap object or not. 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. Syntax wm.has(key); Parameters key Required. The key of the element to test for presence in the WeakMap object. Return value
Boolean Returns true if an element with the specified key exists in the WeakMap object; otherwise false. Examples Using the has method var wm = new WeakMap(); wm.set(window, 'foo'); wm.has(window); // returns true wm.has('baz'); // returns false Specifications Specification ECMAScript (ECMA-262)The definition of 'WeakMap.prototype.has' in that specification. ...
Lexical grammar - JavaScript
enum The following are only reserved when they are found in strict mode code: implements interface let package private protected public static The following are only reserved when they are found in module code: await Future reserved keywords in older standards The following are reserved as future keywords by older ECMAScript specifications (ECMAScript 1 till 3). abstract
boolean byte char double final float goto int long native short synchronized throws transient volatile Additionally, the literals null, true, and false cannot be used as identifiers in ECMAScript. Reserved word usage Reserved words actually only apply to Identifiers (vs. IdentifierNames) . As described in es5.github.com/#A.1, these are all IdentifierNames which do not exclude ReservedWo...
...tion, FunctionExpression, VariableDeclaration and so on. IdentifierNames are used for MemberExpression, CallExpression and so on. function import() {} // Illegal. Identifiers with special meanings A few identifiers have a special meaning in some contexts without being keywords of any kind. They include: arguments get set Literals Null literal See also null for more information. null
Boolean literal See also
Boolean for more information. true false Numeric literals The Number and BigInt types use numeric literals. Decimal 1234567890 42 // Caution when using with a leading zero: 0888 // 888 parsed as decimal 0777 // parsed as octal, 511 in decimal Note that decimal literals can start with a zero (0) followed by another decimal digit, but If all digits after the leading 0 are ...
Addition (+) - JavaScript
tor (+) produces the sum of numeric operands or string concatenation. 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. ...
... string concatenation. 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. Syntax Operator: x + y Examples Numeric addition // Number + Number -> addition 1 + 2 // 3 //
Boolean + Number -> addition true + 1 // 2 //
Boolean +
Boolean -> addition false + false // 0 String concatenation // String + String -> concatenation 'foo' + 'bar' // "foobar" // Number + String -> concatenation 5 + 'foo' // "5foo" // String +
Boolean -> concatenation 'foo' + false // "foofalse" Specifications Specification ECMAScript (ECMA-262)The definition of 'Addition operator' in that specification. ...
Addition assignment (+=) - JavaScript
e 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. ...
...ke to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Syntax Operator: x += y Meaning: x = x + y Examples Using addition assignment // Assuming the following variables // foo = 'foo' // bar = 5 // baz = true // Number + Number -> addition bar += 2 // 7 //
Boolean + Number -> addition baz += 1 // 2 //
Boolean +
Boolean -> addition baz += false // 1 // Number + String -> concatenation bar += 'foo' // "5foo" // String +
Boolean -> concatenation foo += false // "foofalse" // String + String -> concatenation foo += 'bar' // "foobar" Specifications Specification ECMAScript (ECMA-262)The definition of 'Assignment operators' in that specification. ...
Less than (<) - JavaScript
cription The operands are compared using the Abstract Relational Comparison algorithm, which is roughly summarised below: First, objects are converted to primitives using Symbol.ToPrimitive. If both values are strings, they are compared as strings, based on the values of the Unicode code points they contain. Otherwise JavaScript attempts to convert non-numeric types to numeric values:
Boolean values true and false are converted to 1 and 0 respectively. null is converted to 0. undefined is converted to NaN. Strings are converted based on the values they contain, and are converted as NaN if they do not contain numeric values. If either value is NaN, the operator returns false. Otherwise the values are compared as numeric values. Examples String to string comparison c...
... // false console.log(5 < "hello"); // false console.log("5" < 3n); // false console.log("3" < 5n); // true Number to Number comparison console.log(5 < 3); // false console.log(3 < 3); // false console.log(3 < 5); // true Number to BigInt comparison console.log(5n < 3); // false console.log(3 < 5n); // true Comparing
Boolean, null, undefined, NaN console.log(true < false); // false console.log(false < true); // true console.log(0 < true); // true console.log(true < 1); // false console.log(null < 0); // false console.log(null < 1); // true console.log(undefined < 3); // false console.log(3 < undefined); // false console.log(3 < NaN); // false console.log(NaN...
Nullish coalescing operator (??) - JavaScript
This behavior may cause unexpected consequences if you consider 0, '', or NaN as valid values. let count = 0; let text = ""; let qty = count || 42; let message = text || "hi!"; console.log(qty); // 42 and not 0 console.log(message); // ...
...This behavior may cause unexpected consequences if you consider 0, '', or NaN as valid values. let count = 0; let text = ""; let qty = count || 42; let message = text || "hi!"; console.log(qty); // 42 and not 0 console.log(message); // "hi!" and not "" The nullish coalescing operator avoids this pitfall...
Strict equality (===) - JavaScript
Unlike the equality operator, the strict equality operator always considers operands of different types to be different. 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. Syntax x === y Description The strict equality operators (=== and !==) use the Strict Equality Comparison Algorithm to compare two operands. If the operands are of different types, return false. ...
... If both operands are objects, return true only if they refer to the same object. If both operands are null or both operands are undefined, return true. If either operand is NaN, return false. Otherwise, compare the two operand's values: Numbers must have the same numeric values. +0 and -0 are considered to be the same value. Strings must have the same characters in the same order.
Booleans must be both true or both false. The most notable difference between this operator and the equality (==) operator is that if the operands are of different types, the == operator attempts to convert them to the same type before comparing. Examples Comparing operands of the same type console.log("hello" === "hello"); // true console.log("hello" === "hola"); // false console.log(3 =...
instanceof - JavaScript
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. Syntax object instanceof constructor Parameters object The object to test. constructor Function to test against Description The instanceof operator tests the presence of constructor.prototype in object's prototype chain. ...
... Specifications Specification ECMAScript (ECMA-262)The definition of 'Relational Operators' in that specification. ...
<mtable> - MathML
are: left, center (default) and right. columnlines Specifies column borders. Multiple values separated by space are allowed and apply to the corresponding columns (e.g. columnlines="none none solid"). Possible values are: none (default), solid and dashed. columnspacing Specifies the space between table columns. Unimplemented columnwidth Specifies the width of table columns. displaystyle A
Boolean value specifying whether more vertical space is used for displayed equations or, if set to false, a more compact layout is used to display formulas. The main effect is that larger versions of operators are displayed, when displaystyle is set to true. Unimplemented equalcolumns A
Boolean value indicating whether to force all columns to have the same total height. false is default. Unimplemented...
...false is default. ...
The "codecs" parameter in common media types - Web media technologies
o) Here, oo is again the OTI describing the contents more precisely, while V is the one-digit video OTI. avc1.oo[.PPCCLL] (AVC video) oo is the OTI describing the contents, while PPCCLL is six hexadecimal digits specifying the profile number (PP), constraint set flags (CC), and level (LL). See AVC profiles for the possible values of PP. The constraint set flags byte is comprised of one-bit
Boolean flags, with the most significant bit being referred to as flag 0 (or constraint_set0_flag, in some resources), and each successive bit being numbered one higher. Currently, only flags 0 through 2 are used; the other five bits must be zero. The meanings of the flags vary depending on the profile being used. The level is a fixed-point number, so a value of 14 (decimal 20) means level 2.0 while a ...
...ew situations. Firstly, you can use it with the <source> element when creating an <audio> or <video> element, in order to establish a group of options for the browser to choose from when selecting the format of the media to present to the user in the element. You can also use the codecs parameter when specifying a MIME media type to the MediaSource.isTypeSupported() method; this method returns a
Boolean which indicates whether or not the media is likely to work on the current device. ...
true - XPath
Syntax true() Returns
Boolean true. Defined XPath 1.0 4.3 Gecko support Supported. ...
... Defined XPath 1.0 4.3 Gecko support Supported. ...
port - Archive of obsolete content
rializable values The payload for a message can be any JSON-serializable value. When messages are sent their payloads are automatically serialized, and when messages are received their payloads are automatically deserialized, so you don't need to worry about serialization. However, you do have to ensure that the payload can be serialized to JSON. This means that it needs to be a string, number,
boolean, null, array of JSON-serializable values, or an object whose property values are themselves JSON-serializable. This means you can't send functions, and if the object contains methods they won't be encoded. You also can't include circular references. For example, to include an array of strings in the payload: // main.js var pageMods = require("sdk/page-mod"); var self = require("sdk/self"); va...
Communicating using "port" - Archive of obsolete content
ializable Values The payload for an message can be any JSON-serializable value. When messages are sent their payloads are automatically serialized, and when messages are received their payloads are automatically deserialized, so you don't need to worry about serialization. However, you do have to ensure that the payload can be serialized to JSON. This means that it needs to be a string, number,
boolean, null, array of JSON-serializable values, or an object whose property values are themselves JSON-serializable. This means you can't send functions, and if the object contains methods they won't be encoded. For example, to include an array of strings in the payload: var pageModScript = "self.port.emit('loaded'," + " [" + " document.location.toString()," ...
page-mod - Archive of obsolete content
This means you can't send functions, and if the object contains methods they won't be usable. You also can't pass cyclic values. Name: contentStyleFile Type: string,array Use this option to load one or more stylesheets into the targeted documents as user stylesheets. Each sty...
url - Archive of obsolete content
the given native file path to a file: URL. Parameters path : string The native file path, as a string, to be converted. Returns string : The converted URL as a string. isValidURI(uri) Checks the validity of a URI. isValidURI("http://mozilla.org") would return true, whereas isValidURI("mozilla.org") would return false. Parameters uri : string The URI, as a string, to be tested. Returns
boolean : A
boolean indicating whether or not the URI is valid. getTLD(url) Returns the top-level domain for the given URL: that is, the highest-level domain under which individual domains may be registered. Uses getPublicSuffix() internally. var urls = require("sdk/url"); console.log(urls.getTLD("http://www.bbc.co.uk/")); // "co.uk" console.log(urls.getTLD("https://developer.mozilla.org/"));...
windows - Archive of obsolete content
d", label: "Read", icon: "./read.png", onClick: function() { example.close(); } }); This example uses the action button API, which is only available from Firefox 29 onwards. Parameters options : object Required options: Name Type url string String URL to be opened in the new window. This is a required property. isPrivate
boolean Boolean which will determine whether the new window should be private or not. If your add-on does not support private browsing this will have no effect. See the private-browsing documentation for more information. Optional options: Name Type onOpen function A callback function that is called when the window has opened. This does not mea...
/loader - Archive of obsolete content
ader to create scopes into which modules are loaded. It takes the following set of configuration options: name: A string value which identifies the sandbox in about:memory. Will throw exception if omitted. principal: String URI or nsIPrincipal for the sandbox. If omitted defaults to system principal. prototype: Object that the returned sandbox will inherit from. Defaults to {}. wantXrays: A
Boolean value indicating whether code outside the sandbox wants X-ray vision with respect to objects inside the sandbox. Defaults to true. let sandbox = Sandbox({ name: 'resource:///modules/foo/bar.js', wantXrays: false, prototype: { console: { log: dump.bind(dump, 'log: '), info: dump.bind(dump, 'info: '), warn: dump.bind(dump, 'warn: '), error: dump.bind(dump, 'error...
event/core - Archive of obsolete content
l the exceptions that are thrown by listeners during the emit are caught and can be handled by listeners of 'error' event. Thrown exceptions are passed as an argument to an 'error' event listener. If no 'error' listener is registered exception will be logged into an error console. Parameters target : Object Event target object. type : String The type of event. message : Object|Number|String|
Boolean First argument that will be passed to listeners. arguments : Object|Number|String|
Boolean More arguments that will be passed to listeners. off(target, type, listener) Removes an event listener for the given event type on the given event target. If no listener is passed removes all listeners of the given type. If type is not passed removes all the listeners of the given event target. Paramet...
frame/utils - Archive of obsolete content
ocument options : object Optional options: Name Type type String String that defines access type of the document loaded into it. Defaults to "content". For more details and other possible values see documentation on MDN uri String URI of the document to be loaded into the new frame. Defaults to about:blank. remote
Boolean If true separate process will be used for this frame, and all the following options are ignored. allowAuth
Boolean Whether to allow auth dialogs. Defaults to false. allowJavascript
Boolean Whether to allow Javascript execution. Defaults to false. allowPlugins
Boolean Whether to allow plugin execution. Defaults to fals...
io/file - Archive of obsolete content
name(path) Returns the path of the directory containing the given file. If the file is at the top of the volume, the empty string is returned. Parameters path : string The path of a file. Returns string : The path of the directory containing the file. exists(path) Returns true if a file exists at the given path and false otherwise. Parameters path : string The path of a file. Returns
boolean : True if the file exists and false otherwise. join(...) Takes a variable number of strings, joins them on the file system's path separator, and returns the result. Parameters ... : strings A variable number of strings to join. The first string must be an absolute path. Returns string : A single string formed by joining the strings on the file system's path separator. list(path) Returns ...
lang/functional - Archive of obsolete content
delayed. ms : number Number of milliseconds to delay the execution of fn. arguments : mixed Additional arguments to pass to fn upon execution once(fn) Creates a version of the input function that can only be called one time. Repeated calls to the modified function will have no effect, returning the value from the original call. Useful for initialization functions, instead of having to set a
boolean flag and checking it later. let { once } = require("sdk/lang/functional"); let setup = once(function (env) { // initializing important things console.log("successfully initialized " + env); return 1; // Assume success and return 1 }); setup('dev'); // returns 1 // prints "successfully initialized dev" // Future attempts to call this function just return the cached // value that was retur...
net/url - Archive of obsolete content
Experimental Enables you to read content from a URI. Globals Functions readURI(uri, options) Reads a URI and returns a promise. Parameters uri : string The URL, as a string, to load. options : object Optional options: Name Type sync
boolean If this option is set to true, the promise returned will be resolved synchronously. Defaults to false if not provided. charset string The character set to use when read the content of the uri given. Defaults to UTF-8 if not provided. Returns promise : The promise that will be resolved with the content of the URL given. ...
places/bookmarks - Archive of obsolete content
R'd together. options : object Optional options: Name Type count number The number of bookmark items to return. If left undefined, no limit is set. sort string A string specifying how the results should be sorted. Possible options are 'title', 'date', 'url', 'visitCount', 'dateAdded' and 'lastModified'. descending
boolean A
boolean specifying whether the results should be in descending order. By default, results are in ascending order. Properties MENU This is a constant, default Group on the Firefox platform, the Bookmarks Menu. It can be used in queries or specifying the parent of a bookmark item, but it cannot be modified. TOOLBAR This is a constant, default Group on the Firefox platform, ...
places/history - Archive of obsolete content
r. options : object Optional options: Name Type count number The number of bookmark items to return. If left undefined, no limit is set. sort string A string specifying how the results should be sorted. Possible options are 'title', 'date', 'url', 'visitCount', 'keyword', 'dateAdded' and 'lastModified'. descending
boolean A
boolean specifying whether the results should be in descending order. By default, results are in ascending order. PlacesEmitter The PlacesEmitter is not exposed in the module, but returned from the search functions. The PlacesEmitter inherits from event/target, and emits data, error, and end. data events are emitted for every individual search result found, whereas end event...
Adding a Button to the Toolbar - Archive of obsolete content
refer to a remote file. You can change the icon at any time by setting the button's icon property. You can change the icon, and the other state attributes, either globally, for a specific window, or for a specific tab. Read more about updating state. Attaching a panel If you need to attach a panel to a button, use the toggle button API. This is just like the action button API except it adds a
boolean checked property which is toggled whenever the button is checked. To attach the panel, pass the button to the panel's show() method. For more details on this, see the toggle button's documentation. Displaying richer content To create more complex user interface content than is possible with just a button, use the toolbar API. With the toolbar API you get a complete horizontal strip of user inte...
JS XPCOM - Archive of obsolete content
nt supports, do the following: // |c| is the XPCOM component instance for each (i in Components.interfaces) { if (c instanceof i) { alert(i); } } In this context, instanceof is the same as QueryInterface except that it returns false instead of throwing an exception when |c| doesn't support interface |i|. Another difference is that QueryInterface returns an object, where as instanceof returns a
boolean. XPCOMUtils - About protocol handler This example implements a quick about protocol handler in JS using XPCOMUtils.jsm. Components.utils.import("resource://gre/modules/Services.jsm"); Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); const Cc = Components.classes; const Ci = Components.interfaces; function AboutHandler() {} AboutHandler.prototype = { newChannel: function(u...
Enhanced Extension Installation - Archive of obsolete content
xtensions // The RDF/XML datasource for the items at the // profile Install Location _globalExtensions // The RDF/XML datasource for the items at the // global Install Location. }; Tracking Install Locations Since there are only two locations, the installed location of an Extension is expressed throughout the code using a
boolean value, often referred to as isProfile - true if the item is installed in the profile directory's extensions folder. This
boolean relationship itself is not stored directly in the datasource. Rather, if the system needs to know where an item is located, it checks to see if the item is a member of the the appropriate type container (urn:mozilla:extension:root or urn:mozilla:theme:root) in each of t...
Extension Versioning, Update and Compatibility - Archive of obsolete content
tApplication entry with an id toolkit@mozilla.org and minVersion and maxVersion that match the toolkit version of the running application. This allows you to say that your add-on will install into any toolkit based application. Overriding Compatibility Checking For testing purposes you can tell the application to somewhat ignore compatibility checks when installing add-ons. Simply create the
boolean preference extensions.checkCompatibility and set it to false. Note: Before Firefox 1.5 the preference app.extensions.version could be used to override the version that the application believed itself to be to allow normally incompatible extensions to install. Choosing minVersion and maxVersion minVersion and maxVersion should specify the range of versions of the application you have tested wit...
Extension Etiquette - Archive of obsolete content
references is adequate -- don't require people to tweak options in order to get your extension's core functionality. Preferences' internal names Internal Firefox preference names for extensions or to be clear, the name of the preference as it appears in the about:config, should start with "extensions.," then the name of the extension, with a dot, then the name of the preference. For instance, a
boolean for the Reporter extension's option for hiding the privacy statement is "extensions.reporter.hidePrivacyStatement". General Dependencies Requiring a user to download another extension in order to use yours isn't nice. Avoid the dependency on other extensions, especially extensions that you didn't develop. ...
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
this to "roll up" sidebars that aren't currently in use. disabled While not appropriate for all elements, you can use the disabled attribute to temporarily disable input to an element that is normally operable by the user. Typically, elements with the disabled="true" attribute will appear as either transparent or pale gray. Note: With attributes like hidden, collapsed, and disabled, which take
Boolean values, setting disabled="false" in XUL can have unintended consequences. This is because there may be cases where a script or CSS rule will be written in such a way that they treat the value as true unconditionally if any value has been set. So when changing the attribute's value using a DOM function for example, do not use setAttribute('disabled', false) -- instead, use removeAttribute('disable...
Adding windows and dialogs - Archive of obsolete content
choose an answer. In HTML you can use the window.confirm function for this. The Prompt Service has a confirm method with similar behavior: let prompts = Cc["@mozilla.org/embedcomp/prompt-service;1"]. getService(Ci.nsIPromptService); if (prompts.confirm(window, "Confirm Title", "Would you like to continue?")) { // do something. } else { // do something else } The method returns a
boolean value indicating the user's response. Others Unprivileged Javascript can also use the window.prompt function to receive text input from the user. The Prompt Service has a very rich set of functions that allow different kinds of inputs, such as text, passwords, usernames and passwords, and checkboxes that can be used for "Never ask this again"-type dialogs. The confirmEx and prompt methods are t...
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
t a string to a document fragment while removing any scripts or other unsafe content in the process. let { Cc, Ci } = require("chrome"); /** * Safely parse an HTML fragment, removing any executable * JavaScript, and return a document fragment. * * @param {Document} doc The document in which to create the * returned DOM tree. * @param {string} html The HTML fragment to parse. * @param {
boolean} allowStyle If true, allow <style> nodes and * style attributes in the parsed fragment. Gecko 14+ only. * @param {nsIURI} baseURI The base URI relative to which resource * URLs should be processed. Note that this will not work for * XML fragments. * @param {
boolean} isXML If true, parse the fragment as XML. */ function parseHTML(doc, html, allowStyle, baseURI, isXML) { let P...
Observer Notifications - Archive of obsolete content
ata); } } } In order for this observer to work, you need to use the observer service that provides methods for you to add, remove, notify and enumerate observers. Adding an observer to the observer service is simple, invoking the addObserver method with three parameters. The first parameter is an observer object, the second parameter is a notification topic, and the third parameter is a
boolean which indicates whether the observer service should hold a weak reference to the observer. You should normally set the third parameter to false. let observerService = Components.classes["@mozilla.org/observer-service;1"]. getService(Components.interfaces.nsIObserverService); observerService.addObserver(testObserver, "xulschoolhello-test-topic", false); You should come up with a notif...
Setting up an extension development environment - Archive of obsolete content
. Accessing Thunderbird development preferences To change preference settings in Thunderbird, open the "Preferences" (Unix) or "Options" (Windows) interface. On the "Advanced" page, select the "General" tab then click the "Config Editor" button. Recommended development preferences Not all preferences are defined by default, and are therefore not listed by default. You will have to create new (
boolean) entries for them. For more information about Mozilla preferences, refer to the mozillaZine article on "about:config". Tip: You can install either the Developer Profile or DevPrefs add-ons to handle setting these preferences automatically, and skip the rest of this section. DevPrefs can now be found at https://github.com/Noitidart/DevPrefs. maxVersion needs to be set in install.rdf javascr...
Creating a dynamic status bar extension - Archive of obsolete content
arated values return to fetch easily-parsed stock quote data for Google (ticker symbol GOOG). refreshInformation() embeds another function, infoReceived(), which we'll look at separately shortly. The first thing we do is create a new XMLHttpRequest object to use for processing our request. We open the request, specifying that we wish to perform an HTTP "GET" command with the URL fullUrl. The true
Boolean value in the third parameter indicates that we want to process the request asynchronously. Setting the httpRequest.onload property to our infoReceived() function configures the request to call infoReceived() when the response is received from the server. Finally, we send the request to the server and return. infoReceived() When the server responds to our request, our the infoReceived() function, ...
MozAudioAvailable - Archive of obsolete content
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
dow 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. ...
cached - Archive of obsolete content
n is now cached. General info Specification Offline Interface Event Bubbles No Cancelable No Target applicationCache Default Action None Properties Property Type Description target EventTarget (DOM element) The event target (the topmost target in the DOM tree). Read Only. type string The type of event. Read only. canBubble
boolean Does the event normally bubble? Read only. cancelable
boolean Is it possible to cancel the event? Read only. Related Events checking noupdate downloading progress cached updateready obsolete error ...
chargingchange - Archive of obsolete content
PI has changed. General info Specification Battery Interface Event Bubbles No Cancelable No Target BatteryManager Default Action None Properties The event callback doesn't receive any event objects, but properties can be read from the BatteryManager object received from the navigator.getBattery method. Property Type Description BatteryManager.charging
boolean The system's battery charging status. Returns true if the battery is charging, if the state of the system's battery is not determinable, or if no battery is attached to the system. Returns false if the battery is discharging. Read only. Example navigator.getBattery().then(function(battery) { console.log("Battery charging? " + (battery.charging ? "Yes" : "No")); battery.addEventLi...
checking - Archive of obsolete content
the first time. General info Specification Offline Interface Event Bubbles No Cancelable No Target applicationCache Default Action None Properties Property Type Description target EventTarget (DOM element) The event target (the topmost target in the DOM tree). Read Only. type string The type of event. Read only. canBubble
boolean Does the event normally bubble? Read only. cancelable
boolean Is it possible to cancel the event? Read only. Related Events checking noupdate downloading progress cached updateready obsolete error ...
downloading - Archive of obsolete content
the first time. General info Specification Offline Interface Event Bubbles No Cancelable No Target applicationCache Default Action None Properties Property Type Description target EventTarget (DOM element) The event target (the topmost target in the DOM tree). Read Only. type string The type of event. Read only. canBubble
boolean Does the event normally bubble? Read only. cancelable
boolean Is it possible to cancel the event? Read only. Related Events checking noupdate progress cached updateready obsolete error ...
error - Archive of obsolete content
the application. General info Specification Offline Interface Event Bubbles No Cancelable No Target applicationCache Default Action None Properties Property Type Description target EventTarget (DOM element) The event target (the topmost target in the DOM tree). Read Only. type string The type of event. Read only. canBubble
boolean Does the event normally bubble? Read only. cancelable
boolean Is it possible to cancel the event? Read only. Related Events checking noupdate downloading progress cached updateready obsolete error ...
noupdate - Archive of obsolete content
hasn't changed. General info Specification Offline Interface Event Bubbles No Cancelable No Target applicationCache Default Action None Properties Property Type Description target EventTarget (DOM element) The event target (the topmost target in the DOM tree). Read Only. type string The type of event. Read only. canBubble
boolean Does the event normally bubble? Read only. cancelable
boolean Is it possible to cancel the event? Read only. Related Events checking noupdate downloading progress cached updateready obsolete error ...
obsolete - Archive of obsolete content
s being deleted. General info Specification Offline Interface Event Bubbles No Cancelable No Target applicationCache Default Action None Properties Property Type Description target EventTarget (DOM element) The event target (the topmost target in the DOM tree). Read Only. type string The type of event. Read only. canBubble
boolean Does the event normally bubble? Read only. cancelable
boolean Is it possible to cancel the event? Read only. Related Events checking noupdate downloading progress cached updateready obsolete error ...
progress - Archive of obsolete content
anifest. General info Specification Offline Interface ProgressEvent Bubbles No Cancelable No Target applicationCache Default Action None Properties Property Type Description target EventTarget (DOM element) The event target (the topmost target in the DOM tree). Read Only. type string The type of event. Read only. canBubble
boolean Does the event normally bubble? Read only. cancelable
boolean Is it possible to cancel the event? Read only. lengthComputable
boolean Specifies whether or not the total size of the transfer is known. Read only. loaded unsigned long (long) The number of bytes transferred since the beginning of the operation. This doesn't include headers and other ove...
updateready - Archive of obsolete content
o the new cache. General info Specification Offline Interface Event Bubbles No Cancelable No Target applicationCache Default Action None Properties Property Type Description target EventTarget (DOM element) The event target (the topmost target in the DOM tree). Read Only. type string The type of event. Read only. canBubble
boolean Does the event normally bubble? Read only. cancelable
boolean Is it possible to cancel the event? Read only. Related Events checking noupdate downloading progress cached updateready obsolete error ...
Index - Archive of obsolete content
The debug.writeln function sends strings to the script debugger, followed by a newline character. 2032 Enumerator Class, JavaScript, Microsoft, enumerable The Enumerator object enables enumeration of items in a collection. 2033 Enumerator.atEnd Enumerator, Internet Explorer, JavaScript, Method, Non-standard, atEnd The Enumerator.atEnd method returns a
Boolean value indicating if the enumerator is at the end of the collection. 2034 Enumerator.item Enumerator, JavaScript, Method The Enumerator.item method returns the current item in the collection. 2035 Enumerator.moveFirst Enumerator, Example, JavaScript, Method, Non-standard, moveFirst The Enumerator.moveFirst method resets the current item in the collection t...
Using content preferences - Archive of obsolete content
lue of the "devmo.somesetting" preference. var value = prefService.getPref(uri, "devmo.somesetting"); Built-in site-specific preferences Preference Name Menu Equivalent Values Notes browser.content.full-zoom View / Zoom Example: "1.10000002384186" (Rounding variant of "1.1") Related about:config preferences: browser.zoom.full
Boolean, set by the menu item View / Zoom / Zoom Text Only. Despite the confusion in names, this preference is not site-specific. browser.zoom.siteSpecific toolkit.zoomManager.zoomValues zoom.maxPercent and zoom.minPercent browser.download.lastDir Path of a filesystem directory Related about:config preferences: ...
Dehydra Function Reference - Archive of obsolete content
require({version:, strict:, werror:, gczeal:}) require is used to set runtime execution flags. It also returns the current values of these flags. require supports optional named arguments via JavaScript object where each parameter is a property. If a property is not specified then it will not be passed to the runtime. version integer: this sets js version similar to version() in JS 1.7. strict
boolean: Controls JS strict mode werror
boolean: Turns JS warnings into errors gczeal int: This is a write-only parameter to set turn on frequent garbage collection. It is a mainly useful for debugging Dehydra for rooting bugs. gczeal is only enabled when SpiderMonkey and Dehydra are compiled with DEBUG macro defined. require() Example require({strict:true, gczeal:2}) if (require().werror) print("werror...
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
d over the application to xpcom/xul, this will block: appStartup.run(); Here is an example of a LocationProvider that works : public class LocationProvider implements IAppFileLocProvider { private final File libXULPath; int counter = 0; public LocationProvider(File grePath) { this.libXULPath = grePath; } public File getFile(String aProp,
boolean[] aPersistent) { File file = null; if (aProp.equals("GreD") || aProp.equals("GreComsD")) { file = libXULPath; if (aProp.equals("GreComsD")) { file = new File(file, "components"); } } else if (aProp.equals("MozBinD") || aProp.equals("CurProcD") || aProp.equals("ComsD") || aPr...
Exception logging in JavaScript - Archive of obsolete content
times you might actually want to see all exceptions from inner JavaScript frames logged (in the call chain above that would be when an exception is unhandled in frame 4). Note that the following will have no effect on the NS_NOINTERFACE exceptions outlined in rules 3 and 4 above - those exceptions will not be reported in any case. There are two ways you can accomplish this. First, you can set the
boolean preference dom.report_all_js_exceptions. If this preference is true, all exceptions from inner frames will be logged. Alternatively, you can set the environment variable MOZ_REPORT_ALL_JS_EXCEPTIONS. It doesn't matter what value you set this to (it can even be 0). If the variable exists, all exceptions from inner frames will be reported. See also Error Console bug 415498 ...
Hidden prefs - Archive of obsolete content
ed on phone number, the UI will not match the query. The default (defined in mailnews.js) is: pref("mail.addr_book.quicksearchquery.format","?(or(PrimaryEmail,c,@V)(DisplayName,c,@V)(FirstName,c,@V)(LastName,c,@V))"); "and", "or" and "not" are valid. See http://lxr.mozilla.org/mozilla/sourc...drDatabase.idl for the list of valid attributes "c" == contains. see nsAbQueryStringToExpression::Create
BooleanConditionString() for other operators. Mail composition "other header" pref ("mail.compose.other.header") The format for this a comma delimited list of mail headers, like "Approved,X-No-Archive" An example for your prefs.js would be: user_pref("mail.compose.other.header", "Approved"); This will cause "Approved" to show up in the compose window address picker, under To:, Cc:, Bcc:, Newsgroup:, et...
importUserCertificates - Archive of obsolete content
the same DN exists in the user's certificate store, Personal Security Manager uses the following pattern to derive the nickname: <tt><Common Name>'s <Issuer Name> ID</tt>. "certRepString" This string is the CMMF Certification Response from the CA that contains the user's certificate(s). The response is base-64 encoded. forceBackup This is a
Boolean argument. It allows the CA or RA to indicate to the client whether to force the user to back up a newly issued certificate (PKCS #12). The importUserCertificates() method is used to import newly issued certificates for the user. The private key for the certificates must already reside in the user's personal private key database. The request ID in the response being imported must match the r...
New Security Model for Web Services - Archive of obsolete content
quests with verification headers from scripts loaded from the domain with host name containing mozilla.org. That is, http://www.mozilla.org/, http://lxr.mozilla.org, http://komodo.mozilla.org, etc. will be granted access. Implementation nsIWebScriptsAccessService This interface provides a way to check whether the running script has access to the server that the script wishes to communicate.
boolean canAccess(in nsIURI aTransportURI, in AString aType); aTransportURI - The service URI aType - Type requested by the script ( ex. soapv, soap, load, etc. ) return PR_TRUE if access granted else PR_FALSE void invalidateCache(in string aTransportURI); Invalidate cached entry for the given transport uri. Empty the cache by passing in a empty string nsWebScriptsAccess...
Safely loading URIs - Archive of obsolete content
r hands on. If you have a choice as to what data you have, prefer checkLoadURIWithPrincipal to checkLoadURI and prefer checkLoadURI to checkLoadURIStr. Note that checkLoadURIWithPrincipal is not scriptable in Gecko 1.8, so extensions are not able to use it. Changes in Gecko 1.9 A key security change in Gecko 1.9 is the addition of the new security.fileuri.strict_origin_policy preference. This
Boolean preference, which defaults to true, can be set to false if the user doesn't want to strictly enforce the same origin policy on file: URIs. See Same-origin policy for file: URIs for details. ...
Using Breakpoints in Venkman - Archive of obsolete content
execution after running the breakpoint script. This can be useful to try out additional code, on the fly. Stop regardless of result causes Venkman to stop execution after executing the breakpoint script, allowing you to inspect program state. Stop if result is true effectively makes this a conditional breakpoint. If the breakpoint script returns a true value (it doesn't have to strictly be a
boolean true, any non-null, non-empty string, non-zero, non-undefined, and non-false value will do), execution will continue normally. If, on the other hand, the script returns a false value, Venkman will stop execution at that point. Early return from caller with result will cause the function that the breakpoint is set in to return the value of the breakpoint script as its result, immediatley after t...
dirRemove - Archive of obsolete content
dirRemove Removes a directory. Method of File object Syntax int dirRemove( FileSpecObject dirToRemove [,
boolean recursive] ); Parameters The dirRemove method has the following parameters: dirToRemove A FileSpecObject representing the directory to be removed. recursive An optional
boolean value indicating whether the remove operation is to be performed recursively (1) or not (0). Returns An integer error code. For a list of possible values, see Return Codes. ...
exists - Archive of obsolete content
exists Returns a value indicating whether the specified file or directory exists. Method of File object Syntax
boolean exists( FileSpecObject target ) Parameters The exists method has the following parameters: target A FileSpecObject representing the file or directory being tested for existence. Returns A
boolean value specifying whether the file or directory does indeed exist or does not. Example f = getFolder( "Program", "sample.txt" ); if ( File.exists(f) ) // do something with the file ...
isDirectory - Archive of obsolete content
Summary Returns a
boolean value indicating whether the specified FileSpecObject is a directory. Method of File object Syntax
boolean isDirectory ( FileSpecObject NativeFolderPath ); Parameters The isDirectory method has the following parameters: NativeFolderPath A FileSpecObject representing the queried directory. Returns A
boolean value indicating whether the object is a directory or not. ...
close - Archive of obsolete content
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); ...
commandupdate - Archive of obsolete content
ed 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
> 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
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
ear. 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
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. ...
Reading from Files - Archive of obsolete content
interpret characters within the stream, so the returned string will only have characters below 256, if you expect to use the data as text. while(stream.available()) output += stream.readString(20); Although this can be a suitable means of reading binary data, usually you will want to retrieve the data with some additional methods that are more useful. The following methods are available: read
Boolean will read a single byte from a stream and return false if the byte is zero and true if the byte has a non-zero value. read8 will read a single byte and return it. The 8 in the method name indicates that 8 bits of data are being read. read16 will read two bytes from the stream and interpret them as an integer. This method will return the value as a number. read32 will read four bytes and return th...
Writing to Files - Archive of obsolete content
ify the 'binary' flag in place of the 'text' flag when creating the stream with nsIScriptableIO.newOutputStream(). var stream = IO.newOutputStream(file, "binary"); This line will create and open a binary stream for a file. Once opened, you can write to the file using various writing methods. The following methods are available, all of which take one argument, which is the value to write: write
Boolean will write a
boolean value to a stream. If the argument is false, 0 is written, and if the argument is true, 1 is written. Non-
boolean values will be converted into
booleans automatically. write8 will write a single byte. The 8 in the method name indicates that 8 bits of data are being written. If the supplied value is larger than 8 bits, only the lowest significant 8 bits are written. write1...
Moving, Copying and Deleting Files - Archive of obsolete content
ent may be null. For instance, the following example renames a file within the same directory: file.moveTo(null, "hello.txt"); If the destination file already exists, nsIFile.moveTo() replaces the existing file. For this reason, you may wish to check if the file exists using nsIFile.exists() before moving the file. Deleting a File To delete a file, use nsIFile.remove(). This method takes one
boolean argument which indicates whether to delete recursively or not. If true and the file object refers to a directory, the directory will be removed as well all files and subdirectories within it. If false, a directory will only be removed if it is empty. If the directory is not empty, an error will occur. For files, the argument is simply ignored. var file = IO.newFile("Home", "photo.jpg"); file.rem...
Node - Archive of obsolete content
evel-2-Core short ELEMENT_NODE 1 short ATTRIBUTE_NODE 2 short TEXT_NODE 3 short CDATA_SECTION_NODE 4 short ENTITY_REFERENCE_NODE 5 short ENTITY_NODE 6 short PROCESSING_INSTRUCTION_NODE 7 short COMMENT_NODE 8 short DOCUMENT_NODE 9 short DOCUMENT_TYPE_NODE 10 short DOCUMENT_FRAGMENT_NODE 11 short NOTATION_NODE 12 Methods Node appendChild ( Node newChild ) Node cloneNode (
boolean deep )
boolean hasAttributes ( )
boolean hasChildNodes ( ) Node insertBefore ( Node newChild , Node refChild )
boolean isSupported ( String feature , String version ) void normalize ( ) Node removeChild ( Node oldChild ) Node replaceChild ( Node newChild , Node oldChild ) ...
Focus and Selection - Archive of obsolete content
r use focus events to validate certain values. Don't display an alert during a focus or blur event as this will be distracting for the user and is poor user interface design. You can also add event handlers dynamically using the DOM function addEventListener. You can use it for any element and event type. It takes three parameters, the event type, a function to execute when the event occurs and a
boolean indicating whether to capture or not. Getting the currently focused element The currently focused element is held by an object called a command dispatcher, of which there is only one for the window. The command dispatcher is responsible for keeping track of the focused element as the user uses the interface. The command dispatcher has other roles, which will be discussed in a later section on com...
Tree View Details - Archive of obsolete content
sentially, when a parent row is opened, the children will be taken from the childData map and inserted into the visibleData array. For example, if the Liquids row was opened, the corresponding array from childData, which in this case contains only the single Mercury child, will be inserted into the visibleData array after Liquids but before Gases. This will increase the array size by one. The two
booleans in each row in the visibleData structure indicate whether a row is a container and whether it is open respectively. Obviously, the new inserted child items will have both values set to false. Implement the Tree View Interface Next, we need to implement the tree view interface. First, the simple functions: { treeBox: null, selection: null, get rowCount() { return this...
Trees and Templates - Archive of obsolete content
x="1" persist="width ordinal hidden sortActive sortDirection" sort="rdf:http://home.netscape.com/WEB-rdf#LastModifiedDate"/> More details about the persist attribute will be described in the later section. Additional Rule Attributes There are two additional attributes that can be added to the rule element that allow it to match in certain special circumstances. Both are
boolean attributes. iscontainer If this attribute is set to true, then the rule will match all resources that have children. For example, we could use this rule to match bookmark folders. This is convenient as the RDF datasource does not need to include any special attributes to indicate this. isempty If this attribute is set to true, then the rule will match all resources ...
XUL Event Propagation - Archive of obsolete content
s taking place below it. Any XUL element may use the DOM addEventListener method to register itself to capture events. The syntax for this in XUL is as follows: element = document.getElementById("id of the element"); element.addEventListener(event name, event handler function, whether to register a capturing listener); The event handler code argument can be in-line code or a function. The last
boolean parameter specifies whether the event listener wants to use event capturing, or be registered to listen for events that bubble up the hiearchy normally. Note: The DOM provides the addEventListener method for creating event listeners on nodes that do not otherwise supply them. But in XUL, almost every element includes an "oncommand" event listener attribute for getting events. addEventListener is...
clicktoscroll - Archive of obsolete content
<< XUL Reference home clicktoscroll Type:
boolean If true, the up or down arrow(s) must be clicked to scroll the content. If false, the content will scroll automatically when the cursor hovers over either arrow. ...
command - Archive of obsolete content
If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
commandset - Archive of obsolete content
A common use of the command updater is to update cut, copy, and paste menu items. More information is available in the XUL tutorial. Attributes commandupdater, events, oncommandupdate, targets Example <commandset> <command id="cmd_open" oncommand="alert('Open!');"/> <command id="cmd_help" oncommand="alert('Help!');"/> </commandset> Attributes commandupdater Type:
boolean If true, the commandset is used for updating commands. Typically, this is used to update menu commands such as Undo and Cut based on when an event occurs. For example, since the Cut command is only valid when something is selected, a command updater might be used when the select event occurs. events Type: comma-separated list A comma-separated list of event names ...
iframe - Archive of obsolete content
Default is false. src Type: URI The URI of the content to appear in the element. type Type: one of the values below. The type of browser, which can be used to set access of the document loaded inside the browser. If this is not set, the loaded document has the same access as the window ...
key - Archive of obsolete content
use (non-default) key commands within specific elements, you will need to listen for key events. More information is available in the XUL tutorial. Attributes command, disabled, key, keycode, keytext, modifiers, oncommand, phase Examples (example needed) Attributes command Type: id Set to the id of a command element that is being observed by the element. disabled Type:
boolean Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
keyset - Archive of obsolete content
If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
listheader - Archive of obsolete content
If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you ...
menubar - Archive of obsolete content
When set to false, the default, the grippy will be shown. statusbar Type: id If you set this attribute to the id of a statusbar element, the label on the statusbar will update to the statustext of the items on the menu as the user moves the mouse over them. Properties accessibleType Type: integer A value indicating t...
menupopup - Archive of obsolete content
</menupopup> </menulist> The following example shows how a menupopup can be used as a context menu for an element. When the label is right-clicked, the menu will be displayed. <menupopup id="clipmenu"> <menuitem label="Cut"/> <menuitem label="Copy"/> <menuitem label="Paste"/> </menupopup> <label value="Right click for popup" context="clipmenu"/> Attributes ignorekeys Type:
boolean If true, keyboard navigation between items in the popup is disabled. left Type: integer Overrides the horizontal position of the popup specified by the showPopup method. onpopuphidden Type: script code This event is sent to a popup after it has been hidden. This event may also be received while the popup is still open, but when sub-menus contained within this popup are hidden.
notificationbox - Archive of obsolete content
rce, sortResource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width Properties currentNotification Type: notification element The currently displayed notification element or null. This property is read-only. allNotifications Type: nodeList NodeList of all notifications. This property is read-only. notificationsHidden Type:
boolean Indicating whether the notification area should be hidden. Events AlertActive Type: Event Fired when a notification element is shown. AlertClose Type: Event Fired when a notification element is closed. Methods Inherited Methods addEventListener(), appendChild(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode...
treecell - Archive of obsolete content
<< XUL Reference home [ Examples | Attributes | Properties | Methods | Related ] A single cell in a tree. This element should be placed inside a treerow. You can set the text for the cell using the label attribute. More information is available in the XUL tutorial. Attributes editable, label, mode, properties, ref, src, value Attributes editable Type:
boolean Allows the contents of individual cells in the column to be changed, especially useful when <treecol type="checkbox">. Also useful for disabling editing of individual treecells. When the user double-clicks an editable cell, a text field appears in which the user can edit the contents of the cell. The tree and treecol must also be marked as editable in order for this to work. The tree must be a content ...
treechildren - Archive of obsolete content
les | Attributes | Properties | Methods | Related ] This element is the body of the tree. For content trees, the content will be placed inside this element. This element is also used to define container rows in the tree. More information is available in the XUL tutorial. Attributes alternatingbackground Attributes alternatingbackground Obsolete since Gecko 2.0 Type:
boolean If true, the background of the tree's rows will alternate between two colors. You can use the :-moz-tree-row CSS style to do this instead. Inherited from XUL element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insert...
where - Archive of obsolete content
Methods | Related ] Indicate a condition that must match for a template result to be used. If the condition is true, the corresponding action body is generated; otherwise the result is ignored and no content is generated. For more information, see Where Elements. Attributes ignorecase, multiple, negate, rel, subject, value Examples (example needed) Attributes ignorecase Type:
boolean Set to true to indicate that the case does not matter when making comparisons. Otherwise, the default value is false, to indicate that the value should match with the same case. multiple Type:
boolean Set to true to indicate that the value contains multiple values separated by commas. Any of the values may match. Otherwise, the entire value string is compared. negate Type: boole...
Application Update - Archive of obsolete content
here: XulRunner Tips Icons The updater process for Linux systems requires updater.png to be in your <application folder>/icons/, see https://bugzilla.mozilla.org/show_bug.cgi?id=706846 Preferences // Whether or not app updates are enabled pref("app.update.enabled", true); // This preference turns on app.update.mode and allows automatic download and // install to take place. We use a separate
boolean toggle for this to make // the UI easier to construct. pref("app.update.auto", true); // Defines how the Application Update Service notifies the user about updates: // // AUM Set to: Minor Releases: Major Releases: // 0 download no prompt download no prompt // 1 download no prompt download no prompt if no incompatibilities // 2 down...
XUL Explorer - Archive of obsolete content
snippets are merged with the built-in snippets at startup. Double-click or drag-and-drop to insert a snippet File > New allows user to pick any "Template" snippet, as well as blank. Simple XUL Checker can be used to 'validate' the XUL snippet. It checks for legal element and attribute names, including allowed attributes for a given element. ...
calICalendarView - Archive of obsolete content
e567ccb-2ecf-4f59-b7ca-bf42b0fbf24a)] interface calICalendarView : nsISupports { attribute calICalendar displayCalender; attribute calICalendarViewController controller; void showDate(in calIDateTime aDate); void setDateRange(in calIDateTime aStartDate, in calIDateTime aEndDate); readonly attribute calIDateTime startDate; readonly attribute calIDateTime endDate; readonly attribute
boolean supportsDisjointDates; readonly attribute
boolean hasDisjointDates; void setDateList(in unsigned long aCount, [array,size_is(aCount)] in calIDateTime aDates); void getDateList(out unsigned long aCount, [array,size_is(aCount),retval] out calIDateTime aDates); attribute calIItemBase selectedItem; attribute calIDateTime selectedDay; Attributes displayCalendar The displayCalendar is ...
Mozprofile - Archive of obsolete content
Setting Permissions mozprofile also takes care of adding permissions to the profile. See https://github.com/mozilla/mozbase/b...permissions.py Resources Other Mozilla programs offer additional and overlapping functionality for profiles. There is also substantive documentation on profiles and their management. ProfileManager : XULRunner application for managing profiles...
NPN_PostURL - Archive of obsolete content
the plug-in. If null, pass the new stream back to the current plug-in instance regardless of MIME type. For values, see NPN_GetURL. len Length of the buffer buf. buf Path to local temporary file or data buffer that contains the data to post. Temporary file is deleted after use. Data in buffer cannot be posted for a protocol that requires a header. file A
boolean value that specifies whether to post a file. Values: true: Post the file whose path is specified in buf, then delete the file. false: Post the raw data in buf. Returns If successful, the function returns NPERR_NO_ERROR. If unsuccessful, the plug-in is not loaded and the function returns an error code. For possible values, see Error Codes. Description NPN_PostURL wo...
NPN_SetValue - Archive of obsolete content
can instruct the browser not to unload the dll and not to call NP_Shutdown when the page is left. In such a case all this will be done on the browser shutdown. The plugin calls NPN_SetValue any time with NPPVpluginKeepLibraryInMemory as variable parameter and value set to TRUE. By default, the dll will be unloaded from memory preceded by an NP_Shutdown call. Remarks All four variable values are
boolean. Although the function prototype has type of value void *, the actual
boolean should be placed there, not a pointer to a
boolean. The browser code reads this parameter as follows (NPPVpluginWindowBool as an example): NPError NP_EXPORT _setvalue(NPP npp, NPPVariable variable, void *value) { ... BOOL bWindowless = (value == NULL); ... } So the proper way to call this function from a plug-in w...
NPP_NewStream - Archive of obsolete content
P_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); Parameters The function has the following parameters: instance Pointer to current plug-in instance. type Pointer to MIME type of the stream. stream Pointer to new stream. seekable
Boolean indicating whether the stream is seekable: true: Seekable. Stream supports random access through calls to NPN_RequestRead (for example, local files or HTTP servers that support byte-range requests). false: Not seekable. The browser must copy data in the stream to the local cache to satisfy random access requests made through NPN_RequestRead. stype Out parameter. The plugin should s...
Enumerator.atEnd - Archive of obsolete content
Syntax myEnum.atEnd() Remarks The required myEnum reference is any Enumerator object. The atEnd method returns true if the current item is the last one in the collection, the collection is empty, or the current item is undefined. Otherwise, it returns false. ...
Enumerator - Archive of obsolete content
TotalSize / bytesPerGB; driveString += freeGB.toFixed(3) + " GB free of "; driveString += totalGB.toFixed(3) + " GB"; } else{ driveString += "Not Ready"; } driveString += "<br />";; e.moveNext(); } document.write(driveString); // Output: <drive information Properties The Enumerator object has no properties. Methods Enumerator.atEnd Returns a
Boolean value indicating if the enumerator is at the end of the collection. Enumerator.item Returns the current item in the collection. Enumerator.moveFirst Resets the current item in the collection to the first item. Enumerator.moveNext Moves the current item to the next item in the collection. Requirements Supported in the following document modes: Quirks, Internet Explorer 6 standards, Intern...
@set - Archive of obsolete content
e and in all earlier versions. The @set statement creates variables used with conditional compilation statements. Syntax @set @varname = term Parameters varname Valid JavaScript variable name. Must be preceded by an "@" character at all times. term Zero or more unary operators followed by a constant, conditional compilation variable, or parenthesized expression. Remarks Numeric and
Boolean variables are supported for conditional compilation. Strings are not. Variables created using @set are generally used in conditional compilation statements, but can be used anywhere in JavaScript code. Examples of variable declarations look like this: @set @myvar1 = 12 @set @myvar2 = (@myvar1 * 20) @set @myvar3 = @_jscript_version The following operators are supported in parenthesized expre...
New in JavaScript 1.1 - Archive of obsolete content
gust 19, 1996. Netscape Navigator 3.0 was the second major version of the browser with JavaScript support. JavaScript versions Netscape Navigator 3.0 also introduced JavaScript language versions. <SCRIPT LANGUAGE="JavaScript"> <!-- JavaScript for Navigator 2.0. --> <SCRIPT LANGUAGE="JavaScript1.1"> <!-- JavaScript for Navigator 3.0. --> New features in JavaScript 1.1 New objects Array
Boolean Function Number New properties Number.MAX_VALUE Number.MIN_VALUE NaN Number.NEGATIVE_INFINITY Number.POSITIVE_INFINITY New methods Array.prototype.join() Array.prototype.reverse() Array.prototype.sort() Array.prototype.split() New operators typeof void Other new features <noscript> LiveConnect. Communication between Java and JavaScript. Changed functionality in Ja...
New in JavaScript 1.3 - Archive of obsolete content
.3, push returns the new length of the array. Array.prototype.slice(): In JavaScript 1.2, the splice method returned the element removed, if only one element was removed (howMany parameter is 1). In JavaScript 1.3, splice always returns an array containing the removed elements. If one element is removed, an array of one element is returned. Changes to String.prototype.replace(). Changes to the
Boolean object. Changes to toString(). Non-ECMA-262 features of JavaScript 1.3 The following is a comparison between the June 1998 version of ECMA-262 and JavaScript 1.3. The following features were not part of the standard at that time, but implemented in JavaScript 1.3. Keywords and operators Strict equality operators vertical tab (\v or \u000B) as an escape sequence. Statements label sw...
JSException - Archive of obsolete content
dExceptionType Instance method getWrappedExceptionType. Declaration public int getWrappedExceptionType() Description getWrappedExceptionType() returns an int that matches one of the following static ints declared by the JSException class: EXCEPTION_TYPE_EMPTY EXCEPTION_TYPE_VOID EXCEPTION_TYPE_OBJECT EXCEPTION_TYPE_FUNCTION EXCEPTION_TYPE_STRING EXCEPTION_TYPE_NUMBER EXCEPTION_TYPE_
BOOLEAN ...
JSObject - Archive of obsolete content
tWindow Gets a JSObject for the window containing the given applet. call Method. Calls a JavaScript method. Equivalent to "this.methodName(args[0], args[1], ...)" in JavaScript. Declaration public Object call(String methodName, Object args[]) equals Method. Determines if two JSObject objects refer to the same instance. Overrides: equals in class java.lang.Object Declaration public
boolean equals(Object obj) Backward Compatibility JavaScript 1.3. In JavaScript 1.3 and earlier versions, you can use either the equals method of java.lang.Object or the == operator to evaluate two JSObject objects. In more recent versions, the same JSObject can appear as different Java objects. You can use the equals method to determine whether two JSObjects refer to the same instance. eval Method...
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
btn_comments ], renderTo: "form-comments" }); }); </script> The code in Listing 6 starts by hooking in the Ext JS library which is used to produce the UI elements of the form. Next a script named validateComments.js is hooked in with the runat attribute set to both. The function defined within this file checks the form to make sure it is complete, returning a
boolean. The both context it operates within is a very powerful concept as we are able to use this code to check values entered in the form on both the client and server side. No custom validation libraries for each environment makes for rapid development with less risk for error. Towards the bottom of the code are two div tags with ids form-comments and out-logger. The form-com...
Reference - Archive of obsolete content
avaScript (that is, every object that has an internal [[Call]] or [[Construct]] property) are functions as well as objects (including the Function object itself). The reason Object instanceof Function evaluates to true is because Object can be used as a constructor function. A subset of the "Object > (Function, everything else)" chain could be Object > Function > (Object, Function, Array, String,
Boolean, Number, Date, RegExp, Error). Array, for example, as a constructor function is an instance of the Function object, which happens to be an instance of Object; therefore, Array is also an instance of Object. This makes sense. The confusion sets in when you consider that Object is also a constructor function, therefore an instance of Function, and, furthermore, an instance of Object; this is where ...
Mozilla XForms Specials - Archive of obsolete content
Element. Custom Control Interface We have added a lot of functionality to our user interface, which allows the form authors to create custom controls. It involves exposing some (script) functionality on all our controls, like output, input, etc. and allowing the UI to be represented in XBL. More information can be found in XForms:Custom Controls. labelposition For xforms:input elements bound to a
boolean node we support an attribute labelposition in the namespace http://www.mozilla.org/projects/xfor...009/extensions, which allows the form author to define on which side of the checkbox the label will be shown. For details, see the input control documentation. Misc Cross Domain Submission Not exactly either a limitation, or an extension, but it is worth mentioning here. For security reasons, it is ...
Mozilla XForms User Interface - Archive of obsolete content
s Module This section contains a short description for each form control element. input A key xforms element to show and change the instance data to which it is bound. Usually bound to data that can be well-represented by a string (see the spec). It can have the following representations: text field - default representation. Used for most data types, especially text data. checkbox - used for
boolean instance data datepicker - default representation for date data types. Similar to a combobox. Consists of a text field for direct input and a dropdown calendar that can also be used to input the date value. calendar - used for date data types when appearance = 'full'. days list - used when the data has a data type of day. months list - used when the data has a data type of month. number...
Describing microformats in JavaScript - Archive of obsolete content
ed An array indicating the names of any properties that must be specified. This may be left out if all properties are optional. properties A structure describing the properties of the microformat. Property specifications Each property in the properties structure is specified by its name, and may include additional attributes if the property so requires. Standard attributes are: plural A
boolean value indicating that, if true indicates that the property can have multiple values. If a property is plural, it is returned as an array. virtual A
boolean value indicating whether or not the property is virtual. If it's virtual, the virtualGetter() method will be called to attempt to create the property if it doesn't exist. virtualGetter A function that is called to get a virtual property's ...
RDF in Mozilla FAQ - Archive of obsolete content
s-sink sink.addXMLSinkObserver(Observer); // Now Observer's methods will be called-back as // the load progresses. } Note that the observer will remain attached to the RDF/XML datasource unless removeXMLSinkObserver is called. How do I access the information in a datasource? The nsIRDFDataSource interface is the means by which you access and manipulate the assertions in a datasource.
boolean HasAssertion(aSource, aProperty, aTarget, aTruthValue). This tests the datasource to see if it has the specified tuple. nsIRDFNode GetTarget(aSource, aProperty, aTruthValue). nsISimpleEnumerator GetTargets(aSource, aProperty, aTruthValue). nsIRDFResource GetSource(aProperty, aTarget, aTruthValue). nsISimpleEnumerator GetSources(aProperty, aTarget, aTruthValue). nsISimpleEnumerator ArcLabel...
Implementing game control mechanisms - Game development
art of the game, and will execute this.clickEnclave() action assigned to it when clicked, but you can also use the mouse's pointer value in the update() function to make an action: update: function() { // ... if(this.game.input.mousePointer.isDown) { // do something } // ... } This will be executed whenever the mouse button is pressed, and it will be checked against the input's isDown
boolean variable on every frame of the game. That should give you some understanding of the project structure. We'll be playing mostly with the MainMenu.js and Game.js files, and we'll explain the code inside the create() and update() methods in much more detail in later articles. Pure JavaScript demo There's also a small online demo with full source code available on GitHub where the basic support fo...
Paddle and keyboard controls - Game development
whether the left or right control button is pressed. Two event listeners for keydown and keyup events. We want to run some code to handle the paddle movement when the buttons are pressed. Two functions handling the keydown and keyup events the code that will be run when the buttons are pressed. The ability to move the paddle left and right Pressed buttons can be defined and initialized with
boolean variables like in the example. Add these lines somewhere near the rest of your variables: var rightPressed = false; var leftPressed = false; The default value for both is false because at the beginning the control buttons are not pressed. To listen for key presses, we will set up two event listeners. Add the following lines just above the setInterval() line at the bottom of your JavaScript: do...
Buttons - Game development
This is the 15th step out of 16 of the Gamedev Phaser tutorial. You can find the source code as it should look after completing this lesson at Gamedev-Phaser-Content-Kit/demos/lesson15.html. Instead of starting the game right away we can leave that decision to the player by adding a Start button they can press. Let's investigate how to do that. New variables We will need a variable to store a
boolean value representing whether the game is currently being played or not, and another one to represent our button. Add these lines below your other variable definitions: var playing = false; var startButton; Loading the button spritesheet We can load the button spritesheet the same way we loaded the ball's wobble animation. Add the following to the bottom of the preload() function: game.load.spr...
IDL - MDN Web Docs Glossary: Definitions of Web-related terms
(a signed long). When using IDL attributes, you read or set values of the desired type, so input.maxlength is always going to return a number and when you set input.maxlength ,it wants a number. If you pass another type, it is automatically converted to a number as specified by the standard JavaScript rules for type conversion. IDL attributes can reflect other types such as unsigned long, URLs,
booleans, etc. Unfortunately, there are no clear rules and the way IDL attributes behave in conjunction with their corresponding content attributes depends on the attribute. Most of the time, it will follow the rules laid out in the specification, but sometimes it doesn't. HTML specifications try to make this as developer-friendly as possible, but for various reasons (mostly historical), some attributes ...
JSON - MDN Web Docs Glossary: Definitions of Web-related terms
JavaScript Object Notation (JSON) is a data-interchange format. Although not a strict subset, JSON closely resembles a subset of JavaScript syntax. Though many programming languages support JSON, JSON is especially useful for JavaScript-based apps, including websites and browser extensions. JSON can represent numbers,
booleans, strings, null, arrays (ordered sequences of values), and objects (string-value mappings) made up of these values (or of other arrays and objects). JSON does not natively represent more complex data types like functions, regular expressions, dates, and so on. (Date objects by default serialize to a string containing the date in ISO format, so the information isn't completely lost.) If you need JSON to represent additional data types, transform values as they are...
Truthy - MDN Web Docs Glossary: Definitions of Web-related terms
In JavaScript, a truthy value is a value that is considered true when encountered in a
Boolean context. All values are truthy unless they are defined as falsy (i.e., except for false, 0, -0, 0n, "", null, undefined, and NaN). JavaScript uses type coercion in
Boolean contexts. Examples of truthy values in JavaScript (which will be coerced to true in
boolean contexts, and thus execute the if block): if (true) if ({}) if ([]) if (42) if ("0") if ("false") if (new Date()) if (-42) if (12n) if (3.14) if (-3.14) if (Infinity) if (-Infinity) Specifications Specification ECMAScript (ECMA-262)The definition of 'To
Boolean abstract operation' in that specification. ...
MDN Web Docs Glossary: Definitions of Web-related terms
ent ARIA ARPA Arpanet Array ASCII Asynchronous ATAG Attribute B Bandwidth Base64 Baseline beacon Bezier curve BiDi BigInt Blink Block Block (CSS) Block (scripting) Block cipher mode of operation
Boolean Boot2Gecko Bootstrap Bounding Box Breadcrumb Brotli Browser Browsing context buffer C Cache Cacheable CalDAV Call stack Callback function Canonical order Canvas Card sorting CardDAV caret CDN Certificate...
Basic native form controls - Learn web development
apture=microphone"> Common attributes Many of the elements used to define form controls have some of their own specific attributes. However, there is a set of attributes common to all form elements. You've met some of these already, but below is a list of those common attributes, for your reference: Attribute name Default value Description autofocus false This
Boolean attribute lets you specify that the element should automatically have input focus when the page loads. Only one form-associated element in a document can have this attribute specified. disabled false This
Boolean attribute indicates that the user cannot interact with the element. If this attribute is not specified, the element inherits its setting from the containing element, for e...
Tips for authoring fast-loading HTML pages - Learn web development
to draw the visual viewport. To mark an image for lazy loading, specify its loading attribute with a value of lazy. With this set, the image will only be loaded when it's needed. <img href="./images/footerlogo.jpg" loading="lazy"> Note that lazily-loaded images may not be available when the load event is fired. You can determine if a given image is loaded by checking to see if the value of its
Boolean complete property is true. Choose your user-agent requirements wisely To achieve the greatest improvements in page design, make sure that reasonable user-agent requirements are specified for projects. Do not require your content to appear pixel-perfect in all browsers, especially not in down-version browsers. Ideally, your basic minimum requirements should be based on the consideration of mode...
Index - Learn web development
Arrays, Assessment, Beginner, CodingScripting, JavaScript, Learn, Numbers, Operators, Variables, l10n:priority, strings In this assessment you'll be tasked with taking some of the knowledge you've picked up in this module's articles and applying it to creating a fun app that generates random silly stories. Have fun! 81 Storing the information you need -- Variables Arrays,
Booleans, JavaScript, Numbers, Objects, Updating, Variables, declaring, initializing, l10n:priority, loose typing, strings By now you should know a reasonable amount about JavaScript variables and how to create them. In the next article, we'll focus on numbers in more detail, looking at how to do basic math in JavaScript. 82 Test your skills: Arrays Arrays, Beginner, JavaScript, Lear...
Making decisions in your code — conditionals - Learn web development
s are: === and !== -- test if one value is identical to, or not identical to, another. < and > -- test if one value is less than or greater than another. <= and >= -- test if one value is less than or equal to, or greater than or equal to, another. Note: Review the material at the previous link if you want to refresh your memories on these. We wanted to make a special mention of testing
boolean (true/false) values, and a common pattern you'll come across again and again. Any value that is not false, undefined, null, 0, NaN, or an empty string ('') actually returns true when tested as a conditional statement, therefore you can simply use a variable name on its own to test whether it is true, or even that it exists (that is, it is not undefined.) So for example: let cheese = 'Cheddar'; ...
Video and Audio APIs - Learn web development
check whether the active class has been set on the rwd button, indicating that it has already been pressed. The classList is a rather handy property that exists on every element -- it contains a list of all the classes set on the element, as well as methods for adding/removing classes, etc. We use the classList.contains() method to check whether the list contains the active class. This returns a
boolean true/false result. If active has been set on the rwd button, we remove it using classList.remove(), clear the interval that has been set when the button was first pressed (see below for more explanation), and use HTMLMediaElement.play() to cancel the rewind and start the video playing normally. If it hasn't yet been set, we add the active class to the rwd button using classList.add(), pause...
Storing the information you need — Variables - Learn web development
avaScript, unlike some other programming languages. When you give a variable a number value, you don't include quotes: let myAge = 17; Strings Strings are pieces of text. When you give a variable a string value, you need to wrap it in single or double quote marks; otherwise, JavaScript tries to interpret it as another variable name. let dolphinGoodbye = 'So long and thanks for all the fish';
Booleans
Booleans are true/false values -- they can have two values, true or false. These are generally used to test a condition, after which code is run as appropriate. So for example, a simple case would be: let iAmAlive = true; Whereas in reality it would be used more like this: let test = 6 < 3; This is using the "less than" operator (<) to test whether 6 is less than 3. As you might expect, it ...
Adding features to our bouncing balls demo - Learn web development
ape() constructor and add a new Ball() constructor: The Shape() constructor should define the x, y, velX, and velY properties in the same way as the Ball() constructor did originally, but not the color and size properties. It should also define a new property called exists, which is used to track whether the balls exist in the program (have not been eaten by the evil circle). This should be a
boolean (true/false). The Ball() constructor should inherit the x, y, velX, velY, and exists properties from the Shape() constructor. It should also define a color and a size property, like the original Ball() constructor did. Remember to set the Ball() constructor's prototype and constructor appropriately. The ball draw(), update(), and collisionDetect() method definitions should be able to stay ex...
Working with JSON - Learn web development
n. A JSON object can be stored in its own file, which is basically just a text file with an extension of .json, and a MIME type of application/json. JSON structure As described above, a JSON is a string whose format very much resembles JavaScript object literal format. You can include the same basic data types inside JSON as you can in a standard JavaScript object -- strings, numbers, arrays,
booleans, and other object literals. This allows you to construct a data hierarchy, like so: { "squadName": "Super hero squad", "homeTown": "Metro City", "formed": 2016, "secretBase": "Super tower", "active": true, "members": [ { "name": "Molecule Man", "age": 29, "secretIdentity": "Dan Jukes", "powers": [ "Radiation resistance", "Turning tiny", ...
Website security - Learn web development
to execute arbitrary SQL code on a database, allowing data to be accessed, modified, or deleted irrespective of the user's permissions. A successful injection attack might spoof identities, create new identities with administration rights, access all data on the server, or destroy/modify the data to make it unusable. SQL injection types include Error-based SQL injection, SQL injection based on
boolean errors, and Time-based SQL injection. This vulnerability is present if user input that is passed to an underlying SQL statement can change the meaning of the statement. For example, the following code is intended to list all users with a particular name (userName) that has been supplied from an HTML form: statement = "SELECT * FROM users WHERE name = '" + userName + "';" If the user specifies...
Ember interactivity: Events, classes and state - Learn web development
; export default class HeaderComponent extends Component { } Inside this file we will implement the event handler code. Update the content to the following: import Component from '@glimmer/component'; import { action } from '@ember/object'; export default class HeaderComponent extends Component { @action onKeyDown({ target, key }) { let text = target.value.trim(); let hasValue =
Boolean(text); if (key === 'Enter' && hasValue) { alert(text); target.value = '' } } } The @action decorator is the only Ember-specific code here (aside from extending from the Component superclass, and the Ember-specific items we are importing using JavaScript module syntax) -- the rest of the file is vanilla JavaScript, and would work in any application. The @action decorator d...
Beginning our React todo list - Learn web development
ome warnings into our browser console relating to handling events on the checkbox, which we want to avoid. Don't worry too much about this for now -- we will cover this later on when we get to using events. The htmlFor attribute corresponds to the for attribute used in HTML. We cannot use for as an attribute in JSX because for is a reserved word, so React uses htmlFor instead. Notes: To use
boolean values (true and false) in JSX attributes, you must enclose them in curly braces. If you write defaultChecked="true", the value of defaultChecked will be "true" -- a string literal. Remember -- this is actually JavaScript, not HTML! The aria-pressed attribute used in our earlier code snippet has a value of true because aria-pressed is not a true
boolean attribute in the way checked is. Impleme...
Componentizing our Svelte app - Learn web development
ent } function onEdit() { editing = true // enter editing mode } function onToggle() { update({ completed: !todo.completed}) // updates todo status } Updating the markup Now we need to update our Todo component's markup to call the above functions when the appropriate actions are taken. To handle the the editing mode we are using the editing variable, which is a
boolean. When it's true, it should display the <input> field for editing the todo name, and the Cancel and Save buttons. When it's not in editing mode it will display the checkbox, the todo name and the buttons to edit and delete the todo. To achieve this we will use an if block. The if block conditionally renders some markup. Take into account that it won't just show or hide the markup based on the con...
Rendering a list of Vue components - Learn web development
ns, remove the id field from your data attribute. You are no longer using uniqueId, so you need to remove the import uniqueId from 'lodash.uniqueid'; line, otherwise your app will throw an error. The <script> contents in your ToDoItem component should now look something like this: export default { props: { label: {required: true, type: String}, done: {default: false, type:
Boolean}, id: {required: true, type: String} }, data() { return { isDone : this.done, } }, } Now, over in your App.vue component, pass item.id as a prop to the ToDoItem component. Your App.vue template should now look like this: <template> <div id="app"> <h1>My To-Do List</h1> <ul> <li v-for="item in ToDoItems" :key="item.id"> <to-d...
Implementing feature detection - Learn web development
See Dive Into HTML5 Video Formats detection test. Property on element retains value Create an element in memory using Document.createElement(), set a property to a certain value, then check to see if the value is retained. See Dive into HTML5 <input> types detection test. Note: The double NOT in the above example (!!) is a way to force a return value to become a "proper"
boolean value, rather than a Truthy/Falsy value that may skew the results. The Dive into HTML5 Detecting HTML5 Features page has a lot more useful feature detection tests besides the ones listed above, and you can generally find a feature detection test for most things by searching for "detect support for YOUR-FEATURE-HERE" in your favorite search engine. Bear in mind though that some features, however...
Creating JavaScript callbacks in components
addEventListener / removeEventListener. A nice feature of addEventListener is that you can pass a JavaScript function in place of the callback listener interface. Remember (or discover) that addEventListener is a method of the nsIDOMEventTarget interface and is defined as such: void addEventListener(in DOMString type, in nsIDOMEventListener listener, in
boolean useCapture); However, it is extremely common to see developers pass a normal JavaScript function for the listener instead of an nsIDOMEventListener implementation: function doLoad(event) { // do something here } window.addEventListener("load", doLoad, false); Revealing the magic How is this possible? Is nsIDOMEventListener magical? Well, it actually is a little magical. But you can use the s...
Makefile - variables
PYTHON_UNIT_TESTS List of python scripts to check exit status for make check XPC_SHELL_TESTS NO_XPCSHELL_MANIFEST_CHECK Inhibit validating manifest files when running xpcshell tests. Compiler Variable Des...
The Firefox codebase: CSS Guidelines
lements. ThreeDLightShadow: Used as light border on elements. Using the background/text pairs is especially important to ensure the contrast is respected in all situations. Never mix custom text colors with a system background color and vice-versa. Note that using system colors is only useful for the chrome area, since content area colors are overriden by Gecko anyway. Writing media queries
Boolean media queries Do this: @media (-moz-mac-yosemite-theme: 0) { Not this: @media not all and (-moz-mac-yosemite-theme) { Privilege CSS for most common configuration It is better to put the most common configuration (latest version of an OS, or default theme for example) outside of the media query. In the following example, -moz-mac-yosemite-theme targets macOS 10.10 and higher, so it should ...
Gecko Logging
s. Note: this option disables 'append' and forces 'timestamp'. For example, if you want to specify "sync", "timestamp" and "rotate": set MOZ_LOG="example_logger:3,timestamp,sync,rotate:10" To adjust the logging after Firefox has started, you can set prefs under the logging. prefix. For example, setting logging.foo to 3 will set the log module foo to start logging at level 3. The special
boolean prefs logging.config.sync and logging.config.add_timestamp can be used to control the sync and timestamp properties described above. Redirecting logging output to a file Logging output can be redirected to a file by passing its path via an environment variable. By default logging output goes to stderr. set MOZ_LOG_FILE="log.txt" The rotate and append options described above only apply whe...
Listening to events on all tabs
alues are defined by nsITransport and nsISocketTransport. aMessage Localized text corresponding to aStatus. onRefreshAttempted Notification that a refresh or redirect has been requested in aWebProgress for example, via a <meta http-equiv="refresh"> or an HTTP Refresh: header. If any registered progress listener returns false from this method then the attempt to refresh will be blocked.
boolean onRefreshAttempted( nsIDOMXULElement aBrowser, nsIWebProgress webProgress, nsIURI aRefreshURI, long aMillis,
boolean aSameURI ); Parameters aBrowser The browser that fired the notification. aWebProgress The nsIWebProgress instance that fired the notification. aRefreshURI The new URI that aWebProgress has requested redirecting to. aMillis The dela...
Communicating with frame scripts
s : "they clicked", tag : event.target.tagName }, { target : event.target }); }, false); To receive messages from content, a chrome script needs to add a message listener using the message manager's addMessageListener() API. The message passed to the listener is an object containing the following properties: name String containing the message name. sync
Boolean declaring whether the message was send synchronously or aynchronously. data The JSON object passed as the second parameter to sendAsyncMessage(). target The XUL <browser> element from which this message was sent. objects An object whose properties are any CPOWs exposed by the sender as the third argument to sendAsyncMessage() In the example below the lis...
Frame script loading and lifetime
ame script use the loadFrameScript() function. This line of code loads a frame script into the currently selected tab. The script just writes "foo" to the command line: // chrome script var mm = gBrowser.selectedBrowser.messageManager; mm.loadFrameScript('data:,dump("foo\\n")', true); loadFrameScript() takes two mandatory parameters: A URL that points to the frame script you want to load A
boolean flag, allowDelayedLoad Note: if the message manager is a global frame message manager or a window message manager, loadFrameScript() may load the script multiple times, once in each applicable frame. chrome: URLs Extension developers usually use a chrome:// URL to refer to the frame scripts. To define the mapping between a chrome:// URL and a frame script packaged with an extension, use a "c...
Using the Browser API
console.log("It's possible to navigate the history forward."); } else { fwd.disabled = true; console.log("It's not possible to navigate the history forward."); } } } So here we have functions to detect whether we can navigate forwards/backwards in the history at any point. These use HTMLIFrameElement.getCanGoBack() and HTMLIFrameElement.getCanGoForward(), which return a
Boolean defining whether backward/forward navigation is possible at this point in the history. If true is returned, the relevant button is disabled, and if false is returned, the relevant button is enabled. Note that Promise versions of Browser API DOM request methods also exist, so you can use async promise style syntax if you so wish. For example: function canMoveBwd() { browser.getCanGoBack().then...
HTMLIFrameElement.getActive()
ot use it on 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 getActive() method of the HTMLIFrameElement indicates whether the current browser <iframe> is the currently active frame. Syntax var amIActive = instanceOfHTMLIframeElement.getActive(); Returns A
Boolean indicating whether the current browser <iframe> is the currently active frame (true) or not (false.) Parameters None. Example var browser = document.querySelector('iframe'); var amIActive = browser.getActive(); Specification Not part of any specification. ...
HTMLIFrameElement.getCanGoBack()
y also be large incompatibilities between implementations and the behavior may change in the future. The getCanGoBack() method of the HTMLIFrameElement interface is used to indicate whether it's possible to go back in the navigation history of the browser <iframe>. Syntax instanceOfHTMLIframeElement.getCanGoBack() .then(function(result) { ... }); Returns A Promise that resolves with a
boolean that equals true if the history can be navigated backward or false if not. Parameters None. Example function canMoveBwd() { browser.getCanGoBack().then(function(result) { if (result) { back.disabled = false; console.log("It's possible to navigate the history backward."); } else { back.disabled = true; console.log("It's not possible to navig...
HTMLIFrameElement.getCanGoForward()
ay also be large incompatibilities between implementations and the behavior may change in the future. The getCanGoForward() method of the HTMLIFrameElement is used to indicate whether it's possible to go forward in the navigation history of the browser <iframe>. Syntax instanceOfHTMLIframeElement.getCanGoForward() .then(function(result) { ... }); Returns A Promise that resolves with a
boolean that equals true if the history can be navigated forward or false if not. Parameters None. Example function canMoveFwd() { browser.getCanGoForward().then(function(result) { if (result) { fwd.disabled = false; console.log("It's possible to navigate the history forward."); } else { fwd.disabled = true; console.log("It's not possible to naviga...
HTMLIFrameElement.getMuted()
est = instanceOfHTMLIframeElement.getMuted(); and a Promise version: instanceOfHTMLIframeElement.getMuted().then(function(muted) { ... }); Returns Callback version: A DOMRequest that represents the get muted request. It has an onsuccess handler to handle the success case, and an onerror handler to handle the failure case. The muted value is available in the request.result property, and is a
Boolean value -- true means muted, and false means unmuted. Promise version: A Promise that resolves with the muted value -- a
Boolean where true means muted, and false means unmuted. Parameters None. Example Callback version: var browser = document.querySelector('iframe'); var request = browser.getMuted(); request.onsuccess = function() { if(request.result) { console.log('The browser is m...
HTMLIFrameElement.getVisible()
tations and the behavior may change in the future. The getVisible() method of the HTMLIFrameElement is used to request the current visible state of the browser <iframe>. Syntax instanceOfDOMRequest = instanceOfHTMLIframeElement.getVisible(); Returns A DOMRequest object to handle the getVisible() request's success and error cases. If the request is successful, the request's result is a
Boolean indicating the visible state of the browser <iframe>. Parameters None. Example var browser = document.querySelector('iframe'); var request = browser.getVisible(); request.onsuccess = function() { console.log('The visible state is: ' + this.result ? 'true' : 'false'); } Specification Not part of any specification. ...
mozbrowserasyncscroll
he 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 pixels of the document within the browser <iframe>. left The ...
mozbrowseraudioplaybackchange
s 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("mozbrowseraudioplaybackchange", function(event) { console.log(event.details); })...
mozbrowserclose
) 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."); }); Related Events mozbrowserasyncscroll mozbrowsercontextmenu ...
mozbrowserdocumentfirstpaint
<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 mozbrowserasyncscroll mozbrowsercontextmenu mozbrowsererror mozbr...
mozbrowsererror
ng to load content 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 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)...
mozbrowserfirstpaint
t: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 mozbrowserasyncscroll mozbrowsercontextmenu mozbrowsererror mozbrows...
mozbrowsericonchange
t will be fired once for each icon available. 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 A DOMString representing the path to the new icon. sizes A DOMString listing the sizes the ...
mozbrowserloadend
me other way to indicate loading is complete. 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. detail The detail property returns an anonymous JavaScript object with the following properties: backgroundColor A DOMString representing the main background color of the browser <iframe> content, ...
mozbrowserloadstart
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 = document.querySelector("iframe"); browser.addEventListene...
mozbrowsermanifestchange
efined 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. Example var browser = document.querySelector("iframe"); ...
mozbrowsermetachange
changed. See below for the applicable types. 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: name A DOMString representing the <meta> name attribute value. This can be viewmode, theme-color, ...
mozbrowseropensearch
n/opensearchdescription+xml"> is encountered. 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: title A DOMString representing the title of the search engine. href A DOMString representing URL...
mozbrowseropentab
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 of the new document loaded. Example var browser = document...
mozbrowseropenwindow
meElement property as the new window content. 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 of the document loaded within the frameElement property. nam...
mozbrowserresize
ser <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 width of the <iframe> viewport, in device pixels. height A n...
mozbrowserscroll
ed 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 vertical scroll position of the <iframe> viewport -- in CSS pixe...
mozbrowserscrollareachanged
age 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 scroll area width of the <iframe> viewport, in CSS pixels. he...
mozbrowserscrollviewchange
ronous scrolling (i.e. APCZ) starts or stops. 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: state A DOMString representing the current state of scrolling in the viewport -- available values ...
mozbrowsershowmodalprompt
window.confirm(), or window.prompt() methods. 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 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 ...
mozbrowsertitlechange
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 ) { console.log("The title of the document is:" + event.detail); })...
mozbrowservisibilitychange
s, 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 whether the browser iframe is visible (true) or not (false). Ex...
HTMLIFrameElement.reload()
on 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 reload() method of the HTMLIFrameElement interface is used to reload the content of the <iframe>. Syntax instanceOfHTMLIframeElement.reload(hardReload); Returns Void. Parameters hardReload Optional A
boolean that indicates whether all the resources to reload must be revalidated (true) or may be taken directly from the browser cache (false). Examples stopReload.addEventListener('touchend',function() { if(stopReload.textContent === 'x') { browser.stop(); } else { browser.reload(); } }); Specification Not part of any specification. ...
HTMLIFrameElement.setActive()
it on 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 setActive() method of the HTMLIFrameElement sets the current <iframe> as the active frame, which has an effect on how it is prioritized by the process manager. Syntax instanceOfHTMLIframeElement.setActive(
boolean); Returns Void. Parameters
boolean A
Boolean that indicates whether the iframe is to be the active frame (true) or not (false). Example var browser = document.querySelector('iframe'); browser.setActive(); Specification Not part of any specification. ...
HTMLIFrameElement.setVisible()
r <iframe> uses the window.requestAnimationFrame method and if the visible state is set to true, window.requestAnimationFrame will be called as often as necessary. However, if the visible state is set to false, window.requestAnimationFrame will be called only when there are free resources to do it. Syntax instanceOfHTMLIframeElement.setVisible(visible); Returns Void. Parameters visible A
Boolean that indicates if the browser <iframe> visible state is true or false. Examples var browser = document.querySelector('iframe'); browser.setVisible(true); Specification Not part of any specification. ...
CSS -moz-bool-pref() @supports function
Syntax -moz-bool-pref( <string> ) Parameters <string> The preference name Returns Evaluates to true if the preference is enabled, false otherwise. Example Warning: This will only work when loaded from a Gecko chrome stylesheet. HTML <div id="pref-test"> This will have a green background if the <code>test</code> preference is enabled. ...
Chrome-only CSS reference
It is short hand for the overflow-clip-box-inline and overflow-clip-box-block properties.overflow-clip-box-blockThe overflow-clip-box-block...
MozScrolledAreaChanged
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 region of the document. heightRead only long (int) ...
Internationalized Domain Names (IDN) Support in Mozilla Browsers
can be modified or new ones can be created without quitting the browser using the steps described below. Create a new preference item using the menu New > String via a right-mouse click. The name of the preference is: network.IDN_prefix. The value should be "bq--". This will change the default from Puncycode to RACE. Next create another new preference item using the right-mouse click menu New >
Boolean. The name of the preference is: network.IDN_testbed. The value should be "true". Now access IDN sites under the .com and .net top domains. You should succeed in reaching the sample sites. Don't forget to set the value of these preferences to "default" once you are finished with testing! Caveats and Conclusions Netscape 7.1/Mozilla 1.4 has solid support for Internationalized Domain Names and ...
JavaScript Tips
pText width XUL also maps the ordinal attribute but this defaults to "1" if it is not present. XUL also maps the class attribute, but unfortunately class is a reserved identifier, so the property is named className. (The property could have been implemented as ["class"'] but that just looks silly.) XUL also maps the hidden and collapsed attributes to properties, but note that these are
boolean properties whereas the above list are all string properties. XUL also maps other useful properties and methods using XBL bindings; these vary from element to element. For best performance give ids to all important elements. However in addition to locating elements by tag name XUL also allows you to locate an element by attribute, starting at any element in the document. References This was...
AddonManager
(in AddonListener listener) void addTypeListener(in TypeListener listener) void removeTypeListener(in TypeListener listener) nsIURI getURIForResourceInFile(in nsIFile aFile, in string aPath) Properties Overview Attribute Type Description addonTypes dictionary A dictionary that maps type ID to AddonType. autoUpdateDefault
boolean Whether add-ons should auto-update by default (overrideable per add-on). Corresponds to the extensions.autoUpdateDefault preference. Callbacks InstallCallback() A callback that is passed a single AddonInstall void InstallCallback( in AddonInstall install ) Parameters install The AddonInstall passed back from the asynchronous request InstallListCallback() A callback that is ...
Add-on Repository
ing searchTerms) void cancelSearch() void retrieveRecommendedAddons(in integer maxResults, in SearchCallback callback) void searchAddons(in string searchTerms, in integer maxResults, in SearchCallback callback) Properties Property Type Description homepageURL string The URL of the repository site's home page. isSearching
boolean true if a search is currently in progress; otherwise false. Methods getRecommendedURL() Returns the URL that can be visited to see recommended add-ons. string getRecommendedURL(); Parameters None. Return value An URL indicating the repository's page of recommended add-ons. getSearchURL() Returns an URL of a web page that can be visited to see search results for the specified se...
Widget Wrappers
PROVIDER_XUL node reference to the corresponding DOM node anchor the anchor on which to anchor panels opened from this node. ...
DeferredTask.jsm
You can also pass a generator function as the first argument of constructor. Method overview bool isPending();Obsolete since Gecko 28 void start();Obsolete since Gecko 28 void flush();Obsolete since Gecko 28 void cancel();Obsolete since Gecko 28 void arm(); void disarm(); Promise finalize(); Attributes isArmed
boolean Indicates whether the task is currently requested to start again later, regardless of whether it is currently running. isRunning
boolean Indicates whether the task is currently running. This is always true when read from code inside the task function, but can also be true when read from external code, in case the task is an asynchronous generator function. Methods isPend...
DownloadError
A DownloadError object provides detailed information about a download failure. Properties Attribute Type Description result Read only nsresult The result code associated with this error. becauseSourceFailed Read only
boolean Indicates an error occurred while reading from the remote location. becauseTargetFailed Read only
boolean Indicates an error occurred while writing to the local target. Inherits properties from Error. ...
DownloadSource
A DownloadSource object represents the source of a download, for example a document or an URI. Properties Attribute Type Description url Read only string The URI for the download source. isPrivate Read only
boolean Indicates whether the download originated from a private window. This determines the context of the network request that is made to retrieve the resource. referrer Read only string Referrer URI of the download source, or null if no referrer should be sent or the download source is not HTTP. ...
DownloadSummary
nloadList. A reference to a DownloadSummary object can be obtained using the Downloads.getSummary() function. Method overview Promise bindToList(DownloadList aList); Promise addView(Object aView); Promise removeView(Object aView); Properties Attribute Type Description allHaveStopped Read only
boolean Indicates whether all the downloads are currently stopped. progressTotalBytes Read only number Indicates the total number of bytes to be transferred before completing all the downloads that are currently in progress. For downloads that do not have a known final size, the number of bytes currently transferred is reported as part of this property.
DownloadTarget
This is a dynamic property, which is updated when the download is completed or when the Download.refresh() method is called. ...
Following the Android Toasts Tutorial from a JNI Perspective
ext, show Fields - LENGTH_SHORT No constructors are used. Declare the types We will start by declaring the types needed. In JNI, there is the all-important property called sig. When something is declared, we are stating the sig and the name. ...
OS.File.Info
unixLastStatusChangeDate Date. This is the date of the latest write/renaming/mode change/... where ... is any write/set of inode information (such as owner, group, link count, mode, etc). Windows winBirthDate A Date representing the time at which the file was created. May not be exact on all file systems. winAttributes hidden
Boolean readOnly
Boolean system
Boolean MacOS X macBirthDate A Date representing the time at which the file was created. May not be exact on all file systems. (As of Firefox 38 this attribute is not found, see screen shots below, Bugzilla :: Bug 1156060) Screenshot of Info object in Variable Viewer M...
OS.File for the main thread
ticular if the path does not represent an existing file. OS.File.setPermissions() Sets the file's access permission bits. Promise<void> setPermissions( in string path, in object options ) Arguments path The complete path to the file. options The new attributes to set winAttributes This is an object with following optional keys. Ignored under non-Windows platforms. hidden
Boolean. Set to true to make the target hidden, or false to make it visible. readOnly
Boolean. Set to true to make the target "read only". system
Boolean. Toggles the "system" attribute, this is equivalent . unixMode Number. This is an number can be created with the constants available in OS.Constants.libc.S_I* or OS.Constants.libc.S_O*. Ignored under non-Unix platforms. To make a file hidden on Un...
Promise
asons). If you see the message "A promise chain failed to handle a rejection", there is likely something to be fixed in the code. See handling errors and common pitfalls below. Documentation conventions In documentation, the type of the fulfillment value is usually specified between angular brackets. For example, the OS.File.exists function returns a promise that will eventually fulfill with a
boolean: Promise<
boolean> exists(string path); The rejection reason may be specified separately in the function's documentation, and is considered to be an Error object unless otherwise specified. Method overview Promise then([optional] Function onFulfill, [optional] Function onReject); Promise catch([optional] Function onReject); Constructor Creates a new promise, initiall...
WebRequest.jsm
do with a request: cancel it redirect it modify request headers modify response headers. To perform one of these operations, include a property with the appropriate name in the object returned from the listener, and assign it the desired value, as detailed in the table below: Operation Available in Return property Cancel onBeforeRequest cancel
Boolean value set to true. See some examples of canceling requests. Redirect onBeforeSendHeaders redirectUrl String set to the URL to redirect the request to. See some examples of redirection. Modify request headers onBeforeSendHeaders requestHeaders Array of HTTP headers. Modify response headers onHeadersReceived responseH...
DMD
s.classes; let mydumper = Cc["@mozilla.org/memory-info-dumper;1"] .getService(Ci.nsIMemoryInfoDumper); mydumper.dumpMemoryInfoToTempDir(identifier, anonymize, minimize); This will dump memory reports and DMD output to the temporary directory. identifier is a string that will be used for part of the filename (or a timestamp will be used if it is an empty string); anonymize is a
boolean that indicates if the memory reports should be anonymized; and minimize is a
boolean that indicates if memory usage should be minimized first. (Linux only) You can send signal 34 to the firefox process, e.g. with the following command. $ killall -34 firefox Each one of these steps triggers all the memory reporters and then DMD analyzes the reports, printing commentary like this: DMD[5222]...
browser.altClickSave
The preference browser.altClickSave controls whether clicking a link while holding the alt key starts the download of that link. Type:
boolean Default value: false Exists by default: yes Application support:Firefox 13.0 Status: Active; last updated 2012-03-19 Introduction: Pushed to Nightly on 2012-03-02 Bugs: bug 713052 Values true Clicking a link while holding the alt key starts the download of that link. false (default) No action triggered (see bug 736985). ...
browser.download.lastDir.savePerSite
browser.download.lastDir.savePerSite controls whether the directory preselected in the file picker for saving a file download is being remembered on a per-website (host) base. If set to true, the data is stored as content preference. Type:
boolean Default value:true Exists by default: no Application support:Firefox 11.0 Status: Active; last updated 2012-02-15 Introduction: Pushed to Nightly on 2011-12-11 Bugs: bug 702748 Values true (default) The last used directory for the website (host) serving the file for download will be preselected in the file picker. If no download directory for the current website has been stored, browser.download.lastDir will be used. false The last used directory for any download (stored in browser.download.lastDir) will be the preselected direc...
browser.pagethumbnails.capturing_disabled
The preference browser.pagethumbnails.capturing_disabled controls whether the application creates screenshots of visited pages which will be shown if the web page is shown in the grid of the "New Tab Page" (about:newtab) which offers the most often visited pages for fast navigation. Type:
boolean Default value:true Exists by default: no Application support: Firefox 14.0 Status: Active; last updated 2012-09-17 Introduction: Pushed to Nightly on 2012-04-13 Bugs: bug 726347 Values false The application creates screenshots of visited web pages. true (default) The application doesn't create screenshots of visited web pages. ...
browser.search.context.loadInBackground
browser.search.context.loadInBackground controls whether a search from the context menu with "Search <search engine> for <selected text>" opening a new tab will give focus to it and load it in the foreground or keep focus on the current tab and open it in the background. Type:
boolean Default value:false Exists by default: yes Application support: Firefox 13.0 Status: Active; last updated 2012-02-17 Introduction: Pushed to Nightly on 2012-02-15 Bugs: bug 727131 Values true New tab with search results will be opened in the background, focus stays on the current tab. false (default) New tab with search results will be opened in the foreground. ...
browser.urlbar.formatting.enabled
The preference browser.urlbar.formatting.enabled controls whether the domain name including the top level domain is highlighted in the address bar by coloring it black and the other parts grey. Type:
boolean Default value: true Exists by default: yes Application support:Firefox 6.0 Status: Active; last updated 2012-04-03 Introduction: Pushed to Nightly on 2011-05-03 Bugs: bug 451833 Values true (default) The domain name including the top level domain is highlighted in the address bar by coloring it black and the other parts grey. false All parts of the url are given the same color: black. ...
dom.event.clipboardevents.enabled
dom.event.clipboardevents.enabled lets websites get notifications if the user copies, pastes, or cuts something from a web page, and it lets them know which part of the page had been selected. The emitting of the oncopy, oncut and onpaste events are controlled by this preference. Type:
boolean Default value:true Exists by default: no Application support: Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10) Status: Active; last updated 2012-02-15 Introduction: Pushed to Nightly on 2012-02-14 Bugs: bug 542938 Values true (default) The oncopy, oncut and onpaste events are enabled for web content. false The oncopy, oncut and onpaste events are disabled for web content. ...
mail.tabs.drawInTitlebar
Starting in Thunderbird 17.0, the tabs are drawn in the title bar. The old behavior can be restored by setting the preference mail.tabs.drawInTitlebar to false. Type:
boolean Default value: true Exists by default: yes Application support:Thunderbird 17.0 Status: Active; last updated 2012-09-17 Introduction: Pushed to Daily on 2012-08-08 Bugs: bug 771816 Values true (default) The tabs are drawn in the title bar of the mail program. false The tabs are drawn in a separate tab bar, and the title bar shows the title of the current tab (e.g. the subject of the currently selected mail). ...
nglayout.debug.disable xul fastload
The preference nglayout.debug.disable_xul_fastload controls whether or not XUL fastload is used. Never set nglayout.debug.disable_xul_fastload to true in a production environment; it exists solely to aid in debugging. In particular, add-ons should never change this preference.. Type:
boolean Default value: false (true in debug builds) Exists by default: yes Application support:? Status: Active Introduction:? Bugs: Values false (default) XUL fastload is used. true XUL fastload is disabled. ...
reader.parse-on-load.force-enabled
The preference reader.parse-on-load.force-enabled controls if the reader mode used in Firefox Mobile should be enabled independent of the memory available in the device. By default, the reader mode in Firefox Mobile is only enabled if the memory is greater than 384MB. Type:
boolean Default value: false Exists by default: yes Application support:Firefox Mobile 23.0 Status: Active; last updated 2013-05-11 Introduction: Pushed to Nightly on 2013-05-06 Bugs: bug 867875 Values true Reader mode is enabled independent of memory available. false (default) Reader mode is only enabled if memory available exceeds a threshold (currenlty 384MB). ...
view_source.syntax_highlight
The preference view_source.syntax_highlight controls whether markup in the view source view is syntax highlighted. Type:
boolean Default value: true Exists by default: yes Application support:Firefox 1.0 Status: Active Introduction: Bugs: bug 52154 Values true (default) Syntax hightlighting is enabled. false Syntax hightlighting is disabled. ...
PRBool
Boolean value. Syntax #include <prtypes.h> typedef enum { PR_FALSE = 0, PR_TRUE = 1 } PRBool; Description Wherever possible, do not use PRBool in Mozilla C++ code. Use standard C++ bool instead. Otherwise, use PRBool for variables and parameter types. Use PR_FALSE and PR_TRUE for clarity of target type in assignments and actual arguments. Use if (bool), while (!bool), (bool) ? x : y, and so on to test
Boolean values, just as you would C int-valued conditions. ...
PRPackedBool
Syntax #include <prtypes.h> typedef PRUint8 PRPackedBool; Description Use PRPackedBool within structures. ...
NSPR API Reference
d Synchronization Locks and Monitors Condition Variables NSPR Sample Code NSPR Types Calling Convention Types Algebraic Types 8-, 16-, and 32-bit Integer Types Signed Integers Unsigned Integers 64-bit Integer Types Floating-Point Integer Type Native OS Integer Types Miscellaneous Types Size Type Pointer Difference Types
Boolean Types Status Type for Return Values Threads Threading Types and Constants Threading Functions Creating, Joining, and Identifying Threads Controlling Thread Priorities Controlling Per-Thread Private Data Interrupting and Yielding Setting Global Thread Concurrency Getting a Thread's Scope Process Initialization Identity and Versioning Name and Ver...
nss tech note1
t is zero. The tag number. It is stored in the lower 5 tag bits (number 0 through 4). The ASN.1 standard only defines tag numbers in the universal class. If you you are using a tag of a different classes, you can define your own tag number macros or specify the tag value within the template definition. ...
NSS PKCS11 Functions
adUserModule Load a new PKCS #11 module based on a moduleSpec. Syntax #include "secmod.h" extern SECMODModule *SECMOD_LoadUserModule(char *moduleSpec, SECMODModule *parent, PRBool recurse); Parameters This function has the following parameters: moduleSpec is a pkcs #11 moduleSpec. parent is the moduleDB that presented this module spec. For applications this value should be NULL. recurse is a
boolean indicates whether or not the module should also launch additional pkcs #11 modules. This is only applicable if the loaded module is actually a moduleDB rather than a PKCS #11 module (see PKCS11_Module_Specs). Returns The function returns one of these values: If successful, a pointer to a SECMODModule. Caller owns the reference If unsuccessful, NULL. Description SECMOD_LoadUserModule loads a ne...
sslfnc.html
by a call to SSL_ForceHandshake. SSL_ResetHandshake Resets the handshake state for a specified socket. Syntax #include "ssl.h" SECStatus SSL_ResetHandshake( PRFileDesc *fd, PRBool asServer); Parameters This function has the following parameters: fd A pointer to the file descriptor for the SSL socket. asServer A
Boolean value. PR_TRUE means the socket will attempt to handshake as a server the next time it tries, and PR_FALSE means the socket will attempt to handshake as a client the next time it tries. Returns The function returns one of these values: If successful, SECSuccess. If unsuccessful, SECFailure. Use PR_GetError to obtain the error code. Description Calling SSL_ResetHands...
Rhino overview
mbeddings, this language version is selected using the LANGUAGE attribute of the SCRIPT tag with values such as "JavaScript1.2". Version 1.3 and greater are ECMA conformant. Operators == and != Version 1.2 only uses strict equality for the == and != operators. In version 1.3 and greater, == and != have the same meanings as ECMA. The operators === and !== use strict equality in all versions. To
Boolean Boolean(new
Boolean(false)) is false for all versions before 1.3. It is true (and thus ECMA conformant) for version 1.3 and greater. Array.prototype.toString and Object.prototype.toString Version 1.2 only returns array or object literal notation ("[1]" or "{a:1, b:2}" for example). In version 1.3 and greater these functions are ECMA conformant. Array constructor Array(i) for a number argumen...
The JavaScript Runtime
is supported. It is possible to specify the class files as well as the packages to generate into. Types and Values There are six fundamental types in JavaScript. These types are implemented with the following Java types and values: JavaScript fundamental type Java type Undefined A singleton object defined by Context.getUndefinedType() Null null
Boolean java.lang.
Boolean Number java.lang.Number, that is, any of java.lang.Byte, java.lang.Short, java.lang.Integer, java.lang.Float, or java.lang.Double. Not java.lang.Long, since a double representation of a long may lose precision. String java.lang.CharSequence (java.lang.String or org.mozilla.javascript.ConsString) Object org.mozilla.javascript.Scriptable ...
Rhino scopes and contexts
objects. A notion of a sealed object is a JavaScript extension supported by Rhino and it means that properties can not be added/deleted to the object and the existing object properties can not be changed. Any attempt to modify sealed object throws an exception. To seal all objects in the standard library passtrue for the sealed argument when calling Context.initStandardObjects(ScriptableObject,
boolean): ScriptableObject sealedSharedScope = cx.initStandardObjects(null, true); This seals only all standard library objects, it does not seal the shared scope itself thus after callinginitStandardObjects, sealedSharedScope can be farther populated with application-specific objects and functions. Then after a custom initialization is done, one can seal the shared scope by callingScriptableObject.se...
How to embed the JavaScript engine
t this click. * Pass cx to NewEventObject so JS_NewObject can be called. */ target = FindEventTargetAt(cx, global, x, y); event = NewEventObject(cx, "click", x, y); argv[0].setObjectOrNull(event); /* To emulate the DOM, you might want to try "onclick" too. */ ok = JS_CallFunctionName(cx, target, "onClick", argv, &rval); /* Now test rval to see whether we should cancel the event. */ if (rval.is
Boolean() && !rval.to
Boolean()) CancelEvent(event); Again, I've elided error checking (such as testing for !ok after the call), and I've faked up some C event management routines that emulate the DOM's convention of canceling an event if its handler returns false. Original Document Information Author: Brendan Eich ...
SpiderMonkey Internals
of a hash table associating strings uniquely with scanner/parser information such as keyword type, index in script or function literal pool, etc. Atoms play three roles: as literals referred to by unaligned 16-bit immediate bytecode operands, as unique string descriptors for efficient property name hashing, and as members of the root GC set for exact GC. Standard library The methods for arrays,
booleans, dates, functions, numbers, and strings are implemented using the JS API. Most are JSFastNatives. Most string methods are customized to accept a primitive string as the this argument. (Otherwise, SpiderMonkey converts primitive values to objects before invoking their methods, per ECMA 262-3 ?11.2.1.) Error handling SpiderMonkey has two interdependent error-handling systems: JavaScript exceptio...
JS::FalseValue
This article covers features introduced in SpiderMonkey 24 Create a JS::Value that represents the JavaScript value false. Syntax JS::Value JS::FalseValue() Description JS::FalseValue creates a JS::Value that represents the JavaScript value false. See Also MXR ID Search for JS::FalseValue JS::Value JS::
BooleanValue JS::TrueValue ...
JS::TrueValue
This article covers features introduced in SpiderMonkey 24 Create a JS::Value that represents the JavaScript value true. Syntax JS::Value JS::TrueValue() Description JS::TrueValue creates a JS::Value that represents the JavaScript value true. See Also MXR ID Search for JS::TrueValue JS::Value JS::
BooleanValue JS::FalseValue ...
JSBool
d by bool. JS_TRUE has been replaced by just true and in the same way JS_FALSE by false. JSBool is the return type of many JSAPI functions and callbacks. JS_TRUE indicates success; JS_FALSE indicates an error or exception occurred. JSBool is an integer type. JS_TRUE is (JSBool) 1 and JS_FALSE is (JSBool) 0. These values must not be used as jsvals. Instead, use JSVAL_TRUE and JSVAL_FALSE, and use
BOOLEAN_TO_JSVAL and JSVAL_TO_
BOOLEAN to convert. ...
JSType
The values of the JSType enumeration represent the types of JavaScript values. Value Description JSTYPE_VOID The undefined value. JSTYPE_OBJECT JavaScript objects. JSTYPE_FUNCTION Functions. JSTYPE_STRING Strings. JSTYPE_NUMBER Numbers. JSTYPE_
BOOLEAN Boolean values, true and false. JSTYPE_NULL The null value. JSTYPE_SYMBOL Symbols. See Also MXR ID Search for JSType ...
JSVAL_IS_OBJECT
n some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Determine whether a given jsval is an object or null. Syntax JSBool JSVAL_IS_OBJECT(jsval v); Description JSVAL_IS_OBJECT(v) returns true if v is either an object or JSVAL_NULL. This indicates that it is safe to call JSVAL_TO_OBJECT(v) to convert v to type JSObject *. If v is a string, number,
boolean, or undefined, the result is false. This function is obsolete and has been removed. Instead use !JSVAL_IS_PRIMITIVE(v) to detect objects and JSVAL_IS_NULL(v) to detect null. See Also bug 952650 ...
JSVAL_IS_PRIMITIVE
Obsolete since JSAPI 32This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Determine if a given jsval is of a primitive type. Syntax JSVAL_IS_PRIMITIVE(v) Description JSVAL_IS_PRIMITIVE(v) is true if v is undefined, null, a
boolean, a number, or a string. Otherwise it is false, and v is an object. See Also bug 952650 ...
JSVAL_TRUE
Obsolete since JSAPI 42This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. jsval constants that represent the JavaScript values true and false. Syntax JSVAL_TRUE JSVAL_FALSE Description JSVAL_TRUE and JSVAL_FALSE are jsval constants that represent the JavaScript
boolean values, true and false. They are equivalent to
BOOLEAN_TO_JSVAL(true) and
BOOLEAN_TO_JSVAL(false), respectively. Take care not to confuse the jsval constants JSVAL_TRUE and JSVAL_FALSE with the bool constants true and false. jsval values must not be used as C true/false values; there is no guarantee that the C bit-pattern of any particular jsval is zero or nonzero. See Also MXR ID Search for JSVAL_TRUE MXR ID S...
JS_ConvertArguments
umber of JS values you are passing in for conversion. argv is a pointer to the array of JS values to convert. format is a null-terminated C string. Each element of the array indicates the C type into which to convert the next available JS value. ...
JS_InitStandardClasses
aller must be in a request on this JSContext. obj JS::Handle<JSObject*> The global object to initialize. This object must be of a JSClass that has the JSCLASS_GLOBAL_FLAGS bits set. Description JS_InitStandardClasses initializes the built-in JavaScript global properties. ...
JS_PushArguments
s (*) in format are ignored. This function also takes in consideration any additional custom types defined in cx using JS_AddArgumentFormatter. For example, if format is "bIob", then there must be four arguments after format. Their types must be JSBool, jsdouble, JSObject *, and JSBool. If successful, JS_PushArguments would return a pointer to the first element of an array of four jsvals: a
boolean, a number, an object (or null), and a
boolean. On success, JS_PushArguments fills in the supplied markp pointer and returns a pointer to the first element of an array of jsval which are automatically rooted as necessary (protected from the GC temporarily). The application must call JS_PopArguments using the supplied markp stack pointer when done with this stack frame, to free the memory and unroo...
JS_TypeOfValue
rform the type check. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext. v JS::Handle<JS::Value> The value to examine. Description JS_TypeOfValue examines a specified JS value, v, and returns its JS data type. The return value is always one of JSTYPE_VOID, JSTYPE_OBJECT, JSTYPE_FUNCTION, JSTYPE_STRING, JSTYPE_NUMBER, or JSTYPE_
BOOLEAN. See Also MXR ID Search for JS_TypeOfValue JS_ConvertValue JS_GetTypeName JS_ValueTo
Boolean JS_ValueToFunction JS_ValueToInt32 JS_ValueToNumber JS_ValueToObject JS_ValueToString ...
JS_ValueToFunction
nction, this means it isn't attached to any global or enclosing scope, and therefore must not be treated like a real function. Instead, use JSVAL_IS_OBJECT and JS_ObjectIsFunction() to check whether a value is already a function, or use JS_ConvertValue() to convert a value to JSTYPE_FUNCTION safely. If v is a Function object, this returns the associated JSFunction. If v is null, undefined, a
boolean, a number, or a string, a TypeError is reported and JS_ValueToFunction returns NULL. Otherwise, v is an object. The JavaScript engine attempts to convert it to a function. (Implementation note: The actual conversion is performed by the object itself. The object's JSObjectOps.defaultValue method is called with hint=JSTYPE_FUNCTION.) JS_ValueToFunction returns a pointer to the converted function.
JS_ValueToObject
ss, *objp receives NULL or a pointer to the resulting object. Description JS_ValueToObject converts a specified JavaScript value, v, to an object. On success, this function stores either NULL or a pointer to the resulting object in *objp and returns true. Otherwise it returns false and the value left in *objp is unspecified. If v is JSVAL_NULL or JSVAL_VOID, the result is NULL. If v is a
boolean value, a number, or a string, the result is a new wrapper object of type
Boolean, Number, or String. Otherwise v is an object, and the result depends on the object. If v is a native JavaScript Object, this calls the object's valueOf method, if any. In any case, the result is not guaranteed to be the same object as v. (Implementation note: the object's JSObjectOps.defaultValue method is called wi...
SpiderMonkey 38
9) JS::RemoveObjectRootRT (bug 1107639) JS::RemoveScriptRoot (bug 1107639) JS::RemoveScriptRootRT (bug 1107639) JS::RemoveStringRoot (bug 1107639) JS::RemoveStringRootRT (bug 1107639) JS::RemoveValueRoot (bug 1107639) JS::RemoveValueRootRT (bug 1107639) JSCLASS_NEW_ENUMERATE (bug 1097267) JSCLASS_NEW_RESOLVE (bug 993026) JSID_IS_OBJECT (bug 915482) JSNewResolveOp (bug 993026) JSVAL_IS_
BOOLEAN (bug 952650) JSVAL_IS_DOUBLE (bug 952650) JSVAL_IS_GCTHING (bug 952650) JSVAL_IS_INT (bug 952650) JSVAL_IS_NULL (bug 952650) JSVAL_IS_NUMBER (bug 952650) JSVAL_IS_PRIMITIVE (bug 952650) JSVAL_IS_STRING (bug 952650) JSVAL_IS_VOID (bug 952650) JSVAL_TO_
BOOLEAN (bug 952650) JSVAL_TO_DOUBLE (bug 952650) JSVAL_TO_GCTHING (bug 952650) JSVAL_TO_INT (bug 952650) JSVAL_TO_OBJECT (bug 952650) ...
Using the Places history service
history. Because actually counting all the pages in history is expensive,NavHistory will always return the value 0 or 1. 0 is returned when there is no history, 1 is returned when there are one or more pages in history.Deprecated, use hasHistoryEntries instead. nsINavHistoryService.hasHistoryEntries: Exactly the same as nsIBrowserHistory.count, except with a better name and actually returning a
boolean. Preferred over "count". nsINavHistory.canAddURI: Determines whether the given URI will be stored by the history system. Many types of URIs, such as "chrome:" URIs, are not stored when addURI is called. This function allows you to determine whether it will be or not. Advanced querying See Querying Places for more detailed examples on how to used the advanced querying functionality of NavHi...
Preferences API
It is relatively easy to use, while providing a number of useful user and developer features, including support for default preferences, user overrides via user.js, and locking. You can also create a XUL-based options window easily to allow user modify some preferences. Many applications including Firefox and Thunderbird have an additional tool for power users, about:config, which can be used to tweak the preferences without UI. Interfaces The preferences API is exposed as a set of XPCOM components and interfaces: nsIPrefService, nsIPrefBranch. ... ...
extIExtension
e instructions on the FUEL (Firefox), STEEL (Thunderbird) and SMILE (SeaMonkey) pages. Method overview FIXME: Attributes Attribute Type Description id readonly attribute AString The id of the extension. name readonly attribute AString The name of the extension. enabled readonly attribute
boolean True if the extension is currently enabled. version readonly attribute AString The version number of the extension. firstRun readonly attribute
boolean Indicates whether this is the extension's first run after install prefs readonly attribute extIPreferenceBranch The preferences object for the extension. Def...
Accessing the Windows Registry Using XPCOM
_CURRENT_USER, "SOFTWARE\\MDC\\Test", wrk.ACCESS_ALL); removeChildrenRecursive(wrk); wrk.close(); Monitoring Registry Keys If you would like to know whether a registry key has changed since you last checked it, you can use the startWatching(), stopWatching(), and hasChanged() methods. You must call startWatching() for the key to be monitored. The method takes one parameter, a
boolean indicating whether child keys should be watched. After that, you can call hasChanged() to determine whether or not you need to reread the value. Calling hasChanged() automatically resets the watch, so you can be sure that if it returns true there are changes. This example demonstrates a trivial registry value cache for one key: var cache = {}; function readRegistryValueNoCache(wrk, value) { s...
Building the WebLock UI
as it's loaded. Like the secure page icon, the weblock icon that appears in the lower right corner of the browser should indicate whether the browser is currently locked or unlocked. Since the WebLock component is always initialized as unlocked, we can have the client code - the JavaScript code in the interface - represent this state and track it as the user manipulates the iWebLock interface. ...
Using XPCOM Components
WebBrowserFind component is another part of a large set of web browsing interfaces you can use. Its nsIWebBrowserFind interface is shown in The nsIWebBrowserFind Interface. To use this component, you access it through the nsIWebBrowserFind interface and call its methods. The nsIWebBrowserFind Interface findNext Find the next occurrence of the search string. findBackwards
Boolean attribute that adjusts findNext() to search backwards up the document. searchFrames
Boolean attribute that indicates whether to search subframes of current document. matchCase
Boolean attribute that indicates whether to match case in the search. entireWord
Boolean attribute that specifies whether the entire word should be matched or not. Once you use the...
XPCOM hashtable guide
situations, an array, a linked-list, or various tree data structures are more efficient. Which Hashtable Should I Use? The appropriate hashtable class to use depends solely on the data type. The template specialization to use depends on the data type and the key type. Data Type Hashtable class None (for a hash set) nsTHashtable Simple Types (numbers,
booleans, etc) nsDataHashtable Structs or Classes (nsString, custom defined structs or classes that are not reference-counted) nsClassHashtable Reference-counted Concrete Classes nsRefPtrHashtable Interface Pointers nsInterfaceHashtable Each of these classes is a template with two parameters. The first is the hash key and the secon...
Index
Automated testing, Developing Mozilla, JavaScript, JavaScript:Tools, Tools, XPCOM:Language Bindings, XPConnect The command-line syntax for xpcshell is: 70 XPCshell Test Manifest Expressions QA, Testing XPCShell unit tests are run by specifying them in a manifest file. You can add conditions to tests in order to control when tests get run. The conditions accept a simple
boolean expression syntax, described here. 71 Monitoring HTTP activity HTTP Gecko includes the nsIHttpActivityObserver interface, which you can implement in your code to monitor HTTP transactions in real time, receiving a callback as the transactions take place. 72 Observer Notifications XPCOM, XPCOM:Add-ons The following are topics that you can observe during th...
Introduction to XPCOM for the DOM
terface, nsIDOMFabian, will do. For the purpose of this document, I have chosen to implement a new HTML interface called nsIDOMFabian. It will be implemented by the class nsHTMLDocument. The syntax of XPIDL is straightforward: #include "domstubs.idl"; [scriptable, uuid(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)] interface nsIDOMFabian : nsISupports { void fabian(); readonly attribute
boolean neat; }; This is the definition of the nsIDOMFabian interface. The uuid of the interface is a unique identifier. Every interface needs one. You can generate them using guidgen on windows, or by issuing the command "mozbot uuid" in #mozilla on irc.mozilla.org. At compile-time, the XPIDL compiler will turn this interface definition into real C++ code, a header file that will contain the pure...
Components.isSuccessCode
ld call Components.isSuccessCode() upon the status code included in the notification. Examples Checking whether copying a stream's data succeeded The following example demonstrates copying data from a buffered nsIInputStream to an nsIOutputStream, checking for whether the copy succeeded using Components.isSuccessCode(). Note: nsIAsyncStreamCopier.init() has changed in Gecko 1.9.2, omit last 2
boolean parameters if you're using Gecko 1.9.1 and earlier. const Cc = Components.classes; const Ci = Components.interfaces; const Cr = Components.results; // global flags polled externally var copyFailed = false; var copyInProgress = false; function copyBufferedStream(inStream, outStream) { var copyObserver = { onStartRequest: function(request, context) { copyInProgress = tr...
Components.utils.cloneInto
ch as an add-on, can share an object with less-privileged code like a normal web page script. Syntax Components.utils.cloneInto(obj, targetScope[, options]); Parameters obj : object The object to clone. targetScope : object The object to attach the object to. options : object This optional parameter is an object with the following optional properties: cloneFunctions: a
Boolean value that determines if functions should be cloned. If omitted the default value is false. Cloned functions have the same semantics as functions exported using Components.utils.exportFunction. See Cloning objects that have functions below. wrapReflectors: a
Boolean value that determines if objects reflected from C++, such as DOM objects, should be cloned. If omitted the default value is false. ...
Components.utils.isXrayWrapper
ters out certain changes to the objects that could cause them to behave in unexpected ways. For example, privileged code using an Xray to a DOM object sees only the original, native version of the DOM object. Any expando properties are not visible, and if any native properties have been redefined, this has no effect. Use this function to determine whether a given object is an Xray or not. Syntax
boolean Components.utils.isXrayWrapper(obj); Parameters obj The object to check. Returns true if the object is an Xray: false otherwise. Example var isXray = Components.utils.isXrayWrapper(gBrowser.contentWindow); // true var waived = Components.utils.waiveXrays(gBrowser.contentWindow); isXray = Components.utils.isXrayWrapper(waived); // false ...
Components.utils
ough to that with the specified value as the zeal value. unwaiveXrays() Undoes waiveXrays(): reapplies the Xray filtering protection. waiveXrays() Removes the filtering provided by an Xray. Properties Property Type Description Sandbox nsIXPCComponents_utils_Sandbox Creates sandbox objects for use with evalInSandbox(). ion
Boolean Read only. strict
Boolean Strict mode is enabled. This reflects the value of the JavaScript environment's option by the same name. Read only. strict_mode
Boolean Read only. werror
Boolean Warnings should be treated as errors. This reflects the value of the JavaScript environment's option by the same name. Read only. ...
XPCshell Test Manifest Expressions
Operators In order of decreasing precedence: () == != && || Literal Values
Booleans: the literal strings true and false. Integers: A series of contiguous digits. Only decimal integers are supported. Strings: any series of characters enclosed in double quotes " or single quotes '. No escape sequences are supported. ...
nsresult
ompilers that do not support strongly-typed enums (that is, compilers that don't support this feature of C++11), it falls back to being an unsigned 32-bit integer, as in past versions of Gecko. Note: Prior to Gecko 19.0, nsresult was not strongly typed. As a result, it was possible for code to misuse it, such as returning an nsresult value from a function whose signature indicates it returns a
boolean. Because nsresult is strongly typed, code like the following will result in an error at compile time: bool foo() { ... if (something) { return NS_ERROR_FAILURE; } ... } See also Error codes returned by Mozilla APIs ...
NS_ConvertUTF16toUTF8
tells us how many chars to compare @return -1,0,1 Parameters char* aString PRBool aIgnoreCase PRInt32 aCount EqualsIgnoreCase PRBool EqualsIgnoreCase(const char*, PRInt32) const - source Equality check between given string and this string. @param aString is the string to check @param aIgnoreCase tells us how to treat case @param aCount tells us how many chars to compare @return
boolean Parameters char* aString PRInt32 aCount ToFloat float ToFloat(PRInt32*) const - source Perform string to float conversion. @param aErrorCode will contain error if one occurs @return float rep of string value Parameters PRInt32* aErrorCode ToInteger PRInt32 ToInteger(PRInt32*, PRUint32) const - source Parameters PRInt32* aErrorCode PRUint32 aRadix Mid PRUint32 Mid(n...
NS_LossyConvertUTF16toASCII
tells us how many chars to compare @return -1,0,1 Parameters char* aString PRBool aIgnoreCase PRInt32 aCount EqualsIgnoreCase PRBool EqualsIgnoreCase(const char*, PRInt32) const - source Equality check between given string and this string. @param aString is the string to check @param aIgnoreCase tells us how to treat case @param aCount tells us how many chars to compare @return
boolean Parameters char* aString PRInt32 aCount ToFloat float ToFloat(PRInt32*) const - source Perform string to float conversion. @param aErrorCode will contain error if one occurs @return float rep of string value Parameters PRInt32* aErrorCode ToInteger PRInt32 ToInteger(PRInt32*, PRUint32) const - source Parameters PRInt32* aErrorCode PRUint32 aRadix Mid PRUint32 Mid(n...
nsAdoptingCString
tells us how many chars to compare @return -1,0,1 Parameters char* aString PRBool aIgnoreCase PRInt32 aCount EqualsIgnoreCase PRBool EqualsIgnoreCase(const char*, PRInt32) const - source Equality check between given string and this string. @param aString is the string to check @param aIgnoreCase tells us how to treat case @param aCount tells us how many chars to compare @return
boolean Parameters char* aString PRInt32 aCount ToFloat float ToFloat(PRInt32*) const - source Perform string to float conversion. @param aErrorCode will contain error if one occurs @return float rep of string value Parameters PRInt32* aErrorCode ToInteger PRInt32 ToInteger(PRInt32*, PRUint32) const - source Parameters PRInt32* aErrorCode PRUint32 aRadix Mid PRUint32 Mid(n...
nsCAutoString
ny chars to compare @return -1,0,1 Parameters char* aString PRBool aIgnoreCase PRInt32 aCount EqualsIgnoreCase PRBool EqualsIgnoreCase(const char*, PRInt32) const - source Equality check between given string and this string. @param aString is the string to check @param aIgnoreCase tells us how to treat case @param aCount tells us how many chars to compare @return
boolean Parameters char* aString PRInt32 aCount ToFloat float ToFloat(PRInt32*) const - source Perform string to float conversion. @param aErrorCode will contain error if one occurs @return float rep of string value Parameters PRInt32* aErrorCode ToInteger PRInt32 ToInteger(PRInt32*, PRUint32) const - source Parameters PRInt32* aErrorCode PRUint32 aR...
nsCString
tells us how many chars to compare @return -1,0,1 Parameters char* aString PRBool aIgnoreCase PRInt32 aCount EqualsIgnoreCase PRBool EqualsIgnoreCase(const char*, PRInt32) const - source Equality check between given string and this string. @param aString is the string to check @param aIgnoreCase tells us how to treat case @param aCount tells us how many chars to compare @return
boolean Parameters char* aString PRInt32 aCount ToFloat float ToFloat(PRInt32*) const - source Perform string to float conversion. @param aErrorCode will contain error if one occurs @return float rep of string value Parameters PRInt32* aErrorCode ToInteger PRInt32 ToInteger(PRInt32*, PRUint32) const - source Parameters PRInt32* aErrorCode PRUint32 aRadix Mid PRUint32 Mid(n...
nsDependentCString
tells us how many chars to compare @return -1,0,1 Parameters char* aString PRBool aIgnoreCase PRInt32 aCount EqualsIgnoreCase PRBool EqualsIgnoreCase(const char*, PRInt32) const - source Equality check between given string and this string. @param aString is the string to check @param aIgnoreCase tells us how to treat case @param aCount tells us how many chars to compare @return
boolean Parameters char* aString PRInt32 aCount ToFloat float ToFloat(PRInt32*) const - source Perform string to float conversion. @param aErrorCode will contain error if one occurs @return float rep of string value Parameters PRInt32* aErrorCode ToInteger PRInt32 ToInteger(PRInt32*, PRUint32) const - source Parameters PRInt32* aErrorCode PRUint32 aRadix Mid PRUint32 Mid(n...
nsFixedCString
tells us how many chars to compare @return -1,0,1 Parameters char* aString PRBool aIgnoreCase PRInt32 aCount EqualsIgnoreCase PRBool EqualsIgnoreCase(const char*, PRInt32) const - source Equality check between given string and this string. @param aString is the string to check @param aIgnoreCase tells us how to treat case @param aCount tells us how many chars to compare @return
boolean Parameters char* aString PRInt32 aCount ToFloat float ToFloat(PRInt32*) const - source Perform string to float conversion. @param aErrorCode will contain error if one occurs @return float rep of string value Parameters PRInt32* aErrorCode ToInteger PRInt32 ToInteger(PRInt32*, PRUint32) const - source Parameters PRInt32* aErrorCode PRUint32 aRadix Mid PRUint32 Mid(n...
nsPromiseFlatCString
tells us how many chars to compare @return -1,0,1 Parameters char* aString PRBool aIgnoreCase PRInt32 aCount EqualsIgnoreCase PRBool EqualsIgnoreCase(const char*, PRInt32) const - source Equality check between given string and this string. @param aString is the string to check @param aIgnoreCase tells us how to treat case @param aCount tells us how many chars to compare @return
boolean Parameters char* aString PRInt32 aCount ToFloat float ToFloat(PRInt32*) const - source Perform string to float conversion. @param aErrorCode will contain error if one occurs @return float rep of string value Parameters PRInt32* aErrorCode ToInteger PRInt32 ToInteger(PRInt32*, PRUint32) const - source Parameters PRInt32* aErrorCode PRUint32 aRadix Mid PRUint32 Mid(n...
nsXPIDLCString
tells us how many chars to compare @return -1,0,1 Parameters char* aString PRBool aIgnoreCase PRInt32 aCount EqualsIgnoreCase PRBool EqualsIgnoreCase(const char*, PRInt32) const - source Equality check between given string and this string. @param aString is the string to check @param aIgnoreCase tells us how to treat case @param aCount tells us how many chars to compare @return
boolean Parameters char* aString PRInt32 aCount ToFloat float ToFloat(PRInt32*) const - source Perform string to float conversion. @param aErrorCode will contain error if one occurs @return float rep of string value Parameters PRInt32* aErrorCode ToInteger PRInt32 ToInteger(PRInt32*, PRUint32) const - source Parameters PRInt32* aErrorCode PRUint32 aRadix Mid PRUint32 Mid(n...
imgICache
ent); // alternatively, tools.getImgCacheForChannel(relevantChannel) If there is no relevant document or channel, null may be passed, but this will cause any image cache requests to use the permanent storage cache (ie. any images from windows in private browsing mode will not be present in the cache returned from a call with a null parameter). Method overview void clearCache(in
boolean chrome); nsIProperties findEntryProperties(in nsIURI uri); void removeEntry(in nsIURI uri); Methods clearCache() Evict images from the cache. void clearCache( in
boolean chrome ); Parameters chrome If true, evict only chrome images. If false, evict everything except chrome images. findEntryProperties() Find Properties Used to get proper...
mozIJSSubScriptLoader
ote: Undeclared variables in the loaded script will be created as global variables in the caller (ie.: in the caller's global object). This object will be searched for variables that cannot be resolved in the subscript scope. charset string An optional string to specify the character encoding of the file. If absent, the file is interpreted as ASCII. ignoreCache
boolean If present and set to true, the cache will be bypassed when reading the file. See also Appendix D: Loading Scripts ...
mozIRepresentativeColorCallback
toolkit/components/places/mozIColorAnalyzer.idlScriptable Provides callback methods for mozIColorAnalyzer 1.0 66 Introduced Gecko 17.0 Inherits from: nsISupports Last changed in Gecko 17.0 (Firefox 17.0 / Thunderbird 17.0 / SeaMonkey 2.14) Method overview void onComplete(in
boolean success, [optional] in unsigned long color); Methods onComplete() Will be called when color analysis finishes. void onComplete( in
boolean success, [optional] in unsigned long color ); Parameters success True if analysis was successful, false otherwise. Analysis can fail if the image is transparent, imageURI doesn't resolve to a valid image, or the image is too big. color The representative color as an integer in RGB form. e.g. 0...
mozIStoragePendingStatement
nsISupports Method overview void cancel(); Methods cancel() Cancels the pending statement. Fails only if you attempt to cancel the operation more than once. Note: For read statements, such as SELECT, once you cancel the statement, you will receive no further notifications about results. void cancel(); Parameters None. Return value In versions of Gecko prior to Gecko 1.9.2, this returned a
boolean value that was true if the query was canceled successfully or false if not. Starting with Gecko 1.9.2, this information is no longer provided and the method doesn't return a value. See also Storage mozIStorageConnection mozIStorageStatement ...
nsIAccessibilityService
ateHTMLTableHeadAccessible(in nsIDOMNode aDOMNode); nsIAccessible createHTMLTextAccessible(in nsISupports aFrame); nsIAccessible createHTMLTextFieldAccessible(in nsISupports aFrame); nsIAccessible createHTMLCaptionAccessible(in nsISupports aFrame); nsIAccessible getAccessible(in nsIDOMNode aNode, in nsIPresShell aPresShell, in nsIWeakReference aWeakShell, inout nsIFrame frameHint, out
boolean aIsHidden); nsIAccessible addNativeRootAccessible(in voidPtr aAtkAccessible); void removeNativeRootAccessible(in nsIAccessible aRootAccessible); void invalidateSubtreeFor(in nsIPresShell aPresShell, in nsIContent aChangedContent, in PRUint32 aEvent); Methods removeNativeRootAccessible() void removeNativeRootAccessible( in nsIAccessible aRootAccessible ); invalidateSubtreeF...
GetState
Many states are only valid given a certain role attribute that supports them. Refer to states documentation for more information. ...
SetSelected
<< nsIAccessible Page Summary This method adds or remove this accessible to the current selection. void setSelected( in
boolean aIsSelected ); Parameters aIsSelected[out] The current selection Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. See Also nsIAccessible.takeSelection() nsIAccessible.extendSelection() ...
nsIAccessible
IAccessible.getAccessibleToRight(), nsIAccessible.getAccessibleAbove() or nsIAccessible.getAccessibleBelow() to get left, right, top or below placed accessible Methods getKeyBindings Provides array of localized string of global keyboard accelerator for the given action index supported by accessible. getState Provides a bit fields of accessible states which describe
boolean properties of accessible. groupPosition This method returns grouping information. Used for tree items, list items, tab panel labels, radio buttons, etc. Also used for collectons of non-text objects. getChildAtPoint This method returns an accessible child which contains the coordinate at (x, y) in screen pixels. getChildAt This method returns Nth ac...
nsIAccessibleEvent
le resides in. This can be used to get the DOM window, the DOM document and the window handler, among other things. Read only. DOMNode nsIDOMNode The nsIDOMNode associated with the event. May return null if accessible for event has been shut down. Read only. eventType unsigned long The type of event, based on the enumerated event values defined in this interface. Read only. isFromUserInput
boolean Returns true if the event was caused by explicit user input, as opposed to purely originating from a timer or mouse movement. Constants Constant Gecko version Description 1.7 - 1.8.1 1.9 - 1.9.2 2.0 EVENT_SHOW 0x8002 0x0001 An object has been created. EVENT_HIDE 0x8003 0x0002 An object has been destroyed. EVENT_REORDER 0x8004 0x005C 0x0003 An object's children have changed. E...
nsIAccessibleProvider
that provide accessible object for itself as well for anonymous content. This property is used for upload, input[type="xsd:gDay"] and input[type="xsd:gMonth"] XFormsLabel 0x00002001 Used for label element. XFormsOuput 0x00002002 Used for output element. XFormsTrigger 0x00002003 Used for trigger and submit elements. XFormsInput 0x00002004 Used for input and textarea elements. XFormsInput
Boolean 0x00002005 Used for input[xsd:
boolean] element. XFormsInputDate 0x00002006 Used for input[xsd:date] element. XFormsSecret 0x00002007 Used for secret element. XFormsSliderRange 0x00002008 Used for range element represented by slider. XFormsSelect 0x00002009 Used for select and select1 that are implemented using host document's native widget. For example, a select1 in a xhtml document may b...
nsIAccessibleRole
abel, role="label", or xforms:output. ROLE_TEXT_LEAF 42 Represents selectable text that allows edits or is designated read-only. ROLE_PUSHBUTTON 43 Represents a push button control. It is used for xul:button, html:button, role="button", xforms:trigger, xforms:submit. ROLE_CHECKBUTTON 44 Represents a check box control. It is used for xul:checkbox, html:input@type="checkbox", role="checkbox",
boolean xforms:input. ROLE_RADIOBUTTON 45 Represents an option button, also called a radio button. It is one of a group of mutually exclusive options. All objects sharing a single parent that have this attribute are assumed to be part of single mutually exclusive group. It is used for xul:radio, html:input@type="radio", role="radio". ROLE_COMBOBOX 46 Represents a combo box; an edit control with an as...
nsIAccessibleStateChangeEvent
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 isEnabled();
boolean isExtraState(); Attributes Attribute Type Description state unsigned long Returns the state of accessible (see constants declared in nsIAccessibleStates). Read only. Methods isEnabled()
boolean isEnabled(); Parameters None. Return value Returns true if the state is turned on. isExtraState()
boolean isExtraState(); Parameters None. Return value Returns true if the state is extra state. ...
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. ...
nsIAccessibleValue
accessible/public/nsIAccessibleValue.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview
boolean setCurrentValue(in double value); Obsolete since Gecko 1.9 Attributes Attribute Type Description currentValue double maximumValue double Read only. minimumIncrement double Read only. minimumValue double Read only. Methods setCurrentValue() Obsolete since Gecko 1.9 (Firefox 3) Return a success condition of the value getting set. That is if the value is within the range of minimumValue - maximumValue.
boolean setCurrentValue( in double value ); Parameters value New value for current value. Return value true if the value is within the range of minimumValue ...
nsIApplicationCache
Read only. clientID ACString The client ID for this application cache. Clients can open a session with nsICacheService.createSession() using this client ID and a storage policy of STORE_OFFLINE to access this cache. Read only. groupID ACString The group ID for this cache group. This is the URI of the cache manifest file. R...
nsICacheMetaDataVisitor
netwerk/cache/nsICacheEntryDescriptor.idlScriptable This interface is used for visiting the meta data elements for a specified cache entry. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview
boolean visitMetaDataElement(in string key, in string value); Methods visitMetaDataElement() This method is called for each key/value pair in the meta data for a cache entry.
boolean visitMetaDataElement( in string key, in string value ); Parameters key The key for visiting the meta data for a cache entry. value The value for visiting the meta data for a cache entry. Return value Returns true if the provided key/value finds a cache entry, otherwise returns false. See also nsICache nsICacheEntryDescriptor ...
nsIChromeFrameMessageManager
content/base/public/nsIMessageManager.idlScriptable Handles loading of content in a remote chrome frame. 1.0 66 Introduced Gecko 2.0 Inherits from: nsIFrameMessageManager Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void loadFrameScript(in AString aURL, in
boolean aAllowDelayedLoad); void removeDelayedFrameScript(in AString aURL); Methods loadFrameScript() Loads a script into the remote frame. void loadFrameScript( in AString aURL, in
boolean aAllowDelayedLoad ); Parameters aURL The URL of the script to load into the frame; this must be an absolute URL, but data: URLs are supported. aAllowDelayedLoad If true, the script will be loaded when the rem...
nsICookie
st changed in Gecko 1.7 Inherits from: nsISupports Attributes Attribute Type Description expires PRUint64 Expiration time in seconds since midnight (00:00:00), January 1, 1970 UTC. expires = 0 represents a session cookie. expires = 1 represents an expiration time earlier than Jan 1, 1970. Read only. host AUTF8String The host (possibly fully qualified) of the cookie. Read only. isDomain
boolean true if the cookie is a domain cookie, false otherwise. Read only. isSecure
boolean true if the cookie was transmitted over ssl, false otherwise. Read only. name ACString The name of the cookie. Read only. path AUTF8String The path pertaining to the cookie. Read only. policy nsCookiePolicy Holds the sites compact policy value. Read only. status nsCookieStatus Holds the P3P status of coo...
nsICookie2
1 / Fennec 1.0) Inherits from: nsICookie Attributes Attribute Type Description creationTime PRInt64 The creation time of the cookie, in microseconds since midnight (00:00:00), January 1, 1970 UTC. Read only. expiry PRInt64 The actual expiry time of the cookie, in seconds since midnight (00:00:00), January 1, 1970 UTC. (where 0 does not represent a session cookie). Read only. isHttpOnly
boolean true if the cookie is an http only cookie. Read only. isSession
boolean true if the cookie is a session cookie. Note: That expiry time will also be honored for session cookies; thus, whichever is the more restrictive of the two will take effect. Read only. lastAccessed PRInt64 The last time the cookie was accessed, in microseconds since midnight (00:00:00) on January 1, 1970 UTC. "Accessed...
nsICookieConsent
changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports Method overview void getConsent(); Methods getConsent() Gives a decision on what should be done with a cookie, based on a site's p3p policy and the user's preferences. the policy for the given URI and channel is also returned. nsCookieStatus getConsent( in nsIURI uri, in nsIHttpChannel httpChannel, in
boolean isForeign, out nsCookiePolicy policy ); Parameters uri The URI to find the policy for. httpChannel The channel to extract the p3p headers from. isForeign True if the cookie originates from a third-party site. this is used to decide the cookie status based on user preferences. policy The policy for the given URI, or nsICookie::POLICY_UNKNOWN if one cannot be found. valid v...
nsICookieService
CVS blame will tell you why it is here. It remains until we can find a better home for it. Methods getCookieString() Get the complete cookie string associated with the URI. string getCookieString( in nsIURI aURI, in nsIChannel aChannel ); Parameters aURI The URI of the document for which cookies are being queried. ...
nsIDOMEventGroup
dom/interfaces/events/nsIDOMEventGroup.idlScriptable This interface is the interface implemented by all event targets in the Document Object Model. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview
boolean isSameEventGroup(in nsIDOMEventGroup other); Methods isSameEventGroup() Reports whether or not another event group is the same as this one.
boolean isSameEventGroup( in nsIDOMEventGroup other ); Parameters other Instance of nsIDOMEventGroup object to compare against. Return value Returns true if the two objects are the same, otherwise false. See also Document Object Model (DOM) Level 3 Events Specification ...
nsIDOMFontFace
fox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) This object describes a single font. It's returned in a list you can get using inIDOMUtils.getUsedFontFaces(). Attributes Font source attributes These attributes indicate how the font was found during the font matching process. Note: The same physical font may have been found in multiple ways within a range. Attribute Type Description fromFontGroup
boolean Indicates whether 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 ...
nsIDOMGeoPositionOptions
The nsIDOMGeoPositionOptions interface is used to specify options for geolocation operations. dom/interfaces/geolocation/nsIDOMGeoPositionOptions.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 Attributes Attribute Type Description enableHighAccuracy
boolean If true, high accuracy mode is used. timeout unsigned long Maximum time in milliseconds before giving up on an attempt to retrieve location information. ...
nsIDOMMozNetworkStatsManager
time. data A Date object representing the date of data. NetworkStatsGetOptions NetworkStatsGetOptions is a dictionary object used to filter a network statistics request made when calling getSamples(). It contains the following fields: appManifestURL A string used to filter network stats by app. serviceType A string used to filter network stats by system service. browsingTrafficOnly A
boolean set to filter network stats by browsing traffic. If true, return only browsing traffic, which is generated from the mozbrowser iframe element within an app. If false or not set, the total traffic, which is generated from both the mozapp and mozbrowser iframe elements, is returned. For example, this object might be { appManifestURL : manifestURL }. ...
nsIDOMStorageItem
ct in DOM storage. This is for session storage. 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) Gecko 1.9.1 note Starting in Gecko 1.9.1 (Firefox 3.5), this is only used for session storage; previously, it was also used for global storage. Attributes Attribute Type 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 w...
nsIDOMXULControlElement
dom/interfaces/xul/nsIDOMXULControlElement.idlScriptable Provides additional attributes specific to control elements. 66 Introduced Gecko 1.0 Inherits from: nsIDOMXULElement Last changed in Gecko 1.0 Attributes Attribute Type Description disabled
boolean Indicates whether the element is disabled or not. tabIndex long The tab order of the element. ...
nsIDOMXULSelectControlItemElement
dom/interfaces/xul/nsIDOMXULSelectCntrlItemEl.idlScriptable Please add a summary to this article. Inherits from: nsIDOMXULElement Last changed in Gecko 1.7 Attributes Attribute Type Description accessKey DOMString command DOMString control nsIDOMXULSelectControlElement Read only. crop DOMString disabled
boolean image DOMString label DOMString selected
boolean Read only. value DOMString ...
nsIDataSignatureVerifier
security/manager/ssl/public/nsIDataSignatureVerifier.idlScriptable An interface for verifying that a given string of data was signed by the private key matching the given public key. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview
boolean verifyData(in ACString aData, in ACString aSignature, in ACString aPublicKey); Methods verifyData() Verifies that the data matches the data that was used to generate the signature.
boolean verifyData( in ACString aData, in ACString aSignature, in ACString aPublicKey ); Parameters aData The data to be tested. aSignature The signature of the data, base64 encoded. aPublicKey The public part of the key used for signing, DER encoded then base64 encoded. Retur...
nsIDebug2
This often correlates to whether other code (for example, Firefox, XULRunner) was compiled with DEBUG defined. Read only. See also nsIDebug ...
getFile
<< XPCOM API Reference Called by the Directory Service to obtain an nsIFile object corresponding for a given standard path location. The individual platform implementation of nsIDirectoryServiceProvider maps the symbolic path location passed to this function and returns the appropriate nsIFile. nsIFile getFile( in string aName, out
boolean aPersistent ); Parameters aName [in] The symbolic name for a file or directory location. See Symbolic names below for a list of accepted values. XPCOM File System Aliases aPersistent [out] This output parameter indicates to the caller whether or not the returned location is persistent. If true, this lets the Directory Service cache results to improve the performance of directory lookups. If false, then the Directory Service will...
nsIDownload
ot the helper should be executed automatically once the download is complete. Read only. Optional percentComplete long The percentage of the file transfer that has been completed, or -1 if the file's size is unknown. Read only. referrer nsIURI The referrer URI of the download. This is only valid for HTTP downloads, and can be null. Read only. resumable
boolean Indicates if the download can be resumed after being paused or not. This is only the case if the download is over HTTP/1.1 or FTP and if the server supports it. Read only. size long long The total size of the file in bytes, or LL_MAXUINT if the file's size is unknown. Read only. source nsIURI The source URI of the download. Read only. speed double ...
nsIDownloadManagerUI
ment this interface. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void getAttention(); void show([optional] in nsIInterfaceRequestor aWindowContext, [optional] in unsigned long aID, [optional] in short aReason); Attributes Attribute Type Description visible
boolean true if the Download Manager UI is visible; otherwise false. Read only. Constants Constant Value Description REASON_USER_INTERACTED 0 When opening the Download Manager user interface, this value indicates that it's being done at the user's request. REASON_NEW_DOWNLOAD 1 When opening the Download Manager user interface, this value indicates t...
nsIEditorIMESupport
Read only. Methods Native code only!beginComposition Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Handles the start of inline input composition. void beginCompositi...
nsIEventListenerInfo
nfoFor, which provides a list of all the listeners to a given event target. 1.0 66 Introduced Gecko 1.9.2 Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Method overview nsISupports getDebugObject(); AString toSource(); Attributes Attribute Type Description allowsUntrusted
boolean Indicates whether or not the event listener allows untrusted events. Read only. capturing
boolean Indicates whether or not the event listener is in capture mode. Read only. inSystemEventGroup
boolean Indicates whether or not the event listener is in the system event group. Read only. type AString The type of the event for which the listener was adde...
nsIExternalURLHandlerService
r/exthandler/nsIExternalURLHandlerService.idlScriptable The external URL handler service is used for finding platform-specific applications for handling particular URLs. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview nsIHandlerInfo getURLHandlerInfoFromOS(in nsIURI aURL, out
boolean aFound); Methods getURLHandlerInfoFromOS() Given a URL, looks up the handler info from the operating system. This should be overridden by each operating systems implementation. nsIHandlerInfo getURLHandlerInfoFromOS( in nsIURI aURL, out
boolean aFound ); Parameters aURL The URL we are looking for. aFound Was an operating system default handler for this URL found? Return value An nsIHand...
nsIFTPEventSink
The nsIFTPEventSink is an extension of nsISupports. It can be used as a notification callback on an FTP channel. netwerk/protocol/ftp/nsIFTPChannel.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports Method Overview void OnFTPControlLog(in
boolean server, in string msg) Methods OnFTPControlLog Allows a consumer to receive a log of the FTP control connection conversation. void OnFTPControlLog ( in
boolean server, in string msg); Parameters server A
boolean value specifying whether you are a server or a client. msg A string holding response of the last command which had been sent. ...
nsIFeedResult
ace provides access to HTTP and parsing metadata for a feed or entry. 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 void registerExtensionPrefix(in AString aNamespace, in AString aPrefix); Attributes Attribute Type Description bozo
boolean The feed processor sets the bozo bit when a feed triggers a fatal error during XML parsing. There may still be feed metadata and entries that were parsed before the error occurred. doc nsIFeedContainer The parsed feed or entry. null if a non-feed was processed. headers nsIProperties The HTTP response headers that accompanied the feed. stylesheet nsIURI...
nsIFilePicker
This attribute has no effect if private browsing mode is in effect. defaultExtension AString The extension for the type of files you want to work with. On some platforms, this is automatically appended...
nsIFocusManager
that was used to focus the currently focused element. Return value The method that was used to focus the element in window. This will either be 0, FLAG_BYMOUSE or FLAG_BYKEY. moveCaretToFocus() Moves the selection caret within aWindow to the current focus. void moveCaretToFocus( in nsIDOMWindow aWindow ); Parameters aWindow elementIsFocusable() Check if given element is focusable.
boolean elementIsFocusable(in nsIDOMElement aElement, in unsigned long aFlags); Parameters aElement aFlags Return value True if aElement is focusable. moveFocus() Move the focus to another element. If aStartElement is specified, then movement is done relative to aStartElement. If aStartElement is null, then movement is done relative to the currently focused element. If no el...
nsIFrameMessageListener
handling a frame should implement this interface in order to receive messages. Method overview void receiveMessage(); Methods receiveMessage() Note: This method is for JavaScript only. Called to deliver a message to the frame handling process; called with one parameter, which has the following properties: name The name of the message. sync A
boolean value indicating whether or not the message should be handled synchronously. If true, the response should be returned in the specified JSON object. json The JSON object in which to return the response if the message is being handled synchronously. objects Unimplemented An array of cpow, or null if sync is false. When the listener is called, the this value is the targe...
nsIGeolocationProvider
interested parties via nsIGeolocationUpdate. After the provider has been initialized, any changes to location should call callback.onRequest(). You may find the WiFi access point monitoring service useful if you wish to implement support for WiFi-based location services. See dom/src/geolocation/NetworkGeolocationProvider.js for an example of how to write a geolocation provider. Method overview
boolean isReady(); Obsolete since Gecko 1.9.2 void shutdown(); void startup(); void watch(in nsIGeolocationUpdate callback); Methods isReady() Obsolete since Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Reports whether or not the device is ready and has a position.
boolean isReady(); Parameters None. Return value true if the device is ready and has a positi...
nsIGlobalHistory
docshell/base/nsIGlobalHistory.idlScriptable The interface to global history. 66 Introduced Gecko 1.0 Deprecated Gecko 2.0 Obsolete Gecko 15.0 Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void addPage(in string aURL);
boolean isVisited(in string aURL); Methods addPage() Add a page to the history. void addPage( in string aURL ); Parameters aURL The url to the page. isVisited() Checks to see if the given page is in history.
boolean isVisited( in string aURL ); Parameters aURL The url to the page. Return value true if a page has been passed into addPage(). ...
nsIHttpActivityObserver
If this is false, the observeActivity() method should not be called. Read only. Note: This attribute is present only for compatibility and should not be used. Constants Activity type constants Constant Value Description ACTIVITY_TYPE_SOCKET_TRANSPORT 0x0001 Socket transport activity has occurred. ACTI...
nsIHttpChannelInternal
overview void getRequestVersion(out unsigned long major, out unsigned long minor); void getResponseVersion(out unsigned long major, out unsigned long minor); void HTTPUpgrade(in ACString aProtocolName, in nsIHttpUpgradeListener aListener); void setCookie(in string aCookieHeader); void setupFallbackChannel(in string aFallbackKey); Attributes Attribute Type Description canceled
boolean Returns true if and only if the channel has been canceled. Read only. channelIsForDownload
boolean External handlers may set this to true to notify the channel that it is open on behalf of a download. documentURI nsIURI An HTTP channel can own a reference to the document URI. forceAllowThirdPartyCookie
boolean Force relevant cookies to be sent with this load even if normally they would no...
nsILoginManagerCrypto
sswordmgr/public/nsILoginManagerCrypto.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) Method overview AString decrypt(in AString cipherText); AString encrypt(in AString plainText); Attributes Attribute Type Description isLoggedIn
boolean Current login state of the token used for encryption. If the user is not logged in, performing a crypto operation will result in a master password prompt. Read only. uiBusy
boolean true when a master password prompt is being displayed. Read only. Methods decrypt() Decrypts the specified string, returning the plain text value. Can throw if the user cancels entry of their master password, or i...
nsIMIMEInputStream
The value of the content-length is automatically calculated using the available() method on the data stream. The value is recalculated every time the stream is rewound to the start. Not allowed to be changed once the stream has been started to be read. Methods addHeader() Adds an additional header to the stream on ...
nsIMarkupDocumentViewer
rkupDocumentViewer.idlScriptable Describes the properties of a content viewer for an HTML or XML markup document. Inherits from: nsISupports Last changed in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4) Method overview void scrollToNode(in nsIDOMNode node); void sizeToContent(); Attributes Attribute Type Description allowPlugins
boolean If true, plugins are allowed within the doc shell. default = true. Obsolete since Gecko 1.8 authorStyleDisabled
boolean Disable entire author style level (including HTML presentation hints) bidiCharacterSet octet Whether to force the user's character set 1 - use the document character set 2 - use the character set chosen by the user. Obsolete since Gecko 6.0 ...
nsINavHistoryResultTreeViewer
wn reference to it, then reinitialize it when the tree changes. If you use this object and attach it to a result without attaching it to a tree, then forget about it, it will leak. Method overview nsINavHistoryResultNode nodeForTreeIndex(in unsigned long aIndex); unsigned long treeIndexForNode(in nsINavHistoryResultNode aNode); Attributes Attribute Type Description collapseDuplicates
boolean Controls whether duplicate adjacent elements are collapsed into a single item in the tree. This prevents you from seeing multiple entries for things when you have selected to get visits. When you sort by date, the multiple entries will then appear because they will be separated (unless you clicked reload a bunch of times in a row). If you know you'll only ever want one entry per site, you should...
nsIPlacesView
Read only. insertionPoint InsertionPoint The InsertionPoint at which new items will be inserted upon drop, paste, or creation. Read only. place string TheURI (as a string) of the root Place that the view displays. This may be modified dynamically to update the view. See Displaying Places information using views for examples...
nsISSLErrorListener
security/manager/ssl/public/nsISSLErrorListener.idlScriptable A mechanism to report a broken SSL connection. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Note: The recipient of this SSL status notification should not block. Method overview
boolean notifySSLError(in nsIInterfaceRequestor socketInfo, in PRInt32 error, in AUTF8String targetSite); Methods notifySSLError() Called in case of an SSL error.
boolean notifySSLError( in nsIInterfaceRequestor socketInfo, in PRInt32 error, in AUTF8String targetSite ); Parameters socketInfo A network communication context that can be used to obtain more information about the active connection. error The code associated with the error. The SSL status object that desc...
nsISSLSocketControl
netwerk/socket/nsISSLSocketControl.idlScriptable This interface establishes TLS and SSL connections. Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void proxyStartSSL(); void StartTLS(); Attributes Attribute Type Description forceHandshake
boolean Obsolete since Gecko 1.9 notificationCallbacks nsIInterfaceRequestor Methods proxyStartSSL() Starts an SSL proxy connection. void proxyStartSSL(); Parameters None. StartTLS() Establishes a STARTTLS connection. This is used to encrypt plain-text data communication. void StartTLS(); Parameters None. ...
nsISocketTransportService
Obsolete since Gecko 1.8 Methods Native code only! attachSocket Adds a new socket to the list of controlled sockets. This will fail with the error code NS_ERROR_NOT_AVAILABLE if the maximum number of sockets is already reached. In this case, the notifyWhenCanAttachSocket() method ...
nsIStandardURL
work/standard-url;1. To create an instance, use: var standardURL = Components.classes["@mozilla.org/network/standard-url;1"] .createInstance(Components.interfaces.nsIStandardURL); Method overview void init(in unsigned long aUrlType, in long aDefaultPort, in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); Attributes Attribute Type Description mutable
boolean Control whether or not this URL can be modified. Protocol handlers can set this flag before handing out an URL to ensure that it is not inadvertently modified. Obsolete since Gecko 1.9 Constants These constants describe how to normalize an URL. Constant Value Description URLTYPE_STANDARD 1 blah:foo/bar => blah://foo/bar blah:/foo/bar => blah:///foo/bar blah://foo/bar => blah://foo...
nsISupportsID
Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data nsIDPtr Provides access to the native type represented by the object. Methods toString() This method returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. ...
nsISupportsPRBool
Inherits from: nsISupportsPrimitive Last changed in Gecko 1.2 Method overview string toString(); Attributes Attribute Type Description data PRBool Provides access to the native type represented by the object. Methods toString() This methods returns a string valued representation of the object. string toString(); Parameters None. Return value A string valued representation of the object. Remarks This interface was frozen for Gecko 1.2. ...
nsITXTToHTMLConv
lScriptable This interface allows you to modify the conversion from plain text to HTML. Inherits from: nsIStreamConverter Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Implemented by "@mozilla.org/streamconv;1?from=text/plain&to=text/html". You should normally obtain an instance via the nsIStreamConverterService interface. Method overview void preFormatHTML(in
boolean value); void setTitle(in wstring text); Prior versions of the interface named the methods using the InitialCaps style instead of the interCaps style. Methods preFormatHTML() Specifies whether or not to wrap the resulting HTML in an <pre> block. void preFormatHTML( in
boolean value ); Parameters value true to wrap the resulting HTML in a <pre> block. setTitle() Sets the title to use on...
nsITaskbarWindowPreview
uttons using the attributes on that interface. User clicks on the toolbar buttons are reported to your nsITaskbarPreviewController implementation's nsITaskbarPreviewController.onClick() method. Method overview nsITaskbarPreviewButton getButton(in unsigned long index); Attributes Attribute Type Description enableCustomDrawing
boolean If true, the nsITaskbarPreviewController object's nsITaskbarPreviewController.drawPreview() and nsITaskbarPreviewController.drawThumbnail() methods will be called to draw the preview. If false, the operating system draws these for you. Constants Constant Value Description NUM_TOOLBAR_BUTTONS 7 The maximum number of toolbar butt...
nsIThreadManager
PRThread prthread); Native code only! nsIThread newThread(in unsigned long creationFlags); Attributes Attribute Type Description currentThread nsIThread The currently executing thread. If the calling thread does not already have a nsIThread associated with it, one is created and associate with the current PRThread. Read only. isMainThread
boolean This attribute is true if the calling thread is the main thread of the application process. Read only. mainThread nsIThread The main thread. Read only. Methods Native code only!getThreadFromPRThread Given a PRThread, this method returns the corresponding nsIThread. Returns null if there isn't a corresponding nsIThread. nsIThread getThreadFromPRThread( in PRThread prt...
nsIToolkitProfileService
The profile that is marked as "Default=1" in the Profiles.ini file. (NOT the profile currently in use.) Not sure what happens if you change this setting but someone said: You can change profiles by setting this attribute's value. This may throw an NS_ERROR_FAILURE (0x80004005) when trying to get the current profile if it's unavailable or if permissions restrict access. startOffline
boolean startWithLastProfile
boolean Methods createProfile() Creates a new profile. The profile temporary directory will be chosen based on where the profile directory is located. nsIToolkitProfile createProfile( in nsILocalFile aRootDir, in AUTF8String aName ); Parameters aRootDir The profile directory. May be null, in which case a suitable default will be chosen...
nsIURIFixupInfo
oken as a URL, e.g. "foo bar"!). Read only. keywordProviderName AString The keyword search provider name expected to provide a keyword search; empty string if no keyword search is performed. Read only. keywordAsSent AString The keyword used for the search (post trimming etc.); empty string if no keyword search is performed. Read only. fixupChangedProtocol
boolean If we changed the protocol; instead of using one raw from the input. Read only. fixupCreatedAlternateURI
boolean If we created an alternative URI. Potentially adding a prefix and/or suffix; set by the browser.fixup.alternate.prefix and .suffix prefs, their defaults "www." and ".com", respectively. Read only. originalInput AUTF8String The original input. Read only.
nsIUTF8ConverterService
intl/uconv/idl/nsIUTF8ConverterService.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview AUTF8String convertStringToUTF8(in ACString aString, in string aCharset, in
boolean aSkipCheck); AUTF8String convertURISpecToUTF8(in ACString aSpec, in string aCharset); Methods convertStringToUTF8() Ensure that aString is encoded in UTF-8. If not, convert to UTF-8 assuming it's encoded in aCharset and return the converted string in UTF-8. AUTF8String convertStringToUTF8( in ACString aString, in string aCharset, in
boolean aSkipCheck, in
boolean aAllowSubstitution ); Parameters aString A string to ensure its UTF8ness. aCharset The charset to convert from if aString is not in UTF...
nsIUpdatePatch
IDOMElement serialize(in nsIDOMDocument updates); Attributes Attribute Type Description finalURL AString The final URL this patch was being downloaded from. hashFunction AString The hash function to use when determining the integrity of the patch file. hashValue AString The value of the hash function named in hashFunction that should be computed if the file is not corrupt. selected
boolean true if this patch is currently selected as the patch to be downloaded and installed for this update transaction. false if another update is selected. size unsigned long The size of the patch file in bytes. state AString The state of this patch. type AString The type of patch represented by the object: "partial" A binary difference between two application versions. "complete" A complete pa...
nsIWebBrowser
s valid. The embedder must explicitly set this value back to nsnull if the chrome object is destroyed before the browser object. Note: nsIInterfaceRequestor and nsIWeakReference might also need to be implemented by the chrome object. contentDOMWindow nsIDOMWindow The top-level DOM window. The embedder may walk the entire DOM starting from this value. Read only. isActive
boolean Indicates whether this web browser is active. Active means that it's visible enough that we want to avoid certain optimizations like discarding decoded image data and throttling the refresh driver. In Firefox, this corresponds to the visible tab. Defaults to true. For optimal performance, set it to false when appropriate. parentURIContentListener nsIURIContentListener ...
nsIWebBrowserFindInFrames
DOMWindow Frame at which to start the search. Once the search is done, this will be set to be the last frame searched, whether or not a result was found. Has to be equal to or contained within the rootSearchFrame. rootSearchFrame nsIDOMWindow Frame within which to confine the search (normally the content area frame). Set this to only search a subtree of the frame hierarchy. searchParentFrames
boolean Whether to allow the search to propagate out of the currentSearchFrame into its parent frame(s). Search is always confined within the rootSearchFrame. Default is true. Setting nsIWebBrowserfind.searchFrames to true sets this to true. searchSubframes
boolean Whether to recurse down into subframes while searching. Default is true. Setting nsIWebBrowserfind.searchFrames to true sets this to true...
nsIWebBrowserPersist
Read only. persistFlags unsigned long Flags governing how data is fetched and saved from the network. It is best to set this value explicitly unless you are prepared to accept the default values. progressListener nsIW...
nsIWebNavigationInfo
.getService(Components.interfaces.nsIWebNavigationInfo); Method overview unsigned long isTypeSupported(in ACString aType, in nsIWebNavigation aWebNav); Constants Support type constants Constant Value Description UNSUPPORTED 0 Returned by isTypeSupported() to indicate lack of support for a type. Note: This is guaranteed not to change, so that
boolean tests can be done on the return value if isTypeSupported to detect whether a type is supported at all. IMAGE 1 Returned by isTypeSupported() to indicate that a type is supported as an image. PLUGIN 2 Returned by isTypeSupported() to indicate that a type is supported via an NPAPI ("Netscape 4 API") plug-in. This is not the value returned for "XPCOM plug-ins". ...
nsIWinAppHelper
= Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIWinAppHelper); The nsIXULAppInfo and nsIXULRuntime interfaces are also implemented by "xre/app-info". Method overview void fixReg(); Obsolete since Gecko 1.9 void postUpdate(in nsILocalFile logFile); Obsolete since Gecko 1.9.2 Attributes Attribute Type Description userCanElevate
boolean Read only. Returns true only if all the following conditions are all true at once: The operating system is at least Windows Vista User Account Control is enabled The user is an Administrator The application is not already running with elevated permissions Otherwise it returns false. Methods fixReg() Obsolete since Gecko 1.9 (Firefox 3) Invokes helper.exe with the...
nsIWinTaskbar
Read only. defaultGroupId AString The default application user model ID the application registers with the system. This ID is used by the taskbar for grouping windows and when associating pinned shortcuts with running instances and jump lists...
nsIXPCScriptable
Implementations may skip writing to *_retval unless they want to return PR_FALSE. js/src/xpconnect/idl/nsIXPCScriptable.idlNot scriptable Please add a summary to this article. ...
nsIXULTemplateResult
void hasBeenRemoved(); void ruleMatched(in nsISupports aQuery, in nsIDOMNode aRuleNode); Attributes Attribute Type Description id AString ID of the result. The DOM element created for this result, if any, will have its id attribute set to this value. The id must be unique for a query. isContainer
boolean true if the result represents a container. Read only. isEmpty
boolean true if the result represents an empty container. Read only. mayProcessChildren
boolean true if the template builder may use this result as the reference point for additional recursive processing of the template. The template builder will reprocess the template using...
nsIZipEntry
Gecko 1.9 (Firefox 3) Attributes Attribute Type Description compression unsigned short The type of compression used for the item. The possible values and their meanings are defined in the zip file specification at ZIP Application Note Support. Read only. CRC32 unsigned long The CRC-32 hash of the file in the entry. Read only. isDirectory
boolean True if the name of the entry ends with '/' and false otherwise. Read only. isSynthetic
boolean Use this attribute to determine whether this item is an actual zip entry or is one synthesized for part of a real entry's path. A synthesized entry represents a directory within the zip file which has no corresponding entry within the zip file. For example, the entry for the director...
nsICookie2 MOZILLA 1 8 BRANCH
netwerk/cookie/public/nsICookie2.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsICookie2 Attributes Attribute Type Description isHttpOnly
boolean Holds true if the cookie is an http only cookie. Read only. See also nsICookie2 ...
XPIDL Syntax
TRUE" / "FALSE" ; In regex: /"[^"\n]*["\n]/. Yes, newline terminates. ...
Xray vision
lleable language. Scripts running in web pages can add extra properties to DOM objects (also known as expando properties) and even redefine standard DOM objects to do something unexpected. If chrome code relies on such modified objects, it can be tricked into doing things it shouldn't. For example: window.confirm() is a DOM API that's supposed to ask the user to confirm an action, and return a
boolean depending on whether they clicked "OK" or "Cancel". A web page could redefine it to return true: window.confirm = function() { return true; } Any privileged code calling this function and expecting its result to represent user confirmation would be deceived. This would be very naive, of course, but there are more subtle ways in which accessing content objects from chrome can cause security pr...
Address Book examples
that it finds in the collection, or null. let collection = ... let card = collection.cardForEmailAddress("foo@bar.invalid.com"); Note: Both of these functions may raise an NS_ERROR_NOT_IMPLEMENTED exception if the collection has not implemented that function. This is currently true in the case of LDAP, but may be true in other cases as well. How do I search for multiple contacts? Formulate a
boolean search string (see nsIAbCard for built-in property names): var searchQuery = "(or(PrimaryEmail,bw,@V)(NickName,bw,@V)(and(IsMailList,=,TRUE)(Notes,bw,@V)))"; searchQuery = searchQuery.replace(/@V/g, encodeURIComponent("mystr") The search queries use Lisp syntax with operators enumerated in nsAbQueryStringToExpression.cpp. Assuming you wish to search across multiple directories: let abManager...
Creating a gloda message query
line of the message. cc: ditto, but cc. involves: A list of all GlodaIdentity instances associated with this message. Effectively, this is the contents of from/to/cc in a single list and with duplicates removed. attachmentTypes: A list of the attachment mime types found on this message. Attributes provided by explattr.js: tags: A list of the nsIMsgTags applied to this message. starred: A
boolean indicating whether this message is starred/flagged or not. read: A
boolean indicating whether this message is read or not. Want a GlodaMessage when you already have an nsIMsgDBHdr? Gloda.getMessageCollectionForHeader(aMsrHdr, aListener, aData) returns a collection (with your provided listener and data). Keep in mind that gloda is not infallible and it's conceivable that your collection may en...
MailNews fakeserver
ue all messages sent in pipelining mode and will present lines without any EOL characters. In addition, it uses UTF-8 as the transmission medium. The server presents the following API to the handler: <caption> Server API </caption> Name Arguments Returns Description closeSocket none nothing Closes the socket and stops the test. setMultiline the new value of multiline nothing The value is a
boolean, with true invoking multiline mode. It is off by default. Extending a handler to provide different mechanisms is a process not defined here; please check the documentation of the corresponding handler for instructions. Using fakeserver in xpcshell tests Since there are three different components of fakeserver, a total of four objects need to be set up in a fakeserver test on top of other test...
Mail composition back end
older Copying to the "Sent" folder is controlled by a setting in the nsIMsgCompFields interface. The SetFcc() and GetFcc() methods are used by the caller to control if a message should be copied to the defined "Sent" folder if the sending operation was successful. Currently, this pref is a "char *" which is the specific name of the folder, but this will more than likely change to a PRBool (
boolean) preference. The determiniation of which folder is the "Sent" folder for the user is done by a call to GetFoldersWithFlag() and the message store will control this user defined preference. If the setting for GetFcc() is set to true, the copy operation is automatically performed after a successful send operation. Drafts Saving a message as a draft is controlled by the "nsMsgDel...
Add to iPhoto
y Core Foundation under the name kCFTypeArrayCallBacks. ...
ctypes
utomatically convert to JavaScript numbers. Instead, they convert to objects of the wrapper types ctypes.Int64 and ctypes.UInt64, which are JavaScript objects rather than CData objects. See 64-bit integers for details. Types that act like specific C types These types are designed to work exactly like the corresponding type on the native platform. Type Description bool A
Boolean type that behaves like the corresponding C type on the platform. short A short integer type that behaves like the corresponding C type on the platform. unsigned_short An unsigned short integer type that behaves like the corresponding C type on the platform. int An integer type that behaves like the int C type on the platform. unsigned_int An unsigne...
Version, UI, and Status Information - Plugins
directory for the platform. If you call NPN_ReloadPlugins, the browser reloads all plug-ins in the Plugins directory without restarting. This causes the browser to install a new plug-in and load it, or remove a plug-in, without having to restart. Consider using this function as part of the plug-in's SmartUpdate process. void NPN_ReloadPlugins(NPBool reloadPages); The reloadPages parameter is a
boolean that indicates whether to reload the page (true) or not (false). << PreviousNext >> ...
Debugger.Memory - Firefox Developer Tools
ms, broken down by various criteria. Ifdbg is a Debugger instance, you can call dbg.memory.takeCensus to conduct a census of its debuggees' possessions. Accessor Properties of the Debugger.Memory.prototype Object Ifdbg is a Debugger instance, then <i>dbg</i>.memory is a Debugger.Memory instance, which inherits the following accessor properties from its prototype: trackingAllocationSites A
boolean value indicating whether this Debugger.Memory instance is capturing the JavaScript execution stack when each Object is allocated. This accessor property has both a getter and setter: assigning to it enables or disables the allocation site tracking. Reading the accessor produces true if the Debugger is capturing stacks for Object allocations, and false otherwise. Allocation site tracking is initia...
AbortSignal - Web APIs
The AbortSignal interface represents a signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. Properties The AbortSignal interface also inherits properties from its parent interface, EventTarget. AbortSignal.aborted Read only A
Boolean that indicates whether the request(s) the signal is communicating with is/are aborted (true) or not (false). Events Listen to this event using addEventListener() or by assigning an event listener to the oneventname property of this interface. abort Invoked when the DOM request(s) the signal is communicating with is/are aborted. Also available via the onabort property. Methods The AbortSignal interface inherits methods from its parent interface, EventTarge...
AbstractRange - Web APIs
A collapsed range is one whose start position and end position are the same, resulting in a zero-character-long range. endContainer Read only The DOM Node in which the end of the range, as specified by the endOffset property, is located. endOffset Read only An integer value indicating the offset, in characters, from the beginning of the node's ...
AnimationEvent.initAnimationEvent() - Web APIs
lapsedTimeArg); 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 (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 t...
AnimationPlaybackEvent.AnimationPlaybackEvent() - Web APIs
) constructor of the Web Animations API returns a new AnimationPlaybackEvent object instance. Syntax var animationPlaybackEvent = new AnimationPlaybackEvent(type, eventInitDict); Parameters type A DOMString representing the name of the event. 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. cancelable Optional Defaults to false, of type
Boolean, indicating if the event can be canceled or not. detail Optional Defaults to null, of type any -- an event-dependent value associated with the event. Specifications Specification Status Comment Web AnimationsThe definition of 'AnimationPlaybackEvent()' in that spe...
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
eNode = new AudioBufferSourceNode(context, options) Parameters Inherits parameters from the AudioNodeOptions dictionary. context A reference to an AudioContext. options Optional Options are as follows: buffer: An instance of AudioBuffer to be played. detune: A value in cents to modulate the speed of audio stream rendering. Its nominal range is (-? to +?). The default is 0. loop: A
boolean indicating whether the audio should play in a loop. The default is false. If the loop is dynamically modified during playback, the new value will take effect on the next processing block of audio. loopEnd: An optional value, in seconds, where looping should end if the loop attribute is true. The default is 0. Its value is exclusive to the content of the loop. The sample frames, comprising the l...
AudioBufferSourceNode - Web APIs
hen set to the value null, defines a single channel of silence (in which every sample is 0.0). AudioBufferSourceNode.detune Is a k-rate AudioParam representing detuning of playback in cents. This value is compounded with playbackRate to determine the speed at which the sound is played. Its default value is 0 (meaning no detuning), and its nominal range is -? to ?. AudioBufferSourceNode.loop A
Boolean attribute indicating if the audio asset must be replayed when the end of the AudioBuffer is reached. Its default value is false. AudioBufferSourceNode.loopStart Optional A floating-point value indicating the time, in seconds, at which playback of the AudioBuffer must begin when loop is true. Its default value is 0 (meaning that at the beginning of each loop, playback begins at the start of the ...
AudioProcessingEvent - Web APIs
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 audio data to be processed. The number of channels is defined as...
AudioTrack.enabled - Web APIs
The AudioTrack property enabled specifies whether or not the described audio track is currently enabled for use. If the track is disabled by setting enabled to false, the track is muted and does not produce audio. Syntax isAudioEnabled = AudioTrack.enabled; AudioTrack.enabled = true | false; Value The enabled property is a
Boolean whose value is true if the track is enabled; enabled tracks produce audio while the media is playing. Setting enabled to false effectively mutes the audio track, preventing it from contributing to the media's audio performance. Example This example switches between the main and commentary audio tracks of a media element. function swapCommentaryMain() { var videoElem = document.getElementById("main-video"); var audioTrackMain; var audioTrackCommentary; ...
AudioTrack - Web APIs
Setting this value to false mutes the track's audio. id Read only A DOMString which uniquely identifies the track within the media. ...
AudioWorkletProcessor.process - Web APIs
ain 128 values -- one for each frame in the current audio block. If there's no automation happening during the time represented by the current block, the array may contain a single value that is constant for the entire block, instead of 128 identical values. If the automation rate is "k-rate", the array will contain a single value, which is to be used for each of 128 frames. Return value A
Boolean value indicating whether or not to force the AudioWorkletNode to remain active even if the user agent's internal logic would otherwise decide that it's safe to shut down the node. The returned value lets your processor have influence over the lifetime policy of the AudioWorkletProcessor and the node that owns it. If the combination of the return value and the state of the node causes the browser...
BatteryManager.charging - Web APIs
Syntax var charging = battery.charging On return, charging indicates whether or not the battery, which is a BatteryManager object, is currently being charged; if the battery is charging, this value is true. Otherwise, the value is false. ...
BatteryManager - Web APIs
The BatteryManager interface provides ways to get information about the system's battery charge level. The navigator.getBattery() method returns a battery promise that is resolved in a BatteryManager interface which you can use to interact with the Battery Status API. Properties BatteryManager.charging Read only A
Boolean value indicating whether or not the battery is currently being charged. BatteryManager.chargingTime Read only A number representing the remaining time in seconds until the battery is fully charged, or 0 if the battery is already fully charged. BatteryManager.dischargingTime Read only A number representing the remaining time in seconds until the battery is completely discharged and the system will suspend. BatteryManager.level Read only A number representing th...
Bluetooth.getAvailability() - Web APIs
The getAvailability() method of Bluetooth interface of Web Bluetooth API interface exposes the Bluetooth capabilities of the current device. For a returns a
Boolean which is true if the deveice has a Bluetooth adapter and false otherwise (unless user configured User Agent not to expose a real value). Note: User might not allow use of Web Bluetooth API, even if getAvailability() returned true (navigator.bluetooth.requestDevice() might not resolve with a BluetoothDevice). Also, user can configure User Agent to return a fixed value instead of a real one. Syntax var readerPromise = Bluetooth.getAvailability(); Parameters None. Return value A Promise that resolves with
Boolean. Exceptions This method doesn't throw any exceptions. Examples The following snippet prints out a message in...
Bluetooth.requestDevice() - Web APIs
. }) Returns A Promise to a BluetoothDevice object. Parameters options Optional An object that sets options for the device request. The available options are: filters[]: An array of BluetoothScanFilters. This filter consists of an array of BluetoothServiceUUIDs, a name parameter, and a namePrefix parameter. optionalServices[]: An array of BluetoothServiceUUIDs. acceptAllDevices: A
Boolean indicating that the requesting script can accept all Bluetooth devices. The default is false. Exceptions TypeError The provided options do not makes sense. For example, options.filters is present and options.acceptAllDevices is true, or if options.filters is not present and options.acceptAllDevices is false. Or options.filters is []. NotFoundError There is no Bluetooth device that mat...
BluetoothCharacteristicProperties.reliableWrite - Web APIs
The reliableWrite read-only property of the BluetoothCharacteristicProperties interface returns a
boolean that is true if reliable writes to the characteristic is permitted. Syntax var a
Boolean = BluetoothCharacteristicProperties.reliableWrite; Value A
Boolean Specifications Specification Status Comment Web BluetoothThe definition of 'reliableWrite' in that specification. Draft Initial definition. ...
BluetoothDevice.paired - Web APIs
The BluetoothDevice.paired read-only property returns a
Boolean value indicating whether the device is paired with the system. Syntax var paired = instanceOfBluetoothDevice.paired Returns A
Boolean. ...
BluetoothRemoteGATTServer - Web APIs
The BluetoothRemoteGATTServer interface of the Web Bluetooth API represents a GATT Server on a remote device. Interface interface BluetoothRemoteGATTServer { readonly attribute BluetoothDevice device; readonly attribute
boolean connected; Promise<BluetoothRemoteGATTServer> connect(); void disconnect(); Promise<BluetoothRemoteGATTService> getPrimaryService(BluetoothServiceUUID service); Promise<sequence<BluetoothRemoteGATTService>> getPrimaryServices(optional BluetoothServiceUUID service); }; Properties BluetoothRemoteGATTServer.connectedRead only A
boolean value that returns true while this script execution environment is connected to this.device. It can be false while the user agent is physically connected. BluetoothRemoteGATTServer.deviceRead only A reference ...
isPrimary - Web APIs
The BluetoothGATTService.isPrimary read-only property returns a
Boolean that indicates whether this is a primary service. If it is not a primary service, it is a secondary service. Syntax var isPrimary = BluetoothGATTService.isPrimary Returns A
Boolean. Specifications Specification Status Comment Web BluetoothThe definition of 'isPrimary' in that specification. Draft Initial definition. ...
Body.bodyUsed - Web APIs
Example In our fetch request example (run fetch request live), we create a new request using the Request() constructor, then use it to fetch a JPG. When the fetch is successful, we read a Blob out of the response using blob(), put it into an object URL using URL.createObjectURL, and then set that URL as the source of an <img> element to display the image. Notice that we log response.bodyUsed to the console once before the response.blob() call and once after. This returns false before and true afterwards, as at that point the body has been read. ...
Body - Web APIs
o declare what its content type is and how it should be handled. Body is implemented by both Request and Response. This provides these objects with an associated body (a stream), a used flag (initially unset), and a MIME type (initially the empty byte sequence). Properties Body.body Read only A simple getter used to expose a ReadableStream of the body contents. Body.bodyUsed Read only A
Boolean that indicates whether the body has been read. Methods Body.arrayBuffer() Takes a Response stream and reads it to completion. It returns a promise that resolves with an ArrayBuffer. Body.blob() Takes a Response stream and reads it to completion. It returns a promise that resolves with a Blob. Body.formData() Takes a Response stream and reads it to completion. It returns a promise that r...
BudgetService - Web APIs
Methods BudgetService.getCost() Returns a Promise that resolves to a double, indicating the worst-case background operation cost of the provided background operation. BudgetService.getBudget() Returns a Promise that resolves to an array of BudgetState objects, indicating the expected state of the budget at times in the future. BudgetService.reserve() Returns a Promise that resolves to a
boolean, indicating whether the requested budget operation can be reserved. 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. DesktopMobileChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for ...
CSS.registerProperty() - Web APIs
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 undefined. Exceptions InvalidModificationError The given name has already been registered. SyntaxError The given name isn't a valid custom property name (starts with two dash...
CSS.supports() - Web APIs
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. ...
CSS - Web APIs
classes related to painting. Methods The CSS interface is a utility interface and no object of this type can be created: only static methods are defined on it. Static methods No inherited static methods. CSS.registerProperty() Registers custom properties, allowing for property type checking, default values, and properties that do or do not inherit their value. CSS.supports() Returns a
Boolean indicating if the pair property-value, or the condition, given in parameter is supported. CSS.escape() Can be used to escape a string mostly for use as part of a CSS selector. CSS factory functions Can be used to return a new CSSUnitValue with a value of the parameter number of the units of the name of the factory function method used. CSS.em(3) // CSSUnitValue {value: 3, unit: "em"} S...
CacheStorage.delete() - Web APIs
The delete() method of the CacheStorage interface finds the Cache object matching the cacheName, and if found, deletes the Cache object and returns a Promise that resolves to true. If no Cache object is found, it resolves to false. You can access CacheStorage through the global caches property. Syntax caches.delete(cacheName).then(function(
boolean) { // your cache is now deleted }); Parameters cacheName The name of the cache you want to delete. Return value a Promise that resolves to true if the Cache object is found and deleted, and false otherwise. Examples In this code snippet we wait for an activate event, and then run a waitUntil() block that clears up any old, unused caches before a new service worker is activated. Here we have an array of cache names we want to keep (cache...
CanvasRenderingContext2D.arc() - Web APIs
ting to clockwise). Parameters x The horizontal coordinate of the arc's center. y The vertical coordinate of the arc's center. radius The arc's radius. Must be positive. startAngle The angle at which the arc starts in radians, measured from the positive x-axis. endAngle The angle at which the arc ends in radians, measured from the positive x-axis. anticlockwise Optional An optional
Boolean. If true, draws the arc counter-clockwise between the start and end angles. The default is false (clockwise). Examples Drawing a full circle This example draws a complete circle with the arc() method. HTML <canvas></canvas> JavaScript The arc is given an x-coordinate of 100, a y-coordinate of 75, and a radius of 50. To make a full circle, the arc begins at an angle of 0 radians (0?), and...
CanvasRenderingContext2D.ellipse() - Web APIs
iusY The ellipse's minor-axis radius. Must be non-negative. rotation The rotation of the ellipse, expressed in radians. startAngle The angle at which the ellipse starts, measured clockwise from the positive x-axis and expressed in radians. endAngle The angle at which the ellipse ends, measured clockwise from the positive x-axis and expressed in radians. anticlockwise Optional An optional
Boolean which, if true, draws the ellipse anticlockwise (counter-clockwise). The default value is false (clockwise). Examples Drawing a full ellipse This example draws an ellipse at an angle of ?/4 radians (45?). To make a full ellipse, the arc begins at an angle of 0 radians (0?), and ends at an angle of 2? radians (360?). HTML <canvas id="canvas" width="200" height="200"></canvas> JavaScript c...
CanvasRenderingContext2D.imageSmoothingEnabled - Web APIs
the last value it was set to is returned. This property is useful for games and other apps that use pixel art. When enlarging images, the default resizing algorithm will blur the pixels. Set this property to false to retain the pixels' sharpness. Note: You can adjust the smoothing quality with the imageSmoothingQuality property. Syntax ctx.imageSmoothingEnabled = value; Options value A
Boolean indicating whether to smooth scaled images or not. The default value is true. Examples Disabling image smoothing This example compares three images. The first image is drawn at its natural size, the second is scaled to 3X and drawn with image smoothing enabled, and the third is scaled to 3X but drawn with image smoothing disabled. HTML <canvas id="canvas" width="460" height="210"></canvas> ...
CanvasRenderingContext2D.isPointInPath() - Web APIs
is coordinate of the point to check, unaffected by the current transformation of the context. fillRule The algorithm by which to determine if a point is inside or outside the path. Possible values: "nonzero": The non-zero winding rule. Default rule. "evenodd": The even-odd winding rule. path A Path2D path to check against. If unspecified, the current path is used. Return value
Boolean A
Boolean, which is true if the specified point is contained in the current or specified path, otherwise false. Examples Checking a point in the current path This example uses the isPointInPath() method to check if a point is within the current path. HTML <canvas id="canvas"></canvas> <p>In path: <code id="result">false</code></p> JavaScript const canvas = document.getElementById('canva...
CanvasRenderingContext2D.isPointInStroke() - Web APIs
f the Canvas 2D API reports whether or not the specified point is inside the area contained by the stroking of a path. Syntax ctx.isPointInStroke(x, y); ctx.isPointInStroke(path, x, y); Parameters x The x-axis coordinate of the point to check. y The y-axis coordinate of the point to check. path A Path2D path to check against. If unspecified, the current path is used. Return value
Boolean A
Boolean, which is true if the point is inside the area contained by the stroking of a path, otherwise false. Examples Checking a point in the current path This example uses the isPointInStroke() method to check if a point is within the area of the current path's stroke. HTML <canvas id="canvas"></canvas> <p>In stroke: <code id="result">false</code></p> JavaScript const canvas = docume...
Drawing shapes with canvas - Web APIs
line. Let's have a more detailed look at the arc method, which takes six parameters: x and y are the coordinates of the center of the circle on which the arc should be drawn. radius is self-explanatory. The startAngle and endAngle parameters define the start and end points of the arc in radians, along the curve of the circle. These are measured from the x axis. The anticlockwise parameter is a
Boolean value which, when true, draws the arc anticlockwise; otherwise, the arc is drawn clockwise. Note: Angles in the arc function are measured in radians, not degrees. To convert degrees to radians you can use the following JavaScript expression: radians = (Math.PI/180)*degrees. The following example is a little more complex than the ones we've seen above. It draws 12 different arcs all with diffe...
Clients.matchAll() - Web APIs
e worker's origin. If options are not included, the method returns only the service worker clients controlled by the service worker. Syntax self.clients.matchAll(options).then(function(clients) { // do something with your clients list }); Parameters options Optional An options object allowing you to set options for the matching operation. Available options are: includeUncontrolled: A
Boolean -- if set to true, the matching operation will return all service worker clients who share the same origin as the current service worker. Otherwise, it returns only the service worker clients controlled by the current service worker. The default is false. type: Sets the type of clients you want matched. Available values are "window", "worker", "sharedworker", and "all". The default is "all". ...
CloseEvent - Web APIs
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 has already being dispatched, this method does nothing. Do not use this method anymore, use the CloseEvent() constructor instead. Specifications Specifica...
CompositionEvent.initCompositionEvent() - Web APIs
hod 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 Specification Status Comm...
console.assert() - Web APIs
The console.assert() method writes an error message to the console if the assertion is false. If the assertion is true, nothing happens. Note: This feature is available in Web Workers. Syntax console.assert(assertion, obj1 [, obj2, ..., objN]); console.assert(assertion, msg [, subst1, ..., substN]); // C-like message formatting Parameters assertion Any
boolean expression. If the assertion is false, the message is written to the console. obj1 ... objN A list of JavaScript objects to output. The string representations of each of these objects are appended together in the order listed and output. msg A JavaScript string containing zero or more substitution strings. subst1 ... substN JavaScript objects with which to replace substitution strings within msg. This parameter gives you add...
Constraint validation API - Web APIs
s an empty string if the element is not a candidate for constraint validation, or if the element's value is valid. If the element's value is not valid, it returns a localized validation message. This will be displayed in the UI if the element is the only form control with a validity problem; if a custom error message is set using setCustomValidity(), this will be shown. willValidate A read-only
boolean property that returns true if the element is a candidate for constraint validation; and false otherwise. Elements with the HTMLObjectElement interface are never candidates for constraint validation. Others may be barred from constraint validation depending on specific conditions. Methods checkValidity() Checks the element's value against its constraints. If the value is invalid, it fires an...
ConvolverNode() - Web APIs
lverNode = new ConvolverNode(context, options) Parameters Inherits parameters from the AudioNodeOptions dictionary. context A reference to an AudioContext. options Optional Options are as follows: audioBuffer: A mono, stereo, or 4-channel AudioBuffer containing the (possibly multichannel) impulse response used by the ConvolverNode to create the reverb effect. disableNormalization: A
Boolean controlling whether the impulse response from the buffer will be scaled by an equal-power normalization, or not. The default is 'false'. Return value A new ConvolverNode object instance. Exceptions Exception Explanation NotSupportedError The referenced AudioBuffer does not have the correct number of channels, or it has a different sample rate to the associated...
ConvolverNode.normalize - Web APIs
The normalize property of the ConvolverNode interface is a
boolean that controls whether the impulse response from the buffer will be scaled by an equal-power normalization when the buffer attribute is set, or not. Its default value is true in order to achieve a more uniform output level from the convolver, when loaded with diverse impulse responses. If normalize is set to false, then the convolution will be rendered with no pre-processing/scaling of the impulse response. Changes to this value do not take effect until the next time the buffer attribute is set. Syntax var audioCtx = new AudioContext(); var convolver = audioCtx.createConvolver(); convolver.normalize = false; Value A
boolean. Example var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); var convolver = au...
ConvolverNode - Web APIs
4 Channel interpretation "speakers" Constructor ConvolverNode() Creates a new ConvolverNode object instance. Properties Inherits properties from its parent, AudioNode. ConvolverNode.buffer A mono, stereo, or 4-channel AudioBuffer containing the (possibly multichannel) impulse response used by the ConvolverNode to create the reverb effect. ConvolverNode.normalize A
boolean that controls whether the impulse response from the buffer will be scaled by an equal-power normalization when the buffer attribute is set, or not. Methods No specific method; inherits methods from its parent, AudioNode. ConvolverNode Example The following example shows basic usage of an AudioContext to create a convolver node. Note: You will need to find an impulse response to complete th...
CryptoKey - Web APIs
e can only be used in a secure context. Properties CryptoKey.type String which may take one of the following values: "secret": This key is a secret key for use with a symmetric algorithm. "private": This key is the private half of an asymmetric algorithm's CryptoKeyPair. "public": This key is the public half of an asymmetric algorithm's CryptoKeyPair. CryptoKey.extractable
Boolean indicating whether or not the key may be extracted using SubtleCrypto.exportKey() or SubtleCrypto.wrapKey(). true: The key may be extracted. false The key may not be extracted. exportKey() or wrapKey() will throw an exception if used to extract this key. CryptoKey.algorithm An object describing the algorithm for which this key can be used and any associated extra parameters. A...
CustomEvent.initCustomEvent() - Web APIs
ot 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 Initial definition, but already deprecated in favor of t...
DOMConfiguration - Web APIs
atatype-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 ...
DOMImplementation.hasFeature() - Web APIs
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. ...
DOMImplementation - Web APIs
entation property. Property This interface has no specific property and doesn't inherit any. Methods No inherited method. DOMImplementation.createDocument() Creates and returns an XMLDocument. DOMImplementation.createDocumentType() Creates and returns a DocumentType. DOMImplementation.createHTMLDocument() Creates and returns an HTML Document. DOMImplementation.hasFeature() Returns a
Boolean indicating if a given feature is supported or not. This function is unreliable and kept for compatibility purpose alone: except for SVG-related queries, it always returns true. Old browsers are very inconsistent in their behavior. Specifications Specification Status Comment DOMThe definition of 'DOMImplementation' in that specification. Living Standard Removed the...
DOMMatrix - Web APIs
slation. It is a mutable version of the DOMMatrixReadOnly interface. This interface should be available inside web workers, though some implementations don't allow it yet. Constructor DOMMatrix() Creates and returns a new DOMMatrix object. Properties This interface inherits properties from DOMMatrixReadOnly, though some of these properties are altered to be mutable. is2D Read only A
Boolean flag whose value is true if the matrix was initialized as a 2D matrix. If false, the matrix is 3D. isIdentity Read only A
Boolean whose value is true if the matrix is the identity matrix. The identity matrix is one in which every value is 0 except those on the main diagonal from top-left to bottom-right corner (in other words, where the offsets in each direction are equal). m11, m12, m13, m14...
DOMMatrixReadOnly - Web APIs
ons. The DOMMatrix interrface--which is based upon DOMMatrixReadOnly--adds mutability, allowing you to alter the matrix after creating it. A 4x4 matrix is suitable to describe any rotation and translation in 3D. This interface should be available inside web workers, though some implementations doesn't allow it yet. Properties This interface doesn't inherit any properties. is2D Read only A
Boolean flag whose value is true if the matrix was initialized as a 2D matrix. If false, the matrix is 3D. isIdentity Read only A
Boolean whose value is true if the matrix is the identity matrix. The identity matrix is one in which every value is 0 except those on the main diagonal from top-left to bottom-right corner (in other words, where the offsets in each direction are equal). m11, m12, m13, m14...
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 ...
DOMTokenList.replace() - Web APIs
terface 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. First, the HTML: <span class="a b c"></sp...
DOMTokenList.supports() - Web APIs
The supports() method of the DOMTokenList interface returns true if a given token is in the associated attribute's supported tokens. This method is intended to support feature detection. Syntax let trueOrFalse = element.supports(token) Parameters token A DOMString containing the token to query for. Returns A
Boolean indicating whether the token was found. Example let iframe = document.getElementById('display'); if (iframe.sandbox.supports('an-upcoming-feature')) { // support code for mystery future feature } else { // fallback code } if (iframe.sandbox.supports('allow-scripts')) { // instruct frame to run JavaScript // // (NOTE: This feature is well-supported; this is just an example!) // } Specifications Specification Status Comment Cred...
DOMTokenList.toggle() - Web APIs
The toggle() method of the DOMTokenList interface removes a given token from the list and returns false. If token doesn't exist it's added and the function returns true. Syntax tokenList.toggle(token [, force]); Parameters token A DOMString representing the token you want to toggle. 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. Return value A
Boolean indicating whether token is in the list after the call. 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 N...
DOMTokenList - Web APIs
move(token1[, token2[, ...tokenN]]) Removes the specified token(s) from the list. DOMTokenList.replace(oldToken, newToken) Replaces token with newToken. DOMTokenList.supports(token) Returns true if a given token is in the associated attribute's supported tokens. DOMTokenList.toggle(token [, force]) Removes token from the list if it exists, or adds token to the list if it doesn't. Returns a
boolean indicating whether token is in the list after the operation. DOMTokenList.entries() Returns an iterator, allowing you to go through all key/value pairs contained in this object. DOMTokenList.forEach(callback [, thisArg]) Executes a provided callback function once per DOMTokenList element. DOMTokenList.keys() Returns an iterator, allowing you to go through all keys of the key/value pairs con...
DataTransfer.mozSetDataAt() - Web APIs
an existing item is modified, or equal to mozItemCount in which case a new item is added, and the mozItemCount is incremented by one. Data should be added in order of preference, with the most specific format added first and the least specific format added last. If data of the given format already exists, it is replaced in the same position as the old data. The data should be either a string, a
Boolean or number type (which will be converted into a string) or an nsISupports. Note: This method is Gecko-specific. Syntax void dataTransfer.mozSetDataAt([type], data, index); Arguments type A string representing the type of the drag data to add to the drag data object. data A nsIVariant representing the data to add to the drag data object. index A unsigned long representing the index of ...
DataTransfer.mozUserCancelled - Web APIs
The DataTransfer.mozUserCancelled property is used in the dragend event handler to determine if the user canceled the drag or not. If the user canceled the event, the property returns true and returns false otherwise. This property only applies to the dragend event. Note: This property is Gecko-specific. This property is Read only . Syntax dataTransfer.mozUserCancelled; Return value A
Boolean representing true if the user canceled the drag event and returns false otherwise. Example This example shows the use of the mozUserCancelled property in the dragend event handler. function dragend_handler(event) { var dragData = event.dataTransfer; console.log("mozUserCancelled = " + dragData.mozUserCancelled); } Specifications This property is not defined in any Web standard. ...
DeviceOrientationEvent.DeviceOrientationEvent() - Web APIs
g from 0 to 360. beta: A number representing the motion of the device around the x axis, express in degrees with values ranging from -180 to 180. This represents a front to back motion of the device. gamma: A number representing the motion of the device around the y axis, express in degrees with values ranging from -90 to 90. This represents a left to right motion of the device. absolute: A
boolean that indicates whether or not the device is providing orientation data absolutely. Specifications Specification Status Comment DeviceOrientation Event Specification Editor's Draft Initial definition. ...
DeviceOrientationEvent - Web APIs
nt provides web developers with information from the physical orientation of the device running the web page. Warning: Currently, Firefox and Chrome do not handle the coordinates the same way. Take care about this while using them. Constructor DeviceOrientationEvent.DeviceOrientationEvent() Creates a new DeviceOrientationEvent. Properties DeviceOrientationEvent.absolute Read only A
boolean that indicates whether or not the device is providing orientation data absolutely. DeviceOrientationEvent.alpha Read only A number representing the motion of the device around the z axis, express in degrees with values ranging from 0 to 360. DeviceOrientationEvent.beta Read only A number representing the motion of the device around the x axis, express in degrees with values ranging from -18...
DisplayMediaStreamConstraints - Web APIs
her or not to include video and/or audio tracks in the MediaStream to be returned by getDisplayMedia(), as well as what type of processing must be applied to the tracks. Processing information is specified using MediaTrackConstraints objects providing options which are applied to the track after the media data is received but before it is made available on the MediaStream. Properties audio A
Boolean or MediaTrackConstraints value; if a
Boolean, this value simply indicates whether or not to include an audio track in the MediaStream returned by getDisplayMedia(). If a MediaTrackConstraints object is provided here, an audio track is included in the stream, but the audio is processed to match the specified constraints after being retrieved from the hardware but before being added to the MediaStr...
Document.all - Web APIs
The Document interface's read-only all property returns an HTMLAllCollection rooted at the document node. In other words, it returns all of the document's elements, accessible by order (like an array) and by ID (like a regular object). Syntax var htmlAllCollection = document.all; Value An HTMLAllCollection which contains every element in the document. Conversion to
boolean document.all is the only falsy object accessible to JavaScript, because it has the [[IsHTMLDDA]] internal slot. This was done because of compatibility with older versions of Internet Explorer. More information about this can be found in this answer from StackOverflow. Specifications Specification Status Comment HTML Living StandardThe definition of 'all' in that specification. Living St...
Document.createTreeWalker() - Web APIs
NodeFilter.SHOW_PROCESSING_INSTRUCTION 64 Shows ProcessingInstruction nodes. NodeFilter.SHOW_TEXT 4 Shows Text nodes. filter Optional A NodeFilter, that is an object with a method acceptNode, which is called by the TreeWalker to determine whether or not to accept a node that has passed the whatToShow check. entityReferenceExpansion Optional A
Boolean flag indicating if when discarding an EntityReference its whole sub-tree must be discarded at the same time. Return value A new TreeWalker object. Example The following example goes through all nodes in the body, reduces the set of nodes to elements, simply passes through as acceptable each node (it could reduce the set in the acceptNode() method instead), and then makes use of tree walker i...
Document.evaluate() - Web APIs
he resultType parameter of the evaluate method: Result Type Value Description ANY_TYPE 0 Whatever type naturally results from the given expression. NUMBER_TYPE 1 A result set containing a single number. Useful, for example, in an XPath expression using the count() function. STRING_TYPE 2 A result set containing a single string.
BOOLEAN_TYPE 3 A result set containing a single
boolean value. Useful, for example, an an XPath expression using the not() function. UNORDERED_NODE_ITERATOR_TYPE 4 A result set containing all the nodes matching the expression. The nodes in the result set are not necessarily in the same order they appear in the document. ORDERED_NODE_ITERATOR_TYPE 5 A result set contain...
Document.fullscreen - Web APIs
n full-screen mode. Although this property is read-only, it will not throw if it is modified (even in strict mode); the setter is a no-operation and it will be ignored. Note: Since this property is deprecated, you can determine if full-screen mode is active on the document by checking to see if Document.fullscreenElement is not null. Syntax var isFullScreen = document.fullscreen; Value A
Boolean value which is true if the document is currently displaying an element in full-screen mode; otherwise, the value is false. Example This simple function reports whether or not full-screen mode is currently active, using the obsolete fullscreen property. function isDocumentInFullScreenMode() { return document.fullscreen; } This next example, on the other hand, uses the current fullscreenElem...
Document.fullscreenEnabled - Web APIs
able only for a page that has no windowed plug-ins in any of its documents, and if all <iframe> elements which contain the document have their allowfullscreen attribute set. Although this property is read-only, it will not throw if it is modified (even in strict mode); the setter is a no-operation and it will be ignored. Syntax var isFullscreenAvailable = document.fullscreenEnabled; Value A
Boolean value which is true if the document and the elements within can be placed into full-screen mode by calling Element.requestFullscreen(). If full-screen mode isn't available, this value is false. Example In this example, before attempting to request full-screen mode for a <video> element, the value of fullscreenEnabled is checked, in order to avoid making the attempt when not available. function...
Document.hasFocus() - Web APIs
This method can be used to determine whether the active element in a document has focus. When viewing a document, an element with focus is always the active element in the document, but an active element does not necessarily have focus. For example, an active element within a popup window that is not the foreground doesn't have focus. Syntax var focused = document.hasFocus(); Return value false if the active element in the document has no focus; true if the active element in the document has focus. Example This example checks whether the document has focus every 300 milliseconds. ...
Document.hidden - Web APIs
Syntax var
boolean = document.hidden Examples document.addEventListener("visibilitychange", function() { console.log( document.hidden ); // Modify behavior... ...
Document.importNode() - Web APIs
nsertBefore() with a node that is currently in the document tree. Unlike document.adoptNode(), the original node is not removed from its original document. The imported node is a clone of the original. Syntax const importedNode = document.importNode(externalNode [, deep]); Parameters externalNode The external Node or DocumentFragment to import into the current document. deep Optional A
Boolean which controls whether to include the entire DOM subtree of the externalNode in the import. If deep is set to true, then externalNode and all of its descendants are copied. If deep is set to false, then only externalNode is imported -- the new node has no children. Note: In the DOM4 specification, deep was an optional argument with a default value of true. This default has changed i...
Document.ononline - Web APIs
The Document.online event is fired on the <body> of each page when the browser switches between online and offline mode. Additionally, the events bubble up from document.body, to document, ending at window. Both events are non-cancellable (you can't prevent the user from coming online, or going offline). window.navigator.onLine returns
boolean true if the browser is online and false if it is definitely offline (disconnected from the network). The online and offline events are fired when the value of this attribute changes. It is important to note that this event and attribute are inherently unreliable. A computer can be connected to a network without having Internet access. You can register listeners for these events in a few familiar ways: Using addEventListener on the window, document,...
Document.queryCommandState() - Web APIs
The queryCommandState() method will tell you if the current selection has a certain Document.execCommand() command applied. Syntax queryCommandState(String command) Parameters command is a command from Document.execCommand() Return value queryCommandState() can return a
Boolean value or null if the state is unknown. Example HTML <div contenteditable="true">Select a part of this text!</div> <button onclick="makeBold();">Test the state of the 'bold' command</button> JavaScript function makeBold() { var state = document.queryCommandState("bold"); switch (state) { case true: alert("The bold formatting will be removed from the selected text."); break; case false: alert("The selected text will be displayed in bold."); break; case null: alert...
Document.queryCommandSupported() - Web APIs
The Document.queryCommandSupported() method reports whether or not the specified editor command is supported by the browser. Syntax isSupported = document.queryCommandSupported(command); Parameters command The command for which to determine support. Return value Returns a
Boolean which is true if the command is supported and false if the command isn't. Notes The 'paste' command return false not only if the feature is unavailable, but also if the script calling it has insufficient privileges to perform the action [1] Example var flg = document.queryCommandSupported("SelectAll"); if(flg) { // ...Do something } Specifications Specification Status Comment execCommand ...
Document Object Model (DOM) - Web APIs
zontalRel SVGPathSegLinetoVerticalAbs SVGPathSegLinetoVerticalRel SVGPathSegCurvetoCubicSmoothAbs SVGPathSegCurvetoCubicSmoothRel SVGPathSegCurvetoQuadraticSmoothAbs SVGPathSegCurvetoQuadraticSmoothRel SVGPathSegList SVGPoint SVGPointList SVGPreserveAspectRatio SVGRect SVGStringList SVGTransform SVGTransformList Animated type SVGAnimatedAngle SVGAnimated
Boolean SVGAnimatedEnumeration SVGAnimatedInteger SVGAnimatedLength SVGAnimatedLengthList SVGAnimatedNumber SVGAnimatedNumberList SVGAnimatedPathData SVGAnimatedPoints SVGAnimatedPreserveAspectRatio SVGAnimatedRect SVGAnimatedString SVGAnimatedTransformList SMIL-related interfaces ElementTimeControl TimeEvent Other SVG interfaces GetSVGDocument ShadowAnimation SVGColorProfi...
EXT_disjoint_timer_query.getQueryObjectEXT() - Web APIs
y ext.getQueryObjectEXT(query, pname); Parameters query A WebGLQuery object from which to return information. pname A GLenum specifying which information to return. Must be ext.QUERY_RESULT_EXT or ext.QUERY_RESULT_AVAILABLE_EXT. Return value Depends on pname: If pname is ext.QUERY_RESULT_EXT: A GLuint64EXT containing the query result. If pname is ext.QUERY_RESULT_AVAILABLE_EXT: A GL
boolean indicating whether or not a query result is available. Examples var ext = gl.getExtension('EXT_disjoint_timer_query'); var query = ext.createQueryEXT(); ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, query); // ... drawing ... ext.endQueryEXT(ext.TIME_ELAPSED_EXT); // At some point in the future, after returning control to the browser var available = ext.getQueryObjectEXT(query, ext.QUERY_RESULT...
EXT_disjoint_timer_query - Web APIs
integer number. Constants This extension exposes seven new constants. ext.QUERY_COUNTER_BITS_EXT A GLint indicating the number of bits used to hold the query result for the given target. ext.CURRENT_QUERY_EXT A WebGLQuery object, which is the currently active query for the given target. ext.QUERY_RESULT_EXT A GLuint64EXT containing the query result. ext.QUERY_RESULT_AVAILABLE_EXT A GL
boolean indicating whether or not a query result is available. ext.TIME_ELAPSED_EXT Elapsed time (in nanoseconds). ext.TIMESTAMP_EXT The current time. ext.GPU_DISJOINT_EXT A GL
boolean indicating whether or not the GPU performed any disjoint operation. Methods This extension exposes eight new methods. ext.createQueryEXT() Creates a new WebGLQuery. ext.deleteQueryEXT() Deletes a given ...
Element.attachShadow() - Web APIs
he shadow DOM tree. This can be one of: open: Elements of the shadow root are accessible from JavaScript outside the root, for example using Element.shadowRoot: element.shadowRoot; // Returns a ShadowRoot obj closed: Denies access to the node(s) of a closed shadow root from JavaScript outside it: element.shadowRoot; // Returns null delegatesFocus A
boolean that, when set to true, specifies behavior that mitigates custom element issues around focusability. When a non-focusable part of the shadow DOM is clicked, the first focusable part is given focus, and the shadow host is given any available :focus styling. Return value Returns a ShadowRoot object. Exceptions Exception Explanation InvalidStateError The element ...
Element.classList - Web APIs
testClass.toggle("a",0)!==false) DOMTokenListProto.toggle=function(val){ if (arguments.length > 1) return (this[arguments[1] ? ...
Element.getAnimations() - Web APIs
mation objects affecting this element or which are scheduled to do so in future. It can optionally return Animation objects for descendant elements too. Note: This array includes CSS Animations, CSS Transitions, and Web Animations. Syntax const animations = Element.getAnimations(options); Parameters options Optional An options object containing the following property: subtree A
boolean value which, if true, causes animations that target descendants of Element to be returned as well. This includes animations that target any CSS pseudo-elements attached to Element or one of its descendents. Defaults to false. Return value An Array of Animation objects, each representing an animation currently targetting the Element on which this method is called, or one of its descendant e...
Element.hasAttribute() - Web APIs
Syntax var result = element.hasAttribute(name); result holds the return value true or false. name is a string representing the name of the attribute. ...
Element.hasAttributes() - Web APIs
Syntax var result = element.hasAttributes(); Return value result holds the return value true or false. Examples let foo = document.getElementById('foo'); if (foo.hasAttributes()) { // Do something with 'foo.attributes' } Polyfill ;(function(prototype) { prototype.hasAttributes = prototype.hasAttributes || function() { return (this.attributes.length > 0); } })(Element.prototype); Specifications Specification Status Comment DOMThe definition of 'Element.hasAttributes()' in that specification. ...
Element.hasPointerCapture() - Web APIs
The hasPointerCapture() method of the Element interface sets whether the element on which it is invoked has pointer capture for the pointer identified by the given pointer ID. Syntax targetElement.hasPointerCapture(pointerId); Parameters pointerId The pointerId of a PointerEvent object. Return value A
Boolean value -- true if the element does have pointer capture, false if it doesn't. Examples <html> <script> function downHandler(ev) { const el = document.getElementById("target"); // Element 'target' will receive/capture further events el.setPointerCapture(ev.pointerId); /* ... */ // Check whether element still has pointer capture let pointerCap = el.hasPointerCapture(ev.pointerId); if(pointerCap) { // We've still got pointer ...
Element.scrollIntoView() - Web APIs
The Element interface's scrollIntoView() method scrolls the element's parent container such that the element on which scrollIntoView() is called is visible to the user Syntax element.scrollIntoView(); element.scrollIntoView(alignToTop); //
Boolean parameter element.scrollIntoView(scrollIntoViewOptions); // Object parameter Parameters alignToTop Optional Is a
Boolean value: If true, the top of the element will be aligned to the top of the visible area of the scrollable ancestor. Corresponds to scrollIntoViewOptions: {block: "start", inline: "nearest"}. This is the default value. If false, the bottom of the element will be aligned to the bottom of the visible area of the scrollable ancestor. Corresponds to scrollIntoViewOptions: {block: "end", inline: "nearest"}. scrollIntoViewO...
Element.scrollIntoViewIfNeeded() - Web APIs
ded() method scrolls the current element into the visible area of the browser window if it's not already within the visible area of the browser window. If the element is already within the visible area of the browser window, then no scrolling takes place. This method is a proprietary variation of the standard Element.scrollIntoView() method. Syntax TODO Parameters opt_center Is an optional
Boolean value with a default value of true: If true, the element will be aligned so it is centered within the visible area of the scrollable ancestor. If false, the element will be aligned to the nearest edge of the visible area of the scrollable ancestor. Depending on which edge of the visible area is closest to the element, either the top of the element will be aligned to the top edge of the visi...
Element.tabStop - Web APIs
If the specified element is a shadow host tab navigation is delegated to its children. This property was proposed to add tab functionality for Custom Elements. While with the existing tabIndex property, it is required to specify an order for the element to become tabbable. The tabStop property would decouple the tabbable property from the tab index. After feedback, this property was removed from the design doc and replaced by ShadowRoot.delegatesFocus. ...
Element.toggleAttribute() - Web APIs
Syntax Element.toggleAttribute(name [, force]); Parameters name A DOMString specifying the name of the attribute to be toggled. The attribute name is automatically converted to all lower-case when toggleAttribute() is called on an HTML element in an HTML document. force Optional A
boolean value to determine whether the attribute should be added or removed, no matter whether the attribute is present or not at the moment. Return value true if attribute name is eventually present, and false otherwise. ...
Event() - Web APIs
The Event() constructor creates a new Event. Syntax new Event(typeArg[, eventInit]); Values typeArg This is a DOMString representing the name of the 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. Example // create a look event that bubbles up and cannot be canceled const evt = new Event("look", {"bubbles":true, "cancelable":false}); document.dispatchEvent(evt); // ev...
Event.bubbles - Web APIs
Example function handleInput(e) { // Checks whether the event bubbles and ... if (!e.bubbles) { // ... passes the event along if does not passItOn(e); } // Already bubbling doOutput(e); } Note: Only certain events can bubble. ...
Event.cancelBubble - Web APIs
The cancelBubble property of the Event interface is a historical alias to Event.stopPropagation(). Setting its value to true before returning from an event handler prevents propagation of the event. In later implementations, setting this to false does nothing. See Browser compatibility for details. Syntax event.cancelBubble = bool; var bool = event.cancelBubble; Value A
Boolean. Example elem.onclick = function(event) { // Do cool things here event.cancelBubble = true; } Specifications Specification Status Comment DOMThe definition of 'cancelBubble' in that specification. Living Standard ...
Event.cancelable - Web APIs
are the ones that result from the user interacting with the page. Canceling the click, scroll, or beforeunload events would prevent the user from clicking on something, scrolling the page, or navigating away from the page, respectively. Custom events created by other JavaScript code control if they can be canceled when they are created. Syntax bool = event.cancelable; Value The result is a
Boolean, which is true if the event can be canceled. Example For example, browser vendors are proposing that the wheel event can only be canceled the first time the listener is called -- any following wheel events cannot be canceled. function preventScrollWheel(event) { if (typeof event.cancelable !== '
boolean' || event.cancelable) { // The event can be canceled, so we do so. event.preventDe...
Event.initEvent() - Web APIs
ntTarget.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.createEvent('Event'); // Create a click event that bubbles u...
Event.returnValue - Web APIs
true by default, allowing the default action to occur. Setting this property to false prevents the default action. Note: While returnValue has been adopted into the DOM standard, it is present primarily to support existing code. You should use preventDefault(), and defaultPrevented instead of this historical property. Syntax event.returnValue = bool; var bool = event.returnValue; Value A
Boolean value which is true if the event has not been canceled; otherwise, if the event has been canceled or the default has been prevented, the value is false. The value returned by returnValue is the opposite of the value returned by defaultPrevented. Usage notes returnValue was introduced into the DOM by Internet Explorer 6, and due to that browser's ubiquity became so commonly used that other brow...
EventSource - Web APIs
pecified 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 an EventHandler called when a message event is received, that is when a message is comi...
EventTarget.removeEventListener() - Web APIs
ns]); target.removeEventListener(type, listener[, useCapture]); Parameters type A string which specifies the type of event for which to remove an event listener. listener The EventListener function of the event handler to remove from the event target. options Optional An options object that specifies characteristics about the event listener. The available options are: capture: A
Boolean which indicates that events of this type will be dispatched to the registered listener before being dispatched to any EventTarget beneath it in the DOM tree. mozSystemGroup: Available only in code running in XBL or in Firefox' chrome, it is a
Boolean defining if the listener is added to the system group. useCapture Optional Specifies whether the EventListener to be removed is registered...
FeaturePolicy.allowsFeature() - Web APIs
The allowsFeature() method of the FeaturePolicy interface enables introspection of individual directives of the Feature Policy it is run on. It returns a
Boolean that is true if and only if the specified feature is allowed in the specified context (or the default context if no context is specified). Syntax const allowed = FeaturePolicy.allowsFeature(<feature>) or const allowed = FeaturePolicy.allowsFeature(<feature>, <origin>) Parameters Feature name A specific feature name must be specified. Origin name Optional An origin URL to check the feature on. If it is omitted the default origin is used. Return value A
Boolean that is true if and only if the feature is allowed. Example The following example queries whether or not the document is allowed to use camera API by the Fe...
FeaturePolicy - Web APIs
FeaturePolicy.features Returns a list of names of all features supported by the User Agent. Feature whose name appears on the list might not be allowed by the Feature Policy of the current execution context and/or might not be accessible because of user's permissions. ...
FetchEvent() - Web APIs
t(type, init); Parameters type A DOMString object specifying which event the object represents. 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. 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 ...
FetchEvent.isReload - Web APIs
The isReload read-only property of the FetchEvent interface returns true if the event was dispatched by the user attempting to reload the page, and false otherwise. Pressing the refresh button is a reload while clicking a link and pressing the back button is not. Syntax var reloaded = FetchEvent.isReload Value A
Boolean. Example self.addEventListener('fetch', function(event) { event.respondWith( if (event.isReload) { //Return something } else { //Return something else }; ); }); ...
Using Fetch - Web APIs
omises are resolved. The most common response properties you'll use are: Response.status -- An integer (default value 200) containing the response status code. Response.statusText -- A string (default value "OK"), which corresponds to the HTTP status code message. Response.ok -- seen in use above, this is a shorthand for checking that status is in the range 200-299 inclusive. This returns a
Boolean. They can also be created programmatically via JavaScript, but this is only really useful in ServiceWorkers, when you are providing a custom response to a received request using a respondWith() method: const myBody = new Blob(); addEventListener('fetch', function(event) { // ServiceWorker intercepting a fetch event.respondWith( new Response(myBody, { headers: { 'Content-Type': '...
FileSystemEntry.isDirectory - Web APIs
can also use isFile to determine if the entry is a file. You should not assume that any entry which isn't a directory is a file or vice-versa. There are other types of file descriptors on many operating systems. Be sure to use both isDirectory and isFile as needed to ensure that the entry is something you know how to work with. Syntax var isDirectory = FileSystemEntry.isDirectory; Value A
Boolean indicating whether or not the FileSystemEntry is a directory. Example This example shows how this property might be used to determine whether to process the entry as a directory or file. If the entry is neither, an error handler is called with an appropriate message. if (entry.isDirectory) { processSubdirectory(entry); } else if (entry.isFile) { processFile(entry); } else { displayErrorM...
FileSystemEntry.isFile - Web APIs
can also use isDirectory to determine if the entry is a directory. You should not assume that any entry which isn't a file is a directory or vice-versa. There are other types of file descriptors on many operating systems. Be sure to use both isDirectory and isFile as needed to ensure that the entry is something you know how to work with. Syntax var isFile = FileSystemEntry.isFile; Value A
Boolean indicating whether or not the FileSystemEntry is a file. Example This example shows how this property might be used to determine whether to process the entry as a directory or file. If the entry is neither, an error handler is called with an appropriate message. if (entry.isDirectory) { processSubdirectory(entry); } else if (entry.isFile) { processFile(entry); } else { displayErrorMessag...
FileSystemEntry - Web APIs
provides the following properties. filesystem Read only A FileSystem object representing the file system in which the entry is located. fullPath Read only A USVString object which provides the full, absolute path from the file system's root to the entry; it can also be thought of as a path which is relative to the root directory, prepended with a "/" character. isDirectory Read only A
Boolean which is true if the entry represents a directory; otherwise, it's false. isFile Read only A
Boolean which is true if the entry represents a file. If it's not a file, this value is false. name Read only A USVString containing the name of the entry (the final part of the path, after the last "/" character). Methods This interface defines the following methods. copyTo() Copies the file...
FileSystemEntrySync - Web APIs
ySync 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 the root directory, prepended with a '/'. isDirectory readonly
boolean True if FileSystemEntrySync is a directory. isFile readonly
boolean True if the FileSystemEntrySync is a file. name readonly DOMString The name of the entry, excluding the path leading to it. Methods getMetadata() Look up metadata about this entry. [ todo: specify what kind of metadata ] Metadata getMetada () raises (FileException); Parameter None ...
FileSystemFlags.create - Web APIs
The create property on the FileSystemFlags dictionary is used to indicate whether or not the file should be created if it's missing. FileSystemFlags is only used when calling FileSystemDirectoryEntry.getFile() or FileSystemDirectoryEntry.getDirectory(). Syntax fileSystemFlags.create =
booleanValue Values The table below describes the result of each possible combination of these flags depending on whether or not the target file or directory path already exists. Option values File/directory condition Result create exclusive false n/a[1] Path exists and matches the desired type (depending on whether the function called is getFile() or getDirectory() The successCallback is called with a FileSystemFileEntry if getFile() was called or a ...
FileSystemFlags.exclusive - Web APIs
The exclusive property on the FileSystemFlags dictionary is used in tandem with the create property to determine whether or not it's acceptable to require that the file not already exist when the reference to it is created by calling FileSystemDirectoryEntry.getFile() or FileSystemDirectoryEntry.getDirectory(). Syntax fileSystemFlags.exclusive =
booleanValue Values The table below describes the result of each possible combination of these flags depending on whether or not the target file or directory path already exists. Option values File/directory condition Result create exclusive false n/a[1] Path exists and matches the desired type (depending on whether the function called is getFile() or getDirectory() The successCallback is c...
FontFaceSet.check() - Web APIs
"italic bold 16px Roboto" text: limit the font faces to those whose Unicode range contains at least one of the characters in text. This does not check for individual glyph coverage. ...
FontFaceSet - Web APIs
ceSet.onloadingdone An EventListener called whenever an event of type loadingdone is fired, indicating that a font face set has finished loading. FontFaceSet.onloadingerror An EventListener called whenever an event of type loadingerror is fired, indicating that an error occurred whilst loading a font-face set. Methods FontFaceSet.add() Adds a font to the font set. FontFaceSet.check() A
Boolean that indicates whether a font is loaded, but doesn't initiate a load when it isn't. FontFaceSet.clear() Removes all manually-added fonts from the font set. CSS-connected fonts are unaffected. FontFaceSet.delete() Removes a manually-added font from the font set. CSS-connected fonts are unaffected. FontFaceSet.load() Returns a Promise which resolves to a list of font-faces for a requested fon...
FormData - Web APIs
ete() Deletes a key/value pair from a FormData object. FormData.entries() Returns an iterator allowing to go through all key/value pairs contained in this object. FormData.get() Returns the first value associated with a given key from within a FormData object. FormData.getAll() Returns an array of all the values associated with a given key from within a FormData. FormData.has() Returns a
boolean stating whether a FormData object contains a certain key. FormData.keys() Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. FormData.set() Sets a new value for an existing key inside a FormData object, or adds the key/value if it does not already exist. FormData.values() Returns an iterator allowing to go through all values contained in th...
FormDataEvent() - Web APIs
The FormDataEvent() constructor creates a new FormDataEvent object instance. Syntax new FormDataEvent(type[, formEventInit]); Values type A DOMString representing the name of the event. 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. formData: A FormData object to pre-populate the FormDataEvent with. This would then be accessed through the FormDataEvent.formData property. Examples let fd = new FormDa...
Fullscreen API - Web APIs
t handler which is called when the fullscreenchange event is sent to the element, indicating that the element has been placed into, or removed from, full-screen mode. Element.onfullscreenerror An event handler for the fullscreenerror event when sent to an element which has encountered an error while transitioning into or out of full-screen mode. Obsolete properties Document.fullscreen A
Boolean value which is true if the document has an element currently being displayed in full-screen mode; otherwise, this returns false. Note: Use the fullscreenElement property on the Document or ShadowRoot instead; if it's not null, then it's an Element currently being displayed in full-screen mode. Events The Fullscreen API defines two events which can be used to detect when full-screen mode is ...
Gamepad.buttons - Web APIs
The Gamepad.buttons property of the Gamepad interface returns an array of gamepadButton objects representing the buttons present on the device. Each entry in the array is 0 if the button is not pressed, and non-zero (typically 1.0) if the button is pressed. Each gamepadButton object has two properties: pressed and value: The pressed property is a
boolean indicating whether the button is currently pressed (true) or unpressed (false). The value property is a floating point value used to enable representing analog buttons, such as the triggers on many modern gamepads. The values are normalized to the range 0.0 - 1.0, with 0.0 representing a button that is not pressed, and 1.0 representing a button that is fully pressed. Syntax readonly attribute GamepadButton[] buttons; Example The...
Gamepad.connected - Web APIs
The Gamepad.connected property of the Gamepad interface returns a
boolean indicating whether the gamepad is still connected to the system. If the gamepad is connected, the value is true; if not, it is false. Syntax readonly attribute
boolean connected; Example var gp = navigator.getGamepads()[0]; console.log(gp.connected); Value A
boolean. Specifications Specification Status Comment GamepadThe definition of 'Gamepad.connected' in that specification. Working Draft Initial definition ...
Gamepad - Web APIs
and gamepaddisconnected events, or by grabbing any position in the array returned by the Navigator.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 ...
GamepadButton.pressed - Web APIs
The GamepadButton.pressed property of the GamepadButton interface returns a
boolean indicating whether the button is currently pressed (true) or unpressed (false). Syntax var isPressed = navigator.getGamepads()[0].pressed; Example var gp = navigator.getGamepads()[0]; // Get the first gamepad object if(gp.buttons[0].pressed == true) { // respond to button being pressed } Value A
boolean. Specifications Specification Status Comment GamepadThe definition of 'GamepadButton.pressed' in that specification. Working Draft Initial definition ...
GamepadButton - Web APIs
uble values when this property is accessed. Properties GamepadButton.value Read only A double value used to represent the current state of analog buttons, such as the triggers on many modern gamepads. The values are normalized to the range 0.0 --1.0, with 0.0 representing a button that is not pressed, and 1.0 representing a button that is fully pressed. GamepadButton.pressed Read only A
Boolean value indicating whether the button is currently pressed (true) or unpressed (false). Example The following code is taken from my Gamepad API button demo (you can view the demo live, and find the source code on Github.) Note the code fork -- in Chrome Navigator.getGamepads needs a webkit prefix and the button values are stored as an array of double values, whereas in Firefox Navigator.getGamep...
Using the Gamepad API - Web APIs
ing a device and then connecting a new device may reuse the previous index. mapping: 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. connected: A
boolean indicating whether the gamepad is still connected to the system. If this is so the value is True; if not, it is False. buttons: An array of GamepadButton objects representing the buttons present on the device. Each GamepadButton has a pressed and a value property: The pressed property is a
boolean indicating whether the button is currently pressed (true) or unpressed (false). The value ...
HTMLAreaElement - Web APIs
g 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 containing the password specified before the domain name. HTMLHyperlinkElementUtils.origin Read only Returns a USVString containing the origin of the URL, that is its scheme, its domain and its port. HTMLHyperlinkElementUtils.pathname Is a USVString containing the path name c...
disabled - Web APIs
Is a
Boolean indicating whether or not the control is disabled, meaning that it does not accept any clicks. ...
HTMLCanvasElement.mozOpaque - Web APIs
It lets the canvas know whether or not translucency will be a factor. If the canvas knows there's no translucency, painting performance can be optimized. This has been standardized as setting the alpha option to false when creating a drawing context with HTMLCanvasElement.getContext(). Use of mozOpaque should be avoided. Firefox will stop supporting it in the future. Syntax var opaque = canvas.mozOpaque; canvas.mozOpaque = true; Examples Given this <canvas> element: <canvas id="canvas" width="300" height="300" moz-opaque></canvas> You can get or set the mozOpaque property. ...
HTMLCanvasElement - Web APIs
ecting the number of logical pixels (or RGBA values) going across one row of the canvas. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used. If no [separate] CSS width is assigned to the <canvas>, then this value will also be used as the width of the canvas in the length-unit CSS Pixel. HTMLCanvasElement.mozOpaque Is a
Boolean reflecting the moz-opaque HTML attribute of the <canvas> element. It lets the canvas know whether or not translucency will be a factor. If the canvas knows there's no translucency, painting performance can be optimized. This is only supported in Mozilla-based browsers; use the standardized canvas.getContext('2d', { alpha: false }) instead. HTMLCanvasElement.mozPrintCallback Is a function that ...
HTMLDListElement - Web APIs
4F7F8" 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">HTMLDListElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLDListElement.compact Is a
Boolean indicating that spacing between list items should be reduced. Methods No specific methods; inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLDListElement' in that specification. Living Standard HTML5The definition of 'HTMLDListElement' in that specification. Recomme...
HTMLDetailsElement - Web APIs
#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="91" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">HTMLDetailsElement</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Properties Inherits properties from its parent, HTMLElement. HTMLDetailsElement.open Is a
boolean reflecting the open HTML attribute, indicating whether or not the element's contents (not counting the <summary>) is to be shown to the user. Methods No specific method; inherits methods from its parent, HTMLElement. Events Listen to this event using addEventListener() or by assigning an event listener to the oneventname property of this interface. toggle Fired when the open/closed state...
HTMLDialogElement.open - Web APIs
true means it is set, and therefore the dialog is shown. false means it not set, and therefore the dialog is not shown. The property is now read only -- it is possible to set the value to programmatically show or hide the dialog. Examples The following example shows a simple button that, when clicked, opens a <dialog> containing a form via the showModal() method. ...
HTMLDialogElement - Web APIs
ill="#F4F7F8" stroke="#D4DDE4" stroke-width="2px" /><text x="86" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" 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. H...
HTMLElement.contentEditable - Web APIs
the HTMLElement interface specifies whether or not the element is editable. This enumerated attribute can have the following values: 'true' indicates that the element is contenteditable. 'false' indicates that the element cannot be edited. 'inherit' indicates that the element inherits its parent's editable status. You can use the HTMLElement.isContentEditable property to test the computed
Boolean value of this property. Syntax editable = element.contentEditable element.contentEditable = 'true' Specifications Specification Status Comment HTML Living StandardThe definition of 'contenteditable' in that specification. Living Standard Initial definition ...
inert - Web APIs
This can be useful when building UIs such as modals where you would want to "trap" the focus inside the modal when it's visible. According to the spec: When a node is inert, then the user agent must act as if the node was absent for the purposes of targeting user interaction events, may ignore the node for the purposes of text search user interfaces (commonly known as "find in page"), and may prevent the user from selecting text in that node. Polyfills Currently, browser support is lacking. ...
HTMLElement.isContentEditable - Web APIs
The HTMLElement.isContentEditable read-only property returns a
Boolean that is true if the contents of the element are editable; otherwise it returns false. Syntax editable = element.isContentEditable Example HTML <p id="myText1">Uneditable Paragraph</p> <p id="myText2" contentEditable="true">Editable Paragraph</p> <p id="infoText1">Can edit the first paragraph? </p> <p id="infoText2">Can edit the second paragraph? </p> JavaScript document.getElementById('infoText1').innerHTML += document.getElementById('myText1').isContentEditable; document.getElementById('infoText2').innerHTML += document.getElementById('myText2').isContentEditable; Result Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLElement.contenteditable' in...
HTMLFormElement.reportValidity() - Web APIs
The HTMLFormElement.reportValidity() method returns true if the element's child controls satisfy their validation constraints. When false is returned, cancelable invalid events are fired for each invalid child and validation problems are reported to the user. Syntax HTMLFormElement.reportValidity() Return value
Boolean Example document.forms['myform'].addEventListener('submit', function() { document.forms['myform'].reportValidity(); }, false); Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLFormElement.reportValidity()' in that specification. Living Standard HTML 5.1The definition of 'HTMLFormElement.reportValidity()' in that specification. Recommendation Initial definition ...
HTMLFormElement - Web APIs
.acceptCharset A DOMString reflecting the value of the form's accept-charset HTML attribute, representing the character encoding that the server accepts. HTMLFormElement.autocomplete A DOMString reflecting the value of the form's autocomplete HTML attribute, indicating whether the controls in this form can have their values automatically populated by the browser. HTMLFormElement.noValidate A
Boolean reflecting the value of the form's novalidate HTML attribute, indicating whether the form should not be validated. Named inputs are added to their owner form instance as properties, and can overwrite native properties if they share the same name (e.g. a form with an input named action will have its action property return that input instead of the form's action HTML attribute). Methods This in...
HTMLHRElement - Web APIs
/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 Specification Status Comment HTML Living StandardThe definition of 'HTMLHREle...
HTMLIFrameElement.allowPaymentRequest - Web APIs
Specifications Specification Status Comment Payment Request APIThe definition of 'allowPaymentRequest' in that specification. Candidate Recommendation Adds allowPaymentRequest property. HTML Living StandardThe definition of 'HTMLIFrameElement: allowPaymentRequest' in that specification. Living Standard Browser Compatibility The compatibility table on this page is generated from structured data. ...
HTMLIFrameElement.setNfcFocus() - Web APIs
The setNfcFocus() method of the HTMLIFrameElement interface sets whether an <iframe> can receive an NFC event. Syntax myIFrame.setNfcFocus(true); Returns Void. Parameters A
Boolean indicating whether the <iframe> can receive an NFC event. Default is false; set to true to allow it to receive NFC events. Specifications Not part of any specification. ...
HTMLIFrameElement - Web APIs
LIFrameElement.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 frame is willing to be placed into full screen mode. See Using full-screen mode for details. HTMLIFrameElement.allowPaymentRequest Is a
Boolean indicating whether the Payment Request API may be invoked inside a cross-origin iframe. HTMLIFrameElement.contentDocument Read only Returns a Document, the active document in the inline frame's nested browsing context. ...
HTMLImageElement.complete - Web APIs
The image is considered completely loaded if any of the following are true: Neither the src nor the srcset attribute is specified. The srcset attribute is absent and the src attribute, while specified, is the empty string (""). The image resource has been fully fetched and has been queued for rendering/compositing. The image element has previously determined that the image is fully available and ready for use. ...
HTMLImageElement.isMap - Web APIs
The HTMLImageElement proeprty isMap is a
Boolean value which indicates that the image is to be used by a server-side image map. This may only be used on images located within an <a> element. Note: For accessibility reasons, you should generally avoid using server-side image maps, as they require the use of a mouse. Use a client-side image map instead. Syntax htmlImageElement.isMap = true|false; let isMap = htmlImageElement.isMap; Value A
Boolean value which is true if the image is being used for a server-side image map; otherwise, the value is false. Usage notes When an image marked as being part of a server-side image map is clicked, the browser constructs the string "?x,y", where x and y indicate the coordinates at which the mouse was clicked as offsets from the top-left corner of th...
HTMLInputElement.webkitdirectory - Web APIs
webkitdirectory HTML attribute and indicates that the <input> element should let the user select directories instead of files. When a directory is selected, the directory and its entire hierarchy of contents are included in the set of selected items. The selected file system entries can be obtained using the webkitEntries property. Syntax HTMLInputElement.webkitdirectory = boolValue Value A
Boolean; true if the <input> element should allow picking only directories or false if only files should be selectable. Understanding the results After the user makes a selection, each File object in files has its File.webkitRelativePath property set to the relative path within the selected directory at which the file is located. For example, consider this file system: PhotoAlbums Birthdays ...
HTMLLinkElement - Web APIs
#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. 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. HTMLLi...
HTMLMediaElement.autoplay - Web APIs
n be useful when creating media elements whose source will be set at a later time, under user control. For a much more in-depth look at autoplay, autoplay blocking, and how to respond whena autoplay is blocked by the user's browser, see our article Autoplay guide for media and Web Audio APIs. Syntax HTMLMediaElement.autoplay = true | false; var autoplay = HTMLMediaElement.autoplay; Value A
Boolean whose value is true if the media element will begin playback as soon as enough content has loaded to allow it to do so without interruption. Note: Some browsers offer users the ability to override autoplay in order to prevent disruptive audio or video from playing without permission or in the background. Do not rely on autoplay actually starting playback and instead use play event. Examples ...
HTMLMediaElement.disableRemotePlayback - Web APIs
The HTMLMediaElement.disableRemotePlayback property determines whether the media element is allowed to have a remote playback UI. Syntax var remotePlaybackDisabled = element.disableRemotePlayback; Value A
Boolean indicating whether the media element may have a remote playback UI. (false means "not disabled", which means "enabled") Example var obj = document.createElement('audio'); obj.disableRemotePlayback = true; Specifications Specification Status Comment Remote Playback APIThe definition of 'disableRemotePlayback' in that specification. Candidate Recommendation Initial definition. ...
HTMLMediaElement.loop - Web APIs
The HTMLMediaElement.loop property reflects the loop HTML attribute, which controls whether the media element should start over when it reaches the end. Syntax var loop = video.loop; audio.loop = true; Value A
Boolean. Example var obj = document.createElement('video'); obj.loop = true; // true Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLMediaElement.loop' in that specification. Living Standard HTML5The definition of 'HTMLMediaElement.loop' in that specification. Recommendation ...
HTMLMediaElement.msInsertAudioEffect() - Web APIs
. 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 extensions ...
HTMLMediaElement: pause event - Web APIs
nt handler property GlobalEventHandlers.onpause Specification HTML5 media Examples These examples add an event listener for the HTMLMediaElement's pause event, then post a message when that event handler has reacted to the event firing. Using addEventListener(): const video = document.querySelector('video'); video.addEventListener('pause', (event) => { console.log('The
Boolean paused property is now true. Either the ' + 'pause() method was called or the autoplay attribute was toggled.'); }); Using the onpause event handler property: const video = document.querySelector('video'); video.onpause = (event) => { console.log('The
Boolean paused property is now true. Either the ' + 'pause() method was called or the autoplay attribute was toggled.'); }; Specification...
HTMLMediaElement: play event - Web APIs
Event handler property GlobalEventHandlers.onplay Specification HTML5 media Examples These examples add an event listener for the HTMLMediaElement's play event, then post a message when that event handler has reacted to the event firing. Using addEventListener(): const video = document.querySelector('video'); video.addEventListener('play', (event) => { console.log('The
Boolean paused property is now false. Either the ' + 'play() method was called or the autoplay attribute was toggled.'); }); Using the onplay event handler property: const video = document.querySelector('video'); video.onplay = (event) => { console.log('The
Boolean paused property is now false. Either the ' + 'play() method was called or the autoplay attribute was toggled.'); }; Specifications...
HTMLMediaElement: seeked event - Web APIs
Bubbles No Cancelable No Interface Event Target Element Default Action None Event handler property GlobalEventHandlers.onseeked Specification HTML5 media Examples These examples add an event listener for the HTMLMediaElement's seeked event, then post a message when that event handler has reacted to the event firing. ...
HTMLMediaElement: seeking event - Web APIs
Bubbles No Cancelable No Interface Event Target Element Default Action None Event handler property GlobalEventHandlers.onseeking Specification HTML5 media Examples These examples add an event listener for the HTMLMediaElement's seeking event, then post a message when that event handler has reacted to the event firing. ...
HTMLObjectElement.typeMustMatch - Web APIs
It indicates if the resource linked by it must match the MIME type given by HTMLObjectElement.type in order for this resource to be used. Syntax var mustMatch = obj.typeMustMatch; obj.typeMustMatch = mustMatch; Example HTML <object id="obj" data="move.swf" type="application/x-shockwave-flash" typemustmatch></object> JavaScript let obj = document.getElementById('obj'); console.log(obj.typeMustMatch); Specifications Specification Status Comment HTML5The definition of 'HTMLObjectElement' in that specification. ...
HTMLObjectElement.willValidate - Web APIs
The willValidate read-only property of the HTMLObjectElement interface returns a
Boolean that indicates whether the element is a candidate for constraint validation. Always false for HTMLObjectElement objects. Syntax var
Boolean = HTMLObjectElement.willValidate; Value A
Boolean. Specifications Specification Status Comment HTML Living StandardThe definition of 'willValidate' in that specification. Living Standard Initial definition. ...
HTMLOptGroupElement - Web APIs
" 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">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 spe...
HTMLElement.focus() - Web APIs
ets focus on the specified element, if it can be focused. The focused element is the element which will receive keyboard and similar events by default. Syntax element.focus(options); // Object parameter Parameters options Optional An optional object providing options to control aspects of the focusing process. This object may contain the following property: preventScroll Optional A
Boolean value indicating whether or not the browser should scroll the document to bring the newly-focused element into view. A value of false for preventScroll (the default) means that the browser will scroll the element into view after focusing it. If preventScroll is set to true, no scrolling will occur. Examples Focus on a text field JavaScript focusMethod = function getFocus() { ...
HTMLOutputElement - Web APIs
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 holding the check result. HTMLOutputElement.reportValidity() This method reports the problems with the constraints on the element, if any, to the user.
HTMLSelectElement.autofocus - Web APIs
Only one form-associated element in a document can have this attribute specified. If there are several, the first element with the attribute set inserted, usually the first such element on the page, get the initial focus. Setting this property doesn't set the focus to the associated <select> element: it merely tells the browser to focus to it when the element is inserted in the document. Setting it after the insertion, that is most of the time after the document load, has no visible effect. ...
HTMLSlotElement.assignedElements() - Web APIs
atten option is set to true, it also returns the assigned elements of any other slots that are descendants of this slot. If no assigned nodes are found, it returns the slot's fallback content. Syntax var assignedElements = HTMLSlotElement.assignedElements(options) Parameters options Optional An object that sets options for the nodes to be returned. The available options are: flatten: A
Boolean indicating whether to return the assigned elements of any available child <slot> elements (true) or not (false). Defaults to false. Return value An array of elements. Examples let slots = this.shadowRoot.querySelector('slot'); let elements = slots.assignedElements({flatten: true}); Specifications Specification Status Comment HTML Living StandardThe definiti...
HTMLSlotElement.assignedNodes() - Web APIs
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. Syntax var assignedNodes = HTMLSlotElement.assignedNodes(options) Parameters options Optional An object that sets options for the nodes to be returned. The available options are: flatten: A
Boolean indicating whether to return the assigned nodes of any available child <slot> elements (true) or not (false). Defaults to false. Return value An array of nodes. Examples The following snippet is taken from our slotchange example (see it live also). let slots = this.shadowRoot.querySelectorAll('slot'); slots[1].addEventListener('slotchange', function(e) { let nodes = slots[1].assignedN...
HTMLStyleElement.scoped - Web APIs
The HTMLStyleElement.scoped property is a
Boolean value indicating if the element applies to the whole document (false) or only to the parent's sub-tree (true). By default it contains the value of the scoped content attribute. Syntax value = style.scoped; style.scoped = true; ...
HTMLStyleElement - Web APIs
iv> 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 if there is none HTMLStyleElement.scoped Is a
Boolean value indicating if the element applies to the whole document (false) or only to the parent's sub-tree (true). Methods No specific method; inherits pr...
HTMLTableCellElement - Web APIs
acters 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 HTMLTableCellElement.ch. This property was optional and was not very well supported. HTMLTableCellElement.height A DOMString containing a length of pixel of the hinted height of the cell. It reflects the obsolete height attribute. HTMLTableCellElement.noWrap A
Boolean value reflecting the nowrap attribute and indicating if cell content can be broken in several lines. HTMLTableCellElement.vAlign 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". Use the CSS vertical-align property i...
HTMLTrackElement - Web APIs
ement.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 default attribute, indicating that the track is to be enabled if the user's preferences do not indicate that another track would be more appropriate. HTMLTrackElement.readyState Read only Returns an unsigned short that show the readiness state of the track: Constant Value Description NONE 0 Indicates that the text track's cues have not ...
HTMLUListElement - Web APIs
e="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. Methods No specific method; inherits methods from its parent, HTMLElement. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLUListE...
HTMLVideoElement.msFrameStep() - Web APIs
ll not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The HTMLVideoElement.msFrameStep() method steps the video by one frame forward or one frame backward. This proprietary method is specific to Internet Explorer and Microsoft Edge. Syntax HTMLVideoElement.msFrameStep(forward); Parameters forward A
Boolean which if set to true steps the video forward by one frame, if false steps the video backwards by one frame. Return value This method does not return a value. See also HTMLMediaElement Microsoft API extensions ...
HTMLVideoElement.msHorizontalMirror - Web APIs
will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. msHorizontalMirror is a read/write property which gets or sets whether a video element is flipped horizontally in the display. This proprietary property is specific to Internet Explorer and Microsoft Edge. Syntax HTMLVideoElement.msHorizontalMirror:
boolean; Value
Boolean value set to true flips the video playback horizontally. Video perspective is flipped on a horizontal axis - this may be useful for playback of a webcam video, providing the user with better mirroring of their real behaviors (ie. when user moves left, their representation on-screen would move left as well). Example var myVideo = document.getElementById("videoTag1"); ...
HTMLVideoElement.msInsertVideoEffect() - Web APIs
e 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("video1"); oVideo1.msIns...
HTMLVideoElement.msIsLayoutOptimalForPlayback - Web APIs
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 elements in a Scal...
HTMLVideoElement.msIsStereo3D - Web APIs
msIsStereo3D is a read-only property which determines whether the system considers the loaded video source to be stereo 3-D or not. This proprietary property is specific to Internet Explorer and Microsoft Edge. Syntax HTMLVideoElement.msIsStereo3D:
boolean; Value
Boolean value set to true indicates that the video source is stereo 3D. This uses metadata set in MP4 or MPEG-2 file containers and H.264 Supplemental enhancement information (SEI) messages to determine the stereo capability of the source. ...
HTMLVideoElement.msZoom - Web APIs
user. There may also be large incompatibilities between implementations and the behavior may change in the future. msZoom is a read/write property which gets or sets whether the video frame is trimmed, on the top and bottom or left and right, to fit the video display. This proprietary property is specific to Internet Explorer and Microsoft Edge. Syntax HTMLVideoElement.msZoom; Value
Boolean value set to true trims the video frame to the display space. Set to false the video frame uses letter box or pillarbox to display video. If the native aspect ratio of a video frame, which is defined by the videoWidth and videoHeight attributes, does not match the aspect ratio of the Video tag, which is defined by the width and height attributes, the video is rendered with letterbox or pillarbox...
HTMLVideoElement - Web APIs
es that have been presented to the rendering pipeline for painting. HTMLVideoElement.mozPaintedFrames Read only Returns an unsigned long with the count of presented frames which were painted on the screen. HTMLVideoElement.mozFrameDelay Read only Returns an double with the time which the last painted video frame was late by, in seconds. HTMLVideoElement.mozHasAudio Read only Returns a
boolean indicating if there is some audio associated with the video. Microsoft Extensions HTMLVideoElement.msFrameStep() Steps the video by one frame forward or one frame backward. HTMLVideoElement.msHorizontalMirror Gets or sets whether a video element is flipped horizontally in the display. HTMLVideoElement.msInsertVideoEffect() Inserts the specified video effect into the media pipeline...
Headers - Web APIs
y exist. Headers.delete() Deletes a header from a Headers object. Headers.entries() Returns an iterator allowing to go through all key/value pairs contained in this object. Headers.forEach() Executes a provided function once for each array element. Headers.get() Returns a ByteString sequence of all the values of a header within a Headers object with a given name. Headers.has() Returns a
boolean stating whether a Headers object contains a certain header. Headers.keys() Returns an iterator allowing you to go through all keys of the key/value pairs contained in this object. Headers.set() Sets a new value for an existing header inside a Headers object, or adds the header if it does not already exist. Headers.values() Returns an iterator allowing you to go through all values of the key...
IDBFactory.cmp() - Web APIs
The cmp() method of the IDBFactory interface compares two values as keys to determine equality and ordering for IndexedDB operations, such as storing and iterating. Note: This feature is available in Web Workers. Note: Do not use this method for comparing arbitrary JavaScript values, because many JavaScript values are either not valid IndexedDB keys (
booleans and objects, for example) or are treated as equivalent IndexedDB keys (for example, since IndexedDB ignores arrays with non-numeric properties and treats them as empty arrays, so any non-numeric arrays are treated as equivalent). This throws an exception if either of the values is not a valid key. Syntax var result = indexedDB.cmp(first, second); Parameters first The first key to compare. second The second key to compare. R...
IDBFactorySync - Web APIs
s 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. IDBDatabaseSync open ( in DOMString name, in DOMStri...
IDBIndex.isAutoLocale - Web APIs
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. ...
IDBIndex.unique - Web APIs
This is decided when the index is created, using the IDBObjectStore.createIndex method. This method takes an optional parameter, unique, which if set to true means that the index will not be able to accept duplicate entries. Note: This feature is available in Web Workers. Syntax var isUnique = IDBIndex.unique; Value A
Boolean: Value Effect true The current index does not allow duplicate values for a key. false The current index allows duplicate key values. Example In the following example we open a transaction and an object store, then get the index lName from a simple contacts database. ...
IDBIndex - Web APIs
int to only one record in its referenced object store, but several indexes can reference the same object store. When the object store changes, all indexes that refers to the object store are automatically updated. You can grab a set of keys within a range. To learn more, see IDBKeyRange. Note: This feature is available in Web Workers. Properties IDBIndex.isAutoLocale Read only Returns a
Boolean indicating whether the index had a locale value of auto specified upon its creation (see createIndex()'s optionalParameters.) IDBIndex.locale Read only 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.) IDBIndex.name The name of this index. IDBIndex.objectStore Read only The name of th...
IDBIndexSync - Web APIs
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 exception is raised. any add( in any value, in optional any key ) raises (IDBDatabaseException); Parameters Returns Exceptions This method...
IDBKeyRange.includes() - Web APIs
Note: This feature is available in Web Workers. Syntax var isIncluded = myKeyRange.includes(key) Parameters key The key you want to check for in your key range. This can be any type. Return value A
Boolean. Exceptions This method may raise a DOMException of the following type: Attribute Description DataError The supplied key was not a valid key. ...
IDBKeyRange - Web APIs
s included in the key range. Methods Static methods IDBKeyRange.bound() Creates a new key range with upper and lower bounds. IDBKeyRange.only() Creates a new key range containing a single value. IDBKeyRange.lowerBound() Creates a new key range with only a lower bound. IDBKeyRange.upperBound() Creates a new upper-bound key range. Instance methods IDBKeyRange.includes() Returns a
boolean indicating whether a specified key is inside the key range. Examples The following example illustrates how you'd use a key range. Here we declare a keyRangeValue as a range between values of "A" and "F". We open a transaction (using IDBTransaction) and an object store, and open a Cursor with IDBObjectStore.openCursor, declaring keyRangeValue as its optional key range value. This means that the...
IDBObjectStore.autoIncrement - Web APIs
The autoIncrement read-only property of the IDBObjectStore interface returns the value of the auto increment flag for this object store. Note that every object store has its own separate auto increment counter. Note: This feature is available in Web Workers. Syntax var myAutoIncrement = objectStore.autoIncrement; Value A
Boolean: Value Meaning true The object store auto increments. false The object store does not auto increment. 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.autoIncrement to the console. For a full working example, see our To-do Notifications app (view example live.) ...
IDBTransactionSync - Web APIs
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 operations performed by this transaction. When this method is called, the browser ignores all the changes performed to the objects of this database since this transaction was created. void abort( ) raises (IDBDatabaseException); ...
IdleDeadline - Web APIs
). It offers a method, timeRemaining(), which lets you determine how much longer the user agent estimates it will remain idle and a property, didTimeout, which lets you determine if your callback is executing because its timeout duration expired. To learn more about how request callbacks work, see Collaborative Scheduling of Background Tasks. Properties IdleDeadline.didTimeout Read only A
Boolean whose value is true if the callback is being executed because the timeout specified when the idle callback was installed has expired. Methods IdleDeadline.timeRemaining() Returns a DOMHighResTimeStamp, which is a floating-point value providing an estimate of the number of milliseconds remaining in the current idle period. If the idle period is over, the value is 0. Your callback can call th...
ImageCapture.getPhotoSettings() - Web APIs
The flash setting of the capture device, one of "auto", "off", or "on". imageHeight: The desired image height as an integer. The user agent selects the closest width value to this setting if it only supports discrete heights. imageWidth: The desired image width as an integer. The user agent selects the closest width value to this setting if it only supports discrete widths. redEyeReduction: A
boolean indicating whether the red-eye reduction should be used if it is available. Example The following example, extracted from Chrome's Image Capture / Photo Resolution Sample, uses the results from getPhotoSettings() to modify the size of an input range. This example also shows how the ImageCapture object is created using a MediaStreamTrack retrieved from a device's MediaStream. const input = doc...
ImageCapture.takePhoto() - Web APIs
ash setting of the capture device, one of "auto", "off", or "flash". imageHeight: The desired image height as an integer. The user agent selects the closest height value to this setting if it only supports discrete heights. imageWidth: The desired image width as an integer. The user agent selects the closest width value to this setting if it only supports discrete widths. redEyeReduction: A
boolean indicating whether the red-eye reduction should be used if it is available. Return value A Promise that resolves with a Blob. Example This example is extracted from this Simple Image Capture demo. It shows how to use the Promise returned by takePhoto() to copy the returned Blob to an <img> element. For simplicy it does not show how to instantiate the ImageCapture object. var takePhotoBu...
Basic concepts - Web APIs
where the browser should extract the key from in the object store or index. A valid key path can include one of the following: an empty string, a JavaScript identifier, or multiple JavaScript identifiers separated by periods or an array containing any of those. It cannot include spaces. value Each record has a value, which could include anything that can be expressed in JavaScript, including
boolean, number, string, date, object, array, regexp, undefined, and null. When an object or array is stored, the properties and values in that object or array can also be anything that is a valid value. Blobs and files can be stored, cf. specification . Range and scope scope The set of object stores and indexes to which a transaction applies. The scopes of read-only transactions can overlap ...
InputDeviceCapabilities - Web APIs
ut the physical device responsible for generating a touch event. Syntax var inputDeviceCapabilities = new InputDeviceCapabilities([InputDeviceCapabilitiesInit]) Returns An instance of the InputDeviceCapabilities interface. Parameters InputDeviceCapabilitiesInit Optional A dictionary object containing a set of device capabilities. It contains the following property. fireTouchEvents: A
Boolean that indicates whether the device dispatches touch events. Specifications Specification Status Comment InputDeviceCapabilities Draft Initial definition. ...
InputDeviceCapabilities - Web APIs
ities represents the capabilities of logical devices rather than physical devices. This allows, for example, touchscreen keyboards and physical keyboards to be represented the same way when they produce the same input. Constructors InputDeviceCapabilities.InputDeviceCapabilities() Creates an InputDeviceCapabilities object. Properties InputDeviceCapabilities.firesTouchEventsRead only A
Boolean that indicates whether the device dispatches touch events. Methods None. Specifications Specification Status Comment InputDeviceCapabilitiesThe definition of 'sourceCapabilities' in that specification. Draft Initial definition. ...
InputEvent() - Web APIs
xample, 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). dataTransfer: (Optional) A DataTransfer object containing information about richtext or plaintext data being added to or removed from editible content. isComposing: (Optional) A
boolean indicating that the event is part of a composition session, meaning it is after a compositionstart event but before a compositionend event. The default is false. ranges: (Optional) An array of static ranges that will be affected by a change to the DOM if the input event is not canceled. The InputEventInit dictionary also accepts fields from UIEventInit and from EventInit dictionaries. ...
InputEvent.isComposing - Web APIs
The InputEvent.isComposing read-only property returns a
Boolean value indicating if the event is fired after compositionstart and before compositionend. Syntax var bool = event.isComposing; Example var inputEvent = new InputEvent('syntheticInput', false); console.log(inputEvent.isComposing); // return false Specifications Specification Status Comment Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'InputEvent.isComposing' in that specification. Obsolete Initial definition. ...
InputEvent - Web APIs
ansferRead 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 as, for example, inserting, deleting, or formatting text. See the property page for a complete list of input types. InputEvent.isComposingRead only Returns a
Boolean value indicating if the event is fired after compositionstart and before compositionend. Methods This interface inherits methods from its parents, UIEvent and Event. InputEvent.getTargetRanges() Returns an array of static ranges that will be affected by a change to the DOM if the input event is not canceled. Specifications Specification Status Comment Input E...
enabled - Web APIs
The method reflects the value of the Software Installation preference in the user interface, and of the xpinstall.enabled preference in pref.js. ...
installChrome - Web APIs
name ) Parameters The installChrome method has the following parameters: TYPE TYPE can be InstallTrigger.SKIN or InstallTrigger.LOCALE. url url is a string containing a full or relative URL to download name name is displayed in the dialog, but is also used to *select* the theme somust match exactly the name in the internal manifest.rdf file. Returns A
boolean value indicating False if the software install feature has been turned off, and True if it's on. Note that this return value does not indicate anything about the success of the installation. Description installChrome is a special method for installing new chrome in Netscape 6 and Mozilla. The method performs a simplified installation of language packs or Netscape 6/Mozilla skins, and saves you th...
startSoftwareUpdate - Web APIs
Returns True. Description The startSoftwareUpdate method triggers a software download and install from the specified URL. This method has been largely superseded by newer install method, which is more flexible and allows you to install more than one XPI. ...
IntersectionObserverEntry.isIntersecting - Web APIs
The IntersectionObserverEntry interface's read-only isIntersecting property is a
Boolean value which is true if the target element intersects with the intersection observer's root. If this is true, then, the IntersectionObserverEntry describes a transition into a state of intersection; if it's false, then you know the transition is from intersecting to not-intersecting. Syntax var isIntersecting = IntersectionObserverEntry.isIntersecting; Value A
Boolean value which indicates whether the target element has transitioned into a state of intersection (true) or out of a state of intersection (false). Example In this simple example, an intersection callback is used to update a counter of how many targeted elements are currently intersecting with the intersection root. function intersectionCal...
IntersectionObserverEntry - Web APIs
The bounds are computed as described in the documentation for Element.getBoundingClientRect(). IntersectionObserverEntry.intersectionRatio Read only Returns the ratio of the intersectionRect to the boundingClientRect. IntersectionObserverEntry.intersectionRect Read only Returns a DOMRectReadOnly representing the target's visible area. IntersectionObserverEntry.isIntersecting Read only A
Boolean value which is true if the target element intersects with the intersection observer's root. If this is true, then, the IntersectionObserverEntry describes a transition into a state of intersection; if it's false, then you know the transition is from intersecting to not-intersecting. IntersectionObserverEntry.rootBounds Read only Returns a DOMRectReadOnly for the intersection observer's root. ...
Intersection Observer API - Web APIs
e root element, whether or not the element is considered to be intersecting or not, and the direction in which the transition occurred. The code snippet below shows a callback which keeps a counter of how many times elements transition from not intersecting the root to intersecting by at least 75%. For a threshold value of 0.0 (default) the callback is called approximately upon transition of the
boolean value of isIntersecting. The snippet thus first checks that the transition is a positive one, then determines whether intersectionRatio is above 75%, in which case it increments the counter. intersectionCallback(entries) => { entries.forEach(entry => { if (entry.isIntersecting) { let elem = entry.target; if (entry.intersectionRatio >= 0.75) { intersectionCounter++; ...
KeyboardEvent.altKey - Web APIs
The KeyboardEvent.altKey read-only property is a
Boolean that indicates if the alt key (Option or ? on OS X) was pressed (true) or not (false) when the event occured. Syntax var altKeyPressed = instanceOfKeyboardEvent.altKey Return value
Boolean Examples <html> <head> <title>altKey example</title> <script type="text/javascript"> function showChar(e){ alert( "Key KeyDown: " + String.fromCharCode(e.charCode) + "\n" + "charCode: " + e.charCode + "\n" + "ALT key KeyDown: " + e.altKey + "\n" ); } </script> </head> <body onkeydown="showChar(event);"> <p> Press any character key, with or without holding down the ALT key.<br /> You can also use the SHIFT key together with the ALT key. </p> </body> </html> Specifications Specification Status Comment Do...
KeyboardEvent.isComposing - Web APIs
after compositionstart and before compositionend. Syntax var bool = event.isComposing; Example var kbdEvent = new KeyboardEvent("syntheticKey", false); console.log(kbdEvent.isComposing); // return false Specifications Specification Status Comment UI EventsThe definition of 'KeyboardEvent.prototype.isComposing' in that specification. ...
KeyboardEvent.repeat - Web APIs
The repeat read-only property of the KeyboardEvent interface returns a
Boolean that is true if the given key is being held down such that it is automatically repeating. Syntax var repeat = event.repeat; Return value
Boolean Specifications Specification Status Comment Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'KeyboardEvent.repeat' in that specification. Obsolete Initial definition. ...
KeyboardLayoutMap - Web APIs
p.values Read only Returns a new Array Iterator object that contains the values for each index in the KeyboardLayoutMap object. Methods KeyboardLayoutMap.forEach() Read only Executes a provided function once for each element of KeyboardLayoutMap. KeyboardLayoutMap.get() Returns the element with the given key from the KeyboardLayoutMap object. KeyboardLayoutMap.has() Returns a
boolean indicating whether the KeyboardLayoutMap object has an element with the specified key. Examples The following example demonstrates how to get the location- or layout-specific string associated with the key that corresponds to the 'W' key on an English QWERTY keyboard. var keyboard = navigator.keyboard; keyboard.getLayoutMap() .then(keyboardLayoutMap => { var upKey = keyboardLayoutMap.get('K...
LockedFile.active - Web APIs
hange in the future. The active property allows to know if the LockedFile object is still usable (true) or not (false). If the object is inactive then it is impossible to perform any read or write operation with it. Typically, a LockedFile object becomes inactive when the LockedFile.abort() method is called or if an error occurs. Syntax var state = instanceOfLockedFile.active Value A
Boolean. Specifications Specification Status Comment FileSystem API Editor's Draft Draft Proposal. ...
LockedFile.getMetadata() - Web APIs
he Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. Summary The getMetadata method allows to retrieve some metadata about the locked file. Syntax var request = instanceOfLockedFile.getMetadata(param); Parameters param Optional An object used to request specific metadata. Each key is a
boolean where true means the metadata is expected and where false means it is not expected. Note that if the key is undefined, it is considered as if it were true. The following metadata are supported: size : will provide the size of the file lastModified : will provide the date when the file was last modified Return A FileRequest object. In case of success, the request's result is an object with...
MIDIAccess - Web APIs
vides methods for listing MIDI input and output devices, and obtaining access to those devices. Properties MIDIAccess.inputs Read only Returns an instance of MIDIInputMap which provides access to any available MIDI input ports. MIDIAccess.outputs Read only Returns an instance of MIDIOutputMap which provides access to any available MIDI output ports. MIDIAccess.sysexEnabled Read only A
boolean attribute indicating whether system exclusive support is enabled on the current MIDIAccess instance. Event Handlers MIDIAccess.onstatechange Called whenever a new MIDI port is added or an existing port changes state. Examples navigator.requestMIDIAccess() .then(function(access) { // Get lists of available MIDI controllers const inputs = access.inputs.values(); const out...
MediaCapabilitiesInfo - Web APIs
Capabilities API is made available when the promise returned by the MediaCapabilities.encodingInfo() or MediaCapabilities.decodingInfo() methods of the MediaCapabilities interface fulfills, providing information as to whether the media type is supported, and whether encoding or decoding such media would be smooth and power efficient. Properties The MediaCapabilitiesInfo interface contains three
Boolean attribues: supported: Given the properties defined in the MediaConfiguration, can the specified piece of media content be encoded (if MediaEncodingConfiguration is set) or decode (if MediaDecodingConfiguration is set) at all? If yes, supported is true. Otherwise, it is false. smooth: Given the properties defined in the MediaConfiguration, will the playback of the specified piece of media be h...
MediaDevices.getSupportedConstraints() - Web APIs
y one of the constrainable properties the user agent understands. Syntax var supportedConstraints = navigator.mediaDevices.getSupportedConstraints(); Parameters None. Return value A new object based on the MediaTrackSupportedConstraints dictionary listing the constraints supported by the user agent. Because only constraints supported by the user agent are included in the list, each of these
Boolean properties has the value true. Example This example outputs a list of the constraints supported by your browser. HTML <p>The following media constraints are supported by your browser:</p> <ul id="constraintList"> </ul> CSS body { font: 15px Arial, sans-serif; } JavaScript let constraintList = document.getElementById("constraintList"); let supportedConstraints = navigator.mediaDevices...
load() - Web APIs
The MediaKeySession.load() method returns a Promise that resolves to a
boolean value after loading data for a specified session object. Syntax mediaKeySession.load(sessionId).then(function(
booleanValue) { ... }); Parameter sessionId A unique string generated by the content decription module for the current media object and its associated keys or licenses. Return value A Promise that resolves to a
boolean indicating whether the load succeeded or failed. Specifications Specification Status Comment Encrypted Media ExtensionsThe definition of 'load()' in that specification. Recommendation Initial definition ...
remove() - Web APIs
The MediaKeySession.remove() method returns a Promise after removing any session data associated with the current object. Return value A Promise that resolves to a
boolean indicating whether the load succeeded or failed. Specifications Specification Status Comment Encrypted Media ExtensionsThe definition of 'remove()' in that specification. Recommendation Initial definition ...
MediaKeySession - Web APIs
e session. Methods MediaKeySession.close() Returns a Promise after notifying the current media session is no longer needed and that the CDM should release any resources associated with this object and close it. MediaKeySession.generateRequest() Returns a Promise after generating a media request based on initialization data. MediaKeySession.load() Returns a Promise that resolves to a
boolean value after loading data for a specified session object. MediaKeySession.remove() Returns a Promise after removing any session data associated with the current object. MediaKeySession.update() Returns a Promise after loading messages and licenses to the CDM. Examples // TBD Specifications Specification Status Comment Encrypted Media ExtensionsThe definition of 'M...
MediaKeyStatusMap.has() - Web APIs
Specifications Specification Status Comment Encrypted Media Extensions 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. ...
MediaKeyStatusMap - Web APIs
e status map, in insertion order. MediaKeyStatusMap.forEach(callback[, argument]) Read only Calls callback once for each key-value pair in the status map, in insertion order. If argument is present it will be passed to the callback. MediaKeyStatusMap.get() Read only Returns the value associated with the given key, or undefined if there is none. MediaKeyStatusMap.has() Read only Returns a
boolean asserting whether a value has been associated with the given key. MediaKeyStatusMap.keys() Read only Returns a new Iterator object containing keys for each element in the status map, in insertion order. MediaKeyStatusMap.values() Read only Returns a new Iterator object containing values for each element in the status map, in insertion order. MediaKeyStatusMap.[@@iterator]() Read only Ret...
MediaQueryList.matches - Web APIs
The matches read-only property of the MediaQueryList interface is a
Boolean that returns true if the document currently matches the media query list, or false if not. You can be notified when the value of matches changes by watching for the change event to be fired at the MediaQueryList. Syntax var matches = <varm>MediaQueryList.matches; Value A
Boolean which is true if the document currently matches the media query list; otherwise, it's false. Examples This example detects viewport orientation changes by creating a media query using the orientation media feature: function addMQListener(mq, callback) { if (mq.addEventListener) { mq.addEventListener("change", callback); } else { mq.addListener(callback); } } addMQListener(window.matchMedia("(orientation:landscape)"), even...
MediaQueryList - Web APIs
ue). This is very useful for adaptive design, since this makes it possible to observe a document to detect when its media 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 ...
MediaQueryListEvent.MediaQueryListEvent() - Web APIs
The MediaQueryListEvent constructor creates a new MediaQueryListEvent instance. Syntax var myMqlEvent = new MediaQueryListEvent(init); Parameters init An init object that defines features of the new object instance. The available properties are: media: A DOMString representing a serialized media query. matches: A
Boolean representing the media query status -- true if it matches, false if not. Examples var media = '(max-width: 600px)'; var matches = true; var myMediaQueryListEvent = new MediaQueryListEvent({media, matches}); Specifications Specification Status Comment CSS Object Model (CSSOM) View ModuleThe definition of 'MediaQueryListEvent()' in that specification. Working Draft Initial definition ...
MediaQueryListEvent.matches - Web APIs
The matches read-only property of the MediaQueryListEvent interface is a
Boolean that returns true if the document currently matches the media query list, or false if not. Syntax var matches = MediaQueryListEvent.matches; Value A
Boolean; returns true if the document currently matches the media query list, false if not. 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'; } } m...
MediaQueryListEvent - Web APIs
ediaQueryList object -- instances are available as the event object on a function referenced by a MediaQueryList.onchange property or MediaQueryList.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 v...
MediaRecorder.isTypeSupported - Web APIs
Syntax var canRecord = MediaRecorder.isTypeSupported(mimeType) Parameters mimeType The MIME media type to check. Return value true if the MediaRecorder implementation is capable of recording Blob objects for the specified MIME type. Recording may still fail if there are insufficient resources to support the recording and encoding process. If the value is false, the user agent is incapable of recording the specified format. ...
MediaRecorder - Web APIs
is is specified, the media will be captured in separate chunks of that duration, rather than the default behavior of recording the media in a single large chunk. MediaRecorder.stop() Stops recording, at which point a dataavailable event containing the final Blob of saved data is fired. No more recording occurs. Static methods MediaRecorder.isTypeSupported() A static method which returns a
Boolean value indicating if the given MIME media type is supported by the current user agent. Event handlers MediaRecorder.ondataavailable Called to handle the dataavailable event, which is periodically triggered each time timeslice milliseconds of media have been recorded (or when the entire media has been recorded, if timeslice wasn't specified). The event, of type BlobEvent, contains the record...
MediaSessionActionDetails - Web APIs
es the type of action which needs to be performed as well as the data needed to perform the action. Properties action A Media Session action type string taken from the MediaSessionAction enumerated type, indicating which type of action needs to be performed. See Media action types below for possible values. fastSeek Optional An seekto action may optionally include this property, which is a
Boolean value indicating whether or not to perform a "fast" seek. A "fast" seek is a seek being performed in a rapid sequence, such as when fast-forwarding or reversing through the media, rapidly skipping through it. This property can be used to indicate that you should use the shortest possible method to seek the media. fastSeek is not included on the final action in the seek sequence in this situation.
MediaSource.isTypeSupported() - Web APIs
The MediaSource.isTypeSupported() static method returns a
Boolean value which is true if the given MIME type is likely to be supported by the current user agent. That is, if it can successfully create SourceBuffer objects for that MIME type. If the returned value is false, then the user agent is certain that it cannot access media of the specified format. Syntax var isItSupported = mediaSource.isTypeSupported(mimeType); Parameters mimeType The MIME media type that you want to test support for in the current browser. This may include the codecs parameter to provide added details about the codecs used within the file. Return value A
Boolean which is true if the browser feels that it can probably play media of the specified type. This is not a guarantee, however, and your code must be pre...
MediaSource - Web APIs
s a seekable range previously set with a call to setLiveSeekableRange(). MediaSource.endOfStream() Signals the end of the stream. MediaSource.removeSourceBuffer() Removes the given SourceBuffer from the MediaSource.sourceBuffers list. MediaSource.setLiveSeekableRange() Sets the range that the user can seek to in the media element. Static methods MediaSource.isTypeSupported() Returns a
Boolean value indicating if the given MIME type is supported by the current user agent -- this is, if it can successfully create SourceBuffer objects for that MIME type. Examples The following simple example loads a video with XMLHttpRequest, playing it as soon as it can. This example was written by Nick Desaulniers and can be viewed live here (you can also download the source for further investigatio...
MediaStream - Web APIs
sCaptureMediaStream. Constructor MediaStream() Creates and returns a new MediaStream object. You can create an empty stream, a stream which is based upon an existing stream, or a stream that contains a specified list of tracks (specified as an array of MediaStreamTrack objects). Properties This interface inherits properties from its parent, EventTarget. MediaStream.active Read only A
Boolean value that returns 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. MediaStrea...
MediaStreamTrack.enabled - Web APIs
This can be used to intentionally mute a track. When enabled, a track's data is output from the source to the destination; otherwise, empty frames are output. In the case of audio, a disabled track generates frames of silence (that is, frames in which every sample's value is 0). For video tracks, every frame is filled entirely with black pixels. ...
MediaStreamTrack.remote - Web APIs
The MediaStreamTrack.remote read-only property allows Javascript to know whether a WebRTC MediaStreamTrack is from a remote source or a local one. It returns a
Boolean with a value of true if the track is sourced remotely (that is, sourced by an RTCPeerConnection), or false if it is sourced locally. Syntax var bool = track.remote; ...
Recording a media element - Web APIs
ncatenates arrays of objects into one object. Then URL.createObjectURL() is used to create an URL that references the blob; this is then made the value of the recorded video playback element's src attribute (so that you can play the video from the blob) as well as the target of the download button's link. Then the download button's download attribute is set. While the download attribute can be a
Boolean, you can also set it to a string to use as the name for the downloaded file. So by setting the download link's download attribute to "RecordedVideo.webm", we tell the browser that clicking the button should download a file named "RecordedVideo.webm" whose contents are the recorded video. Lines 17-18 The size and type of the recorded media are output to the log area below the two videos and th...
MediaTrackConstraints.logicalSurface - Web APIs
int is supported by checking the value of MediaTrackSupportedConstraints.logicalSurface 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 = { logicalSurface: constraint }; constraintsObject.logicalSurface = constraint; Value A Constrain
Boolean which is true if logical surfaces should be permitted among the selections available to the user. 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 getDisplayMedia() by calling getSettings() on the display media's...
MediaTrackSettings.logicalSurface - Web APIs
ndicates whether or not the display area being captured is a logical surface. Logical surfaces are those which are not necessarily entirely onscreen, or may even be off-screen, such as windows' backing buffers (where only part of the buffer is visible without scrolling the containing window) and offscreen rendering contexts. Syntax isLogicalSurface = mediaTrackSettings.logicalSurface; Value A
Boolean value which is true if the video track in the stream of captured video is taken from a logical display surface. The most common scenario in which a display surface may be a logical one is if the selected surface contains the entire content area of a window which is too large to display onscreen at once. Since the window that contains the surface has to be scrolled to show the rest of the content...
MediaTrackSupportedConstraints.aspectRatio - Web APIs
If the constraint isn't supported, it's not included in the list, so this value will never be false. You can access the supported constraints dictionary by calling navigator.mediaDevices.getSupportedConstraints(). Syntax aspectConstraintSupported = supportedConstraintsDictionary.aspectRatio; Value This property is present in the dictionary (and its value is always true) if the user agent supports the aspectRatio constraint. ...
MediaTrackSupportedConstraints.channelCount - Web APIs
If the constraint isn't supported, it's not included in the list, so this value will never be false. You can access the supported constraints dictionary by calling navigator.mediaDevices.getSupportedConstraints(). Syntax channelCountConstraintSupported = supportedConstraintsDictionary.channelCount; Value This property is present in the dictionary (and its value is always true) if the user agent supports the channelCount constraint. ...
MediaTrackSupportedConstraints.cursor - Web APIs
The MediaTrackSupportedConstraints dictionary's cursor property indicates whether or not the cursor constraint is supported by the user agent and the device on which the content is being used. The supported constraints list is obtained by calling navigator.mediaDevices.getSupportedConstraints(). Syntax isCursorSupported = supportedConstraints.cursor; Value A
Boolean value which is true if the cursor constraint is supported by the device and user agent. Example This method sets up the constraints object specifying the options for the call to getDisplayMedia(). It adds the cursor constraint only if it is known to be supported by the browser. Capturing is then started by calling getDisplayMedia() and attaching the returned stream to the video element referenced by the variable videoElem. a...
MediaTrackSupportedConstraints.deviceId - Web APIs
If the constraint isn't supported, it's not included in the list, so this value will never be false. You can access the supported constraints dictionary by calling navigator.mediaDevices.getSupportedConstraints(). Syntax deviceIdConstraintSupported = supportedConstraintsDictionary.deviceId; Value This property is present in the dictionary (and its value is always true) if the user agent supports the deviceId constraint. ...
msPlayToDisabled - Web APIs
ng 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. msPlayToDisabled is a read/write property which gets and sets if the PlayTo device is enabled or disabled. This proprietary property is specific to Internet Explorer and Microsoft Edge. Syntax ptr = object.msPlayToDisabled; Value
Boolean value set to true indicates that the PlayTo device is disabled. The msPlayToDisabled attribute extends the HTMLEmbedElement, HTMLImageElement, HTMLMediaElement, and HTMLObject interfaces. ...
msPlayToPrimary - Web APIs
ction 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. msPlayToPrimary is a read/write property which gets or sets the primary DLNA PlayTo device. This proprietary property is specific to Internet Explorer and Microsoft Edge. Syntax ptr = object.msPlayToPrimary; Value
Boolean value set to true indicates that the device is the primary DLNA PlayTo device, otherwise false. Example // Microsoft extensions interface HTMLImageElement : HTMLElement { attribute
boolean msPlayToDisabled; attribute
boolean msPlayToPrimary; attribute DOMString msPlayToPreferredSourceUri; }; See also HTMLMediaElemen...
msRealTime - Web APIs
Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. msRealTime is a read/write property which specifies whether or not to enable low-latency playback on the media element. This proprietary property is specific to Internet Explorer and Microsoft Edge. Syntax ptr = object.msRealTime; Value
Boolean value set to true indicates that low-latency playback will be enabled on the media element. Low-latency playback is useful in communication and some gaming scenarios, but is more demanding on power consumption and less reliable for smooth media playback. You must set the msRealTime before setting the src property in code. msRealTime should not be used in non-real-time or non-communication scena...
MutationObserverInit.characterData - Web APIs
xt node, including nodes based on the Text, ProcessingInstruction, and Comment interfaces. Note that this doesn't monitor content of an HTMLElement, even if it only contains text inside, as it only monitors text nodes themselves. So either pass directly a text node to the observe() method or you need to also set subtree: true. Syntax var options = { characterData: true | false } Value A
Boolean value indicating whether or not to call the observer's callback function when textual nodes' values change. If true, the callback specified when observe() was used to start observing the node or subtree is called any time the contents of a text node are changed. You can expand the capabilities of attribute mutation monitoring using other options: characterDataOldValue lets you specify whethe...
MutationObserverInit.characterDataOldValue - Web APIs
racterData property to true but don't set characterDataOldValue to true as well, the MutationRecord will not include information describing the prior state of the text node's contents. Character data changes are detectable on any text node, including nodes based on the Text, ProcessingInstruction, and Comment interfaces. Syntax var options = { characterDataOldValue: true | false } Value A
Boolean value indicating whether or not to set the MutationRecord's oldValue property to be a string containing the value of the character node's contents prior to the change represented by the mutation record. By default, only changes to the text of the node specified as the target parameter when you called observe() are monitored. To watch for changes to the text contents of all descendants of target,...
MutationObserverInit.childList - Web APIs
not to monitor the specified node or nodes for the addition or removal of new child nodes. If childList is false (the default), adding or removing new nodes does not trigger mutation callbacks. By setting childList to true, your callback will be invoked any time nodes are added to or removed from the DOM node or nodes being watched. Syntax var options = { childList: true | false } Value A
Boolean value indicating whether or not to invoke the callback function when new nodes are added to or removed from the section of the DOM being monitored.. If subtree is false, only the node indicated by the observer's target node is monitored for changes. Setting subtree to true causes addition or removal of nodes anywhere within the subtree rooted at target to be reported. Example Specifications ...
MutationObserverInit.subtree - Web APIs
be set to true to monitor the targeted node and all of its descendants. The default value, false, indicates only the target node itself is to be monitored for changes. subtree can be used in concert with the other options to extend monitoring of attributes, text content, and child lists to the entire subtree rooted at the target node. Syntax var options = { subtree: true | false } Value A
Boolean value. The default, false, indicates that only the target node specified when calling MutationObserver.observe() is to be monitored for changes. Changing this value to true causes the entire subtree rooted at the specified target node to be monitored for the changes indicated by the other options. For example, to watch the target node only for attribute changes, the MutationObserverInit passed i...
NDEFWriter.write() - Web APIs
The write() method of NDEFWriter interface writes a specified message to a compatiable NFC tag. Syntax var sessionPromise = NDEFWriter.write(message, options); Parameters message The message to be written, either DOMString or BufferSource or NDEFMessageInit. 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. signal -- optional AbortSignal that allows to cancell this write operation. Return value A Promise that resolves with undefined when and if the message transfer is successfully completed. Exceptions This method doesn't throw true exceptions; instead, it rej...
NameList - Web APIs
re was no way to actually create one. NameList has been removed, effective with Gecko 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.canShare() - Web APIs
The Navigator.canShare() method of the Web Share API returns true if a call to Navigator.share() would succeed. Syntax var canShare = navigator.canShare(data); Parameters data Optional An object containing data to share that matches what you would pass to Navigator.share(). Return value A
Boolean. True if data can be shared with Navigator.share(). Exceptions None. Examples if(navigator.canShare(data)) { // We can use share() to share the data! Woop! } Specifications Specification Status Comment Web Share API - Level 2The definition of 'canShare' in that specification. Draft Initial definition. ...
Navigator.cookieEnabled - Web APIs
Note: When the browser is configured to block third-party cookies, and navigator.cookieEnabled is invoked inside a third-party iframe, it returns true in Safari, Edge Spartan and IE (while trying to set a cookie in such scenario would fail). It returns false in Firefox and Chromium-based browsers. Note: Web browsers may prevent writing certain cookies in certain scenarios. For example, Chrome 80+ does not allow creating cookies with SameSite=None attribute, unless they are created over HTTPS and with Secure attribute. ...
navigator.hardwareConcurrency - Web APIs
to report a lower number of logical cores in order to represent more accurately the number of Workers that can run at once, so don't treat this as an absolute measurement of the number of cores in the user's system. Examples In this example, one Worker is created for each logical processor reported by the browser and a record is created which includes a reference to the new worker as well as a
Boolean value indicating whether or not we're using that worker yet; these objects are, in turn, stored into an array for later use. This creates a pool of workers we can use to process requests later. let workerList = []; for (let i = 0; i < window.navigator.hardwareConcurrency; i++) { let newWorker = { worker: new Worker('cpuworker.js'), inUse: false }; workerList.push(newWorker); } Sp...
NavigatorOnLine - Web APIs
The NavigatorOnLine interface contains methods and properties related to the connectivity status of the browser. There is no object of type NavigatorOnLine, but other interfaces, like Navigator or WorkerNavigator, implement it. Properties The NavigatorOnLine interface doesn't inherit any property. NavigatorOnLine.onLine Read only Returns a
Boolean indicating whether the browser is working online. Methods The NavigatorOnLine interface neither implements, nor inherit any method. Specifications Specification Status HTML Living StandardThe definition of 'NavigatorOnLine' in that specification. Living Standard ...
NavigatorPlugins - Web APIs
plugins installed into the browser. Properties NavigatorPlugins.mimeTypes Read only Returns an MimeTypeArray listing the MIME types supported by the browser. NavigatorPlugins.plugins Read only Returns a PluginArray listing the plugins installed in the browser. Methods The NavigatorPlugins interface doesn't inherit any methods. NavigatorPlugins.javaEnabled() Read only Returns a
Boolean flag indicating whether the host browser is Java-enabled or not. Specifications Specification Status Comment HTML Living StandardThe definition of 'NavigatorPlugins' in that specification. Living Standard Initial definition. ...
Node.contains() - Web APIs
the node itself, one of its direct children (childNodes), one of the children's direct children, and so on. Syntax node.contains( otherNode ) Example This function checks to see if an element is in the page's body. As contains is inclusive and determining if the body contains itself isn't the intention of isInPage this case explicitly returns false. function isInPage(node) { return (node === document.body) ? false : document.body.contains(node); } Specifications Specification Status Comment DOMThe definition of 'Node.contains()' in that specification. ...
Node.getRootNode() - Web APIs
The getRootNode() method of the Node interface returns the context object's root, which optionally includes the shadow root if it is available. Syntax var root = node.getRootNode(options); Parameters options Optional An object that sets options for getting the root node. The available options are: composed: A
Boolean that indicates whether the shadow root should be returned (false, the default), or a root node beyond shadow root (true). Returns An object inheriting from Node. This will differ in exact form depending on where you called getRootNode(); for example: Calling it on an element inside a standard web page will return an HTMLDocument object representing the entire page. Calling it on an element inside a shadow DOM will return the associated ShadowRoot. Examples T...
Node.hasChildNodes() - Web APIs
The Node.hasChildNodes() method returns a
Boolean value indicating whether the given Node has child nodes or not. Syntax bool = node.hasChildNodes(); Return value A
Boolean that is true if the node has child nodes, and false otherwise. Example let foo = document.getElementById('foo'); if (foo.hasChildNodes()) { // Do something with 'foo.childNodes' } Polyfill Here is one possible polyfill: ;(function(prototype) { prototype.hasChildNodes = prototype.hasChildNodes || function() { return !!this.firstChild; } })(Node.prototype); There are various ways to determine whether the node has a child node: node.hasChildNodes() node.firstChild != null (or just node.firstChild) node.childNodes && node.childNodes.length (or node.childNodes.length > 0) Specifications Spec...
Node.isDefaultNamespace() - Web APIs
The Node.isDefaultNamespace() method accepts a namespace URI as an argument and returns a
Boolean with a value of true if the namespace is the default namespace on the given node or false if not. Syntax result = node.isDefaultNamespace(namespaceURI); Parameters namespaceURI is a string representing the namespace against which the element will be checked. Return value result is a
Boolean that holds the return value true or false. Example var XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var el = document.getElementsByTagNameNS(XULNS, 'textbox')[0]; alert(el.isDefaultNamespace(XULNS)); // true Specifications Specification Status Comment DOMThe definition of 'Node: isDefaultNamespace' in that specification. Living Standard ...
Node.isSupported() - Web APIs
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. ...
NodeIterator.expandEntityReferences - Web APIs
If this value is false, the children of entity reference nodes (as well as all of their descendants) are rejected. This takes precedence over the value of the NodeIterator.whatToShow method and the associated filter. ...
NodeIterator.pointerBeforeReferenceNode - Web APIs
The NodeIterator.pointerBeforeReferenceNode read-only property returns a
Boolean flag that indicates whether the NodeFilter is anchored before (if this value is true) or after (if this value is false) the anchor node indicated by the NodeIterator.referenceNode property. Syntax flag = nodeIterator.pointerBeforeReferenceNode; Example var nodeIterator = document.createNodeIterator( document.body, NodeFilter.SHOW_ELEMENT, { acceptNode: function(node) { return NodeFilter.FILTER_ACCEPT; } }, false ); flag = nodeIterator.pointerBeforeReferenceNode; Specifications Specification Status Comment DOMThe definition of 'NodeIterator.pointerBeforeReferenceNode' in that specification. Living Standard Initial definition. ...
Notification.requireInteraction - Web APIs
Note: This feature is available in Web Workers. The requireInteraction read-only property of the Notification interface returns a
Boolean indicating that a notification should remain active until the user clicks or dismisses it, rather than closing automatically. Note: This can be set when the notification is first created by setting the requireInteraction option to true in the options object of the Notification.Notification() constructor. Syntax function spawnNotification(theTitle,theBody,shouldRequireInteraction) { var options = { body: theBody, requireInteraction: shouldRequireInteraction } var n = new Notification(theTitle,options); } Value A
Boolean. Specifications Specification Status Comment Notifications APIThe definition of 're...
Notification.silent - Web APIs
Note: This feature is available in Web Workers. The silent read-only property of the Notification interface specifies whether the notification should be silent, i.e., no sounds or vibrations should be issued, regardless of the device settings. This is specified in the silent option of the Notification() constructor. Syntax var silent = Notification.silent; Value A
Boolean. false is the default; true makes the notification silent. Examples The following snippet is intended to fire a silent notification; a simple options object is created, and then the notification is fired using the Notification() constructor. var options = { body: 'Do you like my body?', silent: true } var n = new Notification('Test notification', options); console.log(n.silent) // should log true Specifi...
Notification - Web APIs
on of the notification as specified in the constructor's options parameter. Notification.image Read only The URL of an image to be displayed as part of the notification, as specified in the constructor's options parameter. Notification.renotify Read only Specifies whether the user should be notified after a new notification replaces an old one. Notification.requireInteraction Read only A
Boolean indicating that a notification should remain active until the user clicks or dismisses it, rather than closing automatically. Notification.silent Read only Specifies whether the notification should be silent -- i.e., no sounds or vibrations should be issued, regardless of the device settings. Notification.timestamp Read only Specifies the time at which a notification is created or applicabl...
PageTransitionEvent.persisted - Web APIs
The persisted read-only property indicates if a webpage is loading from a cache. Syntax window.addEventListener('pageshow', function(event) { if (event.persisted) { console.log('Page was loaded from cache.'); } }); Value A
Boolean. Specifications Specification Status Comment HTML Living StandardThe definition of 'PageTransitionEvent: persisted' in that specification. Living Standard Initial definition ...
PaymentItem - Web APIs
e being purchased or a tax or other charge. Properties amount Secure context A PaymentCurrencyAmount object describing the monetary value of the item. label Secure context A string specifying a human-readable name or description of the item or service being charged for. This may be displayed to the user by the user agent, depending on the design of the interface. pending Secure context A
Boolean value which is true if the specified amount has not yet been finalized. This can be used to show items such as shipping or tax amounts that depend upon the selection of shipping address, shipping option, or so forth. The user agent may show this information but is not required to do so. Specifications Specification Status Comment Payment Request APIThe definition of 'Pa...
PaymentRequest.canMakePayment() - Web APIs
using Payment Request API, and if it won't, you could fall back to another payment method, or offer a list of methods that aren't handled by Payment Request API (or even provide instructions for paying by mail or by phone). Syntax paymentRequest.canMakePayment() .then( canPay => { ... }) .catch( error => { ... }) canPay = await paymentRequest.canMakePayment(); Returns A Promise to a
Boolean that resolves to true if the user agent supports any of the payment methods supplied when instantiating the request using the PaymentRequest constructor. If the payment can't be processed, the promise receives a value of false. Note: If you call this too often, the browser may reject the returned promise with a DOMException. Parameters None Examples In the following example, is excerpted f...
Using the Payment Request API - Web APIs
eps, like updating the user interface to tell the user the transaction is complete, etc. Other useful payment request methods There are some other useful payment request methods worth knowing about. PaymentRequest.canMakePayment() can be used to check whether the PaymentRequest object is capable of making a payment before you start the payment process. ...
PerformanceObserver.observe() - Web APIs
ions 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 with the "type" option. See PerformanceEntry.entryType for a list of valid performance entry type names. Unrecognized types are ignored, though the browser may output a warning message to the console to help developers debug their code. If no valid types are found, observe() has no effect...
Using the Permissions API - Web APIs
e); } handlePermission(); Permission descriptors The Permissions.query() method takes a PermissionDescriptor dictionary as a parameter -- this contains the name of the API you are interested in. Some APIs have more complex PermissionDescriptors containing additional information, which inherit from the default PermissionDescriptor. For example, the PushPermissionDescriptor should also contain a
Boolean that specifies if userVisibleOnly is true or false. Revoking permissions Starting in Firefox 47, you can now revoke existing permissions, using the Permissions.revoke() method. This works in exactly the same way as the Permissions.query() method, except that it causes an existing permission to be reverted back to its default state when the promise successfully resolves (which is usually prompt...
PointerEvent.PointerEvent() - Web APIs
ional 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 = new PointerEvent("pointerdown", {pointerId: 1, bubbles: true, cancelable: true, pointerType: "touch", width: 10...
Pointer Lock API - Web APIs
terface, adding both a new property and a new method. The new property is used for accessing the currently locked element (if any), and is named pointerLockElement and the new method on Document is exitPointerLock() and, as the name implies, it is used to exit the pointer lock. The pointerLockElement property is useful for determining if any element is currently pointer locked (e.g., for doing a
Boolean check) and also for obtaining a reference to the locked element, if any. Here is an example of using pointerLockElement: if(document.pointerLockElement === canvas || document.mozPointerLockElement === canvas) { console.log('The pointer lock status is now locked'); } else { console.log('The pointer lock status is now unlocked'); } The Document.exitPointerLock() method is used to exit ...
ProgressEvent() - Web APIs
The ProgressEvent() constructor returns a newly created ProgressEvent, representing the current completion of a long process. Syntax progressEvent = new ProgressEvent(type, {lengthComputable: a
BooleanValue, loaded: aNumber, total: aNumber}); Arguments The ProgressEvent() constructor also inherits arguments from Event(). type Is a DOMString representing the name of the type of the ProgressEvent. It is case-sensitive. lengthComputable Optional Is a
Boolean flag indicating if the total work to be done, and the amount of work already done, by the underlying process is calculable. In other words, it tells if the progress is measurable or not. It defaults to false. loaded Optional Is an unsigned long long representing the amount of work already performed by the underlying process. The rat...
ProgressEvent.initProgressEvent() - Web APIs
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. load The operation completed. loadend The operation stopped. 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). lengthComputable Is a
Boolean flag indicating if the total work to be done, and the amount of work already done, by the underlying process is calculable. In other words, it tells if the progress is measurable or not. lo...
ProgressEvent - Web APIs
olas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">ProgressEvent</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Constructor ProgressEvent() Creates a ProgressEvent event with the given parameters. Properties Also inherits properties from its parent Event. ProgressEvent.lengthComputable Read only Is a
Boolean flag indicating if the total work to be done, and the amount of work already done, by the underlying process is calculable. In other words, it tells if the progress is measurable or not. ProgressEvent.loaded Read only Is an unsigned long long representing the amount of work already performed by the underlying process. The ratio of work done can be calculated with the property and ProgressEvent...
Proximity Events - Web APIs
ess to different kinds of information: The DeviceProximityEvent event provides an exact match for the distance between the device and the object through its value property. It also provides the closest and farthest distance the device is able to detect something through its min and max properties. The UserProximityEvent event provides a rough approximation of the distance, expressed through a
boolean. The UserProximityEvent.near property is true if the object is close or false if the object is far. Example window.addEventListener('userproximity', function(event) { if (event.near) { // let's power off the screen navigator.mozPower.screenEnabled = false; } else { // Otherwise, let's power on the screen navigator.mozPower.screenEnabled = true; } }); Specifications ...
PublicKeyCredentialCreationOptions.authenticatorSelection - Web APIs
ticatorSelection Value An object with the following properties: authenticatorAttachmentOptional A string which is either "platform" or "cross-platform". The former describes an authenticator which is bound to the client and which is generally not removable. The latter describes a device which may be used across different platform (such as a USB or NFC device). requireResidentKeyOptional A
boolean which indicated that the credential private key must be stored in the authenticator, the client or in a client device. The default value is false. userVerificationOptional A string qualifying how the user verification should be part of the authentication process. The values may be: "required": user verification is required, the operation will fail if the response does not have the UV flag (...
PushManager.permissionState() - Web APIs
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. 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 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. R...
PushManager.subscribe() - Web APIs
ubscription object containing details of a push subscription. A new push subscription is created if the current service worker does not have an existing subscription. Syntax 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 inc...
PushSubscription.options - Web APIs
The options read-only property of the PushSubscription interface is an object containing containing the options used to create the subscription. Syntax var options = PushSubscription.options Value An read-only options object containing the following values: 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 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. Specifications Specification Status Comment Push APIThe definition of 'options' in that spe...
PushSubscription.unsubscribe() - Web APIs
The unsubscribe() method of the PushSubscription interface returns a Promise that resolves to a
Boolean when the current subscription is successfully unsubscribed. Syntax PushSubscription.unsubscribe().then(function(
Boolean) { ... }); Parameters None. Returns A Promise that resolves to a
Boolean when the current subscription is successfully unsubscribed. Example navigator.serviceWorker.ready.then(function(reg) { reg.pushManager.getSubscription().then(function(subscription) { subscription.unsubscribe().then(function(successful) { // You've successfully unsubscribed }).catch(function(e) { // Unsubscription failed }) }) }); Specifications Specification Status Comment Push APIThe definition of 'unsubscribe()' in that specification. W...
PushSubscription - Web APIs
) 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() Starts the asynchronous process of unsubscribing from the push service, returning a Promise that resolves to a
Boolean when the current subscription is successfully unregistered. Example navigator.serviceWorker.ready.then(function(reg) { reg.pushManager.getSubscription().then(function(subscription) { subscription.unsubscribe().then(function(successful) { // You've successfully unsubscribed }).catch(function(e) { // Unsubscription failed }) }) }); Specifications Specificat...
RTCDataChannel.ordered - Web APIs
rdered indicates whether or not the data channel guarantees in-order delivery of messages; the default is true, which indicates that the data channel is indeed ordered. This is set when the RTCDataChannel is created, by setting the ordered property on the RTCDataChannelInit object passed as RTCPeerConnection.createDataChannel()'s options parameter. Syntax var ordered = aDataChannel.ordered; A
Boolean value which is true if in-order delivery is guaranteed and is otherwise false. Example var pc = new RTCPeerConnection(); var dc = pc.createDataChannel("my channel"); if (!dc.ordered) { // Handle unordered messaging } Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCDataChannel.ordered' in that...
RTCIceCandidatePairStats.nominated - Web APIs
The RTCIceCandidatePairStats property nominated specifies whether or not the candidate pair described by the underlying RTCIceCandidatePair has been nominated to be used as the configuration for the WebRTC connection. Syntax nominated = rtcIceCandidatePairStats.nominated; Value A
Boolean value which is set to true by the ICE layer if the controlling user agent has indicated that the candidate pair should be used to configure the WebRTC connection between the two peers. Note: If more than one candidate pair are nominated at the same time, the one whose priority is higher will be selected for use. Once a candidate pair has been nominated and the two peers have each reconfigured themselves to use the specified configuration, the ICE negotiation process can potentially end (or it can continu...
RTCIceCandidatePairStats.readable - Web APIs
The obsolete RTCIceCandidatePairStats property readable reports whether or not the connection described by the candidate pair has received at least one valid incoming ICE request. Syntax isReadable = rtcIceCandidatePairStats.readable; Value A
Boolean value which is true if the connection described by this candidate pair has received at least one valid ICE request, and is therefore ready to be read from. Note: This property was removed from the specification in early 2017 because you can determine whether or not the connection is readable by checking to see if requestsReceived is greater than 0: if (icpStats.requestsReceived > 0) { /* at least one ICE request has been received */ } ...
RTCIceCandidatePairStats.selected - Web APIs
The non-standard, Firefox-specific RTCIceCandidatePairStats property selected indicates whether or not the candidate pair described by the object is the one currently being used to communicate with the remote peer. Syntax isSelected = icpStats.selected; Value A Firefox-specific
Boolean value which is true if the candidate pair described by this object is the one currently in use. In any other browser, you can determine the selected candidate pair by looking for a stats object of type transport, which is an RTCTransportStats object. That object's selectedCandidatePairId property indicates whether or not the specified transport is the one being used. Example The function shown in this example identifies the currently-selected candidate pair from a statistics report by first iterating over...
RTCIceCandidatePairStats.writable - Web APIs
The obsolete RTCIceCandidatePairStats property writable reports whether or not the connection described by the candidate pair is writable. Syntax isWritable = rtcIceCandidatePairStats.writable; Value A
Boolean value which is true if the connection described by this candidate pair has received acknowledgement of receipt (ACK) for at least one ICE request and that STUN consent hasn't expired. Note: This property was removed from the specification in early 2017 because you can determine whether or not an incoming ICE request is available to read by checking to see if responsesReceived is greater than 0 and that the time specified by consentExpiredTimestamp has not passed: if (icpStats.responsesReceived > 0 && icpStats.consentExpiredTimestamp < performance.now()) { /* at least one ICE...
RTCIceCandidateStats.deleted - Web APIs
If this value is true, the candidate described by the RTCIceCandidateStats object is no longer under consideration. dThe exact meaning varies depending on the type of candidate: Local candidate A value of true means the candidate has been deleted as described by RFC 5245: 8.3. ...
RTCIceCandidateStats - Web APIs
string containing the address of the candidate. This value may be an IPv4 address, an IPv6 address, or a fully-qualified domain name. This property was previously named ip and only accepted IP addresses. candidateType Optional A string matching one of the values in the RTCIceCandidateType enumerated type, indicating what kind of candidate the object provides statistics for. deleted Optional A
Boolean value indicating whether or not the candidate has been released or deleted; the default value is false. For local candidates, it's value is true if the candidate has been deleted or released. For host candidates, true means that any network resources (usually a network socket) associated with the candidate have already been released. For TURN candidates, the TURN allocation is no longer active fo...
RTCOfferAnswerOptions.voiceActivityDetection - Web APIs
nary is used to specify whether or not to use automatic voice detection for the audio on an RTCPeerConnection. The default value, true, indicates that voice detection should be used and that if possible, the user agent should automatically disable or mute outgoing audio when the audio source is not sensing a human voice. Syntax var options = { voiceActivityDetection: trueOrFalse }; Value A
Boolean value indicating whether or not the connection should use voice detection once running. The default value, true, indicates that the user agent should monitor the audio coming from the microphone or other audio source and automatically cease transmitting data or mute when the user isn't speaking into the microphone, A value of false indicates that the audio should continue to be transmitted regar...
RTCOfferOptions - Web APIs
The RTCOfferOptions dictionary is used to provide optional settings when creating an RTCPeerConnection offer with the createOffer() method. Properties This dictionary also inherits properties from the RTCOfferAnswerOptions dictionary, on which it's based. iceRestart Optional A
Boolean which, when set to true, tells createOffer() to generate and use new values for the identifying properties of the SDP it creates, resulting in a request that triggers renegotiation of the ICE connection. This is useful if network conditions have changed in a way that make the current configuration untenable or impractical, for instance. Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCOfferOptions' in that specific...
RTCPeerConnection.getSenders() - Web APIs
lue An array of RTCRtpSender objects, one for each track on the connection. The array is empty if there are no RTP senders on the connection. The order of the returned RTCRtpSenders is not defined by the specification, and may change from one call to getSenders() to the next. Example In this example, a setMuting() function is shown. This function takes as input an RTCPeerConnection, pc, and a
Boolean, muting. The function gets the list of the peer connection's senders and iterates over every sender, setting the corresponding media track's enabled to the inverse of the specified muting. function setMuting(pc, muting) { let senderList = pc.getSenders(); senderList.forEach(sender) { sender.track.enabled = !muting; } } Specifications Specification Status Comment ...
RTCPeerConnection - Web APIs
iv> a:hover text { fill: #0095DD; pointer-events: all;} ConstructorRTCPeerConnection() The RTCPeerConnection() constructor returns a newly-created RTCPeerConnection, which represents a connection between the local device and a remote peer.PropertiesAlso inherits properties from: EventTargetcanTrickleIceCandidatesThe read-only RTCPeerConnection property canTrickleIceCandidates returns a
Boolean which indicates whether or not the remote peer can accept trickled ICE candidates.connectionState The read-only connectionState property of the RTCPeerConnection interface indicates the current state of the peer connection by returning one of the string values specified by the enum RTCPeerConnectionState.currentLocalDescription Read only The read-only property RTCPeerConnection.currentLocalDescr...
RTCPeerConnectionIceEvent() - Web APIs
date representing the ICE candidate being concerned by the event. If null, the event indicates the end of candidate gathering. "url" (optional, default is null): The URL of the STUN or TURN server which was used to gather the candidate. If the candidate was not gathered by a STUN or TURN server, this value must be null. "bubbles" (optional, default is false): Inherited from EventInit(), this
Boolean option indicates whether or not the event must bubble. "cancelable" (optional, default is false, inherited from EventInit(), this
Boolean indicates whether or not the event can be canceled. Return value A newly-created RTCPeerConnectionIceEvent, configured as specified in the provided options. Specifications Specification Status Comment WebRTC 1.0: Real-time Com...
RTCRtcpParameters - Web APIs
RtcpParameters dictionary provides parameters of an RTCP connection. It's used as the value of the rtcp property of the parameters of an RTCRtpSender or RTCRtpReceiver. Properties cname The Canonical Name (CNAME) being used by RTCP. This is used, for example, in SDES (SDP security descriptions) messages, described in RFC 4568. This property cannot be changed once initialized. reducedSize A
Boolean value indicating whether or not reduced size RTCP is configured. If this value is true, reduced size RTCP (described in RFC 5506) is in effect. If false, compund RTCP is in use, as found in RFC 3550. This property cannot be changed once initialized. Examples This example obtains the canonical name (CNAME) being used for RTCP on an RTCRtpSender or RTCRtpReceiver. function getRtpCNAME(rtpObject...
RTCRtpReceiver.getCapabilities() static function - Web APIs
of time (people don't install and uninstall codecs and the like very often), the media capabilities can in whole or in part provide a cross-origin method for identifying a user. For that reason, in privacy-sensitive contexts, the browser may choose to obscure the capabilities; this might be done, for example, by leaving out rarely-used codec configurations. Example The function below returns a
Boolean indicating whether or not the device supports receiving H.264 video on a WebRTC connection. Since RTCRtpReceiver.getCapabilities() actually only indicates probable support, attempting to receive H.264 video might still fail even after getting a positive response from this function. function canReceiveH264() { let capabilities = RTCRtpReceiver.getCapabilities("video"); capabilities.codecs...
RTCRtpSender.getCapabilities() static function - Web APIs
of time (people don't install and uninstall codecs and the like very often), the media capabilities can in whole or in part provide a cross-origin method for identifying a user. For that reason, in privacy-sensitive contexts, the browser may choose to obscure the capabilities; this might be done, for example, by leaving out rarely-used codec configurations. Example The function below returns a
Boolean indicating whether or not the device supports sending H.264 video on an RTCRtpSender. Since RTCRtpSender.getCapabilities() actually only indicates probable support, H.264 support might still fail even after getting a positive response from this function. function canSendH264() { let capabilities = RTCRtpSender.getCapabilities("video"); capabilities.codecs.forEach((codec) => { if (cod...
RTCRtpSynchronizationSource.voiceActivityFlag - Web APIs
The read-only voiceActivityFlag property of the RTCRtpSynchronizationSource interface indicates whether or not the most recent RTP packet on the source includes voice activity. This is only present if the stream is using the voice activity detection feature; see the RTCOfferOptions flag voiceActivityDetection. Syntax var voiceActivity = RTCRtpSynchronizationSource.voiceActivityFlag Value A
Boolean value which is true if voice activity is present in the most recently received RTP packet played by the associated source, or false if voice activity is not present. This property is omitted entirely if voice activity detection is not enabled on the source, or if the RFC 6464 extension header isn't present. Specifications Specification Status Comment WebRTC 1.0: Real-ti...
RTCRtpSynchronizationSource - Web APIs
ationSource implements RTCRtpContributingSource, its properties are also available. The information provided is based on the last ten seconds of media received. While the published specification describes this as an interface, it has since been changed to a dictionary in follow-up drafts. Properties Also implements the properties of RTCRtpContributingSource. voiceActivityFlag Optional A
Boolean value indicating whether or not voice activity is included in the last RTP packet played from the source. If the peer has indicated that it's not supporting voice activity detection, this field is not provided. Specifications Specification Status Comment WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'RTCRtpSynchronizationSource' in that specifica...
RTCRtpTransceiver.stopped - Web APIs
nly stopped property on the RTCRtpTransceiver interface indicates whether or not the transceiver's associated sender and receiver have both been stopped. The transceiver is stopped if the stop() method has been called or if a change to either the local or the remote description has caused the transceiver to be stopped for some reason. Syntax var isStopped = RTCRtpTransceiver.stopped; Value A
Boolean value which is true if the transceiver's sender will no longer send data, and its receiver will no longer receive data. If either or both are still at work, the result is false. Usage notes This property is deprecated and will be removed in the future. Instead, look at the value of currentDirection. Its value is stopped if the transceiver has stopped. Note: Currently only Firefox implements s...
Range.collapsed - Web APIs
It returns true if the start and end boundary points of the Range are the same point in the DOM, false if not. A collapsed Range is empty (containing no content), and specifies a single point in a DOM tree. To collapse a range, see the Range.collapse() method. Syntax isCollapsed = range.collapsed; Example let range = document.createRange(); range.setStart(startNode, startOffset); range.setEnd(endNode, endOffset); isCollapsed = range.collapsed; Specifications Specification Status Comment DOMThe definition of 'Range.collapsed' in that specification. ...
Range.isPointInRange() - Web APIs
It returns true if the point (cursor position) at offset within ReferenceNode is within this range. Syntax bool = range.isPointInRange( referenceNode, offset ) Parameters referenceNode The Node to compare with the Range. offset The offset into Node of the point to compare with the Range. Example range = document.createRange(); range.selectNode(document.getElementsByTagName("div").item(0)); bool = range.isPointInRange(document.getElementsByTagName("p").item(0),1); Specification Specification Status Comment DOMThe definition of 'Range.isPointInRange()' in that specification. ...
ReadableStream - Web APIs
agments fetched from another resource to the browser. It demonstrates the usage of a ReadableStream in combination with a Uint8Array. ...
ReportingObserver() - Web APIs
n, etc. options Optional An ReportingObserverOptions object allowing you to set the options for creating the object. The available options are: types: An array of strings representing the types of report to be collected by this observer. Available types include deprecation, intervention, and crash (although this last type usually isn't retrievable via a ReportingObserver). buffered: a
boolean that defines whether the reports that were generated before the observer was able to be created should be observable (true) or not (false). Examples let options = { types: ['deprecation'], buffered: true } let observer = new ReportingObserver(function(reports, observer) { reportBtn.onclick = () => displayReports(reports); }, options); Specifications Specification Statu...
ReportingObserverOptions - Web APIs
The ReportingObserverOptions dictionary of the Reporting API allows options to be set in the constructor when creating a ReportingObserver. Properties types An array of strings representing the types of report to be collected by this observer. Available types include deprecation, intervention, and crash. buffered A
boolean that defines whether the reports that were generated before the observer was able to be created should be observable (true) or not (false). Examples let options = { types: ['deprecation'], buffered: true } let observer = new ReportingObserver(function(reports, observer) { reportBtn.onclick = () => displayReports(reports); }, options); Specifications Specification Status Comment Reporting APIThe definition of 'ReportingObserv...
Request - Web APIs
ns the referrer of the request (e.g., client). Request.referrerPolicy Read only Contains the referrer policy of the request (e.g., no-referrer). Request.url Read only Contains the URL of the request. Request implements Body, so it also inherits the following properties: body Read only A simple getter used to expose a ReadableStream of the body contents. bodyUsed Read only Stores a
Boolean that declares whether the body has been used in a response yet. Methods Request.clone() Creates a copy of the current Request object. Request implements Body, so it also has the following methods available to it: Body.arrayBuffer() Returns a promise that resolves with an ArrayBuffer representation of the request body. Body.blob() Returns a promise that resolves with a Blob represent...
Response.ok - Web APIs
Example In our Fetch Response example (see Fetch Response live) we create a new Request object using the Request() constructor, passing it a JPG path. We then fetch this request using fetch(), extract a blob from the response using Body.blob, create an object URL out of it using URL.createObjectURL, and display this in an <img>. Note: at the top of the fetch() block we log the response ok value to the console. ...
Response.redirected - Web APIs
se is the result of a request you made which was redirected. Relying on redirected to filter out redirects makes it easy for a forged redirect to prevent your content from working as expected. Instead, you should actually instead do the filtering when you call fetch(). See the example Disallowing redirects, which shows this being done. Syntax var isRedirected = Response.redirected; Value A
Boolean which is true if the response indicates that your request was redirected. Examples Detecting redirects Checking to see if the response comes from a redirected request is as simple as checking this flag on the Response object. In the code below, a textual message is inserted into an element when a redirect occurred during the fetch operation. Note, however, that this isn't as safe as outright r...
SVGEvent - Web APIs
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. ...
SVGExternalResourcesRequired - Web APIs
ed</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Warning: This interface was removed in the SVG 2 specification. Properties SVGExternalResourcesRequired.externalResourcesRequired Corresponds to the externalResourcesRequired attribute of the given element. Note: The SVG DOM defines the attribute externalResourcesRequired as being of type SVGAnimated
Boolean, whereas the SVG language definition says that the attribute is not animated. Because the SVG language definition states that externalResourcesRequired cannot be animated, the animVal will always be the same as the baseVal. Methods This interface doesn't implement any specific methods. Specifications Specification Status Comment Scalable Vector Graphics (SVG) 1.1 (S...
SVGFEConvolveMatrixElement - Web APIs
stants defined on this interface. SVGFEConvolveMatrixElement.kernelUnitLengthX Read only An SVGAnimatedNumber corresponding to the kernelUnitLength attribute of the given element. SVGFEConvolveMatrixElement.kernelUnitLengthY Read only An SVGAnimatedNumber corresponding to the kernelUnitLength attribute of the given element. SVGFEConvolveMatrixElement.preserveAlpha Read only An SVGAnimated
Boolean corresponding to the preserveAlpha attribute of the given element. Methods This interface does not provide any specific methods, but implements those of its parent, SVGElement, and also implements methods of SVGFilterPrimitiveStandardAttributes. Specifications Specification Status Comment Filter Effects Module Level 1The definition of 'SVGFEConvolveMatrixElement' in t...
SVGGeometryElement.isPointInFill() - Web APIs
The SVGGeometryElement.isPointInFill() method determines whether a given point is within the fill shape of an element. Normal hit testing rules apply; the value of the pointer-events property on the element determines whether a point is considered to be within the fill. The point argument is interpreted as a point in the local coordiante system of the element. Syntax
boolean someElement.isPointInFill(DOMPointInit point); Parameters point A DOMPointInit interpreted as a point in the local coordiante system of the element. Return value A
boolean indicating whether the given point is within the fill or not. Example SVG <svg viewBox="0 0 100 100" width="150" height="150" xmlns="http://www.w3.org/2000/svg"> <circle id="circle" cx="50" cy="50" r="45" fill="white" stroke="blac...
SVGGeometryElement.isPointInStroke() - Web APIs
The SVGGeometryElement.isPointInStroke() method determines whether a given point is within the stroke shape of an element. Normal hit testing rules apply; the value of the pointer-events property on the element determines whether a point is considered to be within the stroke. The point argument is interpreted as a point in the local coordiante system of the element. Syntax
boolean someElement.isPointInStroke(DOMPointInit point); Parameters point A DOMPointInit interpreted as a point in the local coordinate system of the element. Return value A
boolean indicating whether the given point is within the stroke or not. Example SVG <svg viewBox="0 0 100 100" width="150" height="150" xmlns="http://www.w3.org/2000/svg"> <circle id="circle" cx="50" cy="50" r="45" fill="white" st...
Screen - Web APIs
distance in pixels from the left side of the main screen to the left side of the current screen. Screen.orientation Returns the ScreenOrientation instance associated with this screen. Screen.pixelDepth Gets the bit depth of the screen. Screen.top Returns the distance in pixels from the top side of the current screen. Screen.width Returns the width of the screen. Screen.mozEnabled
Boolean. Setting to false will turn off the device's screen. Screen.mozBrightness Controls the brightness of a device's screen. A double between 0 and 1.0 is expected. Events handler Screen.onorientationchange A handler for the orientationchange event. Methods Screen.lockOrientation Lock the screen orientation (only works in fullscreen or for installed apps) Screen.unlockOrientation ...
Using the Screen Capture API - Web APIs
se is in motion. The possible values are: always The mouse cursor should always be captured in the generated stream. motion The cursor should only be visible while moving, and, at the discretion of the user agent, for a brief time before after moving. Then the cursor is removed from the stream. never The cursor should never be visible in the generated stream. logicalSurface A
Boolean which if true indicates that the capture should include offscreen areas of the source, if there are any. None of the constraints are applied in any way until after the content to capture has been selected. The contraints alter what you see in the resulting stream. For example, if you specify a width constraint for the video, it's applied by scaling the video after the user selects the area to ...
Selection.isCollapsed - Web APIs
No text is selected when the selection's start and end points are at the same position in the content. Keep in mind that a collapsed selection may still have one (or more, in Gecko) Ranges, so Selection.rangeCount may not be zero. In that scenario, calling a Selection object's getRangeAt() method may return a Range object which is collapsed. ...
Selection - Web APIs
rame that was never clicked on). Selection.focusOffsetRead only Returns a number representing the offset of the selection's anchor within the focusNode. If focusNode is a text node, this is the number of 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...
Sensor.activated - Web APIs
The activated read-only property of the Sensor interface returns a
Boolean indicating whether the sensor is active. Syntax var
boolean = sensorInstance.activated Because Sensor is a base class, activated may only be read from one of its derived classes. Value A
Boolean. Specifications Specification Status Comment Generic Sensor APIThe definition of 'activated' in that specification. Candidate Recommendation Initial definition. ...
Sensor.hasReading - Web APIs
The hasReading read-only property of the Sensor interface returns a
Boolean indicating whether the sensor has a reading. Syntax var
boolean = sensorInstance.hasReading Because Sensor is a base class, hasReading may only be read from one of its derived classes. Value A
Boolean. Specifications Specification Status Comment Generic Sensor APIThe definition of 'hasReading' in that specification. Candidate Recommendation Initial definition. ...
Sensor - Web APIs
th the policies set on your server. This is not something that would ever be shown to a user. See Feature-Policy for implementation instructions. Interfaces based on Sensor Below is a list of interfaces based on the Sensor interface. Accelerometer AmbientLightSensor Gyroscope LinearAccelerationSensor Magnetometer OrientationSensor Properties Sensor.activated Read only Returns a
Boolean indicating whether the sensor is active. Sensor.hasReading Read only Returns a
Boolean indicating whether the sensor has a reading. Sensor.timestamp Read only Returns the time stamp of the latest sensor reading. Event handlers Sensor.onerror Called when an error occurs on one of the child interfaces of the Sensor interface. Sensor.onreading Called when a reading is taken on one of t...
ServiceWorkerRegistration.showNotification() - Web APIs
is can be of any data type. dir : The direction of the notification; it can be auto, ltr or rtl icon: a USVString containing the URL of an image to be used as an icon by the notification. image: a USVString containing the URL of an image to be displayed in the notification. lang: Specify the lang used within the notification. This string must be a valid BCP 47 language tag. renotify: A
boolean that indicates whether to suppress vibrations and audible alerts when reusing a tag value. If options's renotify is true and options's tag is the empty string a TypeError will be thrown. The default is false. requireInteraction: Indicates that on devices with sufficiently large screens, a notification should remain active until the user clicks or dismisses it. If this value is absent or false, ...
ShadowRoot - Web APIs
The ShadowRoot interface of the Shadow DOM API is the root node of a DOM subtree that is rendered separately from a document's main DOM tree. You can retrieve a reference to an element's shadow root using its Element.shadowRoot property, provided it was created using Element.attachShadow() with the mode option set to open. Properties ShadowRoot.delegatesFocus Read only Returns a
boolean that indicates whether delegatesFocus was set when the shadow was attached (see Element.attachShadow()). ShadowRoot.host Read only Returns a reference to the DOM element the ShadowRoot is attached to. ShadowRoot.innerHTML Sets or returns a reference to the DOM tree inside the ShadowRoot. ShadowRoot.mode Read only The mode of the ShadowRoot -- either open or closed. This defines whether or not t...
SourceBuffer.updating - Web APIs
The updating read-only property of the SourceBuffer interface indicates whether the SourceBuffer is currently being updated -- i.e. whether an SourceBuffer.appendBuffer(), SourceBuffer.appendStream(), or SourceBuffer.remove() operation is currently in progress. Syntax var isUpdating = sourceBuffer.updating; Value A
Boolean. Example TBD Specifications Specification Status Comment Media Source ExtensionsThe definition of 'updating' in that specification. Recommendation Initial definition. ...
SourceBuffer - Web APIs
rceBuffer. SourceBuffer.timestampOffset Controls the offset applied to timestamps inside media segments that are subsequently appended to the SourceBuffer. SourceBuffer.trackDefaults Specifies the default values to use if kind, label, and/or language information is not available in the initialization segment of the media to be appended to the SourceBuffer. SourceBuffer.updating Read only A
boolean indicating whether the SourceBuffer is currently being updated -- i.e. whether an SourceBuffer.appendBuffer(), SourceBuffer.appendStream(), or SourceBuffer.remove() operation is currently in progress. SourceBuffer.videoTracks Read only A list of the video tracks currently contained inside the SourceBuffer. Event handlers SourceBuffer.onabort Fired whenever SourceBuffer.appendBuffer() or ...
SpeechRecognition.continuous - Web APIs
The continuous property of the SpeechRecognition interface controls whether continuous results are returned for each recognition, or only a single result. It defaults to single results (false.) Syntax var myContinuous = mySpeechRecognition.continuous; mySpeechRecognition.continuous = true; Value A
Boolean representing the current SpeechRecognition's continuous status. true means continuous, and false means not continuous (single result each time.) 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 | mage...
SpeechRecognition.interimResults - Web APIs
operty of the SpeechRecognition interface controls whether interim results should be returned (true) or not (false.) Interim results are results that are not yet final (e.g. the SpeechRecognitionResult.isFinal property is false.) The default value for interimResults is false. Syntax var myInterimResult = mySpeechRecognition.interimResults; mySpeechRecognition.interimResults = false; Value A
Boolean representing the state of the current SpeechRecognition's interim results. true means interim results are returned, and false means they aren't. 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 ...
SpeechRecognitionResult - Web APIs
The SpeechRecognitionResult interface of the Web Speech API represents a single recognition match, which may contain multiple SpeechRecognitionAlternative objects. Properties SpeechRecognitionResult.isFinal Read only A
Boolean that states whether this result is final (true) or not (false) -- if so, then this is the final time this result will be returned; if not, then this result is an interim result, and may be updated later on. SpeechRecognitionResult.length Read only Returns the length of the "array" -- the number of SpeechRecognitionAlternative objects contained in the result (also referred to as "n-best alternatives".) Methods SpeechRecognitionResult.item A standard getter that allows SpeechRecognitionAlternative objects within the result to be accessed via array syntax. ...
SpeechSynthesis.paused - Web APIs
The paused read-only property of the SpeechSynthesis interface is a
Boolean that returns true if the SpeechSynthesis object is in a paused state, or false if not. It can be set to paused even if nothing is currently being spoken through it. If utterances are then added to the utterance queue, they will not be spoken until the SpeechSynthesis object is unpaused, using SpeechSynthesis.resume(). Syntax var amIPaused = speechSynthesisInstance.paused; Value A
Boolean. Examples var synth = window.speechSynthesis; synth.pause(); var amIPaused = synth.paused; // will return true Specifications Specification Status Comment Web Speech APIThe definition of 'paused' in that specification. Draft ...
SpeechSynthesis.pending - Web APIs
The pending read-only property of the SpeechSynthesis interface is a
Boolean that returns true if the utterance queue contains as-yet-unspoken utterances. Syntax var amIPending = speechSynthesisInstance.pending; Value A
Boolean. Examples var synth = window.speechSynthesis; var utterance1 = new SpeechSynthesisUtterance('How about we say this now? This is quite a long sentence to say.'); var utterance2 = new SpeechSynthesisUtterance('We should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); var amIPending = synth.pending; // will return true if utterance 1 is still being spoken and utterance 2 is in the queue Specifications Specification Status Comment Web Speech APIThe definition of 'pending...
SpeechSynthesis.speaking - Web APIs
The speaking read-only property of the SpeechSynthesis interface is a
Boolean that returns true if an utterance is currently in the process of being spoken -- even if SpeechSynthesis is in a paused state. Syntax var amISpeaking = speechSynthesisInstance.speaking; Value A
Boolean. Examples var synth = window.speechSynthesis; var utterance1 = new SpeechSynthesisUtterance('How about we say this now? This is quite a long sentence to say.'); var utterance2 = new SpeechSynthesisUtterance('We should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); var amISpeaking = synth.speaking; // will return true if utterance 1 or utterance 2 are currently being spoken Specifications Specification Status Comment ...
SpeechSynthesis - Web APIs
The SpeechSynthesis interface of the Web Speech API is the controller interface for the speech service; this can be used to retrieve information about the synthesis voices available on the device, start and pause speech, and other commands besides. Properties SpeechSynthesis also inherits properties from its parent interface, EventTarget. SpeechSynthesis.paused Read only A
Boolean that returns true if the SpeechSynthesis object is in a paused state. SpeechSynthesis.pending Read only A
Boolean that returns true if the utterance queue contains as-yet-unspoken utterances. SpeechSynthesis.speaking Read only A
Boolean that returns true if an utterance is currently in the process of being spoken -- even if SpeechSynthesis is in a paused state. Methods SpeechSynthesis also inherits...
SpeechSynthesisVoice.default - Web APIs
The default read-only property of the SpeechSynthesisVoice interface returns a
Boolean indicating whether the voice is the default voice for the current app (true), or not (false.) Note: For some devices, it might be the default voice for the voice's language. The spec is not very clear on which it should be, so some implementations may differ. Syntax var amIDefault = speechSynthesisVoiceInstance.default; Value A
Boolean. 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.appe...
SpeechSynthesisVoice.localService - Web APIs
The localService read-only property of the SpeechSynthesisVoice interface returns a
Boolean indicating whether the voice is supplied by a local speech synthesizer service (true), or a remote speech synthesizer service (false.) This property is provided to allow differentiation in the case that some voice options are provided by a remote service; it is possible that remote voices might have extra latency, bandwidth or cost associated with them, so such distinction may be useful. Syntax var amILocal = speechSynthesisVoiceInstance.localService; Value A
Boolean. 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 += ' -- ...
SpeechSynthesisVoice - Web APIs
The SpeechSynthesisVoice interface of the Web Speech API represents a voice that the system supports. Every SpeechSynthesisVoice has its own relative speech service including information about language, name and URI. Properties SpeechSynthesisVoice.default Read only A
Boolean indicating whether the voice is the default voice for the current app language (true), or not (false.) SpeechSynthesisVoice.lang Read only Returns a BCP 47 language tag indicating the language of the voice. SpeechSynthesisVoice.localService Read only A
Boolean indicating whether the voice is supplied by a local speech synthesizer service (true), or a remote speech synthesizer service (false.) SpeechSynthesisVoice.name Read only Returns a human-readable name that represents the voice. SpeechSynthesisVoice.v...
StaticRange.StaticRange() - Web APIs
Syntax var staticRange = new StaticRange(rangeSpec) Parameters rangeSpec The required rangeSpec parameter is an object adhering to the StaticRangeInit dictionary. The four required rangeSpec properties are: startContainer The Node in which the starting point of the range is located. ...
StaticRange - Web APIs
eline="middle">StaticRange</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Constructor StaticRange() Creates a new StaticRange object given the StaticRangeInit dictionary specifying the default values for its properties. Properties The properties below are inherited from its parent interface, AbstractRange. StaticRange.collapsed Read only Returns a
Boolean value which is true if the range's start and end positions are the same, resulting in a range of length 0. StaticRange.endContainer Read only Returns the DOM Node which contains the ending point of the range. The offset into the node at which the end position is located is indicated by endOffset. StaticRange.endOffset Read only Returns an integer value indicating the offset into the node gi...
StorageManager.persist() - Web APIs
The persist() method of the StorageManager interface requests permission to use persistent storage, and returns a Promise that resolves to true if permission is granted and box mode is persistent, and false otherwise. Syntax navigator.storage.persist().then(function(persistent) { ... }) Parameters None. Return value A Promise that resolves to a
Boolean. Example if (navigator.storage && navigator.storage.persist) navigator.storage.persist().then(function(persistent) { if (persistent) console.log("Storage will not be cleared except by explicit user action"); else console.log("Storage may be cleared by the UA under storage pressure."); }); Specifications Specification Status Comment StorageThe definition of 'persist' in that specification...
StorageManager.persisted() - Web APIs
The persisted() method of the StorageManager interface returns a Promise that resolves to true if box mode is persistent for your site's storage. Syntax navigator.storage.persisted().then(function(persistent) { ... }) Parameters None. Returns A Promise that resolves to a
Boolean. Example if (navigator.storage && navigator.storage.persist) navigator.storage.persisted().then(function(persistent) { if (persistent) console.log("Storage will not be cleared except by explicit user action"); else console.log("Storage may be cleared by the UA under storage pressure."); }); Specifications Specification Status Comment StorageThe definition of 'persisted' in that specification. Living Standard Initial definition. ...
Storage Access API - Web APIs
. In Safari, successful use of the storage access API resets this counter. Documentation for Firefox's new storage access policy for blocking tracking cookies includes a detailed description of the scope of storage access grants. Storage Access API methods The storage API methods are implemented on the Document interface: Document.hasStorageAccess() Returns a Promise that resolves with a
boolean value indicating whether the document has access to its first-party storage. Document.requestStorageAccess() Returns a Promise that resolves if the access to first-party storage was granted, and rejects if access was denied. Note: User interaction propagates to the Promise returned by both of these methods, allowing the callers to take actions that require user interaction without requiring ...
StylePropertyMapReadOnly.has() - Web APIs
The has() method of the StylePropertyMapReadOnly interface indicates whether the specified property is in the StylePropertyMapReadOnly object. Syntax var
boolean = StylePropertyMapReadOnly.has(property) Parameters property The name of a property. Return value A
boolean. Example // TBD Specifications Specification Status Comment CSS Typed OM Level 1The definition of 'has()' in that specification. Working Draft Initial definition. ...
StyleSheet - Web APIs
StyleSheet.href Read only Returns a DOMString representing the location of the stylesheet. StyleSheet.media Read only Returns a MediaList representing the intended destination medium for style information. ...
SubtleCrypto.deriveKey() - Web APIs
e the initial key material for the derivation function: for example, for PBKDF2 it might be a password, imported as a CryptoKey using SubtleCrypto.importKey(). derivedKeyAlgorithm is an object defining the algorithm the derived key will be used for. For HMAC: pass an HmacKeyGenParams object. For AES-CTR, AES-CBC, AES-GCM, or AES-KW: pass an AesKeyGenParams object. extractable is a
Boolean indicating whether it will be possible to export the key using SubtleCrypto.exportKey() or SubtleCrypto.wrapKey(). keyUsages is an Array indicating what can be done with the derived key. Note that the key usages must be allowed by the algorithm set in derivedKeyAlgorithm. Possible values of the array are: encrypt: The key may be used to encrypt messages. decrypt: The key may be used t...
SubtleCrypto.generateKey() - Web APIs
is a dictionary object defining the type of key to generate and providing extra algorithm-specific parameters. For RSASSA-PKCS1-v1_5, RSA-PSS, or RSA-OAEP: pass an RsaHashedKeyGenParams object. For ECDSA or ECDH: pass an EcKeyGenParams object. For HMAC: pass an HmacKeyGenParams object. For AES-CTR, AES-CBC, AES-GCM, or AES-KW: pass an AesKeyGenParams object. extractable is a
Boolean indicating whether it will be possible to export the key using SubtleCrypto.exportKey() or SubtleCrypto.wrapKey(). keyUsages is an Array indicating what can be done with the newly generated key. Possible values for array elements are: encrypt: The key may be used to encrypt messages. decrypt: The key may be used to decrypt messages. sign: The key may be used to sign messages. ve...
SubtleCrypto.importKey() - Web APIs
S, or RSA-OAEP: Pass an RsaHashedImportParams object. For ECDSA or ECDH: Pass an EcKeyImportParams object. For HMAC: Pass an HmacImportParams object. For AES-CTR, AES-CBC, AES-GCM, or AES-KW: Pass the string identifying the algorithm or an object of the form { "name": ALGORITHM }, where ALGORITHM is the name of the algorithm. For PBKDF2 : Pass the string PBKDF2. extractable is a
Boolean indicating whether it will be possible to export the key using SubtleCrypto.exportKey() or SubtleCrypto.wrapKey(). keyUsages is an Array indicating what can be done with the key. Possible array values are: encrypt: The key may be used to encrypt messages. decrypt: The key may be used to decrypt messages. sign: The key may be used to sign messages. verify: The key may be used to ve...
SubtleCrypto.unwrapKey() - Web APIs
red. For RSASSA-PKCS1-v1_5, RSA-PSS, or RSA-OAEP: Pass an RsaHashedImportParams object. For ECDSA or ECDH: Pass an EcKeyImportParams object. For HMAC: Pass an HmacImportParams object. For AES-CTR, AES-CBC, AES-GCM, or AES-KW: Pass the string identifying the algorithm or an object of the form { "name": ALGORITHM }, where ALGORITHM is the name of the algorithm. extractable is a
Boolean indicating whether it will be possible to export the key using SubtleCrypto.exportKey() or SubtleCrypto.wrapKey(). keyUsages is an Array indicating what can be done with the key. Possible values of the array are: encrypt: The key may be used to encrypt messages. decrypt: The key may be used to decrypt messages. sign: The key may be used to sign messages. verify: The key may be us...
SubtleCrypto - Web APIs
t, algorithm, and key given as parameters. SubtleCrypto.decrypt() Returns a Promise that fulfills with the clear data corresponding to the encrypted text, algorithm, and key given as parameters. SubtleCrypto.sign() Returns a Promise that fulfills with the signature corresponding to the text, algorithm, and key given as parameters. SubtleCrypto.verify() Returns a Promise that fulfills with a
Boolean value indicating if the signature given as a parameter matches the text, algorithm, and key that are also given as parameters. SubtleCrypto.digest() Returns a Promise that fulfills with a digest generated from the algorithm and text given as parameters. SubtleCrypto.generateKey() Returns a Promise that fulfills with a newly-generated CryptoKey, for symmetrical algorithms, or a CryptoKeyPair, ...
SyncEvent.SyncEvent() - Web APIs
The SyncEvent() constructor creates a new SyncEvent object. Syntax var mySyncEvent = new SyncEvent(type, init) Parameters type The type of the Event. init Optional An options object containing any custom settings that you want to apply to the event object. Options are as follows: tag: A developer-defined unique identifier for this SyncEvent. lastChance: A
Boolean indicating that the user agent will not make further synchronization attempts after the current attempt. ...
SyncEvent.lastChance - Web APIs
The SyncEvent.lastChance read-only property of the SyncEvent interface returns true if the user agent will not make further synchronization attempts after the current attempt. This is the value passed in the lastChance parameter of the SyncEvent() constructor. Syntax var lastChance = SyncEvent.lastChance Value A
Boolean that indicates whether the user agent will not make further synchronization attempts after the current attempt. Specifications Specification Web Background Synchronization ...
SyncManager.register() - Web APIs
method of the SyncManager interface returns a Promise that resolves to a SyncRegistration instance. Syntax SyncManager.register([options]).then(function(syncRegistration) { ... }) Returns A Promise that resolves to an instance of SyncRegistration. Parameters options Optional An object that sets options for an instance of SyncRegistration. The available options are: allowOnBattery: A
boolean that determines whether synchronization is allowed when the user agent is on a battery-powered device. The default is true. id: The unique identifier of the specified SyncRegistration object. idleRequired: A
boolean that determines whether synchronization is allowed when the user agent's device is idle. The default is false. maxDelay: The maximum delay in milliseconds before the next sync e...
Text.isElementContentWhitespace - Web APIs
Note: You may simply replace it with /\s+/.test(Text.data), /\s+/.test(Text.nodeValue), or /\s+/.test(Text.textContent). Putting any property that represents the textual content of the Text node into test() should do the same work just like the three example above. The Text.isElementContentWhitespace read-only property returns a
Boolean flag indicating whether or not the text node's content consists solely of whitespace. Syntax b = textnode.isElementContentWhitespace; Example In the example below, we create a node with mixed display and whitespace characters and the attribute is false. var tn = document.createTextNode("Hello world"); tn.isElementContentWhitespace; /* evaluates to false */ For a node that is all whitespace characters, the isElementContentWhitespace evaluates to true. ...
Text - Web APIs
s,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">Text</text></a></svg></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 p...
TextDecoder() - Web APIs
It defaults to false. Example var textDecoder1 = new TextDecoder("iso-8859-2"); var textDecoder2 = new TextDecoder(); var textDecoder3 = new TextDecoder("csiso2022kr", {fatal: true}); // Allows EncodingError exception to be thrown. var textDecoder4 = ne...
TextDecoder.prototype.decode() - Web APIs
ontaining the text, given in parameters, decoded with the specific method for that TextDecoder object. 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. Example This example encodes and decodes the euro symbol, EUR. HTML <p>Encoded value: <span id="encoded-value"></span></p> <p>Decoded value: <span id="decoded-value"></span></p> ...
TextDecoder - Web APIs
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.decode() Returns a DOMString containing the text decoded with the method of the specific TextDecoder object. Specifications Specification S...
TextRange - Web APIs
e range completely. If the selection contains more than one element, when you modify the contents of the selection, the contents will be placed in the corresponding position of the parent element instead of the child element. TextRange.pasteHTML() Paste the HTML content into the given range and replace any previous text and HTML elements in the range. TextRange.queryCommandEnabled() Returns 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 ...
TextTrack - Web APIs
IETF, just like the HTML lang attribute. For example, this can be "en-US" for United States English or "pt-BR" for Brazilian Portuguese. TextTrack.mode A DOMString specifying the track's current mode. 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. Events cuechange Fired when cues are entered and exited. A given text cue appears when the cue is entered and disappears when the cue is exited. Also available via the oncuechange property. Methods This interface also inherits methods from EventTarget. TextTrack.addCue() Adds a cue (specified as a TextTrackCue object...
TextTrackCue - Web APIs
nly 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.onenter The event handler for the enter event. TextTrackCue.onexit The event handler for the exit event. Specifications Specification Status Comment HTML Living StandardThe definition of 'TextTrackCue' in that specification. Living Standard HTML5The ...
TouchEvent.altKey - Web APIs
If the alt key is enabled, the attribute's value is true. Otherwise, it is false. This property is Read only . Syntax var altEnabled = touchEvent.altKey; Return value altEnabled true if the alt key is enabled for this event; and false if the alt is not enabled. Example This example illustrates how to access the TouchEvent key modifier properties: TouchEvent.altKey, TouchEvent.ctrlKey, TouchEvent.metaKey and TouchEvent.shiftKey. In following code snippet, the touchstart event handler logs the state of the event's modifier keys. ...
TouchEvent.ctrlKey - Web APIs
If this key is enabled, the attribute's value is true. Otherwise, it is false. This property is Read only . Syntax var ctrlEnabled = touchEvent.ctrlKey; Return value ctrlEnabled true if the control key is enabled for this event; and false if the control is not enabled. Example The TouchEvent.altKey example includes an example of this property's usage. Specifications Specification Status Comment Touch Events - Level 2 Draft Non-stable version. ...
TouchEvent.metaKey - Web APIs
If this key is enabled, the attribute's value is true. Otherwise, it is false. This property is Read only . Note: On Macintosh keyboards, this is the ? Command key. On Windows keyboards, this is the Windows key (?). Syntax var metaEnabled = touchEvent.metaKey; Return value metaEnabled true if the Meta key is enabled for this event; and false if the Meta is not enabled. Example The TouchEvent.altKey example includes an example of this property's usage. Specifications Specification Status Comment Touch Events - Level 2 Draft Non-stable version. ...
TouchEvent.shiftKey - Web APIs
If this key is enabled, the attribute's value is true. Otherwise, it is false. This property is Read only . Syntax var shiftEnabled = touchEvent.shiftKey; Return value shiftEnabled true if the shift key is enabled for this event; and false if the shift key is not enabled. Example The TouchEvent.altKey example includes an example of this property's usage. Specifications Specification Status Comment Touch Events - Level 2 Draft Non-stable version. ...
TrackEvent() - Web APIs
ect: "addtrack" or "removetrack". eventInfo Optional An optional dictionary providing additional information configuring the new event; it can contain the following fields in any combination: track Optional The track to which the event refers; this is null by default, but should be set to a VideoTrack, AudioTrack, or TextTrack as appropriate given the type of track. bubbles Optional A
Boolean indicating whether the event bubbles or not. cancelable Optional A
Boolean indicating whether or not the event can be canceled. composed Optional A
Boolean indicating whether or not the event will trigger listeners outside of a shadow root; see Event.composed for more details. Return value A newly-created TrackEvent object, initialized as described by the inputs to the constructor.
TransitionEvent.initTransitionEvent() - Web APIs
tic 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 (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 th...
TreeWalker.expandEntityReferences - Web APIs
If this value is false, the children of entity reference nodes (as well as all of their descendants) are rejected. This takes precedence over the value of the TreeWalker.whatToShow method and the associated filter. ...
TreeWalker - Web APIs
not part of the document tree, they do not appear when traversing over the document tree. NodeFilter.SHOW_PROCESSING_INSTRUCTION 64 Shows ProcessingInstruction nodes. NodeFilter.SHOW_TEXT 4 Shows Text nodes. TreeWalker.filter Read only Returns a NodeFilter used to select the relevant nodes. TreeWalker.expandEntityReferences Read only Is a
Boolean indicating, when discarding an EntityReference its whole sub-tree must be discarded at the same time. TreeWalker.currentNode Is the Node on which the TreeWalker is currently pointing at. Methods This interface doesn't inherit any method. Note: in the context of a TreeWalker, a node is visible if it exists in the logical view determined by the whatToShow and filter parameter arguments. (Whe...
TypeInfo - Web APIs
The obsolete TypeInfo interface was intended to be used to describe a DOM data type by keying its name to a namespace within the document's schema. Properties TypeInfo.typeName Read only Returns a DOMString indicating the type's name. TypeInfo.typeNamespace Read only Returns a DOMString indicating the type's namespace within the schema. Methods TypeInfo.isDerivedFrom() Returns a
Boolean. Constants Constant Value DERIVATION_RESTRICTION 1 DERIVATION_EXTENSION 2 DERIVATION_UNION 4 DERIVATION_LIST 8 Specifications Specification Status Comment Document Object Model (DOM) Level 3 Core SpecificationThe definition of 'TypeInfo' in that specification. Obsolete Initial definition ...
UIEvent.initUIEvent() - Web APIs
patched, 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 Is an unsigned long specifying some detail informat...
UIEvent.isChar - Web APIs
Some keystroke combinations may raise events but not produce any character (example: ctrl-alt-?). When this is the case, isChar returns false. It is used when event handlers need to do something like echo the input on the screen. Example In this snippet, which is part of an event handler, the event is checked to see if it generates a character; if it does, the value of UIEvent.which is appended to a string which buffers the typed characters. ...
UIEvent - Web APIs
.5" y="30" font-size="12px" font-family="Consolas,Monaco,Andale Mono,monospace" fill="#4D4E53" text-anchor="middle" alignment-baseline="middle">UIEvent</text></a></svg></div> a:hover text { fill: #0095DD; pointer-events: all;} Constructors UIEvent() Creates a UIEvent object. Properties This interface also inherits properties of its parent, Event. UIEvent.cancelBubble Is a
Boolean indicating whether the bubbling of the event has been canceled or not. UIEvent.detailRead only Returns a long with details about the event, depending on the event type. UIEvent.isChar Read only Returns a
Boolean indicating whether the event produced a key character or not. UIEvent.layerX Read only Returns the horizontal coordinate of the event relative to the current layer. UIEve...
URLSearchParams.has() - Web APIs
The has() method of the URLSearchParams interface returns a
Boolean that indicates whether a parameter with the specified name exists. Note: This feature is available in Web Workers. Syntax var hasName = URLSearchParams.has(name) Parameters name The name of the parameter to find. Return value A
Boolean. Examples let url = new URL('https://example.com?foo=1&bar=2'); let params = new URLSearchParams(url.search.slice(1)); params.has('bar') === true; //true Specifications Specification Status Comment URLThe definition of 'has()' in that specification. Living Standard Initial definition. ...
URLSearchParams - Web APIs
ing iteration through all key/value pairs contained in this object. URLSearchParams.forEach() Allows iteration through all values contained in this object via a callback function. URLSearchParams.get() Returns the first value associated with the given search parameter. URLSearchParams.getAll() Returns all the values associated with a given search parameter. URLSearchParams.has() Returns a
Boolean indicating if such a given parameter exists. URLSearchParams.keys() Returns an iterator allowing iteration through all keys of the key/value pairs contained in this object. URLSearchParams.set() Sets the value associated with a given search parameter to the given value. If there are several values, the others are deleted. URLSearchParams.sort() Sorts all key/value pairs, if any, by their ke...
USBDevice.opened - Web APIs
Example This example is for a hypothetical USB device with a multi-colored LED. It shows how to test that a device is open before calling USBDevice.controlTransferOut to set a specified LED color. ...
UserProximityEvent.near - Web APIs
The near property tell if there is an object close to the device (true) or not (false). Syntax var near = userProximityEvent.near; Value A
boolean ...
VideoTrack.selected - Web APIs
The VideoTrack property selected controls whether or not a particular video track is active. Syntax isVideoSelected = VideoTrack.selected; VideoTrack.selected = true | false; Value The selected property is a
Boolean whose value is true if the 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. Specifications Specification Status Comment HTML Living StandardThe definition of 'VideoTrack: selected' in that specification. Living Standard ...
VideoTrack - Web APIs
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. ...
WebGL2RenderingContext.getActiveUniformBlockParameter() - Web APIs
. gl.UNIFORM_BLOCK_DATA_SIZE: Returns a GLuint indicating the minimum total buffer object size. gl.UNIFORM_BLOCK_ACTIVE_UNIFORMS: Returns a GLuint indicating the number of active uniforms in the uniform block. gl.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: Returns a Uint32Array indicating the list of active uniforms in the uniform block. gl.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: Returns a GL
boolean indicating whether the uniform block is referenced by the vertex shader. gl.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: Returns a GL
boolean indicating whether the uniform block is referenced by the fragment shader. Return value Depends on which information is requested using the pname parameter. If an error occurs, null is returned. Examples var blockSize = gl.getActiveUniformBlockPar...
WebGL2RenderingContext.getActiveUniforms() - Web APIs
indices of the uniforms. gl.UNIFORM_OFFSET: Returns an Array of GLint indicating the uniform buffer offsets. gl.UNIFORM_ARRAY_STRIDE: Returns an Array of GLint indicating the strides between the elements. gl.UNIFORM_MATRIX_STRIDE: Returns an Array of GLint indicating the strides between columns of a column-major matrix or a row-major matrix. gl.UNIFORM_IS_ROW_MAJOR: Returns an Array of GL
boolean indicating whether each of the uniforms is a row-major matrix or not. Return value Depends on which information is requested using the pname parameter. Examples var uniformIndices = gl.getUniformIndices(program, ['UBORed', 'UBOGreen', 'UBOBlue']); var uniformOffsets = gl.getActiveUniforms(program, uniformIndices, gl.UNIFORM_OFFSET); Specifications Specification Status Co...
WebGL2RenderingContext.getQueryParameter() - Web APIs
e WebGL2RenderingContext.getQueryParameter() method of the WebGL 2 API returns parameter information of a WebGLQuery object. Syntax any gl.getQueryParameter(query, pname); Parameters query A WebGLQuery object. pname A GLenum specifying which information to return. Possible values: gl.QUERY_RESULT: Returns a GLuint containing the query result. gl.QUERY_RESULT_AVAILABLE: Returns a GL
boolean indicating whether or not a query result is available. Return value Depends on the pname parameter, either a GLuint or a GL
boolean. Examples var query = gl.createQuery(); gl.beginQuery(gl.ANY_SAMPLES_PASSED, query); var result = gl.getQueryParameter(query, gl.QUERY_RESULT); Specifications Specification Status Comment WebGL 2.0The definition of 'getQueryParamet...
WebGL2RenderingContext.isQuery() - Web APIs
Return value A GL
boolean indicating whether the given object is a valid WebGLQuery object (true) or not (false). Examples gl must be a WebGL2RenderingContext. WebGLQuery objects are not available in WebGL 1. var query = gl.createQuery(); // ... gl.isQuery(query); Specifications Specification Status Comment WebGL 2.0The definition of 'isQuery' in that specification. ...
WebGL2RenderingContext.isSync() - Web APIs
Examples gl must be a WebGL2RenderingContext. WebGLSync objects are not available in WebGL 1. var sync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0); // ... gl.isSync(sync); Specifications Specification Status Comment WebGL 2.0The definition of 'isSync' in that specification. ...
WebGL2RenderingContext.uniformMatrix[234]x[234]fv() - Web APIs
Matrix2x4fv(location, transpose, data, optional srcOffset, optional srcLength); void gl.uniformMatrix3x4fv(location, transpose, data, optional srcOffset, optional srcLength); void gl.uniformMatrix4fv(location, transpose, data, optional srcOffset, optional srcLength); Parameters location A WebGLUniformLocation object containing the location of the uniform attribute to modify. transpose A GL
boolean specifying whether to transpose the matrix. Must be false. data A Float32Array of float values. Return value None. Examples gl.uniformMatrix2x3fv(loc, false, [1, 2, 3, 4, 5, 6]); Specifications Specification Status Comment WebGL 2.0The definition of 'uniformMatrix' in that specification. Editor's Draft Initial definition for WebGL. OpenGL ES 3.0The ...
WebGLRenderingContext.colorMask() - Web APIs
The WebGLRenderingContext.colorMask() method of the WebGL API sets which color components to enable or to disable when drawing or rendering to a WebGLFramebuffer. Syntax void gl.colorMask(red, green, blue, alpha); Parameters red A GL
boolean specifying whether or not the red color component can be written into the frame buffer. Default value: true. green A GL
boolean specifying whether or not the green color component can be written into the frame buffer. Default value: true. blue A GL
boolean specifying whether or not the blue color component can be written into the frame buffer. Default value: true. alpha A GL
boolean specifying whether or not the alpha (transparency) component can be written into the frame buffer. Default value: true. Return value None. Examples gl.colorMask(tr...
WebGLRenderingContext.getProgramParameter() - Web APIs
The WebGLRenderingContext.getProgramParameter() method of the WebGL API returns information about the given program. Syntax any gl.getProgramParameter(program, pname); Parameters program A WebGLProgram to get parameter information from. pname A Glenum specifying the information to query. Possible values: gl.DELETE_STATUS: Returns a GL
boolean indicating whether or not the program is flagged for deletion. gl.LINK_STATUS: Returns a GL
boolean indicating whether or not the last link operation was successful. gl.VALIDATE_STATUS: Returns a GL
boolean indicating whether or not the last validation operation was successful. gl.ATTACHED_SHADERS: Returns a GLint indicating the number of attached shaders to a program. gl.ACTIVE_ATTRIBUTES: Returns a GLint indicating the number of active ...
WebGLRenderingContext.getShaderParameter() - Web APIs
The WebGLRenderingContext.getShaderParameter() method of the WebGL API returns information about the given shader. Syntax any gl.getShaderParameter(shader, pname); Parameters shader A WebGLShader to get parameter information from. pname A GLenum specifying the information to query. Possible values: gl.DELETE_STATUS: Returns a GL
boolean indicating whether or not the shader is flagged for deletion. gl.COMPILE_STATUS: Returns a GL
boolean indicating whether or not the last shader compilation was successful. gl.SHADER_TYPE: Returns a GLenum indicating whether the shader is a vertex shader (gl.VERTEX_SHADER) or fragment shader (gl.FRAGMENT_SHADER) object. Return value Returns the requested shader information (as specified with pname). Examples gl.getShaderParameter(shader, g...
WebGLRenderingContext.getTexParameter() - Web APIs
Texture mipmap level Any int values. gl.TEXTURE_COMPARE_FUNC GLenum Comparison function gl.LEQUAL (default value), gl.GEQUAL, gl.LESS, gl.GREATER, gl.EQUAL, gl.NOTEQUAL, gl.ALWAYS, gl.NEVER. gl.TEXTURE_COMPARE_MODE GLenum Texture comparison mode gl.NONE (default value), gl.COMPARE_REF_TO_TEXTURE. gl.TEXTURE_IMMUTABLE_FORMAT GL
boolean Immutability of the texture format and size true or false. gl.TEXTURE_IMMUTABLE_LEVELS GLuint ? Any uint values. gl.TEXTURE_MAX_LEVEL GLint Maximum texture mipmap array level Any int values. gl.TEXTURE_MAX_LOD GLfloat Texture maximum level-of-detail value Any float values. gl.TEXTURE_MIN_LOD GLfloat ...
WebGLRenderingContext.isBuffer() - Web APIs
Examples Creating a buffer var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var buffer = gl.createBuffer(); gl.isBuffer(buffer); Specifications Specification Status Comment WebGL 1.0The definition of 'isBuffer' in that specification. ...
WebGLRenderingContext.isContextLost() - Web APIs
Usage notes There are several reasons why a WebGL context may be lost, making it necessary to re-establish the context before resuming rendering. Examples include: Two or more pages are using the GPU, but together place too high a demand on the GPU, so the browser tells the two contexts that they've lost the connection, then selects one of the two to restore access for. ...
WebGLRenderingContext.isFramebuffer() - Web APIs
The WebGLRenderingContext.isFramebuffer() method of the WebGL API returns true if the passed WebGLFramebuffer is valid and false otherwise. Syntax GL
boolean gl.isFramebuffer(framebuffer); Parameters framebuffer A WebGLFramebuffer to check. Return value A GL
boolean indicating whether or not the frame buffer is valid. Examples Checking a frame buffer var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var framebuffer = gl.createFramebuffer(); gl.isFramebuffer(framebuffer); Specifications Specification Status Comment WebGL 1.0The definition of 'isFramebuffer' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glIsFramebuffer' in that specification. Standard Man page...
WebGLRenderingContext.isProgram() - Web APIs
Examples Checking a program var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var program = gl.createProgram(); // ... gl.isProgram(program); Specifications Specification Status Comment WebGL 1.0The definition of 'isProgram' in that specification. ...
WebGLRenderingContext.isRenderbuffer() - Web APIs
The WebGLRenderingContext.isRenderbuffer() method of the WebGL API returns true if the passed WebGLRenderbuffer is valid and false otherwise. Syntax GL
boolean gl.isRenderbuffer(renderbuffer); Parameters renderbuffer A WebGLRenderbuffer to check. Return value A GL
boolean indicating whether or not the renderbuffer is valid. Examples Checking a renderbuffer var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var renderbuffer = gl.createRenderbuffer(); gl.isRenderbuffer(renderbuffer); Specifications Specification Status Comment WebGL 1.0The definition of 'isRenderbuffer' in that specification. Recommendation Initial definition. OpenGL ES 2.0The definition of 'glIsRenderbuffer' in that specification. Standard...
WebGLRenderingContext.isShader() - Web APIs
Examples Checking a shader var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var shader = gl.createShader(gl.VERTEX_SHADER); // ... gl.isShader(shader); Specifications Specification Status Comment WebGL 1.0The definition of 'isShader' in that specification. ...
WebGLRenderingContext.isTexture() - Web APIs
Examples Checking a texture var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var texture = gl.createTexture(); gl.isTexture(texture); Specifications Specification Status Comment WebGL 1.0The definition of 'isTexture' in that specification. ...
WebGLRenderingContext.pixelStorei() - Web APIs
iption Type Default value Allowed values (for param) Specified in gl.PACK_ALIGNMENT Packing of pixel data into memory GLint 4 1, 2, 4, 8 OpenGL ES 2.0 gl.UNPACK_ALIGNMENT Unpacking of pixel data from memory. GLint 4 1, 2, 4, 8 OpenGL ES 2.0 gl.UNPACK_FLIP_Y_WEBGL Flips the source data along its vertical axis if true. GL
boolean false true, false WebGL gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL Multiplies the alpha channel into the other color channels GL
boolean false true, false WebGL gl.UNPACK_COLORSPACE_CONVERSION_WEBGL Default color space conversion or no color space conversion. GLenum gl.BROWSER_DEFAULT_WEBGL gl.BROWSER_DEFAULT_WEBGL, gl.NONE WebGL When using a ...
WebGLRenderingContext.uniformMatrix[234]fv() - Web APIs
. Syntax WebGLRenderingContext.uniformMatrix2fv(location, transpose, value); WebGLRenderingContext.uniformMatrix3fv(location, transpose, value); WebGLRenderingContext.uniformMatrix4fv(location, transpose, value); Parameters location A WebGLUniformLocation object containing the location of the uniform attribute to modify. The location is obtained using getUniformLocation(). transpose A GL
boolean specifying whether to transpose the matrix. Must be false. value A Float32Array or sequence of GLfloat values. The values are assumed to be supplied in column major order. Return value undefined Examples gl.uniformMatrix2fv(loc, false, [2,1, 2,2]); Specifications Specification Status Comment WebGL 1.0The definition of 'uniformMatrix' in that specification. ...
WebGLRenderingContext.vertexAttribPointer() - Web APIs
For types gl.BYTE and gl.SHORT, normalizes the values to [-1, 1] if true. For types gl.UNSIGNED_BYTE and gl.UNSIGNED_SHORT, normalizes the values to [0, 1] if true. For types gl.FLOAT and gl.HALF_FLOAT, this parameter has no effect. stride A GLsizei specifying the offset in b...
WebGL constants - Web APIs
tex array object (VAO). EXT_disjoint_timer_query Constant name Value Description QUERY_COUNTER_BITS_EXT 0x8864 The number of bits used to hold the query result for the given target. CURRENT_QUERY_EXT 0x8865 The currently active query. QUERY_RESULT_EXT 0x8866 The query result. QUERY_RESULT_AVAILABLE_EXT 0x8867 A
Boolean indicating whether or not a query result is available. TIME_ELAPSED_EXT 0x88BF Elapsed time (in nanoseconds). TIMESTAMP_EXT 0x8E28 The current time. GPU_DISJOINT_EXT 0x8FBB A
Boolean indicating whether or not the GPU performed any disjoint operation. Specifications Specification Status Comment WebGL 1.0The definition of ...
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
setLocalDescription() without arguments automatically creates and sets the appropriate description based on the current signalingState. The set description is either an answer to the most recent offer from the remote peer or a freshly-created offer if there's no negotiation underway. Here, it will be always be an offer, because the negotiationneeded event is only fired in stable state. We set a
Boolean variable, makingOffer to true to mark that we're preparing an offer. To avoid races, we'll use this value later instead of the signaling state to determine whether or not an offer is being processed because the value of signalingState changes asynchronously, introducing a glare opportunity. Once the offer has been created, set and sent (or an error occurs), makingOffer gets set back to false. H...
Using DTMF with WebRTC - Web APIs
hown in Starting the connection process below. dtmfSender The RTCDTMFSender object for the connection. This will be obtained while setting up the connection, in the gotStream() function shown in Adding the audio to the connection. hasAddTrack Because some browsers have not yet implemented RTCPeerConnection.addTrack(), therefore requiring the use of the obsolete addStream() method, we use this
Boolean to determine whether or not the user agent supports addTrack(); if it doesn't, we'll fall back to addStream(). This gets figured out in connectAndDial(), as shown in Starting the connection process. mediaConstraints An object conforming to the MediaConstraints dictionary specifying the constraints to use when starting the connection. We want an audio-only connection, so video is false, while au...
WebSocket.send() - Web APIs
ame; its binary data contents are queued in the buffer, increasing the value of bufferedAmount by the requisite number of bytes. Exceptions thrown INVALID_STATE_ERR The connection is not currently OPEN. SYNTAX_ERR The data is a string that has unpaired surrogates. Note: Gecko's implementation of the send() method differs somewhat from the specification in Gecko 6.0; Gecko returns a
boolean indicating whether or not the connection is still open (and, by extension, that the data was successfully queued or transmitted); this is corrected in Gecko 8.0. As of Gecko 11.0, support for ArrayBuffer is implemented but not Blob data types. Specifications Specification Status Comment HTML Living StandardThe definition of 'WebSocket: send' in that specification. ...
Controlling multiple parameters with ConstantSourceNode - Web APIs
atorNodes used to generate the chord. gainNode1, gainNode2, and gainNode3 The three GainNode instances which provide the volume levels for each of the three oscillators. gainNode2 and gainNode3 will be linked together to have the same, adjustable, value using the ConstantSourceNode. constantNode The ConstantSourceNode used to control the values of gainNode2 and gainNode3 together. playing A
Boolean that we'll use to keep track of whether or not we're currently playing the tones. Now let's look at the setup() function, which is our handler for the window's load event; it handles all the initialization tasks that require the DOM to be in place. function setup() { context = new (window.AudioContext || window.webkitAudioContext)(); playButton = document.querySelector("#playButton"); v...
Background audio processing using AudioWorklet - Web APIs
s from exceeding the legal range of -1.0 to 1.0 by capping the values; there are other ways to avoid clipping that are perhaps less prone to distortion, but this is a simple example that's better than nothing. Lifetime of an audio worklet processor The only means by which you can influence the lifespan of your audio worklet processor is through the value returned by process(), which should be a
Boolean value indicating whether or not to override the user agent's decision-making as to whether or not your node is still in use. In general, the lifetime policy of any audio node is simple: if the node is still considered to be actively processing audio, it will continue to be used. In the case of an AudioWorkletNode, the node is considered to be active if its process() function returns true and the...
The structured clone algorithm - Web APIs
ted. For example, if an object is marked readonly with a property descriptor, it will be read/write in the duplicate, since that's the default. The prototype chain is not walked or duplicated. Note: Native Error types can be cloned in Chrome, and Firefox is working on it. Supported types Object type Notes All primitive types However, not symbols.
Boolean objects String objects Date RegExp lastIndex is not preserved. Blob File FileList ArrayBuffer ArrayBufferView Including other typed arrays. ImageBitmap ImageData Array Object Only plain objects (e.g. from object literals) Map ...
Using Web Workers - Web APIs
alue that is cloned and not shared during the passage from a worker to the main page or vice versa: function emulateMessage(vVal) { return eval('(' + JSON.stringify(vVal) + ')'); } // Tests // test #1 var example1 = new Number(3); console.log(typeof example1); // object console.log(typeof emulateMessage(example1)); // number // test #2 var example2 = true; console.log(typeof example2); //
boolean console.log(typeof emulateMessage(example2)); //
boolean // test #3 var example3 = new String('Hello World'); console.log(typeof example3); // object console.log(typeof emulateMessage(example3)); // string // test #4 var example4 = { 'name': 'John Smith', "age": 43 }; console.log(typeof example4); // object console.log(typeof emulateMessage(example4)); // object // test #5 function Ani...
Window.closed - Web APIs
Possible values: true: The window has been closed. false: The window is open. Examples Change the URL of a window from a popup The following example demonstrates how a popup window can change the URL of the window that opened it. ...
window.dump() - Web APIs
ko dump() is disabled by default - it doesn't do anything but doesn't raise an error either. To see the dump output you have to enable it by setting the preference browser.dom.window.dump.enabled to true. You can set the preference in about:config or in a user.js file. Note: this preference is not listed in about:config by default, you may need to create it (right-click the content area -> New ->
Boolean). On Windows, you will need a console to actually see anything. If you don't have one already, closing the application and re-opening it with the command line parameter -console should create the console or use -attach-console to use the existing console. On other operating systems, it's enough to launch the application from a terminal. To redirect the console output to a file, run firefox with...
Window.find() - Web APIs
Note: Support for Window.find() might change in future versions of Gecko. See bug 672395. The Window.find() method finds a string in a window. Syntax window.find(aString, aCaseSensitive, aBackwards, aWrapAround, aWholeWord, aSearchInFrames, aShowDialog); aString The text string for which to search. aCaseSensitive
Boolean. If true, specifies a case-sensitive search. aBackwards
Boolean. If true, specifies a backward search. aWrapAround
Boolean. If true, specifies a wrap around search. aWholeWord Unimplemented
Boolean. If true, specifies a whole word search. This is not implemented; see bug 481513. aSearchInFrames
Boolean. If true, specifies a search in frames. Returns true if the string is found; otherwise, false. Example JavaScript findString = funct...
Window.fullScreen - Web APIs
t. Syntax isInFullScreen = windowRef.fullScreen; With chrome privileges, the property is read-write, otherwise it is read-only. Bear in mind that if you try to set this property without chrome privileges, it will not throw an exception and instead just silently fail. This is to prevent scripts designed to set this property in Internet Explorer from breaking. Return value isInFullScreen A
boolean. Possible Values: true: The window is in full screen mode. false: The window is not in full screen mode. Notes Switching between regular window and full screen will fire the "resize" event on the corresponding window. Example if (window.fullScreen) { // it's fullscreen! } else { // not fullscreen! } ...
Window.isSecureContext - Web APIs
The window.isSecureContext read-only property indicates whether a context is capable of using features that require secure contexts. Syntax var isSecure = window.isSecureContext Examples Feature detection You can use feature detection to check whether they are in a secure context or not by using the isSecureContext
boolean which is exposed on the global scope. if (window.isSecureContext) { // Page is a secure context so service workers are now available navigator.serviceWorker.register("/offline-worker.js").then(function () { ... }); } Specifications Specification Status Comment Secure Contexts Candidate Recommendation Initial definition. ...
Window - Web APIs
t associated with the current context. This object enables functionality such as storing assets for offline use, and generating custom responses to requests. WindowOrWorkerGlobalScope.indexedDB Read only Provides a mechanism for applications to asynchronously access capabilities of indexed databases; returns an IDBFactory object. WindowOrWorkerGlobalScope.isSecureContext Read only Returns a
boolean indicating whether the current context is secure (true) or not (false). WindowOrWorkerGlobalScope.origin Read only Returns the global object's origin, serialized as a string. (This does not yet appear to be implemented in any browser.) Deprecated properties Window.content and Window._content Read only Returns a reference to the content element in the current window. Since Firefox 57...
WindowClient.focused - Web APIs
The focused read-only property of the WindowClient interface is a
Boolean that indicates whether the current client has focus. Syntax var myFocused = windowClient.focused; Value A
Boolean. Example self.addEventListener('notificationclick', function(event) { console.log('On notification click: ', event.notification.tag); event.notification.close(); // This looks to see if the current is already open and // focuses if it is event.waitUntil(clients.matchAll({ type: "window" }).then(function(clientList) { for (var i = 0; i < clientList.length; i++) { var client = clientList[i]; if (client.url == '/' && 'focus' in client) { if(!client.focused) return client.focus(); } } } if (clients.openWindow) return clients.openWi...
WindowClient - Web APIs
service worker for its own loading and sub-resources. Methods WindowClient inherits methods from its parent interface, Client. WindowClient.focus() Gives user input focus to the current client. WindowClient.navigate() Loads a specified URL into a controlled client page. Properties WindowClient inherits properties from its parent interface, Client. WindowClient.focused Read only A
boolean that indicates whether the current client has focus. WindowClient.visibilityState Read only Indicates the visibility of the current client. This value can be one of "hidden", "visible", or "prerender". Example self.addEventListener('notificationclick', function(event) { console.log('On notification click: ', event.notification.tag); event.notification.close(); // This looks to see if...
WindowOrWorkerGlobalScope.crossOriginIsolated - Web APIs
The crossOriginIsolated read-only property of the WindowOrWorkerGlobalScope interface returns a
boolean value that indicates whether a SharedArrayBuffer can be sent via a Window.postMessage() call. This value is dependant on any Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers present in the response. Syntax var myCrossOriginIsolated = self.crossOriginIsolated; // or just crossOriginIsolated Value A
boolean value Examples if(crossOriginIsolated) { // Post SharedArrayBuffer } else { // Do something else } Specifications Specification Status Comment HTML Living StandardThe definition of 'crossOriginIsolated' in that specification. Living Standard Initial definition. ...
WorkerGlobalScope - Web APIs
t associated with the current context. This object enables functionality such as storing assets for offline use, and generating custom responses to requests. WindowOrWorkerGlobalScope.indexedDB Read only Provides a mechanism for applications to asynchronously access capabilities of indexed databases; returns an IDBFactory object. WindowOrWorkerGlobalScope.isSecureContext Read only Returns a
boolean indicating whether the current context is secure (true) or not (false). WindowOrWorkerGlobalScope.origin Read only Returns the global object's origin, serialized as a string. (This does not yet appear to be implemented in any browser.) Events error Fired when an error occured. Also available via the WorkerGlobalScope.onerror property. offline Fired when the browser has lost access to ...
WorkerNavigator - Web APIs
eturns 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 the platform of the browser. Do not rely on this property to return the correct value. NavigatorID.product Read only Always returns 'Gecko', on any browser. This property is kept only for compatibility purposes. NavigatorID.userAgentRead only Returns the user agent string for the curr...
WritableStream.locked - Web APIs
Syntax var locked = writableStream.locked; Value A
Boolean indicating whether or not the writable stream is locked. Examples const writableStream = new WritableStream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingStrategy); ... ...
WritableStream - Web APIs
The WritableStream interface of the the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing. Constructor WritableStream() Creates a new WritableStream object. Properties WritableStream.locked Read only A
boolean indicating whether the WritableStream is locked to a writer. Methods WritableStream.abort() Aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded. WritableStream.close() Closes the stream. WritableStream.getWriter() Returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance. While the stream is loc...
XMLHttpRequest() - Web APIs
d a non-standard parameter to the constructor that can enable anonymous mode (see bug 692677). Setting the mozAnon flag to true effectively resembles the AnonXMLHttpRequest() constructor described in older versions of the XMLHttpRequest specification. const request = new XMLHttpRequest(paramsDictionary); Parameters (non-standard) objParameters There are two flags you can set: mozAnon
Boolean: Setting this flag to true will cause the browser not to expose the origin and user credentials when fetching resources. Most important, this means that cookies will not be sent unless explicitly added using setRequestHeader. mozSystem
Boolean: Setting this flag to true allows making cross-site connections without requiring the server to opt-in using CORS. Requires setting mozAnon: true, i.e.
XMLHttpRequest.multipart - Web APIs
a standards track. Do not use it on 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. Obsolete since Gecko 22 This Gecko-only feature was removed in Firefox/Gecko 22. Please use Server-Sent Events, Web Sockets, or responseText from progress events instead. This
boolean indicates if the response is expected to be a stream of possibly multiple XML documents. If set to true, the content type of the initial response must be multipart/x-mixed-replace or an error will occur. All requests must be asynchronous. This enables support for server push; for each XML document that's written to this request, a new XML DOM document is created and the onload handler is called ...
XMLHttpRequest.open() - Web APIs
ready 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 is true, or an exception will be thrown. Note: Synchronous requests on the main t...
XMLHttpRequest.withCredentials - Web APIs
Setting withCredentials has no effect on same-site requests. In addition, this flag is also used to indicate when cookies are to be ignored in the response. The default is false. XMLHttpRequest from a different domain cannot set cookie values for their own domain unless withCredentials is set to true before making the request. ...
XPathResult.invalidIteratorState - Web APIs
y invalidIteratorState property of the XPathResult interface signifies that the iterator has become invalid. It is true if XPathResult.resultType is UNORDERED_NODE_ITERATOR_TYPE or ORDERED_NODE_ITERATOR_TYPE and the document has been modified since this result was returned. Note: This feature is available in Web Workers. Syntax var iteratorState = result.invalidIteratorState; Return value A
boolean value indicating whether the iterator has become invalid. Example The following example shows the use of the invalidIteratorState property. HTML <div>XPath example</div> <p>Iterator state: <output></output></p> JavaScript var xpath = "//div"; var result = document.evaluate(xpath, document, null, XPathResult.ANY_TYPE, null); // Invalidates the iterator state document.querySelector("div").re...
XPathResult.resultType - Web APIs
containing whatever type naturally results from evaluation of the expression. Note that if the result is a node-set then UNORDERED_NODE_ITERATOR_TYPE is always the resulting type. NUMBER_TYPE 1 A result containing a single number. This is useful for example, in an XPath expression using the count() function. STRING_TYPE 2 A result containing a single string.
BOOLEAN_TYPE 3 A result containing a single
boolean value. This is useful for example, in an XPath expression using the not() function. UNORDERED_NODE_ITERATOR_TYPE 4 A result node-set containing all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document. ORDERED_NODE_ITERATOR_TYPE 5 A result node-set cont...
XRPose - Web APIs
lied from a source other than the XR device, such as keyboard or mouse inputs. See the article Movement, orientation, and motion for further details and an example with thorough explanations of what's going on. Properties XRPose.transform Read only A XRRigidTransform which provides the position and orientation of the pose relative to the base XRSpace. XRPose.emulatedPosition Read only A
Boolean value which is false if the position and orientation given by transform is obtained directly from a full six degree of freedom (6DoF) XR device (that is, a device which tracks not only the pitch, yaw, and roll of the head but also the forward, backward, and side-to-side motion of the viewer). If any component of the transform is computed or created artificially (such as by using mouse or keyboard...
XRReferenceSpace: reset event - Web APIs
e pointing it up and to the right somewhere. When that happens, you typically hold down a button somewhere and it causes the world to resynchronize to the device's current orientation. That works by sending a `reset` event to the reference space or reference spaces that are based on the headset's orientation. Handling discontinuities You can handle jumps in the viewer's position by watching the
Boolean XRPose property emulatedPosition. If a jump in the viewer's position coincides with emulatedPosition toggling from true to false, the viewer has regained tracking, and that their new position represents a correction from the previously emulated values. This is typically the desired behavior if your site or app doesn't simulate motion through the space by expressly changing the position and/or ori...
XRSession: visibilitychange event - Web APIs
You can also create the event handler by assigning it to the XRSession's onvisibilitychange event handler property, like this: xrSession.onvisibilitychange = (e) => { /* event handled here */ }; Specifications Specification Status Comment WebXR Device APIThe definition of 'v...
XRSessionEvent() - Web APIs
are permitted values for its type property. end Fired at the session when it has ended, after being terminated by the application or the user agent. visibilitychange Fired at the session whenever its visibility state changes. Examples This example creates a listiener that watches for the visibility state of the session to change. It reacts by calling a function mySessionVisible() with a
Boolean indicating whether or not the session is visible; this function might, for instance, spin up or reconfigure a worker that handles rendering the scene. xrSession.addEventListener("visibilitystate", e => { switch(e.session.visibilitystate) { case "visible": case "visible-blurred": mySessionVisible(true); break; case "hidden": mySessionVisible(false); break; ...
XRSessionEvent - Web APIs
are permitted values for its type property. end Fired at the session when it has ended, after being terminated by the application or the user agent. visibilitychange Fired at the session whenever its visibility state changes. Examples This example creates a listiener that watches for the visibility state of the session to change. It reacts by calling a function mySessionVisible() with a
Boolean indicating whether or not the session is visible; this function might, for instance, spin up or reconfigure a worker that handles rendering the scene. xrSession.addEventListener("visibilitystate", e => { switch(e.session.visibilitystate) { case "visible": case "visible-blurred": mySessionVisible(true); break; case "hidden": mySessionVisible(false); break; ...
XRWebGLLayerInit.depth - Web APIs
XRWebGLLayer() constructor to create a new WebGL rendering layer for WebXR, providing as the layerInit parameter an object whose depth property is false will request that the new layer be created without a depth buffer. Syntax let layerInit = { depth: false }; let glLayer = new XRWebGLLayer(xrSession, gl, layerInit); let glLayer = new XRWebGLLayer(xrSession, gl, { depth: false }); Value A
Boolean which can be set to false to specify that the new WebGL layer should not have a depth buffer. This means that the only source for depth information is the vertex coordinates, and reduces the accuracy and quality of rendering, but may potentially affect the performance of rendering as well. The default value is true. Usage notes This property differs from ignoreDepthValues in that a layer creat...
XRWebGLLayerInit.stencil - Web APIs
rendering. You can store values into each entry in the stencil bufer, then specify an operation that determines which stencil buffer values correspond to pixels which should be drawn to the screen during each frame. Syntax let layerInit = { stencil: false }; let glLayer = new XRWebGLLayer(xrSession, gl, layerInit); let glLayer = new XRWebGLLayer(xrSession, gl, { stencil: false }); Value A
Boolean which can be set to false to specify that the new WebGL layer should not include a stencil buffer. The default value is true. Example In this example, a new XRWebGLLayer is created for a WebXR session, xrSession, without a stencil buffer. xrSession.updateRenderState({ baseLayer: new XRWebGLLayer(xrSession, gl, { stencil: false }); }); Specifications Specification Status ...
msCachingEnabled - Web APIs
every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The msCachingEnabled method gets the current caching state for an XMLHttpRequest. This proprietary method is specific to Internet Explorer and Microsoft Edge. Syntax var cacheState = XMLHttpRequest.msCachingEnabled(); Parameters cacheState[out, retval] Type =
boolean. If true, XMLHttpRequest is cached to disk. If false, it is not written to disk. Return value Type:
boolean. If true, XMLHttpRequest is cached to disk. If false, it is not written to disk. See also msCaching property Microsoft API extensions ...
msCapsLockWarningOff - Web APIs
turns automatic caps lock warning on or off for validated password input fields. This proprietary property is specific to Internet Explorer and Microsoft Edge. Starting with Internet Explorer 10, input type=password fields will automatically display a warning if the caps lock is on. This property enables this warning to be disabled. Syntax document.msCapsLockWarningOff = true; Value Type:
boolean False: Default. Automatic caps lock warning is turned on. True: Automatic caps lock warning is turned off. Example Fiddle: http://jsfiddle.net/jonathansampson/mqcHA/1/ Example 2 <html> <head> <title>msCapsLockWarningOff example</title> <script type="text/javascript"> function capsOff() { if (document.msCapsLockWarningOff == false) { documen...
msGetPropertyEnabled - Web APIs
patibilities between implementations and the behavior may change in the future. The msGetPropertyEnabled returns whether a given property in the style object is enabled. This proprietary method is specific to Internet Explorer browser. Syntax var retVal = style.msGetPropertyEnabled(name); Parameters name [in] Type: String The name of the property to enable. Return value Type:
Boolean If false, the property is not enabled. If true, the property is enabled. See also Microsoft API extensions ...
msGetRegionContent - Web APIs
he future. The msGetRegionContent returns an array of Range instances corresponding to the content from the region flow that is positioned in the region. This proprietary method is specific to Internet Explorer browser. Syntax var retVal = Element.msGetRegionContent(); Parameters retVal [out, reval] Type: MSRangeCollection The name of the property to enable. Return value Type:
Boolean Returned ranges are sorted by document position and do not overlap. If an element is not a region, this method throws a DOMException with the InvalidAccessError error code. This is only available to regions that are document elements and not to regions that are pseudo-elements. See also Microsoft API extensions ...
msPutPropertyEnabled - Web APIs
patibilities between implementations and the behavior may change in the future. The msPutPropertyEnabled method sets whether a given property in the style object is enabled or disabled. This proprietary method is specific to Internet Explorer and Microsoft Edge. Syntax var retval = style.msPutPropertyEnabled(propertyName, true); Parameters name[in]: Name of the property. (String)
boolean[in]: True = Enable the property. False = Disable the property. Return value Type = HRESULT: If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. See also CSS Style Declaration Microsoft API extensions ...
ARIA live regions - Accessibility
DA added some basic support for Live Regions for Mozilla Firefox back in 2008 and was improved in 2010 and 2014. In 2015, basic support was also added for Internet Explorer (MSHTML). The Paciello Group has some information about the state of the support of Live Regions (2014). Paul J. Adam has researched the support of Aria-Atomic and Aria-Relevant in particular. aria-atomic: The aria-atomic=
BOOLEAN is used to set whether or not the screen reader should always present the live region as a whole, even if only part of the region changes. The possible settings are: false or true. The default setting is false. aria-relevant: The aria-relevant=[LIST_OF_CHANGES] is used to set what types of changes are relevant to a live region. The possible settings are one or more of: additions, removals, text,...
ARIA: tab role - Accessibility
tablist. When working with elements with the tab role, when they are selected or active, they should have their aria-selected attribute set to true, otherwise it should be set to false. When a tab is selected or active, its controlled tabpanel should have its aria-expanded and hidden attributes set to true, otherwise they should be set to false. Associated Roles and Attributes aria-selected
boolean aria-controls id of element with tabpanel role id content Keyboard interaction Key Action Tab When focus is outside of the tablist moves focus to the active tab. If focus is on the active tab moves focus to the next element in the keyboard focus order, ideally the active tab's associated tabpanel. -> Focuses and optionally activates the next tab in t...
ARIA: listbox role - Accessibility
he user can select more than one option. If set to true, every selectable option should have an aria-selected attribute included and set to true or false. Options which are not selectable should not have the aria-selected attribute. If false or omitted, only the currently selected option, if any option is selected, needs the aria-selected attribute, and it must be set to true. aria-required A
Boolean attribute which indicates that an option with a non-empty string value must be selected. aria-readonly The user cannot change which options are selected or unselected, but the listbox is otherwise operable. aria-label A human-readable string value which identifies the listbox. If there's a visible label, then aria-labelledby should be used instead to refer to that label. aria-labelledby Id...
-webkit-device-pixel-ratio - CSS: Cascading Style Sheets
Note: This media feature is a WebKit feature. If possible, use the resolution media feature query instead. Syntax The -webkit-device-pixel-ratio feature is specified as a <number> value. It is a range feature, meaning that you can also use the prefixed -webkit-min-device-pixel-ratio and -webkit-max-device-pixel-ratio variants to query minimum and maximum values, respectively. Values <number> The number of device pixels used to represent each CSS px. Although the value is a <number>, and thus doesn't syntactically allow units, its implicit unit is dppx. ...
-webkit-transform-2d - CSS: Cascading Style Sheets
Values true The browser supports the 2D CSS transforms with the -webkit prefix. false The 2D CSS transforms prefixed with -webkit are not supported by the browser. Examples Basic example @media (-webkit-transform-2d) { div { -webkit-transform: translate(100px, 100px); } } This media feature is only supported by WebKit. ...
-webkit-transition - CSS: Cascading Style Sheets
It was never supported in browsers not based on WebKit or Blink. Apple has a description in Safari CSS Reference; this is now called simply transition there. Note: You should not use this media feature; it was never specified, has never been widely implemented, and has been removed from all browsers. Use an @supports feature query instead. Syntax @media (-webkit-transition) { /* CSS to use if transitions are supported */ } Examples Use @supports instead Do not use the -webkit-transition media feature. ...
prefers-reduced-data - CSS: Cascading Style Sheets
Note: This feature is not supported by any user agent and its specifics are subject to change. The prefers-reduced-data CSS media feature is used to detect if the user has requested the web content that consumes less internet traffic. Syntax no-preference Indicates that the user has made no preference known to the system. This keyword value evaluates as false in the
boolean context. reduce Indicates that user has expressed the preference for lightweight alternate content. User preferences Currently no user agent implements this feature, although various operating systems do support such preferences and if this media query is ever implemented user agents will likely rely on the settings provided by the operating system. Examples Note: No browser currently implements thi...
Border-image generator - CSS: Cascading Style Sheets
0 : 1; else this.state = 1 ^ this.state; if (active !== this) { if (active) active.toggle(false); active = this; } if (this.state === 0) this.dropmenu.setAttribute('data-hidden', 'true'); else this.dropmenu.removeAttribute('data-hidden'); }; var clickOut = function clickOut(e) { if (active.state === 0 || e.target === acti...
Using media queries - CSS: Cascading Style Sheets
max-width: 30em) { ... } In Media Queries Level 4 this can be written as: @media (width <= 30em) { ... } Using min- and max- we might test for a width between two values like so: @media (min-width: 30em) and (max-width: 50em) { ... } This would convert to the Level 4 syntax as: @media (30em <= width <= 50em ) { ... } Media Queries Level 4 also adds ways to combine media queries using full
boolean algebra with and, not, and or. Negating a feature with not Using not() around a media feature negates that feature in the query. For example, not(hover) would match if the device had no hover capability: @media (not(hover)) { ... } Testing for multiple features with or You can use or to test for a match among more than one feature, resolving to true if any of the features are true. For examp...
Linear-gradient Generator - CSS: Cascading Style Sheets
0 : 1; else this.state = 1 ^ this.state; if (active !== this) { if (active) active.toggle(false); active = this; } if (this.state === 0) this.dropmenu.setAttribute('data-hidden', 'true'); else this.dropmenu.removeAttribute('data-hidden'); }; DropDown.prototype.updateValue = function updateValue(e) { if (Date.now() - this.ti...
font-feature-settings - CSS: Cascading Style Sheets
ed to the text layout engine to enable or disable font features. The tag is always a <string> of 4 ASCII characters. If it has more or less characters, or if it contains characters outside the U+20 - U+7E codepoint range, the whole property is invalid. The value is a positive integer. The two keywords on and off are synonyms for 1 and 0 respectively. If no value is set, the default is 1. For non-
Boolean OpenType features (e.g. stylistic alternates), the value implies a particular glyph to be selected; for
Boolean values, it is a switch. Formal definition Initial valuenormalApplies toall elements. It also applies to ::first-letter and ::first-line.InheritedyesComputed valueas specifiedAnimation typediscrete Formal syntax normal | <feature-tag-value>#where <feature-tag-value> = <string> [ <in...
HTML attribute: capture - HTML: Hypertext Markup Language
s value a string that specifies which camera to use for capture of image or video data, if the accept attribute indicates that the input should be of one of those types. Value Description user The user-facing camera and/or microphone should be used. environment The outward-facing camera and/or microphone should be used Note: capture was previously a
Boolean attribute which, if present, requested that the device's media capture device(s) such as camera or microphone be used instead of requesting a file input. Examples When set on a file input type, operating systems with microphones and cameras will display a user interface allowing the selection from an existing file or the creating of a new one. <p> <label for="soundFile">What does your voi...
HTML attribute: multiple - HTML: Hypertext Markup Language
Valid for the email and file input types and the <select>, the manner by which the user opts for multiple values depends on the form control. Depending on the type, the form control may have a different appearance if the multiple attribute is set. For the file input type, the native messaging the browser provides differs. In Firefox, the file input reads "No files selected" when the attribute is present and "No file selected" when not, when no files are selected. Most browsers displaying a scrolling list box for a <select> control with the multiple attribute set versus a single line dropdown when the attribute is ommitted. ...
HTML attribute: readonly - HTML: Hypertext Markup Language
If the readonly attribute is specified on an input element, because the user can not edit the input, the element does not participate in constraint validation. The readonly attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local, and number<input> types and the <textarea> form control elements. If present on any of these input types and elements, the :read-only pseudo class will match. If the attribute is not included, the :read-write pseudo class will match. ...
HTML attribute: required - HTML: Hypertext Markup Language
The required attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local, number, checkbox, radio, file, <input> types along with the <select> and <textarea> form control elements. If present on any of these input types and elements, the :required pseudo class will match. If the attribute is not included, the :optional pseudo class will match. The attribute is not supported or relevant to range and color, as both have default values. It is also not supported on hidden as it can not be expected that a user to fill out a form that is hidden. ...
<dir>: The Directory element (obsolete) - HTML: Hypertext Markup Language
ncluding lists of files. Usage note: Do not use this element. Though present in early HTML specifications, it has been deprecated in HTML 4, and has since been removed entirely. No major browsers support this element. DOM interface This element implements the HTMLDirectoryElement interface. Attributes Like all other HTML elements, this element supports the global attributes. compact This
Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent and it doesn't work in all browsers. Usage note: Do not use this attribute, as it has been deprecated: the <dir> element should be styled using CSS. To give a similar effect as that achieved with the compact attribute, the CSS property line-height can be used with a...
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
ion for the <fieldset>. It takes few attributes, the most notable of which are form, which can contain the id of a <form> on the same page, allowing you to make the <fieldset> part of that <form> even if it is not nested inside it, and disabled, which allows you to disable the <fieldset> and all its contents in one go. Attributes This element includes the global attributes. disabled If this
Boolean attribute is set, all form controls that are descendants of the <fieldset>, are disabled, meaning they are not editable and won't be submitted along with the <form>. They won't receive any browsing events, like mouse clicks or focus-related events. By default browsers display such controls grayed out. Note that form elements inside the <legend> element won't be disabled. form This attribute tak...
<form> - HTML: Hypertext Markup Language
T method; form data sent as the request body. get: The GET method; form data appended to the action URL with a ? separator. Use this method when the form has no side-effects. dialog: When the form is inside a <dialog>, closes the dialog on submission. This value is overridden by formmethod attributes on <button>, <input type="submit">, or <input type="image"> elements. novalidate This
Boolean attribute indicates that the form shouldn't be validated when submitted. If this attribute is not set (and therefore the form is validated), it can be overridden by a formnovalidate attribute on a <button>, <input type="submit">, or <input type="image"> element belonging to the form. target Indicates where to display the response after submitting the form. In HTML 4, this is the name/keyword fo...
<img>: The Image Embed element - HTML: Hypertext Markup Language
e is of high priority. low: the image is of low priority. intrinsicsize This attribute tells the browser to ignore the actual intrinsic size of the image and pretend it's the size specified in the attribute. Specifically, the image would raster at these dimensions and naturalWidth/naturalHeight on images would return the values specified in this attribute. Explainer, examples ismap This
Boolean attribute indicates that the image is part of a server-side map. If so, the coordinates where the user clicked on the image are sent to the server. Note: This attribute is allowed only if the <img> element is a descendant of an <a> element with a valid href attribute. This gives users without pointing devices a fallback destination. loading Indicates how the browser should load the image...
<input type="radio"> - HTML: Hypertext Markup Language
+ entry[0] + "=" + entry[1] + "\r"; }; log.innerText = output; event.preventDefault(); }, false); Try this example out and see how there's never more than one result for the contact group. Additional attributes In addition to the common attributes shared by all <input> elements, radio inputs support the following attributes: Attribute Description checked A
Boolean indicating whether or not this radio button is the currently-selected item in the group value The string to use as the value of the radio when submitting the form, if the radio is currently toggled on checked A
Boolean attribute which, if present, indicates that this radio button is the currently selected one in the group. Unlike other browsers, Firefox by default persists th...
<isindex> - HTML: Hypertext Markup Language
cks OK, and the query results come up in the table of contents window." A thread about isindex in November 1992, Kevin Hoadley questioned the need for an isindex element and proposed to drop it. He proposed to have instead an input element (idea supported by Steve Putz). Tim Berners-Lee explains the purpose of isindex resulting in aggregated search results. Kevin replies that he doesn't like the
boolean nature of isindex and would prefer a system where everything is searchable and proposes to extend the current WWW Framework with a specific httpd configuration and defined that some URIs mapping create search queries. In 2016, after it was removed from Edge and Chrome, it was proposed to remove isindex from the standard; this removal was completed the next day, after which Safari and Firefox als...
<keygen> - HTML: Hypertext Markup Language
ement, palpable content. Permitted content None, it is an empty element. Tag omission Must have a start tag and must not have an end tag. Permitted parents Any element that accepts phrasing content. Permitted ARIA roles None DOM interface HTMLKeygenElement Attributes This element includes the global attributes. autofocus This
Boolean attribute lets you specify that 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 element in a document can have the autofocus attribute, which is a
Boolean. challenge A challenge string that is submitted along with the public key. Defaults to an empty string if not specified. disabled This Boolea...
<link>: The External Resource Link element - HTML: Hypertext Markup Language
resource will be tainted and its usage restricted. If the attribute is not present, the resource is fetched without a CORS request (i.e. without sending the Origin HTTP header), preventing its non-tainted usage. If invalid, it is handled as if the enumerated keyword anonymous was used. See CORS settings attributes for additional information. disabled For rel="stylesheet" only, the disabled
Boolean attribute indicates whether or not the described stylesheet should be loaded and applied to the document. If disabled is specified in the HTML when it is loaded, the stylesheet will not be loaded during page load. Instead, the stylesheet will be loaded on-demand, if and when the disabled attribute is changed to false or removed. Setting the disabled property in the DOM causes the stylesheet to ...
<ol>: The Ordered List element - HTML: Hypertext Markup Language
rting and ending tag are mandatory. Permitted parents Any element that accepts flow content. Implicit ARIA role list Permitted ARIA roles directory, group, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar, tree DOM interface HTMLOListElement Attributes This element also accepts the global attributes. reversed This
Boolean attribute specifies that the list's items are in reverse order. Items will be numbered from high to low. start An integer to start counting from for the list items. Always an Arabic numeral (1, 2, 3, etc.), even when the numbering type is letters or Roman numerals. For example, to start numbering elements from the letter "d" or the Roman numeral "iv," use start="4". type Sets the numbering ty...
<optgroup> - HTML: Hypertext Markup Language
followed by another <optgroup> element, or if the parent element has no more content. Permitted parents A <select> element. Implicit ARIA role group Permitted ARIA roles No role permitted DOM interface HTMLOptGroupElement Note: Optgroup elements may not be nested. Attributes This element includes the global attributes. disabled If this
Boolean attribute is set, none of the items in this option group is selectable. Often browsers grey out such control and it won't receive any browsing events, like mouse clicks or focus-related ones. label The name of the group of options, which the browser can use when labeling the options in the user interface. This attribute is mandatory if this element is used. Examples <select> <optgroup labe...
<ul>: The Unordered List element - HTML: Hypertext Markup Language
starting and ending tag are mandatory. Permitted parents Any element that accepts flow content. Implicit ARIA role list Permitted ARIA roles directory, group, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar, tree DOM Interface HTMLUListElement Attributes This element includes the global attributes. compact This
Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent, and it doesn't work in all browsers. Warning: Do not use this attribute, as it has been deprecated: use CSS instead. To give a similar effect as the compact attribute, the CSS property line-height can be used with a value of 80%. type This attribute sets...
contenteditable - HTML: Hypertext Markup Language
f the attribute is given without a value, like <label contenteditable>Example Label</label>, its value is treated as an empty string. If this attribute is missing or its value is invalid, its value is inherited from its parent element: so the element is editable if its parent is editable. Note that although its allowed values include true and false, this attribute is an enumerated one and not a
Boolean one. You can set the color used to draw the text insertion caret with the CSS caret-color property. Specifications Specification Status Comment HTML Living StandardThe definition of 'contenteditable' in that specification. Living Standard No change from latest snapshot, HTML 5.2 HTML 5.2The definition of 'contenteditable' in that specification. Rec...
hidden - HTML: Hypertext Markup Language
For example, it can be used to hide elements of the page that can't be used until the login process has been completed. Browsers won't render elements with the hidden attribute set. 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. The hidden attribute must not be used to hide content just from one presentation. If something is marked hidden, it is hidden from all presentations, including, for instance, screen readers. ...
itemscope - HTML: Hypertext Markup Language
Specifying the itemscope attribute for an element creates a new item, which results in a number of name-value pairs that are associated with the element. A related attribute, itemtype, is used to specify the valid URL of a vocabulary (such as schema.org) that describes the item and its properties context. In each of the following examples, the vocabulary is from schema.org. Every HTML element may have an itemscope attribute specified. An itemscope element that does not have an associated itemtype must have an associated itemref. Note: Find more about itemtype attributes at http://schema.org/Thing Simple example HTML The following example specifies the itemscope attribute. ...
spellcheck - HTML: Hypertext Markup Language
the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. It may have the following values: true, which indicates that the element should be, if possible, checked for spelling errors; false, which indicates that the element should not be checked for spelling errors. Note: The spellcheck attribute is an enumerated one and not a
Boolean one. This means that the explicit usage of one of the values true or false is mandatory, and that a shorthand like <textarea spellcheck></textarea> is not allowed. The correct usage is <textarea spellcheck="true"></textarea>. If this attribute is not set, its default value is element-type and browser-defined. This default value may also be inherited, which means that the element content will be...
Global attributes - HTML: Hypertext Markup Language
API. It can have the following values: copy, which indicates that dropping will create a copy of the element that was dragged move, which indicates that the element that was dragged will be moved to this new location. link, will create a link to the dragged data. exportparts Used to transitively export shadow parts from a nested shadow tree into a containing light tree. hidden A
Boolean attribute indicates that the element is not yet, or is no longer, relevant. For example, it can be used to hide elements of the page that can't be used until the login process has been completed. The browser won't render such elements. This attribute must not be used to hide content that could legitimately be shown. id Defines a unique identifier (ID) which must be unique in the whole document.
Cross-Origin Resource Sharing (CORS) - HTTP
By default, the invocation is made without Cookies. Since this is a simple GET request, it is not preflighted, but the browser will reject any response that does not have the Access-Control-Allow-Credentials: true header, and not make the response available to the invoking web content. Here is a sample exchange between client and server: GET /resources/credentialed-content/ HTTP/1.1 Ho...
Large-Allocation - HTTP
Large-Allocation header, however Large-Allocation process creation is disabled on non-Win32 platforms. Firefox currently only supports the Large-Allocation header in our 32-bit Windows builds, as memory fragmentation is not an issue in 64-bit builds. If you are running a non-win32 version of Firefox, this error will appear. This check can be disabled with the "dom.largeAllocation. forceEnable"
boolean preferece in about:config. Specifications Not part of any current specifications. An explainer of the ideas behind this header can be found in this document. ...
Save-Data - HTTP
This could be for reasons such as high transfer costs, slow connection speeds, etc. A value of On indicates explicit user opt-in into a reduced data usage mode on the client, and when communicated to origins allows them to deliver alternative content to reduce the data downloaded such as smaller image and video resources, different markup and styling, disabled polling and automatic updates, and so on. Note: Disabling HTTP/2 Server Push (RFC 7540, section 8.2: Server Push) might be desirable too for reducing data downloads. ...
Sec-Fetch-User - HTTP
The Sec-Fetch-User fetch metadata header indicates whether or not a navigation request was triggered by a user activation. Header type Fetch Metadata Request Header Forbidden header name yes, since it has prefix Sec- CORS-safelisted request header Syntax Sec-Fetch-User: ?0 Sec-Fetch-User: ?1 Values The value is a
Boolean Structured Header. ?0 The navigation request was triggered by a user activation. ?1 The navigation request was triggered by something other than a user activation. Examples TODO Specifications Specification Title Fetch Metadata Request Headers The Sec-Fetch-User HTTP Request Header ...
Firefox user agent string reference - HTTP
to achieve maximum compatibility with websites that expect Firefox. firefoxversion will generally represent the equivalent Firefox release corresponding to the given Gecko version. Some Gecko-based browsers may not opt into using this token; for this reason, sniffers should be looking for Gecko -- not Firefox! Whether this token appears is controlled by the "general.useragent.compatMode.firefox"
boolean pref. Mobile and Tablet indicators Only from Firefox 11 onwards. The platform part of the UA string indicates if Firefox is running on a phone-sized or tablet device. When Firefox runs on a device that has the phone form factor, there is a Mobile; token in the platform part of the UA string. When Firefox runs on a tablet device, there is a Tablet; token in the platform part of the UA stri...
HTTP Index - HTTP
with requests. 176 Retry-After HTTP, Reference, Response, Response Header, header The Retry-After response HTTP header indicates how long the user agent should wait before making a follow-up request. There are three main cases this header is used: 177 Save-Data HTTP, HTTP Header, Reference, Request header, Save-Data, header The Save-Data header field is a
boolean which, in requests, indicates the client's preference for reduced data usage. This could be for reasons such as high transfer costs, slow connection speeds, etc. 178 Sec-WebSocket-Accept Draft, HTTP, NeedsCompatTable, NeedsContent, Reference, Sec-WebSocket-Accept, WebSockets, header The Sec-WebSocket-Accept header is used in the websocket opening handshake. It would appear in...
Indexed collections - JavaScript
= 3 console.log(cats) // logs [ <3 empty items> ] Iterating over arrays A common operation is to iterate over the values of an array, processing each one in some way. ...
Introduction - JavaScript
t have Java's static typing and strong type checking. JavaScript follows most Java expression syntax, naming conventions and basic control-flow constructs which was the reason why it was renamed from LiveScript to JavaScript. In contrast to Java's compile-time system of classes built by declarations, JavaScript supports a runtime system based on a small number of data types representing numeric,
Boolean, and string values. JavaScript has a prototype-based object model instead of the more common class-based object model. The prototype-based model provides dynamic inheritance; that is, what is inherited can vary for individual objects. JavaScript also supports functions without any special declarative requirements. Functions can be properties of objects, executing as loosely typed methods. JavaSc...
Keyed collections - JavaScript
This can be bypassed using map = Object.create(null).) These three tips can help you to decide whether to use a Map or an Object: Use maps over objects when keys are unknown until run time, and when all keys are the same type and all values are the same type. Use maps if there is a need to store primitive values as keys because object treats each key as a string whether it's a number value,
boolean value or any other primitive value. Use objects when there is logic that operates on individual elements. WeakMap object The WeakMap object is a collection of key/value pairs in which the keys are objects only and the values can be arbitrary values. The object references in the keys are held weakly, meaning that they are a target of garbage collection (GC) if there is no other reference to th...
Meta programming - JavaScript
ly(RegExp.prototype.exec, /ab/, ['confabulation']).index // 4 Reflect.apply(''.charAt, 'ponies', [3]) // "i" Checking if property definition has been successful With Object.defineProperty, which returns an object if successful, or throws a TypeError otherwise, you would use a try...catch block to catch any error that occurred while defining a property. Because Reflect.defineProperty returns a
Boolean success status, you can just use an if...else block here: if (Reflect.defineProperty(target, property, attributes)) { // success } else { // failure } << PreviousNext >> ...
Unicode property escapes - JavaScript
For instance, unicode property escapes can be used to match emojis, punctuations, letters (even letters from specific languages or scripts), etc. Note: For Unicode property escapes to work, a regular expression must use the u flag which indicates a string must be considered as a series of Unicode code points. See also RegExp.prototype.unicode. ...
JavaScript technologies overview - JavaScript
ittee as a language named ECMAScript. This core language is also used in non-browser environments, for example in node.js. What falls under the ECMAScript scope? Among other things, ECMAScript defines: Language syntax (parsing rules, keywords, control flow, object literal initialization, ...) Error handling mechanisms (throw, try...catch, ability to create user-defined Error types) Types (
boolean, number, string, function, object, ...) The global object. In a browser, this global object is the window object, but ECMAScript only defines the APIs not specific to browsers, e.g. parseInt, parseFloat, decodeURI, encodeURI... A prototype-based inheritance mechanism Built-in objects and functions (JSON, Math, Array.prototype methods, Object introspection methods, etc.) Strict mode Browser ...
Array.prototype.concat() - JavaScript
to the new array as follows: Object references (and not the actual object): concat copies object references into the new array. Both the original and new array refer to the same object. That is, if a referenced object is modified, the changes are visible to both the new and original arrays. This includes elements of array arguments that are also arrays. Data types such as strings, numbers and
booleans (not String, Number, and
Boolean objects): concat copies the values of strings and numbers into the new array. Note: Concatenating array(s)/value(s) will leave the originals untouched. Furthermore, any operation on the new array (except operations on elements which are object references) will have no effect on the original arrays, and vice versa. Examples Concatenating two arrays The foll...
Array.prototype.find() - JavaScript
) { throw TypeError('predicate must be a function'); } // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. var thisArg = arguments[1]; // 5. Let k be 0. var k = 0; // 6. Repeat, while k < len while (k < len) { // a. Let Pk be ! ToString(k). // b. Let kValue be ? Get(O, Pk). // c. Let testResult be To
Boolean(? Call(predicate, T, << kValue, k, O >>)). // d. If testResult is true, return kValue. var kValue = o[k]; if (predicate.call(thisArg, kValue, k, o)) { return kValue; } // e. Increase k by 1. k++; } // 7. Return undefined. return undefined; }, configurable: true, writable: true }); } If you need to support...
Array.prototype.findIndex() - JavaScript
throw new TypeError('predicate must be a function'); } // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. var thisArg = arguments[1]; // 5. Let k be 0. var k = 0; // 6. Repeat, while k < len while (k < len) { // a. Let Pk be ! ToString(k). // b. Let kValue be ? Get(O, Pk). // c. Let testResult be To
Boolean(? Call(predicate, T, << kValue, k, O >>)). // d. If testResult is true, return k. var kValue = o[k]; if (predicate.call(thisArg, kValue, k, o)) { return k; } // e. Increase k by 1. k++; } // 7. Return -1. return -1; }, configurable: true, writable: true }); } If you need to support truly obsolete JavaScri...
Array.prototype.includes() - JavaScript
fromIndex Optional The position in this array at which to begin searching for valueToFind. The first element to be searched is found at fromIndex for positive values of fromIndex, or at arr.length + fromIndex for negative values of fromIndex (using the absolute value of fromIndex as the number of elements from the end of the array at which to start the search). Defaults to 0. Return value A
Boolean which is true if the value valueToFind is found within the array (or the part of the array indicated by the index fromIndex, if specified). Values of zero are all considered to be equal, regardless of sign. (That is, -0 is considered to be equal to both 0 and +0), but false is not considered to be the same as 0. Note: Technically speaking, includes() uses the sameValueZero algorithm to determi...
Array.prototype.slice() - JavaScript
py of elements from the original array. Elements of the original array are copied into the returned array as follows: For object references (and not the actual object), slice copies object references into the new array. Both the original and new array refer to the same object. If a referenced object changes, the changes are visible to both the new and original arrays. For strings, numbers and
booleans (not String, Number and
Boolean objects), slice copies the values into the new array. Changes to the string, number, or
boolean in one array do not affect the other array. If a new element is added to either array, the other array is not affected. Examples Return a portion of an existing array let fruits = ['Banana', 'Orange', 'Lemon', 'Apple', 'Mango'] let citrus = fruits.slice(1, 3) // f...
Atomics.isLockFree() - JavaScript
is one of the BYTES_PER_ELEMENT property of integer TypedArray types. 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. Syntax Atomics.isLockFree(size) Parameters size The size in bytes to check. Return value A
Boolean indicating whether the operation is lock free. Examples Using isLockFree Atomics.isLockFree(1); // true Atomics.isLockFree(2); // true Atomics.isLockFree(3); // false Atomics.isLockFree(4); // true Atomics.isLockFree(5); // false Atomics.isLockFree(6); // false Atomics.isLockFree(7); // false Atomics.isLockFree(8); // true Specifications Specification ECMAScript (ECMA-262)T...
BigInt - JavaScript
// ? [ -12n, 0, 0n, 4n, 4, 6, 10 ] Note that comparisons with Object-wrapped BigInts act as with other objects, only indicating equality when the same object instance is compared: 0n === Object(0n) // false Object(0n) === Object(0n) // false const o = Object(0n) o === o // true Conditionals A BigInt behaves like a Number in cases where: it is converted to a
Boolean: via the
Boolean function; when used with logical operators ||, &&, and !; or within a conditional test like an if statement. if (0n) { console.log('Hello from the if!') } else { console.log('Hello from the else!') } // ? "Hello from the else!" 0n || 12n // ? 12n 0n && 12n // ? 0n
Boolean(0n) // ? false
Boolean(12n) // ? true !12n // ? false !0n // ? true Constructor BigInt() ...
Generator.prototype.next() - JavaScript
can also provide a parameter to the next method to send a value to the generator. Syntax gen.next(value) Parameters value The value to send to the generator. The value will be assigned as a result of a yield expression. For example, in variable = yield expression, the value passed to the .next() function will be assigned to variable. Return value An Object with two properties: done (
boolean) Has the value true if the iterator is past the end of the iterated sequence. In this case value optionally specifies the return value of the iterator. Has the value false if the iterator was able to produce the next value in the sequence. This is equivalent of not specifying the done property altogether. value Any JavaScript value returned by the iterator. Can be omitted when done is true. ...
Generator.prototype.throw() - JavaScript
The throw() method resumes the execution of a generator by throwing an error into it and returns an object with two properties done and value. Syntax gen.throw(exception) Parameters exception The exception to throw. For debugging purposes, it is useful to make it an instanceof Error. Return value An Object with two properties: done (
boolean) Has the value true if the iterator is past the end of the iterated sequence. In this case value optionally specifies the return value of the iterator. Has the value false if the iterator was able to produce the next value in the sequence. This is equivalent of not specifying the done property altogether. value Any JavaScript value returned by the iterator. Can be omitted when done is true. Examples Using throw() The following e...
JSON.parse() - JavaScript
e https://github.com/mdn/interactive-examples and send us a pull request. Syntax JSON.parse(text[, reviver]) Parameters text The string to parse as JSON. See the JSON object for a description of JSON syntax. reviver Optional If a function, this prescribes how the value originally produced by parsing is transformed, before being returned. Return value The Object, Array, string, number,
boolean, or null value corresponding to the given JSON text. Exceptions Throws a SyntaxError exception if the string to parse is not valid JSON. Polyfill // From https://github.com/douglascrockford/JSON-js/blob/master/json2.js if (typeof JSON.parse !== "function") { var rx_one = /^[\],:{}\s]*$/; var rx_two = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g; var rx_three = /"[^"\\\n\r]*"|true|false|n...
JSON - JavaScript
The JSON object contains methods for parsing JavaScript Object Notation (JSON) and converting values to JSON. It can't be called or constructed, and aside from its two method properties, it has no interesting functionality of its own. Description JavaScript and JSON differences JSON is a syntax for serializing objects, arrays, numbers, strings,
booleans, and null. It is based upon JavaScript syntax but is distinct from it: some JavaScript is not JSON. Objects and Arrays Property names must be double-quoted strings; trailing commas are forbidden. Numbers Leading zeros are prohibited. A decimal point must be followed by at least one digit. NaN and Infinity are unsupported. Any JSON text is a valid JavaScript expression... ...But only in JavaScript engines that have implemented the propo...
Map.prototype.has() - JavaScript
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. Syntax myMap.has(key) Parameters key The key of the element to test for presence in the Map object. Return value true if an element with the specified key exists in the Map object; otherwise false. ...
Map - JavaScript
Map.prototype.clear() Removes all key-value pairs from the Map object. Map.prototype.delete(key) Returns true if an element in the Map object existed and has been removed, or false if the element does not exist. Map.prototype.has(key) will return false afterwards. Map.prototype.get(key) Returns the value associated to the key, or undefined if there is none. Map.prototype.has(key) Returns a
boolean asserting whether a value has been associated to the key in the Map object or not. Map.prototype.set(key, value) Sets the value for the key in the Map object. Returns the Map object. Iteration methods Map.prototype[@@iterator]() Returns a new Iterator object that contains an array of [key, value] for each element in the Map object in insertion order. Map.prototype.keys() Returns a new I...
Math.sign() - JavaScript
Examples Using Math.sign() Math.sign(3); // 1 Math.sign(-3); // -1 Math.sign('-3'); // -1 Math.sign(0); // 0 Math.sign(-0); // -0 Math.sign(NaN); // NaN Math.sign('foo'); // NaN Math.sign(); // NaN Specifications Specification ECMAScript (ECMA-262)The definition of 'Math.sign' in that specification. ...
Number.isFinite() - JavaScript
ethod determines whether the passed value is a finite number. 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. Syntax Number.isFinite(value) Parameters value The value to be tested for finiteness. Return value A
Boolean indicating whether or not the given value is a finite number. Description In comparison to the global isFinite() function, this method doesn't forcibly convert the parameter to a number. This means only values of the type number, that are also finite, return true. Polyfill if (Number.isFinite === undefined) Number.isFinite = function(value) { return typeof value === 'number' && isFinite(...
Number.isInteger() - JavaScript
hod determines whether the passed value is an integer. 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. Syntax Number.isInteger(value) Parameters value The value to be tested for being an integer. Return value A
Boolean indicating whether or not the given value is an integer. Description If the target value is an integer, return true, otherwise return false. If the value is NaN or Infinity, return false. The method will also return true for floating point numbers that can be represented as integer. Polyfill Number.isInteger = Number.isInteger || function(value) { return typeof value === 'number' && is...
Number.isSafeInteger() - JavaScript
ull precision requires using an arbitrary precision arithmetic library. See What Every Programmer Needs to Know about Floating Point Arithmetic for more information on floating point representations of numbers. For larger integers, consider using the BigInt type. Syntax Number.isSafeInteger(testValue) Parameters testValue The value to be tested for being a safe integer. Return value A
Boolean indicating whether or not the given value is a number that is a safe integer. Polyfill Number.isSafeInteger = Number.isSafeInteger || function (value) { return Number.isInteger(value) && Math.abs(value) <= Number.MAX_SAFE_INTEGER; }; Examples Using isSafeInteger Number.isSafeInteger(3); // true Number.isSafeInteger(Math.pow(2, 53)); // false Number.isSafeInteger(M...
Object.freeze() - JavaScript
obj1); obj1.internal.a = 'aValue'; obj1.internal.a // 'aValue' To be a constant object, the entire reference graph (direct and indirect references to other objects) must reference only immutable frozen objects. The object being frozen is said to be immutable because the entire object state (values and references to other objects) within the whole object is fixed. Note that strings, numbers, and
booleans are always immutable and that Functions and Arrays are objects. What is "shallow freeze"? The result of calling Object.freeze(object) only applies to the immediate properties of object itself and will prevent future property addition, removal or value re-assignment operations only on object. If the value of those properties are objects themselves, those objects are not frozen and may be the ta...
Object.prototype.hasOwnProperty() - JavaScript
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. Syntax obj.hasOwnProperty(prop) Parameters prop The String name or Symbol of the property to test. Return value A
Boolean indicating whether or not the object has the specified property as own property. Description All descendents of Object inherit the hasOwnProperty method. ...
Object.isExtensible() - JavaScript
is extensible (whether it can have new properties added to it). 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. Syntax Object.isExtensible(obj) Parameters obj The object which should be checked. Return value A
Boolean indicating whether or not the given object is extensible. Description Objects are extensible by default: they can have new properties added to them, and (in engines that support __proto__) their __proto__ property can be modified. An object can be marked as non-extensible using Object.preventExtensions(), Object.seal(), or Object.freeze(). Examples Using Object.isExtensible // New objects ar...
Object.isFrozen() - JavaScript
The Object.isFrozen() determines if an object is frozen. 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. Syntax Object.isFrozen(obj) Parameters obj The object which should be checked. Return value A
Boolean indicating whether or not the given object is frozen. Description An object is frozen if and only if it is not extensible, all its properties are non-configurable, and all its data properties (that is, properties which are not accessor properties with getter or setter components) are non-writable. Examples Using Object.isFrozen // A new object is extensible, so it is not frozen. Object.isFrozen({}); //...
Object.prototype.isPrototypeOf() - JavaScript
hub.com/mdn/interactive-examples and send us a pull request. isPrototypeOf() differs from the instanceof operator. In the expression "object instanceof AFunction", the object prototype chain is checked against AFunction.prototype, not against AFunction itself. Syntax prototypeObj.isPrototypeOf(object) Parameters object The object whose prototype chain will be searched. Return value A
Boolean indicating whether the calling object lies in the prototype chain of the specified object. Errors thrown TypeError A TypeError is thrown if prototypeObj is undefined or null. Description The isPrototypeOf() method allows you to check whether or not an object exists within another object's prototype chain. Examples Using isPrototypeOf This example demonstrates that Baz.prototype, Bar.pr...
Object.isSealed() - JavaScript
The Object.isSealed() method determines if an object is sealed. 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. Syntax Object.isSealed(obj) Parameters obj The object which should be checked. Return value A
Boolean indicating whether or not the given object is sealed. Description Returns true if the object is sealed, otherwise false. An object is sealed if it is not extensible and if all its properties are non-configurable and therefore not removable (but not necessarily non-writable). Examples Using Object.isSealed // Objects aren't sealed by default. var empty = {}; Object.isSealed(empty); // === false ...
Object.prototype.__proto__ - JavaScript
_ getter function exposes the value of the internal [[Prototype]] of an object. For objects created using an object literal, this value is Object.prototype. For objects created using array literals, this value is Array.prototype. For functions, this value is Function.prototype. For objects created using new fun, where fun is one of the built-in constructor functions provided by JavaScript (Array,
Boolean, Date, Number, Object, String, and so on -- including new constructors added as JavaScript evolves), this value is always fun.prototype. For objects created using new fun, where fun is a function defined in a script, this value is the value of fun.prototype. (That is, if the constructor didn't return an other object explicitly, or the fun.prototype has been reassigned since the instance was creat...
Object.setPrototypeOf() - JavaScript
Parameters obj The object which is to have its prototype set. prototype The object's new prototype (an object or null). Return value The specified object. Description Throws a TypeError exception if the object whose [[Prototype]] is to be modified is non-extensible according to Object.isExtensible(). Does nothing if the prototype parameter isn't an object or null (i.e., number, string,
boolean, or undefined). Otherwise, this method changes the [[Prototype]] of obj to the new value. Object.setPrototypeOf() is in the ECMAScript 2015 specification. It is generally considered the proper way to set the prototype of an object, vs. the more controversial Object.prototype.__proto__ property. Appending Prototype Chains A combination of Object.getPrototypeOf() and Object.prototype.__proto__ p...
Object.prototype.toSource() - JavaScript
d. For example: function Person(name) { this.name = name; } Person.prototype.toSource = function Person_toSource() { return 'new Person(' + uneval(this.name) + ')'; }; console.log(new Person('Joe').toSource()); // ---> new Person("Joe") Built-in toSource() methods Each core JavaScript type has its own toSource() method. These objects are: Array.prototype.toSource() -- Array object.
Boolean.prototype.toSource() --
Boolean object. Date.prototype.toSource() -- Date object. Function.prototype.toSource() -- Function object. Number.prototype.toSource() -- Number object. RegExp.prototype.toSource() -- RegExp object. String.prototype.toSource() -- String object. Symbol.prototype.toSource() -- Symbol object. Math.toSource() -- Returns the String "Math". Limitations on cyclic...
Object.prototype.valueOf() - JavaScript
ng code. An object's valueOf method is usually invoked by JavaScript, but you can invoke it yourself as follows: myNumberType.valueOf() Note: Objects in string contexts convert via the toString() method, which is different from String objects converting to string primitives using valueOf. All objects have a string conversion, if only "[object type]". But many objects do not convert to number,
boolean, or function. Examples Using valueOf on custom types function MyNumberType(n) { this.number = n; } MyNumberType.prototype.valueOf = function() { return this.number; }; var myObj = new MyNumberType(4); myObj + 3; // 7 Using unary plus +"5" // 5 (string to number) +"" // 0 (string to number) +"1 + 2" // NaN (doesn't evaluate) +new Date() // same as (new Date()).getTime() +"foo" // ...
handler.defineProperty() - JavaScript
ion(target, property, descriptor) { } }); Parameters The following parameters are passed to the defineProperty() method. this is bound to the handler. target The target object. property The name or Symbol of the property whose description is to be retrieved. descriptor The descriptor for the property being defined or modified. Return value The defineProperty() method must return a
Boolean indicating whether or not the property has been successfully defined. Description The handler.defineProperty() method is a trap for Object.defineProperty(). Interceptions This trap can intercept these operations: Object.defineProperty() Reflect.defineProperty() Invariants If the following invariants are violated, the proxy will throw a TypeError: A property cannot be added, if the t...
handler.deleteProperty() - JavaScript
interactive-examples and send us a pull request. Syntax const p = new Proxy(target, { deleteProperty: function(target, property) { } }); Parameters The following parameters are passed to the deleteProperty() method. this is bound to the handler. target The target object. property The name or Symbol of the property to delete. Return value The deleteProperty() method must return a
Boolean indicating whether or not the property has been successfully deleted. Description The handler.deleteProperty() method is a trap for the delete operator. Interceptions This trap can intercept these operations: Property deletion: delete proxy[foo] and delete proxy.foo Reflect.deleteProperty() Invariants If the following invariants are violated, the proxy will throw a TypeError: A prop...
handler.has() - JavaScript
se clone https://github.com/mdn/interactive-examples and send us a pull request. Syntax const p = new Proxy(target, { has: function(target, prop) { } }); Parameters The following parameters are passed to has() method. this is bound to the handler. target The target object. prop The name or Symbol of the property to check for existence. Return value The has() method must return a
boolean value. Description The handler.has() method is a trap for the in operator. Interceptions This trap can intercept these operations: Property query: foo in proxy Inherited property query: foo in Object.create(proxy) with check: with(proxy) { (foo); } Reflect.has() Invariants If the following invariants are violated, the proxy will throw a TypeError: A property cannot be reported as ...
handler.isExtensible() - JavaScript
e to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Syntax const p = new Proxy(target, { isExtensible: function(target) { } }); Parameters The following parameter is passed to the isExtensible() method. this is bound to the handler. target The target object. Return value The isExtensible() method must return a
boolean value. Description The handler.isExtensible() method is a trap for Object.isExtensible(). Interceptions This trap can intercept these operations: Object.isExtensible() Reflect.isExtensible() Invariants If the following invariants are violated, the proxy will throw a TypeError: Object.isExtensible(proxy) must return the same value as Object.isExtensible(target). Examples Trapping ...
handler.preventExtensions() - JavaScript
ctive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Syntax const p = new Proxy(target, { preventExtensions: function(target) { } }); Parameters The following parameter is passed to the preventExtensions() method. this is bound to the handler. target The target object. Return value The preventExtensions() method must return a
boolean value. Description The handler.preventExtensions() method is a trap for Object.preventExtensions(). Interceptions This trap can intercept these operations: Object.preventExtensions() Reflect.preventExtensions() Invariants If the following invariants are violated, the proxy will throw a TypeError: Object.preventExtensions(proxy) only returns true if Object.isExtensible(proxy) is fals...
handler.set() - JavaScript
xy itself. But a set() handler can also be called indirectly, via the prototype chain or various other ways. For example: Suppose a script does obj.name = "jen", and obj is not a proxy, and has no own property .name, but it has a proxy on its prototype chain. That proxy's set() handler will be called, and obj will be passed as the receiver. Return value The set() method should return a
boolean value. Return true to indicate that assignment succeeded. If the set() method returns false, and the assignment happened in strict-mode code, a TypeError will be thrown. Description The handler.set() method is a trap for setting property value. Interceptions This trap can intercept these operations: Property assignment: proxy[foo] = bar and proxy.foo = bar Inherited property assignme...
Reflect.deleteProperty() - JavaScript
ractive 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. Syntax Reflect.deleteProperty(target, propertyKey) Parameters target The target object on which to delete the property. propertyKey The name of the property to be deleted. Return value A
Boolean indicating whether or not the property was successfully deleted. Exceptions A TypeError, if target is not an Object. Description The Reflect.deleteProperty method allows you to delete a property on an object. It returns a
Boolean indicating whether or not the property was successfully deleted. It is almost identical to the non-strict delete operator. Examples Using Reflect.deleteProperty() ...
Reflect.has() - JavaScript
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. Syntax Reflect.has(target, propertyKey) Parameters target The target object in which to look for the property. propertyKey The name of the property to check. Return value A
Boolean indicating whether or not the target has the property. Exceptions A TypeError, if target is not an Object. Description The Reflect.has method allows you to check if a property is in an object. It works like the in operator as a function. Examples Using Reflect.has() Reflect.has({x: 0}, 'x') // true Reflect.has({x: 0}, 'y') // false // returns true for properties in the prototype chain R...
Reflect.isExtensible() - JavaScript
tensible(), but with some differences. 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. Syntax Reflect.isExtensible(target) Parameters target The target object which to check if it is extensible. Return value A
Boolean indicating whether or not the target is extensible. Exceptions A TypeError, if target is not an Object. Description The Reflect.isExtensible method allows you determine if an object is extensible (whether it can have new properties added to it). It is the same method as Object.isExtensible(). Examples Using Reflect.isExtensible() See also Object.isExtensible(). // New objects are extensib...
Reflect.preventExtensions() - JavaScript
ensions(), but with some differences. 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. Syntax Reflect.preventExtensions(target) Parameters target The target object on which to prevent extensions. Return value A
Boolean indicating whether or not the target was successfully set to prevent extensions. Exceptions A TypeError, if target is not an Object. Description The Reflect.preventExtensions() method allows you to prevent new properties from ever being added to an object (i.e., prevents future extensions to the object). It is similar to Object.preventExtensions(). Examples Using Reflect.preventExtensions()...
Reflect.set() - JavaScript
clone https://github.com/mdn/interactive-examples and send us a pull request. Syntax Reflect.set(target, propertyKey, value[, receiver]) Parameters target The target object on which to set the property. propertyKey The name of the property to set. value The value to set. receiver Optional The value of this provided for the call to target if a setter is encountered. Return value A
Boolean indicating whether or not setting the property was successful. Exceptions A TypeError, if target is not an Object. Description The Reflect.set method allows you to set a property on an object. It does property assignment and is like the property accessor syntax as a function. Examples Using Reflect.set() // Object let obj = {} Reflect.set(obj, 'prop', 'value') // true obj.prop // "value"...
Reflect.setPrototypeOf() - JavaScript
ctive 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. Syntax Reflect.setPrototypeOf(target, prototype) Parameters target The target object of which to set the prototype. prototype The object's new prototype (an object or null). Return value A
Boolean indicating whether or not the prototype was successfully set. Exceptions A TypeError, if target is not an Object or if prototype is neither an object nor null. Description The Reflect.setPrototypeOf method changes the prototype (i.e. the value of the internal [[Prototype]] property) of the specified object. Examples Using Reflect.setPrototypeOf() Reflect.setPrototypeOf({}, Object.prototype...
RegExp.prototype.dotAll - JavaScript
The dotAll property indicates whether or not the "s" flag is used with the regular expression. dotAll is a read-only property of an individual regular expression instance. Property attributes of RegExp.prototype.dotAll Writable no Enumerable no Configurable yes Description The value of dotAll is a
Boolean and true if the "s" flag was used; otherwise, false. The "s" flag indicates that the dot special character (".") should additionally match the following line terminator ("newline") characters in a string, which it would not match otherwise: U+000A LINE FEED (LF) ("\n") U+000D CARRIAGE RETURN (CR) ("\r") U+2028 LINE SEPARATOR U+2029 PARAGRAPH SEPARATOR This effectively means the dot will m...
RegExp.prototype.global - JavaScript
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. Property attributes of RegExp.prototype.global Writable no Enumerable no Configurable yes Description The value of global is a
Boolean and true if the "g" flag was used; otherwise, false. The "g" flag indicates that the regular expression should be tested against all possible matches in a string. A regular expression defined as both global ("g") and sticky ("y") will ignore the global flag and perform sticky matches. You cannot change this property directly. Examples Using global var regex = new RegExp('foo', 'g'); console.
RegExp.prototype.ignoreCase - JavaScript
Hub 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. Property attributes of RegExp.prototype.ignoreCase Writable no Enumerable no Configurable yes Description The value of ignoreCase is a
Boolean and true if the "i" flag was used; otherwise, false. The "i" flag indicates that case should be ignored while attempting a match in a string. You cannot change this property directly. Examples Using ignoreCase var regex = new RegExp('foo', 'i'); console.log(regex.ignoreCase); // true Specifications Specification ECMAScript (ECMA-262)The definition of 'RegExp.prototype.ig...
RegExp.prototype.multiline - JavaScript
itHub 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. Property attributes of RegExp.prototype.multiline Writable no Enumerable no Configurable yes Description The value of multiline is a
Boolean and is true if the "m" flag was used; otherwise, false. The "m" flag indicates that a multiline input string should be treated as multiple lines. For example, if "m" is used, "^" and "$" change from matching at only the start or end of the entire string to the start or end of any line within the string. You cannot change this property directly. Examples Using multiline var regex = new RegExp(...
RegExp.prototype.sticky - JavaScript
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. Property attributes of RegExp.prototype.sticky Writable no Enumerable no Configurable yes Description The value of sticky is a
Boolean and true if the "y" flag was used; otherwise, false. The "y" flag indicates that it matches only from the index indicated by the lastIndex property of this regular expression in the target string (and does not attempt to match from any later indexes). A regular expression defined as both sticky and global ignores the global flag. You cannot change this property directly. It is read-only. Exampl...
RegExp.prototype.unicode - JavaScript
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. Property attributes of RegExp.prototype.unicode Writable no Enumerable no Configurable yes Description The value of unicode is a
Boolean and true if the "u" flag was used; otherwise false. The "u" flag enables various Unicode-related features. With the "u" flag, any Unicode code point escapes will be interpreted as such, for example. You cannot change this property directly. It is read-only. Examples Using the unicode property var regex = new RegExp('\u{61}', 'u'); console.log(regex.unicode); // true Specifications ...
Set.prototype.has() - JavaScript
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. Syntax mySet.has(value); Parameters value The value to test for presence in the Set object. Return value Returns true if an element with the specified value exists in the Set object; otherwise false. Note: Technically speaking, has() uses the sameValueZero algorithm to determine whether the given element is found. ...
Set - JavaScript
Set.prototype.add(value) Appends value to the Set object. Returns the Set object. Set.prototype.clear() Removes all elements from the Set object. Set.prototype.delete(value) Removes the element associated to the value and returns the value that Set.prototype.has(value) would have previously returned. Set.prototype.has(value) will return false afterwards. Set.prototype.has(value) Returns a
boolean asserting whether an element is present with the given value in the Set object or not. Iteration methods Set.prototype[@@iterator]() Returns a new Iterator object that yields the values for each element in the Set object in insertion order. Set.prototype.keys() Returns a new Iterator object that yields the values for each element in the Set object in insertion order. (For Sets, this is th...
Planned changes to shared memory - JavaScript
still be used to get an instance. Unless the two headers mentioned above are set, the various postMessage() APIs will throw for SharedArrayBuffer objects. If they are set, postMessage() on Window objects and dedicated workers will function and allow for memory sharing. To avoid having to check whether postMessage() throws, self.crossOriginIsolated is being standardized (a getter that returns a
boolean; true if the headers are set), available in window and worker contexts. WebAssembly Shared Memory The WebAssembly Threads proposal allows WebAssembly.Memory objects to be created with a new shared constructor flag. When this flag is set to true, the constructed Memory object can be shared between workers via postMessage(), just like SharedArrayBuffer, and the backing buffer of the Memory objec...
String.prototype.search() - JavaScript
erted to a RegExp with new RegExp(regexp). Return value The index of the first match between the regular expression and the given string, or -1 if no match was found. Description When you want to know whether a pattern is found, and also know its index within a string, use search(). (If you only want to know if it exists, use the similar test() method on the RegExp prototype, which returns a
boolean.) For more information (but slower execution) use match() (similar to the regular expression exec() method). Examples Using search() The following example searches a string with two different regex objects to show a successful search (positive value) vs. an unsuccessful search (-1) let str = "hey JudE" let re = /[A-Z]/g let reDot = /[.]/g console.log(str.search(re)) // returns 4, which i...
String - JavaScript
rs, use a function similar to this: function isEqual(str1, str2) { return str1.toUpperCase() === str2.toUpperCase() } // isEqual Upper case is used instead of lower case in this function, due to problems with certain UTF-8 character conversions. String primitives and String objects Note that JavaScript distinguishes between String objects and primitive string values. (The same is true of
Boolean and Numbers.) String literals (denoted by double or single quotes) and strings returned from String calls in a non-constructor context (that is, called without using the new keyword) are primitive strings. JavaScript automatically converts primitives to String objects, so that it's possible to use String object methods for primitive strings. In contexts where a method is to be invoked on a primi...
Symbol() constructor - JavaScript
If you really want to create a Symbol wrapper object, you can use the Object() function: let sym = Symbol('foo'); let symObj = Object(sym); typeof sym // => "symbol" typeof symObj // => "object" Specifications Specification ECMAScript (ECMA-262)The definition of 'Symbol constructor' in that specification. ...
Symbol.isConcatSpreadable - JavaScript
Array.prototype.concat() method. 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. Description The @@isConcatSpreadable symbol (Symbol.isConcatSpreadable) can be defined as an own or inherited property and its value is a
boolean. It can control behavior for arrays and array-like objects: For array objects, the default behavior is to spread (flatten) elements. Symbol.isConcatSpreadable can avoid flattening in these cases. For array-like objects, the default behavior is no spreading or flattening. Symbol.isConcatSpreadable can force flattening in these cases. Property attributes of Symbol.isConcatSprea...
Symbol.toStringTag - JavaScript
and more Built-in toStringTag symbols Object.prototype.toString.call(new Map()); // "[object Map]" Object.prototype.toString.call(function* () {}); // "[object GeneratorFunction]" Object.prototype.toString.call(Promise.resolve()); // "[object Promise]"...
TypedArray.prototype.every() - JavaScript
hisArg Optional. Value to use as this when executing callback. Return value true if the callback function returns a truthy value for every array element; otherwise, false. Description The every method executes the provided callback function once for each element present in the typed array until it finds one where callback returns a falsy value (a value that becomes false when converted to a
Boolean). If such an element is found, the every method immediately returns false. Otherwise, if callback returned a true value for all elements, every will return true. callback is invoked with three arguments: the value of the element, the index of the element, and the array object being traversed. If a thisArg parameter is provided to every, it will be passed to callback when invoked, for use as its...
TypedArray.prototype.includes() - JavaScript
tory. 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. Syntax typedarray.includes(searchElement[, fromIndex]); Parameters searchElement The element to search for. fromIndex Optional. The position in this array at which to begin searching for searchElement; defaults to 0. Return value A
Boolean. Examples Using includes var uint8 = new Uint8Array([1,2,3]); uint8.includes(2); // true uint8.includes(4); // false uint8.includes(3, 3); // false // NaN handling (only true for Float32 and Float64) new Uint8Array([NaN]).includes(NaN); // false, since the NaN passed to the constructor gets converted to 0 new Float32Array([NaN]).includes(NaN); // true; new Float64Array([NaN]).include...
WeakMap - JavaScript
want to have a list of keys, you should use a Map. Constructor WeakMap() Creates a new WeakMap object. Instance methods WeakMap.prototype.delete(key) Removes any value associated to the key. WeakMap.prototype.has(key) will return false afterwards. WeakMap.prototype.get(key) Returns the value associated to the key, or undefined if there is none. WeakMap.prototype.has(key) Returns a
Boolean asserting whether a value has been associated to the key in the WeakMap object or not. WeakMap.prototype.set(key, value) Sets the value for the key in the WeakMap object. Returns the WeakMap object. Examples Using WeakMap const wm1 = new WeakMap(), wm2 = new WeakMap(), wm3 = new WeakMap(); const o1 = {}, o2 = function() {}, o3 = window; wm1.set(o1, 37); wm1.set(o2, ...
WeakSet.prototype.has() - JavaScript
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. Syntax ws.has(value); Parameters value Required. The object to test for presence in the WeakSet. Return value
Boolean Returns true if an element with the specified value exists in the WeakSet object; otherwise false. ...
WeakSet - JavaScript
tracking object references, especially if a very large number of objects is involved. Constructor WeakSet() Creates a new WeakSet object. Instance methods WeakSet.prototype.add(value) Appends value to the WeakSet object. WeakSet.prototype.delete(value) Removes value from the WeakSet. WeakSet.prototype.has(value) will return false afterwards. WeakSet.prototype.has(value) Returns a
boolean asserting whether value is present in the WeakSet object or not. Examples Using the WeakSet object const ws = new WeakSet(); const foo = {}; const bar = {}; ws.add(foo); ws.add(bar); ws.has(foo); // true ws.has(bar); // true ws.delete(foo); // removes foo from the set ws.has(foo); // false, foo has been removed ws.has(bar); // true, bar is retained Note that foo !== bar. While...
WebAssembly.Global() constructor - JavaScript
Script and importable/exportable across one or more WebAssembly.Module instances. This allows dynamic linking of multiple modules. Syntax new WebAssembly.Global(descriptor, value); Parameters descriptor A GlobalDescriptor dictionary object, which contains two properties: value: A USVString representing the data type of the global. This can be one of i32, i64, f32, and f64. mutable: A
boolean value that determines whether the global is mutable or not. By default, this is false. value The value the variable contains. This can be any value, as long as its type matches the variable's data type. If no value is specified, a typed 0 value is used, as specified by the DefaultValue algorithm. Examples Creating a new Global instance The following example shows a new global insta...
WebAssembly.Memory() constructor - JavaScript
f WebAssembly pages. maximum Optional The maximum size the WebAssembly Memory is allowed to grow to, in units of WebAssembly pages. When present, the maximum parameter acts as a hint to the engine to reserve memory up front. However, the engine may ignore or clamp this reservation request. Unshared WebAssembly memories don't need to set a maximum, but shared memories do. shared Optional A
boolean value that defines whether the memory is a shared memory or not. If set to true, it is a shared memory. The default is false. Note: A WebAssembly page has a constant size of 65,536 bytes, i.e., 64KiB. Exceptions If memoryDescriptor is not of type object, a TypeError is thrown. If maximum is specified and is smaller than initial, a RangeError is thrown. Examples Creating a new Memo...
WebAssembly.validate() - JavaScript
The WebAssembly.validate() function validates a given typed array of WebAssembly binary code, returning whether the bytes form a valid wasm module (true) or not (false). Syntax WebAssembly.validate(bufferSource); Parameters bufferSource A typed array or ArrayBuffer containing WebAssembly binary code to be validated. Return value A
boolean that specifies whether bufferSource is valid wasm code (true) or not (false). Exceptions If bufferSource is not a typed array or ArrayBuffer, a TypeError is thrown. Examples Using validate The following example (see the validate.html source code, and see it live too) fetches a .wasm module and converts it into a typed array. The validate() method is then used to check whether the module is valid. fetch('simple.wasm').then(response => response.
isNaN() - JavaScript
versions of the isNaN function specification, its behavior for non-numeric arguments has been confusing. When the argument to the isNaN function is not of type Number, the value is first coerced to a Number. The resulting value is then tested to determine whether it is NaN. Thus for non-numbers that when coerced to numeric type result in a valid non-NaN numeric value (notably the empty string and
boolean primitives, which when coerced give numeric values zero or one), the "false" returned value may be unexpected; the empty string, for example, is surely "not a number." The confusion stems from the fact that the term, "not a number", has a specific meaning for numbers represented as IEEE-754 floating-point values. The function should be interpreted as answering the question, "is this value, when c...
null - JavaScript
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. Syntax null Description The value null is written with a literal: null. null is not an identifier for a property of the global object, like undefined can be. Instead, null expresses a lack of identification, indicating that a variable points to no object. ...
Standard built-in objects - JavaScript
rather than on an object--directly return their results to the caller. eval() uneval() isFinite() isNaN() parseFloat() parseInt() encodeURI() encodeURIComponent() decodeURI() decodeURIComponent() Deprecated escape() unescape() Fundamental objects These are the fundamental, basic objects upon which all other objects are based. This includes general objects,
booleans, functions, and symbols. Object Function
Boolean Symbol Error objects Error objects are a special type of fundamental object. They include the basic Error type, as well as several specialized error types. Error AggregateError EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Numbers and dates These are the base objects representing numb...
Iteration protocols - JavaScript
es a standard way to produce a sequence of values (either finite or infinite), and potentially a return value when all values have been generated. An object is an iterator when it implements a next() method with the following semantics: Property Value next() A zero-argument function that returns an object with at least the following two properties: done (
boolean) Has the value false if the iterator was able to produce the next value in the sequence. (This is equivalent to not specifying the done property altogether.) Has the value true if the iterator has completed its sequence. In this case, value optionally specifies the return value of the iterator. value Any JavaScript value returned by the iterator. Can be omitted when don...
Greater than (>) - JavaScript
// false console.log(5 > "hello"); // false console.log("5" > 3n); // true console.log("3" > 5n); // false Number to Number comparison console.log(5 > 3); // true console.log(3 > 3); // false console.log(3 > 5); // false Number to BigInt comparison console.log(5n > 3); // true console.log(3 > 5n); // false Comparing
Boolean, null, undefined, NaN console.log(true > false); // true console.log(false > true); // false console.log(true > 0); // true console.log(true > 1); // false console.log(null > 0); // false console.log(1 > null); // true console.log(undefined > 3); // false console.log(3 > undefined); // false console.log(3 > NaN); // false console.log(NaN...
Greater than or equal (>=) - JavaScript
g("3" >= 5); // false console.log("hello" >= 5); // false console.log(5 >= "hello"); // false Number to Number comparison console.log(5 >= 3); // true console.log(3 >= 3); // true console.log(3 >= 5); // false Number to BigInt comparison console.log(5n >= 3); // true console.log(3 >= 3n); // true console.log(3 >= 5n); // false Comparing
Boolean, null, undefined, NaN console.log(true >= false); // true console.log(true >= true); // true console.log(false >= true); // false console.log(true >= 0); // true console.log(true >= 1); // true console.log(null >= 0); // true console.log(1 >= null); // true console.log(undefined >= 3); // false console.log(3 >= undefined); // false console.log(3 >= NaN); // fals...
Inequality (!=) - JavaScript
Unlike the strict inequality operator, it attempts to convert and compare operands that are of different types. 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. Syntax x != y Description The inequality operator checks whether its operands are not equal. ...
Less than or equal (<=) - JavaScript
og("3" <= 5); // true console.log("hello" <= 5); // false console.log(5 <= "hello"); // false Number to Number comparison console.log(5 <= 3); // false console.log(3 <= 3); // true console.log(3 <= 5); // true Number to BigInt comparison console.log(5n <= 3); // false console.log(3 <= 3n); // true console.log(3 <= 5n); // true Comparing
Boolean, null, undefined, NaN console.log(true <= false); // false console.log(true <= true); // true console.log(false <= true); // true console.log(true <= 0); // false console.log(true <= 1); // true console.log(null <= 0); // true console.log(1 <= null); // false console.log(undefined <= 3); // false console.log(3 <= undefined); // false console.log(3 <= NaN); // fa...
Strict inequality (!==) - JavaScript
Unlike the inequality operator, the strict inequality operator always considers operands of different types to be different. 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. Syntax x !== y Description The strict inequality operator checks whether its operands are not equal. ...
function* - JavaScript
r's next() method is called, the generator function's body is executed until the first yield expression, which specifies the value to be returned from the iterator or, with yield*, delegates to another generator function. The next() method returns an object with a value property containing the yielded value and a done property which indicates whether the generator has yielded its last value, as a
boolean. Calling the next() method with an argument will resume the generator function execution, replacing the yield expression where an execution was paused with the argument from next(). A return statement in a generator, when executed, will make the generator finish (i.e. the done property of the object returned by it will be set to true). If a value is returned, it will be set as the value property...
Strict mode - JavaScript
tted JavaScript be strict mode code and that it be invoked in a certain manner, substantially reduce the need for those runtime checks. First, the value passed as this to a function in strict mode is not forced into being an object (a.k.a. "boxed"). For a normal function, this is always an object: either the provided object if called with an object-valued this; the value, boxed, if called with a
Boolean, string, or number this; or the global object if called with an undefined or null this. (Use call, apply, or bind to specify a particular this.) Not only is automatic boxing a performance cost, but exposing the global object in browsers is a security hazard because the global object provides access to functionality that "secure" JavaScript environments must restrict. Thus for a strict mode functi...
JavaScript
t typed arrays JavaScript typed arrays provide a mechanism for accessing raw binary data. Memory Management Memory life cycle and garbage collection in JavaScript. Concurrency model and Event Loop JavaScript has a concurrency model based on an "event loop". Reference Browse the complete JavaScript reference documentation. Standard objects Get to know standard built-in objects Array,
Boolean, Date, Error, Function, JSON, Math, Number, Object, RegExp, String, Map, Set, WeakMap, WeakSet, and others. Expressions and operators Learn more about the behavior of JavaScript's operators instanceof, typeof, new, this, the operator precedence, and more. Statements and declarations Learn how do-while, for-in, for-of, try-catch, let, var, const, if-else, switch, and more JavaScript statements...
prefer_related_applications - Web app manifests
If the prefer_related_applications member is set to true, the user agent might suggest installing one of the related applications instead of this web app. If omitted, prefer_related_applications defaults to false. Examples "prefer_related_applications": true Specification Specification Status Comment Feedback Web App ManifestThe definition of 'prefer_related_applications' in that specification. Working Draft Initial definition. ...
<mstyle> - MathML
ation elements with some exceptions and additional attributes listed below. Attributes dir Overall directionality of formulas. Possible values are either ltr (left to right) or rtl (right to left). decimalpoint This attribute is specifying the character for the alignment point within <mstack> and <mtable> columns, if the decimalpoint value is used to specify the alignment. displaystyle A
Boolean value specifying whether more vertical space is used for displayed equations or, if set to false, a more compact layout is used to display formulas. The main effect is that larger versions of operators are displayed, when displaystyle is set to true. See also largeop and movablelimits on <mo>. infixlinebreakstyle Specifies the default linebreakstyle to use for infix operators. The values before...
Lazy loading - Web Performance
oading="lazy" alt="..." /> <iframe src="video-player.html" loading="lazy"></iframe> The load event fires when the eagerly-loaded content has all been loaded; at that time, it's entirely possible (or even likely) that there may be lazily-loaded images that are within the visual viewport that haven't yet loaded. You can determine if a given image has finished loading by examining the value of its
Boolean complete property. Polyfill Include this polyfill to provide support for older and currently incompatible browsers: loading-attribute-polyfill Intersection Observer API Intersection Observers allow the user to know when an observed element enters or exits the browser's viewport. Event handlers When browser compatibility is crucial, there are a few options: polyfill intersection observer...
<set> - SVG: Scalable Vector Graphics
For attributes that can be reasonably be interpolated, the <animate> is usualy prefered. Note: The <set> element is non-additive. The additive and accumulate attributes are not allowed, and will be ignored if specified. ...
Secure contexts - Web security
ivered securely. Resources that are not local, to be considered secure, must meet the following criteria: must be served over https:// or wss:// URLs the security properties of the network channel used to deliver the resource must not be considered deprecated Feature detection Pages can use feature detection to check whether they are in a secure context or not by using the isSecureContext
boolean, which is exposed on the global scope. if (window.isSecureContext) { // Page is a secure context so service workers are now available navigator.serviceWorker.register("/offline-worker.js").then(function () { ... }); } Specifications Specification Status Comment Secure Contexts Candidate Recommendation Editor's Draft ...
Web Components
t. The Element.shadowRoot property returns the shadow root attached to the specified element, or null if there is no shadow root attached. Relevant Node additions Additions to the Node interface relevant to shadow DOM: The Node.getRootNode() method returns the context object's root, which optionally includes the shadow root if it is available. The Node.isConnected property returns a
boolean indicating whether or not the Node is connected (directly or indirectly) to the context object, e.g. the Document object in the case of the normal DOM, or the ShadowRoot in the case of a shadow DOM. Event extensions Extensions to the Event interface related to shadow DOM: Event.composed: Returns a
Boolean which indicates whether the event will propagate across the shadow DOM boundary in...
choose - XPath
XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes The choose function returns one of the specified objects based on a
boolean parameter. Note: This method should be used instead of if(), which has been deprecated. Syntax choose(
boolean , object1, object2 ) Arguments
boolean The
boolean operation to use when determining which object to return. object1 The first object to consider returning. object2 The second object to consider returning. Returns If the
boolean parameter is true, the first object is returned; otherwise, the second object is returned. Note: All parameters are evaluated, even the one that's not returned. Defined XForms 1.1 Gecko support Supported. ...
contains - XPath
XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes The contains function determines whether the first argument string contains the second argument string and returns
boolean true or false. Syntax contains(haystack, needle) Arguments haystack The string to be searched needle The string to look for as a substring of haystack Returns true if haystack contains needle. Otherwise, false. Defined XPath 1.0 4.2 Gecko support Supported. ...
false - XPath
XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes The false function returns
boolean false. Syntax false() Returns
Boolean false. Notes This function is useful part of a comparison: <xsl:if test="
boolean((1 > 2) = false())"> The expression evaluates as true </xsl:if> Defined XPath 1.0 4.3 Gecko support Supported. ...
function-available - XPath
XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes The function-available function determines if a given function is available and returns
boolean true or false. Syntax function-available(name ) Arguments name The name of the function to test. Returns
Boolean true or false. Defined XPath 1.0 15 Gecko support Supported. ...
lang - XPath
Syntax lang(string ) Arguments string The language code or localization (language and country) code to be matched. Returns true if the context node matches the given languages. Otherwise, false. Notes A node's language is determined by its xml:lang attribute. ...
number - XPath
object to be converted to a number. If this argument is omitted, the current context node will be used. Returns The resulting number after converting the object. Notes Strings are converted to a number by stripping the leading whitespace in the string before the number and ignoring whitespace after the number. If the string does not match this pattern, then the string is converted to NaN.
Boolean true is converted to 1. False is converted to 0. A node-set is first converted to a string as if by a call to the string() function and then converted in the same way as a string argument. An object of a type other than the four basic types is converted to a number in a way that is dependent on that type. Defined XPath 1.0 4.4 Gecko support Supported. ...
string - XPath
number is converted as follows: NaN is converted to the string NaN. Positive zero is converted to the string 0. Negative zero is converted to the string 0. Positive infinity is converted to the string Infinity. Negative infinity is converted to the string -Infinity. Decimal numbers between -1 and 1 are converted to a string with a single leading 0 before the decimal point.
Boolean true is converted to the string true.
Boolean false is converted to the string false. Defined XPath 1.0 4.2 Gecko support Supported. ...
Functions - XPath
ements, EXSLT functions, XPath functions, XPath axes The following is an annotated list of core XPath functions and XSLT-specific additions to XPath, including a description, syntax, a list of arguments, result-type, source in the appropriate W3C Recommendation, and degree of present Gecko support. For further information on using XPath/XSLT functions, please see the For Further Reading page. ...
<xsl:if> - XSLT: Extensible Stylesheet Language Transformations
template is processed. In this it is similar to an if statement in other languages. To achieve the functionality of an if-then-else statement, however, use the <xsl:choose> element with one <xsl:when> and one <xsl:otherwise> children. Syntax <xsl:if test=EXPRESSION> TEMPLATE </xsl:if> Required Attributes test Contains an XPath expression that can be evaluated (using the rules defined for
boolean( ) if necessary) to a
Boolean value. If the value is true, the template is processed; if it is not, no action is taken. Optional Attributes None. Type Instruction, appears within a template. Defined XSL section 9.1. Gecko support Supported ...
<xsl:when> - XSLT: Extensible Stylesheet Language Transformations
XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes The <xsl:when> element always appears within an <xsl:choose> element, acting like a case statement. Syntax <xsl:when test=EXPRESSION> TEMPLATE </xsl:when> Required Attributes test Specifies a
boolean expression to be evaluated. If true, the contents of the element are processed; if false, they are ignored. Optional Attributes None. Type Subinstruction, always appears within an <xsl:choose> element. Defined XSLT, section 9.2. Gecko support Supported. ...
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
both apostrophe and quote characters. Examples Set the parameter 'color' to the string 'red': <?xslt-param name="color" value="red"?> Set the parameter 'columns' to the number 2: <?xslt-param name="columns" select="2"?> Set the parameter 'books' to a nodeset containing all <book> elements in the null namespace: <?xslt-param name="books" select="//book"?> Set the parameter 'show-toc' to
boolean true: <?xslt-param name="show-toc" select="true()"?> The select attribute context The following context is used to parse and evaluate the expression in the select attribute. The context node is the node used as initial current node used when executing the stylesheet. The context position is the position of the context node in the initial current node list used when executing the styleshe...
The Netscape XSLT/XPath Reference - XSLT: Extensible Stylesheet Language Transformations
template (supported) xsl:text (partially supported) xsl:transform (supported) xsl:value-of (partially supported) xsl:variable (supported) xsl:when (supported) xsl:with-param (supported) Axes ancestor ancestor-or-self attribute child descendant descendant-or-self following following-sibling namespace (not supported) parent preceding preceding-sibling self Functions
boolean() (supported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-number() (supported) function-available() (supported) generate-id() (supported) id() (partially supported) key() (supported) lang() (supported) ...
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
xsl:template (supported) xsl:text (partially supported) xsl:transform (supported) xsl:value-of (partially supported) xsl:variable (supported) xsl:when (supported) xsl:with-param (supported) Axes ancestor ancestor-or-self attribute child descendant descendant-or-self following following-sibling namespace (not supported) parent preceding preceding-sibling self Functions
boolean() (supported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-number() (supported) function-available() (supported) generate-id() (supported) id() (partially supported) key() (supported) lang() (supported) last() (support...
Using the WebAssembly JavaScript API - WebAssembly
aScript, you use the WebAssembly.Global() constructor, which looks like this: const global = new WebAssembly.Global({value:'i32', mutable:true}, 0); You can see that this takes two parameters: An object that contains two properties describing the global variable: value: its data type, which can be any data type accepted within WebAssembly modules -- i32, i64, f32, or f64. mutable: a
boolean defining whether the value is mutable or not. A value containing the variable's actual value. This can be any value, as long as its type matches the specified data type. So how do we use this? In the following example we define a global as a mutable i32 type, with a value of 0. The value of the global is then changed, first to 42 using the Global.value property, and then to 43 using the ...