Search completed in 0.89 seconds.
Selection - Web APIs
a
selection object represents the range of text selected by the user or the current position of the caret.
... to obtain a
selection object for examination or manipulation, call window.get
selection().
... a user may make a
selection from left to right (in document order) or right to left (reverse of document order).
...And 52 more matches
nsISelectionController
content/base/public/nsi
selectioncontroller.idlscriptable please add a summary to this article.
... inherits from: nsi
selectiondisplay last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void characterextendforbackspace(); native code only!
... void charactermove(in boolean forward, in boolean extend); boolean checkvisibility(in nsidomnode node, in short startoffset, in short endoffset); void completemove(in boolean forward, in boolean extend); void completescroll(in boolean forward); boolean getcaretenabled(); short getdisplay
selection(); nsi
selection get
selection(in short type); void intralinemove(in boolean forward, in boolean extend); void linemove(in boolean forward, in boolean extend); void pagemove(in boolean forward, in boolean extend); void repaint
selection(in short type); void scrollhorizontal(in boolean left); ...
...And 45 more matches
nsISelection
nsi
selection content/base/public/nsi
selection.idlscriptable ???
...as a service: var
selection = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsi
selection); method overview void addrange(in nsidomrange range); void collapse(in nsidomnode parentnode, in long offset); [noscript,notxpcom,nostdcall] boolean collapsed(); void collapsenative(in nsidomnode parentnode, in long offset); na...
... nsidomrange getrangeat(in long index); void modify(in domstring alter, in domstring direction, in domstring granularity); void removeallranges(); void removerange(in nsidomrange range); void selectallchildren(in nsidomnode parentnode); void
selectionlanguagechange(in boolean langrtl); domstring tostring(); attributes attribute type description anchornode nsidomnode returns the node in which the
selection begins.
...And 31 more matches
nsITreeSelection
layout/xul/base/src/tree/public/nsitree
selection.idlscriptable this interface is used by the tree widget to get information about what is selected.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void adjust
selection(in long index, in long count); void clearrange(in long startindex, in long endindex); void clear
selection(); void getrangeat(in long i, out long min, out long max); long getrangecount(); void invalidate
selection(); void invert
selection(); boolean isselected(in long index); void rangedselect(in long startindex, in long endindex, in boolean augment); void select(in long index); void selectall(); void timedselect(in long index, in long delay); void toggleselect(in long index); attributes attribute type description count long the number of rows cu...
...this is not a reliable method of determining the selected row, as the
selection may include multiple rows, or the focused row may not even be selected.
...And 21 more matches
nsISelectionPrivate
dom/base/nsi
selectionprivate.idlscriptable internal support for content
selection handling.
... method overview void add
selectionlistener(in nsi
selectionlistener newlistener); void endbatchchanges(); void getcachedframeoffset(in nsiframe aframe, in print32 inoffset, in nspointref apoint); native code only!
... nsienumerator getenumerator(); nsframe
selection getframe
selection(); native code only!
...And 17 more matches
selection - Archive of obsolete content
get and set text and html
selections in the current web page.
... usage registering for
selection notifications to be notified when the user makes a
selection, register a listener for the "select" event.
... each listener will be called after a
selection is made.
...And 16 more matches
Tree Selection - Archive of obsolete content
the user may also change the
selection by using the cursor keys.
...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.
...And 15 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.get
selection() or document.get
selection() 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().
...And 12 more matches
HTMLInputElement.setSelectionRange() - Web APIs
the htmlinputelement.set
selectionrange() 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.
...And 10 more matches
Window.getSelection() - Web APIs
the window.get
selection() method returns a
selection object representing the range of text selected by the user or the current position of the caret.
... syntax
selection = window.get
selection(); 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.
...And 9 more matches
DocumentOrShadowRoot.getSelection() - Web APIs
the get
selection() 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.get
selection() parameters none.
... returns a
selection object.
...And 8 more matches
Selection.setBaseAndExtent() - Web APIs
the setbaseandextent() method of the
selection interface sets the
selection to be a range including all or parts of two specified dom nodes, and any content located between them.
... 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.
...And 8 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.
...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.
...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.
...And 7 more matches
Focus and Selection - Archive of obsolete content
« previousnext » the section will describe how to handle the focus and
selection of elements.
... 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.
...And 6 more matches
mozbrowserselectionstatechanged
the mozbrowser
selectionstatechanged event is fired when the text selected inside the browser <iframe> content changes.
... 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.
...And 6 more matches
nsISelection2
content/base/public/nsi
selection2.idlscriptable please add a summary to this article.
... 1.0 66 introduced gecko 1.8 obsolete gecko 8.0 inherits from: nsi
selection 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 nsi
selectionprivate interface.
... void scrollintoview(in short aregion, in boolean aissynchronous, in short avpercent, in short ahpercent); attributes attribute type description type short returns the type of the
selection (see nsi
selectioncontroller for available constants).
...And 6 more matches
Selection.modify() - Web APIs
the
selection.modify() method applies a change to the current
selection or cursor position, using simple textual commands.
...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.
...And 6 more matches
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.
...And 5 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.
...And 5 more matches
Selection.type - Web APIs
the type read-only property of the
selection interface returns a domstring describing the type of the current
selection.
... syntax value = sel.type value a domstring describing the type of the current
selection.
... possible values are: none: no
selection has currently been made.
...And 4 more matches
nsISelection3
content/base/public/nsi
selection3.idlscriptable please add a summary to this article.
... 1.0 66 introduced gecko 2.0 obsolete gecko 8.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) in gecko 8.0 this interface was merged into the nsi
selection interface.
... method overview void modify(in domstring alter, in domstring direction, in domstring granularity); methods modify() modifies the
selection.
...And 3 more matches
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.
...And 3 more matches
Selection.rangeCount - Web APIs
the
selection.rangecount read-only property returns the number of ranges in the
selection.
...after the user clicks on the page, rangecount is 1, even if no
selection is visible.
...scripting can be used to make the
selection contain more than one range.
...And 3 more matches
GlobalEventHandlers.onselectionchange - Web APIs
the on
selectionchange 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.on
selectionchange = functionref; value functionref is a function name or a function expression.
...And 2 more matches
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.
...And 2 more matches
Selection.collapse() - Web APIs
the
selection.collapse() method collapses the current
selection to a single point.
...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.
...And 2 more matches
Selection.extend() - Web APIs
the
selection.extend() method moves the focus of the
selection to a specified point.
... the anchor of the
selection does not move.
... the
selection will be from the anchor to the new focus, regardless of direction.
...And 2 more matches
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.
...And 2 more matches
Selection.toString() - Web APIs
the
selection.tostring() method returns a string currently being represented by the
selection object, i.e.
... syntax sel.tostring() return value a string representing the
selection.
... in javascript, this method is called automatically when a function the
selection object is passed to requires a string: alert(window.get
selection()) // what is called alert(window.get
selection().tostring()) // what is actually being effectively called.
...And 2 more matches
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.
PublicKeyCredentialCreationOptions.authenticatorSelection - Web APIs
authenticator
selection, an optional property of the publickeycredentialcreationoptions dictionary, is an object giving criteria to filter out the authenticators to be used for the creation operation.
... syntax authenticator
selection = publickeycredentialcreationoptions.authenticator
selection value an object with the following properties: authenticatorattachmentoptional a string which is either "platform" or "cross-platform".
... examples var publickey = { authenticator
selection:{ authenticatorattachment: "cross-platform", requireresidentkey: true, userverification: "required" }, challenge: new uint8array(26) /* this actually is given from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(26), /* to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", },...
...unction (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'authenticator
selection' in that specification.
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.
... 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.get
selection(); 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.
Selection.removeRange() - Web APIs
the
selection.removerange() method removes a range from a
selection.
... syntax sel.removerange(range) parameters range a range object that will be removed to the
selection.
...*/ s = window.get
selection(); 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.
... see also
selection, the interface it belongs to.
Selection.selectAllChildren() - Web APIs
the
selection.selectallchildren() method adds all the children of the specified node to the
selection.
... previous
selection is lost.
...parentnode itself is not part 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>© 2019</p> </footer> javascript const button = document.queryselector('button'); const footer = document.queryselector('footer'); button.addeventlistener('click', (e) => { window.get
selection().selectallchildren(footer); }); result specifications specification status comment
selection apithe definition of '
selection.selectallchildren()' in that specification.
ExtendSelection
« nsiaccessible page summary this method extends the current
selection from its current accessible anchor node to this accessible.
... void extend
selection(); exceptions thrown ns_error_not_implemented always.
... see also nsiaccessible.setselected() nsiaccessible.take
selection() ...
nsISelectionImageService
layout/base/nsi
selectionimageservice.idlnot scriptable please add a summary to this article.
... 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.
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.
...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.
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.
... specifications specification status comment
selection apithe definition of '
selection.collapsetoend()' in that specification.
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.
... specifications specification status comment
selection apithe definition of '
selection.collapsetostart()' in that specification.
Selection.deleteFromDocument() - Web APIs
the deletefromdocument() method of the
selection interface deletes the selected text from the document's dom.
...upon clicking the button, the window.get
selection() method gets the selected text, and the deletefromdocument() method removes it.
...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', delete
selection); function delete
selection() { let
selection = window.get
selection();
selection.deletefromdocument(); } result specifications specification status comment
selection apithe definition of '
selection.deletefromdocument()' in that specification.
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.
...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.
Selection.getRangeAt() - Web APIs
the
selection.getrangeat() method returns a range object representing one of the ranges currently selected.
...a negative number or a number greater than or equal to
selection.rangecount will result in an error.
... example let ranges = []; sel = window.get
selection(); 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.
Selection.removeAllRanges() - Web APIs
the
selection.removeallranges() method removes all ranges from the
selection, leaving the anchornode and focusnode properties equal to null and leaving nothing selected.
... specifications specification status comment
selection apithe definition of '
selection.removeallranges()' in that specification.
... see also
selection, the interface it belongs to.
TakeSelection
void take
selection(); exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... see also nsiaccessible.setselected() nsiaccessible.extend
selection() ...
Document: selectionchange event - Web APIs
the
selectionchange event of the
selection api is fired when the current text
selection on a document is changed.
... bubbles no cancelable no interface event event handler property on
selectionchange examples // addeventlistener version document.addeventlistener('
selectionchange', () => { console.log(document.get
selection()); }); // on
selectionchange version document.on
selectionchange = () => { console.log(document.get
selection()); }; specifications specification status comment
selection apithe definition of '
selectionchange' in that specification.
setSelectionRange - Archive of obsolete content
« xul reference home set
selectionrange( 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.
Editor Embedding Guide - Archive of obsolete content
get the current command state of a given command -- getcommandstate: commandmanager->getcommandstate(acommand,acommandparams) index of commands and parameters cmd_bold toggles bold style on
selection.
... getcommandstate "state_all"(boolean), "state_begin"(boolean), "state_end"(boolean), "state_mixed"(boolean), "state_enabled" (boolean) docommand no parameters example normal bold cmd_italics toggles italics style on
selection.
... getcommandstate "state_all"(boolean), "state_begin"(boolean), "state_end"(boolean), "state_mixed"(boolean), "state_enabled" (boolean) docommand no parameters example normal italics cmd_underline toggles underline on
selection.
...And 60 more matches
Index - Web APIs
952 document.querycommandstate() api, dom, needsexample, reference the querycommandstate method will tell you if the current
selection has a certain document.execcommand() command applied.
... 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.
... 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.
...And 51 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 check
selectionstateforanonymousbuttons(in nsi
selection a
selection); 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 get
selectioncontainer(); void ignorespuriousdragevent(in boolean aignorespuriousdragevent); void increasefontsize(); void indent(in astring aindent); void insertelementat
selection(in nsidomelement aelement, in boolean adelete
selection); 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 adelete
selection); void insertlinkaround
selection(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 a
selectiontype); void rebuilddocumentfromsource(in astring asourcestring); void removealldefaultproperties(); void removeallinlineproperties(); void removedefaultproperty(in nsiatom aproperty, in astring aattribute, in astring avalue...
...And 45 more matches
Midas
in addition to the built-in commands, advanced editing can be done by manipulating the
selection and range objects.
... 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.
...And 33 more matches
Document.execCommand() - Web APIs
most commands affect the document's
selection (bold, italics, etc.), while others insert new elements (adding a link), or affect an entire line (indenting).
... bold toggles bold on/off for the
selection or at the insertion point.
...(not supported by internet explorer.) copy copies the current
selection to the clipboard.
...And 32 more matches
IME handling guide
each clause is represented with
selection in the editor.
... from chrome script, you can check it with nsi
selectioncontroller.
... in native code, you can access it with either nsi
selectioncontroller or mozilla::
selectiontype (the latter is recommended because of type safer).
...And 29 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 send
selectionsetevent(in unsigned long aoffset, in unsigned long alength, in boolean areverse); obsolete since gecko 31.0 boolean send
selectionsetevent(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); ...
... 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 20 more matches
Index - Archive of obsolete content
56
selection add-on sdk get and set text and html
selections in the current web page.
... 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).
... 528
selection jetpack's
selection api provides a method for detecting the
selections made by the user.
...And 18 more matches
richlistbox - Archive of obsolete 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 additemto
selection, appenditem, clear
selection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invert
selection, movebyoffset, removeitemat, removeitemfrom
selection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitem
selection examples <richlistbox> <richlistitem> <description>a xul description!</description> ...
...And 17 more matches
listbox - Archive of obsolete content
attributes disabled, disablekeynavigation, preference, rows, seltype, suppressonselect, tabindex, value properties accessibletype, currentindex, currentitem, disabled, disablekeynavigation, itemcount, listboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemto
selection, appenditem, clear
selection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invert
selection, movebyoffset, removeitemat, removeitemfrom
selection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitem
selection examples <listbox id="thelist"> ...
... seltype type: one of the values below used to indicate whether multiple
selection is allowed.
...(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.
...And 14 more matches
nsIClipboardCommands
inherits from: nsisupports last changed in gecko 1.7 method overview boolean cancopyimagecontents(); boolean cancopyimagelocation(); boolean cancopylinklocation(); boolean cancopy
selection(); boolean cancut
selection(); boolean canpaste(); void copyimagecontents(); void copyimagelocation(); void copylinklocation(); void copy
selection(); void cut
selection(); void paste(); void selectall(); void selectnone(); methods cancopyimagecontents() returns whether we can copy an image's contents.
...cancopy
selection() returns whether there is a
selection and it is copyable.
... boolean cancopy
selection(); parameters none.
...And 14 more matches
Document - Web APIs
document.on
selectionchange is an eventhandler representing the code to be called when the
selectionchange 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.
...And 14 more matches
Event reference
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).
... drag & drop events event name fired when drag an element or text
selection is being dragged (fired continuously every 350ms).
... dragenter a dragged element or text
selection enters a valid drop target.
...And 14 more matches
IAccessibleText
method overview hresult add
selection([in] long startoffset, [in] long endoffset ); [propget] hresult attributes([in] long offset, [out] long startoffset, [out] 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] hre...
...sult ncharacters([out] long ncharacters ); [propget] hresult newtext([out] ia2textsegment newtext ); [propget] hresult n
selections([out] long n
selections ); [propget] hresult offsetatpoint([in] long x, [in] long y, [in] enum ia2coordinatetype coordtype, [out] long offset ); [propget] hresult oldtext([out] ia2textsegment oldtext ); hresult remove
selection([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 ...
...set
selection([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, [out] long startoffset, [out] long endoffset, [out] bstr text ); [propget] hresult textatoffset([in] long offset, [in] enum ia2textboundarytype boundarytype, [out] long startoffset, [out] long endoffset, [out] bstr text ); [propget] hresult textbeforeoffset([in] long offset, [in] enum ia2textboundarytype boundarytype, [out] long startoffset, [out] long endoffset, [out] bstr text ); methods add
selection() adds a text()
selection().
...And 12 more matches
TextRange - Web APIs
it is implemented in ie, then a textrange object can be created by element.createtextrange() or document.
selection.createrange().
...alternative
selection and range interfaces can be used.
... textrange.execcommand() executes a command on the current document, the current
selection, or the given scope.
...And 12 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 drop
selection(); number getcaretoffset(); object getcaretposition(); object get
selection(); void setcaretoffset(number aoffset); void setcaretposition(number aline, [optional] number acolumn, [optional] number aalign); void set
selection(number astart, number aend); breakpoint management void addbreakp...
... sourceeditor.events.
selection "
selection" fired when the current
selection in the editor changes.
... drop
selection() deselects the currently selected text.
...And 11 more matches
Index
256 extend
selection this method extends the current
selection from its current accessible anchor node to this accessible.
... 285 setselected this method adds or remove this accessible to the current
selection.
... 287 take
selection this method selects this accessible node only.
...And 11 more matches
nsIEditor
66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 18.0 (firefox 18.0 / thunderbird 18.0 / seamonkey 2.15) method overview [noscript] void init(in nsidomdocument doc, in nsicontent aroot, in nsi
selectioncontroller aselcon, in unsigned long aflags); void setattributeorequivalent(in nsidomelement element, in astring sourceattrname, in astring sourceattrvalue, in boolean asuppresstransaction); void removeattributeorequivalent(in nsidomelement element, in domstring sourceattrname, in boolean asuppresstransaction); void postcreate(); void predestroy(in boolean adestroyingframes); ...
... selected content removal void delete
selection(in short action, in short stripwrappers); document info and file methods void resetmodificationcount(); long getmodificationcount(); void incrementmodificationcount(in long amodcount); void incrementmodificationcount(in long amodcount); transaction methods void dotransaction(in nsitransaction txn); void enableundo(in boolean enable); void undo(in unsigned long count); void canundo(out boolean isenabled, out boolean canundo); void redo(in unsigned long count); void canredo(out boolean isenabled, out boolean canredo); void begintransaction(); void endtransaction(); void beginplaceholdertransaction(in nsiatom ...
...name); void endplaceholdertransaction(); boolean shouldtxnset
selection(); void setshouldtxnset
selection(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(); void paste(in long a
selectiontype); boolean canpaste(in long a
selectiontype);
selection methods void selectall(); void beginningofdocument(); void endofdocument(); drag/drop methods boolean candrag(in nsidomevent aevent); void dodrag(in nsido...
...And 11 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 addchildto
selection(in long index); void clear
selection(); nsiarray getselectedchildren(); boolean ischildselected(in long index); nsiaccessible ref
selection(in long index); void removechildfrom
selection(in long index); boolean selectall
selection(); attributes attribute type description
selectioncount long the number of accessible children currently selected.
... constants constant value description e
selection_add 0 e
selection_remove 1 e
selection_getstate 2 methods addchildto
selection() adds the specified accessible child of the object to the object's
selection.
...And 10 more matches
Index - Archive of obsolete content
443 additemto
selection xul methods, xul reference no summary!
... 461 clear
selection xul methods, xul reference no summary!
... 526 invert
selection xul methods, xul reference no summary!
...And 9 more matches
HTMLTextAreaElement - Web APIs
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.
...
selectionend unsigned long: returns / sets the index of the end of selected text.
...And 9 more matches
ARIA: listbox role - Accessibility
up/down arrows navigate the list, and pressing shift + up/down arrows will move and extend the
selection.
...for selectable list items, space toggles their
selection, shift+space can be used to select contiguous items, ctrl+arrow moves without selecting, and ctrl+space can be used to select non-contiguous items.
... 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.
...And 8 more matches
nsIPlacesView
for example, the representation of
selection differs between trees, menus, and other such lists.
... controllers should not be concerned with these details; controller code should not be required to decode the meaning of a
selection depending on what kind of view produced the
selection.
... rather, each view is responsible for translating its own
selection format into one the controller can understand.
...And 7 more matches
context-menu - Archive of obsolete content
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.
...
selectioncontext() this context occurs when the menu is invoked on a page in which the user has made a
selection.
... this item implements the aforementioned search example: var cm = require("sdk/context-menu"); cm.item({ label: "search google", context: cm.
selectioncontext(), contentscript: 'self.on("context", function () {' + ' var text = window.get
selection().tostring();' + ' if (text.length > 20)' + ' text = text.substr(0, 20) + "...";' + ' return "search google for " + text;' + '});' }); the "context" listener gets the window's current
selection, truncating it i...
...And 6 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, set
selectionrange examples <textbox type="autocomplete" autocompletesearch="history"/> attributes accesskey type: character this should be set to a character that is used...
...for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user
selection of the menuitem.
...
selectionend type: integer get or set the end of the selected portion of the field's text.
...And 6 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, set
selectionrange, sy...
...for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user
selection of the menuitem.
...
selectionend type: integer get or set the end of the selected portion of the field's text.
...And 6 more matches
Accessible Toolkit Checklist
get_acc
selection: which children of this item are selected?
... 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.
...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
Basics
</p> <div> <math display="block"> <mtable> <mtr> <mtd> <mtable align="axis" columnalign="left left left"> <mtr> <mtd> <maction id="a11" actiontype="toggle"
selection="2"> <msup> <mrow> <mo>(</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="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="a22" 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> <m...
...sup> <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> <mtd> <maction id="a23" actiontype="toggle"
selection="2"> <msup> <mrow> <mo>(</mo> <mrow> <mi>x</mi> <mo>+</mo> <mi>y</mi> </mrow> <mo>)</mo> </mrow> <mn>3</mn> </msup> <mrow> <msup> <mi>x</mi> <mn>3</mn> </msup> <mo>+</mo> <mrow> <mn>3</mn> <mo>&invisibletimes;</mo> <msup> <mi>x</mi> <mn>2</mn> </msup> <mo>&invisibletimes;</mo> <mi>y</mi> </mrow> <mo>+</mo> <mrow> <mn>3</mn> <mo>&invisibletimes;</mo> <mi>x</mi> <mo>&invisibletimes;</mo> <msup> <mi>y</mi> <mn>2</mn> </msup> </mrow> <mo>+</mo> <msup> <mi>y</mi> <mn>3</mn> </msup> </mrow> </maction> </mtd> </mtr> <mtr> <mtd> <maction...
...And 6 more matches
nsIAccessibleText
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void add
selection(in long startoffset, in long endoffset); nsiaccessible getattributerange(in long offset, out long rangestartoffset, out long rangeendoffset); obsolete since gecko 1.9.1 wchar getcharacteratoffset(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 coordtyp...
...e); void get
selectionbounds(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); 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 remove
selection(in long
selectionnum); void scrollsubstringto(in long startindex, in long endindex, in unsigned lon...
...g scrolltype); void scrollsubstringtopoint(in long startindex, in long endindex, in unsigned long coordinatetype, in long x, in long y); void set
selectionbounds(in long
selectionnum, in long startoffset, in long endoffset); attributes attribute type description caretoffset long the current current caret offset.
...And 6 more matches
Manipulating Lists - Archive of obsolete content
list
selection the nsidomxulselectcontrolelement interface provides two additonal properties, selectedindex and selecteditem.
... changing the
selection all of the
selection related properties described above may also be assigned a new value to change the
selection.
...); if (val != null) document.getelementbyid('level').selectedindex = val - 1; } </script> <hbox align="center"> <label value="enter a number from 1 to 3:"/> <textbox id="number"/> <button label="select" oncommand="doselect();"/> </hbox> <radiogroup id="level"> <radio label="excellent"/> <radio label="good"/> <radio label="poor"/> </radiogroup> listboxes also support multiple
selection and the functions of the nsidomxulmultiselectcontrolelement interface.
...And 5 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, set
selectionrange 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...
...
selectionend type: integer get or set the end of the selected portion of the field's text.
... use in conjuction with the
selectionstart property.
...And 5 more matches
tree - Archive of obsolete content
onselect type: script code this event is sent to a tree when a row is selected, or whenever the
selection changes.
...the onselect event will be sent for each item added to or removed from the
selection.
... seltype type: one of the values below used to indicate whether multiple
selection is allowed.
...And 5 more matches
XForms Select1 Element - Archive of obsolete content
single-node binding special
selection - this attribute, when set to 'open', allows the user to provide free entry to the list.
... 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.
...xhtml widget characteristics analogous widgets is <html:select/> visual grouping by choices element is supported
selection="open" is supported if incremental attribute value is false, the bound node is updated when the select1 control is blurred (i.e.
...And 5 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 geturisfor
selection([array, size_is(count)] out string uris, out unsigned long count); void getindicesfor
selection([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...
... keyforfirstselectedmessage nsmsgkey readonly: the key of the first message in the current
selection.
... geturisfor
selection() gets an arry of urls for all currently selected messages.
...And 5 more matches
HTMLInputElement.setRangeText() - Web APIs
defaults to the current
selectionstart value (the start of the user's current
selection).
...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.
...And 5 more matches
HTMLInputElement - Web APIs
selectionstart unsigned long: returns / sets the beginning index of the selected text.
...
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.
...And 5 more matches
Mozilla’s UAAG evaluation report
ccess"); or turn it off everywhere: user_pref("capability.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.
... checkpoint title status notes/plans 7.1 focus and
selection conventions.
...And 4 more matches
nsIAccessibleEvent
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.
...And 4 more matches
DragEvent - Web APIs
event types drag this event is fired when an element or text
selection is being dragged.
... 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.
...And 4 more matches
Gecko events
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.
...And 3 more matches
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 supports
selectionclipboard(); 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 k
selectionclipboard 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 using.
... constant value description k
selectionclipboard 0 clipboard for
selection.
...And 3 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...
...
selection nsitree
selection the
selection for this view.
...this method is only called if the
selection type is cell or text.
...And 3 more matches
Call Tree - Firefox Developer Tools
the screenshot below shows the output of a program that compares three sorting algorithms - bubble sort,
selection sort, and quicksort.
...we have about six times as many samples in bubble sort as in
selection sort, and 13 times as many as in quicksort.
...but swap() was reached by two different paths: both bubblesort() and
selectionsort() use it.
...And 3 more matches
Add a Context Menu Item - Archive of obsolete content
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.get
selection().tostring();' + ' self.postmessage(text);' + '});', onmessage: function (
selectiontext) { console.log(
selectiontext); } }); try it: run the add-o...
...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.
...the context-menu module provides a number of simple built-in contexts, including this
selectioncontext(), which means: display the item when something on the page is selected.
...And 2 more matches
Using the Editor from XUL - Archive of obsolete content
nstexteditorfocuslistener editor responds to focus and blur events by showing and hiding the caret or
selection as appropriate.
... 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 code first deletes the
selection if there is one (e.g.
...And 2 more matches
-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.
...in addition,
selection will start even if an onclick, onmsgesturetap, or onmouseup handler is present.
... none the grippers are always off and default touch
selection functionality is not provided.
...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
nsIAccessible
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.take
selection() and nsiaccessible.extend
selection().
... setselected this method adds or remove this accessible to the current
selection.
...And 2 more matches
nsIDOMNSHTMLDocument
inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void captureevents(in long eventflags); void clear(); boolean execcommand(in domstring commandid, in boolean doshowui, in domstring value); boolean execcommandshowhelp(in domstring commandid); obsolete since gecko 14.0 domstring get
selection(); nsidomdocument open(in acstring acontenttype, in boolean areplace); boolean querycommandenabled(in domstring commandid); boolean querycommandindeterm(in domstring commandid); boolean querycommandstate(in domstring commandid); boolean querycommandsupported(in domstring commandid); domstring querycommandtext(in domstring commandid); obsolete ...
...get
selection() domstring get
selection(); parameters none.
... return value the text of the current
selection, the same as window.get
selection.tostring().
...And 2 more matches
nsIEditorMailSupport
inherits from: nsisupports last changed in gecko 1.7 method overview nsisupportsarray getembeddedobjects(); nsidomnode insertascitedquotation(in astring aquotedtext, in astring acitation, in boolean ainserthtml); nsidomnode insertasquotation(in astring aquotedtext); void inserttextwithquotations(in domstring astringtoinsert); void pasteascitedquotation(in astring acitation, in long a
selectiontype); void pasteasquotation(in long a
selectiontype); void rewrap(in boolean arespectnewlines); void stripcites(); methods getembeddedobjects() get a list of img and object tags in the current document.
...if the
selection is not collapsed, the
selection is deleted and the insertion takes place at the resulting collapsed
selection.
... void inserttextwithquotations( in domstring astringtoinsert ); parameters astringtoinsert the string to be inserted pasteascitedquotation() paste a string as quoted text, whose representation is dependent on the editor type, replacing the selected text (if any) void pasteascitedquotation( in astring acitation, in long a
selectiontype ); parameters acitation the "mid" url of the source message.
...And 2 more matches
Sorting algorithms comparison - Firefox Developer Tools
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.
... sort() calls each of bubblesort(),
selectionsort(), quicksort() in turn and logs the result.
...
selectionsort() implements a
selection sort, returning the sorted array.
...And 2 more matches
DocumentOrShadowRoot.activeElement - Web APIs
often activeelement will return a htmlinputelement or htmltextareaelement object if it has the text
selection at the time.
... if so, you can get more detail by using the object's
selectionstart and
selectionend properties.
... note: focus (which element is receiving user input events) is not the same thing as
selection (the currently highlighted part of the document).
...And 2 more matches
GlobalEventHandlers - Web APIs
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.on
selectionchange is an eventhandler representing the code to be called when the
selectionchange event is raised, i.e.
...And 2 more matches
Drag Operations - Web APIs
these include text
selections, images, and links.
...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.
...And 2 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...
...ius: 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: #555; background-image: url("https://mdn.mozillademos.org/files/5675/dropdown.png"); background-position: center center; background-repeat: no-repeat; top: 0px; right: 0px; position: absolute; z-index: 1; pointer-events: none; } #unit-
selection .unit-top-left { top: 0; left: 0; display: none; } #unit-
selection .unit-top-left-w { ...
...And 2 more matches
menulist - Archive of obsolete content
the command event may be used to execute code when the menulist
selection changes.
...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.
...for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user
selection of the menuitem.
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).
... single-node binding special
selection - isn't currently supported.
... 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.
...loses focus), otherwise it is updated upon item
selection check group the select is represented as group of checkboxes (xhtml/xul).
Accessibility API cross-reference
sectionhead (abstract role) a form widget that allows the user to make
selections from a set of choices.
...rtant, but does not require immediacy alert_medium n/a n/a aria-live=polite low-priority info such as a tip or hint alert_low n/a n/a n/a this object is changing or moving rapidly animated n/a n/a n/a indicates that the user input is currently directed to that object and it is "armed for
selection." example: a highlighted menu item or a pressed push button.
... 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.
...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?) ...
Gecko info for Windows accessibility vendors
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.
... sets state_selected in spreadsheets when a cell has
selection.
nsIDOMWindow
method overview nsidomcssstyledeclaration getcomputedstyle(in nsidomelement elt, [optional] in domstring pseudoelt); nsi
selection get
selection(); void scrollby(in long xscrolldif, in long yscrolldif); void scrollbylines(in long numlines); void scrollbypages(in long numpages); void scrollto(in long xscroll, in long yscroll); void sizetocontent(); attributes attribute type description applicationcache nsidomofflineresourcelist get the applicati...
... nsidomcssstyledeclaration getcomputedstyle( in nsidomelement elt, in domstring pseudoelt optional ); parameters elt pseudoelt optional return value get
selection() returns the nsi
selection object indicating what if any content is currently selected in the window.
... nsi
selection get
selection(); parameters none.
... return value the nsi
selection object for the window.
nsIDragService
rables, in nsiscriptableregion aregion, in unsigned long aactiontype ); void invokedragsessionwithimage(in nsidomnode adomnode, in nsisupportsarray atransferablearray, in nsiscriptableregion aregion, in unsigned long aactiontype, in nsidomnode aimage, in long aimagex, in long aimagey, in nsidomdragevent adragevent, in nsidomdatatransfer adatatransfer); void invokedragsessionwith
selection(in nsi
selection a
selection, in nsisupportsarray atransferablearray, in unsigned long aactiontype, in nsidomdragevent adragevent, in nsidomdatatransfer adatatransfer); void startdragsession( ) ; void suppress(); void unsuppress(); constants constant value description dragdrop_action_none 0 no action.
...the document
selection is hidden while drawing.
... invokedragsessionwith
selection() start a modal drag session using the
selection as the drag image.
... void invokedragsessionwith
selection( in nsi
selection a
selection, in nsisupportsarray atransferablearray, in unsigned long aactiontype, in nsidomdragevent adragevent, in nsidomdatatransfer adatatransfer ); parameters a
selection the
selection that is to be dragged.
nsINavHistoryResultViewObserver
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 on
selectionchanged(); 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.
... on
selectionchanged() called when the
selection in the tree changes.
... void on
selectionchanged(); parameters none.
... onperformaction() this method provides a command api that can be used to invoke commands on the
selection.
nsIPromptService
in wstring acheckmsg, inout boolean acheckstate); boolean promptpassword(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, inout wstring apassword, in wstring acheckmsg, inout boolean acheckstate); boolean select(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, in pruint32 acount, [array, size_is(acount)] in wstring aselectlist, out long aout
selection); constants the following flags are combined to form the abuttonflags parameter passed to confirmex.
... 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.
...boolean select( in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, in pruint32 acount, [array, size_is(acount)] in wstring aselectlist, out long aout
selection ); aparent the parent window for the dialog.
... aout
selection contains the index of the selected item in the list when this method returns true.
Flame Chart - Firefox Developer Tools
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.
...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().
...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.
Inputs and input sources - Web APIs
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.
...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.
... spatially-tracked articulated hands, such as haptic gloves can provide both targeting and squeeze actions, as well as
selection if outfitted with buttons or other sources of
selection actions.
XRSession: selectend event - Web APIs
examples the following example uses addeventlistener() to establish handlers for the
selection events: selectstart, selectend, and select.
...only after completing those tasks does the on
selectionevent() function below dispatch the action out to a specialized function to handle things.
... xrsession.addeventlistener("selectstart", on
selectionevent); xrsession.addeventlistener("select", on
selectionevent); xrsession.addeventlistener("selectend", on
selectionevent); function on
selectionevent(event) { let source = event.inputsource; let targetobj = null; if (source.targetraymode != "tracked-pointer") { return; } let targetraypose = event.frame.getpose(source.targetrayspace, myrefspace); if (!targetraypose) { return; ...
...trix); break; case "select": mydropobject(targetobj, targetraypose.matrix); break; case "selectend": mystoptracking(targetobj, targetraypose.matrix); break; } } you can of course also set up a handler for selectend events by setting the xrsession object's onselectend event handler property to a function that handles the event: xrsession.onselectstart = on
selectionevent; xrsession.onselect = on
selectionevent; xrsession.onselectend = on
selectionevent; specifications specification status comment webxr device apithe definition of 'selectend event' in that specification.
XRSession: selectstart event - Web APIs
examples the following example uses addeventlistener() to establish handlers for the
selection events: selectstart, selectend, and select.
...only after completing those tasks does the on
selectionevent() function below dispatch the action out to a specialized function to handle things.
... xrsession.addeventlistener("selectstart", on
selectionevent); xrsession.addeventlistener("select", on
selectionevent); xrsession.addeventlistener("selectend", on
selectionevent); function on
selectionevent(event) { let source = event.inputsource; let targetobj = null; if (source.targetraymode != "tracked-pointer") { return; } let targetraypose = event.frame.getpose(source.targetrayspace, myrefspace); if (!targetraypose) { return; ...
...trix); break; case "select": mydropobject(targetobj, targetraypose.matrix); break; case "selectend": mystoptracking(targetobj, targetraypose.matrix); break; } } you can of course also set up a handler for selectend events by setting the xrsession object's onselectend event handler property to a function that handles the event: xrsession.onselectstart = on
selectionevent; xrsession.onselect = on
selectionevent; xrsession.onselectend = on
selectionevent; specifications specification status comment webxr device apithe definition of 'selectstart event' in that specification.
ARIA: grid role - Accessibility
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.
<maction> - MathML
to specify which child elements are addressed by the action, you can make use of the
selection attribute.
...therefore each click increments the
selection value.
... the syntax is: <maction actiontype="toggle"
selection="positive-integer" > expression1 expression2 expressionn </maction>.
...
selection the child element which is addressed by the action.
Miscellaneous - Archive of obsolete content
o 1.9: var utils = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindowutils); utils.sendmouseevent("mousedown", 10, 10, 0, 1, 0); utils.sendmouseevent("mouseup", 10, 10, 0, 1, 0); getting the currently selected text from browser.xul overlay context: var selectedtext = document.commanddispatcher.focusedwindow.get
selection().tostring(); or: content.get
selection(); // |window| object is implied; i.e., window.content.get
selection() or: getbrowser
selection(); // |window| object is implied; i.e., window.getbrowser
selection() this final option massages the
selection to remove leading and trailing whitespace.
...getbrowser
selection() is not implemented on some platforms, such as thunderbird and songbird.
... addeventlistener("blur", function(e) {onblurinput(e);}, false); } } function onfocusinput(focusevent) { focusedcontrol = focusevent.originaltarget; } function onblurinput(blurevent) { focusedcontrol = null; } or var element = document.commanddispatcher.focusedelement; inserting text at the cursor function inserttext(element, snippet) { var
selectionend = element.
selectionstart + snippet.length; var currentvalue = element.value; var beforetext = currentvalue.substring(0, element.
selectionstart); var aftertext = currentvalue.substring(element.
selectionend, currentvalue.length); element.value = beforetext + snippet + aftertext; element.focus(); //put the cursor after the inserted text element.set
selectionrange(
selectionend, sel...
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
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.
... menu list use the menulist element to create a control for making
selections from a drop-down list.
... <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.
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
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.
... if there's// a
selection, add a note menuitem that makes a new note.
...:(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 ...
Simple Storage - Archive of obsolete content
jetpack.future.import("menu"); jetpack.future.import("
selection"); jetpack.future.import("storage.simple"); // create the persistent notes array if it doesn't already exist.
... if there's // a
selection, add a note menuitem that makes a new note.
...:( 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.
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 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.
List of commands - Archive of obsolete content
list of commands (grouped by type) nsdomwindowcontroller commands (generally legal when there is a
selection): cmd_copy - copy a
selection to the clipboard cmd_cut - cut a
selection into the clipboard cmd_paste - paste a
selection from the clipboard cmd_selectall cmd_selectnone cmd_copylink cmd_copyimagelocation cmd_copyimagecontents cmd_scrolltop cmd_scrollbottom cmd_scrollpageup cmd_scrollpagedown cmd_scrolllineup cmd_scrolllinedown cmd_scrollleft cmd_scrollright cmd_selectcharprevious cmd_selectcharnext cmd_wordprevious cmd_wordnext cmd_selectwordprevious cmd_selectwordnext cmd_beginline cmd_endline cmd_selectbeginline cmd_selectendline cmd_selectlineprevious...
... cmd_selectlinenext cmd_selectpageprevious cmd_selectpagenext cmd_selectmovetop cmd_selectmovebottom editor commands (legal when the focus is anywhere where you can type text): cmd_paste - paste a
selection from the clipboard cmd_pastequote cmd_delete cmd_deletecharbackward cmd_deletecharforward cmd_deletewordbackward cmd_deletewordforward cmd_deletetobeginningofline cmd_deletetoendofline cmd_scrolltop cmd_scrollbottom cmd_movetop cmd_movebottom cmd_selecttop cmd_selectbottom cmd_linenext cmd_lineprevious cmd_selectlinenext cmd_selectlineprevious cmd_charprevious cmd_charnext cmd_selectcharprevious cmd_selectcharnext cmd_beginline cmd_endline cmd_selectbeginline cmd_selectendline cmd_wordprevious cmd_wordnext cmd_selectwordprevious cmd_selectwordnext cmd_scr...
...yname cmd_close cmd_closeothertabs cmd_closewindow cmd_copy cmd_copyimage cmd_copylink cmd_cut cmd_delete cmd_editpage cmd_findtypelinks cmd_findtypetext cmd_gotoline cmd_handlebackspace cmd_handleshiftbackspace cmd_minimizewindow cmd_neweditor cmd_neweditordraft cmd_neweditortemplate cmd_newnavigator cmd_newnavigatortab cmd_newtabwithtarget cmd_openhelp cmd_paste - paste a
selection from the clipboard cmd_printsetup cmd_quit cmd_redo cmd_savepage cmd_scrollpagedown cmd_scrollpageup cmd_selectall cmd_switchdocumentdirection cmd_switchtextdirection cmd_textzoomenlarge cmd_textzoomreduce cmd_textzoomreset cmd_undo cmd_viewcomponentbar cmd_viewlinktoolbar cmd_viewlinktoolbar_false cmd_viewlinktoolbar_maybe cmd_viewlinktoolbar_true cmd_viewnavbar cmd_viewperso...
Methods - Archive of obsolete content
« xul reference home acceptdialog additemto
selection addpane addprogresslistener addsession addtab addtabsprogresslistener advance advanceselectedtab appendcustomtoolbar appendgroup appenditem appendnotification blur cancel canceldialog centerwindowonscreen checkadjacentelement clearresults clear
selection 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 invert
selection 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...
...cation removecurrenttab removeitemat removeitemfrom
selection removenotification removeprogresslistener removesession removetab removetabsprogresslistener removetransientnotifications replacegroup reset rewind scrollbyindex scrollbypixels scrolltoindex select selectall selectitem selectitemrange selecttabatindex set
selectionrange showpane showpopup sizeto startediting stop stopediting swapdocshells syncsessions timedselect toggleitem
selection 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.getelementsbyt...
currentIndex - Archive of obsolete content
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 nsitree
selection interface methods available via tree.view.
selection.
...<script language ="javascript"> function treerowclicked(){ var tree = document.getelementbyid("my-tree"); var
selection = tree.view.
selection; var celltext = tree.view.getcelltext(tree.currentindex, tree.columns.getcolumnat(0)); alert(celltext); } </script> <tree id="my-tree" seltype="single" onselect="treerowclicked()"> <treecols> <treecol label="title" flex="1"/><treecol label="url" flex="1"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="joe@somewhere.com"/> <treecell label="top secret plans"/> </treerow> </treeitem> <treeitem> <treerow> <treecell label="mel@whereever.com"/> <treecell label="let's do lunch"/> </treerow> ...
Template and Tree Listeners - Archive of obsolete content
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.
...if you try an example using the code above, you will notice that the first tree will maintain the
selection when the rebuild button is pressed, whereas in the second tree does not.
Commands - Archive of obsolete content
the textbox controller handles clipboard operations,
selection, undo and redo as well as some editing operations.
...really, we should ensure that the
selection and focus is adjusted appropriately after a deletion.
...if there is no
selection, false is returned.
Tree View Details - Archive of obsolete content
first, the simple functions: { 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: functio...
...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; } ]...
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...
Application cache implementation overview
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.
...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.
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.take
selection() nsiaccessible.extend
selection() ...
nsIAutoCompleteInput
selectionend long the ending index of the current
selection in the text field.
...
selectionstart long the starting index of the current
selection in the text field.
...return value return true to prevent handling the
selection.
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 enable
selectionchecking); 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(); ...
...void initspellchecker( in nsieditor editor, in boolean enable
selectionchecking ); parameters editor the nsieditor on which to enable spell checking.
... enable
selectionchecking if true, the spell checker is initialized only for checking the current
selection; otherwise, it's initialized for checking the entire document.
Folders and message lists
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.
...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.clear
selection(): clears the list of selected messages.
Allocations - Firefox Developer Tools
click this to see the places this function was called from: here you can see that signallater() was called from two places: removeinner() and set
selectioninner().
...but signallater() was called from two places: removeinner() and set
selectioninner().
...however, removeinner() has 8901 in total count, while set
selectioninner() has just 3 in total count.
Document: dragenter event - Web APIs
the dragenter event is fired when a dragged element or text
selection enters a valid drop target.
... the target object is the immediate user
selection (the element directly indicated by the user as the drop target), or the <body> element.
... bubbles yes cancelable yes default action reject immediate user
selection as potential target element.
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.
Element: cut event - Web APIs
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.
...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.
...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.get
selection(); event.clipboarddata.setdata('text/plain',
selection.tostring().touppercase());
selection.deletefromdocument(); event.preventdefault(); }); result specifications specification status clipboard api and events working draft ...
GlobalEventHandlers.onselectstart - Web APIs
the selectstart event fires when the user starts to make a new text
selection on a webpage.
... 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.
Range.selectNodeContents() - Web APIs
document.createrange(), range.selectnodecontents(), and
selection.addrange() are used to select the content.
... window.get
selection() and
selection.removeallranges() are used to deselect it.
...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.get
selection();
selection.removeallranges(); // select paragraph const range = document.createrange(); range.selectnodecontents(p);
selection.addrange(range); }); deselectbutton.addeventlistener('click', e => { const
selection = window.get
selection();
selection.removeallranges(); }); result specifications specification status comment ...
user-select - CSS: Cascading Style Sheets
note that the
selection object can contain these elements.
... 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.
... contain enables
selection to start within the element; however, the
selection will be contained by the bounds of that element.
<input type="url"> - HTML: Hypertext Markup Language
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 set
selectionrange().
...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.
...each typed character narrows down the list until the user makes a
selection or types a custom value.
Storing annotations - Archive of obsolete content
nhtml = $('#template .annotation-details').clone(); annotationhtml.find('.url').text(storedannotation.url) .attr('href', storedannotation.url); annotationhtml.find('.url').bind('click', function(event) { event.stoppropagation(); event.preventdefault(); self.postmessage(storedannotation.url); }); annotationhtml.find('.
selection-text') .text(storedannotation.anchortext); annotationhtml.find('.annotation-text') .text(storedannotation.annotationtext); annotationlist.append(annotationhtml); }); }); it builds the dom for the panel from the array of annotations it is given.
...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
treeselected(){ var tree = document.getelementbyid("my-tree"); var cellindex = 0; var celltext = tree.view.getcelltext(tree.currentindex, tree.columns.getcolumnat(cellindex)); alert(celltext); } getting the tree item from the focused row assuming <tree id="my-tree">, you can use the following to get the tree item: var view = document.getelementbyid("my-tree").view; var sel = view.
selection.currentindex; //returns -1 if the tree is not focused var treeitem = view.getitematindex(sel); note that the current index may be unselected (for example, a multi-select tree).
...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 ...
Documentation for BiDi Mozilla - Archive of obsolete content
examples of this are in nstextframe::painttextslowly; nstextframe::paintunicodetext when a
selection is displayed; nstextframe::getposition; nstextframe::getpointfromoffset.
...the implementation is mostly in layout code, especially in ns
selection.cpp and nscaret.cpp.
Menu - Archive of obsolete content
replace that item with a menu that lets the user search either google or wikipedia: jetpack.menu.context.page.replace("search", function (context) { return { label: "search for " + jetpack.
selection.text, menu: new jetpack.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.
seltype - Archive of obsolete content
« xul reference home seltype type: one of the values below used to indicate whether multiple
selection is allowed.
...(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.
listbox.currentIndex - Archive of obsolete content
(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.
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
(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.
...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.
listitem - Archive of obsolete content
for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user
selection of the menuitem.
...to change the
selection, set either the selectedindex or selecteditem property of the containing element.
menu - Archive of obsolete content
for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user
selection of the menuitem.
...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.
menuitem - Archive of obsolete content
for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user
selection of the menuitem.
...to change the
selection, set either the selectedindex or selecteditem property of the containing element.
menuseparator - Archive of obsolete content
for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user
selection of the menuitem.
...to change the
selection, set either the selectedindex or selecteditem property of the containing element.
radio - Archive of obsolete content
for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user
selection of the menuitem.
...to change the
selection, set either the selectedindex or selecteditem property of the containing element.
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...
... 8.1.5 output supported 8.1.6 upload supported 8.1.7 range partial 316355; 343523; 8.1.8 trigger supported 8.1.9 submit supported 8.1.10 select partial @
selection does not work, select inside repeat may not work correctly, select that mixes itemsets with items may show them in the wrong order 282840; 371595; 372127; 8.1.11 select1 partial there are some resize issues, select/deselect/valuechange firing in wrong order.
CSS basics - Learn web development
but we can make more specific
selections as well.
... add the following lines (shown below), replacing the font-family assignment with your font-family
selection from what will your website look like?.
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
the field definitions may also specify their maximum size, default values,
selection list options, help text for documentation, label text for forms etc.
... 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.
Embedding API for Accessibility
setboolpref("browser.display.use_focus_colors", usefocuscolors); 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); no content waiting alerts setcharpref("alert.audio.mail_waiting", pathtosoundfile); setcharpref("alert.audio.background_image_waiting", pathtosoundfile); setcharpref("alert.audio.popup_waiting", pathtosoundfile); setcharpref("alert.audio.applet_waiting", pathtosoundfile); setcharpref("alert.audio.script_waiting", pathtosoundfile); setcharpref("alert.audio.redirect_waiting", pathtosoundfile); setcharpref("alert.audio.refresh_waiting", pathtosoundfile); ...
Mozilla's Section 508 Compliance
(g) applications shall not override user selected contrast and color
selections and other individual display attributes.
... (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.
mozbrowsercaretstatechanged
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.
... 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 curren...
Overview of Mozilla embedding APIs
this interface supports cut/copy/paste operations on the current
selection within the webbrowser window.
...interface definition: nsi
selection interface status...
Profiling with the Firefox Profiler
clicking on a tracing marker will create a
selection corresponding with its duration allowing for easy zooming in on interesting time ranges.
... 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.
PKCS11 FAQ
much of nss's token
selection is based on where the key involved is currently stored.
...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.
Rhino Debugger
this action will display a file-
selection dialog box prompting you for the location of a script to load.
...this action will display a file-
selection dialog box prompting you for the location of a script to execute.
Components.utils.evalInWindow
example suppose a page script defines a variable: // page-script.js var somelocalvariable = { name: "
selection1", node: document.documentelement }; an add-on script or other privileged script can access the variable using evalinwindow(): // add-on-script.js var result = components.utils.evalinwindow("somelocalvariable", contentwindow); console.log(result); // {"name":"
selection1","node":{}} the add-on code can modify the variable as well, of course: // add-on-script.js components.utils.evalinwindow("s...
...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 ...
nsIAccessibleStates
state_multiselectable 0x01000000 supports multiple
selection.
... state_extselectable 0x02000000 supports extended
selection.
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); ...
... [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.
XPCOM Interface Reference
ratornsirequestnsirequestobservernsiresumablechannelnsirunnablensishentrynsishistorynsishistorylistenernsisockssocketinfonsisslerrorlistenernsisslsocketcontrolnsiscreennsiscreenmanagernsiscripterrornsiscripterror2nsiscriptableionsiscriptableinputstreamnsiscriptableunescapehtmlnsiscriptableunicodeconverternsiscrollablensisearchenginensisearchsubmissionnsisecuritycheckedcomponentnsiseekablestreamnsi
selectionnsi
selection2nsi
selection3nsi
selectioncontrollernsi
selectionimageservicensi
selectionprivatensiserversocketnsiserversocketlistenernsiservicemanagernsisessionstartupnsisessionstorensisimpleenumeratornsismsdatabaseservicensismsrequestmanagernsismsservicensisocketprovidernsisocketproviderservicensisockettransportnsisockettransportservicensisoundnsispeculativeconnectnsistackframensistandardurlnsistream...
...tfilternsithreadinternalnsithreadmanagernsithreadobservernsithreadpoolnsithreadpoollistenernsitimernsitimercallbacknsitoolkitnsitoolkitprofilensitoolkitprofileservicensitraceablechannelnsitransactionnsitransactionlistnsitransactionlistenernsitransactionmanagernsitransferablensitransportnsitransporteventsinknsitransportsecurityinfonsitreeboxobjectnsitreecolumnnsitreecolumnsnsitreecontentviewnsitree
selectionnsitreeviewnsiurinsiurifixupnsiurifixupinfonsiurlnsiurlformatternsiurlparsernsiutf8converterservicensiutf8stringenumeratornsiuuidgeneratornsiupdatensiupdatechecklistenernsiupdatecheckernsiupdateitemnsiupdatemanagernsiupdatepatchnsiupdatepromptnsiupdatetimermanagernsiuploadchannelnsiuploadchannel2nsiurllistmanagercallbacknsiusercertpickernsiuserinfonsivariantnsiversioncomparatornsiweakreferencensiw...
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 nsitree
selection 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 nsi
selectionimageservice chrome nsisearchengine nsisearchsubmission nsiwebbrowserchrome nsiwindowcreator nsiwindowmediator nsiwindowwatcher clipboard nsiclipboard nsiclipboardcommands nsiclipboarddragdrophooklist nsiclipboarddragdrophooks nsiclipboardhelper nsiclipboardowner ...
Use the Inspector API - Firefox Developer Tools
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.
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 toggle
selection(e) { if (e.button != 0) { return; } if (e.target.classlist.contains("icon")) { var wasselected = (e.target.getattribute("id") == "selected"); clear
selection(); if (!wasselected) { e.target.setattribute("id", "selected"); } } } function clear
selection() { var selected = document.getelementbyid("selected"); if (selected) { selected.removeattribute("id"); ...
... } } document.addeventlistener("click", toggle
selection); ...
Responsive Design Mode - Firefox Developer Tools
device
selection just above the viewport there is a label "no device selected"; click this to see a list of device names.
...
selection download speed upload speed minimum latency (ms) gprs 50 kb/s 20 kb/s 500 regular 2g 250 kb/s 50 kb/s 300 good 2g 450 kb/s 150 kb/s 150 regular 3g 750 kb/s 250 kb/s 100 good 3g 1.5 mb/s 750 kb/s 40 regular 4g/lte 4 mb/s 3 mb/s 20 dsl 2 mb/s 1 mb/s 5 w...
CanvasRenderingContext2D.lineDashOffset - Web APIs
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.
Applying styles and colors - Web APIs
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.
Element: copy event - Web APIs
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.
...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.get
selection(); event.clipboarddata.setdata('text/plain',
selection.tostring().touppercase()); event.preventdefault(); }); result specifications specification status clipboard api and events working draft ...
Element: select event - Web APIs
examples
selection logger <input value="try selecting some text in this element."> <p id="log"></p> function log
selection(event) { const log = document.getelementbyid('log'); const
selection = event.target.value.substring(event.target.
selectionstart, event.target.
selectionend); log.textcontent = `you selected: ${
selection}`; } const input = document.queryselector('input'); input.addeventlistener('select', ...
...log
selection); onselect equivalent you can also set up the event handler using the onselect property: input.onselect = log
selection; specifications specification status ui eventsthe definition of 'select' in that specification.
HTMLImageElement.src - Web APIs
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.
HTMLInputElement.webkitEntries - Web APIs
the read-only webkitentries property of the htmlinputelement interface contains an array of file system entries (as objects based on filesystementry) representing files and/or directories selected by the user using an <input> element of type file, but only if that
selection was made using drag-and-drop: selecting a file in the dialog will leave the property empty (bug 1326031).
... example this example shows how to create a file
selection <input> element and process the selected files.
HTMLSelectElement - Web APIs
htmlselectelement.setcustomvalidity() sets the custom validity message for the
selection element to the specified message.
...ect id='s'> <option>first</option> <option selected>second</option> <option>third</option> </select> */ var select = document.getelementbyid('s'); // return the index of the selected option console.log(select.selectedindex); // 1 // return the value of the selected option console.log(select.options[select.selectedindex].value) // second a better way to track changes to the user's
selection is to watch for the change event to occur on the <select>.
HTML Drag and Drop API - Web APIs
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.
...(see specifying drop targets.) dragexit ondragexit …an element is no longer the drag operation's immediate
selection target.
PublicKeyCredentialCreationOptions - Web APIs
publickeycredentialcreationoptions.authenticator
selection optional an object whose properties are criteria used to filter out the potential authenticators for the creation operation.
...{ 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 authenticator
selection:{ 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() - Web APIs
we then select the range using window.get
selection() 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
selection = window.get
selection(); // add range to window
selection selection.addrange(range); result specification specification status comment domthe definition of 'range.range()' in that specification.
SVGGraphicsElement: copy event - Web APIs
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.
..."20" width="90" height="20"> <input xmlns="http://www.w3.org/1999/xhtml" placeholder="paste it here"/> </foreignobject> </svg> css input { font-size: 10px; width: 100%; height: 90%; box-sizing: border-box; border: 1px solid black; } javascript document.getelementsbytagname("text")[0].addeventlistener("copy", evt => { evt.clipboarddata.setdata('text/plain', document.get
selection().tostring().touppercase()); evt.preventdefault(); }); result specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation definition that the clipboard events apply to svg elements.
SVGGraphicsElement: cut event - Web APIs
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.
...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.
Window - Web APIs
window.get
selection() returns the
selection object representing the selected item(s).
...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.on
selectionchange is an eventhandler representing the code to be called when the
selectionchange event is raised.
ARIA Test Cases - Accessibility
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.
... (al) what about multiple
selection?
ARIA: table role - Accessibility
if a table maintains a
selection state, has two-dimensional navigation, or allows the user to rearrange cell order use grid or treegrid 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.
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
[important] get_acc
selection: which children of this item are selected?
... 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
pseudo pseudo classes the : pseudo allow the
selection of elements based on state information that is not contained in the document tree.
... 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.
font-family - CSS: Cascading Style Sheets
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.
<image> - CSS: Cascading Style Sheets
a
selection of images chosed based on resolution defined by the image-set() function.
...*/ 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.
<input type="password"> - HTML: Hypertext Markup Language
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 set
selectionrange() value the value attribute contains a domstring whose value is the current contents of the text editing control being used to enter the password.
... 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).
<input type="tel"> - HTML: Hypertext Markup Language
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(), set
selectionrange() value the <input> element's value attribute contains a domstring that either represents a telephone number or is an empty string ("").
...each typed character narrows down the list until the user makes a
selection or types a custom value.
<keygen> - HTML: Hypertext Markup Language
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.
Media container formats (file types) - Web media technologies
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).
... container
selection advice the tables below offer suggested containers to use in various scenarios.
private-browsing - Archive of obsolete content
onents will not be displayed in private browser windows any menus or menu items created using the context-menu will not be shown in context menus that belong to private browser windows the page-mod module will not attach content scripts to documents belonging to private browser windows any panel objects will not be shown if the active window is a private browser window the
selection module will not include any
selections made in private browser windows add-ons that have opted in will see private windows, so they will need to use the private-browsing module to check whether objects are private, so as to avoid storing data derived from such objects.
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...
Adding sidebars - Archive of obsolete content
--> </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.
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...
CSS3 - Archive of obsolete content
adds: the image-set() functional notation to allow the definition to equivalent images at different resolution allowing for resolution-negotiated
selection of images.
List of Mozilla-Based Applications - Archive of obsolete content
qsos xul editor tool for the qsos method qsos stands for qualification and
selection of opensource software qtrax music client based on songbird quickstaf gui client for software testing automation framework uses xulrunner qutecom phone software previously named openwengo redcar text editor seems to use xulrunner red hat directory server server product uses nss red hat certificate system server...
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 ...
Install Wizards (aka: Stub Installers) - Archive of obsolete content
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.
menuactive - Archive of obsolete content
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.
XUL Events - Archive of obsolete content
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.
TCP/IP Security - Archive of obsolete content
another good source of information is nist sp 800-52, guidelines on the
selection and use of transport layer security, available from https://csrc.nist.gov/publications/nistpubs/.) the use of tls typically requires each application to support tls; however, unlike application layer controls, which typically involve extensive customization of the application, transport layer controls such as tls are much less intrusive because they do not need to understand the application’s f...
CSS - Archive of obsolete content
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...
HTML: A good basis for accessibility - Learn web development
his: <div>play video</div> but as you'll see in greater detail later on, it makes sense to use the correct element for the job: <button>play video</button> not only do html <button>s have some suitable styling applied by default (which you will probably want to override), they also have built-in keyboard accessibility — users can navigate between buttons using the tab key and activate their
selection using return or enter.
HTML: A good basis for accessibility - Learn web development
his: <div>play video</div> but as you'll see in greater detail later on, it makes sense to use the correct element for the job: <button>play video</button> not only do html <button>s have some suitable styling applied by default (which you will probably want to override), they also have built-in keyboard accessibility — users can navigate between buttons using the tab key and activate their
selection using return or enter.
Cascade and inheritance - Learn web development
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.
Attribute selectors - Learn web development
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.
CSS selectors - Learn web development
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.
Fundamental text and font styling - Learn web development
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.
Client-side form validation - Learn web development
first, some html: <form> <p> <fieldset> <legend>do you have a driver's license?<abbr title="this field is mandatory" aria-label="required">*</abbr></legend> <!-- while only one radio button in a same-named group can be selected at a time, and therefore only one radio button in a same-named group having the "required" attribute suffices in making a
selection a requirement --> <input type="radio" required name="driver" id="r1" value="yes"><label for="r1">yes</label> <input type="radio" required name="driver" id="r2" value="no"><label for="r2">no</label> </fieldset> </p> <p> <label for="n1">how old are you?</label> <!-- the pattern attribute can act as a fallback for browsers which don't implement the number input t...
The HTML5 input types - Learn web development
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.
UI pseudo-classes - Learn web development
origin: center; transition: all 0.3s ease-in; } input[type="radio"]:checked::before { transform: translate(3px, 3px) scale(1); transition: all 0.3s cubic-bezier(0.25, 0.25, 0.56, 2); } this is really useful — screenreaders already let their users know when a radio button or checkbox they encounter is checked/selected, so you don't want them to read out another dom element that indicates
selection — that could be confusing.
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...
Accessibility Features in Firefox
view
selection source (techies only): when you select some text and right click or press shift+f10, you can "view
selection source".
Information for External Developers Dealing with Accessibility
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.
Installing headers using EXPORTS
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 \ nsi
selectioncontroller.idl \ $(null) include $(topsrcdir)/config/rules.mk ...
The Firefox codebase: CSS Guidelines
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.
Displaying Places information using views
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.
Browser API
mozbrowser
selectionstatechanged sent when the text selected inside the browser <iframe> content changes.
Addon
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.
Fonts for Mozilla 2.0's MathML engine
mathml font
selection with css you can get these fonts from the mathml-fonts add-on ; the xpi is just a zip archive that you can fetch and extract for example with the following command: wget https://addons.mozilla.org/firefox/downloads/latest/367848/addon-367848-latest.xpi -o mathml-fonts.zip; \ unzip mathml-fonts.zip -d mathml-fonts then copy the mathml-fonts/resource/ directory somewhere on your web site and ensure...
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.
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.
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
now that you've made your productization
selections, you may be interested in learning the technical aspects behind productization by creating a productization patch.
Research and prep
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.
PR_Notify
if more than one thread is waiting, the
selection of which thread gets promoted cannot be determined in advance.
PR_NotifyCondVar
if more than one thread is waiting, the
selection of which thread gets promoted cannot be predicted.
JSS FAQ
sslclientcertificate
selectioncallback is analogous to ssl_getclientauthdatahook.
NSS API Guidelines
it also provides functions that invoke operations in selected modules and slots, such as key
selection and generation, signing, encryption and decryption, etc.
Gecko Roles
role_menupopup represents a menu, which presents a list of options from which the user can make a
selection to perform an action.
Gecko states
state_multiselectable supports multiple
selection state_extselectable supports extended
selection state_required indicates that user interaction is required.
Setting up the Gecko SDK
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.
nsIAccessibleRole
role_menupopup 11 represents a menu, which presents a list of options from which the user can make a
selection to perform an action.
nsIAppStartup
the application will be restarted with an empty command line and the normal profile
selection process will take place on startup.
nsIClipboardHelper
aclipboardid the id of the clipboard to copy to (for example k
selectionclipboard).
nsIFocusManager
movecarettofocus() moves the
selection caret within awindow to the current focus.
nsILoginManagerPrompter
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.
nsINavHistoryResultObserver
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).
nsIPrompt
ring password, in wstring checkmsg, inout boolean checkvalue); boolean promptusernameandpassword(in wstring dialogtitle, in wstring text, inout wstring username, inout wstring password, in wstring checkmsg, inout boolean checkvalue); boolean select(in wstring dialogtitle, in wstring text, in pruint32 count, [array, size_is(count)] in wstring selectlist, out long out
selection); constants the button flags defined in nsiprompt are the same as those defined in nsipromptservice.constants.
nsIScriptableUnescapeHTML
this is equivalent to calling nsiparserutils::converttoplaintext(src, nsidocumentencoder::output
selectiononly | nsidocumentencoder::outputabsolutelinks, 0).
nsITreeBoxObject
selectionregion nsiscriptableregion readonly: return the region for the visible parts of the
selection, in device pixels.
nsIWebBrowserPersist
encode_flags_
selection_only 1 output only the current
selection as opposed to the whole document.
Using the clipboard
if you use k
selectionclipboard instead, you will copy into the
selection buffer, which is generally only available on unix systems.
Browser Toolbox - Firefox Developer Tools
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.
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
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.
Throttling - Firefox Developer Tools
selection download speed upload speed minimum latency (ms) gprs 50 kbps 20 kbps 500 regular 2g 250 kbps 50 kbps 300 good 2g 450 kbps 150 kbps 150 regular 3g 750 kbps 250 kbps 100 good 3g 1.5 mbps 750 kbps 40 regular 4g/lte 4 mbps 3 mbps 20 dsl 2 mbps 1 mbps 5 w...
Examine and edit CSS - Firefox Developer Tools
displaying pseudo-elements the rule 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: clicki...
View Source - Firefox Developer Tools
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.
Clipboard - Web APIs
a typical application accesses clipboard functionality by mapping user input such as keybindings, menu
selections, etc.
CompositionEvent.data - Web APIs
this value doesn't change even if content changes the
selection range; rather, it indicates the string that was selected when composition started.
DataTransfer.clearData() - Web APIs
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.
DataTransfer.dropEffect - Web APIs
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.
DataTransfer.effectAllowed - Web APIs
tatransfer.effectallowed); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } </script> <body> <h1>examples <code>datatransfer</code>.{<code>dropeffect</code>, <code>effectallowed</code>} properties</h1> <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> </body> </html> specifications specification status comment html living standardthe definition of 'effectallowed' in that specification.
DataTransfer.setData() - Web APIs
telementbyid(data)); // clear the drag data cache (for all formats/types) ev.datatransfer.cleardata(); } </script> <body> <h1>examples of <code>datatransfer</code>: <code>setdata()</code>, <code>getdata()</code>, <code>cleardata()</code></h1> <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> </body> </html> specifications specification status comment html living standardthe definition of 'setdata()' in that specification.
DataTransfer.setDragImage() - Web APIs
tdefault(); // get the data, which is the id of the drop target var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } </script> <body> <h1>example of <code>datatransfer.setdragimage()</code></h1> <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> </body> </html> specifications specification status comment html living standardthe 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
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; } javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to the drag payload so the ...
DataTransferItemList.clear() - Web APIs
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; } javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to ...
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
this value may simply be a boolean, where true specifies that a default
selection of input source be made (typically the entire display area of the device in use, spanning every screen in a multiple screen configuration).
DocumentOrShadowRoot - Web APIs
documentorshadowroot.get
selection() returns a
selection object representing the range of text selected by the user, or the current position of the caret.
Document Object Model (DOM) - Web APIs
datasection characterdata childnode comment customevent document documentfragment documenttype domerror domexception domimplementation domstring domtimestamp domstringlist domtokenlist element event eventtarget htmlcollection mutationobserver mutationrecord namednodemap node nodefilter nodeiterator nodelist nondocumenttypechildnode parentnode processinginstruction
selection range text textdecoder textencoder timeranges treewalker url window worker xmldocument obsolete dom interfaces the document object model has been highly simplified.
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.get
selection(); 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 ...
GlobalEventHandlers.ondrag - Web APIs
v) { console.log("dragover"); ev.preventdefault(); } </script> <body> <h1>examples of <code>ondrag</code>, <code>ondrop</code>, <code>ondragstart</code>, <code>ondragover</code></h1> <div> <!-- <div class="source"> --> <p id="source" ondrag="drag_handler(event);" 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> </body> </html> specifications specification status comment html living standardthe definition of 'ondrag' in that specification.
GlobalEventHandlers.ondragend - Web APIs
dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</code></h1> <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> </body> </html> specifications specification status comment html living standardthe definition of 'ondragend' in that specification.
GlobalEventHandlers.ondragenter - Web APIs
dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</code></h1> <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> </body> </html> specifications specification status comment html living standardthe definition of 'ondragenter' in that specification.
GlobalEventHandlers.ondragexit - Web APIs
dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</code></h1> <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> </body> </html> specifications specification status comment html living standardthe definition of 'ondragexit' in that specification.
GlobalEventHandlers.ondragleave - Web APIs
dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</code></h1> <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> </body> </html> specifications specification status comment html living standardthe definition of 'ondragleave' in that specification.
GlobalEventHandlers.ondragover - Web APIs
} function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); } </script> <body> <h1>examples of <code>ondrag</code>, <code>ondrop</code>, <code>ondragstart</code>, <code>ondragover</code></h1> <div> <p id="source" ondrag="drag_handler(event);" 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> </body> </html> specifications specification status comment html living standardthe definition of 'ondragover' in that specification.
GlobalEventHandlers.ondragstart - Web APIs
} function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); } </script> <body> <h1>examples of <code>ondrag</code>, <code>ondrop</code>, <code>ondragstart</code>, <code>ondragover</code></h1> <div> <p id="source" ondrag="drag_handler(event);" 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> </body> </html> specifications specification status comment html living standardthe definition of 'ondragstart' in that specification.
GlobalEventHandlers.ondrop - Web APIs
gover_handler(ev) { console.log("dragover"); ev.preventdefault(); } </script> <body> <h1>examples of <code>ondrag</code>, <code>ondrop</code>, <code>ondragstart</code>, <code>ondragover</code></h1> <div class="source"> <p id="source" ondrag="drag_handler(event);" 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> </body> </html> specifications specification status comment html living standardthe definition of 'ondrop' in that specification.
GlobalEventHandlers.onselect - Web APIs
html <textarea>try selecting some text in this element.</textarea> <p id="log"></p> javascript function log
selection(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 = log
selection; result specification specification status comment html living standar...
inert - Web APIs
the boolean inert attribute, when present, may make the browser "ignore" the element from assistive technologies, page search and text
selection.
HTMLElement - Web APIs
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.
HTMLInputElement.select() - Web APIs
in browsers where it is not supported, it is possible to replace it with a call to htmlinputelement.set
selectionrange() with parameters 0 and the input's value length: <input onclick="this.select();" value="sample text" /> <!-- equivalent to --> <input onclick="this.set
selectionrange(0, this.value.length);" value="sample text" /> specifications specification status comment html living standardthe definition of 'select' in that specification.
HTMLInputElement.webkitdirectory - Web APIs
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.
HTMLMediaElement.src - Web APIs
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).
HTMLMediaElement - Web APIs
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.
HTMLSelectElement.disabled - Web APIs
<input id="allow-drinks" type="checkbox"/> </label> <label for="drink-select">drink
selection:</label> <select id="drink-select" disabled> <option value="1">water</option> <option value="2">beer</option> <option value="3">pepsi</option> <option value="4">whisky</option> </select> javascript var allowdrinkscheckbox = document.getelementbyid("allow-drinks"); var drinkselect = document.getelementbyid("drink-select"); allowdrinkscheckbox.addeventlistener("change", function(event) ...
HTMLSelectElement.selectedOptions - Web APIs
html the html that creates the
selection box and the <option> elements representing each of the food choices looks like this: <label for="foods">what do you want to eat?</label><br> <select id="foods" name="foods" size="7" multiple> <option value="1">burrito</option> <option value="2">cheeseburger</option> <option value="3">double bacon burger supreme</option> <option value="4">pepperoni pizza</option> <option value="5">taco<...
Recommended Drag Types - Web APIs
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.
Key Values - Web APIs
vk_ereof (0xf9) gdk_key_3270_exselect (0xfd1b) "exsel" [4] the exsel (extend
selection) key.
MediaTrackConstraints.logicalSurface - Web APIs
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.
Capabilities, constraints, and settings - Web APIs
function keydownhandler(event) { if (event.key == "tab") { let elem = event.target; let str = elem.value; let position = elem.
selectionstart; let newstr = str.substring(0, position) + " " + str.substring(position, str.length); elem.value = newstr; elem.
selectionstart = elem.
selectionend = position + 2; event.preventdefault(); } } videoconstrainteditor.addeventlistener("keydown", keydownhandler, false); audioconstrainteditor.addeventlistener("keydown", keydownhandler, false); show constrainable pr...
PaymentItem - Web APIs
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.
RTCConfiguration.iceTransportPolicy - Web APIs
the webrtc device api dictionary rtcconfiguration's icetransportpolicy property is a string indicating the transport
selection policy the ice agent should use during negotiation of connections.
RTCIceTransport - Web APIs
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.
Range.commonAncestorContainer - Web APIs
.highlight { animation: highlight linear 1s; } @keyframes highlight { from { outline: 1px solid #f00f; } to { outline: 1px solid #f000; } } body { padding: 1px; } javascript document.addeventlistener('pointerup', e => { const
selection = window.get
selection(); if (
selection.type === 'range') { for (let i = 0; i <
selection.rangecount; i++) { const range =
selection.getrangeat(i); playanimation(range.commonancestorcontainer); } } }); function playanimation(el) { if (el.nodetype === node.text_node) { el = el.parentnode; } el.classlist.remove('highlight'); settimeout(() => { el.classlist.
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.get
selection(); 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 - Web APIs
range objects can also be retrieved by using the getrangeat() method of the
selection object or the caretrangefrompoint() method of the document object.
SVGSVGElement - Web APIs
svgsvgelement.deselectall() unselects any selected objects, including any
selections of text strings and type-in bars.
ShadowRoot - Web APIs
documentorshadowroot.get
selection() returns a
selection object representing the range of text selected by the user, or the current position of the caret.
WebRTC connectivity - Web APIs
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.
WebXR Device API - Web APIs
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.
Window.updateCommands() - Web APIs
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.
XRInputSourceEvent.inputSource - Web APIs
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.
XRSession.onselectend - Web APIs
the onselectend attribute of the xrsession object is the event handler for the selectend event, which is dispatched when user finishes making some sort of
selection by releasing a trigger, touchpad, or button, finishes speaking a command, or makes a hand gesture.
XRSession.onselectstart - Web APIs
the onselectstart attribute of the xrsession object is the event handler for the selectstart event, which is dispatched when user starts making some sort of
selection by pressing a trigger, touchpad, or button, speaking a command, or making a hand gesture.
Introduction - Web APIs
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.
Web APIs
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: row role - Accessibility
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.
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...
Using feature queries - CSS: Cascading Style Sheets
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.
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
index of standard pseudo-elements ::after (:after) ::backdrop ::before (:before) ::cue ::cue-region ::first-letter (:first-letter) ::first-line (:first-line) ::grammar-error ::marker ::part() ::placeholder ::
selection ::slotted() ::spelling-error browser lowest version support of internet explorer 8.0 :pseudo-element 9.0 :pseudo-element ::pseudo-element firefox (gecko) 1.0 (1.0) :pseudo-element 1.0 (1.5) :pseudo-element ::pseudo-element opera 4.0 :pseudo-element 7.0 :pseudo-element ::pseudo-element s...
CSS reference - CSS: Cascading Style Sheets
-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...
hyphens - CSS: Cascading Style Sheets
however, suggested line break opportunities (see suggesting line break opportunities below) will override automatic break point
selection when present.
Making content editable - Developer guides
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).
<input type="date"> - HTML: Hypertext Markup Language
.createelement('option'); option.textcontent = year-i; yearselect.appendchild(option); } } // when the month or year <select> values are changed, rerun populatedays() // in case the change affected the number of available days yearselect.onchange = function() { populatedays(monthselect.value); } monthselect.onchange = function() { populatedays(monthselect.value); } //preserve day
selection var previousday; // update what day has been set to previously // see end of populatedays() for usage dayselect.onchange = function() { previousday = dayselect.value; } note: remember that some years have 53 weeks in them (see weeks per year)!
<input type="datetime-local"> - HTML: Hypertext Markup Language
("0" + i) : i; minuteselect.appendchild(option); } } // when the month or year <select> values are changed, rerun populatedays() // in case the change affected the number of available days yearselect.onchange = function() { populatedays(monthselect.value); } monthselect.onchange = function() { populatedays(monthselect.value); } //preserve day
selection var previousday; // update what day has been set to previously // see end of populatedays() for usage dayselect.onchange = function() { previousday = dayselect.value; } note: remember that some years have 53 weeks in them (see weeks per year)!
<input type="file"> - HTML: Hypertext Markup Language
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.
<input type="text"> - HTML: Hypertext Markup Language
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 set
selectionrange().
draggable - HTML: Hypertext Markup Language
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.
Resource URLs - HTTP
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.
Loops and iteration - JavaScript
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).
Assertions - JavaScript
let fruitsstartswithnota = 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 ened
selection = fruitswithdescription.filter(descr => /(en|ed)\b/.test(descr)); console.log(ened
selection); // [ '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' ] ...
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.
Understanding latency - Web Performance
the approximate values of some presets include:
selection download speed upload speed minimum latency (ms) gprs 50 kbps 20 kbps 500 regular 2g 250 kbps 50 kbps 300 good 2g 450 kbps 150 kbps 150 regular 3g 750 kbps 250 kbps 100 good 3g 1.5 mbps 750 kbps 40 regular 4g/lte 4 mbps 3 mbps 20 dsl 2 mbps 1 mbps 5 w...
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...