Search completed in 1.24 seconds.
463 results for "selection":
Your results are loading. Please wait...
Selection.selectionLanguageChange() - Web APIs
Obsolete since Gecko 29 (Firefox 29 / Thunderbird 29 / SeaMonkey 2.26)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. Selection.selectionLanguageChange() method is a Gecko/Firefox internal method that was exposed to web pages until Firefox 29. It was removed in bug 949445 and should not be used. ...
nsISelectionController
content/base/public/nsISelectionController.idlScriptable Please add a summary to this article. ...
... content/base/public/nsISelectionController.idlScriptable Please add a summary to this article. ...
...ive code only! ...
...And 31 more matches
Selection - Web APIs
Web › API › Selection
A user may make a selection from left to right (in document order) or right to left (reverse of document order). The anchor is where the user began the selection and the focus is where the user ends the selection. If you make a selection with a desktop mouse, the anchor is placed where you pressed the mouse button, and the focus is placed where you released the mouse button. Anchor and focus should not be confused with the start and end positions of a selection. The anchor can be placed before the focus or vice-versa, depending on the direction you made your selection. ...
...t order) or right to left (reverse of document order). The anchor is where the user began the selection and the focus is where the user ends the selection. If you make a selection with a desktop mouse, the anchor is placed where you pressed the mouse button, and the focus is placed where you released the mouse button. Anchor and focus should not be confused with the start and end positions of a selection. The anchor can be placed before the focus or vice-versa, depending on the direction you made your selection. Properties Selection.anchorNodeRead only Returns the Node in which the selection begins. Can return null if selection never existed in the document (e.g., an iframe that was never clicked on). Selection.anchorOffsetRead only Returns a number representing the offset of the select...
...xisted in the document (e.g., an iframe that was never clicked on). Selection.anchorOffsetRead only Returns a number representing the offset of the selection's anchor within the anchorNode. If anchorNode is a text node, this is the number of characters within anchorNode preceding the anchor. If anchorNode is an element, this is the number of child nodes of the anchorNode preceding the anchor. Selection.focusNodeRead only Returns the Node in which the selection ends. Can return null if selection never existed in the document (for example, in an iframe 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 fo...
...And 22 more matches
selection - Archive of obsolete content
Each iteration yields a Selection object from which text, html, and isContiguous properties can be accessed. ...
...Each iteration yields a Selection object from which text, html, and isContiguous properties can be accessed. ...
...Each iteration yields a Selection object from which text, html, and isContiguous properties can be accessed. ...
...And 16 more matches
nsISelection
Add brief description of Interface ??? ...
...Add brief description of Interface ??? ...
...Add brief description of Interface ??? Inherits from: nsISupports Last changed in Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10) Interface for manipulating and querying the current selected range of nodes within the document. Implemented by: ?????????????????????????????????????. ...
...And 14 more matches
nsISelectionPrivate
dom/base/nsISelectionPrivate.idlScriptable Internal support for content selection handling. Inherits from: nsISupports Last changed in Gecko 35 (Firefox 35 / Thunderbird 35 / SeaMonkey 2.32) Warning: The content of this article may be out of date. This page wasn't updated since the initial import in 2011. See the idl file linked above for up-to-date information. ...
...electionPrivate.idlScriptable Internal support for content selection handling. Inherits from: nsISupports Last changed in Gecko 35 (Firefox 35 / Thunderbird 35 / SeaMonkey 2.32) Warning: The content of this article may be out of date. This page wasn't updated since the initial import in 2011. See the idl file linked above for up-to-date information. ...
...table Internal support for content selection handling. Inherits from: nsISupports Last changed in Gecko 35 (Firefox 35 / Thunderbird 35 / SeaMonkey 2.32) Warning: The content of this article may be out of date. This page wasn't updated since the initial import in 2011. See the idl file linked above for up-to-date information. ...
...And 14 more matches
Selection.setBaseAndExtent() - Web APIs
Syntax sel.setBaseAndExtent(anchorNode,anchorOffset,focusNode,focusOffset) Parameters anchorNode The node at the start of the selection. anchorOffset The number of child nodes from the start of the anchor node that should be excluded from the selection. So for example, if the value is 0 the whole node is included. If the value is 1, the whole node minus the first child node is included. And so on. focusNode The node at the end of the selection. ...
...set,focusNode,focusOffset) Parameters anchorNode The node at the start of the selection. anchorOffset The number of child nodes from the start of the anchor node that should be excluded from the selection. So for example, if the value is 0 the whole node is included. If the value is 1, the whole node minus the first child node is included. And so on. focusNode The node at the end of the selection. focusOffset The number of child nodes from the start of the focus node that should be included in the selection. So for example, if the value is 0 the whole node is excluded. If the value is 1, the first child node is included. And so on. ...
... Return Value Void. ...
...And 11 more matches
nsITreeSelection
layout/xul/base/src/tree/public/nsITreeSelection.idlScriptable This interface is used by the tree widget to get information about what is selected. ...
... layout/xul/base/src/tree/public/nsITreeSelection.idlScriptable This interface is used by the tree widget to get information about what is selected. ...
... layout/xul/base/src/tree/public/nsITreeSelection.idlScriptable This interface is used by the tree widget to get information about what is selected. ...
...And 9 more matches
Selection - Archive of obsolete content
Note: This page documents the Jetpack Prototype, which is no longer under active development. Read the experiment report for what we learned from it and the blog post announcing the first SDK release for what we're up to next! Jetpack's selection API provides a method for detecting the selections made by the user. Features can get, set, and listen for selection events in HTML or plain text. The namespace for this api is jetpack.selection. ...
...arned from it and the blog post announcing the first SDK release for what we're up to next! ...
...ncing the first SDK release for what we're up to next! Jetpack's selection API provides a method for detecting the selections made by the user. Features can get, set, and listen for selection events in HTML or plain text. The namespace for this api is jetpack.selection. This API currently lives in the future and must be imported for use: jetpack.future.import("selection"); Getting and Setting the Selection The current version of jetpack.selection includes these formats: .text and .html Getting the selection The following is an example of getting the selection from the user. jetpack.import.future("selection");var textOfSel = jetpack.selection.text;var htmlOfSel = jetpack.selection.html; Setting the selection The following is an example of getting the selection from the user. jetpack.import.future("s...
...And 7 more matches
Tree Selection - Archive of obsolete content
, which will not necessarily be contiguous. The tree provides a number of functions which can be used to determine whether an item is selected. Handling the Select Event First, let's see how we can determine when an item is selected. The onselect() event handler may be added to the tree element. When the user selects an item from the tree, the event handler is called. The user may also change the selection by using the cursor keys. If the user holds down the cursor key to rapidly scroll through the items, the event handler is not called until the user stops. This results in a performance improvement. This also means that the highlight will appear on several items even though the select event is never fired for those items. The syntax of the onselect() event handler is shown below. <tree id="treeset...
...e first top-level item. The next item at index 1 will be its first child. The second child will be at index 2 and the second parent item will be at position 3 and so on. In the image, there are eight rows displayed, of which two are selected. The first selected row has an index of 4 and the second has an index of 7. The rows that are not displayed are not included in the index count. Multiple Selection For trees that allow multiple selection, getting the list of selected rows is a bit more complicated. The tree's view has a selection property which holds information about the selected rows. This selection will be an nsITreeSelection object. The view doesn't need to implement this object itself, the tree will assign a selection object to the view's selection property when the view is attached to...
..., getting the list of selected rows is a bit more complicated. The tree's view has a selection property which holds information about the selected rows. This selection will be an nsITreeSelection object. The view doesn't need to implement this object itself, the tree will assign a selection object to the view's selection property when the view is attached to a tree. From the tree, you can get the selection using the tree's view property and then retrieve the view's selection property. You can use the methods of the selection object to retrieve the set of selected items or modify the selection. Because the selected items in a multiple selection tree are not necessarily contiguous, you can retrieve each block of contigous selections using the getRangeCount() and getRangeAt() functions. The first func...
...And 7 more matches
Selection API - Web APIs
The Selection API provides functionality for reading and manipulating the range of text selected by the user. Concepts and usage To retrieve the current text range the user has selected, you can use the Window.getSelection() or Document.getSelection() method, storing the return value -- a Selection object -- in a variable for futher use. Once your selection is in a variable, you perform a variety of operations on it, for example copying the selection to a text string using Selection.toString(), adding a range (as represented by a standard Range object) to the selection (or removing one) with Selection.addRange()/Selection.removeRange(), or changing the selection to be the entire contents of a DOM node using Selection.selectAllChildren(). You can run code in response to the selection being ch...
... Selection API interfaces Selection Represents the range of text selected by the user or the current position of the caret. ...
... Selection API interfaces Selection Represents the range of text selected by the user or the current position of the caret. ...
...And 7 more matches
Selection - Archive of obsolete content
Jetpack's selection API provides a method for detecting the selections made by the user. Features can get, set, and listen for selection events in HTML or plain text. The namespace for this api is jetpack.selection. This API currently lives in the future and must be imported for use: jetpack.future.import("selection"); Getting and Setting the Selection The current version of jetpack.selection includes these formats: .text and .html Getting the selection The following is an example of getting the selection from the user. jetpack.import.future("selection"); var textOfSel = jetpack.selection.text; var htmlOfSel = jetpack.selection.html; Setting the selection The following is an example of getting the selection from the user. ...
...e current version of jetpack.selection includes these formats: .text and .html Getting the selection The following is an example of getting the selection from the user. jetpack.import.future("selection"); var textOfSel = jetpack.selection.text; var htmlOfSel = jetpack.selection.html; Setting the selection The following is an example of getting the selection from the user. jetpack.import.future("selection"); jetpack.selection.text = 'Hello'; jetpack.selection.html = '<b>Hello</b>'; Methods onSelection(func function)This method allows you to execute an event function when a selection is made. funcA function to be called when the selection is made. This function receives no arguments. Use jetpack.selection.*. ...
...getting the selection from the user. jetpack.import.future("selection"); jetpack.selection.text = 'Hello'; jetpack.selection.html = '<b>Hello</b>'; Methods onSelection(func function)This method allows you to execute an event function when a selection is made. funcA function to be called when the selection is made. This function receives no arguments. Use jetpack.selection.*. function Adding a selection event jetpack.selection.onSelection( fn ); Removal of a selection event jetpack.selection.onSelection.unbind( fn ); Verbose Example The following example will bold the html that you select. ...
...And 5 more matches
Selection - Archive of obsolete content
Archive › Mozilla › Jetpack › docs › UI › Selection
Jetpack's selection API provides a method for detecting the selections made by the user. Features can get, set, and listen for selection events in HTML or plain text. The namespace for this api is jetpack.selection. This API currently lives in the future and must be imported for use: jetpack.future.import("selection"); Getting and Setting the Selection The current version of jetpack.selection includes these formats: .text and .html Getting the selection The following is an example of getting the selection from the user. jetpack.import.future("selection"); var textOfSel = jetpack.selection.text; var htmlOfSel = jetpack.selection.html; Setting the selection The following is an example of getting the selection from the user. ...
...e current version of jetpack.selection includes these formats: .text and .html Getting the selection The following is an example of getting the selection from the user. jetpack.import.future("selection"); var textOfSel = jetpack.selection.text; var htmlOfSel = jetpack.selection.html; Setting the selection The following is an example of getting the selection from the user. jetpack.import.future("selection"); jetpack.selection.text = 'Hello'; jetpack.selection.html = '<b>Hello</b>'; Methods onSelection(func function)This method allows you to execute an event function when a selection is made. funcA function to be called when the selection is made. This function receives no arguments. Use jetpack.selection.*. ...
...getting the selection from the user. jetpack.import.future("selection"); jetpack.selection.text = 'Hello'; jetpack.selection.html = '<b>Hello</b>'; Methods onSelection(func function)This method allows you to execute an event function when a selection is made. funcA function to be called when the selection is made. This function receives no arguments. Use jetpack.selection.*. function Adding a selection event jetpack.selection.onSelection( fn ); Removal of a selection event jetpack.selection.onSelection.unbind( fn ); Verbose Example The following example will bold the html that you select. ...
...And 5 more matches
mozbrowserselectionstatechanged
Non-standard This feature is non-standard and is not on 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. The mozbrowserselectionstatechanged event is fired when the text selected inside the browser <iframe> content changes. Note that this is deprecated, and current implementations should use mozbrowsercaretstatechanged instead. General info Specification Non standard Interface CustomEvent Bubbles Yes Cancelable Yes Target <iframe> Default Action None Properties Property Type Description target Read only EventTarget The browser iframe type Read only DO...
... 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: width: The width of the selection, in CSS pixels. height: The height of the selection, in CSS pixels. top: The Y coordinate of the top of the bounding 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 bou...
...ls. top: The Y coordinate of the top of the bounding 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 no...
...And 5 more matches
nsISelection2
content/base/public/nsISelection2.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 1.8 Obsolete Gecko 8.0 Inherits from: nsISelection Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) In Gecko 8.0 this Interface was merged into the nsISelectionPrivate interface. Method overview 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 GetRangesForIntervalCOMArray(in nsIDOMNode beginNode, in PRInt32 beginOffset, in nsIDOMNode endNode, in PRInt32 endOffset, in PRBool allowAdjacent, in RangeArray ...
...Read only. Methods GetRangesForInterval() Return array of ranges intersecting with the given DOM interval. 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...
...Read only. Methods GetRangesForInterval() Return array of ranges intersecting with the given DOM interval. 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 resul...
...And 4 more matches
HTMLInputElement.setSelectionRange() - Web APIs
The HTMLInputElement.setSelectionRange() method sets the start and end positions of the current text selection in an <input> or <textarea> element. Optionally, in newer browser versions, you can specify the direction in which selection should be considered to have occurred. This lets you indicate, for example, that the selection was set by the user clicking and dragging from the end of the selected text toward the beginning. This method updates the HTMLInputElement.selectionStart, selectionEnd, and selectionDirection properties in one call. Note that accordingly to the WHATWG forms spec selectionStart, selectionEnd properties and setSelectionRange method apply only to inputs of types text, search, URL, tel and password. Chrome, starting from version 33, throws an exception while accessing those...
...ection properties in one call. Note that accordingly to the WHATWG forms spec selectionStart, selectionEnd properties and setSelectionRange method apply only to inputs of types text, search, URL, tel and password. Chrome, starting from version 33, throws an exception while accessing those properties and method on the rest of input types. For example, on input of type number: "Failed to read the 'selectionStart' property from 'HTMLInputElement': The input element's type ('number') does not support selection". If you wish to select all text of an input element, you can use the HTMLInputElement.select() method instead. ...
...3, throws an exception while accessing those properties and method on the rest of input types. For example, on input of type number: "Failed to read the 'selectionStart' property from 'HTMLInputElement': The input element's type ('number') does not support selection". If you wish to select all text of an input element, you can use the HTMLInputElement.select() method instead. Syntax element.setSelectionRange(selectionStart, selectionEnd [, selectionDirection]); Parameters If selectionEnd is less than selectionStart, then both are treated as the value of selectionEnd. selectionStart The 0-based index of the first selected character. An index greater than the length of the element's value is treated as pointing to the end of the value. selectionEnd The 0-based index of the character after...
...And 4 more matches
Selection.modify() - Web APIs
Web › API › Selection › modify
Syntax sel.modify(alter, direction, granularity) Parameters alter The type of change to apply. Specify "move" to move the current cursor position or "extend" to extend the current selection. direction The direction in which to adjust the current selection. You can specify "forward" or "backward" to adjust in the appropriate direction based on the language at the selection point. If you want to adjust in a specific direction, you can specify "left" or "right". granularity The distance to adjust the current selection or cursor position. ...
...You can move by "character", "word", "sentence", "line", "paragraph", "lineboundary", "sentenceboundary", "paragraphboundary", or "documentboundary". Note: Gecko does not implement "sentence", "paragraph", "sentenceboundary", "paragraphboundary", or "documentboundary". WebKit and Blink do. ...
...and Blink do. Note: Starting in Gecko 5.0, the "word" granularity no longer includes the following space, regardless of the default platform behavior. This makes the behavior more consistent, as well as making it work the same way WebKit used to work, but unfortunately they have recently changed their behavior. Example This example demonstrates the various granularity options for modifying a selection. Click somewhere inside the example (optionally selecting some text), and then click the button to expand the selection. HTML <p>Click somewhere in this example. Then click the button below to expand the selection. Watch what happens!</p> <p>Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod ma...
...And 4 more matches
DocumentOrShadowRoot.getSelection() - Web APIs
The getSelection() property of the DocumentOrShadowRoot interface returns a Selection object representing the range of text selected by the user, or the current position of the caret. Syntax var selection = documentOrShadowRootInstance.getSelection() Parameters None. Returns A Selection object. Example function foo() { var selObj = document.getSelection(); alert(selObj); var selRange = selObj.getRangeAt(0); // do stuff with the range } Notes String representation of the Selection object In JavaScript, when an object is passed to a function expecting a string (like Window.alert()), the object's toString() method is called and the returned value is passed to the function. This can make the object appear to be a string when used with other functions when it is rea...
... called and the returned value is passed to the function. This can make the object appear to be a string when used with other functions when it is really an object with properties and methods. In the above example, selObj.toString() is automatically called when it is passed to Window.alert(). ...
...when it is really an object with properties and methods. In the above example, selObj.toString() is automatically called when it is passed to Window.alert(). However, attempting to use a JavaScript String property or method such as length or substr directly on a Selection object results in an error if it does not have that property or method and may return unexpected results if it does. To use a Selection object as a string, call its toString() method directly: var selectedText = selObj.toString(); selObj is a Selection object. selectedText is a string (Selected text). Related objects You can call Window.getSelection(), which works identically to Document.getSelection(). It is worth noting that currently getSelection() doesn't work on the content of <input> elements in Firefox. HTMLInputE...
...And 3 more matches
Window.getSelection() - Web APIs
The Window.getSelection() method returns a Selection object representing the range of text selected by the user or the current position of the caret. Syntax selection = window.getSelection(); Return value A Selection object. When cast to string, either by appending an empty string ("") or using Selection.toString(), this object returns the text selected. When called on an <iframe> that is not displayed (eg. where display: none is set) Firefox will return null, whereas other browsers will return a Selection object with Selection.type set to None. ...
...lection object. When cast to string, either by appending an empty string ("") or using Selection.toString(), this object returns the text selected. When called on an <iframe> that is not displayed (eg. where display: none is set) Firefox will return null, whereas other browsers will return a Selection object with Selection.type set to None. Examples function foo() { var selObj = window.getSelection(); alert(selObj); var selRange = selObj.getRangeAt(0); // do stuff with the range } Notes String representation of the Selection object In JavaScript, when an object is passed to a function expecting a string (like window.alert() or document.write()), the object's toString() method is called and the returned value is passed to the function. This can make the object appear to be a s...
... called and the returned value is passed to the function. This can make the object appear to be a string when used with other functions when it is really an object with properties and methods. In the above example, selObj.toString() is automatically called when it is passed to window.alert(). ...
...And 3 more matches
::selection - CSS: Cascading Style Sheets
The ::selection CSS pseudo-element applies styles to the part of a document that has been highlighted by the user (such as clicking and dragging the mouse across text). ::selection { background-color: cyan; } Allowable properties Only certain CSS properties can be used with ::selection: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow In particular, background-image is ignored. Syntax /* Legacy Firefox syntax (version 61 and below) */ ::-moz-selection ::selection Examples HTML This text has special styles when you highlight it. ...
...cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow In particular, background-image is ignored. Syntax /* Legacy Firefox syntax (version 61 and below) */ ::-moz-selection ::selection Examples HTML This text has special styles when you highlight it. ...
... and its associated properties text-emphasis-color text-shadow In particular, background-image is ignored. Syntax /* Legacy Firefox syntax (version 61 and below) */ ::-moz-selection ::selection Examples HTML This text has special styles when you highlight it. ...
...And 3 more matches
Focus and Selection - Archive of obsolete content
Focused Elements The focused element refers to the element which currently receives input events. If there are three textboxes on a window, the one that has the focus is the one that the user can currently enter text into. Only one element per window has the focus at a time. The user can change the focus by clicking an element with the mouse or by pressing the TAB key. When the TAB key is pressed, the next element is given the focus. To step backwards, the Shift key and Tab key can be pressed. ...
... instead of using key events, as some keys such as the shift key don't change the value. Also, the input event would not fire if a letter key was pressed and there were already more characters than will fit in the textbox. The change event is similar in that it fires only when the field is changed. However it only fires once the textbox loses the focus, thus, only once per set of changes. Text Selection When working with a textbox, you may wish to retrieve not the entire contents of a field but only what the user has selected. Or, you may wish to change the current selection. XUL textboxes support a way to retrieve and modify the selection. The simplest one is to select all of the text in a textbox. This involves using the select method of the textbox. tbox.select(); However, you may wish to se...
... the entire contents of a field but only what the user has selected. Or, you may wish to change the current selection. XUL textboxes support a way to retrieve and modify the selection. The simplest one is to select all of the text in a textbox. This involves using the select method of the textbox. tbox.select(); However, you may wish to select only part of the text. To do this you can use the setSelectionRange function. It takes two parameters, the first is the starting character and the second is the character after the last one that you want to have selected. Values are zero-based, so the first character is 0, the second is 1 and so on. tbox.setSelectionRange(4,8); This example will select the fifth character displayed, as well as the sixth, seventh and eighth. If there were only six characters...
...And 2 more matches
Document: selectionchange event - Web APIs
Working Draft Initial definition. ...
... Working Draft Initial definition. ...
... Working Draft Initial definition. ...
...And 2 more matches
PublicKeyCredentialCreationOptions.authenticatorSelection - Web APIs
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). ...
...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). ...
...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). ...
...And 2 more matches
nsISelection3
Method overview void modify(in DOMString alter, in DOMString direction, in DOMString granularity); Methods modify() Modifies the selection. Note that the parameters are case-insensitive. ...
... Method overview void modify(in DOMString alter, in DOMString direction, in DOMString granularity); Methods modify() Modifies the selection. Note that the parameters are case-insensitive. ...
... 1.0 66 Introduced Gecko 2.0 Obsolete Gecko 8.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) In Gecko 8.0 this Interface was merged into the nsISelection interface. Method overview void modify(in DOMString alter, in DOMString direction, in DOMString granularity); Methods modify() Modifies the selection. ...
...ction interface. Method overview void modify(in DOMString alter, in DOMString direction, in DOMString granularity); Methods modify() Modifies the selection. Note that the parameters are case-insensitive. void modify( in DOMString alter, in DOMString direction, in DOMString granularity ); Parameters alter Can be one of { "move", "extend" } "move" collapses the selection to the end of the selection and applies the movement direction/granularity to the collapsed selection. "extend" leaves the start of the selection unchanged, and applies movement direction/granularity to the end of the selection. direction Can be one of { "forward", "backward", "left", "right" } granularity Can be one of { "character", "word", "line", "lineboundary" } See also nsISe...
Selection.addRange() - Web APIs
The Selection.addRange() method adds a Range to a Selection. Syntax selection.addRange(range); Parameters range A Range object that will be added to the Selection. Example Currently only Firefox supports multiple selection ranges, other browsers will not add new ranges to the selection if it already contains one. ...
...only Firefox supports multiple selection ranges, other browsers will not add new ranges to the selection if it already contains one. ...
...multiple selection ranges, other browsers will not add new ranges to the selection if it already contains one. ...
...ction if it already contains one. HTML <p>I <strong>insist</strong> that you <strong>try</strong> selecting the <strong>strong words</strong>.</p> <button>Select strong words</button> JavaScript let button = document.querySelector('button'); button.addEventListener('click', function () { let selection = window.getSelection(); let strongs = document.getElementsByTagName('strong'); if (selection.rangeCount > 0) { selection.removeAllRanges(); } for (let i = 0; i < strongs.length; i++) { let range = document.createRange(); range.selectNode(strongs[i]); selection.addRange(range); } }); Result Specifications Specification Status Comment Selection APIThe definition of 'Selection.addRange()' in that specification. Working Draft Current ...
Selection.extend() - Web APIs
Web › API › Selection › extend
Working Draft Current Browser compatibility The compatibility table on this page is generated from structured data. ...
... Syntax sel.extend(node, offset) Parameters node The node within which the focus will be moved. offset Optional The offset position within node where the focus will be moved to. If not specified, the default value 0 is used. Specifications Specification Status Comment Selection APIThe definition of 'Selection.extend()' in that specification. Working Draft Current Browser compatibility The compatibility table on this page is generated from structured data. ...
...oes not move. The selection will be from the anchor to the new focus, regardless of direction. Syntax sel.extend(node, offset) Parameters node The node within which the focus will be moved. offset Optional The offset position within node where the focus will be moved to. If not specified, the default value 0 is used. Specifications Specification Status Comment Selection APIThe definition of 'Selection.extend()' in that specification. Working Draft Current 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 webviewC...
... ...
Selection.removeAllRanges() - Web APIs
Working Draft Current 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. ...
... Working Draft Current 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. ...
... Working Draft Current 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. ...
... ...
Selection.removeRange() - Web APIs
Working Draft Current Browser compatibility The compatibility table on this page is generated from structured data. ...
... Return value undefined Examples /* Programmaticaly, more than one range can be selected. * This will remove all ranges except the first. */ s = window.getSelection(); if(s.rangeCount > 1) { for(var i = 1; i < s.rangeCount; i++) { s.removeRange(s.getRangeAt(i)); } } Specifications Specification Status Comment Selection APIThe definition of 'Selection.removeRange()' in that specification. ...
... range object that will be removed to the selection. Return value undefined Examples /* Programmaticaly, more than one range can be selected. * This will remove all ranges except the first. */ s = window.getSelection(); if(s.rangeCount > 1) { for(var i = 1; i < s.rangeCount; i++) { s.removeRange(s.getRangeAt(i)); } } Specifications Specification Status Comment Selection APIThe definition of 'Selection.removeRange()' in that specification. Working Draft Current 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 web...
... ...
ExtendSelection
void extendSelection(); Exceptions thrown NS_ERROR_NOT_IMPLEMENTED Always. This method isn't implemented. ...
... << nsIAccessible Page Summary This method extends the current selection from its current accessible anchor node to this accessible. ...
... << nsIAccessible Page Summary This method extends the current selection from its current accessible anchor node to this accessible. ...
selectionStart - Archive of obsolete content
The value specifies the index of the first selected character. ...
...The value specifies the index of the first selected character. ...
TakeSelection
<< nsIAccessible Page Summary This method selects this accessible node only. void takeSelection(); Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. ...
... << nsIAccessible Page Summary This method selects this accessible node only. void takeSelection(); Exceptions thrown NS_ERROR_FAILURE Indicates that the accessible is unattached from the accessible tree. ...
Selection.collapse() - Web APIs
The Selection.collapse() method collapses the current selection to a single point. The document is not modified. If the content is focused and editable, the caret will blink there. Syntax sel.collapse(node, offset); Parameters node The caret location will be within this node. This value can also be set to null -- if null is specified, the method will behave like Selection.removeAllRanges(), i.e. all ranges will be removed from the selection. offset Optional The offset in node to which the selection will be collapsed. If not specified, the default value 0 is used. Examples /* Place the caret at the beginning of an HTML document's body. ...
... null is specified, the method will behave like Selection.removeAllRanges(), i.e. all ranges will be removed from the selection. offset Optional The offset in node to which the selection will be collapsed. If not specified, the default value 0 is used. Examples /* Place the caret at the beginning of an HTML document's body. */ var body = document.getElementsByTagName("body")[0]; window.getSelection().collapse(body,0); Specifications Specification Status Comment Selection APIThe definition of 'Selection.collapse()' in that specification. Working Draft ...
Selection.containsNode() - Web APIs
The Selection.containsNode() method indicates whether a specfied node is part of the selection. Syntax sel.containsNode(node, partialContainment) Parameters node The node that is being looked for in the selection. partialContainment Optional When true, containsNode() returns true when a part of the node is part of the selection. When false, containsNode() only returns true when the entire node is part of the selection. If not specified, the default value false is used. Example Check for selection This snippet checks whether anything inside the body element is selected. console.log(window.getSelection().containsNode(document.body, true)); Find the hidden word In this example, a message appears when you select the secret word. It uses addEventListener() to check for select...
...ge appears when you select the secret word. It uses addEventListener() to check for selectionchange events. HTML <p>Can you find the secret word?</p> <p>Hmm, where <span id="secret" style="color:transparent">SECRET</span> could it be?</p> <p id="win" hidden>You found it!</p> JavaScript const secret = document.getElementById('secret'); const win = document.getElementById('win'); // Listen for selection changes document.addEventListener('selectionchange', () => { const selection = window.getSelection(); const found = selection.containsNode(secret); win.toggleAttribute('hidden', !found); }); Result Specifications Specification Status Comment Selection APIThe definition of 'Selection.containsNode()' in that specification. Working Draft Current ...
Selection.deleteFromDocument() - Web APIs
The deleteFromDocument() method of the Selection interface deletes the selected text from the document's DOM. Syntax sel.deleteFromDocument() Parameters None. Example This example lets you delete selected text by clicking a button. Upon clicking the button, the Window.getSelection() method gets the selected text, and the deleteFromDocument() method removes it. HTML <p>Try highlighting some of the text in this paragraph. ...
...he button, the Window.getSelection() method gets the selected text, and the deleteFromDocument() method removes it. HTML <p>Try highlighting some of the text in this paragraph. Once you do, you can remove the selected content by clicking the button below.</p> <button>Delete selected text</button> JavaScript let button = document.querySelector('button'); button.addEventListener('click', deleteSelection); function deleteSelection() { let selection = window.getSelection(); selection.deleteFromDocument(); } Result Specifications Specification Status Comment Selection APIThe definition of 'Selection.deleteFromDocument()' in that specification. Working Draft Current ...
Selection.rangeCount - Web APIs
Before the user has clicked a freshly loaded page, the rangeCount is 0. After the user clicks on the page, rangeCount is 1, even if no selection is visible. A user can normally only select one range at a time, so the rangeCount will usually be 1. Scripting can be used to make the selection contain more than one range. Gecko browsers allow multiple selections across table cells. Firefox allows to select multiple ranges in the document by using Ctrl+click (unless the click within an element with display: table-cell). Syntax value = sel.rangeCount Example The following example will show the rangeCount every second. Select text in the browser to see it change. ...
...es in the document by using Ctrl+click (unless the click within an element with display: table-cell). Syntax value = sel.rangeCount Example The following example will show the rangeCount every second. Select text in the browser to see it change. HTML <table> <tr><td>a.1<td>a.2 <tr><td>b.1<td>b.2 <tr><td>c.1<td>c.2 JavaScript window.setInterval(function () { console.log(window.getSelection().rangeCount); }, 1000); Result Open your console to see how many ranges are in the selection. In Gecko browsers, you can select multiple ranges across table cells by holding down Ctrl while dragging with the mouse. Specifications Specification Status Comment Selection APIThe definition of 'Selection.rangeCount' in that specification. Working Draft Current ...
Selection.selectAllChildren() - Web APIs
The Selection.selectAllChildren() method adds all the children of the specified node to the selection. Previous selection is lost. Syntax sel.selectAllChildren(parentNode) Parameters parentNode All children of parentNode will be selected. parentNode itself is not part of the selection. ...
... of the selection. Example HTML <main> <button>Select Footer</button> <p>Welcome to my website.</p> <p>I hope you enjoy your visit.</p> </main> <footer> <address>webmaster@example.com</address> <p>(C) 2019</p> </footer> JavaScript const button = document.querySelector('button'); const footer = document.querySelector('footer'); button.addEventListener('click', (e) => { window.getSelection().selectAllChildren(footer); }); Result Specifications Specification Status Comment Selection APIThe definition of 'Selection.selectAllChildren()' in that specification. Working Draft Current definition ...
Selection.toString() - Web APIs
The Selection.toString() method returns a string currently being represented by the selection object, i.e. the currently selected text. Syntax sel.toString() Return value A string representing the selection. Description This method returns the currently selected text. In JavaScript, this method is called automatically when a function the selection object is passed to requires a string: alert(window.getSelection()) // What is called alert(window.getSelection().toString()) // What is actually being effectively called. Specifications Specification Status Comment Selection APIThe definition of 'Selection: toString()' in that specification. Working Draft Current Browser compatibility The compatibility table on this page is generated from ...
... ...
Selection.type - Web APIs
Web › API › Selection › type
Syntax value = sel.type Value A DOMString describing the type of the current selection. Possible values are: None: No selection has currently been made. Caret: The selection is collapsed (i.e. the caret is placed on some text, but no range has been selected). Range: A range has been selected. Example In this example, the event handler will fire each time a new selection is made. console.log(selection.type) will return Caret or Range depending on whether the caret is placed at a single point in the text, or a range has been selected. ...
...de. Caret: The selection is collapsed (i.e. the caret is placed on some text, but no range has been selected). Range: A range has been selected. Example In this example, the event handler will fire each time a new selection is made. console.log(selection.type) will return Caret or Range depending on whether the caret is placed at a single point in the text, or a range has been selected. var selection; document.onselectionchange = function() { console.log('New selection made'); selection = document.getSelection(); console.log(selection.type); }; Specifications Specification Status Comment Selection APIThe definition of 'Selection.type' in that specification. Working Draft Current ...
addItemToSelection - Archive of obsolete content
...
clearSelection - Archive of obsolete content
<< XUL Reference home clearSelection() Return type: no return value Deselects all of the items. A select event is sent before the items are deselected. ...
invertSelection - Archive of obsolete content
<< XUL Reference home invertSelection() Return type: no return value Reverses the selected state of all items. Selected items become deselected, and deselected items become selected. ...
removeItemFromSelection - Archive of obsolete content
...
setSelectionRange - Archive of obsolete content
<< XUL Reference home setSelectionRange( start, end ) Return type: no return value Sets the selected portion of the textbox, where the start argument is the index of the first character to select and the end argument is the index of the character after the selection. Set both arguments to the same value to move the cursor to the corresponding position without selecting text. ...
toggleItemSelection - Archive of obsolete content
If it is not selected, it is selected. ...
selectionEnd - Archive of obsolete content
<< XUL Reference selectionEnd Type: integer Get or set the end of the selected portion of the field's text. Use in conjuction with the selectionStart property. The value specifies the index of the character after the selection. If this value is equal to the value of the selectionStart property, no text is selected, but the value indicates the position of the caret (cursor) within the textbox. ...
nsISelectionImageService
Inherits from: nsISupports Last changed in Gecko 1.7 Method overview void getImage(in short selectionValue, out imgIContainer container); void reset(); Methods getImage() Retrieve the image for alpha blending. void getImage( in short selectionValue, out imgIContainer container ); Parameters selectionValue container reset() The current image is marked as invalid. void reset(); Parameters None. ...
GlobalEventHandlers.onselectionchange - Web APIs
The onselectionchange property of the GlobalEventHandlers mixin is an EventHandler that processes selectionchange events. The selectionchange event fires when the text selected on a webpage changes. Syntax object.onselectionchange = functionRef; Value functionRef is a function name or a function expression. The function receives a FocusEvent object as its sole argument. Example let selection; document.onselectionchange = function() { console.log('New selection made'); selection = document.getSelection(); }; For a full example, see our Key quote generator demo. Specifications Specification Status Comment Selection APIThe definition of 'GlobalEventHandlers.onselectionchange' in that specification. Working Draft Initial definition. ...
Selection.anchorNode - Web APIs
The Selection.anchorNode read-only property returns the Node in which the selection begins. A user may make a selection from left to right (in document order) or right to left (reverse of document order). The anchor is where the user began the selection. This can be visualized by holding the Shift key and pressing the arrow keys on your keyboard. The selection's anchor does not move, but the selection's focus, the other end of the selection, does move. Syntax node = sel.anchorNode Specifications Specification Status Comment Selection APIThe definition of 'Selection.anchorNode' in that specification. Working Draft Current ...
Selection.anchorOffset - Web APIs
The Selection.anchorOffset read-only property returns the number of characters that the selection's anchor is offset within the Selection.anchorNode. This number is zero-based. If the selection begins with the first character in the Selection.anchorNode, 0 is returned. Syntax number = sel.anchorOffset Specifications Specification Status Comment Selection APIThe definition of 'Selection.anchorOffset' in that specification. Working Draft Current ...
Selection.collapseToEnd() - Web APIs
The Selection.collapseToEnd() method collapses the selection to the end of the last range in the selection. If the content of the selection is focused and editable, the caret will blink there. Syntax sel.collapseToEnd() Parameters None. Specifications Specification Status Comment Selection APIThe definition of 'Selection.collapseToEnd()' in that specification. Working Draft Current ...
Selection.collapseToStart() - Web APIs
The Selection.collapseToStart() method collapses the selection to the start of the first range in the selection. If the content of the selection is focused and editable, the caret will blink there. Syntax sel.collapseToStart() Parameters None. Specifications Specification Status Comment Selection APIThe definition of 'Selection.collapseToStart()' in that specification. Working Draft Current ...
Selection.focusNode - Web APIs
The Selection.focusNode read-only property returns the Node in which the selection ends. A user may make a selection from left to right (in document order) or right to left (reverse of document order). The focus is where the user ended the selection. This can be visualized by holding the Shift key and pressing the arrow keys on your keyboard to modify the current selection. The selection's focus moves, but the selection's anchor, the other end of the selection, does not move. Syntax node = sel.focusNode Specifications Specification Status Comment Selection APIThe definition of 'Selection.focusNode' in that specification. Working Draft Current ...
Selection.focusOffset - Web APIs
The Selection.focusOffset read-only property returns the number of characters that the selection's focus is offset within the Selection.focusNode. This number is zero-based. If the selection ends with the first character in the Selection.focusNode, 0 is returned. Syntax offset = sel.focusOffset Specifications Specification Status Comment Selection APIThe definition of 'Selection.focusOffset' in that specification. Working Draft Current ...
Selection.getRangeAt() - Web APIs
The Selection.getRangeAt() method returns a range object representing one of the ranges currently selected. Syntax range = sel.getRangeAt(index) Parameters index The zero-based index of the range to return. A negative number or a number greater than or equal to Selection.rangeCount will result in an error. Return value The specified Range object. Example let ranges = []; sel = window.getSelection(); for(let i = 0; i < sel.rangeCount; i++) { ranges[i] = sel.getRangeAt(i); } /* Each item in the ranges array is now * a range object representing one of the * ranges in the current selection */ Specifications Specification Status Comment Selection APIThe definition of 'Selection: getRangeAt()' in that specification. Working Draft Current ...
Selection.isCollapsed - Web APIs
The Selection.isCollapsed read-only property returns a Boolean which indicates whether or not there is currently any text selected. 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. Syntax bool = sel.isCollapsed Specifications Specification Status Comment Selection APIThe definition of 'Selection.isCollapsed' in that specification. Working Draft Current ...
Index - Web APIs
Web › API › Index
style sheet set as set by the page author. 951 Document.queryCommandEnabled() CSS, Document, Method, Reference The Document.queryCommandEnabled() method reports whether or not the specified editor command is enabled by the browser. 952 Document.queryCommandState() API, DOM, NeedsExample, Reference The queryCommandState method will tell you if the current selection has a certain Document.execCommand() command applied. 953 Document.queryCommandSupported() API, DOM, Method, Reference, editor The Document.queryCommandSupported() method reports whether or not the specified editor command is supported by the browser. 954 Document.querySelector() API, CSS Selectors, DOM, DOM Elements, Document, Method, Reference, Selector API, ...
...py action through the browser's user interface. 981 Document: cut event Event The cut event is fired when the user has initiated a "cut" action through the browser's user interface. 982 Document: drag event API, DOM, Document, Drag, DragEvent, Event, Reference, Web, drag and drop The drag event is fired every few hundred milliseconds as an element or text selection is being dragged by the user. 983 Document: dragend event API, DOM, Document, DragEvent, Event, Reference, Web, drag and drop, dragend The dragend event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key). 984 Document: dragenter event API, DOM, Document, DragEvent, Event, Reference, Web, drag and drop, dragente...
...t API, DOM, Document, DragEvent, Event, Reference, Web, drag and drop, dragend The dragend event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key). 984 Document: dragenter event API, DOM, Document, DragEvent, Event, Reference, Web, drag and drop, dragenter The dragenter event is fired when a dragged element or text selection enters a valid drop target. 985 Document: dragexit event DOM, Event, Reference, drag and drop The dragexit event is fired when an element is no longer the drag operation's immediate selection target. 986 Document: dragleave event API, DOM, Document, DragEvent, Event, Reference, Web, drag and drop, dragleave The dragleave event is fired when a dragged elem...
...And 47 more matches
nsIHTMLEditor
o 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2) Method overview void addDefaultProperty(in nsIAtom aProperty, in AString aAttribute, in AString aValue); 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 sh...
...All); nsISupportsArray getLinkedObjects(); void getListItemState(out boolean aMixed, out boolean aLI, out boolean aDT, out boolean aDD); void getListState(out boolean aMixed, out boolean aOL, out boolean aUL, out boolean aDL); AString getParagraphState(out boolean aMixed); nsIDOMElement getSelectedElement(in AString aTagName); nsIDOMElement getSelectionContainer(); void ignoreSpuriousDragEvent(in boolean aIgnoreSpuriousDragEvent); void increaseFontSize(); void indent(in AString aIndent); void insertElementAtSelection(in nsIDOMElement aElement, in boolean aDeleteSelection); void insertFromDrop(in nsIDOMEvent aEvent); void insertHTML(in AString aInputString); void insertHTMLWithContext...
...tion(in nsIDOMElement aElement, in boolean aDeleteSelection); void insertFromDrop(in nsIDOMEvent aEvent); void insertHTML(in AString aInputString); void insertHTMLWithContext(in AString aInputString, in AString aContextStr, in AString aInfoStr, in AString aFlavor, in nsIDOMDocument aSourceDoc, in nsIDOMNode aDestinationNode, in long aDestinationOffset, in boolean aDeleteSelection); void insertLinkAroundSelection(in nsIDOMElement aAnchorElement); boolean isAnonymousElement(in nsIDOMElement aElement); void makeOrChangeList(in AString aListType, in boolean entireList, in AString aBulletType); boolean nodeIsBlock(in nsIDOMNode node); void pasteNoFormatting(in long aSelectionType); void rebuildDocumentFromSource(in AString ...
...And 31 more matches
Editor Embedding Guide - Archive of obsolete content
d structure filled with relative parameters 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. 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 paramete...
..., "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. GetCommandState "state_all"(boolean), "state_begin"(boolean), "state_end"(boolean), "state_mixed"(boolean), "state_enabled" (boolean) DoCommand no parameters Example normal underline cmd_tt Toggles teletype style (monospace font) on selection. GetCommandState "state_all"(boolean), "state_begin"(boolean), "state_end"(boolean), "state_mixed"(boolean), "state_enabled" (boolean) DoCo...
...xed"(boolean), "state_enabled" (boolean) DoCommand no parameters Example normal underline cmd_tt Toggles teletype style (monospace font) on selection. GetCommandState "state_all"(boolean), "state_begin"(boolean), "state_end"(boolean), "state_mixed"(boolean), "state_enabled" (boolean) DoCommand no parameters Example normal teletype cmd_strikethrough Toggles strikethrough style on selection. GetCommandState "state_all"(boolean), "state_begin"(boolean), "state_end"(boolean), "state_mixed"(boolean), "state_enabled" (boolean) DoCommand no parameters Example normal strikethrough cmd_superscript Toggles superscript style on selection. GetCommandState "state_all"(boolean), "state_begin"(boolean), "state_end"(boolean), "state_mixed"(boolean), "state_enabled" (boolean) DoCom...
...And 30 more matches
IME handling guide
ot converted as expected, the user can choose one of the clauses with Arrow keys and look for the expected result form the list in the drop down menu (In the following screenshot, the clause with the thicker underline is called "selected clause"). Basically, composition string and each clause style is rendered by Gecko. And the drop down menu is created by IME. Each clause is represented with selection in the editor. From chrome script, you can check it with nsISelectionController. In native code, you can access it with either nsISelectionController or mozilla::SelectionType (the latter is recommended because of type safer). And editor sets these IME selections from mozilla::TextRangeType which are sent by mozilla::WidgetCompositionEvent as mozilla::TextRangeArray. Following table explains the ...
...me script, you can check it with nsISelectionController. In native code, you can access it with either nsISelectionController or mozilla::SelectionType (the latter is recommended because of type safer). And editor sets these IME selections from mozilla::TextRangeType which are sent by mozilla::WidgetCompositionEvent as mozilla::TextRangeArray. Following table explains the mapping between them. ...
...can access it with either nsISelectionController or mozilla::SelectionType (the latter is recommended because of type safer). And editor sets these IME selections from mozilla::TextRangeType which are sent by mozilla::WidgetCompositionEvent as mozilla::TextRangeArray. Following table explains the mapping between them. ...
...And 22 more matches
Midas
of the scripting in the parent document. According to standards, The IFRAME element has the contentDocument property that refers to the document in the inline frame. It also has a property called contentWindow that refers to the window object inside the inline frame. This also avoids problems with bug 198155. In addition to the built-in commands, advanced editing can be done by manipulating the Selection and range objects. It is beneficial to be familiar with these objects when working with an editable document. Examples This example shows the basic structure described in the Notes section : <html> <head> <title>Simple Edit Box</title> </head> <body> <iframe id="MidasForm" src="about:blank" onload="this.contentDocument.designMode='on';" ></iframe> </body> </html> Methods ...
...itle> </head> <body> <iframe id="MidasForm" src="about:blank" onload="this.contentDocument.designMode='on';" ></iframe> </body> </html> Methods Document.execCommand Executes the given command. Document.queryCommandEnabled Determines whether the given command can be executed on the document in its current state. Document.queryCommandIndeterm Determines whether the current selection is in an indetermined state. Document.queryCommandState Determines whether the given command has been executed on the current selection. Document.queryCommandValue Determines the current value of the document, range, or current selection for the given command. Supported Commands Command Value Description backcolor A color code. This command will set the backgr...
...Otherwise, all selected characters will become bold. contentReadOnly This command will make the editor readonly(true)or editable(false). ...
...And 21 more matches
Index - Archive of obsolete content
s Password Manager to add, retrieve and remove stored credentials. 53 private-browsing Add-on SDK Check whether a given object is private, so an add-on can respect private browsing 54 querystring Add-on SDK Utility functions for working with query strings. 55 request NeedsUpdate, SDK, add-on Make simple network requests. 56 selection Add-on SDK Get and set text and HTML selections in the current web page. 57 self Add-on SDK Access data that is bundled with the add-on, and add-on metadata. 58 simple-prefs Add-on SDK Store preferences across application restarts. 59 simple-storage Add-on SDK, Add-ons, Reference Lets an add-on store data so that it's retain...
...n also be independently downloaded and installed by users if they include a list of pages to which they apply. 385 Creating a Mozilla Extension Add-ons, Extensions A Mozilla extension is an installable enhancement to the Mozilla browser that provides additional functionality (for example Linky, which adds an item to the context menu for opening multiple links in a document or selection). This tutorial walks you through the process of building a Mozilla extension that adds an icon to Mozilla's status bar showing the current status of the Mozilla source code (i.e. whether or not the latest version of the code is compiling successfully and passing tests). The extension will access Tinderbox, mozilla.org's webtool for tracking source code status, to get the status of the code. ...
...and modify the browser's built-in menus. Features can also create new menus and attach them almost anywhere, chrome or content, as popup menus or context menus. 526 Notifications The Notification Box appears at the bottom right corner of the browser and displays important information to the user. 527 Panel Please refer to the Panels JEP. 528 Selection Jetpack's selection API provides a method for detecting the selections made by the user. Features can get, set, and listen for selection events in HTML or plain text. 529 Selection Jetpack's selection API provides a method for detecting the selections made by the user. Features can get, set, and listen for selection events in HTML or plain text. 530 Tab...
...And 13 more matches
listbox - Archive of obsolete content
element. See List Controls for more information. ...
... for more information. ...
...disabled, disableKeyNavigation, itemCount, listBoxObject, selectedCount, selectedIndex, selectedItem, selectedItems, selType, suppressOnSelect, tabIndex, value Methods addItemToSelection, appendItem, clearSelection, ensureElementIsVisible, ensureIndexIsVisible, getIndexOfFirstVisibleRow, getIndexOfItem, getItemAtIndex, getNumberOfVisibleRows, getRowCount, getSelectedItem, insertItemAt, invertSelection, moveByOffset, removeItemAt, removeItemFromSelection, scrollToIndex, selectAll, selectItem, selectItemRange, timedSelect, toggleItemSelection Examples <listbox id="theList"> <listitem label="Ruby"/> <listitem label="Emerald"/> <listitem label="Sapphire" selected="true"/> <listitem label="Diamond"/> </listbox> <listbox id="theList" rows="10" width="400"> <listhead> <listhead...
...And 11 more matches
richlistbox - Archive of obsolete content
<< XUL Reference home [ Examples | Attributes | Properties | Methods | Related ] This element is used to create a list of listitems (richlistitems), similar to a listbox, but is designed to be used when the items do not contain simple text content. Note: In versions of Firefox prior to Firefox 3, rich list boxes support only single selection. Firefox 3 introduced multiple selection to rich list boxes. Attributes disabled, disableKeyNavigation, preference, seltype, suppressonselect, tabindex, value Properties accessibleType, currentIndex, currentItem, disabled, disableKeyNavigation, itemCount, scrollBoxObject, selectedCount, selectedIndex, selectedItem, selectedItems, selType, suppressOnSelect, tabIndex, value Methods addItemToSelection, appendItem, clearSelection,...
...sabled, disableKeyNavigation, itemCount, scrollBoxObject, selectedCount, selectedIndex, selectedItem, selectedItems, selType, suppressOnSelect, tabIndex, value Methods addItemToSelection, appendItem, clearSelection, ensureElementIsVisible, ensureIndexIsVisible, getIndexOfFirstVisibleRow, getIndexOfItem, getItemAtIndex, getNumberofVisibleRows, getRowCount, getSelectedItem, insertItemAt, invertSelection, moveByOffset, removeItemAt, removeItemFromSelection, scrollToIndex, selectAll, selectItem, selectItemRange, timedSelect, toggleItemSelection Examples <richlistbox> <richlistitem> <description>A XUL Description!</description> </richlistitem> <richlistitem> <button label="A XUL Button"/> </richlistitem> </richlistbox> The richlistbox element contains multiple richlistitem elem...
...medSelect, toggleItemSelection Examples <richlistbox> <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 s...
...And 11 more matches
Document.execCommand() - Web APIs
When using contentEditable, execCommand() affects the currently active editable element. ...
... URL of the image to insert. Specify null if no argument is needed. Commands backColor Changes the document background color. In styleWithCss mode, it affects the background color of the containing block instead. This requires a <color> value string to be passed 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...
...her 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. Requires a URI string as a value argument for the hyperlink's href. The URI must contain at least a single character, which may be whitespace. (Internet Explorer will create a link with a null value.) cut Removes the current selection and copies it to the clipboard. When this behavior is enabled varies between browsers, and its conditions have evolved over tim...
...And 11 more matches
nsIDOMWindowUtils
ueryContentEventResult sendQueryContentEvent(in unsigned long aType, in unsigned long aOffset, in unsigned long aLength, in long aX, in long aY); Obsolete since Gecko 31.0 nsIQueryContentEventResult sendQueryContentEvent(in unsigned long aType, in unsigned long aOffset, in unsigned long aLength, in long aX, in long aY, [optional] in unsigned long aAdditionalFlags); boolean sendSelectionSetEvent(in unsigned long aOffset, in unsigned long aLength, in boolean aReverse); Obsolete since Gecko 31.0 boolean sendSelectionSetEvent(in unsigned long aOffset, in unsigned long aLength, [optional] in unsigned long aAdditionalFlags); void sendSimpleGestureEvent(in AString aType, in float aX, in float aY, in unsigned long aDirection, in double aDelta, in long aModifiers); ...
...ContentEvent(). This flag must not be set with QUERY_CONTENT_FLAG_USE_NATIVE_LINE_BREAK. When this is set, the aOffset and aLength are offset and length in/of the content generated with XP line breaks (I.e., "\n" on all platforms). Additionally, the offset, length and string of result are also computed with XP line breaks. This is more useful for Javascript in chrome. ...
...Length are offset and length in/of the content generated with XP line breaks (I.e., "\n" on all platforms). Additionally, the offset, length and string of result are also computed with XP line breaks. This is more useful for Javascript in chrome. QUERY_CONTENT_FLAG_SELECTION_SPELLCHECK 0x0002 One of values of aAdditionalFlags of sendQueryContentEvent(). QUERY_CONTENT_FLAG_SELECTION_IME_RAWINPUT 0x0008 One of values of aAdditionalFlags of sendQueryContentEvent(). ...
...And 10 more matches
Basics
</math> for some <i>n</i>. When you left-click any individual entry, it should toggle between its expanded and unexpanded forms. You can also <a href="javascript:unexpand();">unexpand all</a> or <a href="javascript:expand();">expand all</a>. ...
...href="javascript:expand();">expand all</a>. ...
.../mo> <mrow> <mi>x</mi> <mo>+</mo> <mi>y</mi> </mrow> <mo>)</mo> </mrow> <mn>0</mn> </msup> <mn>1</mn> </maction> </mtd> <mtd> <maction id="a12" actiontype="toggle" selection="2"> <msup> <mrow> <mo>(</mo> <mrow> <mi>x</mi> <mo>+</mo> <mi>y</mi> </mrow> <mo>)</mo> </mrow> <mn>1</mn> </msup> <mrow> <mi>x</mi> <mo>+</mo> <mi>y</mi> </mrow> </maction> </mtd> <mtd> <maction id="a13" actiontype="toggle" selection="2"> <msup> <mrow> <mo>(</mo> <mrow> <mi>x</mi> <mo>+</mo> <mi>y</mi> </mrow> <mo>)</mo> </mrow> <mn>2</mn> </msup> <mrow> <msup> <mi>x</mi> <mn>2</mn> </msup> <mo>+</mo> <mrow> <mn>2</mn> <mo>&InvisibleTimes;</mo> <mi>x</mi> <mo>&InvisibleTimes;</mo> <mi>y</mi> </mrow> <mo>+</mo> <msup> <mi>y</mi> <mn>2</mn> </msup> </mrow> </maction> </mtd> </mtr> <mtr> <mtd> <maction id="a21" actiontype="toggl...
...And 9 more matches
nsIAccessibleText
accessible/public/nsIAccessibleText.idlScriptable Please add a summary to this article. ...
...tCharacterAtOffset(in long offset); void getCharacterExtents(in long offset, out long x, out long y, out long width, out long height, in unsigned long coordType); long getOffsetAtPoint(in long x, in long y, in unsigned long coordType); void getRangeExtents(in long startOffset, in long endOffset, out long x, out long y, out long width, out long height, in unsigned long coordType); void getSelectionBounds(in long selectionNum, out long 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); nsIPersist...
...TextAtOffset(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 startIndex, in long endIndex, in unsigned long coordinateType, in long x, in long y); void setSelectionBounds(in long selectionNum, in long startOffset, in long endOffset); Attributes Attribute Type Description caretOffset long The c...
...And 9 more matches
Index - Archive of obsolete content
Archive › Mozilla › XUL › Index
a menu. To do this, the new menu will need to be laid over the existing menu which the item should be displayed upon. ...
...UL Reference No summary! 457 cancelDialog XUL Methods, XUL Reference No summary! 458 centerWindowOnScreen XUL Methods, XUL Reference No summary! 459 checkAdjacentElement XUL Methods, XUL Reference No summary! 460 clearResults NeedsContent, NeedsHelp, XUL Methods, XUL Reference No summary! 461 clearSelection XUL Methods, XUL Reference No summary! 462 click XUL Methods, XUL Reference No summary! 463 close XUL Methods, XUL Reference No summary! 464 collapseToolbar XUL Methods, XUL Reference No summary! 465 contains XUL Methods, XUL Reference No summary! 466 decrease XUL Methods, XUL Reference ...
...UL Reference No summary! 523 increasePage XUL Methods, XUL Reference No summary! 524 insertItem XUL Methods, XUL Reference The id should match an element in the toolbar's toolbarpalette. ...
...And 8 more matches
Index
Mozilla › Tech › XPCOM › Index
Provides localized string of global keyboard accelerator for default action, such as Ctrl+O for Open file (Ctrl + O). 254 Description Accessible description -- long text associated with this node. 255 DoAction This method performs the accessible action at the given zero-based index. Action number 0 is the default action. 256 ExtendSelection This method extends the current selection from its current accessible anchor node to this accessible. 257 FirstChild Returns first child node in accessible tree. 258 FocusedChild Focused accessible child of node. 259 GetAccessibleAbove This method returns an accessible node geometrically above this one. 260 Ge...
...cessible tree. 283 RelationsCount Returns the number of accessible relations for this object. 284 Role Enumerated accessible role for the associated element. The values depend on platform because of variations. See the ROLE_* constants in roles documentation. 285 SetSelected This method adds or remove this accessible to the current selection. 286 TakeFocus This method focuses this accessible node. 287 TakeSelection This method selects this accessible node only. 288 Value Accessible value -- a number or a secondary text equivalent for this node. Widgets that use role attribute can force a value using the valuenow attribute. 289 nsIAccessibleCaretMoveEvent ...
...nterface Reference No summary! 311 nsIAccessibleScrollType Accessibility, Interfaces, Interfaces:Scriptable, XPCOM, XPCOM Interface Reference No summary! 312 nsIAccessibleSelectable Accessibility, Interfaces, Interfaces:Scriptable, XPCOM, XPCOM API Reference, XPCOM Interface Reference Adds the specified accessible child of the object to the object's selection. If the specified object is already selected, then it does nothing. 313 nsIAccessibleStateChangeEvent Interfaces, Interfaces:Scriptable, XPCOM, XPCOM Interface Reference None. 314 nsIAccessibleStates Accessibility, Interfaces, Interfaces:Scriptable, XPCOM, XPCOM Interface Reference Prior to Gecko 1.9, these constants were implemented in nsIAccessible. ...
...And 8 more matches
IAccessibleText
ication developer was not satisfied with how screen readers have handled the reading of sentences this boundary type could be implemented and screen readers could use the application's version of a sentence rather than the screen reader's. The rest of the boundary types must be supported. This enum is used in textBeforeOffset(), textAtOffset(), and textAfterOffset(). ...
...] long endOffset, [out] BSTR textAttributes ); [propget] HRESULT caretOffset([out] long offset ); [propget] HRESULT characterExtents([in] long offset, [in] enum IA2CoordinateType coordType, [out] long x, [out] long y, [out] long width, [out] long height ); [propget] HRESULT nCharacters([out] long nCharacters ); [propget] HRESULT newText([out] IA2TextSegment newText ); [propget] HRESULT nSelections([out] long nSelections ); [propget] HRESULT offsetAtPoint([in] long x, [in] long y, [in] enum IA2CoordinateType coordType, [out] long offset ); [propget] HRESULT oldText([out] IA2TextSegment oldText ); HRESULT removeSelection([in] long selectionIndex ); HRESULT scrollSubstringTo([in] long startIndex, [in] long endIndex, [in] enum IA2ScrollType scrollType ); HRESULT scrollSubstringToPoi...
... offset ); [propget] HRESULT oldText([out] IA2TextSegment oldText ); HRESULT removeSelection([in] long selectionIndex ); HRESULT scrollSubstringTo([in] long startIndex, [in] long endIndex, [in] enum IA2ScrollType scrollType ); HRESULT scrollSubstringToPoint([in] long startIndex, [in] long endIndex, [in] enum IA2CoordinateType coordinateType, [in] long x, [in] long y ); [propget] HRESULT selection([in] long selectionIndex, [out] long startOffset, [out] long endOffset ); HRESULT setCaretOffset([in] long offset ); HRESULT setSelection([in] long selectionIndex, [in] long startOffset, [in] long endOffset ); [propget] HRESULT text([in] long startOffset, [in] long endOffset, [out] BSTR text ); [propget] HRESULT textAfterOffset([in] long offset, [in] enum IA2TextBoundaryType boundaryType,...
...And 8 more matches
nsIEditor
<< XPCOM API Reference editor/nsIEditor.idlScriptable Provides methods and attributes used when editing page content. ...
...eOrEquivalent(in nsIDOMElement element, in AString sourceAttrName, in AString sourceAttrValue, in boolean aSuppressTransaction); void removeAttributeOrEquivalent(in nsIDOMElement element, in DOMString sourceAttrName, in boolean aSuppressTransaction); void postCreate(); void preDestroy(in boolean aDestroyingFrames); Selected Content Removal void deleteSelection(in short action, in short stripWrappers); Document Info and File Methods void resetModificationCount(); long getModificationCount(); void incrementModificationCount(in long aModCount); void incrementModificationCount(in long aModCount); Transaction Methods void doTransaction(in nsITransaction txn); void enableUndo(in boolean ...
...n 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(); boolean canCopy(); ...
...And 8 more matches
HTMLTextAreaElement - Web APIs
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 control. selectionDirection string: Returns / Sets the direction in which selection occurred. This is "forward" if selection was performed in the start-to-end direction of the current locale, or "backward" for the opposite direction. This can also be "none" if the direction is unknown. selectionEnd unsigned long: Returns / Sets the index of the end of selected text. If no text is selected, contains t...
...selection was performed in the start-to-end direction of the current locale, or "backward" for the opposite direction. This can also be "none" if the direction is unknown. selectionEnd unsigned long: Returns / Sets the index of the end of selected text. If no text is selected, contains the index of the character that follows the input cursor. ...
...cale, or "backward" for the opposite direction. This can also be "none" if the direction is unknown. selectionEnd unsigned long: Returns / Sets the index of the end of selected text. If no text is selected, contains the index of the character that follows the input cursor. On being set, the control behaves as if setSelectionRange() had been called with this as the second argument, and selectionStart as the first argument. selectionStart unsigned long: Returns / Sets the index of the beginning of selected text. If no text is selected, contains the index of the character that follows the input cursor. On being set, the control behaves as if setSelectionRange() had been called with this as the first argument, and selectionEnd as the second argument. tabIndex long: R...
...And 7 more matches
TextRange - Web APIs
Web › API › TextRange
extRange object represents a fragment of text in a document, similar to the standard defined Range interface. This object is used to represent a specific piece of text in the document. For example, when you hold down the mouse to select the content on the page, you create a typical TextRange. It is implemented in IE, then a TextRange object can be created by Element.createTextRange() or Document.selection.createRange(). Note that this interface is not supported in non IE browsers. Alternative Selection and Range interfaces can be used. Properties TextRange.boundingHeightRead only Returns the height of the rectangle bound to the TextRange object. TextRange.boundingLeftRead only Returns the distance between the left edge of the rectangle that binds the TextRange object and the left edg...
...xtRange object. TextRange.htmlText Gets or sets the HTML content within the TextRange. TextRange.text Gets or sets the plaintext content within the TextRange. Methods TextRange.collapse() Move the caret to the beginning or end of the current range. TextRange.duplicate() Returns a copy of TextRange. TextRange.execCommand() Executes a command on the current document, the current selection, or the given scope. TextRange.expand() Expand the range to include the full range of specified units. For example, expanding a "word" means that the words at both ends of the range will completely included in the range. xpand to wor may become expand to words, etc. TextRange.findText() Searches the specified text in the original range and adjusts the range to include the first match. TextRa...
...he range by a specified number of units. TextRange.moveStart() Moves the start of the range by a specified number of units. TextRange.moveToElementText() Causes the range to contain the text of the specified element. Can only be used on Element objects. TextRange.parentElement() Returns the parent element of the range, which is the smallest element that contains the 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 speci...
...And 7 more matches
Miscellaneous - Archive of obsolete content
It also collapses consecutive whitespaces into a single whitespace, and returns at most 150 characters, m...
...It also collapses consecutive whitespaces into a single whitespace, and returns at most 150 characters, making it ideal to display text in context ...
...It also collapses consecutive whitespaces into a single whitespace, and returns at most 150 characters, making it ideal to display text in context menus. It is defined at //github.com/RealityRipple/Pale-Moon/blob/ma...
...And 6 more matches
Accessible Toolkit Checklist
text, a checkbox, or a table cell, etc. get_accState: a 32 bit field representing possible on/off states, such as focused, focusable, selected, selectable, visible, protected (for passwords), checked, etc. get_accKeyboardShortcut: What is the keyboard shortcut for this IAccessible (underlined alt+combo mnemonic) get_accFocus: Which child is focused? get_accSelection: Which children of this item are selected? accLocation: Get the x,y coordinates, and the height and width of this IAccessible node. accNavigate: Navigate to the first/last child, previous/next sibling, up, down, left or right from this IAccessible. [important, but no need to implement up/down/left/right] accDoDefaultAction: Perform the action described by get_accDefa...
...accessibility control panel, SPI_GETHIGHCONTRAST), or when user selects a "Native" skin option in your software, then get all look and feel from current OS skin. The high contrast theme can be toggled dynamically with LeftAlt+LeftShift+printscreen Expose the SPI_GETSCREENREADER flag to XML/scripts so that apps can alter behavior Use system highlight color where possible for item selection, but never use that exact color in more than 1 place at a time, otherwise screen reader will read everything with that color whenever highlight changes Pay attention to SPI_GETCARETWIDTH for the correct width of the caret Pay attention to 'route mouse pointer to default button' setting It's possible that the user wants mnemonics hidden except when the alt key is pressed. This ca...
...ing linked and traversed states, and accessible value that holds destination URL Text fields - single and multiple line It's probably best to use native widgets for these, otherwise accessibility support will be quite difficult Tab should always focus the next item, not insert a tab, unless there's a really good reason and another way to navigate Always use system selection color, otherwise screen reader won't read the text Make sure the caret is never blinking when focus is not in text field Handle standard editing keys, such as arrow keys, home, end, pageup, pagedown, ctrl+left/right, shifted keys for selection, delete, ctrl+delete, backspace, ctrl+backspace, ctrl+a, ctrl+b, ctrl+c, ctrl+i, ctrl+u, ctrl+x, ctrl+v, ctrl+[shift]+z In multiline text...
...And 6 more matches
Document - Web APIs
Web › API › Document
entHandler representing the code to be called when the fullscreenchange event is raised. Document.onfullscreenerror Is an EventHandler representing the code to be called when the fullscreenerror event is raised. Document.onpaste Represents the event handling code for the paste event. Document.onreadystatechange Represents the event handling code for the readystatechange event. Document.onselectionchange Is an EventHandler representing the code to be called when the selectionchange event is raised. Document.onvisibilitychange Is an EventHandler representing the code to be called when the visibilitychange event is raised. The Document interface is extended with the GlobalEventHandlers interface: GlobalEventHandlers.onabort Is an EventHandler representing the code to be called when t...
...senting the code to be called when the seeked event is raised. GlobalEventHandlers.onseeking Is an EventHandler representing the code to be called when the seeking event is raised. GlobalEventHandlers.onselect Is an EventHandler representing the code to be called when the select event is raised. GlobalEventHandlers.onselectstart Is an EventHandler representing the code to be called when the selectionchange event is raised, i.e. when the user starts to make a new text selection on a web page. GlobalEventHandlers.onselectionchange Is an EventHandler representing the code to be called when the selectionchange event is raised, i.e. when the text selected on a web page changes. GlobalEventHandlers.onshow Is an EventHandler representing the code to be called when the show event is raised. Glob...
...mmand. Document.write() Writes text in a document. Document.writeln() Writes a line of text in a document. Methods included from DocumentOrShadowRoot The Document interface includes the following methods defined on the DocumentOrShadowRoot mixin. Note that this is currently only implemented by Chrome; other browsers still implement them on the Document interface. DocumentOrShadowRoot.getSelection() Returns a Selection object representing the range of text selected by the user, or the current position of the caret. DocumentOrShadowRoot.elementFromPoint() Returns the topmost element at the specified coordinates. DocumentOrShadowRoot.elementsFromPoint() Returns an array of all elements at the specified coordinates. DocumentOrShadowRoot.caretPositionFromPoint() Returns a CaretPosition ...
...And 6 more matches
Event reference
An element was toggled to or from fullscreen mode. fullscreenerror It was impossible to switch to fullscreen mode for technical reasons or because the permission was denied. resize The document view has been resized. scroll The document view or an element has been scrolled. Clipboard events Event Name Fired When cut The selection has been cut and copied to the clipboard copy The selection has been copied to the clipboard paste The item from the clipboard has been pasted Keyboard events Event Name Fired When keydown ANY key is pressed keypress ANY key (except Shift, Fn, or CapsLock) is in a pressed position (fired continuously). keyup ANY k...
... The pointer was locked or released. pointerlockerror It was impossible to lock the pointer for technical reasons or because the permission was denied. select Some text is being selected. wheel A wheel button of a pointing device is rotated in any direction. ...
... wheel A wheel button of a pointing device is rotated in any direction. Drag & Drop events Event Name Fired When drag An element or text selection is being dragged (fired continuously every 350ms). dragend A drag operation is being ended (by releasing a mouse button or hitting the escape key). dragenter A dragged element or text selection enters a valid drop target. dragstart The user starts dragging an element or text selection. dragleave A dragged element or text selection leaves a valid drop target. dragover An element or text selection is being dragged over a valid drop target (fired continuously every 350ms). drop An element is dropped on a valid drop target. Media e...
...And 6 more matches
nsIPlacesView
Views do this, and other things, by implementing the nsIPlacesView interface. Note: nsIPlacesView does not exist in IDL at the moment. ...
...Views do this, and other things, by implementing the nsIPlacesView interface. Note: nsIPlacesView does not exist in IDL at the moment. ...
...Views do this, and other things, by implementing the nsIPlacesView interface. Note: nsIPlacesView does not exist in IDL at the moment. ...
...And 5 more matches
DocumentOrShadowRoot.activeElement - Web APIs
Other times the focused element might be a <select> element (menu) or an <input> element, of type "button", "checkbox", or "radio". ...
...Other times the focused element might be a <select> element (menu) or an <input> element, of type "button", "checkbox", or "radio". ...
...Other times the focused element might be a <select> element (menu) or an <input> element, of type "button", "checkbox", or "radio". ...
...And 5 more matches
XRSession: selectend event - Web APIs
celerometer. Bubbles Yes Cancelable No Interface XRInputSourceEvent Event handler property onselectend For details on how the selectstart, select, and selectend events work, and how you should react to them, see Primary actions in Inputs and input sources. Examples The following example uses addEventListener() to establish handlers for the selection events: selectstart, selectend, and select. This snippet is the core of an event handler to allow the user to grab objects in the scene and move them around. In this case, a single function is used to handle all three events, allowing them to share certain code that's the same regardless of which of the three events is received. Only after completing those tasks does the onSelectionEvent() funct...
... pose transform as inputs. This places the object into its new position in the world and triggers any effects that may arise from doing so (like scheduling an animation of a splash if dropped in water, etc). The selectend event results in a myStopTracking() function being called with the object being dragged and the final target ray pose's transform. ...
...ts new position in the world and triggers any effects that may arise from doing so (like scheduling an animation of a splash if dropped in water, etc). The selectend event results in a myStopTracking() function being called with the object being dragged and the final target ray pose's transform. ...
...And 5 more matches
XRSession: selectstart event - Web APIs
lerometer. Bubbles Yes Cancelable No Interface XRInputSourceEvent Event handler property onselectstart For details on how the selectstart, select, and selectend events work, and how you should react to them, see Primary actions in Inputs and input sources. Examples The following example uses addEventListener() to establish handlers for the selection events: selectstart, selectend, and select. This snippet is the core of an event handler to allow the user to grab objects in the scene and move them around. In this case, a single function is used to handle all three events, allowing them to share certain code that's the same regardless of which of the three events is received. Only after completing those tasks does the onSelectionEvent() funct...
... pose transform as inputs. This places the object into its new position in the world and triggers any effects that may arise from doing so (like scheduling an animation of a splash if dropped in water, etc). The selectend event results in a myStopTracking() function being called with the object being dragged and the final target ray pose's transform. ...
...ts new position in the world and triggers any effects that may arise from doing so (like scheduling an animation of a splash if dropped in water, etc). The selectend event results in a myStopTracking() function being called with the object being dragged and the final target ray pose's transform. ...
...And 5 more matches
context-menu - Archive of obsolete content
y right-clicking a blank spot in this page, or on text. Make sure that no text is selected. The menu that appears should contain the items "Back", "Forward", "Reload", "Stop", and so on. This is the page context. The page context is appropriate when your item acts on the page as a whole. It does not occur when the user invokes the context menu on a link, image, or other non-text node, or while a selection exists. Declarative contexts You can specify some simple, declarative contexts when you create a menu item by setting the context property of the options object passed to its constructor, like this: var cm = require("sdk/context-menu"); cm.Item({ label: "My Menu Item", context: cm.URLContext("*.mozilla.org") }); Constructor Description PageContext() The page conte...
...larative contexts You can specify some simple, declarative contexts when you create a menu item by setting the context property of the options object passed to its constructor, like this: var cm = require("sdk/context-menu"); cm.Item({ label: "My Menu Item", context: cm.URLContext("*.mozilla.org") }); Constructor Description PageContext() The page context. SelectionContext() This context occurs when the menu is invoked on a page in which the user has made a selection. SelectorContext(selector) This context occurs when the menu is invoked on a node that either matches selector, a CSS selector, or has an ancestor that matches. selector may include multiple selectors separated by commas, e.g., "a[href], img". URLContext(matchPattern) ...
...our listeners return true, the items associated with the content scripts are shown in the menu. In addition to returning true, your "context" listeners can also return strings. When a "context" listener returns a string, it becomes the item's new label. ...
...And 4 more matches
Add a Context Menu Item - Archive of obsolete content
To follow this tutorial you'll need to have learned the basics of jpm. To add items and submenus to the Firefox context menu, use the context-menu module. Here's an add-on that adds a new context menu item. The item is displayed whenever something in the page is selected. ...
...ics of jpm. To add items and submenus to the Firefox context menu, use the context-menu module. Here's an add-on that adds a new context menu item. The item is displayed whenever something in the page is selected. When it's clicked, the selection is sent to the main add-on code, which just logs it: var contextMenu = require("sdk/context-menu"); var menuItem = contextMenu.Item({ label: "Log Selection", context: contextMenu.SelectionContext(), contentScript: 'self.on("click", function () {' + ' var text = window.getSelection().toString();' + ' self.postMessage(text);' + '});', onMessage: function (selectionText) { console.log(selectionText); } }); Try it: run the add-on, load a web page, select some text and right-click. You sho...
...ntentScript: 'self.on("click", function () {' + ' var text = window.getSelection().toString();' + ' self.postMessage(text);' + '});', onMessage: function (selectionText) { console.log(selectionText); } }); Try it: run the add-on, load a web page, select some text and right-click. You should see the new item appear: Click it, and the selection is logged to the console (or the shell, if you're running an instance of Firefox from the command line): info: elephantine lizard Details All this add-on does is to construct a context menu item. You don't need to add it: once you have constructed the item, it is automatically added in the correct context. The constructor in this case takes four options: label, context, contentScript, and onM...
...And 4 more matches
Manipulating Lists - Archive of obsolete content
ts and work in the same manner. In fact, these methods are part of the nsIDOMXULSelectControlElement interface so any XUL elements which implement this interface have these methods. This includes the menulist, radiogroup and tabs elements. For example, to add a new item to a menulist, you can use the same syntax as for a listbox. The right kind of element will be appended in each situation. List Selection The nsIDOMXULSelectControlElement interface provides two additonal properties, selectedIndex and selectedItem. The former returns the index of the selected item while the latter returns the selected element. For instance the selectedItem of a menulist will be the menuitem that is selected. If no item is selected, selectedIndex will return -1, while selectedItem will return null. Getting the sel...
...ed. For the tabs element, it is often more convenient to use functions of the tabbox element instead. It also has a selectedIndex function which will return the index of the selected tab. However, to get the selected item, use the tabbox's selectedTab property instead. Or, use the selectedPanel property to get the selected panel, that is, return the content associated with the tab. Changing the selection All of the selection related properties described above may also be assigned a new value to change the selection. In the next example, the selectedIndex property of a radiogroup element is changed based on the value entered in a textbox. This code isn't foolproof though; for example it doesn't check if the value entered is out of range. You will want to make sure that you add this kind of error ...
...For example the selectedItems property holds a list of the items that are selected, while the selectedCount property holds the number of items selected. Typically, you will use these properties to iterate over the list and perform some ...
...And 4 more matches
XForms Select1 Element - Archive of obsolete content
(see the spec) element to contain them. Note, some representations of the select1 element do not support visual grouping. Attributes UI Common 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. ...
...cify the keyboard shortcut for focusing this control. Single-Node Binding Special selection - this attribute, when set to 'open', allows the user to provide free entry to the list. Possible values are open and closed, default is closed (see #Representations section to refer if the attribute is supported for every representation). incremental - supported, default value is true Properties selection - see corresponding attribute incremental - see corresponding attribute Type restrictions The select1 element can be bound to a node containing simple content. The data binding restriction to simple content may be relaxed when an itemset element is used, which allows the available choices to be obtained from an XForms Model. The relaxation happens when the itemset element specifies the item v...
...r the specified appearance attribute values: combobox - default representation (xhtml/xul) listbox - used when appearance = 'compact' (xhtml/xul) radio group - used when appearance = 'full' (xhtml/xul) combobox Displaying a combobox is the default representation (xhtml/xul). ...
...And 4 more matches
source-editor.jsm
unt(); Number getLineEnd(Number aLineIndex, Boolean aIncludeDelimiter); Number getLineStart(Number aLineIndex); String getMode(); String getText([optional] Number aStart, [optional] Number aEnd); String getSelectedText(); void setMode(String aMode); void setText(String aText, [optional] Number aStart, [optional] Number aEnd); Selection operations void dropSelection(); Number getCaretOffset(); Object getCaretPosition(); Object getSelection(); void setCaretOffset(Number aOffset); void setCaretPosition(Number aLine, [optional] Number aColumn, [optional] Number aAlign); void setSelection(Number aStart, Number aEnd); Breakpoint management void addBreakp...
... the editor gains focus. SourceEditor.EVENTS.MOUSE_MOVE "MouseMove" Fired when the user moves the mouse over a line annotation. SourceEditor.EVENTS.MOUSE_OUT "MouseOut" Fired when the mouse pointer leaves a line annotation. SourceEditor.EVENTS.MOUSE_OVER "MouseOver" Fired when the mouse pointer enters a line annotation. SourceEditor.EVENTS.SELECTION "Selection" Fired when the current selection in the editor changes. SourceEditor.EVENTS.TEXT_CHANGED "TextChanged" Fired when the editor's content changes. Methods addBreakpoint Adds a breakpoint to be triggered at a certain line in the code, under an optional condition. Note: Implementing actual support for debugger features such as breakpoints is up to you. The ed...
...mines whether or not there are changes that can be undone. Boolean canUndo(); Parameters None. Return value true if there are changes that can be undone, otherwise false. destroy() Destroys the editor, releasing resource it's allocated and removing event handlers it's installed. You should call this method when you're done using the editor object. void destroy(); Parameters None. dropSelection() Deselects the currently selected text. void dropSelection(); Parameters None. endCompoundChange() Ends a compound change that was previously started by calling startCompoundChange(). All changes made to the text between the two calls is considered to be a single edit for the purposes of undo operations. void endCompoundChange(); Parameters None. find() Finds a string in the editor'...
...And 4 more matches
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 ...
...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 Methods addChildToSelection() Adds the specified accessible child of the object to the object's selection. If the specified object is already selected, then it does nothing. void addChildToSelection( in long index ); Parameters index The zero-based accessible child index. Exceptions thrown NS_ERROR_FAILURE If the specified object is not selectable. ...
...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. ...
...And 4 more matches
nsIClipboardCommands
ients 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. Inherits from: nsISupports Last changed in Gecko 1.7 Method overview boolean canCopyImageContents(); boolean canCopyImageLocation(); boolean canCopyLinkLocation(); boolean canCopySelection(); boolean canCutSelection(); boolean canPaste(); void copyImageContents(); void copyImageLocation(); void copyLinkLocation(); void copySelection(); void cutSelection(); void paste(); void selectAll(); void selectNone(); Methods canCopyImageContents() Returns whether we can copy an image's contents. boolean canCopyImageContents(); Parameters None. Return value true if an i...
...an image is selected, false otherwise. canCopyImageLocation() Returns whether we can copy an image location. boolean canCopyImageLocation(); Parameters None. Return value true if an image is selected, false otherwise. canCopyLinkLocation() Returns whether we can copy a link location. boolean canCopyLinkLocation(); Parameters None. Return value true if a link is selected, false otherwise. canCopySelection() Returns whether there is a selection and it is copyable. boolean canCopySelection(); Parameters None. Return value true if there is a selection, false otherwise. canCutSelection() Returns whether there is a selection and it is not read-only. boolean canCutSelection(); Parameters None. Return value true if the current selection can be cut, false otherwise. canPaste() Returns whether the curren...
...copyImageContents() Copy the contents of the selected image. void copyImageContents(); Parameters None. ...
...And 4 more matches
nsIDragService
DRAGDROP_ACTION_COPY ...
... DRAGDROP_ACTION_COPY 1 The drag...
... DRAGDROP_ACTION_COPY 1 The drag and drop o...
...And 4 more matches
ARIA: listbox role - Accessibility
ractivity to manage focus for all the descendants, and native HTML elements provide this functionality for you for free. Elements with the role listbox have an implicit aria-orientation value of vertical. When a list is tabbed to, the first item in the list will be selected if nothing else already is. Up/down arrows navigate the list, and pressing Shift + Up/Down arrows will move and extend the selection. ...
...It is recommended that a checkbox, link or other method be used to select all items, and Ctrl+A could be used as a shortcut key for this. ...
...ves focus, the first option receives focus. Optionally, the first option may be automatically selected. If an option is selected before the listbox receives focus, focus is set on the selected option. When a multi-select listbox receives focus: If none of the options are selected before the listbox receives focus, focus is set on the first option and there is no automatic change in the selection state. If one or more options are selected before the listbox receives focus, focus is set on the first option in the list that is selected. Down Arrow: Moves focus to the next option. Optionally, in a single-select listbox, selection may also move with focus. Up Arrow: Moves focus to the previous option. Optionally, in a single-select listbox, selection may also move with focus. Home (O...
...And 4 more matches
List of commands - Archive of obsolete content
The following lists commands which might be usable by <command> or command dispatchers/controllers. ...
... The following lists commands which might be usable by <command> or command dispatchers/controllers. ...
... The following lists commands which might be usable by <command> or command dispatchers/controllers. ...
...And 3 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
mentcolumn, showimagecolumn, size, tabindex, tabscrolling, timeout, type, value Properties accessibleType, completeDefaultIndex, controller, crop, disableAutoComplete, disableKeyNavigation, disabled, editable, focused, forceComplete, highlightNonMatches, ignoreBlurWhileSearching, inputField, label, maxLength, maxRows, minResultsForPopup, open, popup, popupOpen, searchCount, searchParam, selectionEnd, selectionStart, showCommentColumn, showImageColumn,size, tabIndex, tabScrolling, textLength, textValue, timeout, type, value Methods getSearchAt, onSearchComplete, onTextEntered, onTextReverted, select, setSelectionRange Examples <textbox type="autocomplete" autocompletesearch="history"/> Attributes accesskey Type: character This should be set to a character that is used...
...rue, blur events are ignored while searching, which means that the autocomplete popup will not disappear. inputtooltiptext Type: string The tooltip text for the textbox. 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. maxlength Type: integer The maximum number of characters that the textbox allows to be entered. maxrows Type: integer The number of rows to show in the results list at a time. A scrollbar will appear so the user can scroll through the remaining items. minresultsforpopup New in Thunderbird 3Requires SeaMonkey 2.0 Type: integer The mini...
... Indicates whether the popup is open or not. Set this property to open or close the popup. searchCount New in Thunderbird 15 Requires SeaMonkey 2.12 Type: integer Returns the number of search components used. This property is read only. searchParam New in Thunderbird 15 Requires SeaMonkey 2.12 Type: string Gets and sets the value of the autocompletesearchparam attribute. ...
...And 3 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
e Properties accessible, alwaysOpenPopup, autoFill, autoFillAfterMatch, completeDefaultIndex, crop, disableAutocomplete, disabled, editable, focused, forceComplete, highlightNonMatches, ignoreBlurWhileSearching, inputField, isSearching, isWaiting, label, maxLength, maxRows, minResultsForPopup, noMatch, open, popup, popupOpen, resultsPopup, searchCount, searchParam, searchSessions, selectionEnd, selectionStart, sessionCount, showCommentColumn, showPopup, size, tabIndex, tabScrolling, textLength, textValue, timeout, type, userAction, value Methods addSession, clearResults, getDefaultSession, getResultAt, getResultCount, getResultValueAt, getSession, getSessionByName, getSessionResultAt, getSessionStatusAt, getSessionValueAt, removeSession, select, setSelectionRange, sy...
...rue, blur events are ignored while searching, which means that the autocomplete popup will not disappear. inputtooltiptext Type: string The tooltip text for the textbox. 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. maxlength Type: integer The maximum number of characters that the textbox allows to be entered. maxrows Type: integer The number of rows to show in the results list at a time. A scrollbar will appear so the user can scroll through the remaining items. minResultsForPopup Obsolete since Gecko 1.9.1 Type: integer The minimum number of re...
...equires SeaMonkey 2.12 Type: integer Returns the number of search components used. This property is read only. searchParam New in Thunderbird 15 Requires SeaMonkey 2.12 Type: string Gets and sets the value of the autocompletesearchparam attribute. searchSessions Obsolete since Gecko 26 Type: space-separated list of session names Gets the value of the searchSessions attribute. ...
...And 3 more matches
Mozilla’s UAAG evaluation report
(P2) C When focus and/or selection changes they are in the viewport 5.5 Confirm form submission. (P2) P Only allows confirmation if the information is not secure? This is also under Preferences, Security, SSL, "Sending form data from unencrypted page to unencrypted page" 5.6 Confirm fee links. (P2) NI No support of fee links ...
...lity.policy.default.windowinternal.open", "noAccess"); Override popping up new windows on target=anything: user_pref("browser.target_new_blocked", true); Override popup windows at beginning of new page load (blocks most popup advertisements): user_pref("dom.disable_open_during_load", true); 5.4 Selection and focus in viewport. (P2) C When focus and/or selection changes they are in the viewport 5.5 Confirm form submission. (P2) P Only allows confirmation if the information is not secure? This is also under Preferences, Security, SSL, "Sending form data from unencrypted page to unencrypted page" 5.6 Confirm fee links. (P2) NI No support of fee links 5.7 Manual viewport close only. (P3) C Just fixed! See Bug...
...rements satisfied G: Good Implementation, most important requirements satisfied P: Poor Implementation, some requirements satisfied and/or difficult for user to access feature NI: Not Implemented NR: Not Rated NA: Not Applicable Guideline 7. Observe operating environment conventions. Checkpoint Title Status Notes/plans 7.1 Focus and selection conventions. (P1) VG Mozilla uses selection colors as specified in the control panel. Mozilla exposes the focus via WM_FOCUS system messages Mozilla does not use the system focus drawing routines, because they aren't flexible enough (don't support CSS) 7.2 Respect input configuration conventions. (P1) VG Mozilla implements standard keyboard bindings There are a fe...
...And 3 more matches
Border-radius generator - CSS: Cascading Style Sheets
s-lock"> <div class="info"> rounded corner </div> <div class="ui-checkbox" data-topic='top-left'></div> <div class="ui-checkbox" data-topic='top-right'></div> <div class="ui-checkbox" data-topic='bottom-right'></div> <div class="ui-checkbox" data-topic='bottom-left'></div> </div> <div id="unit-selection"> <div class="info"> select border units </div> </div> </div> </div> </div> CSS Content /* GRID OF TEN * ========================================================================== */ .span_12 { width: 100%; } .span_11 { width: 91.46%; } .span_10 { width: 83%; } .span_9 { width: 74.54%; } .span_8 { width: 66.08%; } .span_7 { width: 57.62%; ...
...left: -50px; display: none; } #blw { bottom: -30px; left: 30px; } #blh { bottom: 20px; left: -50px; } #preview .ui-input-slider-left, #preview .ui-input-slider-right { visibility: hidden; } #preview .ui-input-slider-container:hover .ui-input-slider-left { visibility: visible; } #preview .ui-input-slider-container:hover .ui-input-slider-right { visibility: visible; } /* * */ #unit-selection { width: 200px; height: 75px; margin: 30px 30px 0 0; padding: 30px; border: 3px solid #555; border-radius: 10px; position: relative; float: right; } #unit-selection .info { height: 20%; width: 100%; line-height: 20%; font-size: 20px; text-align: center; position: relative; top: 40%; } #unit-selection .dropdown { width: 50px; height: 20px; margin: 10px; padding: 0; border-rad...
...adding: 30px; border: 3px solid #555; border-radius: 10px; position: relative; float: right; } #unit-selection .info { height: 20%; width: 100%; line-height: 20%; font-size: 20px; text-align: center; position: relative; top: 40%; } #unit-selection .dropdown { width: 50px; height: 20px; margin: 10px; padding: 0; border-radius: 3px; position: absolute; overflow: hidden; } #unit-selection select { width: 50px; height: 20px; marign: 0; padding: 0 0 0 10px; background: #555; border: 1px solid #555; border: none; color: #FFF; float: left; } #unit-selection select option { background: #FFF; color: #333; } #unit-selection select:hover { cursor: pointer; } #unit-selection .dropdown:before { content: ""; width: 18px; height: 20px; display: block; background-color: #55...
...And 3 more matches
textbox - Archive of obsolete content
ngth, min, multiline, newlines, onblur, onchange, onfocus, oninput, placeholder, preference, readonly, rows, searchbutton, size, spellcheck, tabindex, timeout, type, value, wrap, wraparound Properties accessibleType, clickSelectsAll, decimalPlaces, decimalSymbol, defaultValue, disabled, editor, emptyText, increment, inputField, label, max, maxLength, min, placeholder, readOnly, searchButton, selectionEnd, selectionStart, size, spinButtons, tabIndex, textLength, timeout, type, value, valueNumber, wrapAround Methods decrease, increase, reset, select, setSelectionRange Style classes plain Examples <vbox> <label control="your-name" value="Enter your name:"/> <textbox id="your-name" value="John"/> </vbox> Attributes cols Type: integer For multiline textboxes, the number...
... min Type: integer Gets and sets the value of the min attribute. placeholder Type: string Gets and sets a string that appears in the textbox when it has no value. readOnly Type: boolean If set to true, then the user cannot modify the value of the element. searchButton Type: boolean Gets and sets the value of the searchbutton attribute. ...
...ets and sets a string that appears in the textbox when it has no value. readOnly Type: boolean If set to true, then the user cannot modify the value of the element. searchButton Type: boolean Gets and sets the value of the searchbutton attribute. selectionEnd Type: integer Get or set the end of the selected portion of the field's text. Use in conjuction with the selectionStart property. The value specifies the index of the character after the selection. ...
...And 2 more matches
tree - Archive of obsolete content
Archive › Mozilla › XUL › tree
DOM functions to retrieve the tree rows. hidecolumnpicker Type: boolean When set to false, a drop-down will appear in the upper right corner of the tree, which the user may use to show and hide columns. When set to true, the column picker will be hidden. The default value is false. onselect Type: script code This event is sent to a tree when a row is selected, or whenever the selection changes. The user can select multiple rows by holding down Shift or Control and clicking on a row. The onselect event will be sent for each item added to or removed from the selection. rows Type: integer The number of rows to display in the element. If the element contains more than this number of rows, a scrollbar will appear which the user can use to scroll to the oth...
...from the selection. rows Type: integer The number of rows to display in the element. If the element contains more than this number of rows, a scrollbar will appear which the user can use to scroll to the other rows. To get the actual number of rows in the element, use the getRowCount method. seltype Type: one of the values below Used to indicate whether multiple selection is allowed. single Only one row may be selected at a time. (Default 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 r...
...s with focus, the caret's position is indicated by the focus ring, but unfocused trees won't show a focus ring, naturally. For unfocused trees, the (undrawn) caret's position can still be obtained by this property. If the caret isn't present for any row (for example, because the tree has never been focused), the value will be -1. You cannot rely on this property to change or determine a tree selection, except for trees with seltype="single". (All trees have seltype="multiple" by default.) To reliably change or determine a selection, instead use the nsITreeSelection interface methods available via tree.view.selection. disabled Type: boolean Gets and sets the value of the disabled attribute. disableKeyNavigation Type: boolean Gets or sets the value of the disa...
...And 2 more matches
HTML text fundamentals - Learn web development
addEventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { var scrollPos = textarea.scrollTop; var caretPos = textarea.selectionStart; var front = (textarea.value).substring(0, caretPos); var back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every time th...
...addEventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { var scrollPos = textarea.scrollTop; var caretPos = textarea.selectionStart; var front = (textarea.value).substring(0, caretPos); var back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every time th...
...addEventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { var scrollPos = textarea.scrollTop; var caretPos = textarea.selectionStart; var front = (textarea.value).substring(0, caretPos); var back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every time th...
...And 2 more matches
nsIAccessibleEvent
anged. EVENT_VALUE_CHANGE 0x800E 0x000D 0x000A An object's Value property has changed. EVENT_HELP_CHANGE 0x000E 0x000B An object's help has changed. EVENT_DEFACTION_CHANGE 0x000F 0x000C An object's default action has changed. EVENT_ACTION_CHANGE 0x0010 0x000D An object's action has changed. EVENT_ACCELERATOR_CHANGE 0x0011 0x000E An object's keyboard shortcut has changed. ...
...0x000D 0x000A An object's Value property has changed. EVENT_HELP_CHANGE 0x000E 0x000B An object's help has changed. EVENT_DEFACTION_CHANGE 0x000F 0x000C An object's default action has changed. EVENT_ACTION_CHANGE 0x0010 0x000D An object's action has changed. EVENT_ACCELERATOR_CHANGE 0x0011 0x000E An object's keyboard shortcut has changed. EVENT_SELECTION 0x8006 0x0012 0x000F The selection within a container object has changed. EVENT_SELECTION_ADD 0x8007 0x0013 0x0010 An item within a container object has been added to the selection. EVENT_SELECTION_REMOVE 0x8008 0x0014 0x0011 An item within a container object has been removed from the selection. EVENT_SELECTION_WITHIN 0x8009 0x0015 0x0012 Numerous selection changes have occurred within a container object. EVENT_ALERT 0x000...
...x0028 The document contents are being reloaded. EVENT_DOCUMENT_LOAD_STOPPED 0x002D 0x0029 The loading of the document was interrupted. EVENT_DOCUMENT_ATTRIBUTES_CHANGED 0x002E 0x002A The document wide attributes of the document object have changed. EVENT_DOCUMENT_CONTENT_CHANGED 0x002F 0x002B The contents of the document have changed. EVENT_PROPERTY_CHANGED 0x0030 0x002C EVENT_SELECTION_CHANGED 0x0031 0x002D EVENT_TEXT_ATTRIBUTE_CHANGED 0x0032 0x002E A text object's attributes changed. Also see EVENT_OBJECT_ATTRIBUTE_CHANGED. EVENT_TEXT_CARET_MOVED 0x0033 0x002F The caret has moved to a new position. EVENT_TEXT_CHANGED 0x0034 0x0030 This event indicates general text changes. That is, changes to text that is exposed through the IAccessibleText and IAccessibleEdita...
...And 2 more matches
nsIEditorMailSupport
nsISupportsArray getEmbeddedObjects(); Parameters None. Return value An nsISupportsArray containing the IMG and OBJECT tags of the current document. insertAsCitedQuotation() Insert a stri...
...nsISupportsArray getEmbeddedObjects(); 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 depend...
...ed text (if any). nsIDOMNode insertAsQuotation( in AString aQuotedText ); Parameters aQuotedText The actual text to be quoted. Return value The nsIDOMNode which was inserted. insertTextWithQuotations() Inserts a plain text string at the current location, with special processing for lines beginning with ">", which will be treated as mail quotes and inserted as plain text quoted blocks. If the selection is not collapsed, the selection is deleted and the insertion takes place at the resulting collapsed selection. void insertTextWithQuotations( in DOMString aStringToInsert ); Parameters aStringToInsert The string to be inserted pasteAsCitedQuotation() Paste a string as quoted text, whose representation is dependent on the editor type, replacing the selected text (if any) void pasteAsCitedQuot...
...And 2 more matches
nsIMsgDBView
ey getKeyAt(in nsMsgViewIndex index); nsIMsgDBHdr getMsgHdrAt(in nsMsgViewIndex index); nsIMsgFolder getFolderForViewIndex(in nsMsgViewIndex index); ACString getURIForViewIndex(in nsMsgViewIndex index); nsIMsgDBView cloneDBView(in nsIMessenger aMessengerInstance, in nsIMsgWindow aMsgWindow, in nsIMsgDBViewCommandUpdater aCommandUpdater); void getURIsForSelection([array, size_is(count)] out string uris, out unsigned long count); void getIndicesForSelection([array, size_is(count)] out nsMsgViewIndex indices, out unsigned long count); void loadMessageByMsgKey(in nsMsgKey aMsgKey); void loadMessageByViewIndex(in nsMsgViewIndex aIndex); void loadMessageByUrl(in string aUrl); void reloadMessage(); void relo...
...s are defined in nsMsgViewFlagsType. sortType nsMsgViewSortTypeValue The type of sort being used (i.e. author, date, status, etc). Sort types are defined in nsMsgViewSortType. sortOrder nsMsgViewSortOrderValue Readonly: Constants are defined in nsMsgViewSortOrder. keyForFirstSelectedMessage nsMsgKey Readonly: The key of the first message in the current selection. nsMsgKey is defined as an unsigned long in MailNewsTypes2.idl. viewIndexForFirstSelectedMsg nsMsgViewIndex Readonly: The index of the first selected message. nsMsgViewIndex is defined as a unsigned long in MailNewsTypes2.idl. msgFolder nsIMsgFolder Readonly: The current folder. viewFolder nsIMsgFolder URIForFirstSelectedMessage ACString ...
.... nsIMsgDBView cloneDBView(in nsIMessenger aMessengerInstance, in nsIMsgWindow aMsgWindow, in nsIMsgDBViewCommandUpdater aCommandUpdater); Parameters aMessengerInstance The nsIMessenger to use in the clone. aMsgWindow The nsIMsgWindow to use in the clone. aCommandUpdater The nsIMsgDBViewCommandUpdater to use in the clone. getURIsForSelection() Gets an arry of URLs for all currently selected messages. void getURIsForSelection([array, size_is(count)] out string uris, out unsigned long count); Return values uris An array of urls for the selected messages. count The number of urls returned. getIndicesForSelection() Gets the indicies of the selected messages. void getIndice...
...And 2 more matches
nsITreeView
table(in long row, in nsITreeColumn col); boolean isSelectable(in long row, in nsITreeColumn col); boolean isSeparator(in long index); boolean isSorted(); void performAction(in wstring action); void performActionOnCell(in wstring action, in long row, in nsITreeColumn col); void performActionOnRow(in wstring action, in long row); void selectionChanged(); void setCellText(in long row, in nsITreeColumn col, in AString value); void setCellValue(in long row, in nsITreeColumn col, in AString value); void setTree(in nsITreeBoxObject tree); void toggleOpenState(in long index); Attributes Attribute Type Description rowCount long The total number of rows in the tree (incl...
...w, in nsITreeColumn col, in AString value); void setCellValue(in long row, in nsITreeColumn col, in AString value); void setTree(in nsITreeBoxObject tree); void toggleOpenState(in long index); Attributes Attribute Type Description rowCount long The total number of rows in the tree (including the offscreen rows). Read only. selection nsITreeSelection The selection for this view. Constants Constant Value Description PROGRESS_NORMAL 1 Note: Renamed from progressNormal in Gecko 1.8 PROGRESS_UNDETERMINED 2 Note: Renamed from progressUndetermined in Gecko 1.8 PROGRESS_NONE 3 Note: Renamed from progressNone in Gecko 1.8 DRO...
...led to ask the view if the cell contents are editable. A value of true will result in the tree popping up a text field when the user tries to inline edit the cell. boolean isEditable( in long row, in nsITreeColumn col ); Parameters row The row of the cell. col The column of the cell. isSelectable() Called to ask the view if the cell is selectable. This method is only called if the selection type is cell or text. boolean isSelectable( in long row, in nsITreeColumn col ); Parameters row The row of the cell. col The column of the cell. Return value true if the cell is selectable. Otherwise false. isSeparator() Used to determine if the row at index is a separator. A value of true will result in the tree drawing a horizontal separator. The tree uses the ::moz-tree-separ...
...And 2 more matches
Call Tree - Firefox Developer Tools
re. You can find the specific profile we discuss here - just import it to the performance tool to follow along. There's a short page describing the structure of this program here. Note that we use the same program - the same profile, in fact - in the documentation page for the Flame Chart. The screenshot below shows the output of a program that compares three sorting algorithms - bubble sort, selection sort, and quicksort. To do this, it generates some arrays filled with random integers and sorts them using each algorithm in turn. We've zoomed into the part of the recording that shows a long JavaScript marker: The Call Tree presents the results in a table. Each row represents a function in which at least one sample was taken, and the rows are ordered by the number of samples taken while in ...
... with a relatively high Self Cost are good candidates for optimization, either because they take a long time to run, or because they are called very often. The inverted call tree is a good way to focus on these Self Cost values. This screenshot tells us something we probably already knew: Bubble sort is a very inefficient algorithm. We have about six times as many samples in bubble sort as in selection sort, and 13 times as many as in quicksort. Walking up the call tree Next to each function name is a disclosure arrow: Click that, and you can see the path back up the call tree, from the function in which the sample was taken, to the root. For example, we can expand the entry for bubbleSort(): So we can see the call graph is like this: sortAll() -> sort() -> bubbleSort() Not...
... is the same as for the separate entry for sort() later in the list. This is telling us that some samples were taken in sort() itself, rather than in the functions it calls. Sometimes there's more than one path back from an entry to the top level. Let's expand the entry for swap(): There were 253 samples taken inside swap(). But swap() was reached by two different paths: both bubbleSort() and selectionSort() use it. We can also see that 252 of the 253 samples in swap() were taken in the bubbleSort() branch, and only one in the selectionSort() branch. This result means that bubble sort is even less efficient than we had thought! It can shoulder the blame for another 252 samples, or almost another 10% of the total cost. With this kind of digging, we can figure out the whole call graph, with ass...
...And 2 more matches
Element: select event - Web APIs
n some text has been selected. Bubbles Yes Cancelable No Interface UIEvent if generated from a user interface, Event otherwise Event handler property onselect The event is not available for all elements in all languages. For example, in HTML, select events can be dispatched only on form <input type="text"> and <textarea> elements. ...
...IEvent if generated from a user interface, Event otherwise Event handler property onselect The event is not available for all elements in all languages. For example, in HTML, select events can be dispatched only on form <input type="text"> and <textarea> elements. ...
... handler property onselect The event is not available for all elements in all languages. For example, in HTML, select events can be dispatched only on form <input type="text"> and <textarea> elements. ...
...And 2 more matches
HTMLInputElement.setRangeText() - Web APIs
The HTMLInputElement.setRangeText() method replaces a range of text in an <input> or <textarea> element with a new string. Syntax element.setRangeText(replacement); element.setRangeText(replacement, start, end [, selectMode]); Parameters replacement The string to insert. start Optional The 0-based index of the first character to replace. Defaults to the current selectionStart value (the start of the user's current selection). end Optional The 0-based index of the character after the last character to replace. Defaults to the current selectionEnd value (the end of the user's current selection). selectMode Optional A string defining how the selection should be set after the text has been replaced. Possible values: "select" selects the newly inserted text. "start"moves the selecti...
...This is the default. Example Click the button in this example to replace part of the text in the text box. The newly inserted text will be highlighted (selected) afterwards. ...
...This is the default. Example Click the button in this example to replace part of the text in the text box. The newly inserted text will be highlighted (selected) afterwards. ...
...And 2 more matches
HTMLInputElement - Web APIs
This attribute applies when the value of the type attribute is text, search, tel, url or email; otherwise it is ignored. readOnly boolean: Returns / Sets the element's readonly attribute, indicating that the user cannot modify the value of the control. HTML5This is ignored if the value of the type attribute is hidden, range, color, checkbox, radio, file, or a button type. ...
...t the user cannot modify the value of the control. HTML5This is ignored if the value of the type attribute is hidden, range, color, checkbox, radio, file, or a button type. selectionStart unsigned long: Returns / Sets the beginning index of the selected text. When nothing is selected, this returns the position of the text input cursor (caret) inside of the <input> element. selectionEnd unsigned long: Returns / Sets the end index of the selected text. When there's no selection, this returns the offset of the character immediately following the current text input cursor position. ...
...urns / Sets the beginning index of the selected text. When nothing is selected, this returns the position of the text input cursor (caret) inside of the <input> element. selectionEnd unsigned long: Returns / Sets the end index of the selected text. When there's no selection, this returns the offset of the character immediately following the current text input cursor position. selectionDirection string: Returns / Sets the direction in which selection occurred. Possible values are: forward if selection was performed in the start-to-end direction of the current locale backward for the opposite direction none if the direction is unknown size unsigned long: Returns / Sets the element's size attribute, containing visual size of the control. This value is in pi...
...And 2 more matches
Range.commonAncestorContainer - Web APIs
arinet</li> <li>Oboe</li> </ul> </li> </ul> CSS The .highlight class created below uses a set of CSS @keyframes to animate a fading outline. ...
...Oboe</li> </ul> </li> </ul> CSS The .highlight class created below uses a set of CSS @keyframes to animate a fading outline. ...
... </li> </ul> CSS The .highlight class created below uses a set of CSS @keyframes to animate a fading outline. ...
...And 2 more matches
Simple Storage - Archive of obsolete content
could have simply used jetpack.storage.simple directly. Here's a complete real-world example. It's a simple note-taking jetpack. Select some text on the page, right-click, and select Note. The text will be remembered across browser restarts as a note. All notes are shown in the Tools menu. You can install this example from the Jetpack Gallery. jetpack.future.import("menu");jetpack.future.import("selection");jetpack.future.import("storage.simple");// Create the persistent notes array if it doesn't already exist.jetpack.storage.simple.notes = jetpack.storage.simple.notes || [];var notes = jetpack.storage.simple.notes;// Updates the Jetpack menu with the current notes. We'll add a Notes menu with// a submenu, which lists all the notes. If there are no notes, we'll show a// disabled "(Empty)" menuit...
..., which lists all the notes. If there are no notes, we'll show a// disabled "(Empty)" menuitem.function updateJetpackMenu() { jetpack.menu.set({ label: "Notes", menu: new jetpack.Menu(notes.length > 0 ? notes : [{ label: "(Empty)", disabled: true }]) });}// Modify the page's context menu by sneaking in before it's shown. ...
... [{ label: "(Empty)", disabled: true }]) });}// Modify the page's context menu by sneaking in before it's shown. If there's// a selection, add a Note menuitem that makes a new note. Otherwise, don't// modify the menu at all. We'll limit the number of notes to 20. Old notes// will be forgotten. ...
... before it's shown. If there's// a selection, add a Note menuitem that makes a new note. Otherwise, don't// modify the menu at all. We'll limit the number of notes to 20. Old notes// will be forgotten. ...
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
Internet Explorer always uses HTML markup. Mozilla (CSS): <span style="color: blue;">Big Blue</span> Mozilla (HTML): <font color="blue">Big Blue</font> Internet Explorer: <FONT color="blue">Big Blue</FONT> Below is a list of commands that execCommand in Mozilla supports: Table 6. Rich text editing commands Command Name Description Argument bold Toggles the selection's bold attribute. --- createlink Generates an HTML link from the selected text. The URL to use for the link delete Deletes the selection. --- fontname Changes the font used in the selected text. The font name to use (Arial, for example) fontsize Changes the font size used in the selected text. The font size to use fontcolor ...
...alrule Inserts an <hr> element at the cursor's position. --- insertimage Inserts an image at the cursor's position. URL of the image to use insertorderedlist Inserts an ordered list (<ol>) element at the cursor's position. --- insertunorderedlist Inserts an unordered list (<ul>) element at the cursor's position. --- italic Toggles the selection's italicize attribute. --- justifycenter Centers the content at the current line. --- justifyleft Justifies the content at the current line to the left. --- justifyright Justifies the content at the current line to the right. --- outdent Outdents the block where the caret is. --- redo Redoes the previous undo command. -...
...ters the content at the current line. --- justifyleft Justifies the content at the current line to the left. --- justifyright Justifies the content at the current line to the right. --- outdent Outdents the block where the caret is. --- redo Redoes the previous undo command. --- removeformat Removes all formatting from the selection. --- selectall Selects everything in the rich text editor. --- strikethrough Toggles the strikethrough of the selected text. --- subscript Converts the current selection into subscript. --- superscript Converts the current selection into superscript. --- underline Toggles the underline of the selected text. --- ...
... --- useCSS Toggles the usage of CSS in the generated markup. Boolean value For more information, visit Rich-Text Editing in Mozilla. XML differences Mozilla has strong support for XML and XML-related technologies, such as XSLT and Web services. ...
Methods - Archive of obsolete content
<< XUL Reference home acceptDialog addItemToSelection addPane addProgressListener addSession addTab addTabsProgressListener advance advanceSelectedTab appendCustomToolbar appendGroup appendItem appendNotification blur cancel cancelDialog centerWindowOnScreen checkAdjacentElement clearResults clearSelection click close collapseToolbar contains decrease decreasePage doCommand ensureElementIsVisible ensureIndexIsVisible ensureSelectedElementIsVisible expandToolbar extra1 extra2 focus getBrowserAtIndex getBrowserForDocument getBrowserForTab getBrowserIndexForDocument getButton getDefaultSession getEditor getElementsByAttribute getElementsByAttributeNS getFormattedString getHTMLEditor getIndexOfFirstVisi...
...tPageById getPreviousItem getResultAt getResultCount getResultValueAt getRowCount getSearchAt getSelectedItem getSession getSessionByName getSessionResultAt getSessionStatusAt getSessionValueAt getString goBack goBackGroup goDown goForward goForwardGroup goHome goTo gotoIndex goUp hidePopup increase increasePage insertItem insertItemAt invertSelection loadGroup loadOneTab loadTabs loadURI loadURIWithFlags makeEditable moveByOffset moveTo moveToAlertPosition onSearchComplete onTextEntered onTextReverted openPopup openPopupAtScreen openSubDialog openWindow preferenceForElement reload reloadAllTabs reloadTab reloadWithFlags removeAllItems removeAllNotifications removeAllTabsBut removeCurrentNotifi...
...ithFlags makeEditable moveByOffset moveTo moveToAlertPosition onSearchComplete onTextEntered onTextReverted openPopup openPopupAtScreen openSubDialog openWindow preferenceForElement reload reloadAllTabs reloadTab reloadWithFlags removeAllItems removeAllNotifications removeAllTabsBut removeCurrentNotification removeCurrentTab removeItemAt removeItemFromSelection removeNotification removeProgressListener removeSession removeTab removeTabsProgressListener removeTransientNotifications replaceGroup reset rewind scrollByIndex scrollByPixels scrollToIndex select selectAll selectItem selectItemRange selectTabAtIndex setSelectionRange showPane showPopup sizeTo startEditing stop stopEditing swapDocShells syncSes...
...ogressListener removeSession removeTab removeTabsProgressListener removeTransientNotifications replaceGroup reset rewind scrollByIndex scrollByPixels scrollToIndex select selectAll selectItem selectItemRange selectTabAtIndex setSelectionRange showPane showPopup sizeTo startEditing stop stopEditing swapDocShells syncSessions timedSelect toggleItemSelection Related DOM element methods DOM:element.addEventListener DOM:element.appendChild DOM:element.compareDocumentPosition DOM:element.dispatchEvent DOM:element.getAttribute DOM:element.getAttributeNode DOM:element.getAttributeNodeNS DOM:element.getAttributeNS DOM:element.getElementsByTagName DOM:element.getElementsByTagNameNS DOM:element.getFeature FIXME: brokenLink DOM:eleme...
Using the Editor from XUL - Archive of obsolete content
d up. Note that it only responds to the KeyPress event; KeyDown and KeyUp events are ignored. nsTextEditorMouseListener The mouse listener is used to do middle-mouse paste (which is a Unix copy/paste feature). This happens in response to MouseClick with button 2. It also forces an IME commit. nsTextEditorFocusListener Editor responds to Focus and Blur events by showing and hiding the caret or selection as appropriate. nsTextEditorTextListener The nsIDOMTextListener interface that this implements is used by the IME code. In response to the HandleText event, the editor sets the inline input composition string. nsTextEditorCompositionListener nsTextEditorCompositionListener implements another IME-related interface, nsIDOMCompositionListener. This is called by IME at the start, end, and to quer...
...or::EditorKeyPress(). nsHTMLEditor::EditorKeyPress() gets the character code from the key event, puts that into a string, and calls nsHTMLEditor::TypedText(), which simply calls nsHTMLEditor::InsertText(). nsHTMLEditor::InsertText() hides quite a bit of complexity in some stack-based classes. nsAutoPlaceHolderBatch is a utility class that wraps text insertion with calls to turn off selection and layout updating (to avoid flicker), and the maintenance of a placeholder transaction. This placeholder transaction enables us to batch typing events together, so that an Undo undoes the whole series of keystrokes. Another stack-based class, nsAutoRules, ensures that text insertion is wrapped with calls to nsHTMLEditor::StartOperation() / EndOperation(). These functions call BeforeEdit() an...
...rent editing rules. Because the implementation of inserting text differs between the different rules (plain text vs. HTML, for example), it is handled entirely by the rules code, in the WillDoAction()call. In Composer, we are using nsHTMLEditRules, so we end up in nsHTMLEditRules::WillDoAction(). For text insertion, this drops into nsHTMLEditRules::WillInsertText(). This code first deletes the selection if there is one (e.g. you are typing over selected text), then calls a generic pre-insertion call WillInsert(), which sets up inline styles for the inserted text, and moves the selection to an appropriate place where the text is to be inserted. Now we are ready to actually insert the text. Recall that we're going through a generic InsertText() call, so this code deals with pasting long strings...
...oops through the input string looking for linebreaks, and inserts each text run, followed by a <br> when necessary. When handling key presses, this will just insert a single character. We fall out of the WillDoAction() call, and drop into WillDoAction(), which, for text insertion, does nothing. The last thing that happens on a keypress is that nsTextEditorKeyListener::KeyPress() calls ScrollSelectionIntoView(), which, as the name suggests, ensures that the text that was just entered is visible. Original Document Information Author(s): Editor Team Last Updated Date: July 25, 2000 Copyright Information: Copyright (C) Editor Team ...
Accessibility API cross-reference
earch criteria. searchbox A renderable structural containment unit in a document or application. section (abstract role) <section> <Sect> A structure that labels or summarizes the topic of its related section. sectionhead (abstract role) A form widget that allows the user to make selections from a set of choices. select (abstract role) A line that splits 2 areas from each other SEPARATOR (either in menu or splits panes) SEPARATOR (in menu only) SEPARATOR separator <hr> Adjust in increments from min to max values SLIDER SLIDER SLIDER slider <input type=range> A sys...
...For receiving text input, see FOCUSED n/a ARMED ARMED available to javaScript as document.activeElement Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. n/a n/a ar...
...rrormessage An item that has been expanded, such as a tree item or accordion EXPANDED EXPANDED EXPANDED aria-expanded=true Indicates this object allows progressive disclosure of its children. n/a EXPANDABLE EXPANDABLE Implied by the presence of the aria-expanded attribute, regardless of value Can extend selection EXTSELECTABLE n/a n/a Not clipped to boundary of parent, does not auto-move with parent FLOATING n/a n/a Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. VERY ...
...TICAL VERTICAL aria-orientation=vertical Accessible Events MSAA Event (EVENT_OBJECT_*, EVENT_SYSTEM_*) Java Accessibility Event Gnome Accessibility Signals Mac OS X Accessibility Event Description & Notes JavaScript Relevant XUL FOCUS focus, focusin blur, focusout SELECTION select STATE_CHANGE change (not sure if this is the same thing?) ...
nsIClipboard
ichClipboard); 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 paste operations are...
... kGlobalClipboard 1 Clipboard for global use. kFindClipboard 2 Clipboard for find strings. ...
... kGlobalClipboard 1 Clipboard for global use. kFindClipboard 2 Clipboard for find strings. ...
...is method sets the data from a transferable on the native clipboard. void setData( in nsITransferable aTransferable, in nsIClipboardOwner anOwner, 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...
nsIDOMNSHTMLDocument
. ...
....0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11) This method never did anything but throw an exception, and was removed entirely in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11). boolean execCommandShowHelp( in DOMString commandID ); Parameters commandID The name of the command. Return value This method is not supported and always throws an exception. getSelection() DOMString getSelection(); Parameters None. Return value The text of the current selection, the same as window.getSelection.toString(). open() nsIDOMDocument open( in ACString aContentType, in boolean aReplace ); Parameters aContentType The content type of the new document. If the type is not supported by the HTML content sink, trying to write to the document will probably throw. ...
...ame of the command to query. Return value Returns true if the command is supported and enabled, false otherwise. queryCommandIndeterm() boolean queryCommandIndeterm( in DOMString commandID ); Parameters commandID The name of the command to query. Return value For stateful commands, returns true if the command is in an indeterminate state, false otherwise. For instance, if there is a selection and part of the selected text is bold, then then bold command is in an indeterminate state. queryCommandState() boolean queryCommandState( in DOMString commandID ); Parameters commandID The name of the command to query. Return value For stateful commands, returns true if the command has is active, false otherwise. queryCommandSupported() boolean queryCommandSupported( in DOMString ...
...CommandText( in DOMString commandID ); Parameters commandID The name of the command to query. Return value This method is not supported and always throws an exception. queryCommandValue() DOMString queryCommandValue( in DOMString commandID ); Parameters commandID The name of the command to query. Return value The value of the command. For the gethtml command, the current selection is returned as an HTML source fragment. releaseEvents() Provided for compatibility with Netscape 4.x, but does not actually do anything. void releaseEvents( in long eventFlags ); Parameters eventFlags routeEvent() Provided for compatibility with Netscape 4.x, but does not actually do anything. void routeEvent( in nsIDOMEvent evt ); Parameters evt write() ...
DragEvent - Web APIs
Web › API › DragEvent
d drop interaction. Constructors Although this interface has a constructor, it is not possible to create a useful DataTransfer object from script, since DataTransfer objects have a processing and security model that is coordinated by the browser during drag-and-drops. DragEvent() Creates a synthetic and untrusted DragEvent. Event types drag This event is fired when an element or text selection is being dragged. dragend This event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key). dragenter This event is fired when a dragged element or text selection enters a valid drop target. dragexit This event is fired when an element is no longer the drag operation's immediate selection target. dragleave This event is fired when a dragged ...
...d. dragend This event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key). dragenter This event is fired when a dragged element or text selection enters a valid drop target. dragexit This event is fired when an element is no longer the drag operation's immediate selection target. dragleave This event is fired when a dragged element or text selection leaves a valid drop target. dragover This event is fired continuously when an element or text selection is being dragged and the mouse pointer is over a valid drop target (every 50 ms WHEN mouse is not moving ELSE much faster between 5 ms (slow movement) and 1ms (fast movement) approximately. This firing pattern is different than mouseover ). dragstart This event is fired when the user starts...
... GlobalEventHandlers GlobalEventHandlers.ondrag A global event handler for the drag event. GlobalEventHandlers.ondragend A global event handler for the dragend event. ...
... GlobalEventHandlers GlobalEventHandlers.ondrag A global event handler for the drag event. GlobalEventHandlers.ondragend A global event handler for the dragend event. GlobalEventHandlers.ondragenter A global event handler for the dragenter event. GlobalEventHandlers.ondragexit A global event handler for the dragexit event. ...
Range() - Web APIs
Web › API › Range › Range
The Range() constructor returns a newly created Range object whose start and end is the global Document object. Syntax range = new Range() Example In this example we create a new range with the Range() constructor, and set its beginning and end positions using the Range.setStartBefore() and Range.setEndAfter() methods. We then select the range using window.getSelection() and Selection.addRange(). HTML <p>First paragraph.</p> <p>Second paragraph.</p> <p>Third paragraph.</p> <p>Fourth paragraph.</p> JavaScript const paragraphs = document.querySelectorAll('p'); // Create new range const range = new Range(); // Start range at second paragraph range.setStartBefore(paragraphs[1]); // End range at third paragraph range.setEndAfter(paragraphs[2]); // Get window selection const select...
... Living Standard Initial definition. ...
... Living Standard Initial definition. ...
... Living Standard Initial definition. ...
Inputs and input sources - Web APIs
ith your virtual or augmented environment. Inputs in WebXR Fundamentally, inputs in WebXR fall into two basic categories: targeting and actions. Targeting is the specification of a point in space by the user's input. This may involve the user simply tapping on a spot on the screen, tracking their eyes, or the use of a joystick or motion-sensing controller to move a cursor. Actions include both selection actions, such as clicking on a button, and squeeze actions, such as pulling a trigger or tightening your grip while wearing haptic gloves. By combining these two types of input with the changing of viewing position and/or orientation through the headset or other mechanisms, you can create an interactive simulated environment. Input device types WebXR supports a variety of different types of de...
... orientation through the headset or other mechanisms, you can create an interactive simulated environment. Input device types WebXR supports a variety of different types of devices to handle targeting and action inputs. These devices include but aren't limited to: Screen taps (particularly but not necessarily only on phones or tablets) can be used to simultaneously perform both targeting and selection. Motion-sensing controllers, which use accelerometers, magnetometers, and other sensors for motion tracking and targeting and may additionally include any number of buttons, joysticks, thumbpads, touchpads, force sensors, and so on to provide additional input sources for both targeting and selection. Squeezable triggers or glove grip pads to provide squeeze actions. Voice commands using speech...
... Single-button click devices. Gaze tracking (following the movements of the eye to choose targets). ...
... Single-button click devices. Gaze tracking (following the movements of the eye to choose targets). Input sources Each source of WebXR input data is represented by an XRInputSource object which describes the input source and its current state. ...
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
dlers are used to execute a command when a menu item is selected. To respond to mouse and keyboard inputs in HTML, the onclick event handler is typically used to respond to mouse clicks, and the onkeypress event handler for keyboard input. XUL can also use these event handlers, but XUL also offers the oncommand special event handler to deal with actions that often have specific meanings, such as selection by a left-click (or right-click on systems set up as left-handed) on the mouse or selection by the Enter key. Listing 10 shows an example of the oncommand event handler in use. Apart from menuitem elements, it can be used with buttons and other input controls. <menuitem label="Open project page" oncommand="loadURI(this.value)" value="http://mozilla.org/"/> Listing 10: The oncommand event...
...t it to be the Search Bar history, use search-history; and if you want it to be another form's input history, use form-history; this attribute can take one value or multiple space-delimited values. Also, in order to actually read in a history for autocomplete, you will need XPConnect privileges, which we will cover in Chapter 4. Menu List Use the menulist element to create a control for making selections from a drop-down list. As shown in Listing 17, this is implemented in combination with the menupopup element; it produces output as shown in Figure 14. A click reveals the drop-down list; when an item is selected, the values of that item's label and value attributes are copied to the label and value attributes of the menulist element itself. By default, the first menu item is selected, but any ...
...reselected by adding selected="true" to it. <menulist> <menupopup> <menuitem label="Item 1" value="1"/> <menuitem label="Item 2" value="2"/> <menuitem label="Item 3" value="3"/> </menupopup> </menulist> Listing 17: A menulist example Figure 14: Output from Listing 17 By adding editable="true" to the menulist element, you can accept arbitrary text input in addition to a list selection, as is often used on font selection menus in word processors. Special elements Embedding images In addition to writing direct JavaScript code in event handlers, XUL also allows you to embed scripts using a script element, just like in HTML; this can be used to read in an external script or to place the code in the script element's content. If you are embedding a script in a page, you should b...
Index of archived content - Archive of obsolete content
vel APIs addon-page base64 clipboard context-menu hotkeys indexed-db l10n notifications page-mod page-worker panel passwords private-browsing querystring request selection self simple-prefs simple-storage system tabs timers ui url widget windows Low-Level APIs /loader chrome console/plain-text console/trace...
...ttings Simple Storage System Clipboard Clipboard Clipboard Test Clipboard Test System information UI Menu Notifications Panel Selection Selection Tabs slideBar slideBar Users aza Dropbox docs ...
... Meta Enabling Experimental Jetpack Features Storage Simple Storage System Clipboard UI Selection jspage statusBar statusBar Litmus tests Mac OS X Build Prerequisites/fink Makefile.mozextension.2 Message Summary Database Metro browser chrome tests Mic...
Simple Storage - Archive of obsolete content
could have simply used jetpack.storage.simple directly. Here's a complete real-world example. It's a simple note-taking jetpack. Select some text on the page, right-click, and select Note. The text will be remembered across browser restarts as a note. All notes are shown in the Tools menu. You can install this example from the Jetpack Gallery. jetpack.future.import("menu"); jetpack.future.import("selection"); jetpack.future.import("storage.simple"); // Create the persistent notes array if it doesn't already exist. jetpack.storage.simple.notes = jetpack.storage.simple.notes || []; var notes = jetpack.storage.simple.notes; // Updates the Jetpack menu with the current notes. We'll add a Notes menu with // a submenu, which lists all the notes. If there are no notes, we'll show a // disabled "(Empty...
...s all the notes. If there are no notes, we'll show a // disabled "(Empty)" menuitem. function updateJetpackMenu() { jetpack.menu.set({ label: "Notes", menu: new jetpack.Menu(notes.length > 0 ? notes : [{ label: "(Empty)", disabled: true }]) }); } // Modify the page's context menu by sneaking in before it's shown. ...
... [{ label: "(Empty)", disabled: true }]) }); } // Modify the page's context menu by sneaking in before it's shown. If there's // a selection, add a Note menuitem that makes a new note. Otherwise, don't // modify the menu at all. We'll limit the number of notes to 20. Old notes // will be forgotten. :( jetpack.menu.context.page.beforeShow = function (menu) { menu.reset(); if (jetpack.selection.text) menu.add({ label: "Note", command: function () { notes.unshift(jetpack.selection.text); if (notes.length > 20) notes.pop(); updateJetpackMenu(); } }); }; // Initialize the Jetpack menu with the current notes. updateJetpackMenu(); See Also Settings JEP 11 ...
currentIndex - Archive of obsolete content
s with focus, the caret's position is indicated by the focus ring, but unfocused trees won't show a focus ring, naturally. For unfocused trees, the (undrawn) caret's position can still be obtained by this property. If the caret isn't present for any row (for example, because the tree has never been focused), the value will be -1. You cannot rely on this property to change or determine a tree selection, except for trees with seltype="single". (All trees have seltype="multiple" by default.) To reliably change or determine a selection, instead use the nsITreeSelection interface methods available via tree.view.selection. Example // One way of retrieving the text of a cell. <script language ="javascript"> function treeRowClicked(){ var tree = document.getElementById("my-tree"); var...
... except for trees with seltype="single". (All trees have seltype="multiple" by default.) To reliably change or determine a selection, instead use the nsITreeSelection interface methods available via tree.view.selection. Example // One way of retrieving the text of a cell. ...
... seltype="single". (All trees have seltype="multiple" by default.) To reliably change or determine a selection, instead use the nsITreeSelection interface methods available via tree.view.selection. Example // One way of retrieving the text of a cell. ...
Commands - Archive of obsolete content
the command. XUL elements have a controllers property which is used to check. You can use the controllers property to add your own controllers. You might use this to have a listbox respond to cut, copy and paste operations, for instance. An example of this will be provided later. By default, only textboxes have a controller that does anything. The textbox controller handles clipboard operations, selection, undo and redo as well as some editing operations. Note that an element may have multiple controllers, which will all be checked. If the currently focused element does not have a suitable controller, the window is checked next. The window also has a controllers property which you can modify if desired. If the focus is inside a frame, each frame leading to the top-level window is checked as as we...
...box which will perform the action in its doCommand method. Try opening the example below (Source View) in a browser window and selecting items from the list. You'll notice that the Delete command on the browser's Edit menu is enabled and that selecting it will delete a row. (See Discussion about opening this example). The example below isn't completely polished. Really, we should ensure that the selection and focus is adjusted appropriately after a deletion. <window id="controller-example" title="Controller Example" onload="init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function init() { var list = document.getElementById("theList"); var listController = { supportsCommand : function(cmd){ return (cmd == "cmd_delete"); }, isCommandEna...
...e should be returned since the controller does not handle any other commands. If you wanted to handle more commands, check for them here, since you will often use a single controller for multiple related commands. The isCommandEnabled method returns true if the command should be enabled. In this case, we check if there is a selected item in the listbox and return true if there is. If there is no selection, false is returned. If you delete all the rows in the example, the Delete command will become disabled. You may have to click the listbox to update the menu in this simple example. The doCommand method will be called when the Delete menu item is selected, and this will cause the selected row in the listbox to be deleted. Nothing needs to happen for the onEvent method, so no code is added for this...
Tree View Details - Archive of obsolete content
re 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. ...
...s> <treecol id="element" label="Element" primary="true" flex="1"/> </treecols> <treechildren/> </tree> <script> <![CDATA[ var treeView = { childData : { Solids: ["Silver", "Gold", "Lead"], Liquids: ["Mercury"], Gases: ["Helium", "Nitrogen"] }, visibleData : [ ["Solids", true, false], ["Liquids", true, false], ["Gases", true, false] ], treeBox: null, selection: null, get rowCount() { return this.visibleData.length; }, setTree: function(treeBox) { this.treeBox = treeBox; }, getCellText: function(idx, column) { return this.visibleData[idx][0]; }, isContainer: function(idx) { return this.visibleData[idx][1]; }, isContainerOpen: function(idx) { return this.visibleData[idx][2]; }, isContainerEmpty: functi...
... (var i = 0; i < toinsert.length; i++) { this.visibleData.splice(idx + i + 1, 0, [toinsert[i], false]); } this.treeBox.rowCountChanged(idx + 1, toinsert.length); } this.treeBox.invalidateRow(idx); }, getImageSrc: function(idx, column) {}, getProgressMode : function(idx,column) {}, getCellValue: function(idx, column) {}, cycleHeader: function(col, elem) {}, selectionChanged: function() {}, cycleCell: function(idx, column) {}, performAction: function(action) {}, performActionOnCell: function(action, index, column) {}, getRowProperties: function(idx, prop) {}, getCellProperties: function(idx, column, prop) {}, getColumnProperties: function(column, element, prop) {}, }; function init() { document.getElementById("elementList").view = treeView; } ]...
menulist - Archive of obsolete content
Properties | Methods | Related ] An element that can be used for drop-down choice lists. The user may select one of the elements displayed in the menulist. The currently selected choice is displayed on the menulist element. To create the drop-down, put a menupopup inside the menulist containing the choices as menuitem elements. The command event may be used to execute code when the menulist selection changes. More information is available in the XUL tutorial. Attributes accesskey, crop, disableautoselect, disabled, editable, focused, image, label, oncommand, open, preference, readonly, sizetopopup, tabindex, value Properties accessibleType, crop, description, disableautoselect, disabled, editable, editor, image, inputField, itemCount, label, menuBoxObject, menupopup, open, selectedI...
...or 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; } disableautoselect Type: boolean If this attribute is true or omitted, the selected item on the menu will update to match what the user entered in the textbox. If the text does not match any of the items in the list, the menu selection is cleared. If this attribute is false, the selection is never updated to match the text box. This attribute applies only to editable menulists. 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,...
...e URI of the image to appear on the element. If this 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. oncommand Type: script code This event handler is called when the command is activated. This occurs when a user selects a menu item or presses a keyboard shortcut attached to the command. open Type: boolean For the menu type buttons, the open attribute is set to true when the menu is open. The open attribute is not present if the menu is closed. preferen...
XForms Select Element - Archive of obsolete content
Introduction Allows the user to choose one or more selections from a list of pre-defined items (see the spec). The list of pre-defined items can be specified by either item (see the spec) or itemset (see the spec) elements. You can visually group these pre-defined items by using the choices (see the spec) element to contain them. Note, some representations of the select element do not support visual grouping. Attributes UI Common 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 selection - isn't currently supported. This attribute, when set to 'open', allows the user to provide free entry to...
...widget(s) to use to represent this control. accesskey - used to specify the keyboard shortcut for focusing this control. Single-Node Binding Special selection - isn't currently supported. This attribute, when set to 'open', allows the user to provide free entry to the list. Possible values are open and closed, default is closed. incremental - supported, default value is true Properties selection - see corresponding attribute incremental - see corresponding attribute Type restrictions The select element can be bound to a node containing simple content capable of holding a sequence. The data binding restriction to simple content may be relaxed when an itemset element is used, which allows the available choices to be obtained from an XForms Model. The relaxation happens when the itemset...
... list Displaying a listbox is the default representation (xhtml/xul). Characteristics analogous widgets are <html:select size="5" multiple="true"/> and <xul:listbox seltype="multiple"/> visual grouping by choices element isn't implemented if incremental attribute value is false, the bound node is updated when the select control is blurred (i.e. loses focus), otherwise it is updated upon item selection check group The select is represented as group of checkboxes (xhtml/xul). Characteristics appearance attribute contains the value full there are no analogue widgets in XHTML or in XUL visual grouping by choices element is supported if incremental attribute value is false then bound node is updated when item is blurred Examples <xf:model> <xf:instance> <data xmlns=""> <value...
Advanced text formatting - Learn web development
ventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { const scrollPos = textarea.scrollTop; const caretPos = textarea.selectionStart; const front = (textarea.value).substring(0, caretPos); const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every tim...
...ventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { const scrollPos = textarea.scrollTop; const caretPos = textarea.selectionStart; const front = (textarea.value).substring(0, caretPos); const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every tim...
...ventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { const scrollPos = textarea.scrollTop; const caretPos = textarea.selectionStart; const front = (textarea.value).substring(0, caretPos); const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every tim...
Getting started with HTML - Learn web development
addEventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { var scrollPos = textarea.scrollTop; var caretPos = textarea.selectionStart; var front = (textarea.value).substring(0, caretPos); var back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every time th...
...addEventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { var scrollPos = textarea.scrollTop; var caretPos = textarea.selectionStart; var front = (textarea.value).substring(0, caretPos); var back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every time th...
...addEventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { var scrollPos = textarea.scrollTop; var caretPos = textarea.selectionStart; var front = (textarea.value).substring(0, caretPos); var back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every time th...
Useful string methods - Learn web development
ventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { const scrollPos = textarea.scrollTop; const caretPos = textarea.selectionStart; const front = (textarea.value).substring(0, caretPos); const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every tim...
...ventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { const scrollPos = textarea.scrollTop; const caretPos = textarea.selectionStart; const front = (textarea.value).substring(0, caretPos); const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every tim...
...ventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { const scrollPos = textarea.scrollTop; const caretPos = textarea.selectionStart; const front = (textarea.value).substring(0, caretPos); const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every tim...
mozbrowsercaretstatechanged
ly Boolean Whether the event normally bubbles or not. cancelable Read only Boolean Whether the event is cancellable or not. details Read only Object A custom object. details The details property returns an anonymous JavaScript object with the following properties: rect An object that defines information about the bounding rectangle of the current selection. Its properties are width: The width of the bounding rectangle, in CSS pixels. height: The height of the bounding rectangle, in CSS pixels. top: The top position 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 rec...
...ating 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, longpressonemptycontent, taponcaret, presscaret, and releasecaret. zoomFactor A number defining the current zoom factor in the browser <iframe>. ...
... Possible values are visibilitychange, updateposition, longpressonemptycontent, taponcaret, presscaret, and releasecaret. zoomFactor A number defining the current zoom factor in the browser <iframe>. collapsed A Boolean indicating whether the current selection is collapsed (true) or not (false.) caretVisible A Boolean indicating whether the caret is currently visible (true) or not (false.) selectionVisible A Boolean indicating whether the current selection is visible (true) or not (false.) selectionEditable A Boolean indicating whether the current selection is editable (true) or not (false.) selectedTextContext A DOMString containing the currently-selected text content. sendDoCommandMsg A method allowing you to issue a command via an anonymouse function, i.e. function(command). Possib...
Gecko events
ted: no EVENT_VALUE_CHANGE An object's Value property has changed. Is Supported: yes EVENT_HELP_CHANGE An object's help has changed. Is Supported: no EVENT_DEFACTION_CHANGE An object's default action has changed. Is Supported: no EVENT_ACTION_CHANGE An object's action has changed. Is Supported: no EVENT_ACCELERATOR_CHANGE An object's keyboard shortcut has changed. Is Supported: no EVENT_SELECTION The selection within a container object has changed. Is Supported: yes EVENT_SELECTION_ADD An item within a container object has been added to the selection. Is Supported: yes EVENT_SELECTION_REMOVE An item within a container object has been removed from the selection. Is Supported: yes EVENT_SELECTION_WITHIN Numerous selection changes have occurred within a container object. Is Supported...
...tents are being reloaded. Is Supported: yes EVENT_DOCUMENT_LOAD_STOPPED The loading of the document was interrupted. Is Supported: yes EVENT_DOCUMENT_ATTRIBUTES_CHANGED The document wide attributes of the document object have changed. Is Supported: no EVENT_DOCUMENT_CONTENT_CHANGED The contents of the document have changed. Is Supported: no EVENT_PROPERTY_CHANGED Is Supported: no EVENT_SELECTION_CHANGED Is Supported: yes EVENT_TEXT_ATTRIBUTE_CHANGED A text object's attributes changed. Also see EVENT_OBJECT_ATTRIBUTE_CHANGED Is Supported: no EVENT_TEXT_CARET_MOVED The caret has moved to a new position. Is Supported: yes EVENT_TEXT_CHANGED This event indicates general text changes, i.e. changes to text that is exposed through the IAccessibleText and IAccessibleEditableText interfa...
...ET_MOVED The caret has moved to a new position. Is Supported: yes EVENT_TEXT_CHANGED This event indicates general text changes, i.e. changes to text that is exposed through the IAccessibleText and IAccessibleEditableText interfaces. Is Supported: no EVENT_TEXT_INSERTED Text was inserted. Is Supported: yes EVENT_TEXT_REMOVED Text was removed. EVENT_TEXT_UPDATED Text was updated. EVENT_TEXT_SELECTION_CHANGED The text selection changed. EVENT_VISIBLE_DATA_CHANGED A visibile data event indicates the change of the visual appearance of an accessible object. This includes for example most of the attributes available via the IAccessibleComponent interface. EVENT_TEXT_COLUMN_CHANGED The caret moved from one column to the next. EVENT_SECTION_CHANGED The caret moved from one section to the next. E...
Components.utils.evalInWindow
then the function relies on XrayWrappers to wrap the returned content, otherwise the result is structured-cloned. This does impose some restrictions on the sorts of things that can be returned: in particular, the result can't contain any functions, because functions can't be structured-cloned. ...
... be structured-cloned. ...
...ndow.someLocalVariable.newProp); // 42 But note that the add-on script must trust that the page script has not redefined the setter on someLocalVariable: unlike XrayWrappers, evalInWindow() does not provide x-ray vision. If the returned object contains a function, calls to evalInWindow() will throw an error: // page-script.js function bar() { } var someLocalVariableContainingAFunction = {name: "selection1", foo : bar}; // add-on-script.js Components.utils.evalInWindow("someLocalVariableContainingAFunction", contentWindow); // ERROR, function can't be cloned ...
nsIDOMWindow
sIDOMWindow2, which is a subclass of nsIDOMWindow that adds some new features to this interface. In Gecko 7.0 nsIDOMWindow2 has been merged into this interface. In Gecko 8.0 nsIDOMStorageWindow and nsIDOMWindowInternal have been merged into this interface. ...
... which is a subclass of nsIDOMWindow that adds some new features to this interface. In Gecko 7.0 nsIDOMWindow2 has been merged into this interface. In Gecko 8.0 nsIDOMStorageWindow and nsIDOMWindowInternal have been merged into this interface. ...
...as every other window nested in that window root. Read only. Native code only! Note: Prior to Gecko 7.0 this attribute was part of nsIDOMWindow2. Methods getComputedStyle() See dom-window-getcomputedstyle for details. nsIDOMCSSStyleDeclaration getComputedStyle( in nsIDOMElement elt, in DOMString pseudoElt Optional ); Parameters elt pseudoElt Optional Return value getSelection() Returns the nsISelection object indicating what if any content is currently selected in the window. nsISelection getSelection(); Parameters None. Return value The nsISelection object for the window. scrollBy() Scrolls the window by a given number of pixels relative to the current scroll position. void scrollBy( in long xScrollDif, in long yScrollDif ); Parameters xScrollDif ...
nsIPromptService
All flags are defined as unsigned long constants and can be accessed as Components.interfaces.nsIPromptService.flagname from JavaScript and as nsIPromptService::flagname from C++. Button position flags On Linux and Mac, button 2 is on the left of the prompt, while buttons 1 and 0 are on the ...
...state of the checkbox when this method is called and the final checked state after this method returns. If you call this method from JavaScript you need to wrap this argument in an object with its 'value' property set to a boolean (or use an empty object). Return value true for OK, false for Cancel select() Shows a dialog box with a list box of strings from which the user may make a single selection. See also the select_example. boolean select( in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in PRUint32 aCount, [array, size_is(aCount)] in wstring aSelectList, out long aOutSelection ); aParent The parent window for the dialog. If set to null the parent window will be nsIWindowWatcher.activeWindow. aDialogTitle Text ...
...If you call this method from JavaScript, this argument is wrapped in an object with an attribute named 'value' which holds the selected index. Return value true for OK, false for Cancel Example code alert example alert displays a simple dialog. ...
Folders and message lists
messages. If a collapsed thread is in there and working with collapsed threads is enabled, this will include the headers for the messages in that collapsed thread. gFolderDisplay.selectedMessageUris: Returns an array of the URIs corresponding to the selected messages. Like selectedMessages, this also includes messages in selected collapsed threads when so enabled. Changing the Current Message Selection In addition to getting the currently-selected messages, you can also change the selection: gFolderDisplay.selectMessage(msgHdr): Selects a single message, as specified by msgHdr (an nsIMsgDBHdr) and scrolls to its position in the message list. gFolderDisplay.selectMessages(arrayOfMsgHdrs): Selects all the messages in the array arrayOfMsgHdrs. Like selectMessage, this function will attempt to...
... gFolderDisplay.clearSelection(): Clears the list of selected messages. Listing Messages in a Folder If you have a message folder, and would like to list all the messages in that folder, you can use the .messages attribute, which returns an nsISimpleEnumerator. ...
...on: gFolderDisplay.selectMessage(msgHdr): Selects a single message, as specified by msgHdr (an nsIMsgDBHdr) and scrolls to its position in the message list. gFolderDisplay.selectMessages(arrayOfMsgHdrs): Selects all the messages in the array arrayOfMsgHdrs. Like selectMessage, this function will attempt to scroll the view so the entire selection is visible (which may not be possible for large selections). gFolderDisplay.clearSelection(): Clears the list of selected messages. Listing Messages in a Folder If you have a message folder, and would like to list all the messages in that folder, you can use the .messages attribute, which returns an nsISimpleEnumerator. It's used like this: // Import the fixIterator() function. Components.utils.import("resource:///modules/iteratorUtils.jsm"); for ...
Sorting algorithms comparison - Firefox Developer Tools
This article describes a simple example program that we use in two of the Performance guides: the guide to the Call Tree and the guide to the Flame Chart. This program compares the performance of three different sorting algorithms: bubble sort selection sort quicksort It consists of the following functions: sortAll() Top-level function. Iteratively (200 iterations) generates a randomized array and calls sort(). sort() Calls each of bubbleSort(), selectionSort(), quickSort() in turn and logs the result. bubbleSort() Implements a bubble sort, returning the sorted array. selectionSort() Implements a selection sort, returning the sorted array. quickSort() Implements quicksort, returning the sorted array. swap() Hel...
... sort() Calls each of bubbleSort(), selectionSort(), quickSort() in turn and logs the result. bubbleSort() Implements a bubble sort, returning the sorted array. selectionSort() Implements a selection sort, returning the sorted array. quickSort() Implements quicksort, returning the sorted array. swap() Helper function for bubbleSort() and selectionSort(). partition() Helper function for quickSort(). ...
...e sorted array. swap() Helper function for bubbleSort() and selectionSort(). partition() Helper function for quickSort(). Its call graph looks like this: sortAll() // (generate random array, then call sort) x 200 -> sort() // sort with each algorithm, log the result -> bubbleSort() -> swap() -> selectionSort() -> swap() -> quickSort() -> partition() The implementations of the sorting algorithms in the program are taken from https://github.com/nzakas/computer-science-in-javascript/ and are used under the MIT license. You can try out the example program here and clone the code here (be sure to check out the gh-pages branch). You can also download the specific pr...
Flame Chart - Firefox Developer Tools
s structure. We'll use the same profile file as that used in the Call Tree page. In the call tree page, we figured out that the program call graph in that profile, and the associated sample count, looked like this: sortAll() // 8 -> sort() // 37 -> bubbleSort() // 1345 -> swap() // 252 -> selectionSort() // 190 -> swap() // 1 -> quickSort() // 103 -> partition() // 12 First, we'll just select the whole section in which the program was active: At the top, colored purple, is the sortAll() call, running throughout the program from start to finish. Underneath that, colored olive-green, are the calls it's making t...
...nderneath that, colored olive-green, are the calls it's making to sort(). Underneath that, like the teeth of a comb, are all the calls being made to each sorting algorithm. Let's zoom in: This slice is about 140 ms long, and shows us more details of the functions being called by sort(). The sort() code is just this: function sort(unsorted) { console.log(bubbleSort(unsorted)); console.log(selectionSort(unsorted)); console.log(quickSort(unsorted)); } The markers labeled "bubb..." and colored olive-green are presumably bubbleSort(). The ones colored plain green are presumably the other sort functions. Even at a glance, we can see that the bubble sort blocks are much wider (of a longer duration) than the others. We can also see some functions being called from bubbleSort(), colored purple.
...g called from bubbleSort(), colored purple. Let's zoom in one more time: This slice is about 20ms long. We can see that the purple markers underneath bubbleSort() are the calls to swap(). If you counted them all, the Call Tree view tells us that you'd see 253 of them. All the ones in this zoom are underneath bubbleSort(), but according to the Call Tree view, the profile does contain one under selectionSort(). We can also see that two of the green markers are for selectionSort() and quickSort(), but we're also seeing calls to platform (Gecko) code in between our calls to the sorting functions. It seems very likely that this is from the console.log() calls in sort(). ...
Element: cut event - Web APIs
Web › API › Element › cut event
is fired when the user has initiated a "cut" action through the browser's user interface. If the user attempts a cut action on uneditable content, the cut event still fires but the event object contains no data. Bubbles Yes Cancelable Yes Interface ClipboardEvent Event handler property oncut The event's default action is to copy the current selection (if any) to the system clipboard and remove it from the document. A handler for this event can modify the clipboard contents by calling setData(format, data) on the event's ClipboardEvent.clipboardData property, and cancelling the default action using event.preventDefault(). Note though that cancelling the default action will also prevent the document from being updated. So an event handler whi...
...lipboard contents by calling setData(format, data) on the event's ClipboardEvent.clipboardData property, and cancelling the default action using event.preventDefault(). Note though that cancelling the default action will also prevent the document from being updated. So an event handler which wants to emulate the default action for "cut" while modifying the clipboard must also manually remove the selection from the document. The handler cannot read the clipboard data. It's possible to construct and dispatch a synthetic cut event, but this will not affect the system clipboard or the document's contents. Examples Live example HTML <div class="source" contenteditable="true">Try cutting text from this box...</div> <div class="target" contenteditable="true">...and pasting it into this one</div> ...
...itable="true">Try cutting text from this box...</div> <div class="target" contenteditable="true">...and pasting it into this one</div> CSS div.source, div.target { border: 1px solid gray; margin: .5rem; padding: .5rem; height: 1rem; background-color: #e9eef1; } JS const source = document.querySelector('div.source'); source.addEventListener('cut', (event) => { const selection = document.getSelection(); event.clipboardData.setData('text/plain', selection.toString().toUpperCase()); selection.deleteFromDocument(); event.preventDefault(); }); Result Specifications Specification Status Clipboard API and events Working Draft ...
Drag Operations - Web APIs
The following describes the steps that occur during a drag and drop operation. The drag operations described in this document use the DataTransfer interface. This document does not use the DataTransferItem interface nor the DataTransferItemList interface. The draggable Attribute In a web page, there are certain cases where a default drag behavior is used. These include text selections, images, and links. ...
...is document does not use the DataTransferItem interface nor the DataTransferItemList interface. The draggable Attribute In a web page, there are certain cases where a default drag behavior is used. These include text selections, images, and links. When an image or link is dragged, the URL of the image or link is set as the drag data, and a drag begins. For other elements, they must be part of a selection for a default drag to occur. To see this in effect, select an area of a webpage, and then click and hold the mouse and drag the selection. An OS-specific rendering of the selection will appear and follow the mouse pointer as the drag occurs. However, this behavior is only the default drag behavior, if no listeners adjust the data to be dragged. In HTML, apart from the default behavior for images...
... To make other HTML elements draggable, three things must be done: Set the draggable="true" on the element that you wish to make draggable. Add a listener for the dragstart event. Set the drag data in the above listener. ...
Capabilities, constraints, and settings - Web APIs
<video> element by setting HTMLMediaElement.srcObject to null. Simple tab support in the editor This code adds simple support for tabs to the <textarea> elements by making the tab key insert two space characters when either constraint edit box is focused. ...
...a> elements by making the tab key insert two space characters when either constraint edit box is focused. ...
...the tab key insert two space characters when either constraint edit box is focused. ...
<input type="url"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › url
d is a valid URL or not. On browsers that don't support inputs of type url, a url input falls back to being a standard text input. Value A DOMString representing a URL, or empty Events change and input Supported Common Attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, required and size IDL attributes list, value, selectionEnd, selectionDirection Methods select(), setRangeText() and setSelectionRange(). Value The <input> element's value attribute contains a DOMString which is automatically validated as conforming to URL syntax. More specifically, there are two possible value formats that will pass validation: An empty string ("") indicating that the user did not enter a value or that the value...
...yURL" type="url" size="30"> Element value length The size is separate from the length limitation on the entered URL itself. You can specify a minimum length, in characters, for the entered URL using the minlength attribute; similarly, use maxlength to set the maximum length of the entered URL. If maxLength exceeds size, the input box's contents will scroll as needed to show the current selection or insertion point as the content is manipulated. The example below creates a 30-character wide URL address entry box, requiring that the contents be no shorter than 10 characters and no longer than 80 characters. <input id="myURL" name="myURL" type="url" size="30" minlength="10" maxlength="80"> Note: These attributes also affect validation; a value shorter or longer than the specif...
... values for the URL; this is typically presented as a popup or drop-down menu containing the suggestions. While the specific user experience may vary from one browser to another, typically clicking in the edit box presents a drop-down of the suggested URLs. Then, as the user types, the list is adjusted to show only matching values. Each typed character narrows down the list until the user makes a selection or types a custom value. Using labels for suggested values You can opt to include the label attribute on one or all of your <option> elements to provide textual labels. Some browsers may display only the labels, while others may display both the label and the URL. <input id="myURL" name="myURL" type="url" list="defaultURLs"> <datalist id="defaultURLs"> <option value="https://develope...
<maction> - MathML
The MathML <maction> element provides a possibility to bind actions to (sub-) expressions. The action itself is specified by the actiontype attribute, which accepts several values. To specify which child elements are addressed by the action, you can make use of the selection attribute. Attributes actiontype The action which specifies what happens for this element. Possible values are: statusline: If there is a click on the expression or the reader moves the pointer over it, the message is sent to the browser's status line. The syntax is: <maction actiontype="statusline"> expression message </maction>. toggle: When there is a click on the subexpression, the rendering alternates the display of selected subexpressions. Therefore each click increments the selection value. The syntax is:...
...expression or the reader moves the pointer over it, the message is sent to the browser's status line. The syntax is: <maction actiontype="statusline"> expression message </maction>. toggle: When there is a click on the subexpression, the rendering alternates the display of selected subexpressions. Therefore each click increments the selection value. The syntax is: <maction actiontype="toggle" selection="positive-integer" > expression1 expression2 expressionN </maction>. tooltip: When the pointer moves over the expression, a tooltip box with a message is displayed near the expression. The syntax is: <maction actiontype="tooltip"> expression message </maction>. class, id, style Provided for use with stylesheets. href Used to set a hyperlink to a specified URI. mathbackground The bac...
...he expression. The syntax is: <maction actiontype="tooltip"> expression message </maction>. class, id, style Provided for use with stylesheets. href Used to set a hyperlink to a specified URI. mathbackground The background color. You can use #rgb, #rrggbb and HTML color names. mathcolor The text color and also the fraction line color. You can use #rgb, #rrggbb and HTML color names. selection The child element which is addressed by the action. The default value is 1, which is the first child element. Examples The following example uses the "toggle" actiontype: <math> <maction actiontype="toggle"> <mfrac> <mn>6</mn> <mn>8</mn> </mfrac> <mfrac> <mrow> <mn>3</mn> <mo>&sdot;</mo> <mn>2</mn> </mrow> <mrow> <mn>4</mn> <mo>&sdot...
private-browsing - Archive of obsolete content
Additionally, add-ons that use low-level modules such as window/utils may see private browser windows with certain functions...
... Additionally, add-ons that use low-level modules such as window/utils may see private browser windows with certain functions, even if they have not explicitly opt...
Storing annotations - Archive of obsolete content
The user will be able to click links in the panel, but we want to open them in the main browser ...
...List HTML and CSS Here's the HTML for the annotation list: <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title>Saved annotations</title> <link rel="stylesheet" type="text/css" href="annotation-list.css" /> </head> <body> <div id="annotation-list"> </div> <div id="template"> <div class="annotation-details"> <a class="url"></a> <div class="selection-text"></div> <div class="annotation-text"></div> </div> </div> </body> </html> Here's the corresponding CSS: #annotation-list .annotation-details { padding: 10px; margin: 10px; border: solid 3px #EEE; background-color: white; } #annotation-list .url, .selection-text, .annotation-text { padding: 5px; margin: 5px; } #annotation-list .selection-text,#annotation-list ...
Tree - Archive of obsolete content
Getting the cell from a mouse click Your first choice is likely to try <treecell onclick="yourfunc();"/> or something similar. But this will not work. You can't add event handlers to <treecell>. Instead, you can add th...
...mentById("my-tree"); var tbo = tree.treeBoxObject; // get the row, col and child element at the point var row = { }, col = { }, child = { }; tbo.getCellAt(event.clientX, event.clientY, row, col, child); var cellText = tree.view.getCellText(row.value, col.value); alert(cellText); } Getting the selected indices of a multiselect tree var start = {}, end = {}, numRanges = tree.view.selection.getRangeCount(), selectedIndices = []; for (var t = 0; t < numRanges; t++){ tree.view.selection.getRangeAt(t, start, end); for (var v = start.value; v <= end.value; v++) selectedIndices.push(v); } Other resources XUL: Tree documentation XUL tutorial: Tree selection ...
Menu - Archive of obsolete content
Archive › Mozilla › Jetpack › UI › Menu
ading..."); getRecentTweets(function done(tweets) menu.set(tweets)); } }) }); When the user selects some text on a page, the context menu normally displays a simple item that searches for it. ...
...pack.Menu([ { label: "Google", icon: "http://www.google.com/favicon.ico", data: "http://www.google.com/search?q=" }, { label: "Wikipedia", icon: "http://en.wikipedia.org/favicon.ico", data: "http://en.wikipedia.org/wiki/" } ]), command: function (menuitem) { context.window.location.href = menuitem.data + jetpack.selection.text; } }; }); Create some div buttons (e.g., in a slidebar or status bar item) and specify their context menu: for (let i = 0; i < 10; i++) { var button = $('<div class="button" />', document); buttonContainer.append(button); } jetpack.menu.context.on(".button").add(["Do This", "Do That"]); Create a div button (e.g., in a slidebar or status bar item) and attach menus directly to it. ...
disableautoselect - Archive of obsolete content
This attribute applies only to editable menulists. ...
...This attribute applies only to editable menulists. ...
selectItemRange - Archive of obsolete content
...
... ...
Template and Tree Listeners - Archive of obsolete content
ter the tree has been generated. To assign a builder listener to a builder, use the addListener method. var someListener = { item: null, willRebuild : function(builder) { this.item = builder.getResourceAtIndex(builder.root.currentIndex); }, didRebuild : function(builder) { if (this.item) { var idx = builder.getIndexOfResource(this.item) if (idx != -1) builder.root.view.selection.select(idx); } } }; tree.builder.addListener(someListener); This example is very simple and just saves and restores the selected index after a rebuild. Since the content goes away during a rebuild, the selection is lost, so it is restored here during the didRebuild method. The Firefox bookmarks window uses this technique. If you try an example using the code above, you will notice that th...
...This is because the listener is only attached to the first tree. ...
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
sent to it, and the handler defined here is called, causing the state of the checked property to be reversed. Similarly, you may wish to change a property when the element is focused. You might have a need to change whether an element can have the focus or not. For this, you can use a special style property -moz-user-focus. This property controls whether an element can be focused. (see Focus and Selection) Handling Mouse Events For mouse events, you can use the button attribute to have the handler only trap events that occur from a certain button. Without this attribute, the handler traps all events regardless of the button that was pressed. The button attribute should be set to either 0 for the left mouse button, 1 for the middle mouse button or 2 for the right mouse button. <handlers> <handler...
...ue of a null string. This effectively clears the text in the textbox. A copy operation is similar but does not clear the text afterwards. Pasting is the opposite where the value of the textbox is assigned from the value in the clipboard field. If we were creating a real implementation of these clipboard keyboard shortcuts, we would probably use the real clipboard interface and handle the current selection as well. In the next section, we'll see how to extend existing XBL definitions. << PreviousNext >> ...
listitem - Archive of obsolete content
e URI of the image to appear on the element. If this 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. ...
... 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. ...
2006-09-22 - Archive of obsolete content
Authors Dean Woodside Sherman Fernandes ...
... Authors Dean Woodside Sherman Fernandes ...
-ms-touch-select - Archive of obsolete content
The -ms-touch-select CSS property is a Microsoft extension that toggles the gripper visual elements that enable touch text selection. Initial valuegrippersApplies toall elementsInheritedyesComputed valueas specifiedAnimation typediscrete Syntax Values grippers The grippers are always on. In addition, selection will start even if an onclick, onmsgesturetap, or onmouseup handler is present. This is the initial value. none The grippers are always off and default touch selection functionality is not provided. Formal syntax grippers | none Specifications Not part of any specification. Remarks This property requires Windows 8 or later. The -ms-touch-select property should only be used by applications that provide their own selection experience. Most other applicatio...
...This property requires Windows 8 or later. The -ms-touch-select property should only be used by applications that provide their own selection experience. Most other applications should use the -ms-user-select property instead. If you choose to hide the grippers, you should ensure that users have a mechanism for selecting text via touch. To find out how to do this using JavaScript, see the HTML5 Selection APIs. This property has no effect on mouse, keyboard, or touchpad interaction. ...
Implementation Status - Archive of obsolete content
supported 4.6.2 For output Controls supported 4.6.3 For select or select1 Controls partial 4.6.4 For trigger Controls supported 4.6.5 For submit Controls supported 4.6.6 Sequence: Selection Without Value Change supported 4.6.7 Sequence: Value Change With Focus Change supported 4.6.8 Sequence: Activating a Trigger supported 4.6.9 Sequence: Submission supported 4.7 Resolving ID References in XForms unsuppo...
...Getting a few issues with in/out of range notifications. 282840; 303351; 333464; 333529; 35239...
CSS basics - Learn web development
x solid black; } Selecting multiple elements You can also select multiple elements and apply a single ruleset to all of them. Separate multiple selectors by commas. For example: p, li, h1 { color: red; } Different types of selectors There are many different types of selectors. The examples above use element selectors, which select all elements of a given type. But we can make more specific selections as well. Here are some of the more common types of selectors: Selector name What does it select Example Element selector (sometimes called a tag or type selector) All HTML elements of the specified type. p selects <p> ID selector The element on the page with the specified ID. On a given HTML page, each id value should be unique. #my-id se...
...https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> This code links your page to a style sheet that loads the Open Sans font family with your webpage. Next, delete the existing rule you have in your style.css file. It was a good test, but let's not continue with lots of red text. Add the following lines (shown below), replacing the font-family assignment with your font-family selection from What will your website look like?. The property font-family refers to the font(s) you want to use for text. This rule defines a global base font and font size for the whole page. Since <html> is the parent element of the whole page, all elements inside it inherit the same font-size and font-family. html { font-size: 10px; /* px means "pixels": the base font size is now 10 pixels high */...
Images in HTML - Learn web development
addEventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { var scrollPos = textarea.scrollTop; var caretPos = textarea.selectionStart; var front = (textarea.value).substring(0, caretPos); var back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every time th...
...addEventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { var scrollPos = textarea.scrollTop; var caretPos = textarea.selectionStart; var front = (textarea.value).substring(0, caretPos); var back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every time th...
Looping code - Learn web development
ventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { const scrollPos = textarea.scrollTop; const caretPos = textarea.selectionStart; const front = (textarea.value).substring(0, caretPos); const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every tim...
...ventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { const scrollPos = textarea.scrollTop; const caretPos = textarea.selectionStart; const front = (textarea.value).substring(0, caretPos); const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every tim...
Making decisions in your code — conditionals - Learn web development
ventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { const scrollPos = textarea.scrollTop; const caretPos = textarea.selectionStart; const front = (textarea.value).substring(0, caretPos); const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every tim...
...ventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { const scrollPos = textarea.scrollTop; const caretPos = textarea.selectionStart; const front = (textarea.value).substring(0, caretPos); const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every tim...
Arrays - Learn web development
entListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { const scrollPos = textarea.scrollTop; const caretPos = textarea.selectionStart; const front = (textarea.value).substring(0, caretPos); const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every tim...
...ventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { const scrollPos = textarea.scrollTop; const caretPos = textarea.selectionStart; const front = (textarea.value).substring(0, caretPos); const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every tim...
Server-side web frameworks - Learn web development
For example, the Django web framework provides an ORM, and refers to the object used to define the structure of a record as the model. The model specifies the field types to be stored, which may provide field-level validation on what information can be stored (e.g. an email field would only allow valid email addresses). The field definitions may also specify their maximum size, default values, selection list options, help text for documentation, label text for forms etc. The model doesn't state any information about the underlying database as that is a configuration setting that may be changed separately of our code. The first code snippet below shows a very simple Django model for a Team object. This stores the team name and team level as character fields and specifies a maximum number of char...
...r example, a framework that encourages a Model-View-Controller architecture to separate code into logical functions will result in more maintainable code than one that has no expectations on developers. Similarly, framework design can have a large impact on how easy it is to test and re-use code. Performance of the framework/programming language: Usually "speed" is not the biggest factor in selection because even relatively slow runtimes like Python are more than "good enough" for mid-sized sites running on moderate hardware. The perceived speed benefits of another language, e.g. C++ or JavaScript, may well be offset by the costs of learning and maintenance. Caching support: As your website becomes more successful then you may find that it can no longer cope with the number of requests it is...
Embedding API for Accessibility
It's a W3C UAAG requirement */ ...
...); SetCharPref("browser.display.focus_background_color", colorString); SetCharPref("browser.display.focus_text_color", colorString); SetCharPref("browser.display.focus_ring_width", numPixels); /* 0-4 */ Moz 0.9.2 Text Selection appearance SetCharPref("browser.selection.background_color", colorString); SetCharPref("browser.selection.foreground_color", colorString); SetCharPref("browser.selection.border", cssBorderStyleString); /* Is a selection border hard to implement? It's a W3C UAAG requirement */ SetBoolPref("browser.selection.use_system_colors", useSystemColors); ...
Gecko info for Windows accessibility vendors
bles changes visibility -- only the top IAccessible. The exception is progress meters, which are guaranteed to fire EVENT_SHOW and EVENT_HIDE events when they are displayed or hidden. EVENT_ALERT is fired when an object of ROLE_ALERT appears or changes. This should indicate to a screen reader to read the contents of the alert (it may be a container who's descendents should be read). EVENT_SELECTION is fired on children of single selection containers along with the EVENT_FOCUS as selection/focus move together in that case. EVENT_SELECTIONWITHIN is fired on multi selection containers when the current selection changes within. In addition, EVENT_SELECTIONADD and EVENT_SELECTIONREMOVE are fired on the the child who's selection changed. How to track where the event happened, within your...
...ROW Not supported. See the section Intentional Differences with IE ROLE_CELL HTML: <td> DHTML: role="wairole:gridcell" Sets STATE_READONLY in normal table. Sets STATE_FOCUSABLE in data grids and spreadsheets Clears STATE_READONLY in spreadsheets. Sets STATE_SELECTED in spreadsheets when a cell has selection. ROLE_LINK XUL: <label class="text-link"> -- this should be changed, we need a real <link> widget for XUL HTML: <a> and <area> Sets STATE_LINKED if it is pointing somewhere. Sets STATE_TRAVERSED if link has been visited. Sets STATE_SELECTABLE if it is an HTML named anchor accValue() exposes the URL that is pointed to ...
Mozilla's Section 508 Compliance
tion that shall be made available is text content, text input caret location, and text attributes. Complete. Caret location and text attributes are exposed via MSAA (Windows) and ATK (Linux/UNIX) Incomplete. No development efforts have made made to utilize Cocoa or Carbon accessibility APIs. (g) Applications shall not override user selected contrast and color selections and other individual display attributes. Complete. The default theme, Classic, uses the operating system's font and color contrast settings. When the Windows "high contrast theme" is used Classic, and thus the system look and feel, is automatically selected. Complete when run in the Gnome desktop. The default theme, Classic, uses Gnome's font and color contrast settings. Under Li...
...f conveying information, indicating an action, prompting a response, or distinguishing a visual element. Complete. Caveat: normally Mozilla uses a color change to indicate when a link has been visited. However, the visited link appearance can be altered via a user style sheet. (j) When a product permits a user to adjust color and contrast settings, a variety of color selections capable of producing a range of contrast levels shall be provided. Complete. Mozilla's appearance preferences panel contains a large number of color possibilities. (k) Software shall not use flashing or blinking text, objects, or other elements having a flash or blink frequency greater than 2 Hz and lower than 55 Hz. Complete. Mozilla supports of <blink> and...
Application cache implementation overview
out associating nsIApplicationCache object with the channel, but with the document object the load is performed for. Until steps described further the document doesn't know anything about its appcache. The association happens in nsContentSink::ProcessOfflineManifest() called from the HTML parser every time <html> tag has been parsed. ProcessOfflineManifest is an effective implementation of "cache selection algorithm" as described by the HTML5 spec. For purpose of this documentation it's enough to describe the simplest case ; for complete documentation of the selection algorithm refer to the spec or to the code. When the URL in the manifest attribute of the html tag is identical to the manifest URL the channel's nsIApplicationCache object belongs to and, the channel's LoadedFromApplicationCache flag...
...ue, but it is dropped by nsDocShell::DoURILoad() to false only for top level document loading channels. The InheritApplicationCache flag instructs the channel to do GetInterface on its callbacks for nsIApplicationCacheContainer. This returns the top level document the whole load group is bound to. This is the same document object that is associated the nsIApplicationCache object during the "cache selection algorithm" in nsContentSink::ProcessOfflineManifest() described in "associating the top level document with offline cache" chapter above. nsIApplicationCacheContainer is then queried for nsIApplicationCache object. If found, the channel is then using that nsIApplicationCache object to load entries from. The following loading process decisions are then the same as for the top level load with one a...
Overview of Mozilla embedding APIs
nt... // Save webBrowser before it goes out of scope :-) Web Navigation The nsIWebNavigation interface is used to load URIs into the WebBrowser and provide access to session history capabilities - such as back and forward. Clipboard The WebBrowser exposes access to the system clipboard via the nsIClipboardCommands interface. This interface supports cut/copy/paste operations on the current selection within the WebBrowser window. Printing (not yet implemented) Printing the contents of a DOMWindow within a WebBrowser is a two step process. First, the printer and page options are collected via the nsIPrintOptions interface. On most platforms this involves displaying a native Print dialog box. Once all of the options have been set, the nsIWebBrowserPrint interface is used to print the contents o...
...r profiles; each profile is essentially a complete configuration of the application, including preferences, installed extensions, and so forth. nsIDirectoryServiceProvider Interface status... Interface definition: nsILocalFile Interface status... Interface definition: nsIFile Interface status... Interface definition: nsIClipboardCommands Interface status... Interface definition: nsISelection Interface status... Interface definition: nsIURILoader Interface status... Interface definition: nsIURIContentListener Interface status... Interface definition: Defining New XPCOM Components Original Document Information Author(s): rpotts, alecf, oeschger at netscape.com Last Updated Date: March 5, 2003 Copyright Information: Creative Commons ...
Profiling with the Firefox Profiler
happened had there been an event waiting and not necessarily that there was an event pending for that long. Black: These indicate synchronous IPC calls. Ranges Ranges of time can be zoomed in on by clicking and dragging anywhere in the tracing marker or thread areas. Once a range is selected, a magnifying glass appears which zooms into that range. Clicking on a tracing marker will create a selection corresponding with its duration allowing for easy zooming in on interesting time ranges. As you zoom in on ranges, breadcrumbs are created allowing you to easily navigate back to previously-selected ranges or the entire profile (denoted as "Full Range"). Tip: While zooming out to a previously-selected range deletes the narrower range, the browser back button can be used to restore the narrower ...
...use a significant performance impact. Alternatively, Native Leaf Stack ("leaf") only records the top-most frame. JavaScript - "js" Javascript callstacks will be generated and interleaved with the c++ callstacks. This will introduce an overhead when running JS. Main Thread File IO, Profiled Thread File IO, All File IO - "mainthreadio", "fileio", "allfileio" This will interpose file I/O from a selection of threads, and report them in the profiles. Screenshots This will insert screenshots into the profile. It may have significant performance impact, especially on graphics operations. Viewing the Layer Tree To view the layer tree, the layers.dump pref must be set to true in the Firefox or B2G program being profiled. In addition, both the compositor thread and the content thread (in the case o...
PKCS11 FAQ
Mozilla › Projects › NSS › PKCS11 › FAQ
sword when performing an RSA verify operation, DES encryption, and so on. Therefore, NSS can move keys around when necessary and possible. When operating in FIPS mode, moving keys is significantly harder. In this case NSS uses a single token to handle both key and cert storage and crypto operations. In general, you not should use different slots unless you have a good reason. Much of NSS's token selection is based on where the key involved is currently stored. If the token that has your private keys doesn't also do symmetric operations, for example, it's likely that the internal token will end up doing the symmetric operations. Is the PKCS #11 module supplied with NSS accessible through a shared library? Yes, the token is call softokn3 (softokn3.dll on windows, libsoftokn3.so on most unix platfo...
...d token, go to your local Certificate Authority and initiate a certificate request. Somewhere along the way you will be prompted with a keygen dialog. Normally this dialog does not have any options and just provides information; however, if you have more than one token that can be used in this key generation process (for example, your smartcard and the NSS internal PKCS#11 module), you will see a selection of "cards and databases" that can be used to generate your new key info. In the key generation process, NSS arranges for the key to have it's CKA_ID set to some value derived from the public key, and the public key will be extracted using C_GetAttributes. This key will be sent to the CA. At some later point, the CA presents the certificate to you (as part of this keygen, or in an e-mail, or you...
nsIAccessible
e, if one accessible gives the accessible name for another accessible (for example, html:label and html control) then these accessibles are related, please refer to relations documentation for more information. You can get related accessibles by methods nsIAccessible.getAccessibleRelated() nsIAccessible.getRelations() nsIAccessible.getRelation() and nsIAccessible.relationsCount. Focus and selection In order to focus an accessible or get focused child accessible use nsIAccessible.takeFocus() and nsIAccessible.focusedChild. To select an accessible you can use nsIAccessible.setSelected(), nsIAccessible.takeSelection() and nsIAccessible.extendSelection(). Actions You can prepare actions on some accessibles (for example on button accessible). The following methods are intended for this nsIAccess...
...etRelation This method returns one accessible relation for this object. getRelations This method returns multiple accessible relations for this object. getBounds This method returns accessible's (x and y) coordinates relative to the screen and accessible's width and height. setSelected This method adds or remove this accessible to the current selection. extendSelection This method extends the current selection from its current accessible anchor node to this accessible. takeSelection This method selects this accessible node only. takeFocus This method focuses this accessible node. getActionName This method retrieves the name of the accessible action at the given zero-based index. ...
nsIAutoCompleteInput
opup The view in which results will be displayed.Read only. popupOpen boolean Indicates whether or not the popup view is already open. searchCount unsigned long The number of autocomplete sessions to search. Read only. searchParam AString An additional parameter used for configuring searches. selectionEnd long The ending index of the current selection in the text field. Read only. selectionStart long The starting index of the current selection in the text field. Read only. showCommentColumn boolean If true, a column is added to the popup, showing the comment for each autocomplete result. showImageColumn bo...
...e The name of the specified object. onSearchBegin() Called when the search starts. void onSearchBegin(); Parameters None. onSearchComplete() Called when the search ends successfully. void onSearchComplete(); Parameters None. onTextEntered() Called when the user selects and presses enter on a result item. boolean onTextEntered(); Parameters None. Return value Return true to prevent handling the selection. onTextReverted() Called when the user cancels the autocomplete session. boolean onTextReverted(); Parameters None. Return value Return true to prevent the reversion. selectTextRange() Selects a range of text in the autocomplete text field. void selectTextRange( in long startIndex, in long endIndex ); Parameters startIndex The index to the first character in the text field to...
nsIEditorSpellCheck
y(); void GetDictionaryList([array, size_is(count)] out wstring dictionaryList, out PRUint32 count); wstring GetNextMisspelledWord(); void GetPersonalDictionary(); wstring GetPersonalDictionaryWord(); wstring GetSuggestedWord(); void IgnoreWordAllOccurrences(in wstring word); void InitSpellChecker(in nsIEditor editor, in boolean enableSelectionChecking); void RemoveWordFromDictionary(in wstring word); void ReplaceWord(in wstring misspelledWord, in wstring replaceWord, in boolean allOccurrences); void saveDefaultDictionary(); Obsolete since Gecko 9.0 void SetCurrentDictionary(in AString dictionary); void setFilter(in nsITextServicesFilter filter); void UninitSpellChecker(); ...
...g suggestions. IgnoreWordAllOccurrences() Tells the spell checker to ignore all occurrences of the specified word when spell checking the document. void IgnoreWordAllOccurrences( in wstring word ); Parameters word The word to ignore when spell checking. InitSpellChecker() Turns on the spell checker for the given editor. void InitSpellChecker( in nsIEditor editor, in boolean enableSelectionChecking ); Parameters editor The nsIEditor on which to enable spell checking. enableSelectionChecking If true, the spell checker is initialized only for checking the current selection; otherwise, it's initialized for checking the entire document. This affects the behavior of GetNextMisspelledWord()). For spell checking clients with no modal UI (such as inline spell checkers), th...
nsIMsgSearchSession
SearchScopes(); void getNthSearchScope(in long which,out nsMsgSearchScopeValue scopeId, out nsIMsgFolder folder); void addScopeTerm(in nsMsgSearchScopeValue scope, in nsIMsgFolder folder); void addDirectoryScopeTerm(in nsMsgSearchScopeValue scope); void clearScopes(); [noscript] boolean ScopeUsesCustomHeaders(in nsMsgSearchScopeValue scope, in voidPtr selection, in boolean forFilters); boolean IsStringAttribute(in nsMsgSearchAttribValue attrib); void AddAllScopes(in nsMsgSearchScopeValue attrib); void search(in nsIMsgWindow aWindow); void interruptSearch(); void pauseSearch(); void resumeSearch(); [noscript] nsMsgSearchType SetSearchParam(in nsMsgSearchType type, in voidPtr param); ...
...e clearScopes() void clearScopes(); ScopeUsesCustomHeaders() Call this function everytime the scope changes! It informs the FE if the current scope support custom header use. FEs should not display the custom header dialog if custom headers are not supported. [noscript] boolean ScopeUsesCustomHeaders(in nsMsgSearchScopeValue scope, in voidPtr selection, in boolean forFilters); Parameters scope selection Could be a folder or server based on scope forFilters IsStringAttribute() Use this to determine if your attribute is a string attribute. boolean IsStringAttribute(in nsMsgSearchAttribValue attrib); Parameters attrib AddAllScopes() Add all scopes of a given type to the search. void AddAllScopes(in nsMsgSearchScope...
nsINavHistoryResultViewObserver
ult doesn't implement. Inherits from: nsISupports Last changed in Gecko 1.9.0 Method overview boolean canDrop(in long index, in long orientation); void onDrop(in long row, in long orientation); void onToggleOpenState(in long index); void onCycleHeader(in nsITreeColumn column); void onCycleCell(in long row, in nsITreeColumn column); void onSelectionChanged(); void onPerformAction(in wstring action); void onPerformActionOnRow(in wstring action, in long row); void onPerformActionOnCell(in wstring action, in long row, in nsITreeColumn column); Constants Constant Value Description DROP_BEFORE -1 The drag operation wishes to insert the dragged item before the indicated row. D...
...mn ); Parameters column The column whose header was clicked. onCycleCell() Called when a cell in a non-selectable cycling column (such as unread or flagged in Thunderbird) is clicked. void onCycleCell( in long row, in nsITreeColumn column ); Parameters row The row on which the clicked cell is located. column The column in which the clicked cell is located. onSelectionChanged() Called when the selection in the tree changes. void onSelectionChanged(); Parameters None. onPerformAction() This method provides a command API that can be used to invoke commands on the selection. The tree automatically invokes this method when certain keys are pressed. For example, when the delete key is pressed, this method is called with the string "delete". void onPerformAction( ...
XPCOM Interface Reference
ratornsIRequestnsIRequestObservernsIResumableChannelnsIRunnablensISHEntrynsISHistorynsISHistoryListenernsISOCKSSocketInfonsISSLErrorListenernsISSLSocketControlnsIScreennsIScreenManagernsIScriptErrornsIScriptError2nsIScriptableIOnsIScriptableInputStreamnsIScriptableUnescapeHTMLnsIScriptableUnicodeConverternsIScrollablensISearchEnginensISearchSubmissionnsISecurityCheckedComponentnsISeekableStreamnsISelectionnsISelection2nsISelection3nsISelectionControllernsISelectionImageServicensISelectionPrivatensIServerSocketnsIServerSocketListenernsIServiceManagernsISessionStartupnsISessionStorensISimpleEnumeratornsISmsDatabaseServicensISmsRequestManagernsISmsServicensISocketProvidernsISocketProviderServicensISocketTransportnsISocketTransportServicensISoundnsISpeculativeConnectnsIStackFramensIStandardURLnsIStream...
...tFilternsIThreadInternalnsIThreadManagernsIThreadObservernsIThreadPoolnsIThreadPoolListenernsITimernsITimerCallbacknsIToolkitnsIToolkitProfilensIToolkitProfileServicensITraceableChannelnsITransactionnsITransactionListnsITransactionListenernsITransactionManagernsITransferablensITransportnsITransportEventSinknsITransportSecurityInfonsITreeBoxObjectnsITreeColumnnsITreeColumnsnsITreeContentViewnsITreeSelectionnsITreeViewnsIURInsIURIFixupnsIURIFixupInfonsIURLnsIURLFormatternsIURLParsernsIUTF8ConverterServicensIUTF8StringEnumeratornsIUUIDGeneratornsIUpdatensIUpdateCheckListenernsIUpdateCheckernsIUpdateItemnsIUpdateManagernsIUpdatePatchnsIUpdatePromptnsIUpdateTimerManagernsIUploadChannelnsIUploadChannel2nsIUrlListManagerCallbacknsIUserCertPickernsIUserInfonsIVariantnsIVersionComparatornsIWeakReferencensIW...
XPCOM Interface Reference by grouping
IDOMXPathResult XSLT nsIXSLTException nsIXSLTProcessor Download nsIDownload nsIDownloadManager nsIDownloadProgressListener Element Internal nsIWorker nsIWorkerGlobalScope nsIWorkerMessageEvent nsIWorkerMessagePort nsIWorkerScope Tree nsITreeBoxObject nsITreeColumn nsITreeColumns nsITreeContentView nsITreeSelection nsITreeView Xform nsIXFormsModelElement nsIXFormsNSInstanceElement nsIXFormsNSModelElement XMLHttpRequest nsIXMLHttpRequestEventTarget FavIcon nsIFaviconDataCallback nsIFaviconService Frame nsIChromeFrameMessageManager nsIFrameLoader nsIFrameLoaderOwner nsIFrameMessageListener nsIFrameMessageManager Interface ...
... DOM nsIWebBrowser nsIWebBrowserPersist Cache nsICache nsICacheDeviceInfo nsICacheEntryDescriptor nsICacheEntryInfo nsICacheListener nsICacheMetaDataVisitor nsICacheService nsICacheSession nsICacheVisitor nsICachingChannel nsISelectionImageService Chrome nsISearchEngine nsISearchSubmission nsIWebBrowserChrome nsIWindowCreator nsIWindowMediator nsIWindowWatcher Clipboard nsIClipboard nsIClipboardCommands nsIClipboardDragDropHookList nsIClipboardDragDropHooks nsIClipboardHelper nsIClipboardOwner ...
Examine and edit CSS - Firefox Developer Tools
s: `color`, the search is restricted to exact matches: Expanding shorthand properties Shorthand properties can be expanded to display their related longhand properties by clicking the arrow besides them. ...
...view displays the following pseudo-elements, if they are applied to the selected element: ::after ::backdrop ::before ::first-letter ::first-line ::selection :-moz-color-swatch :-moz-number-spin-box :-moz-number-spin-down :-moz-number-spin-up :-moz-number-text :-moz-number-wrapper :-moz-placeholder :-moz-progress-bar :-moz-range-progress :-moz-range-thumb :-moz-range-track :-moz-selection If the selected element has pseudo-elements applied to it, they are displayed before the selected element but hidden by a disclosure triangle: Clicking the triangle displays them: Viewing common pseudo-classes There's a button to the right of the filter box: Click the button to see checkboxes that you can use to enable the :hover, :active and :focus, :focus-within and :visited pseudo-c...
Animation inspector example: CSS transitions - Firefox Developer Tools
ase-in-out; } .note { margin-left: 1em; font: 1.5em "Open Sans",Arial,sans-serif; overflow: hidden; white-space: nowrap; display: inline-block; opacity: 0; width: 0; transition: opacity 500ms 150ms, width 500ms 150ms; } .icon#selected { filter: grayscale(0%); transform: scale(1.5); } .icon#selected+span { opacity: 1; width: 300px; } JavaScript Content function toggleSelection(e) { if (e.button != 0) { return; } if (e.target.classList.contains("icon")) { var wasSelected = (e.target.getAttribute("id") == "selected"); clearSelection(); if (!wasSelected) { e.target.setAttribute("id", "selected"); } } } function clearSelection() { var selected = document.getElementById("selected"); if (selected) { selected.removeAttribute("id"); ...
...if (e.target.classList.contains("icon")) { var wasSelected = (e.target.getAttribute("id") == "selected"); clearSelection(); if (!wasSelected) { e.target.setAttribute("id", "selected"); } } } function clearSelection() { var selected = document.getElementById("selected"); if (selected) { selected.removeAttribute("id"); } } document.addEventListener("click", toggleSelection); ...
Allocations - Firefox Developer Tools
8904 samples were taken in signalLater(), which is 28.57% of the total number of samples taken those samples allocated 1102888 bytes, which is 30.01% of the total memory allocated in all samples Next to each function name is a disclosure arrow. Click this to see the places this function was called from: Here you can see that signalLater() was called from two places: removeInner() and setSelectionInner(). In this way you can walk back up the call stack, and understand better the context for these allocations. Self Cost and Total Cost You'll see that there are separate sets of columns for "Self" and for "Total". "Self" records samples taken only in this function. "Total" records samples taken in this function or in functions called by this function. At the top level, these are always t...
...on or in functions called by this function. At the top level, these are always the same, since the view presents "leaf" functions at the top level (that is, it presents an inverted view of the call stack). But if you start walking back up the call stack, you'll see the difference: Here, 8904 samples were taken in signalLater(). But signalLater() was called from two places: removeInner() and setSelectionInner(). Both these functions have 0 in Self Count, meaning that no allocations were seen directly in these functions. However, removeInner() has 8901 in Total Count, while setSelectionInner() has just 3 in Total Count. This is telling us that, of the 8904 allocations seen in signalLater(), all but three came through the removeInner() branch. Allocations and garbage collection Of course, the mem...
Responsive Design Mode - Firefox Developer Tools
warning message that tells you these reloads are no longer automatic, and informed about how you can make them automatic. For example: Developer Toolbox with RDM You can show or hide the Developer Tools toolbox independently of toggling Responsive Design Mode itself: While Responsive Design Mode is enabled, you can continue browsing as you normally would in the resized content area. Device selection Just above the viewport there is a label "no device selected"; click this to see a list of device names. Select a device, and Responsive Design Mode sets the following properties to match the selected device: Screen size Device pixel ratio (the ratio of device physical pixels to device-independent pixels) Touch event simulation Additionally, Firefox sets the User-Agent HTTP request header...
...ximately, the characteristics of various different types of networks. The characteristics emulated are: Download speed Upload speed Minimum latency The table below lists the numbers associated with each network type, but please do not rely on this feature for exact performance measurements; it's intended to give an approximate idea of the user experience in different conditions. ...
Document: dragenter event - Web APIs
Interface DragEvent Event handler property ondragenter Examples See the drag event for example code or this JSFiddle demo. ...
... Interface DragEvent Event handler property ondragenter Examples See the drag event for example code or this JSFiddle demo. ...
Element: copy event - Web APIs
The copy event fires when the user initiates a copy action through the browser's user interface. Bubbles Yes Cancelable Yes Interface ClipboardEvent Event handler property oncopy The event's default action is to copy the selection (if any) to the clipboard. A handler for this event can modify the clipboard contents by calling setData(format, data) on the event's ClipboardEvent.clipboardData property, and cancelling the event's default action using event.preventDefault(). However, the handler cannot read the clipboard data. It's possible to construct and dispatch a synthetic copy event, but this will not affect the system clipboard. Examples Live example HTML <div class="source" contenteditable="true">Try copying text from this box...<...
...table="true">Try copying text from this box...</div> <div class="target" contenteditable="true">...and pasting it into this one</div> CSS div.source, div.target { border: 1px solid gray; margin: .5rem; padding: .5rem; height: 1rem; background-color: #e9eef1; } JS const source = document.querySelector('div.source'); source.addEventListener('copy', (event) => { const selection = document.getSelection(); event.clipboardData.setData('text/plain', selection.toString().toUpperCase()); event.preventDefault(); }); Result Specifications Specification Status Clipboard API and events Working Draft ...
GlobalEventHandlers.onselect - Web APIs
put type="text"> or <textarea> is selected. Syntax target.onselect = functionRef; Value functionRef is a function name or a function expression. The function receives a UIEvent object as its sole argument. Examples This example logs the text you select inside a <textarea> element. ...
...nctionRef; Value functionRef is a function name or a function expression. The function receives a UIEvent object as its sole argument. Examples This example logs the text you select inside a <textarea> element. HTML <textarea>Try selecting some text in this element.</textarea> <p id="log"></p> JavaScript function logSelection(event) { const log = document.getElementById('log'); const selection = event.target.value.substring(event.target.selectionStart, event.target.selectionEnd); log.textContent = `You selected: ${selection}`; } const textarea = document.querySelector('textarea'); textarea.onselect = logSelection; Result Specification Specification Status Comment HTML Living StandardThe definition of 'onselect' in that specification. Living Standard ...
GlobalEventHandlers.onselectstart - Web APIs
Syntax object.onselectstart = functionRef; Value functionRef is a function name or a function expression. The function receives a FocusEvent object as its sole argument. Example document.onselectstart = function() { console.log('Selection started!'); }; For a full example, see our Key quote generator demo. ...
...Handlers mixin is an EventHandler that processes selectstart events. The selectstart event fires when the user starts to make a new text selection on a webpage. Syntax object.onselectstart = functionRef; Value functionRef is a function name or a function expression. The function receives a FocusEvent object as its sole argument. Example document.onselectstart = function() { console.log('Selection started!'); }; For a full example, see our Key quote generator demo. Specifications Specification Status Comment Selection APIThe definition of 'GlobalEventHandlers.onselectstart' in that specification. Working Draft Initial definition. ...
GlobalEventHandlers - Web APIs
senting the code to be called when the seeked event is raised. GlobalEventHandlers.onseeking Is an EventHandler representing the code to be called when the seeking event is raised. GlobalEventHandlers.onselect Is an EventHandler representing the code to be called when the select event is raised. GlobalEventHandlers.onselectstart Is an EventHandler representing the code to be called when the selectionchange event is raised, i.e. when the user starts to make a new text selection on a web page. GlobalEventHandlers.onselectionchange Is an EventHandler representing the code to be called when the selectionchange event is raised, i.e. when the text selected on a web page changes. GlobalEventHandlers.onshow Is an EventHandler representing the code to be called when the show event is raised. Glob...
...lobalEventHandlers.ontransitionstart An EventHandler called when a transitionstart event is sent, indicating that a CSS transition has started transitioning. GlobalEventHandlers.onwaiting Is an EventHandler representing the code to be called when the waiting event is raised. Methods This interface defines no methods. Specifications Specification Status Comment Selection APIThe definition of 'Extension to GlobalEventHandlers' in that specification. Working Draft Adds onselectionchange. Pointer LockThe definition of 'Extension of Document' in that specification. Candidate Recommendation Adds onpointerlockchange and onpointerlockerror on Document. It is experimentally implemented on GlobalEventHandlers. HTML Living StandardThe definiti...
HTMLInputElement.webkitEntries - Web APIs
The array can only contain directories if the webkitdirectory property is true. ...
...omeday. Syntax var entries = HTMLInputElement.webkitEntries; Value An array of objects based on FileSystemEntry, each representing one file which is selected in the <input> element. More specifically, files are represented by FileSystemFileEntry objects, and, if they're allowed, directories are represented by FileSystemDirectoryEntry objects. Example This example shows how to create a file selection <input> element and process the selected files. HTML <input id="files" type="file" multiple> JavaScript document.getElementById("files").addEventListener("change", function(event) { event.target.webkitEntries.forEach(function(entry) { /* do stuff with the entry */ }); }); Each time a change event occurs, this code iterates over the selected files, obtaining their FileSystemEntry-bas...
HTMLSelectElement - Web APIs
from the options collection for this select element. HTMLSelectElement.reportValidity() This method reports the problems with the constraints on the element, if any, to the user. If there are problems, it fires a cancelable invalid event at the element, and returns false; if there are no problems, it returns true. HTMLSelectElement.setCustomValidity() Sets the custom validity message for the selection element to the specified message. Use the empty string to indicate that the element does not have a custom validity error. Events Listen to these events using addEventListener() or by assigning an event listener to the oneventname property of this interface: input event Fires when the value of an <input>, <select>, or <textarea> element has been changed. Example Get information about th...
...This will tell you when the value changes, and you can then update anything you need to. See the example provided in the documentation for the change event for details. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLSelectElement' in that specification. Living Standa...
PublicKeyCredentialCreationOptions - Web APIs
aller is willing to wait for the creation operation to complete. This hint may be overridden by the browser. PublicKeyCredentialCreationOptions.excludeCredentials Optional An Array of descriptors for existing credentials. This is provided by the relying party to avoid creating new public key credentials for an existing user who already have some. PublicKeyCredentialCreationOptions.authenticatorSelection Optional An object whose properties are criteria used to filter out the potential authenticators for the creation operation. PublicKeyCredentialCreationOptions.attestation Optional A String which indicates how the attestation (for the authenticator's origin) should be transported. PublicKeyCredentialCreationOptions.extensions Optional An object with several client extensions' inputs. Those e...
...{ type: "public-key", alg: cose_alg_ECDSA_w_SHA256, }], // Timeout after 1 minute timeout: 60000, // Do not send the authenticator's origin attestation attestation: "none", extensions: { uvm: true, exts: true }, // Filter out authenticators which are bound to the device authenticatorSelection:{ authenticatorAttachment: "cross-platform", requireResidentKey: true, userVerification: "preferred" }, // Exclude already existing credentials for the user excludeCredentials: [ { type: "public-key", // the id for john.doe@example.com id : new Uint8Array(26) /* this actually is given by the serve...
Range.selectNodeContents() - Web APIs
deContents(referenceNode); Parameters referenceNode The Node whose contents will be selected within a Range. Example range = document.createRange(); referenceNode = document.getElementsByTagName("div")[0]; range.selectNodeContents(referenceNode); Live sample This example lets the user select and deselect a paragraph with buttons. Document.createRange(), Range.selectNodeContents(), and Selection.addRange() are used to select the content. Window.getSelection() and Selection.removeAllRanges() are used to deselect it. HTML <p id="p"><b>Use the buttons below</b> to select or deselect the contents of this paragraph.</p> <button id="select-button">Select paragraph</button> <button id="deselect-button">Deselect paragraph</button> JavaScript const p = document.getElementById('p'); const sel...
...the contents of this paragraph.</p> <button id="select-button">Select paragraph</button> <button id="deselect-button">Deselect paragraph</button> JavaScript const p = document.getElementById('p'); const selectButton = document.getElementById('select-button'); const deselectButton = document.getElementById('deselect-button'); selectButton.addEventListener('click', e => { // Clear any current selection const selection = window.getSelection(); selection.removeAllRanges(); // Select paragraph const range = document.createRange(); range.selectNodeContents(p); selection.addRange(range); }); deselectButton.addEventListener('click', e => { const selection = window.getSelection(); selection.removeAllRanges(); }); Result Specifications Specification Status Comment ...
SVGGraphicsElement: copy event - Web APIs
The copy event fires on SVGGraphicsElements when the user initiates a copy action through the browser's user interface. Bubbles Yes Cancelable Yes Interface ClipboardEvent Event handler property oncopy The event's default action is to copy the selection (if any) to the clipboard. A handler for this event can modify the clipboard contents by calling setData(format, data) on the event's ClipboardEvent.clipboardData property, and cancelling the event's default action using event.preventDefault(). However, the handler cannot read the clipboard data. It's possible to construct and dispatch a synthetic copy event, but this will not affect the system clipboard. Example HTML <?xml version="1.0" encoding="UTF-8"?> <svg viewBox="0 0 100 30" widt...
... Clipboard API and events Working Draft Initial definition ...
SVGGraphicsElement: cut event - Web APIs
sElement when the user has initiated a "cut" action through the browser's user interface. If the user attempts a cut action on uneditable content, the cut event still fires but the event object contains no data. Bubbles Yes Cancelable Yes Interface ClipboardEvent Event handler property oncut The event's default action is to copy the current selection (if any) to the system clipboard and remove it from the document. A handler for this event can modify the clipboard contents by calling setData(format, data) on the event's ClipboardEvent.clipboardData property, and cancelling the default action using event.preventDefault(). Note though that cancelling the default action will also prevent the document from being updated. So an event handler wh...
...ipboard contents by calling setData(format, data) on the event's ClipboardEvent.clipboardData property, and cancelling the default action using event.preventDefault(). Note though that cancelling the default action will also prevent the document from being updated. So an event handler which wants to emulate the default action for "cut" while modifying the clipboard must also manually remove the selection from the document. The handler cannot read the clipboard data. It's possible to construct and dispatch a synthetic cut event, but this will not affect the system clipboard or the document's contents. Specifications Specification Status Comment Scalable Vector Graphics (SVG) 2 Candidate Recommendation Definition that the clipboard events apply to SVG elements. ...
Window - Web APIs
Web › API › Window
. Window.find() Searches for a given string in a window. Window.focus() Sets focus on the current window. Window.getComputedStyle() Gets computed style for the specified element. Computed style indicates the computed values of all CSS properties of the element. Window.getDefaultComputedStyle() Gets default computed style for the specified element, ignoring author stylesheets. Window.getSelection() Returns the selection object representing the selected item(s). Window.matchMedia() Returns a MediaQueryList object representing the specified media query string. Window.maximize() FIXME: NeedsContents Window.minimize() (top-level XUL windows only) Minimizes the window. Window.moveBy() Moves the current window by a specified amount. Window.moveTo() Moves the window to the specified c...
...e Called continuously as you are resizing the window. GlobalEventHandlers.onscroll Called when the scroll bar is moved via ANY means. If the resource fully fits in the window, then this event cannot be invoked GlobalEventHandlers.onwheel Called when the mouse wheel is rotated around any axis GlobalEventHandlers.onselect Called after text in an input field is selected GlobalEventHandlers.onselectionchange Is an EventHandler representing the code to be called when the selectionchange event is raised. WindowEventHandlers.onstorage Called when there is a change in session storage or local storage. See storage event GlobalEventHandlers.onsubmit Called when a form is submitted WindowEventHandlers.onunhandledrejection An event handler for unhandled Promise rejection events. WindowEventHa...
ARIA Test Cases - Accessibility
AT Firefox IE Opera Safari JAWS 9 - - n/a n/a JAWS 10 Fail. Label and current content as well as role are spoken, also when typing in a new value, that gets reflected. But when dropping down the lists of states in either example, after the second or so list item, JAWS turns off Forms Mode, and the user has to turn off V Cursor to be able to make selections or tab to anything useful. - - - VoiceOver (Leopard) n/a n/a - fail Window-Eyes - - - - NVDA - n/a - - Zoom (Leopard) pass n/a pass pass ZoomText - - - - Orca - - - - Datepicker Testcases: Datepicker Example Expected AT Behavior: Markup used: Notes...
...Z) Screen reader should announce the label and role of the listbox when it gains focus. If an item is focused within the list, this should be announced next, followed by an indication of this item's position within the list if the screen reader supports this in other lists as well. As focus moves within the list, the screen reader should announce the relevant list items. ...
ARIA: table role - Accessibility
e="cell">term</span> <span role="cell">dt</span> </div> </div> </div> Description An element with role="table" is a static tabular structure with rows containing cells. The cells are not focusable or selectable, though widgets within individual cells of the table can be interactive. Using a native HTML table element whenever possible is strongly encouraged. If a table maintains a selection state, has two-dimensional navigation, or allows the user to rearrange cell order use grid or treegrid instead. To create an ARIA table, add role="table" to the container element. Within that container, each row has role="row" set and contains child cells. Each cell has a role of either columnheader, rowheader, or simply cell. Rows can be children of the table or within a rowgroup. The table c...
...tiple rows or multiple columns, then aria-rowspan or aria-colspan should be included as well. Realize, it is much simpler to simply use the <table> element, along with all the related semantic elements and attributes that are all supported by all assistive technologies. To create an interactive widget that has a tabular structure, use the grid pattern instead. If the interaction provides for the selection state of individual cells, if left to right and top to bottom navigation is provided, or if the user interface allows the rearranging of cell order or otherwise changing individual cell order such as through drag and drop, use grid or treegrid instead. Note: Using a native HTML table element whenever possible is strongly encouraged. Associated WAI-ARIA roles, states, and properties role="r...
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
, selected, selectable, visible, protected (for passwords), checked, etc. [important] get_accHelp: Get context sensitive help for the IAccessible. get_accHelpTopic: We don't use this, it's only if the Windows help system is used. get_accKeyboardShortcut: What is the keyboard shortcut for this IAccessible (underlined alt+combo mnemonic) get_accFocus: Which child is focused? [important] get_accSelection: Which children of this item are selected? get_accDefaultAction: Get a description or name of the default action for this component, such as "jump" for links. accSelect: Select the item associated with this IAccessible. [important] accLocation: Get the x,y coordinates, and the height and width of this IAccessible node. [important] accNavigate: Navigate to the first/last child, previous/next s...
... causes assistive technology crashes] EVENT_OBJECT_DESTROY [don't implement, watching system generated versions of this event causes assistive technology crashes] EVENT_OBJECT_SHOW [can be important, depending on project] EVENT_OBJECT_HIDE [can be important, depending on project] EVENT_OBJECT_REORDER [important for mutating docs] EVENT_OBJECT_FOCUS [important] EVENT_OBJECT_SELECTION [important] EVENT_OBJECT_SELECTIONADD [important for multiple selection] EVENT_OBJECT_SELECTIONREMOVE [important for multiple selection] EVENT_OBJECT_SELECTIONWITHIN [important for multiple selection] EVENT_OBJECT_STATECHANGE [important for checkboxes and radio buttons] EVENT_OBJECT_LOCATIONCHANGE EVENT_OBJECT_NAMECHANGE EVENT_OBJECT_DESCRIPTIONCHANGE EVENT_OBJECT_...
CSS selectors - CSS: Cascading Style Sheets
second element directly follows the first, and both share the same parent. Syntax: A + B Example: h2 + p will match all <p> elements that directly follow an <h2>. Column combinator The || combinator selects nodes which belong to a column. Syntax: A || B Example: col || td will match all <td> elements that belong to the scope of the <col>. Pseudo Pseudo classes The : pseudo allow the selection of elements based on state information that is not contained in the document tree. Example: a:visited will match all <a> elements that have been visited by the user. Pseudo elements The :: pseudo represent entities that are not included in HTML. Example: p::first-line will match the first line of all <p> elements. Specifications Specification Status Comment Sele...
...first-line will match the first line of all <p> elements. Specifications Specification Status Comment Selectors Level 4 Working Draft Added the || column combinator, grid structural selectors, logical combinators, location, time-demensional, resource state, linguistic and UI pseudo-classes, modifier for ASCII case-sensitive and case-insensitive attribute value selection. Selectors Level 3 Recommendation Added the ~ general sibling combinator and tree-structural pseudo-classes. Made pseudo-elements use a :: double-colon prefix. Additional attribute selectors CSS Level 2 (Revision 1) Recommendation Added the > child and + adjacent sibling combinators. Added the universal and attribute selectors. CSS Level 1 Recomme...
<image> - CSS: Cascading Style Sheets
Web › CSS › image
ype represents a two-dimensional image. Syntax The <image> data type can be represented with any of the following: An image denoted by the <url> data type A <gradient> data type A part of the webpage, defined by the element() function An image, image fragment or solid patch of color, defined by the image() function A blending of two or more images defined by the cross-fade() function. A selection of images chosed based on resolution defined by the image-set() function. Description CSS can handle the following kinds of images: Images with intrinsic dimensions (a natural size), like a JPEG, PNG, or other raster format. Images with multiple intrinsic dimensions, existing in multiple versions inside a single file, like some .ico formats. (In this case, the intrinsic dimensions will be ...
... image, otherwise a solid red swatch. If language is rtl, the image will be horizontally flipped. */ cross-fade(20% url(twenty.png), url(eighty.png)) /* cross faded images, with twenty being 20% opaque and eighty being 80% opaque. */ image-set('test.jpg' 1x, 'test-2x.jpg' 2x) /* a selection of images with varying resolutions */ Invalid images nourl.jpg /* An image file must be defined using the url() function. */ url(report.pdf) /* A file pointed to by the url() function must be an image. */ element(#fakeid) /* An element ID must be an existing ID on the page. */ image(z.jpg#xy=0,0) /* The spatial fragment must be written in the format of xywh=#,#,#,# */ image...
user-select - CSS: Cascading Style Sheets
es it behave like it is inherited most of the time. WebKit/Chromium-based browsers do implement the property as inherited, which violates the behavior described in the spec, and this will bring some issues. Until now, Chromium chooses to fix the issues, make the final behavior meets the specifications. Syntax none The text of the element and its sub-elements is not selectable. Note that the Selection object can contain these elements. auto The used value of auto is determined as follows: On the ::before and ::after pseudo elements, the used value is none If the element is an editable element, the used value is contain Otherwise, if the used value of user-select on the parent of this element is all, the used value is all Otherwise, if the used value of user-select on the parent ...
...ement, the used value is contain Otherwise, if the used value of user-select on the parent of this element is all, the used value is all Otherwise, if the used value of user-select on the parent of this element is none, the used value is none Otherwise, the used value is text text The text can be selected by the user. all The content of the element shall be selected atomically: If a selection would contain part of the element, then the selection must contain the entire element including all its descendants. If a double-click or context-click occurred in sub-elements, the highest ancestor with this value will be selected. contain Enables selection to start within the element; however, the selection will be contained by the bounds of that element. element (IE-specific alias) Same ...
<input type="password"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › password
s) should be served over HTTPS; Many browsers now implement mechanisms to warn against insecure login forms; see Insecure passwords. Value A DOMString representing a password, or empty Events change and input Supported Common Attributes autocomplete, inputmode, maxlength, minlength, pattern, placeholder, readonly, required, and size IDL attributes selectionStart, selectionEnd, selectionDirection, and value Methods select(), setRangeText(), and setSelectionRange() Value The value attribute contains a DOMString whose value is the current contents of the text editing control being used to enter the password. If the user hasn't entered anything yet, this value is an empty string (""). If the required property is specified, then the p...
...al entry controls, you can use the select() method to select all the text in the password field. HTML <label for="userPassword">Password: </label> <input id="userPassword" type="password" size="12"> <button id="selectAll">Select All</button> JavaScript document.getElementById("selectAll").onclick = function() { document.getElementById("userPassword").select(); } Result You can also use selectionStart and selectionEnd to get (or set) what range of characters in the control are currently selected, and selectionDirection to know which direction selection occurred in (or will be extended in, depending on your platform; see its documentation for an explanation). However, given that the text is obscured, the usefulness of these is somewhat limited. Validation If your application has characte...
<input type="tel"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › tel
and handling of phone numbers more convenient. Note: Browsers that don't support type tel fall back to being a standard text input. Value A DOMString representing a telephone number, or empty Events change and input Supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, and size IDL attributes list, selectionStart, selectionEnd, selectionDirection, and value Methods select(), setRangeText(), setSelectionRange() Value The <input> element's value attribute contains a DOMString that either represents a telephone number or is an empty string (""). Additional attributes In addition to the attributes that operate on all <input> elements regardless of their type, telephone number inputs...
... this is typically presented as a popup or drop-down menu containing the suggestions. While the specific user experience may vary from one browser to another, typically clicking in the edit box presents a drop-down of the suggested email addresses. Then, as the user types, the list is adjusted to show only filtered matching values. Each typed character narrows down the list until the user makes a selection or types a custom value. Here's a screenshot of what that might look like: Validation As we've touched on before, it's quite difficult to provide a one-size-fits-all client-side validation solution for phone numbers. So what can we do? Let's consider some options. Important: HTML form validation is not a substitute for server-side scripts that ensure the entered data is in the proper forma...
Assertions - JavaScript
/ That is, it matches anything that is not enclosed in the brackets. ...
...A = fruits.filter(fruit => /^[^A]/.test(fruit)); console.log(fruitsStartsWithNotA); // [ 'Watermelon', 'Orange', 'Strawberry' ] Matching a word boundary let fruitsWithDescription = ["Red apple", "Orange orange", "Green Avocado"]; // Select descriptions that contains 'en' or 'ed' words endings: let enEdSelection = fruitsWithDescription.filter(descr => /(en|ed)\b/.test(descr)); console.log(enEdSelection); // [ 'Red apple', 'Green Avocado' ] Lookahead assertion // JS Lookahead assertion x(?=y) let regex = /First(?= test)/g; console.log('First test'.match(regex)); // [ 'First' ] console.log('First peach'.match(regex)); // null console.log('This is a First test in a year.'.match(regex)); // [ 'First' ] console.log('This is a First peach in a month.'.match(regex)); // null Basic negative looka...
Media container formats (file types) - Web media technologies
If you have any specific encoding requirements, make sure the container you choose supports the appropriate codecs. If you want your media to be in a non-proprietary, open format, consider using one of the open container formats such as FLAC (for audio) or WebM (for video). If for any reason you are only able to provide media in a single format, choose a format that's available on the broadest selection of devices and browsers, such as MP3 (for audio) or MP4 (for video and/or audio). If your media is audio-only, choosing an audio-only container format likely makes sense. Now that the patents have all expired, MP3 is a widely supported and good choice. WAVE is good but uncompressed, so be aware of that before using it for large audio samples. FLAC is a very good choice, due to its lossless compr...
...ortunately, neither of the relatively major lossless compression formats (FLAC and ALAC) are universally supported. FLAC is the more broadly supported of the two, but is not supported by macOS without additional software installed, and is not supported at all on iOS. If you need to offer lossless audio, you may need to provide both FLAC and ALAC to get close to universal compatibility. Container selection advice The tables below offer suggested containers to use in various scenarios. These are just suggestions. Be sure to consider the needs of your application and your organization before selecting a container format. Audio-only files If you need... Consider using this container format Compressed files for general-purpose playback MP3 (MPEG-1 Audio Layer III) ...
panel - Archive of obsolete content
d hidden using its show() and hide() methods. Once a panel is no longer needed it can be deactivated using destroy(). The content of a panel is specified using the contentURL option. An add-on can interact with the content of a panel using content scripts which it supplies in the contentScript and/or contentScriptFile options. For example, a content script could create a menu and send the user's selection to the add-on. Methods destroy() Destroys the panel, unloading any content that was loaded in it. Once destroyed, the panel can no longer be used. If you just want to hide the panel and might show it later, use hide instead. postMessage(message) Sends a message to the content scripts. Parameters message : value The message to send. Must be stringifiable to JSON. show(options) Displays t...
High-Level APIs - Archive of obsolete content
panel Creates transient dialogs to implement part of an add-on's user interface. passwords Interact with Firefox's Password Manager to add, retrieve and remove stored credentials. private-browsing Check whether a given object is private, so an add-on can respect private browsing querystring Utility functions for working with query strings. request Make simple network requests. selection Get and set text and HTML selections in the current web page. self Access data that is bundled with the add-on, and add-on metadata. simple-prefs Store preferences across application restarts. simple-storage Lets an add-on store data so that it's retained across Firefox restarts. system Query the add-on's environment and access arguments passed to it. tabs Open, manipulate, and access ...
Getting Started (jpm) - Archive of obsolete content
d-on's directory: jpm xpi You should see a message like: JPM info Successfully created xpi at /path/to/my-addon/@my-addon-0.0.1.xpi To test that this worked, try installing the XPI file in your own Firefox installation. You can do this by pressing the Ctrl+O key combination (Cmd+O on Mac) from within Firefox, or selecting the "Open" item from Firefox's "File" menu. This will bring up a file selection dialog: navigate to the "@my-addon.xpi" file, open it and follow the prompts to install the add-on. Note that Firefox by default requires add-ons, even locally developed ones, to be signed. After installation they'll show up disabled in the list of installed add-ons, noting the missing signature. During development, or if you don't plan to distribute, you can open about:config and set xpinstall.
Getting started (cfx) - Archive of obsolete content
xecute the command cfx xpi from the add-on's directory: cfx xpi You should see a message like: Exporting extension to my-addon.xpi. To test that this worked, try installing the XPI file in your own Firefox installation. You can do this by pressing the Ctrl+O key combination (Cmd+O on Mac) from within Firefox, or selecting the "Open" item from Firefox's "File" menu. This will bring up a file selection dialog; navigate to the "my-addon.xpi" file, open it and follow the prompts to install the add-on. Summary In this tutorial we've built and packaged an add-on using three commands: cfx init to initialize an empty add-on template cfx run to run a new instance of Firefox with the add-on installed, so we can try it out cfx xpi to package the add-on into an XPI file for distribution These ar...
Developing for Firefox Mobile - Archive of obsolete content
ontext-menu Not supported hotkeys Supported indexed-db Supported l10n Supported notifications Supported page-mod Supported page-worker Supported panel Not supported passwords Supported private-browsing Not supported querystring Supported request Supported selection Not supported self Supported simple-prefs Supported simple-storage Supported system Supported tabs Supported timers Supported ui Not supported url Supported widget Not supported windows Supported Low-Level APIs /loader Supported chrome Supporte...
Appendix: What you should know about open-source software licenses - Archive of obsolete content
gram is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Caveats on license selection Be aware of the following points whether you're modifying existing source code or selecting a license for the first time. You cannot rewrite an existing license If you select any existing OSS license and rewrite any part of it on your own, you should not use the same license name as the original. This would be a source of confusion for users and may be prohibited by the terms of the license. ...
Adding Events and Commands - Archive of obsolete content
important and commonly used events in XUL. It's very useful because it represents the most common action for input controls such as menu items, buttons and checkboxes. For a button, it represents the action of the user clicking on it, or focusing it with the keyboard and then pressing the ENTER key. It's an abstraction of the main way to interact with a control element. onselect. Fired when the selection in a tree or listbox changes. onclick. Triggered when the user clicks on the element, including right clicks. You shouldn't normally use this event to trigger actions on input controls such as buttons. Use oncommand instead. onfocus and onblur. Used when an element receives or loses focus when the user is navigating with the keyboard. You can combine these with -moz-user-focus to add custom foc...
Adding sidebars - Archive of obsolete content
lo-tabbox"> <tabs> <tab label="&xulschoolhello.mainTab.label;" /> <tab label="&xulschoolhello.advancedTab.label;" /> </tabs> <tabpanels> <tabpanel> <!-- Content for the main panel. --> </tabpanel> <tabpanel> <!-- Content for the advanced panel. --> </tabpanel> </tabpanels> </tabbox> The first tab is selected by default, but you can change the default selection by setting the selected attribute to true in the << XUL Reference << element. A tabpanel can hold any kind of content. You should take into account that the whole tab box is going to be as large as the tab strip on the top and the content of the largest panel. You should try to balance the content in the tab panels so that you don't end up with uneven and mostly empty panels. Decks and stacks ...
Setting up an extension development environment - Archive of obsolete content
hieve our task of creating just a developer profile, we will start the application with the parameters: /path/to/Firefox -no-remote -P ProfileName Without these parameters, the default behavior of your Mozilla applications is to only open the everyday user profile: named default. As we are specifically defining the user profile dev, If you don't have the dev profile already created, the profile selection window opens, where you can create it. In the following example, the described command starts a new instance of Firefox, with a profile called dev; even if an instance of Firefox is already running. On Ubuntu (and many other Linux distributions): /usr/bin/firefox -no-remote -P dev On other distributions of Linux/Unix: /usr/local/bin/firefox -no-remote -P dev On MacOS Mavericks (10.9) and n...
Tabbed browser - Archive of obsolete content
hat's been pinned } // Initialization var container = gBrowser.tabContainer; container.addEventListener("TabPinned", exampleTabPinned, false); container.addEventListener("TabUnpinned", exampleTabUnpinned, false); // When no longer needed container.removeEventListener("TabPinned", exampleTabPinned, false); container.removeEventListener("TabUnpinned", exampleTabUnpinned, false); Detecting tab selection The following code allows you to detect when a new tab is selected in the browser: function exampleTabSelected(event) { var browser = gBrowser.selectedBrowser; // browser is the XUL element of the browser that's just been selected } // During initialisation var container = gBrowser.tabContainer; container.addEventListener("TabSelect", exampleTabSelected, false); // When no longer needed c...
Adding preferences to an extension - Archive of obsolete content
automatically. Now that we're monitoring the preferences, we can set up to watch the stock information and display it in the status bar panel. The first thing we need to do is get the currently configured stock symbol to watch from the preferences. To do so, we call the nsIPrefBranch.getCharPref() method, specifying that we want the preference named "symbol", which is where we store the user's selection for the stock to watch. We forcibly convert the symbol to upper-case since that's the way stock symbols are normally displayed. Next, we call our own refreshInformation() method to immediately fetch and display the current information about the stock the extension is configured to monitor. We'll look at the details of how this method works later. The last thing the startup() method does is to c...
CSS3 - Archive of obsolete content
on to describe the directionality of the image (rtl or ltr), allowing for bidi-sensitive images. the image-orientation property by adding the keyword from-image, allowing to follow EXIF data stored into images to be considered. Adds: the image-set() functional notation to allow the definition to equivalent images at different resolution allowing for resolution-negotiated selection of images. the element() functional notation allowing the use of part of the page as image. the cross-fade() functional notation allowing to refer to intermediate images when transitioning between two images and defines the interpolation between two images. the conic-gradient() and repeating-conic-gradient() functional notation describing a new type of gradient. the image-rend...
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
they must click somewhere and wait for the response page. The inner-browsing model is able to provide users with automatic spell check without leaving the page being edited, a similar experience to a word processor application. The incorrect words are highlighted while the user is typing. Forms with Nested Selects In today's web pages it is common to see selects where content is dependent on the selection made on another select. For example, imagine a web form where users have to choose their city, by first selecting country then state. For example, imagine a web form where users have to choose their city, by first selecting country then state. Updating the selects without refreshing the page provides a better user experience and bandwidth savings. Webmail Application The flexibility to easily acc...
List of Mozilla-Based Applications - Archive of obsolete content
widgets and event handling. python-hulahop is required Python-Hulahop a Python GTK Widget Uses embedded XULrunner, providing full access to nsI DOM and all other XULrunner interfaces, in a GTK window. It's possible to create your own python web browser with hulahop, and much much more besides. ...
Creating a Mozilla Extension - Archive of obsolete content
e old versions of Mozilla Suite (currently SeaMonkey). See Building an Extension for an up-to-date tutorial (it focuses on Firefox, but is also applicable to other new applications). A Mozilla extension is an installable enhancement to the Mozilla browser that provides additional functionality (for example Linky, which adds an item to the context menu for opening multiple links in a document or selection). This tutorial walks you through the process of building a Mozilla extension that adds an icon to Mozilla's status bar showing the current status of the Mozilla source code (i.e. whether or not the latest version of the code is compiling successfully and passing tests). The extension will access Tinderbox, mozilla.org's webtool for tracking source code status, to get the status of the code. Com...
Block and Line Layout Cheat Sheet - Archive of obsolete content
_LOADED_IMAGES NS_FRAME_OUT_OF_FLOW NS_FRAME_SELECTED_CONTENT NS_FRAME_IS_DIRTY NS_FRAME_IS_UNFLOWABLE An unflowable frame is an error condition; for example, due to system limitations. Currently, the only way to get an unflowable frame is to have a frame tree that is "too deep". (See nsFrame::IsFrameTreeTooDeep().) NS_FRAME_HAS_DIRTY_CHILDREN NS_FRAME_HAS_VIEW NS_FRAME_INDEPENDENT_SELECTION NS_FRAME_IS_SPECIAL nsBlockFrame mFlags These flags are the private flags that are meaningful to block frames. NS_BLOCK_SHRINK_WRAP Causes the block to "shrink-wrap" around its content. This means the block will determine its children's width and make its content area that wide. Finally, it will add padding and border to determine the final width. Is this where the "tending towards zer...
Documentation for BiDi Mozilla - Archive of obsolete content
m left to right or right-to-left text from right to left. In some circumstances, even on a platform with Bidi capability, the layout code has to reverse text fragments or to allow for the fact that they are displayed in reverse. In general, this happens whenever we are dealing with less than a whole frame. Examples of this are in nsTextFrame::PaintTextSlowly; nsTextFrame::PaintUnicodeText when a selection is displayed; nsTextFrame::GetPosition; nsTextFrame::GetPointFromOffset. Text in Visual mode must also be reversed before display on a Bidi platform. Text fields and Composer The specification of the Bidi changes to composer was posted in the editor and i18n newsgroups, and responses there were taken into account. The implementation is mostly in layout code, especially in nsSelection.cpp and ns...
Layout System Overview - Archive of obsolete content
pulled out and executed. It is also important to see the Presentation Shell as an observer of many kinds of events in the system. For example, the Presentation Shell receives notifications of document load events, which are used to trigger updates to the formatting of the frames in some cases. The Presentation Shell also receives notifications about changes in cursor and focus states, whereby the selection and caret updates can be made visible. There are dozens of other data objects managed by the Presentation Shell and Presentation Context, all necessary for the internal implementation. These data members and their roles will be discussed in the Presentation Shell design documents. For this overview, the Frames, Style Set, and Reflow Queue are the most important high-level parts of the Presentatio...
UI - Archive of obsolete content
ing entries and access elements into the toolbar Panel A movable, expandable, and custom styled content element to display jetpack content Tabs Adding events and interacting with browser tabs and their contained documents Statusbar Low-level functions and basic calls Notifications A system for alerting users via provided UI mechanisms Selection Interacting with user-selected content Window Mitigates and eases interactions between different browser windows ...
Proxy UI - Archive of obsolete content
ed that has the following items: Online (Proxy: None) Online (Proxy: Auto Discover) Online (Proxy: Auto URL) Online (Proxy: Manual) --- Proxy Configuration... <h7 name="Details">Details</h7> The menu should display the current proxy mode with a dot. The modes that can have an empty configuration (Auto URL and Manual) will be disabled if the prefs are blank. Selecting an enabled item sets the menu selection and the proxy mode (network.proxy.type) Selecting a disabled item is not allowed. Selecting "Proxy Configuration..." opens the Preferences panel to "Advanced > Proxies" (TBdescribed: changing the prefs values). Unfiled bug: changing proxy mode does not update the menu. Mouseover When online, the tooltip will include the current proxy mode: Code http://mxr.mozilla.org/seamonkey/sou...ityOverlay.xu...
Install Wizards (aka: Stub Installers) - Archive of obsolete content
kages. It then proceeds to extract the XPInstall engine and feed it the downloaded software packages to install.) The stub installer code includes: the logic to display the install wizard widgets and dialogs the code that reads in the configuration file (config.ini) and dynamically installs from the net or from local xpi modules found next to the installer binary the code that processes user selections the code that calls the XPInstall engine through xpistub the libxpnet code that is statically linked in The stub installers are written in code native to the platform using native widget toolkits including the windows API for windows, the mac toolbox for the mac, and gtk for the unix version. To learn more about the three platform-specific versions of the stub installer follow the links below...
label - Archive of obsolete content
<< XUL Reference home 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. See also treeitem.label, <label> element Examples in JavaScript <label value="Whaw" id="the-big-label" command="the-big-button"/> <button id="the-big-button" label="Click me" oncommand="alert(document.getElementById('the-big-label').value)"/> <label id="myLabel" value="My label"/> <button label="Click me" oncommand="document.getElementById('myLabel').setAttribute('value','Value changed');" /> <checkbox label="my Checkbox" id="myCheckboX"/> <button label="Another click" oncommand="document.getElementById('myCheckboX'...
menuactive - Archive of obsolete content
...
selected - Archive of obsolete content
<< XUL Reference home 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. See also visuallyselected ...
seltype - Archive of obsolete content
<< XUL Reference home seltype Type: one of the values below Used to indicate whether multiple selection is allowed. single Only one row may be selected at a time. (Default 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. ...
tree.onselect - Archive of obsolete content
<< XUL Reference home onselect Type: script code This event is sent to a tree when a row is selected, or whenever the selection changes. The user can select multiple rows by holding down Shift or Control and clicking on a row. The onselect event will be sent for each item added to or removed from the selection. See the tree selection page on the tutorial for more information. ...
visuallyselected - Archive of obsolete content
<< XUL Reference home visuallyselected Type: boolean New in Firefox 40. Indicates that a tab is selected. The visuallyselected attribute is set asynchronously, once the browser has switched to the selected tab. If your code needs to apply some styling to the currently selected tab, this is the attribute you should use from Firefox 40 onwards. This value is read-only. To change the selection, set either the selectedIndex or selectedItem property of the containing element. ...
XUL Events - Archive of obsolete content
of a checkbox. For user changes, the CheckboxStateChange event is sent before the command event. The CheckboxStateChange event does not bubble. RadioStateChange This event is sent when a radio button is selected, either by the user or a script. Normally, you would use the command event to listen to radio button selection changes, however, the command event is only sent when the user changes the selected radio button, while the RadioStateChange event is also sent when a script modifies the selection. For user changes, the RadioStateChange event is sent before the command event. The RadioStateChange event bubbles so you can also attach the event handler to the enclosing radiogroup. ...
Menus - Archive of obsolete content
Send page to device context-sendpage Send page in an email context-viewbgimage Views a background image context-undo Undo Editable Text context-cut Cuts to clipboard Editable Text context-copy Copies to clipboard context-paste Pastes from clipboard Editable Text context-delete Deletes selection Editable Text context-selectall Selects all context-searchselect Selected text is searched context-viewpartialsource-selection Views the selection source Selection context-viewpartialsource-mathml Views the MathML source MathML context-viewsource Views the source context-viewinfo Views the page info ...
goDown - Archive of obsolete content
Archive › Mozilla › XUL › Method › goDown
...
goUp - Archive of obsolete content
Archive › Mozilla › XUL › Method › goUp
...
moveByOffset - Archive of obsolete content
<< XUL Reference home moveByOffset( offset , isSelecting, isSelectingRange) Return type: no return value If offset is positive, adjusts the focused item forward by that many items. If offset is negative, adjusts the focused item backward by that many items. If isSelecting is true, then the selection is also adjusted. If isSelectingRange is also true, then the new item is selected in addition to any currently selected items. If isSelectingRange is false, any existing selection is cleared. Items that are hidden are skipped. ...
selectAll - Archive of obsolete content
...
selectItem - Archive of obsolete content
...
OpenClose - Archive of obsolete content
d menu in a popupshown event listener. See The popupshown event for an example of how to do this. a menu in an unprivileged content window (such as a web page) can only open a popup while its window is focused, and it is in the currently active tab. That means that a document in a background tab cannot open a menu or popup. Closing Menus Menus will close automatically once the user has made a selection from the menu. When an menu item is selected, it fires a command event so that code may be used to perform an action. The user may cancel selecting a command from a menu by pressing the Escape key. This will close a single menu, but if this menu has a parent menu, the parent menu will remain open. A user may also cancel selecting from a menu by clicking outside the menu. In this case, not only wi...
PopupEvents - Archive of obsolete content
entDefault method. This way, the popup will not be closed. Usually, you should not do this. If you wanted to ensure that a value was entered for instance, it is much better to rework the UI such that the code can handle no value being entered instead. Otherwise, the user will be distracted with a popup that they cannot close. You also cannot cancel the hiding of a menupopup when a user has made a selection from a menu, as it is already too late to do so. In this situation the command event has already been sent to the selected menuitem and the operation already carried out. This is one special case in which the popuphiding event is fired after the popup has been removed from the screen. The reason for this is if, as is quite common, the menu item's action is to open a modal dialog. Here, the menu w...
currentItem - Archive of obsolete content
...
listbox.currentIndex - Archive of obsolete content
<< XUL Reference currentIndex Type: integer Set to the index of the currently focused item in the list. If no item is focused, the value will be -1. (or, on some platforms, typeof(listboxcurrentIndex) will be undefined) In a single selection list, the current index will always be the same as the selected index. In a multiple selection list, the currently focused row may be modified by the user without changing the selection by pressing the Control key and pressing the cursor keys to navigate. ...
selstyle - Archive of obsolete content
...
Property - Archive of obsolete content
preferences priority radioGroup readonly readOnly ref resource resultsPopup scrollBoxObject scrollIncrement scrollHeight scrollWidth searchButton searchCount searchLabel searchParam searchSessions second secondLeadingZero securityUI selected selectedBrowser selectedCount selectedIndex selectedItem selectedItems selectedPanel selectedTab selectionEnd selectionStart selstyle selType sessionCount sessionHistory showCommentColumn showPopup size smoothScroll spinButtons src state statusbar statusText stringBundle strings style subject suppressOnSelect tabContainer tabIndex tabs tabScrolling tabpanels tag textLength textValue timeout title toolbarName toolbarset tooltip tooltipTe...
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
for the simple scripts in this tutorial. If you choose to use this setting, either ignore the warnings that it generates, or change the coding style to keep it quiet. Programming the button To make your button do something useful, edit the file button.js that you created in step 8. Remove the line: alert("Just testing") and replace it with JavaScript code that does whatever you want to do. For a selection of code samples that you can copy and paste, and customize without any knowledge of programming, see this page: Code Samples Your changes take effect when you restart the application. Adding more buttons To add another button, edit button.xul. For each toolbar, duplicate the line that specifies custom-button-1, change the new line to specify custom-button-2, and change its position attribute to p...
Custom toolbar button - Archive of obsolete content
the simple scripts in this tutorial. If you choose to use this setting, either ignore the warnings that it generates, or change the coding style to keep it quiet. Programming the button To make your button do something useful, edit the file button.js that you created in step 8. Remove the line: alert("Just testing") and replace it with JavaScript code that does whatever you want to do. For a selection of code samples that you can copy and paste, and customize without any knowledge of programming, see this page: Code Samples Your changes take effect when you restart the application. Adding more buttons To add another button, edit button.xul. For each application, duplicate the line that specifies custom-button-1, and change the new line to specify custom-button-2. Duplicate the last section...
Tree Widget Changes - Archive of obsolete content
ich may be used to restore the original order of the columns before the user moved them around. tree.columns.restoreNaturalOrder() There is also a command on the end of the tree's column picker which the user may use to restore the original column order. This will be hidden if the column redordering is disabled using enableColumnDrag="false". Some specific changes You should now get the tree selection object from the view, not the box object, meaning use tree.view.selection instead of tree.treeBoxObject.selection. Use tree.columns[1].id instead of tree.treeBoxObject.getColumnID(1) to get the id of a column, in this case column 1. Use tree.columns.getKeyColumn().index instead of tree.treeBoxObject.getKeyColumnIndex(). The nsITreeBoxObject.getPageCount() method has been renamed to make it cle...
Document Object Model - Archive of obsolete content
t we'll add it to reassure us that something would happen. function doFind(){ var meter=document.getElementById('progmeter'); meter.hidden = false; var searchtext=document.getElementById('find-text').value; alert("Searching for \"" + searchtext + "\""); } Now, with that alert box in there, we know what should happen when we click the Find button. We could add additional code to get the selections from the drop-down boxes too. XUL Element DOM Every XUL element has a set of attributes, a set of properties and a set of children. The attributes are declared in the source, for example, flex="1", is a flex attribute set to the value 1. Properties are available in JavaScript using the dot syntax. For example, element.hidden refers to the hidden property of an element. The children are t...
Introduction to RDF - Archive of obsolete content
rk title and a visited date. Think of the bookmarks as a database, which is stored as a large table with numerous fields. In the case of RDF however, the lists may be hierarchical as well. This is necessary so that we can have folders or categories of bookmarks. Each of the fields in an RDF database is a resource, each with a name associated with it. The name is described by a URI. ...
Keyboard Shortcuts - Archive of obsolete content
operties which hold the key that was pressed. The keyCode property holds the key code and may be compared to one of the constants from the key table earlier in this section. The charCode is used for printable characters and will hold the numeric Unicode character code value for the key that was pressed. Our Find files example so far : Source View Next, we'll find out how to handle focus and the selection. << PreviousNext >> ...
List Controls - Archive of obsolete content
the labels on the cells will crop themselves automatically using an ellipsis. You can use the crop attribute on the cells or items set to the value none to disable the ellipsis. Drop-down Lists Drop-down lists can be created in HTML using the select element. The user can see a single choice in a textbox and may click the arrow or some similar such button next to the textbox to make a different selection. The other choices will appear in a pop-up window. XUL has a menulist element which can be used for this purpose. It is made from a textbox with a button beside it. Its name was chosen because it pops up a menu with the choices in it. Three elements are needed to describe a drop-down box. The first is the menulist element, which creates the textbox with the button beside it. The second, menupopup...
More Tree Features - Archive of obsolete content
<< PreviousNext >> ...
RDF Datasources - Archive of obsolete content
To use them, just put the URL values above in the label attributes of the buttons or treecells. You can use NC:HistoryRoot as the value of the ref attribute. You can also use the value NC:HistoryByDate to get the history sorted into days. Using The History List Example Let's see an example of displaying the history list. We'll display the history in a tree with three columns, the...
Trees - Archive of obsolete content
Archive › Mozilla › XUL › Tutorial › Trees
row determines the content that will appear in the first column, the second treecell determines the content that will appear in the second column, and so on. The user can select the treeitems by clicking on them with the mouse, or by highlighting them with the keyboard. The user can select multiple items by holding down the Shift or Control keys and clicking additional rows. To disable multiple selection, place a seltype attribute on the tree, set to the value single. With this, the user may only select a single row at a time. Add a tree to our find files example Let's add a tree to the find files window where the results of the search would be displayed. The tree will use a content tree view. The following code should be added in place of the iframe. <tree flex="1"> <treecols> <treecol...
XBL Example - Archive of obsolete content
lpages); </constructor> Additional Features We can add some additional features as well. Some keyboard shortcuts could be used for the Previous and Next buttons, (say backspace and the Enter key). First and Last buttons could be added to go to the first and last pages. The label element could be changed to a field where the user could enter the page to go to, or a popup could be added to allow selection of the page from a menu. We could also add a border around the deck with CSS to make it look a bit nicer. The Final Code The final code is as follows: Example 2 : Source <binding id="slideshow"> <content> <xul:vbox flex="1"> <xul:deck xbl:inherits="selectedIndex" selectedIndex="0" flex="1"> <children/> </xul:deck> <xul:hbox> <xul:button xbl:inherits="la...
XUL Tutorial - Archive of obsolete content
del The Box Model Element Positioning Box Model Details Groupboxes Adding More Elements More Layout Elements Stacks and Decks Stack Positioning Tabboxes Grids Content Panels Splitters Toolbars and Menus Toolbars Simple Menu Bars More Menu Features Popup Menus Scrolling Menus Events and Scripts Adding Event Handlers More Event Handlers Keyboard Shortcuts Focus and Selection Commands Updating Commands Broadcasters and Observers Document Object Model Document Object Model Modifying a XUL Interface Manipulating Lists Box Objects XPCOM Interfaces XPCOM Examples Trees Trees More Tree Features Tree Selection Custom Tree Views Tree View Details Tree Box Objects RDF and Templates Introduction to RDF Templates Trees and Templates RDF Datasource...
Using the standard theme - Archive of obsolete content
ustom style sheets for your extensions. For this to work, you need to create an approriate directory structure, with directory names corresponding to the names of the themes you want to extend, and of course, your adapted custom style sheets. For more information on how to do this, read about theming a custom toolbar button. Note that both approaches described above work with this automatic style selection. ...
button - Archive of obsolete content
URI of the image to appear on the element. If this 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. open Type: boolean For the menu type buttons, the open attribute is set to true when the menu is open. The open attribute is not present if the menu is closed. orient Type: one of the values below Used to specify whether the children of the element are oriented horizontally or vertically. The default value depends on the element. You can also use the -moz-box-...
caption - Archive of obsolete content
URI of the image to appear on the element. If this 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. 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. Properties accessKey Type: character Gets and sets the value of the accesskey attribute. crop Type: string Gets a...
checkbox - Archive of obsolete content
src Type: URI Set this to an URI pointing to an image to appear in the checkbox. If this attribute is left out, no image appears. You can have both an image and a label. 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. 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 presses the "tab" key. Elements with ...
command - Archive of obsolete content
ly. 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. 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. oncommand Type: script code This event handler is called when the command is activated. This occurs when a user selects a menu item or presses a keyboard shortcut attached to the command. reserved Type: string This attribute applies to a command element. Setting this attribute to "true" indicates that the command is reserved for Chrome code and is not availab...
editor - Archive of obsolete content
Attributes editortype Type: one of the values below The type of editor to use. This value will be overridden depending on the content type of the document in the editor. html An HTML editor. text A plaintext editor. src Type: URI The URI o...
listcell - Archive of obsolete content
URI of the image to appear on the element. If this 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. 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, di...
listheader - Archive of obsolete content
y. 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. 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. Inherited from XUL element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, po...
menu - Archive of obsolete content
Archive › Mozilla › XUL › menu
ly. 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. 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. menuactive Type: boolean This attribute is set on an item in a menu when it is being hovered over. Typcially, the theme will use this to highlight the item. A DOMMenuItemActive event will be sent to the item when the item is hovered over, and a DOMMenuItemInactive event will be sent to the item when the selection moves away. open Type: boolean For the menu type ...
menuitem - Archive of obsolete content
te: The menuitem must have a class of menuitem-iconic for the image to appear. key Type: id Set to the id of a key element whose key shortcut is displayed in the menuitem. 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. name Type: string name Radio menuitems with the same name as put into a group. Only one menuitem in each radio group can be checked at a time. 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. tabinde...
menuseparator - Archive of obsolete content
URI of the image to appear on the element. If this 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 wi...
notification - Archive of obsolete content
URI of the image to appear on the element. If this 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. persistence Type: integer The persistence may be set to a non-zero value so that the notificationbox's removeTransientNotifications method does not remove them. This may be used to close a set of notifications as a group without affecting other notifications. priority Type: integer Numeric value that specifies the order in which the notifications appear. Shoul...
prefpane - Archive of obsolete content
e URI of the image to appear on the element. If this 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. 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 T...
radio - Archive of obsolete content
Archive › Mozilla › XUL › radio
URI of the image to appear on the element. If this 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 wi...
richlistitem - Archive of obsolete content
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. value Type: string The string attribute allows you to associate a data value with an elem...
<statusbarpanel> - Archive of obsolete content
e URI of the image to appear on the element. If this 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. Properties image Type: image URL Gets and sets the value of the image attribute. label Type: string Gets and sets the value of the label attribute. Inherited Properties align, , allowEvents, , boxObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hid...
tab - Archive of obsolete content
Archive › Mozilla › XUL › tab
URI of the image to appear on the element. If this 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. last-tab Type: boolean This attribute will be set to true for the last tab. This attribute should not be set manually, but is useful in a theme if the last tab should be styled differently. linkedpanel Type: id The id of the linked tabpanel element that will be displayed when the tab is selected. If this attribute is not used, the tab will be connected to the ...
timepicker - Archive of obsolete content
<< XUL Reference home [ Examples | Attributes | Properties | Methods | Related ] The timepicker is used to allow the user to enter a time. It contains three fields to enter the hour, minute and second. Arrow buttons next to the fields allow the values to be adjusted with the mouse. A fourth textbox appears for 12 hour clocks which allows selection of AM or PM. To specify the initial, use the value attribute set to a value of either the form HH:MM:SS or HH:MM. The value may be retrieved and changed using the value property or the dateValue property. The former specifies the time as a string of the form HH:MM:SS whereas the latter specifies the time as a Date object. In addition, the hour, minute and second properties may be used to retrieve and modify each component of the tim...
toolbarbutton - Archive of obsolete content
e URI of the image to appear on the element. If this 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. oncommand Type: script code This event handler is called when the command is activated. This occurs when a user selects a menu item or presses a keyboard shortcut attached to the command. open Type: boolean For the menu type buttons, the open attribute is set to true when the menu is open. The open attribute is not present if the menu is closed. orient ...
tooltip - Archive of obsolete content
upopup > menuitem, menupopup > menu { max-width: none; } default Type: boolean If true, the tooltip is used as the default popup for displaying tooltips in the window. 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. noautohide Type: boolean If this attribute is set to false or omitted, the tooltip will automatically disappear after a few seconds. 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. This e...
treecell - Archive of obsolete content
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 tree for this to work on treecells. 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. mode Type: one of the values below For columns that are progress meters, this determines the type of progress meter to use. none No progress meter is displayed. The cell text is displayed instead. normal The cell uses its value attribute to determine the amount of the bar that is filled in. undetermined The progressmeter is indeterminate. pro...
treecol - Archive of obsolete content
don't set a label for that column either, the header is not displayed at all. ignoreincolumnpicker Type: boolean If true, the column does not appear in the column picker. 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. primary Type: boolean If set to true, the treecol will have indentation and twisties drawn to the left of it to indicate the hierarchy level of the rows. If no column has the primary attribute set to true, the tree may still contain nested rows, although no indication will be given to the user. The attribute also controls whether the column picker allows the user to de...
wizardpage - Archive of obsolete content
Attributes description, label, next, pageid Properties next, pageid Attributes description Type: string Descriptive text to appear in addition to the dialog title. 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. next Type: id Set to the pageid of the next wizardpage after this one. When set, the page with this pageID is displayed when the Next button is pressed. This can be used to create wizards that do not have a linear sequence. If one of the pages has a next attribute, all of the pages should have one, except that last page. pageid Type: id This attribute should be se...
How to enable locale switching in a XULRunner application - Archive of obsolete content
OS locale */pref("intl.locale.matchOS", "false");/* Choose own fallback locale; later it can be overridden by the user */pref("general.useragent.locale", "en-GB"); Note that some distributions of XULRunner or Firefox don't honour the "intl.locale.matchOS" setting, so in those cases you won't be able to override the OS locale [Debian Iceweasel bug #417961]. 2. Include a XUL control for the locale selection The next step is to add a XUL control to your application which lists the available locales in the package and makes it possible for the user to select one of them. I chose a listbox with a button. Screenshot of sample locale switching control 3. Populate the XUL control with the available locales The available package locales are declared in the chrome manifest. Sample chrome/chrome.manifest ...
calICalendarView - Archive of obsolete content
attribute, it must allow for any arbitrary set of dates to be displayed. hasDisjointDates Returns false if the dates being displayed represent a continuous list, and true if certain dates in between startDate and endDate may not be displayed. selectedItem Returns a calIItemBase corresponding to the currently active item in the view. Other areas of the code may use this attribute for setting selection, editing purposes, or any other purpose. NOTE: This will likely change to selectedItems and return an array of calIItemBases in order to support selecting multiple items at once. selectedDay The currently selected day in the display. Other areas of the code will often use this as a basis for default values for new calIEvents and calITodos. Methods showDate void showDate(in calIDateTime ...
Archived Mozilla and build documentation - Archive of obsolete content
an also be independently downloaded and installed by users if they include a list of pages to which they apply. Creating a Mozilla Extension A Mozilla extension is an installable enhancement to the Mozilla browser that provides additional functionality (for example Linky, which adds an item to the context menu for opening multiple links in a document or selection). This tutorial walks you through the process of building a Mozilla extension that adds an icon to Mozilla's status bar showing the current status of the Mozilla source code (i.e. whether or not the latest version of the code is compiling successfully and passing tests). The extension will access Tinderbox, mozilla.org's webtool for tracking source code status, to get the status...
TCP/IP Security - Archive of obsolete content
st common use for transport layer protocols is securing HTTP traffic; the Transport Layer Security (TLS) protocol is usually used for this. (TLS is the standards-based version of SSL version 3. More information on TLS is available in RFC 4346, The TLS Protocol Version 1.1, available at https://www.ietf.org/rfc/rfc4346.txt. ...
CSS - Archive of obsolete content
Archive › Web › CSS
ack-color CSS property is a Microsoft extension that specifies the color of the track element of a scrollbar.-ms-text-autospaceThe -ms-text-autospace CSS property is a Microsoft extension that specifies the autospacing and narrow space width adjustment of text.-ms-touch-selectThe -ms-touch-select CSS property is a Microsoft extension that toggles the gripper visual elements that enable touch text selection.-ms-wrap-flowThe -ms-wrap-flow CSS property is a Microsoft extension that specifies how exclusions impact inline content within block-level elements.-ms-wrap-marginThe -ms-wrap-margin CSS property is a Microsoft extension that specifies a margin that offsets the inner wrap shape from other shapes.-ms-wrap-throughThe -ms-wrap-through CSS property is a Microsoft extension that specifies how content...
RFE to the XForms API - Archive of obsolete content
Archive › Web › XForms › RFE › XForms API
get via XPCOM. As an example, the nsIXFormsAccessors interface which allows a user to get/set the value of an instance node and get the state of an instance node, is exposed by the nsIXFormsDelegate interface using the accessors property. XForms DOM Put here your requirements how to improve XForms DOM API. Reflect attributes to properties For the elements that can contain the incremental or selection attributes, it makes sense to expose analogous properties. XForms functional interfaces Put here your requirements to improve existing XForms interfaces or to add a new one. Ability to get nsIXFormsAccessors for instance node We need the ability to get to the nsIXFormsAccessors interface on a node by specifying the node via an XPath expression or by specifying the instance node directly (se...
HTML: A good basis for accessibility - Learn web development
Semantic HTML doesn't take any longer to write than non-semantic (bad) markup if you do it consistently from the start of your project. Even better, semantic markup has other benefits beyond accessibility: Easier to develop with -- as mentioned above, you get some functionality for free, plus it is arguably easier to understand. Better on mobile -- semantic HTML is arg...
HTML: A good basis for accessibility - Learn web development
Semantic HTML doesn't take any longer to write than non-semantic (bad) markup if you do it consistently from the start of your project. Even better, semantic markup has other benefits beyond accessibility: Easier to develop with -- as mentioned above, you get some functionality for free, plus it is arguably easier to understand. Better on mobile -- semantic HTML is arg...
Cascade and inheritance - Learn web development
could apply to the h1. The h1 ends up being colored blue -- these rules have an identical selector and therefore carry the same specificity, so the last one in the source order wins. Specificity Specificity is how the browser decides which rule applies if multiple rules have different selectors, but could still apply to the same element. It is basically a measure of how specific a selector's selection will be: An element selector is less specific -- it will select all elements of that type that appear on a page -- so will get a lower score. A class selector is more specific -- it will select only the elements on a page that have a specific class attribute value -- so will get a higher score. Example time! Below we again have two rules that could apply to the h1. The below h1 ends up bein...
Attribute selectors - Learn web development
how to use these very useful selectors. Prerequisites: Basic computer literacy, basic software installed, basic knowledge of working with files, HTML basics (study Introduction to HTML), and an idea of how CSS works (study CSS first steps.) Objective: To learn what attribute selectors are and how to use them. Presence and value selectors These selectors enable the selection of an element based on the presence of an attribute alone (for example href), or on various different matches against the value of the attribute. Selector Example Description [attr] a[title] Matches elements with an attr attribute (whose name is the value in square brackets). [attr=value] a[href="https://example.com"] Matches elements with an attr...
Pseudo-classes and pseudo-elements - Learn web development
lement's actual content. ::first-letter Matches the first letter of the element. ::first-line Matches the first line of the containing element. ::grammar-error Matches a portion of the document containing a grammar error as flagged by the browser. ::marker Matches the marker box of a list item, which typically contains a bullet or number. ::selection Matches the portion of the document that has been selected. ::spelling-error Matches a portion of the document containing a spelling error as flagged by the browser. Previous Overview: Building blocks Next In this module Cascade and inheritance CSS selectors Type, class, and ID selectors Attribute selectors Pseudo-classes and pseudo-elements Combi...
CSS selectors - Learn web development
ors in more detail. Type, class, and ID selectors This group includes selectors that target an HTML element such as an <h1>. h1 { } It also includes selectors which target a class: .box { } or, an ID: #unique { } Attribute selectors This group of selectors gives you different ways to select elements based on the presence of a certain attribute on an element: a[title] { } Or even make a selection based on the presence of an attribute with a particular value: a[href="https://example.com"] { } Pseudo-classes and pseudo-elements This group of selectors includes pseudo-classes, which style certain states of an element. The :hover pseudo-class for example selects an element only when it is being hovered over by the mouse pointer: a:hover { } It also includes pseudo-elements, which select ...
Fundamental text and font styling - Learn web development
tent box. Note: Bear in mind that the text inside an element is all affected as one single entity. You can't select and style subsections of text unless you wrap them in an appropriate element (such as a <span> or <strong>), or use a text-specific pseudo-element like ::first-letter (selects the first letter of an element's text), ::first-line (selects the first line of an element's text), or ::selection (selects the text currently highlighted by the cursor.) Fonts Let's move straight on to look at properties for styling fonts. In this example we'll apply some different CSS properties to the same HTML sample, which looks like this: <h1>Tommy the cat</h1> <p>Well I remember it as though it were a meal ago...</p> <p>Said Tommy the Cat as he reeled back to clear whatever foreign matter may ha...
Client-side form validation - Learn web development
eatures. ...
The HTML5 input types - Learn web development
ut. Finally, an event listener is set to ensure that whenever the range slider is moved, the output's textContent is updated to the new value. Note: range inputs are not supported in versions of Internet Explorer below 10. Date and time pickers Gathering date and time values has traditionally been a nightmare for web developers. For good user experience, it is important to provide a calendar selection UI, enabling users to select dates without necessating context switching to a native calendar application or potentially entering them in differing formats that are hard to parse. The last minute of the previous millenium can be expressed in the following different ways, for example: 1999/12/31, 23:59 or 12/31/99T11:59PM. HTML date controls are available to handle this specific kind of data, pro...
How to build custom form controls - Learn web development
tribute is not enough. ARIA also provides many states and property attributes. The more and better you use them, the better your control will be understood by assistive technologies. In our case, we will limit our usage to one attribute: aria-selected. The aria-selected attribute is used to mark which option is currently selected; this lets assistive technologies inform the user what the current selection is. We will use it dynamically with JavaScript to mark the selected option each time the user chooses one. To that end, we need to revise our updateValue() function: function updateValue(select, index) { var nativeWidget = select.previousElementSibling; var value = select.querySelector('.value'); var optionList = select.querySelectorAll('[role="option"]'); // We make sure that all the o...
UI pseudo-classes - Learn web development
Having a purely visual indicator solves this problem. Note: This also shows how you can combine a pseudo-class and pseudo-element if required. Back to our required/optional example from before, this time we'll not alter the appearance of the input itself -- we'll use generated content to add an indicating label (see it live here, and see the source code here). Fir...
Adding vector graphics to the Web - Learn web development
ventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { const scrollPos = textarea.scrollTop; const caretPos = textarea.selectionStart; const front = (textarea.value).substring(0, caretPos); const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every tim...
From object to iframe — other embedding technologies - Learn web development
ventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keyCode === 9) { e.preventDefault(); insertAtCaret('\t'); } if (e.keyCode === 27) { textarea.blur(); } }; function insertAtCaret(text) { const scrollPos = textarea.scrollTop; const caretPos = textarea.selectionStart; const front = (textarea.value).substring(0, caretPos); const back = (textarea.value).substring(textarea.selectionEnd, textarea.value.length); textarea.value = front + text + back; caretPos = caretPos + text.length; textarea.selectionStart = caretPos; textarea.selectionEnd = caretPos; textarea.focus(); textarea.scrollTop = scrollPos; } // Update the saved userCode every tim...
Video and audio content - Learn web development
o convert the compressed audio and video into binary data and back. Each codec offers its own advantages and drawbacks, and each container may also offer its own positive and negative features affecting your decisions about which to use. Things become slightly more complicated because not only does each browser support a different set of container file formats, they also each support a different selection of codecs. In order to maximize the likelihood that your web site or app will work on a user's browser, you may need to provide each media file you use in multiple formats. If your site and the user's browser don't share a media format in common, your media simply won't play. Due to the intricacies of ensuring your app's media is viewable across every combination of browsers, platforms, and devi...
Handling common accessibility problems - Learn web development
t, and run through a rather useful tutorial to learn how to use it. To turn it off again, press Cmd + F5 again. Note: You should go through the tutorial at least once -- it is a really useful way to learn VO. When VO is on, the display will look mostly the same, but you'll see a black box at the bottom left of the screen that contains information on what VO currently has selected. The current selection will also be highlighted, with a black border -- this highlight is known as the VO cursor. To use VO, you will make a lot of use of the "VO modifier" -- this is a key or key combination that you need to press in addition to the actual VO keyboard shortcuts to get them to work. Using a modifier like this is common with screenreaders, to enable them to keep their commands from clashing with othe...
Handling common HTML and CSS problems - Learn web development
be able to see that it wouldn't select the input element as desired: form > #date (The date form input isn't directly inside the <form>; you'd be better off using a general descendant selector instead of a child selector). However, another issue that appears in versions of IE older than 9 is that none of the newer selectors (mainly pseudo-classes and pseudo-elements like :nth-of-type, :not, ::selection, etc.) work. If you want to use these in your CSS and you need to support older IE versions, a good move is to use Keith Clark's Selectivizr library -- this is a small JavaScript library that works on top of an existing JavaScript library like jQuery or MooTools. To try this example, make a local copy of selectivizr-example-start.html. If you look at this running live, you'll see that it conta...
Strategies for carrying out testing - Learn web development
ndowsDualBoot for help with this. A couple of lower-spec mobile devices, so you can test performance of features like animations on less powerful processors. Your main work machine can also be a place to install other tools for specific purposes, such as accessibility auditing tools, screen readers, and emulators/virtual machines. Some larger companies have device labs that stock a very large selection of different devices, enabling developers to hunt down bugs on very specific browser/device combinations. Smaller companies and individuals are generally not able to afford such a sophisticated lab, so tend to make do with smaller labs, emulators, virtual machines, and commercial testing apps. We will cover each of the other options below. Note: Some efforts have been made to create publically...
Setting up your own test automation environment - Learn web development
learning-area/tools-testing/cross-browser-testing/accessibility/native-keyboard-accessibility.html'); Interacting with the document Now we've got a document to test, we need to interact with it in some way, which usually involves first selecting a specific element to test something about. You can select UI elements in many ways in WebDriver, including by ID, class, element name, etc. The actual selection is done by the findElement() method, which accepts as a parameter a selection method. For example, to select an element by ID: const element = driver.findElement(By.id('myElementId')); One of the most useful ways to find an element by CSS -- the By.css method allows you to select an element using a CSS selector Enter the following at the bottom of your quick_test.js code now: const button = ...
Accessibility Features in Firefox
edited with any text editor. For example, prefs.js gives access to a large number of configuration options not available in the preferences window. Also, userContent.css allows users knowledgeable about cascading style sheets to customize the appearance of all pages that are displayed. Finally, bookmarks.html contains all your bookmarks, and is easy to move around from computer to computer. View selection source (techies only): when you select some text and right click or press Shift+F10, you can "view selection source". This will show the HTML source for only the selected text, which is useful for understanding accessibility problems in some web sites. Customize Your Experience! Many users are finding the true greatness of Firefox lies in support for third party extensions. Extensions are smal...
Information for External Developers Dealing with Accessibility
ard shortcuts: An excellent resource from Microsoft. Mac keys: Keyboard Shortcuts Quick Reference for Mac OS X Complete reference on keyboard for Mac OS X: this document list all functions of specified keys, known keyboard shortcuts, explains how to create keyboard shortcuts, explains appropriate use for the arrow keys, how to move the insertion point with keys, how to extent text selection with keys, functions of function keys, what are reserved keyboard shortcuts, how to create your own keyboard shortcuts, keyboard focus and navigation, type-ahead and key-repeat, etc. Gnome keys: Keyboard documentation for Gnome 2.2: still seeking developer guidelines for keyboard. Other Useful Resources Links for those who wish to learn more about web accessibility or open source acces...
Installing headers using EXPORTS
L_MODULE and MODULE is that each directory with IDL files must have a unique typelib file, but several directories may export headers to the same location. Here is an example <tt>Makefile.in</tt> which has both C++ and IDL headers: MODULE = content XPIDL_MODULE = content_base EXPORTS = \ nsIContent.h \ nsIDocument.h \ nsIStyleSheet.h \ $(NULL) XPIDLSRCS = \ nsIContentPolicy.idl \ nsISelectionController.idl \ $(NULL) include $(topsrcdir)/config/rules.mk ...
The Firefox codebase: CSS Guidelines
ag (for HTML documents) or list-style-image (for XUL documents) if rendering the image is important. If you are not using Windows, one way to test against those adjustments on other platforms is: Going to about:preferences Clicking on the "Colors..." button in the "Fonts & Colors" sub-section of the "Language and Appearance" section Under "Override the colors specified by the page with your selections above", select the "Always" option Chrome area The automatic adjustments previously mentioned only apply to pages rendered in the content area. The chrome area of Firefox uses colors as authored, which is why using pre-defined variables, currentcolor or inheritance is useful to integrate with the system theme with little hassle. If not, as a last resort, using system colors also works for no...
Displaying Places information using views
rol over your view, you may need to write your own. See Creating custom views below. Using the tree view So you've got a built-in tree view. How do you ask it about the data it displays? First, see nsIPlacesView. Like all Places views, the built-in tree view implements this interface, which provides broad methods such as getting the view's nsINavHistoryResult instance and examining the view's selection. Second, know this: when it comes to trees, "view" is an overloaded word. This document describes Places views. Places views are just XUL elements; the built-in Places tree view is just a tree element whose type attribute is equal to "places", as described above. But recall that all trees--Places view or not--display their data using another kind of view, nsITreeView. The built-in Places tree vi...
Multiple Firefox profiles
cOS/firefox. If you have the path to your desired profile handy, enter a space character, followed by -profile followed by another space character, followed by the full path to the profile folder you wish to launch into. This will launch Firefox immediately. Otherwise, enter a space character followed by --profilemanager. This will present the Profile Manager window in which you can make your selection. Hit return. Here is a complete example Terminal command from steps 2-3: /Applications/Firefox.app/Contents/macOS/firefox -profile /Users/Suzie/Library/Application\ Support/Firefox/Profiles/r99d1z7c.default If the Profile Manager window does not open, Firefox may have been running in the background, even though it was not visible. Close all instances of Firefox, or restart the computer, an...
Browser API
iframe> content scrolls. mozbrowserscrollareachanged Sent when the available scrolling area in the browser <iframe> changes. This can occur on resize and when the page size changes (while loading for example.) mozbrowserscrollviewchange Sent when asynchronous scrolling (i.e. APCZ) starts or stops. mozbrowsersecuritychange Sent when the SSL state changes within a browser <iframe>. mozbrowserselectionstatechanged Sent when the text selected inside the browser <iframe> content changes. Note that this is obsolete, and newer implementations use mozbrowsercaretstatechanged instead. mozbrowsershowmodalprompt Sent when alert(), confirm(), or prompt() are called within a browser <iframe>. mozbrowsertitlechange Sent when the document title changes within a browser <iframe>. mozbrowserusernameand...
Addon
generic about dialog is displayed. The dialog receives the Addon object representing your add-on as a parameter. applyBackgroundUpdates integer Indicates whether updates found in the background for this add-on will be applied automatically. See auto update values. The user is provided a UI for this in the add-ons manager and it's the add-on provider's responsibility to remember its selection. contributors Read only AddonAuthor[] An array of strings holding the contributors of the add-on. description Read only string The description of the add-on. developers Read only AddonAuthor[] An array of strings holding the developers of the add-on. homepageURL Read only string The homepage URL of the add-on. iconURL Read o...
Localizing with Pontoon
ens a sidebar with a list of all strings to localize. Project selector (Affiliates) Switches between projects to localize. Resource selector (Homepage) Switches between project resources to localize, like subpages or localization files. Hidden if no resources available for project. Locale selector (Slovenian) Switches between languages to localize. Go Opens project-resource-locale selection. Progress indicator Displays your progress on the resource being localized. More details are available in the popup. User menu Allows for user-specific tasks, like commiting to repository, downloading files and signing out. Info menu Gives important information, like the anticipated project timeline and a list of keyboard shortcuts. Alright, how about we do some translating now? ...
Fonts for Mozilla 2.0's MathML engine
g installing this on systems without the associated product. Reset old preferences If users have previously changed the "font.mathfont-family" preference for a previous version of Mozilla, then it is best to reset this to the default value. To do this, enter the URL "about:config", "Filter" for "mathfont", and "Reset" to the default value through the context menu on the preference. ...
ui.textSelectBackground
ui.textSelectBackground saves the color in which the background of a text selection in the user interface or in content will be styled. Type:string with RGB hex value as color code Default value:#EF0FFF (blue) [1] Exists by default: no Application support: before Gecko 1.7 Status: Active; last updated 2015-09-21 Introduction: Pushed to trunk on 2000-04-13 Bugs: bug 34704 [1]: nsXPLookAndFeel.cpp, line 628, retrieved 2015-09-21 ...
ui.textSelectForeground
ui.textSelectForeground saves the color in which the text of a text selection in the user interface or the content will be styled. Type:string with RGB hex value as color code Default value:#FFFFFF (white) [1] Exists by default: no Application support: before Gecko 1.7 Status: Active; last updated 2015-09-21 Introduction: Pushed to trunk on 2000-04-13 Bugs: bug 34704 [1]: nsXPLookAndFeel.cpp, line 635, retrieved 2015-09-21 ...
Preference reference
rtsService are sliding in.ui.SpellCheckerUnderlineui.SpellCheckerUnderline holds the colour which is used to underline words not recognized by the spellchecker.ui.SpellCheckerUnderlineStyleui.SpellCheckerUnderlineStyle holds the style which is used to underline words not recognized by the spellchecker.ui.textSelectBackgroundui.textSelectBackground saves the color in which the background of a text selection in the user interface or in content will be styled.ui.textSelectForegroundui.textSelectForeground saves the color in which the text of a text selection in the user interface or the content will be styled.ui.tooltipDelayui.tooltipDelay stores the delay in milliseconds between the mouse stopping over an element and the appearing of its tooltip.view_source.syntax_highlightThe preference view_source.
Patches and pushes
Below you'll find instructions on creating a patch and pushing it to your repository. Patchify Search plugins are found in browser/searchplugins. Each plugin is stored as an XML file, with list.txt containing the names of each plugin. Here is an example search plugin file using French Yahoo. ...
Research and prep
r language or locale. There should be no more than two. In all cases, user experience should be taken into account and given preference for what is desired in that language/locale. If you have questions about what that means, please contact milos@mozilla.com or Milos on IRC. RSS Readers and Content handlers Productization for RSS readers and content handlers applies only to Firefox desktop. Your selections for default RSS readers and content handlers should follow these guidelines: Be translated in your language (because it makes the application unusable if it's not in your language Provide for the intended user experience (e.g., minimal to no advertisements within the user experience) No more than three (if possible) choices. Choosing based on popularity is fine. Examples from various locali...
PR_Notify
alues: If successful, PR_SUCCESS. If unsuccessful, PR_FAILURE. Description Notification of a monitor signals the change of state of some monitored data. The changing of that data and the notification must all be performed while in the monitor. When the notification occurs, the runtime promotes a thread that is waiting on the monitor to a ready state. If more than one thread is waiting, the selection of which thread gets promoted cannot be determined in advance. This implies that all threads waiting on a single monitor must have the same semantics. If no thread is waiting on the monitor, the notify operation is a no-op. ...
PR_NotifyCondVar
E. Description The calling thread must hold the lock that protects the condition, as well as the invariants that are tightly bound to the condition. Notification of a condition variable signals a change of state in some monitored data. When the notification occurs, the runtime promotes a thread that is waiting on the condition variable to a ready state. If more than one thread is waiting, the selection of which thread gets promoted cannot be predicted. This implies that all threads waiting on a single condition variable must have the same semantics. If no thread is waiting on the condition variable, the notify operation is a no-op. ...
NSS Certificate Download Specification
tes are imported via the server admin interface. Certificates are pasted into a text input field in an HTML form, and then the form is submitted to the admin server. Since the certificates are pasted into text fields, only the text formats described above are supported for servers. The type of certificate being imported (e.g. server or CA or cert chain) is specified by the server administrator by selections made on the admin pages. If a certificate chain is being imported then the first certificate in the chain must be the server or CA certificate, and any subsequent certificates will be added as untrusted CA certificates to the local database. Object Identifiers The base of all Netscape object ids is: netscape OBJECT IDENTIFIER ::= { 2 16 840 1 113730 } The hexadecimal byte value of this O...
JSS FAQ
Mozilla › Projects › NSS › JSS › JSS FAQ
SS's two callbacks are: SSLCertificateApprovalCallback is a combination of SSL_AuthCertificateHook and SSL_BadCertHook. It runs NSS's cert authentication check, then calls the callback regardless of whether the cert passed or failed. The callback is told whether the cert passed, and then can do anything extra that it wants to do before making a final decision. SSLClientCertificateSelectionCallback is analogous to SSL_GetClientAuthDataHook. Can I have multiple JSS instances reading separate db's? No, you can only have one initialized instance of JSS for each database. Once JSS initialized, I can't get anymore instances with CertificateFactory.getInstance("X.509")? In version previous to JSS 3.1, JSS removes the default SUN provider on startup. Upgrade to...
NSS 3.56 release notes
- Add CPU feature detection for Intel SHA extension. Bug 1648822 - Add stricter validation of DH keys in FIPS mode. Bug 1656986 - Properly detect arm64 during GYP build architecture detection. Bug 1652729 - Add build flag to disable RC2 and relocate to lib/freebl/deprecated. Bug 1656429 - Correct RTT estimate used in 0-RTT anti-replay. Bug 1588941 - Send empty certificate message when scheme selection fails. Bug 1652032 - Fix failure to build in Windows arm64 makefile cross-compilation. Bug 1625791 - Fix deadlock issue in nssSlot_IsTokenPresent. Bug 1653975 - Fix 3.53 regression by setting "all" as the default makefile target. Bug 1659792 - Fix broken libpkix tests with unexpired PayPal cert. Bug 1659814 - Fix interop.sh failures with newer tls-interop commit and dependencies. Bug 165651...
NSS API Guidelines
hutdown() closes these databases, to prevent further access by an application. Above High Cert, High Key lib/nss nss.h pk11wrap Provides access to PKCS #11 modules, through a unified interface. The pkcs11wrap library provides functions for selecting/finding PKCS #11 modules and slots. It also provides functions that invoke operations in selected modules and slots, such as key selection and generation, signing, encryption and decryption, etc. Crypto Wrapper lib/pk11wrap pk11func.h, secmod.h, secmodt.h pkcs12 Provides functions and types for encoding and decoding PKCS #12 data. PKCS #12 can be used to to encode keys, and certificates, for export or import into other applications. PKCS #12 lib/pkcs12 pkcs12t.h, pkcs12.h, p12plcy.h, p12.h, p12t.h ...
Rhino Debugger
line for you to enter JavaScript code and view system output. The console window maintains a history of the commands you have entered. You may move backward and forward through the history list by pressing the Up/Down arrow keys on the keyboard. Opening Scripts You may select the File->Open menu item on the menu bar to load JavaScript scripts contained in files. This action will display a file-selection dialog box prompting you for the location of a script to load. The selected file will be compiled and displayed in a new window. Running Scripts You may select the File->Run menu item on the menu bar to execute JavaScript scripts contained in files. This action will display a file-selection dialog box prompting you for the location of a script to execute. The loaded script will be run in a new...
Gecko Roles
e. Should be used for warning dialogs, etc. ROLE_WINDOW Represents the window frame, which contains child objects such as a title bar, client, and other objects contained in a window. The role is supported automatically by Microsoft Windows. ROLE_INTERNAL_FRAME A sub-document. ROLE_MENUPOPUP Represents a menu, which presents a list of options from which the user can make a selection to perform an action. ROLE_MENUITEM Represents a menu item, which is an entry in a menu that a user can choose to carry out a command, select an option. ROLE_TOOLTIP Represents a tooltip that provides helpful hints; this is generally displayed at the mouse cursor position. ROLE_APPLICATION Represents a main window for an application. ROLE_DOCUMENT Represents a docu...
Gecko states
Concomitant state: STATE_FOCUSED STATE_SELECTABLE The object can be selected. Applied to: Events: Concomitant state: STATE_SELECTED STATE_LINKED Indicates that the object is formatted as a hyperlink. The object role will usually be ROLE_TEXT_LEAF. STATE_TRAVERSED The object is a hyperlink that has been visited (previously clicked) by a user. STATE_MULTISELECTABLE Supports multiple selection STATE_EXTSELECTABLE Supports extended selection STATE_REQUIRED Indicates that user interaction is required. STATE_IMPORTANT Isn;t used. STATE_INVALID Indicates a validation failure. EXT_STATE_SUPPORTS_AUTOCOMPLETION For editable areas that have any kind of autocompletion EXT_STATE_DEFUNCT Object no longer exists EXT_STATE_SELECTABLE_TEXT For text which is selectable, object must ...
Setting up the Gecko SDK
rary". Use the fields to the right of the dialog to name your project and set its location. (This example uses "SampleGeckoProject" as the project name and C:\ as its location.). (Need correction for last Visual C++. Now it's Microsoft Visual C++ 2010. Express edition is free.) New Dialog Select OK. In the Win32 Dynamic-Link Library dialog that displays (see below), you can choose the default selection "An Empty DLL Project" as the type of DLL. In this dialog, click Finish. Microsoft Studio creates a new project per your specification and presents you with the standard Project view. Adding the Gecko SDK to the Project Settings In order to build anything that uses Gecko, you have to further modify the project so that it knows where to find the Gecko SDK on the disk. To edit project settings...
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() ...
nsIAccessibleRole
xul:browsermessage, role="alert", xforms:message. ROLE_WINDOW 9 Represents the window frame, which contains child objects such as a title bar, client, and other objects contained in a window. The role is supported automatically by MS Windows. ROLE_INTERNAL_FRAME 10 A sub-document or iframe. ROLE_MENUPOPUP 11 Represents a menu, which presents a list of options from which the user can make a selection to perform an action. It is used for role="menu". ROLE_MENUITEM 12 Represents a menu item, which is an entry in a menu that a user can choose to carry out a command, select an option. It is used for xul:menuitem, role="menuitem". ROLE_TOOLTIP 13 Represents a ToolTip that provides helpful hints. ROLE_APPLICATION 14 Represents a main window for an application. It is used for role="application...
nsIAccessibleStates
000 The object can be focused. STATE_SELECTABLE 0x00200000 The object can be selected. STATE_LINKED 0x00400000 The object is formatted as a hyperlink. The object role will usually be ROLE_TEXT_LEAF. (See nsIAccessibleRole.Constants). STATE_TRAVERSED 0x00800000 The object is a hyperlink that has been visited (previously clicked) by a user. STATE_MULTISELECTABLE 0x01000000 Supports multiple selection. STATE_EXTSELECTABLE 0x02000000 Supports extended selection. STATE_ALERT_LOW 0x04000000 This information is of low priority. STATE_ALERT_MEDIUM 0x08000000 This information is of medium priority. STATE_ALERT_HIGH 0x10000000 This information is of high priority. STATE_PROTECTED 0x20000000 Maps to Gnome's Role* ATK_ROLE_PASSWD_TEXT, nothing for Java? STATE_HASPOPUP 0x40000000 New in MSAA...
nsIAppStartup
ccessful. eForceQuit 0x03 Force all windows to close, then quit. eRestart 0x10 Restart the application after quitting. The application will be restarted with the same profile and an empty command line. eRestartNotSameProfile 0x100 Restart the application after quitting. The application will be restarted with an empty command line and the normal profile selection process will take place on startup. Methods createHiddenWindow() Create the hidden window. void createHiddenWindow(); Parameters None. createStartupState() Obsolete since Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Creates the initial state of the application by launching tasks specfied by "general.startup.*" prefs. Note: SIZE_TO_CONTENT m...
nsIApplicationCacheChannel
on the channel. loadedFromApplicationCache PRBool true if the resource was loaded from the application cache, otherwise false. This value may be false even if the resource is assigned to an application cache if, for example, it was loaded as a fallback. Read only. Methods markOfflineCacheEntryAsForeign() A shortcut method to mark the cache item of this channel as 'foreign'. See the 'cache selection algorithm' and CACHE_SELECTION_RELOAD action handling in nsContentSink. void markOfflineCacheEntryAsForeign(); Parameters None. See also Offline resources in Firefox nsIApplicationCache nsIApplicationCacheContainer nsIApplicationCacheService nsIApplicationCacheNamespace nsIDOMOfflineResourceList ...
nsIClipboardHelper
default) clipboard. void copyString( in AString aString ); Parameters aString The string to copy to the clipboard. copyStringToClipboard() This method copies string to given clipboard. void copyStringToClipboard( in AString aString, in long aClipboardID ); Parameters aString The string to copy to the clipboard. aClipboardID The ID of the clipboard to copy to (For example kSelectionClipboard). See also nsIClipboard Using the Clipboard ...
nsIFocusManager
PRUint32 getLastFocusMethod( in nsIDOMWindow window ); Parameters window If null, then the current focusedWindow will be used by default. This has the result of retrieving the method 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 ano...
nsILoginManagerPrompter
promptToChangePasswordWithUsernames() Ask the user if they want to change the password for one of multiple logins, when the caller can not determine exactly which login should be changed. If the user consents, modifyLogin() will be called. Note: Because the caller does not know the username of the login to be changed, aNewLogin.username and aNewLogin.usernameField will be set (using the user's selection) before modifyLogin() is called. void promptToChangePasswordWithUsernames( [array, size_is(count)] in nsILoginInfo logins, in PRUint32 count, in nsILoginInfo aNewLogin ); Parameters logins An array of existing logins. count (length of the array) aNewLogin The new login. promptToSavePassword() Ask the user if they want to save a login (Yes, Never, Not Now) void promptToSavePas...
nsIMsgDBViewCommandUpdater
mailnews/base/public/nsIMsgDBView.idl#349Scriptable Please add a summary to this article. ...
nsINavHistoryResultObserver
lt.addObserver() to add an observer to a result. Methods batching() Lets the observer know when a batch operation in Places is about 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 change...
nsIPrompt
Example usage is also documented: Using the button Flags See Also nsIPromptService ...
nsIScriptableUnescapeHTML
to be used as the context node for the purposes of the fragment parsing algorithm. Return value An nsIDOMDocumentFragment of the element with the new text appended. Exceptions thrown NS_ERROR_FAILURE Unable to append the text to the element. unescape() Convents HTML source into plain text. This is equivalent to calling nsIParserUtils::convertToPlainText(src, nsIDocumentEncoder::OutputSelectionOnly | nsIDocumentEncoder::OutputAbsoluteLinks, 0). You should call nsIParserUtils::convertToPlainText() instead of calling this method. AString unescape( in AString src ); Parameters src The HTML string to convert into plain text. Return value The result of the plain text conversion. Exceptions thrown NS_ERROR_FAILURE Unable to convert the string. See also nsIDOMDocumentFrag...
nsITreeBoxObject
rently 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 horizontal scrollbar. selectionRegion nsIScriptableRegion Readonly: Return the region for the visible parts of the selection, in device pixels. Methods getFirstVisibleRow() Get the index of the first visible row. long getFirstVisibleRow(); getLastVisibleRow() Get the index of the last visible row. long getLastVisibleRow(); getPageLength() Gets the number of possible visible rows. long getPageLength(); ensureRo...
nsIWebBrowserPersist
ersisting to a local file. PERSIST_FLAGS_FORCE_ALLOW_COOKIES 65536 Force relevant cookies to be sent with this load even if normally they wouldn't be. PERSIST_STATE_READY 1 Persister is ready to save data. PERSIST_STATE_SAVING 2 Persister is saving data. PERSIST_STATE_FINISHED 3 Persister has finished saving data. ENCODE_FLAGS_SELECTION_ONLY 1 Output only the current selection as opposed to the whole document. ENCODE_FLAGS_FORMATTED 2 For plain text output. Convert html to plain text that looks like the html. Implies wrap (except inside <pre>), since html wraps. HTML output: always do prettyprinting, ignoring existing formatting. ENCODE_FLAGS_RAW 4 Output without formatting or wrapping the con...
Using the clipboard
er copy operation. Call setData only when you're ready to copy to the system clipboard. The third parameter to setData (and the parameter to emptyClipboard) indicates which clipboard buffer to use. The above code uses the constant kGlobalClipboard for this, which refers to the global clipboard. This would be the same one that cut and paste operations from the Edit menu typically use. If you use kSelectionClipboard instead, you will copy into the selection buffer, which is generally only available on Unix systems. This multi-step process has resulted in text being copied on the clipboard. We can cut to the clipboard instead of copying by doing a copy and then deleting the original data. Normally, the text would be in a document or textbox. The code is put together below, with additional error chec...
DOM Inspector internals - Firefox Developer Tools
ially, we will begin by focusing on inspector.xul and its entry point, and then expand our focus later to explain how these other inspectors differ. DOM Inspector from a high-level perspective The DOM inspector primary UI consists of some toolbars and a panelset. The panelset contains two panels. One panel reacts to changes to the inspected document, and the other panel reacts to changes to the selection in the first panel. These are the document panel and the object panel, respectively. (Internally, a panel may be loosely referred to as a "pane", but a panelset is always referred to as a "panelset".) A panel's purpose is to manage available viewers. At the top of each panel is a toolbar which contains a menu button allowing you to choose which viewer to display from the viewer list, a label dis...
Browser Toolbox - Firefox Developer Tools
In the normal toolbox, there's a button in the toolbar enabling you to target specific iframes in the document. The same button appears in the browser toolbox where it lists all the top-level chrome and content windows as well as any iframes they contain. This enables you to inspect documents in individual chrome windows and popups, as well as in content tabs. For example, here's what the frame selection popup lists when there are two browser windows open, one with one content tab, and one with two: Debugging popups It's hard to debug popups, because the browser hides them as soon as you click outside them. There is a way to disable this behavior. Click the toolbox menu and select Disable popup auto-hide. Now when you open any popup, it will stay open until you press the Esc key. You can...
DevTools API - Firefox Developer Tools
w, toolbox, node) { return new InspectorPanel(iframeWindow, toolbox, node); } }); Open a tool, or select it if the toolbox is already open: let target = TargetFactory.forTab(gBrowser.selectedTab); let toolbox = gDevTools.openToolbox(target, null, "inspector"); toolbox.once("inspector-ready", function(event, panel) { let inspector = toolbox.getToolPanels().get("inspector"); inspector.selection.setNode(target, "browser-context-menu"); }); Add a sidebar to an existing tool: let sidebar = new ToolSidebar(xulTabbox, toolPanel, "toolId"); sidebar.addTab("tab1", "chrome://browser/content/.../tab1.xhtml", true); sidebar.addTab("tab2", "chrome://browser/content/.../tab2.xhtml", false); sidebar.show(); ...
Migrating from Firebug - Firefox Developer Tools
the DevTools' Rules side panel provide options within their context menus to copy the CSS rule or the style declarations. The DevTools additionally provide an option to copy the selector of a rule and copy disabled property declarations as commented out. They are missing the option to copy the whole style declaration, though this can be achieved by selecting them within the panel and copying the selection by pressing Ctrl+C or via the context menu. The Rules side panel of the DevTools is smarter when it comes to pasting CSS into it. You can paste whole style declarations into an existing rule property declarations which are commented out are automatically disabled. Toggle pseudo-classes Firebug lets you toggle the CSS pseudo-classes :hover, :active and :focus for an element via the options menu...
Inspecting web sockets - Firefox Developer Tools
ause/resume button in the Network Monitor toolbar to stop intercepting web socket traffic. This allows you to capture only the frames that you are interested in. Filtering web socket frames To focus on specific messages, frames can be filtered using the filter at the top of the Messages panel. There are also predefined filters, available in the tool bar of the Response pane, grouped into a selection list. The following filters are available: All Displays all messages (by default, except control messages). Sent Displays only messages sent by the browser (by default, except control messages). Received Displays only messages received from the server (by default, except control messages). Control (Available starting in Firefox 76). Displays messages for control frames (Ping, Pong, o...
Throttling - Firefox Developer Tools
reloads. The characteristics emulated are: Download speed Upload speed Minimum latency The table below lists the numbers associated with each network type, but please do not rely on this feature for exact performance measurements; it's intended to give an approximate idea of the user experience in different conditions. The speeds are expressed in multiples of bits per second. ...
Use the Inspector API - Firefox Developer Tools
Firefox add-ons may access the following objects from the chrome://browser/content/devtools/inspector/inspector.xul context: window.inspector defined in inspector-panel.js. Attributes and functions: .selection - information about the inspector's selection: .isNode() - returns true if selection is node. .node - returns the actual element from the page .window - the window object of the frame the selection is in. .markDirty() - marks that the page has been changed by the inspector - a warning will be shown when leaving the page, since changes made through the inspector are rewritten on reload. Bindable events using on: markuploaded Called when the left panel has been refreshed, after page change. ready Called on first markuploaded. pseudoclass Called after toggl...
Tips - Firefox Developer Tools
to different shortcuts. Check or uncheck the different tools to enable or disable them. (There are more than the default tools!) Page Inspector In the markup view: Press H with a node selected to hide/show it. Press Backspace or Del with a node selected to delete it. Alt + click on a node to expand or collapse it and all its descendants. Click on the last breadcrumb button to scroll the selection into view in the inspector. Click the "ev" icon besides a node to see all event listeners attached to it. Press S with a node selected to see it in the page (same as right-click a node and click "Scroll Into View"). Right-click a node and click "Use in Console" to command line as tempN variable. When selecting elements: Shift + click to select an element but keep selecting (picker mode do...
View Source - Firefox Developer Tools
ror. This feature is useful when you're looking for HTML errors. To access Go to Line from the keyboard, press Control + Option + L on macOS, or Alt + Shift + L on Windows or Linux. Link to a line number It is possible to link to a particular line, by adding the #lineNNN anchor to the url the browser will jump to the NNN line. For example view-source:https://www.mozilla.org/#line100 View Selection Source If you select part of a web page and conext-click, you'll see a context menu item labeled "View Selection Source", that behaves just like "View Page Source", except you only see the source for the selection. View MathML Source If you context-click while the mouse is over some MathML, you'll see a context menu item labeled "View MathML Source": click it to see the MathML source. Limitat...
CanvasRenderingContext2D.lineDashOffset - Web APIs
]); // Dashed line with no offset ctx.beginPath(); ctx.moveTo(0, 50); ctx.lineTo(300, 50); ctx.stroke(); // Dashed line with offset of 4 ctx.beginPath(); ctx.strokeStyle = 'red'; ctx.lineDashOffset = 4; ctx.moveTo(0, 100); ctx.lineTo(300, 100); ctx.stroke(); Result The line with a dash offset is drawn in red. Marching ants The marching ants effect is an animation technique often found in selection tools of computer graphics programs. It helps the user to distinguish the selection border from the image background by animating the border. HTML <canvas id="canvas"></canvas> const canvas = document.getElementById('canvas'); const ctx = canvas.getContext('2d'); let offset = 0; function draw() { ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.setLineDash([4, 2]); ctx.lineDashOf...
Applying styles and colors - Web APIs
e Using line dashes The setLineDash method and the lineDashOffset property specify the dash pattern for lines. The setLineDash method accepts a list of numbers that specifies distances to alternately draw a line and a gap and the lineDashOffset property sets an offset where to start the pattern. In this example we are creating a marching ants effect. It is an animation technique often found in selection tools of computer graphics programs. It helps the user to distinguish the selection border from the image background by animating the border. In a later part of this tutorial, you can learn how to do this and other basic animations. <canvas id="canvas" width="110" height="110"></canvas> var ctx = document.getElementById('canvas').getContext('2d'); var offset = 0; function draw() { ctx.clea...
Clipboard - Web APIs
Web › API › Clipboard
erm, data storage and/or data transfers, this can be between documents or applications It is usually implemented as an anonymous, temporary data buffer, sometimes called the paste buffer, that can be accessed from most or all programs within the environment via defined programming interfaces. A typical application accesses clipboard functionality by mapping user input such as keybindings, menu selections, etc. to these interfaces. Methods Clipboard is based on the EventTarget interface, and includes its methods. read() Requests arbitrary data (such as images) from the clipboard, returning a Promise. When the data has been retrieved, the promise is resolved with a DataTransfer object that provides the data. readText() Requests text from the system clipboard; returns a Promise which is re...
CompositionEvent.data - Web APIs
input method that raised the event; its exact nature varies depending on the type of event that generated the CompositionEvent object. Syntax myData = CompositionEvent.data Value A DOMString representing the event data: For compositionstart events, this is the currently selected text that will be replaced by the string being composed. This value doesn't change even if content changes the selection range; rather, it indicates the string that was selected when composition started. For compositionupdate, this is the string as it stands currently as editing is ongoing. For compositionend events, this is the string as committed to the editor. Specifications Specification Status Comment Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'da...
CredentialsContainer.get() - Web APIs
stance that matches the provided parameters. If no match is found the Promise will resolve to null. This method first collects all credentials in the CredentialsContainer that meet the necessary criteria (defined in the options argument). From the resulting set of credentials, it then selects the best one. Depending on the options, it may display a dialog to the user and ask the user to make the selection. This method collects credentials by calling the "CollectFromCredentialStore" method for each credential type allowed by the options argument. For example: if options.password exists, then the PasswordCredential.[[CollectFromCredentialStore]] is called. This method is restricted to top-level contexts. Calls to it within an <iframe> element will resolve without effect. Syntax var promise = C...
DataTransfer.clearData() - Web APIs
mat Optional A string which specifies the type of data to remove. If this parameter is an empty string or is not provided, the data for all types is removed. Example This example shows the use of the DataTransfer object's getData(), setData() and clearData() methods. HTML <span class="tweaked" id="source" draggable="true"> Select this element, drag it to the Drop Zone and then release the selection to move the element. </span> <span class="tweaked" id="target">Drop Zone</span> <div>Status: <span id="status">Drag to start</span></div> <div>Data is: <span id="data">uninitialized</span></div> CSS span.tweaked { display: inline-block; margin: 1em 0; padding: 1em 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } JavaScript window.ad...
DataTransfer.dropEffect - Web APIs
rce at the new location. none The item may not be dropped. Assigning any other value to dropEffect has no effect and the old value is retained. Example This example shows the use of the dropEffect and effectAllowed properties. HTML Content <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> Select this element, drag it to the Drop Zone and then release the selection to move the element. </p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">Drop Zone</div> CSS Content div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } JavaScript Content function dragstart_handler(ev) { console.log("dragStart: dropEffect = " + ev.dataTransfer.
DataTransfer.effectAllowed - Web APIs
Living Standard HTML 5.1The definition of 'effectAllowed' in that specification. ...
DataTransfer.setData() - Web APIs
Living Standard HTML 5.1The definition of 'setData()' in that specification. Recomme...
DataTransfer.setDragImage() - Web APIs
Living Standard HTML 5.1The definition of 'setDragImage()' in that specification. ...
DataTransferItemList.DataTransferItem() - Web APIs
o move ev.dataTransfer.dropEffect = "move" } function dragend_handler(ev) { console.log("dragEnd"); var dataList = ev.dataTransfer.items; // Clear any remaining drag data dataList.clear(); } HTML <div> <p id="source" ondragstart="dragstart_handler(event);" ondragend="dragend_handler(event);" draggable="true"> Select this element, drag it to the Drop Zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">Drop Zone</div> CSS div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } Result Drag and Drop demo link Specifications Specification Status Comment HTML Living Standar...
DataTransferItemList.add() - Web APIs
ter was provided, and the list already contains an item whose kind is "Plain Unicode string" and whose type is equal to the specified type parameter. Example This example shows the use of the add() method. ...
DataTransferItemList.clear() - Web APIs
his method silently does nothing. No exception is thrown. Syntax DataTransferItemList.clear(); Parameters None. Return value undefined Example This example shows the use of the clear() method. ...
DataTransferItemList.length - Web APIs
o move ev.dataTransfer.dropEffect = "move" } function dragend_handler(ev) { console.log("dragEnd"); var dataList = ev.dataTransfer.items; // Clear any remaining drag data dataList.clear(); } HTML <div> <p id="source" ondragstart="dragstart_handler(event);" ondragend="dragend_handler(event);" draggable="true"> Select this element, drag it to the Drop Zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">Drop Zone</div> CSS div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } Result Drag and Drop demo link Specifications Specification Status Comment HTML Living Standar...
DataTransferItemList.remove() - Web APIs
i = 0; i < dataList.length; i++) { dataList.remove(i); } // Clear any remaining drag data dataList.clear(); } HTML <h1>Example uses of <code>DataTransferItemList</code> methods and property</h1> <div> <p id="source" ondragstart="dragstart_handler(event);" ondragend="dragend_handler(event);" draggable="true"> Select this element, drag it to the Drop Zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">Drop Zone</div> CSS div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } Specifications Specification Status Comment HTML Living StandardThe defin...
DisplayMediaStreamConstraints.video - Web APIs
Since a video track must always be included, a value of false results in a TypeError exception being thrown. ...
Document: drag event - Web APIs
Bubbles Yes Cancelable Yes Default action Continue the drag & drop operation. Interface DragEvent Event handler property ondrag Examples See this code in a JSFiddle demo or interact with it below. ...
Document: dragexit event - Web APIs
Bubbles Yes Cancelable No Default action None. Interface DragEvent Event handler property ondragexit Examples See the drag event for example code or this JSFiddle demo. ...
Document: dragleave event - Web APIs
Bubbles Yes Cancelable No Default action None. Interface DragEvent Event handler property ondragleave Examples See the drag event for example code or this JSFiddle demo. ...
Document: dragover event - Web APIs
The event is fired on the drop target(s). Bubbles Yes Cancelable Yes Default action Reset the current drag operation to "none". Interface DragEvent Event handler property ondragover Examples See the drag event for example code or this JSFiddle demo. ...
Document: dragstart event - Web APIs
Bubbles Yes Cancelable Yes Default action Initiate the drag-and-drop operation. Interface DragEvent Event handler property ondragstart Examples See the drag event for example code or this JSFiddle demo. ...
Document: drop event - Web APIs
Bubbles Yes Cancelable Yes Default action Varies Interface DragEvent Event handler property ondrop Examples See the drag event for example code or this JSFiddle demo. ...
Document.queryCommandState() - Web APIs
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. ...
Document: selectstart event - Web APIs
The selectstart event of the Selection API is fired when a user starts a new selection. If the event is canceled, the selection is not changed. Bubbles Yes Cancelable Yes Interface Event Event handler property onselectstart Examples // addEventListener version document.addEventListener('selectstart', () => { console.log('Selection started'); }); // onselectstart version document.onselectstart = () => { console.log('Selection changed.'); }; Specifications Specification Status Comment Selection APIThe definition of 'selectstart' in that specification. Working Draft Initial definition. ...
DocumentOrShadowRoot - Web APIs
cumentOrShadowRoot.caretPositionFromPoint() Returns a CaretPosition object containing the DOM node containing the caret, and caret's character offset within that node. DocumentOrShadowRoot.elementFromPoint() Returns the topmost element at the specified coordinates. DocumentOrShadowRoot.elementsFromPoint() Returns an array of all elements at the specified coordinates. DocumentOrShadowRoot.getSelection() Returns a Selection object representing the range of text selected by the user, or the current position of the caret. DocumentOrShadowRoot.nodeFromPoint() Returns the topmost node at the specified coordinates. DocumentOrShadowRoot.nodesFromPoint() Returns an array of all nodes at the specified coordinates. Specifications Specification Status Comment Shado...
Document Object Model (DOM) - Web APIs
To achieve this, the following interfaces present in the different DOM level 3 or earlier specifications have been removed. It is uncertain whether some may be reintroduced in the future or not, but for the time ...
Element: paste event - Web APIs
into this one</div> CSS div.source, div.target { border: 1px solid gray; margin: .5rem; padding: .5rem; height: 1rem; background-color: #e9eef1; } JS const target = document.querySelector('div.target'); target.addEventListener('paste', (event) => { let paste = (event.clipboardData || window.clipboardData).getData('text'); paste = paste.toUpperCase(); const selection = window.getSelection(); if (!selection.rangeCount) return false; selection.deleteFromDocument(); selection.getRangeAt(0).insertNode(document.createTextNode(paste)); event.preventDefault(); }); Result Specifications Specification Status Clipboard API and events Working Draft ...
Using files from web applications - Web APIs
If you want to use the DOM File API from extensions or other browser chrome code, you can; however, note there are some additional features to be aware of. See Using the DOM File API in chrome code for details. ...
GlobalEventHandlers.ondrag - Web APIs
Living Standard HTML 5.1The definition of 'ondrag' in that specification. Recommendatio...
GlobalEventHandlers.ondragend - Web APIs
Living Standard HTML 5.1The definition of 'ondragend' in that specification. Recomme...
GlobalEventHandlers.ondragenter - Web APIs
Living Standard HTML 5.1The definition of 'ondragenter' in that specification. Rec...
GlobalEventHandlers.ondragexit - Web APIs
Living Standard HTML 5.1The definition of 'ondragexit' in that specification. Recom...
GlobalEventHandlers.ondragleave - Web APIs
Living Standard HTML 5.1The definition of 'ondragleave' in that specification. Re...
GlobalEventHandlers.ondragover - Web APIs
Living Standard HTML 5.1The definition of 'ondragover' in that specification. Recom...
GlobalEventHandlers.ondragstart - Web APIs
Living Standard HTML 5.1The definition of 'ondragstart' in that specification. Rec...
GlobalEventHandlers.ondrop - Web APIs
Living Standard HTML 5.1The definition of 'ondrop' in that specification. Recommendatio...
inert - Web APIs
Web › API › HTMLElement › inert
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. ...
HTMLElement - Web APIs
List 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 user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard. HTMLElement.itemScope Is a Boolean representing the item scope. HTMLElement.itemType Read only Returns a DOMSettableTokenList... HTMLElem...
HTMLImageElement.src - Web APIs
ifying a single image HTML <img src="https://udn.realityripple.com/samples/d6/7ab36d79bb.jpg" width="160" alt="Slices of grapefruit, looking yummy."> Result Using src with an image set When using a set of images with the srcset property, the src serves as either a fallback for older browsers, or as the 1x size of the image. HTML Result Specifying a fallback for viewport-based selection When using viewport-bases selection of an image from a srcset by also specifying the sizes property, the src property serves as the fallback to be used on browsers that don't support viewport-based selection. Browsers that do support viewport-based selection will ignore src in this situation. HTML Result Specifications Specification Status Comment HTML Living Stan...
HTMLInputElement.select() - Web APIs
lick="selectText()">Select text</button> JavaScript function selectText() { const input = document.getElementById('text-box'); input.focus(); input.select(); } Result Notes Calling element.select() will not necessarily focus the input, so it is often used with HTMLElement.focus(). In browsers where it is not supported, it is possible to replace it with a call to HTMLInputElement.setSelectionRange() with parameters 0 and the input's value length: <input onClick="this.select();" value="Sample Text" /> <!-- equivalent to --> <input onClick="this.setSelectionRange(0, this.value.length);" value="Sample Text" /> Specifications Specification Status Comment HTML Living StandardThe definition of 'select' in that specification. Living Standard ...
HTMLInputElement.webkitdirectory - Web APIs
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 Jamie's 1st birthday PIC1000.jpg PIC1004.jpg PIC1044.jpg Don's 40th birthday PIC2343.jpg PIC2344.j...
HTMLMediaElement.src - Web APIs
The HTMLMediaElement.src property reflects the value of the HTML media element's src attribute, which indicates the URL of a media resource to use in the element. Note: The best way to know the URL of the media resource currently in active use in this element is to look at the value of the currentSrc attribute, which also takes into account selection of a best or preferred media resource from a list provided in an HTMLSourceElement (which represents a <source> element). Syntax var mediaUrl = HTMLMediaElement.src; Value A USVString object containing the URL of a media resource to use in the element; this property reflects the value of the HTML element's src attribute. Example var obj = document.createElement('video'); console.log(obj.src); // "" Specifications Specification ...
HTMLMediaElement - Web APIs
ly works when the application is authorized to use the specified device. Obsolete methods These methods are obsolete and should not be used, even if a browser still supports them. HTMLMediaElement.mozLoadFrom() This method, available only in Mozilla's implementation, loads data from another media element. This works similarly to load() except that instead of running the normal resource selection algorithm, the source is simply set to the other element's currentSrc. This is optimized so this element gets access to all of the other element's cached and buffered data; in fact, the two elements share downloaded data, so data downloaded by either element is available to both. Events Inherits methods from its parent, HTMLElement , defined in the GlobalEventHandlers mixin. Listen to these ev...
HTMLSelectElement.disabled - Web APIs
LSelectElement.disabled is a Boolean that reflects the disabled HTML attribute, which indicates whether the control is disabled. If it is disabled, it does not accept clicks. A disabled element is unusable and un-clickable. ...
HTMLSelectElement.form - Web APIs
.selectname; Example HTML <form action="http://www.google.com/search" method="get"> <label>Google: <input type="search" name="q"></label> <input type="submit" value="Search..."> </form> Javascript A property available on all form elements, "type" returns the type of the calling form element. For SELECT, the two possible values are "select-one" or "select-multiple", depending on the type of selection list. The below code gives all SELECT elements in a particular form a CSS class of "selectclass": <script type="text/javascript"> var form_element = document.getElementById('subscribe_form'); var vist = form_element.style; if (vist.display=='' || vist.display=='none') { vist.display = 'block'; } else { vist.display = 'none'; } </script> Specifications Specification Status C...
HTMLSelectElement.selectedOptions - Web APIs
ect> element. In other words, any option contained within the <select> element may be part of the results, but option groups are not included in the list. If no options are currently selected, the collection is empty and returns a length of 0. Example In this example, a <select> element with a number of options is used to let the user order various food items. ...
HTMLSelectElement.setCustomValidity() - Web APIs
Use the empty string to indicate that the element does not have a custom validity error. Syntax selectElt.setCustomValidity(string); Parameters string is the DOMString containing the error message. Specifications Specification Status Comment HTML Living StandardThe definition of 'HTMLSelectElement.setCustomValidity()' in that specification. Living Standard No change since the latest snapshot, HTML5. ...
HTMLTableRowElement - Web APIs
of 'HTMLTableRowElement' in that specification. Living Standard HTML5The definition of 'HTMLTableRowElement' in that specification. Recommendation The parameter of insertCell is now optional and default to -1. Document Object Model (DOM) Level 2 HTML SpecificationThe definition of 'HTMLTableRowElement' in that specification. Obsolete The cells, rowIndex, and selectionRowIndex properties are now read-only. The methods insertCell and deleteCell can raise exceptions. Document Object Model (DOM) Level 1 SpecificationThe definition of 'HTMLTableRowElement' in that specification. Obsolete Initial definition. ...
Recommended Drag Types - Web APIs
common draggable data types. Caution: All methods and properties in this document with a moz prefix, such as mozSetDataAt(), will only work with Gecko-based browsers. Dragging Text For dragging text, use the text/plain type. The second data parameter should be the dragged string. For example: event.dataTransfer.setData("text/plain", "This is text to drag"); Dragging text in textboxes and selections on web pages is done automatically by the browser, so you do not need to handle it yourself. It is recommended to always add data of the text/plain type as a fallback for applications or drop targets that do not support other types, unless there is no logical text alternative. Always add this text/plain type last, as it is the least specific and shouldn't be preferred. Note: In older code, you...
HTML Drag and Drop API - Web APIs
ent, drags the element to a droppable element, and then releases the dragged element. During drag operations, several event types are fired, and some events might fire many times, such as the drag and dragover events. Each drag event type has an associated global event handler: Event On Event Handler Fires when... drag ondrag ...a dragged item (element or text selection) is dragged. dragend ondragend ...a drag operation ends (such as releasing a mouse button or hitting the Esc key; see Finishing a Drag.) dragenter ondragenter ...a dragged item enters a valid drop target. (See Specifying Drop Targets.) dragexit ondragexit ...an element is no longer the drag operation's immediate selection target. dragleave ...
Key Values - Web APIs
ETE (0x2E) kVK_ForwardDelete (0x75) [1] GDK_KEY_Delete (0xFFFF) GDK_KEY_KP_Delete (0xFF9F) Qt::Key_Delete (0x01000007) KEYCODE_FORWARD_DEL (112) "EraseEof" Erase to End of Field. Deletes all characters from the current cursor position to the end of the current field. VK_EREOF (0xF9) GDK_KEY_3270_ExSelect (0xFD1B) "ExSel" [4] The ExSel (Extend Selection) key. VK_EXSEL (0xF8) GDK_KEY_3270_ExSelect (0xFD1B) "Insert" The Insert key, Ins. Toggles between inserting and overwriting text. VK_INSERT (0x2D) GDK_KEY_Insert (0xFF63) GDK_KEY_KP_Insert (0xFF9E) Qt::Key_Insert (0x01000006) KEYCODE_INSERT (124) "Paste" Paste from the clipboard. APPCOMMAND_PASTE GDK_KEY_Paste (0x1008FF6D) ...
MediaTrackConstraints.logicalSurface - Web APIs
.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 ConstrainBoolean 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 video MediaStreamTrack, then checking the value of the returned MediaTra...
PaymentItem - Web APIs
ecure 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 'PaymentItem' in that specification. Candidate Recommendation Initial definition. ...
PublicKeyCredentialCreationOptions.extensions - Web APIs
gistration operation. Warning! As of June 2020, only appId (used during creation with PublicKeyCredentialRequestOptions.extensions) is supported by Chrome and Edge. Firefox does not seem to support any extension. 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 ...
PublicKeyCredentialRequestOptions.userVerification - Web APIs
userVerification is an optional property of the PublicKeyCredentialRequestOptions. This is a string which indicates how the user verification should be part of the authentication process. Note: An analogous option exists for the creation operation (navigators.credentials.create()), see the userVerification property of PublicKeyCredentialCreationOptions.authenticatorSelection. Syntax userVerification = publicKeyCredentialRequestOptions.userVerification Value 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 (as part of AuthenticatorAssertionResponse.authenticatorData) "preferred": user verification is prefered, the ope...
RTCConfiguration.iceTransportPolicy - Web APIs
Its value must come from the RTCIceTransportPolicy enumerated type. If this property isn't included in the RTCConfiguration, the default value, all, is used. Syntax let rtcConfiguration = { iceTransportPolicy: policy }; rtcConfiguration.iceTransportPolicy = policy; let policy = rtcConfiguration.iceTransportPolicy; Value A DOMString which indicates what ICE candidate policy the ICE agent should use during the negotiation process, per the JSEP standard. ...
RTCIceTransport - Web APIs
d type: "controlling" or "controlled"; this indicates whether the ICE agent is the one that makes the final decision as to the candidate pair to use or not. state Read only A DOMString indicating what the current state of the ICE agent is. The value of state can be used to determine whether the ICE agent has made an initial connection using a viable candidate pair ("connected"), made its final selection of candidate pairs ("completed"), or in an error state ("failed"), among other states. See the RTCIceTransportState enumerated type for a complete list of states. Methods Also includes methods from EventTarget, the parent interface. getLocalCandidates() Returns an array of RTCIceCandidate objects, each describing one of the ICE candidates that have been gathered so far for the local device...
Range.extractContents() - Web APIs
<p id="list2">abcdef</p> CSS body { pointer-events: none; } p { border: 1px solid; font-size: 2em; padding: .3em; } button { font-size: 1.2em; padding: .5em; pointer-events: auto; } JavaScript const list1 = document.getElementById('list1'); const list2 = document.getElementById('list2'); const button = document.getElementById('swap'); button.addEventListener('click', e => { selection = window.getSelection(); for (let i = 0; i < selection.rangeCount; i++) { const range = selection.getRangeAt(i); if (range.commonAncestorContainer === list1 || range.commonAncestorContainer.parentNode === list1) { const documentFragment = range.extractContents(); list2.appendChild(documentFragment); } else if (range.commonAncestorContainer === list2 || ...
Range.getBoundingClientRect() - Web APIs
See Element.getBoundingClientRect() for details on the returned value. ...
Range - Web APIs
Web › API › Range
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. ...
SVGSVGElement - Web APIs
rocessing. SVGSVGElement.checkEnclosure() Returns true if the rendered content of the given element is entirely contained within the supplied rectangle. Each candidate graphics element is to be considered a match only if the same graphics element can be a target of pointer events as defined in pointer-events processing. SVGSVGElement.deselectAll() Unselects any selected objects, including any selections of text strings and type-in bars. SVGSVGElement.createSVGNumber() Creates an SVGNumber object outside of any document trees. The object is initialized to 0. SVGSVGElement.createSVGLength() Creates an SVGLength object outside of any document trees. The object is initialized to 0 user units. SVGSVGElement.createSVGAngle() Creates an SVGAngle object outside of any document trees. The object i...
ShadowRoot - Web APIs
ot.styleSheets Read only Returns a StyleSheetList of CSSStyleSheet objects for stylesheets explicitly linked into, or embedded in a document. Methods The ShadowRoot interface includes the following methods defined on the DocumentOrShadowRoot mixin. Note that this is currently only implemented by Chrome; other browsers still implement them on the Document interface. DocumentOrShadowRoot.getSelection() Returns a Selection object representing the range of text selected by the user, or the current position of the caret. DocumentOrShadowRoot.elementFromPoint() Returns the topmost element at the specified coordinates. DocumentOrShadowRoot.elementsFromPoint() Returns an array of all elements at the specified coordinates. DocumentOrShadowRoot.caretPositionFromPoint() Returns a CaretPosition ...
WebRTC connectivity - Web APIs
idate pair to use for the connection. The other peer is called the controlled agent. You can identify which one your end of the connection is by examining the value of RTCIceCandidate.transport.role, although in general it doesn't matter which is which. The controlling agent not only takes responsibility for making the final decision as to which candidate pair to use, but also for signaling that selection to the controlled agent by using STUN and an updated offer, if necessary. The controlled agent just waits to be told which candidate pair to use. It's important to keep in mind that a single ICE session may result in the controlling agent choosing more than one candidate pair. Each time it does so and shares that information with the controlled agent, the two peers reconfigure their connection t...
WebXR Device API - Web APIs
WebXR is a group of standards which are used together to support rendering 3D scenes to hardware designed for presenting virtual worlds (virtual reality, or VR), or for adding graphical imagery to the real world, (augmented reality, or AR). The WebXR Device API implements the core of the WebXR feature set, managing the selection of output devices, render the 3D scene to the chosen device at the appropriate frame rate, and manage motion vectors created using input controllers. WebXR-compatible devices include fully-immersive 3D headsets with motion and orientation tracking, eyeglasses which overlay graphics atop the real world scene passing through the frames, and handheld mobile phones which augment reality by capturing the world with a camera and augment that scene with computer-generated imager...
Window.updateCommands() - Web APIs
urrent chrome window (UI). Syntax window.updateCommands("sCommandName") Parameters sCommandName is a particular string which describes what kind of update event this is (e.g. whether we are in bold right now). Notes This enables or disables items (setting or clearing the "disabled" attribute on the command node as appropriate), or ensures that the command state reflects the state of the selection by setting current state information in the "state" attribute of the XUL command nodes. Specification DOM Level 0. Not part of specification. 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. DesktopMobileChromeEdgeFirefo...
XRInputSourceEvent.inputSource - Web APIs
vice, or other input apparatus. Example The snippet below shows a handler for the select event which looks specifically for events which happen on gaze input devices. The device type is identified by looking at the XRInputSource in inputSource and its targetRayMode property. xrSession.onselect = event => { let source = event.inputSource; if (source.targetRayMode == "gaze") { /* handle selection using a gaze input */ } }; Specifications Specification Status Comment WebXR Device APIThe definition of 'XRInputSourceEvent.inputSource' in that specification. Working Draft Initial definition. ...
XRSession.onselectend - Web APIs
For example, this might include releasing a button or joystick. Note: Not to be confused with XRSession.onselectstart and XRSession.onselect. Syntax XRSession.onselectend = function(event) { ... ...
XRSession.onselectstart - Web APIs
For example, this might include pressing a button or moving a joystick. Note: Not to be confused with XRSession.onselect and XRSession.onselectend. Syntax XRSession.onselectstart = function(event) { ... ...
Introduction - Web APIs
content) should be laid out. However, it has several limitations, such as lack of programming structures and ability to create complex layout models. CSS also has limited support for changing the position of an element. XSL (Extensible Stylesheet Language) Transformations are composed of two parts: XSL elements, which allow the transformation of an XML tree into another markup tree and XPath, a selection language for trees. XSLT takes an XML document (the content) and creates a brand new document based on the rules in the XSL stylesheet. This allows XSLT to add, remove and reorganize elements from the original XML document and thus allows more fine-grain control of the resulting document's structure. Transformations in XSLT are based on rules that consist of templates. Each template matches (usi...
Web APIs
Web › API
itchElement SVGSymbolElement SVGTRefElement SVGTSpanElement SVGTests SVGTextContentElement SVGTextElement SVGTextPathElement SVGTextPositioningElement SVGTitleElement SVGTransform SVGTransformList SVGTransformable SVGURIReference SVGUnitTypes SVGUseElement SVGVKernElement SVGViewElement SVGZoomAndPan Screen ScreenOrientation ScriptProcessorNode ScrollToOptions SecurityPolicyViolationEvent Selection Sensor SensorErrorEvent ServiceWorker ServiceWorkerContainer ServiceWorkerGlobalScope ServiceWorkerMessageEvent ServiceWorkerRegistration ServiceWorkerState ShadowRoot SharedWorker SharedWorkerGlobalScope Slottable SourceBuffer SourceBufferList SpeechGrammar SpeechGrammarList SpeechRecognition SpeechRecognitionAlternative SpeechRecognitionError SpeechRecognitionErrorEvent Spee...
ARIA: grid role - Accessibility
Key combination Action ctrl + Space Select the column that contains the focus. shift + Space Selects the row that contains the focus. If the grid includes a column with checkboxes to select rows, this key combination can be used to check that box even if the focus is not on the checkbox. ctrl + A Selects all cells. shift + -> Extends selection one cell to the right. shift + <- Extends selection one cell to the left. shift + ? Extends selection one cell down. shift + ? Extends selection one cell up. Examples Calendar example HTML <table role="grid" aria-labelledby="calendarheader" aria-readonly=true> <caption id="calendarheader">September 2018</caption> <thead role="rowgroup"> <tr r...
ARIA: row role - Accessibility
aria-rowindex, and aria-selected. If the row is within a treegrid, rows can include the aria-expanded attribute, using the attribute to indicate the present status. This is not the case for an ordinary table or grid, in which the aria-expanded attribute is not present. To create an interactive widget that has a tabular structure, use the grid pattern instead. If the interaction provides for the selection state of individual cells, if left to right and top to botton navigation is provided, or if the user interface allows the rearranging of cell order or otherwise changing individual cell order such as through drag and drop, use grid or treegrid instead. Note: Using the native HTML table element (<table>) along with the table row element (<tr>) whenever possible is strongly encouraged. Associat...
An overview of accessible web applications and widgets - Accessibility
lementing desktop-style keyboard conventions on the web has the potential to significantly speed up navigation for many users. Here's a summary of how keyboard navigation should work in an ARIA-enabled web application: The Tab key should provide focus to the widget as a whole. For example, tabbing to a menu bar should NOT put focus on the menu's first element. The arrow keys should allow for selection or navigation within the widget. For example, using the left and right arrow keys should move focus to the previous and next menu items. When the widget is not inside a form, both the Enter and Spacebar keys should select or activate the control. Within a form, the Spacebar key should select or activate the control, while the Enter key should submit the form's default action. If in doubt, mimi...
HTML To MSAA - Accessibility
nd others ROLE_SYSTEM_ LISTITEM n/a n/a STATE_SYSTEM_ READONLY n/a n/a n/a contains child accessible for list bullet ol, ul and others ROLE_SYSTEM_ LIST n/a n/a STATE_SYSTEM_ READONLY n/a n/a n/a optgroup BSTR role n/a n/a n/a n/a n/a n/a option ROLE_SYSTEM_ LISTITEM from @label attribute, from child text nodes n/a STATE_SYSTEM_ SELECTED if option is selected n/a "select" EVENT_OBJECT_ SELECTIONWITHIN EVENT_OBJECT_ SELECTIONADD if selected EVENT_OBJECT_ SELECTIONREMOVE if unselected select @size > 1 ROLE_SYSTEM_ LIST n/a n/a STATE_SYSTEM_ MULTISELECTABLE if multiselectable n/a n/a n/a select @size = 1 ROLE_SYSTEM_ COMBOBOX n/a name of focused option STATE_SYSTEM_ EXPANDED if combobox open STATE_SYSTEM_ COLLAPSED if combobox is collapsed STATE_SYSTEM_ HASPOPUP STATE_SYSTEM_ FOCU...
Alternative style sheets - CSS: Cascading Style Sheets
mes one of the choices offered to the user. Style sheets linked with the same title are part of the same choice. Style sheets linked without a title attribute are always applied. Use rel="stylesheet" to link to the default style, and rel="alternate stylesheet" to link to alternative style sheets. This tells the browser which style sheet title should be selected by default, and makes that default selection apply in browsers that do not support alternate style sheets. Specifications Specification Status Comment HTML Living StandardThe definition of 'link type "alternate"' in that specification. Living Standard HTML Living StandardThe definition of 'alternative stylesheet' in that specification. Living Standard HTML Living StandardThe defi...
Attribute selectors - CSS: Cascading Style Sheets
Selectors Level 3The definition of 'attribute selectors' in that specification. Recommendation CSS Level 2 (Revision 1)The definition of 'attribute selectors' in that specification. Recommendation Initial definition ...
Using feature queries - CSS: Cascading Style Sheets
property1: value) and (property2: value) { CSS rules to apply } For example, if the CSS you want to run requires that the browser supports CSS Shapes and CSS Grid, you could create a rule which checks for both of these things. The following rule will only return true if both shape-outside: circle() and display: grid are supported by the browser. You can also use or, if one property out of a selection could match to enable the CSS you want to use: @supports (property1: value) or (property2: value) { CSS rules to apply } This can be particularly useful if a feature is vendor prefixed, as you can test for the standard property plus any vendor prefixes. Limitations of feature queries The @supports rule tests to see if the browser can parse one or more property/value pairs, and therefore i...
Mozilla CSS extensions - CSS: Cascading Style Sheets
s :-moz-only-whitespace ::-moz-page ::-moz-page-sequence ::-moz-pagebreak ::-moz-pagecontent :-moz-placeholderObsolete since Gecko 51 ::-moz-placeholderDeprecated since Gecko 51 ::-moz-progress-bar ::-moz-range-progress ::-moz-range-thumb ::-moz-range-track :-moz-read-only :-moz-read-write S ::-moz-scrolled-canvas ::-moz-scrolled-content ::-moz-scrolled-page-sequence ::-moz-selectionDeprecated since Gecko 62 :-moz-submit-invalid :-moz-suppressed ::-moz-svg-foreign-content T ::-moz-table ::-moz-table-cell ::-moz-table-column ::-moz-table-column-group ::-moz-table-outer ::-moz-table-row ::-moz-table-row-group :-moz-tree-cell :-moz-tree-cell-text :-moz-tree-cell-text(hover) :-moz-tree-checkbox :-moz-tree-column :-moz-tree-drop-feedback :-moz-tree-image :-...
Pseudo-elements - CSS: Cascading Style Sheets
o-elements. However, since this distinction was not present in older versions of the W3C spec, most browsers support both syntaxes for the original pseudo-elements. ...
CSS reference - CSS: Cascading Style Sheets
Web › CSS › Reference
-endscroll-margin-inline-startscroll-margin-leftscroll-margin-rightscroll-margin-topscroll-paddingscroll-padding-blockscroll-padding-block-endscroll-padding-block-startscroll-padding-bottomscroll-padding-inlinescroll-padding-inline-endscroll-padding-inline-startscroll-padding-leftscroll-padding-rightscroll-padding-topscroll-snap-alignscroll-snap-stopscroll-snap-typescrollbar-colorscrollbar-width::selectionselector()sepia()<shape>shape-image-thresholdshape-marginshape-outsidesize (@page)skew()skewX()skewY()::slottedspeak-as (@counter-style)src (@font-face)steps()<string>@stylesetstyleset()@stylisticstylistic()suffix (@counter-style)@supports@swashswash()symbols (@counter-style)symbols()system (@counter-style)Ttab-sizetable-layout:targettarget-counter()target-counters()target-text()text-aligntext-ali...
cursor - CSS: Cascading Style Sheets
Web › CSS › cursor
r is a pointer that indicates a link. Typically an image of a pointing hand. progress The program is busy in the background, but the user can still interact with the interface (in contrast to wait). wait The program is busy, and the user can't interact with the interface (in contrast to progress). Sometimes an image of an hourglass or a watch. Selection cell The table cell or set of cells can be selected. crosshair Cross cursor, often used to indicate selection in a bitmap. text The text can be selected. Typically the shape of an I-beam. vertical-text The vertical text can be selected. Typically the shape of a sideways I-beam. Drag & drop alias A...
font-family - CSS: Cascading Style Sheets
the shorthand property font to set font-size and other font related properties all at once. You should always include at least one generic family name in a font-family list, since there's no guarantee that any given font is available. This lets the browser select an acceptable fallback font when necessary. The font-family property specifies a list of fonts, from highest priority to lowest. Font selection does not simply stop at the first font in the list that is on the user's system. Rather, font selection is done one character at a time, so that if an available font does not have a glyph for a needed character, the latter fonts are tried. (However, this doesn't work in Internet Explorer 6 or earlier.) When a font is only available in some styles, variants, or sizes, those properties may also inf...
font-stretch - CSS: Cascading Style Sheets
ra-expanded 200% Description Some font families offer additional faces in which the characters are narrower than the normal face (condensed faces) or wider than the normal face (expanded faces). You can use font-stretch to select a condensed or expanded face from such fonts. If the font you are using does not offer condensed or expanded faces, this property has no effect. Font face selection The face selected for a given value of font-stretch depends on the faces supported by the font in question. If the font does not provide a face that exactly matches the given value, then values less than 100% map to a narrower face, and values greater than or equal to 100% map to a wider face. The table below demonstrates the effect of supplying various different percentage values of font-stret...
hyphens - CSS: Cascading Style Sheets
Web › CSS › hyphens
ine-wrapping only where characters inside the word suggest line break opportunities. See Suggesting line break opportunities below for details. auto The browser is free to automatically break words at appropriate hyphenation points, following whatever rules it chooses. However, suggested line break opportunities (see Suggesting line break opportunities below) will override automatic break point selection when present. Note: The auto setting's behavior depends on the language being properly tagged to select the appropriate hyphenation rules. You must specify a language using the lang HTML attribute to guarantee that automatic hyphenation is applied in that language. Suggesting line break opportunities There are two Unicode characters used to manually specify potential line break points withi...
Adding captions and subtitles to HTML5 video - Developer guides
uage they want to see. src is assigned a valid URL pointing to the relevant WebVTT subtitle file in each case. srclang indicates what language each subtitle files' contents are in. The default attribute is set on the English <track> element, indicating to the browser that this is the default subtitle file definition to use when subtitles have been turned on and the user has not made a specific selection. In addition to adding the <track> elements, we have also added a new button to control the subtitles menu that we will build. As a consequence, the video controls now look as follows: <div id="video-controls" class="controls" data-state="hidden"> <button id="playpause" type="button" data-state="play">Play/Pause</button> <button id="stop" type="button" data-state="stop">Stop</button> ...
Rich-Text Editing in Mozilla - Developer guides
to be implemented by the website. Similarly, setting contentEditable to "true" allows you to make individual elements of a document editable. Executing Commands When an HTML document has been switched to designMode, the document object exposes the document.execCommand method which allows one to run commands to manipulate the contents of the editable region. 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, calling execCommand will affect the currently active editable element. Internet Explorer Differences One major difference between Mozilla and Internet Explorer that affects designMode is the generated code in the editable document: while Internet Explorer uses...
Making content editable - Developer guides
iv> element whose contents the user can edit. <div contenteditable="true"> This text can be edited by the user. </div> Here's the above HTML in action: Executing commands When an HTML element has contenteditable set to true, the document.execCommand() method is made available. This lets you run commands to manipulate the contents of the editable region. Most commands affect the document's selection by, for example, applying a style to the text (bold, italics, etc), while others insert new elements (like adding a link) or affect an entire line (indenting). When using contentEditable, calling execCommand() will affect the currently active editable element. Differences in markup generation Use of contenteditable across different browsers has been painful for a long time because of the differ...
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
presents a color only in the hexadecimal string notation covered above. Example: Picking a color Let's look at a simple example, in which the user can choose a color. As the user adjusts the color, the border around the example changes to reflect the new color. After finishing up and picking the final color, the color picker's value is displayed. On macOS, you indicate that you've finalized selection of the color by closing the color picker window. HTML The HTML here creates a box that contains a color picker control (with a label created using the <label> element) and an empty paragraph element (<p>) into which we'll output some text from our JavaScript code. <div id="box"> <label for="colorPicker">Border color:</label> <input type="color" value="#8888ff" id="colorPicker"> <p id="o...
HTML attribute: capture - HTML: Hypertext Markup Language
t 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 voice sound like?:</label> <input type="file" id="soundFile" capture="user" accept="audio/*"> </p> <p> <label for="videoFile">Upload a video:</label> <input type="file" id="videoFile" capture="environment" accept="video/*"> </p> <p> <label for="imageFile">Upload a photo of yourself:</label> <i...
HTML attribute: multiple - HTML: Hypertext Markup Language
h a multiple attribute. Depending on the operating system, mouse users can hold the Ctrl, Command, or Shift keys and then click multiple options to select/deselect them. Keyboard users can select multiple contiguous items by focusing on the <select> element, selecting an item at the top or bottom of the range they want to select using the Up and Down cursor keys to go up and down the options. The selection of non-contiguous is not as well supported: items should be able to be selected and deselected by pressing Space , but support varies between browsers. Specifications Specification Status Comment HTML Living StandardThe definition of 'multiple attribute' in that specification. Living Standard HTML5The definition of 'multiple attribute' in that specifi...
<img>: The Image Embed element - HTML: Hypertext Markup Language
Web › HTML › Element › img
ce is assigned the default descriptor of 1x. It is incorrect to mix width descriptors and pixel density descriptors in the same srcset attribute. Duplicate descriptors (for instance, two sources in the same srcset which are both described with 2x) are also invalid. The user agent selects any of the available sources at its discretion. This provides them with significant leeway to tailor their selection based on things like user preferences or bandwidth conditions. See our Responsive images tutorial for an example. width The intrinsic width of the image in pixels. Must be an integer without a unit. usemap The partial URL (starting with #) of an image map associated with the element. Note: You cannot use this attribute if the <img> element is inside an <a> or <button> element. Depr...
<input type="date"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › date
Specifications Specification Status Comments ...
<input type="datetime-local"> - HTML: Hypertext Markup Language
Specifications Specification Status Comments ...
<input type="email"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › email
address; this is typically presented as a popup or drop-down menu containing the suggestions. While the specific user experience may vary from one browser to another, typically clicking in the edit box presents a drop-down of the suggested e-mail addresses. Then, as the user types, the list is filtered to show only matching values. Each typed character narrows down the list until the user makes a selection or types a custom value. Validation There are two levels of content validation available for email inputs. First, there's the standard level of validation offered to all <input>s, which automatically ensures that the contents meet the requirements to be a valid e-mail address. But there's also the option to add additional filtering to ensure that your own specialized needs are met, if you hav...
<input type="file"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › file
if(validFileType(file)) { para.textContent = `File name ${file.name}, file size ${returnFileSize(file.size)}.`; const image = document.createElement('img'); image.src = URL.createObjectURL(file); listItem.appendChild(image); listItem.appendChild(para); } else { para.textContent = `File name ${file.name}: Not a valid file type. Update your selection.`; listItem.appendChild(para); } list.appendChild(listItem); } } } The custom validFileType() function takes a File object as a parameter, then uses Array.prototype.includes() to check if any value in the fileTypes matches the file's type property. If a match is found, the function returns true. If no match is found, it returns false. // https://developer.mozilla.org/...
<input type="radio"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › radio
appearance property (with prefixes needed to support some browsers). By default, radio buttons (and checkboxes) are styled with the operating system's native styles for those controls. By specifying appearance: none, you can remove the native styling altogether, and create your own styles for them. Here we've used a border along with border-radius and a transition to create a nice animating radio selection. Notice also how the :checked pseudo-class is used to specify the styles for the radio button's appearance when selected. Compatibility note: If you wish to use the appearance property, you should test it very carefully. Although it is supported in most modern browsers, its implementation varies widely. In older browsers, even the keyword none does not have the same effect across different brow...
<input type="search"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › search
lone https://github.com/mdn/interactive-examples and send us a pull request. Value A DOMString representing the value contained in the search field. Events change and input Supported Common Attributes autocomplete, list, maxlength, minlength, pattern, placeholder, required, size. IDL attributes value Methods select(), setRangeText(), setSelectionRange(). Value The value attribute contains a DOMString representing the value contained in the search field. You can retrieve this using the HTMLInputElement.value property in JavaScript. searchTerms = mySearch.value; If no validation constraints are in place for the input (see Validation for more details), the value can be any text string or an empty string (""). Additional attribute...
<input type="text"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › text
b.com/mdn/interactive-examples and send us a pull request. Value A DOMString representing the text contained in the text field. Events change and input Supported Common Attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, required and size IDL attributes list, value Methods select(), setRangeText() and setSelectionRange(). Value The value attribute is a DOMString that contains the current value of the text entered into the text field. You can retrieve this using the value property in JavaScript. let theText = myTextInput.value; If no validation constraints are in place for the input (see Validation for more details), the value may be an empty string (""). Additional attributes In addition to th...
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
Web › HTML › Element › input
t content (such as a visual color picker or calendar date input), this method does nothing. setCustomValidity() Sets a custom message to display if the input element's value isn't valid. setRangeText() Sets the contents of the specified range of characters in the input element to a given string. A selectMode parameter is available to allow controlling how the existing content is affected. setSelectionRange() Selects the specified range of characters within a textual input element. Does nothing for inputs which aren't presented as text input fields. stepDown() Decrements the value of a numeric input by one, by default, or by the specified number of units. stepUp() Increments the value of a numeric input by one or by the specified number of units. CSS Inputs, being replaced elements, hav...
<kbd>: The Keyboard Input element - HTML: Hypertext Markup Language
Web › HTML › Element › kbd
Echoed input, below, for an example. Nesting a <samp> element inside a <kbd> element, on the other hand, represents input which is based on text presented by the system, such as the names of menus and menu items, or the names of buttons displayed on the screen. See the example under Representing onscreen input options below. You can define a custom style to override the browser's default font selection for the <kbd> element, although the user's preferences may potentially override your CSS. Examples Basic example <p>Use the command <kbd>help mycommand</kbd> to view documentation for the command "mycommand".</p> Representing keystrokes within an input To describe an input comprised of multiple keystrokes, you can nest multiple <kbd> elements, with an outer <kbd> element representing the...
<keygen> - HTML: Hypertext Markup Language
Web › HTML › Element › keygen
's chosen key strength (low, medium, high), using the curve named "secp384r1" for high, and the curve named "secp256r1" for medium keys. (Note: choice of the number of key strengths, default values for each strength, and the UI by which the user is offered a choice, are outside of the scope of this specification.) The <keygen> element is only valid within an HTML form. It will cause some sort of selection to be presented to the user for selecting key size. The UI for the selection may be a menu, radio buttons, or possibly something else. The browser presents several possible key strengths. Currently, two strengths are offered, high and medium. If the user's browser is configured to support cryptographic hardware (e.g. "smart cards") the user may also be given a choice of where to generate the key,...
<menuitem> - HTML: Hypertext Markup Language
Web › HTML › Element › menuitem
group of commands to be toggled as radio buttons when selected. May only be used where the type attribute is radio. type This attribute indicates the kind of command, and can be one of three values. command: A regular command with an associated action. This is the missing value default. checkbox: Represents a command that can be toggled between two different states. radio: Represent one selection from a group of commands that can be toggled as radio buttons. Example HTML content <!-- A <div> element with a context menu --> <div contextmenu="popup-menu"> Right-click to see the adjusted context menu </div> <menu type="context" id="popup-menu"> <menuitem type="checkbox" checked>Checkbox</menuitem> <hr> <menuitem type="command" label="This command does nothing" icon="https://...
<picture>: The Picture element - HTML: Hypertext Markup Language
Web › HTML › Element › picture
utes. Usage notes You can use the object-position property to adjust the positioning of the image within the element's frame, and the object-fit property to control how the image is resized to fit within the frame. Note: Use these properties on the child <img> element, not the <picture> element. Examples These examples demonstrate how different attributes of the <source> element change the selection of the image inside <picture>. The media attribute The media attribute specifies a media condition (similar to a media query) that the user agent will evaluate for each <source> element. If the <source>'s media condition evaluates to false, the browser skips it and evaluates the next element inside <picture>. <picture> <source srcset="mdn-logo-wide.png" media="(min-width: 600px)"> <img sr...
HTML elements reference - HTML: Hypertext Markup Language
Web › HTML › Element
progress bar. <select> The HTML <select> element represents a control that provides a menu of options <textarea> The HTML <textarea> element represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example a comment on a review or feedback form. Interactive elements HTML offers a selection of elements which help to create interactive user interface objects. Element Description <details> The HTML Details Element (<details>) creates a disclosure widget in which information is visible only when the widget is toggled into an "open" state. <dialog> The HTML <dialog> element represents a dialog box or other interactive component, such as a di...
draggable - HTML: Hypertext Markup Language
wing values: true: the element can be dragged. false: the element cannot be dragged. This attribute is enumerated and not Boolean. A value of true or false is mandatory, and shorthand like <img draggable> is forbidden. The correct usage is <img draggable="false">. If this attribute is not set, its default value is auto, which means drag behavior is the default browser behavior: only text selections, images, and links can be dragged. For other elements, the event ondragstart must be set for drag and drop to work, as shown in this comprehensive example. Specifications Specification Status Comment HTML Living StandardThe definition of 'draggable' in that specification. Living Standard No change from latest snapshot, HTML 5.1 HTML 5.2The definition ...
Resource URLs - HTTP
n Firefox 57 (Quantum). In the past, web content was able to access whatever resource: URIs were desired -- not only Firefox's internal resources, but also extensions' assets. Now this behavior is prohibited by default. It is however still necessary for Firefox to load resources in web content under certain circumstances. For example, if you open the view source page (View Page Source or View Selection Source), you will find it requires viewsource.css through a resource: URI. Resources that have to be exposed to web content have been moved to a new location named resource://content-accessible/, which is isolated and only contains non-sensitive resources. In this way we can keep essential resources exposed and have most threats eliminated. Note: It is recommended that web and extension devel...
Loops and iteration - JavaScript
to be true.) The statement executes. To execute multiple statements, use a block statement ({ ... }) to group those statements. If present, the update expression incrementExpression is executed. Control returns to Step 2. Example In the example below, the function contains a for statement that counts the number of selected options in a scrolling list (a <select> element that allows multiple selections). The for statement declares the variable i and initializes it to 0. It checks that i is less than the number of options in the <select> element, performs the succeeding if statement, and increments i by after each pass through the loop. <form name="selectForm"> <p> <label for="musicTypes">Choose some music types, then click the button below:</label> <select id="musicTypes" name="musi...
MathML attribute reference - MathML
he default value is "&quot;". scriptlevel <mstyle> Controls mostly the font-size. The higher the scriptlevel, the smaller the font size. scriptminsize <mstyle> Specifies a minimum font size allowed due to changes in scriptlevel. scriptsizemultiplier <mstyle> Specifies the multiplier to be used to adjust font size due to changes in scriptlevel. selection <maction> The child element which is addressed by the action. separator <mo> There is no visual effect for this attribute, but it specifies whether the operator is a separator (such as commas). separators <mfenced> A sequence of zero or more characters to be used for different separators. Unimplemented shift <msgroup> Unimplemented side...
Digital audio concepts - Web media technologies
dwidth required to broadcast the audio; this is especially important for live streams and teleconferencing Psychoacoustics 101 Diving into the details of psychoacoustics and how audio compression works is far beyond the scope of this article, but it is useful to have a general idea of how audio gets compressed by common algorithms can help understand and make better decisions about audio codec selection. Lossy compression algorithms generally use psychoacoustics to determine which components of an audio waveform can be lost or subdued in some way that can improve compression ratios while minimizing the audible effect for the target listeners. By manipulating the waveform to make it easier to compress, or by removing components of the sound that aren't really heard, the waveform becomes simpler,...
Web video codec guide - Web media technologies
our videos? The ability to provide a fallback option vastly simplifies the decision-making process. Are there any browsers you're willing to sacrifice compatibility with? How old is the oldest version of web browser you need to support? For example, do you need to work on every browser shipped in the past five yeras, or just the past one year? In the sections below, we offer recommended codec selections for specific use cases. For each use case, you'll find up to two reccommendations. If the codec which is considered best for the use case is proprietary or may require royalty payments, then two options are provided: first, an open and royalty-free option, followed by the proprietary one. If you are only able to offer a single version of each video, you can choose the format that's most appropr...
Understanding latency - Web Performance
etwork connection. In the developer tools, under the network table, you can switch the throttling option to 2G, 3G, etc. Different browser developer tools have different preset options, the characteristics emulated include download speed, upload speed, and minimum latency, or the minimum amount of type it takes to send a packet of data. ...
Web technology reference
If you're new to web development, consider starting with our learning area, which is filled with step-by-step tutorials that will guide you from total webdev newbie to at least semi-pro! HTML -- Structuring the web HyperText Markup Language is used to define and describe semantically the content (markup) of a web page in a well-structured format. ...
<altGlyph> - SVG: Scalable Vector Graphics
Web › SVG › Element › altGlyph
Usage context CategoriesText content element, Text content child elementPermitted contentAny elements or character data Attributes x This attribute defines the corresponding absolute x-coordinates for rendering the element. Value type: <list-of-coordinates> ; Default value: Absolute x-coordinate of ancestor <text> or <tspan>; Animatable: yes y This attribute defines the corresponding absolute y-coordinates for rendering the element. ...
SVG documentation index - SVG: Scalable Vector Graphics
Web › SVG › Index
of the SVG elements. 294 <a> Element, Reference, SVG, SVG Container The <a> SVG element creates a hyperlink to other web pages, files, locations in the same page, email addresses, or any other URL. It is very similar to HTML's <a> element. 295 <altGlyph> Deprecated, Element, Reference, SVG, SVG Text Content The <altGlyph> SVG element allows sophisticated selection of the glyphs used to render its child character data. 296 <altGlyphDef> Deprecated, Element, NeedsExample, Reference, SVG, SVG Text Content The <altGlyphDef> SVG element defines a substitution representation for glyphs. 297 <altGlyphItem> Deprecated, Element, NeedsExample, Reference, SVG, SVG Text Content The <altGlyphItem> element provides a set of cand...
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
SVG applying to whole document content Implementation status unknown Presentation attributes on any SVG namespaced element Implementation status unknown Display behavior of <style> defined via UA style sheet Implementation status unknown !important user agent style rules controlling never-rendered elements Implementation status unknown :focus and ::selection styles Implementation status unknown Geometry Change Notes x and y attributes removed from <pattern> and <filter> Implementation status unknown auto value of width and height computes to 0 but 100% on <svg> Not implemented Coordinate Systems, Transformations and Units Change Notes Exception for bad values on SVGMa...
Texts - SVG: Scalable Vector Graphics
Web › SVG › Tutorial › Texts
lements text can be colorized with the fill attribute and given a stroke with the stroke attribute. Both may also refer to gradients or patterns, which makes simple coloring text in SVG very powerful compared to CSS 2.1. Setting font properties An essential part of a text is the font in which it is displayed. SVG offers a set of attributes, many similar to their CSS counterparts, to enable font selection. Each of the following properties can be set as an attribute or via a CSS declaration: font-family, font-style, font-weight, font-variant, font-stretch, font-size, font-size-adjust, kerning, letter-spacing, word-spacing and text-decoration. Other text-related elements tspan This element is used to mark up sub-portions of a larger text. It must be a child of a text element or another tspan elem...