Search completed in 1.04 seconds.
3810 results for "current":
Your results are loading. Please wait...
Event.currentTarget - Web APIs
the currenttarget read-only property of the event interface identifies the current target for the event, as the event traverses the dom.
... syntax var currenteventtarget = event.currenttarget; value eventtarget examples event.currenttarget is interesting to use when attaching the same event handler to several elements.
... function hide(e){ e.currenttarget.style.visibility = 'hidden'; console.log(e.currenttarget); // when this function is used as an event handler: this === e.currenttarget } var ps = document.getelementsbytagname('p'); for(var i = 0; i < ps.length; i++){ // console: print the clicked <p> element ps[i].addeventlistener('click', hide, false); } // console: print <body> document.body.addeventlistener('click', hide, false); // click around and make paragraphs disappear note: the value of event.currenttarget is only available while the event is being handled.
...And 6 more matches
current - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the current function can be used to get the context node in an xslt instruction.
... syntax current() returns a node-set containing only the current node.
... for an outermost expression (an expression not occurring within another expression), the current node is always the same as the context node (which will be returned by the .
...And 6 more matches
HTMLMediaElement.currentTime - Web APIs
the htmlmediaelement interface's currenttime property specifies the current playback time in seconds.
... changing the value of currenttime this value seeks the media to the new time.
... syntax var currenttime = htmlmediaelement.currenttime; htmlmediaelement.currenttime = 35; value a double-precision floating-point value indicating the current playback time in seconds.
...And 5 more matches
Animation.currentTime - Web APIs
the animation.currenttime property of the web animations api returns and sets the current time value of the animation in milliseconds, whether running or paused.
... if the animation lacks a timeline, is inactive, or hasn't been played yet, currenttime's return value is null.
... syntax var currenttime = animation.currenttime; animation.currenttime = newtime; value a number representing the current time in milliseconds, or null to deactivate the animation.
...And 4 more matches
RTCPeerConnection.currentLocalDescription - Web APIs
the read-only property rtcpeerconnection.currentlocaldescription returns an rtcsessiondescription object describing the local end of the connection as it was most recently successfully negotiated since the last time the rtcpeerconnection finished negotiating and connecting to a remote peer.
... to change the currentlocaldescription, call rtcpeerconnection.setlocaldescription(), which triggers a series of events which leads to this value being set.
... for details on what exactly happens and why the change isn't necessarily instantaneous, see pending and current descriptions in webrtc connectivity.
...And 4 more matches
RTCPeerConnection.currentRemoteDescription - Web APIs
the read-only property rtcpeerconnection.currentremotedescription returns an rtcsessiondescription object describing the remote end of the connection as it was most recently successfully negotiated since the last time the rtcpeerconnection finished negotiating and connecting to a remote peer.
... to change the currentremotedescription, call rtcpeerconnection.setremotedescription(), which triggers a series of events which leads to this value being set.
... for details on what exactly happens and why the change isn't necessarily instantaneous, see pending and current descriptions in webrtc connectivity.
...And 4 more matches
AnimationPlaybackEvent.currentTime - Web APIs
the currenttime read-only property of the animationplaybackevent interface represents the current time of the animation that generated the event at the moment the event is queued.
... value a number representing the current time in milliseconds, or null.
... reduced time precision to offer protection against timing attacks and fingerprinting, the precision of playbackevent.currenttime might get rounded depending on browser settings.
...And 3 more matches
AnimationTimeline.currentTime - Web APIs
the currenttime read-only property of the web animations api's animationtimeline interface returns the timeline's current time in milliseconds, or null if the timeline is inactive.
... syntax var currenttime = animationtimeline.currenttime; value a number representing the timeline's current time in milliseconds, or null if the timeline is inactive.
... reduced time precision to offer protection against timing attacks and fingerprinting, the precision of animationtimeline.currenttime might get rounded depending on browser settings.
...And 3 more matches
BaseAudioContext.currentTime - Web APIs
the currenttime read-only property of the baseaudiocontext interface returns a double representing an ever-increasing hardware timestamp in seconds that can be used for scheduling audio playback, visualizing timelines, etc.
... syntax var curtime = baseaudiocontext.currenttime; example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); // older webkit/blink browsers require a prefix ...
... console.log(audioctx.currenttime); reduced time precision to offer protection against timing attacks and fingerprinting, the precision of audioctx.currenttime might get rounded depending on browser settings.
...And 3 more matches
HTMLImageElement.currentSrc - Web APIs
the read-only htmlimageelement property currentsrc indicates the url of the image which is currently presented in the <img> element it represents.
... syntax let currentsource = htmlimageelement.currentsrc; value a usvstring indicating the full url of the image currently visible in the <img> element represented by the htmlimageelement.
...currentsrc lets you determine which image from the set of provided images was selected by the browser.
...And 2 more matches
currentSet - Archive of obsolete content
« xul reference currentset not in seamonkey 1.x type: comma-separated list of strings holds a comma-separated list of the ids of the items currently on the toolbar.
...an empty toolbar has a currentset value of "__empty".
... you may change the current set of items by setting this property.
... be careful, as setting this property doesn't automatically update the currentset attribute.
JS::CurrentGlobalOrNull
syntax jsobject * js::currentglobalornull(jscontext *cx); name type description cx jscontext * the context for which to return the global object.
... description js::currentglobalornull() returns the global object for whatever function is currently running on the context.
... in other words, it returns the global object on the current scope chain.
... see also mxr id search for js::currentglobalornull js_getglobalforobject bug 899245 ...
CanvasRenderingContext2D.currentTransform - Web APIs
the canvasrenderingcontext2d.currenttransform property of the canvas 2d api returns or sets a dommatrix (current specification) or svgmatrix (old specification) object for the current transformation matrix.
... syntax ctx.currenttransform [= value]; value a dommatrix or svgmatrix object to use as the current transformation matrix.
... examples manually changing the matrix this example uses the currenttransform property to set a transformation matrix.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let matrix = ctx.currenttransform; matrix.a = 1; matrix.b = 1; matrix.c = 0; matrix.d = 1; matrix.e = 0; matrix.f = 0; ctx.currenttransform = matrix; ctx.fillrect(0, 0, 100, 100); result ...
HTMLMediaElement.currentSrc - Web APIs
the htmlmediaelement.currentsrc property contains the absolute url of the chosen media resource.
... syntax var mediaurl = audioobject.currentsrc; value a domstring object containing the absolute url of the chosen media source; this may be an empty string if networkstate is empty; otherwise, it will be one of the resources listed by the htmlsourceelement contained within the media element, or the value or src if no <source> element is provided.
... example var obj = document.createelement('video'); console.log(obj.currentsrc); // "" specifications specification status comment html living standardthe definition of 'htmlmediaelement.currentsrc' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.currentsrc' in that specification.
NavigatorConcurrentHardware - Web APIs
the navigatorconcurrenthardware mixin adds to the navigator interface features which allow web content to determine how many logical processors the user has available, in order to let content and web apps optimize their operations to best take advantage of the user's cpu.
...the browser may, however, choose to reduce the number in order to represent more accurately the number of workers that can run at once properties navigatorconcurrenthardware.hardwareconcurrency read only returns the number of logical processors which may be available to the user agent.
... methods the navigatorconcurrenthardware mixin has no methods.
... specifications specification status comment html living standardthe definition of 'navigatorconcurrenthardware' in that specification.
currentset - Archive of obsolete content
« xul reference home currentset not in seamonkey 1.x type: comma-separated string the current set of displayed items on the toolbar.
... this isn't necessary the *current* set, i.e.
... it might not be equal the value of the currentset property which is computed from the actual dom ...
currentIndex - Archive of obsolete content
« xul reference currentindex type: integer set to the row index of the tree caret in the tree.
...<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> </treeit...
...em> <treeitem> <treerow> <treecell label="mel@whereever.com"/> <treecell label="let's do lunch"/> </treerow> </treeitem> </treechildren> </tree> see also listbox.currentindex ...
listbox.currentIndex - Archive of obsolete content
« xul reference currentindex type: integer set to the index of the currently focused item in the list.
...(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.
PR_GetCurrentThread
returns the current thread object for the currently running code.
... syntax #include <prthread.h> prthread* pr_getcurrentthread(void); returns always returns a valid reference to the calling thread--a self-identity.
... description the currently running thread may discover its own identity by calling pr_getcurrentthread.
nsICurrentCharsetListener
intl/uconv/idl/nsicurrentcharsetlistener.idlscriptable please add a summary to this article.
... inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/intl/currentcharsetlistener;1.
... to create an instance, use: var currentcharsetlistener = components.classes["@mozilla.org/intl/currentcharsetlistener;1"] .createinstance(components.interfaces.nsicurrentcharsetlistener); method overview void setcurrentcharset(in wstring charset); void setcurrentcomposercharset(in wstring charset); void setcurrentmailcharset(in wstring charset); methods setcurrentcharset() void setcurrentcharset( in wstring charset ); parameters charset setcurrentcomposercharset() void setcurrentcomposercharset( in wstring charset ); parameters charset setcurrentmailcharset() void setcurrentmailcharset( in wstring charset ); parameters charset ...
Element.currentStyle - Web APIs
element.currentstyle is a proprietary property which is similar to the standardized window.getcomputedstyle() method.
... * http://creativecommons.org/publicdomain/zero/1.0/ */ if (!("currentstyle" in element.prototype)) { object.defineproperty(element.prototype, "currentstyle", { get: function() { return window.getcomputedstyle(this); } }); } specification not part of any specification.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcurrentstyle non-standardchrome no support noedge no support nofirefox no support noie full support 6opera no support nosafari no support ...
Geolocation.getCurrentPosition() - Web APIs
the geolocation.getcurrentposition() method is used to get the current position of the device.
... syntax navigator.geolocation.getcurrentposition(success[, error[, [options]]) parameters success a callback function that takes a geolocationposition object as its sole input parameter.
... enablehighaccuracy: false | true examples var options = { enablehighaccuracy: true, timeout: 5000, maximumage: 0 }; function success(pos) { var crd = pos.coords; console.log('your current position is:'); console.log(`latitude : ${crd.latitude}`); console.log(`longitude: ${crd.longitude}`); console.log(`more or less ${crd.accuracy} meters.`); } function error(err) { console.warn(`error(${err.code}): ${err.message}`); } navigator.geolocation.getcurrentposition(success, error, options); specifications specification status comment geolocation a...
RTCIceCandidatePairStats.currentRoundTripTime - Web APIs
the rtcicecandidatepairstats property currentroundtriptime is a floating-point value indicating the number of seconds it takes for data to be sent by this peer to the remote peer and back over the connection described by this pair of ice candidates.
... syntax rtt = rtcicecandidatepairstats.currentroundtriptime; value a floating-point value indicating the round-trip time, in seconds for the connection described by the pair of candidates for which this rtcicecandidatepairstats object offers statistics.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.currentroundtriptime' in that specification.
RTCRtpTransceiver.currentDirection - Web APIs
the read-only rtcrtptransceiver property currentdirection is a string which indicates the current directionality of the transceiver.
... syntax var direction = rtcrtptransceiver.currentdirection value a domstring whose value is one of the strings which are a member of the rtcrtptransceiverdirection enumerated type.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.currentdirection' in that specification.
TreeWalker.currentNode - Web APIs
the treewalker.currentnode property represents the node on which the treewalker is currently pointing at.
... syntax node = treewalker.currentnode; treewalker.currentnode = node; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); root = treewalker.currentnode; // the root element as it is the first element!
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.currentnode' in that specification.
current - Archive of obsolete content
« xul reference home current type: boolean this attribute will be set to true if the listitem is the current item.
...to change the currently selected item in a listbox, use the listbox property selecteditem.
currentPage - Archive of obsolete content
« xul reference currentpage type: wizardpage element this property returns the wizardpage element that is currently displayed.
... you can modify this value to change the current page.
currentPane - Archive of obsolete content
« xul reference currentpane type: prefpane element reference to the currently displayed pane.
... to change the current pane, use the showpane method.
Document.currentScript - Web APIs
the document.currentscript property returns the <script> element whose script is currently being processed and isn't a javascript module.
... syntax var curscriptelement = document.currentscript; example this example checks to see if the script is being executed asynchronously: if (document.currentscript.async) { console.log("executing asynchronously"); } else { console.log("executing synchronously"); } view live examples specifications specification status comment html living standardthe definition of 'document.currentscript' in that specification.
removeCurrentNotification - Archive of obsolete content
« xul reference home removecurrentnotification() return type: no return value remove the current notification.
removeCurrentTab - Archive of obsolete content
« xul reference home removecurrenttab() return type: tab element removes the currently displayed tab page.
current - Archive of obsolete content
« xul reference current type: boolean gets and sets the value of the current attribute.
currentItem - Archive of obsolete content
« xul reference currentitem type: listitem element returns the currently focused item in the list box, which is only useful in a multiple selection list box.
currentNotification - Archive of obsolete content
« xul reference currentnotification type: notification element the currently displayed notification element or null.
currentURI - Archive of obsolete content
« xul reference currenturi type: nsiuri this read-only property contains the currently loaded url.
Index - Web APIs
WebAPIIndex
48 ambientlightsensor api, ambient light sensor api, ambientlightsensor, generic sensor api, interface, reference, sensor, sensor apis, sensors the ambientlightsensor interface of the the sensor apis returns the current light level or illuminance of the ambient light around the hosting device.
... 49 ambientlightsensor.ambientlightsensor() api, ambient light sensor api, ambientlightsensor, constructor, reference the ambinentlightsensor() constructor creates a new ambientlightsensor object, which returns the current light level or illuminance of the ambient light around the hosting device.
... 50 ambientlightsensor.illuminance api, ambient light level api, generic sensor api, property, reference, sensor, sensor apis, sensors, illuminance the illuminance property of the ambientlightsensor interface returns the current light level in lux of the ambient light level around the hosting device.
...And 452 more matches
Bytecode Descriptions
the new function inherits the current environment chain.
...it should be the current value of new.target, so that the arrow function inherits new.target from the enclosing scope.
...format: jof_class_ctor functionproto stack: ⇒ %functionprototype% pushes the current global's functionprototype.
...And 58 more matches
Index - Archive of obsolete content
currently, these are only supported on firefox mobile and firefox os.
... 56 selection add-on sdk get and set text and html selections in the current web page.
...this feature is particularly useful for vendors who wish to deploy the plugin even if firefox is not currently installed, or who want to use the automatic extension update mechanism to update their plugin to a newer version.
...And 46 more matches
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.
... docommand no parameters cmd_indent indents current selection.
... docommand no parameters cmd_outdent outdents current selection.
...And 41 more matches
d - SVG: Scalable Vector Graphics
WebSVGAttributed
an upper-case command specifies absolute coordinates, while a lower-case command specifies coordinates relative to the current position.
... moveto path commands moveto instructions can be thought of as picking up the drawing instrument, and setting it down somewhere else—in other words, moving the current point (po; {xo, yo}).
... there is no line drawn between po and the new current point (pn; {xn, yn}).
...And 34 more matches
HTTP Index - HTTP
WebHTTPIndex
24 reason: cors header 'access-control-allow-origin' missing cors, corsmissingalloworigin, cross-origin, error, http, https, messages, reasons, security, console, troubleshooting the response to the cors request is missing the required access-control-allow-origin header, which is used to determine whether or not the resource can be accessed by content operating within the current origin.
...for every feature controlled by feature policy, the feature is only enabled in the current document or frame if its origin matches the allowed list of origins.
... 69 connection http, headers, reference, web the connection general header controls whether or not the network connection stays open after the current transaction finishes.
...And 33 more matches
WebGL constants - Web APIs
constant name value description depth_buffer_bit 0x00000100 passed to clear to clear the current depth buffer.
... stencil_buffer_bit 0x00000400 passed to clear to clear the current stencil buffer.
... color_buffer_bit 0x00004000 passed to clear to clear the current color buffer.
...And 31 more matches
Gecko info for Windows accessibility vendors
firefox (please use version 1.1 alpha builds or later) thunderbird (please use version 1.1 alpha builds or later) mozilla seamonkey (please use 1.8 alpha builds or later) how to find the content window and load the document screen readers need to find the content window so that they know where to start grabbing the msaa tree, in order to load the current document into a buffer in their own process.
... event_selectionwithin is fired on multi selection containers when the current selection changes within.
...when an event is received, the negative childid should match one of these cached uniqueid's, if the entire document has been stored and kept current.
...And 30 more matches
Key Values - Web APIs
removes the currently selected input.
...deletes all characters from the current cursor position to the end of the current field.
...accepts the currently selected option or input method sequence conversion.
...And 30 more matches
Document - Web APIs
WebAPIDocument
document.body returns the <body> or <frameset> node of the current document.
... document.contenttype read only returns the content-type from the mime header of the current document.
... document.doctyperead only returns the document type definition (dtd) of the current document.
...And 29 more matches
Index
24 js::autosaveexceptionstate jsapi reference, reference, référence(2), spidermonkey js::autosaveexceptionstate saves and later restores the current exception state of a given jscontext.
... 37 js::currentglobalornull jsapi reference, reference, référence(2), spidermonkey js::currentglobalornull() returns the global object for whatever function is currently running on the context.
... in other words, it returns the global object on the current scope chain.
...And 27 more matches
CanvasRenderingContext2D - Web APIs
canvasrenderingcontext2d.strokerect() paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.
... canvasrenderingcontext2d.getlinedash() returns the current line dash pattern array containing an even number of non-negative numbers.
... canvasrenderingcontext2d.setlinedash() sets the current line dash pattern.
...And 25 more matches
HTML attribute: rel - HTML: Hypertext Markup Language
WebHTMLAttributesrel
the rel attribute defines the relationship between a linked resource and the current document.
... values for the rel attribute, and the elements for which each is relevant rel value description <link> <a> and <area> <form> alternate alternate representations of the current document.
... link link not allowed author author of the current document or article.
...And 25 more matches
nsIDocShell
void setcurrenturi(in nsiuri auri); void suspendrefreshuris(); void tabtotreeowner(in boolean forward, out boolean tookfocus); attributes attribute type description allowauth boolean certain dochshells (like the message pane) should not throw up auth dialogs because it can act as a password trojan.
... busyflags unsigned long current busy state for docshell.
...in that case, we explicitly allow scripting on the current docshell.
...And 24 more matches
Feature-Policy - HTTP
directives accelerometer controls whether the current document is allowed to gather information about the acceleration of the device through the accelerometer interface.
... ambient-light-sensor controls whether the current document is allowed to gather information about the amount of light in the environment around the device through the ambientlightsensor interface.
... autoplay controls whether the current document is allowed to autoplay media requested through the htmlmediaelement interface.
...And 23 more matches
nsIEditorSpellCheck
to create an instance, use: var editorspellcheck = components.classes["@mozilla.org/editor/editorspellchecker;1"] .createinstance(components.interfaces.nsieditorspellcheck); method overview void addwordtodictionary(in wstring word); boolean canspellcheck(); void checkcurrentdictionary(); boolean checkcurrentword(in wstring suggestedword); boolean checkcurrentwordnosuggest(in wstring suggestedword); astring getcurrentdictionary(); void getdictionarylist([array, size_is(count)] out wstring dictionarylist, out pruint32 count); wstring getnextmisspelledword(); void getpersonaldictionary(); wstring getperson...
...edword(); void ignorewordalloccurrences(in wstring word); void initspellchecker(in nsieditor editor, in boolean enableselectionchecking); void removewordfromdictionary(in wstring word); void replaceword(in wstring misspelledword, in wstring replaceword, in boolean alloccurrences); void savedefaultdictionary(); obsolete since gecko 9.0 void setcurrentdictionary(in astring dictionary); void setfilter(in nsitextservicesfilter filter); void uninitspellchecker(); void updatecurrentdictionary(); methods addwordtodictionary() adds the specified word to the current personal dictionary.
... void addwordtodictionary( in wstring word ); parameters word the word to add to the current personal dictionary.
...And 22 more matches
Index
MozillaTechXPCOMIndex
4 binary compatibility xpcom if mozilla decides to upgrade to a compiler that does not have the same abi as the current version, any built component may fail.
... 29 components.stack xpcom:language bindings, xpconnect components.stack is a read only property of type nsistackframe (idl definition) that represents a snapshot of the current javascript callstack.
...there are currently three folder classes - nslocalmailfolder, nsimapmailfolder, and nsnewsfolder.
...And 21 more matches
nsIFile
delete_on_close 0x80000000 optional parameter used by opennsprfiledesc methods append() this function is used for constructing a descendant of the current nsifile.
... appendnative this method is used for constructing a descendant of the current nsifile.
... [native character encoding variant] void appendnative( in acstring node ); parameters node a string that is intended to be a child node of the current nsifile.
...And 20 more matches
Window - Web APIs
WebAPIWindow
window.closed read only this property indicates whether the current window is closed or not.
... window.controllers read only returns the xul controller objects for the current chrome window.
... window.devicepixelratio read only returns the ratio between physical pixels and device independent pixels in the current display.
...And 20 more matches
cfx - Archive of obsolete content
called with no options it looks for a file called package.json in the current directory, loads the corresponding add-on, and runs it under the version of firefox it finds in the platform's default install path.
...the path may be specified as a full path or may be relative to the current directory.
...binary may be specified as a full path or as a path relative to the current directory.
...And 19 more matches
source-editor.jsm
constant value sourceeditor.defaults.contextmenu "sourceeditorcontextmenu" sourceeditor.defaults.expandtab true sourceeditor.defaults.highlightcurrentline true sourceeditor.defaults.initialtext "" sourceeditor.defaults.keys null sourceeditor.defaults.mode sourceeditor.modes.text sourceeditor.defaults.readonly false sourceeditor.defaults.showannotationruler false sourceeditor.defaults.showlinenumbers false sourceeditor.defaults.showoverviewruler false ...
... sourceeditor.events.selection "selection" fired when the current selection in the editor changes.
... dropselection() deselects the currently selected text.
...And 18 more matches
Index
newer generations of the database use the sqlite database to allow concurrent access by multiple applications.
...this document is currently being revised and has not yet been reviewed for accuracy.
...on windows nt the default is the current directory.
...And 18 more matches
ARIA Test Cases - Accessibility
finally, a list of currently non-mapped aria roles is given.
... a screen magnifier should move the current view to the alert or open a new panel with the alert information optional, but desired: if there are widgets within the alert, their role and any keyboard mnemonic (accesskey) should be spoken.
...only the bold/italic buttons should be toggle buttons, and they aren't currently toggleable.
...And 18 more matches
sslfnc.html
upgraded documentation may be found in the current nss reference ssl functions chapter 4 ssl functions this chapter describes the core ssl functions.
... ssl_optionsetdefault changes the default value of a specified ssl option for all subsequently opened sockets as long as the current application program is running.
... description this function changes the default values for all subsequently opened sockets as long as the current application program is running.
...And 17 more matches
Shell global objects
filename is relative to the current working directory.
... datenow() return the current time with sub-ms precision.
...if an error occurred, throw the appropriate exception; otherwise, return the module object timeout([seconds], [func]) get/set the limit in seconds for the execution time for the current context.
...And 17 more matches
imgIContainer
obsolete since gecko 2.0 void clear(); obsolete since gecko 1.9.2 gfximagesurface copycurrentframe(); native code only!
... obsolete since gecko 2.0 imgicontainer extractcurrentframe([const] in nsintrect arect); native code only!
... obsolete since gecko 2.0 void getcurrentframerect(in nsintrect aframerect); native code only!
...And 17 more matches
Background Tasks API - Web APIs
this code draws any pending updates to the document currently being displayed, runs any javascript code the page needs to run, accepts events from input devices, and dispatches those events to the elements that should receive them.
...while the browser, your code, and the web in general will continue to run normally if you go over the specified time limit (even if you go way over it), the time restriction is intended to ensure that you leave the system enough time to finish the current pass through the event loop and get on to the next one without causing other code to stutter or animation effects to lag.
... currently, timeremaining() has an upper limit of 50 milliseconds, but in reality you will often have less time than that, since the event loop may already be eating into that time on complex sites, with browser extensions needing processor time, and so forth.
...And 17 more matches
TreeWalker - Web APIs
treewalker.currentnode is the node on which the treewalker is currently pointing at.
...(whether or not the node is visible on the screen is irrelevant.) treewalker.parentnode() moves the current node to the first visible ancestor node in the document order, and returns the found node.
... it also moves the current node to this one.
...And 17 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
hasattribute( aattributename ) returns a boolean stating if the current node has an attribute defined with the specified name.
... haschildnodes() returns a boolean stating whether the current node has any child nodes.
... nextsibling returns the node immediately following the current one.
...And 16 more matches
Element - Web APIs
WebAPIElement
element.closest() returns the element which is the closest ancestor of the current element (or the current element itself) which matches the selectors given in parameter.
... element.getanimations() returns an array of animation objects currently active on the element.
... element.getattribute() retrieves the value of the named attribute from the current node and returns it as an object.
...And 16 more matches
MediaTrackSupportedConstraints - Web APIs
autogaincontrol a boolean whose value is true if the autogaincontrol constraint is supported in the current environment.
... width a boolean value whose value is true if the width constraint is supported in the current environment.
... height a boolean value whose value is true if the height constraint is supported in the current environment.
...And 16 more matches
Capabilities, constraints, and settings - Web APIs
this may not represent the actual current state of the track, due to properties whose requested values had to be adjusted and because platform default values aren't represented.
... for a complete representation of the track's current configuration, use getsettings().
... checking capabilities you can call mediastreamtrack.getcapabilities() to get a list of all of the supported capabilities and the values or ranges of values which each one accepts on the current platform and user agent.
...And 16 more matches
Space Manager Detailed Design - Archive of obsolete content
*/ nsiframe* getframe() const { return mframe; } /** * translate the current origin by the specified (dx, dy).
... this * creates a new local coordinate space relative to the current * coordinate space.
... */ void translate(nscoord adx, nscoord ady) { mx += adx; my += ady; } /** * returns the current translation from local coordinate space to * world coordinate space.
...And 15 more matches
tabbrowser - Archive of obsolete content
attributes autocompleteenabled, autocompletepopup, autoscroll, contentcontextmenu, contenttooltip, handlectrlpageupdown, onbookmarkgroup, onnewtab, tabmodalpromptshowing properties browsers, cangoback, cangoforward, contentdocument, contenttitle, contentvieweredit, contentviewerfile, contentwindow, currenturi, docshell, documentcharsetinfo, homepage, markupdocumentviewer, securityui, selectedbrowser, selectedtab, sessionhistory, tabcontainer, tabs, visibletabs, webbrowserfind, webnavigation, webprogress methods addprogresslistener, addtab, addtabsprogresslistener,appendgroup, getbrowseratindex, getbrowserindexfordocument, getbrowserfordocument, getbrowserfortab, geticon, getnotificationbox, getta...
...bforbrowser, gettabmodalpromptbox, goback, gobackgroup, goforward, goforwardgroup, gohome, gotoindex, loadgroup, loadonetab, loadtabs, loaduri, loaduriwithflags, movetabto, pintab, reload, reloadalltabs, reloadtab, reloadwithflags, removealltabsbut, removecurrenttab, removeprogresslistener, removetab, removetabsprogresslistener,replacegroup, selecttabatindex, seticon, showonlythesetabs, stop, unpintab attributes autocompleteenabled type: boolean set to true to enable autocomplete of fields.
... tabmodalpromptshowing type: integer the number of tab modal prompts currently attached to the current tab.
...And 15 more matches
nsIMsgDBView
keyforfirstselectedmessage nsmsgkey readonly: the key of the first message in the current selection.
... msgfolder nsimsgfolder readonly: the current folder.
... numselected long readonly: the number of messages currently selected.
...And 14 more matches
MediaTrackSettings - Web APIs
the mediatracksettings dictionary is used to return the current values configured for each of a mediastreamtrack's settings.
... properties of all media tracks deviceid a domstring indicating the current value of the deviceid property.
... groupid a domstring indicating the current value of the groupid property.
...And 14 more matches
HTTP Cache
currently we have 3 types of storages, all the access methods return an nsicachestorage object: memory-only (memorycachestorage): stores data only in a memory cache, data in this storage are never put to disk disk (diskcachestorage): stores data on disk, but for existing entries also looks into the memory-only storage; when instructed via a special argument also primarily looks in...
...immediately); there is currently no way to opt out of this feature (watch bug 938186).
...this is called concurrent read/write.
...And 13 more matches
NSS Tools modutil
the following cipher is currently available: fortezza.
...the following mechanisms are currently available: rsa, dsa, rc2, rc4, rc5, des, dh, fortezza, sha1, md5, md2, random (for random number generation), and friendly (meaning certificates are publicly readable).
...if no temporary directory is specified, the current directory will be used.
...And 13 more matches
nsIDOMWindowUtils
thpx, in float aheightpx); void setresolution(in float axresolution, in float ayresolution); void startpccountprofiling(); void stoppccountprofiling(); void suppresseventhandling(in boolean asuppress); void suspendtimeouts(); nsidomfile wrapdomfile(nsifile afile); attributes attribute type description currentinnerwindowid unsigned long long the id of the window's current inner window.
... exceptions thrown ns_error_not_available there is no current inner window displaydpi float the dpi of the display.
... doccharsetisforced boolean whether the charset of the window's current document has been forced by the user.
...And 13 more matches
RTCPeerConnection - Web APIs
connection between the local device and a remote peer.propertiesalso inherits properties from: eventtargetcantrickleicecandidatesthe read-only rtcpeerconnection property cantrickleicecandidates returns a boolean which indicates whether or not the remote peer can accept trickled ice candidates.connectionstate the read-only connectionstate property of the rtcpeerconnection interface indicates the current state of the peer connection by returning one of the string values specified by the enum rtcpeerconnectionstate.currentlocaldescription read only the read-only property rtcpeerconnection.currentlocaldescription returns an rtcsessiondescription object describing the local end of the connection as it was most recently successfully negotiated since the last time the rtcpeerconnection finished negot...
...also included is a list of any ice candidates that may already have been generated by the ice agent since the offer or answer represented by the description was first instantiated.currentremotedescription read only the read-only property rtcpeerconnection.currentremotedescription returns an rtcsessiondescription object describing the remote end of the connection as it was most recently successfully negotiated since the last time the rtcpeerconnection finished negotiating and connecting to a remote peer.
...this does not describe the connection as it currently stands, but as it may exist in the near future.
...And 13 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
type all type of form control value all current value of the form control.
...if present on a radio type, it indicates that that radio button is the currently selected one in the group of same-named radio buttons.
...it does not indicate whether this checkbox is currently checked: if the checkbox’s state is changed, this content attribute does not reflect the change.
...And 13 more matches
Array.prototype.reduce() - JavaScript
the reducer function takes four arguments: accumulator (acc) current value (cur) current index (idx) source array (src) your reducer function's returned value is assigned to the accumulator, whose value is remembered across each iteration throughout the array, and ultimately becomes the final, single resulting value.
... syntax arr.reduce(callback( accumulator, currentvalue, [, index[, array]] )[, initialvalue]) parameters callback a function to execute on each element in the array (except for the first, if no initialvalue is supplied).
... currentvalue the current element being processed in the array.
...And 13 more matches
Installing plugins to Gecko embedding browsers on Windows - Archive of obsolete content
go to hkey_local_machine\software\mozilla caveat emptor: if the mozilla subkey is not present under hkey_local_machine, look under hkey_current_user\software\mozilla\.
...thus, some mozilla based browsers, such as the netscape 6 installer, write to the hkey_current_user key in addition; this doesn't require administrator privileges.
... traditionally, hkey_current_user is a copy of everything in hkey_local_machine.
...And 12 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
79 current xul attributes, xul reference no summary!
... 80 currentset needshelp, xul attributes, xul reference no summary!
... 557 removecurrentnotification xul methods, xul reference no summary!
...And 12 more matches
OS.File for the main thread
lobal object os.file method overview promise<file> open(in string path, [optional] in object mode, [optional] in object options); promise<object> openunique(in string path, [optional] in object options); promise<void> copy(in string sourcepath, in string destpath, [optional] in object options); promise<bool> exists(in string path); promise<string> getcurrentdirectory(); promise<void> makedir(in string path, [optional] in object options); promise<void> move(in string sourcepath, in string destpath); promise<uint8array> read(in string path, [optional] in object options); promise<void> remove(in string path, [optional] in object options); promise<void> removeemptydir(in string path, [optional] in object optio...
...ns); promise<void> removedir(in string path, [optional] in object options); promise<void> setcurrentdirectory(in string path); promise<void> setdates(in string path, in date|number accessdate, in date|number modificationdate); promise<void> setpermissions(in string path, in object options ); promise<file.info> stat(in string path, [optional] in object options); promise<void> unixsymlink(in string targetpath, in string createpath); promise<void> writeatomic(in string path, in arrayview data, in object options); methods os.file.open() use method os.file.open() to open a file.
... os.file.getcurrentdirectory() return the current directory promise<string> getcurrentdirectory() promise resolves to the path to the current directory.
...And 12 more matches
Drawing and Event Handling - Plugins
void npp_print(npp instance, npprint *printinfo); the instance parameter represents the current plug-in.
... nperror npp_setwindow(npp instance, npwindow *window); the instance parameter represents the current plug-in.
... nperror npn_getvalue(npp instance, npnvariable variable, void *value); the instance parameter represents the current plug-in.
...And 12 more matches
Advanced techniques: Creating and sequencing audio - Web APIs
the oscillator now we can create an oscillatornode and set its wave to the one we've created: function playsweep() { let osc = audioctx.createoscillator(); osc.setperiodicwave(wave); osc.frequency.value = 440; osc.connect(audioctx.destination); osc.start(); osc.stop(audioctx.currenttime + 1); } controlling amplitude this is great, but wouldn't it be nice if we had an amplitude envelope to go with it?
... let sweeplength = 2; function playsweep() { let osc = audioctx.createoscillator(); osc.setperiodicwave(wave); osc.frequency.value = 440; let sweepenv = audioctx.creategain(); sweepenv.gain.cancelscheduledvalues(audioctx.currenttime); sweepenv.gain.setvalueattime(0, audioctx.currenttime); // set our attack sweepenv.gain.linearramptovalueattime(1, audioctx.currenttime + attacktime); // set our release sweepenv.gain.linearramptovalueattime(0, audioctx.currenttime + sweeplength - releasetime); osc.connect(sweepenv).connect(audioctx.destination); osc.start(); osc.stop(audioctx.currenttime + s...
...weeplength); } note: we'll talk about the property baseaudiocontext.currenttime later, so don't worry if you're unsure of it for now.
...And 12 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
placing pointer files first, navigate to the profile folder of the currently active profile4, and open the extensions folder within it.
... listing 5: content for clock.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/"?> <dialog id="clockdialog" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="clock" buttons="accept" onload="initclock();"> <script type="application/javascript" src="chrome://helloworld/content/clock.js"/> <hbox align="center"> <label value="current time:" /> <textbox id="currenttime" /> </hbox> </dialog> listing 6: content for clock.js function initclock() { showcurrenttime(); window.setinterval(showcurrenttime, 1000); } function showcurrenttime() { var textbox = document.getelementbyid("currenttime"); textbox.value = new date().tolocaletimestring(); textbox.select(); } operations check perform an operations check to ...
...in phase 3, we’re going to add multilingual support, making it so that it users running firefox in a french environment will see “heure actuelle”, and those running it in english will see “current time” (figure 7).
...And 11 more matches
Appendix D: Loading Scripts - Archive of obsolete content
disadvantages performance: there are several significant performance disadvantages inherent in this method: there is currently no way to load code into sandboxes from a cache.
... examples the following code will execute a simple script in a sandbox with the privilege level of the current content page.
... the globals of the current content window will be available in the scripts global scope.
...And 11 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
currently, all mozilla browsers released by mozilla.org support xpinstall, and a family of browsers based on mozilla code support xpinstall.
...an ideal xpi package will: install to the current browser that is initiating the xpinstall installation via html or triggering an xpinstall installation via a trigger script.
... we will use the term current browser to refer to the browser that initiates the xpinstall download by visiting a site which requires a plugin that the current browser can not find locally.
...And 11 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 additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, ...
... currentindex type: integer set to the index of the currently focused item in the list.
...(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.
...And 11 more matches
richlistbox - Archive of obsolete content
attributes disabled, disablekeynavigation, preference, seltype, suppressonselect, tabindex, value properties accessibletype, currentindex, currentitem, disabled, disablekeynavigation, itemcount, scrollboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem...
... currentindex type: integer set to the index of the currently focused item in the list.
...(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.
...And 11 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
40 breadcrumb accessibility, glossary, navigation, search, site map, breadcrumb a breadcrumb, or breadcrumb trail, is a navigational aid that is typically placed between a site's header and the main content, displaying either a hierarchy of the current page in relation to the the site's structure, from top level to current page, or a list of the links the user followed to get to the current page, in the order visited.
... 62 call stack call stack, codingscripting, glossary, javascript a call stack is a mechanism for an interpreter (like the javascript interpreter in a web browser) to keep track of its place in a script that calls multiple functions — what function is currently being run and what functions are called from within that function, etc.
...to enable concurrent downloads of assets exceeding that limit, domain sharding splits content across multiple subdomains.
...And 11 more matches
nsIMicrosummaryService
if the caller passes a bookmark id, and one of the microsummaries is the current one for the bookmark, this method will retrieve content from the datastore for that microsummary, which is useful when callers want to display a list of microsummaries for a page that isn't loaded, and they want to display the actual content of the selected microsummary immediately (rather than after the content is asynchronously loaded).
...getmicrosummary() get the current microsummary for the given bookmark.
... nsimicrosummary getmicrosummary( in long long bookmarkid ); parameters bookmarkid the bookmark for which to get the current microsummary.
...And 11 more matches
SVGSVGElement - Web APIs
(if the parent uses css or xsl layout, then unitless values represent pixel units for the current css or xsl viewport.) svgsvgelement.pixelunittomillimeterx a float representing the size of the pixel unit (as defined by css2) along the x-axis of the viewport, which represents a unit somewhere in the range of 70dpi to 120dpi, and, on systems that support this, might actually match the characteristics of the target medium.
... svgsvgelement.usecurrentview the initial view (i.e., before magnification and panning) of the current innermost svg document fragment can be either the "standard" view, i.e., based on attributes on the <svg> element such as viewbox) or on a "custom" view (i.e., a hyperlink into a particular <view> or other element).
... svgsvgelement.currentview an svgviewspec defining the initial view (i.e., before magnification and panning) of the current innermost svg document fragment.
...And 11 more matches
Handling common accessibility problems - Learn web development
activeelement gives us the element that is currently focused on the page.
... when vo is on, the display will look mostly the same, but you'll see a black box at the bottom left of the screen that contains information on what vo currently has selected.
... the current selection will also be highlighted, with a black border — this highlight is known as the vo cursor.
...And 10 more matches
A basic 2D WebGL animation example - Web APIs
let gl = null; let glcanvas = null; // aspect ratio and coordinate system // details let aspectratio; let currentrotation = [0, 1]; let currentscale = [1.0, 1.0]; // vertex information let vertexarray; let vertexbuffer; let vertexnumcomponents; let vertexcount; // rendering data shared with the // scalers.
...d", startup, false); function startup() { glcanvas = document.getelementbyid("glcanvas"); gl = glcanvas.getcontext("webgl"); const shaderset = [ { type: gl.vertex_shader, id: "vertex-shader" }, { type: gl.fragment_shader, id: "fragment-shader" } ]; shaderprogram = buildshaderprogram(shaderset); aspectratio = glcanvas.width/glcanvas.height; currentrotation = [0, 1]; currentscale = [1.0, aspectratio]; vertexarray = new float32array([ -0.5, 0.5, 0.5, 0.5, 0.5, -0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5 ]); vertexbuffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, vertexbuffer); gl.bufferdata(gl.array_buffer, vertexarray, gl.static_draw); vertexnumcomponents = 2; vertexcount = vertexarray.length/vertexnumcompo...
...nents; currentangle = 0.0; rotationrate = 6; animatescene(); } after getting the webgl context, gl, we need to begin by building the shader program.
...And 10 more matches
Index - HTTP
WebHTTPHeadersIndex
21 connection http, headers, reference, web the connection general header controls whether or not the network connection stays open after the current transaction finishes.
... 64 feature-policy: autoplay directive, feature policy, feature-policy, http, reference, autoplay the http feature-policy header autoplay directive controls whether the current document is allowed to autoplay media requested through the htmlmediaelement interface.
... 65 feature-policy: camera directive, feature policy, feature-policy, http, reference, camera the http feature-policy header camera directive controls whether the current document is allowed to use video input devices.
...And 10 more matches
Tabbed browser - Archive of obsolete content
openuilinkin( url, where, allowthirdpartyfixup, postdata, referrerurl ) where: "current" current tab (if there aren't any browser windows, then in a new window instead) "tab" new tab (if there aren't any browser windows, then in a new window instead) "tabshifted" same as "tab" but in background if default is to select new tabs, and vice versa "window" new window "save" save to disk (with no filename hint!) openuilink( url, e, ignorebutton, ignorealt, allowkeywordfixup, ...
...var url = "https://developer.mozilla.org"; var tab = gbrowser.addtab(null, {relatedtocurrent: true}); gsessionstore.settabstate(tab, json.stringify({ entries: [ { title: url } ], usertypedvalue: url, usertypedclear: 2, lastaccessed: tab.lastaccessed, index: 1, hidden: false, attributes: {}, image: null })); reusing tabs rather than open a new browser or new tab each and every time one is needed, it is good practice to try to re-use an existing tab which already d...
...ator("navigator:browser"); // check each browser instance for our url var found = false; while (!found && browserenumerator.hasmoreelements()) { var browserwin = browserenumerator.getnext(); var tabbrowser = browserwin.gbrowser; // check each tab of this browser instance var numtabs = tabbrowser.browsers.length; for (var index = 0; index < numtabs; index++) { var currentbrowser = tabbrowser.getbrowseratindex(index); if (url == currentbrowser.currenturi.spec) { // the url is already opened.
...And 9 more matches
New Skin Notes - Archive of obsolete content
this is currently just a preview, but we would appreciate help with testing.
...--maian 21:08, 1 sep 2005 (pdt) in the new mw1.5 skin (not the one currently available here) there's class "wrong" and class "wrong-inline".
...it looks odd when someone who uses devmo on regular basis sees some violet links just because he already worked with this site yesterday.also, the current color for visited links makes them less visible.
...And 9 more matches
Mozilla release FAQ - Archive of obsolete content
what is the current version of mozilla?
...the current arrangement between netscape (aol) and the mozilla project is that mozilla develops its own releases, and when netscape (aol) is preparing to make a release, it takes the current version of mozilla, makes modifications, and does its own qa.
...if not, post to netscape.public.mozilla.builds problems of this sort are currently most likely to happen in nspr, as it still uses the classic build system.
...And 9 more matches
Audio for Web games - Game development
this article provides a detailed guide to implementing audio for web games, looking at what works currently across as wide a range of platforms as possible.
...in the case of autoplay on ios, this appears to be the case currently.
... concurrent audio playback a requirement of many games is the need to play more than one piece of audio at the same time; for example, there might be background music playing along with sound effects for various things happening in the game.
...And 9 more matches
CustomizableUI.jsm
this is analogous to the old currentset attribute.
... legacy set to true if you want customizableui to automatically migrate the currentset attribute.
... if the area to which you try to add has not yet been restored from its legacy state (currentset attribute), this will postpone the addition.
...And 9 more matches
Rhino Debugger
current limitations: no breakpoint menu using the rhino javascript debugger the mozilla rhino javascript engine includes a source-level debugger for debugging javascript scripts.
... the rhino javascript debugger can debug scripts running in multiple threads and provides facilities to set and clear breakpoints, control execution, view variables, and evaluate arbitrary javascript code in the current scope of an executing script.
...if the current line in the script contains a function call control will return to the debugger upon entry into the function.
...And 9 more matches
nsIFocusManager
setting the activewindow raises it, and focuses the current child window's current element, if any.
... focusedelement nsidomelement the element that is currently focused.
...if the current focus within the new focusedwindow is a frame element, then the focusedwindow will actually be set to the child window and the current element within that set as the focused element.
...And 9 more matches
Working with the History API - Web APIs
the pushstate() method pushstate() takes three parameters: a state object; a title (currently ignored); and (optionally), a url.
... title all browsers but safari currently ignore this parameter, although they may use it in the future.
...the new url does not need to be absolute; if it's relative, it's resolved relative to the current url.
...And 9 more matches
Using IndexedDB - Web APIs
blink/webkit supports the current version of the spec, as shipped in chrome 23+ and opera 17+; ie10+ does too.
... other and older implementations don't implement the current version of the spec, and thus do not support the indexeddb.open(name, version).onupgradeneeded signature yet.
...the current number of a key generator is always set to 1 when the object store for that key generator is first created.
...And 9 more matches
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
44 color svg, svg attribute the color attribute is used to provide a potential indirect value, currentcolor, for the fill, stroke, stop-color, flood-color, and lighting-color attributes.
... 70 externalresourcesrequired deprecated, needsexample, svg, svg attribute the externalresourcesrequired attribute specifies whether referenced resources that are not part of the current document are required for proper rendering of the given container or graphics element.
... 77 flood-color svg, svg attribute, svg filter the flood-color attribute indicates what color to use to flood the current filter primitive subregion.
...And 9 more matches
selection - Archive of obsolete content
get and set text and html selections in the current web page.
... examples log the current contiguous selection as text: var selection = require("sdk/selection"); if (selection.text) console.log(selection.text); log the current discontiguous selections as html: var selection = require("sdk/selection"); if (!selection.iscontiguous) { for (var subselection in selection) { console.log(subselection.html); } } surround html selections with delimiters: var selection = require...
...("sdk/selection"); selection.on('select', function () { selection.html = "\\\" + selection.html + "///"; }); globals properties text gets or sets the current selection as plain text.
...And 8 more matches
ui/button/toggle - Archive of obsolete content
when a button is checked it gets a "pressed" look in the user interface (note that the "pressed" look currently does not work in mac os x).
...for example, you might want to give it a different appearance when the current page is being served over https.
...to set state like this, call state() with 2 parameters: the first parameter is a window or tab object or as a shorthand, the string "window" for the currently active window, or the string "tab" for the currently active tab the second parameter is an object containing the state properties you wish to update.
...And 8 more matches
jpm - Archive of obsolete content
jpm usage is: jpm [command] [options] jpm supports the following global options: -h, --help - show a help message and exit -v, --version - print the jpm version number --addon-dir - directory for your source code, defaulting to the current directory installation jpm is distributed with the node package manager npm.
...binary may be specified as a full path or as a path relative to the current directory.
...the command: looks for a directory called "test" within the current directory (or --addon-dir).
...And 8 more matches
Building accessible custom components in XUL - Archive of obsolete content
<code> grid.spreadsheet { border: thin solid; -moz-user-focus: normal; } </code> in html documents, firefox draws a focus rectangle around the currently focused element.
...if you want to navigate up one row, it is relatively easy to find the right cell; it's the previous sibling of the currently focused cell.
... similarly, navigating down one row simply requires finding the next sibling of the currently focused cell.
...And 8 more matches
XForms Custom Controls - Archive of obsolete content
for example, you might want to render images that are held inside an instance document or you would like to show a disabled trigger when its bound node becomes irrelevant rather than having it not display (the current default behavior).
...xf|output[mediatype^="image"] { -moz-binding: url('chrome://xforms/content/xforms-xhtml.xml#xformswidget-output-mediatype-anyuri'); } custom data types if you define a new schema data type or you use a built-in data type and find the current xforms control for this type to be insufficient, then you should write a new custom control.
...however, the mozilla xforms implementation currently doesn't support this approach.
...And 8 more matches
What are browser developer tools? - Learn web development
these tools do a range of things, from inspecting currently-loaded html, css and javascript to showing which assets the page has requested and how long they took to load.
...deletes the current element.
...copy the currently selected html.
...And 8 more matches
mach
requirements mach requires a current version of /mozilla-central/ (or a tree derived from there).
...mach's logic for determining which mozconfig to use is effectively the following: if a .mozconfig file (some say it is the file mozconfig without the dot) exists in the current directory, use that.
... if the current working directory mach is invoked with is inside an object directory, the mozconfig used when creating that object directory is used.
...And 8 more matches
IME handling guide
finally, this class guarantees that requesting to commit or cancel current composition to ime is perefored synchronously.
...currently, it's tried: after a native event is dispatched from presshell::handleeventinternal() at changing focus from a windowless plugin when new focused editor receives dom "focus" event the 3rd timing may not be safe actually, but it causes a lot of oranges of automated tests.
... currently, widgetquerycontentevent is handled via imecontentobserver because if it has a cache of selection, it can set reply of equeryselectedtext event only with the cache.
...And 8 more matches
Midas
document.querycommandenabled determines whether the given command can be executed on the document in its current state.
... document.querycommandindeterm determines whether the current selection is in an indetermined state.
... document.querycommandstate determines whether the given command has been executed on the current selection.
...And 8 more matches
nsIDragService
the only exception is getcurrentsession(), since there's currently no way to check for a drag in progress using standard dom methods or properties.
... nsidragsession getcurrentsession( ) ; void invokedragsession( in nsidomnode adomnode, in nsisupportsarray atransferables, 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 adata...
... [noscript] void firedrageventatsource( in mozilla::eventmessage aeventmessage ); parameters aeventmessage one of the event messages between edragdropeventfirst and edragdropeventlast defined in widget/eventmessagelist.h getcurrentsession() returns the current nsidragsession.
...And 8 more matches
nsIHTMLEditor
tle); void setinlineproperty(in nsiatom aproperty, in astring aattribute, in astring avalue); void setparagraphformat(in astring aparagraphformat); void updatebaseurl(); attributes attribute type description iscssenabled boolean a boolean which is true is the htmleditor has been instantiated with css knowledge and if the css pref is currently checked.
... boolean breakisvisible( in nsidomnode anode ); parameters anode return value candrag() decides if a drag should be started (for example, based on the current selection and mousepoint).
...if it is null, the anchor node of the current selection is used.
...And 8 more matches
nsITreeView
: renamed from progressnone in gecko 1.8 drop_before -1 drop_on 0 drop_after 1 indropbefore 0 obsolete since gecko 1.8 indropon 1 obsolete since gecko 1.8 indropafter 2 obsolete since gecko 1.8 methods candrop() methods used by the drag feedback code to determine if a drag is allowable at the current location.
... return value true if a drop is allowed at the current location; otherwise false.
... candropbeforeafter() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method used by the drag feedback code to determine if a drag is allowable at the current location.
...And 8 more matches
Using the Geolocation API - Web APIs
you can test for the presence of geolocation thusly: if('geolocation' in navigator) { /* geolocation is available */ } else { /* geolocation is not available */ } getting the current position to obtain the user's current location, you can call the getcurrentposition() method.
... note: by default, getcurrentposition() tries to answer as fast as possible with a low accuracy result.
...devices with a gps, for example, can take a minute or more to get a gps fix, so less accurate data (ip location or wifi) may be returned to getcurrentposition().
...And 8 more matches
Timing element visibility with the Intersection Observer API - Web APIs
visibleads a set which we'll use to track the ads currently visible on the screen.
... }); } } else { previouslyvisibleads.foreach(function(adbox) { adbox.dataset.lastviewstarted = performance.now(); }); visibleads = previouslyvisibleads; previouslyvisibleads = null; } } since the event itself doesn't state whether the document has switched from visible to invisible or vice-versa, the document.hidden property is checked to see if the document is not currently visible.
... if the document has just become visible, we reverse this process: first we go through previouslyvisibleads and set each one's dataset.lastviewstarted to the current document's time (in milliseconds since the document was created) using the performance.now() method.
...And 8 more matches
TextRange - Web APIs
WebAPITextRange
methods textrange.collapse() move the caret to the beginning or end of the current range.
... textrange.execcommand() executes a command on the current document, the current selection, or the given scope.
... textrange.inrange() returns whether the current range contains the specified range.
...And 8 more matches
Window: popstate event - Web APIs
it changes the current history entry to that of the last page the user visited or, if history.pushstate() has been used to add a history entry to the history stack, that history entry is used instead.
... note: when writing functions that process popstate event it is important to take into account that properties like window.location will already reflect the state change (if it affected the current url), but document might still not.
... to better understand when the popstate event is fired, consider this simplified sequence of events that occurs when the current history entry changes due to either the user navigating the site or the history being traversed programmatically.
...And 8 more matches
Creating a cross-browser video player - Developer guides
of course this custom control set is currently useless and doesn't do a thing: let's improve the situation with javascript.
... play/pause playpause.addeventlistener('click', function(e) { if (video.paused || video.ended) video.play(); else video.pause(); }); when a click event is detected on the play/pause button, the handler first of all checks if the video is currently paused or has ended (via the media api's paused and ended attributes); if so, it uses the play() method to playback the video.
... stop stop.addeventlistener('click', function(e) { video.pause(); video.currenttime = 0; progress.value = 0; }); the media api doesn't have a stop method, so to mimic this the video is paused, and its currenttime (i.e.
...And 8 more matches
Forms related code snippets - Archive of obsolete content
document.createelement("thead"), ocapt = document.createelement("caption"), odecryear = document.createelement("span"), oincryear = document.createelement("span"), odecrmonth = document.createelement("span"), oincrmonth = document.createelement("span"); var nid = ainstances.length, oth; this.target = otarget; this.display = document.createelement("span"); this.current = new date(); this.container = otable; this.display.classname = sprefs + "-current-month"; this.id = nid; otable.classname = sprefs + "-calendar"; otable.id = sprefs + "-cal-" + nid; odecryear.classname = sprefs + "-decrease-year"; odecrmonth.classname = sprefs + "-decrease-month"; oincrmonth.classname = sprefs + "-increase-month"; oincryear.classname = sprefs ...
...thid++) { oth = document.createelement("th"); oth.innerhtml = sdays[nthid]; ohrow.appendchild(oth); } othead.appendchild(ohrow); ocapt.appendchild(odecryear); ocapt.appendchild(odecrmonth); ocapt.appendchild(oincryear); ocapt.appendchild(oincrmonth); ocapt.appendchild(this.display); this.container.appendchild(ocapt); this.container.appendchild(othead); this.current.setdate(1); this.writedays(); otarget.onclick = function () { if (otable.parentnode) { otable.parentnode.removechild(otable); return; } otable.style.zindex = nzindex++; otable.style.position = "absolute"; otable.style.left = otarget.offsetleft + "px"; otable.style.top = (otarget.offsettop + otarget.offsetheight) + "px"; otarget.pa...
...rentnode.insertbefore(otable, otarget); }; ainstances.push(this); } datepicker.prototype.writedays = function () { const nendblanks = (this.current.getday() + bzeroismonday * 6) % 7, nend = amonthlengths[this.current.getmonth()] + nendblanks, ntotal = nend + ((7 - nend % 7) % 7); var otd, otr; if (this.otbody) { this.container.removechild(this.otbody); } this.otbody = document.createelement("tbody"); for (var nday, oday, niter = 0; niter < ntotal; niter++) { if (niter % 7 === 0) { otr = document.createelement("tr"); this.otbody.appendchild(otr); } nday = niter - nendblanks + 1; otd = document.createelement("td"); if (niter + 1 > nendblanks && niter < nend) { otd.classname = spre...
...And 7 more matches
Accessibility in React - Learn web development
this outline is your visual indicator that the browser is currently focused on this element.
...react’s useref hook creates an object with a single property: current.
...useeffect() is useful in the current situation because we cannot focus on an element until after the <todo /> component renders and react knows where our refs are.
...And 7 more matches
Handling common JavaScript problems - Learn web development
if you want this to work correctly, you need to define a function to add the handler separately, calling it on each iteration and passing it the current value of para and i each time (or something similar).
... the right-hand panel shows useful details pertaining to the current environment — breakpoints, callstack and currently active scopes.
... the main feature of such tools is the ability to add breakpoints to code — these are points where the execution of the code stops, and at that point you can examine the environment in its current state and see what is going on.
...And 7 more matches
Command line crash course - Learn web development
for example, after typing the above two commands, try typing cd d and pressing tab — it should autocomplete the directory name desktop for you, provided it is present in the current directory.
...this usually becomes easier as you get more familiar with the structure of your file system, but if you are not sure of the path you can usually figure it out with a combination of the ls command (see below), and by clicking around in your explorer/finder window to see where a directory is, relative to where you currently are.
...a leading slash means "at the root of the web site", whereas omitting the slash means "the url is relative to my current page".
...And 7 more matches
Accessibility API cross-reference
an interesting problem is that mozilla, safari/khtml, opera, staroffice and other apps are cross-platform, but there is currently no cross-platform accessibility api.
... the ipc mechanisms used by current generation api's are also not cross-platform, although communication for some cross-platform accessibility api of the future could be done through sockets.
... pagetablist page_tab_list page_tab_list tablist a pane or frame in the current window pane n/a region or group ?
...And 7 more matches
Accessible Toolkit Checklist
the checklist this checklist is currently only for microsoft windows, but should be expanded to include information about linux and os x.
...upt the tab cycle or make it disorderly tab cycle must be identical backwards and forwards the f6 and shift+f6 key combinations should cycle through panes in a window making focus visible on any widget, and focus must always be visible shift+f10 or context menu key should work like right click on focused item, and context menu should show just under and to the right of the current focus.
... engine - drawing underline under correct letter events - making keystrokes do the right thing msaa support, via iaccessible's get_acckeyboardshortcut support for ms windows settings when high contrast checkbox is set (in accessibility control panel, spi_gethighcontrast), or when user selects a "native" skin option in your software, then get all look and feel from current os skin.
...And 7 more matches
Embedding the editor
introduction this document describes the current state of editor embeddability, problems with the existing implementation, some possible embedding scenarios that we need to deal with, and an embedding solution that will fulfill them.
...(the current nseditorshell makes assumptions about the hosting xul document, which need to be broken.) composer embedded in a web page (<htmlarea>) ie 5 supports the <htmlarea> element; if mozilla is to support something similar, editor needs to be embeddable to the extent that this can be done.
...current problems the current composer architecture was created while other parts of mozilla were still under development, and as a result it suffers from a number of shortcomings, and anachronisms.
...And 7 more matches
Web Replay
there are a few ways to start recording a tab: record current tab open the developer tools and click the button indicated below.
... timeline the timeline is shown above the developer tools and provides several features to help with navigating the recording: the timeline changes color depending on whether the tab is currently recording (red) or replaying (blue).
... the current position within the recording is shown on the timeline with a progress indicator.
...And 7 more matches
Gecko object attributes
applied to: any role exposed via aria: aria-atomic live a hint as to whether changes within the current region or subtree should be automatically presented.
... container-busy the current changes are not yet complete.
... a state change event for the a11y api's busy state will be fired on the container object currently marked as busy, once it is no longer busy.
...And 7 more matches
Accessing the Windows Registry Using XPCOM
a simple example here's a simple example showing how to read your windows productid: var wrk = components.classes["@mozilla.org/windows-registry-key;1"] .createinstance(components.interfaces.nsiwindowsregkey); wrk.open(wrk.root_key_local_machine, "software\\microsoft\\windows\\currentversion", wrk.access_read); var id = wrk.readstringvalue("productid"); wrk.close(); this example, while simple, shows several important things about using the interface.
...they are: root_key_classes_root — corresponds to hkey_classes_root root_key_current_user — corresponds to hkey_current_user root_key_local_machine — corresponds to hkey_local_machine the second parameter for open() and create() is the path to the key.
...here's the simple example again, but using openchild(): var wrk = components.classes["@mozilla.org/windows-registry-key;1"] .createinstance(components.interfaces.nsiwindowsregkey); wrk.open(wrk.root_key_local_machine, "software\\microsoft", wrk.access_read); var subkey = wrk.openchild("windows\\currentversion", wrk.access_read); var id = subkey.readstringvalue("productid"); subkey.close(); wrk.close(); once you've opened a registry key, you can begin to make use of it.
...And 7 more matches
nsIMessenger
navigatepos long the current index in the navigation history.
... setwindow() sets the current window for a messenger session.
... openurl() opens a url in the current window (set by setwindow()) and adds it to the current history.
...And 7 more matches
Index - Firefox Developer Tools
3 accessibility inspector accessibility, accessibility inspector, devtools, guide, tools the accessibility inspector provides a means to access important information exposed to assistive technologies on the current page via the accessibility tree, allowing you to check what's missing or otherwise needs attention.
... 16 dom property viewer dom, tools, web development the dom property viewer lets you inspect the properties of the dom as an expandable tree structure, starting from the window object of the current page or the selected iframe.
... 31 eyedropper firefox, tools, web development:tools the eyedropper tool enables you to select colors in the current page.
...And 7 more matches
Drawing shapes with canvas - Web APIs
closepath() adds a straight line to the path, going to the start of the current sub-path.
... note: when the current path is empty, such as immediately after calling beginpath(), or on a newly created canvas, the first path construction command is always treated as a moveto(), regardless of what it actually is.
...this method tries to close the shape by drawing a straight line from the current point to the start.
...And 7 more matches
Transformations - Web APIs
every time the save() method is called, the current drawing state is pushed onto the stack.
... the current values of the following attributes: strokestyle, fillstyle, globalalpha, linewidth, linecap, linejoin, miterlimit, linedashoffset, shadowoffsetx, shadowoffsety, shadowblur, shadowcolor, globalcompositeoperation, font, textalign, textbaseline, direction, imagesmoothingenabled.
... the current clipping path, which we'll see in the next section.
...And 7 more matches
Document.execCommand() - Web APIs
when an html document has been switched to designmode, its document object exposes an execcommand method to run commands that manipulate the current editable region, such as form inputs or contenteditable elements.
...when using contenteditable, execcommand() affects the currently active editable element.
...(not supported by internet explorer.) copy copies the current selection to the clipboard.
...And 7 more matches
Navigator - Web APIs
WebAPINavigator
properties doesn't inherit any properties, but implements those defined in navigatorid, navigatorlanguage, navigatoronline, navigatorcontentutils, navigatorstorage, navigatorstorageutils, navigatorconcurrenthardware, navigatorplugins, and navigatorusermedia.
... standard navigatorid.appcodename read only returns the internal "code" name of the current browser.
... navigatorconcurrenthardware.hardwareconcurrency read only returns the number of logical processor cores available.
...And 7 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
they need to know about focus changes and other events, and it needs to know what objects are contained in the current document or dialog box.
...finally, voice dictation software needs to know what's in the current document or ui in order to implement "say what you see" kinds of features.
... msaa provides information in several different ways: a com interface (iaccessible) that allows applications to expose the tree of data nodes that make up each window in the user interface currently being interacted with and custom interface extensions via interfaces via queryinterface and queryservice.
...And 7 more matches
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
2 allowing cross-origin use of images and canvas advanced, cors, canvas, html, image, reference, security, storage, data html provides a crossorigin attribute for images that, in combination with an appropriate cors header, allows images defined by the <img> element that are loaded from foreign origins to be used in a <canvas> as if they had been loaded from the current origin.
... 8 accesskey global attributes, html, reference, accesskey the accesskey global attribute provides a hint for generating a keyboard shortcut for the current element.
... 47 html attribute: rel attribute, attributes, constraint validation, link, form, rel the rel attribute defines the relationship between a linked resource and the current document.
...And 7 more matches
Array.prototype.reduceRight() - JavaScript
syntax arr.reduceright(callback(accumulator, currentvalue[, index[, array]])[, initialvalue]) parameters callback function to execute on each value in the array, taking four arguments: accumulator the value previously returned in the last invocation of the callback, or initialvalue, if supplied.
... (see below.) currentvalue the current element being processed in the array.
... indexoptional the index of the current element being processed in the array.
...And 7 more matches
async function - JavaScript
the default return value of undefined is returned as the resolution value of the current promise.
...as a result, we must be mindful of error handling behavior when dealing with concurrent asynchronous operations.
...} async function concurrentstart() { console.log('==concurrent start with await=='); const slow = resolveafter2seconds() // starts timer immediately const fast = resolveafter1second() // starts timer immediately // 1.
...And 7 more matches
xlink:href - SVG: Scalable Vector Graphics
the target element must be part of the current svg document fragment.
... if the xlink:href attribute is not provided, the target element will be the immediate parent element of the current animation element.
... value <iri> default value none animatable yes filter for <filter>, xlink:href defines the reference to another <filter> element within the current svg document fragment.
...And 7 more matches
ui/sidebar - Archive of obsolete content
called with no arguments, show() and hide() will operate on the currently active window.
... to show what a sidebar looks like, here's a sidebar that displays the results of running the w3c validator on the current page: specifying sidebar content the content of a sidebar is specified using html, which is loaded from the url supplied in the url option to the sidebar's constructor.
...if it is omitted, then the sidebar will be shown in the currently active window.
...And 6 more matches
Install script template - Archive of obsolete content
installs to the current browser that is invoking the installation 2.
...m/myplugin,version=5.3"; var version = "5.3.0.0"; var mimetype = "application/x-my-plugin"; var suffix = "my"; var suffix_description = "my plugin files"; var company_name = "mypluginco"; var plugin_description = "my exemplary plugin mine all mine"; // registry constant paths // these will be used when the win32 registry keys are written var hkey_local_machine = "hkey_local_machine"; var hkey_current_user = "hkey_current_user"; var reg_moz_path = "software\\mozillaplugins"; // my own error code in case secondary installation fails var nosecondaryinstall = 1; // error return codes need some memory var err; // error return codes when we try and install to the current browser var errblock1; // error return codes when we try and do a secondary installation var errblock2 = 0; // global ...
... here, cancel the installation // initinstall is quite an overloaded method, but i have invoked it here with three strings // which are globally defined err = initinstall(software_name, plid, version); if (err != 0) { // call initinstall again in case illegal characters in plid err = initinstall(software_name, software_name, version); if (err != 0) cancelinstall(err); } //addfiles to current browser block var pluginsfolder = getfolder("plugins"); //verify disk space if(verifydiskspace(pluginsfolder, plugin_size+component_size)) { // start installing plugin shared library reseterror(); // install the plugin shared library to the current browser's plugin directory errblock1 = addfile (plid, version, plugin_file, pluginsfolder, null); if (errblock1!=0) { logcomment("could ...
...And 6 more matches
Video and Audio APIs - Learn web development
next, let's define stopmedia() — add the following function below playpausemedia(): function stopmedia() { media.pause(); media.currenttime = 0; play.setattribute('data-icon','p'); } there is no stop() method on the htmlmediaelement api — the equivalent is to pause() the video, and set its currenttime property to 0.
... setting currenttime to a value (in seconds) immediately jumps the media to that position.
...add the following below your two previous functions: function windbackward() { if(media.currenttime <= 3) { rwd.classlist.remove('active'); clearinterval(intervalrwd); stopmedia(); } else { media.currenttime -= 3; } } function windforward() { if(media.currenttime >= media.duration - 3) { fwd.classlist.remove('active'); clearinterval(intervalfwd); stopmedia(); } else { media.currenttime += 3; } } again, we'll just run through the first one of the...
...And 6 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
code along with us git clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/03-adding-dynamic-behavior or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/03-adding-dynamic-behavior remember to run npm install && npm run dev to start your app in development mode.
... repl to code along with us using the repl, start at https://svelte.dev/repl/c862d964d48d473ca63ab91709a0a5a0?version=3.23.2 working with todos our todos.svelte component is currently just displaying static markup; let's start making it a bit more dynamic.
...the second parameter, if provided, will contain the index of the current item.
...And 6 more matches
Mozilla accessibility architecture
we do not currently support the carbon accessibility model for apple's os x.
...for example, tables support nsiaccessibletable, text supports nsiaccessibletext and edit boxes support nsieditabletext., although this code has been moved into the atk specific directories because it is not currently used in windows.
... accessible/src/other/ empty implementations of platform-specific classes so that builds don't fail on platforms currently not-supported where we put toolkit-specific code because atk and msaa are different accessibility api toolkits which share only about 75% of their code, there is a lot of toolkit-specific code that needs to live somewhere.
...And 6 more matches
Mozilla’s UAAG evaluation report
does not contradict current specifications for html and css rendering.
...(p2) c windows can be configured so that the window with the current focus is always on top.
...(p2) vg provides forward and reverse text search capability from the element with the current focus/selection, with and without case sensitivity very slow on larger documents.
...And 6 more matches
DeferredTask.jsm
method overview bool ispending();obsolete since gecko 28 void start();obsolete since gecko 28 void flush();obsolete since gecko 28 void cancel();obsolete since gecko 28 void arm(); void disarm(); promise finalize(); attributes isarmed boolean indicates whether the task is currently requested to start again later, regardless of whether it is currently running.
... isrunning boolean indicates whether the task is currently running.
... methods ispending obsolete since gecko 28 check the current task state.
...And 6 more matches
JavaScript OS.Constants
profiledir the path to the current profile.
... s_irwxu current user can read, write, execute the file.
... s_irusr current user can read the file.
...And 6 more matches
Rhino scopes and contexts
before using rhino in a concurrent environment, it is important to understand the distinction between contexts and scopes.
... to associate the current thread with a context, simply call the enter method of context: context cx = context.enter(); once you are done with execution, simply exit the context: context.exit(); these calls will work properly even if there is already a context associated with the current thread.
...you can create a scope using one context and then evaluate a script using that scope and another context (either by exiting the current context and entering another, or by executing on a different thread).
...And 6 more matches
Starting WebLock
addsite - add the current url to the white list.
... removesite - remove the current url from the white list.
...for example, addsite is supposed to add the current url to the white list, but is the url an input parameter to the method, is it the topmost web page in the gecko application, or is it something more random-a url picked from global history or that's been given context in some other way?
...And 6 more matches
IAccessibleTable
accessible if both row and column index are valid then the corresponding accessible object is returned that represents the requested cell regardless of whether the cell is currently visible (on the screen).
...[propget] hresult ncolumns( [out] long columncount ); parameters columncount number of columns in table (including columns outside the current viewport) return value s_ok.
...[propget] hresult nrows( [out] long rowcount ); parameters rowcount number of rows in table (including rows outside the current viewport) return value s_ok.
...And 6 more matches
IAccessibleTable2
cell if both row and column index are valid then the corresponding accessible object is returned that represents the requested cell regardless of whether the cell is currently visible (on the screen).
...[propget] hresult ncolumns( [out] long columncount ); parameters columncount number of columns in table (including columns outside the current viewport) return value s_ok.
...[propget] hresult nrows( [out] long rowcount ); parameters rowcount number of rows in table (including rows outside the current viewport) return value s_ok.
...And 6 more matches
nsIClipboardCommands
return value true if the current selection can be cut, false otherwise.
... canpaste() returns whether the current contents of the clipboard can be pasted and if the current selection is not read-only.
...return value true if there is data to paste on the clipboard and the current selection is not read-only, false otherwise.
...And 6 more matches
nsISessionStore
getbrowserstate() returns the current state of all of windows and all of their tabs.
... return value a json string representing the current state of all windows in the web browser.
... getwindowstate() returns the current state of one specified window in the web browser.
...And 6 more matches
nsIWindowWatcher
clients may expect this property to be always current, so to properly integrate this component the application will need to keep it current by setting the property as the active window changes.
... method overview nsiwebbrowserchrome getchromeforwindow(in nsidomwindow awindow); nsiauthprompt getnewauthprompter(in nsidomwindow aparent); nsiprompt getnewprompter(in nsidomwindow aparent); nsidomwindow getwindowbyname(in wstring atargetname, in nsidomwindow acurrentwindow); nsisimpleenumerator getwindowenumerator(); nsidomwindow openwindow(in nsidomwindow aparent, in string aurl, in string aname, in string afeatures, in nsisupports aarguments); void registernotification(in nsiobserver aobserver); void setwindowcreator(in nsiwindowcreator creator); void unregisternotification(in nsiobserver aobserver); attri...
...butes attribute type description activewindow nsidomwindow the watcher serves as a global storage facility for the current active (front most non-floating-palette-type) window, storing and returning it on demand.
...And 6 more matches
nsIXPConnect
void setdefaultsecuritymanager(in nsixpcsecuritymanager amanager, in pruint16 flags); nsixpcfunctionthistranslator setfunctionthistranslator(in nsiidref aiid, in nsixpcfunctionthistranslator atranslator); void setreportalljsexceptions(in boolean reportalljsexceptions); void setsafejscontextforcurrentthread(in jscontextptr cx); void setsecuritymanagerforjscontext(in jscontextptr ajscontext, in nsixpcsecuritymanager amanager, in pruint16 flags); void syncjscontexts(); void updatexows(in jscontextptr ajscontext, in nsixpconnectwrappednative aobject, in pruint32 away); native code only!
...iidref aiid); void wrapnativetojsval(in jscontextptr ajscontext, in jsobjectptr ascope, in nsisupports acomobj, in nswrappercacheptr acache, in nsiidptr aiid, in boolean aallowwrapper, out jsval aval, out nsixpconnectjsobjectholder aholder); attributes attribute type description collectgarbageonmainthreadonly prbool obsolete since gecko 1.9 currentjsstack nsistackframe read only.
... currentnativecallcontext nsaxpcnativecallcontextptr read only.
...And 6 more matches
All keyboard shortcuts - Firefox Developer Tools
f1 f1 f1 toggle toolbox between the last 2 docking modes ctrl + shift + d cmd + shift + d ctrl + shift + d toggle split console (except if console is the currently selected tool) esc esc esc these shortcuts work in all tools that are hosted in the toolbox.
... end end end expand currently selected node right arrow right arrow right arrow collapse currently selected node left arrow left arrow left arrow (when a node is selected) move inside the node so you can start stepping through attributes.
...+ tab start editing property or value (rules view only, when a property or value is selected, but not already being edited) enter or space return or space enter or space cycle up and down through auto-complete suggestions (rules view only, when a property or value is being edited) up arrow , down arrow up arrow , down arrow up arrow , down arrow choose current auto-complete suggestion (rules view only, when a property or value is being edited) enter or tab return or tab enter or tab increment selected value by 1 up arrow up arrow up arrow decrement selected value by 1 down arrow down arrow down arrow increment selected value by 100 shift + page up shift + page up shift + page up de...
...And 6 more matches
Applying styles and colors - Web APIs
getlinedash() returns the current line dash pattern array containing an even number of non-negative numbers.
... setlinedash(segments) sets the current line dash pattern.
... a linewidth example this property sets the current line thickness.
...And 6 more matches
Using the Gamepad API - Web APIs
performing such checks tends to involve using the gamepad object in conjunction with an animation loop (e.g., requestanimationframe), where developers want to make decisions for the current frame based on the state of the gamepad or gamepads.
... the navigator.getgamepads() method returns an array of all devices currently visible to the webpage, as gamepad objects (the first value is always null, so null will be returned if there are no gamepads connected.) this can then be used to get the same information.
... index: an integer that is unique for each gamepad currently connected to the system.
...And 6 more matches
Selection - Web APIs
WebAPISelection
a selection object represents the range of text selected by the user or the current position of the caret.
... selection.typeread only returns a domstring describing the type of the current selection.
... selection.collapse() collapses the current selection to a single point.
...And 6 more matches
Cross-browser audio basics - Developer guides
(currently, browsers that support mp3 also support mp4 audio).
...and pausing, and then playing from 5 seconds into the audio: var myaudio = document.createelement('audio'); if (myaudio.canplaytype('audio/mpeg')) { myaudio.setattribute('src','audiofile.mp3'); } if (myaudio.canplaytype('audio/ogg')) { myaudio.setattribute('src','audiofile.ogg'); } alert('play'); myaudio.play(); alert('stop'); myaudio.pause(); alert('play from 5 seconds in'); myaudio.currenttime = 5; myaudio.play(); let's explore the available properties and methods in more detail.
... myaudio.pause(); note: there is no stop method — to implement a stop function, you'd have to pause the media then set the currenttime property value to 0.
...And 6 more matches
Audio and Video Delivery - Developer guides
currently, to support all browsers we need to specify two formats, although with the adoption of mp3 and mp4 formats in firefox and opera, this is changing fast.
... javascript audio var myaudio = document.createelement('audio'); if (myaudio.canplaytype('audio/mpeg')) { myaudio.setattribute('src','audiofile.mp3'); } else if (myaudio.canplaytype('audio/ogg')) { myaudio.setattribute('src','audiofile.ogg'); } myaudio.currenttime = 5; myaudio.play(); we set the source of the audio depending on the type of audio file the browser supports, then set the play-head 5 seconds in and attempt to play it.
... note: currently safari does not support dash although dash.js will work on newer versions of safari scheduled for release with osx yosemite.
...And 6 more matches
context-menu - Archive of obsolete content
when the user invokes the context menu, all of the items bound to the current context are automatically added to the menu.
...likewise, any items that were previously in the menu but are not bound to the current context are automatically removed from the menu.
...your context listener is called even if any declarative contexts are not current (since firefox 36).
...And 5 more matches
tabs - Archive of obsolete content
in particular, you can enumerate it: var tabs = require('sdk/tabs'); for (let tab of tabs) console.log(tab.title); you can also access individual tabs by index: var tabs = require('sdk/tabs'); tabs.on('ready', function () { console.log('first: ' + tabs[0].title); console.log('last: ' + tabs[tabs.length-1].title); }); you can access the currently active tab: var tabs = require('sdk/tabs'); tabs.on('activate', function () { console.log('active: ' + tabs.activetab.url); }); track a single tab given a tab, you can register event listeners to be notified when the tab is closed, activated or deactivated, or when the page hosted by the tab is loaded or retrieved from the "back-forward cache": var tabs = require("sdk/tabs"); function o...
... properties activetab the currently active tab in the active window.
... getthumbnail() returns thumbnail data uri of the page currently loaded in this tab.
...And 5 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
unlike languages with formal specifications that have been standardized by bodies like the w3c, xul currently does not have an explicit specification.
... note: although there is a specification document, its markup is based on implementations and markup as of 2001, and current xul differs from it in many aspects.
...by referring to a special style sheet within chrome://global/skin/, we can make label and button sizes, window background color, etc, match the currently selected theme in firefox.
...And 5 more matches
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
the second example shows a tabbed menu that dynamically loads news headlines into the current web page.
...in this model, when a request goes to the web server, the current page is updated rather than replaced.
...with inner browsing, a simple request to retrieve the next set of message headers that replace the currently viewed message headers can dramatically improve user experience.
...And 5 more matches
Tamarin build documentation - Archive of obsolete content
supported platforms tamarin currently supports the following operating systems and/or architectures.
... eclipse (currently mac only) eclipse (galileo) / cdt (6.0) project for tamarin (also works with helios).
...what we want is to have the indexer track the currently selected build config (so the correct conditional compiles are highlighted in the editor).
...And 5 more matches
Focus and Selection - Archive of obsolete content
focused elements the focused element refers to the element which currently receives input events.
... if there are three textboxes on a window, the one that has the focus is the one that the user can currently enter text into.
...getting the currently focused element the currently focused element is held by an object called a command dispatcher, of which there is only one for the window.
...And 5 more matches
Styling a Tree - Archive of obsolete content
the following properties are automatically set as needed: checked this property is set cells whose column is type="checkbox" focus this property is set if the tree currently has the focus.
... selected this property is set for rows or cells that are currently selected.
... current this property is set if the keyboard cursor is at the row.
...And 5 more matches
Arrays - Learn web development
in this line we currently have i <= 0, which is a conditional test that causes the for loop to only run once, because it is saying "stop when i is no longer less than or equal to 0", and i starts at 0.
... just below the // number 3 comment we want you to write a line of code that splits the current array item (name:price) into two separate items, one containing just the name and one containing just the price.
...inside the loop (below // number 4) we want you to add a line that adds the current item price to that total in each iteration of the loop, so that at the end of the code the correct total is printed onto the invoice.
...And 5 more matches
Experimental features in Firefox
the current implementation is a little inelegant but is basically functional.
... nightly 30 no developer edition 30 no beta 30 no release 30 no preference name canvas.hitregions.enabled webgl: draft extensions when this preference is enabled, any webgl extensions currently in "draft" status which are being tested are enabled for use.
... currently, there are no webgl extensions being tested by firefox.
...And 5 more matches
Browser API
it currently works in (privileged) chrome code on firefox desktop (version 47 and above).
... htmliframeelement.getvisible() indicates the current visibility state of the browser <iframe>.
... htmliframeelement.setactive() sets the current <iframe> as the active frame, which has an effect on how it is prioritized by the process manager.
...And 5 more matches
NSS tools : modutil
if no temporary directory is specified, the current directory is used.
...(y/n) y using installer script "installer_script" successfully parsed installation script current platform is linux:5.4.08:x86 using installation parameters for platform linux:5.4.08:x86 installed file crypto.so to /tmp/crypto.so installed file setup.sh to ./pk11inst.dir/setup.sh executing "./pk11inst.dir/setup.sh"...
...for the current settings or to see the format of the module spec in the database, use the -rawlist option.
...And 5 more matches
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
if no temporary directory is specified, the current directory is used.
...(y/n) y using installer script "installer_script" successfully parsed installation script current platform is linux:5.4.08:x86 using installation parameters for platform linux:5.4.08:x86 installed file crypto.so to /tmp/crypto.so installed file setup.sh to ./pk11inst.dir/setup.sh executing "./pk11inst.dir/setup.sh"...
...for the current settings or to see the format of the module spec in the database, use the -rawlist option.
...And 5 more matches
JS_GetScopeChain
retrieves the scope chain for the javascript code currently running in a given context.
... description js_getscopechain returns the first jsobject on the scope chain for the javascript code currently running in the given context, cx.
...these objects represent the lexical scope of the currently executing statement or expression, not the call stack, so they include: the variable objects of any enclosing functions or let statements or expressions, and any objects selected by enclosing with statements, in order from the most-nested scope outward; lastly the global object against which the function was created.
...And 5 more matches
nsIWebBrowserPersist
siinputstream apostdata, in string aextraheaders, in nsisupports afile, in nsiloadcontext aprivacycontext); void saveprivacyawareuri(in nsiuri auri, in nsisupports acachekey, in nsiuri areferrer, in long areferrerpolicy, in nsiinputstream apostdata, in string aextraheaders, in nsisupports afile, in boolean aisprivate); attributes attribute type description currentstate unsigned long current state of the persister object.
... persist_flags_serialize_output 1024 force serialization of output (one file at a time; not concurrent) persist_flags_dont_change_filenames 2048 don't make any adjustments to filenames.
... encode_flags_selection_only 1 output only the current selection as opposed to the whole document.
...And 5 more matches
Version, UI, and Status Information - Plugins
« previousnext » this chapter describes the functions that allow a plug-in to display a message on the status line, get agent information, and check on the current version of the plug-in api and the browser.
...the user might appreciate seeing the percentage completed of the current operation or the url of a button or other link object when the cursor is over it, all of which the browser shows.
... void npn_status(npp instance, const char *message); the instance parameter is the current plug-in instance, that is, the one that the status message belongs to.
...And 5 more matches
Examine and edit HTML - Firefox Developer Tools
searching the page inspector's search box matches all markup in the current document and in any frames.
... as you type, an autocomplete popup shows any class or id attributes that match the current search term: press up and down to cycle through suggestions, tab to choose the current suggestion, then enter to select the first node with that attribute.
... show dom properties open the split console and enter the console command "inspect($0)" to inspect the currently selected element.
...And 5 more matches
Document.requestStorageAccess() - Web APIs
assuming all of the requirements above are satisfied, firefox will automatically grant storage access to the requesting origin on up to a threshold number of first-party origins in the current session for the duration of user’s session, up to a maximum of 24 hours.
... the maximum number of concurrent storage access grants an origin can obtain is a positive integer currently defined as one percent of the number of top-level origins visited in the current session or 5, whichever is higher.
... the origin is given an ephemeral storage access grant for the current top-level origin.
...And 5 more matches
HTMLInputElement - Web APIs
value string: returns / sets the current value of the control.
... validity read only validitystate object: returns the element's current validity state.
... properties that apply only to elements of type checkbox or radio checked boolean: returns / sets the current state of the element when type is checkbox or radio.
...And 5 more matches
Node - Web APIs
WebAPINode
3 cdata_section_node 4 entity_reference_node 5 entity_node 6 processing_instruction_node 7 comment_node 8 document_node 9 document_type_node 10 document_fragment_node 11 notation_node 12 node.nodevalue returns / sets the value of the current node.
... node.rootnode read only returns a node object representing the topmost node in the tree, or the current node if it's the topmost node in the tree.
... node.appendchild(childnode) adds the specified childnode argument as the last child to the current node.
...And 5 more matches
PerformanceNavigationTiming - Web APIs
the interface also supports the following properties: performancenavigationtiming.domcomplete read only a domhighrestimestamp representing a time value equal to the time immediately before the browser sets the current document readiness of the current document to complete.
... performancenavigationtiming.domcontentloadedeventend read only a domhighrestimestamp representing the time value equal to the time immediately after the current document's domcontentloaded event completes.
... performancenavigationtiming.domcontentloadedeventstart read only a domhighrestimestamp representing the time value equal to the time immediately before the user agent fires the domcontentloaded event at the current document.
...And 5 more matches
WebRTC connectivity - Web APIs
pending and current descriptions taking one step deeper into the process, we find that localdescription and remotedescription, the properties which return these two descriptions, aren't as simple as they look.
...for that reason, webrtc uses pending and current descriptions.
... the current description (which is returned by the rtcpeerconnection.currentlocaldescription and rtcpeerconnection.currentremotedescription properties) represents the description currently in actual use by the connection.
...And 5 more matches
Inputs and input sources - Web APIs
input sources each source of webxr input data is represented by an xrinputsource object which describes the input source and its current state.
...the ray extends outward in a direction defined by whatever platform and controller are being used, if that's defined; otherwise, the ray extends in the same direction the user is pointing in with their index finger, if it were currently outstretched.
... enumerating input sources the webxr session represented by the xrsession object has an inputsources property which is a live list of the webxr input devices currently connected to the xr system.
...And 5 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
cubeorientation will store the current orientation of the cube, while cubematrix and mousematrix are storage for matrices used during the rendering of the scene.
... suffice it to say that the vertex shader computes the position of each vertex given the initial positions of each vertex and the transforms that need to be applied to convert them to simulate the viewer's current position and orientation.
...then references are obtained to the four <div> blocks into which we'll output the current contents of each of the key matrices for informational purposes while our scene is running.
...And 5 more matches
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
for example, given an xrsession whose reference space is worldrefspace, the following line of code would request the first frame of animation to be scheduled: animationframerequestid = xrsession.requestanimationframe(mydrawframe); then, the mydrawframe() function—the callback executed when it's time to draw the frame—might be something like this: function mydrawframe(currentframetime, frame) { let session = frame.session; let viewerpose = frame.getviewerpose(viewerrefspace); animationframerequestid = session.requestanimationframe(mydrawframe); if (viewerpose) { /* ...
...when called, this function begins by getting the xrsession from the frame object, then uses the frame's getviewerpose() method to compute the xrviewerpose for the viewer, given viewerrefspace, which describes the current facing direction and position of the viewer.
... since most users would prefer that you maintain the same viewer position and facing direction while performing this transition, you can use the xrframe method getviewerpose() to obtain the current xrviewerpose, switch the session, then use the saved viewer pose to restore the viewer's position and facing.
...And 5 more matches
<input type="image"> - HTML: Hypertext Markup Language
WebHTMLElementinputimage
this will replace the current document with the received data.
...this is typically a new tab in the same window as the current document, but may differ depending on the configuration of the user agent.
... _parent loads the response into the parent browsing context of the current one.
...And 5 more matches
<input type="password"> - HTML: Hypertext Markup Language
WebHTMLElementinputpassword
events change and input supported common attributes autocomplete, inputmode, maxlength, minlength, pattern, placeholder, readonly, required, and size idl attributes selectionstart, selectionend, selectiondirection, and value methods select(), setrangetext(), and setselectionrange() value the value attribute contains a domstring whose value is the current contents of the text editing control being used to enter the password.
...this isn't as informative as using either current-password or new-password.
... current-password allow the browser or password manager to enter the current password for the site.
...And 5 more matches
Link types - HTML: Hypertext Markup Language
<link> <a>, <area>, <form> external indicates that the hyperlink leads to a resource outside the site of the current page; that is, following the link will make the user leave the site.
... <a>, <area>, <form> <link> first indicates that the hyperlink leads to the first resource of the sequence the current page is in.
... if one or several up link types are also present, the number of these up indicates the depth of the current page in the hierarchy.
...And 5 more matches
ui/button/action - Archive of obsolete content
to set state like this, call state() with 2 parameters: the first parameter is a window or tab object or as a shorthand, the string "window" for the currently active window, or the string "tab" for the currently active tab the second parameter is an object containing the state properties you wish to update.
... here's an add-on with a button that disables itself when you click it, but only for the currently active window: var { actionbutton } = require("sdk/ui/button/action"); var button = actionbutton({ id: "my-button", label: "my button", icon: { "16": "./firefox-16.png", "32": "./firefox-32.png" }, onclick: disableforthiswindow }); function disableforthiswindow(state) { button.state("window", { disabled: true }); } to fetch the state for a specific window or tab, call state(), passing in the window or tab you are interested in, and it will return the state: var labelforactivetab = button.state("tab").label; to learn more about this, see the api documentation for state().
...a special shortcut allows you to pass the string "window" or "tab" to select the currently active window or tab.
...And 4 more matches
Install Manifests - Archive of obsolete content
currently 1 %item_id% the id of the add-on being updated %item_version% the version of the add-on being updated %item_maxappversion% the maxversion of the targetapplication object corresponding to the current application for the add-on being updated.
... %app_id% the id of the current application %app_version% the version of the application to check for updates for %current_app_version% the version of the current application %app_os% the value of os_target from the firefox build system, identifying the operating system being used.
... %app_abi% the value of the target_xpcom_abi value from the firefox build system, identifying the compiler/architecture combination used to compile the current application.
...And 4 more matches
Block and Line Layout Cheat Sheet - Archive of obsolete content
currently, the only way to get an unflowable frame is to have a frame tree that is "too deep".
... nshtmlreflowstate the current state of reflow, built up as reflow recursively descends the frame tree.
... mcomputedwidth mcomputedheight mcomputedmargin mcomputedborderpadding mcomputedpadding mcomputedoffsets mcomputedminwidth mcomputedmaxwidth mcomputedminheight mcomputedmaxheight given the current container frame and the style applied to the child, these values are the resolved values for the child frame's box.
...And 4 more matches
Introducing the Audio API extension - Archive of obsolete content
zsetup(1, 44100); var samples = new float32array(22050); for (var i = 0; i < samples.length ; i++) { samples[i] = math.sin( i / 20 ); } output.mozwriteaudio(samples); } </script> </head> <body> <p>this demo plays a one second tone when you click the button below.</p> <button onclick="playtone();">play</button> </body> </html> the mozcurrentsampleoffset() method gives the audible position of the audio stream, meaning the position of the last heard sample.
... // get current audible position of the underlying audio stream, measured in samples.
... var currentsampleoffset = audiooutput.mozcurrentsampleoffset(); audio data written using the mozwriteaudio() method needs to be written at a regular interval in equal portions, in order to keep a little ahead of the current sample offset (the sample offset that is currently being played by the hardware can be obtained with mozcurrentsampleoffset()), where "a little" means something on the order of 500 ms of samples.
...And 4 more matches
Desktop gamepad controls - Game development
to update the state of the gamepad's currently pressed buttons we will need a function that will do exactly that on every frame: function gamepadupdatehandler() { buttonspressed = []; if(controller.buttons) { for(var b=0; b<controller.buttons.length; b++) { if(controller.buttons[b].pressed) { buttonspressed.push(b); } } } } we first reset the buttonspressed array to get i...
...t ready to store the latest info we'll write to it from the current frame.
...next, we'll consider the gamepadbuttonpressedhandler() function: function gamepadbuttonpressedhandler(button) { var press = false; for(var i=0; i<buttonspressed.length; i++) { if(buttonspressed[i] == button) { press = true; } } return press; } the function takes a button as a parameter; in the loop it checks if the given button's number is among the currently pressed buttons available in the buttonspressed array.
...And 4 more matches
Eclipse CDT
if you click the yellow, double arrow button at the top of the project explorer tab on the left, it will keep the selected file in the project explorer tab in sync with the file that you're currently editing.
... organizing views use ctrl-m to toggle maximization of the current editor view (the editor must be focused first).
...unfortunately, the autocomplete list cannot (currently) be configured to appear automatically as soon as you start typing a character that might be the start of an identifier name.
...And 4 more matches
Storage access policy: Block cookies from trackers
this documentation describes the policy that we intend to ship to firefox release users, but may not match what is implemented in the current release version of firefox.
... this policy does not currently restrict third-party storage access for resources that are not classified as tracking resources.
...currently, firefox includes some web compatibility heuristics that grant storage access to third-party resources classified as trackers when a user interacts with those third parties.
...And 4 more matches
mozbrowserselectionstatechanged
note that this is deprecated, and current implementations should use mozbrowsercaretstatechanged instead.
... commands an object that stores information about what commands can be executed on the current selection.
... zoomfactor a number representing the current zoom factor in the child frame.
...And 4 more matches
Sqlite.jsm
if a relative path is given, it is interpreted as relative to the current profile's directory.
... await conn.close(); throw e; } clone(readonly) this function returns a clone of the current connection-promise.
... getschemaversion() the user-set version associated with the schema for the current database.
...And 4 more matches
Gecko Profiler FAQ
the gecko profiler currently doesn’t have the ability to show you information about line numbers, neither for js code nor for native code.
... how to profile startup code that regresses just a little (<10-15ms ts_paint/tpaint) [mstange] we currently don’t have a good way to do that.
... the current setup requires each thread that you want to profile to notify the profiler about its existence.
...And 4 more matches
sslerr.html
upgraded documentation may be found in the current nss reference nss and ssl error codes chapter 8 nss and ssl error codes nss error codes are retrieved using the nspr function pr_geterror.
... ssl_error_no_compression_overlap -12203 "cannot communicate securely with peer: no common compression algorithm(s)." ssl_error_handshake_not_completed -12202 "cannot initiate another ssl handshake until current handshake is complete." ssl_error_bad_handshake_hash_value -12201 "received incorrect handshakes hash values from peer." ssl_error_cert_kea_mismatch -12200 "the certificate provided cannot be used with the selected key exchange algorithm." ssl_error_no_trusted_ssl_client_ca -12199 "no certificate authority is trusted for ssl client authentication." ...
... cipher spec record." ssl_error_rx_malformed_alert -12250 "ssl received a malformed alert record." ssl_error_rx_malformed_handshake -12249 "ssl received a malformed handshake record." ssl_error_rx_malformed_application_data -12248 "ssl received a malformed application data record." received an ssl handshake that was inappropriate for the current state: all the error codes in the following block indicate that the local socket received an ssl3 handshake message from the remote peer at a time when it was inappropriate for the peer to have sent this message.
...And 4 more matches
imgIDecoderObserver
if imgidecoder::flag_sync_decode is passed to a function that triggers a decode, all notifications that can be generated from the currently loaded data fire before the call returns.
...method overview void ondataavailable(in imgirequest arequest, in boolean acurrentframe, [const] in nsintrect arect); native code only!
...void ondataavailable( in imgirequest arequest, in boolean acurrentframe, [const] in nsintrect arect ); parameters arequest the request on which data is available, or null if being called for an imgidecoder object.
...And 4 more matches
nsIDOMEvent
currenttarget nsidomeventtarget used to indicate the eventtarget whose eventlisteners are currently being processed.
... eventphase unsigned short used to indicate which phase of event flow is currently being evaluated.
... capturing_phase 1 the current event phase is the capturing phase.
...And 4 more matches
nsIDOMWindow
localstorage nsidomstorage local storage for the current browsing context.
...if there is no parent window, or if the parent is of a different type, this is the current window.
... scrollx long the current horizontal (x) scroll position, in pixels.
...And 4 more matches
nsIMutableArray
insertelementat() insert an element at the given position, moving the element currently located in that position, and all elements in higher position, up by one.
... index the position in the array: if the position is lower than the current length of the array, the elements at that position and onwards are bumped one position up.
... if the position is equal to the current length of the array, the new element is appended.
...And 4 more matches
nsIURI
setting the spec causes the new spec to be parsed using the rules for the scheme the uri currently has.
... warning: because parsing the string is done using the current uri's scheme, setting the spec to a uri with a different scheme will produce incorrect results.
... return value an nsiuri object that represents the same uri as the current nsiuri.
...And 4 more matches
DevTools API - Firefox Developer Tools
while this api is currently a work-in-progress, there are usable portions of page inspector and debugger that may be used currently.
... zoomvalue the current zoom level of the toolbox.
... methods getcurrentpanel() get the currently active toolpanel.
...And 4 more matches
AudioParam.value - Web APIs
WebAPIAudioParamvalue
the web audio api's audioparam interface property value gets or sets the value of this audioparam at the current time.
... setting value has the same effect as calling audioparam.setvalueattime with the time returned by the audiocontext's currenttime property..
... syntax var curvalue = audioparam.value; audioparam.value = newvalue; value a floating-point number indicating the parameter's value as of the current time.
...And 4 more matches
HTMLMediaElement - Web APIs
htmlmediaelement.currentsrc read only returns a domstring with the absolute url of the chosen media resource.
... htmlmediaelement.currenttime a double-precision floating-point value indicating the current playback time in seconds; if the media has not started to play and has not been seeked, this value is the media's initial playback time.
... htmlmediaelement.mozfragmentend is a double that provides access to the fragment end time if the media element has a fragment uri for currentsrc, otherwise it is equal to the media duration.
...And 4 more matches
History.pushState() - Web APIs
WebAPIHistorypushState
title most browsers currently ignore this parameter, although they may use it in the future.
...the new url does not need to be absolute; if it's relative, it's resolved relative to the current url.
... the new url must be of the same origin as the current url; otherwise, pushstate() will throw an exception.
...And 4 more matches
Checking when a deadline is due - Web APIs
in this article we look at a complex example involving checking the current time and date against a deadline stored via indexeddb.
... the main complication here is checking the stored deadline info (month, hour, day, etc.) against the current time and date taken from a date object.
... the basic problem in the to-do app, we wanted to first record time and date information in a format that is both machine readable and human understandable when displayed, and then check whether each time and date is occurring at the current moment.
...And 4 more matches
SVGAnimationElement - Web APIs
svganimationelement.getstarttime() returns a float representing the begin time, in seconds, for this animation element's current interval, if it exists, regardless of whether the interval has begun yet.
... if there is no current interval, then a domexception with code invalid_state_err is thrown.
... svganimationelement.getcurrenttime() returns a float representing the current time in seconds relative to time zero for the given time container.
...And 4 more matches
SVGMatrix - Web APIs
WebAPISVGMatrix
svgmatrix.translate() post-multiplies a translation transformation on the current matrix and returns the resulting matrix as svgmatrix.
... svgmatrix.scale() post-multiplies a uniform scale transformation on the current matrix and returns the resulting matrix as svgmatrix.
... svgmatrix.scalenonuniform() post-multiplies a non-uniform scale transformation on the current matrix and returns the resulting matrix as svgmatrix.
...And 4 more matches
SourceBuffer - Web APIs
sourcebuffer.audiotracks read only a list of the audio tracks currently contained inside the sourcebuffer.
... sourcebuffer.buffered read only returns the time ranges that are currently buffered in the sourcebuffer.
... sourcebuffer.texttracks read only a list of the text tracks currently contained inside the sourcebuffer.
...And 4 more matches
Storage Access API - Web APIs
the api provides methods that allow embedded resources to check whether they currently have access to their first-party storage, and to request access to their first-party storage from the user agent.
...this is enforced through the following constraints: access requests are automatically denied unless the embedded content is currently processing a user gesture such as a tap or click.
...specifics regarding the lifetime of a storage grant and the circumstances under which the browser may decide to inform the user are currently being worked through and will be announced once ready.
...And 4 more matches
WebGLRenderingContext.stencilOp() - Web APIs
constants gl.keep keeps the current value.
... gl.incr increments the current stencil buffer value.
... gl.incr_wrap increments the current stencil buffer value.
...And 4 more matches
WebGLRenderingContext.stencilOpSeparate() - Web APIs
constants gl.keep keeps the current value.
... gl.incr increments the current stencil buffer value.
... gl.incr_wrap increments the current stencil buffer value.
...And 4 more matches
ARIA: tab role - Accessibility
some assistive technology will provide a count of the number of tab role elements inside a tablist, and inform users of which tab they currently have targeted.
...if the current tab is the last tab in the tab list it activates the first tab.
...if the current tab is the first tab in the tab list it activates the last tab.
...And 4 more matches
Video player styling basics - Developer guides
this "data-state" idea is also used for setting the current state of buttons within the video control set, which allows specific state styling.
...as mentioned earlier, a `data-state` variable is used to indicate which state such buttons are currently in.
...'unmute' : 'mute'); } } this function is then called by the relevant event handlers: video.addeventlistener('play', function() { changebuttonstate('playpause'); }, false); video.addeventlistener('pause', function() { changebuttonstate('playpause'); }, false); stop.addeventlistener('click', function(e) { video.pause(); video.currenttime = 0; progress.value = 0; // update the play/pause button's 'data-state' which allows the correct button image to be set via css changebuttonstate('playpause'); }); mute.addeventlistener('click', function(e) { video.muted = !video.muted; changebuttonstate('mute'); }); you might have noticed that there are new handlers where the play and pause events are reacted to on the video.
...And 4 more matches
Writing forward-compatible websites - Developer guides
first, have a default code path that runs in unknown browsers and in the current and future versions of browsers you are testing with.
... for the purpose of this piece of advice, "current" means the most recent version of a browser you have tested.
... for example, if you have tested that your default code path runs properly in firefox aurora but firefox beta and the latest release have a bug that make your default code path fail, it is ok to treat the firefox version number that is in aurora at the moment of testing as "current", and consider the beta version as a "past" version even though it hasn't been released to the general public yet.
...And 4 more matches
Functions - JavaScript
*/ console.log(mycar.brand); the this keyword does not refer to the currently executing function, so you must refer to function objects by name, even within the function body.
... arguments: an array-like object containing the arguments passed to the currently executing function.
... arguments.callee : the currently executing function.
...And 4 more matches
TypedArray.prototype.reduceRight() - JavaScript
currentvalue the current element being processed in the typed array.
... index the index of the current element being processed in the typed array.
... description the reduceright method executes the callback function once for each element present in the typed array, excluding holes in the typed array, receiving four arguments: the initial value (or value from the previous callback call), the value of the current element, the current index, and the typed array over which iteration is occurring.
...And 4 more matches
window/utils - Archive of obsolete content
the exception is the windows() function which returns an array of currently opened windows.
... getinnerid(window) returns the id of the specified window's current inner window.
... this function wraps nsidomwindowutils.currentinnerwindowid.
...And 3 more matches
Creating a Web based tone generator - Archive of obsolete content
the function mozcurrentsampleoffset() is used to know the position of the samples being played so that we can fill a 500 ms buffer of audio samples.
... var audio = new audio(); audio.mozsetup(1, samplerate); var currentwriteposition = 0; var prebuffersize = samplerate / 2; // buffer 500ms var tail = null; // the function called with regular interval to populate // the audio output buffer.
... if(tail) { written = audio.mozwriteaudio(tail); currentwriteposition += written; if(written < tail.length) { // not all the data was written, saving the tail...
...And 3 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
objective the objective is to provide users with a mailer agent, a web browser, and a news reader which are automatically configured (preferences) at startup to the current user connected on the computer.
...es/thunderbird-mozconfig ac_add_options --enable-extensions=pref it seems worse this time , as even after applying those compilation options mentioned above, i now get the following error message while stating thunderbird with autoconfig (autoconf.js having pref('general.config.filename','thunderbird.cfg'); ) and thunderbird.cfg calling getldap* functions to retrieve cn and mail address of the current user.
...our first idea was to use local mail folders from home directory of the current user.
...And 3 more matches
File object - Archive of obsolete content
there is currently no support for p2open()-like semantics.
...if no argument is supplied to the constructor, the current working directory is the file object that is returned.
... file.currentdir a file object that represents the standard output (stdout).
...And 3 more matches
Table Cellmap - Archive of obsolete content
introduction the table layout use the cellmap for two purposes: quick lookup of table structural data store of the border collapse data the cellmap code is contained in nscellmap.cpp and nscellmap.h this document does currently describe only the quick lookup part of the game, border collapse is still far away cellmap data - overview the entries in the cellmap contain information about the table cell frame corresponding to a given row and column number (celldata.h).
... rowspan = number [cn] this attribute specifies the number of rows spanned by the current cell.
...the value zero ("0") means that the cell spans all rows from the current row to the last row of the table section (thead, tbody, or tfoot) in which the cell is defined.
...And 3 more matches
XBL Example - Archive of obsolete content
navigation buttons along the bottom will allow the user to cycle through the objects while a text widget between the buttons will display the current page.
...along the bottom, we'll need a button to go the previous page, a label to display the current page number, and a button to go to the next page.
... page property next, a property that holds the current page will be added.
...And 3 more matches
browser - Archive of obsolete content
it is similar to an iframe except that it holds a page history and contains additional methods to manipulate the currently displayed page.
... attributes autocompleteenabled, autocompletepopup, autoscroll, disablehistory, disableglobalhistory, disablesecurity, droppedlinkhandler, homepage, showcaret, src, type properties accessibletype, cangoback, cangoforward, contentdocument, contentprincipal, contenttitle, contentvieweredit, contentviewerfile, contentwindow, currenturi, docshell, documentcharsetinfo, homepage, markupdocumentviewer, messagemanager, preferences, securityui, sessionhistory, webbrowserfind, webnavigation, webprogress methods addprogresslistener, goback, goforward, gohome, gotoindex, loaduri, loaduriwithflags, reload, reloadwithflags, removeprogresslistener, stop, swapdocshells examples <!-- shows mozilla homepage inside a groupbox --> ...
... contentwindow type: todo use the contentwindow.wrappedjsobject to obtain a dom(html) window object currenturi type: nsiuri this read-only property contains the currently loaded url.
...And 3 more matches
datepicker - Archive of obsolete content
if not specified, the datepicker defaults to the current day.
... properties date type: integer the currently selected date of the month from 1 to 31.
... datevalue type: date the date that is currently entered or selected in the datepicker as a date object.
...And 3 more matches
menulist - Archive of obsolete content
the currently selected choice is displayed on the menulist element.
... description type: string set to the description of the currently selected menuitem.
... image type: image url the image associated with the currently selected item.
...And 3 more matches
tabs - Archive of obsolete content
ArchiveMozillaXULtabs
selectedindex type: integer gets and sets the index of the currently selected panel.
... selectedindex type: integer returns the index of the currently selected item.
...returns -1 if no items are selected selecteditem type: element holds the currently selected item.
...And 3 more matches
toolbar - Archive of obsolete content
attributes autohide, currentset, customindex, customizable, defaultset, grippyhidden, grippytooltiptext, height, iconsize, mode, toolbarname properties accessibletype, currentset, firstpermanentchild, lastpermanentchild, toolbarname, toolboxid methods insertitem style classes chromeclass-toolbar examples <toolbox> <toolbar id="nav-toolbar"> <toolbarbutton id="nav-users" accesskey="u" label="users"/...
... currentset not in seamonkey 1.x type: comma-separated string the current set of displayed items on the toolbar.
... currentset not in seamonkey 1.x type: comma-separated list of strings holds a comma-separated list of the ids of the items currently on the toolbar.
...And 3 more matches
tree - Archive of obsolete content
ArchiveMozillaXULtree
attributes disablekeynavigation, disabled, editable, enablecolumndrag, flags, hidecolumnpicker, onselect, rows, seltype, statedatasource, tabindex, treelines properties accessibletype, builderview, columns, contentview, currentindex, disablekeynavigation, disabled, editingcolumn, editingrow, enablecolumndrag, firstordinalcolumn, inputfield, seltype, selstyle, tabindex, treeboxobject, view examples a tree with several columns <tree flex="1" rows="2"> <treecols> <treecol id="sender" label="sender" flex="1"/> <treecol id="subject" label="subject" flex="2"/> </treecols> <treechildren> <treeitem> ...
... currentindex type: integer set to the row index of the tree caret in the tree.
... editingcolumn type: nsitreecolumn the column of the tree cell currently being edited, or null if there is no cell being edited.
...And 3 more matches
wizard - Archive of obsolete content
attributes firstpage, lastpage, pagestep, title, windowtype properties canadvance, canrewind, currentpage, onfirstpage, onlastpage, pagecount, pageindex, pagestep, title, wizardpages methods advance, cancel, extra1, extra2, getbutton, getpagebyid, goto, rewind examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <wizard id="thewizard" title="secret code wizard" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> ...
... use the cancancel property to indicate to the user (by disabling the cancel button) that they cannot can pagestep type: integer the index of the current page.
... currentpage type: wizardpage element this property returns the wizardpage element that is currently displayed.
...And 3 more matches
2D maze game with device orientation - Game development
finishlevel loads a new level when the current level is completed, or finished the game if the final level is completed.
...to load specific levels, we make sure the previous levels are hidden, and show the current one: showlevel: function(level) { var lvl = level | this.level; if(this.levels[lvl-2]) { this.levels[lvl-2].visible = false; } this.levels[lvl-1].visible = true; } thanks to that the game gives the player a challenge - now he have to roll the ball across the play area and guide it through the labyrinth built from the blocks.
...let’s define the variables in the create function first: this.timer = 0; // time elapsed in the current level this.totaltimer = 0; // time elapsed in the whole game then, right after that, we can initialize the necessary text objects to display this information to the user: this.timertext = this.game.add.text(15, 15, "time: "+this.timer, this.fontbig); this.totaltimetext = this.game.add.text(120, 30, "total time: "+this.totaltimer, this.fontsmall); we’re defining the top and left positions of ...
...And 3 more matches
Accessible multimedia - Learn web development
add it to your code, at the bottom: playpausebtn.onclick = function() { if(player.paused) { player.play(); playpausebtn.textcontent = 'pause'; } else { player.pause(); playpausebtn.textcontent = 'play'; } }; next, add this code to the bottom, which controls the stop button: stopbtn.onclick = function() { player.pause(); player.currenttime = 0; playpausebtn.textcontent = 'play'; }; there is no stop() function available on htmlmediaelements, so instead we pause() it, and at the same time set the currenttime to 0.
... next, our rewind and fast forward buttons — add the following blocks to the bottom of your code: rwdbtn.onclick = function() { player.currenttime -= 3; }; fwdbtn.onclick = function() { player.currenttime += 3; if(player.currenttime >= player.duration || player.paused) { player.pause(); player.currenttime = 0; playpausebtn.textcontent = 'play'; } }; these are very simple, just adding or subtracting 3 seconds to the currenttime each time they are clicked.
... note that we also check to see if the currenttime is more than the total media duration, or if the media is not playing, when the fwd button is pressed.
...And 3 more matches
WAI-ARIA basics - Learn web development
states — special properties that define the current conditions of elements, such as aria-disabled="true", which specifies to a screenreader that a form input is currently disabled.
...wai-aria does include aria-valuemin and aria-valuemax properties to specify min and max values, but these currently don't seem very well supported; a better supported feature is the html5 placeholder attribute, which can contain a message that is shown in the input when no value is entered, and is read out by a number of screenreaders.
...it is however not that obvious what the content is — a screenreader currently reports the content as a list of links, and some content with three headings.
...And 3 more matches
Pseudo-classes and pseudo-elements - Learn web development
:current matches the element, or an ancestor of the element, that is currently being displayed.
... :future matches the elements after the current element.
... :local-link matches links pointing to pages that are in the same site as the current document.
...And 3 more matches
Manipulating documents - Learn web development
using methods available on this object you can do things like return the window's size (see window.innerwidth and window.innerheight), manipulate the document loaded into that window, store data specific to that document on the client-side (for example using a local database or other storage mechanism), attach an event handler to the current window, and more.
...you can use this object to return and manipulate information on the html and css that comprises the document, for example get a reference to an element in the dom, change its text content, apply new styles to it, create new elements and add them to the current element as children, or even delete it altogether.
... the document object model the document currently loaded in each one of your browser tabs is represented by a document object model.
...And 3 more matches
Implementing feature detection - Learn web development
the concept of feature detection the idea behind feature detection is that you can run a test to determine whether a feature is supported in the current browser, and then conditionally run code to provide an acceptable experience both in browsers that do support the feature, and browsers that don't.
...therefore, you can detect whether the browser supports geolocation or not by using something like the following: if ("geolocation" in navigator) { navigator.geolocation.getcurrentposition(function(position) { // show the location on a map, perhaps using the google maps api }); } else { // give the user a choice of static maps instead perhaps } it is probably better to use an established feature detection library however, rather than writing your own all the time.
...if you look at the latter, you'll see a couple of @supports blocks, for example: @supports (flex-flow: row) and (flex: 1) { main { display: flex; } main div { padding-right: 4%; flex: 1; } main div:last-child { padding-right: 0; } } this at-rule block applies the css rule within only if the current browser supports both the flex-flow: row and flex: 1 declarations.
...And 3 more matches
Accessibility Features in Firefox
at my next opportunity, i intend to convert my family over to it too." darren paskell, from window-eyes beta testing list firefox works with popular screen readers, with the best support currently coming from gw micro's window-eyes 5.5.
...mozilla corporation is currently reaching out to work with ai squared, the makers of zoomtext, in order to enable complete support of advanced zoomtext features such as the doc reader and app reader.
... firefox on linux currently boasts the best onscreen keyboard support in the industry via gok, the gnome onscreen keyboard.
...And 3 more matches
How Mozilla's build system works
these data structures describe the current state of the system and what the existing build configuration looks like.
... phase 2: build backend preparation and the build definition once configure has determined what the current build configuration is, we need to apply this to the source tree so we can actually build.
... during build backend generation, all moz.build files relevant to the current build configuration are read and converted into files and actions used to build the tree (such as makefiles).
...And 3 more matches
The Firefox codebase: CSS Guidelines
is there an alternative to using the variable like inheriting or using the currentcolor keyword?
... using inheriting or using currentcolor will prevent repetition of the value and it is usually good practice to do so.
... using the currentcolor keyword or inheriting is also good practice, because sometimes the needed value is already in the color or on the parent element.
...And 3 more matches
mozbrowsersecuritychange
details the details property returns an anonymous javascript object with the following properties: state a domstring representing the current state of ssl security.
... trackingstate a domstring representing the current loading state of tracking content.
... mixedstate a domstring representing the current loading state of mixed active content.
...And 3 more matches
Addon
blockliststate read only integer the current blocklist state of this add-on; see nsiblocklistservice for possible values.
... isactive read only boolean true if the add-on is currently functional.
... iscompatible read only boolean true or false depending on whether the add-on is compatible with the current application version and platform version.
...And 3 more matches
AddonManager
scope_application 4 this add-on is a part of the current application (installed and owned by firefox).
... scope_profile 1 this add-on is installed in the current profile directory.
... scope_user 2 this add-on is installed somewhere specific to the current user (all profiles of the logged-in user).
...And 3 more matches
DownloadSummary
method overview promise bindtolist(downloadlist alist); promise addview(object aview); promise removeview(object aview); properties attribute type description allhavestopped read only boolean indicates whether all the downloads are currently stopped.
... progresstotalbytes read only number indicates the total number of bytes to be transferred before completing all the downloads that are currently in progress.
... for downloads that do not have a known final size, the number of bytes currently transferred is reported as part of this property.
...And 3 more matches
L20n Javascript API
var ctx = l20n.getcontext(); ctx.addresource('<hello "hello, world!">'); ctx.requestlocales(); requestlocales can be called multiple times after the context instance emitted the ready event, in order to change the current language fallback chain, for instance if requested by the user.
... ctx.supportedlocales a read-only property which holds the current fallback chain of locales which was negotiated between all the available locales, the default locale and the user's preferred locales.
...the function passed to linkresource (called a template function) takes one argument which is the code of the current locale, which needs to be first registered with registerlocales.
...And 3 more matches
PKCS11 Implement
this note will be removed once the document is updated for the current version of nss.
...the supplied library names are used as the default library names; currently, these names should not include any double quotation marks.
...the nss doesn't currently use the ckf_hw_slot flag.
...And 3 more matches
NSS tools : certutil
if this option is not used, the validity check defaults to the current system time.
...if no serial number is provided a default serial number is made from the current time.
...for example: -t "tc,c,t" use the -l option to see a list of the current certificates and trust attributes in a certificate database.
...And 3 more matches
NSS Tools certutil
if this option is not used, the validity check defaults to the current system time.
...on windows nt the default is the current directory.
...for example: -t "tcu,cu,tuw" use the -l option to see a list of the current certificates and trust attributes in a certificate database.
...And 3 more matches
IAccessibleValue
method overview [propget] hresult currentvalue([out] variant currentvalue ); [propget] hresult maximumvalue([out] variant maximumvalue ); [propget] hresult minimumvalue([out] variant minimumvalue ); hresult setcurrentvalue([in] variant value ); methods currentvalue() returns the value of this object as a number.
...[propget] hresult currentvalue( [out] variant currentvalue ); parameters currentvalue returns the current value represented by this object.
...it does not have to be the same type as that returned by method currentvalue().
...And 3 more matches
mozIRegistry
we are proposing a new "moziregistry" xpcom interface that provides the same level of function as is currently provided by the "netscape registry" implemented in libreg.
... open issues we have identified two open issues, neither of which appear to be so hard that it we won't be able to solve them in a timely fashion: if and when we remove what is currently a static binding of clsids, there will be the risk that required clsids won't be present.
...our current build/install process doesn't quite step up to these problems as of yet.
...And 3 more matches
mozIStorageStatement
params mozistoragestatementparams the current list of named parameters, which may be set.
... row mozistoragestatementrow the current row, with access to all data members by name.
... state long the current state defined by mozistoragestatement.moz_storage_statement_invalid, mozistoragestatement.moz_storage_statement_ready, or mozistoragestatement.moz_storage_statement_executing.
...And 3 more matches
nsISelection
inherits from: nsisupports last changed in gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10) interface for manipulating and querying the current selected range of nodes within the document.
... methods addrange() adds a nsidomrange to the current selection.
... collapsed() [noscript,notxpcom,nostdcall] boolean collapsed(); native code only!collapsenative void collapsenative( in nsinode parentnode, in long offset ); parameters parentnode offset collapsetoend() collapses the whole selection to a single point at the end of the current selection (regardless of direction).
...And 3 more matches
nsITaskbarProgress
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void setprogressstate(in nstaskbarprogressstate state, in unsigned long long currentvalue optional, in unsigned long long maxvalue optional); constants constant value description state_no_progress 0 stop displaying progress on the taskbar button.
...the currentvalue and maxvalue parameters are optional and should be supplied when state is one of state_normal, state_error or state_paused.
... void setprogressstate( in nstaskbarprogressstate state, in unsigned long long currentvalue, optional in unsigned long long maxvalue optional ); parameters state one of the state constants.
...And 3 more matches
nsIThread
this causes events to stop being dispatched to the thread, and causes any pending events to run to completion before the thread joins with the current thread (see pr_jointhread() for details).
... during the execution of this method call, events for the current thread may continue to be processed.
...since other threads may add events to the current thread, it's possible that by the time this method returns, the event queue may no longer be empty, even if a false result is reported.
...And 3 more matches
Folders and message lists
interacting with the current folder the folderdisplaywidget for the current folder can be accessed via the global variable gfolderdisplay.
... getting the current nsimsgfolder the nsimsgfolder interface contains many methods and attributes for working with folders.
... to get the nsimsgfolder instance for the currently-displayed folder, just use gfolderdisplay.displayedfolder.
...And 3 more matches
Streams - Plugins
nperror npp_destroystream(npp instance, npstream *stream, nperror reason); the instance parameter is the current plug-in instance; the stream parameter specifies the stream to be deleted.
... int32 npp_writeready(npp instance, npstream *stream); the instance parameter is the current plug-in instance; the stream parameter specifies the current stream.
... int32 npp_write(npp instance, npstream *stream, int32 offset, int32 len, void *buf); the instance parameter is the current plug-in instance; the stream parameter specifies the current stream.
...And 3 more matches
Accessibility Inspector - Firefox Developer Tools
the accessibility inspector provides a means to access important information exposed to assistive technologies on the current page via the accessibility tree, allowing you to check what's missing or otherwise needs attention.
... features of the accessibility panel the enabled accessibility panel looks like so: on the left-hand side, there is a tree diagram representing all the items in the accessibility tree for the current page.
... on the right-hand side, you can see further information about the currently selected item.
...And 3 more matches
UI Tour - Firefox Developer Tools
the ui is split vertically into three panels source list pane source pane the contents of the third pane depend on the current state of the debugger and may include the following sections: toolbar watch expressions breakpoints call stack scopes xhr breakpoints event listener breakpoints dom mutation breakpoints source list pane the source list pane lists all the javascript source files loaded into the page, and enables you to select one to debug.
... outline view the outline view shows a tree for navigating the currently open file.
... source pane this shows the javascript file currently loaded.
...And 3 more matches
Debugger.Script - Firefox Developer Tools
currently only entire modules evaluated via new webassembly.module are represented.
...the elements of the array are objects, each of which describes a single opcode, and contains the following properties: linenumber: the line number of the current opcode.
... columnnumber: the column number of the current opcode.
...And 3 more matches
Migrating from Firebug - Firefox Developer Tools
it is currently missing the preview for html, xml and svg, though, which is tracked in bug 1247392 and bug 1262796, but when you click on the url of the request you switch to the network monitor, which has a preview tab.
...only the live preview of changes is currently missing, which is tracked in bug 1067318 and bug 815464.
...they do currently only allow to set script breakpoints.
...And 3 more matches
The JavaScript input interpreter - Firefox Developer Tools
to execute the snippet that is currently in the editing pane, click the run button or press ctrl+enter (or cmd+return on macos).
... you can open files when in multi-line mode, and save the current contents of the editing pane to a file.
... the console suggests completions from the scope of the currently executing stack frame.
...And 3 more matches
Firefox Developer Tools
click it to display a list of the iframes on the current page and select the one with which you want to work.
... click this button to take a screenshot of the current page.
... style editor view and edit css styles for the current page.
...And 3 more matches
AnalyserNode - Web APIs
analysernode.getfloatfrequencydata() copies the current frequency data into a float32array array passed into it.
... analysernode.getbytefrequencydata() copies the current frequency data into a uint8array (unsigned byte array) passed into it.
... analysernode.getfloattimedomaindata() copies the current waveform, or time-domain, data into a float32array array passed into it.
...And 3 more matches
CanvasRenderingContext2D.isPointInPath() - Web APIs
the canvasrenderingcontext2d.ispointinpath() method of the canvas 2d api reports whether or not the specified point is contained in the current path.
... syntax ctx.ispointinpath(x, y [, fillrule]); ctx.ispointinpath(path, x, y [, fillrule]); parameters x the x-axis coordinate of the point to check, unaffected by the current transformation of the context.
... y the y-axis coordinate of the point to check, unaffected by the current transformation of the context.
...And 3 more matches
History - Web APIs
WebAPIHistory
the history interface allows manipulation of the browser session history, that is the pages visited in the tab or frame that the current page is loaded in.
... length read only returns an integer representing the number of elements in the session history, including the currently loaded page.
... go() asynchronously loads a page from the session history, identified by its relative location to the current page, for example -1 for the previous page or 1 for the next page.
...And 3 more matches
MediaSession.setActionHandler() - Web APIs
the following strings identify the currently available types of media session action: nexttrack advances playback to the next track.
... seekbackward seeks backward through the media from the current position.
... seekforward seeks forward from the current position through the media.
...And 3 more matches
Media Session action types - Web APIs
the following strings identify the currently available types of media session action: nexttrack advances playback to the next track.
... seekbackward seeks backward through the media from the current position.
... seekforward seeks forward from the current position through the media.
...And 3 more matches
MediaSessionActionDetails - Web APIs
the following strings identify the currently available types of media session action: nexttrack advances playback to the next track.
... seekbackward seeks backward through the media from the current position.
... seekforward seeks forward from the current position through the media.
...And 3 more matches
Using the Permissions API - Web APIs
this article provides a basic guide to using the w3c permissions api, which provides a programmatic way to query the status of api permissions attributed to the current context.
... the only two apis currently recognized by the permissions api in chrome are geolocation and notification, with firefox also recognizing push and webmidi.
...it uses geolocation to query the user's current location and plot it out on a google map: you can run the example live, or view the source code on github.
...And 3 more matches
Selection API - Web APIs
concepts and usage to retrieve the current text range the user has selected, you can use the window.getselection() or document.getselection() method, storing the return value — a selection object — in a variable for futher use.
... selection api interfaces selection represents the range of text selected by the user or the current position of the caret.
... extensions to other interfaces window.getselection(), document.getselection() returns a selection object representing the range of text selected by the user or the current position of the caret.
...And 3 more matches
Using DTMF with WebRTC - Web APIs
note, however, that although it's possible to send dtmf using webrtc, there is currently no way to detect or receive incoming dtmf.
... webrtc currently ignores these payloads; this is because webrtc's dtmf support is primarily intended for use with legacy telephone services that rely on dtmf tones to perform tasks such as: teleconferencing systems menu systems voicemail systems entry of credit card or other payment information passcode entry note: while the dtmf is not sent to the remote peer as audio, browsers may choose to play the corresponding tone to the local user as part of their user experience, since users are typically used to hearing their phone play the tones audibly.
...although this method is obsolete, this example supports it as a fallback to let older browsers (and those not yet updated to support the current webrtc dtmf api) run the example.
...And 3 more matches
Rendering and the WebXR frame animation callback - Web APIs
this is due to early displays using the ac electrical grid's current flow waveform, which cycles 60 times per second in the united states (50 in europe), for timing purposes.
... let lastframetime = 0; function mydrawframe(currentframetime, frame) { let session = frame.session; let viewerpose; // schedule the next frame to be painted when the time comes.
... const deltatime = currentframetime - lastframetime; lastframetime = time; // now call the scene rendering code once for each of // the session's views.
...And 3 more matches
Using the Web Animations API - Web APIs
currently, there should be at least two keyframes specified (representing the starting and ending states of the animation sequence).
...we could do that by setting her animation.currenttime to 4 seconds, like so: alicechange.currenttime = 4000; but while working on this animation, we might change alice’s duration a lot.
... wouldn’t it be better if we set her currenttime dynamically, so we don’t have to make two updates at a time?
...And 3 more matches
Window.open() - Web APIs
WebAPIWindowopen
the actual fetching of the url is deferred and starts after the current script block finishes executing.
...if the current window is the opener of the window you try to get an handle on.
...ate a new window or will re-use an already opened one" >promote firefox adoption</a></p> you can also make such function able to open only 1 secondary window and to reuse such single secondary window for other links in this manner: <script type="text/javascript"> var windowobjectreference = null; // global variable var previousurl; /* global variable that will store the url currently in the secondary window */ function openrequestedsinglepopup(url) { if(windowobjectreference == null || windowobjectreference.closed) { windowobjectreference = window.open(url, "singlesecondarywindowname", "resizable,scrollbars,status"); } else if(previousurl != url) { windowobjectreference = window.open(url, "singlesecondarywindowname", "resizable=yes,scrollbars=yes...
...And 3 more matches
ARIA: button role - Accessibility
the values include aria-pressed="false" when a button is not currently pressed, aria-pressed="true" to indicate a button is currently pressed, and aria-pressed="mixed" if the button is considered to be partially pressed.
... aria-expanded if the button controls a grouping of other elements, the aria-expanded state indicates whether the controlled grouping is currently expanded or collapsed.
... if the button has aria-expanded="false" set, the grouping is not currently expanded; if the button has aria-expanded="true" set, it is currently expanded; if the button has aria-expanded="undefined" set or the attribute is ommitted, it is not expandable.
...And 3 more matches
Keyboard-navigable JavaScript widgets - Accessibility
this technique involves programmatically moving focus in response to key events and updating the tabindex to reflect the currently focused item.
... use onfocus to track the current focus don't assume that all focus changes will come via key and mouse events: assistive technologies such as screen readers can set the focus to any focusable element.
...there is no standard dom interface to get the current document focus.
...And 3 more matches
Media events - Developer guides
canplaythrough sent when the readystate changes to have_enough_data, indicating that the entire media can be played without interruption, assuming the download rate remains at least at the current level.
...note: manually setting the currenttime will eventually fire a canplaythrough event in firefox.
...information about the current amount of the media that has been downloaded is available in the media element's buffered attribute.
...And 3 more matches
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
currenttime reading currenttime returns a double-precision floating-point value indicating the current playback position, in seconds, of the audio.
... if the audio's metadata isn't available yet—thereby preventing you from knowing the media's start time or duration—currenttime instead indicates, and can be used to change, the time at which playback will begin.
... otherwise, setting currenttime sets the current playback position to the given time and seeks the media to that position if the media is currently loaded.
...And 3 more matches
String.prototype.padEnd() - JavaScript
the padend() method pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length.
... the padding is applied from the end of the current string.
... syntax str.padend(targetlength [, padstring]) parameters targetlength the length of the resulting string once the current str has been padded.
...And 3 more matches
TypedArray.prototype.reduce() - JavaScript
currentvalue the current element being processed in the typed array.
... index the index of the current element being processed in the typed array.
... description the reduce method executes the callback function once for each element present in the typed array, excluding holes in the typed array, receiving four arguments: the initial value (or value from the previous callback call), the value of the current element, the current index, and the typed array over which iteration is occurring.
...And 3 more matches
Web video codec guide - Web media technologies
each frame of video is presented by applying a set of changes to the currently-visible frame.
...the key frames are full frames, which are used to repair any damage or artifact residue that's currently visible.
... av1 currently offers three profiles: main, high, and professional with increasing support for color depths and chroma subsampling.
...And 3 more matches
clipboard - Archive of obsolete content
currently the image type doesn't support transparency on windows.
... var clipboard = require("sdk/clipboard"); if (clipboard.currentflavors.indexof("html") != -1) require("sdk/tabs").open("data:text/html;charset=utf-8," + clipboard.get("html")); set the clipboard contents to an image.
... var clipboard = require("sdk/clipboard"); if (clipboard.currentflavors.indexof("image") != -1) require("sdk/tabs").open(clipboard.get()); as noted before, data type can be easily omitted for images.
...And 2 more matches
windows - Archive of obsolete content
with this module, you can: enumerate the currently opened browser windows open new browser windows listen for common window events such as open and close private windows if your add-on has not opted into private browsing, then you won't see any private browser windows.
... returns browserwindow : properties browserwindows browserwindows provides access to all the currently open browser windows as browserwindow objects.
... var windows = require("sdk/windows"); for (let window of windows.browserwindows) { console.log(window.title); } console.log(windows.browserwindows.length); the currently active window is given by browserwindows.activewindow: var windows = require("sdk/windows").browserwindows; windows.on('activate', function(window) { console.log("a window was activated."); var activewindowtitle = windows.activewindow.title; console.log("active window title is: " + activewindowtitle); }); events the browserwindows property emits the following events which can be listened to using its on function.
...And 2 more matches
Localization - Archive of obsolete content
now whenever your javascript or html asks the localization system for the translation of the hello_id identifier, it will get the correct translation for the current locale.
...ized-hello", label: "localized hello", icon: "./icon-16.png", onclick: function() { hello.show(); } }); var hello = require("sdk/panel").panel({ height: 75, width: 150, contenturl: require("sdk/self").data.url("my-panel.html") }); given locale files for "en-us" and "fr" which provide translations of hello_id, the panel will now display "hello!" or "bonjour !", according to the current locale: the translation is inserted into the node which has the data-l10n-id attribute set.
... if you run it you'll see the expected output for the current locale: info: hello!
...And 2 more matches
Preferences - Archive of obsolete content
default preferences fixme: someone should reword this section each preference may have up to two values — the current value and the default value.
... that means there are two "pref trees:" current and default, and each of them may or may not have a value for the preference in question.
... the effect of default preferences on get methods when one of the get methods of nsiprefbranch (assuming it's a branch of the tree with current values) is called, it does the following: checks whether the current tree has a value for the preference and whether or not the preference is locked.
...And 2 more matches
Extension Versioning, Update and Compatibility - Archive of obsolete content
if the install.rdf contains any targetplatform entries then the platform of the currently running application must be listed or the installation will be rejected.
...in particular you should never specify a maxversion that is larger than the currently available version of the application since you do not know what api and ui changes are just around the corner.
... compatibility updates during the automatic update checks, applications look for both new versions and updated compatibility information about the currently installed version of an add-on.
...And 2 more matches
Session store API - Archive of obsolete content
var ss = components.classes["@mozilla.org/browser/sessionstore;1"] .getservice(components.interfaces.nsisessionstore); var currenttab = gbrowser.selectedtab; var datatoattach = "i want to attach this"; ss.settabvalue(currenttab, "key-name-here", datatoattach); this code sets the value of the key "key-name-here" to datatoattach.
... fetching a saved value you can fetch a value associated with a tab at any time (whether the tab is in the process of being restored or not), using code similar to the following: var ss = components.classes["@mozilla.org/browser/sessionstore;1"] .getservice(components.interfaces.nsisessionstore); var currenttab = gbrowser.selectedtab; var retrieveddata = ss.gettabvalue(currenttab, "key-name-here"); after this code executes, the variable retrieveddata contains the value saved for the key "key-name-here".
... deleting a value associated with a tab to delete a value from a tab, you can use code similar to the following: var ss = components.classes["@mozilla.org/browser/sessionstore;1"] .getservice(components.interfaces.nsisessionstore); var currenttab = gbrowser.selectedtab; ss.deletetabvalue(currenttab, "key-name-here"); remarks the window value save and restore functions work exactly like the tab-based functions by similar names.
...And 2 more matches
MMgc - Archive of obsolete content
threading the gc routines are not currently thread safe, we're operating under the assumption that none of the player spawned threads create gc'd things.
...this is an unfortunate artifact of the existing code base, the avm+ is relatively clean and its reachability graph consists of basically 2 gc roots (the avmcore and urlstreams) but the avm- has a bunch (currently includes securitycallbackdata, moviecliploader, camerainstance, fappacket, microphoneinstance, csoundchannel, urlrequest, responceobject, urlstream and urlstreamsecurity).
...currently we make the decision on when to do a collection based on how much memory has been allocated since the last collection, if its over a certain fraction of the the total heap size we do a collection and if its not we expand.
...And 2 more matches
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
because it is still under development, the api currently lives in the future and must be imported before it is used: jetpack.future.import("menu"); menus all menus in jetpack are jetpack.menu objects, including both built-in firefox menus and menus that features create.
... isshowing boolean true if the menu is currently visible and false otherwise.
... type string currently only "separator" is supported.
...And 2 more matches
Supporting private browsing mode - Archive of obsolete content
detecting private browsing mode determining whether or not the user is currently in private browsing mode is simple.
...var pbs = components.classes["@mozilla.org/privatebrowsing;1"] .getservice(components.interfaces.nsiprivatebrowsingservice); var oldprivatemode = pbs.privatebrowsingmode; pbs.privatebrowsingenabled = true; /* this is all private */ pbs.privatebrowsingenabled = oldprivatemode; in this example, we save the current state of the private browsing mode setting in the oldprivatemode variable, then turn on private browsing by setting its value to true.
... simply instantiate the helper, then you can use its inprivatebrowsing flag to detect whether or not private browsing is currently enabled, as shown here: var listener = new privatebrowsinglistener(); if (listener.inprivatebrowsing) { // we are in private browsing mode!
...And 2 more matches
Venkman Introduction - Archive of obsolete content
stop button waiting for execution also note that when you are currently executing javascript and click the stop button, the javascript stops immediately.
...when the debugger is stopped, the local variables view displays values for the current function.
... double-clicking on a stack frame will change the "current" frame.
...And 2 more matches
Introduction to XUL - Archive of obsolete content
we don't have a current "requirements" document.
...our current code tends not to be strict about enforcing this, especially for tags and attributes in the html namespace.
...these are currently nonstandard, of course, and subject to change for now.
...And 2 more matches
Using the standard theme - Archive of obsolete content
you can either provide a complete custom styling, but most of the time you also want to be able to reuse the standard theme (also called the "global skin") of the base application for non-custom elements, transparently with regard to which theme the user has currently chosen.
...meaning, some internal default will be applied, which does by no means correspond to the standard theme (the theme currently chosen by the user in the theme selector), or even the default theme delivered with your the base application.
... applying the standard theme in order to use the theme currently chosen by the user of the base application (the so called "global skin"), you have to add the following line to your xul file: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> this imports the styles found in the <tt>global/skin</tt> chrome directory and will make the standard xul widgets of your application use the selected chosen theme.
...And 2 more matches
XUL Questions and Answers - Archive of obsolete content
loading remote dtds for xml documents is currenty not supported in xul.
... the current issue is a person exploring if it is possible to have checkbox support for multi column lists.
...an example of this is: var tree = document.getelementbyid('treeid'); selectedtreeitem = tree.view.getitematindex(tree.currentindex); selectedtreeitem.firstchild.setattribute('style', 'background: #ff0000'); what is an example of tab browser in xul?
...And 2 more matches
notificationbox - Archive of obsolete content
finding the current notification box within a firefox extension, you can retrieve the current notification box for a specific tab by calling the global function getnotificationbox(): notifybox = chromewin.getnotificationbox(notifywindow) notifybox = getnotificationbox(notifywindow) // applies to current context's window object here, chromewin is the xul window (usually just window), and notifywindow is the web c...
... properties currentnotification, allnotifications, notificationshidden methods appendnotification, getnotificationwithvalue, removeallnotifications, removecurrentnotification, removenotification, removetransientnotifications, attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasourc...
...ty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties currentnotification type: notification element the currently displayed notification element or null.
...And 2 more matches
prefwindow - Archive of obsolete content
attributes buttonalign, buttondir, buttonorient, buttonpack, buttons, defaultbutton, lastselected, onbeforeaccept, ondialogaccept, ondialogcancel, ondialogdisclosure, ondialoghelp, onload, onunload, title, type properties buttons, currentpane, defaultbutton, lastselected, preferencepanes, type methods acceptdialog, addpane, canceldialog, centerwindowonscreen, getbutton, opensubdialog, openwindow, showpane examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="saveoptions" label="backups...
... the default setting of browser.preferences.instantapply currently is true on linux and mac os and false on windows (which however might or might not change soon, see bug 738797 and bug 1037225).
...returning false doesn't currently prevent the dialog from closing, but does prevent saving (bug 474527).
...And 2 more matches
radiogroup - Archive of obsolete content
focuseditem type: radio element holds the currently focused item in the radiogroup, which may or may not be the same as the selected item.
... selectedindex type: integer returns the index of the currently selected item.
...returns -1 if no items are selected selecteditem type: element holds the currently selected item.
...And 2 more matches
timepicker - Archive of obsolete content
datevalue type: date the date that is currently entered or selected in the datepicker as a date object.
... hour type: integer the currently selected hour from 0 to 23.
... minute type: integer the currently selected minute from 0 to 59.
...And 2 more matches
NPN_GetURL - Archive of obsolete content
syntax #include <npapi.h> nperror npn_geturl(npp instance, const char* url, const char* target); parameters the function has the following parameters: instance pointer to the current plug-in instance.
... _self or _current: load the link into the same window the plug-in instance occupies.
... if the target is null, the browser creates a new stream and delivers the data to the current instance regardless of the mime type of the url.
...And 2 more matches
The First Install Problem - Archive of obsolete content
this is an old working document; see en/gecko_plugin_api_reference/plug-in_development_overview for current information.
... caveat emptor: if the key cannot be created under hkey_local_machine, create it as hkey_current_user\software\mozillaplugins\ under hkey_current_user.
...thus, some installers may need to write to the hkey_current_user key; this doesn't require administrator privileges.
...And 2 more matches
Reference - Archive of obsolete content
so are "current object" and "context object".
...--maian 23:43, 21 september 2005 (pdt) i think we need a new section in the reference that specifies the differences between versions, collecting this information into a single location rather than leaving it scattered haphazardly throughout the reference as it currently is.
... once that is done, the various code samples should be updated to reflect current practices and code if they cannot be written in a "version-neutral" manner.
...And 2 more matches
Implementation Status - Archive of obsolete content
specification chapter index here we give an overview of xforms 1.1 specification chapters and the current status of the mozilla support.
... the sections are marked with their current status: supported, partial support, in progress, and not currently supported.
... 7.9.8 adjust-datetime-to-timezone() unsupported 7.9.9 seconds() supported 7.9.10 months() supported 7.10.1 instance() partial instance() won't work with no parameter or empty string as a parameter 419190; 7.10.2 current() supported 7.10.3 id() unsupported 7.10.4 context() unsupported 7.11.1 choose() unsupported 7.11.2 event() supported 7.12 extension functions unsupported not a compli...
...And 2 more matches
Assessment: Accessibility troubleshooting - Learn web development
color the text is difficult to read because of the current color scheme.
... can you do a test of the current color contrast (text/background), report the results of the test, and then fix it by changing the assigned colors?
... the images the images are currently inaccessible to screenreader users.
...And 2 more matches
Looping code - Learn web development
in pseudocode, this would look something like the following: loop(food = 0; foodneeded = 10) { if (food >= foodneeded) { exit loop; // we have enough food; let's go home } else { food += 2; // spend an hour collecting 2 more food // loop will then run again } } so the amount of food needed is set at 10, and the amount the farmer currently has is set at 0.
... inside the loop, we concatenate the current loop item (cats[i] , which is cats[whatever i is at the time]) along with a comma and space, onto the end of the info variable.
... inside the loop, we first split the current contact (contacts[i]) at the colon character, and store the resulting two values in an array called splitcontact.
...And 2 more matches
A first splash into JavaScript - Learn web development
at the moment you'll see a simple heading, paragraph of instructions and form for entering a guess, but the form won't currently do anything.
... at this point, replace your current checkguess() function with this version instead: function checkguess() { let userguess = number(guessfield.value); if (guesscount === 1) { guesses.textcontent = 'previous guesses: '; } guesses.textcontent += userguess + ' '; if (userguess === randomnumber) { lastresult.textcontent = 'congratulations!
... the first line (line 2 above) declares a variable called userguess and sets its value to the current value entered inside the text field.
...And 2 more matches
Starting our Svelte Todo list app - Learn web development
code along with us git clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/02-starting-our-todo-app or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/02-starting-our-todo-app remember to run npm install && npm run dev to start your app in development mode.
...the console should currently give you a message along the lines of "<app> was created with unknown prop 'name'".
...te the rest of the tutorial</span> </button> </div> </div> </li> </ul> <hr /> <!-- moreactions --> <div class="btn-group"> <button type="button" class="btn btn__primary">check all</button> <button type="button" class="btn btn__primary">remove completed</button> </div> </div> check the rendered out again, and you'll see something like this: it's current not very nicely styled, and also functionally useless.
...And 2 more matches
Componentizing our Svelte app - Learn web development
code along with us git clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/04-componentizing-our-app or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/04-componentizing-our-app remember to run npm install && npm run dev to start your app in development mode.
...first of all, we need to import it — add the following line at the top of the todos.svelte <script> section: import filterbutton from './filterbutton.svelte' now, replace the filters <div> with a call to the filterbutton component, which takes the current filter as a prop — the below line is all you need: <filterbutton {filter} /> note: remember that when the html attribute name and variable matches, they can be replaced with {variable}, that's why we could replace <filterbutton filter={filter} /> with <filterbutton {filter} />.
...we are also passing the current todo object into the component as a prop.
...And 2 more matches
Getting started with Svelte - Learn web development
it's main current disadvantages are that it is a young framework — its ecosystem is therefore more limited in terms of tooling, support, plugins, clear usage patterns, etc.
...currently should only contain setuptypescript.js, a script that sets up typescript support in svelte.
...currently, it's the svelte logo.
...And 2 more matches
CSUN Firefox Materials
" -- darren paskell, from window-eyes beta testing list firefox works with popular screen readers, with the best support currently coming from gw micro's window-eyes 5.5.
...mozilla corporation is currently reaching out to work with ai squared, the makers of zoomtext, in order to enable complete support of advanced zoomtext features such as the doc reader and app reader.
... firefox on linux currently boasts the best onscreen keyboard support in the industry via gok, the gnome onscreen keyboard.
...And 2 more matches
Overview of Mozilla embedding APIs
currently, once gecko has been shutdown, it cannot be restarted in the same process space...
...each webbrowser exposes a tree of domwindows - representing the frame hierarchy for the current document.
...this interface supports cut/copy/paste operations on the current selection within the webbrowser window.
...And 2 more matches
TraceMalloc
tracemalloc captures stack traces of all malloc, calloc , realloc, and free calls (this currently covers all operator new and delete calls in mozilla, too).
...if you run with --trace-malloc -, your code can call ns_tracemallocdumpallocations(pathname) at opportune times, and a human-readable listing of the current heap, including stack traces for every allocation, will be written to pathname.
... tracemallocchangelogfd(logfd) - change the current log file to the one identified by logfd, returning the previous fd (so you can maintain a number of open files; keep their fds in a js array!).
...And 2 more matches
Optimizing Applications For NSPR
macintosh the current port of nspr for macintosh will not be usable in its own right.
...at thread switch time, the stack of the current running thread is copied to other storage associated with that thread and the about-to-be-dispatched thread's stack data is copied back onto the windows stack just before the thread is given control.
...however, another thread does not see the data as intended because the stack has been swapped out to the shadow stack and the current thread's stack now occupies the windows stack.
...And 2 more matches
certutil
if this option is not used, the validity check defaults to the current system time.
...for example: -t "tcu,cu,tuw" use the -l option to see a list of the current certificates and trust attributes in a certificate database.
...the validity period begins at the current system time unless an offset is added or subtracted with the -w option.
...And 2 more matches
Shumway
this article will help you understand shumway — mozilla's open standards-based flash renderer — and what it means for the community of developers currently creating the adobe flash platform.
...it is currently available as an extension and as a component in firefox's nightly builds that can be enabled through about:config (you need to find the shumway.disabled preference and set it to false).
...some of its current limitations are just temporary, however.
...And 2 more matches
JS_AliasElement
this name corresponds to a string representation of the element's current index number.
...name is the element's current index in the object, and alias is the alternate index to assign to the element.
... this feature is deprecated, meaning that it is currently supported only for backward compatibility with existing applications.
...And 2 more matches
TPS Bookmark Lists
the properties for this object include the uri, title, loadinsidebar, description, tags, keyword properties above, plus two additional properties: location: the full path of the folder that the bookmark should be moved to position: the title of the existing bookmark item, in the current folder, where this bookmark should be moved to (i.e., this bookmark would be inserted into the bookmark list at the position of the named bookmark, causing that bookmark to be positioned below the current one) example: { uri: "http://www.google.com", title: "google", loadinsidebar: false, tags: [ "google", "computers", "misc" ] } livemark objects valid properties are: livemark: the liv...
...the properties for this object include the livemark, siteuri, feeduri properties above, plus two additional properties: location: the full path of the folder that the livemark should be moved to position: the title of the existing bookmark item, in the current folder, where this livemark should be moved to (i.e., this livemark would be inserted into the bookmark list at the position of the named bookmark, causing that bookmark to be positioned below the current one) example: { livemark: "livemarkone", feeduri: "http://rss.wunderground.com/blog/jeffmasters/rss.xml", siteuri: "http://www.wunderground.com/blog/jeffmasters/show.html" } folder objec...
...the properties for this object include the folder, description properties above, plus two additional properties: location: the full path of the folder that this folder should be moved to position: the title of the existing bookmark item, in the current folder, where this folder should be moved to (i.e., this folder would be inserted into the bookmark list at the position of the named bookmark, causing that bookmark to be positioned below this folder) example: { folder: "folderb", changes: { location: "menu/foldera", folder: "folder b", description: "folder description" } } separator objects valid properties are: separator: ...
...And 2 more matches
nsIApplicationCacheService
note: this method should propagate the entry to other application caches with the same opportunistic namespace; however, this is not currently implemented.
... void cacheopportunistically( in nsiapplicationcache cache, in acstring key ); parameters cache the cache in which the entry is currently cached.
...deactivategroup() deactivates the currently active cache object for the specified cache group.
...And 2 more matches
nsIApplicationUpdateService
indicates if the current user has access privileges to the install directory.
...this depends on whether or not the current user has the necessary access privileges for the install directory.
... methods adddownloadlistener() adds a listener that receives progress and state information about the update that is currently being downloaded.
...And 2 more matches
nsIDOMGeoGeolocation
you can request a single notification of the user's current position, or you can monitor the position over time.
...1"] .getservice(components.interfaces.nsidomgeogeolocation); note: if nsidgeogeolocation throws an exception when importing, try using this: var geolocation = components.classes["@mozilla.org/geolocation;1"] .getservice(components.interfaces.nsisupports); method overview void clearwatch(in unsigned short watchid); void getcurrentposition(in nsidomgeopositioncallback successcallback, [optional] in nsidomgeopositionerrorcallback errorcallback, [optional] in nsidomgeopositionoptions options); unsigned short watchposition(in nsidomgeopositioncallback successcallback, [optional] in nsidomgeopositionerrorcallback errorcallback, ...
...getcurrentposition() acquires the user's current position via a new position object.
...And 2 more matches
nsIDragSession
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void getdata( in nsitransferable atransferable, in unsigned long aitemindex ); boolean isdataflavorsupported( in string adataflavor ); attributes attribute type description candrop boolean set the current state of the drag, whether it can be dropped or not.
... datatransfer nsidomdatatransfer the data transfer object for the current drag operation.
... dragaction unsigned long sets the action (copy, move, link and so on) for the current drag.
...And 2 more matches
nsIEventTarget
1.0 66 introduced gecko 1.6 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void dispatch(in nsirunnable event, in unsigned long flags); boolean isoncurrentthread(); void postevent(in pleventptr aevent); native code only!
... note: passing this flag to dispatch may have the side-effect of causing other events on the current thread to be processed while waiting for the given event to be processed.
... isoncurrentthread() check to see if this event target is associated with the current thread.
...And 2 more matches
nsIJumpListBuilder
method overview void abortlistbuild(); boolean addlisttobuild(in short acattype, in nsiarray items optional, in astring catname optional); boolean commitlistbuild(); boolean deleteactivelist(); boolean initlistbuild(in nsimutablearray removeditems); attributes attribute type description available short indicates whether jump list taskbar features are supported by the current host.
... maxlistitems short the maximum number of jump list items the current desktop can support.
... methods abortlistbuild() aborts and clears the current jump list build.
...And 2 more matches
nsILocalFile
appendrelativenativepath appends a relative, native character encoding, path to the current path of the nsilocalfile object.
... appendrelativepath() appends a relative native path to the current path of the nsilocalfile object.
...all current settings will be reset.
...And 2 more matches
nsIMsgDBHdr
for instance, msghdrforcurrentmessage() will return the currently selected message's header.
...for the currently selected message, thunderbird provides a utility function: setmsghdrpropertyandreload(aproperty, avalue); which duplicates this functionality without requiring you to grab the current header.
...thunderbird provides a utility function which performs this for the currently selected message: markcurrentmessageasread().
...And 2 more matches
nsIProfile
tiveprofiledir, in wstring langcode, in boolean useexistingdir); void deleteprofile(in wstring name, in boolean candeletefiles); void getprofilelist(out unsigned long length, [retval, array, size_is(length)] out wstring profilenames); boolean profileexists(in wstring profilename); void renameprofile(in wstring oldname, in wstring newname); void shutdowncurrentprofile(in unsigned long shutdowntype); attributes attribute type description currentprofile wstring the name of the profile currently in use.
...unimplemented methods cloneprofile() clones the current profile, creating a copy of it with a new name.
... void cloneprofile( in wstring profilename ); parameters profilename the name to assign to the new clone of the current profile.
...And 2 more matches
Index
elaborate on the mime changes that were made for spam currently, spam filtering is does not work for news, but it would be possible to add support for this.
... 79 building a thunderbird extension 6: adding javascript in this step we will create a small piece of javascript code that inserts the current date into our statusbar widget.
... 85 error reporting tools thunderbird currently, thunderbird tends to eat a lot of exceptions.
...And 2 more matches
Mail composition back end
currently, this method does several functions depending on the arguments passed in, but this could easily lead to confusion.
...const char *amsgid, - the message id for the message being sent pruint32 aprogress, - the progress so far pruint32 aprogressmax) = 0; - the maximum progress (aprogress should be used as a numerator and aprogressmax as a denominator for a message sent percentage) onstatus the onstatus gives the listener status updates for the current operation.
...currently, this pref is a "char *" which is the specific name of the folder, but this will more than likely change to a prbool (boolean) preference.
...And 2 more matches
Plug-in Basics - Plugins
the installed plug-ins page lists each installed plug-in along with its mime type or types, description, file extensions, and the current state (enabled or disabled) of the plug-in for each mime type assigned to it.
... directories pointed to by hkey_current_user\software\mozillaplugins\*\path registry value, where * can be replaced by any name.
... /system/library/frameworks/javavm.framework/versions/current/resources.
...And 2 more matches
about:debugging (before Firefox 68) - Firefox Developer Tools
this page enables you to do two things: load an add-on temporarily from disk connect the add-on debugger to any restartless add-ons connecting the add-on debugger the add-ons page in about:debugging lists all restartless add-ons that are currently installed (note that this list may include add-ons that came preinstalled with your firefox).
... tabs in firefox 49 onwards, a tabs page is available in about:debugging — this provides a complete list of all the debuggable tabs open in the current firefox instance.
... "running": the service worker is currently running.
...And 2 more matches
about:debugging - Firefox Developer Tools
this firefox provides information about temporary extensions you have loaded for debugging, extensions that are installed in firefox, the tabs that you currently have open, and service workers running on firefox.
... the add-ons section in about:debugging lists all web extensions that are currently installed.
... running: the service worker is currently running.
...And 2 more matches
AudioParam - Web APIs
there are two kinds of audioparam, a-rate and k-rate parameters: an a-rate audioparam takes the current audio parameter value for each sample frame of the audio signal.
...the time used is the one defined in audiocontext.currenttime.
... audioparam.value represents the parameter's current value as of the current time; initially set to the value of defaultvalue.
...And 2 more matches
AudioWorkletGlobalScope - Web APIs
as the global execution context is shared across the current baseaudiocontext, it's possible to define any other variables and perform any actions allowed in worklets — apart from defining audioworkletprocessor-derived classes.
... properties currentframe read only returns an integer that represents the ever-increasing current sample-frame of the audio block being processed.
... currenttime read only returns a double that represents the ever-increasing context time of the audio block being processed.
...And 2 more matches
CanvasRenderingContext2D.save() - Web APIs
the canvasrenderingcontext2d.save() method of the canvas 2d api saves the entire state of the canvas by pushing the current state onto a stack.
... the drawing state the drawing state that gets saved onto a stack consists of: the current transformation matrix.
... the current clipping region.
...And 2 more matches
Document.importNode() - Web APIs
the document object's importnode() method creates a copy of a node or documentfragment from another document, to be inserted into the current document later.
...to include it, you need to call an insertion method such as appendchild() or insertbefore() with a node that is currently in the document tree.
... syntax const importednode = document.importnode(externalnode [, deep]); parameters externalnode the external node or documentfragment to import into the current document.
...And 2 more matches
Document.selectedStyleSheetSet - Web APIs
the selectedstylesheetset property indicates the name of the style sheet set that's currently in use.
... syntax currentstylesheetset = document.selectedstylesheetset; document.selectedstylesheet = newstylesheetset; on return, currentstylesheetset indicates the name of the style sheet set currently in use.
... you can also set the current style sheet set using this property.
...And 2 more matches
DocumentOrShadowRoot.activeElement - Web APIs
the activeelement read-only property of the document and shadowroot interfaces returns the element within the dom or shadow dom tree that currently has focus.
...which elements are focusable varies depending on the platform and the browser's current configuration.
... 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
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
function start() { // get the reference for the body var mybody = document.getelementsbytagname("body")[0]; // creates <table> and <tbody> elements mytable = document.createelement("table"); mytablebody = document.createelement("tbody"); // creating all cells for(var j = 0; j < 3; j++) { // creates a <tr> element mycurrent_row = document.createelement("tr"); for(var i = 0; i < 4; i++) { // creates a <td> element mycurrent_cell = document.createelement("td"); // creates a text node currenttext = document.createtextnode("cell is row " + j + ", column " + i); // appends the text node we created into the cell <td> ...
... mycurrent_cell.appendchild(currenttext); // appends the cell <td> into the row <tr> mycurrent_row.appendchild(mycurrent_cell); } // appends the row <tr> into <tbody> mytablebody.appendchild(mycurrent_row); } // appends <tbody> into <table> mytable.appendchild(mytablebody); // appends <table> into <body> mybody.appendchild(mytable); // sets the border attribute of mytable to 2; mytable.setattribute("border","2"); } </script> </head> <body onload="start()"> </body> </html> manipulating the table with dom and css getting a text node from the table this example introduces two new dom attributes.
... mybody = document.getelementsbytagname("body")[0]; mytable = mybody.getelementsbytagname("table")[0]; mytablebody = mytable.getelementsbytagname("tbody")[0]; myrow = mytablebody.getelementsbytagname("tr")[1]; mycel = myrow.getelementsbytagname("td")[1]; // first item element of the childnodes list of mycel myceltext=mycel.childnodes[0]; // content of currenttext is the data content of myceltext currenttext=document.createtextnode(myceltext.data); mybody.appendchild(currenttext); getting an attribute value at the end of sample1 there is a call to setattribute on the mytable object.
...And 2 more matches
Event.eventPhase - Web APIs
WebAPIEventeventPhase
the eventphase read-only property of the event interface indicates which phase of the event flow is currently being evaluated.
... syntax let phase = event.eventphase; value returns an integer value which specifies the current evaluation phase of the event flow.
... constants event phase constants these values describe which phase the event flow is currently being evaluated.
...And 2 more matches
Fullscreen API - Web APIs
properties the document interface provides properties that can be used to determine if full-screen mode is supported and available, and if full-screen mode is currently active, which element is using the screen.
... documentorshadowroot.fullscreenelement the fullscreenelement property tells you the element that's currently being displayed in full-screen mode on the dom (or shadow dom).
... obsolete properties document.fullscreen a boolean value which is true if the document has an element currently being displayed in full-screen mode; otherwise, this returns false.
...And 2 more matches
IDBCursor.update() - Web APIs
WebAPIIDBCursorupdate
the update() method of the idbcursor interface returns an idbrequest object, and, in a separate thread, updates the value at the current position of the cursor in the object store.
... syntax var anidbrequest = myidbcursor.update(value); parameters value the new value to be stored at the current position.
... invalidstateerror the cursor was created using idbindex.openkeycursor, is currently being iterated, or has iterated past its end.
...And 2 more matches
IDBCursor - Web APIs
WebAPIIDBCursor
this function never returns null or throws an exception, even if the cursor is currently being iterated, has iterated past its end, or its transaction is not active.
... idbcursor.primarykey read only returns the cursor's current effective primary key.
... if the cursor is currently being iterated or has iterated outside its range, this is set to undefined.
...And 2 more matches
Intersection Observer API - Web APIs
targeting an element to be observed once you have created the observer, you need to give it a target element to watch: let target = document.queryselector('#listitem'); observer.observe(target); // the callback we setup for the observer will be executed now for the first time // it waits until we assign a target to our observer (even if the target is currently not visible) whenever the target meets a threshold specified for the intersectionobserver, the callback is invoked.
...check the value of the isintersecting property to see if the entry represents an element that currently intersects with the root.
... you can see if the target currently intersects the root by looking at the entry's isintersecting property; if its value is true, the target is at least partially intersecting the root element or document.
...And 2 more matches
MediaDevices.getUserMedia() - Web APIs
null; try { stream = await navigator.mediadevices.getusermedia(constraints); /* use the stream */ } catch(err) { /* handle the error */ } } similarly, using the raw promises directly, the code looks like this: navigator.mediadevices.getusermedia(constraints) .then(function(stream) { /* use the stream */ }) .catch(function(err) { /* handle the error */ }); note: if the current document isn't loaded securely, navigator.mediadevices will be undefined, and you cannot use getusermedia().
...it also happens if the user has specified that the current browsing instance is not permitted access to the device, the user has denied access for the current session, or the user has denied all access to user media devices globally.
...the icon is gray if the permission is in place but recording is not currently underway.
...And 2 more matches
MediaKeySession - Web APIs
mediakeysession.expiration read only the time after which the keys in the current session can no longer be used to decrypt media data, or nan if no such time exists.
... mediakeysession.keystatuses read only contains a reference to a read-only mediakeystatusmap of the current session's keys and their statuses.
... mediakeysession.sessionid read only contains a unique string generated by the cdm for the current media object and its associated keys or licenses.
...And 2 more matches
MediaSession.playbackState - Web APIs
the playbackstate property of the mediasession interface indicates whether the current media session is playing or paused.
... syntax let playbackstate = mediasession.playbackstate; mediasession.playbackstate = playbackstate; value a domstring indicating the current playback state of the media session.
... the value may be one of the following: none the browsing context doesn't currently know the current playback state, or the playback state is not available at this time.
...And 2 more matches
Notification.permission - Web APIs
the permission read-only property of the notification interface indicates the current permission granted by the user for the current origin to display web notifications.
... syntax var permission = notification.permission; value a domstring representing the current permission.
... the value can be: granted: the user has explicitly granted permission for the current origin to display system notifications.
...And 2 more matches
Path2D - Web APIs
WebAPIPath2D
methods path2d.addpath() adds a path to the current path.
... path2d.closepath() causes the point of the pen to move back to the start of the current sub-path.
... it tries to draw a straight line from the current point to the start.
...And 2 more matches
Pointer Lock API - Web APIs
as it has recently unprefixed, you would currently declare it something like this, for example if you wanted to request pointer lock on a canvas element: canvas.requestpointerlock = canvas.requestpointerlock || canvas.mozrequestpointerlock; canvas.requestpointerlock() if a user has exited pointer lock via the default unlock gesture, or pointer lock has not previously been entered for this document, an event gene...
...the new property is used for accessing the currently locked element (if any), and is named pointerlockelement and the new method on document is exitpointerlock() and, as the name implies, it is used to exit the pointer lock.
... the pointerlockelement property is useful for determining if any element is currently pointer locked (e.g., for doing a boolean check) and also for obtaining a reference to the locked element, if any.
...And 2 more matches
RTCIceCandidatePairStats.selected - Web APIs
the non-standard, firefox-specific rtcicecandidatepairstats property selected indicates whether or not the candidate pair described by the object is the one currently being used to communicate with the remote peer.
... syntax isselected = icpstats.selected; value a firefox-specific boolean value which is true if the candidate pair described by this object is the one currently in use.
... example the function shown in this example identifies the currently-selected candidate pair from a statistics report by first iterating over each report, looking for a transport report; when one is found, that transport's selectedcandidatepairid is used to get the rtcicecandidatepair describing the connection.
...And 2 more matches
RTCPeerConnection.setRemoteDescription() - Web APIs
the rtcpeerconnection method setremotedescription() sets the specified session description as the remote peer's current offer or answer.
...instead, the current connection configuration remains in place until negotiation is complete.
... syntax apromise = rtcpeerconnection.setremotedescription(sessiondescription); parameters sessiondescription an rtcsessiondescriptioninit or rtcsessiondescription which specifies the remote peer's current offer or answer.
...And 2 more matches
RTCRtpSender.replaceTrack() - Web APIs
the rtcrtpsender method replacetrack() replaces the track currently being used as the sender's source with a new mediastreamtrack.
... syntax trackreplacedpromise = sender.replacetrack(newtrack); parameters newtrack optional a mediastreamtrack specifying the track with which to replace the rtcrtpsender's current source track.
... the new track's kind must be the same as the current track's, or the replace track request will fail.
...And 2 more matches
ServiceWorkerContainer - Web APIs
most importantly, it exposes the serviceworkercontainer.register() method used to register service workers, and the serviceworkercontainer.controller property used to determine whether or not the current page is actively controlled.
...it returns a promise that will never reject, and which waits indefinitely until the serviceworkerregistration associated with the current page has an serviceworkerregistration.active worker.
...see /docs/web/api/serviceworkerregistration }).catch(function(error) { console.log('service worker registration failed:', error); }); // independent of the registration, let's also display // information about whether the current page is controlled // by an existing service worker, and when that // controller changes.
...And 2 more matches
SpeechRecognition - Web APIs
speechrecognition.grammars returns and sets a collection of speechgrammar objects that represent the grammars that will be understood by the current speechrecognition.
... speechrecognition.lang returns and sets the language of the current speechrecognition.
... speechrecognition.serviceuri specifies the location of the speech recognition service used by the current speechrecognition to handle the actual recognition.
...And 2 more matches
TextTrack.mode - Web APIs
WebAPITextTrackmode
you can read this value to determine the current mode, and you can change this value to switch modes.
... syntax var mode = texttrack.mode; texttrack.mode = "disabled" | "hidden" | "showing"; value a domstring which indicates the track's current mode.
... text track mode constants the text track mode—sometimes identified using the idl enum texttrackmode—must be one of the following values: disabled the text track is currently disabled.
...And 2 more matches
TextTrack - Web APIs
WebAPITextTrack
texttrack.activecues read only a texttrackcuelist object listing the currently active set of text track cues.
... track cues are active if the current playback position of the media is between the cues' start and end times.
... thus, for displayed cues such as captions or subtitles, the active cues are currently being displayed.
...And 2 more matches
Touch events - Web APIs
the touchevent interface encapsulates all of the touchpoints that are currently active.
...its responsibility in this example is to update the cached touch information and to draw a line from the previous position to the current position of each touch.
... after drawing the line, we call array.splice() to replace the previous information about the touchpoint with the current information in the ongoingtouches array.
...And 2 more matches
WebGLRenderingContext.makeXRCompatible() - Web APIs
javascript the code that handles starting up graphics, switching to vr mode, and so forth looks like this: const outputcanvas = document.queryselector(".output-canvas"); const gl = outputcanvas.getcontext("webgl"); let xrsession = null; let usingxr = false; let currentscene = "scene1"; let glstartbutton; let xrstartbutton; window.addeventlistener("load", (event) => { loadsceneresources(currentscene); glstartbutton.addeventlistener("click", handlestartbuttonclick); xrstartbutton.addeventlistener("click", handlestartbuttonclick); }); outputcanvas.addeventlistener("webglcontextlost", (event) => { /* the context has been lost but can be restored */ eve...
...nt.canceled = true; }); /* when the gl context is reconnected, reload the resources for the current scene.
... */ outputcanvas.addeventlistener("webglcontextrestored", (event) => { loadsceneresources(currentscene); }); async function onstartedxrsession(xrsession) { try { await gl.makexrcompatible(); } catch(err) { switch(err) { case aborterror: showsimplemessagebox("unable to transfer the game to your xr headset.", "cancel"); break; case invalidstateerror: showsimplemessagebox("you don't appear to have a compatible xr headset available.", "cancel"); break; default: handlefatalerror(err); break; } xrsession.end(); } } async function handlestartbuttonclick(event) { if (event.target.classlist.contains("use-webxr") && navigator.xr) { try { xrsession = await navigator.xr.requestsession("immersive-vr"); ...
...And 2 more matches
WebGLRenderingContext - Web APIs
webglrenderingcontext.drawingbufferwidth the read-only width of the current drawing buffer.
... webglrenderingcontext.drawingbufferheight the read-only height of the current drawing buffer.
... webglrenderingcontext.depthfunc() specifies a function that compares incoming pixel depth to the current depth buffer value.
...And 2 more matches
WebGL model view projection - Web APIs
the view matrix is responsible for moving the objects in the scene to simulate the position of the camera being changed, altering what the viewer is currently able to see.
...this is the region of space whose contents are visible to the user at the current time.
...however the current code as we've built it has some issues.
...And 2 more matches
Using the Web Storage API - Web APIs
feature-detecting localstorage to be able to use localstorage, we should first verify that it is supported and available in the current browsing session.
... testing for availability note: this api is available in current versions of all major browsers.
...for example: function setstyles() { var currentcolor = localstorage.getitem('bgcolor'); var currentfont = localstorage.getitem('font'); var currentimage = localstorage.getitem('image'); document.getelementbyid('bgcolor').value = currentcolor; document.getelementbyid('font').value = currentfont; document.getelementbyid('image').value = currentimage; htmlelem.style.backgroundcolor = '#' + currentcolor; pelem.style.fontfamily = cu...
...And 2 more matches
XRSession.visibilityState - Web APIs
the read-only visibilitystate property of the xrsession interface is a string indicating whether the webxr content is currently visible to the user, and if it is, whether it's the primary focus.
... syntax visibilitystate = xrsession.visibilitystate; value a domstring containing one of the values defined in the enumerated type xrvisibilitystate; this string indicates whether or not the xr content is visible to the user and if it is, whether or not it's currently the primary focus.
... the possible values of visibilitystate are: hidden the virtual scene generated by the xrsession is not currently visible to the user, so its requestanimationframe() callbacks are not being executed until thevisibilitystate changes.
...And 2 more matches
XRView - Web APIs
WebAPIXRView
transform read only an xrrigidtransform which describes the current position and orientation of the viewpoint in relation to the xrreferencespace specified when getviewerpose() was called on the xrframe being rendered.
... usage notes positions and number of xrviews per frame while rendering a scene, the set of views that are used to render the scene for the viewer as of the current frame are obtained by calling the xrframe object's getviewerpose() method to get the xrviewerpose representing (in essence) the position of the viewer's head.
...currently, the specification (and therefore all current implementations of webxr) is designed around rendering every xrview into a single xrwebgllayer, which is then presented on the xr device with half used for the left eye and half for the right eye.
...And 2 more matches
ARIA: row role - Accessibility
states and properties aria-expanded state the aria-expanded attribute, which defines the state of the row, can take one of three values, or be omitted: aria-expanded="true: row is currently expanded.
... aria-expanded="false": row is currently collapsed.
...the aria-selected attribute can take one of three values, or be omitted: aria-selected="true: row is currently selected aria-selected="false": row is not currently selected.
...And 2 more matches
Viewport concepts - CSS: Cascading Style Sheets
a viewport represents the area in computer graphics being currently viewed.
...your viewport is everything that is currently visible, notably, the "what is a viewport section", and perhaps some of the navigation menu.
... to recap, the viewport is basically the part of the document that is currently visible.
...And 2 more matches
color - CSS: Cascading Style Sheets
WebCSScolor
the color css property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.
... currentcolor may be used as an indirect value on other properties and is the default for other color properties, such as border-color.
... syntax /* keyword values */ color: currentcolor; /* <named-color> values */ color: red; color: orange; color: tan; color: rebeccapurple; /* <hex-color> values */ color: #090; color: #009900; color: #090a; color: #009900aa; /* <rgb()> values */ color: rgb(34, 12, 64, 0.6); color: rgba(34, 12, 64, 0.6); color: rgb(34 12 64 / 0.6); color: rgba(34 12 64 / 0.3); color: rgb(34.0 12 64 / 60%); color: rgba(34.6 12 64 / 30%); /* <hsl()> values */ color: hsl(30, 100%, 50%, 0.6); color: hsla...
...And 2 more matches
<color> - CSS: Cascading Style Sheets
compatibility note: to prevent unexpected behavior, such as in a <gradient>, the current css spec states that transparent should be calculated in the alpha-premultiplied color space.
... currentcolor keyword the currentcolor keyword represents the value of an element's color property.
... if currentcolor is used as the value of the color property, it instead takes its value from the inherited value of the color property.
...And 2 more matches
Event reference
timeupdate the time indicated by the currenttime attribute has been updated.
... start event web speech api the speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current speechrecognition.
... timeout progressevent xmlhttprequest timeupdate event html5 media the time indicated by the currenttime attribute has been updated.
...And 2 more matches
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
the following keywords have special meanings: _self: load the response into the same browsing context as the current one.
... _parent: load the response into the parent browsing context of the current one.
... _top: load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent).
...And 2 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
some mobile browsers (particularly on ios) do not currently implement this correctly.
... because of the limited browser support for datetime-local, and the variations in how the inputs work, it may currently still be best to use a framework or library to present these, or to use a custom input of your own.
...here we make use of the :valid and :invalid css properties to style the input based on whether or not the current value is valid.
...And 2 more matches
<input type="submit"> - HTML: Hypertext Markup Language
WebHTMLElementinputsubmit
this will replace the current document with the received data.
...this is typically a new tab in the same window as the current document, but may differ depending on the configuration of the user agent.
... _parent loads the response into the parent browsing context of the current one.
...And 2 more matches
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
<link> the html external resource link element (<link>) specifies relationships between the current document and an external resource.
... <nav> the html <nav> element represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents.
... <bdo> the html bidirectional text override element (<bdo>) overrides the current directionality of text, so that the text within is rendered in a different direction.
...And 2 more matches
Large-Allocation - HTTP
it is currently only implemented in firefox, but is harmless to send to every browser.
... when a post request is used to load a document, that load cannot currently be redirected into a new process.
...firefox cannot move an iframe into a new process currently, so the document must load in the current process.
...And 2 more matches
Numbers and dates - JavaScript
calling date without the new keyword returns a string representing the current date and time.
... for example, the following code displays the number of days left in the current year: var today = new date(); var endyear = new date(1995, 11, 31, 23, 59, 59, 999); // set day and month endyear.setfullyear(today.getfullyear()); // set year to this year var msperday = 24 * 60 * 60 * 1000; // number of milliseconds per day var daysleft = (endyear.gettime() - today.gettime()) / msperday; var daysleft = math.round(daysleft); //returns days left in the year this example create...
...it then creates a date object named endyear and sets the year to the current year.
...And 2 more matches
SVG Presentation Attributes - SVG: Scalable Vector Graphics
value: nonezero|evenodd|inherit; animatable: yes color it provides a potential indirect value (currentcolor) for the fill, stroke, stop-color, flood-color and lighting-color presentation attributes.
... value: <paint>; animatable: yes fill-opacity it specifies the opacity of the color or the content the current object is filled with.
... value: <funciri>|none|inherit; animatable: yes flood-color it indicates what color to use to flood the current filter primitive subregion defined through the <feflood> or <fedropshadow> element.
...And 2 more matches
href - SVG: Scalable Vector Graphics
WebSVGAttributehref
if the url points to multiple target elements, if the given target element is not capable of being a target of the given animation element, or if the given target element is not part of the current document, then the animation element will not affect any target element.
... if the href attribute or the deprecated xlink:href attribute is not provided, then the target element will be the immediate parent element of the current animation element.
... note that if the target element is not part of the current svg document fragment, then whether the target element will be removed or not is defined by the host language.
...And 2 more matches
Understanding WebAssembly text format - WebAssembly
in the current iteration, there can be at most 1 return type, but later this will be relaxed to any number.
... each parameter has a type explicitly declared; wasm currently has four available number types (plus reference types; see the reference types) section below): i32: 32-bit integer i64: 64-bit integer f32: 32-bit float f64: 64-bit float a single parameter is written (param i32) and the return type is written (result i32), hence a binary function that takes two 32-bit integers and returns a 64-bit float would be written like this: (func (param i32) (param i32) (result f64) ...
... the key is that javascript can create webassembly linear memory instances via the webassembly.memory() interface, and access an existing memory instance (currently you can only have one per module instance) using the associated instance methods.
...And 2 more matches
l10n - Archive of obsolete content
note that you can't currently use localize strings appearing in content scripts or html files, but you can share the localized strings you want by assigning it's values to a json serializable object.
... globals functions get(identifier, count, placeholder1...n) this function takes a string parameter which it uses as an identifier to look up and return a localized string in the locale currently set for firefox.
...for compatibility with tools that expect this syntax, you can assign this function to "_": var _ = require("sdk/l10n").get; given a .properties file for the current locale containing an entry like: hello_string= hello!
... parameters identifier : string a identifier for the localization of a particular string in the current locale.
panel - Archive of obsolete content
the screenshot below shows a panel whose content is built from the list of currently open tabs: panels are useful for presenting temporary interfaces to users in a way that is easier for users to ignore and dismiss than a modal dialog, since panels are hidden the moment users interact with parts of the application interface outside them.
...so you can rewrite the above code like this: var mypanel = require("sdk/panel").panel({ contenturl: "./myfile.html" }); mypanel.show(); panel positioning by default the panel appears in the center of the currently active browser window.
...: "body { border: 3px solid blue; }" }); mypanel.show(); var self = require("sdk/self"); var mypanel = require("sdk/panel").panel({ contenturl: "https://en.wikipedia.org/w/index.php?title=jetpack&useformat=mobile", contentstylefile: self.data.url("panel-style.css") }); mypanel.show(); private browsing if your add-on has not opted into private browsing, and it calls panel.show() when the currently active window is a private window, then the panel will not be shown.
... isshowing tells if the panel is currently shown or not.
remote/parent - Archive of obsolete content
// remote.js const { process } = require("sdk/remote/child"); const { processid } = require("sdk/system/runtime"); process.port.on("fetchid", () => { process.port.emit("id", processid); }); // main.js const { processes, remoterequire } = require("sdk/remote/parent"); // load "remote.js" into every current and future process remoterequire("./remote.js", module); // for every current and future process processes.forevery(process => { // ask for the process id process.port.emit("fetchid"); // first argument is always the process, then the message payload process.port.once("id", (process, id) => { console.log("child process is remote:" + process.isremote); console.log("child process ...
...id:" + id); }); }); content frame manipulation this demonstrates telling every current frame to link to a specific anchor element: // remote.js const { frames } = require("sdk/remote/child"); // listeners receive the frame the event was for as the first argument frames.port.on("changelocation", (frame, ref) => { frame.content.location += "#" + ref; }); // main.js const { frames, remoterequire } = require("sdk/remote/parent"); remoterequire("./remote.js", module); frames.port.emit("changelocation", "foo"); tab information this shows sending a message when a tab loads; this is similar to how the sdk/tabs module currently works.
...deventlistener("pageshow", function() { // `this` is bound to the frame the event came from let frame = this; frame.port.emit("pageshow"); }, true); // main.js const { frames, remoterequire } = require("sdk/remote/parent"); remoterequire("./remote.js", module); // the first argument is the frame the message came from frames.port.on("pageshow", (frame) => { console.log(frame.frameelement.currenturi.host + ": pageshow"); }); globals functions remoterequire(id, module = null) loads a module in any existing and future child processes.
... processes the processes object lets you interact with the processes currently running.
tabs/utils - Archive of obsolete content
returns tab : the currently selected tab.
... options : object optional options: name type inbackground boolean if true, open the new tab, but keep the currently selected tab selected.
... returns string : the current uri.
... returns string : the current uri.
Miscellaneous - Archive of obsolete content
lating mouse and key events https://developer.mozilla.org/samples/domref/dispatchevent.html also, new in firefox 3 / gecko 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.getselection().tostring(); or: content.getselection(); // |window| object is implied; i.e., window.content.getselection() or: getbrowserselection(); // |window| object is implied; i.e., window.getbrowserselection() this final option massages the selection to remove leading and t...
...ur", 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.setselectionrange(selectionend, selectionend); } inserttext(document.getelementbyid("example")...
..., "the text to be inserted"); disabling javascript programmatically // disable js in the currently active tab from the context of browser.xul gbrowser.docshell.allowjavascript = false; if this isn't your browser, you should save the value and restore it when finished.
... var ci = components.interfaces; var cc = components.classes; //assume you can not get the main window object directly, if you can, just use it var wm = cc["@mozilla.org/appshell/window-mediator;1"].getservice(ci.nsiwindowmediator); var mainwindow = wm.getmostrecentwindow("navigator:browser"); //get sessionhistory from the current selected tab var history = mainwindow.gbrowser.selectedbrowser.webnavigation.sessionhistory; and then get the page you want, and it's postdata.
Listening to events in Firefox extensions - Archive of obsolete content
for a tabbrowser, the above code will only get events from the browser that is currently displayed at the time the event occurs.
... in order to listen to events from all browsers, including those not currently being displayed, the following example can be used: var tabsprogresslistener = { // add tabs progress listener implementation here } gbrowser.addtabsprogresslistener(tabsprogresslistener); this lets you receive events related to all tabs.
... xulbrowserwindow xulbrowserwindow is an nsiwebprogresslistener used to get progress events for the currently visible browser.
... the internal listeners are used to send out progress events to listeners registered with addprogresslistener() (which receives events from the browser that is currently visible) and addtabsprogresslistener() (which receives events from all browsers).
Appendix: What you should know about open-source software licenses - Archive of obsolete content
the current version is gplv3.
...note that the fsf currently does not recommend applying the lgpl to libraries.
... oss licensing today and in the future finally, let’s look at the current state of affairs in oss licensing and some of the issues it faces.
...it has the following characteristics: gives creators flexibility when selecting and applying terms; terms of use stated in easy-to-understand language; licensing conditions conform with current copyright laws; also has an rdf schema for attaching metadata.
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
for firefox 3.5 choose "mozilla 1.9.1." for the current development trunk of firefox, choose "mozilla central" and for thunderbird, choose "comm.
...this is a by-product of the fact that test.xul currently doesn’t have privileges.
... the nsilocalfile object includes methods that return virtual state values for the current file, as shown in table 1.
...' [dir]' : '')); } alert(list.join('\n')); get parent directory although the nsilocalfile object does not contain a function for moving to higher directories, listing 10 does show how you can use the parent property to get the parent directory of the current file.
User Notifications and Alerts - Archive of obsolete content
there's a catch, though: these notifications are inside the current tab, so switching tabs will make a notification disappear.
...this means that these notifications make the most sense when they are related to the page currently being displayed, such as a page trying to install an add-on, or a site you just entered a password on.
...in this case we don't pass any arguments to getnotificationbox so that we get the notification box that corresponds to the tab currently on display.
...below is preferrable because it only cuts the bottom part of the current page, as opposed to pushing down all tabs and content.
Signing an XPI - Archive of obsolete content
the dot will cause the database to be created in the current directory.
...if the browser is currently running, you should exit the browser before continuing this operation.
... image obtaining a valid software developer code-signing certificate warning: currently firefox expects xpi files to be signed with certificates that conform to the older object signing convention, rather than the newer code signing convention.
... here are some current issuers: comodo instant-ssl code signing digi-sign digi-code geotrust code signing thawte code signing (owned by verisign) unizeto certum code-signing (free certificates for open-source authors) verisign code signing you will need to apply for a code signing certificate and satisfy the issuer's identity verification procedures.
Dehydra Function Reference - Archive of obsolete content
if the current callback is associated with a particular location, the location will be printed first.
...the default namespace is this the directories in sys.include_path are searched for the file, and the current working directory is searched last.
...this is accomplished by recording every included file into the _includedarray in the current namespace.
...it also returns the current values of these flags.
Drag and Drop - Archive of obsolete content
the interface nsidragservice also provides the function getcurrentsession which can be called from within the drag event handlers to get and modify the state of the drag.
... the interface nsidragsession is used to get and set properties of the drag that is currently occuring.
... the following properties and methods are available: candrop set this property to true if the element the mouse is currently over can accept the object currently being dragged to be dropped on it.
... dragaction set to the current action to be performed, which should be one or more of the constants described earlier.
Layout System Overview - Archive of obsolete content
currently layout supports the formatting of xul elements, which utilize a constraint-based layout language.
...presentation shell / presentation context together the presentation shell and the presentation context provide the root of the current presentation.
...the presentation shell currently owns a controlling reference to the presentation context.
...the undisplayed map keeps track of all content and style data for elements that currently have no frames.
jspage - Archive of obsolete content
tion:function(){if(this.event.stoppropagation){this.event.stoppropagation();}else{this.event.cancelbubble=true;}return this;},preventdefault:function(){if(this.event.preventdefault){this.event.preventdefault(); }else{this.event.returnvalue=false;}return this;}});function class(b){if(b instanceof function){b={initialize:b};}var a=function(){object.reset(this);if(a._prototyping){return this; }this._current=$empty;var c=(this.initialize)?this.initialize.apply(this,arguments):this;delete this._current;delete this.caller;return c;}.extend(this); a.implement(b);a.constructor=class;a.prototype.constructor=a;return a;}function.prototype.protect=function(){this._protected=true;return this;};object.reset=function(a,c){if(c==null){for(var e in a){object.reset(a,e); }return a;}delete a[c];switch($type(a[c]))...
...{case"object":var d=function(){};d.prototype=a[c];var b=new d;a[c]=object.reset(b);break;case"array":a[c]=$unlink(a[c]); break;}return a;};new native({name:"class",initialize:class}).extend({instantiate:function(b){b._prototyping=true;var a=new b;delete b._prototyping;return a; },wrap:function(a,b,c){if(c._origin){c=c._origin;}return function(){if(c._protected&&this._current==null){throw new error('the method "'+b+'" cannot be called.'); }var e=this.caller,f=this._current;this.caller=f;this._current=arguments.callee;var d=c.apply(this,arguments);this._current=f;this.caller=e;return d;}.extend({_owner:a,_origin:c,_name:b}); }});class.implement({implement:function(a,d){if($type(a)=="object"){for(var e in a){this.implement(e,a[e]);}return this;}var f=class.mutators[a];if(f){d=f.call(this,d); if(d==n...
...nerdocument.window;},getdocument:function(){return this.ownerdocument; },getelementbyid:function(o,n){var m=this.ownerdocument.getelementbyid(o);if(!m){return null;}for(var l=m.parentnode;l!=this;l=l.parentnode){if(!l){return null; }}return document.id(m,n);},getselected:function(){return new elements($a(this.options).filter(function(l){return l.selected;}));},getcomputedstyle:function(m){if(this.currentstyle){return this.currentstyle[m.camelcase()]; }var l=this.getdocument().defaultview.getcomputedstyle(this,null);return(l)?l.getpropertyvalue([m.hyphenate()]):null;},toquerystring:function(){var l=[]; this.getelements("input, select, textarea",true).each(function(m){if(!m.name||m.disabled||m.type=="submit"||m.type=="reset"||m.type=="file"){return;}var n=(m.tagname.tolowercase()=="select")?element...
...useleave:{base:"mouseout",condition:a},mousewheel:{base:(browser.engine.gecko)?"dommousescroll":"mousewheel"}}); })();element.properties.styles={set:function(a){this.setstyles(a);}};element.properties.opacity={set:function(a,b){if(!b){if(a==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden"; }}else{if(this.style.visibility!="visible"){this.style.visibility="visible";}}}if(!this.currentstyle||!this.currentstyle.haslayout){this.style.zoom=1;}if(browser.engine.trident){this.style.filter=(a==1)?"":"alpha(opacity="+a*100+")"; }this.style.opacity=a;this.store("opacity",a);},get:function(){return this.retrieve("opacity",1);}};element.implement({setopacity:function(a){return this.set("opacity",a,true); },getopacity:function(){return this.get("opacity");},setstyle:function(b,a){switch(b...
Modularization techniques - Archive of obsolete content
the implementation takes into consideration two things when deciding whether or not a dll can be unloaded: whether any of its factories are currently in use, and whether anyone has locked the server.
...(int argc, char *argv[]) { nsisample *sample; nsresult res = nsrepository::createinstance(ksamplecid, null, kisampleiid, (void **) &sample); if (res == ns_ok) { sample->hello(); ns_release(sample); } return 0; } registering a dll this is currently being hashed out.
... you can currently manually register a dll using the nsrepository's registerfactory() method (for an example of this, see nssample2.cpp).
... the only platform for which com support is currently widely available is windows.
Positioning - Archive of obsolete content
if a context menu was opened via the keyboard only, the menu will appear at the top left corner of the document, or underneath the currently selected item if a list is focused.
... tooltips will always appear near the current mouse position, offset vertically by a small amount.
...equivalent to topleft topleft after_pointer the popup appears vertically offset a few pixels from the mouse pointer (after_pointer is not currently implemented with respect to the mouse pointer.
... it currently offsets 21 pixels vertically from the anchor, see bug 619887).
Box Objects - Archive of obsolete content
retrieving position and size the box object provides six read only properties, x, y, screenx, screeny, width and height, for determining the currently displayed position and size of an element.
...the values are always the position and sizes as currently displayed, so the values will be different if the element is moved or resized.
...that is, you cannot get the current size with these properties; instead you must use the box object properties.
... this may be a bit confusing, but, the key is to remember that the width and height properties on an element return the size that was set in the xul while the width and height properties of the box object return the current size.
More Event Handlers - Archive of obsolete content
a similar property currenttarget holds the element that is currently having its event listeners handled.
... in the example below, currenttarget is always the vbox, whereas target would be the specific element, either the button or checkbox, that was activated.
... example 1 : source view <vbox oncommand="alert(event.currenttarget.tagname);"> <button label="ok"/> <checkbox label="show images"/> </vbox> stop event propagation once you handle an event, regardless of where in the propagation the event is, you will likely want to stop the event from being sent to further elements, essentially stopping the capturing or bubbling phases from continuing.
...here is an example which displays the current mouse coordinates: example 4 : source view <script> function updatemousecoordinates(e){ var text = "x:" + e.clientx + " y:" + e.clienty; document.getelementbyid("xy").value = text; } </script> <label id="xy"/> <hbox width="400" height="400" onmousemove="updatemousecoordinates(event);"/> in this example, the size of the box has been set explicitly so the effect is easier to see.
Popup Menus - Archive of obsolete content
at_pointer the popup appears at the mouse pointer position (at_pointer is not currently implemented with respect to the mouse pointer.
... it currently appears at the top of the anchor).
...this is how tooltips appear (after_pointer is not currently implemented with respect to the mouse pointer.
... it currently offsets 21 pixels vertically from the anchor, see bug 619887).
Tree Selection - Archive of obsolete content
<tree id="treeset" onselect="alert('you selected something!');"> tree indices the tree has a property currentindex, which can be used to get the currently selected item, where the first row is 0.
...the simplest function is the select() function, which deselects any rows that are currently selected and selects one specific row.
... for example, the following code will select the row at index 5: tree.view.selection.select(5); note that you should not just change the tree's currentindex property to change the selection.
...tree.view.selection.rangedselect(2,7,true); the last argument indicates whether to add to the current selection or not.
Using the Editor from XUL - Archive of obsolete content
we are currently only able to have one editor per composer window; in future, relaxing this restriction would allow us to edit all the subdocuments in a frameset at the same time.
...this is called by ime at the start, end, and to query the current composition.
...these functions call beforeedit() and afteredit() on the current typing rules.
... now, we initialize a nstextrulesinfo with the information about the string being inserted, and call willdoaction() on the current editing rules.
listitem - Archive of obsolete content
attributes accesskey, checked, command, crop, current, disabled, image, label, preference, selected, tabindex, type, value properties accesskey, accessible, checked, control, crop, current, disabled, image, label, selected, tabindex, value style classes listitem-iconic examples <listbox id="thelist"> <listitem label="ruby"/> <listitem label="emerald"/> <listitem label="sapphire" selected="true"/> <listitem label="diamond"/> </...
...for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } current type: boolean this attribute will be set to true if the listitem is the current item.
...to change the currently selected item in a listbox, use the listbox property selecteditem.
... current type: boolean gets and sets the value of the current attribute.
tab - Archive of obsolete content
ArchiveMozillaXULtab
afterselected type: boolean this is set to true if the tab is immediately after the currently selected tab.
... beforeselected type: boolean this is set to true if the tab is immediately before the currently selected tab.
... pending type: boolean this attribute is set to true if the tab is currently in the process of being restored by the session store service.
... unread type: boolean this attribute is set to true if the tab is unread; that is, either it has not yet been selected during the current session, or has changed since the last time it was selected.
tabbox - Archive of obsolete content
selectedindex type: integer returns the index of the currently selected item.
...returns -1 if no items are selected selectedpanel type: element holds a reference to the currently selected panel within a <tabbox> element.
... selectedtab type: tab element a reference to the currently selected tab, which will always be one of the tab elements in the tabs element.
... assign a value to this property to modify the currently selected tab.
calICalendarView - Archive of obsolete content
this explains the need for the fairly large list off attributes and methods that must be implemented, so that outside code can be able to gain a decent picture of the current state of those nodes.
... selecteditem returns a caliitembase corresponding to the currently active item in the view.
... selectedday the currently selected day in the display.
... getdatelist void getdatelist(out unsigned long acount, [array,size_is(acount),retval] out calidatetime adates); this function returns a list of all dates currently being shown in the view.
nsIContentPolicy - Archive of obsolete content
note: this rejection only applies to the current request on this server, not to future requests of the same type.
... note: this rejection only applies to the current request on this server, not to future requests of the same type.
... note: this rejection only applies to the current request on this server, not to future requests of the same type.
... query any dom properties that depend on the current state of the dom outside the "context" node (e.g., lengths of node lists).
Archived Mozilla and build documentation - Archive of obsolete content
this tutorial walks you through the process of building a mozilla extension that adds an icon to mozilla's status bar showing the current status of the mozilla source code (i.e.
...see also current events.
...they are currently written with mostly firefox in mind, but most if not all should easily translate to seamonkey, thunderbird or any of the other applications.
...this is currently just a preview, but we would appreciate help with testing.
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.builds - october 14th to october 20th 2006 linux reference platform 1.8.1 october 18th: marcus is wondering about the linux platform that is currently used to compile both public releases of firefox and xulrunner.
... adding extension to extensions/ folder originally posted on oct 19th: christopher finke is currently learning how to compile firefox.
...he can be contacted via: email: preed@mozilla.com irc: preed on irc.mozilla.org phone: 650.903.0800 x256 uploading language packs to amo on october 17th benjamin smedberg brought the following to the attention of the localizers and the build team: that he is planning to upload the firefox 2 language packages currently located at http://releases.mozilla.org/pub/mozi...rc3/win32/xpi/ to addons.mozilla.org in the next few days.
...comet and btek are currently the fastest-cycling tinderboxes available therefore they are quite fast to detect general fires on the mozilla tree.
NPN_GetValue - Archive of obsolete content
syntax #include <npapi.h> nperror npn_getvalue(npp instance, npnvariable variable, void *value); parameters this function has the following parameters: instance pointer to the current plug-in instance.
...values for npnvariable: npnvxdisplay =1: unix only: returns the current display npnvxtappcontext: unix only: returns the application's xtappcontext npnvnetscapewindow: ms windows and unix/x11 only: ms windows: gets the native window on which plug-in drawing occurs; returns hwnd unix/x11: gets the browser toplevel window in which the plug-in is displayed; returns window npnvjavascriptenabledbool: tells whether javascript is enabled; true=javascript enabled, false=not enabled npnvasdenabledbool: tells whether smartupdate (former name: asd) is enabled; true=smartupdate enabled, false=not enabled npnvisofflinebool: tells whether offline mode is enabled; true=offline mode enabled, false=not enabled npnvtoolk...
... npnvprivatemodebool: indicates whether or not the browser is currently in private browsing mode.
...unix the platform-specific values for this parameter are npnvxdisplay (the current display), npnvxtappcontext (the browser's xtappcontext), and npnvnetscapewindow (the browser toplevel window in which the plugin is displayed).
NPP_HandleEvent - Archive of obsolete content
for windowed plug-ins: currently used only on mac os.
... syntax #include <npapi.h> int16 npp_handleevent(npp instance, void* event); parameters the function has the following parameters: instance pointer to the current plug-in instance.
...when npp_handleevent is called, the current port is set up so that its origin matches the top-left corner of the plug-in.
... a plug-in does not need to set up the current port for mouse coordinate translation.
Introduction to SSL - Archive of obsolete content
if the current date and time are outside of that range, the authentication process won't go any further.
... if the current date and time are within the certificate's validity period, the client goes on to step.
...if the current date and time are outside of that range, the authentication process won't go any further.
... if the current date and time are within the certificate's validity period, the server goes on to step 3.
Scratchpad - Archive of obsolete content
code completion scratchpad integrates the tern code analysis engine, and uses that to provide autocomplete suggestions and popups containing information on the current symbol.
...you'll see the autocomplete box, as shown below: the icon next to each suggestion indicates the type, and the currently highlighted suggestion gets a popup with more information.
...the code is executed in the scope of the currently selected tab.
... command windows macos linux open the scratchpad shift + f4 shift + f4 shift + f4 run scratchpad code ctrl + r cmd + r ctrl + r run scratchpad code, display the result in the object inspector ctrl + i cmd + i ctrl + i run scratchpad code, insert the result as a comment ctrl + l cmd + l ctrl + l re-evaluate current function ctrl + e cmd + e ctrl + e reload the current page, then run scratchpad code ctrl + shift + r cmd + shift + r ctrl + shift + r save the pad ctrl + s cmd + s ctrl + s open an existing pad ctrl + o cmd + o ctrl + o create a new pad ctrl + n cmd + n ctrl + n close scratchpad ctrl + w cmd + w ct...
ECMAScript 2016 to ES.Next support in Mozilla - Archive of obsolete content
this page needs to be updated to reflect current changes.
...this year, the es2019 specification will be released and es2020 is the current ecmascript draft specification.
...roups (not yet implemented; in other browsers) ecmascript 2019 array.flat() (firefox 62) array.flatmap() (firefox 62) object.fromentries() (firefox 63) string.trimstart() and string.trimend() (firefox 61) optional catch binding (firefox 58) function.tostring() revision (firefox 54) symbol.description (firefox 63) well-formed json.stringify() (firefox 64) ecmascript 2020 this is the current es.next version.
... implemented proposals not in es.next this section needs to be updated to reflect current changes.
Enumerator - Archive of obsolete content
instead of using indexes, as you would with arrays, you can move the current item pointer only to the first or next element of a collection.
... enumerator.item returns the current item in the collection.
... enumerator.movefirst resets the current item in the collection to the first item.
... enumerator.movenext moves the current item to the next item in the collection.
RDF in Mozilla FAQ - Archive of obsolete content
the "simple" form, which is currently the most common form in the mozilla codebase, and the "extended" form, which allows for sophisticated pattern matching against the rdf graph.
... xul that is loaded from a "trusted" url (currently, any chrome: url) can specify any datasource uri in the datasources attribute of the xul template.
...note that a polling reload generates a set of differences between the current and previous contents of the rdf/xml file.
... currently, mozilla does not allow unprivileged access to the rdf interfaces and services; see bug 122846 for details.
XQuery - Archive of obsolete content
while xquery is currently not supported in firefox (whether through javascript to developers or to browser users), at least one extension has been developed to give a preliminary support for xquery for browser users (and serving as a simple model for how xquery can be implemented within extensions).
... xquseme is a working proof-of-concept (so far tested on windows and linux with java installed; mac does not work) extension which allows one to perform xqueries on external urls, the currently loaded webpage (even if originally from poorly formed html), and/or xml (including well-formed xhtml) documents stored locally.
... the extension now includes and interfaces with the open-source version of saxonica's saxon b (though this extension currently only performs the xqueries).
... notes for developers wishing to access xquery in their own extensions at present, the extension works simply by using liveconnect to work with berkeley db xml's java api (and via a java wrapper class which circumvents liveconnect's current inability to handle some types of java exceptions properly).
The HTML5 input types - Learn web development
one problem with sliders is that they don't offer any kind of visual feedback as to what the current value is.
... this is why we've included an <output> element — to contain the current value (we'll also look at this element in the next article).
... to actually display the current value, and update it as it changed, you must use javascript, but this is relatively easy to do: const price = document.queryselector('#price'); const output = document.queryselector('.price-output'); output.textcontent = price.value; price.addeventlistener('input', function() { output.textcontent = price.value; }); here we store references to the range input and the output in two variables.
... then we immediately set the output's textcontent to the current value of the input.
How to build custom form controls - Learn web development
--> <div class="select" tabindex="0"> <!-- this container will be used to display the current value of the control --> <span class="value">cherry</span> <!-- this container will contain all the options available for our control.
...in this current state, the screen reader user only "sees" an unordered list.
... var optionlist = select.queryselectorall('.option'); // we set the selected index to the index of our choice nativewidget.selectedindex = index; // we update the value placeholder accordingly value.innerhtml = optionlist[index].innerhtml; // and we highlight the corresponding option of our custom control highlightoption(select, optionlist[index]); }; // this function returns the current selected index in the native control // it takes one parameter: // select : the dom node with the class `select` related to the native control function getindex(select) { // we need to access the native control for the given custom control // in our example, that native control is a sibling of the custom control var nativewidget = select.previouselementsibling; return nativewidget.select...
... the aria-selected attribute is used to mark which option is currently selected; this lets assistive technologies inform the user what the current selection is.
Test your skills: Links - Learn web development
links 1 in this task we want you to help fill in the links on our whales information page: the first link should be linked to a page called whales.html, which is in the same directory as the current page.
... links 2 in this task we want you to fill in the four links so that they link to the appropriate places: the first link should link to an image called blue-whale.jpg, which is located in a directory called blue inside the current directory.
... the second link should link to an image called narwhal.jpg, which is located in a directory called narwhal, which is located one directory level above the current directory.
... the fourth link should link to the paragraph at the very bottom of the current page.
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
it just runs it as quickly and smoothly as possible in the current conditions.
...the general pattern you'd use looks something like this: let starttime = null; function draw(timestamp) { if (!starttime) { starttime = timestamp; } currenttime = timestamp - starttime; // do something based on current time requestanimationframe(draw); } draw(); browser support requestanimationframe() is supported in more recent browsers than setinterval()/settimeout().
...they will define the start time if it is not defined already (this will only happen on the first loop iteration), and set the rotatecount to a value to rotate the spinner by (the current timestamp, take the starting timestamp, divided by three so it doesn't go too fast): if (!starttime) { starttime = timestamp; } rotatecount = (timestamp - starttime) / 3; below the previous line inside draw(), add the following block — this checks to see if the value of rotatecount is above 359 (e.g.
...the start() function calls draw() to start the spinner spinning and display it in the ui, hides the start button so you can't mess up the game by starting it multiple times concurrently, and runs a settimeout() call that runs a setendgame() function after a random interval between 5 and 10 seconds has passed.
Introduction to events - Learn web development
in the case of the web, events are fired inside the browser window, and tend to be attached to a specific item that resides in it — this might be a single element, set of elements, the html document loaded in the current tab, or the entire browser window.
... videobox.onclick = function() { videobox.setattribute('class', 'hidden'); }; video.onclick = function() { video.play(); }; but there's a problem — currently, when you select the video it starts to play, but it causes the <div> to be hidden at the same time.
...so in our current example, when you select the video, the event bubbles from the <video> element outwards to the <html> element.
... we can, therefore, fix our current problem by changing the second handler function in the previous code block to this: video.onclick = function(e) { e.stoppropagation(); video.play(); }; you can try making a local copy of the show-video-box.html source code and fixing it yourself, or looking at the fixed result in show-video-box-fixed.html (also see the source code here).
Third-party APIs - Learn web development
0; i < articles.length; i++) { const article = document.createelement('article'); const heading = document.createelement('h2'); const link = document.createelement('a'); const img = document.createelement('img'); const para1 = document.createelement('p'); const para2 = document.createelement('p'); const clearfix = document.createelement('div'); let current = articles[i]; console.log(current); link.href = current.web_url; link.textcontent = current.headline.main; para1.textcontent = current.snippet; para2.textcontent = 'keywords: '; for(let j = 0; j < current.keywords.length; j++) { const span = document.createelement('span'); span.textcontent += current.keywords[j].value + ' '; para2.appe...
...ndchild(span); } if(current.multimedia.length > 0) { img.src = 'http://www.nytimes.com/' + current.multimedia[0].url; img.alt = current.headline.main; } clearfix.setattribute('class','clearfix'); article.appendchild(heading); heading.appendchild(link); article.appendchild(img); article.appendchild(para1); article.appendchild(para2); article.appendchild(clearfix); section.appendchild(article); } } } there's a lot of code here; let's explain it step by step: the while loop is a common pattern used to delete all of the contents of a dom element, in this case, the <section> element.
...most of these operations are fairly obvious, but a few are worth calling out: we used a for loop (for(var j = 0; j < current.keywords.length; j++) { ...
... we used an if() block (if(current.multimedia.length > 0) { ...
Introduction to client-side frameworks - Learn web development
mdn web docs, which you are currently reading this on, uses the react/reactdom framework to power its front end.
... there are many frameworks out there, but currently the "big four" are considered to be the following.
... the table in this section provides a glanceable summary of the current browser support offered by each framework, as well as the domain-specific languages with which it can be used.
...currently, there are several years of data available, allowing you to get a sense of a framework's popularity.
TypeScript support in Svelte - Learn web development
code along with us git clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/07-typescript-support or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/07-typescript-support remember to run npm install && npm run dev to start your app in development mode.
...currently you will be running a regular javascript application with typescript support enabled, without taking advantage of any of the features that typescript provides.
...(the trailing dot tells vs code to open the current folder) to open the code editor.
... next, import the filter enum — add the following import statement below your existing ones: import { filter } from '../types/filter.enum' now we will use it whenever we reference the current filter.
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
code along with us git clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/05-advanced-concepts or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/05-advanced-concepts remember to run npm install && npm run dev to start your app in development mode.
... in its current state our app has a couple of keyboard accessibility problems involving focus management.
...this outline is your visual indicator that the browser is currently focused on this element.
... repl to see the current state of the code in a repl, visit: https://svelte.dev/repl/d1fa84a5a4494366b179c87395940039?version=3.23.2 summary in this article we have finished adding all the required functionality to our app, plus we've taken care of a number of accessibility and usability issues.
Working with Svelte stores - Learn web development
code along with us git clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/06-stores or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/06-stores remember to run npm install && npm run dev to start your app in development mode.
... fixed; cursor: pointer; margin-right: 1.5rem; margin-left: 1.5rem; margin-top: 1rem; right: 0; display: flex; align-items: center; border-radius: 0.2rem; background-color: #565656; color: #fff; font-size: 0.875rem; font-weight: 700; padding: 0.5rem 1.4rem; font-size: 1.5rem; z-index: 100; opacity: 95%; } div p { color: #fff; } div svg { height: 1.6rem; fill: currentcolor; width: 1.4rem; margin-right: 0.5rem; } </style> let's walk through this piece of code in detail.
...ch: export const writable = (initial_value = 0) => { let value = initial_value // content of the store let subs = [] // subscriber's handlers const subscribe = (handler) => { subs = [...subs, handler] // add handler to the array of subscribers handler(value) // call handler with current value return () => subs = subs.filter(sub => sub !== handler) // return unsubscribe function } const set = (new_value) => { if (value === new_value) return // same value, exit value = new_value // update value subs.foreach(sub => sub(value)) // update subscribers } const update = (update_fn) => set(update_fn(value)) // update fun...
... repl to see the current state of the code in a repl, visit: https://svelte.dev/repl/378dd79e0dfe4486a8f10823f3813190?version=3.23.2 summary in this article we added two new features: an alert component and persisting todos to web storage.
Getting started with Vue - Learn web development
currently, it's the vue logo.
...currently, this file initializes your vue application and signifies which html element in the index.html file your app should be attached to.
...currently it just has one example component.
...we also need to remove the lines from inside the <script> element that import and register the component: delete these lines now: import helloworld from './components/helloworld.vue' components: { helloworld } your rendered app should no longer show an error, just a blank page, as we currently have no visible content inside <template>.
Theme concepts
if you are uploading a packaged file, the version number must be higher than the current version number dynamic themes as an alternative to defining a static theme, you can use the theme api to control the theme used in firefox from within a browser extension.
... }, colors: { frame: '#cf723f', tab_background_text: '#111', } }, 'night': { images: { theme_frame: 'moon.jpg', }, colors: { frame: '#000', tab_background_text: '#fff', } } }; the theme.theme object is then passed to theme.update() to change the header theme, as in this code snippet from the same example: function settheme(theme) { if (currenttheme === theme) { // no point in changing the theme if it has already been set.
... return; } currenttheme = theme; browser.theme.update(themes[theme]); } learn more about dynamic themes and see an additional example in the following video: if you have not built a browser extension before, check out your first extension for a step-by-step guide.
... cross-browser compatibility there is currently limited compatibility between themes in the major browsers.
Android-specific test suites
contact information android-test is currently owned by :sebastian and :nalexander.
... contact information android-checkstyle is currently owned by :mcomella and :nalexander.
... contact information android-checkstyle is currently owned by :mcomella and :nalexander.
... contact information android-lint is currently owned by :sebastian and :nalexander.
Listening to events on all tabs
acurselfprogress the current progress for the request indicated by the request parameter.
... acurtotalprogress the current progress for all requests associated with webprogress.
...instead, it is a numeric value that indicates the current status of the request.
... asameuri true if awebprogress is requesting a refresh of the current uri.
Frame script loading and lifetime
this line of code loads a frame script into the currently selected tab.
...for example: var mm = window.messagemanager; mm.loadframescript("chrome://my-e10s-extension/content/frame-script.js", true); the script will be loaded into all tabs currently open in this window, and all new tabs opened afterwards.
...if you want to limit a script to the lifetime of a page you can create a sandbox instead, where the current content page is used as prototype.
...there is currently no way to unload them when loaded, other than closing the tab they were loaded into.
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.
... commands an object that defines what commands can currently be executed in the browser <iframe>.
... zoomfactor a number defining the current zoom factor in the browser <iframe>.
... collapsed a boolean indicating whether the current selection is collapsed (true) or not (false.) caretvisible a boolean indicating whether the caret is currently visible (true) or not (false.) selectionvisible a boolean indicating whether the current selection is visible (true) or not (false.) selectioneditable a boolean indicating whether the current selection is editable (true) or not (false.) selectedtextcontext a domstring containing the currently-selected text content.
Gecko Keypress Event
that is, when the currently selected keyboard layout produces a unicode character (according to the current state of capslock and numlock), the charcode property contains that character.
... the charcode value depends on the state of capslock and numlock (except they are currently ignored if alt (option) is down on mac - see bug 432953).
... if the current keyboard layout is dvorak-qwerty layout or a non-latin layout, the command key switches the keyboard layout to the us qwerty keyboard layout temporary.
...(chrome accesskey, including menu accesskey, handling is currently similar, but this should not be relied on.
Getting Started with Chat
simply type them into the message box at the bottom of the screen and press enter: /join #channel joins you to the specified channel until you quit your irc client or quit the channel /leave leave the current channel /mode #channel +k password sets a password for the channel.
... if #channel is not specified, the command is executed for the current channel.
...if a #channel is not specified, the command is executed for the current channel.
... /msg nick message sends a private message to the specified user /nick nickname change your current nickname nickname: ping get a user's attention (nickname is the name of the user you want the attention of) nickname: pong respond to a user's ping (nickname is the name of the user who wants your attention) /query nickname opens a private chat with the specified user /quit message disconnects you from the current server displaying the message in all connected channels prior to quitting /reload styles some irc clients, colloquy on mac in particular, stop displaying your messag...
Download
currentbytes read only number number of bytes currently transferred.
... note: if you need to start a new download from the same source, rather than restarting a failed or canceled one, you should create a separate download object with the same source as the current one.
...this may be called at any time, even if the download failed or is currently in progress.
... you can use this property for scheduling download completion actions in the current session, for downloads that are controlled interactively.
PopupNotifications.jsm
method overview void locationchange(); notification getnotification(id, browser); void remove(notification); notification show(browser, id, message, anchorid, mainaction, secondaryactions, options); properties attribute type description ispanelopen boolean returns true if the notification panel is currently visible, false if it is not.
... methods locationchange() the consumer can call this method to let the popup notification module know that the current browser's location has changed.
...if null, the currently selected <xul:browser>'s notifications will be searched.
...this must not be null; you can, however, simply specify gbrowser.selectedbrowser to associate it with the current tab.
Application Translation with Mercurial
in the section "applications & sign-offs", you will find different products and branches which are currently in translation.
... getting the current texts in english and your locale obtaining the english texts with the source code get the source code by downloading the following file: firefox desktop or firefox for android: download the mozilla-<branch>.hg file (e.g.
...other localizers will likely have done changes to the translation, either adding new texts, removing obsolete ones or improving the current texts.
... submitting the patch for review now the patch has to be shared so the people currently trusted to change the official translation can review the suggested changes.
Localizing extension descriptions
the current app locale will be searched for and then there will be a fallback search for en-us.
... if a preference isn't set and there isn't a matching em:localized property for the current locale or en-us, then the properties specified directly on the install manifest are used as a last resort, as they were always used before gecko 1.9.
... if you do not currently have them, create localized properties files.
... add the following line to each of your localization properties files (where extension_id matches your extension id (<em:id> from install.rdf) and localized_description is the description of your extension that you want to appear in the given language): extensions.extension_id.description=localized_description if you do not currently have one, create a default preferences file.
Scroll-linked effects
<body style="height: 5000px"> <style> body, /* blink currently has bug that requires declaration on `body` */ html { scroll-snap-type: y proximity; } .snaptarget { scroll-snap-align: start; position: relative; top: 200px; height: 200px; background-color: green; } </style> <div class="snaptarget"></div> </body> this version can work smoothly in the browser even if there is slow-running javascript on the...
...however, in some cases the current apis offered by the browser do not allow this.
...currently there are a few proposals for apis that would allow such effects, and they all have their advantages and disadvantages.
... the proposals currently under consideration are: web animations: a new api for precisely controlling web animations in javascript, with an additional proposal to map scroll position to time and use that as a timeline for the animation.
NSS API Guidelines
currently, ocsp checking settings are exported through certhi.
...for example: pk11rsagenparamsstr.keysizeinbits for members of enums, our current api has no standard (typedefs for enums should follow the data types standard).
...option 1, currently the most common used for enums, actually creates namespace pollution.
...the current standard in the security library is to typedef the data structure name, the easiest way to accomplish this would be to add the typedef to the public header file.
NSS Sample Code Sample1
as an alternative, new keys may be sent to the // current set of secondary hosts when they are generated by the // primary.
...(currently nss doesn't store persistant keys.
...(this key will also be used for // storage of the keys, since nss does not support permanent symmetric // keys at the current time.) // 3.
...// note: currently nss does not support permanent symmetric keys.
PKCS #11 Module Specs
nss currently implements this proposal internally.
...this data is currently stored in secmod.db or pkcs11.txt.
... ciphers - comma separated list of ciphers this token will enable that isn't already enabled by the library (currently only fortezza is defined) (case-insensitive).
... timeout - time in minutes before the current authentication should be rechecked.
Python binding for NSS
all nss/nspr python objects can print their current value by evaluting the python object in a string context or by using the python str() function.
...python-nss is currently available in: fedora rhel 6 the principal developer of python-nss is john dennis jdennis@redhat.com.
... documentation python-nss api documentation the python-nss api documentation for the current release can be viewed at python-nss api documentation.
... how to report a bug python-nss bugs are currently being tracked in the red hat bugzilla system for fedora.
NSS Tools
the tools information table below describes both the tools that are currently working and those that are still under development.
... currently, you must download the nss 3.1 source and build it to create binary files for the nss tools.
... source, documentation currently points to the netscape certificate management system administration guide on docs.sun.com.
... currently points to the signver documentation on developer.netscape.com.
JSAPI Cookbook
// or: v = js::int32value(0); v.setdouble(0.5); // or: v = js::doublevalue(0.5); v.setstring(somestring); // or: v = js::stringvalue(somestring); v.setnull(); // or: v = js::nullvalue(); v.setundefined(); // or: v = js::undefinedvalue(); v.setboolean(false); // or: v = js::booleanvalue(false); finding the global object many of these recipes require finding the current global object first.
... // javascript throw exc; /* jsapi */ js_setpendingexception(cx, exc); return false; when js_reporterror creates a new error object, it sets the filename and linenumber properties to the line of javascript code currently at the top of the stack.
...*/ finally_block: /* * temporarily set aside any exception currently pending.
... create global variable __dirname to retrieve the current javascript file name, like in nodejs ...
JS_GetGlobalForScopeChain
renamed to js::currentglobalornull.
... description js_getglobalforscopechain() returns the global object for whatever function is currently running on the context.
... in other words, it returns the global object on the current scope chain.
...see also js_getglobalforobject js::currentglobalornull bug 899245 ...
Gecko Roles
users can navigate between panes and within the contents of the current pane, but cannot navigate between items in different panes.
... role_statusbar represents a status bar, which is an area at the bottom of a window that displays information about the current operation, state of the application, or selected object.
... role_indicator represents an indicator, such as a pointer graphic, that points to the current item.
...a specialized push button that can be checked or unchecked, but does not provide a separate indicator for the current state.
Places Developer Guide
note that this service is only currently available for firefox, not other toolkit-based applications.
... importing: importhtmlfromfile (nsilocalfile afile, boolean aisinitialimport) - this imports all the bookmarks in the specified file into the current bookmarks collection.
..., null); // tag the uri tagssvc.taguri(myuri, ["mozilla", "firefox"]); // get an array of tags for a uri var mytags = tagssvc.gettagsforuri(myuri, {}); // get an array of uris for a tag var taggeduris = tagssvc.geturisfortag("mozilla"); // get an array of all tags var arrayofalltags = tagssvc.alltags; // remove tags from a uri tagssvc.untaguri(myuri, ["mozilla", "firefox"]); this service currently integrates with and is internally dependent upon bookmarks: if you tag a uri that is not previously bookmarked, a new bookmark is created in the unfiled bookmarks folder.
...the contents of these folders are updated when expanded, executing the search against the current history and bookmarks collections.
Avoiding leaks in JavaScript XPCOM components
in firefox 3, a cycle collector was introduced and refined in later versions, and mozilla is currently working on a generational garbage collector for js.
...the roots include things like global variables and variables on the current call stack.
...we currently implement this by making the wrapper a root in the javascript garbage collector once somebody sets a javascript property on a dom node.
...ter.filter_accept; case "template": case "radiogroup": return nodefilter.filter_reject; default: return nodefilter.filter_skip; } } var iterator = this.ownerdocument.createtreewalker(this, nodefilter.show_element, _filterradiogroup, true); while (iterator.nextnode()) radiochildren.push(iterator.currentnode); return this.mradiochildren = radiochildren; in this example, the iterator object is an xpcom object that is wrapped so the javascript code can use it.
Building the WebLock UI
like the secure page icon, the weblock icon that appears in the lower right corner of the browser should indicate whether the browser is currently locked or unlocked.
...this is a bit more complicated, because it requires that you work with the currently loaded page or provide other ui (e.g., a textfield where you can enter an arbitrary url) for specifying urls.
... weblock.css the following style rules are defined in weblock.css, a css file that is loaded by the overlay and applied to the icon in the browser that reflects the current status of the web lock and provides access to the web lock manager dialog.
...note, however, that currently weblock probably does not install cleanly in mozilla firefox due to firefox's newness compared to this book (which was originally written in 2003).
Mozilla internal string guide
use this instead of testing string.length == 0 .equals(string) - true if the given string has the same value as the current string.
... bulkwrite() takes four arguments: the new capacity (which may be rounded up), the number of code units at the beginning of the string to preserve (typically the old logical length), a boolean indicating whether reallocating a smaller buffer is ok if the requested capacity would fit in a buffer that's smaller than current one, and a reference to an nsresult for indicating failure on oom.
... when working with existing code, it is important to examine the current usage of the strings that you are manipulating, to determine the correct conversion mechanism.
... note: calling setcapacity() does not give you permission to use the pointer obtained from beginwriting() to write past the current length (as returned by length()) of the string.
Observer Notifications
(note: these notifications are not currently available on linux.
... places-database-locked the places database is currently locked by a third-party process and cannot be opened.
... lightweight-theme-changed - sent after the current theme is changed.
... lightweight-theme-styling-update json sent when the current theme being used is changed; this is sent even when the user is previewing a theme, not just when the theme is actually selected.
inIDOMUtils
value state 1 :active 2 :focus 4 :hover 8 :-moz-drag-over 16 :target 1<<29 :-moz-focusring methods getbindingurls() returns an array of nsiuri objects representing the current xml binding for the specified element.
... return value an array of nsiuri objects representing the current xbl binding (if any) for the element and its hierarchy of base bindings.
... return value an nsisupportsarray containing all the style rules that currently apply to the element, in ascending order of weight.
... return value void setcontentstate() sets the given element as the current owner of the specified state, and removes that state from the previous owner.
mozIPersonalDictionary
note that this method is not currently implemented.
...note that this parameter is currently unused.
...note that this parameter is currently ignored.
...note that this parameter is currently ignored.
mozIStorageConnection
databasefile nsifile the current database nsifile.
... committransaction() this method commits the current transaction.
... executeasync() asynchronously executes an array of queries created with this connection, using any currently bound parameters.
... rollbacktransaction() this method rolls back the current transaction.
nsIAccessibleRole
users can navigate between panes and within the contents of the current pane, but cannot navigate between items in different panes.
... role_statusbar 23 represents a status bar, which is an area at the bottom of a window that displays information about the current operation, state of the application, or selected object.
... role_indicator 39 represents an indicator, such as a pointer graphic, that points to the current item.
...a specialized push button that can be checked or unchecked, but does not provide a separate indicator for the current state.
nsIAccessibleStates
currently unused.
...currently unused.
... state_required state_alert_low state_important state_alert_medium currently unused.
... ext_state_active 0x00000010 this window is currently the active window.
nsIAccessibleTable
if both row and column index are valid then the corresponding accessible object is returned that represents the requested cell regardless of whether the cell is currently visible (on the screen).
... getselectedcellindices() renamed from getselectedcells in gecko 1.9.2 return an array of cell indices currently selected.
... return an array of column indices currently selected.
... return an array of row indices currently selected.
nsIDOMGeoPositionCoords
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports attributes attribute type description latitude double the user's current latitude, in degrees.
... longitude double the user's current longitude, in degrees.
... altitude double the user's current altitude, in meters.
... heading double the current heading at which the user is moving, in degrees.
nsIDownloadManager
id removelistener(in nsidownloadprogresslistener alistener); void resumedownload(in unsigned long aid); void retrydownload(in unsigned long aid); void savestate(); obsolete since gecko 1.8 void startbatchupdate(); obsolete since gecko 1.9.1 attributes attribute type description activedownloadcount long the number of files currently being downloaded.
... download_paused 4 the download is currently paused.
... canceldownload() cancels the download with the specified id if it's currently in-progress.
... removedownload() removes the download with the specified id if it is not currently in progress.
nsIEditor
documentcharacterset acstring sets the current 'save' document character set.
...true if the current selection anchor is editable; otherwise false.
... this helps to support cases where only parts of the document are editable, by letting you see if the current selection is in an editable section.
...the selection controller for the current presentation.
nsIFilePicker
file nsilocalfile the currently selected file or directory.
... files nsisimpleenumerator an enumerator of the currently selected files.
... fileurl nsiuri the uri of the currently selected file or directory.
... filterindex long the (0-based) index of the filter which is currently selected in the file picker dialog.
nsIIdleService
currently nsiidleservice implementations exist for windows, mac os x, and linux (via xscreensaver).
...the data parameter for the notification contains the current user idle time in gecko 15 and earlier or 0 in gecko 16 and later.
...current implementations use a delay of 5 seconds.
...the data parameter for the notification contains the current user idle time.
nsIParentalControlsService
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) note: currently, this interface is only supported on microsoft windows vista and newer as well as android 4.3 and newer.
...aflag, in nsiuri asource, [optional] in nsifile atarget); boolean requesturioverride(in nsiuri atarget, [optional] in nsiinterfacerequestor awindowcontext); boolean requesturioverrides(in nsiarray atargets, [optional] in nsiinterfacerequestor awindowcontext); attributes attribute type description blockfiledownloadsenabled boolean true if the current user account's parental controls restrictions include the blocking of all file downloads.
... loggingenabled boolean true if the current user account has parental controls logging enabled.
... parentalcontrolsenabled boolean true if the current user account has parental controls restrictions enabled.
nsISHistory
to create an instance, use: var shistory = components.classes["@mozilla.org/browser/shistory;1"] .createinstance(components.interfaces.nsishistory); method overview void addshistorylistener(in nsishistorylistener alistener); nsishentry getentryatindex(in long index, in boolean modifyindex); void purgehistory(in long numentries); void reloadcurrententry(); void removeshistorylistener(in nsishistorylistener alistener); attributes attribute type description count long the number of toplevel documents currently available in session history.
... index long the index of the current document in session history.
... modifyindex a boolean flag that indicates if the current index of session history should be modified to the parameter index.
... reloadcurrententry() void reloadcurrententry(); parameters none.
nsISeekableStream
ns_seek_cur 1 specifies that the offset is relative to the current position in the stream.
... seteof() this method truncates the stream at the current offset.
... tell() this method reports the current offset, in bytes, from the start of the stream.
...return value the current offset, in bytes, from the start of the stream.
nsIWebNavigation
currenturi nsiuri the currently loaded uri or null.
... document nsidomdocument retrieves the current dom document for the frame, or lazily creates a blank document if there is none.
... referringuri nsiuri the referring uri for the currently loaded uri or null.
... reload() tells the object to reload the current page.
Using nsIDirectoryService
ctory(prop, getter_addrefs(dir)); if (!dir) return ns_error_failure; javascript: var file = components.classes["@mozilla.org/file/directory_service;1"] .getservice(components.interfaces.nsiproperties) .get("profd", components.interfaces.nsifile); (the example is taken from the code snippets section of this site.) adding a location: there are currently two ways to add a file location to the directory service: directly and delayed.
...known locations the nsiproperties strings for currently defined locations can be found in: nsdirectoryservicedefs.h nsappdirectoryservicedefs.h nsxulappapi.h content formerly at http://www.mozilla.org/projects/xpco...locations.html background the way in which mozilla components locate special files and directories has changed.
...for example, in seamonkey, the profile service is a provider for locations that are relative to the current profile.
...the second group listed is for locations which are relative to the current user profile.
Debugging service workers - Firefox Developer Tools
the server worker’s status, which can be one of the following: stopped: the service worker is installed, but not currently running.
... debug important: the debug button is currently enabled only in firefox nightly.
... note: there is currently a bug whereby the network monitor cannot show network requests from a service worker running in a different process to the application (bug 1432311).
... finding registered service workers on other domains as mentioned above, the service worker view of the application panel shows all the service workers registered on the current domain.
Search - Firefox Developer Tools
you can use the up and down arrows to move through the list, and return to open the file you want: searching within a file to search for a particular substring in the file currently loaded into the source pane, press control + f (or command + f on a mac) while the source pane is focused.
...the debugger will display the number of matches in the code and highlight each result: using the outline tab if you are searching for a specific function within the current javascript file, you can use the outline tab in the debugger to find it quickly.
... the outline tab lists the functions in the current file.
... searching in all files you can also search for a string in all of the files included in the currently opened project.
Debugger.Frame - Firefox Developer Tools
offset the offset of the bytecode instruction currently being executed in script, or undefined if the frame’s script property is null.
... arguments the arguments passed to the current frame, or null if this is not a "call" frame.
...each property is a read-only accessor property whose getter returns the current value of the corresponding parameter.
... when this handler is called, this frame’s current execution location, as reflected in its offset and environment properties, is the operation which caused it to be unwound.
Debugger - Firefox Developer Tools
accessor properties of the debugger prototype object a debugger instance inherits the following accessor properties from its prototype: enabled a boolean value indicating whether this debugger instance’s handlers, breakpoints, and the like are currently enabled.
...changing this flag when any frame of the debuggee is currently active on the stack will produce an exception.
...(naturally,frame is currently the youngest visible frame.) this method should return a resumption value specifying how the debuggee’s execution should proceed.
... getnewestframe() return a debugger.frame instance referring to the youngest visible frame currently on the calling thread’s stack, or null if there are no visible frames on the stack.
Eyedropper - Firefox Developer Tools
the eyedropper tool enables you to select colors in the current page.
...underneath the magnifying glass it shows the color value for the current pixel using whichever scheme you've selected in settings > inspector > default color unit: you can use it in one of two ways: to select a color from the page and copy it to the clipboard to change a color value in the inspector's rules view to a color you've selected from the page copying a color to the clipboard open the eyedropper in one of these two ways: select "eyedropper" under the "web developer" menu open the page inspector tab and click the eyedropper button in its toolbar as you move the mouse around the page you'll see the current color value in the eyedropper change.
... clicking copies the current color value to the clipboard.
... keyboard shortcuts command windows macos linux select the current color enter return enter dismiss the eyedropper esc esc esc move by 1 pixel arrow keys arrow keys arrow keys move by 10 pixels shift + arrow keys shift + arrow keys shift + arrow keys ...
Edit fonts - Firefox Developer Tools
the fonts tab has three major sections: "fonts used" by the currently inspected element.
... fonts used the top section of the font editor shows the fonts used by the currently inspected element, grouped by font family.
...empty elements will not have any fonts used and will display the message "no fonts were found for the current element." fonts will be included in this section for one of the following reasons: they are listed in the element's font-family css declaration value.
... note: if you want to use a different unit such as pt for font-size or line-height, you can set the property value applied to the currently inspected element to use that unit via the rules view, and the font editor will automatically pick it up and make it available in the associated units dropdown menu.
Examine and edit CSS - Firefox Developer Tools
this also gets the target icon: , giving you a convenient way to highlight the currently selected element in the page.
...click the funnel to filter the rule view to show only the rules applying to the current node that try to set the same property: that is, the complete cascade for the given property.
...press tab to accept the current suggestion or up and down to move through the list.
...this will add a new css rule whose selector matches the currently selected node.
Style Editor - Firefox Developer Tools
the style sheet pane the style sheet pane, on the left, lists all the style sheets being used by the current document.
... the media sidebar the style editor displays a sidebar on the right-hand side whenever the current sheet contains any @media rules.
...the condition text of the rule is greyed-out if the media query doesn’t currently apply.
...currently this means sass 3.3.0 or above or the 1.5.0 version of less.
Taking screenshots - Firefox Developer Tools
taking a screenshot of the page use the screenshot icon: to take a full-page screenshot of the current page.
... you'll now see the icon in the toolbar: click the icon to take a screenshot of the current page.
... type :screenshot in the web console to create a screenshot of the current page.
...with this parameter, even the parts of the webpage which are outside the current bounds of the window will be included in the screenshot.
Animation.playState - Web APIs
syntax var currentplaystate = animation.playstate; animation.playstate = newstate; value idle the current time of the animation is unresolved and there are no pending tasks.
... paused the animation was suspended and the animation.currenttime property is not updating.
... finished the animation has reached one of its boundaries and the animation.currenttime property is not updating.
... tears.foreach(function(el) { el.pause(); el.currenttime = 0; }); specifications specification status comment web animationsthe definition of 'playstate' in that specification.
Animation - Web APIs
WebAPIAnimation
properties animation.currenttime the current time value of the animation in milliseconds, whether running or paused.
... animation.finished read only returns the current finished promise for this animation.
... animation.pending read only indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
... animation.ready read only returns the current ready promise for this animation.
AnimationEffect.getComputedTiming() - Web APIs
syntax var currenttimevalues = animation.getcomputedtiming(); parameters none.
... localtime the current time of the animation in milliseconds.
... progress indicates how far along the animation is through its current iteration with values between 0 and 1.
... currentiteration the number of times this animation has looped, starting from 0.
AudioListener - Web APIs
note: although these methods are deprecated they are currently the only way to set the orientation and position in firefox, internet explorer and safari.
...indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
AudioParam.setTargetAtTime() - Web APIs
starttime the time that the exponential transition will begin, in the same time coordinate system as audiocontext.currenttime.
... if it is less than or equal to audiocontext.currenttime, the parameter will start changing immediately.
...however, for mathematical reasons, that method does not work if the current value or the target value is 0.
...5 var gainnode = audioctx.creategain(); gainnode.gain.value = 0.5; var currgain = gainnode.gain.value; // connect the audiobuffersourcenode to the gainnode // and the gainnode to the destination source.connect(gainnode); gainnode.connect(audioctx.destination); // set buttons to do something onclick attimeplus.onclick = function() { currgain = 1.0; gainnode.gain.settargetattime(1.0, audioctx.currenttime + 1, 0.5); } attimeminus.onclick = function() { currgain = 0; gainnode.gain.settargetattime(0, audioctx.currenttime + 1, 0.5); } specifications specification status comment web audio apithe definition of 'settargetattime' in that specification.
BiquadFilterNode - Web APIs
biquadfilternode.frequency read only is an a-rate audioparam, a double representing a frequency in the current filtering algorithm measured in hertz (hz).
... biquadfilternode.gain read only is an a-rate audioparam, a double representing the gain used in the current filtering algorithm.
... biquadfilternode.getfrequencyresponse() from the current filter parameter settings this method calculates the frequency response for frequencies specified in the provided array of frequencies.
...er(); // connect the nodes together source = audioctx.createmediastreamsource(stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.setvalueattime(1000, audioctx.currenttime); biquadfilter.gain.setvalueattime(25, audioctx.currenttime); specifications specification status comment web audio apithe definition of 'biquadfilternode' in that specification.
Cache - Web APIs
WebAPICache
the code also deletes all caches that aren't named in current_caches.
... var cache_version = 1; var current_caches = { font: 'font-cache-v' + cache_version }; self.addeventlistener('activate', function(event) { // delete all caches that aren't named in current_caches.
... var expectedcachenamesset = new set(object.values(current_caches)); event.waituntil( caches.keys().then(function(cachenames) { return promise.all( cachenames.map(function(cachename) { if (!expectedcachenamesset.has(cachename)) { // if this cache name isn't present in the set of "expected" cache names, then delete it.
... console.log('deleting out of date cache:', cachename); return caches.delete(cachename); } }) ); }) ); }); self.addeventlistener('fetch', function(event) { console.log('handling fetch event for', event.request.url); event.respondwith( caches.open(current_caches.font).then(function(cache) { return cache.match(event.request).then(function(response) { if (response) { // if there is an entry in the cache for event.request, then response will be defined // and we can just return it.
Manipulating video using canvas - Web APIs
canvas c1 is used to display the current frame of the original video, while c2 is used to display the video after performing the chroma-keying effect; c2 is preloaded with the still image that will be used to replace the green background in the video.
... then it calls the computeframe() method, which performs the chroma-keying effect on the current video frame.
... note that you can simply pass the video element into the context's drawimage() method to draw the current video frame into the context.
... the result is: line 3 fetches a copy of the raw graphics data for the current frame of video by calling the getimagedata() method on the first context.
Drawing text - Web APIs
a filltext example the text is filled using the current fillstyle.
... function draw() { var ctx = document.getelementbyid('canvas').getcontext('2d'); ctx.font = '48px serif'; ctx.filltext('hello world', 10, 50); } <canvas id="canvas" width="300" height="100"></canvas> draw(); a stroketext example the text is filled using the current strokestyle.
...there are some more properties which let you adjust the way the text gets displayed on the canvas: font = value the current text style being used when drawing text.
... measuretext() returns a textmetrics object containing the width, in pixels, that the specified text will be when drawn in the current text style.
DOMHighResTimeStamp - Web APIs
the time origin the time origin is a standard time which is considered to be the beginning of the current document's lifetime.
... it's calculated like this: if the script's global object is a window, the time origin is determined as follows: if the current document is the first one loaded in the window, the time origin is the time at which the browser context was created.
... if neither of the above determines the time origin, then the time origin is the time at which the navigation responsible for creating the window's current document took place.
... usage notes you can get the current timestamp value—the time that has elapsed since the context was created—by calling the performance method now().
Document.adoptNode() - Web APIs
the adopted node and its subtree is removed from its original document (if any), and its ownerdocument is changed to the current document.
... the node can then be inserted into the current document.
... example const iframe = document.queryselector('iframe'); const iframeimages = iframe.contentdocument.queryselectorall('img'); const newparent = document.getelementbyid('images'); iframeimages.foreach(function(imgel) { newparent.appendchild(document.adoptnode(imgel)); }); notes before they can be inserted into the current document, nodes from external documents should either be: cloned using document.importnode(); or adopted using document.adoptnode().
... best practice: although firefox doesn't currently enforce this rule, we encourage you to follow this rule for improved future compatibility.
Document.domain - Web APIs
WebAPIDocumentdomain
the domain property of the document interface gets/sets the domain portion of the origin of the current document, as used by the same origin policy.
... syntax const domainstring = document.domain document.domain = domainstring value the domain portion of the current document's origin.
...: the document is inside a sandboxed <iframe> the document has no browsing context the document's effective domain is null the given value is not equal to the document's effective domain (or it is not a registerable domain suffix of it) the document-domain feature-policy is enabled examples getting the domain for the uri http://developer.mozilla.org/docs/web, this example sets currentdomain to the string "developer.mozilla.org".
... const currentdomain = document.domain; closing a window if a document, such as www.example.xxx/good.html, has the domain of "www.example.xxx", this example attempts to close the window.
Document.fullscreen - Web APIs
the obsolete document interface's fullscreen read-only property reports whether or not the document is currently displaying content in full-screen mode.
... syntax var isfullscreen = document.fullscreen; value a boolean value which is true if the document is currently displaying an element in full-screen mode; otherwise, the value is false.
... example this simple function reports whether or not full-screen mode is currently active, using the obsolete fullscreen property.
... function isdocumentinfullscreenmode() { return document.fullscreen; } this next example, on the other hand, uses the current fullscreenelement property to determine the same thing: function isdocumentinfullscreenmode() { return document.fullscreenelement !== null; } if fullscreenelement isn't null, this returns true, indicating that full-screen mode is in effect.
DocumentOrShadowRoot.elementFromPoint() - Web APIs
syntax const element = document.elementfrompoint(x, y) parameters x the horizontal coordinate of a point, relative to the left edge of the current viewport.
... y the vertical coordinate of a point, relative to the top edge of the current viewport.
... example this example creates two buttons which let you set the current color of the paragraph element located under the coordinates (2, 2).
... javascript function changecolor(newcolor) { elem = document.elementfrompoint(2, 2); elem.style.color = newcolor; } the changecolor() method simply obtains the element located at the specified point, then sets that element's current foreground color property to the color specified by the newcolor parameter.
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
usage notes the innerhtml property can be used to examine the current html source of the page, including any changes that have been made since the page was initially loaded.
... note: the returned html or xml fragment is generated based on the current contents of the element, so the markup and formatting of the returned fragment is likely not to match the original page markup.
... for example, you can erase the entire contents of a document by clearing the contents of the document's body attribute: document.body.innerhtml = ""; this example fetches the document's current html markup and replaces the "<" characters with the html entity "&lt;", thereby essentially converting the html into raw text.
... javascript function log(msg) { var logelem = document.queryselector(".log"); var time = new date(); var timestr = time.tolocaletimestring(); logelem.innerhtml += timestr + ": " + msg + "<br/>"; } log("logging mouse events inside this container..."); the log() function creates the log output by getting the current time from a date object using tolocaletimestring(), and building a string with the timestamp and the message text.
EventTarget.addEventListener() - Web APIs
it is the same as the value of the currenttarget property of the event argument that is passed to the handler.
... my_element.addeventlistener('click', function (e) { console.log(this.classname) // logs the classname of my_element console.log(e.currenttarget === this) // logs `true` }) as a reminder, arrow functions do not have their own this context.
... my_element.addeventlistener('click', (e) => { console.log(this.classname) // warning: `this` is not `my_element` console.log(e.currenttarget === this) // logs `false` }) if an event handler (for example, onclick) is specified on an element in the html source, the javascript code in the attribute value is effectively wrapped in a handler function that binds the value of this in a manner consistent with the addeventlistener(); an occurrence of this within the code represents a reference to the element.
...e; }; } if (!event.prototype.stoppropagation) { event.prototype.stoppropagation=function() { this.cancelbubble=true; }; } if (!element.prototype.addeventlistener) { var eventlisteners=[]; var addeventlistener=function(type,listener /*, usecapture (will be ignored) */) { var self=this; var wrapper=function(e) { e.target=e.srcelement; e.currenttarget=self; if (typeof listener.handleevent != 'undefined') { listener.handleevent(e); } else { listener.call(self,e); } }; if (type=="domcontentloaded") { var wrapper2=function(e) { if (document.readystate=="complete") { wrapper(e); } }; document.attachevent("onreadystatechange",wrappe...
Guide to the Fullscreen API - Web APIs
other information the document provides some additional information that can be useful when developing fullscreen web applications: documentorshadowroot.fullscreenelement the fullscreenelement property tells you the element that's currently being displayed fullscreen.
... document.fullscreenenabled the fullscreenenabled property tells you whether or not the document is currently in a state that would allow fullscreen mode to be requested.
...if it's null, the document is currently in windowed mode, so we need to switch to fullscreen mode.
... prefixing note: currently, only firefox 64 and chrome 71 supports this unprefixed.
Geolocation API - Web APIs
the developer can now access this location information in a couple of different ways: geolocation.getcurrentposition(): retrieves the device's current location.
... interfaces geolocation the main class of this api — contains methods to retrieve the user's current position, watch for changes in their position, and clear a previously-set watch.
... dictionaries positionoptions represents an object containing options to pass in as a parameter of geolocation.getcurrentposition() and geolocation.watchposition().
...ap.org/#map=18/${latitude}/${longitude}`; maplink.textcontent = `latitude: ${latitude} °, longitude: ${longitude} °`; } function error() { status.textcontent = 'unable to retrieve your location'; } if(!navigator.geolocation) { status.textcontent = 'geolocation is not supported by your browser'; } else { status.textcontent = 'locating…'; navigator.geolocation.getcurrentposition(success, error); } } document.queryselector('#find-me').addeventlistener('click', geofindme); result specifications specification status comment geolocation api recommendation ...
HTMLAnchorElement - Web APIs
htmlelement.tabindex is a long containing the position of the element in the tabbing navigation order for the current document.
... note: currently the w3c html 5.2 spec states that rev is no longer obsolete, whereas the whatwg living standard still has it labeled obsolete.
... htmlelement.blur() removes the keyboard focus from the current element.
... htmlelement.focus() gives the keyboard focus to the current element.
HTMLSelectElement.selectedOptions - Web APIs
the read-only htmlselectelement property selectedoptions contains a list of the <option> elements contained within the <select> element that are currently selected.
... the list of selected options is an htmlcollection object with one entry per currently selected option.
... syntax var selectedcollection = htmlselectelement.selectedoptions; value an htmlcollection which lists every currently selected htmloptionelement which is either a child of the htmlselectelement or of an htmloptgroupelement within the <select> element.
... if no options are currently selected, the collection is empty and returns a length of 0.
History.replaceState() - Web APIs
the history.replacestate() method modifies the current history entry, replacing it with the stateobj, title, and url passed in the method parameters.
... this method is particularly useful when you want to update the state object or url of the current history entry in response to some user action.
... title most browsers currently ignore this parameter, although they may use it in the future.
...the new url must be of the same origin as the current url; otherwise replacestate throws an exception.
History API - Web APIs
similarly, you can move forward (as if the user clicked the forward button), like this: window.history.forward() moving to a specific point in history you can use the go() method to load a specific page from session history, identified by its relative position to the current page.
... (the current page's relative position is 0.) to move back one page (the equivalent of calling back()): window.history.go(-1) to move forward a page, just like calling forward(): window.history.go(1) similarly, you can move forward 2 pages by passing 2, and so forth.
... another use for the go() method is to refresh the current page by either passing 0, or by invoking it without an argument: // the following statements // both have the effect of // refreshing the page window.history.go(0) window.history.go() you can determine the number of pages in the history stack by looking at the value of the length property: let numberofentries = window.history.length interfaces history allows manipulation of the browser session history (that is, the pages visited in the tab or frame that the current page is loaded in).
...and then illustrates some of the methods of the history object to add, replace, and move within the browser history for the current tab.
IDBTransaction.mode - Web APIs
the mode read-only property of the idbtransaction interface returns the current mode for accessing the data in the object stores in the scope of the transaction (i.e.
... syntax var mycurrentmode = idbtransaction.mode; value an idbtransactionmode object defining the mode for isolating access to data in the current object stores: value explanation readonly allows data to be read but not changed.
...transactions of this mode cannot run concurrently with other transactions.
...at the end, we simply log the mode of the current transaction using mode.
Basic concepts - Web APIs
current version.
...you're storing critical data that cannot be recomputed later) you can force a transaction to flush to disk before delivering the complete event by creating a transaction using the experimental (non-standard) readwriteflush mode (see idbdatabase.transaction.) this is currently experimental, and can only be used if the dom.indexeddb.experimental pref is set to true in about:config.
...the only way to change the version is by opening it with a greater version than the current one.
...note, however, that locale-aware sorting has been allowed with an experimental flag enabled (currently for firefox only) since firefox 43.
PublicKeyCredentialRequestOptions.rpId - Web APIs
its value can only be a suffix of the current origin's domain.
...if it is not explicitely provided, the user agent will use the value of the current origin's domain.
...its value can only be a suffix of the current origin's domain.
... examples var options = { challenge: new uint8array([/* bytes sent from the server */]), rpid: "example.com" // will only work if the current domain // is something like foo.example.com }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control 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 'rpid' in that specification.
RTCIceCandidatePairStats - Web APIs
currentroundtriptime optional a floating-point value indicating the total time, in seconds, that elapsed elapsed between the most recently-sent stun request and the response being received.
... non-standard properties selected optional a firefox-specific boolean value which is true if the candidate pair described by this object is the one currently in use.
... usage notes the currently-active ice candidate pair—if any—can be obtained by calling the rtcicetransport method getselectedcandidatepair(), which returns an rtcicecandidatepair object, or null if there isn't a pair selected.
... the active candidate pair describes the current configuration of the two ends of the rtcpeerconnection.
RTCIceTransport.getSelectedCandidatePair() - Web APIs
the rtcicetransport method getselectedcandidatepair() returns an rtcicecandidatepair object containing the current best-choice pair of ice candidates describing the configuration of the endpoints of the transport.
... return value a rtcicecandidatepair object describing the configurations of the currently-selected candidate pair's two endpoints.
... as ice negotiation continues, any time a pair of candidates is discovered that is better than the currently-selected pair, the new pair is selected, replacing the previous pairing, and the selectedcandidatepairchange event is fired again.
... example in this example, an event handler for selectedcandidatepairchange is set up to update an on-screen display showing the protocol used by the currently selected candidate pair.
RTCIceTransport.state - Web APIs
the read-only rtcicetransport property state returns the current state of the ice transport, so you can determine the state of ice gathering in which the ice agent currently is operating.
... this differs from the gatheringstate, which only indicates whether or not ice gathering is currently underway.
... syntax icestate = icetransport.state; value a domstring, whose value is one of those found in the enumerated type rtcicetransportstate, which indicates the stage of ice gathering that's currently underway.
... its value will be one of the following: "new" the rtcicetransport is currently gathering local candidates, or is waiting for the remote device to begin to transmit the remote candidates, or both.
RTCPeerConnection.getConfiguration() - Web APIs
the rtcpeerconnection.getconfiguration() method returns an rtcconfiguration object which indicates the current configuration of the rtcpeerconnection on which the method is called.
... return value an rtcconfiguration object describing the rtcpeerconnection's current configuration.
...ertificates != undefined) && (!configuration.certificates.length)) { rtcpeerconnection.generatecertificate({ name: 'rsassa-pkcs1-v1_5', hash: 'sha-256', moduluslength: 2048, publicexponent: new uint8array([1, 0, 1]) }).then(function(cert) { configuration.certificates = [cert]; mypeerconnection.setconfiguration(configuration); }); } this example fetches the current configuration of the rtcpeerconnection, then looks to see if it has any certificates set by examining whether or not (a) the configuration has a value for certificates, and (b) whether its length is zero.
... if it's determined that there are no certificates in place, rtcpeerconnection.generatecertificate() is called to create a new certificate; we provide a fulfillment handler which adds a new array containing the one newly-created certificate to the current configuration and passes it to setconfiguration() to add the certificate to the connection.
Screen - Web APIs
WebAPIScreen
the screen interface represents a screen, usually the one on which the current window is being rendered, and is obtained using window.screen.
... note that browsers determine which screen to report as current by detecting which screen has the center of the browser window.
... screen.left returns the distance in pixels from the left side of the main screen to the left side of the current screen.
... screen.top returns the distance in pixels from the top side of the current screen.
Using the Screen Capture API - Web APIs
note: it may be useful to note that recent versions of the webrtc adapter.js shim include implementations of getdisplaymedia() to enable screen sharing on browsers that support it but do not implement the current standard api.
...in this case, the user agent may include the obscured content, either by getting the current contents of the hidden portion of the window or by presenting the most-recently-visible contents if the current contents are not available.
... function stopcapture(evt) { let tracks = videoelem.srcobject.gettracks(); tracks.foreach(track => track.stop()); videoelem.srcobject = null; } dumping configuration information for informational purposes, the startcapture() method shown above calls a method named dumpoptions(), which outputs the current track settings as well as the constraints that were placed upon the stream when it was created.
...the settings currently in effect are obtained using getsettings() and the established constraints are gotten with getconstraints() html the html starts with a simple introductory paragraph, then gets into the meat of things.
Screen Capture API - Web APIs
mediatracksettings mediatracksettings.cursor a string which indicates whether or not the display surface currently being captured includes the mouse cursor, and if so, whether it's only visible while the mouse is in motion or if it's always visible.
... mediatracksettings.displaysurface a string indicating what type of display surface is currently being captured.
... mediatracksupportedconstraints.displaysurface a boolean which is true if the current environment supports the mediatrackconstraints.displaysurface constraint.
... mediatracksupportedconstraints.logicalsurface a boolean which is true if the current environment supports the constraint mediatrackconstraints.logicalsurface.
Selection.modify() - Web APIs
WebAPISelectionmodify
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.
... granularity the distance to adjust the current selection or cursor position.
Selection.toString() - Web APIs
the selection.tostring() method returns a string currently being represented by the selection object, i.e.
... the currently selected text.
... description this method returns the currently selected text.
... working draft current browser compatibility the compatibility table on this page is generated from structured data.
Selection.type - Web APIs
WebAPISelectiontype
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.
... working draft current ...
SourceBuffer.abort() - Web APIs
the abort() method of the sourcebuffer interface aborts the current segment and resets the segment parser.
... saying that, current implementations can be useful in certain situations, when you want to stop the current append (or whatever) operation occuring on a sourcebuffer, and then immediately start performing operations on it again.
... in this case you would want to manually call abort() on the source buffer to stop the decoding of the current buffer, then fetch and append the newly requested segment that relates to the current new position of the video.
...in lines 92-101, the seek() function is defined — note that abort() is called if mediasource.readystate is set to open, which means that it is ready to receive new source buffers — at this point it is worth aborting the current segment and just getting the one for the new seek position (see checkbuffer() and getcurrentsegment().) specifications specification status comment media source extensionsthe definition of 'abort()' in that specification.
StorageManager.estimate() - Web APIs
the estimate() method of the storagemanager interface asks the storage manager for how much storage the current origin takes up (usage), and how much space is available (quota).
...this dictionary contains estimates of how much space is available to the origin in storageestimate.quota, as well as how much is currently used in storageestimate.usage.
...this variance is based on factors such as: how often the user visits public site popularity data user engagement signals like bookmarking, adding to homescreen, or accepting push notifications example in this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user.
... html content <label> you’re currently using about <output id="percent"> </output>% of your available storage.
WebGL2RenderingContext - Web APIs
webgl2renderingcontext.texsubimage3d() specifies a sub-rectangle of the current 3d texture.
... webgl2renderingcontext.copytexsubimage3d() copies pixels from the current webglframebuffer into an existing 3d texture sub-image.
... webgl2renderingcontext.clearbuffer[fiuv]() clears buffers from the currently bound framebuffer.
... webgl2renderingcontext.bindtransformfeedback() binds a passed webgltransformfeedback object to the current gl state.
WebGLRenderingContext.getRenderbufferParameter() - Web APIs
possible values: gl.renderbuffer_width: returns a glint indicating the width of the image of the currently bound renderbuffer.
... gl.renderbuffer_height: returns a glint indicating the height of the image of the currently bound renderbuffer.
... gl.renderbuffer_internal_format: returns a glenum indicating the internal format of the currently bound renderbuffer.
... when using a webgl 2 context, the following value is available additionally: gl.renderbuffer_samples: returns a glint indicating the number of samples of the image of the currently bound renderbuffer.
WebGLRenderingContext.getUniformLocation() - Web APIs
gl.useprogram(shaderprogram); uscalingfactor = gl.getuniformlocation(shaderprogram, "uscalingfactor"); uglobalcolor = gl.getuniformlocation(shaderprogram, "uglobalcolor"); urotationvector = gl.getuniformlocation(shaderprogram, "urotationvector") gl.uniform2fv(uscalingfactor, currentscale); gl.uniform2fv(urotationvector, currentrotation); gl.uniform4fv(uglobalcolor, [0.1, 0.7, 0.2, 1.0]); this code snippet is taken from the function animatescene() in "a basic 2d webgl animation example." see that article for the full sample and to see the resulting animation in action.
... after setting the current shading program to shaderprogram, this code fetches the three uniforms "uscalingfactor", "uglobalcolor", and "urotationvector", calling getuniformlocation() once for each uniform.
... then the three uniforms' values are set: the uscalingfactor uniform — a 2-component vertex — receives the horizontal and vertical scaling factors from the variable currentscale.
... the uniform urotationvector is set to the contents of the variable currentrotation.
Taking still photos with WebRTC - Web APIs
streaming indicates whether or not there is currently an active stream of video running.
... capturing a frame from the stream there's one last function to define, and it's the point to the entire exercise: the takepicture() function, whose job it is to capture the currently displayed video frame, convert it into a png file, and display it in the captured frame box.
... then, if the width and height are both non-zero (meaning that there's at least potentially valid image data), we set the width and height of the canvas to match that of the captured frame, then call drawimage() to draw the current frame of the video into the context, filling the entire canvas with the frame image.
... note: this takes advantage of the fact that the htmlvideoelement interface looks like an htmlimageelement to any api that accepts an htmlimageelement as a parameter, with the video's current frame presented as the image's contents.
Web Animations API Concepts - Web APIs
it also provides a point of reference all browsers can adhere to with the currently available specs.
... timeline timeline objects provide the useful property currenttime, which lets us see how long the page has been opened for: it's the "current time" of the document's timeline, which started when the page was opened.
... we currently have only one animation effect type available: keyframeeffect.
...in fact, group effects and sequence effects have already been outlined in the currently-in-progress level 2 spec of the web animations api.
Basic concepts behind Web Audio API - Web APIs
you can grab data using the following methods: analysernode.getfloatfrequencydata() copies the current frequency data into a float32array array passed into it.
... analysernode.getbytefrequencydata() copies the current frequency data into a uint8array (unsigned byte array) passed into it.
... analysernode.getfloattimedomaindata() copies the current waveform, or time-domain, data into a float32array array passed into it.
... analysernode.getbytetimedomaindata() copies the current waveform, or time-domain, data into a uint8array (unsigned byte array) passed into it.
Migrating from webkitAudioContext - Web APIs
the web audio api went through many iterations before reaching its current state.
... note: there is a library called webkitaudiocontext monkeypatch, which automatically fixes some of these changes to make most code targetting webkitaudiocontext to work on the standards based audiocontext out of the box, but it currently doesn't handle all of the cases below.
... you can compare the value of audiocontext.currenttime to the first argument passed to start() to know whether playback has started or not.
... if you need to compare this attribute to playing_state, you can compare the value of audiocontext.currenttime to the first argument passed to start() to know whether playback has started or not.
Example and tutorial: Simple synth keyboard - Web APIs
<div class="right"> <span>current waveform: </span> <select name="waveform"> <option value="sine">sine</option> <option value="square" selected>square</option> <option value="sawtooth">sawtooth</option> <option value="triangle">triangle</option> <option value="custom">custom</option> </select> </div> </div> css .container { overflow-x: scroll; overflow-y: hidden; width: 660px; he...
... osclist is set up to be ready to contain a list of all currently-playing oscillators.
... stopping a tone the notereleased() function is the event handler called when the user releases the mouse button or moves the mouse out of the key that's currently playing.
...finally, the osclist entry for the note is cleared and the data-pressed attribute is removed from the key element (as identified by event.target), to indicate that the note is not currently playing.
Background audio processing using AudioWorklet - Web APIs
the same check is performed when determining how many channels to process in the current input; we only process as many as there are room for in the destination output.
... note: at this time, unfortunately, chrome does not implement this algorithm in a manner that matches the current standard.
... gainparam.setvalueattime(newvalue, audiocontext.currenttime); you can similarly use any of the other methods in the audioparam interface to apply changes over time, to cancel scheduled changes, and so forth.
... reading the value of a parameter is as simple as looking at its value property: let currentgain = gainparam.value; ...
Functions and classes available to Web Workers - Web APIs
workers run in another global context, dedicatedworkerglobalscope, different from the current window.
... 38 (38) no support no support no support cache cache api provides the ability to programmatically control cache storage associated with current origin.
... 38 (38) (yes) (yes) (yes) crypto the crypto interface represents basic cryptography features available in the current context.
... 53 (53) (currently only available in dedicated and shared workers; not service workers.) ?
Window.devicePixelRatio - Web APIs
the devicepixelratio of window interface returns the ratio of the resolution in physical pixels to the resolution in css pixels for the current display device.
...the media query, which begins as (resolution: 1dppx) (for standard displays) or (resolution: 2dppx) (for retina/hidpi displays), checks to see if the current display resolution matches a specific number of device dots per px.
... the updatepixelratio() function fetches the current value of devicepixelratio, then sets the innertext of the element pixelratiobox to a string which displays the ratio both as a percentage and as a raw decimal value with up to two decimal places.
... html the html creates the boxes containing the instructions and the pixel-ratio box that will display the current pixel ratio information.
Window.scrollX - Web APIs
WebAPIWindowscrollX
the read-only scrollx property of the window interface returns the number of pixels that the document is currently scrolled horizontally.
... syntax var x = window.scrollx; value in practice, the returned value is a double-precision floating-point value indicating the number of pixels the document is currently scrolled horizontally from the origin, where a positive value means the content is scrolled to the left.
... in more technical terms, scrollx returns the x coordinate of the left edge of the current viewport.
... example this example checks the current horizontal scroll position of the document.
WindowClient - Web APIs
windowclient.focus() gives user input focus to the current client.
... windowclient.focused read only a boolean that indicates whether the current client has focus.
... windowclient.visibilitystate read only indicates the visibility of the current client.
... example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) { client.focus(); break; } } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of 'windowclient' in that specification.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
<!doctype html> <html> <head> <meta charset="utf-8" /> <title>javascript typewriter - mdn example</title> <script> function typewriter (sselector, nrate) { function clean () { clearinterval(nintervid); btyping = false; bstart = true; ocurrent = null; asheets.length = nidx = 0; } function scroll (osheet, npos, beraseandstop) { if (!osheet.hasownproperty('parts') || amap.length < npos) { return true; } var orel, bexit = false; if (amap.length === npos) { amap.push(0); } while (amap[npos] < osheet.parts.length) { orel = osheet.parts[amap[npos]]; scroll(orel, npos + 1, beraseandstop) ?
... amap[npos]++ : bexit = true; if (beraseandstop && (orel.ref.nodetype - 1 | 1) === 3 && orel.ref.nodevalue) { bexit = true; ocurrent = orel.ref; spart = ocurrent.nodevalue; ocurrent.nodevalue = ''; } osheet.ref.appendchild(orel.ref); if (bexit) { return false; } } amap.length--; return true; } function typewrite () { if (spart.length === 0 && scroll(asheets[nidx], 0, true) && nidx++ === asheets.length - 1) { clean(); return; } ocurrent.nodevalue += spart.charat(0); spart = spart.slice(1); } function sheet (onode) { this.ref = onode; if (!onode.haschildnodes()) { return; } this.parts = array.prototype.slice.call(onode.childnodes); for (var nchild = 0; nchild < this.parts.length; nchild++)...
... { onode.removechild(this.parts[nchild]); this.parts[nchild] = new sheet(this.parts[nchild]); } } var nintervid, ocurrent = null, btyping = false, bstart = true, nidx = 0, spart = "", asheets = [], amap = []; this.rate = nrate || 100; this.play = function () { if (btyping) { return; } if (bstart) { var aitems = document.queryselectorall(sselector); if (aitems.length === 0) { return; } for (var nitem = 0; nitem < aitems.length; nitem++) { asheets.push(new sheet(aitems[nitem])); /* uncomment the following line if you have previously hidden your elements via css: */ // aitems[nitem].style.visibility = "visible"; } bstart = false; } nintervid = setinterval(typewrite, this.rate); btyping = t...
...rue; }; this.pause = function () { clearinterval(nintervid); btyping = false; }; this.terminate = function () { ocurrent.nodevalue += spart; spart = ""; for (nidx; nidx < asheets.length; scroll(asheets[nidx++], 0, false)); clean(); }; } /* usage: */ var otwexample1 = new typewriter(/* elements: */ '#article, h1, #info, #copyleft', /* frame rate (optional): */ 15); /* default frame rate is 100: */ var otwexample2 = new typewriter('#controls'); /* you can also change the frame rate value modifying the "rate" property; for example: */ // otwexample2.rate = 150; onload = function () { otwexample1.play(); otwexample2.play(); }; </script> <style type="text/css"> span.intlink, a, a:visited { cursor: pointer; color: #000000; text-decoration: underline; } ...
XRVisibilityState - Web APIs
the xrvisibilitystate enumerated type defines the string values which are valid for the xrsession interface's visibilitystate property, which indicates whether or not an xr session is currently visible to the user, and if it is, whether or not it's currently the primary focus.
... values hidden the virtual scene generated by the xrsession is not currently visible to the user, so its requestanimationframe() callbacks are not being executed until thevisibilitystate changes.
... visible the virtual scene rendered by the xrsession is currently visible to the user and is the primary focus of the user's attention.
... visible-blurred while the virtual scene rendered by the xrsession may currently be visible to the user, it is not the user's primary focus at the moment; it's also possible the session is not currently visible at all.
ARIA live regions - Accessibility
not known if the aria-controls aspect of live regions is implemented in current ats, or which.
...screen reader users have a special command to read the current status.
...the clock is updated each minute, with the new remaining time simply overwriting the current content.
... with aria-atomic="true", the screenreader announces "the set year is: changedvalue" advanced use case: roster a chat site would like to display a list of users currently logged in.
Using the alert role - Accessibility
assistive technology products should listen for such an event and notify the user accordingly: screen readers may interrupt current output (whether it's speech or braille) and immediately announce or display the alert message.
... note: in most cases this approach is not recommended, because it's not ideal to hide error or alert text that is currently not applicable.
... users of older assistive technology may still be able to perceive the alert text even when the alert does not currently applies, causing users to incorrectly believe that there is a problem.
...the element that the alert role is used on does not have to be able to receive focus, as screen readers will automatically announce the alert regardless of where keyboard focus is currently located.
Using the aria-valuenow attribute - Accessibility
the aria-valuenow attribute is used to define the current value for a range widget such as a slider, spinbutton or progressbar.
... if the current value is not known, the author should not set the aria-valuenow attribute.
... when the rendered value cannot be accurately represented as a number, authors should use the aria-valuetext attribute in conjunction with aria-valuenow to provide a user-friendly representation of the range's current value.
... examples example 1: the snippet below shows a simple slider with a current value of 4.
ARIA: listbox role - Accessibility
if the current item has an associated context menu, shift+f10 will launch that menu.
... list a section containing listitem elements states and properties aria-activedescendant holds the id string of the currently active element within the listbox.
... if false or omitted, only the currently selected option, if any option is selected, needs the aria-selected attribute, and it must be set to true.
...the aria-activedescendant value on the listbox to the id of the newly selected option visually handle the blur, focus, and selected states of the option toggling the state of an option in a multi select listbox when the user clicks on an option, hits space when focused on an option, or otherwise toggles the state of an option, the following must occur: toggle the aria-selected state of the currently focused option, changing the state of the aria-selected to true if it was false or false if it was true.
Web applications and ARIA FAQ - Accessibility
tbd: how well does this currently work?
...(tbd) voiceover osx 10.5, ios 4 os x 10.7 ios 5 jaws 8 10 window-eyes 7 no live region support currently zoomtext ?
... no live region support currently note: early versions of these tools often had partial or buggy aria implementations.
...the aria-valuemin and aria-valuemax attributes specify the minimum and maximum values for the progress bar, and the aria-valuenow describes the current state of it.
Operable - Accessibility
guideline 2.4 — navigable: provide ways to help users navigate, find content, and determine where they are the conformance criteria under this guideline relate to ways in which users can be expected to orientate themselves, and find the content and functionality they are looking for on the current page or other pages of the site.
... 2.4.7 visible focus for focusable elements (aa) when tabbing through focusable elements such as links or form inputs, there should be a visual indicator to show you which element currently has focus.
... understanding target size 2.5.6 concurrent input mechanisms (aaa) added in 2.1 make sure people can use and switch between different modes of input when interacting with digital content including touchscreen, keyboard, mouse, voice commands, or alternative input devices.
... understanding concurrent input mechanism note: also see the wcag description for guideline 2.5: input modalities: make it easier for users to operate functionality through various inputs beyond keyboard.
Cross-browser Flexbox mixins - CSS: Cascading Style Sheets
this article provides a set of mixins for those who want to mess around with flexbox using the native support of current browsers.
...s was inspired by: http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/ with help from: http://w3.org/tr/css3-flexbox/ http://the-echoplex.net/flexyboxes/ http://msdn.microsoft.com/en-us/library/ie/hh772069(v=vs.85).aspx http://css-tricks.com/using-flexbox/ a complete guide to flexbox | css-tricks visual guide to css3 flexbox: flexbox playground | note: mixins are not currently supported natively in browsers.
... @if type-of($fg) == 'list' { $fg-boxflex: nth($fg, 1); } -webkit-box: $fg-boxflex; -moz-box: $fg-boxflex; -webkit-flex: $fg $fs $fb; -ms-flex: $fg $fs $fb; flex: $fg $fs $fb; } flexbox justify content the justify-content property aligns flex items along the main axis of the current line of the flex container.
...; } @else if $value == space-around { -ms-flex-pack: distribute; } @else { -webkit-box-pack: $value; -moz-box-pack: $value; -ms-flex-pack: $value; } -webkit-justify-content: $value; justify-content: $value; } // shorter version: @mixin flex-just($args...) { @include justify-content($args...); } flexbox align items flex items can be aligned in the cross axis of the current line of the flex container, similar to justify-content but in the perpendicular direction.
caret-color - CSS: Cascading Style Sheets
syntax /* keyword values */ caret-color: auto; caret-color: transparent; caret-color: currentcolor; /* <color> values */ caret-color: red; caret-color: #5729e9; caret-color: rgb(0, 200, 0); caret-color: hsla(228, 4%, 24%, 0.8); values auto the user agent selects an appropriate color for the caret.
... this is generally currentcolor, but the user agent may choose a different color to ensure good visibility and contrast with the surrounding content, taking into account the value of currentcolor, the background, shadows, and other factors.
... note: while user agents may use currentcolor (which is usually animatable) for the auto value, auto is not interpolated in transitions and animations.
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueauto is computed as specified and <color> values are computed as defined for the color property.animation typea color formal syntax auto | <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
<a>: The Anchor element - HTML: Hypertext Markup Language
WebHTMLElementa
the following keywords have special meanings for where to load the url: _self: the current browsing context.
... _parent: the parent browsing context of the current one.
... _top: the topmost browsing context (the "highest" context that’s an ancestor of the current one).
... css a { display: block; margin-bottom: 0.5em } result linking to an element on the same page <!-- <a> element links to the section below --> <p><a href="#section_further_down"> jump to the heading below </a></p> <!-- heading to link to --> <h2 id="section_further_down">section further down</h2> note: you can use href="#top" or the empty fragment (href="#") to link to the top of the current page, as defined in the html specification.
<form> - HTML: Hypertext Markup Language
WebHTMLElementform
the following keywords have special meanings: _self (default): load into the same browsing context as the current one.
... _parent: load into the parent browsing context of the current one.
... _top: load into the top-level browsing context (i.e., the browsing context that is an ancestor of the current one and has no parent).
... examples html <!-- form which will send a get request to the current url --> <form> <label>name: <input name="submitted-name" autocomplete="name"> </label> <button>save</button> </form> <!-- form which will send a post request to the current url --> <form method="post"> <label>name: <input name="submitted-name" autocomplete="name"> </label> <button>save</button> </form> <!-- form with fieldset, legend, and label --> <form method="post"> <fieldset> <legend>title</legend> <label><input type="radio" name="radio"> select me</label> </fieldset> </form> specifications specification...
<input type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
upport the following attributes: attribute description checked boolean; if present, the checkbox is toggled on by default indeterminate a boolean which, if present, indicates that the value of the checkbox is indeterminate rather than true or false value the string to use as the value of the checkbox when submitting the form, if the checkbox is currently toggled on checked a boolean attribute indicating whether or not this checkbox is checked by default (when the page loads).
... it does not indicate whether this checkbox is currently checked: if the checkbox’s state is changed, this content attribute does not reflect the change.
... (only the htmlinputelement’s checked idl attribute is updated.) note: unlike other input controls, a checkboxes value is only included in the submitted data if the checkbox is currently checked.
... value the value attribute is one which all <input>s share; however, it serves a special purpose for inputs of type checkbox: when a form is submitted, only checkboxes which are currently checked are submitted to the server, and the reported value is the value of the value attribute.
<input type="date"> - HTML: Hypertext Markup Language
WebHTMLElementinputdate
however, there are currently issues with <input type="date"> because of its limited browser support.
...we make use of the :valid and :invalid pseudo-elements to add an icon next to the input, based on whether or not the current value is valid.
...ption>october</option> <option>november</option> <option>december</option> </select> </span> <span> <label for="year">year:</label> <select id="year" name="year"> </select> </span> </div> </form> the months are hardcoded (as they are always the same), while the day and year values are dynamically generated depending on the currently selected month and year, and the current year (see the code comments below for detailed explanations of how these functions work.) span { padding-left: 5px; } input:invalid + span::after { content: '✖'; } input:valid + span::after { content: '✓'; } javascript the other part of the code that may be of interest is the feature detection code — to detect whether the browser suppo...
...type === 'text') { // hide the native picker and show the fallback nativepicker.style.display = 'none'; fallbackpicker.style.display = 'block'; fallbacklabel.style.display = 'block'; // populate the days and years dynamically // (the months are always the same, therefore hardcoded) populatedays(monthselect.value); populateyears(); } function populatedays(month) { // delete the current set of <option> elements out of the // day <select>, ready for the next set to be injected while(dayselect.firstchild){ dayselect.removechild(dayselect.firstchild); } // create variable to hold new number of days to inject var daynum; // 31 or 30 days?
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
the html external resource link element (<link>) specifies relationships between the current document and an external resource.
... rel this attribute names a relationship of the linked document to the current document.
...for example, the browser might choose a different rendering of a link as a function of the methods specified; something that is searchable might get a different icon, or an outside link might render with an indication of leaving the current site.
... rev the value of this attribute shows the relationship of the current document to the linked document, as defined by the href attribute.
Standard metadata names - HTML: Hypertext Markup Language
WebHTMLElementmetaname
no-referrer-when-downgrade send the full url when the destination is at least as secure as the current page (http(s)→https), but send no referrer when it's less secure (https→http).
... strict-origin send the origin when the destination is at least as secure as the current page (http(s)→https), but send no referrer when it's less secure (https→http).
...send the origin when the destination is at least as secure as the current page (http(s)→https).
...your styles can adapt to the current color scheme using the prefers-color-scheme css media feature.
<video>: The Video Embed element - HTML: Hypertext Markup Language
WebHTMLElementvideo
currenttime reading currenttime returns a double-precision floating-point value indicating the current playback position of the media specified in seconds.
...setting currenttime sets the current playback position to the given time and seeks the media to that position if the media is currently loaded.
...other media may have a media timeline that doesn't start at 0 seconds, so setting currenttime to a time before that would fail.
... timeupdate the time indicated by the currenttime attribute has been updated.
Using the application cache - HTML: Hypertext Markup Language
if the currently-cached copy of the manifest is up-to-date, the browser sends a noupdate event to the applicationcache object, and the update process is complete.
... in firefox, the offline cache data is stored separately from the firefox profile—next to the regular disk cache: windows vista/7: c:\users\<username>\appdata\local\mozilla\firefox\profiles\<salt>.<profile name>\offlinecache mac/linux: /users/<username>/library/caches/firefox/profiles/<salt>.<profile name>/offlinecache in firefox the current status of the offline cache can be inspected on the about:cache page (under the "offline cache device" heading).
... cache states each application cache has a state, which indicates the current condition of the cache.
... idle the application cache is not currently in the process of being updated.
CSP: report-uri - HTTP
so for compatibility with current browsers while also adding forward compatibility when browsers get report-to support, you can specify both report-uri and report-to: content-security-policy: ...; report-uri https://endpoint.com; report-to groupname in browsers that support report-to, the report-uri directive will be ignored.
...'/csp-violations.log'; $log_file_size_limit = 1000000; // bytes - once exceeded no further entries are added $email_address = 'admin@example.com'; $email_subject = 'content-security-policy violation'; // end configuration $current_domain = preg_replace('/www\./i', '', $_server['server_name']); $email_subject = $email_subject .
...$current_domain; http_response_code(204); // http 204 no content $json_data = file_get_contents('php://input'); // we pretty print the json before adding it to the log file if ($json_data = json_decode($json_data)) { $json_data = json_encode($json_data, json_pretty_print | json_unescaped_slashes); if (!file_exists($log_file)) { // send an email $message = "the following content-security-policy violation occurred on " .
... $current_domain .
HTTP headers - HTTP
WebHTTPHeaders
dpr a number that indicates the client’s current device pixel ratio (dpr), which is the ratio of physical pixels over css pixels (section 5.2 of [cssval]) of the layout viewport (section 9.1.1 of [css2]) on the device.
... connection management connection controls whether the network connection stays open after the current transaction finishes.
... referer the address of the previous web page from which a link to the currently requested page was followed.
...the standard establishes rules for upgrading or changing to a different protocol on the current client, server, transport protocol connection.
Proxy Auto-Configuration (PAC) file - HTTP
if both wd1 and wd1 are defined, the condition is true if the current weekday is in between those two ordered weekdays.
...now weekdayrange("wed", "sun") will only evaluate true if the current day is wednesday or sunday.
...now daterange("dec", "jan") will only evaluate true if the current month is december or january.
...now timerange(23, 0) will only evaluate true if the current hour is 23:00 or midnight.
A re-introduction to JavaScript (JS tutorial) - JavaScript
if you query a non-existent array index, you'll get a value of undefined in return: typeof a[90]; // undefined if you take the above about [] and length into account, you can iterate over an array using the following for loop: for (var i = 0; i < a.length; i++) { // do something with a[i] } es2015 introduced the more concise for...of loop for iterable objects such as arrays: for (const currentvalue of a) { // do something with currentvalue } you could also iterate over an array using a for...in loop, however this does not iterate over the array elements, but the array indices.
... another way of iterating over an array that was added with ecmascript 5 is foreach(): ['dog', 'cat', 'hen'].foreach(function(currentvalue, index, array) { // do something with currentvalue or array[index] }); if you want to append an item to an array simply do it like this: a.push(item); arrays come with a number of methods.
...used inside a function, this refers to the current object.
...there is no mechanism for iterating over the properties of the current scope object, for example.
Date.prototype.getTimezoneOffset() - JavaScript
the gettimezoneoffset() method returns the time zone difference, in minutes, from current locale (host system settings) to utc.
... syntax dateobj.gettimezoneoffset() return value a number representing the time-zone offset, in minutes, from the date based on current host system settings to utc.
... current locale utc-8 utc utc+3 return value 480 0 -180 the time zone offset returned is the one that applies for the date that it's called on.
... examples using gettimezoneoffset() // get current timezone offset for host device let x = new date(); let currenttimezoneoffsetinhours = x.gettimezoneoffset() / 60; // 1 // get timezone offset for international labour day (may 1) in 2016 // be careful, the date() constructor uses 0-indexed months, so may is // represented with 4 (and not 5) let labourday = new date(2016, 4, 1) let labourdayoffset = labourday.gettimezoneoffset() / 60; specifications specification ecmascript (ecma-262)the definition of 'date.prototype.gettimezoneoffset' in that specification.
Date.prototype.setMonth() - JavaScript
the setmonth() method sets the month for a specified date according to the currently set year.
... the current day of month will have an impact on the behaviour of this method.
... conceptually it will add the number of days given by the current day of the month to the 1st day of the new month specified as the parameter, to return the new date.
... for example, if the current value is 31st august 2016, calling setmonth with a value of 1 will return 2nd march 2016.
String.prototype.padStart() - JavaScript
the padstart() method pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length.
... the padding is applied from the start of the current string.
... syntax str.padstart(targetlength [, padstring]) parameters targetlength the length of the resulting string once the current str has been padded.
... padstring optional the string to pad the current str with.
String - JavaScript
string.prototype.padend(targetlength [, padstring]) pads the current string from the end with a given string and returns a new string of the length targetlength.
... string.prototype.padstart(targetlength [, padstring]) pads the current string from the start with a given string and returns a new string of the length targetlength.
... string.prototype.tolocalelowercase( [locale, ...locales]) the characters within a string are converted to lowercase while respecting the current locale.
... string.prototype.tolocaleuppercase( [locale, ...locales]) the characters within a string are converted to uppercase while respecting the current locale.
import - JavaScript
import an entire module's contents this inserts mymodule into the current scope, containing all the exports from the module in the file located in /modules/my-module.js.
... if the module imported above includes an export doalltheamazingthings(), you would call it like this: mymodule.doalltheamazingthings(); import a single export from a module given an object or value named myexport which has been exported from the module my-module either implicitly (because the entire module is exported) or explicitly (using the export statement), this inserts myexport into the current scope.
... import {myexport} from '/modules/my-module.js'; import multiple exports from module this inserts both foo and bar into the current scope.
...for example, this inserts shortname into the current scope.
CSS and JavaScript animation performance - Web Performance
they each have their own user scenarios: css transitions provide an easy way to make animations occur between the current style and an end css state, e.g., a resting button state and a hover state.
... even if an element is in the middle of a transition, the new transition starts from the current style immediately instead of jumping to the end css state.
...developers can create an animation by simply changing an element's style each time the loop is called (or updating the canvas draw, or whatever.) note: like css transitions and animations, requestanimationframe() pauses when the current tab is pushed into the background.
... enabling fps tools before going through the example, please enable fps tools first to see the current frame rate: in the url bar, enter about:config; click the i’ll be careful, i promise!
Performance fundamentals - Web Performance
use css animations and transitions instead of using some library’s animate() function, which probably currently uses many badly performing technologies (window.settimeout() or top/left positioning, for example) use css animations.
... use requestanimationframe() instead of setinterval() calls to window.setinterval() run code at a presumed frame rate that may or may not be possible under current circumstances.
...instead, keep in your dom tree only the ones that are visible and a few on either side of the currently visible set of tweets.
...the same trick applies in games to sprites: if they aren’t currently on the screen, there is no need to poll them.
The building blocks of responsive design - Progressive web apps (PWAs)
note that getusermedia() is an experimental technology, which currently only works in google chrome and firefox desktop.
...if we viewed my example in a mobile browser in its current state, we wouldn't see our nice mobile layout.
...there are currently some standards proposals in the works that would provide this — the w3c responsive images community group discussed this problem for ages and arrived at the <picture> element, which provides a similar markup structure to <video>, with <source> alternatives selectable via media query results.
...currently we have to rely on various polyfills and other solutions, none of which are perfect for all situations, so you need to decide which one is right for your particular situation.
enable-background - SVG: Scalable Vector Graphics
default value accumulate animatable no accumulate if an ancestor container element has a property value of enable-background: new, then all graphics elements within the current container element are rendered both onto the parent container elementʼs background image canvas and onto the target device.
... otherwise, there is no current background image canvas, so graphics elements are only rendered onto the target device.
... this value enables the ability of children of the current container element to access the background image.
... it also indicates that a new (i.e., initially transparent black) background image canvas is established and that in effect all children of the current container element shall be rendered into the new background image canvas in addition to being rendered onto the target device.
externalResourcesRequired - SVG: Scalable Vector Graphics
the externalresourcesrequired attribute specifies whether referenced resources that are not part of the current document are required for proper rendering of the given container or graphics element.
... usage notes value false | true default value false animatable no true this value indicates that resources external to the current document are required.
... false this value indicates that resources external to the current document are optional.
... document rendering can proceed even if external resources are unavailable to the current element and its descendants.
text-anchor - SVG: Scalable Vector Graphics
each text chunk has an initial current text position, which represents the point in the user coordinate system resulting from (depending on context) application of the x and y attributes on the <text> element, any x or y attribute values on a <tspan>, <tref> or <altglyph> element assigned explicitly to the first rendered character in a text chunk, or determination of the initial current text position for a <textpath> element.
..." fill="red" /> <circle cx="60" cy="110" r="3" fill="red" /> <style><![cdata[ text { font: bold 36px verdana, helvetica, arial, sans-serif; } ]]></style> </svg> usage notes default value start value start | middle | end animatable yes start the rendered characters are aligned such that the start of the text string is at the initial current text position.
... middle the rendered characters are aligned such that the middle of the text string is at the current text position.
...then, the text string is mapped onto the path with this midpoint placed at the current text position.) end the rendered characters are shifted such that the end of the resulting rendered text (final current text position before applying the text-anchor property) is at the initial current text position.
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
to find out the current type, load the file in mozilla and look at the page info.
... 28 <xsl:copy> element, reference, xslt, copy the <xsl:copy> element transfers a shallow copy (the node and any associated namespace node) of the current node to the output document.
... it does not copy any children or attributes of the current node.
...it is often used to iterate through a set of nodes or to change the current node.
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
note that multiple xml-stylesheet xslt pis are not supported in firefox currently.
... the context node is the node used as initial current node used when executing the stylesheet.
... the context position is the position of the context node in the initial current node list used when executing the stylesheet.
... the context size is the size of the initial current node list used when executing the stylesheet.
Content Processes - Archive of obsolete content
when this function is called with a given event name, it calls all the listeners currently associated with that event.
... a few notes on security as we stated earlier, the sdk was designed with multiprocess support in mind, despite the fact that work on implementing this in firefox has currently been suspended.
... since both add-on modules and content scripts are currently loaded in sandboxes rather than separate processes, and sandboxes can communicate with each other directly (using imports/exports), you might be wondering why we have to go through all the trouble of passing messages between add-on and content scripts.
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
installing this is bundled with the mozilla suite and the current version of seamonkey, but it needs to be installed as an extension in firefox.
... when venkman first launches, it can only debug the file currently open in your web browser.
... fixme: figure 3: inserting a breakpoint start debugger type in some text into the quicknote screen, and then select save current tab from the menu.
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
the user can now use the customize dialog to add the buttons to the current firefox toolbars.
... these are the current icon sets for firefox: windows mac os x (lion and above) mac os x linux (gnome) note: the images above are probably not distributable under the same cc license, unlike the rest of this material.
... } } if (application.extensions) firstrun(application.extensions); else application.getextensions(firstrun); the fuel library currently only works on firefox 3 and above.
XPCOM Objects - Archive of obsolete content
if you want to see the list in your current firefox installation, just run the following code in the error console: var str = ""; for (var i in components.classes) { str += i + "\n" }; str a run on firefox 3.6.2 with a few extensions installed yields 876 strings.
...the currently favored type for most cases is autf8string.
...*/ const short max_count = 100; /* the current count.
CSS3 - Archive of obsolete content
it also defines the currentcolor keyword as a valid color.
...together with it, they are the current snapshot of the css specification.
...though changes are still expected, they shouldn't create incompatibilities with current implementations; they should mainly define behavior in edge cases.
Enabling the behavior - retrieving tinderbox status - Archive of obsolete content
the first step is to write a function that queries the tinderbox server and retrieves the current status.
...in this case we use it to retrieve an html page containing a brief summary of the current tinderbox state.
...this is because we need to reference it in the updatetinderboxstatus() function as well as the current function, and we can't pass the object from one function to the other because the one doesn't call the other directly.
Creating a Microsummary - Archive of obsolete content
in this tutorial we're going to create a microsummary generator for the spread firefox home page that displays the current firefox download count along with the label fx downloads; for example: 174475447 fx downloads.
... <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="firefox download count"> <template> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> </transform> </template> </generator> note that while microsummary generators can include arbitrary xslt, including xslt that produces rich text output, firefox currently only displays the text version of the xslt output.
... conclusion you should now have a microsummary generator that displays the current firefox download count when you install it, bookmark the spread firefox home page, and select the microsummary from the summary drop-down menu in the add bookmark dialog.
Downloading Nightly or Trunk Builds - Archive of obsolete content
note that this is an attempt at describing the current usage of these terms.
... the current trunk is mozilla 1.9.2.
...these are the "tinderbox builds", also known as "hourly builds" though it usually takes more than one hour to make one; they are followed by automatic tests and their main purpose is to check that nothing is horridly wrong with the latest change to the source: what they are doing is to constantly check that the current source can be built into an executable and that that executable passes a certain more-or-less fixed set of tests.
JavaScript Client API - Archive of obsolete content
changeitemid(oldid, newid) must find the stored item currently associated with the guid oldid and change it to be associated with the guid newid.
...for instance, bookmarkstore.wipe() deletes all bookmarks from the current firefox profile.
...it's up to you to figure out the best way to assign a score based on the current state of whatever data type you're tracking.
Simple Storage - Archive of obsolete content
the namespace currently lives in the future and must be imported before it is used: jetpack.future.import("storage.simple"); methods sync()as described above, the jetpack.storage.simple object is automatically written to disk, but a feature may force flush by calling jetpack.storage.simple.sync().
...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.
...:(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 ...
Clipboard Test - Archive of obsolete content
this api currently lives in the future and must be imported for use.
...the only flavors currently implemented are 'plain' (text/unicode) and 'html' (which is html).string"text" here's an example of how to use the method to set the clipboard.
...jetpack.import.future("clipboard");var mycontent = "<i>this is some italic text</i>";jetpack.clipboard.set( mycontent, "html" ); getcurrentflavors()returns an array of available jetpack clipboard flavors, for the current system clipboard state.
Clipboard - Archive of obsolete content
this api currently lives in the future and must be imported for use.
...the only flavors currently implemented are 'plain' (text/unicode) and 'html' (which is html).string"text" here's an example of how to use the method to set the clipboard.
...jetpack.import.future("clipboard"); var mycontent = "<i>this is some italic text</i>"; jetpack.clipboard.set( mycontent, "html" ); getcurrentflavors()returns an array of available jetpack clipboard flavors, for the current system clipboard state.
Simple Storage - Archive of obsolete content
the namespace currently lives in the future and must be imported before it is used: jetpack.future.import("storage.simple"); methods sync()as described above, the jetpack.storage.simple object is automatically written to disk, but a feature may force flush by calling jetpack.storage.simple.sync().
...jetpack.storage.simple.notes = jetpack.storage.simple.notes || []; var notes = jetpack.storage.simple.notes; // updates the jetpack menu with the current notes.
...:( 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.
Clipboard - Archive of obsolete content
the api currently lives in the future and must be imported for use.
...the only flavors currently implemented are 'plain' (text/unicode) and 'html' (which is html).string"text" here's an example of how to use the method to set the clipboard.
...jetpack.import.future("clipboard"); var mycontent = "<i>this is some italic text</i>"; jetpack.clipboard.set( mycontent, "html" ); getcurrentflavors()returns an array of available jetpack clipboard flavors, for the current system clipboard state.
Mozilla Crypto FAQ - Archive of obsolete content
for several years professor daniel bernstein (currently at the university of illinois at chicago) has pursued a lawsuit against the u.s.
...(bernstein's suit was originally directed at the itar and related regulations, since at the time the suit was filed the current export administration regulations were not yet in effect with respect to encryption software.) bernstein claimed that the u.s.
...government will continue to enforce current u.s.
Proxy UI - Archive of obsolete content
the currently available modes are based on "network.proxy.type".
...<h7 name="details">details</h7> the menu should display the current proxy mode with a dot.
...mouseover when online, the tooltip will include the current proxy mode: code http://mxr.mozilla.org/seamonkey/sou...ityoverlay.xul bugs bug 243624 reference network.proxy.type ...
RDF Datasource How-To - Archive of obsolete content
the xpcom registration parts and the "as of this writing, it is not currently possible to implement javascript xpcom components" comment seem outdated didn't check the whole article.
...as such, it must (currently, see [1]) have: an xpcom clsid to identify the data source implementation an implementation class (that corresponds to the clsid) whose code lives in a dll.
... 1 as of this writing, it is not currently possible to implement javascript xpcom components; however, it may soon be possible to do so via xpconnect.
Frequently Asked Questions - Archive of obsolete content
we currently maintain two documents to help answer this question: a status page for svg in firefox 1.5+ and a status page for svg in the development trunk.
... who's currently working on what?
... other than reviewing patches and fixing the occassional bug, alex is currently taking a break from active svg development to concentrate on 'real work' and cool stuff like xtf and jssh.
Tamarin Build System Documentation - Archive of obsolete content
the buildbot scripts are located in the tamarin repository, get a current copy in your test repository cd into the build/buildbot/slaves directory: cd build/buildbot/slaves copy the your platform scripts directory into the scripts directory and cd into the new scripts directory: cp -r mac-intel-10_5/scripts .
... ; cd scripts edit environment.sh, change the basedir and buildsdir settings (around line 51) basedir=~/hg/tamarin-redux (path to my test repository) (next line) buildsdir=~/hg/builds (a directory to store downloaded builds) always set current working directory to the scripts directory when running a script run a script (e.g.) ../all/run-acceptance-release.sh <optional hg revision number like 1902> how do i navigate the build status page?
... the test/acceptance/testconfig.txt file contains a list of tests marked as expected failures or skipped with the configuration see the testconfig.txt for current instructions generally the format is comma separated list with regular expressions for test and configuration.
Tamarin-central rev 703:2cee46be9ce0 - Archive of obsolete content
performance testsuite time metric the following is a comparison of the current tamarin-central (tc-703) versus the prior build (tc-700) as well as current against the vm in flash player 10.
... fastertc-703 vs tc-700: 0.1% slowertc-703 vs flash10: 5.2% faster linux (ubuntu linux, 2.13 ghz dual core)tc-703 vs tc-700: 6.0% fastertc-703 vs flash10: 1.7% fastertc-703 vs tc-700: 89.5% fastertc-703 vs flash10: 182.0% fastertc-703 vs tc-700: 6.1% fastertc-703 vs flash10: 1.4% faster performance testuite memory metric the following is a comparison of the current tamarin-central (tc-703) versus the prior build (tc-700).
...4% largertc-703 vs tc-663: 2.1% larger windows (xp pro, 2.13ghz dual core)tc-703 vs tc-700: 3.2% largertc-703 vs tc-663: 7.6% largertc-703 vs tc-700: 3.9% largertc-703 vs tc-663: 12.4% largertc-703 vs tc-700: 3.3% largertc-703 vs tc-663: 21.4% larger linux (ubuntu linux, 2.13 ghz dual core)n/an/an/a vm code size the following is a comparison of the current tamarin-central compiled size (tc-703) versus the prior build (tc-700) as well as the current build against the vm in flash player 10.
The Download Manager schema - Archive of obsolete content
the current database schema version is 8.
... state integer the download's current state.
... currbytes integer the current number of bytes that have been downloaded.
URIs and URLs - Archive of obsolete content
thus, a resource can remain constant even when its content---the entities to which it currently corresponds---changes over time, provided that the conceptual mapping is not changed in the process.
...parsing urls rfc 2396 defines an url parser that can deal with the syntax that is common to most url schemes that are currently in existence.
... registry-based authoritys currently necko's url-objects only support host based authoritys or urls with no authoritys.
ContextMenus - Archive of obsolete content
when using the keyboard, the context is the element in the window that is currently focused.
...however, even when using the keyboard, there will still be a node (the context) that the menu applies to, which will be the element that is currently focused.
... var element = aevent.target.triggernode; var isimage = (element instanceof components.interfaces.nsiimageloadingcontent && element.currenturi); document.getelementbyid("enlarge").hidden = !isimage; document.getelementbyid("details").hidden = !isimage; } </script> <menupopup id="contentareacontextmenu" onpopupshowing="showhideitems(event)"> <menuitem label="copy"/> <menuitem id="enlarge" label="enlarge image"/> <menuitem id="details" label="image details"/> </menupopup> <browser src="http://www.mozilla.org" context="conte...
Menus - Archive of obsolete content
the cursor keys can also be used to adjust which menuitem is the current item.
...when the mouse is moved over the submenu label, or the cursor keys move the current item to the submenu, that menu's popup appears.
... it will close when the mouse is moved away or the current item is changed.
Textbox (XPFE autocomplete) - Archive of obsolete content
the autocomplete functionality is handled through one of more session objects, each of which can return a set of results given the current value of the textbox.
... useraction type: one of the values below this attribute will be set to the action the user is currently performing.
... getresultcount( session ) returns the number of results, holded by the current session.
Adding Properties to XBL-defined Elements - Archive of obsolete content
for example, the following field is given a default value equal to the current time: <field name="currenttime"> new date().gettime(); </field> properties sometimes you will want to validate the data that is assigned to a property.
...for example, if you want a property that holds the current time, you would want to have its value generated as needed.
...for example, you could assign a script to the value of onget to calculate the current time.
Modifying a XUL Interface - Archive of obsolete content
the += operator is used to add to the current value so a 1 will be added onto the end of the existing text.
...you can also retrieve the current label or value using these properties, as in the following example: example 5 : source view <button label="hello" oncommand="alert(this.label);"/> toggling a checkbox checkboxes have a checked property which may be used to check or uncheck the checkbox.
...this function will retrieve the currently selected radio element using the selectedindex property.
XUL accessibility tool - Archive of obsolete content
availability the xul accessibility tool can currently be obtained from [http://www.xulplanet.com/aaron/files...bilitytool.xpi].
...the version currently on xulplanet is compatible with the following xul applications: firefox 1.5+ thunderbird 3.0a+ recent sunbird builds recent songbird builds.
...once the tool window has loaded, select either a local file, web url, or currently open window from the file menu to generate a xul report for that document.
arrowscrollbox - Archive of obsolete content
currently, smooth scrolling supports horizontal arrowscrollboxes only.
...currently, smooth scrolling supports horizontal arrowscrollboxes only.
... methods ensureelementisvisible( element ) return type: no return value if the specified element is not currently visible to the user, the displayed items are scrolled so that it is.
colorpicker - Archive of obsolete content
color type: color string the currently selected color.
... color type: color string the currently selected color.
...you may use onclick when you are working with a plain colorpicker and need the currently selected color for example to display in a <textbox>.
command - Archive of obsolete content
typically, this will be the currently focused element.
...see also: command attribute, commandset element attributes disabled, label, oncommand,reserved examples the following code will send a paste command (cmd_paste) to the currently focused element: // first include chrome://global/content/globaloverlay.js godocommand("cmd_paste"); example with two buttons <commandset><command id="cmd_openhelp" oncommand="alert('help');"/></commandset> <button label="help" command="cmd_openhelp"/> <button label="more help" command="cmd_openhelp"/> attributes disabled type: boolean indicates whether the element is disabled or not.
... currently, the content still receives these key events, even though it can't override them.
deck - Archive of obsolete content
ArchiveMozillaXULdeck
butes selectedindex properties selectedindex, selectedpanel examples <deck selectedindex="2"> <description value="this is the first page"/> <button label="this is the second page"/> <box> <description value="this is the third page"/> <button label="this is also the third page"/> </box> </deck> attributes selectedindex type: integer gets and sets the index of the currently selected panel.
...e, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties selectedindex type: integer returns the index of the currently selected item.
... selectedpanel type: element holds a reference to the currently selected panel within a deck element.
tabpanels - Archive of obsolete content
attributes selectedindex properties selectedindex, selectedpanel examples (example needed) attributes selectedindex type: integer gets and sets the index of the currently selected panel.
... selectedindex type: integer returns the index of the currently selected item.
...returns -1 if no items are selected selectedpanel type: element holds a reference to the currently selected panel within a <tabbox> element.
textbox - Archive of obsolete content
value type: string holds the current value of the textbox as a string.
... the current value may be modified by setting this property.
... valuenumber type: number in contrast to the value property which holds a string representation, the valuenumber property is a number containing the current value of the number box.
Building XULRunner with Python - Archive of obsolete content
currently (mar 07) python is not enabled by default so a custom build of mozilla is needed.
... microsoft c++ compiler is required and whilst the current free version is visual studio 8 express (msvc8) you will almost certainly want to use visual studio .net 2003 (msvc71) which is not longer officially available.
...example def onload(): btntest = document.getelementbyid("btntest") btntest.addeventlistener('command', ontest, false) def ontest(): window.alert('button activated') window.addeventlistener('load', onload, false) one possible gotcha is that the default python path used to find modules that areimported explicitly includes the xulrunner executable directory and the directory that is current when xulrunner launches.
How to enable locale switching in a XULRunner application - Archive of obsolete content
the dynamic list population requires an xpcom to query the currently selected locale as well as all locales available in the application package.
...only.xul"; var localelistbox = document.getelementbyid("locale-listbox"); var selecteditem = null; while(availablelocales.hasmore()) { var locale = availablelocales.getnext(); var listitem = document.createelementns(xul_ns, "listitem"); listitem.setattribute("value", locale); listitem.setattribute("label", locale); if (locale == selectedlocale) { // is this the current locale?
... selecteditem = listitem; } localelistbox.appendchild(listitem); } // highlight current locale localelistbox.selecteditem = selecteditem; } catch (err) { alert (err); } 4.
2006-10-27 - Archive of obsolete content
discussions removal of the nn4.6 table border color quirk discussion on removing the nn 4.6 table boarder color quirk, which currently causes a specific markup to produce a green boarder instead of a gray one.
... multiple presshells discussion on why current interfaces allow for multiple presshells and how the relationships work for the following objects: docshell, presshell, prescontext, document, domwindow, widget, docshell and contentviewer.
...the presshells are currently used for printing, but should or could have been used for print previews and multiple views in editors.
2006-11-17 - Archive of obsolete content
site not loading with seamonkey a user built seamonkey in debug mode and is currently receiving a "bad request" error on some websites.
...nightly builds, instructions and the current list of known regressions on the branch can be found at: http://wiki.mozilla.org/gecko:reflow...ng#quick_links.
... users are asked to file bugs on encountered problems that are not present on the current trunk builds.
NPN_PostURL - Archive of obsolete content
syntax #include <npapi.h> nperror npn_posturl(npp instance, const char *url, const char *target, uint32 len, const char *buf, npbool file); parameters the function has the following parameters: instance pointer to the current plug-in instance.
...if null, pass the new stream back to the current plug-in instance regardless of mime type.
... if you specify _current, _self, or _top, the response data is written to the same plug-in window and the plug-in is unloaded.
Adobe Flash - Archive of obsolete content
for example, the current flash plugin version is flash 6 r79.
...this is currently not the case, but 12 is a sufficiently high version number (current versions are version 6r.79) to allow for some leeway for fixing this down the road.
...if you are embedding a flash animation and wish to use fscommands in netscape gecko browsers, currently you must use the embed element and not the object element.
Browser Detection and Cross Browser Support - Archive of obsolete content
this article was written in 2003 and is not on par with current standards.
...have a look to the more current article writing forward-compatible websites to find modern informations.
...all gecko based browsers currently report mozilla/5.0 as their primary version although no other browser does so at the moment.
CSS - Archive of obsolete content
ArchiveWebCSS
ion that represents the button that opens the file picker of <input type="file">.::-ms-checkthe ::-ms-check css pseudo-element is a microsoft extension that represents checkboxes and radio button groups created by <input type="checkbox"> and <input type="radio">.::-ms-clearthe ::-ms-clear css pseudo-element creates a clear button at the edge of an <input type="text"> text control that clears the current value.
...typically it is a triangle that points downward.::-ms-fillthe ::-ms-fill css pseudo-element is a microsoft extension that represents a progress bar displayed by <progress>.::-ms-fill-lowerthe ::-ms-fill-lower css pseudo-element represents the lower portion of the track of a slider control; that is, the portion corresponding to values less than the value currently selected by the thumb.
... a slider control is one possible representation of <input type="range">.::-ms-fill-upperthe ::-ms-fill-upper css pseudo-element is a microsoft extension that represents the upper portion of the track of a slider control; that is, the portion corresponding to values greater than the value currently selected by the thumb.
Enumerator.item - Archive of obsolete content
the enumerator.item method returns the current item in the collection.
... the item method returns the current item.
... if the collection is empty or the current item is undefined, it returns undefined.
GetObject - Archive of obsolete content
if the pathnameargument is omitted, getobject returns a currently active object of the specified type.
...for example: myobject.line(9, 90); myobject.inserttext(9, 100, "hello, world."); myobject.saveas("c:\\drawings\\sample.drw"); note: use the getobject function when there is a current instance of the object, or if you want to create the object with a file already loaded.
... if there is no current instance, and you don't want the object started with a file loaded, use the activexobject object.
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
there are currently two main javascript engines used server-side and both are from the minds at mozilla: mozilla rhino and mozilla spidermonkey.
...the two most well established engines are spidermonkey and rhino, both currently maintained by the mozilla foundation.
...by taking advantage of current scriptmonkey and ajax capabilities not to mention the loads of other features packed into the mozilla firefox browser engine, aptana jaxer fuses the client-side with the server-side, creating a unified “same language” development platform.
Windows Media in Netscape - Archive of obsolete content
ct) { player = new geckoactivexobject("mediaplayer.mediaplayer.1"); } else { // plugin code using navigator.mimetypes player = navigator.mimetypes["application/x-mplayer2"].enabledplugin; } } catch(e) { // handle error -- no wmp control // download: http://www.microsoft.com/windows/windowsmedia/download/default.asp } if (player) { // windows media player control exists } currently, dynamically writing out markup using document.write after using detection mechanisms won't work owing to a bug in netscape 7.1.
...for example: mozilla/5.0 (windows; u; windows nt 5.1; en-us; rv:1.4) gecko/20030624 netscape/7.1 (ax; promostring) although geckoactivexobject is currently available only in netscape 7.1 on windows, it may be the case in the future that it will be available in other gecko-based browsers on other operating systems.
...here's an example of directly instantiating the control programmatically (without an object element) and scripting it: try { var player = null; if (window.activexobject) { player = new activexobject("wmplayer.ocx.7"); } else if(window.geckoactivexobject) { player = new geckoactivexobject("wmplayer.ocx.7"); } } catch(e) { ; } if (player) { player.currentplaylist = player.mediacollection.getbyname('preludesteel'); player.controls.play(); } callbacks from within windows media player to web pages: script for event netscape 7.1 supports ie's <script for="activexcontrol" event="activexcontrolevent"> script elements.
GLSL Shaders - Game development
gl_position is used to store the position of the current vertex.
... go to the cube.html file on github, copy all the javascript code from inside the second <script> element, and paste it into the third <script> element of the current example.
... the texture shader code now we'll add the texture shader to the code — add the code below to the body's second <script> tag: void main() { gl_fragcolor = vec4(0.0, 0.58, 0.86, 1.0); } this will set an rgba color to recreate the current light blue one — the first three float values (ranging from 0.0 to 1.0) represent the red, green, and blue channels while the fourth one is the alpha transparency (ranging from 0.0 — fully transparent — to 1.0 — fully opaque).
3D games on the Web - Game development
there's an ongoing effort on releasing webgl 2.0 (based on opengl es 3.0) in the near future, which will bring many improvements and will help developers build games for the modern web using current, powerful hardware.
...we have information available for you to learn from: 2d collision detection 3d collision detection webxr the concept of virtual reality is not new, but it's storming onto the web thanks to hardware advancements such as the oculus rift, and the (currently experimental) webxr api for capturing information from vr and ar hardware and making it available for use in javascript applications.
... where to go next with this article we just scratched the surface of what's possible with currently available technologies.
Square tilemaps implementation: Scrolling maps - Game development
the camera the camera is an object that holds information about which section of the game world or level is currently being shown.
... cameras can either be free-form, controlled by the player (such as in strategy games) or follow an object (such as the main character in platform games.) regardless of the type of camera, we would always need information regarding its current position, viewport size, etc.
... in the demo provided along with this article, these are the parameters the camera has: x and y: the current position of the camera.
Thread - MDN Web Docs Glossary: Definitions of Web-related terms
this is done using technologies such as web workers, which can be used to spin off a sub-program which runs concurrently with the main thread in a thread of its own.
... a special type of worker, called a service worker, can be created which can be left behind by a site—with the user's permission—to run even when the user isn't currently using that site.
...such as notifying a user they have received new email even though they're not currently logged into their mail service.
Viewport - MDN Web Docs Glossary: Definitions of Web-related terms
a viewport represents a polygonal (normally rectangular) area in computer graphics that is currently being viewed.
... in web browser terms, it refers to the part of the document you're viewing which is currently visible in its window (or the screen, if the document is being viewed in full screen mode).
... the portion of the viewport that is currently visible is called the visual viewport.
Mobile accessibility - Learn web development
if you want to turn talkback off: navigate back to the talkback menu screen (using the different gestures that are currently enabled.) navigate to the slider switch and activate it to turn it off.
...the former provides global options relating to the device as a whole, and the latter provides options relating just to the current app/screen you are in.
... by default, the selected rotor option will be speaking rate; you can currently swipe up and down to increase or decrease the speaking rate.
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.
... ems: 1 em is equal to the font size set on the parent element of the current element we are styling (more specifically, the width of a capital letter m contained inside the parent element.) this can become tricky to work out if you have a lot of nested elements with different font sizes set, but it is doable, as you'll see below.
...this has many values available in case you have many font variants available (such as -light, -normal, -bold, -extrabold, -black, etc.), but realistically you'll rarely use any of them except for normal and bold: normal, bold: normal and bold font weight lighter, bolder: sets the current element's boldness to be one step lighter or heavier than its parent element's boldness.
Other form controls - Learn web development
all browsers that implement the <meter> element use those values to change the color of the meter bar: if the current value is in the prefered part of the range, the bar is green.
... if the current value is in the average part of the range, the bar is yellow.
... if the current value is in the worst part of the range, the bar is red.
Creating hyperlinks - Learn web development
same directory: if you wanted to include a hyperlink inside index.html (the top level index.html) pointing to contacts.html, you would specify the filename that you want to link to, because it's in the same directory as the current file.
...we need to make our links accessible to all readers, regardless of their current context and which tools they prefer.
...and, the lack of a link acts a good visual reminder of which page you are currently on.
Basic math in JavaScript — numbers and operators - Learn web development
when you do this, you'll see a value of 4 returned — this is because the browser returns the current value, then increments the variable.
...if the button is currently saying "start machine" when it is pressed, we change its label to "stop machine", and update the label as appropriate.
... if the button is currently saying "stop machine" when it is pressed, we swap the display back again.
Inheritance in JavaScript - Learn web development
this function basically allows you to call a function defined somewhere else, but in the current context.
...a getter returns the current value of the variable and its corresponding setter changes the value of the variable to the one it defines.
...at this point: to show the current value of the _subject property of the snape object we can use the snape.subject getter method.
Working with JSON - Learn web development
set the <h2> to contain the current hero's name.
... store the powers property in another new constant called superpowers — this contains an array that lists the current hero's superpowers.
... use another for loop to loop through the current hero's superpowers — for each one we create an <li> element, put the superpower inside it, then put the listitem inside the <ul> element (mylist) using appendchild().
Object building practice - Learn web development
an explanation follows: for each ball, we need to check every other ball to see if it has collided with the current ball.
... immediately inside the for loop, we use an if statement to check whether the current ball being looped through is the same ball as the one we are currently checking.
...to do this, we check whether the current ball (i.e., the ball whose collisiondetect method is being invoked) is the same as the loop ball (i.e., the ball that is being referred to by the current iteration of the for loop in the collisiondetect method).
Framework main features - Learn web development
we call this function on line 4, and set count to whatever its current value is, plus one.
...all of them track the current rendered version of your browser's dom, and each makes slightly different decisions about how the dom should change as components in your application re-render.
...the application builds a "diff" to compare the differences between the updated virtual dom and the currently rendered dom, and uses that diff to apply updates to the real dom.
Componentizing our React app - Learn web development
mkdir src/components touch src/components/todo.js our new todo.js file is currently empty!
... tasks as data each of our tasks currently contains three pieces of information: its name, whether it has been checked, and its unique id.
...thing simple: the name of each task: const tasklist = props.tasks.map(task => task.name); let’s try replacing all the children of the <ul> with tasklist: <ul role="list" classname="todo-list stack-large stack-exception" aria-labelledby="list-heading" > {tasklist} </ul> this gets us some of the way towards showing all the components again, but we’ve got more work to do: the browser currently renders each task's name as unstructured text.
Creating our first Vue component - Learn web development
vue templates are currently only allowed a single root element — one element needs to wrap everything inside the template section (this will change when vue 3 comes out).
...however, we're currently not doing anything with the "done" prop — we can check the checkboxes in the ui, but nowhere in the app are we recording whether a todo item is actually done.
...however, we can currently only add one todolist component to the page because the id is hardcoded.
Introduction to automated testing - Learn web development
the dashboard will provide you details related to how many minutes you have consumed, how many concurrent sessions are running, your total number of tests to date, and more.
...this currently only works when testing the safari browser on ios devices.
... features — shows you what features the current configuration supports, e.g.
Introducing a complete toolchain - Learn web development
git is currently the most popular source code revision control tool available to developers — revision control provides many advantages, such as a way to backup your work in a remote place, and a mechanism to work in a team on the same project without fear of overwriting each other's code.
... now copy the contents of the project's src directory to your currently empty src directory.
... putting jsx syntax in the middle of our javascript is going to cause eslint to complain pretty quickly with the current configuration, so we'll need to add a little more configuration to the eslint settings to get it to accept jsx features.
Multiprocess on Windows
ensuring that the interceptor supports your interfaces this information is current, but is likely to change when bug 1346957 is landed.
...however, for various reasons, our com interceptor currently only supports typelib metadata.
... mflag may currently be set to one of two values: arraydata::flag::enone or arraydata::flag::eallocatedbyserver.
Software accessibility: Where are we today?
otherwise, screen magnification programs may be used, which allow zooming in to portions of the screen, while following the mouse or the current focus.
...unfortunately, the unit is not currently produced, although there is occasional talk of resurrecting this useful device.
...the ideal situation would be for adaptive technology professionals to make money on rehab, trainingand support - something there is currently not enough of.
Benchmarking
they are currently reduce to a multiple of 2ms; which is controlled by the privacy.reducetimerprecision about:config flag.
... profiling tools currently the gecko profiler has limitations in the ui for inverted call stack top function analysis which is very useful for finding heavy functions that call into a whole bunch of code.
... currently such functions may be easy to miss looking at a profile, so feel free to also use your favorite native profiler.
Testopia
despite bugzilla 5.0 has already been released a few months ago, we don't plan to release a fix for testopia immediately, because it's currently under heavy work to make testopia a fully self-contained extension, which means that all tr_*.cgi scripts which are currently in the bugzilla/ root directory are being moved into extensions/testopia/lib/.
... the good news is that the current code in the git repository already works with bugzilla 5.0, and so if you upgraded to 5.0 already, and if you don't mind having a work-in-progress extension on your machine, you can decide to pull the code from the git repository.
... requirements as our development has moved forward, we have decided to try to keep abreast of the latest stable release from bugzilla (currently 5.0).
What to do and what not to do in Bugzilla
the build the bug is reported against is more than one stable release old and the bug can't be reproduced with a current build.
... the bug reporter has not responded to questions for one month and the bug can't be reproduced with a current build.
... changing the bug information fields summary you should change the summary if the current one is unclear or does not correctly describe the issue covered by the bug.
Creating reftest-based unit tests
currently, ipc reftests are only being run on linux.
... to run: moz_layers_force_shmem_surfaces=1 make -c $(objdir) reftest-ipc note: right now, automation currently only runs layout/reftests/reftest-sanity/reftest.list!
...create a directory (inside firefox's source code tree) and make that your current directory (i.e.
Configuring Build Options
most modern systems have multiple cores or cpus, and they can be optionally used concurrently to make the build faster.
... the -j flag controls how many parallel builds will run concurrently.
... for example: ac_add_options --disable-optimize --enable-debug mk_add_options moz_objdir=/mozilla/src/obj-@config_guess@ mk_add_options moz_build_projects="browser mail" ac_add_app_options browser --enable-application=browser ac_add_app_options mail --enable-application=comm/mail if you want to build only one project using this mozconfig, use the following command line: moz_current_project=browser ./mach build this will build only the browser.
Makefile - variables
tier build order dependencies - subdirectories for make to traverse prior to building current.
... parallel_dirs a list of subdirectories to build recursively that may be built concurrently.
... dest=$(moz_objdir)/$project moz_current_project moz_debug moz_enable_xremote moz_feeds moz_help_viewer moz_native_nspr moz_metro moz_pkg_mainfest moz_preflight_all moz_rdf moz_toolkit_search ...
Inner and outer windows
consider that when the user is looking at a document in a browser window, not only can the document the user is currently viewing change, but the document's contents can change.
...an inner window represents the actual content being displayed; it's the current view of what the user sees.
...if the document currently being displayed asks "what window am i in?", it gets the outer window as the answer.
Error codes returned by Mozilla APIs
currently, this error only occurs when a file stream is closed.
...xxx currently unused - consider removing.
...xxx currently unused - consider removing.
Multiple Firefox profiles
mac os x multifirefox by dave martorana profile management determining the profile while firefox is running to determine the profile of a currently-running firefox instance in windows, macos or linux, type about:profiles into the browser url search bar.
... when the properties dialog box pops up, you should see a "target" text field that you can edit, and it should show the current file path.
... when the properties dialog box pops up, you should see a "target" text field that you can edit, and it should show the current file path.
mozbrowserfindchange
details the details property returns an anonymous javascript object with the following properties: active a boolean indicating whether a search is currently active (true), or not (false.) searchstring a domstring representing the string that is currently being searched for.
... activematchordinal a number indicating the position of the currently highlighted search result, e.g.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserfindchange", function(event) { console.log("currently highlighted: " + event.details.activematchordinal + " out of " + event.details.numberofmatches); }); related events mozbrowserasyncscroll mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
Creating localizable web applications
define the locale and the direction in the html generate the lang attribute dynamically, depending on the current locale.
...'rtl' : 'ltr' ?>"> </body> </html> notice that <body/> is given a class equal to the current locale.
... echo $tab_labels($tab); // this will display the translation } indicate the language of the pages you link to indicate the language of the pages you link to if it is different from the user's current language.
DMD
in this mode, dmd tracks the current contents of the heap.
...in this mode, dmd tracks both the past and current contents of the heap.
... note: to dump dmd data from content processes, you'll need to disable the sandbox moz_dmd_shutdown_log must (currently) include the trailing separator (''/") post-processing dmd.py also takes options that control how it works.
Leak And Bloat Tests
method current method: measure leaks and bloats, in a similar way to firefox (using xpcom_mem_leak_log and --trace-malloc).
... there are currently no graphs for these results.
... 08/04/2008: prefs.js created via tb with the above settings, the first section is for preferences included in tinderbox, the second section is ones which don't currently get set.
About NSPR
at the time of writing the current generation of nspr was known as nspr20.
...there is a structural representation (i.e., exploded view), routines to acquire the current time from the host system, and convert them to and from the 64-bit and structural representation.
...the current implementation supports macintosh (ppc), win-32 (winnt, win9x) and 20 versions of unix and is still expanding.
PR_Now
returns the current time.
... returns the current time as a prtime value.
... description pr_now() returns the current time as number of microseconds since the nspr epoch, which is midnight (00:00:00) 1 january 1970 utc.
PR_Seek
moves the current read-write file pointer by an offset expressed as a 32-bit integer.
...sets the file pointer to its current location plus the value of the offset parameter.
... description here's an idiom for obtaining the current location of the file pointer for the file descriptor fd: pr_seek(fd, 0, pr_seek_cur) see also if you need to move the file pointer by a large offset that's out of the range of a 32-bit integer, use pr_seek64.
PR_Seek64
moves the current read-write file pointer by an offset expressed as a 64-bit integer.
...sets the file pointer to its current location plus the value of the offset parameter.
... description this is the idiom for obtaining the current location (expressed as a 64-bit integer) of the file pointer for the file descriptor fd: pr_seek64(fd, 0, pr_seek_cur) if the operating system can handle only a 32-bit file offset, pr_seek64 may fail with the error code pr_file_too_big_error if the offset parameter is out of the range of a 32-bit integer.
JSS Provider Notes
this sets the token to be used by the jss jca provider in the current thread.
... when you call getinstance() on a jca class, the jss provider checks the current per-thread default token (by calling cryptomanager.getthreadtoken()) and instructs the new object to use that token for cryptographic operations.
...the current implementation is almost useless.
Mozilla-JSS JCA Provider notes
this sets the token to be used by the jss jca provider in the current thread.
... when you call getinstance() on a jca class, the jss provider checks the current per-thread default token (by calling cryptomanager.getthreadtoken()) and instructs the new object to use that token for cryptographic operations.
...the current implementation is almost useless.
NSS 3.21 release notes
new in nss 3.21 new functionality certutil now supports a --rename option to change a nickname (bug 1142209) tls extended master secret extension (rfc 7627) is supported (bug 1117022) new info functions added for use during mid-handshake callbacks (bug 1084669) new functions in nss.h nss_optionset - sets nss global options nss_optionget - gets the current value of nss global options in secmod.h secmod_createmoduleex - create a new secmodmodule structure from module name string, module parameters string, nss specific parameters string, and nss configuration parameter string.
... in ssl.h ssl_getpreliminarychannelinfo - obtains information about a tls channel prior to the handshake being completed, for use with the callbacks that are invoked during the handshake ssl_signatureprefset - configures the enabled signature and hash algorithms for tls ssl_signatureprefget - retrieves the currently configured signature and hash algorithms ssl_signaturemaxcount - obtains the maximum number signature algorithms that can be configured with ssl_signatureprefset in utilpars.h nssutil_argparsemodulespecex - takes a module spec and breaks it into shared library string, module name string, module parameters string, nss specific parameters string, and nss configuration parameter str...
...or get the minimum dsa key size in pkcs11t.h ckm_tls12_master_key_derive - derives tls 1.2 master secret ckm_tls12_key_and_mac_derive - derives tls 1.2 traffic key and iv ckm_tls12_master_key_derive_dh - derives tls 1.2 master secret for dh (and ecdh) cipher suites ckm_tls12_key_safe_derive and ckm_tls_kdf are identifiers for additional pkcs#12 mechanisms for tls 1.2 that are currently unused in nss.
nss tech note1
it is only needed if the template instructs the decoder to save some data, such as for primitive component types, or for some modifiers where noted.when needed, it tells the decoder where in the target data to save the current component.
...if templates are nested, the offset applies to the location of the current component within the target component, typically the decoded sequence.
...it should be noted that we only support an older specification of asn.1; multibyte tags are not currently supported.
NSS PKCS11 Functions
description secmod_loadusermodule loads a new pkcs #11 module into nss and connects it to the current nss trust infrastructure.
...to retrieve its current value, use ssl_revealpinarg.
...to retrieve its current value, use ssl_revealpinarg.
pkfnc.html
upgraded documentation may be found in the current nss reference pkcs #11 functions chapter 7 pkcs #11 functions this chapter describes the core pkcs #11 functions that an application needs for communicating with cryptographic modules.
...to retrieve its current value, use ssl_revealpinarg.
...to retrieve its current value, use ssl_revealpinarg.
sslintro.html
upgraded documentation may be found in the current nss reference overview of an ssl application chapter 1 overview of an ssl application ssl and related apis allow compliant applications to configure sockets for authenticated, tamper-proof, and encrypted communications.
...changes default values for all subsequently opened sockets as long as the application is running (compare with ssl_seturl which only configures the socket that is currently open).
...retrieves the socket options currently set for a specified socket.
Scripting Java
these packages are likely not in the java package, so you'll need to prefix the package name with "packages." for example, to import the org.mozilla.javascript package you could use importpackage() as follows: $ java org.mozilla.javascript.tools.shell.main js> importpackage(packages.org.mozilla.javascript); js> context.currentcontext; org.mozilla.javascript.context@bb6ab6 occasionally, you will see examples that use the fully qualified name of the package instead of importing using the importpackage() method.
...using a fully qualified name, the above example would look as follows: $ java org.mozilla.javascript.tools.shell.main js> jspackage = packages.org.mozilla.javascript; [javapackage org.mozilla.javascript] js> jspackage.context.currentcontext; org.mozilla.javascript.context@bb6ab6 alternatively, if you want to import just one class from a package you can do so using the importclass() method.
... the above examples could be expressed as follows: $ java org.mozilla.javascript.tools.shell.main js> importclass(packages.org.mozilla.javascript.context); js> context.currentcontext; org.mozilla.javascript.context@bb6ab6 working with java now that we can access java classes, the next logical step is to create an object.
Invariants
that is, they take a parameter cx of type jscontext *, and require that cx is in a request on the current thread.
...as implemented for native objects, the locking is not really that fine-grained, but that is a transparent optimization as long as we follow the rules.) a thread holding a property lock never leaves or suspends the current request.
...the upvar ops depend on a per-context display of currently active stack frames.
JSAPI User Guide
it only creates a new javascript error object and stores it in the context as the current pending exception.
...each of these functions checks, just before it returns, to see if an exception is pending in the current jscontext.
...the most sensitive information they expose to scripts is the current date and time.
JSErrorReport
if null, the error is local to the script in the current html page.
...it will not cause the current operation to fail.
...in the event of an error, filename will either contain the name of the external source file or url containing the script (script src=) or null, indicating that a script embedded in the current html page caused the error.
JS_ClearContextThread
js_endrequest(cx); js_clearcontextthread(cx); /* note: outside the request */ } js_setcontextthread ties cx to the current thread for exclusive use.
... no other thread may use cx until the current thread removes this association by calling js_clearcontextthread.
...(this is always the current thread id when the function is used properly.) js_newcontext automatically associates the new context with the calling thread.
JS_GetElement
find a specified numeric property of an object and return its current value.
...on success, *vp receives the current value of the element, if it exists, and undefined otherwise.
...if the element exists, js_getelement sets *vp to the element's current value.
JS_NewObject
if the parent is null, we use the global object at the end of the scope chain in which the context is currently executing.
... in other words, the context's current scope acts as a default parent.
... if the context is not currently executing any code, we use js_getglobalobject to find a global object associated with the context.
JS_SetOperationCallback
(in this case, the callback may terminate the script by returning js_false.) js_getoperationcallback returns the currently installed operation callback, or null if none is currently installed.
... js_clearoperationcallback clears the current operation callback.
...obsolete since javascript 1.9.1 js_getoperationlimit returns the current operation limit, or js_max_operation_limit if no operation callback is currently installed.
JS_SuspendRequest
suspends the calling thread's current request, if any, to allow the thread to block or perform time-consuming calculations.
... syntax jsrefcount js_suspendrequest(jscontext *cx); void js_resumerequest(jscontext *cx, jsrefcount savedepth); name type description cx jscontext * the context whose current request is to be suspended or resumed.
... js_suspendrequest suspends any currently active requests associated with the context cx.
JS_YieldRequest
momentarily suspend the current jsapi request, allowing garbage collection to run if another thread has requested it.
... syntax void js_yieldrequest(jscontext *cx); name type description cx jscontext * the jscontext that is currently in a request on the calling thread.
... js_yieldrequest momentarily suspends the current request.
Using RAII classes in Mozilla
this involves just one addition to the class, and the inclusion of attributes.h: class moz_raii nsautoscriptblocker {...} this is much simpler and more thorough than the guardobject runtime assertions, but are unfortunately currently only run on mac os x and linux builds, which means that guardobject should still be used for raii guards which may be used in windows-only code.
... assertions runtime assertions offer two benefits - firstly, they run on windows, which the static analysis currently does not, and secondly they will run locally, even if the developer did not choose to run static analysis locally.
... the static analys runtime assertions are often better at catching bugs in code that a developer is currently working on than static analysis, which he might not think to run.
Animated PNG graphics
MozillaTechAPNG
constraints on frame regions: x_offset >= 0 y_offset >= 0 width > 0 height > 0 x_offset + width <= 'ihdr' width y_offset + height <= 'ihdr' height the delay_num and delay_den parameters together specify a fraction indicating the time to display the current frame, in seconds.
... blend_op<code> specifies whether the frame is to be alpha blended into the current output buffer content, or whether it should completely replace its region in the output buffer.
... valid values for <code>blend_op are: value constant description 0 apng_blend_op_source all color components of the frame, including alpha, overwrite the current contents of the frame's output buffer region.
AT APIs Support
firefox extensions) gecko version for firefox and all other gecko-based products: this documentation applies to up-to-date product builds based on gecko 1.9.2 -- currently not available on official releases.
...however it's preferable to grab the current build of firefox or any other gecko-based product to be up to dated: firefox recent builds thunderbird recent builds seamonkey recent builds determining if accessibility is enabled in a firefox accessibility is enabled on windows and linux platforms by default.
... mac platform we currently support only a subset of universal access.
Using XPCOM Components
searchframes boolean attribute that indicates whether to search subframes of current document.
... the iweblock interface lock lock the browser to the current site (or to the whitelist of approved sites read from disk).
...the mozilla embedding project tracks the currently frozen interfaces.
Components.utils
the object currently has the following members: editors!
... dispatch() dispatches a runnable to the current/main thread.
... import() loads a js module into the current script, without sharing a scope.
Components object
in current versions of firefox only a few interfaces required for compatibility are still accessible.
...nsids interfaces array of interfaces by interface name interfacesbyid array of interfaces by iid issuccesscode function to determine if a given result code is a success code lastresult result code of most recent xpconnect call manager the global xpcom component manager results array of known result codes by name returncode pending result for current call stack current javascript call stack utils provides access to several useful features utils.atline provides access to the value of the atline property in the javascript environment.
... utils.import loads a javascript module into the current script, without sharing a scope.
IAccessible2
this is an index into the objects in the current group, not an index into all the objects at the same group level.
...the uniqueid is an identifier for this object, is unique within the current window, and remains the same for the lifetime of the accessible object.
...this value can also be used by an at to determine when the current control has changed.
IAccessibleText
return value s_false if the caret is not currently active on this object, that is the caret is located on some other object.
...it represents the current input position and will therefore typically be queried by at more often than other positions.
...setting the caret position may or may not alter the current selection().
mozISpellCheckingEngine
not currently used.
... dictionary wstring the name of the current dictionary used by check() and suggest().
...not currently used.
nsIAccessibleHyperLink
selected boolean determines whether the element currently has the focus, for example after returning from the destination page.
... note: currently only used with aria links, and the author has to specify that the link is invalid via the aria-invalid='true' attribute.
... return value true if the element currently has the focus.
nsIAccessibleText
n(in long selectionnum); void scrollsubstringto(in long startindex, in long endindex, in unsigned long scrolltype); void scrollsubstringtopoint(in long startindex, in long endindex, in unsigned long coordinatetype, in long x, in long y); void setselectionbounds(in long selectionnum, in long startoffset, in long endoffset); attributes attribute type description caretoffset long the current current caret offset.
...it represents the current input position and will therefore typically be queried by at more often than other positions.
...it represents the current input position and will therefore typically be queried by at more often than other positions.
nsIAccessibleValue
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview boolean setcurrentvalue(in double value); obsolete since gecko 1.9 attributes attribute type description currentvalue double maximumvalue double read only.
... methods setcurrentvalue() obsolete since gecko 1.9 (firefox 3) return a success condition of the value getting set.
...boolean setcurrentvalue( in double value ); parameters value new value for current value.
nsIAppShell
since gecko 1.9 void listentoeventqueue(in nsieventqueue aqueue, in prbool alisten); obsolete since gecko 1.9 void resumenative(); void run(); void runinstablestate(in nsirunnable arunnable); void spindown(); obsolete since gecko 1.9 void spinup(); obsolete since gecko 1.9 void suspendnative(); attributes attribute type description eventloopnestinglevel unsigned long the current event loop nesting level.
...a stable state is reached when the currently executing task/event has finished, (see: webappapis.html#synchronous-section).
... in practice this runs arunnable once the currently executing event finishes.
nsIAutoCompleteInput
disableautocomplete boolean true if auto-complete is currently disabled; otherwise false.
... 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.
nsIBidiKeyboard
currently, this is only implemented on windows.
... methods islangrtl() determines if the current keyboard language is right-to-left.
...return value true if the current keyboard is right-to-left, false if it is not.
nsIContentViewer
sticky boolean methods clearhistoryentry() clears the current history entry.
... note: if the document is currently being printed, it will not be saved in session history.
...boolean permitunload( in boolean acallercloseswindow optional ); parameters acallercloseswindow optional indicates that the current caller will close() the window.
nsIDOMHTMLAudioElement
last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsidomhtmlmediaelement method overview unsigned long long mozcurrentsampleoffset(); void mozsetup(in pruint32 channels, in pruint32 rate); [implicit_jscontext] unsigned long mozwriteaudio(in jsval data); methods mozcurrentsampleoffset() non-standard this feature is non-standard and is not on a standards track.
... returns the current offset of the audio stream, specified as the number of samples that have played since the beginning of the stream.
... unsigned long long mozcurrentsampleoffset(); parameters none.
nsIDOMNSHTMLDocument
return value the text of the current selection, the same as window.getselection.tostring().
... return value returns true if the command is supported on the current range, false otherwise.
...for the gethtml command, the current selection is returned as an html source fragment.
nsIDOMStorageWindow
localstorage nsidomstorage local storage for the current browsing context.
... moz_indexeddb nsiidbfactory indexed databases for the current browsing context.
... sessionstorage nsidomstorage session storage for the current browsing context.
nsIEditorMailSupport
ean ainserthtml); nsidomnode insertasquotation(in astring aquotedtext); void inserttextwithquotations(in domstring astringtoinsert); void pasteascitedquotation(in astring acitation, in long aselectiontype); void pasteasquotation(in long aselectiontype); void rewrap(in boolean arespectnewlines); void stripcites(); methods getembeddedobjects() get a list of img and object tags in the current document.
...return value an nsisupportsarray containing the img and object tags of the current document.
...inserttextwithquotations() inserts a plain text string at the current location, with special processing for lines beginning with ">", which will be treated as mail quotes and inserted as plain text quoted blocks.
nsIMemoryReporter
each reporter starts with an empty string for this value, indicating that it applies to the current process; this is true even for reporters in a child process.
... units_count 1 the amount is an instantaneous count of things currently in existence.
... for example, the number of tabs currently open.
nsIMsgWindow
openfolder nsimsgfolder this is used to track the folder currently open in the ui.
... notificationcallbacks nsiinterfacerequestor these are currently used to set notification callbacks on protocol channels to handle things like bad cert exceptions.
... mailcharacterset acstring this is used to track the character set of the currently displayed message.
nsINavHistoryContainerResultNode
state unsigned short the current state of the container.
...arecursive if true, the search will recurse through all child containers of the current container; if false, only direct children of the container are searched.
...exceptions thrown ns_error_not_available the containeropen attribute is currently false, indicating that the node isn't open for access.
nsINavHistoryQuery
[retval,array,size_is(count)] out unsigned long transitions); void setfolders([const,array, size_is(foldercount)] in long long folders, in unsigned long foldercount); void settransitions([const,array, size_is(count)] in unsigned long transitions, in unsigned long count); attributes attribute type description absolutebegintime prtime read only: retrieves the begin time value that the currently loaded reference points + offset resolve to.
... absoluteendtime prtime read only: retrieves the end time value that the currently loaded reference points + offset resolve to.
...we don't currently support >1 annotation name per query.
Component; nsIPrefBranch
interfaces currently supported are: nsilocalfile nsisupportsstring (unichar) (removed as of gecko 58 in favor of getstringpref) nsipreflocalizedstring (localized unichar) nsifilespec (deprecated - to be removed eventually) avalue the xpcom object into which to the complex preference value should be retrieved.
...interfaces currently supported are: nsilocalfile nsisupportsstring (unichar) (removed as of gecko 58 in favor of setstringpref) nsipreflocalizedstring (localized unichar) nsifilespec (deprecated - to be removed eventually) avalue the xpcom object from which to set the complex preference value.
... the nsprefbranch object listens for xpcom-shutdown and frees all of the objects currently in its observer list.
nsIRequest
methods cancel() cancels the current request.
... resume() resumes the current request.
... suspend() suspends the current request.
nsISelectionController
void wordmove(in boolean forward, in boolean extend); attributes attribute type description caretvisible boolean this is true if the caret is enabled, visible, and currently blinking.
... checkvisibility() checks if textnode and offsets are actually rendered in the current precontext.
... getcaretenabled() gets the current state of the caret, as set by setcaretenabled().
nsIToolkitProfileService
sitoolkitprofile createprofile(in nsilocalfile arootdir, in autf8string aname); void flush(); nsitoolkitprofile getprofilebyname(in autf8string aname); nsiprofilelock lockprofilepath(in nsilocalfile adirectory, in nsilocalfile atempdirectory); attributes attribute type description profilecount unsigned long the number of user profiles currently in existence.
...(not the profile currently in use.) not sure what happens if you change this setting but someone said: you can change profiles by setting this attribute's value.
... this may throw an ns_error_failure (0x80004005) when trying to get the current profile if it's unavailable or if permissions restrict access.
nsITreeSelection
; boolean isselected(in long index); void rangedselect(in long startindex, in long endindex, in boolean augment); void select(in long index); void selectall(); void timedselect(in long index, in long delay); void toggleselect(in long index); attributes attribute type description count long the number of rows currently selected in this tree.
... currentcolumn nsitreecolumn the current column.
... currentindex long the current item (the one with focus).
nsIUpdateChecker
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void checkforupdates(in nsiupdatechecklistener listener, in boolean force); void stopchecking(in unsigned short duration); constants constant value description current_check 1 constant for the stopchecking() method indicating that only the current update check should be stopped.
... current_session 2 constant for the stopchecking() method indicating that all update checks during the current session should be stopped.
...force if true, the update checker checks for updates, regardless of the current value of the user's update settings.
nsIWebProgressListener
acurselfprogress the current progress for arequest.
... acurtotalprogress the current progress for all requests associated with awebprogress.
...instead, it is a numeric value that indicates the current status of the request.
nsIWebProgressListener2
acurselfprogress the current progress for arequest.
...acurtotalprogress the current progress for all requests associated with awebprogress.
...asameuri true if awebprogress is requesting a refresh of the current uri.
nsIWindowsShellService
a rgb value, where (r << 24 | g << 16 | b) obsolete since gecko 1.8 unreadmailcount unsigned long the number of unread mail messages for the current user.
...obsolete since gecko 1.8 hkcc 1 hkey_current_config.
... obsolete since gecko 1.8 hkcu 2 hkey_current_user.
nsIXULBrowserWindow
this may be used, for example, to redirect links into new tabs or windows when it's not desirable to replace the content in the current tab (such as when the link is clicked in an app tab).
... setoverlink() tells the object implementing this function what link we are currently over.
...element the currently targeted link element.
nsIXULRuntime
is64bit boolean indicates whether the current firefox build is 64-bit.
... os autf8string a string tag identifying the current operating system.
... xpcomabi autf8string a string tag identifying the binary abi of the current processor and compiler vtable.
XPCOM reference
there are currently three folder classes - nslocalmailfolder, nsimapmailfolder, and nsnewsfolder.
...it is (as far as i can tell) not currently used anywhere in thunderbird.nsmsgviewcommandtypethe nsmsgviewcommandtype interface contains constants used for commands in thunderbird.
... xpcom modules.standard xpcom componentsthere are a number of components provided in the standard implementation of xpcom; these are as follows.xpcom glue classesthese "glue" classes are provided to make it easier to use xpcom from c++ code.xpcom interface referencethis is a reference to the xpcom interfaces provided by the mozilla platform.xpcom interface reference by groupingthis page lists the current (as of dec.
Xptcall Porting Status
currently the code is dependent on the g++ name mangling convention and a few gnu extensions so i'm not sure how useful it will be for the other systems.
...i am currently working on making testxpc function correctly.
... i am doing the porting work with egcs-1.1.2 on netbsd 1.4p (netbsd-current snapshot from a couple of days ago).
Address Book examples
this is currently true in the case of ldap, but may be true in other cases as well.
...my value = card.getproperty("random1"); note: local (mork) address books are currently the only built-in type of address book that supports saving of non-built-in properties.
...rscreen", {selectedab:selectedab}); edit list dialog window.opendialog("chrome://messenger/content/addressbook/abeditlistdialog.xul", "", "chrome,resizable=no,titlebar,modal,centerscreen", {abcard:abcard, listuri:listuri}); new address book dialog unlike the edit address book dialog, the new address book dialog does not currently have the facility to get the chrome uri based on the address book type.
Autoconfiguration in Thunderbird
mechanisms thunderbird gets the server settings via different means, each of which is intended for different cases: ispdb the ispdb is a central database, currently hosted by the thunderbird project, but free to use for any client.
..., the lookup is performed as (in this order): tb-install-dir/isp/example.com.xml on the harddisk check for autoconfig.example.com look up of "example.com" in the ispdb look up "mx example.com" in dns, and for mx1.mail.hoster.com, look up "hoster.com" in the ispdb try to guess (imap.example.com, smtp.example.com etc.) we may add dns srv records as supported mechanism in the future, but we currently do not.
... current process: file a bug in bugzilla, product "webtools", component "ispdb database entries", with a configuration file that matches the requirements described below.
Add to iPhoto
if (document.getelementbyid("contentareacontextmenu")) { document.getelementbyid("contentareacontextmenu").addeventlistener("popupshowing", iphoto.onpopup, false); } responding when the context menu is clicked when the user right-clicks an image, our handler gets called: onpopup: function() { var node = iphoto.getcurrentnode(); var item = document.getelementbyid("add-to-iphoto_menuitem"); if (item) { item.hidden = (node == null); // hide it if we're not on an image } } this code finds the image node the user right-clicked in by calling our getcurrentnode() method, then sets the hidden state of the "add image to iphoto" menu item based on whether or not an image node was found.
... the code to identify the node looks like this: getcurrentnode: function() { var node = document.popupnode; // if no node, just return null now if (node == undefined || !node) { return null; } // is it an image node?
... add: function() { var node = iphoto.getcurrentnode(); if (node) { var src = node.getattribute("src"); // get the url of the image if (src && src != "") { iphoto.addimagebyurl(src); } } } this fetches the node representing the image the user wants to add, and, if it's an image, fetches the image's url from its src attribute, then passes it into our addimagebyurl() method, which will do all the heavy lifting.
Introduction to DOM Inspector - Firefox Developer Tools
inspecting content documents the inspect content document menupopup can be accessed from the file menu, and it will list currently loaded content documents.
... inspecting chrome documents the inspect chrome document menupopup can be accessed from the file menu , and it will contain the list of currently loaded chrome windows and subdocuments.
...the rule that applies the search icon to the element uses a class simple selector and uses a list-style-image property to point to a file in the current theme.
Debugger.Source - Firefox Developer Tools
currently only entire modules evaluated via new webassembly.module are represented.
...currently, the text is an s-expression based syntax.
...if one assigns a function, that function’s script’s source doesnot belong to the dom element; the function’s definition must appear elsewhere.) (if the sources attached to a dom element change, the debugger.source instances representing superceded code still refer to the dom element; this accessor only reflects origins, not current relationships.) elementattributename if this source belongs to a dom element because it is an event handler content attribute or an event handler idl attribute, this is the name of that attribute, a string.
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
dbg.uncaughtexceptionhook = handleuncaughtexception; // find the current tab's main content window.
...make sure the current browser tab is displaying this page.
...this begins logging allocations in the current browser tab.
Network monitor toolbar - Firefox Developer Tools
throttling menu, to simulate various connection types a menu of other actions: persist logs: by default, the network monitor is cleared each time you navigate to a new page or reload the current page.
... save all as har opens a file dialog box so you can save the current contents of the network log as a har file with the extension .har.
... copy all as har copies the current contents of the network log to the clipboard in har format.
Work with animations - Firefox Developer Tools
the timeline starts at the start of the first animation, ends at the end of the last animation, and is labeled with markers every 250 milliseconds (this depends on the time scale of the animations currently displayed).
... animation playback at the top of the animation inspector: there are buttons to play/pause and restart the animation there's a dropdown to change the animation playback rate the current time in the animation is displayed.
...in this case, the message is "animations of 'transform' cannot be run on the compositor when geometric properties are animated on the same element at the same time." edit @keyframes any @keyframes rules associated with the currently selected element are displayed in the rules view and are editable: edit timing functions when you create a css animation you can specify a timing function: this determines the rate at which the animation progresses.
Page inspector keyboard shortcuts - Firefox Developer Tools
end end end expand currently selected node right arrow right arrow right arrow collapse currently selected node left arrow left arrow left arrow (when a node is selected) move inside the node so you can start stepping through attributes.
...+ tab start editing property or value (rules view only, when a property or value is selected, but not already being edited) enter or space return or space enter or space cycle up and down through auto-complete suggestions (rules view only, when a property or value is being edited) up arrow , down arrow up arrow , down arrow up arrow , down arrow choose current auto-complete suggestion (rules view only, when a property or value is being edited) enter or tab return or tab enter or tab increment selected value by 1 up arrow up arrow up arrow decrement selected value by 1 down arrow down arrow down arrow increment selected value by 100 shift + page up shift + page up shift + page up de...
... show/hide more information about current property (computed view only, when a property is selected) enter or space return or space enter or space open mdn reference page about current property (computed view only, when a property is selected) f1 f1 f1 open current css file in style editor (computed view only, when more information is shown for a property and a css file reference is focused).
Settings - Firefox Developer Tools
as of firefox 62, if the option to "select an iframe as the currently targeted document" is checked, the icon will appear in the toolbar while the settings tab is displayed, even if the current page doesn't include any iframes.
... detect indentation auto-indent new lines based on the current indentation.
... disable javascript reload the current tab with javascript disabled.
Cookies - Firefox Developer Tools
that is, the domain value matches exactly the domain of the current website.
... delete all - deletes all cookies for the current host.
... delete all session cookies - deletes all cookies for the current host that are scheduled to be deleted when the browser shuts down ...
Toolbox - Firefox Developer Tools
by default this array includes: toggle split console responsive design mode select a frame as the currently targeted document (this is only included by default from firefox 41 onwards).
... main pane the content of the main pane in the window is entirely controlled by, and specific to, the hosted tool currently selected.
... f1 f1 f1 toggle toolbox between the last 2 docking modes ctrl + shift + d cmd + shift + d ctrl + shift + d toggle split console (except if console is the currently selected tool) esc esc esc these shortcuts work in all tools that are hosted in the toolbox.
Web Console Helpers - Firefox Developer Tools
$0 the currently-inspected element in the page.
... :screenshot creates a screenshot of the current page with the supplied filename.
...with this parameter, even the parts of the webpage which are outside the current bounds of the window will be included in the screenshot.
AmbientLightSensor.illuminance - Web APIs
the illuminance property of the ambientlightsensor interface returns the current light level in lux of the ambient light level around the hosting device.
... syntax var level = ambientlightsensor.illuminance value a number indicating the current light level in lux.
... example if ( 'ambientlightsensor' in window ) { const sensor = new ambientlightsensor(); sensor.onreading = () => { console.log('current light level:', sensor.illuminance); }; sensor.onerror = (event) => { console.log(event.error.name, event.error.message); }; sensor.start(); } specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
AmbientLightSensor - Web APIs
the ambientlightsensor interface of the the sensor apis returns the current light level or illuminance of the ambient light around the hosting device.
... properties ambientlightsensor.illuminance returns the current light level in lux of the ambient light level around the hosting device.
... example if ( 'ambientlightsensor' in window ) { const sensor = new ambientlightsensor(); sensor.onreading = () => { console.log('current light level:', sensor.illuminance); }; sensor.onerror = (event) => { console.log(event.error.name, event.error.message); }; sensor.start(); } specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
AnalyserNode.getByteTimeDomainData() - Web APIs
the getbytetimedomaindata() method of the analysernode interface copies the current waveform, or time-domain, data into a uint8array (unsigned byte array) passed into it.
... return value void | none example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
... analyser.fftsize = 2048; const bufferlength = analyser.fftsize; const dataarray = new uint8array(bufferlength); analyser.getbytetimedomaindata(dataarray); // draw an oscilloscope of the current audio source function draw() { drawvisual = requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray); canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; const slicewidth = width * 1.0 / bufferlength; let x = 0; canvasctx.beginpath(); for(var i = 0; i < bufferlen...
AnalyserNode.smoothingTimeConstant - Web APIs
it's basically an average between the current buffer and the last buffer the analysernode processed, and results in a much smoother set of value changes over time.
... if 0 is set, there is no averaging done, whereas a value of 1 means "overlap the previous and current buffer quite a lot while computing the value", which essentially smoothes the changes across analysernode.getfloatfrequencydata/analysernode.getbytefrequencydata calls.
... example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
AudioBufferSourceNode.start() - Web APIs
if when is less than (audiocontext.currenttime, or if it's 0, the sound begins to play at once.
...the computation of the offset into the sound is performed using the sound buffer's natural sample rate, rather than the current playback rate, so even if the sound is playing at twice its normal speed, the midway point through a 10-second audio buffer is still 5.
... source.start(audioctx.currenttime + 1,3,10); for a more complete example showing start() in use, check out our audiocontext.decodeaudiodata() example, you can also run the code example live, or view the source.
AudioContext.getOutputTimestamp() - Web APIs
the getoutputtimestamp() property of the audiocontext interface returns a new audiotimestamp object containing two audio timestamp values relating to the current audio context.
... the two values are as follows: audiotimestamp.contexttime: the time of the sample frame currently being rendered by the audio output device (i.e., output audio stream position), in the same units and origin as the context's audiocontext.currenttime.
... contexttime: a point in the time coordinate system of the currenttime for the baseaudiocontext; the time after the audio context was first created.
AudioContext - Web APIs
it's recommended to create one audiocontext and reuse it instead of initializing a new one each time, and it's ok to use a single audiocontext for several different audio source and pipeline concurrently.
... audiocontext.outputlatency read only returns an estimation of the output latency of the current audio context.
... audiocontext.getoutputtimestamp() returns a new audiotimestamp object containing two audio timestamp values relating to the current audio context.
AudioListener.dopplerFactor - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
AudioListener.forwardX - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
AudioListener.forwardY - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
AudioListener.forwardZ - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
AudioListener.positionX - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
AudioListener.positionY - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
AudioListener.positionZ - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
AudioListener.setOrientation() - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
AudioListener.setPosition() - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
AudioListener.speedOfSound - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
AudioListener.upX - Web APIs
WebAPIAudioListenerupX
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
AudioListener.upY - Web APIs
WebAPIAudioListenerupY
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
AudioListener.upZ - Web APIs
WebAPIAudioListenerupZ
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
AudioParam.setValueAtTime() - Web APIs
the setvalueattime() method of the audioparam interface schedules an instant change to the audioparam value at a precise time, as measured against audiocontext.currenttime.
...when the buttons are pressed, the currgain variable is incremented/decremented by 0.25, then the setvalueattime() method is used to set the gain value equal to currgain, one second from now (audioctx.currenttime + 1.) // create audio context var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); // set basic variables for example var myaudio = document.queryselector('audio'); var pre = document.queryselector('pre'); var myscript = document.queryselector('script'); pre.innerhtml = myscript.innerhtml; var targetattimeplus = document.queryselector('.s...
...de = audioctx.creategain(); gainnode.gain.value = 0.5; var currgain = gainnode.gain.value; // connect the audiobuffersourcenode to the gainnode // and the gainnode to the destination source.connect(gainnode); gainnode.connect(audioctx.destination); // set buttons to do something onclick targetattimeplus.onclick = function() { currgain += 0.25; gainnode.gain.setvalueattime(currgain, audioctx.currenttime + 1); } targetattimeminus.onclick = function() { currgain -= 0.25; gainnode.gain.setvalueattime(currgain, audioctx.currenttime + 1); } specifications specification status comment web audio apithe definition of 'setvalueattime' in that specification.
AudioScheduledSourceNode.start() - Web APIs
this value is specified in the same time coordinate system as the audiocontext is using for its currenttime attribute.
...the times are calculated by adding the desired number of seconds to the context's current time stamp returned by audiocontext.currenttime.
... context = new audiocontext(); osc = context.createoscillator(); osc.connect(context.destination); /* schedule the start and stop times for the oscillator */ osc.start(context.currenttime + 2); osc.stop(context.currenttime + 3); specifications specification status comment web audio apithe definition of 'start()' in that specification.
AudioScheduledSourceNode.stop() - Web APIs
this value is specified in the same time coordinate system as the audiocontext is using for its currenttime attribute.
...the stop time is determined by taking the audio context's current time from audiocontext.currenttime and adding 1 second.
...*/ osc.start(); osc.stop(context.currenttime + 1); specifications specification status comment web audio apithe definition of 'stop()' in that specification.
AudioWorkletProcessor.process - Web APIs
important: currently, audio data blocks are always 128 frames long—that is, they contain 128 32-bit floating-point samples for each of the inputs' channels.
... if the automation rate of the parameter is "a-rate", the array will contain 128 values — one for each frame in the current audio block.
... if there's no automation happening during the time represented by the current block, the array may contain a single value that is constant for the entire block, instead of 128 identical values.
BaseAudioContext.createPanner() - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
CanvasRenderingContext2D.drawWindow() - Web APIs
would draw the contents of the current window, in the rectangle (0,0,100,200) in pixels relative to the top-left of the viewport, on a white background, into the canvas.
...it will be scaled, rotated and so on according to the current transformation.
... specifications not part of any current specification or draft.
CanvasRenderingContext2D.fillRect() - Web APIs
the canvasrenderingcontext2d.fillrect() method of the canvas 2d api draws a rectangle that is filled according to the current fillstyle.
... this method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it.
...the fill style is determined by the current fillstyle attribute.
CanvasRenderingContext2D.lineTo() - Web APIs
the canvasrenderingcontext2d method lineto(), part of the canvas 2d api, adds a straight line to the current sub-path by connecting the sub-path's last point to the specified (x, y) coordinates.
... like other methods that modify the current path, this method does not directly render anything.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); // start a new path ctx.moveto(30, 50); // move the pen to (30, 50) ctx.lineto(150, 100); // draw a line to (150, 100) ctx.stroke(); // render the path result drawing connected lines each call of lineto() (and similar methods) automatically adds to the current sub-path, which means that all the lines will all be stroked or filled together.
CanvasRenderingContext2D.translate() - Web APIs
the canvasrenderingcontext2d.translate() method of the canvas 2d api adds a translation transformation to the current matrix.
... syntax void ctx.translate(x, y); the translate() method adds a translation transformation to the current matrix by moving the canvas and its origin x units horizontally and y units vertically on the grid.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // moved square ctx.translate(110, 30); ctx.fillstyle = 'red'; ctx.fillrect(0, 0, 80, 80); // reset current transformation matrix to the identity matrix ctx.settransform(1, 0, 0, 1, 0, 0); // unmoved square ctx.fillstyle = 'gray'; ctx.fillrect(0, 0, 80, 80); result the moved square is red, and the unmoved square is gray.
Hit regions and accessibility - Web APIs
the api has the following three methods (which are still experimental in current web browsers; check the browser compatibility tables).
... canvasrenderingcontext2d.drawfocusifneeded() if a given element is focused, this method draws a focus ring around the current path.
... canvasrenderingcontext2d.scrollpathintoview() scrolls the current path or a given path into the view.
ContentIndex - Web APIs
contentindex.delete unregisters an item from the currently indexed content.
...synchronous function to add indexed content async function registercontent(data) { const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.message); } } retrieving items within the current index the below example shows an asynchronous function that retrieves items within the content index and iterates over each entry, building a list for the interface.
... registration = await navigator.serviceworker.ready; // get our index entries const entries = await registration.index.getall(); // create a containing element const readinglistelem = document.createelement('div'); // test for entries if (!array.length) { // if there are no entries, display a message const message = document.createelement('p'); message.innertext = 'you currently have no articles saved for offline reading.' readinglistelem.append(message); } else { // if entries are present, display in a list of links to the content const listelem = document.createelement('ul'); for (const entry of entries) { const listitem = document.createelement('li'); const anchorelem = document.createelement('a'); anchorelem.innertext = entr...
Content Index API - Web APIs
the content index api is an extension to service workers, which allows developers to add urls and metadata of already cached pages, under the scope of the current service worker.
...synchronous function to add indexed content async function registercontent(data) { const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.message); } } retrieving items within the current index the below example shows an asynchronous function that retrieves items within the content index and iterates over each entry, building a list for the interface.
... registration = await navigator.serviceworker.ready; // get our index entries const entries = await registration.index.getall(); // create a containing element const readinglistelem = document.createelement('div'); // test for entries if (!array.length) { // if there are no entries, display a message const message = document.createelement('p'); message.innertext = 'you currently have no articles saved for offline reading.' readinglistelem.append(message); } else { // if entries are present, display in a list of links to the content const listelem = document.createelement('ul'); for (const entry of entries) { const listitem = document.createelement('li'); const anchorelem = document.createelement('a'); anchorelem.innertext = entr...
EXT_disjoint_timer_query.getQueryEXT() - Web APIs
must be ext.current_query_ext or ext.query_counter_bits_ext.
... return value depends on pname: if pname is ext.current_query_ext: a webglquery object, which is the currently active query for the given target.
... examples var ext = gl.getextension('ext_disjoint_timer_query'); var startquery = ext.createqueryext(); ext.querycounterext(startquery, ext.timestamp_ext); var currentquery = ext.getqueryext(ext.timestamp_ext, ext.current_query_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_disjoint_timer_query - Web APIs
ext.current_query_ext a webglquery object, which is the currently active query for the given target.
... ext.timestamp_ext the current time.
... ext.querycounterext() records the current time into the corresponding query object.
Element.msZoomTo() - Web APIs
WebAPIElementmsZoomTo
if no value is specified, defaults to the current centerpoint of visible content, horizontally.
...if no value is specified, defaults to the current centerpoint of visible content, vertically.
...if no value is specified, defaults to the current zoom level (no additional zoom occurs).this argument is ignored if the element is not zoomable.
Comparison of Event Targets - Web APIs
there are five targets to consider: property defined in purpose event.target dom event interface the dom element on the lefthand side of the call that triggered this event, eg: element.dispatchevent(event) event.currenttarget dom event interface the eventtarget whose eventlisteners are currently being processed.
... .standard { background-color: #99ff99; } .non-standard { background-color: #902d37; } </style> </head> <body> <table> <thead> <tr> <td class="standard">original target dispatching the event <small>event.target</small></td> <td class="standard">target who's event listener is being processed <small>event.currenttarget</small></td> <td class="standard">identify other element (if any) involved in the event <small>event.relatedtarget</small></td> <td class="non-standard">if there was a retargetting of the event for some reason <small> event.explicitoriginaltarget</small> contains the target before retargetting (never contains anonymous targets)</td> <td class="non-standar...
...d">if there was a retargetting of the event for some reason <small> event.originaltarget</small> contains the target before retargetting (may contain anonymous targets)</td> </tr> </thead> <tr> <td id="target"></td> <td id="currenttarget"></td> <td id="relatedtarget"></td> <td id="explicitoriginaltarget"></td> <td id="originaltarget"></td> </tr> </table> <p>clicking on the text will show the difference between explicitoriginaltarget, originaltarget, and target</p> <script> function handleclicks(e) { document.getelementbyid('target').innerhtml = e.target; document.getelementbyid('currenttarget').innerhtml = e.currenttarget; document.getelementbyid('relatedtarget').innerhtml = e.relatedtarget; document.g...
File.lastModified - Web APIs
WebAPIFilelastModified
files without a known last modified date return the current date.
...if it is missing, lastmodified inherits the current time from date.now() at the moment the file object gets created.
... const filewithdate = new file([], 'file.bin', { lastmodified: new date(2017, 1, 1), }); console.log(filewithdate.lastmodified); //returns 1485903600000 const filewithoutdate = new file([], 'file.bin'); console.log(filewithoutdate.lastmodified); //returns current time reduced time precision to offer protection against timing attacks and fingerprinting, the precision of somefile.lastmodified might get rounded depending on browser settings.
FileSystemEntrySync - Web APIs
you cannot do the following: move a directory inside itself or to any child at any depth move an entry into its parent if a name different from its current one isn't provided move a file to a path occupied by a directory or move a directory to a path occupied by a file move any element to a path occupied by a directory that is not empty.
...if you do not specify a name, the browser preserves the entry's current name.
...if you do not specify a name, the browser preserves the filesystementrysync's current name.
FileHandle API - Web APIs
it's possible to get a file object representing the current state of the file handled by the filehandle object by using the getfile method.
...discussions on public-webapps led to the conclusion that the api would behave poorly in the case of different entities writing concurrently to the same file.
...as it does not fully match the current implementation, be warned that the implementation and/or the specification will be subject to changes.
File and Directory Entries API - Web APIs
because this is a non-standard api, whose specification is not currently on a standards track, it's important to keep in mind that not all browsers implement it, and those that do may implement only small portions of it.
... getting access to a file system there are two ways to get access to file systems defined in the current specification draft: when handling a drop event for drag and drop, you can call datatransferitem.webkitgetasentry() to get the filesystementry for a dropped item.
... the htmlinputelement.webkitentries property lets you access the filesystemfileentry objects for the currently selected files, but only if they are dragged-and-dropped onto the file chooser (bug 1326031).
FontFace - Web APIs
WebAPIFontFace
it allows control of the source of the font face, being a url to an external resource, or a buffer; it also allows control of when the font face is loaded and its current status.
... fontface.loaded read only returns a promise that resolves with the current fontface object when the font specified in the object's constructor is done loading or rejects with a syntaxerror.
... fontface.load() loads a font based on current object's constructor-passed requirements, including a location or source buffer, and returns a promise that resolves with the current fontface object.
GamepadButton - Web APIs
the gamepadbutton interface defines an individual button of a gamepad or other controller, allowing access to the current state of different types of buttons available on the control device.
... properties gamepadbutton.value read only a double value used to represent the current state of analog buttons, such as the triggers on many modern gamepads.
... gamepadbutton.pressed read only a boolean value indicating whether the button is currently pressed (true) or unpressed (false).
GlobalEventHandlers.ondragend - Web APIs
rop global event attribute</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's border to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer...
....getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragenter_handler(ev) { console.log("dragenter"); // change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's border back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
... var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's border back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = 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...
GlobalEventHandlers.ondragenter - Web APIs
rop global event attribute</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's border to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer...
....getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragenter_handler(ev) { console.log("dragenter"); // change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's border back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
... var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's border back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = 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...
GlobalEventHandlers.ondragexit - Web APIs
rop global event attribute</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's border to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer...
....getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragenter_handler(ev) { console.log("dragenter"); // change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's border back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
... var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's border back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = 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...
GlobalEventHandlers.ondragleave - Web APIs
drag and drop global event attribute</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's border to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's background color to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.da...
...tatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragenter_handler(ev) { console.log("dragenter"); // change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's background color back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
... var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's background color back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = 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, ...
HTMLAudioElement - Web APIs
mozcurrentsampleoffset() returns the number of samples form the beginning of the stream that have been written so far into the audio stream created by calling mozwriteaudio().
... mozwriteaudio() writes a batch of audio frames to the stream at the current offset, returning the number of bytes actually written to the stream.
... some of the more commonly used properties of the audio element include src, currenttime, duration, paused, muted, and volume.
HTMLElement - Web APIs
htmlelement.offsetparent read only returns a element that is the element from which all offset calculations are currently computed.
... htmlorforeignelement.blur() removes keyboard focus from the currently focused element.
... htmlorforeignelement.focus() makes the element the current keyboard focus.
HTMLImageElement.align - Web APIs
bottom the bottom edge of the image is to be aligned vertically with the current text baseline.
... middle the center of the object should be aligned vertically with the current baseline.
... top the top edge of the object should be aligned vertically with the current baseline.
HTMLImageElement - Web APIs
htmlimageelement.currentsrc read only returns a usvstring representing the url from which the currently displayed image was loaded.
... the specified src url is the same as the url of the page the user is currently on.
... living standard the following properties have been added: srcset, currentsrc and sizes.
HTMLLinkElement - Web APIs
htmllinkelement.disabled is a boolean which represents whether the link is disabled; currently only used with style sheet links.
... note: currently the w3c html 5.2 spec states that rev is no longer obsolete, whereas the whatwg living standard still has it labeled obsolete.
...note that currently firefox only supports preloading of cacheable resources.
HTMLMediaElement: loadeddata event - Web APIs
the loadeddata event is fired when the frame at the current playback position of the media has finished loading; often the first frame.
...the readystate just increased to ' + 'have_current_data or greater for the first time.'); }); using the onloadeddata event handler property: const video = document.queryselector('video'); video.onloadeddata = (event) => { console.log('yay!
... the readystate just increased to ' + 'have_current_data or greater for the first time.'); }; specifications specification status html living standardthe definition of 'loadeddata media event' in that specification.
HTMLMediaElement.readyState - Web APIs
have_current_data 2 data is available for the current playback position, but not enough to actually play more than one frame.
... have_future_data 3 data for the current playback position as well as for at least a little bit of time into the future is available (in other words, at least two frames of video, for example).
...it will then check if at least the current playback position has been loaded.
HTMLMediaElement: timeupdate event - Web APIs
the timeupdate event is fired when the time indicated by the currenttime attribute has been updated.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('timeupdate', (event) => { console.log('the currenttime attribute has been updated.
... again.'); }); using the ontimeupdate event handler property: const video = document.queryselector('video'); video.ontimeupdate = (event) => { console.log('the currenttime attribute has been updated.
HTMLTableCellElement - Web APIs
header cells can be configured, using the scope property, the apply to a specified row or column, or to the not-yet-scoped cells within the current row group (that is, the same ancestor <thead>, <tbody>, or <tfoot> element).
... colgroup the header cell applies to all cells in the current column group that do not already have a scope applied to them.
... rowgroup the header cell applies to all cells in the current row group that do not already have a scope applied to them.
Using microtasks in JavaScript with queueMicrotask() - Web APIs
javascript promises and the mutation observer api both use the microtask queue to run their callbacks, but there are other times when the ability to defer work until the current event loop pass is wrapping up.
...only tasks which were already in the task queue when the event loop pass began will be executed during the current iteration.
... simply pass the javascript function to call while the context is handling microtasks into the queuemicrotask() method, which is exposed on the global context as defined by either the window or worker interface, depending on the current execution context.
The HTML DOM API - Web APIs
datatransfer datatransferitem datatransferitemlist dragevent page history interfaces the history api interfaces let you access information about the browser's history, as well as to shift the browser's current tab forward and backward through that history.
... eventsource examples in this example, an <input> element's input event is monitored in order to update the state of a form's "submit" button based on whether or not a given field currently has a value.
...this code looks at the length of the current value of the input; if it's zero, then the "send" button is disabled if it's not already disabled.
IDBCursor.delete() - Web APIs
WebAPIIDBCursordelete
invalidstateerror the cursor was created using idbindex.openkeycursor, is currently being iterated, or has iterated past its end.
...if the albumtitle of the current cursor is "grace under pressure", we delete that entire record using var request = cursor.delete();.
...also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
IDBCursor.primaryKey - Web APIs
the primarykey read-only property of the idbcursor interface returns the cursor's current effective key.
... if the cursor is currently being iterated or has iterated outside its range, this is set to undefined.
...also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
IDBCursorWithValue.value - Web APIs
the value read-only property of the idbcursorwithvalue interface returns the value of the current cursor, whatever that is.
... syntax var value = myidbcursorwithvalue.value; value the value of the current cursor.
...also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
InstallEvent - Web APIs
installevent.activeworker read only returns the serviceworker that is currently controlling the page.
... var cache_version = 1; var current_caches = { prefetch: 'prefetch-cache-v' + cache_version }; self.addeventlistener('install', function(event) { var urlstoprefetch = [ './static/pre_fetched.txt', './static/pre_fetched.html', 'https://www.chromium.org/_/rsrc/1302286216006/config/customlogo.gif' ]; console.log('handling install event.
... resources to pre-fetch:', urlstoprefetch); event.waituntil( caches.open(current_caches['prefetch']).then(function(cache) { return cache.addall(urlstoprefetch.map(function(urltoprefetch) { return new request(urltoprefetch, {mode: 'no-cors'}); })).then(function() { console.log('all resources have been fetched and cached.'); }); }).catch(function(error) { console.error('pre-fetching failed:', error); }) ); }); specifications specification status comment service workers working draft as of may 2015, the install event is an instance of extendableevent rather than a child of it.
Location - Web APIs
WebAPILocation
location.reload() reloads the current url, like the refresh button.
... location.replace() replaces the current resource with the one at the provided url (redirects to the provided url).
... the difference from the assign() method and setting the href property is that after using replace() the current page will not be saved in session history, meaning the user won't be able to use the back button to navigate to it.
MSGestureEvent - Web APIs
msgestureevent.rotation read only amount of rotation (in radians) since the previous msgestureevent of the current gesture.
... msgestureevent.scale read only the difference in scale (for zoom gestures) from the previous msgestureevent of the current gesture.
... msgestureevent.translationx read only distance traversed along the x-axis since the previous msgestureevent of the current gesture msgestureevent.translationy read only distance traversed along the y-axis since the previous msgestureevent of the current gesture msgestureevent.velocityangular read only angular velocity.
MSManipulationEvent.initMSManipulationEvent() - Web APIs
syntax msmanipulationevent.initmsmanipulationevent(typearg, canbubblearg, cancelablearg, viewarg, detailarg, laststate, currentstate); parameters typearg [in] type: domstring the type of the event being created.
... currentstate [in] type: integer indicates the current state of the manipulation event.
... example interface msmanipulationevent extends uievent { readonly currentstate: number; readonly inertiadestinationx: number; readonly inertiadestinationy: number; readonly laststate: number; initmsmanipulationevent(typearg: string, canbubblearg: boolean, cancelablearg: boolean, viewarg: window, detailarg: number, laststate: number, currentstate: number): void; readonly ms_manipulation_state_active: number; readonly ms_manipulation_state_cancelled: number; readonly ms_manipulation_state_committed: number; readonly ms_manipulation_state_dragging: number; readonly ms_manipulation_state_inertia: number; readonly ms_manipulation_state_preselect: number; readonly ms_manipulation_state_selecting: numbe...
MSSiteModeEvent - Web APIs
stoppropagation prevents propagation of an event beyond the current target.
... cancelbubble gets or sets a value that indicates whether an event should be stopped from propagating up from the current target.
... currenttarget gets the event target that is currently being processed.
MediaPositionState.playbackRate - Web APIs
the mediapositionstate dictionary's playbackrate property is used when calling the mediasession method setpositionstate() to tell the user agent the rate at which media is currently being played.
... for example, a browser might use this information along with the position property and the navigator.mediasession.playbackstate, as well as the session's metadata to provide an integrated common user interface showing the currently playing media as well as standard pause, play, forward, reverse, and other controls.
... syntax let positionstate = { playbackrate: rate }; let playbackrate = positionstate.playbackrate; value a floating-point value specifying a multiplier corresponding to the current relative rate at which the media being performed is playing.
MediaPositionState.position - Web APIs
the mediapositionstate dictionary's position property is used when calling the mediasession method setpositionstate() to provide the user agent with the current playback position, in seconds, of the currently-playing media.
... for example, a browser might use this information along with the position property and the navigator.mediasession.playbackstate, as well as the session's metadata to provide an integrated common user interface showing the currently playing media as well as standard pause, play, forward, reverse, and other controls.
... syntax let positionstate = { position: timeinseconds }; let duration = positionstate.duration; value a floating-point value indicating the current playback position within the media currently being performed, in seconds.
MediaPositionState - Web APIs
the media session api's mediapositionstate dictionary is used to represent the current playback position of a media session.
... its contents can be used by the user agent to provide a user interface displaying information about the playback position and duration of the media currently being performed.
... properties duration a floating-point value giving the total duration of the current media in seconds.
MediaSessionActionDetails.action - Web APIs
seekbackward seeks backward through the media from the current position.
... seekforward seeks forward from the current position through the media.
... skipad skips past the currently playing advertisement or commercial.
active - Web APIs
the active read-only property of the mediastream interface returns a boolean value which is true if the stream is currently active; otherwise, it returns false.
... syntax var isactive = mediastream.active; value a boolean value which is true if the stream is currently active; otherwise, the value is false.
...when that stream becomes available (that is, when the returned promise is fulfilled, a button on the page is updated based on whether or not the stream is currently active.
MediaStreamTrack.getSettings() - Web APIs
the getsettings() method of the mediastreamtrack interface returns a mediatracksettings object containing the current values of each of the constrainable properties for the current mediastreamtrack.
... syntax const settings = track.getsettings() returns a mediatracksettings object describing the current configuration of the track's constrainable properties.
... note: the returned object identifies the current values of every constrainable property, including those which are platform defaults rather than having been expressly set by the site's code.
MediaStreamTrack.muted - Web APIs
the muted read-only property of the mediastreamtrack interface returns a boolean value indicating whether or not the track is currently unable to provide media output.
... syntax const mutedflag = track.muted value a boolean which is true if the track is currently muted, or false if the track is currently unmuted.
... example this example counts the number of tracks in an array of mediastreamtrack objects which are currently muted.
NodeList.prototype.forEach() - Web APIs
WebAPINodeListforEach
it accepts 3 parameters: currentvalue the current element being processed in somenodelist.
... currentindex optional the index of the currentvalue being processed in somenodelist.
... example let node = document.createelement("div"); let kid1 = document.createelement("p"); let kid2 = document.createtextnode("hey"); let kid3 = document.createelement("span"); node.appendchild(kid1); node.appendchild(kid2); node.appendchild(kid3); let list = node.childnodes; list.foreach( function(currentvalue, currentindex, listobj) { console.log(currentvalue + ', ' + currentindex + ', ' + this); }, 'mythisarg' ); the above code results in the following: [object htmlparagraphelement], 0, mythisarg [object text], 1, mythisarg [object htmlspanelement], 2, mythisarg polyfill this polyfill adds compatibility to all browsers supporting es5: if (window.nodelist && !nodelist.prototype.forea...
OfflineAudioContext.startRendering() - Web APIs
the startrendering() method of the offlineaudiocontext interface starts rendering the audio graph, taking into account the current connections and the current scheduled changes.
... browsers currently support two versions of the startrendering() method — an older event-based version and a newer promise-based version.
... the former will eventually be removed, but currently both mechanisms are provided for legacy reasons.
OscillatorNode.start() - Web APIs
syntax oscillator.start(when); // start playing oscillator at the point in time specified by when parameters when optional an optional double representing the time (in seconds) when the oscillator should start, in the same coordinate system as audiocontext's currenttime attribute.
... if a value is not included or is less than currenttime, the oscillator starts playing immediately.
... // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(3000, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'start' in that specification.
PannerNode.distanceModel - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
PannerNode.maxDistance - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
PannerNode.panningModel - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
PannerNode.setOrientation() - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
PannerNode.setPosition() - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
PannerNode.setVelocity() - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
PannerNode - Web APIs
indow.webkitaudiocontext; var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; panner.distancemodel = 'inverse'; panner.refdistance = 1; panner.maxdistance = 10000; panner.rollofffactor = 1; panner.coneinnerangle = 360; panner.coneouterangle = 0; panner.coneoutergain = 0; if(panner.orientationx) { panner.orientationx.setvalueattime(1, audioctx.currenttime); panner.orientationy.setvalueattime(0, audioctx.currenttime); panner.orientationz.setvalueattime(0, audioctx.currenttime); } else { panner.setorientation(1,0,0); } var listener = audioctx.listener; if(listener.forwardx) { listener.forwardx.setvalueattime(0, audioctx.currenttime); listener.forwardy.setvalueattime(0, audioctx.currenttime); listener.forwardz.setvalueattime(-1, aud...
...ioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boombox = document.queryselector('.boom-box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.positiony.setvalueattime(ypos, audioctx.currenttime); l...
...istener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boombox graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make the sound appropriate to what the visuals are doing on scr...
Payment processing concepts - Web APIs
standardized payment method identifiers there is currently only one registered standardized payment method identifier (more may be added in the future): basic-card payments are handled by the basic card payment specification.
...currently, apple pay is only supported by safari.
...this is currently supported only by chrome and chromium-based browsers.
Permissions.query() - Web APIs
WebAPIPermissionsquery
an up-to-date list of permission names can be found in the spec under the permissionname enum, but bear in mind that the actual permissions supported by browsers is currently much smaller than this.
... firefox for example currently supports geolocation, notifications, push, and persistent-storage (see our permissions.webidl file).
... exceptions exception explanation typeerror retrieving the permissiondescriptor information failed in some way, or the permission doesn't exist or is currently unsupported (e.g.
Permissions - Web APIs
this is not currently supported in any browser.
...this is not currently supported in any browser.
... permissions.revoke() revokes the permission currently set on a given api.
Using Pointer Events - Web APIs
its responsibility in this example is to update the cached touch information and to draw a line from the previous position to the current position of each touch.
... after drawing the line, we call array.splice() to replace the previous information about the touch point with the current information in the ongoingtouches array.
...this identifier is an opaque number, but we can at least rely on it differing between the currently-active touches.
PositionOptions - Web APIs
the positionoptions dictionary describes an object containing option properties to pass as a parameter of geolocation.getcurrentposition() and geolocation.watchposition().
...the default value is infinity, meaning that getcurrentposition() won't return until the position is available.
...if set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position.
PublicKeyCredentialRequestOptions.extensions - Web APIs
here is the current (as of march 2019) list of potential extensions which may be used during the registration operation.
...an appid which was used with legacy fido js apis to identify the current relying party.
...in other words, this may be used server side to check if the current operation is based on the same biometric data that the previous authentication.
RTCDataChannel.bufferedAmount - Web APIs
the read-only rtcdatachannel property bufferedamount returns the number of bytes of data currently queued to be sent over the data channel.
... syntax var amount = adatachannel.bufferedamount; value the number of bytes of data currently queued to be sent over the data channel but have not yet been sent.
... example the snippet below includes a function which changes the contents of a block with the id "buffersize" to a string indicating the number of bytes currently buffered on an rtcdatachannel.
RTCIceTransport - Web APIs
gatheringstate read only a domstring indicating which gathering state the ice agent is currently in.
... state read only a domstring indicating what the current state of the ice agent is.
...the current candidate pair can be obtained using getselectedcandidatepair().
RTCPeerConnection.addTrack() - Web APIs
ync opencall(pc) { const gumstream = await navigator.mediadevices.getusermedia( {video: true, audio: true}); for (const track of gumstream.gettracks()) { pc.addtrack(track, gumstream); } } the remote peer might then use a track event handler that looks like this: pc.ontrack = ({streams: [stream]} => videoelem.srcobject = stream; this sets the video element's current stream to the one that contains the track that's been added to the connection.
...if the transceiver's currentdirection has ever been "sendrecv" or "sendonly", the sender can't be reused.
... the associated rtcrtptransceiver has its currentdirection updated to include sending; if its current value is "recvonly", it becomes "sendrecv", and if its current value is "inactive", it becomes "sendonly".
RTCPeerConnection.connectionState - Web APIs
the read-only connectionstate property of the rtcpeerconnection interface indicates the current state of the peer connection by returning one of the string values specified by the enum rtcpeerconnectionstate.
... syntax var connectionstate = rtcpeerconnection.connectionstate; value the current state of the connection, as a value from the enum rtcpeerconnectionstate.
... "connecting" one or more of the ice transports are currently in the process of establishing a connection; that is, their rtciceconnectionstate is either "checking" or "connected", and no transports are in the "failed" state.
RTCPeerConnection.pendingLocalDescription - Web APIs
this does not describe the connection as it currently stands, but as it may exist in the near future.
... use rtcpeerconnection.currentlocaldescription or rtcpeerconnection.localdescription to get the current state of the endpoint.
... for details on the difference, see pending and current descriptions in webrtc connectivity.
RTCPeerConnection.pendingRemoteDescription - Web APIs
this does not describe the connection as it currently stands, but as it may exist in the near future.
... use rtcpeerconnection.currentremotedescription or rtcpeerconnection.remotedescription to get the current session description for the remote endpoint.
... for details on the difference, see pending and current descriptions in webrtc connectivity.
RTCPeerConnection.setLocalDescription() - Web APIs
instead, the current connection configuration remains in place until negotiation is complete.
...see pending and current descriptions in webrtc connectivity for more details on this process.
... deprecated exceptions when using the deprecated callback-based version of setlocaldescription(), the following exceptions may occur: invalidstateerror the connection's signalingstate is "closed", indicating that the connection is not currently open, so negotiation cannot take place.
RTCRtpReceiver - Web APIs
properties rtcrtpreceiver.track read only returns the mediastreamtrack associated with the current rtcrtpreceiver instance.
... methods rtcrtpreceiver.getcontributingsources() returns an array of rtcrtpcontributingsource instances for each unique csrc (contributing source) identifier received by the current rtcrtpreceiver in the last ten seconds.
... rtcrtpreceiver.getsynchronizationsources() returns an array including one rtcrtpsynchronizationsource instance for each unique ssrc (synchronization source) identifier received by the current rtcrtpreceiver in the last ten seconds.
RTCRtpSender.getParameters() - Web APIs
the getparameters() method of the rtcrtpsender interface returns an rtcrtpsendparameters object describing the current configuration for the encoding and transmission of media on the sender's track.
... return value an rtcrtpsendparameters object indicating the current configuration of the sender.
... examples this example gets the sender's current transaction id; the transaction id uniquely identifies the current set of parameters, to ensure that calls to setparameters() are always handled in the correct order, avoiding inadvertently overwriting parameters with older parameters.
SVGAnimatedPathData - Web APIs
name type description animatednormalizedpathseglist svgpathseglist provides access to the current animated contents of the 'd' attribute in a form where all path data commands are expressed in terms of the following subset of svgpathseg types: svg_pathseg_moveto_abs (m), svg_pathseg_lineto_abs (l), svg_pathseg_curveto_cubic_abs (c) and svg_pathseg_closepath (z).
... animatedpathseglist svgpathseglist provides access to the current animated contents of the 'd' attribute in a form which matches one-for-one with svg's syntax.
... if the given attribute or property is being animated, contains the current animated value of the attribute or property, and both the object itself and its contents are read only.
SVGAnimatedPoints - Web APIs
animatedpoints svgpointlist provides access to the current animated contents of the points attribute.
... if the given attribute or property is being animated, contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, contains the same value as points.
SVGGraphicsElement - Web APIs
svggraphicselement.getbbox() returns a domrect representing the computed bounding box of the current element.
... svggraphicselement.getctm() returns a dommatrix representing the matrix that transforms the current element's coordinate system to its svg viewport's coordinate system.
... svggraphicselement.getscreenctm() returns a dommatrix representing the matrix that transforms the current element's coordinate system to the coordinate system of the svg viewport for the svg document fragment.
ScreenOrientation - Web APIs
the screenorientation interface of the the screen orientation api provides information about the current orientation of the document.
... properties screenorientation.typeread only returns the document's current orientation type, one of "portrait-primary", "portrait-secondary", "landscape-primary", or "landscape-secondary".
... screenorientation.angleread only returns the document's current orientation angle.
Selection.getRangeAt() - Web APIs
the selection.getrangeat() method returns a range object representing one of the ranges currently selected.
... example let ranges = []; sel = window.getselection(); for(let i = 0; i < sel.rangecount; i++) { ranges[i] = sel.getrangeat(i); } /* each item in the ranges array is now * a range object representing one of the * ranges in the current selection */ specifications specification status comment selection apithe definition of 'selection: getrangeat()' in that specification.
... working draft current ...
ShadowRoot - Web APIs
note that this is currently only implemented by chrome; other browsers still implement them on the document interface.
...note that this is currently only implemented by chrome; other browsers still implement them on the document interface.
... documentorshadowroot.getselection() returns a selection object representing the range of text selected by the user, or the current position of the caret.
StyleSheet - Web APIs
properties stylesheet.disabled is a boolean representing whether the current stylesheet has been applied or not.
... stylesheet.ownernode read only returns a node associating this style sheet with the current document.
... stylesheet.title read only returns a domstring representing the advisory title of the current style sheet.
TouchEvent.targetTouches - Web APIs
the targettouches read-only property is a touchlist listing all the touch objects for touch points that are still in contact with the touch surface and whose touchstart event occurred inside the same target element as the current target element.
... syntax var touches = touchevent.targettouches; return value touches a touchlist listing all the touch objects for touch points that are still in contact with the touch surface and whose touchstart event occurred inside the same target element as the current target element.
...the touchevent.targettouches property is a touchlist object that includes those tps that are currently touching the surface and started on the element that is the target of the current event.
Using Touch Events - Web APIs
a disadvantage to using mouse events is that they do not support concurrent user input, whereas touch events support multiple simultaneous inputs (possibly at different locations on the touch surface), thus enhancing user experiences.
...this interface's attributes include the state of several modifier keys (for example the shift key) and the following touch lists: touches - a list of all of the touch points currently on the screen.
... changedtouches - a list of the touch points whose items depends on the associated event type: for the touchstart event, it is a list of the touch points that became active with the current event.
TreeWalker.firstChild() - Web APIs
the treewalker.firstchild() method moves the current node to the first visible child of the current node, and returns the found child.
... it also moves the current node to this child.
... if no such child exists, returns null and the current node is not changed.
TreeWalker.lastChild() - Web APIs
the treewalker.lastchild() method moves the current node to the last visible child of the current node, and returns the found child.
... it also moves the current node to this child.
... if no such child exists, returns null and the current node is not changed.
TreeWalker.nextNode() - Web APIs
the treewalker.nextnode() method moves the current node to the next visible node in the document order, and returns the found node.
... it also moves the current node to this one.
... if no such node exists, returns null and the current node is not changed.
TreeWalker.previousNode() - Web APIs
the treewalker.previousnode() method moves the current node to the previous visible node in the document order, and returns the found node.
... it also moves the current node to this one.
... if no such node exists,or if it is before that the root node defined at the object construction, returns null and the current node is not changed.
UIEvent.detail - Web APIs
WebAPIUIEventdetail
the uievent.detail read-only property, when non-zero, provides the current (or next, depending on the event) click count.
... for click or dblclick events, uievent.detail is the current click count.
... for mousedown or mouseup events, uievent.detail is 1 plus the current click count.
WebGL2RenderingContext.getQuery() - Web APIs
the webgl2renderingcontext.getquery() method of the webgl 2 api returns the currently active webglquery for the target, or null.
...must be gl.current_query.
... examples var currentquery = gl.getquery(gl.any_samples_passed, gl.current_query); specifications specification status comment webgl 2.0the definition of 'getquery' in that specification.
WebGLRenderingContext.bindBuffer() - Web APIs
an attempt to bind the buffer to another target will throw an invalid_operation error and the current buffer binding will remain the same.
...an attempt to do so will generate an invalid_operation error, and the current binding will remain untouched.
... examples binding a buffer to a target var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); getting current bindings to check the current buffer bindings, query the array_buffer_binding and element_array_buffer_binding constants.
WebGLRenderingContext.vertexAttribPointer() - Web APIs
the webglrenderingcontext.vertexattribpointer() method of the webgl api binds the buffer currently bound to gl.array_buffer to a generic vertex attribute of the current vertex buffer object and specifies its layout.
...if stride is 0, the attribute is assumed to be tightly packed, that is, the attributes are not interleaved but each attribute is in a separate block, and the next vertex' attribute follows immediately after the current vertex.
... querying current settings you can call gl.getvertexattrib() and gl.getvertexattriboffset() to get the current parameters for an attribute, e.g.
Using WebRTC data channels - Web APIs
while there's no way to control the size of the buffer, you can learn how much data is currently buffered, and you can choose to be notified by an event when the buffer starts to run low on queued data.
... concerns with large messages currently, it's not practical to use rtcdatachannel for messages larger than 64kib (16kib if you want to support cross-browser exchange of data).
... this will become an issue when browsers properly support the current standard for supporting larger messages—the end-of-record (eor) flag that indicates when a message is the last one in a series that should be treated as a single payload.
WebRTC API - Web APIs
events bufferedamountlow the amount of data currently buffered by the data channel—as indicated by its bufferedamount property—has decreased to be at or below the channel's minimum buffered data size, as specified by bufferedamountlowthreshold.
... selectedcandidatepairchange the currently-selected pair of ice candidates has changed for the rtcicetransport on which the event is fired.
... rtcidentityassertion represents the identity of the remote peer of the current connection.
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
when the browser needs you to render the scene, it invokes the callback, providing as input parameters the current time and an xrframe encapsulating the data needed to render the correct frame.
...in current webxr implementations, there will never be more than two entries in this list: one describing the position and viewing angle of the left eye and another doing the same for the right.
... you can tell which eye a given xrview represents by checking the value of its eye property, which is a string whose value is left or right (a third possible value, none, theoretically may be used to represent another point of view, but support for this is not entirely available in the current api).
Geometry and reference spaces in WebXR - Web APIs
the currently available reference space types, which are defined by the xrreferencespacetype enumeration, are shown below.
...the viewer isn't tracked at all; tracking is optimized for stability around the user's current position, so the native origin may drift as needed to accommodate that need.
...currently, the only supported options are strings identifying the standard reference spaces.
Using the Web Speech API - Web APIs
chrome support as mentioned earlier, chrome currently supports speech recognition with prefixed properties, therefore at the start of our code we include these lines to feed the right objects to chrome, and any future implementations that might support the features without a prefix: var speechrecognition = speechrecognition || webkitspeechrecognition var speechgrammarlist = speechgrammarlist || webkitspeechgrammarlist var speechrecognitionevent =...
... browser support support for web speech api speech synthesis is still getting there across mainstream browsers, and is currently limited to the following: firefox desktop and mobile support it in gecko 42+ (windows)/44+, without prefixes, and it can be turned on by flipping the media.webspeech.synth.enabled flag to true in about:config.
...we use the htmlselectelement selectedoptions property to return the currently selected <option> element.
Window.close() - Web APIs
WebAPIWindowclose
the window.close() method closes the current window, or the window on which it was called.
... //global var to store a reference to the opened window var openedwindow; function openwindow() { openedwindow = window.open('moreinfo.htm'); } function closeopenedwindow() { openedwindow.close(); } closing the current window in the past, when you called the window object's close() method directly, rather than calling close() on a window instance, the browser closed the frontmost window, whether your script created that window or not.
...(firefox 46.0.1: scripts can not close windows, they had not opened) function closecurrentwindow() { window.close(); } specification specification status comment html living standardthe definition of 'window.close()' in that specification.
Window.content - Web APIs
WebAPIWindowcontent
in such cases, content returns a reference to the window object for the document currently displayed in the browser.
... in unprivileged content (webpages), content is normally equivalent to top (except in the case of a webpage loaded in a sidebar, content still refers to the window of the currently selected tab).
... syntax var windowobject = window.content; example executing the following code in a chrome xul window with a <browser type="content-primary"/> element in it draws a red border around the first div on the page currently displayed in the browser: content.document.getelementsbytagname("div")[0].style.border = "solid red 1px"; specification none.
window.location - Web APIs
WebAPIWindowlocation
the window.location read-only property returns a location object with information about the current location of the document.
... location.assign("http://www.mozilla.org"); // or location = "http://www.mozilla.org"; example #2: force reloading the current page from the server location.reload(true); example #3 consider the following example, which will reload the page by using the replace() method to insert the value of location.pathname into the hash: function reloadpagewithhash() { var initialpage = location.pathname; location.replace('http://example.com/#' + initialpage); } example #4: display the properties of the current url in an al...
...(" + (typeof olocation[sprop]) + "): " + (olocation[sprop] || "n/a")); } alert(alog.join("\n")); } // in html: <button onclick="showloc();">show location properties</button> example #5: send a string of data to the server by modifying the search property: function senddata (sdata) { location.search = sdata; } // in html: <button onclick="senddata('some data');">send data</button> the current url with "?some%20data" appended is sent to the server (if no action is taken by the server, the current document is reloaded with the modified search string).
window.postMessage() - Web APIs
note that this origin is not guaranteed to be the current or future origin of that window, which might have been navigated to a different location since postmessage was called.
... the value of the origin property of the dispatched event is not affected by the current value of document.domain in the calling window.
... lastly, posting a message to a page at a file: url currently requires that the targetorigin argument be "*".
Window.resizeBy() - Web APIs
WebAPIWindowresizeBy
the window.resizeby() method resizes the current window by a specified amount.
... example // shrink the window window.resizeby(-200, -200); notes this method resizes the window relative to its current size.
...if the window you open is not in the same orgin as the current window, you will not be able to resize, or access any information on, that window/tab.
Window.scrollY - Web APIs
WebAPIWindowscrollY
the read-only scrolly property of the window interface returns the number of pixels that the document is currently scrolled vertically.
... syntax var y = window.scrolly value in practice, the returned value is a double-precision floating-point value indicating the number of pixels the document is currently scrolled vertically from the origin, where a positive value means the content is scrolled to upward.
... in more technical terms, scrolly returns the y coordinate of the top edge of the current viewport.
Window.sessionStorage - Web APIs
the read-only sessionstorage property accesses a session storage object for the current origin.
... syntax mystorage = window.sessionstorage; value a storage object which can be used to access the current origin's session storage space.
... example the following snippet accesses the current origin's session storage object and adds data to it with storage.setitem().
WorkerNavigator - Web APIs
properties the workernavigator interface implements properties from the navigatorid, navigatorlanguage, navigatoronline, navigatordatastore, and navigatorconcurrenthardware interfaces.
... navigatorconcurrenthardware.hardwareconcurrencyread only returns the number of logical processor cores available.
... navigatorid.useragentread only returns the user agent string for the current browser.
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
these values are added to the position and orientation of the current reference space and then the result is used as the position and orientation of the newly created xrreferencespace.
...each time this is called, the new offsets are used to update the current values of mousepitch and mouseyaw.
...eorientation, -mouseyaw); let newtransform = new xrrigidtransform({x: 0, y: 0, z: 0}, {x: inverseorientation[0], y: inverseorientation[1], z: inverseorientation[2], w: inverseorientation[3]}); return refspace.getoffsetreferencespace(newtransform); } this function creates an inverse orientation matrix—used to orient the viewer—from the current pitch and yaw values, then uses that matrix as the source of the orientation when calling new xrrigidtransform().
XRWebGLLayer - Web APIs
although xrwebgllayer is currently the only type of framebuffer layer supported by webgl, it's entirely possible that future updates to the webxr specification may allow for other layer types and corresponding image sources.
... examples binding the layer to a webgl context this snippet, taken from drawing a frame in movement, orientation, and motion: a webxr example, shows how the xrwebgllayer is obtained from the xrsession object's rendering state and is then bound as the current rendering webgl framebuffer by calling the webgl bindframebuffer() function.
...in current webxr implementations, there will never be more than two entries in this list: one describing the position and viewing angle of the left eye and another doing the same for the right.
Using the slider role - Accessibility
as the user interacts with the thumb, the application must programmatically adjust the slider's aria-valuenow (and possible aria-valuetext) attribute to reflect the current value.
...the current volume is 50.
...in these cases, the aria-valuetext attribute is used to provide the appropriate text name for the currently selected value.
Architecture - Accessibility
in firefox, the results of getendindex will always be the startindex + 1, because links are always just represented by a single embedded object character (c) to get the next char fom a given offset in an accessible text: if current char is 0 (end of string), then we are on a hard line break: get next node (typical depth first search), and set the current offset = 0 iatext::ch = getcharacteratoffset(++offset); if ch == embedded object char (0xfffc) then get object for that offset (see a above), then set the current offset to -1, and go to step 2 if ch == 0 then we must determine whether we're on a hard line break: ...
... if the current accessible's ia2 role is section, heading or paragraph then we are on a hard line break, so stop get the offset in the parent text for this object (see b above), and then repeat step (c)2 above done (d) to get the next word or line: look one character ahead.
... if the current character falls within a text substring, locate the line ending of that substring or the next embed, whichever comes first: get the current line start and end offsets.
Cognitive accessibility - Accessibility
focused elements should be visibly focused when a user navigates using a keyboard, the ui should make it obvious which element currently has focus.
... current location is available users should be able to orient themselves within a site or application.
...breadcrumbs, site maps, and identifying the current page in the navigation as "current" are all techniques that help communicate the current location.
Accessibility documentation index - Accessibility
21 using the aria-label attribute aria, accessibility, codingscripting, html, needscontent, reference, référence(2), agent, aria-label, user, useragent the aria-label attribute is used to define a string that labels the current element.
... 28 using the aria-valuenow attribute aria, accessibility, needscontent the aria-valuenow attribute is used to define the current value for a range widget such as a slider, spinbutton or progressbar.
... if the current value is not known, the author should not set the aria-valuenow attribute.
Web Accessibility: Understanding Colors and Luminance - Accessibility
currently, the rgb color space predominates as the space web developers work in.
...because of the current domination of the rgb color space in measuring color output, most calculations in this document are presumed to be in the rgb color space, and very specifically, in the srgb color space.
... where accessibility is concerned, however, standards and guidelines are currently written predominantly using the srgb color space, especially as it applies to color contrast ratios.
forced-colors - CSS: Cascading Style Sheets
syntax the forced-colors media feature indicates whether or not the browser is currently in forced-colors mode.
... user preferences currently no user agent implements this feature, although various operating systems do support such preferences and if this media query is ever implemented user agents will likely rely on the settings provided by the operating system in use.
... examples note: no browser currently implements this feature so the following example will not work.
Basic concepts of Logical Properties and Values - CSS: Cascading Style Sheets
the below diagram shows the inline and block directions in a horizontal writing mode: this diagram shows block and inline in a vertical writing mode: browser support logical properties and values can be thought of as a couple of groups in terms of current browser support.
...these mapped properties are starting to see good browser support, and if you look at the individual pages for the properties in the reference here on mdn you will see that edge is the only modern browser currently missing these.
... note: the css working group are currently trying to decide what to do about the four-value shorthands for logical properties, for example the equivalents to setting four physical properties at once, like margins with the margin property.
Testing media queries programmatically - CSS: Cascading Style Sheets
for example, to set up a query list that determines if the device is in landscape or portrait orientation: const mediaquerylist = window.matchmedia("(orientation: portrait)"); checking the result of a query once you've created your media query list, you can check the result of the query by looking at the value of its matches property: if (mediaquerylist.matches) { /* the viewport is currently in portrait orientation */ } else { /* the viewport is not currently in portrait orientation, therefore landscape */ } receiving query notifications if you need to be aware of changes to the evaluated result of the query on an ongoing basis, it's more efficient to register a listener than to poll the query's result.
...this makes our listener perform adjustments based on the current device orientation; otherwise, our code might assume the device is in portrait mode at startup, even if it's actually in landscape mode.
... the handleorientationchange() function would look at the result of the query and handle whatever we need to do on an orientation change: function handleorientationchange(evt) { if (evt.matches) { /* the viewport is currently in portrait orientation */ } else { /* the viewport is currently in landscape orientation */ } } above, we define the parameter as evt — an event object.
background-color - CSS: Cascading Style Sheets
ground-color: #1fef; /* fully opaque shorthand */ /* rgb value */ background-color: rgb(255, 255, 128); /* fully opaque */ background-color: rgba(117, 190, 218, 0.5); /* 50% transparent */ /* hsl value */ background-color: hsl(50, 33%, 25%); /* fully opaque */ background-color: hsla(50, 33%, 25%, 0.75); /* 75% transparent */ /* special keyword values */ background-color: currentcolor; background-color: transparent; /* global values */ background-color: inherit; background-color: initial; background-color: unset; the background-color property is specified as a single <color> value.
...in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for text content and 3:1 for larger text such as headings.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-inline - CSS: Cascading Style Sheets
initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typediscrete constituent properties this property is a shorthand for the following css properties: border-inline-color border-inline-style border-...
... formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typediscrete formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color>...
... | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-left-color - CSS: Cascading Style Sheets
syntax /* <color> values */ border-left-color: red; border-left-color: #ffbb00; border-left-color: rgb(255, 0, 0); border-left-color: hsla(100%, 50%, 25%, 0.75); border-left-color: currentcolor; border-left-color: transparent; /* global values */ border-left-color: inherit; border-left-color: initial; border-left-color: unset; the border-left-color property is specified as a single value.
... formal definition initial valuecurrentcolorapplies toall elements.
... it also applies to ::first-letter.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-right-color - CSS: Cascading Style Sheets
syntax /* <color> values */ border-right-color: red; border-right-color: #ffbb00; border-right-color: rgb(255, 0, 0); border-right-color: hsla(100%, 50%, 25%, 0.75); border-right-color: currentcolor; border-right-color: transparent; /* global values */ border-right-color: inherit; border-right-color: initial; border-right-color: unset; the border-right-color property is specified as a single value.
... formal definition initial valuecurrentcolorapplies toall elements.
... it also applies to ::first-letter.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-top-color - CSS: Cascading Style Sheets
syntax /* <color> values */ border-top-color: red; border-top-color: #ffbb00; border-top-color: rgb(255, 0, 0); border-top-color: hsla(100%, 50%, 25%, 0.75); border-top-color: currentcolor; border-top-color: transparent; /* global values */ border-top-color: inherit; border-top-color: initial; border-top-color: unset; the border-top-color property is specified as a single value.
... formal definition initial valuecurrentcolorapplies toall elements.
... it also applies to ::first-letter.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border - CSS: Cascading Style Sheets
WebCSSborder
defaults to currentcolor if absent.
... the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: noneborder-color: as each of the properties of the shorthand:border-top-color: currentcolorborder-right-color: currentcolorborder-bottom-color: currentcolorborder-left-color: currentcolorapplies toall elements.
...and:border-bottom-width: a lengthborder-left-width: a lengthborder-right-width: a lengthborder-top-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
the single values of display are described in the specification as legacy values, and currently you gain no benefit from using the two-value versions, as there is a direct mapping for each two-value version to a legacy version, as demonstrated in the table above.
...uter display type defaults to block—except for ruby, which defaults to inline." finally, we have some legacy pre-composed inline-level values of: inline-block inline-table inline-flex inline-grid if a supporting browser comes across these as single values then it treats them the same as the two-value versions: inline flow-root inline table inline flex inline grid so all of the current situations are neatly covered, meaning that we maintain compatibility of existing and new sites that use the single values, while allowing the spec to evolve.
...you can see current support in the compat data for the two-value syntax: the compatibility table on this page is generated from structured data.
display - CSS: Cascading Style Sheets
WebCSSdisplay
due to a bug in browsers this will currently remove the element from the accessibility tree — screen readers will not look at what's inside.
...for example, using two values you might specify an inline flex container as follows: .container { display: inline flex; } this can currently be specified using a single value.
... display: contents current implementations in most browsers will remove from the accessibility tree any element with a display value of contents (but descendants will remain).
outline-color - CSS: Cascading Style Sheets
in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for text content and 3:1 for larger text such as headings.
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial valueinvert, for browsers supporting it, currentcolor for the otherapplies toall elementsinheritednocomputed valuefor the keyword invert, the computed value is invert.
...the transparent keyword maps to rgba(0,0,0,0).animation typea color formal syntax <color> | invertwhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
text-decoration-color - CSS: Cascading Style Sheets
syntax /* <color> values */ text-decoration-color: currentcolor; text-decoration-color: red; text-decoration-color: #00ff00; text-decoration-color: rgba(255, 128, 128, 0.5); text-decoration-color: transparent; /* global values */ text-decoration-color: inherit; text-decoration-color: initial; text-decoration-color: unset; values <color> the color of the line decoration.
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial valuecurrentcolorapplies toall elements.
... it also applies to ::first-letter and ::first-line.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
text-emphasis-color - CSS: Cascading Style Sheets
/* initial value */ text-emphasis-color: currentcolor; /* <color> */ text-emphasis-color: #555; text-emphasis-color: blue; text-emphasis-color: rgba(90, 200, 160, 0.8); text-emphasis-color: transparent; /* global values */ text-emphasis-color: inherit; text-emphasis-color: initial; text-emphasis-color: unset; syntax values <color> defines the color of the emphasis marks.
... if no color is present, it defaults to currentcolor.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
text-emphasis - CSS: Cascading Style Sheets
the size of the emphasis symbol, like ruby symbols, is about 50% of the size of the font, and text-emphasis may affect line height when the current leading is not enough for the marks.
...if no color is present, it defaults to currentcolor.
... formal definition initial valueas each of the properties of the shorthand:text-emphasis-style: nonetext-emphasis-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:text-emphasis-style: as specifiedtext-emphasis-color: computed coloranimation typeas each of the properties of the shorthand:text-emphasis-color: a colortext-emphasis-style: discrete formal syntax <'text-emphasis-style'> | <'text-emphasis-color'> examples a heading with emphasis shape and color this example draws a heading with triangles used to emphasize each character.
z-index - CSS: Cascading Style Sheets
WebCSSz-index
for a positioned box (that is, one with any position other than static), the z-index property specifies: the stack level of the box in the current stacking context.
...the stack level of the generated box in the current stacking context is the same as its parent's box.
... <integer> this <integer> is the stack level of the generated box in the current stacking context.
WAI ARIA Live Regions/API Support - Developer guides
aria-relevant on ancestor element container-busy "true" | "false" | "error" "false" the current changes are not yet complete.
... a state change event for the a11y api's busy state will be fired on the container object currently marked as busy, once it is no longer busy.
...this will always be an ancestor of the current object.
Live streaming web audio and video - Developer guides
rtsp 2.0 rtsp 2.0 is currently in development and is not backward compatible with rtsp 1.0.
... important: although the <audio> and <video> tags are protocol agnostic, no browser currently supports anything other than http without requiring plugins, although this looks set to change.
... currently, opus is supported by firefox desktop and mobile as well as the latest versions of desktop chrome and opera.
<area> - HTML: Hypertext Markup Language
WebHTMLElementarea
the following keywords have special meanings: _self (default): show the resource in the current browsing context.
... _parent: show the resource in the parent browsing context of the current one, if the current page is inside a frame.
... _top: show the resource in the topmost browsing context (the browsing context that is an ancestor of the current one and has no parent).
<base>: The Document Base URL element - HTML: Hypertext Markup Language
WebHTMLElementbase
the following keywords have special meanings: _self (default): show the result in the current browsing context.
... _parent: show the result in the parent browsing context of the current one, if the current page is inside a frame.
... _top: show the result in the topmost browsing context (the browsing context that is an ancestor of the current one and has no parent).
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
the src url is the same as the url of the page the user is currently on.
... loading indicates how the browser should load the image: eager: loads the image immediately, regardless of whether or not the image is currently within the visible viewport (this is the default value).
...user agents use the current source size to select one of the sources supplied by the srcset attribute, when those sources are described using width (w) descriptors.
<input type="email"> - HTML: Hypertext Markup Language
WebHTMLElementinputemail
the :valid and :invalid css pseudo-classes are automatically applied as appropriate to visually denote whether the current value of the field is a valid e-mail address or not.
... a simple email input currently, all browsers which implement this element implement it as a standard text input field with basic validation features.
...t the specification should be using an algorithm equivalent to the following regular expression: /^[a-za-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-za-z0-9](?:[a-za-z0-9-]{0,61} [a-za-z0-9])?(?:\.[a-za-z0-9](?:[a-za-z0-9-]{0,61}[a-za-z0-9])?)*$/ to learn more about how form validation works and how to take advantage of the :valid and :invalid css properties to style the input based on whether or not the current value is valid, see form data validation.
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
first of all, let's look at the html: <form method="post" enctype="multipart/form-data"> <div> <label for="image_uploads">choose images to upload (png, jpg)</label> <input type="file" id="image_uploads" name="image_uploads" accept=".jpg, .jpeg, .png" multiple> </div> <div class="preview"> <p>no files currently selected for upload</p> </div> <div> <button>submit</button> </div> </form> html { font-family: sans-serif; } form { width: 580px; background: #ccc; margin: 0 auto; padding: 20px; border: 1px solid black; } form ol { padding-left: 0; } form li, div > p { background: #eee; display: flex; justify-content: space-between; margin-bottom: 10px; list-style-type: ...
... function updateimagedisplay() { while(preview.firstchild) { preview.removechild(preview.firstchild); } const curfiles = input.files; if(curfiles.length === 0) { const para = document.createelement('p'); para.textcontent = 'no files currently selected for upload'; preview.appendchild(para); } else { const list = document.createelement('ol'); preview.appendchild(list); for(const file of curfiles) { const listitem = document.createelement('li'); const para = document.createelement('p'); if(validfiletype(file)) { para.textcontent = `file name ${file.name}, file size ${returnfilesize(file.siz...
... // https://developer.mozilla.org/docs/web/media/formats/image_types const filetypes = [ "image/apng", "image/bmp", "image/gif", "image/jpeg", "image/pjpeg", "image/png", "image/svg+xml", "image/tiff", "image/webp", "image/x-icon" ]; function validfiletype(file) { return filetypes.includes(file.type); } the returnfilesize() function takes a number (of bytes, taken from the current file's size property), and turns it into a nicely formatted size in bytes/kb/mb.
<input type="month"> - HTML: Hypertext Markup Language
WebHTMLElementinputmonth
here we make use of the :valid and :invalid css properties to style the input based on whether or not the current value is valid.
...the list of available year values is dynamically generated depending on the current year (see the code comments below for detailed explanations of how these functions work).
...oes, run the code inside the if() {} block if(test.type === 'text') { // hide the native picker and show the fallback nativepicker.style.display = 'none'; fallbackpicker.style.display = 'block'; fallbacklabel.style.display = 'block'; // populate the years dynamically // (the months are always the same, therefore hardcoded) populateyears(); } function populateyears() { // get the current year as a number var date = new date(); var year = date.getfullyear(); // make this year, and the 100 years before it available in the year <select> for(var i = 0; i <= 100; i++) { var option = document.createelement('option'); option.textcontent = year-i; yearselect.appendchild(option); } } note: remember that some years have 53 weeks in them (see weeks per year)!
<input type="radio"> - HTML: Hypertext Markup Language
WebHTMLElementinputradio
once a radio group is established, selecting any radio button in that group automatically deselects any currently-selected radio button in the same group.
... additional attributes in addition to the common attributes shared by all <input> elements, radio inputs support the following attributes: attribute description checked a boolean indicating whether or not this radio button is the currently-selected item in the group value the string to use as the value of the radio when submitting the form, if the radio is currently toggled on checked a boolean attribute which, if present, indicates that this radio button is the currently selected one in the group.
... value the value attribute is one which all <input>s share; however, it serves a special purpose for inputs of type radio: when a form is submitted, only radio buttons which are currently checked are submitted to the server, and the reported value is the value of the value attribute.
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
the :valid and :invalid css pseudo-classes are automatically applied as appropriate to visually denote whether the current value of the field is a valid url or not.
... a simple url input currently, all browsers which implement this element implement it as a standard text input field with basic validation features.
...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.
Using HTTP cookies - HTTP
WebHTTPCookies
get /sample_page.html http/2.0 host: www.example.org cookie: yummy_cookie=choco; tasty_cookie=strawberry note: here's how to use the set-cookie header in various server-side applications: php node.js python ruby on rails define the lifetime of a cookie the lifetime of a cookie can be defined in two ways: session cookies are deleted when the current session ends.
... the browser defines when the "current session" ends, and some browsers use session restoring when restarting, which can cause session cookies to last indefinitely long.
... for more information about cookie prefixes and the current state of browser support, see the prefixes section of the set-cookie reference article.
HTTP response status codes - HTTP
WebHTTPStatus
226 im used (http delta encoding) the server has fulfilled a get request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
... 409 conflict this response is sent when a request conflicts with the current state of the server.
... 426 upgrade required the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.
Indexed collections - JavaScript
lements in your array evaluate to false in a boolean context—if your array consists only of dom nodes, for example—you can use a more efficient idiom: let divs = document.getelementsbytagname('div') for (let i = 0, div; div = divs[i]; i++) { /* process div in some way */ } this avoids the overhead of checking the length of the array, and ensures that the div variable is reassigned to the current item each time around the loop for added convenience.
... function isnumber(value) { return typeof value === 'number' } let a1 = [1, 2, 3] console.log(a1.some(isnumber)) // logs true let a2 = [1, '2', 3] console.log(a2.some(isnumber)) // logs true let a3 = ['1', '2', '3'] console.log(a3.some(isnumber)) // logs false reduce(callback[, initialvalue]) applies callback(accumulator, currentvalue[, currentindex[, array]]) for each value in the array for the purpose of reducing the list of items down to a single value.
... let a = [10, 20, 30] let total = a.reduce(function(accumulator, currentvalue) { return accumulator + currentvalue }, 0) console.log(total) // prints 60 reduceright(callback[, initialvalue]) works like reduce(), but starts with the last element.
setter - JavaScript
( { set x(v) { }, set x(v) { } } and { x: ..., set x(v) { } } are forbidden ) examples defining a setter on new objects in object initializers the following example define a pseudo-property current of object language.
... when current is assigned a value, it updates log with that value: const language = { set current(name) { this.log.push(name); }, log: [] } language.current = 'en'; console.log(language.log); // ['en'] language.current = 'fa'; console.log(language.log); // ['en', 'fa'] note that current is not defined, and any attempts to access it will result in undefined.
... removing a setter with the delete operator if you want to remove the setter, you can just delete it: delete language.current; defining a setter on existing objects using defineproperty to append a setter to an existing object, use object.defineproperty().
Array.prototype.flatMap() - JavaScript
syntax var new_array = arr.flatmap(function callback(currentvalue[, index[, array]]) { // return element for new_array }[, thisarg]) parameters callback function that produces an element of the new array, taking three arguments: currentvalue the current element being processed in the array.
... indexoptional the index of the current element being processed in the array.
... alternative reduce() and concat() var arr = [1, 2, 3, 4]; arr.flatmap(x => [x, x * 2]); // is equivalent to arr.reduce((acc, x) => acc.concat([x, x * 2]), []); // [1, 2, 2, 4, 3, 6, 4, 8] note, however, that this is inefficient and should be avoided for large arrays: in each iteration, it creates a new temporary array that must be garbage-collected, and it copies elements from the current accumulator array into a new array instead of just adding the new elements to the existing array.
Array.prototype.forEach() - JavaScript
syntax arr.foreach(callback(currentvalue [, index [, array]])[, thisarg]) parameters callback function to execute on each element.
... it accepts between one and three arguments: currentvalue the current element being processed in the array.
... index optional the index currentvalue in the array.
Array.prototype.length - JavaScript
when you extend an array by changing its length property, the number of actual elements increases; for example, if you set length to 3 when it is currently 2, the array now contains 3 elements, which causes the third element to be a non-iterable empty slot.
... const arr = [1, 2]; console.log(arr); // [ 1, 2 ] arr.length = 5; // set array length to 5 while currently 2.
... var numbers = [1, 2, 3, 4, 5]; var length = numbers.length; for (var i = 0; i < length; i++) { numbers[i] *= 2; } // numbers is now [2, 4, 6, 8, 10] shortening an array the following example shortens the array numbers to a length of 3 if the current length is greater than 3.
Array.prototype.map() - JavaScript
syntax let new_array = arr.map(function callback( currentvalue[, index[, array]]) { // return element for new_array }[, thisarg]) parameters callback function that is called for every element of arr.
... the callback function accepts the following arguments: currentvalue the current element being processed in the array.
... indexoptional the index of the current element being processed in the array.
Object - JavaScript
when modifying prototypes with hooks, pass this and the arguments (the call state) to the current behavior by calling apply() on the function.
... var current = object.prototype.valueof; // since my property "-prop-value" is cross-cutting and isn't always // on the same prototype chain, i want to modify object.prototype: object.prototype.valueof = function() { if (this.hasownproperty('-prop-value')) { return this['-prop-value']; } else { // it doesn't look like one of my objects, so let's fall back on // the default behavior by reproducing the current behavior as best we can.
... return current.apply(this, arguments); } } since javascript doesn't exactly have sub-class objects, prototype is a useful workaround to make a “base class” object of certain functions that act as objects.
Promise.prototype.then() - JavaScript
return value once a promise is fulfilled or rejected, the respective handler function (onfulfilled or onrejected) will be called asynchronously (scheduled in the current thread loop).
... function fetch_current_data() { // the fetch() api returns a promise.
... return fetch('current-data.json').then(response => { if (response.headers.get('content-type') != 'application/json') { throw new typeerror(); } var j = response.json(); // maybe do something with j return j; // fulfillment value given to user of // fetch_current_data().then() }); } if onfulfilled returns a promise, the return value of then will be resolved/rejected by the promise.
this - JavaScript
// in web browsers, the window object is also the global object: console.log(this === window); // true a = 37; console.log(window.a); // 37 this.b = "mdn"; console.log(window.b) // "mdn" console.log(b) // "mdn" note: you can always easily get the global object using the global globalthis property, regardless of the current context in which your code is running.
... otherwise, * // the result of the expression is the object * // currently bound to |this| * // (i.e., the common case most usually seen).
... // when called as a listener, turns the related element blue function bluify(e) { // always true console.log(this === e.currenttarget); // true when currenttarget and target are the same object console.log(this === e.target); this.style.backgroundcolor = '#a5d9f3'; } // get a list of every element in the document var elements = document.getelementsbytagname('*'); // add bluify as a click listener so when the // element is clicked on, it turns blue for (var i = 0; i < elements.length; i++) { elements[i].addeventl...
Media container formats (file types) - Web media technologies
video codecs supported by 3gp codec browser support chrome edge firefox safari avc (h.264) yes1,2 h.263 yes1 mpeg-4 part 2 (mp4v-es) yes1 vp8 yes1 [1] firefox only supports 3gp on openmax-based devices, which currently means the boot to gecko (b2g) platform.
... browser support chrome edge firefox safari amr-nb yes1 amr-wb yes1 amr-wb+ yes1 aac-lc yes1,2 he-aac v1 yes1,2 he-aac v2 yes1,2 mp3 yes1 [1] firefox only supports 3gp on openmax-based devices, which currently means the boot to gecko (b2g) platform.
... [2] firefox support for av1 is currently disabled by default; it can be enabled by setting the preference media.av1.enabled to true.
The "codecs" parameter in common media types - Web media technologies
currently, only flags 0 through 2 are used; the other five bits must be zero.
... 4d 00 high profile (hip) currently, hip is the primary profile used for broadcast and disc-based hd video; it's used both for hd tv broadcasts and for blu-ray video.
... you can also use the codecs parameter when specifying a mime media type to the mediasource.istypesupported() method; this method returns a boolean which indicates whether or not the media is likely to work on the current device.
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
note: currently this effect is being limited to actual <img> elements, as applying to other such elements may have undesirable results.
... it only works before the image loads the new mechanism currently only works on <img> elements before the image is loaded.
... note: this new mechanism is enabled in firefox 69 in beta and nightly as the spec is worked out (controlled by the layout.css.width-and-height-map-to-aspect-ratio.enabled pref), and it is currently being implemented in chrome.
Navigation and resource timings - Web Performance
loadeventstart when the load event was sent for the current document.
...start, time to first byte time to first byte is the time between the navigationstart (start of the navigation) and responsestart, (when the first byte of response data is received) available in the performancetiming api: let ttfb = time.responsestart - time.navigationstart; page load time page load time is the time between navigationstart and the start of when the load event is sent for the current document.
... request = timing.responsestart - timing.requeststart load event duration by subtracting the time stamp from immediately before the load event of the current document is fired from the time when the load event of the current document is completed, you can measure the duration of the load event.
glyph-orientation-horizontal - SVG: Scalable Vector Graphics
the glyph-orientation-horizontal attribute affects the amount that hte current text position advances as each glyph is rendered.
... when the reference orientation direction is horizontal and the glyph-orientation-horizontal results in an orientation angle that is a multiple of 180 degrees, then the current text position is incremented according to the horizontal metrics of the glyph.
... otherwise, if the value of this attribute is not a multiple of 180 degrees, then the current text position is incremented according to the vertical metrics of the glyph.
glyph-orientation-vertical - SVG: Scalable Vector Graphics
the glyph-orientation-vertical attribute affects the amount that hte current text position advances as each glyph is rendered.
... when the inline-progression-direction is vertical and the glyph-orientation-vertical results in an orientation angle that is a multiple of 180 degrees, then the current text position is incremented according to the vertical metrics of the glyph.
... otherwise, if the angle is not a multiple of 180 degrees, then the current text position is incremented according to the horizontal metrics of the glyph.
gradientUnits - SVG: Scalable Vector Graphics
value userspaceonuse | objectboundingbox default value objectboundingbox animatable yes userspaceonuse this value indicates that the attributes represent values in the coordinate system that results from taking the current user coordinate system in place at the time when the gradient element is referenced (i.e., the user coordinate system for the element referencing the gradient element via a fill or stroke property) and then applying the transform specified by attribute gradienttransform.
... percentages represent values relative to the current svg viewport.
... value userspaceonuse | objectboundingbox default value objectboundingbox animatable yes userspaceonuse cx, cy, r, fx, fy, and fr represent values in the coordinate system that results from taking the current user coordinate system in place at the time when the gradient element is referenced (i.e., the user coordinate system for the element referencing the gradient element via a fill or stroke property) and then applying the transform specified by attribute gradienttransform.
kernelUnitLength - SVG: Scalable Vector Graphics
three elements are using this attribute: <feconvolvematrix>, <fediffuselighting>, and <fespecularlighting> feconvolvematrix for the <feconvolvematrix>, kernelunitlength indicates the intended distance in current filter units (i.e., units as determined by the value of primitiveunits attribute) between successive columns and rows, respectively, in the kernelmatrix.
... fediffuselighting for the <fediffuselighting>, kernelunitlength indicates the intended distance in current filter units (i.e., units as determined by the value of attribute primitiveunits) for the x and y coordinate, respectively, in the surface normal calculation formulas.
... value <number-optional-number> default value pixel in offscreen bitmap animatable yes fespecularlighting for the <fespecularlighting>, kernelunitlength indicates the intended distance in current filter units (i.e., units as determined by the value of attribute primitiveunits) for the x and y coordinate, respectively, in the surface normal calculation formulas.
startOffset - SVG: Scalable Vector Graphics
the startoffset attribute defines an offset from the start of the path for the initial current text position along the path after converting the path to the <textpath> element's coordinate system.
... </textpath> </text> </svg> usage notes value <length-percentage> | <number> default value 0 animatable yes <length-percentage> a length represents a distance along the path measured in the current user coordinate system for the <textpath> element.
... <number> this value indicates a distance along the path measured in the current user coordinate system for the <textpath> element.
target - SVG: Scalable Vector Graphics
WebSVGAttributetarget
r.mozilla.org" target="_blank"> <text x="0" y="60">open link in new tab or window</text> </a> <a href="https://developer.mozilla.org" target="_top"> <text x="0" y="100">open link in this tab or window</text> </a> </svg> usage notes value _self | _parent | _top | _blank | <xml-name> default value _self animatable yes _replace the current svg image is replaced by the linked content in the same rectangular area in the same frame as the current svg image.
...use _self to replace the current svg document.
... _self the current svg image is replaced by the linked content in the same browsing context as the current svg image.
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
element implementation status a quick overview of the svg 1.1 elements and the current status of the native support.
... currentscale and currenttranslate dom attributes are implemented, but there is no pan and zoom user interface.
... svgsvgelement unimplemented attributes: contentscripttype, contentstyletype, viewport, currentview unimplemented bindings: getintersectionlist, getenclosurelist, checkintersection, checkenclosure g implemented.
Paths - SVG: Scalable Vector Graphics
WebSVGTutorialPaths
l takes two parameters—x and y coordinates—and draws a line from the current position to a new position.
...this command draws a straight line from the current position back to the first point of the path.
...if the s command doesn't follow another s or c command, then the current position of the cursor is used as the first control point.
Using the WebAssembly JavaScript API - WebAssembly
memory imports are useful for two reasons: they allow javascript to fetch and create the initial contents of memory before or concurrently with module compilation.
... in the current iteration of webassembly, there is only one type of reference needed by webassembly code — functions — and thus only one valid element type.
... thus, tables are currently a rather low-level primitive used to compile low-level programming language features safely and portably.
2015 MDN Fellowship Program - Archive of obsolete content
to support our efforts, the fellow will review various technical specifications to identify gaps between the documentation and current situation and refine existing tests to adapt to this cross-browser test harness.
... activities and deliverables identify gaps between existing documentation and current development environments.
page-mod - Archive of obsolete content
for example, we might want to run a script in the context of the currently active tab when the user clicks a button: to block certain content, to change the font style, or to display the document's dom structure.
...in current versions this has been fixed, and the workaround is no longer needed.
widget - Archive of obsolete content
this issue is currently tracked as bug 825434.
...this issue is currently tracked as bug 825434.
system/runtime - Archive of obsolete content
os a string identifying the current operating system.
... xpcomabi a string identifying the abi of the current processor and compiler vtable.
cfx to jpm - Archive of obsolete content
the current tool is called jpm, and is based on node.js.
... activation you need to call cfx activate before you can use cfx, and this only works in the current command shell: if you open a new shell you have to call activate again.
Creating annotations - Archive of obsolete content
its main job is to maintain a matched element: this is the page element that is the current candidate for an annotation.
... in the attach handler we do three things: send the content script a message with the current activation status add the worker to an array called selectors so we can send it messages later on assign a message handler for messages from this worker.
Using third-party modules (jpm) - Archive of obsolete content
the current tool is called jpm, and is based on node.js.
...by passing a path to the module starting from, but not including "node_modules": var menuitems = require("menuitem"); details create a new directory called, for example, "my-menuitem", navigate to it, type "jpm init" and accept all the defaults: mkdir my-menuitem cd my-menuitem jpm init install the menuitem package from npm: npm install menuitem --save this will install the package in the current directory, under a directory called "node_modules".
Tutorials - Archive of obsolete content
get the list of open tabs use the tabs module to iterate through the currently open tabs, and access their content.
... modify the active web page dynamically load a script into the currently active web page.
Drag & Drop - Archive of obsolete content
next, setup the handlers so that files can be dropped on the application: function _dragover(aevent) { var dragservice = components.classes["@mozilla.org/widget/dragservice;1"].getservice(components.interfaces.nsidragservice); var dragsession = dragservice.getcurrentsession(); var supported = dragsession.isdataflavorsupported("text/x-moz-url"); if (!supported) supported = dragsession.isdataflavorsupported("application/x-moz-file"); if (supported) dragsession.candrop = true; } function _dragdrop(aevent) { var dragservice = components.classes["@mozilla.org/widget/dragservice;1"].getservice(components.interfaces.nsidragservice)...
...; var dragsession = dragservice.getcurrentsession(); var _ios = components.classes['@mozilla.org/network/io-service;1'].getservice(components.interfaces.nsiioservice); var uris = new array(); // if sourcenode is not null, then the drop was from inside the application if (dragsession.sourcenode) return; // setup a transfer item to retrieve the file data var trans = components.classes["@mozilla.org/widget/transferable;1"].createinstance(components.interfaces.nsitransferable); trans.adddataflavor("text/x-moz-url"); trans.adddataflavor("application/x-moz-file"); for (var i=0; i<dragsession.numdropitems; i++) { var uri = null; dragsession.getdata(trans, i); var flavor = {}, data = {}, length = {}; trans.getanytransferdata(flavo...
File I/O - Archive of obsolete content
here are some of the special locations the directory service supports: (scope: d = product-wide, f = profile wide) string scope meaning achrom d %curprocd%/chrome aplugns d %curprocd%/plugins (deprecated - use aplugnsdl) aplugnsdl d comsd n/a %curprocd%/components curprocd n/a current working directory (usually the application's installation directory).
... profdef d the profile defaults of the "current" locale.
HTML to DOM - Archive of obsolete content
ent.createelementns("http://www.w3.org/1999/xhtml", "body"); html.documentelement.appendchild(body); body.appendchild(components.classes["@mozilla.org/feed-unescapehtml;1"] .getservice(components.interfaces.nsiscriptableunescapehtml) .parsefragment(ahtmlstring, false, null, body)); return body; } it works by creating a content-level (this is safer than chrome-level) <div> in the current page, then parsing the html fragment and attaching that fragment to the <div>.
... the <div> is returned, and it is never actually appended to the current page.
getAttributeNS - Archive of obsolete content
{ // thisitem's atts // e.g., abc:href, xlink:href while (((result = prefixatt.exec(attrs[j].nodename)) !== null) && thisitem.nodename !== '#document' && thisitem.nodename !== '#document-fragment') { var xmlnsprefix = new regexp('^xmlns:'+result[1]+'$'); // e.g., xmnls:xl, xmlns:xlink // check higher up for xmlns:prefix // check the current node and if necessary, check for the next matching local name up in the hierarchy (until reaching the document root) while (thisitem.nodename !== '#document' && thisitem.nodename !== '#document-fragment') { attrs2 = thisitem.attributes; for (var i = 0; i < attrs2.length; i++) { // search for any prefixed xmlns declaration on thisitem which match prefixes f...
...on current element, conditionally on whether its prefix matches a declared namespace see also http://www.w3.org/tr/dom-level-3-cor...mespaceurialgo ...
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
all of these documents currently assume, however, that you are developing your extension using xul and javascript only.
...ir) and (from a bash-compatible shell) enter: ../build/autoconf/make-makefile extensions/myextension if your $(moz_objdir) is located outside your $(topsrcdir), you'll need to do: $(topsrcdir)/build/autoconf/make-makefile -t $(topsrcdir) extensions/myextension in order for the script to know where your source is (it'll use the extension path you gave it relative to the current dir to figure out where you want your makefiles to go).
Enhanced Extension Installation - Archive of obsolete content
e principle as installation - the user requests an action through the ui while the application is running and metadata is written (tobeuninstalled, tobedisabled, tobeenabled) and a .autoreg file created in the profile so that on the subsequent startup the extension system's startup routine can remove files (in the uninstall case) and write a new extensions.ini file listing the directories for the currently "active" items.
... the startup cache data structure is used to reflect the extensions-startup.manifest file over the lifetime of the running application, the extensions-startup.manifest file is written from the current state of the cache.
How to convert an overlay extension to restartless - Archive of obsolete content
using the current firefox esr, stable version, or nightly is generally a better idea if given the option, but some users take forever to upgrade.
...in current versions it stays unextracted as an xpi.
Adding windows and dialogs - Archive of obsolete content
this normally should be set to the current window.
... you can pass a null value and the service will pick the currently active window.
Appendix F: Monitoring DOM changes - Archive of obsolete content
their main disadvantage is that, due to their recent advent, support is currently limited to firefox 14+ and chrome 18.
... as it is currently possible to attach only a single binding to a given dom node at once, it is important when using this method to detach your binding from a node once your constructor has run.
Handling Preferences - Archive of obsolete content
current preferences: these are stored in the profile directory with the name prefs.js.
...get count() { return this._prefservice.getintpref("extensions.xulschoolhello.message.count"); }, increment : function() { let currentcount = this._prefservice.getintpref("extensions.xulschoolhello.message.count"); this._prefservice.setintpref("extensions.xulschoolhello.message.count", currentcount + 1); } one important thing to keep in mind is that the "get" methods of the service can throw an exception if the preference is not found.
Local Storage - Archive of obsolete content
it is ideal for embedding in other programs, and is currently in use in several popular applications.
...the rdf api may be removed at some point in the future because it requires a great deal of code even for the simplest tasks, and it currently sees little maintenance, so we don't recommend using it unless you really have to.
Search Extension Tutorial (Draft) - Archive of obsolete content
on", "method", "url"].map( function (k) engine_details[k])) } let engine = services.search.getenginebyname(engine_details.name); // if the engine is not hidden and this is the first run, move // it to the first position in the engine list and select it if (selectsearch && !engine.hidden) { services.search.moveengine(engine, 0); services.search.currentengine = engine; } } function shutdown(data, reason) { // clean up the search engine on uninstall or disabled.
... removeobserver(); // if the engine is not hidden and this is the first run, move // it to the first position in the engine list and select it if (selectsearch && !engine.hidden) { services.search.moveengine(engine, 0); services.search.currentengine = engine; } } } // observer topic const engine_added = "browser-search-engine-modified"; function startup(data, reason) { firstrun = reason == addon_install; // re-select the search engine if this is the first run // or we're being re-enabled.
Adding preferences to an extension - Archive of obsolete content
the first thing we need to do is get the currently configured stock symbol to watch from the preferences.
... next, we call our own refreshinformation() method to immediately fetch and display the current information about the stock the extension is configured to monitor.
XUL user interfaces - Archive of obsolete content
copy and paste the content from here, making sure that you scroll to get all of it: // xul demonstration var datebox, daybox, currentday, status; // elements // called by window onload function init() { datebox = document.getelementbyid("date-text") daybox = document.getelementbyid("day-box") status = document.getelementbyid("status") settoday(); } // called by clear button function cleardate() { datebox.value = "" refresh() } // called by today button function settoday() { var d = new date() datebox.valu...
...+ d.getdate() + "/" + d.getfullyear() refresh() } // called by date textbox function refresh() { var d = datebox.value var thedate = null showstatus(null) if (d != "") { try { var a = d.split("/") var thedate = new date(a[2], a[0] - 1, a[1]) showstatus(thedate) } catch (ex) {} } setday(thedate) } // internal function setday(adate) { if (currentday) currentday.setattribute("disabled", "true") if (adate == null) currentday = null else { var d = adate.getday() currentday = daybox.firstchild while (d-- > 0) currentday = currentday.nextsibling currentday.removeattribute("disabled") } datebox.focus(); } function showstatus(adate) { if (adate == null) { status.removeattribute("warning") status.setattribut...
Creating a dynamic status bar extension - Archive of obsolete content
the real work: <?xml version="1.0" encoding="utf-8"?> <!doctype overlay> <overlay id="stockwatcher-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://stockwatcher/content/stockwatcher.js"/> <!-- firefox --> <statusbar id="status-bar"> <statusbarpanel id="stockwatcher" label="loading..." tooltiptext="current value" onclick="stockwatcher.refreshinformation()" /> </statusbar> </overlay> also, notice that the definition of the status bar panel now includes a new property, onclick, which references the javascript function that will be executed whenever the user clicks on the status bar panel.
...the status bar panel's label is set to indicate the current value of the stock, which is stored in fieldarray, by setting the samplepanel.label property.
Localizing an extension - Archive of obsolete content
we also need to update the code to use the entities instead of the strings, so that the substitutions take place based on the currently active locale.
...the chrome registry resolves the uris based on the user's current locale setting and the data you provide in your chrome manifest.
Visualizing an audio spectrum - Archive of obsolete content
fft size: " + buffersize + " buffer size: " + buffer.length; } for ( var i = 0; i < buffersize; i++ ) { real[i] = buffer[reversetable[i]]; imag[i] = 0; } var halfsize = 1, phaseshiftstepreal, phaseshiftstepimag, currentphaseshiftreal, currentphaseshiftimag, off, tr, ti, tmpreal, i; while ( halfsize < buffersize ) { phaseshiftstepreal = costable[halfsize]; phaseshiftstepimag = sintable[halfsize]; currentphaseshiftreal = 1.0; currentphaseshiftimag = 0.0; for ( var fftstep = 0; fftste...
...p < halfsize; fftstep++ ) { i = fftstep; while ( i < buffersize ) { off = i + halfsize; tr = (currentphaseshiftreal * real[off]) - (currentphaseshiftimag * imag[off]); ti = (currentphaseshiftreal * imag[off]) + (currentphaseshiftimag * real[off]); real[off] = real[i] - tr; imag[off] = imag[i] - ti; real[i] += tr; imag[i] += ti; i += halfsize << 1; } tmpreal = currentphaseshiftreal; currentphaseshiftreal = (tmpreal * phaseshiftstepreal) - (currentphaseshiftimag * phaseshiftstepimag); currentphaseshiftimag = (tmpreal * phaseshiftstepimag) + (currentphaseshiftimag * phaseshiftstepreal); } halfs...
Enabling the behavior - updating the status periodically - Archive of obsolete content
with this code in place, restarting mozilla should cause the tinderbox status panel to display the current tinderbox state.
... to confirm this state, go to tinderbox and verify that the panel displays the current worst state of active tinderbox clients.
Creating a Mozilla Extension - Archive of obsolete content
this tutorial describes how to create an extension for the old versions of mozilla suite (currently seamonkey).
...this tutorial walks you through the process of building a mozilla extension that adds an icon to mozilla's status bar showing the current status of the mozilla source code (i.e.
Devmo 1.0 Launch Roadmap - Archive of obsolete content
see also current events.
... timeline currently undetermined.
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
it keeps track of currently pending loads and registered content listeners.
... nsdocshell::internalload() handles targeting to the correct docshell (if the load has a target window associated with it), scrolling to anchors (if the load is an anchor within the current page), and session history issues.
popChallengeResponse - Archive of obsolete content
the current implementation does not conform to that defined in the cmmf draft, and we intend to change this implementation to that defined in the cmc rfc..
... see below for the current implementation.
Twitter - Archive of obsolete content
to call trends/current, use jetpack.lib.twitter.trends.current().
... list methods, spam reporting methods, and oauth are not currently supported.
Clipboard - Archive of obsolete content
the only flavors currently implemented are 'plain' (text/unicode) and 'html' (which is html).string"text" here's an example of how to use the method to set the clipboard.
...jetpack.import.future("clipboard");var mycontent = "<i>this is some italic text</i>";jetpack.clipboard.set( mycontent, "html" ); getcurrentflavors()returns an array of available jetpack clipboard flavors, for the current system clipboard state.
Tabs - Archive of obsolete content
ArchiveMozillaJetpackUITabs
blah(lengthstringfocusedstringtostringstringpopstringpushstringreversestringshiftstringsortstringsplicestringunshiftstring)this is some default text lengththe number of open tabsstring focusedthe current tab in your browserstring tostringstuffstring popstuffstring pushstuffstring reversestuffstring shiftstuffstring sortstuffstring splicestuffstring unshiftstuffstring onready()when the inherited document is fully loaded.
... urlurl to be openedstring jetpack.tabs.open("http://www.example.com/"); blah(lengthstringfocusedstringtostringstringpopstringpushstringreversestringshiftstringsortstringsplicestringunshiftstring)this is some default text lengththe number of open tabsstring focusedthe current tab in your browserstring tostringstuffstring popstuffstring pushstuffstring reversestuffstring shiftstuffstring sortstuffstring splicestuffstring unshiftstuffstring onready()when the inherited document is fully loaded.
slideBar - Archive of obsolete content
when a slidebar feature is selected its contents will be revealed from behind the current webpage.
... it currently under development and lives in the future.
Metro browser chrome tests - Archive of obsolete content
it currently allows you to run javascript code in the same scope as the immersive browser and report results using the same functions as the mochitest test framework.
...a simple test looks like this: gtests.push({ desc: "test loading about:blank", setup: function () { }, teardown: function () { }, run: function () { yield addtab("about:blank"); is(tab.browser.currenturi.spec, "about:blank", "about:blank is loaded"); } }); function test() { runtests(); } gtests contains individual tests that make up the library of tests your test file will contain.
Mozilla Application Framework in Detail - Archive of obsolete content
themes are simply collections of images and css which can augment or replace your current ui elements.
...the following architectural diagram depicts necko and its interaction with subsystems: necko is powerful, stable and robust, with current development focused on performance and standards-compliance.
New Security Model for Web Services - Archive of obsolete content
this is currently permitted for locally-saved scripts and signed scripts.
... please send me some feedback on this proposal see also mozilla web services security model - documentation of what is currently implemented ...
Plug-n-Hack Phase1 - Archive of obsolete content
security tool commands manifest an example commands manifest (for owasp zap) is: https://code.google.com/p/zap-extensions/source/browse/branches/beta/src/org/zaproxy/zap/extension/plugnhack/resource/service.json firefox ui in firefox the tool commands will be made available via the developer toolbar (gcli) https://developer.mozilla.org/docs/tools/gcli a example of how the zap commands are currently displayed is: note that user specified parameters can be specified for commands, which can either be free text, a static pull down list of options or a dynamic list of options obtained from the tool on demand.
... so if you select the “zap scan” command then you will be prompted to select a site from the list of sites currently known to zap.
HostWindow - Archive of obsolete content
location bar - a readonly textbox that contains the currently displayed url.
...note: the sidebar is currently not supported.
Actionscript Acceptance Tests - Archive of obsolete content
testname.as.asc_args this file specifies additional arguments to pass to asc when compiling the test: # asc args for file # two modes are available: # override| all command line arguments (except builtin.py) are ignored and replaced by these # merge| merge these args in with the current args # specifiy an arg that starts with -no will disable the arg...
...testname.as.avm_args this file specifies additional arguments to pass to the shell when running the test - the user can use the special variable $dir to refer to the current directory.
Tamarin - Archive of obsolete content
it currently implements adobe actionscript™ 3 (a superset of ecmascript edition 3) and is embedded within the adobe® flash® player versions 9 and later.
... releases release tracking information on current, past, and upcoming releases of tamarin.
Treehydra Manual - Archive of obsolete content
thus, it is not currently possible to get both gimple asts and cfgs in the same run of treehydra.
...for example, if the current abstract value of a variable x is nonzero, and the analysis goes inside an if statement with the condition x == 1, then in the new abstract value of x will be nonzero meet 1.
Using gdb on wimpy computers - Archive of obsolete content
current language: auto; currently c (gdb) shar glib reading symbols from /usr/lib/libglib-1.2.so.0...done.
...current language: auto; currently c (gdb) shar gtk reading symbols from /usr/lib/libgtk-1.2.so.0...done.
Elements - Archive of obsolete content
bindings this section is tested and adjusted for the current firefox implementation.
... notes in the current stable releases of mozilla products (e.g.
XBL 1.0 Reference - Archive of obsolete content
there are numerous adjustments in the current implementation in comparison of earlier xbl proposals, and not all of them are reflected yet in this document.
...ndling dom changes event flow and targeting flow and targeting across scopes focus and blur events mouseover and mouseout events anonymous content and css selectors and scopes binding stylesheets binding implementations introduction methods properties inheritance of implementations event handlers example - sticky notes updated and adjusted for the current firefox implementation.
XML in Mozilla - Archive of obsolete content
please help updating it with current information.
...mozilla currently implements only the load() method and the document.async property.
Windows Install - Archive of obsolete content
var winreg = getwinregistry() ; if(winreg != null) { // here, we get the current version.
... winreg.setrootkey(winreg.hkey_current_user) ;// current_user subkey = "software\\microsoft\\windows\\currentversion\\runonce" ; winreg.createkey(subkey,""); valname = "ren8dot3"; value = fprogram + "ren8dot3.exe " + ftemp + "ren8dot3.ini"; err = winreg.setvaluestring(subkey, valname, value); } } function prepareren8dot3(listlongfilepaths) { var ftemp = getfolder("temporary"); var fprogram = getfolder("program"); var fren8dot3ini = getwinprofile(ftemp, "ren8dot3.ini"); var binicreated = false; var flongfilepath; var sshortfilepath; if(fren8dot3ini != null) { for(i = 0; i < listlongfilepaths.length; i++) { flongfilepath = getfolder(fprogram, listlongfilepaths[i]); sshortfilepath = file.windowsgetshortname(flongf...
deleteRegisteredFile - Archive of obsolete content
deleteregisteredfile (netscape 6 and mozilla do not currently support this method.) deletes the specified file and removes its entry from the client version registry.
...if the file is currently being used, the name of the file that is to be deleted is saved and netscape 6 attempts to delete it each time it starts up until the file is successfully deleted.
reserved - Archive of obsolete content
currently, the content still receives these key events, even though it can't override them.
...d, as compared to when it is run from web content: document.addeventlistener("keydown", handlekey, true); function handlekey(event) { // listen for the "new tab" shortcut if (event.metakey && (event.key == "t")) { // log a message console.log("intercepted accel-t"); // prevent the default browser action event.preventdefault(); event.stoppropagation(); } } currently, this event handler as coded above runs and logs the message, but the default behavior persists.
state - Archive of obsolete content
open the content either before or after the splitter, depending on the value of the collapsed attribute, is currently displayed.
... dragging the user is current adjusting the position of the splitter, typically by dragging it with the mouse.
Dynamically modifying XUL-based user interface - Archive of obsolete content
removing all children of an element this example removes all children of an element with id=someelement from the current document, by calling removechild() method to remove the first child, until there are no children remaining.
...for example you could move the item labeled "first item" to the end of popup by adding this statement as a last line to the snippet above: popup.appendchild(first); this statement would remove the node from its current position in the document and re-insert it at the end of the popup.
addTab - Archive of obsolete content
ArchiveMozillaXULMethodaddTab
« xul reference home addtab( url, referreruri, charset, postdata, owner, allowthirdpartyfixup ) addtab( url, {referreruri: ..., charset: ..., postdata: ..., owner: ..., allowthirdpartyfixup: ..., relatedtocurrent: ...
...it also adds the relatedtocurrent parameter; firefox uses this to decide whether the new tab should be inserted next to the current tab.
advanceSelectedTab - Archive of obsolete content
« xul reference home advanceselectedtab( dir, wrap ) return type: no return value if the argument dir is set to 1, the currently selected tab changes to the next tab.
... if the argument dir is set to -1, the currently selected tab changes to the previous tab.
loadOneTab - Archive of obsolete content
« xul reference home loadonetab( url, referreruri, charset, postdata, loadinbackground, allowthirdpartyfixup ) loadonetab( url, { referreruri: ..., charset: ..., postdata: ..., inbackground: ..., allowthirdpartyfixup: ..., relatedtocurrent: ...
... firefox 3.6 note the second form of this method was added in firefox 3.6; it adds the relatedtocurrent parameter, and allows the parameters to be specified by name, in any order.
OpenClose - Archive of obsolete content
a menu in an unprivileged content window (such as a web page) can only open a popup while its window is focused, and it is in the currently active tab.
...for example, you might wish to open a popup at the current mouse position when the mouse is clicked.
selectedItem - Archive of obsolete content
« xul reference selecteditem type: element holds the currently selected item.
... if no item is currently selected, this value will be null.
selectedTab - Archive of obsolete content
« xul reference selectedtab type: tab element a reference to the currently selected tab, which will always be one of the tab elements in the tabs element.
... assign a value to this property to modify the currently selected tab.
textbox.value - Archive of obsolete content
« xul reference value type: string holds the current value of the textbox as a string.
... the current value may be modified by setting this property.
Building Trees - Archive of obsolete content
the value attribute is used to set the current progress value for normal progress meters.
...these are used to track the current state of the disclosure triangles.
XML Templates - Archive of obsolete content
the ref attribute isn't currently used for xml sources, as the root of the document is always the starting point for xml queries; you should just set the ref attribute to a dummy value, for example '*' which is typically used.
...these are used to track the current state of the disclosure triangles.
Things I've tried to do with XUL - Archive of obsolete content
:) silver: if you set height="0" and include "overflow: hidden" on each box that is sharing the space, current gecko will quite happily split the space out according to flex, ignoring the contents of each box, as desired.
...this trick doesn't work in 1.4, but works in 1.7 and current versions.
Tree Widget Changes - Archive of obsolete content
from there you can get specific columns, the current sort column, and position and size info about the columns.
... currently, only checkbox columns support editing, although the content-based tree handles the nsitreeview.setcellvalue() and nsitreeview.setcelltext() functions to change the tree content with a script for other types of cells.
Commands - Archive of obsolete content
the command dispatcher locates a controller by looking at the currently focused element to see if it has a controller which can handle the command.
... if the currently focused element does not have a suitable controller, the window is checked next.
Creating a Wizard - Archive of obsolete content
note that wizards currently only work properly from chrome urls.
...these functions are called regardless of which page is currently displayed.
Element Positioning - Archive of obsolete content
example 2 the second button will be displayed with a height of ten pixels and a width of 100 ems (an em is the size of a character in the current font).
... example 4 the fourth button is flexible and will never have a height that is smaller than 2 ex (an ex is usually the height of the letter x in the current font) or wider than 100 pixels.
More Wizards - Archive of obsolete content
another useful property of the wizard is currentpage, which holds a reference to the currently displayed wizardpage.
... you can also modify the current page by changing this property.
Tabboxes - Archive of obsolete content
the currently selected tab element is given an additional selected attribute which is set to true.
... this alters the appearance of the currently selected tab to make it look selected.
Trees and Templates - Archive of obsolete content
="name" label="name" flex="1" primary="true" sortactive="true" sortdirection="ascending" sort="rdf:http://home.netscape.com/nc-rdf#name"/> <splitter/> <treecol id="date" label="date" flex="1" sort="rdf:http://home.netscape.com/web-rdf#lastmodifieddate"/> </treecols> persisting column state one additional thing you might want to do is persist which column is currently sorted, so that it is remembered between sessions.
...there are five attributes of columns that need to be persisted, to save the column width, the column order, whether the column is visible, which column is currently sorted and the sort direction.
XPCOM Examples - Archive of obsolete content
creating a window menu the list of currently open mozilla windows can be used as an rdf datasource.
... this allows you to create a window menu with a list of the currently open windows in the application.
Window icons - Archive of obsolete content
note: the global icons override does not currently work due to bug bug 543490.
... global icon files currently take precedence and bundles are only searched for icons which are not provided by the application.
Writing Skinnable XUL and CSS - Archive of obsolete content
if it imported the global skin, then when it was overlayed into navigator, it would potentially clash (if the user's current chosen navigator skin were not inheriting from global).
...note that in our current designed mozilla skin (aside from global) every single css file is a derived skin file, so this applies to all of you!!!
XUL accessibility guidelines - Archive of obsolete content
maintaining focus the user should typically control where the current focus is located.
...the difficulty here arises from the fact that the correct label for the checkbox ("remember visited pages for the last x days.") includes three different pieces, the second of which is the current value entered into the textbox.
panel - Archive of obsolete content
ArchiveMozillaXULpanel
noautofocus type: boolean if false, the default value, the currently focused element will be unfocused whenever the popup is opened or closed.
... sizeto( width, height ) return type: no return value changes the current size of the popup to the new width and height.
preference - Archive of obsolete content
when instantapply is off (default on windows), this gets and sets the current value of the preference in the currently open dialog.
... type getelementvalue(in domelement element); retrieves the value that should be written to preferences based on the current state of the supplied element.
prefpane - Archive of obsolete content
selected type: boolean this attribute will be set to true for the currently selected prefpane.
... properties contentheight (readonly) the height (in pixels) of current pane's content.
splitter - Archive of obsolete content
open the content either before or after the splitter, depending on the value of the collapsed attribute, is currently displayed.
... dragging the user is current adjusting the position of the splitter, typically by dragging it with the mouse.
toolbox - Archive of obsolete content
customtoolbarcount firefox only type: integer the number of custom toolbars currently within the toolbox.
...nsertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata appendcustomtoolbar( name, currentset ) firefox only return type: element adds a custom toolbar to the toolbox with the given name.
window - Archive of obsolete content
this value may be -1 to use the default margin for that side on the current platform, 0 to have no system border (that is, to extend the client area to the edge of the window), or a value greater than zero to indicate how much less than the default default width you wish the margin on that side to be.
...this is used to hide chrome when showing in-browser ui such as the about:addons page, and causes the toolbars to be hidden, with only the tab strip (and, if currently displayed, the add-on bar) left showing.
Extentsions FAQ - Archive of obsolete content
var tab = gbrowser.addtab( url ); // and if you want it to load in the foreground: gbrowser.selectedtab = tab; is it possible to read the html-code of the current url/site?
... could someone write an extension that would collapse the current sidebar in firefox?
NPN_DestroyStream - Archive of obsolete content
syntax #include <npapi.h> nperror npn_destroystream(npp instance, npstream* stream, nperror reason); parameters the function has the following parameters: instance pointer to current plug-in instance.
... stream pointer to current stream, initiated by either the browser or the plug-in.
NPP_DestroyStream - Archive of obsolete content
syntax #include <npapi.h> nperror npp_destroystream(npp instance, npstream* stream, npreason reason); parameters the function has the following parameters: instance pointer to current plug-in instance.
... stream pointer to current stream.
NPP_StreamAsFile - Archive of obsolete content
syntax #include <npapi.h> void npp_streamasfile(npp instance, npstream* stream, const char* fname); parameters the function has the following parameters: instance pointer to current plug-in instance.
... stream pointer to current stream.
NPP_Write - Archive of obsolete content
(remark: hence the name "npp_write" is misleading - just think of:"data_arrived") syntax #include <npapi.h> int32 npp_write(npp instance, npstream* stream, int32 offset, int32 len, void* buf); parameters the function has the following parameters: instance pointer to the current plug-in instance.
... stream pointer to the current stream.
NPP_WriteReady - Archive of obsolete content
syntax #include <npapi.h> int32 npp_writeready(npp instance, npstream* stream); parameters the function has the following parameters: instance pointer to the current plug-in instance.
... stream pointer to the current stream.
Why RSS Slash is Popular - Counting Your Comments - Archive of obsolete content
this element gives the (current) total number of comments made for the item -- for the blog post.
... although not necessary, people also often use other rss modules to get at (and read) the comments (since rss does not currently provide facilities for this either).
Table Reflow Internals - Archive of obsolete content
a text run) user defined - currently only used for fixed positioned frames kinds of reflows incremental reflow (continued) reflower not allowed to change available size of reflowee reflow commands get coalesced to streamline processing style change a target changed stylistic if there is a target, otherwise every frame may need to respond parent of target usually turns it into an incremental reflow with a style changed comm...
...l 0301a8cc r=2 a=2625,uc c=2565,uc cnt=446 block 0301a92c r=2 a=2565,uc c=2565,uc cnt=447 block 0301a92c d=2565,300 cell 0301a8cc d=2625,360 row 03017c08 d=4470,360 rowg 03017a7c d=4470,360 tbl 030178c4 d=4500,450 tblo 030176cc d=4500,450 table reflow optimizations if the table is already balanced, pass 1 constrains the width (like a normal pass 2) based on the current column widths.
Tamarin Tracing Build Documentation - Archive of obsolete content
erformance tests automated in buildbot linux - ubuntu 8.0.4 x86 supported, acceptance and performance tests automated in buildbot windows mobile (pocket pc 5.0) armv4t supported, acceptance and performance tests automated in buildbot raw image (no os) armv5 supported, acceptance and performance tests not done linux (nokia n810) armv5 supported, acceptance and performance tests not done current build status the current tamarin tracing build status can be found at tamarin tracing build status getting the tamarin source the tamarin tracing source resides in mercurial at tamarin tracing.
...currently this only accepts the change number and not the hash.
Building a Theme - Archive of obsolete content
set this to be no newer than the newest currently available version!
...this will be a menu containing all the xul documents currently open in firefox.
azimuth - Archive of obsolete content
ArchiveWebCSSazimuth
leftwards: moves the sound counter-clockwise by 20 degrees, relative to the current angle.
... rightwards: moves the sound clockwise by 20 degrees, relative to the current angle.
E4X - Archive of obsolete content
ArchiveWebE4X
e4x is standardized by ecma international in ecma-357 standard (currently in its second edition, december 2005).
... someone verify the above known bugs and limitations it is not currently possible to access a dom object through e4x (bug 270553).
Enumerator.moveFirst - Archive of obsolete content
the enumerator.movefirst method resets the current item in the collection to the first item.
... if there are no items in the collection, the current item is set to undefined.
Enumerator.moveNext - Archive of obsolete content
the enumerator.movenext method moves the current item to the next item in the collection.
... if the enumerator is at the end of the collection or the collection is empty, the current item is set to undefined.
MSX Emulator (jsMSX) - Archive of obsolete content
since javascript currently is mostly an interpreted language in web browsers, it is at least an order of magnitude slower than other languages such as c and java.
...they present an interesting testbed for pushing the current javascript implementations to their limits and for comparing their relative speed.
Standards-Compliant Authoring Tools - Archive of obsolete content
currently the work done on nvu is being ported back to mozilla source code.
... macromedia™ dreamweaver™ cs6 style master and layout master by western civilisation some caveats: it appears that tools currently available from namo generate ie-specific or netscape 4-specific code that may require extra debugging for compatibility with standards-based browsers.
XForms Repeat Element - Archive of obsolete content
behaviour focusing a generated control may change the current index of the containing repeat element.
...> <my:price>3.00</my:price> </my:line> <my:line name="b"> <my:price>32.25</my:price> </my:line> </my:lines> </instance> </model> <repeat id="lineset" nodeset="/my:lines/my:line"> <input ref="my:price"> <label>line item</label> </input> <input ref="@name"> <label>name</label> </input> </repeat> <trigger> <label>insert a new item after the current one</label> <action ev:event="domactivate"> <insert nodeset="/my:lines/my:line" at="index('lineset')" position="after"/> <setvalue ref="/my:lines/my:line[index('lineset')]/@name"/> <setvalue ref="/my:lines/my:line[index('lineset')]/price">0.00</setvalue> </action> </trigger> <trigger> <label>remove current item</label> <delete ev:event="domactivate" nodeset="/my:lines/m...
Mozilla XForms User Interface - Archive of obsolete content
currently xforms can be hosted by xhtml and xul in seamonkey and firefox.
...for example, if a repeat is bound to a nodeset that contains 5 nodes and the repeat contains an output element that echoes the current node, then the user will see 5 outputs in the form.
Mozilla's DOCTYPE sniffing - Archive of obsolete content
the code that makes this determination is currently in determineparsemode() in nsparser.cpp.
...(almost all, rather than all, to allow for the following points as well.) authors writing web pages to current standards should be able to trigger strict mode.
Using the Right Markup to Invoke Plugins - Archive of obsolete content
applet -- the popular choice the applet element is still very much supported, and is the most popular way currently to invoke java applets.
...the embed element is currently the most widely used element to invoke plugins in netscape browsers.
Archive of obsolete content
element events archived event pages firefox developer tools these are articles related to the firefox developer tools, which are no longer current.
...for instructions on tamarin central, please see the basics of web services summary: a current hot topic on the web right now are web services.
Index - Game development
this article provides a detailed guide to implementing audio for web games, looking at what works currently across as wide a range of platforms as possible.
... 68 paddle and keyboard controls beginner, canvas, controls, games, graphics, javascript, tutorial, keyboard the ball is bouncing off the walls freely and you can watch it indefinitely, but currently there's no interactivity.
Building up a basic demo with Three.js - Game development
the aspect ratio is set to the current width and height of the window so it will be dynamically adjusted.
... as mentioned above, the new objects currently just look black.
WebVR — Virtual Reality for the Web - Game development
browser support and spec status currently browser support for the webvr api is still experimental — it works in nightly builds of firefox and experimental builds of chrome (mozilla and google teamed up to work on the implementation together), but sooner rather than later we'll see it in regular builds.
...for example: function setcustomfov(up,right,down,left) { var testfov = new vrfieldofview(up,right,down,left); ghmd.setfieldofview(testfov,testfov,0.01,10000.0); } the gpositionsensor variable holds the positionsensorvrdevice — using this you can get the current position or orientation state (for example to update the scene view on every frame), or reset the sensor.
Mobile touch controls - Game development
the pointer element contains the x and y variables storing the current position of the dragged element.
... the stick being pressed can be handled during the gameplay in the update function like so: if(this.stick.isdown) { // move the player } we can adjust the player's velocity based on the current angle of the stick and move him appropriately.
Paddle and keyboard controls - Game development
the ball is bouncing off the walls freely and you can watch it indefinitely, but currently there's no interactivity.
...this currently works, but the paddle disappears off the edge of the canvas if we hold either key for too long.
Call stack - MDN Web Docs Glossary: Definitions of Web-related terms
a call stack is a mechanism for an interpreter (like the javascript interpreter in a web browser) to keep track of its place in a script that calls multiple functions — what function is currently being run and what functions are called from within that function, etc.
... when the current function is finished, the interpreter takes it off the stack and resumes execution where it left off in the last code listing.
Domain sharding - MDN Web Docs Glossary: Definitions of Web-related terms
to enable concurrent downloads of assets exceeding that limit, domain sharding splits content across multiple subdomains.
... http2 supports unlimited concurrent requests making domain sharding an obsolete requirement when http/2 is enabled.
Microsoft Internet Explorer - MDN Web Docs Glossary: Definitions of Web-related terms
microsoft edge is currently the default windows browser.
... ie has gone through many releases and currently stands at version 11.0.12, with desktop, mobile, and xbox console versions available.
Scope - MDN Web Docs Glossary: Definitions of Web-related terms
the current context of execution.
...if a variable or other expression is not "in the current scope," then it is unavailable for use.
What is a URL? - Learn web development
if the path part of the url starts with the "/" character, the browser will fetch that resource from the top root of the server, without reference to the context given by the current document.
...examples of relative urls to better understand the following examples, let's assume that the urls are called from within the document located at the following url: https://developer.mozilla.org/docs/learn sub-resources skills/infrastructure/understanding_urls because that url does not start with /, the browser will attempt to find the document in a sub-directory of the one containing the current resource.
The web and web standards - Learn web development
old web sites will still continue to work), and forwards compatible (future technologies in turn will be compatible with what we currently have).
...recent published figures say that there are currently around 19 million web developers in the world, and that figure is set more than double in the next decade.
Getting started with HTML - Learn web development
if you want to display the linked content in the current tab, just omit this attribute.
...one of my favorite drummers is neal peart, who\ plays in the band <a href="https://en.wikipedia.org/wiki/rush_%28band%29" title="rush wikipedia article">rush</a>.\ my favourite rush album is currently <a href="http://www.deezer.com/album/942295">moving pictures</a>.</p>\ <img src="https://udn.realityripple.com/samples/4b/9bb5edda5d.jpg">'; var solutionentry = htmlsolution; textarea.addeventlistener('input', updatecode); window.addeventlistener('load', updatecode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function...
HTML text fundamentals - Learn web development
this document's body currently contains multiple pieces of content—they aren't marked up in any way, but they are separated with linebreaks (enter/return pressed to go onto the next line).
...> <li>if you want a coarse "chunky" hummus, process it for a short time.</li> <li>if you want a smooth hummus, process it for a longer time.</li> </ol> since the last two bullets are very closely related to the one before them (they read like sub-instructions or choices that fit below that bullet), it might make sense to nest them inside their own unordered list, and put that list inside the current fourth bullet.
Test your skills: Multimedia and embedding - Learn web development
the audio is called audio.mp3, and it is in a folder inside the current folder called media.
...the files are called video.mp4 and video.webm, and are in a folder inside the current folder called media.
Image gallery - Learn web development
adding an onclick handler to each thumbnail image in each loop iteration, you need to add an onclick handler to the current newimage — this handler should find the value of the src attribute of the current image.
...you need to add an onclick handler that: checks the current class name set on the <button> — you can again achieve this by using getattribute().
Drawing graphics - Learn web development
we'll be using some common methods and properties across all of the below sections: beginpath() — start drawing a path at the point where the pen currently is on the canvas.
...when the mouse moves, we fire a function set as the onmousemove event handler, which captures the current x and y values.
Adding features to our bouncing balls demo - Learn web development
but there are a couple of differences: in the outer if statement, you no longer need to check whether the current ball in the iteration is the same as the ball that is doing the checking — because it is no longer a ball, it is the evil circle!
... at the point where you loop through every ball and call the draw(), update(), and collisiondetect() functions for each one, make it so that these functions are only called if the current ball exists.
Introduction to the server side - Learn web development
sites like google maps can use saved or current locations for providing routing information, and search or travel history to highlight local businesses in search results.
... store session/state information server-side programming allows developers to make use of sessions — basically, a mechanism that allows a server to store information on the current user of a site and send different responses based on that information.
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
however, if you try to click the "clear completed" button now, it won't appear to do anything, because there is currently no way to "complete" a todo.
...ntent for the block form of "if" {{/if}} so let's try replacing this part of footer.hbs: <strong>{{this.todos.incomplete.length}}</strong> todos left with the following: <strong>{{this.todos.incomplete.length}}</strong> {{#if this.todos.incomplete.length === 1}} todo {{else}} todos {{/if}} left this will give us an error, however — in ember, these simple if statements can currently only test for a truthy/falsy value, not a more complex expression such as a comparison.
Ember interactivity: Events, classes and state - Learn web development
this function's contents are fairly easy to understand — when the function is invoked, a new todo object instance is created with a text value of text, and the todos property value is updated to all of the current items inside the array (accessed conveniently using spread syntax), plus the new todo.
...this makes it accessible via this.todos inside both the class and the template: import component from '@glimmer/component'; import { inject as service } from '@ember/service'; export default class todolistcomponent extends component { @service('todo-data') todos; } one issue here is that our service is called todos, but the list of todos is also called todos, so currently we would access the data using this.todos.todos.
Routing in Ember - Learn web development
at the moment, we already have the "all" page, as we are currently not doing any filtering in the page that we've been working with, but we will need to reorganize it a bit to handle a different view for the "active" and "completed" todos.
...inside todolist one small final thing that we need to fix is that previously, inside todomvc/app/components/todo-list.hbs, we were accessing the todo-data service directly and looping over all todos, as shown here: {{#each this.todos.all as |todo| }} since we now want to have our todolist component show a filtered list, we'll want to pass an argument to the todolist component representing the "current list of todos", as shown here: {{#each @todos as |todo| }} and that's it for this tutorial!
React interactivity: Editing, filtering, conditional rendering - Learn web development
currently, they repeat the "all" label, and they have no functionality!
... we know that the <filterbutton /> should report whether it is currently pressed, and it should be pressed if its name matches the current value of our filter state.
Beginning our React todo list - Learn web development
implementing our styles paste the following css code into src/index.css so that it replaces what's currently there: /* resets */ *, *::before, *::after { box-sizing: border-box; } *:focus { outline: 3px dashed #228bec; outline-offset: 0; } html { font: 62.5% / 1.15 sans-serif; } h1, h2 { margin-bottom: 0; } ul { list-style: none; padding: 0; } button { border: none; margin: 0; padding: 0; width: auto; overflow: visible; background: transparent; color: inherit; font: inhe...
...ont-smoothing: antialiased; cursor: pointer; position: absolute; z-index: 1; margin: 0; opacity: 0; } .c-cb > label { font-size: inherit; font-family: inherit; line-height: inherit; display: inline-block; margin-bottom: 0; padding: 8px 15px 5px; cursor: pointer; touch-action: manipulation; } .c-cb > label::before { content: ""; position: absolute; border: 2px solid currentcolor; background: transparent; } .c-cb > input[type="checkbox"]:focus + label::before { border-width: 4px; outline: 3px dashed #228bec; } .c-cb > label::after { box-sizing: content-box; content: ""; position: absolute; top: 11px; left: 9px; width: 18px; height: 7px; transform: rotate(-45deg); border: solid; border-width: 0 0 5px 5px; border-top-color: transparent; op...
Deployment and next steps - Learn web development
code along with us git clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/08-next-steps or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/08-next-steps remember to run npm install && npm run dev to start your app in development mode.
... you can also check the progress of the current and previous jobs from the ci / cd > jobs menu option of your gitlab project.
Using Vue computed properties - Learn web development
currently, we're not actually tracking the "done" data in any fashion, so the number of completed items does not change.
...we want to find the item with the matching id and update its done status to be the opposite of its current status: updatedonestatus(todoid) { const todotoupdate = this.todoitems.find(item => item.id === todoid) todotoupdate.done = !todotoupdate.done } we want to run this method whenever a todoitem emits a checkbox-changed event, and pass in its item.id as the parameter.
Setting up your own test automation environment - Learn web development
in this case we get the title of the current page with the gettitle() method, then return a pass or fail message depending on what its value is.
...est"); now we'll update our capabilities object to include a project name — add the following line before the closing curly brace, remembering to add a comma at the end of the previous line (you can vary the build and project names to organize the tests in different windows in the browserstack automation dashboard): 'project' : 'google test 2' next we need to access the sessionid of the current session, so we know where to send the request (the id is included in the request url, as you'll see later).
Package management basics - Learn web development
in addition, what happens if you find a better tool that you want to use instead of the current one, or a new version of your dependency is released that you want to update to?
... updating dependencies npm update yarn upgrade this will look at the currently installed dependencies and update them, if there is an update available, within the range that's specified in the package.
Accessibility/LiveRegionDevGuide
this page is currently under construction.
...current utterances should be allowed to finish but the 'rude' messages should be output as soon as possible.
Accessibility information for UI designers and developers
links vs buttons to keep your interface in line with user expectations, use links for interactions that go somewhere (on the current page or another page) and buttons for interactions that do something (like submit a form or open an overlay).
...it does not need to be exactly the same, it is fine to have a different current menu item or different subnavigation links.
Embedding API for Accessibility
low cycling in lists and links setboolpref("keyboardnav.allow_cycling", allowcycling); no mouse pointer moves with keyboard focus setboolpref("keyboardnav.mouse_follows_keyboard_focus", mousefollows); /* if this pref is set, the mouse pointer will always be move to the 0,0 pixel of the current keyboard focus frame */ no browse with caret setboolpref("accessibility.browsewithcaret", usecaret); /* if this pref is set, the caret will be visible in the text of the browser, allowing the user to cursor around the html content as if in a read-only editor */ moz 0.9 special content notifications ...
... one way of doing this is to build up the nsiwebbrowseraccessible interface, so that there is a method to force loading each type of content just for the current page in the current session.
Mozilla Plugin Accessibility
all browser keys unavailable when plugin has focus focused plugins currently have no choice but to consume all keyboard events.
...this will allow keyboard users to still access menus, close the current page, scroll, move back and forward in history, etc.
Mozilla's Section 508 Compliance
(c) a well-defined on-screen indication of the current focus shall be provided that moves among interactive interface elements as the input focus changes.
...screen reader access is currently being tested.
Accessibility and Mozilla
they also define a list of possible object states, such as focused, read-only, checked, etc.accessibility features in firefoxfirefox works with popular screen readers, with the best support currently coming from gw micro's window-eyes 5.5.
...this page describes a number of design-related aspects to look out for, in no particular order.accessibility/liveregiondevguidethis page is currently under construction.
Frequently Asked Questions for Lightweight themes
using lightweight themes how do i change my current lightweight theme?
...from there, you can view your current designs.
Add-ons
you can see the apis currently supported in firefox and other browsers.
...we are currently building support for the webextensions api on geckoview.
Adding phishing protection data providers
browser.safebrowsing.provider.idnum.reportgenericurl not currently used; intended for use in reporting other issues with the phishing protection service.
... determining the currently-selected data provider if you need to determine the id number of the currently selected anti-phishing data provider, you can look at the current value of the preference browser.safebrowsing.dataprovider.
Browser chrome tests
it currently allows you to run javascript code in the same scope as the main firefox browser window and report results using the same functions as the mochitest test framework.
...be aware that the test harness will mark tests that take too long to complete as failed (the current timeout is 30 seconds).
Continuous Integration
tests currently run are primarily startup tests.
...you can view the current set of alerts on the perfherder alerts dashboard.
Creating a Language Pack
add the preference intl.locale.requested and set it to your language code, in this case, x-testing, or add it in front of the current setting, seperated with a comma.
... l10n binary repack for apps currently in development, you need to get the right strings for the build you use.
Debugging OpenGL
if you start up firefox with this variable defined, the following behavior changes occur: each time you issue an opengl call, a check is performed to ensure that the gl context is current, using a thread-local static variable to keep track of this.
... if the context isn't current, the call aborts.
HTTP logging
go to the web site that is broken for you and make the bug happen in the browser) make a note of the value of "current log file".
... quit firefox is if it's currently running, by using the quit option in the file menu.
ESLint
understanding rules and errors not all files are linted currently eslint runs on: .js .jsx .jsm .xml .html .xhtml additionally, some directories and files are ignored, see the .eslintignore file handling errors if your code fails an eslint rule, you'll get an error similar to this: /gecko/toolkit/mozapps/installer/js-compare-ast.js 18:39 error 'snarf' is not defined.
... no-undef the no-undef rule is currently being enabled throughout the code base.
Eclipse CDT Manual Setup
eclipse cdt doesn't currently understand objective-c files (although there is a project that promises to add objective-c support), so for now, this is the best we can do to give eclipse a chance of expanding its understanding of the source into the objective-c files.
... if you can't untick "use default build command", you must change the current builder by clicking on "tool chain editor" (in c/c++ build) and choosing another builder (e.g., "gnu make builder").
Contributing to the Mozilla code base
mozilla is a large project and we are thrilled to have contributors with very diverse skills below is a table with our currently available projects to contribute to, along with the skills needs and links to their documentation.
...we'll be integrating some information from these pages soon, but until then you may find them interesting in their current form: a guide to learning the mozilla codebase a beginner's guide to spidermonkey, mozilla's javascript engine mozilla platform development cheatsheet (archive.org) ...
Linux compatibility matrix
distribution kernel glibc glib gtk+2 gtk+3 pixman stdc++ gcc clang python3 released eol notes red backgrounds denote lack of compatibility with current versions of firefox.
... yellow backgrounds denote compatibility with esr78 green backgrounds denote compatibility with the current release (as of writing, 78) greener backgrounds denote compatibility with the current mozilla-central (as of writing, 80).
Performance
s to global services) in a frame script bad: //framescript.js services.obs.addobserver("document-element-inserted", { observe: function(doc, topic, data) { if(doc.ownerglobal.top != content) return; // bail out if this is for another tab decoratedocument(doc); } }) observer notifications get fired for events that happen anywhere in the browser, they are not scoped to the current tab.
... // framescript.js function onlyonceinabluemoon() { // we only need this during a total solar eclipse while goat blood rains from the sky sendasyncmessage('my-addon:paragraph-count', {num: content.document.queryselectorall('p').length}) } addmessagelistener("my-addon:request-from-parent", onlyonceinabluemoon) better: // addon.js function ontoolbarbutton(event) { let tabmm = gbrowser.mcurrentbrowser.frameloader.messagemanager; let button = event.target; let callback = (message) => { tabmm.removemessagelistener("my-addon:paragraph-count", callback) decoratebutton(button, message.data.num) } tabmm.addmessagelistener("my-addon:paragraph-count", callback); tabmm.loadframescript("data:,sendasyncmessage('my-addon:paragraph-count', {num: content.document.queryselectorall('p...
Performance best practices for Firefox front-end engineers
these methods generally return the most-recently-calculated value for the requested value, which means the value may no longer be current, but may still be "close enough" for your needs.
...if you can make do with information that may not be quite current, this can be helpful.
Firefox and the "about" protocol
here is a complete list of urls in the about: pseudo protocol: about: page description about:about provides an overview of all about: pages available for your current firefox version about:addons add-ons manager about:buildconfig displays the configuration and platform used to build firefox about:cache displays information about the memory, disk, and appcache about:checkerboard switches to the checkerboarding measurement page, which allows to detect checkerboarding issues about:config provides a way t...
...see firefox reader view for clutter-free web pages about:rights displays rights information about:robots special page showing notes about robots about:serviceworkers displays currently running service workers about:studies lists the shield studies that are installed about:sessionrestore session restoration (displayed after a firefox crash) about:support troubleshooting information (also available through firefox menu > ?
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
we'll be using this term throughout the current article, and other parts of the documentation.
... var searchactive = false; prev.disabled = true; next.disabled = true; next, we add an event listener to the searchform so that when it is submitted, the htmliframeelement.findall() method is used to do a search for the string entered into the search input element (searchbar) within the text of the current page (the second parameter can be changed to 'case-insensitive' if you want a case-insensitive search.) we then enable the previous and next buttons, set searchactive to true, and blur() the search bar to make the keyboard disappear and stop taking up our screen once the search is submitted.
HTMLIFrameElement.getActive()
the getactive() method of the htmliframeelement indicates whether the current browser <iframe> is the currently active frame.
... syntax var amiactive = instanceofhtmliframeelement.getactive(); returns a boolean indicating whether the current browser <iframe> is the currently active frame (true) or not (false.) parameters none.
HTMLIFrameElement.getVolume()
the getvolume() method of the htmliframeelement gets the current volume of the browser <iframe>.
... example callback version: var browser = document.queryselector('iframe'); var request = browser.getvolume(); request.onsuccess = function() { console.log('the current browser volume is ' + request.result); } promise version: var browser = document.queryselector('iframe'); browser.getvolume().then(function(volume) { console.log('the current browser volume is ' + volume); }); specification not part of any specification.
mozbrowserloadend
non-standard this feature is not on a current w3c standards track, but it is supported on the firefox os platform.
...can be used to make the theme of the surrounding ui complement the theme of the currently loaded content, for example.
MozBeforePaint
this new property indicates the time, in milliseconds since epoch, at which all animations started in the specified window during the current refresh interval should be considered to have started running.
...this computes the current position for the animating box and updates the box's position on screen, and, if the animation sequence is not yet complete, calls window.requestanimationframe() to schedule the next animation frame to be drawn.
HTML parser threading
(there's currently one parser thread serving all parser instances.) data received from document.write() is parsed on the main thread.
...mtokenizermutex protects most data structures on nshtml5streamparser from concurrent access.
How Mozilla determines MIME Types
it does the following: checks the start of the file for "magic numbers"; this can currently detect pdf and postscript.
... externalhelperappservice (located at uriloader/exthandler/nsexternalhelperappservice.cpp) the file->mime type mapping works like this: on beos, the operating system is asked for the type of the file (not quite yet, bug 217723) on macos, the type and creator code will be used to lookup the type of the file from the os a hardcoded list of extensions is checked (containing currently 13 entries, nsexternalhelperappservice.cpp line 463 (this is done for speed – it is faster to find data in the hardcoded list than asking the os or looking in preferences) if the extension is not listed there, it becomes interesting.
Internationalized Domain Names (IDN) Support in Mozilla Browsers
most of the existing sites currently use the ascii-compatible encoding known as race or row-based ascii compatible encoding, which was not accepted as a standard by ietf.
...this will list all the preferences for your current profile.
AddonUpdateChecker
ility, in string appversion, in string platformversion ) parameters updates an array of update objects version the version of the add-on to get new compatibility information for ignorecompatibility an optional parameter to get the first compatibility update that is compatible with any version of the application or toolkit appversion the version of the application or null to use the current version platformversion the version of the platform or null to use the current version getnewestcompatibleupdate() returns the newest available update from a list of update objects.
... updateinfo getnewestcompatibleupdate( in updateinfo updates[], in string appversion, in string platformversion ) parameters updates an array of update objects appversion the version of the application or null to use the current version platformversion the version of the platform or null to use the current version checkforupdates() starts an update check.
Add-on Repository
results passed to the searchcallback object only include add-ons that are compatible with the current application and are not already installed or in the process of being installed.
... issearching boolean true if a search is currently in progress; otherwise false.
Widget Wrappers
areatype the type of the widget's current area isgroup true, will be false for wrappers around single widget nodes source for api-provided widgets, whether they are built-in to firefox or add-on-provided disabled for api-provided widgets, whether the widget is currently disabled.
...this will point to the overflow chevron on overflowable toolbars if and only if your widget node is overflowed, to the anchor for the panel menu if your widget is inside the panel menu, and to the node itself in all other cases overflowed boolean indicating whether the node is currently in the overflow panel of the toolbar isgroup false, will be true for the group widget label for api-provided widgets, convenience getter for the label attribute of the dom node tooltiptext for api-provided widgets, convenience getter for the tooltiptext attribute of the dom node disabled for api-provided widgets, convenience getter and setter for ...
DownloadTarget
it currently indicates the size of the main file (such as the html document) rather than the sum of all of the files' sizes, but you must not rely upon this behavior, as it is subject to change.
... methods refresh() updates the state of a finished, failed, or canceled download based on the current state as indicated by the file system.
Examples
this can be used for chaining: components.utils.import("resource://gre/modules/osfile.jsm") os.file.getcurrentdirectory().then(currentdir => { let path = os.path.join(currentdir, ".mozconfig"); return os.file.exists(path).then(exists => { console.log(exists ?
... "you have .mozconfig in " + currentdir : "you don't have .mozconfig in " + currentdir); }); }).then(null, components.utils.reporterror); parallel promise (this example needs more work) so when chaining promises, consequent promises run after the previous promise completes.
Bootstrapping a new locale
make sure to have the directory where you intend to work as the current path on your terminal.
... warning: don't copy and paste these commands; you need to replace "ab-cd" with your language identifier first and 1.9.x with the most current release branch.
Localization and Plurals
this module provides a couple methods for localizing to the browser's current locale as well as getting methods to localize to a desired plural rule.
... components.utils.import("resource://gre/modules/pluralform.jsm"); methods: get these methods make use of the browser's current locale specified by chrome://global/locale/intl.properties's pluralrule value.
Localization content best practices
example: you have chosen a keyword that is currently in use by "%s".
... # localization note(generalsiteidentity): %1$s is the owner of the current website, # %2$s is the name of the certification authority signing the certificate.
Localizing with Mercurial
localizing current versions of firefox, thunderbird and seamonkey includes working with mercurial.
... note the dot (".") at the end of the second command, which means the current directory.
Localizing without a specialized tool
get the source change your current directory to your working directory with the following command: $ cd /path/to/your/working/directory first, you will need to check out the sources of mozilla-1.9.2 together with the en-us strings.
...this will automatically create an "x-testing" directory in your current directory (you should be in l10n-mozilla-1.9.2).
Localization sign-off reviews
sign-off dashboards to the right, you'll see the current sign-offs page for a german localization.
... the diff generated for sign-off reviews the image to the right illustrates the revisions diff between the current release revision and your newly proposed release revision.
Mozilla MathML Status
an overview of the mathml 3 elements/attributes - excluding deprecated ones - and the current status of the native support.
...the sections are marked with their current status: supported, in progress, and not currently supported.
Mozilla Style System Documentation
style context management a style context (class nsstylecontext, currently also interface nsistylecontext although the interface should go away when all of the style systems can be moved back into the layout dll) represents the style data for a css formatting object.
...these methods may all return an existing style context rather than a new one (see stylesetimpl::getcontext), if there is a current style context with the same parent, that matches the same rules (a check that is easy because of the ruletree), and is for the same pseudo-element (or not for a pseudo-element, or a "non-element").
mozilla::CondVar
assertcurrentthreadownsmutex() assert that the current thread has successfully locked the mutex undergirding this condvar.
... assertnotcurrentthreadownsmutex() assert that the current thread has not successfully locked the mutex undergirding this condvar.
mozilla::Monitor
assertcurrentthreadin() assert that the current thread is in this monitor.
...assertnotcurrentthreadin() assert that the current thread is not in this monitor.
mozilla::Mutex
assertcurrentthreadowns() assert that the current thread has locked this mutex.
...assertnotcurrentthreadowns() assert that the current thread does not own this mutex.
Automated performance testing and sheriffing
currently we aggregate this information in the perfherder web application where performance sheriffs watch for significant regressions, filing bugs as appropriate.
... current list of automated systems we are tracking (at least to some degree): talos: the main performance system, run on virtually every check-in to an integration branch build metrics: a grab bag of performance metrics generated by the build system arewefastyet: a generic javascript and web benchmarking system areweslimyet: a memory benchmarking tool ...
JS::PerfMeasurement
the current implementation can measure eleven different types of low-level hardware and software events: events that can be measured bitmask passed to constructor counter variable what it measures perfmeasurement::cpu_cycles .cpu_cycles raw cpu clock cycles ::instructions .instructions total instructions executed ::cache_references .cache_references total number...
...static bool perfmeasurement::canmeasuresomething() this class method returns true if and only if some -- not necessarily all -- events can be measured by the current build of spidermonkey, running on the current os.
Profiling with the Firefox Profiler
understanding profiles the firefox profiler has more current documentation available at profiler.firefox.com/docs/.
...cleopatra doesn't currently understand this prefix, so it needs to be removed before pasting.
browser.search.context.loadInBackground
browser.search.context.loadinbackground controls whether a search from the context menu with "search <search engine> for <selected text>" opening a new tab will give focus to it and load it in the foreground or keep focus on the current tab and open it in the background.
... type:boolean default value:false exists by default: yes application support: firefox 13.0 status: active; last updated 2012-02-17 introduction: pushed to nightly on 2012-02-15 bugs: bug 727131 values true new tab with search results will be opened in the background, focus stays on the current tab.
mail.tabs.drawInTitlebar
false the tabs are drawn in a separate tab bar, and the title bar shows the title of the current tab (e.g.
... the subject of the currently selected mail).
Nonblocking IO In NSPR
the current implementation of <tt>pr_select()</tt> simply calls <tt>pr_poll()</tt>, so it is sure to have worse performance.
... current status implemented across all supported platforms.
PLHashEnumerator
syntax #include <plhash.h> typedef printn (pr_callback *plhashenumerator)(plhashentry *he, printn index, void *arg); /* return value */ #define ht_enumerate_next 0 /* continue enumerating entries */ #define ht_enumerate_stop 1 /* stop enumerating entries */ #define ht_enumerate_remove 2 /* remove and free the current entry */ #define ht_enumerate_unhash 4 /* just unhash the current entry */ description plhashenumerator is a function type used in the enumerating a hash table.
...in the current implementation, it will leave the hash table in an inconsistent state.
PR_Available
determines the number of bytes (expressed as a 32-bit integer) that are available for reading beyond the current read-write pointer in a specified file or socket.
...for a normal file, these are the bytes beyond the current file pointer.
PR_Available64
determines the number of bytes (expressed as a 32-bit integer) that are available for reading beyond the current read-write pointer in a specified file or socket.
...for a normal file, these are the bytes beyond the current file pointer.
PR_FindSymbolAndLibrary
finds a symbol in one of the currently loaded libraries, and returns both the symbol and the library in which it was found.
... description this function finds the specified symbol in one of the currently loaded libraries.
PR_GetErrorText
copies the current thread's current error text without altering the text as stored in the thread's context.
... syntax #include <prerror.h> print32 pr_geterrortext(char *text); parameters the function has one parameter: text on output, the array pointed to contains the thread's current error text.
PR_GetErrorTextLength
syntax #include <prerror.h> print32 pr_geterrortextlength(void) returns if a zero is returned, no error text is currently set.
... otherwise, the value returned is sufficient to contain the error text currently available.
PR_GetLibraryPath
retrieves the current default library path.
... description this function retrieves the current default library pathname, copies it, and returns the copy.
PR_TicksPerSecond
returns the number of ticks per second currently used to determine the value of printervaltime.
... syntax #include <prinrval.h> pruint32 pr_tickspersecond(void); returns an integer between 1000 and 100000 indicating the number of ticks per second counted by printervaltime on the current platform.
Threads
pr_getcurrentthread returns the current thread object for the currently running code.
... getting a thread's scope pr_getthreadscope gets the scoping of the current thread.
Getting Started With NSS
you can start with: the current primary nss documentation page from which we link to other documentation.
... a new set of samples is currently under development and review, see create new nss samples.
NSS 3.14 release notes
warning: because of ambiguity in the current draft text, applications should only use gcm in single-part mode (c_encrypt/c_decrypt).
... bug 792681 - new default cipher suites the default cipher suites in nss 3.14 have been changed to better reflect the current security landscape.
Release notes for recent versions of NSS
the current stable release of nss is 3.56, which was released on 21 august 2020.
... (nss 3.56 release notes) the current esr releases of nss are 3.44.4 (nss 3.44.4 release notes), intended for firefox esr 68, which was released on 19 may 2020, and 3.53.1 (nss 3.53.1 release notes), intended for firefox esr 78, which was released on 16 june 2020.
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
much of nss's token selection is based on where the key involved is currently stored.
... nss does not currently use any of the callbacks.
FC_OpenSession
not currently supported.
...the nss cryptographic module currently doesn't call the surrender callback function notify.
NSPR functions
the nspr function pr_now returns the current time in prtime.
... pr_getuniqueidentity pr_createiolayerstub pr_getdefaultiomethods pr_getidentitieslayer pr_getlayersidentity pr_pushiolayer pr_popiolayer wrapping a native file descriptor if your current tcp socket code uses the standard bsd socket api, a lighter-weight method than creating your own nspr i/o layer is to simply import a native file descriptor into nspr.
sslcrt.html
upgraded documentation may be found in the current nss reference certificate functions chapter 5 certificate functions this chapter describes the functions and related types used to work with a certificate database such as the cert7.db database provided with communicator.
... validating certificates manipulating certificates getting certificate information comparing secitem objects validating certificates cert_verifycertnow cert_verifycertname cert_checkcertvalidtimes nss_cmpcertchainwcanames cert_verifycertnow checks that the current date is within the certificate's validity period and that the ca signature on the certificate is valid.
NSS tools : signtool
to specify the current directory, use "-d." (including the period).
...this option is useful if you want the expiration date of the signature checked against the current date and time rather than the time the files were signed.
Necko walkthrough
nspipeinputstream::asyncwait), with target thread set to the current thread, i.e.
... nshttpconnection::activate this connection is passed the transaction nshttpconnection::onoutputstreamready nshttpconnection::onsocketwritable tries to write the request data from the current transaction (mtransaction) tells the transaction to now wait (`resumerecv) nshttpconnection::resumerecv nshttptransaction::readsegments readrequestsegment is passed to mrequeststream->readsegments - this function pointer is called and used to read the request bytes, which in turn calls ...
Rhino optimization
optimization settings the currently supported optimization settings are: -1 interpretive mode is always used.
...local common sub-expressions are collapsed (currently this only happens for property lookup, but in the future more expressions may be optimized).
Rhino overview
if other properties files with extensions corresponding to the current locale exist, they will be used instead.
...if it is the interpreter class, call the getinterpretersecuritydomain() method of context to obtain the security domain of the currently executing interpreted script or function.
Rhino shell
environment returns the current environment object.
...if no argument is supplied, the current version number is returned.
Future directions
concurrent and wasm gc we are working towards a concurrent collector.
...no fundamental blockers currently exist, but ctypes is still using nspr's runtime library loading facilities.
Getting SpiderMonkey source code
this fetches a snapshot of the current mozilla tree.
... getting older spidermonkey sources from cvs note: you will need to explicitly fetch the javascript shell sources even if you currently build another mozilla project, as there are files specific to the shell that are not normally found in a mozilla source tree.
Hacking Tips
linestub>> () #6 0x00007ffff7f4423d in <<jitframe_baselinejs>> () #7 0x00007ffff7f4222e in <<jitframe_baselinestub>> () #8 0x00007ffff7f4326a in <<jitframe_baselinejs>> () #9 0x00007ffff7f38d5f in <<jitframe_entry>> () #10 0x00000000006a86de in enterbaseline(jscontext*, js::jit::enterjitdata&) (cx=0x14f2640, data=...) at js/src/jit/baselinejit.cpp:150 note, when you enable the unwinder, the current version of gdb (7.10.1) does not flush the backtrace.
... for (; iter != current->end(); iter++) { ionspew(ionspew_codegen, "instruction %s", iter->opname()); […] masm.store16(imm32(iter->id()), address(stackpointer, -8)); // added if (!iter->accept(this)) return false; […] } this modification will add an instruction which abuse the stack pointer to store an immediate value (the lir id) to a location which would never be generated by any san...
Bytecodes
the space for a single javascript value is called a "slot", so the categories are: argument slots: holds the actual arguments passed to the current frame.
... local slots: holds the local variables used by the current code.
Tracing JIT
in the spidermonkey tracing jit there is only ever one assembler active at a time, associated with the currently active fragmento.
...when all registers are in use, the least-often-used register currently in use is spilled.
SpiderMonkey Internals
interpreter like many portable interpreters, spidermonkey's interpreter is mainly a single, tremendously long function that steps through the bytecode one instruction at a time, using a switch statement (or faster alternative, depending on the compiler) to jump to the appropriate chunk of code for the current instruction.
...they are also used for current standalone builds.
Introduction to the JavaScript shell
after following the build documentation and installing the built shell using make install, you can run the shell in interactive mode using the command: js [ if you get " symbol lookup error: ./js: undefined symbol: pr_setcurrentthreadname" e.g.
... if value is not specified, gcparam() returns the current value associated with gc parameter named name.
JS::AutoSaveExceptionState
this article covers features introduced in spidermonkey 31 save and later restore the current exception state of a given jscontext.
... description js::autosaveexceptionstate saves and later restores the current exception state of a given jscontext.
JS::CallArgs
mutablehandlevalue rval() const returns the currently-set return value.
...(spidermonkey doesn't currently assert this, but it will do so eventually.) you don't need to use or change this if your method fails.
JSAutoCompartment
description every jscontext has a current compartment.
... only objects in the current compartment can be accessed, so to access an object in a different compartment, this containing compartment has to be entered first.
JSExtendedClass
return the current outer object.
...return the current inner object.
JS_AliasProperty
name is the property's current name in the object, and alias is the alternate name to assign to the property.
...if the property is currently out of scope, already exists, or the alias itself cannot be assigned to the property, js_aliasproperty does not report an error, but returns js_false.
JS_CheckAccess
description js_checkaccess determines whether the property of obj given by id can be accessed by the code currently running in the context cx.
... on success, js_checkaccess returns js_true, *vp is set to the current value of the specified property, and *attrsp is set to the property's attributes.
JS_ClearPendingException
clear the currently pending exception in a context.
... description js_clearpendingexception cancels the currently pending exception in cx, if any.
JS_EnterCompartment
this article covers features introduced in spidermonkey 24 note: the preferred way of changing a context's current compartment is using jsautocompartment.
... description every jscontext has a current compartment.
JS_FlushCaches
this article covers features introduced in spidermonkey 1.8.5 flushes the code cache for the current thread.
... the operation might be delayed if the cache cannot be flushed currently because native code is currently executing.
JS_ForgetLocalRoot
remove a value from the innermost current local root scope.
...(here the term gc-thing refers to any value that is subject to garbage collection: a jsobject, jsstring, jsfunction, or jsdouble.) js_forgetlocalroot works on any gc-thing allocated in the current local root scope, but it's more time-efficient when called on references to more recently created gc-things.
JS_ForwardGetPropertyTo
on success, *vp receives the current value of the property, or undefined if no such property is found.
... on success, these functions set *vp to the current value of the property, or undefined if obj has no such property, and return true.
JS_GetContextThread
description js_getcontextthread returns the id of the thread currently associated with this context.
... if the context is not currently associated with any thread, the return value is 0.
JS_GetFunctionCallback
returns the callback currently configured to be called when javascript functions are invoked or exited, as established by a prior call to js_setfunctioncallback.
... description js_getfunctioncallback returns the current function invocation callback, or null if there isn't one set up.
JS_GetGCParameter
description js_getgcparameter returns the current parameter of the garbage collection.
... if successful, js_getgcparameter returns the current parameter.
JS_GetPendingException
get the current pending exception for a given jscontext.
...on success, *vp receives the current pending exception.
JS_GetProperty
on success, *vp receives the current value of the property, or undefined if no such property is found.
... on success, these functions set *vp to the current value of the property, or undefined if obj has no such property, and return true.
JS_GetPropertyDefault
on success, *vp receives the current value of the property, or undefined if no such property is found.
...on success, these functions set *vp to the current value of the property, or def if obj has no such property, and return true.
JS_HasArrayLength
if the property exists, js_hasarraylength stores the current value of the property in *lengthp.
... on success, js_hasarraylength returns js_true, and *lengthp receives the current value of the length property.
JS_IsRunning
indicates whether or not a script or function is currently executing in a given context.
... description js_isrunning determines if a script or function is currently executing in a specified jscontext, cx.
JS_LeaveCompartment
this article covers features introduced in spidermonkey 24 note: the preferred way of changing a context's current compartment is using jsautocompartment.
... description every jscontext has a current compartment.
JS_MapGCRoots
syntax uint32 js_mapgcroots(jsruntime *rt, jsgcrootmapfun map, void *data); callback syntax #define js_map_gcroot_next 0 /* continue mapping entries */ #define js_map_gcroot_stop 1 /* stop mapping entries */ #define js_map_gcroot_remove 2 /* remove and free the current entry */ typedef int (*jsgcrootmapfun)(void *rp, const char *name, void *data); description call js_mapgcroots to map the gc's roots table using map(rp, name, data).
... the map function should return js_map_gcroot_remove to cause the currently enumerated root to be removed.
JS_ReportPendingException
forward the current pending exception in a given jscontext to the current jserrorreporter callback.
... description if an exception is pending in the context cx, js_reportpendingexception converts the exception to a string and reports it to the current error reporter.
JS_SetFunctionCallback
specify null to stop calling the current callback.
... the callback must not modify the current state of execution.
JS_SetPendingException
sets the current exception being thrown within a context.
... description js_setpendingexception sets the current exception being thrown within a context.
JS_THREADSAFE
js_threadsafe was a compile-time option that enables support for running multiple threads of javascript code concurrently as long as no objects or strings are shared between them.
...jsnatives and other callback functions can be called concurrently by multiple threads.
Parser API
2}}, type:"literal", value:42}) it is also available since firefox 7; it can be imported into the global object via: components.utils.import("resource://gre/modules/reflect.jsm") or into a specified object via: components.utils.import("resource://gre/modules/reflect.jsm", obj) built-in objects whether in spidermonkey shell or firefox (after importing), the global singleton object reflect currently contains just the parse method.
... properties of the reflect object the reflect object currently consists of a single method.
SpiderMonkey 31
when all jsapi operation has completed, the corresponding js_shutdown method (currently non-mandatory, but highly recommended as it may become mandatory in the future) uninitializes spidermonkey, cleaning up memory and allocations performed by js_init.
... this method pairs with the existing (currently non-mandatory) js_shutdown method, which uninitializes the js engine after all runtimes have been destroyed.
Running Parsemark
generally you'll want to capture json results for your baseline and compare them to the results for the "current" version of your shell.
... a typical run can be done like so: cd js/src/tests python parsemark.py /path/to/baseline/js /path/to/parse-tests-dir/ -q > /tmp/baseline.json python parsemark.py /path/to/current/js /path/to/parse-tests-dir/ -q > /tmp/current.json python compare_bench.py /tmp/current.json /tmp/baseline.json note: unfortunately the comparisons done are very noisy and not reliable!
Split object
the principals of the page the window is currently displaying?
...but there is a special case when js_getscopechain is called on a jscontext in which no code is currently running.
TPS Formdata Lists
fieldname: "username", value: "joe" } ]; formdata lists and phase actions you can use the following functions in phase actions for formdata lists: formdata.add formdata.delete formdata.verify formdata.verifynot for an example, see the tps formdata unittest: http://hg.mozilla.org/services/tps/f...st_formdata.js notes note 1, tps supports the delete action for formdata, but sync currently does not correctly sync deleted form data, see bug 564296.
... note 2, sync currently does not sync formdata dates, so the date field is ignored when performing verify and verify-not actions.
Mozinfo
the current implementation exposes relevant key, values: os, version, bits, and processor.
... command line usage mozinfo comes with a command line, mozinfo which may be used to diagnose one's current system.
A Web PKI x509 certificate primer
in this document we will be referring to the current standard in use for web pki: x509 v3, which is described in detail in rfc 5280.
...diate signs the csr (using sha256) and appends the extensions described in the file "openssl x509 -req -sha256 -days 1096 -in example.csr -cakey intkey.pem -ca int.pem -set_serial $some_large_integer -out www.example.com.pem -extfile openssl.int.cnf" security notes there are several organizations that provide recommendations regarding the security parameters for key/hash sizes given current computational power.
XForms Accessibility
currently we have verified that xforms accessibility is working on the windows platform, and linux testing has not yet been done, although everything should work and is ready to be tested.
...currently it is represented by a slider only.
Places Expiration
default value is calculated on startup and put into the places.history.expiration.transient_current_max_pages preference.
... this transient version of the preference is just mirroring the current value used by expiration, setting it won't have any effect.
Places utilities for JavaScript
there are currently 11 services defined in here.
... return type returns a string serialization of the node unwrapnodes() unwraps data from the clipboard or the current drag session.
Querying Places
the current behavior does the normal query and then selects keywords from the first query and filters all the results.
...note: currently unimplemented, see bug 320831.
Using the Places annotation service
the annotation service does not currently enforce the annotation name format, but this may change in the future.
... flags: currently unused.
The Publicity Stream API
getpublicitystream( onsuccess: <function>, { [ onerror: <function> ], [ for_apps: <list> ], [ since: <date> ], [ before: <date> ], [ count: <int> ]): provides a means for a web store to receive a list of the current user's socially relevant app activity by being called from an origin which hosts a web store.
... onsuccess will be called with a single argument: a json list of the current user's socially relevant app activity in the fixme: deadlinkactivity streams open specification.
XPCOM glue
MozillaTechXPCOMGlue
extension and application authors currently using internal linkage should read the guide on migrating from internal linkage to frozen linkage.
...pcomglue.lib mac -l/path/to/sdk/lib -l/path/to/sdk/bin -wl,-executable-path,/path/to/sdk/bin -lxpcomglue_s -lxpcom -lnspr4 when building against a xulrunner derived sdk, use: -l/path/to/sdk/lib -l/path/to/xulrunner-bin -wl,-executable_path,/path/to/xulrunner-bin -lxpcomglue_s -lxpcom -lnspr4 where 'xulrunner-bin' is either /library/frameworks/xul.framework/versions/current/ or /path/to/xulrunner-build/[platform]/dist/bin -l/path/to/sdk/lib -lxpcomglue linux -l/path/to/sdk/lib -l/path/to/sdk/bin -wl,-rpath-link,/path/to/sdk/bin -lxpcomglue_s -lxpcom -lnspr4 write it exactly as stated, see notes.
XPCOM changes in Gecko 2.0
for extensions, this is the same chrome.manifest currently used to register chrome.
...what you need to change if your extension currently observes either xpcom-startup or app-startup, you need to update your code to observe profile-after-change instead.
XPCShell Reference
furthermore, xpcshell looks for xpcshell.js in the current directory.
...for example, load("myscript.js") will execute the script myscript.js in the current directory.
Language bindings
the following bridging layers are currently available: components objectthe components object is the object through which xpconnect functionality is reflected into javascript.
...ponents.resultscomponents.results is a read-only object whose properties are the names listed as the first parameters of the macros in js/xpconnect/src/xpc.msg (also at table of errors), with the value of each corresponding to that constant's value.components.returncodecomponents.stackcomponents.stack is a read only property of type nsistackframe (idl definition) that represents a snapshot of the current javascript callstack.
jsdIStackFrame
line unsigned long current line number (using the script's pc to line map.) read only.
... pc unsigned long current program counter in this stack frame.
mozIStorageStatementWrapper
row mozistoragestatementrow the current row.
... throws an exception if no row is currently available.
GetChildAtPoint
remarks if the point is in the current accessible but not in a child, the current accessible will be returned.
... if the point is in neither the current accessible or a child, then null will be returned.
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.
nsIAccessible
setselected this method adds or remove this accessible to the current selection.
... extendselection this method extends the current selection from its current accessible anchor node to this accessible.
nsIAccessibleSelectable
n gecko 1.7 method overview void addchildtoselection(in long index); void clearselection(); nsiarray getselectedchildren(); boolean ischildselected(in long index); nsiaccessible refselection(in long index); void removechildfromselection(in long index); boolean selectallselection(); attributes attribute type description selectioncount long the number of accessible children currently selected.
...ischildselected() determines if the current child of this object is selected.
nsIBrowserHistory
registeropenpage() obsolete since gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) mark a page as being currently open.
... void registeropenpage( in nsiuri auri ); parameters auri the page that is to be marked as currently open.
nsIBrowserSearchService
enginecount)] out nsisearchengine engines); void init([optional] in nsibrowsersearchinitobserver observer); void moveengine(in nsisearchengine engine, in long newindex); void removeengine(in nsisearchengine engine); void restoredefaultengines(); attributes attribute type description currentengine nsisearchengine the currently active search engine.
...if this value is false, the engine will be added to the list upon successful load, but it will not be selected as the current engine.
nsICacheSession
isstorageenabled() this method checks if the cache devices implied by the session storage policy are currently enabled for instantiation if they don't already exist.
...return value returns whether any of the cache devices implied by the session storage policy are currently enabled for instantiation or not, depending on their existence.
nsIControllers
getcontrollercount() returns the current number of controllers.
...return value the number of controllers currently in the list of controllers.
nsICookiePermission
aissession when cansetcookie is invoked, this is the current issession attribute of the cookie.
...aexpiry when cansetcookie is invoked, this is the current expiry time of the cookie.
nsIDBChangeListener
the nsidbchangelistener interface is used by components wanting to receive notification when the current database changes somehow.
...current events are: dbopened when a pending listener becomes real.
nsIDOMChromeWindow
title domstring obsolete since gecko 1.9.1 windowstate unsigned short returns current window state, the value is one of state_* constants.
...on other systems, this method doesn't have any reaction currently.
nsIDOMGeoPosition
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) attributes attribute type description address nsidomgeopositionaddress the address of the user's current location, if available.
... coords nsidomgeopositioncoords the user's current position information.
nsIDOMMozNetworkStatsManager
if successful, the result field of the domrequest holds an array of the currently available network interfaces.
...if successful, the result field of the domrequest holds an array of the currently available service types.
nsIDOMSimpleGestureEvent
note: on mac os x, the units used for magnification gestures by the underlying operating system api are not documented at this time; typical values appear to be in the range 0.0 to 100.0, but currently you can only rely on the value being either positive or negative.
... on windows, the units indicate the difference between the previous and current width between the two touch points, in pixels.
nsIDirectoryServiceProvider
example this code creates a global, read-only string called currdir with the value of the current working directory.
... alert(currdir); see also nsdirectoryservice nsidirectoryservice additionally, see section 16.5.2 of the rapid application development with mozilla book for instructions on how to get the current working directory and the process binary directory, among other things.
nsIDownloadProgressListener
acurselfprogress the current amount of progress that's been made on the download specified by adownload.
... acurtotalprogress the current amount of progress that's been made on all downloads.
nsIFeedProgressListener
result pointer to an nsifeedresult containing the current information about the feed being processed.
... void handlestartfeed( in nsifeedresult result ); parameters result an nsifeedresult describing the current state of the feed at the moment parsing begins.
nsIFileView
currently no other file stats are implemented.
... sorttype short the current sort type in effect.
nsIInputStream
in addition to the number of bytes available in the stream, this method also informs the caller of the current status of the stream.
... return value number of bytes currently available in the stream, or pr_uint32_max if the size of the stream exceeds pr_uint32_max.
nsIInstallLocation
titemfile(in astring id, in astring path); nsifile getitemlocation(in astring id); nsifile getstagefile(in astring id); boolean itemismanagedindependently(in astring id); void removefile(in nsifile file); nsifile stagefile(in nsifile file, in astring id); attributes attribute type description canaccess boolean whether or not the user can write to the install location with the current access privileges.
... restricted boolean whether or not this install location is on an area of the file system that could be restricted on a restricted-access account, regardless of whether or not the location is restricted with the current user privileges.
nsILocale
inherits from: nsisupports last changed in gecko 1.0 method overview astring getcategory(in astring category); methods getcategory() retrieves a string with the current locale name.
...currently those are: nsilocale_collate - collation order.
nsILoginManagerCrypto
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview astring decrypt(in astring ciphertext); astring encrypt(in astring plaintext); attributes attribute type description isloggedin boolean current login state of the token used for encryption.
...note: the current implemention of this inferface simply uses nss/psm's "secret decoder ring" service.
nsIMsgFolder
currently only supporting allmessagecountnotifications which refers to both total and unread message counts.
... note: even if the folder doesn't currently exist, a nsimsgfolder may be returned.
nsIMsgSearchSession
it informs the fe if the current scope support custom header use.
...this will fail if the current adapter is not using a timer.
nsINavBookmarksService
exportbookmarkshtml() obsolete since gecko 1.9 (firefox 3) saves the current bookmarks hierarchy to a bookmarks.html file.
... importbookmarkshtml() obsolete since gecko 1.9 (firefox 3) loads the given bookmarks.html file and merges it with the current bookmarks hierarchy.
nsINetworkLinkService
if the link status is not currently known, we generally assume that it is up.
... note: as of gecko 8.0, all operating systems currently return link_type_unknown.
nsIPlacesImportExportService
exporthtmltofile() saves the current bookmarks hierarchy to a bookmarks.html file.
... loads the given bookmarks.html file and replaces it with the current bookmarks hierarchy (if aisinitialimport is true) or appends it (if aisinitialimport is false).
nsIPlacesView
it's currently implemented directly on each of the built-in places views.
... getselectionnodes() returns an array of all currently selected nsinavhistoryresultnode objects of the view.
nsIPrefService
savepreffile() called to write current preferences state to a file.
... note: if nsnull is passed in for the afile parameter the preference data is written out to the current preferences file (usually prefs.js.) void savepreffile( in nsifile afile ); parameters afile the file to be written.
nsIPrivateBrowsingService
similarly, plug-ins can detect whether or not private browsing mode is in effect by using the npn_getvalue() function to check the current value of the npnvprivatemodebool variable.
... privatebrowsingenabled boolean indicates whether or not private browsing mode is currently enabled.
nsIProfileUnlocker
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void unlock(in unsigned long aseverity); constants constant value description attempt_quit 0 politely ask the process currently holding the profile's lock to quit.
... methods unlock() tries to unlock the profile by attempting or forcing the process that currently holds the lock to quit.
nsISupports proxies
proxy_always will ensure that a proxy object is always created no matter what thread you currently are on.
... if this flag is not specified, the proxy object manager will compare the eventq which you pass to the eventq which is on the current thread.
nsITelemetry
histogramsnapshots jsval an object containing a snapshot from all of the currently registered histograms.
... keys() - returns an array with the string keys of the currently registered histograms.
nsIThreadInternal
last changed in gecko 1.9 (firefox 3) inherits from: nsithread method overview void popeventqueue(); void pusheventqueue(in nsithreadeventfilter filter); attributes attribute type description observer nsithreadobserver get/set the current thread observer; set to null to disable observing.
... pusheventqueue() causes any events currently enqueued on the thread to be suppressed until popeventqueue() is called.
nsIThreadManager
nsithread newthread(in unsigned long creationflags); attributes attribute type description currentthread nsithread the currently executing thread.
... if the calling thread does not already have a nsithread associated with it, one is created and associate with the current prthread.
nsIThreadObserver
recursiondepth the number of calls to nsithread.processnextevent() on the call stack in addition to the current call.
... recursiondepth the number of calls to nsithread.processnextevent() on the call stack in addition to the current call.
nsIUpdate
toolkit/mozapps/update/nsiupdateservice.idlscriptable an interface that describes an object representing an available update to the current application - this update may have several available patches from which one must be selected to download and install, for example we might select a binary difference patch first and attempt to apply that, then if the application process fails fall back to downloading a complete file-replace patch.
... selectedpatch nsiupdatepatch the currently selected patch for this update.
nsIUpdateManager
toolkit/mozapps/update/nsiupdateservice.idlscriptable this interface describes a global application service that maintains a list of previously installed updates, as well as the currently in use update.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview nsiupdate getupdateat(in long index); void saveupdates(); attributes attribute type description activeupdate nsiupdate an nsiupdate object describing the currently in use update.
nsIVersionComparator
value if a and b are two version being compared, and the return value is smaller than 0, then a < b equals 0 then version, then a==b is bigger than 0, then a > b example function compareversions(a,b) { var x = services.vc.compare(a,b); if(x == 0) return a + "==" + b; else if(x > 0) return a + ">" + b; return a + "<" + b; } dump(compareversions("1.0pre", "1.0")); example - compare current browser version this example here uses nsixulappinfo component to get the version of the browser that the code is running in.
... see here: nsixulappinfo components.utils.import("resource://gre/modules/services.jsm"); var curentbrowserversion = services.appinfo.platformversion; //example: '31.*' var comparetothisversion = '25.*'; var compareresult = services.vc.compare(curentbrowserversion, comparetothisversion); if (compareresult == -1) { //currentbrowserversion is less than '25.*' (comparetothisversion) } else if (compareresult == 0) { //currentbrowserversion is '25.*' (comparetothisversion) } else if (compareresult == 1) { //currentbrowserversion is greater than '25.*' (comparetothisversion) } else { //will never get here as services.vc.compare only returns -1, 0, or 1 } see also toolkit version format ...
nsIWebBrowserChrome
webbrowser nsiwebbrowser the currently loaded webbrowser.
... iswindowmodal() is the window modal (that is, currently executing a modal loop)?
nsIWebBrowserFind
wrapfind boolean whether the search wraps around to the start (or end) of the document if no match was found between the current position and the end (or beginning).
... methods findnext() finds, highlights, and scrolls into view the next occurrence of the search string, using the current search settings.
nsIWebBrowserFindInFrames
attributes attribute type description currentsearchframe nsidomwindow frame at which to start the search.
... searchparentframes boolean whether to allow the search to propagate out of the currentsearchframe into its parent frame(s).
nsIWebPageDescriptor
inherits from: nsisupports last changed in gecko 1.7 method overview void loadpage(in nsisupports apagedescriptor, in unsigned long adisplaytype); attributes attribute type description currentdescriptor nsisupports retrieves the page descriptor for the current document.
...note that if the descriptor is that of the source of another page, this keeps the source view, but uses the current syntax highlighting preference.
nsIXULWindow
highestz 9 methods addchildwindow() tell this window that it has picked up a child xul window.note that xul windows do not currently track child xul windows.
...note that xul windows do not currently track child xul windows.
nsIZipWriter
boolean hasentry(in autf8string azipentry); void open(in nsifile afile, in print32 aioflags); void processqueue(in nsirequestobserver aobserver, in nsisupports acontext); void removeentry(in autf8string azipentry, in boolean aqueue); attributes attribute type description comment acstring gets or sets the comment associated with the currently open zip file.
... getentry() returns a specified entry or null if there is no such entry in the current zip file.
nsIAbCard/Thunderbird3
documentation for the old nsiabcard interface is currently at nsiabcard.
... properties currently supported on the card: names: firstname, lastname phoneticfirstname, phoneticlastname displayname, nickname spousename, familyname primaryemail, secondemail home contact: homeaddress, homeaddress2, homecity, homestate, homezipcode, homecountry homephone, homephonetype work contact.
Performance
you may want to check the sqlite_version definition in db/sqlite3/src/sqlite3.h for the current version if you are having problems.
...it keeps pages associated with the current transaction so it can roll them back, and it also keeps recently used ones so it can run faster.
Storage
the api is currently "unfrozen", which means it is subject to change at any time; in fact, it has changed somewhat with each release of firefox since it was introduced, and will likely continue to do so for a while.
... storage inspector extension makes it easy to view any sqlite database files in the current profile.
Events
ondestroyingview the current folder view is being destroyed.
... a folder is being unloaded, includes deletion onloadingfolder a folder is being loaded onmakeactive a folderdisplaywidget becomes active onmessagecountschanged the counts of the messages changed onmessagesloaded the messages in the folder have been loaded onmessagesremovalfailed removing some messages from the current folder failed onmessagesremoved some messages of the current message list have been removed onsearching a folder view derived from a search is being loaded, e.g.
nsIMsgCloudFileProvider
cancelfileupload() cancels an upload currently in progress for some nsilocalfile.
... void cancelfileupload(in nsilocalfile afile); parameters afile the nsilocalfile that is currently being uploaded to cancel.
Thunderbird Binaries
thunderbird current release can be downloaded from https://www.mozilla.org/thunderbird/ past thunderbird releases can be downloaded from https://releases.mozilla.org/pub/thunderbird/releases/ early preview releases whilst writing new versions of thunderbird, developers release preview versions, known as betas.
... latest english trunk builds are available at: https://archive.mozilla.org/pub/thunderbird/nightly/latest-comm-central/ latest localized trunk builds are available at: https://archive.mozilla.org/pub/thunderbird/nightly/latest-comm-central-l10n/ note: please use http://ftp.stage.mozaws.net/pub/thunderbird/nightly/latest-comm-central/ because the above two links currently do not work.
Adding items to the Folder Pane
when this happens, the folder pane consults the map-generator for the current mode, and that generator returns the necessary data for the folder pane's display.
...removeeventlistener("load", gnumbersext.load, false); let tree = document.getelementbyid("foldertree"); tree.addeventlistener("maprebuild", gnumbersext._insert, false); }, _insert: function gne__insert() { // this function is called when a rebuild occurs } }; window.addeventlistener("load", gnumbersext.load, true); the structure of folder-tree-items the folder pane stores its current display data in a property called _rowmap.
Building a Thunderbird extension 6: Adding JavaScript
in this step we will create a small piece of javascript code that inserts the current date into our statusbar widget.
...it then uses javascript's date class to get the current date, which it converts into a string that has the format of yyyy.mm.dd.
Creating a Custom Column
for this we overlay messenger.xul, by placing the following line in our chrome.manifest file: overlay chrome://messenger/content/messenger.xul chrome://replyto_col/content/replyto_col_overlay.xul now that our overlay is set up we need to connect a column to the current columns that exist.
... our replyto_col_overlay.xul should now contain something similar to this: <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <tree id="threadtree"> <treecols id="threadcols"> <splitter class="tree-splitter" /> <treecol id="colreplyto" persist="hidden ordinal width" currentview="unthreaded" flex="2" label="reply-to" tooltiptext="click to sort by the reply-to header" /> </treecols> </tree> <!-- include our javascript file --> <script type="text/javascript" src="chrome://replyto_col/content/replyto_col.js"/> </overlay> that's it!
Using the Multiple Accounts API
the current plans prevent sharing of information between accounts using the ui.
...currently, you can set the default smtp server to something else by setting the defaultserver property on the smtpservice, but that will not be saved to disk.
Using tab-modal prompts
using tab-modal prompts from chrome code currently, nsiprompt defaults to using window-modal prompts.
...even if you set it to the browser window ("var thewindow = window") the modal alert will be shown in the current tab.
Working with windows in chrome code
two of its methods are often used to obtain information about currently open windows: getmostrecentwindow and getenumerator.
...we pass in the current status text as well as the maximum and current progress values.
Mozilla
it currently allows you to run javascript code in the same scope as the main firefox browser window and report results using the same functions as the mochitest test framework.
...in the manager, select the database you want to explore in the '(select profile database)' pulldown, click 'go', select one of the tables listed in the left column and see the current contents of the database in the 'browse & search' tab.) gecko gecko is the name of the layout engine developed by the mozilla project.
Flash Activation: Browser Comparison - Plugins
the user can click on the flash object or the location bar icon to activate flash: users have the choice to allow flash just for the current session, or to remember their choice: google chrome in-page ui is displayed when the site attempts to use flash without fallback content: a user can click the plugin element to show a prompt for allowing flash: if the site provides fallback content for an object element, chrome will display that content and will not prompt the user to enable flash.
...the user can click the flash object to show activation options: users have the choice to allow flash just for the current session, or to remember their choice: site authoring tips if a flash element is very small, hidden, or covered by other content, users will probably not notice that flash is required and will become confused.
URLs - Plugins
nperror npn_geturl(npp instance, const char *url, const char *target); the instance parameter represents the current plug-in instance.
... _self or _current: load the url into the same window the plug-in instance occupies.
DOM Inspector internals - Firefox Developer Tools
at the top of each panel is a toolbar which contains a menu button allowing you to choose which viewer to display from the viewer list, a label displaying the name of the currently active viewer, and another menu button allowing you to issue viewer-specific commands.
...another convenient consequence of this is that if you use a properly set up development profile, then for the most part, the effects of development changes can be seen by simply switching away from the current viewer and back.
Examine, modify, and watch variables - Firefox Developer Tools
just click on the variable's current value and you'll be able to type there: watch an expression watch expressions are expressions that are evaluated each time execution pauses.
...at that point, a box showing your active watch expressions and their current values will appear: you can step through your code, watching the value of the expression as it changes; each time it does, the box will flash briefly yellow.
Set an XHR breakpoint - Firefox Developer Tools
an xhr (xmlhttprequest) breakpoint breaks code execution when an xhr request is dispatched so that you can examine the current state of the program.
... when your code breaks on an xhr request, the righthand pane will have two additional sections: call stack the list of functions that were executed in order ot get to the currently executing code.
Deprecated tools - Firefox Developer Tools
unlike in scratchpad, errors are properly displayed in the output with an expandable stacktrace, making it easier to debug the code you're currently writing.
...currently only the babylon library does.
Network request details - Firefox Developer Tools
these details include: last fetched: the date the resource was last fetched fetched count: the number of times in the current session that the resource has been fetched data size: the size of the resource.
...currently it warns you about two weaknesses: using sslv3 instead of tls using the rc4 cipher stack trace tab stack traces are shown in the stack trace tab, for responses that have a stack trace of course.
Network request list - Firefox Developer Tools
each request is displayed in its own row: by default, the network monitor is cleared each time you navigate to a new page or reload the current page.
... is:running shows only resources, which are currently being transferred.
CSS Grid Inspector: Examine grid layouts - Firefox Developer Tools
mini grid view: a smaller view of the currently overlaid grid.
... mini grid view shows a small version of the currently overlaid grid, which is in proportion to the real thing.
UI Tour - Firefox Developer Tools
select element button the inspector gives you detailed information about the currently selected element.
... computed view the computed view shows you the complete computed css for the selected element (the computed values are the same as what getcomputedstyle would return.): compatibility view starting with firefox developer edition version 77, the compatibility view shows css compability issues, if any, for properties applied to the selected element, and for the current page as a whole.
Shader Editor - Firefox Developer Tools
you'll now see a window divided into three panes: a list of all the glsl programs on the left, the vertex shader for the currently selected program in the middle, and the fragment shader for the currently selected program on the right: managing programs the left hand pane lists all programs currently in use by a webgl context.
... editing shaders the middle and right hand panes show the vertex and fragment shaders for the currently selected program.
Storage Inspector - Firefox Developer Tools
currently it can be used to inspect the following storage types: cache storage — any dom caches created using the cache api.
... add and refresh storage you'll also have buttons available to add a new storage entry or refresh the view of the currently viewed storage type where applicable (you can't add new entries to indexeddb or cache): sidebar when you select any row in the storage table widget, the sidebar is shown with details about that row.
Tips - Firefox Developer Tools
click the inspector icon () next to the element{} rule to lock the highlighter on the current element.
... web console in all panels: esc opens the split console; useful when debugging, or inspecting nodes in the command line: $0 references the currently selected node.
Console messages - Firefox Developer Tools
by default, the console is cleared each time you navigate to a new page or reload the current page.
... synchronous and asynchronous reflows if a change is made that invalidates the current layout — for example, the browser window is resized or some javascript modifies an element's css — the layout is not recalculated immediately.
AmbientLightSensor.AmbientLightSensor() - Web APIs
the ambinentlightsensor() constructor creates a new ambientlightsensor object, which returns the current light level or illuminance of the ambient light around the hosting device.
... syntax var ambientlightsensor = new ambientlightsensor(options) parameters options optional currently only one option is supported: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.onreading will be called.
AnalyserNode.fftSize - Web APIs
example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
... analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount ; var dataarray = new uint8array(bufferlength); analyser.getbytetimedomaindata(dataarray); // draw an oscilloscope of the current audio source function draw() { drawvisual = requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray); canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; canvasctx.beginpath(); var slicewidth = width * 1.0 / bufferlength; var ...
AnalyserNode.getByteFrequencyData() - Web APIs
the getbytefrequencydata() method of the analysernode interface copies the current frequency data into a uint8array (unsigned byte array) passed into it.
... example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
AnalyserNode.getFloatTimeDomainData() - Web APIs
the getfloattimedomaindata() method of the analysernode interface copies the current waveform, or time-domain, data into a float32array array passed into it.
... example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
Animation() - Web APIs
although in the future other effects such as sequenceeffects or groupeffects might be possible, the only kind of effect currently available is keyframeeffect.
...currently the only timeline type available is documenttimeline, but in the future there my be timelines associated with gestures or scrolling, for example.
Animation.cancel() - Web APIs
WebAPIAnimationcancel
when an animation is cancelled, its starttime and currenttime are set to null.
... exceptions this method doesn't directly throw exceptions; however, if the animation's playstate is anything but "idle" when cancelled, the current finished promise is rejected with a domexception named aborterror.
Animation.pause() - Web APIs
WebAPIAnimationpause
exceptions invalidstateerror the animation's currenttime is unresolved (for example, if it's never been played or isn't currently playing) and the end time of the animation is positive infinity.
... throws an invalidstateerror if the animation's currenttime is unresolved (perhaps it hasn't started playing yet) and the end time of the animation is positive infinity.
Animation.playbackRate - Web APIs
animations have a playback rate that provides a scaling factor from the rate of change of the animation's timeline time values to the animation’s current time.
... syntax var currentplaybackrate = animation.playbackrate; animation.playbackrate = newrate; value takes a number that can be 0, negative, or positive.
Animation.startTime - Web APIs
syntax var animationstartedwhen = animation.starttime; animation.starttime = newstarttime; value a floating-point number representing the current time in milliseconds, or null if no time is set.
... you can read this value to determine what the start time is currently set at, and you can change this value to make the animation start at a different time.
Animation.updatePlaybackRate() - Web APIs
in such a case, setting the playbackrate on the animation directly may cause the animation's playback position to jump since its playback position on the main thread may have drifted from the playback position where it is currently running.
... updateplaybackrate() is an asynchronous method that sets the speed of an animation after synchronizing with its current playback position, ensuring that the resulting change in speed does not produce a sharp jump.
AudioBuffer.copyFromChannel() - Web APIs
channelnumber the channel number of the current audiobuffer to copy the channel data from.
... the value of startinchannel is outside the current range of samples that already exist in the source buffer; that is, it's greater than its current length.
AudioBufferSourceNode.loopEnd - Web APIs
syntax audiobuffersourcenode.loopend = endoffsetinseconds; var endoffsetinseconds = audiobuffersourcenode.loopend; value a floating-point number indicating the offset, in seconds, into the audio buffer at which each loop will loop return to the beginning of the loop (that is, the current play time gets reset to audiobuffersourcenode.loopstart).
...then the current play position will loop back to the 20 second mark and continue playing until the 25 second mark, ad infinitum (or at least until stop() is called).
AudioNode.connect() - Web APIs
WebAPIAudioNodeconnect
outputindex optional an index specifying which output of the current audionode to connect to the destination.
... inputindex optional an index describing which input of the destination you want to connect the current audionode to; the default is 0.
AudioParam.setValueCurveAtTime() - Web APIs
if this value is lower than audiocontext.currenttime, it is clamped to currenttime.
....connect(gainnode); gainnode.connect(audioctx.destination); // set button to do something onclick var wavearray = new float32array(9); wavearray[0] = 0.5; wavearray[1] = 1; wavearray[2] = 0.5; wavearray[3] = 0; wavearray[4] = 0.5; wavearray[5] = 1; wavearray[6] = 0.5; wavearray[7] = 0; wavearray[8] = 0.5; valuecurve.onclick = function() { gainnode.gain.setvaluecurveattime(wavearray, audioctx.currenttime, 2); } specifications specification status comment web audio apithe definition of 'setvaluecurveattime' in that specification.
AudioTrack.enabled - Web APIs
the audiotrack property enabled specifies whether or not the described audio track is currently enabled for use.
...once those have been found, the values of the two tracks' enabled properties are exchanged, which results in swapping which of the two tracks is currently active.
AudioTrackList.onremovetrack - Web APIs
example this simple example just fetches the current number of audio tracks in the media element whenever a track is removed from the media element.
... document.queryselector("my-video").audiotracks.onremovetrack = function(event) { mytrackcount = document.queryselector("my-video").audiotracks.length; }; the current number of audio tracks remaining in the media element is obtained from audiotracklist property length.
BaseAudioContext.createAnalyser() - Web APIs
example the following example shows basic usage of an audiocontext to create an analyser node, then use requestanimationframe() to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
... analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount; var dataarray = new uint8array(bufferlength); analyser.getbytetimedomaindata(dataarray); // draw an oscilloscope of the current audio source function draw() { drawvisual = requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray); canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; canvasctx.beginpath(); var slicewidth = width * 1.0 / bufferlength; var ...
BaseAudioContext.state - Web APIs
the state read-only property of the baseaudiocontext interface returns the current state of the audiocontext.
... closed: the audio context has been closed (with the audiocontext.close() method.) example the following snippet is taken from our audiocontext states demo (see it running live.) the audiocontext.onstatechange hander is used to log the current state to the console every time it changes.
BaseAudioContext - Web APIs
baseaudiocontext.currenttime read only returns a double representing an ever-increasing hardware time in seconds used for scheduling.
... baseaudiocontext.state read only returns the current state of the audiocontext.
BatteryManager.charging - Web APIs
a boolean value indicating whether or not the device's battery is currently being charged.
... syntax var charging = battery.charging on return, charging indicates whether or not the battery, which is a batterymanager object, is currently being charged; if the battery is charging, this value is true.
BluetoothRemoteGATTCharacteristic.value - Web APIs
the bluetoothremotegattcharacteristic.value read-only property returns currently cached characteristic value.
... syntax var value = bluetoothremotegattcharacteristic.value returns the currently cached characteristic value.
CSSKeyframesRule - Web APIs
it has three specific methods: csskeyframesrule.appendrule() inserts a new keyframe rule into the current csskeyframesrule.
... csskeyframesrule.deleterule() deletes a keyframe rule from the current csskeyframesrule.
CSSMathValue.operator - Web APIs
the cssmathvalue.operator read-only property of the cssmathvalue interface indicates the operator that the current subtype represents.
... for example, if the current cssmathvalue subtype is cssmathsum, this property will return the string "sum".
CSSPrimitiveValue - Web APIs
the cssprimitivevalue interface derives from the cssvalue interface and represents the current computed value of a css property.
...it may be used to determine the value of a specific style property currently set in a block or to set a specific style property explicitly within the block.
CSSUnparsedValue.forEach() - Web APIs
syntax cssunparsedvalue.foreach(function callback(currentvalue[, index[, array]]) { // your iterator }[, thisarg]); parameters callback the function to execute for each element, taking three arguments: currentvalue the value of the current element being processed.
... indexoptional the index of the current element being processed.
CSSValue.cssText - Web APIs
WebAPICSSValuecssText
the csstext property of the cssvalue interface represents the current computed css property value.
... syntax csstext = cssvalue.csstext; value a domstring representing the current css property value.
CSSValue - Web APIs
WebAPICSSValue
the cssvalue interface represents the current computed value of a css property.
... properties cssvalue.csstext a domstring representing the current value.
Managing screen orientation - Web APIs
the second way is the javascript screen orientation api that can be used to get the current orientation of the screen itself and eventually lock it.
... locking the screen orientation warning: this api is experimental and currently available on firefox os and firefox for android with a moz prefix, and for internet explorer on windows 8.1 and above with a ms prefix.
CanvasCaptureMediaStreamTrack.requestFrame() - Web APIs
syntax stream.requestframe(); return value undefined usage notes there is currently an issue flagged in the specification pointing out that at this time, no exceptions are being thrown if the canvas isn't origin-clean.
... example // find the canvas element to capture var canvaselt = document.getelementsbytagname("canvas")[0]; // get the stream var stream = canvaselt.capturestream(25); // 25 fps // send the current state of the canvas as a frame to the stream stream.getvideotracks()[0].requestframe(); specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemediastream.requestframe()' in that specification.
CanvasRenderingContext2D.addHitRegion() - Web APIs
if not provided, the current path is used.
...(if you don't see the full smiley, check the browser compatibility table to see if your current browser supports hit regions already; you might need to activate a preference.) playable code <canvas id="canvas" width="400" height="200" class="playable-canvas"></canvas> <div class="playable-buttons"> <input id="edit" type="button" value="edit" /> <input id="reset" type="button" value="reset" /> </div> <textarea id="code" class="playable-code" style="height:250px"> ctx.beginpath(); ctx.
CanvasRenderingContext2D.bezierCurveTo() - Web APIs
the canvasrenderingcontext2d.beziercurveto() method of the canvas 2d api adds a cubic bézier curve to the current sub-path.
...the starting point is the latest point in the current path, which can be changed using moveto() before creating the bézier curve.
CanvasRenderingContext2D.clip() - Web APIs
the canvasrenderingcontext2d.clip() method of the canvas 2d api turns the current or given path into the current clipping region.
...text('2d'); // create circular clipping region ctx.beginpath(); ctx.arc(100, 75, 50, 0, math.pi * 2); ctx.clip(); // draw stuff that gets clipped ctx.fillstyle = 'blue'; ctx.fillrect(0, 0, canvas.width, canvas.height); ctx.fillstyle = 'orange'; ctx.fillrect(0, 0, 100, 100); result specifying a path and a fillrule this example saves two rectangles to a path2d object, which is then made the current clipping region using the clip() method.
CanvasRenderingContext2D.fillText() - Web APIs
the canvasrenderingcontext2d method filltext(), part of the canvas 2d api, draws a text string at the specified coordinates, filling the string's characters with the current fillstyle.
... this method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it.
CanvasRenderingContext2D.getLineDash() - Web APIs
the getlinedash() method of the canvas 2d api's canvasrenderingcontext2d interface gets the current line dash pattern.
... examples getting the current line dash setting this example demonstrates the getlinedash() method.
CanvasRenderingContext2D.getTransform() - Web APIs
the canvasrenderingcontext2d.gettransform() method of the canvas 2d api retrieves the current transformation matrix being applied to the context.
... the transformation matrix is described by: [acebdf001]\left[ \begin{array}{ccc} a & c & e \\ b & d & f \\ 0 & 0 & 1 \end{array} \right] note: the returned object is not live, so updating it will not affect the current transformation matrix, and updating the current transformation matrix will not affect an already returned dommatrix.
CanvasRenderingContext2D.isPointInStroke() - Web APIs
if unspecified, the current path is used.
... examples checking a point in the current path this example uses the ispointinstroke() method to check if a point is within the area of the current path's stroke.
CanvasRenderingContext2D.quadraticCurveTo() - Web APIs
the canvasrenderingcontext2d.quadraticcurveto() method of the canvas 2d api adds a quadratic bézier curve to the current sub-path.
...the starting point is the latest point in the current path, which can be changed using moveto() before creating the quadratic bézier curve.
CanvasRenderingContext2D.rect() - Web APIs
the canvasrenderingcontext2d.rect() method of the canvas 2d api adds a rectangle to the current path.
... like other methods that modify the current path, this method does not directly render anything.
CanvasRenderingContext2D.resetTransform() - Web APIs
the canvasrenderingcontext2d.resettransform() method of the canvas 2d api resets the current transform to the identity matrix.
... polyfill you can also use the settransform() method to reset the current transform to the identity matrix, like so: ctx.settransform(1, 0, 0, 1, 0, 0); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.resettransform' in that specification.
CanvasRenderingContext2D.setTransform() - Web APIs
the canvasrenderingcontext2d.settransform() method of the canvas 2d api resets (overrides) the current transformation to the identity matrix, and then invokes a transformation described by the arguments of this method.
... note: see also the transform() method; instead of overriding the current transform matrix, it multiplies it with a given one.
CanvasRenderingContext2D.stroke() - Web APIs
the canvasrenderingcontext2d.stroke() method of the canvas 2d api strokes (outlines) the current or given path with the current stroke style.
...if you don't, the previous sub-paths will remain part of the current path, and get stroked every time you call the stroke() method.
CanvasRenderingContext2D.strokeRect() - Web APIs
the canvasrenderingcontext2d.strokerect() method of the canvas 2d api draws a rectangle that is stroked (outlined) according to the current strokestyle and other context settings.
... this method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it.
CanvasRenderingContext2D.transform() - Web APIs
the canvasrenderingcontext2d.transform() method of the canvas 2d api multiplies the current transformation with the matrix described by the arguments of this method.
... note: see also the settransform() method, which resets the current transform to the identity matrix and then invokes transform().
A basic ray-caster - Web APIs
after realizing, to my delight, that the nifty <canvas> element i'd been reading about was not only soon to be supported in firefox, but was already supported in the current version of safari, i had to try a little experiment.
...after every interval an update function will repaint the canvas showing the current view.
ChildNode.replaceWith() - Web APIs
with(node) { replacewith("foo"); } // referenceerror: replacewith is not defined polyfill you can polyfill the replacewith() method in internet explorer 10+ and higher with the following code: function replacewithpolyfill() { 'use-strict'; // for safari, and ie > 10 var parent = this.parentnode, i = arguments.length, currentnode; if (!parent) return; if (!i) // if there are no arguments parent.removechild(this); while (i--) { // i-- decrements i and returns the value of i before the decrement currentnode = arguments[i]; if (typeof currentnode !== 'object'){ currentnode = this.ownerdocument.createtextnode(currentnode); } else if (currentnode.parentnode){ currentnode.parentnode.removec...
...hild(currentnode); } // the value of "i" below is after the decrement if (!i) // if currentnode is the first argument (currentnode === arguments[0]) parent.replacechild(currentnode, this); else // if currentnode isn't the first parent.insertbefore(currentnode, this.nextsibling); } } if (!element.prototype.replacewith) element.prototype.replacewith = replacewithpolyfill; if (!characterdata.prototype.replacewith) characterdata.prototype.replacewith = replacewithpolyfill; if (!documenttype.prototype.replacewith) documenttype.prototype.replacewith = replacewithpolyfill; specification specification status comment domthe definition of 'childnode.replacewith()' in that specification.
Client.url - Web APIs
WebAPIClienturl
the url read-only property of the client interface returns the url of the current service worker client.
... example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: 'window' }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of 'url' in that specification.
Clients.matchAll() - Web APIs
WebAPIClientsmatchAll
available options are: includeuncontrolled: a boolean — if set to true, the matching operation will return all service worker clients who share the same origin as the current service worker.
... otherwise, it returns only the service worker clients controlled by the current service worker.
CompositionEvent.data - Web APIs
syntax mydata = compositionevent.data value a domstring representing the event data: for compositionstart events, this is the currently selected text that will be replaced by the string being composed.
... for compositionupdate, this is the string as it stands currently as editing is ongoing.
CompositionEvent.locale - Web APIs
the locale read-only property of the compositionevent interface returns the locale of current input method (for example, the keyboard layout locale if the composition is associated with ime).
... syntax mylocale = compositionevent.locale value a domstring representing the locale of current input method.
console - Web APIs
WebAPIConsole
console.groupend() exits the current inline group.
... to exit the current group, simply call console.groupend().
ConstantSourceNode.offset - Web APIs
to access the offset parameter's current value, access the parameter's value property, as shown in the syntax box above.
...with the linkage above in place, that can be done using this simple event handler: function handleclickevent(event) { volumeslidercontrol.value = constantsource.offset.value; } all this function has to do is fetch the current value of the slider control we're using to control the paired nodes' gains, then store that value into the constantsourcenode's offset parameter.
ContentIndex.delete() - Web APIs
the delete() method of the contentindex interface unregisters an item from the currently indexed content.
...we receive a reference to the current serviceworkerregistration, which allows us to access the index property and thus access the delete method.
ContentIndex.getAll() - Web APIs
needs to be under the scope of the current service worker.
... registration = await navigator.serviceworker.ready; // get our index entries const entries = await registration.index.getall(); // create a containing element const readinglistelem = document.createelement('div'); // test for entries if (!array.length) { // if there are no entries, display a message const message = document.createelement('p'); message.innertext = 'you currently have no articles saved for offline reading.' readinglistelem.append(message); } else { // if entries are present, display in a list of links to the content const listelem = document.createelement('ul'); for (const entry of entries) { const listitem = document.createelement('li'); const anchorelem = document.createelement('a'); anchorelem.innertext = entr...
CrashReportBody - Web APIs
current possible reasons are: oom: the browser ran out of memory.
... some sample json might look like this: { "type": "crash", "age": 42, "url": "https://example.com/", "user_agent": "mozilla/5.0 (x11; linux x86_64; rv:60.0) gecko/20100101 firefox/60.0", "body": { "reason": "oom" } } note: crash reports are always delivered to the endpoint group named default; there is currently no way to override this.
CustomEvent - Web APIs
event.currenttarget read only a reference to the currently registered target for the event.
... this is the object to which the event is currently slated to be sent.
DOMException - Web APIs
transactioninactiveerror a request was placed against a transaction that is currently not active or is finished (no legacy code value and constant name).
... notallowederror the request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission (no legacy code value and constant name).
DOMTokenList.forEach() - Web APIs
syntax tokenlist.foreach(callback [, thisarg]); parameters callback function to execute for each element, eventually taking three arguments: currentvalue the current element being processed in the array.
... currentindex the index of the current element being processed in the array.
DataTransfer.clearData() - Web APIs
agstarthandler); draggable.addeventlistener('dragend', dragendhandler); dropable.addeventlistener('dragover', dragoverhandler); dropable.addeventlistener('dragleave', dragleavehandler); dropable.addeventlistener('drop', drophandler); function dragstarthandler (event) { status.innerhtml = 'drag in process'; // change target element's border to signify drag has started event.currenttarget.style.border = '1px dashed blue'; // start by clearing existing clipboards; this will affect all types since we // don't give a specific type.
...t's id for data) event.datatransfer.setdata('text/plain', event.target.id); data.innerhtml = event.datatransfer.getdata('text/plain'); } function dragendhandler (event) { if (!dropped) { status.innerhtml = 'drag canceled'; } data.innerhtml = event.datatransfer.getdata('text/plain') || 'empty'; // change border to signify drag is no longer in process event.currenttarget.style.border = '1px solid black'; if (dropped) { // remove all event listeners draggable.removeeventlistener('dragstart', dragstarthandler); draggable.removeeventlistener('dragend', dragendhandler); dropable.removeeventlistener('dragover', dragoverhandler); dropable.removeeventlistener('dragleave', dragleavehandler); dropable.removeeventlistener('dro...
DataTransfer.dropEffect - Web APIs
on getting, it returns its current value.
... on setting, if the new value is one of the values listed below, then the property's current value will be set to the new value and other values will be ignored.
Document.body - Web APIs
WebAPIDocumentbody
the document.body property represents the <body> or <frameset> node of the current document, or null if no such element exists.
... though the body property is settable, setting a new body on a document will effectively remove all the current children of the existing <body> element.
Document.caretRangeFromPoint() - Web APIs
syntax var range = document.caretrangefrompoint(float x, float y); parameters x a horizontal position within the current viewport.
... y a vertical position within the current viewport.
Document.cookie - Web APIs
WebAPIDocumentcookie
consider also that: any of the following cookie attribute values can optionally follow the key-value pair, specifying the cookie to set/update, and preceded by a semi-colon separator: ;path=path (e.g., '/', '/mydir') if not specified, defaults to the current path of the current document location.
...if not specified, this defaults to the host portion of the current document location.
Document.doctype - Web APIs
WebAPIDocumentdoctype
returns the document type declaration (dtd) associated with current document.
... example var doctypeobj = document.doctype; console.log( "doctypeobj.name: " + doctypeobj.name + "\n" + "doctypeobj.internalsubset: " + doctypeobj.internalsubset + "\n" + "doctypeobj.publicid: " + doctypeobj.publicid + "\n" + "doctypeobj.systemid: " + doctypeobj.systemid ); notes the property returns null if there is no dtd associated with the current document.
Document.evaluate() - Web APIs
WebAPIDocumentevaluate
while using document.evaluate() works in ff2, in ff3 one must use somexmldoc.evaluate() if evaluating against something other than the current document.
...modifying the document doesn't invalidate the snapshot; however, if the document is changed, the snapshot may not correspond to the current state of the document, since nodes may have moved, been changed, added, or removed.
Document.exitFullscreen() - Web APIs
the document method exitfullscreen() requests that the element on this document which is currently being presented in full-screen mode be taken out of full-screen mode, restoring the previous state of the screen.
... example this example causes the current document to toggle in and out of a full-screen presentation whenever the mouse button is clicked within it.
Document.getAnimations() - Web APIs
the getanimations() method of the document interface returns an array of all animation objects currently in effect whose target elements are descendants of the document.
... return value an array of animation objects, each representing one animation currently associated with elements which are descendants of the document on which it's called.
Document.hasStorageAccess() - Web APIs
} }); specifications the api is currently only at the proposal stage — the standardization process has yet to begin.
... you can currently find specification details of the api at apple's introducing storage access api blog post, and whatwg html issue 3338 — proposal: storage access api.
Document.images - Web APIs
WebAPIDocumentimages
the images read-only property of the document interface returns a collection of the images in the current html document.
... syntax var imagecollection = document.images; value an htmlcollection providing a live list of all of the images contained in the current document.
Document.open() - Web APIs
WebAPIDocumentopen
for example: all event listeners currently registered on the document, nodes inside the document, or the document's window are removed.
...a string of "replace") specified that the history entry for the new document would replace the current history entry of the document being written to.
Document.timeline - Web APIs
WebAPIDocumenttimeline
the timeline readonly property of the document interface represents the default timeline of the current document.
... syntax var pagetimeline = document.timeline; var thismoment = pagetimeline.currenttime; value a documenttimeline object.
DocumentOrShadowRoot.fullscreenElement - Web APIs
the documentorshadowroot.fullscreenelement read-only property returns the element that is currently being presented in full-screen mode in this document, or null if full-screen mode is not currently in use.
... syntax var element = document.fullscreenelement; return value the element object that's currently in full-screen mode; if full-screen mode isn't currently in use by the document>, the returned value is null.
DocumentOrShadowRoot.getSelection() - Web APIs
the getselection() property of the documentorshadowroot interface returns a selection object representing the range of text selected by the user, or the current position of the caret.
... it is worth noting that currently getselection() doesn't work on the content of <input> elements in firefox.
DocumentOrShadowRoot - Web APIs
documentorshadowroot.fullscreenelementread only returns the element that's currently in full screen mode for this document.
... documentorshadowroot.getselection() returns a selection object representing the range of text selected by the user, or the current position of the caret.
DocumentTimeline.DocumentTimeline() - Web APIs
the documenttimeline() constructor of the web animations api creates a new instance of the documenttimeline object associated with the active document of the current browsing context.
...currently the only supported option is the origintime member which specifies the zero time for the documenttimeline as a real number of milliseconds relative to the navigationstart moment of the active document for the current browsing context.
DocumentTimeline - Web APIs
constructor documenttimeline() creates a new documenttimeline object associated with the active document of the current browsing context.
... animationtimeline.currenttime returns the time value in milliseconds for this timeline or null if it is inactive.
DynamicsCompressorNode - Web APIs
dynamicscompressornode.reduction read only is a float representing the amount of gain reduction currently applied by the compressor to the signal.
... // create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a compressor node var compressor = audioctx.createdynamicscompressor(); compressor.threshold.setvalueattime(-50, audioctx.currenttime); compressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function() { var active = button.getatt...
EXT_disjoint_timer_query.queryCounterEXT() - Web APIs
the ext_disjoint_timer_query.querycounterext() method of the webgl api records the current time into the corresponding query object.
... syntax void ext.querycounterext(query, target); parameters query a webglquery object for which to record the current time.
Element: MSManipulationStateChanged event - Web APIs
bubbles unknown cancelable unknown interface msmanipulationevent event handler property unknown get manipulation states using the laststate and currentstate properties.
... examples // listen for panning state change events outerscroller.addeventlistener("msmanipulationstatechanged", function(e) { // check to see if they lifted while pulled to the top if (e.currentstate == ms_manipulation_state_inertia && outerscroller.scrolltop === 0) { refreshitemsasync(); } }); specifications not part of any specification.
Element.classList - Web APIs
WebAPIElementclassList
s, "classlist")) polyfillclasslist(this); return this.classlist; }, configurable: 0, set: function(val){this.classname = val} }); } catch(e) { // less performant fallback for older browsers (ie 6-8): window[" ucl"] = polyfillclasslist; // the below code ensures polyfillclasslist is applied to all current and future elements in the doc.
...it's currently unable to polyfill out-of-document-elements (e.g.
Element.requestFullscreen() - Web APIs
currently, the only option is navigationui, which controls whether or not to show navigation ui while the element is in full-screen mode.
...the rejection handler receives one of the following exception values: typeerror the typeerror exception may be delivered in any of the following situations: the document containing the element isn't fully active; that is, it's not the current active document.
Event.target - Web APIs
WebAPIEventtarget
it is different from event.currenttarget when the event handler is called during the bubbling or capturing phase of the event.
... // make a list const ul = document.createelement('ul'); document.body.appendchild(ul); const li1 = document.createelement('li'); const li2 = document.createelement('li'); ul.appendchild(li1); ul.appendchild(li2); function hide(evt) { // e.target refers to the clicked <li> element // this is different than e.currenttarget, which would refer to the parent <ul> in this context evt.target.style.visibility = 'hidden'; } // attach the listener to the list // it will fire when each <li> is clicked ul.addeventlistener('click', hide, false); specifications specification status comment domthe definition of 'event.target' in that specification.
Event.timeStamp - Web APIs
WebAPIEventtimeStamp
syntax time = event.timestamp; value this value is the number of milliseconds elapsed from the beginning of the current document's lifetime till the event was created.
... example html <p> focus this iframe and press any key to get the current timestamp for the keypress event.
Event - Web APIs
WebAPIEvent
event.currenttarget read only a reference to the currently registered target for the event.
... this is the object to which the event is currently slated to be sent.
EventTarget.removeEventListener() - Web APIs
notes if an eventlistener is removed from an eventtarget while it is processing an event, it will not be triggered by the current actions.
... calling removeeventlistener() with arguments that do not identify any currently registered eventlistener on the eventtarget has no effect.
ExtendableEvent - Web APIs
var cache_version = 1; var current_caches = { prefetch: 'prefetch-cache-v' + cache_version }; self.addeventlistener('install', function(event) { var urlstoprefetch = [ './static/pre_fetched.txt', './static/pre_fetched.html', 'https://www.chromium.org/_/rsrc/1302286216006/config/customlogo.gif' ]; console.log('handling install event.
... resources to pre-fetch:', urlstoprefetch); event.waituntil( caches.open(current_caches['prefetch']).then(function(cache) { return cache.addall(urlstoprefetch.map(function(urltoprefetch) { return new request(urltoprefetch, {mode: 'no-cors'}); })).then(function() { console.log('all resources have been fetched and cached.'); }); }).catch(function(error) { console.error('pre-fetching failed:', error); }) ); }); important: when fetching resources, it's very important to use {mode: 'no-cors'} if there is any chance that the resources are served off of a server that doesn't support cors.
FeaturePolicy - Web APIs
the featurepolicy interface of the feature policy api represents the set of policies applied to the current execution context.
...feature whose name appears on the list might not be allowed by the feature policy of the current execution context and/or might not be accessible because of user's permissions.
Cross-global fetch usage - Web APIs
when a cross-origin fetch involving a relative url is initiated from an <iframe>, the relative url used to be resolved against the current global location, rather than the iframe's location.
...frame.contentwindow.fetch() the url passed to fetch needs to be relative the problem in the past we would resolve the relative url against the current global, for example: let absolute = new url(relative, window.location.href) this is not a problem as such.
FileError - Web APIs
WebAPIFileError
invalid_state_err 7 the operation cannot be performed on the current state of the interface object.
... not_readable_err 4 the file or directory cannot be read, typically due to permission problems that occur after a reference to a file has been acquired (for example, the file or directory is concurrently locked by another application).
FileException - Web APIs
invalid_state_err 7 the operation cannot be performed on the current state of the interface object.
... not_readable_err 4 the file or directory cannot be read, typically due to permission problems that occur after a reference to a file has been acquired (for example, the file or directory is concurrently locked by another application).
FileRequest.onprogress - Web APIs
those objects contain two properties: loaded a number representing the current amount of bytes processed by the operation.
... example // assuming 'request' which is a filerequest object request.onprogress = function (status) { var progress = document.queryselector('progress'); progress.value = status.loaded; progress.max = status.total; } specification not part of any current specification.
FileSystemEntry.getParent() - Web APIs
parent) { fileentry.moveto(parent, "newname.html", function(updatedentry) { console.log("file " + fileentry.name + " renamed to newname.html."); }); }, function(error) { console.error("an error occurred: unable to rename " + fileentry.name + " to newname.html."); }); this is accomplished by first obtaining a filesystemdirectoryentry object representing the directory the file is currently located in.
... using promises currently, there isn't a promise-based version of this method.
FontFace.load - Web APIs
WebAPIFontFaceload
the load() method of the fontface interface loads a font based on current object's constructor-passed requirements, including a location or source buffer, and returns a promise that resolves with the current fontface object.
... return value a promise that resolves with a reference to the current fontface object when the font loads or rejects with a networkerror if the loading process fails.
FontFace.loaded - Web APIs
WebAPIFontFaceloaded
the loaded read-only property of the fontface interface returns a promise that resolves with the current fontface object when the font specified in the object's constructor is done loading or rejects with a syntaxerror.
... syntax var apromise = fontface.loaded; value a promise that resolves with the current fontface object.
FormData() - Web APIs
WebAPIFormDataFormData
syntax var formdata = new formdata(form) parameters form optional an html <form> element — when specified, the formdata object will be populated with the form's current keys/values using the name property of each element for the keys and their submitted value for the values.
... example the following line creates an empty formdata object: var formdata = new formdata(); // currently empty you could add a key/value pair to this using formdata.append: formdata.append('username', 'chris'); or you can specify the optional form argument when creating the formdata object, to prepopulate it with values from the specified form: <form id="myform" name="myform"> <div> <label for="username">enter name:</label> <input type="text" id="username" name="username"> </div> <div> <label for="useracc">enter account number:</label> <input type="text" id="useracc" name="useracc"> </div> <div> <label for="userfile">upload file:</label> <input type="file" id="userfile" name="userfile"> </div> <input type="sub...
GeolocationCoordinates.longitude - Web APIs
let button = document.getelementbyid("get-location"); let lattext = document.getelementbyid("latitude"); let longtext = document.getelementbyid("longitude"); button.addeventlistener("click", function() { navigator.geolocation.getcurrentposition(function(position) { let lat = position.coords.latitude; let long = position.coords.longitude; lattext.innertext = lat.tofixed(2); longtext.innertext = long.tofixed(2); }); }); after setting up variables to more conveniently reference the button element and the two elements into which the latitude and logitude will be drawn, the event listener is established by calling...
... upon receiving a click event, we call getcurrentposition() to request the device's current position.
HTMLAreaElement - Web APIs
htmlareaelement.rel is a domstring that reflects the rel html attribute, indicating relationships of the current document to the linked resource.
... htmlareaelement.rellist read only returns a domtokenlist that reflects the rel html attribute, indicating relationships of the current document to the linked resource, as a list of tokens.
Audio() - Web APIs
if it's htmlmediaelement.have_enough_data, then there's enough data available that, given the current download rate, you should be able to play the audio through to the end without interruption.
...best: myaudioelement.addeventlistener("canplaythrough", event => { /* the audio is now playable; play it if permissions allow */ myaudioelement.play(); }); memory usage and management if all references to an audio element created using the audio() constructor are deleted, the element itself won't be removed from memory by the javascript runtime's garbage collection mechanism if playback is currently underway.
HTMLElement.dir - Web APIs
WebAPIHTMLElementdir
the htmlelement.dir property gets or sets the text writing directionality of the content of the current element.
... syntax var currentwritingdirection = elementnodereference.dir; elementnodereference.dir = newwritingdirection; currentwritingdirection is a string variable representing the text writing direction of the current element.
HTMLElement.lang - Web APIs
WebAPIHTMLElementlang
syntax var languageused = elementnodereference.lang; // get the value of lang elementnodereference.lang = newlanguage; // set new value for lang languageused is a string variable that gets the language in which the text of the current element is written.
... newlanguage is a string variable with its value setting the language in which the text of the current element is written.
HTMLImageElement.srcset - Web APIs
it uses the image's currentsrc property to fetch and display the url selected by the browser from the srcset.
... let box = document.queryselector(".box"); let image = box.queryselector("img"); let newelem = document.createelement("p"); newelem.innerhtml = `image: <code>${image.currentsrc}</code>`; box.appendchild(newelem); result in the displayed output below, the selected url will correspond with whether your display results in selecting the 1x or the 2x version of the image.
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).
HTMLMediaElement.canPlayType() - Web APIs
the htmlmediaelement method canplaytype() reports how likely it is that the current browser will be able to play media of a given mime type.
... "" (empty string) media of the given type definitely can't be played on the current device.
HTMLOptionElement - Web APIs
htmloptionelement.selected is a boolean that indicates whether the option is currently selected.
... obsolete the selected property changed its meaning: it now indicates if the option is currently selected and no longer if it was initally selected.
HTMLProgressElement - Web APIs
htmlprogresselement.positionread only returns a double value returning the result of dividing the current value (value) by the maximum value (max); if the progress bar is an indeterminate progress bar, it returns -1.
... htmlprogresselement.value is a double value that reflects the current value; if the progress bar is an indeterminate progress bar, it returns 0.
HTMLScriptElement - Web APIs
examples dynamically importing scripts let's create a function that imports new scripts within a document creating a <script> node immediately before the <script> that hosts the following code (through document.currentscript).
... function loaderror(oerror) { throw new urierror("the script " + oerror.target.src + " didn't load correctly."); } function prefixscript(url, onloadfunction) { var newscript = document.createelement("script"); newscript.onerror = loaderror; if (onloadfunction) { newscript.onload = onloadfunction; } document.currentscript.parentnode.insertbefore(newscript, document.currentscript); newscript.src = url; } this next function, instead of prepending the new scripts immediately before the document.currentscript element, appends them as children of the <head> tag.
HTMLTextAreaElement - Web APIs
this is "forward" if selection was performed in the start-to-end direction of the current locale, or "backward" for the opposite direction.
... tabindex long: returns / sets the position of the element in the tabbing navigation order for the current document.
HTMLTrackElement: cuechange event - Web APIs
the cuechange event fires when a texttrack has changed the currently displaying cues.
... bubbles no cancelable no interface event event handler oncuechange examples on the texttrack you can set up a listener for the cuechange event on a texttrack using the addeventlistener() method: track.addeventlistener('cuechange', function () { let cues = track.activecues; // array of current cues }); or you can just set the oncuechange event handler property: track.oncuechange = function () { let cues = track.activecues; // array of current cues } on the track element the underlying texttrack, indicated by the track property, receives a cuechange event every time the currently-presented cue is changed.
Recommended Drag Types - Web APIs
stbox ondragenter="return checkdrag(event)" ondragover="return checkdrag(event)" ondrop="dodrop(event)"/> <script> function checkdrag(event) { return event.datatransfer.types.contains("application/x-moz-file"); } function dodrop(event) { var file = event.datatransfer.mozgetdataat("application/x-moz-file", 0); if (file instanceof components.interfaces.nsifile) { event.currenttarget.appenditem(file.leafname); } } </script> in this example, the event returns false only if the data transfer contains the application/x-moz-file type.
...the following sample offers an overview of this advanced case: // currentevent is an existing drag operation event currentevent.datatransfer.setdata("text/x-moz-url", url); currentevent.datatransfer.setdata("application/x-moz-file-promise-url", url); currentevent.datatransfer.setdata("application/x-moz-file-promise-dest-filename", leafname); currentevent.datatransfer.mozsetdataat('application/x-moz-file-promise', new dataprovider(success,error), ...
Headers.delete() - Web APIs
WebAPIHeadersdelete
the delete() method of the headers interface deletes a header from the current headers object.
... example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to this using headers.append: myheaders.append('content-type', 'image/jpeg'); myheaders.get('content-type'); // returns 'image/jpeg' you can then delete it again: myheaders.delete('content-type'); myheaders.get('content-type'); // returns null, as it has been deleted specifications specification status comment fetchthe definition of 'd...
History.go() - Web APIs
WebAPIHistorygo
syntax history.go([delta]) parameters delta optional the position in the history to which you want to move, relative to the current page.
... examples to move back one page (the equivalent of calling back()): history.go(-1) to move forward a page, just like calling forward(): history.go(1) to move forward two pages: history.go(2); to move backwards by two pages: history.go(-2); and, finally either of the following statements will reload the current page: history.go(); history.go(0); specifications specification status comment html living standardthe definition of 'history.go()' in that specification.
IDBCursor.advance() - Web APIs
WebAPIIDBCursoradvance
invalidstateerror the cursor is currently being iterated or has iterated past its end.
... note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
IDBCursor.continue() - Web APIs
invalidstateerror the cursor is currently being iterated or has iterated past its end.
...also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
IDBCursor.source - Web APIs
WebAPIIDBCursorsource
this function never returns null or throws an exception, even if the cursor is currently being iterated, has iterated past its end, or its transaction is not active.
...also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
IDBCursorWithValue - Web APIs
idbcursorwithvalue.value read only returns the value of the current cursor.
...also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
IDBDatabase.objectStoreNames - Web APIs
the objectstorenames read-only property of the idbdatabase interface is a domstringlist containing a list of the names of the object stores currently in the connected database.
... syntax var list[] = idbdatabase.objectstorenames; value a domstringlist containing a list of the names of the object stores currently in the connected database.
IDBFactory.open() - Web APIs
WebAPIIDBFactoryopen
syntax for the current standard: var idbopendbrequest = indexeddb.open(name); var idbopendbrequest = indexeddb.open(name, version); parameters name the name of the database.
... example example of calling open with the current specification's version parameter: var request = window.indexeddb.open("todolist", 4); in the following code snippet, we make a request to open a database, and include handlers for the success and error cases.
IDBIndex.keyPath - Web APIs
WebAPIIDBIndexkeyPath
the keypath property of the idbindex interface returns the key path of the current index.
... the key path of the current index is logged to the console: it should be returned as lname.
IDBIndex.locale - Web APIs
WebAPIIDBIndexlocale
the locale read-only property of the idbindex interface returns the locale of the index (for example en-us, or pl) if it had a locale value specified upon its creation (see createindex()'s optionalparameters.) note that this property always returns the current locale being used in this index, in other words, it never returns "auto".
...+ '<td>' + cursor.value.company + '</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification not currently part of any specification.
IDBIndex.name - Web APIs
WebAPIIDBIndexname
invalidstateerror the index, or its object store, has been deleted; or the current transaction is not an upgrade transaction.
... transactioninactiveerror the current transaction is not active.
IDBIndex.objectStore - Web APIs
the objectstore property of the idbindex interface returns the name of the object store referenced by the current index.
... the current object store is logged to the console: it should be returned something like this: idbobjectstore { name: "contactslist", keypath: "id", indexnames: domstringlist[7], transaction: idbtransaction, autoincrement: false } finally, we iterate through each record, and insert the data into an html table.
IDBIndex.unique - Web APIs
WebAPIIDBIndexunique
syntax var isunique = idbindex.unique; value a boolean: value effect true the current index does not allow duplicate values for a key.
... false the current index allows duplicate key values.
IDBObjectStore.clear() - Web APIs
this is for deleting all the current data out of an object store.
... example in the following code snippet, we open a read/write transaction on our database and clear all the current data out of the object store using clear().
IDBObjectStore.name - Web APIs
invalidstateerror either the object store has been deleted or the current transaction is not an upgrade transaction; you can only rename indexes during upgrade transactions; that is, when the mode is "versionchange".
... transactioninactiveerror the current transaction is not active.
IdleDeadline.timeRemaining() - Web APIs
the timeremaining() method on the idledeadline interface returns the estimated number of milliseconds remaining in the current idle period.
... syntax timeremaining = idledeadline.timeremaining(); return value a domhighrestimestamp value (which is a floating-point number) representing the number of milliseconds the user agent estimates are left in the current idle period.
IntersectionObserverEntry.intersectionRect - Web APIs
the intersectionobserverentry interface's read-only intersectionrect property is a domrectreadonly object which describes the smallest rectangle that contains the entire portion of the target element which is currently visible within the intersection root.
... syntax var intersectionrect = intersectionobserverentry.intersectionrect; value a domrectreadonly which describes the part of the target element that's currently visible within the root's intersection rectangle.
KeyboardEvent.code - Web APIs
angle is the current amount of rotation applied to the ship, in degrees; it starts at 0° (pointing straight up).
...this function computes the new position of the ship given the distance moved and the current direction the ship is facing.
KeyboardEvent.getModifierState() - Web APIs
the keyboardevent.getmodifierstate() method returns the current state of the specified modifier key: true if the modifier is active (that is the modifier key is pressed or locked), otherwise, false.
... "accel" virtual modifier note: the "accel" virtual modifier has been effectively deprecated in current drafts of the dom3 events specification.
KeyboardLayoutMap.forEach() - Web APIs
syntax keyboardlayoutmap.foreach(function callback(currentvalue[, index[, array]]) { //your iterator }[, thisarg]); parameters callback the function to execute for each element, taking three arguments: currentvalue the value of the current element being processed.
... index optional the index of the current element being processed.
Location: replace() - Web APIs
WebAPILocationreplace
the replace() method of the location interface replaces the current resource with the one at the provided url.
... the difference from the assign() method is that after using replace() the current page will not be saved in session history, meaning the user won't be able to use the back button to navigate to it.
MSManipulationEvent - Web APIs
properties property description currentstateread only returns the current state of a manipulation event.
... example interface msmanipulationevent extends uievent { readonly currentstate: number; readonly inertiadestinationx: number; readonly inertiadestinationy: number; readonly laststate: number; initmsmanipulationevent(typearg: string, canbubblearg: boolean, cancelablearg: boolean, viewarg: window, detailarg: number, laststate: number, currentstate: number): void; readonly ms_manipulation_state_active: number; readonly ms_manipulation_state_cancell...
MediaKeyStatusMap.forEach() - Web APIs
syntax mediakeystatusmap.foreach(callback[, thisarg]) parameters callback function to execute for each element, taking three arguments: currentvalue the current element being processed in the array.
... index the index of the current element being processed in the array.
MediaPositionState.duration - Web APIs
the mediapositionstate dictionary's duration property is used when calling the mediasession method setpositionstate() to provide the user agent with the overall total duration in seconds of the media currently being performed.
... for example, a browser might use this information along with the position property and the navigator.mediasession.playbackstate, as well as the session's metadata to provide an integrated common user interface showing the currently playing media as well as standard pause, play, forward, reverse, and other controls.
MediaQueryList.matches - Web APIs
the matches read-only property of the mediaquerylist interface is a boolean that returns true if the document currently matches the media query list, or false if not.
... syntax var matches = <varm>mediaquerylist.matches; value a boolean which is true if the document currently matches the media query list; otherwise, it's false.
MediaQueryListEvent.matches - Web APIs
the matches read-only property of the mediaquerylistevent interface is a boolean that returns true if the document currently matches the media query list, or false if not.
... syntax var matches = mediaquerylistevent.matches; value a boolean; returns true if the document currently matches the media query list, false if not.
MediaRecorder.pause() - Web APIs
stop gathering data into the current blob, but keep it available so that recording can be resumed later on.
... exceptions invalidstateerror the mediarecorder is currently "inactive"; you can't pause recording if it's not active.
MediaRecorder - Web APIs
mediarecorder.state read only returns the current state of the mediarecorder object (inactive, recording, or paused.) mediarecorder.stream read only returns the stream that was passed into the constructor when the mediarecorder was created.
... static methods mediarecorder.istypesupported() a static method which returns a boolean value indicating if the given mime media type is supported by the current user agent.
MediaSession.metadata - Web APIs
the metadata property of the mediasession interface contains a mediametadata object providing descriptive information about the currently playing media, or null if the metadata has not been set.
... syntax var mediametadata = navigator.mediasession.metadata; navigator.mediasession.metadata = mediametadata; value an instance of mediametadata containing information about the media currently being played.
MediaSession - Web APIs
playbackstate indicates whether the current media session is playing.
... setpositionstate() sets the current playback position and speed of the media currently being presented.
MediaSessionActionDetails.seekTime - Web APIs
its value is the absolute time, in seconds, to move the current play position to.
... syntax let mediasessionactiondetails = { seektime: abstimeinseconds }; let abstime = mediasessionactiondetails.seektime; value a floating-point value indicating the absolute time in seconds into the media to which to move the current play position.
MediaSource.isTypeSupported() - Web APIs
the mediasource.istypesupported() static method returns a boolean value which is true if the given mime type is likely to be supported by the current user agent.
... syntax var isitsupported = mediasource.istypesupported(mimetype); parameters mimetype the mime media type that you want to test support for in the current browser.
MediaSource.readyState - Web APIs
the readystate read-only property of the mediasource interface returns an enum representing the state of the current mediasource.
... the three possible values are: closed: the source is not currently attached to a media element.
MediaSource - Web APIs
mediasource.readystate read only returns an enum representing the state of the current mediasource, whether it is not currently attached to a media element (closed), attached and ready to receive sourcebuffer objects (open), or attached but the stream has been ended via mediasource.endofstream() (ended.) mediasource.duration gets and sets the duration of the current media being presented.
... static methods mediasource.istypesupported() returns a boolean value indicating if the given mime type is supported by the current user agent — this is, if it can successfully create sourcebuffer objects for that mime type.
MediaStreamTrack.enabled - Web APIs
usage notes if the mediastreamtrack represents the video input from a camera, disabling the track by setting enabled to false also updates device activity indicators to show that the camera is not currently recording or streaming.
..."&#x25b6;&#xfe0f;" : "&#x23f8;&#xfe0f;"; myaudiotrack.enabled = newstate; } this creates a variable, newstate, which is the opposite of the current value of enabled, then uses that to select either the emoji character for the "play" icon or the character for the "pause" icon as the new innerhtml of the pause button's element.
MediaStreamTrack.getConstraints() - Web APIs
to get the currently active settings for all constrainable properties, you should instead call getsettings().
... example this example obtains the current constraints for a track, sets the facingmode, and applies the updated constraints.
MediaStreamTrack - Web APIs
mediastreamtrack.getconstraints() returns a mediatrackconstraints object containing the currently set constraints for the track; the returned value matches the constraints last set using applyconstraints().
... mediastreamtrack.getsettings() returns a mediatracksettings object containing the current values of each of the mediastreamtrack's constrainable properties.
MediaTrackSettings.aspectRatio - Web APIs
the mediatracksettings dictionary's aspectratio property is a double-precision floating-point number indicating the aspect ratio of the mediastreamtrack as currently configured.
... syntax var aspectratio = mediatracksettings.aspectratio; value a double-precision floating-point number indicating the current configuration of the track's aspect ratio.
MediaTrackSettings.frameRate - Web APIs
the mediatracksettings dictionary's framerate property is a double-precision floating-point number indicating the frame rate, in frames per second, of the mediastreamtrack as currently configured.
... syntax var framerate = mediatracksettings.framerate; value a double-precision floating-point number indicating the current configuration of the track's frame rate, in frames per second.
MediaTrackSettings.height - Web APIs
the mediatracksettings dictionary's height property is an integer indicating the number of pixels tall mediastreamtrack is currently configured to be.
... syntax var height = mediatracksettings.height; value an integer value indicating the height, in pixels, of the video track as currently configured.
MediaTrackSettings.latency - Web APIs
the mediatracksettings dictionary's latency property is a double-precision floating-point number indicating the estimated latency (specified in seconds) of the mediastreamtrack as currently configured.
... syntax var latency = mediatracksettings.latency; value a double-precision floating-point number indicating the estimated latency, in seconds, of the audio track as currently configured.
MediaTrackSettings.logicalSurface - Web APIs
a visible display surface (that is, a surface for which logicalsurface returns false) is the portion of a logical display surface which is currently visible onscreen.
... for example, a user agent may choose to allow the user to choose whether to share the entire document (a browser with logicalsurface value of true), or just the currently visible portion of the document (where the logicalsurface of the browser surface is false).
MediaTrackSettings.volume - Web APIs
the mediatracksettings dictionary's volume property is a double-precision floating-point number indicating the volume of the mediastreamtrack as currently configured, as a value from 0.0 (silence) to 1.0 (maximum supported volume for the device).
... syntax var volume = mediatracksettings.volume; value a double-precision floating-point number indicating the volume, from 0.0 to 1.0, of the audio track as currently configured.
MediaTrackSettings.width - Web APIs
the mediatracksettings dictionary's width property is an integer indicating the number of pixels wide mediastreamtrack is currently configured to be.
... syntax var width = mediatracksettings.width; value an integer value indicating the width, in pixels, of the video track as currently configured.
Media Capabilities API - Web APIs
screencolorgamut will describe the color gamut, or the range of color, the screen can display (not currently supported anywhere).
... screenluminance will describe the known luminance characteristics of the screen (not currently supported anywhere).
Media Session API - Web APIs
for example, to set the current state of the media session to playing: navigator.mediasession.playbackstate = "playing"; interfaces mediametadata allows a web page to provide rich media metadata, for display in a platform ui.
... mediapositionstate used to contain information about the current playback position, playback speed, and overall media duration when calling the mediasession method setpositionstate() to establish the media's length, playback position, and playback speed.
Metadata.modificationTime - Web APIs
once that file has been found, its metadata is obtained and the file's modification timestamp year is compared to the current year.
... if it was last modified in a year at least five prior to the current year, the file is removed and a new one is created.
msPlayToSource - Web APIs
example <video id="videoplayer" src="http://www.contoso.com/clip.mp4" controls autoplay /> <script type="text/javascript"> // step 1: obtain playtomanager object for app’s current view.
... var ptm = windows.media.playto.playtomanager.getforcurrentview(); // step 2: register for the sourcerequested event (user swipes devices charm).
Navigator.getBattery() - Web APIs
notallowederror note: no user agent currently throws this exception, but the specification describes the following behaviors: this document is not allowed to use this feature.
... example this example fetches the current charging state of the battery and establishes a handler for the chargingchange event, so that the charging state is recorded whenever it changes.
Navigator.mediaSession - Web APIs
the read-only navigator property mediasession returns a mediasession object that can be used to share with the browser metadata and other information about the current playback state of media being handled by a document.
... syntax let mediasession = navigator.mediasession; value a mediasession object the current document can use to share information about media it's playing and its current playback status.
Navigator.registerProtocolHandler() - Web APIs
syntax navigator.registerprotocolhandler(scheme, url, title); note: recently updated to navigator.registerprotocolhandler(scheme, url), but no browsers currently support this version.
... note: the title has been removed from the spec due to spoofing concerns, but all current browsers still require it.
NavigatorID.userAgent - Web APIs
the navigatorid.useragent read-only property returns the user agent string for the current browser.
...try not to use it at all, or only for current and past versions of a browser.
Node.nodeValue - Web APIs
WebAPINodenodeValue
the nodevalue property of the node interface returns or sets the value of the current node.
... syntax str = node.nodevalue; node.nodevalue = str; value str is a string containing the value of the current node, if any.
NodeIterator.previousNode() - Web APIs
this method returns null when the current node is the first node in the set.
... syntax node = nodeiterator.previousnode(); example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false // this optional argument is not used any more ); currentnode = nodeiterator.nextnode(); // returns the next node previousnode = nodeiterator.previousnode(); // same result, since we backtracked to the previous node specifications specification status comment domthe definition of 'nodeiterator.previousnode' in that specification.
Notification.requestPermission() - Web APIs
the requestpermission() method of the notification interface requests permission from the user for the current origin to display notifications.
...possible values for this string are: granted denied default examples assume this basic html: <button onclick="notifyme()">notify me!</button> it's possible to send a notification as follows — here we present a fairly verbose and complete set of code you could use if you wanted to first check whether notifications are supported, then check if permission has been granted for the current origin to send notifications, then request permission if required, before then sending a notification.
Notification - Web APIs
notification.permission read only a string representing the current permission to display notifications.
... examples assume this basic html: <button onclick="notifyme()">notify me!</button> it's possible to send a notification as follows — here we present a fairly verbose and complete set of code you could use if you wanted to first check whether notifications are supported, then check if permission has been granted for the current origin to send notifications, then request permission if required, before then sending a notification.
Notifications API - Web APIs
first, the user needs to grant the current origin permission to display system notifications, which is generally done when the app or site initialises, using the notification.requestpermission() method.
...once a choice has been made, the setting will generally persist for the current session.
OVR_multiview2 - Web APIs
currently, there is no way to use multiview to render to a multisampled backbuffer, so you should create contexts with antialias: false.
...most vr headsets have two views, but there are prototypes of headset with ultra-wide fov using 4 views which is currently the maximum number of views supported by multiview.
OfflineAudioContext.resume() - Web APIs
if the context is not currently suspended or the rendering has not started, the promise is rejected with invalidstateerror.
... invalidstateerror if the context is not currently suspended or the rendering has not started.
OscillatorNode.detune - Web APIs
syntax var oscillator = audioctx.createoscillator(); oscillator.detune.setvalueattime(100, audioctx.currenttime); // value in cents note: though the audioparam returned is read-only, the value it represents is not.
... // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.detune.setvalueattime(100, audioctx.currenttime); // value in cents oscillator.start(); specifications specification status comment web audio apithe definition of 'detune' in that specification.
OscillatorNode.frequency - Web APIs
syntax var oscillator = audioctx.createoscillator(); oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz note: though the audioparam returned is read-only, the value it represents is not.
... // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'frequency' in that specification.
OscillatorNode.stop() - Web APIs
if the time is equal to or before the current audio context time, the oscillator will stop playing immediately.
... // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.connect(audioctx.destination); oscillator.start(); oscillator.stop(audioctx.currenttime + 2); // stop 2 seconds after the current time specifications specification status comment web audio apithe definition of 'stop' in that specification.
OverconstrainedError.OverconstrainedError() - Web APIs
the overconstrainederror constructor creates a new overconstrainederror object which indicates that the set of desired capabilities for the current mediastreamtrack cannot currently be met.
... when this event is thrown on a mediastreamtrack, it is muted until either the current constraints can be established or until satisfiable constraints are applied.
OverconstrainedError - Web APIs
the overconstrainederror interface of the media capture and streams api indicates that the set of desired capabilities for the current mediastreamtrack cannot currently be met.
... when this event is thrown on a mediastreamtrack, it is muted until either the current constraints can be established or until satisfiable constraints are applied.
Page Visibility API - Web APIs
the page visibility api provides events you can watch for to know when a document becomes visible or hidden, as well as features to look at the current visibility state of the page.
... document.visibilitystate read only a domstring indicating the document's current visibility state.
PaintWorklet - Web APIs
properties paintworklet.devicepixelratio returns the current device's ratio of physical pixels to logical pixels.
... css.paintworklet.addmodule() the addmodule() method, inhertied from the worklet interface loads the module in the given javascript file and adds it to the current paintworklet.
PannerNode.coneInnerAngle - Web APIs
this value determines the volume of the sound outside of both inner and outer cone // setting it to 0 means there is no sound, so we can clearly hear when we leave the cone // 0 is also the default panner.coneoutergain = 0; // increase the z position to ensure the cone has an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation // this means the sound will play at full volume const [x1, y1, z1] = yrotationtovector(0); // schedule the no-rotation vector immediately panner.orientationx.setvalueattime(x1, context.currenttime); panner.orientationy.setvalueattime(y1, context.currenttime); pan...
...ner.orientationz.setvalueattime(z1, context.currenttime); // calculate the vector for -22.4 degrees // since our coneouterangle is 45, this will just about make the sound audible // if we set it to +/-22.5, the sound volume will be 0, as the threshold is exclusive const [x2, y2, z2] = yrotationtovector(-22.4); panner.orientationx.setvalueattime(x2, context.currenttime + 2); panner.orientationy.setvalueattime(y2, context.currenttime + 2); panner.orientationz.setvalueattime(z2, context.currenttime + 2); finally, let's connect all our nodes and start the oscillator!
PannerNode.coneOuterAngle - Web APIs
this value determines the volume of the sound outside of both inner and outer cone // setting it to 0 means there is no sound, so we can clearly hear when we leave the cone // 0 is also the default panner.coneoutergain = 0; // increase the z position to ensure the cone has an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation // this means the sound will play at full volume const [x1, y1, z1] = yrotationtovector(0); // schedule the no-rotation vector immediately panner.orientationx.setvalueattime(x1, context.currenttime); panner.orientationy.setvalueattime(y1, context.currenttime); pan...
...ner.orientationz.setvalueattime(z1, context.currenttime); // calculate the vector for -22.4 degrees // since our coneouterangle is 45, this will just about make the sound audible // if we set it to +/-22.5, the sound volume will be 0, as the threshold is exclusive const [x2, y2, z2] = yrotationtovector(-22.4); panner.orientationx.setvalueattime(x2, context.currenttime + 2); panner.orientationy.setvalueattime(y2, context.currenttime + 2); panner.orientationz.setvalueattime(z2, context.currenttime + 2); finally, let's connect all our nodes and start the oscillator!
PannerNode.coneOuterGain - Web APIs
this value determines the volume of the sound outside of both inner and outer cone // setting it to 0 means there is no sound, so we can clearly hear when we leave the cone // 0 is also the default panner.coneoutergain = 0; // increase the z position to ensure the cone has an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation // this means the sound will play at full volume const [x1, y1, z1] = yrotationtovector(0); // schedule the no-rotation vector immediately panner.orientationx.setvalueattime(x1, context.currenttime); panner.orientationy.setvalueattime(y1, context.currenttime); pan...
...ner.orientationz.setvalueattime(z1, context.currenttime); // calculate the vector for -22.4 degrees // since our coneouterangle is 45, this will just about make the sound audible // if we set it to +/-22.5, the sound volume will be 0, as the threshold is exclusive const [x2, y2, z2] = yrotationtovector(-22.4); panner.orientationx.setvalueattime(x2, context.currenttime + 2); panner.orientationy.setvalueattime(y2, context.currenttime + 2); panner.orientationz.setvalueattime(z2, context.currenttime + 2); finally, let's connect all our nodes and start the oscillator!
PannerNode.orientationX - Web APIs
this value determines the volume of the sound outside of both inner and outer cone // setting it to 0 means there is no sound, so we can clearly hear when we leave the cone // 0 is also the default panner.coneoutergain = 0; // increase the z position to ensure the cone has an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation // this means the sound will play at full volume const [x1, y1, z1] = yrotationtovector(0); // schedule the no-rotation vector immediately panner.orientationx.setvalueattime(x1, context.currenttime); panner.orientationy.setvalueattime(y1, context.currenttime); pan...
...ner.orientationz.setvalueattime(z1, context.currenttime); // calculate the vector for -22.4 degrees // since our coneouterangle is 45, this will just about make the sound audible // if we set it to +/-22.5, the sound volume will be 0, as the threshold is exclusive const [x2, y2, z2] = yrotationtovector(-22.4); panner.orientationx.setvalueattime(x2, context.currenttime + 2); panner.orientationy.setvalueattime(y2, context.currenttime + 2); panner.orientationz.setvalueattime(z2, context.currenttime + 2); finally, let's connect all our nodes and start the oscillator!
PannerNode.orientationY - Web APIs
this value determines the volume of the sound outside of both inner and outer cone // setting it to 0 means there is no sound, so we can clearly hear when we leave the cone // 0 is also the default panner.coneoutergain = 0; // increase the z position to ensure the cone has an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation // this means the sound will play at full volume const [x1, y1, z1] = yrotationtovector(0); // schedule the no-rotation vector immediately panner.orientationx.setvalueattime(x1, context.currenttime); panner.orientationy.setvalueattime(y1, context.currenttime); pan...
...ner.orientationz.setvalueattime(z1, context.currenttime); // calculate the vector for -22.4 degrees // since our coneouterangle is 45, this will just about make the sound audible // if we set it to +/-22.5, the sound volume will be 0, as the threshold is exclusive const [x2, y2, z2] = yrotationtovector(-22.4); panner.orientationx.setvalueattime(x2, context.currenttime + 2); panner.orientationy.setvalueattime(y2, context.currenttime + 2); panner.orientationz.setvalueattime(z2, context.currenttime + 2); finally, let's connect all our nodes and start the oscillator!
PannerNode.orientationZ - Web APIs
this value determines the volume of the sound outside of both inner and outer cone // setting it to 0 means there is no sound, so we can clearly hear when we leave the cone // 0 is also the default panner.coneoutergain = 0; // increase the z position to ensure the cone has an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation // this means the sound will play at full volume const [x1, y1, z1] = yrotationtovector(0); // schedule the no-rotation vector immediately panner.orientationx.setvalueattime(x1, context.currenttime); panner.orientationy.setvalueattime(y1, context.currenttime); pan...
...ner.orientationz.setvalueattime(z1, context.currenttime); // calculate the vector for -22.4 degrees // since our coneouterangle is 45, this will just about make the sound audible // if we set it to +/-22.5, the sound volume will be 0, as the threshold is exclusive const [x2, y2, z2] = yrotationtovector(-22.4); panner.orientationx.setvalueattime(x2, context.currenttime + 2); panner.orientationy.setvalueattime(y2, context.currenttime + 2); panner.orientationz.setvalueattime(z2, context.currenttime + 2); finally, let's connect all our nodes and start the oscillator!
ParentNode - Web APIs
parentnode.queryselector() returns the first element with the current element as root that matches the specified group of selectors.
... parentnode.queryselectorall() returns a nodelist representing a list of elements with the current element as root that matches the specified group of selectors.
PasswordCredential.idName - Web APIs
the idname property of the passwordcredential interface returns a usvstring, representing the name that will be used for the id field, when submitting the current object to a remote endpoint via fetch.
... syntax var idname = passwordcredential.idname passwordcredential.idname = "userid" value a usvstring represents the name used for the id field, when submitting the current object to a remote endpoint via fetch.
PasswordCredential.passwordName - Web APIs
the passwordname property of the passwordcredential interface returns a usvstring, depicting the name used by the password field, when submitting the current object to a remote endpoint via fetch.
... syntax var passwordname = passwordcredential.passwordname passwordcredential.passwordname = "passcode" value a usvstring representing the password field name, used when submitting the current object to a remote endpoint via fetch.
PasswordCredential - Web APIs
passwordcredential.idname secure context a usvstring containing the name that will be used for the id field when submitting the current object to a remote endpoint via fetch.
... passwordcredential.passwordname secure context a usvstring representing the name that will be used for the password field when submitting the current object to a remote endpoint via fetch.
PaymentAddress.toJSON() - Web APIs
requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso locales, currently us and ca.disabled from version 62: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
...requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso locales, currently us and ca.disabled from version 62: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
PaymentMethodChangeEvent.methodName - Web APIs
the read-only methodname property of the paymentmethodchangeevent interface is a string which uniquely identifies the payment handler currently selected by the user.
... syntax var methodname = paymentmethodchangeevent.methodname; value a domstring which uniquely identifies the currently-selected payment handler.
performance.measure() - Web APIs
the measure() method creates a named timestamp in the browser's performance entry buffer between marks, the navigation start time, or the current time.
...if it is omitted, then the current time is used.
PerformanceNavigationTiming.domComplete - Web APIs
the domcomplete read-only property returns a timestamp representing the time value equal to the time immediately before the user agent sets the current document readiness of the current document to complete.
... syntax perfentry.domcomplete; return value a timestamp representing a time value equal to the time immediately before the user agent sets the current document readiness of the current document to complete.
PerformanceNavigationTiming.domContentLoadedEventEnd - Web APIs
the domcontentloadedeventend read-only property returns a timestamp representing the time value equal to the time immediately after the current document's domcontentloaded event completes.
... syntax perfentry.domcontentloadedeventend; return value a timestamp representing the time value equal to the time immediately after the current document's domcontentloaded event completes.
PerformanceNavigationTiming.domContentLoadedEventStart - Web APIs
the domcontentloadedeventstart read-only property returns a timestamp representing the time value equal to the time immediately before the user agent fires the domcontentloaded event at the current document.
... syntax perfentry.domcontentloadedeventstart; return value a timestamp representing the time value equal to the time immediately before the user agent fires the domcontentloaded event at the current document.
PerformanceNavigationTiming.domInteractive - Web APIs
the dominteractive read-only property returns a timestamp representing the time value equal to the time immediately before the user agent sets the current document readiness of the current document to interactive.
... syntax perfentry.dominteractive; return value a timestamp representing the time value equal to the time immediately before the user agent sets the current document readiness of the current document to interactive.
PerformanceNavigationTiming.loadEventEnd - Web APIs
the loadeventend read-only property returns a timestamp which is equal to the time when the load event of the current document is completed.
... syntax perfentry.loadeventend; return value a timestamp representing the time when the load event of the current document is completed.
PerformanceNavigationTiming.loadEventStart - Web APIs
the loadeventstart read-only property returns a timestamp representing the time value equal to the time immediately before the load event of the current document is fired.
... syntax perfentry.loadeventstart; return value a timestamp representing a time value equal to the time immediately before the load event of the current document is fired.
PerformanceNavigationTiming.redirectCount - Web APIs
the redirectcount property returns a timestamp representing the number of redirects since the last non-redirect navigation under the current browsing context.
... syntax perfentry.redirectcount; return value a number representing the number of redirects since the last non-redirect navigation under the current browsing context.
PerformanceResourceTiming.secureConnectionStart - Web APIs
the secureconnectionstart read-only property returns a timestamp immediately before the browser starts the handshake process to secure the current connection.
... syntax resource.secureconnectionstart; return value if the resource is fetched over a secure connection, a domhighrestimestamp immediately before the browser starts the handshake process to secure the current connection.
PerformanceTiming - Web APIs
the performancetiming interface is a legacy interface kept for backwards compatibility and contains properties that offer performance timing information for various events which occur during the loading and use of the current page.
... performancetiming.loadeventstart read only when the load event was sent for the current document.
Permissions.revoke() - Web APIs
the permissions.revoke() method of the permissions interface reverts a currently set permission back to its default state, which is usually prompt.
... exceptions typeerror retrieving the permissiondescriptor information failed in some way, or the permission doesn't exist or is currently unsupported (e.g.
Permissions API - Web APIs
the permissions api provides a consistent programmatic way to query the status of api permissions attributed to the current context.
... permissionstatus provides access to the current status of a permission, and an event handler to respond to changes in permission status.
PublicKeyCredentialCreationOptions.extensions - Web APIs
here is the current (as of march 2019) list of potential extensions which may be used during the registration operation.
...in other words, this may be used server side to check if the current operation is based on the same biometric data that the previous authentication.
PublicKeyCredentialCreationOptions.rp - Web APIs
the default value of this property is the domain of the current document (e.g.
...it may be overridden with a suffix of the current domain (e.g.
PublicKeyCredentialRequestOptions - Web APIs
if this option is not provided, the client will use the current origin's domain.
... examples var options = { challenge: new uint8array([/* bytes sent from the server */]), rpid: "example.com", /* will only work if the current domain is something like foo.example.com */ userverification: "preferred", timeout: 60000, // wait for a minute allowcredentials: [ { transports: "usb", type: "public-key", id: new uint8array(26) // actually provided by the server }, { transports: "internal", type: "public-key", id: new uint8array(26) // actually p...
PushManager - Web APIs
pushmanager.permissionstate() returns a promise that resolves to the permission state of the current pushmanager, which will be one of 'granted', 'denied', or 'prompt'.
...a new push subscription is created if the current service worker does not have an existing subscription.
PushSubscription.getKey() - Web APIs
specifications specification status comment push api working draft this is the push api spec, but note that getkey() is not currently specified in here.
... it is currently firefox-only experimental.
PushSubscription.unsubscribe() - Web APIs
the unsubscribe() method of the pushsubscription interface returns a promise that resolves to a boolean when the current subscription is successfully unsubscribed.
... returns a promise that resolves to a boolean when the current subscription is successfully unsubscribed.
Push API - Web APIs
WebAPIPush API
the push api gives web applications the ability to receive messages pushed to them from a server, whether or not the web app is in the foreground, or even currently loaded, on a user agent.
...different browsers have different schemes for handling this, there is currently no standard mechanism.
RTCDTMFSender.insertDTMF() - Web APIs
calling insertdtmf() will append the specified tones to the end of the current tone buffer, so that those tones play after the previously-enqueued tones.
...specifying an empty string as the tones parameter clears the tone buffer, aborting any currently queued tones.
RTCDataChannel.readyState - Web APIs
syntax var state = adatachannel.readystate; values a string which is one of the values in the rtcdatachannelstate enum, indicating the current state of the underlying data transport.
... rtcdatachannelstate enum the rtcdatachannelstate enum defines string constants which reflect the current status of the rtcdatachannel's underlying data connection.
RTCDataChannel - Web APIs
the default is "blob".bufferedamount read only the read-only rtcdatachannel property bufferedamount returns the number of bytes of data currently queued to be sent over the data channel.bufferedamountlowthreshold the rtcdatachannel property bufferedamountlowthreshold is used to specify the number of bytes of buffered outgoing data that is considered "low." the default value is 0.id read only the read-only rtcdatachannel property id returns an id number (between 0 and 65,534) which uniquely identifies the rtcdatachannel.label read on...
...the current format specifies its protocol as either "udp/dtls/sctp" (udp carrying dtls carrying sctp) or "tcp/dtls/sctp" (tcp carrying dtls carrying sctp).
RTCIceCandidatePair - Web APIs
it is used as the return value from rtcicetransport.getselectedcandidatepair() to identify the currently-selected candidate pair identified by the ice agent.
... example in this example, an event handler for selectedcandidatepairchange is set up to update an on-screen display showing the protocol used by the currently selected candidate pair.
RTCIceTransport.gatheringState - Web APIs
the read-only rtcicetransport property gatheringstate returns a domstring from the enumerated type rtcicegathererstate that indicates what gathering state the ice agent is currently in: "new", "gathering", or "complete".
... syntax gatherstate = rtcicetransport.gatheringstate; value a string from the rtcicegathererstate enumerated type whose value indicates the current state of the ice agent's candidate gathering process: "new" the rtcicetransport is newly created and has not yet started to gather ice candidates.
RTCIceTransport.getRemoteCandidates() - Web APIs
the rtcicetransport method getremotecandidates() returns an array which contains one rtcicecandidate for each of the candidates that have been received from the remote peer so far during the current ice gathering session.
... return value an array containing one rtcicecandidate object for each candidate that has been received so far from the remote peer during the current ice candidate gathering session.
RTCIceTransport.onselectedcandidatepairchange - Web APIs
the event handler can determine the current state by calling the transport's getselectedcandidatepair() method, which returns a rtcicecandidatepair whose rtcicecandidatepair.local and rtcicecandidatepair.global properties specify rtcicecandidate objects describing the local and remote candidates that are currently being used.
... example in this example, an event handler for selectedcandidatepairchange is set up to update an on-screen display showing the protocol used by the currently selected candidate pair.
RTCIceTransportState - Web APIs
the transport state indicates which stage of the candidate gathering process is currently underway.
... values "new" the rtcicetransport is currently gathering local candidates, or is waiting for the remote device to begin to transmit the remote candidates, or both.
RTCPeerConnection.iceConnectionState - Web APIs
syntax var state = rtcpeerconnection.iceconnectionstate; value the current state of the ice agent and its connection.
... rtciceconnectionstate enum the rtciceconnectionstate enum defines the string constants used to describe the current state of the ice agent and its connection to the ice server (that is, the stun or turn server).
RTCPeerConnection.localDescription - Web APIs
syntax var sessiondescription = peerconnection.localdescription; on a more fundamental level, the returned value is the value of rtcpeerconnection.pendinglocaldescription if that property isn't null; otherwise, the value of rtcpeerconnection.currentlocaldescription is returned.
... see pending and current descriptions in webrtc connectivity for details on this algorithm and why it's used.
RTCPeerConnection.remoteDescription - Web APIs
syntax var sessiondescription = peerconnection.remotedescription; on a more fundamental level, the returned value is the value of rtcpeerconnection.pendingremotedescription if that property isn't null; otherwise, the value of rtcpeerconnection.currentremotedescription is returned.
... see pending and current descriptions in webrtc connectivity for details on this algorithm and why it's used.
RTCPeerConnection.setConfiguration() - Web APIs
the rtcpeerconnection.setconfiguration() method sets the current configuration of the rtcpeerconnection based on the values included in the specified rtcconfiguration object.
...this happens if configuration.peeridentity or configuration.certificates is set and their values differ from the current configuration.
RTCRtpEncodingParameters - Web APIs
properties active if true, the described encoding is currently actively being used.
... that is, for rtp senders, the encoding is currently being used to send data, while for receivers, the encoding is being used to decode received data.
RTCRtpReceiver.getParameters() - Web APIs
the getparameters() method of the rtcrtpreceiver interface returns an rtcrtpreceiveparameters object describing the current configuration for the encoding and transmission of media on the receiver's track.
... return value an rtcrtpreceiveparameters object indicating the current configuration of the receiver.
RTCRtpSendParameters.encodings - Web APIs
each object's properties are: active if true, the described encoding is currently actively being used.
... that is, for rtp senders, the encoding is currently being used to send data, while for receivers, the encoding is being used to decode received data.
RTCRtpSender.getStats() - Web APIs
example this simple example obtains the statistics for an rtcrtpsender and updates an element's innertext to display the current round trip time for requests on the sender.
... sender.getstats().then(function(stats) { document.getelementbyid("currentrtt").innertext = stats.roundtriptime; }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.getstats()' in that specification.
RTCRtpSender.setParameters() - Web APIs
invalidmodificationerror one of the following problems was detected: the number of encodings specified in the parameters object's encodings property does not match the number of encodings currently listed for the rtcrtpsender.
... the order of the specified encodings has changed from the current list's order.
RTCRtpSender - Web APIs
methods rtcrtpsender.getparameters() returns a rtcrtpparameters object describing the current configuration for the encoding and transmission of media on the track.
... rtcrtpsender.replacetrack() attempts to replace the track currently being sent by the rtcrtpsender with another track, without performing renegotiation.
RTCRtpTransceiver.stop() - Web APIs
instead, check the value of currentdirection.
... the negotiation process causes currentnegotiation to be set to stopped, finally indicating that the transceiver has been fully stopped.
RTCRtpTransceiver.stopped - Web APIs
instead, look at the value of currentdirection.
... note: currently only firefox implements stopped, and has not yet been updated to implement this change.
RTCStatsReport - Web APIs
candidate pairs other than the currently active pair for the transport are deleted when the rtcpeerconnection changes its rtcpeerconnection.icegatheringstate to new during an ice restart.
... codec an rtccodecstats object containing statistics about a codec currently being used by rtp streams to send or receive data for the rtcpeerconnection.
RTCStatsType - Web APIs
candidate pairs other than the currently active pair for the transport are deleted when the rtcpeerconnection changes its rtcpeerconnection.icegatheringstate to new during an ice restart.
... codec an rtccodecstats object containing statistics about a codec currently being used by rtp streams to send or receive data for the rtcpeerconnection.
ReadableStream.tee() - Web APIs
the tee() method of the readablestream interface tees the current readable stream, returning a two-element array containing the two resulting branches as new readablestream instances.
...current chunk = ' + chunk; list.appendchild(listitem); // read some more, and call this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'tee()' in that specification.
ReadableStream - Web APIs
readablestream.pipethrough() provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.
... readablestream.pipeto() pipes the current readablestream to a given writablestream and returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
SVGAnimatedAngle - Web APIs
animval svgangle a read only svgangle representing the current animated value of the given attribute.
... if the given attribute is not currently being animated, then the svgangle will have the same contents as baseval.
SVGAnimatedBoolean - Web APIs
animval boolean if the given attribute or property is being animated, contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, contains the same value as baseval.
SVGAnimatedEnumeration - Web APIs
animval unsigned short if the given attribute or property is being animated, contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, contains the same value as baseval.
SVGAnimatedInteger - Web APIs
animval long if the given attribute or property is being animated, contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, contains the same value as baseval.
SVGAnimatedLength - Web APIs
animval svglength if the given attribute or property is being animated, contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, contains the same value as baseval.
SVGAnimatedLengthList - Web APIs
animval svglengthlist a read only svglengthlist representing the current animated value of the given attribute.
... if the given attribute is not currently being animated, then the svglengthlist will have the same contents as baseval.
SVGAnimatedNumber - Web APIs
animval float if the given attribute or property is being animated, contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, contains the same value as baseval.
SVGAnimatedNumberList - Web APIs
svganimatednumberlist.animval read only is a read only svgnumberlist that represents the current animated value of the given attribute.
... if the given attribute is not currently being animated, then the svgnumberlist will have the same contents as baseval.
SVGAnimatedPreserveAspectRatio - Web APIs
svganimatedpreserveaspectratio.animval read only is a svgpreserveaspectratio that represents the current animated value of the given attribute.
... if the given attribute is not currently being animated, then the svgpreserveaspectratio will have the same contents as baseval.
SVGAnimatedRect - Web APIs
animval svgrect a read only svgrect representing the current animated value of the given attribute.
... if the given attribute is not currently being animated, then the svgrect will have the same contents as baseval.
SVGAnimatedString.animVal - Web APIs
animval attribute or animval property contains the same value as the baseval property.if the given attribute or property is being animated, contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, then it contains the same value as baseval the animval property is a read only property.
SVGAnimatedString - Web APIs
if the given attribute or property is being animated it contains the current animated value of the attribute or property.
... if the given attribute or property is not currently being animated, it contains the same value as baseval.
SVGAnimatedTransformList - Web APIs
animval svgtransformlist a read only svgtransformlist representing the current animated value of the given attribute.
... if the given attribute is not currently being animated, then the svgtransformlist will have the same contents as baseval.
SVGLengthList - Web APIs
methods name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list.
... initialize(in svglength newitem) svglength clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
SVGNumberList - Web APIs
methods name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list.
... initialize(in svgnumber newitem) svgnumber clears all existing current items from the list and re-initializes the list to hold the single item specified by newitem.
SVGPathSegList - Web APIs
methods clear() void clears all existing current items from the list, with the result being an empty list.
... initialize(in svgpathseg newitem) svgpathseg clears all existing current items from the list and re-initializes the list to hold the single item specified by newitem.
SVGPointList - Web APIs
methods name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list.
... initialize(in svgpoint newitem) svgpoint clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
SVGStringList - Web APIs
methods name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list.
... initialize(in domstring newitem) domstring clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
SVGTransformList - Web APIs
methods name & arguments return description clear() void clears all existing current items from the list, with the result being an empty list.
... initialize(in svgtransform newitem) svgtransform clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
Screen.top - Web APIs
WebAPIScreentop
returns the distance in pixels from the top side of the current screen.
... syntax let top = window.screen.top; specifications not part of any current specification.
Selection.addRange() - Web APIs
example currently only firefox supports multiple selection ranges, other browsers will not add new ranges to the selection if it already contains one.
... working draft current ...
Selection.focusNode - Web APIs
this can be visualized by holding the shift key and pressing the arrow keys on your keyboard to modify the current selection.
... working draft current ...
Selection.isCollapsed - Web APIs
the selection.iscollapsed read-only property returns a boolean which indicates whether or not there is currently any text selected.
... working draft current ...
ServiceWorkerGlobalScope: notificationclick event - Web APIs
bles no cancelable no interface notificationevent event handler onnotificationclick examples you can use the notificationclick event in an addeventlistener method: self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); or use the onnotif...
...icationclick event handler property: self.onnotificationclick = function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }; specifications specification status notifications apithe definition of 'onnotificationclick' in that specification.
Using Service Workers - Web APIs
when no pages are using the current version, the new worker activates and becomes responsible for fetches.
... self.addeventlistener('activate', (event) => { var cachekeeplist = ['v2']; event.waituntil( caches.keys().then((keylist) => { return promise.all(keylist.map((key) => { if (cachekeeplist.indexof(key) === -1) { return caches.delete(key); } })); }) ); }); developer tools chrome has chrome://inspect/#service-workers, which shows current service worker activity and storage on a device, and chrome://serviceworker-internals, which shows more detail and allows you to start/stop/debug the worker process.
ShadowRoot.delegatesFocus - Web APIs
this is currently an experimental non-standard feature, available only in chrome.
...let hostelem = shadow.delegatesfocus; specifications this feature is not currently in a specification.
SourceBuffer.mode - Web APIs
WebAPISourceBuffermode
its sourcebuffer.updating property is currently true), the last media segment appended to this sourcebuffer is incomplete, or this sourcebuffer has been removed from the mediasource.
... example this snippet sets the sourcebuffer mode to 'sequence' if it is currently set to 'segments', thus setting the play order to the sequence in which media segments are appended.
SourceBuffer.updating - Web APIs
the updating read-only property of the sourcebuffer interface indicates whether the sourcebuffer is currently being updated — i.e.
... whether an sourcebuffer.appendbuffer(), sourcebuffer.appendstream(), or sourcebuffer.remove() operation is currently in progress.
SpeechRecognition.lang - Web APIs
the lang property of the speechrecognition interface returns and sets the language of the current speechrecognition.
... syntax var mylang = myspeechrecognition.lang; myspeechrecognition.lang = 'en-us'; value a domstring representing the bcp 47 language tag for the current speechrecognition.
SpeechRecognitionEvent.results - Web APIs
the results read-only property of the speechrecognitionevent interface returns a speechrecognitionresultlist object representing all the speech recognition results for the current session.
... specifically this object will contain all final results that have been returned, followed by the current best hypothesis for all interim results.
SpeechSynthesis.speaking - Web APIs
the speaking read-only property of the speechsynthesis interface is a boolean that returns true if an utterance is currently in the process of being spoken — even if speechsynthesis is in a paused state.
...this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); var amispeaking = synth.speaking; // will return true if utterance 1 or utterance 2 are currently being spoken specifications specification status comment web speech apithe definition of 'speaking' in that specification.
SpeechSynthesis - Web APIs
speechsynthesis.speaking read only a boolean that returns true if an utterance is currently in the process of being spoken — even if speechsynthesis is in a paused state.
... speechsynthesis.getvoices() returns a list of speechsynthesisvoice objects representing all the available voices on the current device.
Storage.getItem() - Web APIs
WebAPIStoragegetItem
function setstyles() { var currentcolor = localstorage.getitem('bgcolor'); var currentfont = localstorage.getitem('font'); var currentimage = localstorage.getitem('image'); document.getelementbyid('bgcolor').value = currentcolor; document.getelementbyid('font').value = currentfont; document.getelementbyid('image').value = currentimage; htmlelem.style.backgroundcolor = '#' + currentcolor; pelem.style.fontfamily = cu...
...rrentfont; imgelem.setattribute('src', currentimage); } note: to see this used within a real world example, see our web storage demo.
Storage - Web APIs
WebAPIStorage
if(!localstorage.getitem('bgcolor')) { populatestorage(); } setstyles(); function populatestorage() { localstorage.setitem('bgcolor', document.getelementbyid('bgcolor').value); localstorage.setitem('font', document.getelementbyid('font').value); localstorage.setitem('image', document.getelementbyid('image').value); } function setstyles() { var currentcolor = localstorage.getitem('bgcolor'); var currentfont = localstorage.getitem('font'); var currentimage = localstorage.getitem('image'); document.getelementbyid('bgcolor').value = currentcolor; document.getelementbyid('font').value = currentfont; document.getelementbyid('image').value = currentimage; htmlelem.style.backgroundcolor = '#' + currentcolor; pelem.style.fontfamily = cu...
...rrentfont; imgelem.setattribute('src', currentimage); } note: to see this running as a complete working example, see our web storage demo.
StorageEstimate.quota - Web APIs
example in this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user.
... html content <label> you’re currently using about <output id="percent"> </output>% of your available storage.
StorageEstimate.usage - Web APIs
example in this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user.
... html content <label> you’re currently using about <output id="percent"> </output>% of your available storage.
Using the Storage Access API - Web APIs
since it does not know whether it currently has access to storage, it should first call document.hasstorageaccess().
...}); note that access requests are automatically denied unless the embedded content is currently processing a user gesture such as a tap or click — so this code needs to be run inside some kind of user gesture-based event handler, for example: btn.addeventlistener('click', () => { // run code here }); ...
Using readable streams - Web APIs
if there is more stream to read, you process the current chunk then run the function again.
...current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(processtext); }); } closing and cancelling streams we’ve already shown examples of using readablestreamdefaultcontroller.close() to close a reader.
Using writable streams - Web APIs
only chrome currently has basic writable streams implemented.
... this currently only has one method available on it — writablestreamdefaultcontroller.error(), which when invoked causes future interactions with the stream to error.
StylePropertyMapReadOnly.forEach() - Web APIs
syntax stylepropertymapreadonly.foreach(function callback(currentvalue[, index[, array]]) { //your code }[, thisarg]); parameters callback the function to execute for each element, taking three arguments: currentvalue the value of the current element being processed.
... indexoptional the index of the current element being processed.
SyncEvent.lastChance - Web APIs
the syncevent.lastchance read-only property of the syncevent interface returns true if the user agent will not make further synchronization attempts after the current attempt.
... syntax var lastchance = syncevent.lastchance value a boolean that indicates whether the user agent will not make further synchronization attempts after the current attempt.
Text.replaceWholeText() - Web APIs
the replaced nodes are removed, including the current node, unless it was the recipient of the replacement text.
... the returned node is the current node unless the current node is read only, in which case the returned node is a newly created text node of the same type which has been inserted at the location of the replacement.
TextTrack: cuechange event - Web APIs
the cuechange event fires when a texttrack has changed the currently displaying cues.
... bubbles no cancelable no interface event event handler property globaleventhandlers.oncuechange examples on the texttrack you can set up a listener for the cuechange event on a texttrack using the addeventlistener() method: track.addeventlistener('cuechange', function () { let cues = track.activecues; // array of current cues }); or you can just set the oncuechange event handler property: track.oncuechange = function () { let cues = track.activecues; // array of current cues } on the track element the underlying texttrack, indicated by the track property, receives a cuechange event every time the currently-presented cue is changed.
TextTrackList.onremovetrack - Web APIs
example this simple example just fetches the current number of text tracks in the first media element whenever a track is removed from the media element.
... document.queryselectorall("video, audio")[0].texttracks.onremovetrack = function(event) { mytrackcount = document.queryselectorall("video, audio")[0].texttracks.length; }; the current number of text tracks remaining in the media element is obtained from texttracklist property length.
TouchEvent() - Web APIs
toucheventinit optional is a toucheventinit dictionary, having the following fields: "touches", optional and defaulting to [], of type touch[], that is a list of objects for every point of contact currently touching the surface.
... "targettouches", optional and defaulting to [], of type touch[], that is a list of objects for every point of contact that is touching the surface and started on the element that is the target of the current event.
TouchEvent.touches - Web APIs
touches is a read-only touchlist listing all the touch objects for touch points that are currently in contact with the touch surface, regardless of whether or not they've changed or what their target element was at touchstart time.
...the touchevent.touches property is a touchlist object and containing a list of touch objects for every point of contact currently touching the surface.
TouchEvent - Web APIs
touchevent.targettouchesread only a touchlist of all the touch objects that are both currently in contact with the touch surface and were also started on the same element that is the target of the event.
... touchevent.touches read only a touchlist of all the touch objects representing all current points of contact with the surface, regardless of target or changed status.
TreeWalker.nextSibling() - Web APIs
the treewalker.nextsibling() method moves the current node to its next sibling, if any, and returns the found sibling.
... if there is no such node, return null and the current node is not changed.
TreeWalker.parentNode() - Web APIs
the treewalker.parentnode() method moves the current node to the first visible ancestor node in the document order, and returns the found node.
... if no such node exists, or if it is above the treewalker's root node, returns null and the current node is not changed.
TreeWalker.previousSibling() - Web APIs
the treewalker.previoussibling() method moves the current node to its previous sibling, if any, and returns the found sibling.
... if there is no such node, return null and the current node is not changed.
UIEvent - Web APIs
WebAPIUIEvent
uievent.layerx read only returns the horizontal coordinate of the event relative to the current layer.
... uievent.layery read only returns the vertical coordinate of the event relative to the current layer.
USBInterface - Web APIs
usbinterface.alternateread only returns the currently selected alternative configuration of this interface.
... usbinterface.claimedread only returns whether or not this interface has been claimed by the current page by calling usbdevice.claiminterface().
VideoTrackList.onremovetrack - Web APIs
example this simple example just fetches the current number of video tracks in the media element whenever a track is removed from the media element.
... document.queryselector("my-video").videotracks.onremovetrack = function(event) { mytrackcount = document.queryselector("my-video").videotracks.length; }; the current number of video tracks remaining in the media element is obtained from videotracklist property length.
VideoTrackList.selectedIndex - Web APIs
the read-only videotracklist property selectedindex returns the index of the currently selected track, if any, or -1 otherwise.
... syntax var index = videotracklist.selectedindex; value a number indicating the index of the currently selected track, if any, or -1 otherwise.
WakeLockSentinel.type - Web APIs
the read-only type property of the wakelocksentinel interface returns a string representation of the currently acquired wakelocksentinel type.
... syntax var type = wakelocksentinel.type; value a string representation of the currently acquired wake lock type.
WebGL2RenderingContext.drawBuffers() - Web APIs
the draw buffer settings are part of the state of the currently bound framebuffer or the drawingbuffer if no framebuffer is bound.
... gl.color_attachment{0-15}: fragment shader output is written in the nth color attachment of the current framebuffer.
WebGL2RenderingContext.texSubImage3D() - Web APIs
the webgl2renderingcontext.texsubimage3d() method of the webgl api specifies a sub-rectangle of the current texture.
...used to upload data to the currently bound webgltexture from the webglbuffer bound to the pixel_unpack_buffer target.
WebGLRenderingContext.depthFunc() - Web APIs
the webglrenderingcontext.depthfunc() method of the webgl api specifies a function that compares incoming pixel depth to the current depth buffer value.
... gl.enable(gl.depth_test); gl.depthfunc(gl.never); to check the current depth function, query the depth_func constant.
WebGLRenderingContext.getError() - Web APIs
gl.invalid_operation the specified command is not allowed for the current state.
... gl.invalid_framebuffer_operation the currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.
WebGLRenderingContext.getParameter() - Web APIs
see also cullface gl.current_program webglprogram or null see useprogram.
... ext.timestamp_ext gluint64ext ext_disjoint_timer_query the current time.
WebGLRenderingContext.getVertexAttrib() - Web APIs
possible values: gl.vertex_attrib_array_buffer_binding: returns the currently bound webglbuffer.
... gl.current_vertex_attrib: returns a float32array (with 4 elements) representing the current value of the vertex attribute at the given index.
WebGLRenderingContext.readPixels() - Web APIs
the webglrenderingcontext.readpixels() method of the webgl api reads a block of pixels from a specified rectangle of the current color framebuffer into an arraybufferview object.
... a gl.invalid_framebuffer_operation error is thrown if the currently bound framebuffer is not framebuffer complete.
WebGLRenderingContext.texSubImage2D() - Web APIs
the webglrenderingcontext.texsubimage2d() method of the webgl api specifies a sub-rectangle of the current texture.
...used to upload data to the currently bound webgltexture from the webglbuffer bound to the pixel_unpack_buffer target.
Animating objects with WebGL - Web APIs
the first thing we'll need is a variable in which to track the current rotation of the square: var squarerotation = 0.0; now we need to update the drawscene() function to apply the current rotation to the square when drawing it.
... after translating to the initial drawing position for the square, we apply the rotation like this: mat4.rotate(modelviewmatrix, // destination matrix modelviewmatrix, // matrix to rotate squarerotation, // amount to rotate in radians [0, 0, 1]); // axis to rotate around this rotates the modelviewmatrix by the current value of squarerotation, around the z axis.
Lighting in WebGL - Web APIs
aminfo.attriblocations.vertexnormal, numcomponents, type, normalize, stride, offset); gl.enablevertexattribarray( programinfo.attriblocations.vertexnormal); } finally, we need to update the code that builds the uniform matrices to generate and deliver to the shader a normal matrix, which is used to transform the normals when dealing with the current orientation of the cube in relation to the light source: const normalmatrix = mat4.create(); mat4.invert(normalmatrix, modelviewmatrix); mat4.transpose(normalmatrix, normalmatrix); ...
... the first thing we do is transform the normal based on the current orientation of the cube, by multiplying the vertex's normal by the normal matrix.
WebGL best practices - Web APIs
now adjust all internal caching in the application (webglbuffers, webgltextures, etc.) to obey a maximum size, computed by this constant multiplied by the number of pixels covered by the current browser window.
...e been detected following a call to gllinkprogram errors due to mismatch between the vertex and fragment shader (link errors) must have been detected following a call to gllinkprogram errors due to exceeding resource limits must have been detected following any draw call or a call to glvalidateprogram a call to glvalidateprogram must report all errors associated with a program object given the current gl state.
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
et makingoffer = false; pc.onnegotiationneeded = async () => { try { makingoffer = true; await pc.setlocaldescription(); signaler.send({ description: pc.localdescription }); } catch(err) { console.error(err); } finally { makingoffer = false; } }; note that setlocaldescription() without arguments automatically creates and sets the appropriate description based on the current signalingstate.
... signaler.send({ description: pc.localdescription }); } } else if (candidate) { try { await pc.addicecandidate(candidate); } catch(err) { if (!ignoreoffer) { throw err; } } } } catch(err) { console.error(err); } }; since rollback works by postponing changes until the next negotiation (which will begin immediately after the current one is finished), the polite peer needs to know when it needs to throw away a received offer if it's currently waiting for a reply to an offer it's already sent.
Writing a WebSocket server in C# - Web APIs
the first byte, which currently has a value of 129, is a bitfield that breaks down as such: fin (bit 0) rsv1 (bit 1) rsv2 (bit 2) rsv3 (bit 3) opcode (bit 4:7) 1 0 0 0 0x1=0001 fin bit: this bit indicates whether the full message has been sent from the client.
...full list of opcodes the second byte, which currently has a value of 131, is another bitfield that breaks down as such: mask (bit 0) payload length (bit 1:7) 1 0x83=0000011 mask bit: defines whether the "payload data" is masked.
WebXR permissions and security - Web APIs
the document is considered trustworthy, in that it is responsible and is both currently active and has focus.
...a trustworthy document is one which is both responsible and active, and which currently has focus.
Starting up and shutting down a WebXR session - Web APIs
on top of that, the document needs to be secure and currently focused.
...currently, the only configurable aspect of the session is which of the reference spaces should be used to represent the world's coordinate system.
Web Animations API - Web APIs
document.getanimations() returns an array of animation objects currently in effect on elements in the document.
... element.getanimations() returns an array of animation objects currently affecting an element or which are scheduled to do so in future.
Web Audio API best practices - Web APIs
it's constantly in development and endeavours to keep up with the current specification.
...if for example, you want the gain value to be raised to 1 in 2 seconds time, you can do this: gainnode.gain.setvalueattime(1, audioctx.currenttime + 2); it will override the previous example (as it should), even if it were to come later in your code.
Controlling multiple parameters with ConstantSourceNode - Web APIs
playing a boolean that we'll use to keep track of whether or not we're currently playing the tones.
... if playing is false, indicating that we're currently paused, we change the play button's content to be the unicode character "pause symbol" (⏸) and call startoscillators() to start the oscillators playing their tones.
Using the Web Audio API - Web APIs
this is what our current audio graph looks like: now we can add the play and pause functionality.
...we'll use the factory method in our code: const gainnode = audiocontext.creategain(); now we have to update our audio graph from before, so the input is connected to the gain, then the gain node is connected to the destination: track.connect(gainnode).connect(audiocontext.destination); this will make our audio graph look like this: the default value for gain is 1; this keeps the current volume the same.
Visualizations with Web Audio API - Web APIs
first, we again set up our analyser and data array, then clear the current canvas display with clearrect().
... we also set a barheight variable, and an x variable to record how far across the screen to draw the current bar.
Using Web Workers - Web APIs
worker()) that runs a named javascript file — this file contains the code that will run in the worker thread; workers run in another global context that is different from the current window.
... thus, using the window shortcut to get the current global scope (instead of self) within a worker will return an error.
Window.getSelection() - Web APIs
the window.getselection() method returns a selection object representing the range of text selected by the user or the current position of the caret.
... it is worth noting that currently getselection() doesn't work on the content of <textarea> and <input> elements in firefox, edge (legacy) and internet explorer.
Window.history - Web APIs
WebAPIWindowhistory
the window.history read-only property returns a reference to the history object, which provides an interface for manipulating the browser session history (pages visited in the tab or frame that the current page is loaded in).
...the closest available solution is the location.replace() method, which replaces the current item of the session history with the provided url.
Window.localStorage - Web APIs
syntax mystorage = window.localstorage; value a storage object which can be used to access the current origin's local storage space.
... example the following snippet accesses the current domain's local storage object and adds a data item to it using storage.setitem().
Window.moveBy() - Web APIs
WebAPIWindowmoveBy
the moveby() method of the window interface moves the current window by a specified amount.
... note: this function moves the window relative to its current location.
Window.moveTo() - Web APIs
WebAPIWindowmoveTo
the moveto() method of the window interface moves the current window to the specified coordinates.
...in contrast, window.moveby() moves the window relative to its current location.
Window.onpaint - Web APIs
WebAPIWindowonpaint
not working in gecko-based applications currently, see notes section!
... notes onpaint doesn't work currently, and it is questionable whether this event is going to work at all, see bug 239074.
Window: pagehide event - Web APIs
the pagehide event is sent to a window when the browser hides the current page in the process of presenting a different page from the session's history.
... for example, when the user clicks the browser's back button, the current page receives a pagehide event before the previous page is shown.
Window.requestAnimationFrame() - Web APIs
the callback method is passed a single argument, a domhighrestimestamp, which indicates the current time (based on the number of milliseconds since time origin).
... be sure to always use the first argument (or some other method for getting the current time) to calculate how much the animation will progress in a frame, otherwise the animation will run faster on high refresh rate screens.
Window.updateCommands() - Web APIs
summary updates the state of commands of the current chrome window (ui).
... 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.
WindowClient.focus() - Web APIs
the focus() method of the windowclient interface gives user input focus to the current client and returns a promise that resolves to the existing windowclient.
... example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications ...
WindowClient.focused - Web APIs
the focused read-only property of the windowclient interface is a boolean that indicates whether the current client has focus.
... example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) { if(!client.focused) return client.focus(); } } } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of 'w...
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
currently-executing code must complete before functions on the queue are executed, thus the resulting execution order may not be as expected.
... deferral of timeouts during pageload starting in firefox 66, firefox will defer firing settimeout and setinterval timers while the current tab is loading.
WindowOrWorkerGlobalScope - Web APIs
windoworworkerglobalscope.caches read only returns the cachestorage object associated with the current context.
... windoworworkerglobalscope.issecurecontext read only returns a boolean indicating whether the current context is secure (true) or not (false).
WorkerGlobalScope - Web APIs
properties implemented from elsewhere windoworworkerglobalscope.caches read only returns the cachestorage object associated with the current context.
... windoworworkerglobalscope.issecurecontext read only returns a boolean indicating whether the current context is secure (true) or not (false).
XRInputSourceArray.forEach() - Web APIs
the callback accepts up to three parameters: currentvalue a xrinputsource object which is the value of the item from within the xrinputsourcearray which is currently being processed.
... currentindex optional an integer value providing the index into the array at which the element given by currentvalue is located.
XRInputSourceEvent.frame - Web APIs
this may thus be an event which occurred in the past rather than a current or impending event.
... however, since the event frame isn't an animation frame, there is no viewer pose available to represent the viewer's current point of view; the results of calling getviewerpose() will be an xrviewerpose with an empty views list.
XRPermissionDescriptor.optionalFeatures - Web APIs
while further features may be defined in future editions of webxr, currently all permitted values come from the xrreferencespacetype enumerated type, indicating reference spaces the app rquires to be available.
...the viewer isn't tracked at all; tracking is optimized for stability around the user's current position, so the native origin may drift as needed to accommodate that need.
XRPermissionDescriptor.requiredFeatures - Web APIs
currently, all features are members of the xrreferencespacetype enumerated type, indicating the reference space types that your app would like permission to use, but can operate without.
...the viewer isn't tracked at all; tracking is optimized for stability around the user's current position, so the native origin may drift as needed to accommodate that need.
XRPermissionStatus.granted - Web APIs
currently, all of these strings come from the xrreferencespacetype enumerated type.
...the viewer isn't tracked at all; tracking is optimized for stability around the user's current position, so the native origin may drift as needed to accommodate that need.
XRReferenceSpace: reset event - Web APIs
the coordinate system is thus reset with its new origin at or near the user's current position.
...when that happens, you typically hold down a button somewhere and it causes the world to resynchronize to the device's current orientation.
XRReferenceSpace - Web APIs
the viewer isn't tracked at all; tracking is optimized for stability around the user's current position, so the native origin may drift as needed to accommodate that need.
... let offsettransform = new xrrigidtransform({x: 2, y: 0, z: 1}, {x: 0, y: 1, z: 0, w: 1}); xrreferencespace = xrreferencespace.getoffsetreferencespace(offsettransform); this replaces the xrreferencespace with a new one whose origin and orientation are adjusted to place the new origin at (2, 0, 1) relative to the current origin and rotated given a unit quaternion that orients the space to put the viewer facing straight up relative to the previous world orientation.
XRReferenceSpaceEvent() - Web APIs
currently, only the reset event is defined using this type.
...currently, this is always reset.
XRSession.inputSources - Web APIs
the read-only inputsources property of the xrsession interface returns an xrinputsourcearray object which lists all controllers and input devices which are expressly associated with the xr device and are currently available.
... syntax inputsources = xrsession.inputsources; value an xrinputsourcearray object listing all of the currently-connected input controllers which are linked specifically to the xr device currently in use.
XRSession - Web APIs
WebAPIXRSession
visibilitystate read only a domstring whose value is one of those found in the xrvisibilitystate enumerated type, indicating whether or not the session's imagery is visible to the user, and if so, if it's being visible but not currently the target for user events.
...any properties not included in the given dictionary are left unchanged from their current values.
XRViewerPose.views - Web APIs
for each frame, you should always use the current length of this array rather than caching the value.
... syntax let viewlist = xrviewerpose.views; value an array of xrview objects, one for each view available as part of the scene for the current viewer pose.
XRViewport - Web APIs
the webxr device api's xrviewport interface provides properties used to describe the size and position of the current viewport within the xrwebgllayer being used to render the 3d scene.
... usage notes currently, the only type of surface available is the xrwebgllayer.
XRWebGLLayer.getViewport() - Web APIs
example this example demonstrates in part what the callback for the requestanimationframe() function might look like, using getviewport() to get the viewport so that drawing can be constrained to the area set aside for the eye whose viewpoint is currently being rendered.
...since the framebuffer is split in half, one half for each eye, setting the webgl viewport to match the webxr layer's viewport will ensure that when rendering the scene for the current eye's pose, it is rendered into the correct half of the framebuffer.
XSL Transformations in Mozilla FAQ - Web APIs
sadly, current builds don't error, but just give unexpected results, like crashes (bug 202765).
...this is achieved by printing the current dom tree.
Using the aria-activedescendant attribute - Accessibility
description the aria-activedescendant attribute contains the id of the currently active child object that is part of a composite widget within the document object model.
...as the name specifies, it helps in managing the current active child of the composite widget.
ARIA annotations - Accessibility
aria annotation roles and objects are currently exposed in: firefox from version 75 onwards, on windows and linux (on macos, we are first waiting for apple to define what safari will expose as apple-dialect attributes to voiceover, and will then follow suit.) chrome from version 81 onwards, currently behind the #enable-accessibility-expose-aria-annotations flag (go to chrome://flags to enable this.) unfortunately, you won’t be able t...
...o use any of these yet, as screenreader support is currently not there.
ARIA: timer role - Accessibility
a timer's inner text should be an updating current time measurement.
...the clock is updated each minute, with the new remaining time simply overwriting the current content.
ARIA: grid role - Accessibility
page down moves focus down an author-determined number of rows, typically scrolling so the bottom row in the currently visible set of rows becomes one of the first visible rows.
... page up moves focus up an author-determined number of rows, typically scrolling so the top row in the currently visible set of rows becomes one of the last visible rows.
ARIA: rowgroup role - Accessibility
the columns are sortable, but not currently sorted, as indicated by the aria-sort property.
... the table body is a separate rowgroup, with four rows currently in the dom.
ARIA: table role - Accessibility
while the full table has 81 entries, as indicated by the aria-rowcount property, only four are currently visible.
... the columns are sortable, but not currently sorted, as indicated by the aria-sort property on the column headers.
An overview of accessible web applications and widgets - Accessibility
states describe the current interaction state of an element, informing the assistive technology if it is busy, disabled, selected, or hidden.
... state changes aria provides attributes for declaring the current state of a ui widget.
Web accessibility for seizures and physical reactions - Accessibility
in its article, "a revised definition of epilepsy" the epilepsy foundation notes that…"a seizure is an event and epilepsy is the disease involving recurrent unprovoked seizures." according to the epilepsy foundation's page "how serious are seizures?" , "sudden unexpected death in epilepsy (sudep) is likely the most common disease-related cause of death in with epilepsy.
...because of this condition, their brain will produce seizure-like discharges when exposed to this type of visual stimulation gamma oscillations and photosensitive epilepsy current biology volume 27, issue 9, 8 may 2017, pages r336-r338 certain visual images, even in the absence of motion or flicker, can trigger seizures in patients with photosensitive epilepsy.
Robust - Accessibility
guideline 4.1 — compatible: maximize compatibility with current and future user agents, including assistive technologies this guideline focuses on making content as compatible as possible, not only with current user agents (e.g.
... understanding status messages note: also see the wcag description for guideline 4.1: compatible: maximize compatibility with current and future user agents, including assistive technologies.
Understandable - Accessibility
for example, if pressing a button causes the application to exit the current view, the user should be asked to confirm this action, save their work if appropriate, etc.
... if you need to have something that significantly changes the current view (e.g.
-webkit-text-stroke - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:-webkit-text-stroke-width: 0-webkit-text-stroke-color: currentcolorapplies toall elementsinheritedyescomputed valueas each of the properties of the shorthand:-webkit-text-stroke-width: absolute <length>-webkit-text-stroke-color: computed coloranimation typeas each of the properties of the shorthand:-webkit-text-stroke-width: discrete-webkit-text-stroke-color: a color formal syntax <length> | <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | ...
...<hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
:in-range - CSS: Cascading Style Sheets
WebCSS:in-range
the :in-range css pseudo-class represents an <input> element whose current value is within the range limits specified by the min and max attributes.
... /* selects any <input>, but only when it has a range specified, and its value is inside that range */ input:in-range { background-color: rgba(0, 255, 0, 0.25); } this pseudo-class is useful for giving the user a visual indication that a field's current value is within the permitted limits.
:out-of-range - CSS: Cascading Style Sheets
the :out-of-range css pseudo-class represents an <input> element whose current value is outside the range limits specified by the min and max attributes.
... /* selects any <input>, but only when it has a range specified, and its value is outside that range */ input:out-of-range { background-color: rgba(255, 0, 0, 0.25); } this pseudo-class is useful for giving the user a visual indication that a field's current value is outside the permitted limits.
prefers-reduced-data - CSS: Cascading Style Sheets
user preferences currently no user agent implements this feature, although various operating systems do support such preferences and if this media query is ever implemented user agents will likely rely on the settings provided by the operating system.
... examples note: no browser currently implements this feature so the following example will not work.
prefers-reduced-transparency - CSS: Cascading Style Sheets
user preferences currently no user agent implements this feature, although various operating systems do support such preferences and if this media query is ever implemented user agents will likely rely on the settings provided by the operating systems.
... examples note: no browser currently implements this feature so the following example will not work.
scripting - CSS: Cascading Style Sheets
WebCSS@mediascripting
none scripting is completely unavailable on the current document.
... enabled scripting is supported and active on the current document.
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
at the current time we do not have any implementations of the gap properties from the box alignment module for flexbox.
...at the current time you will need to use margins to achieve this.
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
horizontal-tb vertical-rl vertical-lr sideways-rl sideways-lr note that sideways-rl and sideways-lr have support only in firefox currently.
... warning: current implementations in most browsers will remove any element with display: contents from the accessibility tree (but descendants will remain).
Variable fonts guide - CSS: Cascading Style Sheets
for comparison, it is typical in a typographic system for a magazine to use 10–15 or more different weight and width combinations throughout the publication — giving a much wider range of styles than currently typical on the web (or indeed practical for performance reasons alone).
...the five currently registered axes are weight, width, slant, italic, and optical size.
Basic Concepts of grid layout - CSS: Cascading Style Sheets
note: this feature shipped in firefox 71, which is currently the only browser to implement subgrid.
... in the current specification, we would edit the above nested grid example to change the track definition of grid-template-columns: repeat(3, 1fr), to grid-template-columns: subgrid.
Pseudo-classes - CSS: Cascading Style Sheets
index of standard pseudo-classes :active :any-link :blank :checked :current :default :defined :dir() :disabled :drop :empty :enabled :first :first-child :first-of-type :fullscreen :future :focus :focus-visible :focus-within :has() :host :host() :host-context() :hover :indeterminate :in-range :invalid :is() :lang() :last-child :last-of-type :left :link :local-link :not() :nth-child() :nth-col() :nth-last-child() :nt...
... selectors level 4 working draft defined :any-link, :blank, :local-link, :scope, :drop, :current, :past, :future, :placeholder-shown, :user-invalid, :nth-col(), :nth-last-col(), :is() and :where().
animation-play-state - CSS: Cascading Style Sheets
syntax /* single animation */ animation-play-state: running; animation-play-state: paused; /* multiple animations */ animation-play-state: paused, running, running; /* global values */ animation-play-state: inherit; animation-play-state: initial; animation-play-state: unset; values running the animation is currently playing.
... paused the animation is currently paused.
border-block-end - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typeas each of the properties of the shorthand:border-block-end-color: a colorborder-block-end-style: discreteborder-block-end-width: a length formal sy...
...ntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-block - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typediscrete formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color>...
... | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-bottom-color - CSS: Cascading Style Sheets
syntax /* <color> values */ border-bottom-color: red; border-bottom-color: #ffbb00; border-bottom-color: rgb(255, 0, 0); border-bottom-color: hsla(100%, 50%, 25%, 0.75); border-bottom-color: currentcolor; border-bottom-color: transparent; /* global values */ border-bottom-color: inherit; border-bottom-color: initial; border-bottom-color: unset; the border-bottom-color property is specified as a single value.
... formal definition initial valuecurrentcolorapplies toall elements.
border-bottom - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-bottom-width: mediumborder-bottom-style: noneborder-bottom-color: currentcolorapplies toall elements.
...properties of the shorthand:border-bottom-color: a colorborder-bottom-style: discreteborder-bottom-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-color - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-top-color: currentcolorborder-right-color: currentcolorborder-bottom-color: currentcolorborder-left-color: currentcolorapplies toall elements.
...color: computed colorborder-left-color: computed colorborder-right-color: computed colorborder-top-color: computed coloranimation typeas each of the properties of the shorthand:border-bottom-color: a colorborder-left-color: a colorborder-right-color: a colorborder-top-color: a color formal syntax <color>{1,4}where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-inline-end-color - CSS: Cascading Style Sheets
initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color values <'color'> the color of the border.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-inline-end-color: red; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-color' in that specification.
border-left - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-left-width: mediumborder-left-style: noneborder-left-color: currentcolorapplies toall elements.
...f the properties of the shorthand:border-left-color: a colorborder-left-style: discreteborder-left-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-right - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-right-width: mediumborder-right-style: noneborder-right-color: currentcolorapplies toall elements.
...he properties of the shorthand:border-right-color: a colorborder-right-style: discreteborder-right-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-top - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elements.
...h of the properties of the shorthand:border-top-color: a colorborder-top-style: discreteborder-top-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
box-shadow - CSS: Cascading Style Sheets
if not specified, it defaults to currentcolor.
...&& <length>{2,4} && <color>?where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
column-rule - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:column-rule-width: mediumcolumn-rule-style: nonecolumn-rule-color: currentcolorapplies tomulticol elementsinheritednocomputed valueas each of the properties of the shorthand:column-rule-color: computed colorcolumn-rule-style: as specifiedcolumn-rule-width: the absolute length; 0 if the column-rule-style is none or hiddenanimation typeas each of the properties of the shorthand:column-rule-color: a colorcolumn-rule-style: discretecolumn-rule-width: a length formal syntax...
... <'column-rule-width'> | <'column-rule-style'> | <'column-rule-color'> examples example 1 /* same as "medium dotted currentcolor" */ p.foo { column-rule: dotted; } /* same as "medium solid blue" */ p.bar { column-rule: solid blue; } /* same as "8px solid currentcolor" */ p.baz { column-rule: solid 8px; } p.abc { column-rule: thick inset blue; } example 2 html <p class="content-box"> this is a bunch of text split into three columns.
cross-fade() - CSS: Cascading Style Sheets
syntax important: the specification and current implementations have different syntaxes.
...&& <image><cf-final-image> = <image> | <color>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <image()> = image( <image-tags>?
cursor - CSS: Cascading Style Sheets
WebCSScursor
keyword values move your mouse over values to see their live appearance in your browser: category css value example description general auto the ua will determine the cursor to display based on the current context.
... no-drop an item may not be dropped at the current location.
<display-box> - CSS: Cascading Style Sheets
due to a bug in browsers this will currently remove the element from the accessibility tree — screen readers will not look at what's inside.
... accessibility concerns current implementations in most browsers will remove from the accessibility tree any element with a display value of contents.
filter - CSS: Cascading Style Sheets
WebCSSfilter
if not specified, the color used depends on the browser - it is usually the value of the <color> property, but note that safari currently paints a transparent shadow in this case.
...)<grayscale()> = grayscale( <number-percentage> )<hue-rotate()> = hue-rotate( <angle> )<invert()> = invert( <number-percentage> )<opacity()> = opacity( [ <number-percentage> ] )<saturate()> = saturate( <number-percentage> )<sepia()> = sepia( <number-percentage> )where <number-percentage> = <number> | <percentage><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
mask-composite - CSS: Cascading Style Sheets
the mask-composite css property represents a compositing operation used on the current mask layer with the mask layers below it.
... values for the composition the current mask layer is referred to as source, while all layers below it are referred to as destination.
mask - CSS: Cascading Style Sheets
WebCSSmask
<compositing-operator> sets the compositing operation used on the current mask layer.
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()><box> = border-box | padding-box | content-boxwhere <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
outline - CSS: Cascading Style Sheets
WebCSSoutline
defaults to currentcolor if absent.
... how to design useful and usable focus indicators wcag 2.1: understanding success criterion 2.4.7: focus visible formal definition initial valueas each of the properties of the shorthand:outline-color: invert, for browsers supporting it, currentcolor for the otheroutline-style: noneoutline-width: mediumapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:outline-color: for the keyword invert, the computed value is invert.
scroll-snap-type-x - CSS: Cascading Style Sheets
mandatory the visual viewport of this scroll container will rest on a snap point if it isn't currently scrolled horizontally.
... proximity the visual viewport of this scroll container may come to rest on a snap point if it isn't currently scrolled horizontally considering the user agent's scroll parameters.
scroll-snap-type-y - CSS: Cascading Style Sheets
mandatory the visual viewport of this scroll container will rest on a snap point if it isn't currently scrolled vertically.
... proximity the visual viewport of this scroll container may come to rest on a snap point if it isn't currently scrolled vertically considering the user agent's scroll parameters.
scroll-snap-type - CSS: Cascading Style Sheets
mandatory the visual viewport of this scroll container will rest on a snap point if it isn't currently scrolled.
... proximity the visual viewport of this scroll container may come to rest on a snap point if it isn't currently scrolled considering the user agent's scroll parameters.
text-combine-upright - CSS: Cascading Style Sheets
] examples digits the digits value requires less markup than the all value when digits are being combined, but it is currently not very widely supported by browsers.
... html <p lang="ja" class="exampletext">平成20年4月16日に</p> css .exampletext { writing-mode: vertical-lr; text-combine-upright: digits 2; font: 36px serif; } results screenshotlive sample all the all value requires markup around every piece of horizontal text, but it is currently supported by more browsers than the digits value.
Adding captions and subtitles to HTML5 video - Developer guides
the text colour of the text track cues you can write: ::cue { color:#ccc; } if the webvtt file uses voice spans, which allow cues to be defined as having a particular "voice": 0 00:00:00.000 --> 00:00:12.000 <v test>[test]</v> then this specific 'voice' will be stylable like so: ::cue(v[voice='test']) { color:#fff; background:#0095dd; } note: some of the styling of cues with ::cue currently works on chrome, opera, and safari, but not yet on firefox.
... radiant media player supports multi-languages webvtt closed captions note: you can find an excellent list of html5 video players and their current "state" at html5 video player comparison.
Media buffering, seeking, and time ranges - Developer guides
; } and the following javascript provides our functionality: window.onload = function(){ var myaudio = document.getelementbyid('my-audio'); myaudio.addeventlistener('progress', function() { var duration = myaudio.duration; if (duration > 0) { for (var i = 0; i < myaudio.buffered.length; i++) { if (myaudio.buffered.start(myaudio.buffered.length - 1 - i) < myaudio.currenttime) { document.getelementbyid("buffered-amount").style.width = (myaudio.buffered.end(myaudio.buffered.length - 1 - i) / duration) * 100 + "%"; break; } } } }); myaudio.addeventlistener('timeupdate', function() { var duration = myaudio.duration; if (duration > 0) { document.getelementbyid('progress-amount').style.width = ...
...((myaudio.currenttime / duration)*100) + "%"; } }); } the progress event is fired as data is downloaded, this is a good event to react to if we want to display download or buffering progress.
Overview of events and handlers - Developer guides
(the talk is available from several sources, including this one.) currently, all execution environments for javascript code use events and event handling.
... although this list is currently incomplete.
Rich-Text Editing in Mozilla - Developer guides
when using contenteditable, calling execcommand will affect the currently active editable element.
...internet explorer, however, does not allow javascript to change the current document's designmode.
Introduction to HTML5 - Developer guides
you can find a list of all of the html5 features that gecko currently supports on the main html5 page.
...also, if you are not currently using utf-8, it's recommended that you switch to it in your web pages, as it simplifies character handling in documents using different scripts.
Index - Developer guides
WebGuideIndex
currently, to support all browsers we need to specify two formats, although with the adoption of mp3 and mp4 formats in firefox and opera, this is changing fast.
...there are a number of possible scenarios: 39 svg-in-opentype draft, fonts, guide, needscontent the svg-in-opentype work is currently in the hands of the mpeg group.
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
each time this event arrives, we set the box's border color to match the color picker's current value.
...to find that, we click the "add complementary" toggle underneath the menu that lets you select the palette type (currently "monochromatic").
The HTML autocomplete attribute - HTML: Hypertext Markup Language
when creating a new account or changing passwords, this should be used for an "enter your new password" or "confirm new password" field, as opposed to a general "enter your current password" field that might be present.
... "current-password" the user's current password.
HTML attribute: minlength - HTML: Hypertext Markup Language
once submission fails, some browsers will display an error message indicating the minimum length required and the current length.
... input { border: 2px solid currentcolor; } input:invalid { border: 2px dashed red; } input:invalid:focus { background-image: linear-gradient(pink, lightgreen); } specifications specification status html living standardthe definition of 'minlength attribute' in that specification.
<input type="color"> - HTML: Hypertext Markup Language
WebHTMLElementinputcolor
false); function watchcolorpicker(event) { document.queryselectorall("p").foreach(function(p) { p.style.color = event.target.value; }); } selecting the value if the <input> element's implementation of the color type on the user's browser doesn't support a color well, but is instead a text field for entering the color string directly, you can use the select() method to select the text currently in the edit field.
...we handle that event using the updateall() function, using event.target.value to obtain the final selected color: function updateall(event) { document.queryselectorall("p").foreach(function(p) { p.style.color = event.target.value; }); } this sets the color of every <p> block so that its color attribute matches the current value of the color input, which is referred to using event.target.
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
="10"></option> <option value="20"></option> <option value="30"></option> <option value="40"></option> <option value="50" label="50%"></option> <option value="60"></option> <option value="70"></option> <option value="80"></option> <option value="90"></option> <option value="100" label="100%"></option> </datalist> screenshot live note: currently, no browser fully supports these features.
... standards according to the specification, making it vertical requires adding css to change the dimensions of the control so that it's taller than it is wide, like this: css #volume { height: 150px; width: 50px; } html <input type="range" id="volume" min="0" max="11" value="7" step="1"> result screenshotlive sample unfortunately, no major browsers currently support vertical range controls directly.
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
appearance chrome and opera in chrome/opera the time control is simple, with slots to enter hours and minutes in 12 or 24-hour format depending on operating system locale, and up and down arrows to increment and decrement the currently selected component.
...here we make use of the :valid and :invalid css properties to style the input based on whether or not the current value is valid.
<input type="week"> - HTML: Hypertext Markup Language
WebHTMLElementinputweek
the control's user interface varies from browser to browser; cross-browser support is currently a bit limited, with only chrome/opera and microsoft edge supporting it at this time.
...here we make use of the :valid and :invalid css properties to style the input based on whether or not the current value is valid.
<keygen> - HTML: Hypertext Markup Language
WebHTMLElementkeygen
currently, the user is given a choice between "high" strength (2048 bits) and "medium" strength (1024 bits).
...currently, two strengths are offered, high and medium.
<object> - HTML: Hypertext Markup Language
WebHTMLElementobject
if not specified, the default is the base uri of the current document.
... tabindexhtml 4 onlyobsolete since html5 the position of the element in the tabbing navigation order for the current document.
<select>: The HTML Select element - HTML: Hypertext Markup Language
WebHTMLElementselect
note: according to the html5 specification, the default value for size should be 1; however, in practice, this has been found to break some web sites, and no other browser currently does that, so mozilla has opted to continue to return 0 for the time being with firefox.
... warning: the mechanism for selecting multiple non-contiguous items via the keyboard described below currently only seems to work in firefox.
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
WebHTMLElementsummary
basic example a simple example showing the use of <summary> in a <details> element: <details open> <summary>overview</summary> <ol> <li>cash on hand: $500.00</li> <li>current invoice: $75.30</li> <li>due date: 5/6/19</li> </ol> </details> summaries as headings you can use heading elements in <summary>, like this: <details open> <summary><h4>overview</h4></summary> <ol> <li>cash on hand: $500.00</li> <li>current invoice: $75.30</li> <li>due date: 5/6/19</li> </ol> </details> this currently has some spacing issues that could be addresse...
... html in summaries this example adds some semantics to the <summary> element to indicate the label as important: <details open> <summary><strong>overview</strong></summary> <ol> <li>cash on hand: $500.00</li> <li>current invoice: $75.30</li> <li>due date: 5/6/19</li> </ol> </details> specifications specification status comment html living standardthe definition of '<summary>' in that specification.
Preloading content with rel="preload" - HTML: Hypertext Markup Language
this is fine, but isn't useful for the current page!
... in addition, browsers will give prefetch resources a lower priority than preload ones — the current page is more important than the next.
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
preflighted requests and redirects not all browsers currently support following redirects after a preflighted request.
... if a redirect occurs after a preflighted request, some browsers currently will report an error message such as the following.
Feature Policy - HTTP
for every feature controlled by feature policy, the feature is only enabled in the current document or frame if its origin matches the allowed list of origins.
... the current set of policy-controlled features fall into two broad categories: enforcing best practices for good user experiences.
ETag - HTTP
WebHTTPHeadersETag
for example, when editing mdn, the current wiki content is hashed and put into an etag in the response: etag: "33a64df551425fcc55e4d42a148795d9f25f89d4" when saving changes to a wiki page (posting data), the post request will contain the if-match header containing the etag values to check freshness against.
...if a user visits a given url again (that has an etag set), and it is stale (too old to be considered usable), the client will send the value of its etag along in an if-none-match header field: if-none-match: "33a64df551425fcc55e4d42a148795d9f25f89d4" the server compares the client's etag (sent with if-none-match) with the etag for its current version of the resource, and if both values match (that is, the resource has not changed), the server sends back a 304 not modified status, without a body, which tells the client that the cached version of the response is still good to use (fresh).
Feature-Policy: geolocation - HTTP
the http feature-policy header geolocation directive controls whether the current document is allowed to use the geolocation interface.
... when this policy is enabled, calls to getcurrentposition() and watchposition() will cause those functions' callbacks to be invoked with a positionerror code of permission_denied.
Referer - HTTP
WebHTTPHeadersReferer
the referer request header contains the address of the previous web page from which a link to the currently requested page was followed.
... header type request header forbidden header name yes syntax referer: <url> directives <url> an absolute or partial address of the previous web page from which a link to the currently requested page was followed.
Set-Cookie - HTTP
if omitted, defaults to the host of the current document url, not including subdomains.
...if the request originated from a different url than the current one, no cookies with the samesite=strict attribute are sent.
Link prefetching FAQ - HTTP
standardization of this technique is part of the scope of html 5, see the current working draft, section §5.11.3.13.
... in the current implementation (mozilla 1.2), idle time is determined using the nsiwebprogresslistener api.
PUT - HTTP
WebHTTPMethodsPUT
request has body yes successful response has body no safe no idempotent yes cacheable no allowed in html forms no syntax put /new.html http/1.1 example request put /new.html http/1.1 host: example.com content-type: text/html content-length: 16 <p>new file</p> responses if the target resource does not have a current representation and the put request successfully creates one, then the origin server must inform the user agent by sending a 201 (created) response.
... http/1.1 201 created content-location: /new.html if the target resource does have a current representation and that representation is successfully modified in accordance with the state of the enclosed representation, then the origin server must send either a 200 (ok) or a 204 (no content) response to indicate successful completion of the request.
204 No Content - HTTP
WebHTTPStatus204
the http 204 no content success status response code indicates that the request has succeeded, but that the client doesn't need to go away from its current page.
... the common use case is to return 204 as a result of a put request, updating a resource, without changing the current content of the page displayed to the user.
CSS Houdini
no guide or reference has currently been written for this api.
... no guide or reference has currently been written for this api.
Introduction - JavaScript
this guide includes some javascript features which are only currently available in the latest versions of firefox, so using the most recent version of firefox is recommended.
... single-line input in the web console the web console shows you information about the currently loaded web page, and also includes a javascript interpreter that you can use to execute javascript expressions in the current page.
Iterators and generators - JavaScript
here is the fibonacci generator using next(x) to restart the sequence: function* fibonacci() { let current = 0; let next = 1; while (true) { let reset = yield current; [current, next] = [next, next + current]; if (reset) { current = 0; next = 1; } } } const sequence = fibonacci(); console.log(sequence.next().value); // 0 console.log(sequence.next().value); // 1 console.log(sequence.next().value); // 1 console.log(sequence.next().value); // 2 conso...
...this exception will be thrown from the current suspended context of the generator, as if the yield that is currently suspended were instead a throw value statement.
Loops and iteration - JavaScript
when you use continue without a label, it terminates the current iteration of the innermost enclosing while, do-while, or for statement and continues execution of the loop with the next iteration.
...if continue is encountered, the program terminates the current iteration of checkj and begins the next iteration.
Using Promises - JavaScript
guarantees unlike old-fashioned passed-in callbacks, a promise comes with some guarantees: callbacks will never be called before the completion of the current run of the javascript event loop.
...result3) */ timing to avoid surprises, functions passed to then() will never be called synchronously, even with an already-resolved promise: promise.resolve().then(() => console.log(2)); console.log(1); // 1, 2 instead of running immediately, the passed-in function is put on a microtask queue, which means it runs later when the queue is emptied at the end of the current run of the javascript event loop, i.e.
ReferenceError: "x" is not defined - JavaScript
this variable needs to be declared, or you need to make sure it is available in your current script or scope.
... var foo = 'bar'; foo.substring(1); // "ar" wrong scope a variable needs to be available in the current context of execution.
arguments.callee - JavaScript
the arguments.callee property contains the currently executing function.
...it can be used to refer to the currently executing function inside the function body of that function.
Array.prototype.every() - JavaScript
syntax arr.every(callback(element[, index[, array]])[, thisarg]) parameters callback a function to test for each element, taking three arguments: element the current element being processed in the array.
... index optional the index of the current element being processed in the array.
Array.prototype.filter() - JavaScript
it accepts three arguments: element the current element being processed in the array.
... indexoptional the index of the current element being processed in the array.
Array.prototype.find() - JavaScript
syntax arr.find(callback(element[, index[, array]])[, thisarg]) parameters callback function to execute on each value in the array, taking 3 arguments: element the current element in the array.
... index optional the index (position) of the current element in the array.
Array.prototype.findIndex() - JavaScript
it takes three arguments: element the current element being processed in the array.
... index optional the index of the current element being processed in the array.
Array.prototype.some() - JavaScript
syntax arr.some(callback(element[, index[, array]])[, thisarg]) parameters callback a function to test for each element, taking three arguments: element the current element being processed in the array.
... indexoptional the index of the current element being processed in the array.
Date - JavaScript
static methods date.now() returns the numeric value corresponding to the current time—the number of milliseconds elapsed since january 1, 1970 00:00:00 utc, with leap seconds ignored.
...(negative values are returned for prior times.) date.prototype.gettimezoneoffset() returns the time-zone offset in minutes for the current locale.
Object.defineProperty() - JavaScript
annot try to mix both: object.defineproperty(o, 'conflict', { value: 0x9f91102, get() { return 0xdeadbeef; } }); // throws a typeerror: value appears // only in data descriptors, // get appears only in accessor descriptors modifying a property when the property already exists, object.defineproperty() attempts to modify the property according to the values in the descriptor and the object's current configuration.
... a typeerror is thrown when attempts are made to change non-configurable property attributes (except value and writable, if permitted) unless the current and new values are the same.
String.prototype.charAt() - JavaScript
var str = 'a \ud87e\udc04 z'; // we could also use a non-bmp character directly for (var i = 0, chr; i < str.length; i++) { if ((chr = getwholechar(str, i)) === false) { continue; } // adapt this line at the top of each loop, passing in the whole string and // the current iteration and returning a variable to represent the // individual character console.log(chr); } function getwholechar(str, i) { var code = str.charcodeat(i); if (number.isnan(code)) { return ''; // position not found } if (code < 0xd800 || code > 0xdfff) { return str.charat(i); } // high surrogate (could change last hex to 0xdb7f to treat high private // surrogates a...
... let str = 'a\ud87e\udc04z' // we could also use a non-bmp character directly for (let i = 0, chr; i < str.length; i++) { [chr, i] = getwholecharandi(str, i) // adapt this line at the top of each loop, passing in the whole string and // the current iteration and returning an array with the individual character // and 'i' value (only changed if a surrogate pair) console.log(chr) } function getwholecharandi(str, i) { let code = str.charcodeat(i) if (number.isnan(code)) { return '' // position not found } if (code < 0xd800 || code > 0xdfff) { return [str.charat(i), i] // normal character, keeping 'i' the same } //...
TypedArray.prototype.every() - JavaScript
syntax typedarray.every(callback[, thisarg]) parameters callback function to test for each element, taking three arguments: currentvalue the current element being processed in the typed array.
... index the index of the current element being processed in the typed array.
TypedArray.prototype.find() - JavaScript
syntax typedarray.find(callback[, thisarg]) parameters callback function to execute on each value in the typed array, taking three arguments: element the current element being processed in the typed array.
... index the index of the current element being processed in the typed array.
TypedArray.prototype.findIndex() - JavaScript
syntax typedarray.findindex(callback[, thisarg]) parameters callback function to execute on each value in the typed array, taking three arguments: element the current element being processed in the typed array.
... index the index of the current element being processed in the typed array.
TypedArray.prototype.forEach() - JavaScript
syntax typedarray.foreach(callback[, thisarg]) parameters callback function that produces an element of the new typed array, taking three arguments: currentvalue the current element being processed in the typed array.
... index the index of the current element being processed in the array.
TypedArray.prototype.map() - JavaScript
syntax typedarray.map(mapfn[, thisarg]) parameters mapfn a callback function that produces an element of the new typed array, taking three arguments: currentvalue the current element being processed in the typed array.
... index optional the index of the current element being processed in the typed array.
TypedArray.prototype.some() - JavaScript
syntax typedarray.some(callback[, thisarg]) parameters callback function to test for each element, taking three arguments: currentvalue the current element being processed in the typed array.
... index the index of the current element being processed in the typed array.
WeakRef - JavaScript
garbage collection work can be split up over time using incremental and concurrent techniques.
... notes on weakrefs some notes on weakrefs: if your code has just created a weakref for a target object, or has gotten a target object from a weakref's deref method, that target object will not be reclaimed until the end of the current javascript job (including any promise reaction jobs that run at the end of a script job).
Destructuring assignment - JavaScript
however, if you leave out the right-hand side assignment, the function will look for at least one argument to be supplied when invoked, whereas in its current form, you can simply call drawchart() without supplying any parameters.
... the current design is useful if you want to be able to call the function without supplying any parameters, the other can be useful when you want to ensure an object is passed to the function.
yield - JavaScript
if an optional value is passed to the generator's next() method, that value becomes the value returned by the generator's current yield operation.
... unfortunately, next() is asymmetric, but that can’t be helped: it always sends a value to the currently suspended yield, but returns the operand of the following yield.
break - JavaScript
the break statement terminates the current loop, switch, or label statement and transfers program control to the statement following the terminated statement.
... a break statement, with or without a following label, cannot be used within the body of a function that is itself nested within the current loop, switch, or label statement that the break statement is intended to break out of.
continue - JavaScript
the continue statement terminates execution of the statements in the current iteration of the current or labeled loop, and continues execution of the loop with the next iteration.
... the continue statement can include an optional label that allows the program to jump to the next iteration of a labeled loop statement instead of the current loop.
for...in - JavaScript
in general, it is best not to add, modify, or remove properties from the object during iteration, other than the property currently being visited.
... there is no guarantee whether an added property will be visited, whether a modified property (other than the current one) will be visited before or after it is modified, or whether a deleted property will be visited before it is deleted.
Statements and declarations - JavaScript
break terminates the current loop, switch, or label statement and transfers program control to the statement following the terminated statement.
... continue terminates execution of the statements in the current iteration of the current or labeled loop, and continues execution of the loop with the next iteration.
<math> - MathML
WebMathMLElementmath
it can have one of the following values: block, which means that this element will be displayed outside the current span of text, as a block that can be positioned anywhere without changing the meaning of the text; inline, which means that this element will be displayed inside the current span of text, and cannot be moved out of it without changing the meaning of that text.
... recommendation current specification mathml 2.0the definition of 'the top-level math element' in that specification.
<mglyph> - MathML
WebMathMLElementmglyph
valign specifies the vertical alignment with respect to the current baseline.
... recommendation current specification mathml 2.0the definition of 'mglyph' in that specification.
<mstyle> - MathML
WebMathMLElementmstyle
this attribute accepts a non-negative integer, as well as a "+" or a "-" sign, which increments or decrements the current value.
... recommendation current specification mathml 2.0the definition of 'mstyle' in that specification.
Autoplay guide for media and Web Audio APIs - Web media technologies
this is currently false by default (except in nightly builds, where it's true by default).
... media.autoplay.allow-muted a boolean preference which if true (the default) allows audio media which is currently muted to be automatically played.
Performance budgets - Web Performance
the sooner that you can identify a potential addition pushing the budget, the better you can analyze the current state of your site, and pinpoint optimizations or unnecessary code.
... a performance budget helps you protect optimal behavior for your current users while enabling you to tap into new markets and deliver custom experiences.
How to make PWAs installable - Progressive web apps (PWAs)
requirements to make the web site installable, it needs the following things in place: a web manifest, with the correct fields filled in the web site to be served from a secure (https) domain an icon to represent the app on the device a service worker registered, to allow the app to work offline (this is required only by chrome for android currently) currently, only the chromium-based browsers such as chrome, edge, and samsung internet require the service worker.
...browser support is currently limited to firefox for android 58+, mobile chrome and android webview 31+, and opera for android 32+, but this should improve in the near future.
Graphic design for responsive sites - Progressive web apps (PWAs)
this is why we have included an entire docs section covering each of these topics (the one you are currently in, and app layout.) in addition, these days there are so many more technologies to choose from than your humble bmps, jpgs, gifs and pngs.
... making html <img>s responsive is not as easy, as there is currently no native mechanism to serve different html images depending on context.
color - SVG: Scalable Vector Graphics
WebSVGAttributecolor
the color attribute is used to provide a potential indirect value, currentcolor, for the fill, stroke, stop-color, flood-color, and lighting-color attributes.
... usage notes value <color> | inherit default value depends on user agent animatable yes example html, body, svg { height: 100%; } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <g color="green"> <rect width="50" height="50" fill="currentcolor" /> <circle r="25" cx="70" cy="70" stroke="currentcolor" fill="none" stroke-width="5" /> </g> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'color' in that specification.
flood-opacity - SVG: Scalable Vector Graphics
the flood-opacity attribute indicates the opacity value to use across the current filter primitive subregion.
...filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood2); transform: translatex(220px);" /> </svg> usage notes value <alpha-value> initial value 1 animatable yes <alpha-value> a number or percentage indicating the opacity value to use across the current filter primitive subregion.
kerning - SVG: Scalable Vector Graphics
WebSVGAttributekerning
if a length is provided without a unit identifier (e.g., an unqualified number such as 128), the length is processed as a width value in the current user coordinate system.
... if a unit identifier (e.g., 0.25em or 1%) is provided, then the length is converted into a corresponding value in the current user coordinate system.
letter-spacing - SVG: Scalable Vector Graphics
if the attribute value is a unitless number (like 128), the browser processes it as a <length> in the current user coordinate system.
... if the attribute value has a unit identifier, such as .25em or 1%, then the browser converts the <length> into its corresponding value in the current user coordinate system.
markerUnits - SVG: Scalable Vector Graphics
usage notes value userspaceonuse | strokewidth default value strokewidth animatable yes userspaceonuse this value specifies that the markerwidth and markerunits attributes and the contents of the <marker> element represent values in the current user coordinate system in place for the graphic object referencing the marker (i.e., the user coordinate system for the element referencing the <marker> element via a marker, marker-start, marker-mid, or marker-end property).
... strokewidth this value specifies that the markerwidth and markerunits attributes and the contents of the <marker> element represent values in a coordinate system which has a single unit equal the size in user units of the current stroke width (see the stroke-width attribute) in place for the graphic object referencing the marker.
rotate - SVG: Scalable Vector Graphics
WebSVGAttributerotate
if the value of rotate is auto, the element turns to align its right-hand side in the current direction of motion.
... if the value is auto-reverse, it turns its left-hand side in the current direction of motion.
textLength - SVG: Scalable Vector Graphics
<number> a numeric value outlines a length referring to the units of the current coordinate system.
...a <span> element of id "widthdisplay" is provided to display the current width value.
word-spacing - SVG: Scalable Vector Graphics
an unqualified number such as 128), the browser processes the <length> as a width value in the current user coordinate system.
....25em or 1%), then the browser converts the <length> into a corresponding value in the current user coordinate system.
Content type - SVG: Scalable Vector Graphics
if not provided, the length value represents a distance in the current user coordinate system.
... opacity value <opacity-value> the opacity of the color or the content the current object is filled with, as a <number>.
<marker> - SVG: Scalable Vector Graphics
WebSVGElementmarker
value type: top|center|bottom|<coordinate> ; default value: 0; animatable: yes viewbox this attribute defines the bound of the svg viewport for the current svg fragment.
...acity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<svg> - SVG: Scalable Vector Graphics
WebSVGElementsvg
value type: <number> ; default value: none; animatable: no viewbox the svg viewport coordinates for the current svg fragment.
...acity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<symbol> - SVG: Scalable Vector Graphics
WebSVGElementsymbol
value type: <length>|<percentage>|top|center|bottom ; default value: 0; animatable: yes viewbox this attribute defines the bound of the svg viewport for the current symbol.
...acity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<use> - SVG: Scalable Vector Graphics
WebSVGElementuse
there is currently no defined way to set a cross-origin policy for use elements.
...acity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
9) externalresourcesrequired attribute removed implementation status unknown auto value for width and height in <image> implementation status unknown referencing entire document with <use> implementation status unknown lang attribute on <desc> and <title> implemented (bug 721920) css transforms on outermost <svg> not affecting svgsvgelement.currentscale or svgsvgelement.currenttranslate implementation status unknown rootelement attribute deprecated implementation status unknown svgelementinstance and svgelementinstancelist and corresponding attributes on svguseelement removed implementation status unknown <use> event flow following shadow dom spec.
...ibutes removed from <svg> implementation status unknown svgsvgelement.forceredraw() deprecated turned into a no-op (bug 733764) svgsvgelement.deselectall() deprecated not yet deprecated (bug 1302705) <switch> not affecting <style> implementation status unknown requiredfeatures attribute removed implementation status unknown svgsvgelement.currentview and svgsvgelement.usecurrentview removed svgsvgelement.currentview was never implemented, svgsvgelement.usecurrentview not removed yet (bug 1174097) svgunknownelement not implemented (bug 1239218) lang attribute without namespace implemented (bug 721920) svgsvgelement.viewport removed never implemented xml:base attribute removed implementatio...
Patterns - SVG: Scalable Vector Graphics
WebSVGTutorialPatterns
as a slight aside, in gecko circles seem to have trouble drawing if their radius is set to something less than 0.075 (it is currently unknown whether this is a bug in the pattern element or not).
...to create something like this, both the pattern and its contents must be drawn in the current userspace, so they don't change shape if the object does: <pattern id="pattern" x="10" y="10" width="50" height="50" patternunits="userspaceonuse"> <rect x="0" y="0" width="50" height="50" fill="skyblue"/> <rect x="0" y="0" width="25" height="25" fill="url(#gradient2)"/> <circle cx="25" cy="25" r="20" fill="url(#gradient1)" fill-opacity="0.5"/> </pattern> of course, this means the pattern won't scale i...
Texts - SVG: Scalable Vector Graphics
WebSVGTutorialTexts
this overwrites the default current text position.
... dx start drawing the text with a horizontal offset dx from the default current position.
Same-origin policy - Web security
a script can set the value of document.domain to its current domain or a superdomain of its current domain.
... if set to a superdomain of the current domain, the shorter superdomain is used for same-origin checks.
generate-id - XPath
if omitted, the current context node will be used.
... notes the same id must be generated every time for the same node in the current document in the current transformation.
Introduction to using XPath in JavaScript - XPath
this adapter works like the dom level 3 method lookupnamespaceuri on nodes in resolving the namespaceuri from a given prefix using the current information available in the node's hierarchy at the time lookupnamespaceuri is called.
... snapshots do not change with document mutations, so unlike the iterators, the snapshot does not become invalid, but it may not correspond to the current document, for example, the nodes may have been moved, it might contain nodes that no longer exist, or new nodes could have been added.
<xsl:copy> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementcopy
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:copy> element transfers a shallow copy (the node and any associated namespace node) of the current node to the output document.
... it does not copy any children or attributes of the current node.
<xsl:number> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementnumber
the processor looks at all ancestors of the current node and the current node itself, stopping when it reaches a match for the from attribute, if there is one.
...the processor starts at the current node and proceeds in reverse document order, stopping if it reaches a match to any from attribute.
Navigator.mozNotification - Archive of obsolete content
currently, these are only supported on firefox mobile and firefox os.
Navigator - Archive of obsolete content
currently, these are only supported on firefox mobile and firefox os.
Window: userproximity event - Archive of obsolete content
other properties property type description near read only boolean the current user proximity state.
Cross-domain Content Scripts - Archive of obsolete content
this feature is currently only available for content scripts, not for page scripts included in html files shipped with your add-on.
Content Scripts - Archive of obsolete content
its "main.js" attaches a content script to the current tab using the tabs module.
Porting the Library Detector - Archive of obsolete content
the library detector tells you which javascript frameworks the current web page is using.
XUL Migration Guide - Archive of obsolete content
some limitations only exist because we haven't yet implemented the relevant apis: for example, there's currently no way to add items to the browser's main menus using the sdk's supported apis.
indexed-db - Archive of obsolete content
here's a complete add-on that adds two buttons to the browser: the button labeled "add" adds the title of the current tab to a database, while the button labeled "list" lists all the titles in the database.
simple-storage - Archive of obsolete content
currently this limit is about five megabytes (5,242,880 bytes).
High-Level APIs - Archive of obsolete content
selection get and set text and html selections in the current web page.
/loader - Archive of obsolete content
it enables you to create new loader instances identical to the current one: let { loader } = require('toolkit/loader'); let options = require('@loader/options'); let loader = loader(options); this module is useful in very specific cases.
core/promise - Archive of obsolete content
doing things concurrently so far we have being playing with promises that do things sequentially, but there are many cases where one would need to do things concurrently.
dev/panel - Archive of obsolete content
when the panel's created, the framework passes it a debuggee: this is a messageport object that you can use to exchange json messages with the browser that the developer tools are currently debugging.
io/file - Archive of obsolete content
unfortunately this api does not currently provide a way to obtain an absolute base path which you could then use with join.
places/bookmarks - Archive of obsolete content
invoked with two arguments, mine and platform, where mine is the item that is being saved, and platform is the current state of the item on the item.
remote/child - Archive of obsolete content
content the top level dom window currently displaying in this frame.
ui/frame - Archive of obsolete content
you can specify the frame's url property as the targetorigin: frame.postmessage(message, frame.url); this add-on listens for a frame script to send the "city changed" message above, and in response, updates all frames across all browser windows with that city's current weather (it just reads this from a dictionary, where in a real case it might ask a web service): var { frame } = require("sdk/ui/frame"); var { toolbar } = require("sdk/ui/toolbar"); var weather = { "london" : "rainy", "toronto" : "snowy", "san francisco" : "foggy" } var frame = new frame({ url: "./city-info.html", onmessage: (e) => { updateweather(e.data); } }); var toolbar =...
ui/toolbar - Archive of obsolete content
you can supply three sorts of ui components: action buttons toggle buttons frames this add-on builds part of the user interface for a music player using action buttons for the controls and a frame to display art and the currently playing song: var { actionbutton } = require('sdk/ui/button/action'); var { toolbar } = require("sdk/ui/toolbar"); var { frame } = require("sdk/ui/frame"); var previous = actionbutton({ id: "previous", label: "previous", icon: "./icons/previous.png" }); var next = actionbutton({ id: "next", label: "next", icon: "./icons/next.png" }); var play = actionbutton({ id: "play", lab...
jpm-mobile - Archive of obsolete content
command reference there are currently two jpm commands: jpm-mobile run launch an instance of firefox with your add-on installed.
Displaying annotations - Archive of obsolete content
this function: initializes the content script instance with the current set of annotations provides a handler for messages from that content script, handling the three messages - show, hide and detach - that the content script might send adds the worker to an array, so we it can send messages back later.
Chrome Authority - Archive of obsolete content
the api used to gain chrome access is currently an experimental feature of the sdk, and may change in future releases.
Getting Started (jpm) - Archive of obsolete content
the current tool is called jpm, and is based on node.js.
Developing for Firefox Mobile - Archive of obsolete content
the tables at the end of this guide list the modules that are currently supported on firefox mobile.
Bootstrapped extensions - Archive of obsolete content
some examples of when the shutdown() function may be called: when the extension is uninstalled, if it's currently enabled.
Bookmarks - Archive of obsolete content
you can fetch the current title of an item using the nsinavbookmarksservice.getitemtitle() method: var thistitle = bmsvc.getitemtitle(newbkmkid); this code will display an alert containing the title of the item referenced by the id newbkmkid.
Canvas code snippets - Archive of obsolete content
'beginpath', 'beziercurveto', 'clearrect', 'clip', 'closepath', 'drawimage', 'fill', 'fillrect', 'filltext', 'lineto', 'moveto', 'quadraticcurveto', 'rect', 'restore', 'rotate', 'save', 'scale', 'settransform', 'stroke', 'strokerect', 'stroketext', 'transform', 'translate']; var gettermethods = ['createpattern', 'drawfocusring', 'ispointinpath', 'measuretext', // drawfocusring not currently supported // the following might instead be wrapped to be able to chain their child objects 'createimagedata', 'createlineargradient', 'createradialgradient', 'getimagedata', 'putimagedata' ]; var props = ['canvas', 'fillstyle', 'font', 'globalalpha', 'globalcompositeoperation', 'linecap', 'linejoin', 'linewidth', 'miterlimit', 'shadowoffsetx', 'shadowoffsety', 'shadowb...
Examples and demos from articles - Archive of obsolete content
do something if current document has changed since last visit here is a possible example of how to show an alert message when current document changes.
On page load - Archive of obsolete content
if(doc.location.href.search("forum") > -1) alert("a forum page is loaded"); // add event listener for page unload aevent.originaltarget.defaultview.addeventlistener("unload", function(event){ myextension.onpageunload(event); }, true); }, onpageunload: function(aevent) { // do something } }; current firefox trunk nightlies will fire the onpageload function for not only documents, but xul:images (favicons in tabbrowser).
Post data to window - Archive of obsolete content
posting data to the current tab there is a convenience method in global scope (in firefox, chrome://browser/content/browser.js): loaduri(auri, areferrer, apostdata, aallowthirdpartyfixup); posting data to a new window window.opendialog('chrome://browser/content', '_blank', 'all,dialog=no', auri, aflags, areferrer, apostdata); ...
Sidebar - Archive of obsolete content
// toggle the bookmarks sidebar (close it if it's open or // open it if it's currently closed) sidebarui.toggle("viewbookmarkssidebar"); // show the history sidebar, whether it's hidden or already showing sidebarui.show("viewhistorysidebar"); // hide the sidebar, if one is showing sidebarui.hide(); avoid opening the sidebar on startup.
Tabbox - Archive of obsolete content
handling onclosetab event assuming the tabbox, tabs, and tabpanels widgets with id's the same as their nodename, this function will correctly remove the current tab and tab panel for the onclosetab tabs event: function removetab(){ var tabbox = document.getelementbyid("tabbox"); var currentindex = tabbox.selectedindex; if(currentindex>=0){ var tabs=document.getelementbyid("tabs"); var tabpanels=document.getelementbyid("tabpanels"); tabpanels.removechild(tabpanels.childnodes[currentindex]); tabs.removeitemat(currentindex); /*work a...
Delayed Execution - Archive of obsolete content
queuing a task in the main event loop when a task needs to be only briefly delayed, such that it runs after the current call chain returns, it can be added directly to the main thread's event queue rather than scheduled as a timeout: function executesoon(func) { services.tm.mainthread.dispatch(func, ci.nsithread.dispatch_normal); } using nsitimers to schedule tasks in instances where settimeout() and setinterval() are unavailable, or insufficient, tasks can be scheduled with delays using nsitimer instances.
Toolbar - Archive of obsolete content
= document.getelementbyid(toolbarid); // if no afterid is given, then append the item to the toolbar var before = null; if (afterid) { let elem = document.getelementbyid(afterid); if (elem && elem.parentnode == toolbar) before = elem.nextelementsibling; } toolbar.insertitem(id, before); toolbar.setattribute("currentset", toolbar.currentset); document.persist(toolbar.id, "currentset"); if (toolbarid == "addon-bar") toolbar.collapsed = false; } } if (firstrun) { installbutton("nav-bar", "my-extension-navbar-button"); // the "addon-bar" is available since firefox 4 installbutton("addon-bar", "my-extension-addon-bar-button"); } ...
Tree - Archive of obsolete content
w.iscontainer(i) && treeview.iscontaineropen(i)) treeview.toggleopenstate(i); } getting the text from the selected row assuming the given <tree>: <tree id="my-tree" seltype="single" onselect="ontreeselected()"> use the following javascript: function ontreeselected(){ 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 b...
View Source for XUL Applications - Archive of obsolete content
this is usually gotten from the nsiwebpagedescriptor interface via currentdescriptor.
Windows - Archive of obsolete content
similarly, you can get the current inner window id using the nsidomwindowutils attribute currentinnerwindowid: var util = win.queryinterface(components.interfaces.nsiinterfacerequestor).getinterface(components.interfaces.nsidomwindowutils); var windowid = util.currentinnerwindowid; programatically modifying html when attempting to modify html elements, it is important to specify the namespace.
xml:base support in old browsers - Archive of obsolete content
slash on xml:base, add one in between xmlbase += '/'; } else if (xmlbase.match(/\/$/) && xlink.match(/\/$/)) { xmlbase = xmlbase.substring(0, xmlbase.length-2); // strip off last slash to join with xlink path with slash } // alert(xmlbase + '::' + xlink); } var link = xmlbase + xlink; if (!link.match(scheme)) { // if there is no domain, we'll need to use the current domain var loc = window.location; if (link.indexof('/') === 0 ) { // if link is an absolute url, it should be from the host only link = loc.protocol + '//' + loc.host + link; } else { // if link is relative, it should be from full path, minus the file var dirpath = loc.pathname.substring(0, loc.pathname.lastindexof('/')-1); if (link.lastindexof('/') !== link.length-1) { link ...
Deploying a Plugin as an Extension - Archive of obsolete content
this feature is particularly useful for vendors who wish to deploy the plugin even if firefox is not currently installed, or who want to use the automatic extension update mechanism to update their plugin to a newer version.
Extension Etiquette - Archive of obsolete content
version numbering please follow the mozilla pattern: major version dot current incarnation dot security/bugfix release (like 1.0.7).
Hiding browser chrome - Archive of obsolete content
var prevfunc = xulbrowserwindow.hidechromeforlocation; xulbrowserwindow.hidechromeforlocation = function(alocation) { return (/* your test goes here */) || prevfunc.apply(xulbrowserwindow, [alocation]); } this works by saving a reference to the current implementation of the hidechromeforlocation() method, then replacing it with a new method that calls through to the previous implementation.
Jetpack Processes - Archive of obsolete content
note: the above statement is not currently true, as js-ctypes is now provided to jetpack processes as of bug 588563.
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
newbyteinputstream(getter_addrefs(rawstream),- (const char*)data, length); + nscomptr<nsistringinputstream> rawstream =+ do_createinstance(ns_stringinputstream_contractid, &rv);+ ns_ensure_success(rv, rv);++ rv = rawstream->setdata((const char*)data, length); ns_ensure_success(rv, rv); nsistringinputstream is not frozen (and thus, not available in the gecko sdk as currently published).
Multiple item extension packaging - Archive of obsolete content
there is currently no feature to prevent or warn the user when installing an older version of an extension.
Adding menus and submenus - Archive of obsolete content
for example, you could have a menuitem that tells you the current time and is updated every second.
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
the current version number can be hard-coded in the first run function, or you can use the add-on manager to dynamically get it.
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
document.getelementbyid("mymenu").docommand(); alternative: just hard-code what should happen if you know that the current version of the application will call { executesomething(); executesomethingelse();} then just do the same in your code.
Setting up an extension development environment - Archive of obsolete content
this particularly comes in handy for the use of all currently available firefox versions.
Supporting search suggestions in search plugins - Archive of obsolete content
this allows firefox to verify that the suggestions match the current search term.
Updating addons broken by private browsing changes - Archive of obsolete content
use {private: privatebrowsingutils.iswindowprivate(window)} to open a window that matches the current window's privacy status.
Add-ons - Archive of obsolete content
all of these documents currently assume, however, that you are developing your extension using xul and javascript only.
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
what are the browser percentages of your current user base, and what about your target user base (which may be different)?
Underscores in class and ID Names - Archive of obsolete content
recommendation because support is so inconsistent between current browsers as well as older releases, authors are strongly advised to avoid using underscores in class and id names.
MozOrientation - Archive of obsolete content
notes this event is only dispatched if an accelerometer is available on the current device.
Getting the page URL in NPAPI plugin - Archive of obsolete content
via dom from benjamin smedberg: the npapi gives you the ability to get access to the nsidomwindow object which contains the current plugin via the npnvdomelement enum passed to npn_getvalue.
JXON - Archive of obsolete content
const onewdoc = document.implementation.createdocument(snamespaceuri || null, squalifiedname || "", odocumenttype || null); loadobjtree(onewdoc, onewdoc, oobjtree); return onewdoc; }; const svalprop = "keyvalue", sattrprop = "keyattributes", sattrspref = "@", /* you can customize these values */ acache = [], risnull = /^\s*$/, risbool = /^(?:true|false)$/i; })(); note: the current implementation of const (constant statement) is not part of ecmascript 5.
List of Former Mozilla-Based Applications - Archive of obsolete content
der domain switched over to domain parking service ghostzilla browser archived version of ghostzilla site from 2005 homebase desktop operating environment for internet computers no longer available hp printer assistant printer utility hall of fame page mentions that this used an embedded version of mozilla at some point but i can't find reference to current status (may still be using mozilla code?) icebrowser java browser sdk uses mozilla rhino --eol'ed in 2009 (jin'sync) office app launcher download page last updated on 12/21/06 kylix compiler and integrated development environment borland discontinued this product.
Images, Tables, and Mysterious Gaps - Archive of obsolete content
should this property be adopted, then any browser supporting it could emulate traditional "shrinkwrap" behavior without risking other layout upset with the following rule: td {line-box-contain: font replaced;} /* proposed for css3 */ there are other possible fixes contained within the current css3 working drafts, such as line-height-policy.
Notes on HTML Reflow - Archive of obsolete content
currently, this is only used by the viewport frame to schedule a reflow to reflow all of the viewport's fixed-position frames.
Working with BFCache - Archive of obsolete content
q: when a user clicks a link that replaces the view in the current tab with a new page, what is the fate of the nsidomwindow supporting the view they click on?
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
the control currently reads plug-ins from your most current netscape 4.x and ie installations.
Bookmark Keywords - Archive of obsolete content
this will add a bookmark of the current page to the list of bookmarks.
Adding the structure - Archive of obsolete content
the status attribute is not part of the xul definition for the statusbarpanel element, but is used by our extension to store the current tinderbox state.
Finding the file to modify - Archive of obsolete content
in the dom inspector window, go to the file menu, select the inspect a window submenu, then select the mozilla browser window item (named after the page currently loaded in the browser).
Prerequisites - Archive of obsolete content
if you currently use mozilla, you should install a new copy of the software in a different location from the existing installation for the purposes of this demo.
Specifying the appearance - Archive of obsolete content
for this we have to first create four icons, one for each tinderbox state (none, success, test failed, and busted), then create a set of css rules that displays the icon corresponding to the current tinderbox state: statusbarpanel#tinderbox-status { list-style-image: url("chrome://navigator/content/tb-nostatus.png"); } statusbarpanel#tinderbox-status[status="success"] { list-style-image: url("chrome://navigator/content/tb-success.png"); } statusbarpanel#tinderbox-status[status="testfailed"] { list-style-image: url("chrome://navigator/content/tb-testfailed.png"); } statusbarpanel#tinderbox-status[status="busted"] { list-style-image: url("chrome://navigator/content/tb-busted...
Getting Started - Archive of obsolete content
mozilla currently comes with two skins, classic and modern.
DTrace - Archive of obsolete content
the dtrace probes currently built into the codebase may be enabled by default in the future, but for now you'll need to create a build with --enable-dtrace (on mac os x you also have to use at least the 10.5 sdk for --with-macos-sdk, unlike the common configuration that uses the 10.4 sdk).
Dehydra Frequently Asked Questions - Archive of obsolete content
currently dehydra does not provide the cfg functionality, this functionality is now provided by treehydra.
Download Manager improvements in Firefox 3 - Archive of obsolete content
nsidownload describes a file in the download queue; these files may currently be queued for download, actively being downloaded, or finished being downloaded.
Drag and drop events - Archive of obsolete content
these events are new in the current working draft of the html 5 specification.
Extension Frequently Asked Questions - Archive of obsolete content
they are currently written with mostly firefox in mind, but most if not all should easily translate to seamonkey, thunderbird or any of the other applications.
Documentation for BiDi Mozilla - Archive of obsolete content
nsibidikeyboard widget/public/nsibidikeyboard.idl widget/src/%platform%/nsbidikeyboard.cpp sets and queries the directionality of the current keyboard language.
Repackaging Firefox - Archive of obsolete content
currently that page mentions only firefox 1.5.x, but it supports firefox 2.
Style System Overview - Archive of obsolete content
resolvepseudostylecontextfor: for pseudo-elements (:first-letter, :before, etc.) resolvestylecontextfornonelement: skips rule matching and uses root rule node (text frame optimization) managing style contexts style context resolving functions will walk the rule processors in stylesetimpl::filerules, find the correct rule node, and find a current child of the parent (“sibling sharing”) or create a new child.
Firefox - Archive of obsolete content
note that this is an attempt at describing the current usage of these terms.
Firefox Sync - Archive of obsolete content
getting involved and status for information on the current development status of sync including how to get involved, see https://wiki.mozilla.org/services/sync.
GRE Registration - Archive of obsolete content
windows on windows, gre registration information is kept in the win32 registry under the hkey_local_machine/software/mozilla.org/gre and hkey_current_user/software/mozilla.org/gre keys.
GRE - Archive of obsolete content
this allows the embedder to specify what version(s) of gre are appropriate, and to specify any special features the gre must have (currently there are no special features defined).
Creating a Help Content Pack - Archive of obsolete content
nc:name is the name for the entry - it's what's currently displayed in the glossary as the entry's title.
Helper Apps (and a bit of Save As) - Archive of obsolete content
nsexternalapphandler::onstoprequest set a flag that we're done, then do whatever the user wants if the user has decided (save to disk and open in helper are the current options the user has).
generateCRMFRequest() - Archive of obsolete content
currently, this value is ignored.
Java in Firefox Extensions - Archive of obsolete content
the following approach is taken from the extension xquseme (note you must use the latest version, currently still in the sandbox, as prior versions only worked with liveconnect before java 6 update 11) which borrows some of the code of the java firefox extension in order to grant full privileges to java within a firefox extension, but it is easier to understand and doesn't require creation of a xpcom component.
Basics - Archive of obsolete content
blah(lengthstringfocusedstringtostringstringpopstringpushstringreversestringshiftstringsortstringsplicestringunshiftstring)this is some default text lengththe number of open tabsstring focusedthe current tab in your browserstring tostringstuffstring popstuffstring pushstuffstring reversestuffstring shiftstuffstring sortstuffstring splicestuffstring unshiftstuffstring onready()when the inherited document is fully loaded.
Me - Archive of obsolete content
ArchiveMozillaJetpackMetaMe
the namespace currently lives in the future and must be imported before it is used: jetpack.future.import("me"); methods onfirstrun(funcfunction)jetpack.me.onfirstrun() allows jetpacks to be notified after they are successfully installed.
Settings - Archive of obsolete content
because it is still under development, the api currently lives in the future and must be imported before it is used: specifying settings in a manifest to specify its settings, a jetpack defines a variable named manifest in its global namespace before it imports the settings api.
Settings - Archive of obsolete content
because it is still under development, the api currently lives in the future and must be imported before it is used: jetpack.future.import("storage.settings"); specifying settings in a manifest to specify its settings, a jetpack defines a variable named manifest in its global namespace before it imports the settings api.
Clipboard Test - Archive of obsolete content
this api currently lives in the future and must be imported for use.
Selection - Archive of obsolete content
this api currently lives in the future and must be imported for use: jetpack.future.import("selection"); getting and setting the selection the current version of jetpack.selection includes these formats: .text and .html getting the selection the following is an example of getting the selection from the user.
Selection - Archive of obsolete content
this api currently lives in the future and must be imported for use: jetpack.future.import("selection"); getting and setting the selection the current version of jetpack.selection includes these formats: .text and .html getting the selection the following is an example of getting the selection from the user.
slideBar - Archive of obsolete content
when a slidebar feature is selected, its contents will be revealed from behind the current web page.
Selection - Archive of obsolete content
ArchiveMozillaJetpackdocsUISelection
this api currently lives in the future and must be imported for use: jetpack.future.import("selection"); getting and setting the selection the current version of jetpack.selection includes these formats: .text and .html getting the selection the following is an example of getting the selection from the user.
statusBar - Archive of obsolete content
its acutally not implemented in the current version.
Monitoring downloads - Archive of obsolete content
that code looks like this: logtransfercompleted: function(adownload) { var endtime = new date(); // current time is the end time // issue the replace sqlite command to update the record.
Mozilla Application Framework - Archive of obsolete content
xulmaker a gui builder currently under development that lets you drag-and-drop widgets onto a grid to build your user interface.
NSC_SetPIN - Archive of obsolete content
description nsc_setpin modifies the pin of user that is currently logged in.
How to Write and Land Nanojit Patches - Archive of obsolete content
then find the corresponding bug(s) and commit the (hopefully already-reviewed!) tr/tm portion of the patch(es) on top of your current, un-pushed tip.
Plug-n-Hack - Archive of obsolete content
the current protocol and firefox implementation are released under the mozilla public license 2.0 which means it can be incorporated in commercial tools without charge.
BundleLibrary - Archive of obsolete content
we are working on a new bundle library compatible with the current prism version and welcome any contributions from the developer community.
Bundles - Archive of obsolete content
the bundle can hold additional resources currently limited to: application ini settings application icon script for the application chrome, not the web content installing a bundle when prism opens a webapp bundle it will unpack it into the webapps/{webapp-id} folder.
Configuration - Archive of obsolete content
currently support only on windows in conjunction with the trayicon, causes the application to open minimized to the system tray: yes or no.
Installer - Archive of obsolete content
current windows and mac installs automatically associate *.webapp with prism.
Scripting - Archive of obsolete content
currently, the webapp script also has access to full xpcom functionality, just like a firefox extension.
Priority Content - Archive of obsolete content
if there is devedge content you think should be migrated that isn't currently on this list, feel free to add it.
Remotely debugging Firefox for Metro - Archive of obsolete content
the toolbox will open in its own window, attached to the firefox for metro tab that's currently hosting mozilla.org: the toolbox, and the tools it hosts (including the console, debugger, style editor, profiler, etc.), work in just the same way as they do when attached to local content.
Space Manager High Level Design - Archive of obsolete content
the general algorithm in nsblockreflowstate::flowandplacefloat is: the region that the float currently occupies is recorded.
Supporting per-window private browsing - Archive of obsolete content
firefox 20 introduced per-window private browsing mode, in which private user data is stored and accessed concurrently with public user data from another window.
Running Tamarin acceptance tests - Archive of obsolete content
$ cd tamarin-redux/test/acceptance $ export asc=/users/build/hg/tamarin-redux/utils/asc.jar $ export builtinabc=/users/build/hg/tamarin-redux/generated/builtin.abc $ export shellabc=/users/build/hg/tamarin-redux/generated/shell_toplevel.abc $ export avm=/users/build/hg/tamarin-redux/objdir-release/shell/avmshell $ python runtests.py tamarin tests started: 2010-09-28 10:37:06.410676 current configuration: x64-mac-tvm-release avm version: 5260:6d1899261bac executing 2532 tests against vm: /users/build/hg/builds/5260-6d1899261bac/mac/avmshell_64 2532 running abcasm/abs_helper.as skipping...
Tamarin Releases - Archive of obsolete content
upcoming release name(s)release datelinks tc next~ april 2009roadmap current release namerelease datelinks tc "mar 2009" a5c9ed928c9603/27/09tamarin-devel announcement prior release name(s)release datelinks tc "feb 2009" a5c9ed928c9602/19/09tamarin-devel announcement tamarin-central rev 703:2cee46be9ce0 12/02/08tamarin-devel announcement ...
Tamarin Roadmap - Archive of obsolete content
the roadmap is a living document representing current best thinking and is subject to change.
Tamarin mercurial commit hook - Archive of obsolete content
when a violation is found the following will be displayed: > hg commit -m "change with a tab" tab(s) found in test/test.txt for rev 1458 (change 53543674b8e6): @@ -65,4 +65,6 @@ +# tab here ^ (n)o, (y)es, (a)llow tabs for current file are you sure you want to commit this change?
The new nsString class implementation (1999) - Archive of obsolete content
the deficiencies of the current implementation are: class based -- making it unsuitable for cross-dll usage due to fragility little intrinsic i18n support few efficiencies, notably a lack of support for narrow (1-byte) character strings no support for external memory management policy lack of xpcom interface notable features of the new nsstrimpl implementation are: intrinsic support for 1 and 2 byte character widths p...
TraceVis - Archive of obsolete content
cd js/src autoconf213 mkdir opt-tracevis cd opt-tracevis ../configure --enable-tracevis make -j2 the resulting binary will be at dist/bin/js relative to the current directory.
Using cross commit - Archive of obsolete content
you can list the files/directories you want it to commit on the command line or leave them out and let it recursively troll the current directory.
Venkman Internals - Archive of obsolete content
if the file is not currently loaded, the js engine doesn't know anything about the file.
Using Breakpoints in Venkman - Archive of obsolete content
hard breakpoints can only exist in the context of a function currently "live" in the browser.
Binding Attachment and Detachment - Archive of obsolete content
when a binding is attached using the dom, it inherits from the current most derived binding that may already be attached to the element.
Binding Implementations - Archive of obsolete content
the following is currently not implemented in mozilla, it seems.
XBL - Archive of obsolete content
w3c sxbl (currently a working draft, 2005) stands for svg's xml binding language.
Unix stub installer - Archive of obsolete content
finally add a call to generate the xpi at package time by adding a makexpifile("<component>"); call at: <http://lxr.mozilla.org/seamonkey/sou.../makeall.pl#75> you can test it by changing your current working directory to mozilla/xpinstall/packager/unix and running "perl deliver.pl" on the shell prompt.
Windows stub installer - Archive of obsolete content
finally add <component> to the component list array @gcomponentlist at: <http://lxr.mozilla.org/seamonkey/sou...makeall.pl#125> you can test it by changing your current working directory to mozilla/xpinstall/wizard/windows/builder and running "perl build.pl" on the shell prompt.
Install Wizards (aka: Stub Installers) - Archive of obsolete content
see bundles for the current documentation.
dirGetParent - Archive of obsolete content
dirgetparent returns an object representing the parent directory of the current directory or file.
getFolder - Archive of obsolete content
the value of foldername must be one of the following (info is based on mozilla 1.7 stable branch, might also work in other versions): "chrome" "components" "current user" "defaults" "file:///" "os drive" "plugins" "preferences" "profile" "program" "temporary" "mac apple menu" "mac control panel" "mac desktop" "mac documents" "mac extension" "mac fonts" "mac shutdown" "mac startu...
logComment - Archive of obsolete content
respectively, these directories correspond to the "program" and "current user" keywords for the getfolder method.
getValue - Archive of obsolete content
getvalue netscape 6 and mozilla do not currently support this method.
setRootKey - Archive of obsolete content
the values you can use are: hkey_classes_root hkey_current_user hkey_local_machine hkey_users example to use the hkey_users section, use these statements: winreg = getwinregistry(); winreg.setrootkey(winreg.hkey_users); ...
setValue - Archive of obsolete content
setvalue netscape 6 and mozilla do not currently support this method.
Learn XPI Installer Scripting by Example - Archive of obsolete content
respectively, these directories correspond to the "program" and "current user" keywords for the getfolder method.
afterselected - Archive of obsolete content
« xul reference home afterselected type: boolean this is set to true if the tab is immediately after the currently selected tab.
beforeselected - Archive of obsolete content
« xul reference home beforeselected type: boolean this is set to true if the tab is immediately before the currently selected tab.
buttons - Archive of obsolete content
the default setting of browser.preferences.instantapply currently is true on linux and mac os and false on windows (which however might or might not change soon, see bug 738797 and bug 1037225).
chromemargin - Archive of obsolete content
this value may be -1 to use the default margin for that side on the current platform, 0 to have no system border (that is, to extend the client area to the edge of the window), or a value greater than zero to indicate how much less than the default default width you wish the margin on that side to be.
color - Archive of obsolete content
« xul reference home color type: color string the currently selected color.
curpos - Archive of obsolete content
« xul reference home curpos type: integer the current position of the scrollbar, which ranges from 0 to the value of the maxpos attribute.
disablechrome - Archive of obsolete content
this is used to hide chrome when showing in-browser ui such as the about:addons page, and causes the toolbars to be hidden, with only the tab strip (and, if currently displayed, the add-on bar) left showing.
noautofocus - Archive of obsolete content
« xul reference home noautofocus type: boolean if false, the default value, the currently focused element will be unfocused whenever the popup is opened or closed.
onbeforeaccept - Archive of obsolete content
returning false doesn't currently prevent the dialog from closing, but does prevent saving (bug 474527).
onpopuphidden - Archive of obsolete content
you can test for the current popup actually being hidden with: <menupopup id="top" onpopuphidden="if(this.state != 'open'){console.log('the onpopuphidden method of id=top was called.');};" > ...
pagestep - Archive of obsolete content
« xul reference home pagestep type: integer the index of the current page.
pending - Archive of obsolete content
« xul reference home pending type: boolean this attribute is set to true if the tab is currently in the process of being restored by the session store service.
prefpane.selected - Archive of obsolete content
« xul reference home selected type: boolean this attribute will be set to true for the currently selected prefpane.
selectedIndex - Archive of obsolete content
« xul reference home selectedindex type: integer gets and sets the index of the currently selected panel.
smoothscroll - Archive of obsolete content
currently, smooth scrolling supports horizontal arrowscrollboxes only.
tabmodalPromptShowing - Archive of obsolete content
« xul reference home tabmodalpromptshowing type: integer the number of tab modal prompts currently attached to the current tab.
treecol.type - Archive of obsolete content
here is an example css style using the current theme's checkboxes: treechildren::-moz-tree-checkbox { /* unchecked checkbox treecells.
unread - Archive of obsolete content
« xul reference home unread type: boolean this attribute is set to true if the tab is unread; that is, either it has not yet been selected during the current session, or has changed since the last time it was selected.
userAction - Archive of obsolete content
« xul reference home useraction type: one of the values below this attribute will be set to the action the user is currently performing.
visuallyselected - Archive of obsolete content
if your code needs to apply some styling to the currently selected tab, this is the attribute you should use from firefox 40 onwards.
Attribute (XUL) - Archive of obsolete content
belcancel buttonlabeldisclosure buttonlabelextra1 buttonlabelextra2 buttonlabelhelp buttonorient buttonpack buttons checked checkstate clicktoscroll class closebutton closemenu coalesceduplicatearcs collapse collapsed color cols command commandupdater completedefaultindex container containment contentcontextmenu contenttooltip context contextmenu control crop curpos current currentset customindex customizable cycler datasources decimalplaces default defaultbutton defaultset description dir disableautocomplete disableautoselect disableclose disabled disablehistory disablekeynavigation disablesecurity dlgtype dragging editable editortype element empty emptytext deprecated since gecko 2 enablecolumndrag enablehistory equalsize eventnode e...
command - Archive of obsolete content
ArchiveMozillaXULEventscommand
currently only set when a command event is redirected though use of the command attribute.
Accessing Files - Archive of obsolete content
working the current working directory.
Getting File Information - Archive of obsolete content
this may be useful to truncate a file, however, setting the file size will also increase the size of a file if the value is larger than the current size of the file.
swapDocShells - Archive of obsolete content
« xul reference home swapdocshells( otherbrowser ) return type: no return value swaps the content, history and current state of this browser with another browser.
appendCustomToolbar - Archive of obsolete content
« xul reference home appendcustomtoolbar( name, currentset ) firefox only return type: element adds a custom toolbar to the toolbox with the given name.
checkAdjacentElement - Archive of obsolete content
« xul reference home checkadjacentelement( dir ) return type: no return value deselects the currently selected radio button in the group and selects the one adjacent to it.
ensureElementIsVisible - Archive of obsolete content
« xul reference home ensureelementisvisible( element ) return type: no return value if the specified element is not currently visible to the user, the displayed items are scrolled so that it is.
ensureIndexIsVisible - Archive of obsolete content
« xul reference home ensureindexisvisible( index ) return type: no return value if the item at the specified index is not currently visible to the user the displayed items are scrolled so that it is.
ensureSelectedElementIsVisible - Archive of obsolete content
« xul reference home ensureselectedelementisvisible() return type: no return value if the currently selected element in the list box is not currently visible to the user, the list box view is scrolled so that it is.
getIcon - Archive of obsolete content
ArchiveMozillaXULMethodgetIcon
if atab is null, the current tab's icon is returned.
getNumberOfVisibleRows - Archive of obsolete content
« xul reference home getnumberofvisiblerows() return type: integer returns the number of rows that are currently visible to the user.
getResultCount - Archive of obsolete content
« xul reference home getresultcount( session ) returns the number of results, holded by the current session.
goTo - Archive of obsolete content
ArchiveMozillaXULMethodgoTo
« xul reference home goto( pageid ) return type: no return value this method is used to change which page is currently displayed, specified by the pageid argument.
loadTabs - Archive of obsolete content
if loadinbackground is true, the tabs are loaded in the background, and if replace is true, the currently displayed tabs are replaced with the specified uris instead of adding new tabs.
loadURIWithFlags - Archive of obsolete content
load_flags_replace_history: replace the current url in the session history with a new one.
moveByOffset - Archive of obsolete content
if isselectingrange is also true, then the new item is selected in addition to any currently selected items.
removeNotification - Archive of obsolete content
« xul reference home removenotification( item ) return type: element remove a notification, displaying the next one if the removed item is the current one.
selectItem - Archive of obsolete content
« xul reference home selectitem( item ) return type: no return value deselects all of the currently selected items and selects the given item.
setIcon - Archive of obsolete content
ArchiveMozillaXULMethodsetIcon
see geticon to get the current icon.
sizeTo - Archive of obsolete content
ArchiveMozillaXULMethodsizeTo
« xul reference home sizeto( width, height ) return type: no return value changes the current size of the popup to the new width and height.
stop - Archive of obsolete content
ArchiveMozillaXULMethodstop
« xul reference home stop() return type: no return value equivalent to pressing the stop button, this method stops the currently loading document.
stopEditing - Archive of obsolete content
« xul reference home stopediting( shouldaccept ) return type: no return value stops editing the cell currently being edited.
Methods - Archive of obsolete content
vertselection loadgroup loadonetab loadtabs loaduri loaduriwithflags makeeditable movebyoffset moveto movetoalertposition onsearchcomplete ontextentered ontextreverted openpopup openpopupatscreen opensubdialog openwindow preferenceforelement reload reloadalltabs reloadtab reloadwithflags removeallitems removeallnotifications removealltabsbut removecurrentnotification removecurrenttab removeitemat removeitemfromselection removenotification removeprogresslistener removesession removetab removetabsprogresslistener removetransientnotifications replacegroup reset rewind scrollbyindex scrollbypixels scrolltoindex select selectall selectitem selectitemrange selecttabatindex setselectionrange showpane showpopu...
Floating Panels - Archive of obsolete content
currently, only the value normal is supported, which creates a default titlebar.
MenuItems - Archive of obsolete content
to indicate the current state of the toolbar, a checkbox would be displayed next to the menu item label.
Panels - Archive of obsolete content
focus in panels elements within panels may be focused with the mouse, and the currently focused element may be adjusted by pressing the tab key.
PopupEvents - Archive of obsolete content
in this example, a label within a panel is initialized with the current time.
PopupKeys - Archive of obsolete content
enter/return activate the currently highlighted item.
color - Archive of obsolete content
ArchiveMozillaXULPropertycolor
« xul reference color type: color string the currently selected color.
customToolbarCount - Archive of obsolete content
« xul reference customtoolbarcount firefox only type: integer the number of custom toolbars currently within the toolbox.
date - Archive of obsolete content
ArchiveMozillaXULPropertydate
« xul reference date type: integer the currently selected date of the month from 1 to 31.
dateValue - Archive of obsolete content
« xul reference datevalue type: date the date that is currently entered or selected in the datepicker as a date object.
datepicker.value - Archive of obsolete content
« xul reference value type: string the currently selected date in the form yyyy-mm-dd.
deck.selectedPanel - Archive of obsolete content
selectedpanel type: element holds a reference to the currently selected panel within a deck element.
description - Archive of obsolete content
« xul reference description type: string set to the description of the currently selected menuitem.
editingColumn - Archive of obsolete content
« xul reference editingcolumn type: nsitreecolumn the column of the tree cell currently being edited, or null if there is no cell being edited.
editingRow - Archive of obsolete content
« xul reference editingrow type: integer the row index of the tree cell currently being edited, or -1 if there is no cell currently being edited.
focusedItem - Archive of obsolete content
« xul reference focuseditem type: radio element holds the currently focused item in the radiogroup, which may or may not be the same as the selected item.
hour - Archive of obsolete content
ArchiveMozillaXULPropertyhour
« xul reference hour type: integer the currently selected hour from 0 to 23.
menulist.image - Archive of obsolete content
« xul reference image type: image url the image associated with the currently selected item.
minute - Archive of obsolete content
« xul reference minute type: integer the currently selected minute from 0 to 59.
month - Archive of obsolete content
ArchiveMozillaXULPropertymonth
« xul reference month type: integer the currently selected month from 0 to 11.
pageIndex - Archive of obsolete content
« xul reference pageindex type: integer this property returns the index of the currently selected page.
second - Archive of obsolete content
« xul reference second type: integer the currently selected second from 0 to 59.
selectedBrowser - Archive of obsolete content
« xul reference selectedbrowser type: browser element this read-only property returns the currently displayed browser element.
selectedCount - Archive of obsolete content
« xul reference selectedcount type: integer returns the number of items that are currently selected.
selectedIndex - Archive of obsolete content
« xul reference selectedindex type: integer returns the index of the currently selected item.
selectedPanel - Archive of obsolete content
« xul reference selectedpanel type: element holds a reference to the currently selected panel within a <tabbox> element.
smoothScroll - Archive of obsolete content
currently, smooth scrolling supports horizontal arrowscrollboxes only.
timepicker.value - Archive of obsolete content
« xul reference value type: string the currently entered time of the form hh:mm:ss.
valueNumber - Archive of obsolete content
« xul reference valuenumber type: number in contrast to the value property which holds a string representation, the valuenumber property is a number containing the current value of the number box.
visibleTabs - Archive of obsolete content
this lets you determine which tabs are visible in the current tab set.
year - Archive of obsolete content
ArchiveMozillaXULPropertyyear
« xul reference year type: integer the currently selected year from 1 to 9999.
Property - Archive of obsolete content
ngoforward canrewind checked checkstate child children classname clickselectsall clientheight clientwidth collapsed color columns command commandmanager completedefaultindex container contentdocument contentprincipal contenttitle contentview contentvieweredit contentviewerfile contentwindow contextmenu control controller controllers crop current currentindex currentitem currentnotification currentpage currentpane currentset currenturi customtoolbarcount database datasources date dateleadingzero datevalue decimalplaces decimalsymbol defaultbutton defaultvalue description dir disableautocomplete disableautocomplete disableautoselect disabled disablekeynavigation dlgtype docshell documen...
RDF Query Syntax - Archive of obsolete content
actually, in the current template implementation, the above description isn't quite correct.
SQLite Templates - Archive of obsolete content
as with xml datasources, the ref attribute isn't currently used for sqlite sources, so you should just set the ref attribute to a dummy value; '*' is typically used.
Simple Example - Archive of obsolete content
first, any known variables are filled into the member statement for the current result.
Simple Query Syntax - Archive of obsolete content
this means look up the value of the predicate http://purl.org/dc/elements/1.1/title' pointing out of the current result.
Sorting Results - Archive of obsolete content
this also has the advantage that the dates will be displayed according to the user's current locale (meaning that the date is formatted so as to be suitable for the user's language).
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.
The Joy of XUL - Archive of obsolete content
considering the broad range of platforms that currently support mozilla, this may be one of the most compelling features of xul as a technology for building applications.
Code Samples - Archive of obsolete content
il:addressbook" const uri = "chrome://messenger/content/addressbo...ddressbook.xul" irc chat const name = "irc:chatzilla" const uri = "chrome://chatzilla/content/" calendar const name = "calendarmainwindow" const uri = "chrome://calendar/content/" * at the time of writing, sunbird's passwords window is broken close the current window to close the window containing the button, possibly leaving other windows open: close() exit the application to exit the application, first closing all its windows: components .classes['@mozilla.org/toolkit/app-startup;1'] .getservice(components.interfaces.nsiappstartup) .quit(components.interfaces.nsiappstartup.eattemptquit) ...
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
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.
Adding more elements - Archive of obsolete content
a groupbox has the advantage that it draws a box with a nice beveled look, suitable for the current theme.
Content Panels - Archive of obsolete content
the tabbrowser automatically sets the type attribute of whichever browser is currently visible to content-primary, which means that you will always be able to access the currently visible content in this way.
Creating a Skin - Archive of obsolete content
a simple skin the image below shows the current find files dialog.
Custom Tree Views - Archive of obsolete content
in the 10,000 row example above, getcelltext() is only called for the cells that are currently displayed.
Install Scripts - Archive of obsolete content
the component registry mozilla maintains a file which is a registry of all the components that are currently installed.
More Tree Features - Archive of obsolete content
for a content tree view, this will set the open attribute to reflect the current state.
Numeric Controls - Archive of obsolete content
<datepicker value="2004-03-24"/> <timepicker value="15:30:00"/> the value attribute is used to set the default value; if this attribute is omitted, the field will be initially set to the current date or time.
Persistent Data - Archive of obsolete content
it doesn't really make sense to save the current tab state.
Progress Meters - Archive of obsolete content
value the current value of the progress meter.
Scroll Bars - Archive of obsolete content
curpos this indicates the current position of the scroll bar thumb (the box that you can slide back and forth.) the value ranges from 0 to the value of maxpos.
Scrolling Menus - Archive of obsolete content
note that the exact behavior of the scrolling will depend on the current theme.
Skinning XUL Files by Hand - Archive of obsolete content
mozilla's current global skin defines this basic behavior for several classes of button.
Stacks and Decks - Archive of obsolete content
it is also useful as mozilla doesn't currently support css text shadowing.
Tree View Details - Archive of obsolete content
note that it should return the current number of visible rows, not the total.
Using Spacers - Archive of obsolete content
first, let's take a look at what happens when the current dialog is resized.
XPCOM Interfaces - Archive of obsolete content
it allows you to add bookmarks to the user's current bookmark list.
XUL Structure - Archive of obsolete content
remember that remote xul will have significant restrictions on what it can do, and does not work with current firefox versions!
Using Visual Studio as your XUL IDE - Archive of obsolete content
all va options can be found at: hkey_current_user\software\whole tomato\visual assist x\ find the folder that represents your visual studio version ((vanet8, vanet9, etc.) and add your extensions to the corresponding registry entries extjs and extxml.
XUL Accesskey FAQ and Policies - Archive of obsolete content
bug 143065 - scope of accesskeys is not limited to the current tab panel.
Accessibility/XUL Accessibility Reference - Archive of obsolete content
column see grid columns see grid command see keyboard shortcut tutorial commandset see keyboard shortcut tutorial deck only the currently selected deck layer can be focused.
The Implementation of the Application Object Model - Archive of obsolete content
in our current architecture, we have a set of content nodes obtained from any number of data sources.
dialog - Archive of obsolete content
the default setting of browser.preferences.instantapply currently is true on linux and mac os and false on windows (which however might or might not change soon, see bug 738797 and bug 1037225).
editor - Archive of obsolete content
or = document.getelementbyid("myeditor"); editor.contentdocument.designmode = 'on'; } </script> <editor id="myeditor" editortype="html" src="about:blank" flex="1" type="content-primary"/> once editable, the document can have special formatting and other html pieces added to it using the document.execcommand method: var editor = document.getelementbyid("myeditor"); // toggle bold for the current selection editor.contentdocument.execcommand("bold", false, null); see the midas overview for more command strings.
iframe - Archive of obsolete content
currently, xul iframes running in remote processes are not supported.
menupopup - Archive of obsolete content
sizeto( width, height ) return type: no return value changes the current size of the popup to the new width and height.
scrollbar - Archive of obsolete content
attributes curpos, increment, maxpos, pageincrement examples <scrollbar curpos="5" maxpos="50"/> attributes curpos type: integer the current position of the scrollbar, which ranges from 0 to the value of the maxpos attribute.
tooltip - Archive of obsolete content
sizeto( width, height ) return type: no return value changes the current size of the popup to the new width and height.
XULRunner 1.9.1 Release Notes - Archive of obsolete content
current version the current version of xulrunner is 1.9.1.19, matching firefox 3.5.19 detailed release notes can be found here.
XULRunner 1.9.2 Release Notes - Archive of obsolete content
current version the current version of xulrunner 1.9.2 is 3.6.26, matching firefox 3.6.26 detailed release notes can be found here.
XULRunner 1.9 Release Notes - Archive of obsolete content
current version the current version of xulrunner is 1.9.0.17, matching firefox 3.0.17 detailed release notes can be found here.
XULRunner 2.0 Release Notes - Archive of obsolete content
current version the current version of xulrunner 2.0 is 2.0, matching firefox 4.0 detailed release notes can be found here.
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
in this case, we are building both xulrunner and mccoy and placing the build in the directory mccoybase, located at the same level as the current (i.e.
Deploying XULRunner - Archive of obsolete content
current xulrunner is a stable developer preview release.
Dialogs in XULRunner - Archive of obsolete content
fp = components.classes["@mozilla.org/filepicker;1"].createinstance(nsifilepicker); fp.init(window, "open file", nsifilepicker.modeopen); fp.appendfilters(nsifilepicker.filtertext | nsifilepicker.filterall); var res = fp.show(); if (res == nsifilepicker.returnok) { var thefile = fp.file; alert(thefile.leafname); // --- do something with the file here --- } } xul does not currently support any other common dialogs.
ant script to assemble an extension - Archive of obsolete content
this ant script helps to package an extension <?xml version="1.0"?> this build file was written by régis décamps <decamps@users.sf.net> <project name="blogmark" default="createxpi"> <property name="version" value="1.3-rc1"/> <property name="description" value="new context-menu item to add the current page in your blogmarks"/> xpi file is created after "chrome/blogmark.jar" is created, which is then stuffed into "blogmark.xpi" <target name="createxpi" depends="createjar" description="assemble the final build blogmark.xpi"> <zip destfile="blogmark-${version}.xpi"> <zipfileset dir="." includes="chrome/blogmark.jar" /> <zipfiles...
Mozilla.dev.apps.firefox-2006-10-06 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - september 30 - october 6, 2006 announcements vista compatibility lab mike schroepfer announced the current work being done testing mozilla products with vista.
2006-11-10 - Archive of obsolete content
currently there is a work-around extension available at bug 357101 to temporarily solve this problem.
2006-11-22 - Archive of obsolete content
idispatch support for jaws scripting needed aaron leventhal stated that currently there is no idispatch support for iaccessible's in mozilla.
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - september 30 - october 6, 2006 announcements vista compatibility lab mike schroepfer announced the current work being done testing mozilla products with vista.
2006-11-10 - Archive of obsolete content
discussions site-specific search using our search box a discussion surrounding implementing a way to search a current page with the page's embedded search component and how to make this efficient and usable.
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - september 22-29, 2006 announcements development for thunderjudge extension is put on hold the author of the thunderjudge extension is currently putting the development of the extension on hold due to several issues (more details available at the website).
2006-10-13 - Archive of obsolete content
currently, the only recommendation is to use a server-side solution.
2006-10-06 - Archive of obsolete content
announcements new svg build dependency coming on october 2nd t rowley announced that: soon svg on the trunk will be switching to use thebes directly (instead of the current choice of direct cairo or punching a hole through thebes to cairo).
2006-10-27 - Archive of obsolete content
urk stated that currently fedora has their release 6 directory locked out with access forbidden via web and ftp while the mirrors are mirroring for the release tuesday.
2006-11-24 - Archive of obsolete content
approval queue for fx 2.0.0.1 closing closing the approval queue for firefox 2.0.0.1 discussions quality of localized builds and process requirements quality of localized builds and process requirements the translate toolkit mdnto po: its current state and how to use it discussion on clarifications on translate toolkit to avoid confusion.
2006-10-27 - Archive of obsolete content
cross-domain testing - someone is suggesting that there needs to be some way of running cross-domain tests (security, web compat, etc), and is wondering if it's possible with the current test http server?
2006-09-29 - Archive of obsolete content
discussions file: vs resource: vs chrome: from a security point of view boris zbarsky gives a summary the current setup for checkloaduri (which type of security principal can load what) and asks for comments about whether that is the desired behaviour.
2006-11-24 - Archive of obsolete content
see bigid 360789 new linebreaker interface new linebreaker current interface is unworkable when it comes to using thai and uax#14.
2006-09-06 - Archive of obsolete content
how to build xpcom component on mac os x a tutorial on how to build xpcom component on mac os x firefox crashes when calling a function provided by a .so library a solution to the problem loading a shared library when using xpcom firefoxes crashes while getting url in xpcom solutions to resolve the problem of the firefox crash when trying to get the path and the prepath of the url of the current page in xpcom meetings none during this week.
2006-10-27 - Archive of obsolete content
discussions evalinsandbox and xmlhttprequest a discussion about writing something that calls a function defined by the page that the user is currently on chrome files and last modified date ways to retrieve the last modified date of a chrome file that may be in a jar or on the file system.
NPAPI plugin developer guide - Archive of obsolete content
g a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading files to an ftp server sending mail memory allocating and freeing memory mac os flushing memory (mac os only) version, ui, and status information displaying a status line message getting agent information getting the current version finding out if a feature exists reloading a plug-in ...
NPFullPrint - Archive of obsolete content
printone not currently in use.
NPN_GetAuthenticationInfo - Archive of obsolete content
t port, const char *scheme, const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen); parameters this function has the following parameters: instance pointer to the current plug-in instance protocol protocol name (uri scheme) host host name port port number scheme http authentication scheme name realm http authentication realm username out parameter.
NPN_GetURLNotify - Archive of obsolete content
syntax #include <npapi.h> nperror npn_geturlnotify(npp instance, const char* url, const char* target, void* notifydata); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPN_GetValueForURL - Archive of obsolete content
ntax #include <npapi.h> typedef enum { npnurlvcookie = 501, npnurlvproxy } npnurlvariable; nperror npn_getvalueforurl(npp instance, npnurlvariable variable, const char *url, char **value, uint32_t *len); parameters this function has the following parameters: instance pointer to the current plug-in instance.
NPN_InvalidateRegion - Archive of obsolete content
syntax #include <npapi.h> void npn_invalidateregion(npp instance, npregion invalidregion); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPN NewStream - Archive of obsolete content
syntax #include <npapi.h> nperror npn_newstream(npp instance, npmimetype type, const char* target, npstream** stream); parameters the function has the following parameters: instance pointer to current plug-in instance.
NPN_PluginThreadAsyncCall - Archive of obsolete content
syntax #include <npapi.h> void npn_pluginthreadasynccall(npp plugin, void (*func)(void *), void *userdata); parameters the function has the following parameters: plugin pointer to the current plug-in instance.
NPN_PostURLNotify - Archive of obsolete content
> nperror npn_posturlnotify(npp instance, const char* url, const char* target, uint32 len, const char* buf, npbool file, void* notifydata); parameters the function has the following parameters: instance current plug-in instance, specified by the plug-in.
NPN_ReloadPlugins - Archive of obsolete content
description npn_reloadplugins() reads the plugins directory for the current platform and reinstalls all of the plug-ins it finds there.
NPN_SetValueForURL - Archive of obsolete content
#include <npapi.h> typedef enum { npnurlvcookie = 501, npnurlvproxy } npnurlvariable; nperror npn_setvalueforurl(npp instance, npnurlvariable variable, const char *url, const char *value, uint32_t len); parameters this function has the following parameters: instance pointer to the current plug-in instance.
NPN_Status - Archive of obsolete content
syntax #include <npapi.h> void npn_status(npp instance, const char* message); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPN_UserAgent - Archive of obsolete content
syntax #include <npapi.h> const char* npn_useragent(npp instance); parameters the function has the following parameter: instance pointer to the current plug-in instance.
NPN_Version - Archive of obsolete content
for more information and an example, see getting the current version.
NPN_Write - Archive of obsolete content
syntax #include <npapi.h> int32 npn_write(npp instance, npstream* stream, int32 len, void* buf); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPP_New - Archive of obsolete content
if instance data was saved from a previous instance of the plug-in by the npp_destroy function, it is returned in the saved parameter for the current instance to use.
NPP_NewStream - Archive of obsolete content
syntax #include <npapi.h> nperror npp_newstream(npp instance, npmimetype type, npstream* stream, npbool seekable, uint16* stype); parameters the function has the following parameters: instance pointer to current plug-in instance.
NPP_Print - Archive of obsolete content
syntax #include <npapi.h> void npp_print(npp instance, npprint* printinfo); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPP_SetWindow - Archive of obsolete content
syntax #include <npapi.h> nperror npp_setwindow(npp instance, npwindow *window); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPP_URLNotify - Archive of obsolete content
syntax #include <npapi.h> void npp_urlnotify(npp instance, const char* url, npreason reason, void* notifydata); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NP_GetValue - Archive of obsolete content
syntax #include <npapi.h> nperror np_getvalue(void *instance, nppvariable variable, void *value); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NP_Port - Archive of obsolete content
save the current port settings before changing the port for drawing.
Supporting private browsing in plugins - Archive of obsolete content
detecting private browsing mode plug-ins can detect whether or not private browsing mode is in effect by using the npn_getvalue() function to check the current value of the npnvprivatemodebool variable.
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
it's recommended that you have a look at the gecko plugin api reference since this document will include information that assumes that you are already familiar with the way that plugins are currently hosted as well as the apis.
.htaccess ( hypertext access ) - Archive of obsolete content
the .htaccess file configures the current directory with things like password protection, url rewrites & redirects, and more.
Introduction to Public-Key Cryptography - Archive of obsolete content
red hat software uses the following procedure for forming and verifying a certificate chain, starting with the certificate being presented for authentication: the certificate validity period is checked against the current time provided by the verifier's system clock.
The Basics of Web Services - Archive of obsolete content
summary: a current hot topic on the web right now are web services.
Theme changes in Firefox 4 - Archive of obsolete content
improving your appearance on windows the new -moz-windows-theme media query lets you determine which windows theme is currently in use; this lets you make your theme adapt to work well with the windows environment as it's configured.
Firefox Developer Tools - Archive of obsolete content
these are articles related to the firefox developer tools, which are no longer current.
Using SSH to connect to CVS - Archive of obsolete content
first ssh-agent is called and its output is evaluated in the current environment.
Developing cross-browser and cross-platform pages - Archive of obsolete content
it requires from the web author to have knowledge of the capabilities of all current browsers that may visit the page and then to code appropriately for these.
Using Web Standards in your Web Pages - Archive of obsolete content
the problem lies with designers and developers chained to the browser-quirk-oriented markup of the 1990s-often because they don't realize it is possible to support current standards while accommodating old browsers." -web standards project this article provides an overview of the process for upgrading the content of your web pages to conform to the world wide web consortium (w3c) web standards.
Using workers in extensions - Archive of obsolete content
its job is to update the ticker information that's currently displayed in the status bar, as well as to update the tooltip that appears while the mouse cursor is hovering over the ticker.
-moz-border-bottom-colors - Archive of obsolete content
formal syntax <color>+ | nonewhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-moz-border-left-colors - Archive of obsolete content
formal syntax <color>+ | nonewhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-moz-border-right-colors - Archive of obsolete content
formal syntax <color>+ | nonewhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-moz-border-top-colors - Archive of obsolete content
formal syntax <color>+ | nonewhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-3dlight-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-arrow-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-base-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-darkshadow-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-face-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-highlight-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-shadow-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-track-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
:-moz-system-metric(windows-default-theme) - Archive of obsolete content
the :-moz-system-metric(windows-default-theme) css pseudo-class matches an element if the user is currently using one of the following themes in windows: luna, royale, zune, or aero (i.e., vista basic, vista standard, or aero glass).
:-moz-system-metric() - Archive of obsolete content
he relative size of the visible area of the document.:-moz-system-metric(touch-enabled)the :-moz-system-metric(touch-enabled) css pseudo-class will match an element if the device on which the content is being rendered offers a supported touch-screen interface.:-moz-system-metric(windows-default-theme)the :-moz-system-metric(windows-default-theme) css pseudo-class matches an element if the user is currently using one of the following themes in windows: luna, royale, zune, or aero (i.e., vista basic, vista standard, or aero glass).
::-ms-clear - Archive of obsolete content
the ::-ms-clear css pseudo-element creates a clear button at the edge of an <input type="text"> text control that clears the current value.
::-ms-fill-lower - Archive of obsolete content
the ::-ms-fill-lower css pseudo-element represents the lower portion of the track of a slider control; that is, the portion corresponding to values less than the value currently selected by the thumb.
::-ms-fill-upper - Archive of obsolete content
the ::-ms-fill-upper css pseudo-element is a microsoft extension that represents the upper portion of the track of a slider control; that is, the portion corresponding to values greater than the value currently selected by the thumb.
-moz-windows-theme - Archive of obsolete content
syntax the -moz-windows-theme feature is specified as a keyword value that indicates which windows theme is currently being used.
E4X for templating - Archive of obsolete content
while it may be obvious after a study of the basics of e4x that it can be used for this purpose, if one adds a few common purpose functions (especially along with the convenience of javascript 1.8 expression closures), the templates can function more dynamically, offering the power and readability of templating languages such as smarty for php (though admittedly without the currently wider cross-browser support of xslt or the strictly-xml approach of phptal or seethrough templating).
Processing XML with E4X - Archive of obsolete content
consequently, filters can also run against the value of a single node contained within the current element: var people = <people> <person> <name>bob</name> <age>32</age> </person> <person> <name>joe</name> <age>46</age> </person> </people>; alert(people.person.(name == "joe").age); // alerts 46 filter expressions can even use javascript functions: function over40(i) { return i > 40; } alert(people.person.(over40(parseint(age))).name); // alerts joe handling ...
Iterator - Archive of obsolete content
not part of any current standards document ...
Enumerator.atEnd - Archive of obsolete content
the atend method returns true if the current item is the last one in the collection, the collection is empty, or the current item is undefined.
ScriptEngine() - Archive of obsolete content
syntax scriptengine() remarks the scriptengine function returns "jscript", which indicates that javascript is the current scripting engine.
ScriptEngineBuildVersion - Archive of obsolete content
example the following example illustrates the use of the scriptenginebuildversion function: if(window.scriptenginebuildversion) { console.log(window.scriptenginebuildversion()); } // output: <current build version> requirements supported in the following document modes: quirks, internet explorer 6 standards, internet explorer 7 standards, internet explorer 8 standards, internet explorer 9 standards, internet explorer 10 standards, internet explorer 11 standards.
ScriptEngineMajorVersion - Archive of obsolete content
example the following example illustrates the use of the scriptenginemajorversion function: if (window.scriptenginemajorversion) { console.log(window.scriptengine()); } output: <current major version> requirements supported in the following document modes: quirks, internet explorer 6 standards, internet explorer 7 standards, internet explorer 8 standards, internet explorer 9 standards, internet explorer 10 standards, internet explorer 11 standards.
ScriptEngineMinorVersion - Archive of obsolete content
if (window.scriptengineminorversion) { console.log(window.scriptengineminorversion()); } //output: <current minor version> requirements supported in the following document modes: quirks, internet explorer 6 standards, internet explorer 7 standards, internet explorer 8 standards, internet explorer 9 standards, internet explorer 10 standards, internet explorer 11 standards.
VBArray.toArray - Archive of obsolete content
there is currently no way to convert a javascript array into a vbarray.
New in JavaScript 1.8 - Archive of obsolete content
however, that made it impossible to destructure the values of an array - that were arrays (i.e., when an iterator returns an array of the current key-value pair).
New in JavaScript - Archive of obsolete content
ecmascript 5 support implementation status for the current standard ecma-262 edition 5.1 in mozilla-based engines and products.
Object.prototype.watch() - Archive of obsolete content
for example, window.watch('location', myhandler) will not call myhandler if the user clicks a link to an anchor within the current document.
arguments.caller - Archive of obsolete content
the obsolete arguments.caller property used to provide the function that invoked the currently executing function.
Archived JavaScript Reference - Archive of obsolete content
obsolete javascript features and unmaintained docs arguments.callerthe obsolete arguments.caller property used to provide the function that invoked the currently executing function.
LiveConnect Overview - Archive of obsolete content
there are cases where liveconnect will fail to load a class, and you will need to manually load it like this: var widgetry = java.lang.thread.currentthread().getcontextclassloader().loadclass("org.mywidgets.widgetry"); in javascript 1.3 and earlier, javaclass objects are not automatically converted to instances of java.lang.class when you pass them as parameters to java methods—you must create a wrapper around an instance of java.lang.class.
StopIteration - Archive of obsolete content
not part of any current standards document ...
Troubleshooting XForms Forms - Archive of obsolete content
you can also see the current list of open xforms bugs, or the list of fixed bugs that have not made it to the release versions yet.
Mozilla XForms Specials - Archive of obsolete content
pseudo-class support we currently support all the css pseudo-classes in xforms (:enabled, :disabled, etc.
RFE to the Custom Controls - Archive of obsolete content
output should show data in current locale format the bug 331585 address the issue.
RFE to the Custom Controls Interfaces - Archive of obsolete content
llowing interfaces: nsixformsaccessors - serves to get/set the value of the instance data node that the xforms element is bound to as well as getting the various states of that node nsixformsdelegate - used to obtain the nsixformsaccessors interface nsixformsuiwidget - used by the xforms processor to update the value/state of an xforms element when its bound node's value/state is changed our current mechanism that allows authors to build custom controls assumes that the controls will be bound to instance nodes of simple content type.
XForms Input Element - Archive of obsolete content
characteristics the bound instance node is of type xsd:date or a type derived from it appearance attribute also contains the value "full" firefox 2.0 doesn't currently contain any similar xhtml or xul widgets.
XForms Output Element - Archive of obsolete content
characteristics the bound instance node is of type xsd:date or a type derived from it in addition, the appearance attribute must also contain the value "full" firefox 2.0 doesn't currently have any similar widgets available for use with xhtml or xul.
XForms Select Element - Archive of obsolete content
single-node binding special selection - isn't currently supported.
XForms - Archive of obsolete content
drawing on other w3c standards like xml schema, xpath, and xml events, xforms tried to address some of the limitations of the current html forms model.
Archived open Web documentation - Archive of obsolete content
drawing on other w3c standards like xml schema, xpath, and xml events, xforms tried to address some of the limitations of the current html forms model.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
the star office system offered functionality that neither microsoft nor apple has been able to match with their current offerings.
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
this article was written on august 31, 2001; it is not compatible with current versions of firefox.
Anatomy of a video game - Game development
calling the next requestanimationframe early ensures the browser receives it on time to plan accordingly even if your current frame misses its vsync window.
Examples - Game development
classic platformer canvas 2d game based on `visual-ts game engine` - physics based on matter.js commercial games oort online a mmo exploration, building, and battle game (currently in development.) a wizard's lizard top down zelda-esque exploration/rpg.
Game distribution - Game development
such games are often designed to be played with two, or even one finger, so you can hold the device, play the game and be able to use the second hand for whatever you currently need.
Building up a basic demo with A-Frame - Game development
high level overview the current version of a-frame is 0.3.2, which means it's highly experimental, but it already works and you can test it right away in the browser.
Techniques for game development - Game development
this article provides a detailed guide to implementing audio for web games, looking at what works currently across as wide a range of platforms as possible.
asm.js - Game development
asm.js code resembles c in many ways, but it's still completely valid javascript that will run in all current engines.
Finishing up - Game development
requestanimationframe helps the browser render the game better than the fixed framerate we currently have implemented using setinterval().
Move the ball - Game development
delete all the javascript you currently have inside your html file except for the first two lines, and add the following below them.
Track the score and win - Game development
the first parameter is the text itself — the code above shows the current number of points — and the last two parameters are the coordinates where the text will be placed on the canvas.
Build the brick field - Game development
the problem currently is that we're painting all the bricks in one place, at coordinates (0,0).
Buttons - Game development
new variables we will need a variable to store a boolean value representing whether the game is currently being played or not, and another one to represent our button.
Extra lives - Game development
e.reset(game.world.width*0.5, game.world.height-5); game.input.ondown.addonce(function(){ lifelosttext.visible = false; ball.body.velocity.set(150, -150); }, this); } else { alert('you lost, game over!'); location.reload(); } } instead of instantly printing out the alert when you lose a life, we first subtract one life from the current number and check if it's a non-zero value.
Initialize the framework - Game development
this tutorial uses phaser v2 — it won't work with the current version on phaser (v3).
Player paddle and controls - Game development
as you'll notice if you reload your index.html at this point, the paddle is currently not exactly in the middle.
The score - Game development
updating the score when bricks are destroyed we will increase the number of points every time the ball hits a brick and update the scoretext to display the current score.
Visual-js game engine - Game development
inserting new code will be always at current line selected intro editor .
Visual typescript game engine - Game development
written in typescript current version 3.1.3.
Gecko FAQ - Gecko Redirect 1
a javabean wrapper is not currently under development, but there is nothing in gecko's architecture that precludes such development in the future.
Plug-in Development Overview - Gecko Plugin API Reference
displaying messages on the status line functionally, your plug-in is seamlessly integrated into the browser and operates as an addition to current browser capabilities.
Algorithm - MDN Web Docs Glossary: Definitions of Web-related terms
there are also machine learning algorithms such as linear regression, logistic regression, decision tree, random forest, support vector machine, recurrent neural network (rnn), long short term memory (lstm) neural network, convolutional neural network (cnn), deep convolutional neural network and so on.
Block cipher mode of operation - MDN Web Docs Glossary: Definitions of Web-related terms
most symmetric-key algorithms currently in use are block ciphers: this means that they encrypt data a block at a time.
Breadcrumb - MDN Web Docs Glossary: Definitions of Web-related terms
a breadcrumb, or breadcrumb trail, is a navigational aid that is typically placed between a site's header and the main content, displaying either a hierarchy of the current page in relation to the the site's structure, from top level to current page, or a list of the links the user followed to get to the current page, in the order visited.
CSS - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge learn css css on wikipedia technical reference the css documentation on mdn the css working group current work ...
Developer Tools - MDN Web Docs Glossary: Definitions of Web-related terms
current browsers provide integrated developer tools, which allow to inspect a website.
HTTP - MDN Web Docs Glossary: Definitions of Web-related terms
the current version of the http specification is called http/2.
IMAP - MDN Web Docs Glossary: Definitions of Web-related terms
imap4 revision 1 is the current version, defined by rfc 3501.
IPv6 - MDN Web Docs Glossary: Definitions of Web-related terms
ipv6 is the current version of the communication protocol underlying the internet.
Layout viewport - MDN Web Docs Glossary: Definitions of Web-related terms
essentially, it represents what is available to be seen, while the visual viewport represents what is currently visible on the user's display device.
Mozilla Firefox - MDN Web Docs Glossary: Definitions of Web-related terms
firefox uses gecko to render webpages, and implements both current and upcoming web standards.
POP3 - MDN Web Docs Glossary: Definitions of Web-related terms
nearly all email servers and clients currently support pop3.
Page prediction - MDN Web Docs Glossary: Definitions of Web-related terms
for example, as the user types in the address bar, the browser might send the current text in the address bar to the search engine before the user submits the request.
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
javascript // the primitive let foo = 5; // defining a function that should change the primitive value function addtwo(num) { num += 2; } // another function trying to do the same thing function addtwo_v2(foo) { foo += 2; } // calling our first function while passing our primitive as an argument addtwo(foo); // getting the current primitive value console.log(foo); // 5 // trying again with our second function...
Python - MDN Web Docs Glossary: Definitions of Web-related terms
it was created by guido van rossum as a successor to another language (called abc) between 1985 and 1990, and is currently used on a large array of domains like web development, desktop applications, data science, devops, and automation/productivity.
Random Number Generator - MDN Web Docs Glossary: Definitions of Web-related terms
these include: that it's computationally unfeasible for an attacker (without knowledge of the seed) to predict its output that if an attacker can work out its current state, this should not enable the attacker to work out previously emitted numbers.
Secure Sockets Layer (SSL) - MDN Web Docs Glossary: Definitions of Web-related terms
the current version of ssl is version 3.0, released by netscape in 1999, and has been superseded by the transport layer security (tls) protocol.
Symmetric-key cryptography - MDN Web Docs Glossary: Definitions of Web-related terms
most symmetric-key algorithms currently in use are block ciphers: this means that they encrypt data one block at a time.
Visual Viewport - MDN Web Docs Glossary: Definitions of Web-related terms
the portion of the viewport that is currently visible is called the visual viewport.
Web standards - MDN Web Docs Glossary: Definitions of Web-related terms
web standards also must evolve to improve the current status and adapt to new circumstances.
XLink - MDN Web Docs Glossary: Definitions of Web-related terms
specification xlink 1.0 xlink 1.1 (currently a working draft) see also xml in mozilla code snippets:getattributens - a wrapper for dealing with some browsers not supporting this dom method code snippets:xml:base function - a rough attempt to find a full xlink-based on an xlink:href attribute (or <xi:include href=>) and its or an ancestor's xml:base.
Brotli - MDN Web Docs Glossary: Definitions of Web-related terms
it compresses data using a combination of a modern variant of the lz77 algorithm, huffman coding, and second-order context modeling, providing a compression ratio comparable to the best currently available general-purpose compression methods.
Prerender - MDN Web Docs Glossary: Definitions of Web-related terms
when the user navigates to the prerendered content, the current content is replaced by the prerendered content instantly.
Property (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
roperty "color" with the value "black" indicates */ /* that the text will have the color black */ color: black; /* the property "background-color" with the value "white" indicates */ /* that the background color of the elements will be white */ background-color: white; } learn more general knowledge learn css technical reference the css reference on mdn the css working group current work ...
Test your skills: CSS and JavaScript accessibility - Learn web development
but it is not very accessible — in its current state you can only operate it with the mouse.
HTML: A good basis for accessibility - Learn web development
activeelement which gives us the element that is currently focused on the page.
HTML: A good basis for accessibility - Learn web development
activeelement which gives us the element that is currently focused on the page.
Cascade and inheritance - Learn web development
also significant here is the concept of inheritance, which means that some css properties by default inherit values set on the current element's parent element, and some don't.
Handling different text directions - Learn web development
currently, only firefox supports flow relative values for float.
CSS values and units - Learn web development
note: there are some other possible values for <image>, however these are newer and currently have poor browser support.
Flexbox - Learn web development
this is why our current example's buttons are centered vertically.
Legacy layout methods - Learn web development
replace whatever is inside the body currently with the following: <h1>2 column layout example</h1> <div> <h2>first column</h2> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit.
Responsive design - Learn web development
for example, the following media query tests to see if the current web page is being displayed as screen media (therefore not a printed document) and the viewport is at least 800 pixels wide.
How CSS is structured - Learn web development
here are three examples: <!-- inside a subdirectory called styles inside the current directory --> <link rel="stylesheet" href="styles/style.css"> <!-- inside a subdirectory called general, which is in a subdirectory called styles, inside the current directory --> <link rel="stylesheet" href="styles/general/style.css"> <!-- go up one directory level, then inside a subdirectory called styles --> <link rel="stylesheet" href="../styles/style.css"> internal stylesheet an internal...
CSS FAQ - Learn web development
LearnCSSHowtoCSS FAQ
use a class-specific style when you want to apply the styling rules to many blocks and elements within the page, or when you currently only have element to style with that style, but you might want to add more later.
Styling links - Learn web development
this is because if the real links were included, clicking on them would break the examples (you'd end up with an error, or a page loaded in the embedded example that you couldn't get back from.) # just links to the current page.
What do common web layouts contain? - Learn web development
main content the biggest region, containing content unique to the current page.
How can we design for all types of users? - Learn web development
this works as of internet explorer 9 and in every other current browser, so please feel free to use this unit.
How do I use GitHub Pages? - Learn web development
your screen should look like this: click create repository; this should bring you to the following page: uploading your files to github on the current page, you are interested in the section …or push an existing repository from the command line.
What are hyperlinks? - Learn web development
when you follow a link pointing to an anchor, your browser jumps to another part of the current document instead of loading a new document.
Basic native form controls - Learn web development
any that are currently checked match the :checked pseudoclass.
Sending form data - Learn web development
if this attribute isn't provided, the data will be sent to the url of the page containing the form — the current page.
Styling web forms - Learn web development
as well as the basic css tools covered above, we've also been provided with several selectors — ui pseudo-classes — that enable styling based on the current state of the ui.
Test your skills: HTML5 controls - Learn web development
create a corresponding output element to put the current value of the slider into.
UI pseudo-classes - Learn web development
controls whose current value is outside the range limits specified by the min and max attributes are (matched with) :invalid, but also matched by :out-of-range, as you'll see later on.
Web forms — Working with user data - Learn web development
ui pseudo-classes an introduction to the ui pseudo-classes enabling html form controls to be targeted based on their current state.
HTML basics - Learn web development
in this example, our current text of "my test image" is no good at all.
Installing basic software - Learn web development
currently, the most-used browsers are firefox, chrome, opera, safari, internet explorer and microsoft edge.
JavaScript basics - Learn web development
to demonstrate this, enter the following into your console, then click on the current webpage: document.queryselector('html').onclick = function() { alert('ouch!
Add a hitmap on top of an image - Learn web development
you may leave this attribute blank if you don’t want the current area to link anywhere (say, if you’re making a hollow circle.) alt a mandatory attribute, telling people where the link goes or what it does.
Define terms with HTML - Learn web development
improve accessibility <dfn> marks the keyword defined, and indicates that the current paragraph defines the keyword.
Advanced text formatting - Learn web development
this is usually a feeling, thought, or piece of additional background information.</dd> <dd>in writing, a section of content that is related to the current topic, but doesn't fit directly into the main flow of content so is presented nearby (often in a box off to the side.)</dd> </dl> active learning: marking up a set of definitions it's time to try your hand at description lists; add elements to the raw text in the input field so that it appears as a description list in the output field.
Adding vector graphics to the Web - Learn web development
moreover, unless the svg and your current webpage have the same origin, you cannot use javascript on your main webpage to manipulate the svg.
Test your skills: HTML images - Learn web development
the image is called blueberries.jpg, and it is in a folder inside the current folder called images.
From object to iframe — other embedding technologies - Learn web development
<iframe> elements are designed to allow you to embed other web documents into the current document.
Assessment: Structuring planet data - Learn web development
project brief you are working at a school; currently your students are studying the planets of our solar system, and you want to provide them with an easy-to-follow set of data to look up facts and figures about the planets.
Choosing the right approach - Learn web development
further information cooperative asynchronous javascript: timeouts and intervals, in particular setinterval() setinterval() reference requestanimationframe() requestanimationframe() is a method that allows you to run a function repeatedly, and efficiently, at the best framerate available given the current browser/system.
General asynchronous programming concepts - Learn web development
this cursor is how the operating system says "the current program you're using has had to stop and wait for something to finish up, and it's taking so long that i was worried you'd wonder what was going on." this is a frustrating experience and isn't a good use of computer processing power — especially in an era in which computers have multiple processor cores available.
Introducing asynchronous JavaScript - Learn web development
neither of the possible outcomes have happened yet, so the fetch operation is currently waiting on the result of the browser trying to complete the operation at some point in the future.
Graceful asynchronous programming with Promises - Learn web development
responding to failure something is missing — currently, there is nothing to explicitly handle errors if one of the promises fails (rejects, in promise-speak).
Build your own function - Learn web development
you only use them when you want to run the function immediately in the current scope.
Function return values - Learn web development
om circles somewhere on an html <canvas>: function draw() { ctx.clearrect(0, 0, width, height); for (let i = 0; i < 100; i++) { ctx.beginpath(); ctx.fillstyle = 'rgba(255,0,0,0.5)'; ctx.arc(random(width), random(height), random(50), 0, 2 * math.pi); ctx.fill(); } } inside each loop iteration, three calls are made to the random() function, to generate a random value for the current circle's x-coordinate, y-coordinate, and radius, respectively.
Test your skills: Conditionals - Learn web development
conditionals 1 in this task you are provided with two variables: season — contains a string that says what the current season is.
Making decisions in your code — conditionals - Learn web development
when this function is run, we first set a variable called choice to the current value selected in the <select> element.
Useful string methods - Learn web development
et greetings = ['happy birthday!', 'merry christmas my love', 'a happy christmas to all the family', 'you\'re all i want for christmas', 'get well soon']; for (let i = 0; i < greetings.length; i++) { let input = greetings[i]; // your conditional test needs to go inside the parentheses // in the line below, replacing what's currently there if (greetings[i]) { let listitem = document.createelement('li'); listitem.textcontent = input; list.appendchild(listitem); } } </textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y-label { margin...
Storing the information you need — Variables - Learn web development
myname; myage; they currently have no value; they are empty containers.
What is JavaScript? - Learn web development
replace your current <script> element with the following: <script src="script.js" defer></script> inside script.js, add the following script: function createparagraph() { let para = document.createelement('p'); para.textcontent = 'you clicked the button!'; document.body.appendchild(para); } const buttons = document.queryselectorall('button'); for(let i = 0; i < buttons.length ; i++) { buttons[i].adde...
What went wrong? Troubleshooting JavaScript - Learn web development
the best way to do this currently is to search for "mdn name-of-feature" with your favorite search engine.
JavaScript object basics - Learn web development
the this keyword refers to the current object the code is being written inside — so in this case this is equivalent to person.
Object prototypes - Learn web development
important: the prototype property is one of the most confusingly-named parts of javascript — you might think that this points to the prototype object of the current object, but it doesn't (that's an internal object that can be accessed by __proto__, remember?).
Aprender y obtener ayuda - Learn web development
of the articles will be tutorials, to teach you a certain technique or important concept (such as "learn how to create a video player" or "learn the css box model"), and some of the articles will be reference material, to allow you to look up details you may have forgotten (such as "what is the syntax of the css background property"?) mdn web docs is very good for both types — the area you are currently in is great for learning techniques and concepts, and we also have several giant reference sections allowing you to look up any syntax you can't remember.
CSS performance optimization - Learn web development
for this reason, css is render blocking, unless the browser knows the css is not currently needed.
Measuring performance - Learn web development
the performance api, which provides access to performance-related information for the current page, includes the performance timeline api, the navigation timing api, the user timing api, and the resource timing api.
Multimedia: Images - Learn web development
many javascript libraries can implement this for you, such as lazysizes, and browser vendors are working on a native lazyload attribute that is currently in the experimental phase.
Web performance resources - Learn web development
only use as much javascript as needed for the current page.
What is web performance? - Learn web development
the browser follows a well-defined set of steps, and optimizing the critical rendering path to prioritize the display of content that relates to the current user action will lead to significant improvements in content rendering time.
Multimedia: video - Learn web development
see caniuse.com for current browser support of video and other media types.
Server-side web frameworks - Learn web development
the http request may also include information about the current session or user in a client-side cookie.
Website security - Learn web development
keep track of the most popular threats (the current owasp list is here) and address the most common vulnerabilities first.
Getting started with Ember - Learn web development
this creates a new directory inside the current directory you are in called todomvc, containing the scaffolding for a new ember app.
Ember app structure and componentization - Learn web development
this already exists, and its contents currently look like so: {{!-- the following component displays ember's default welcome message.
React interactivity: Events and state - Learn web development
// near the top of the `form` component function handlechange(e) { console.log("typing!"); } // down in the return statement <input type="text" id="new-todo-input" classname="input input__lg" name="text" autocomplete="off" value={name} onchange={handlechange} /> currently, your input’s value will not change as you type, but your browser will log the word "typing!" to the javascript console, so we know our event listener is attached to the input.
Vue conditional rendering: editing existing todos - Learn web development
however, there's currently no way to go back.
Focus management with Vue refs - Learn web development
to understand what's currently happening: reload your page, then press tab.
Rendering a list of Vue components - Learn web development
in case of v-for, you use a special syntax similar to a for...in loop in javascript — v-for="item in items" — where items is the array you want to iterate over, and item is a reference to the current element in the array.
Vue resources - Learn web development
the biggest change is a new composition api that works as an alternative to the current property-based api.
Styling Vue components with CSS - Learn web development
} .custom-checkbox > .checkbox-label { font-size: inherit; font-family: inherit; line-height: inherit; display: inline-block; margin-bottom: 0; padding: 8px 15px 5px; cursor: pointer; touch-action: manipulation; } .custom-checkbox > label::before { content: ""; box-sizing: border-box; position: absolute; top: 0; left: 0; width: 40px; height: 40px; border: 2px solid currentcolor; background: transparent; } .custom-checkbox > input[type="checkbox"]:focus + label::before { border-width: 4px; outline: 3px dashed #228bec; } .custom-checkbox > label::after { box-sizing: content-box; content: ""; position: absolute; top: 11px; left: 9px; width: 18px; height: 7px; transform: rotate(-45deg); border: solid; border-width: 0 0 5px 5px; border-top-co...
Tools and testing - Learn web development
working out what tools you should be using can be a difficult process, so we have written this set of articles to inform you of what types of tool are available, what they can do for you, and how to make use of the current industry favourites.
Learn web development
to copy the learning area repo to a folder called learning-area in the current location your command prompt/terminal is pointing to, use the following command: git clone https://github.com/mdn/learning-area you can now enter the directory and find the files you are after (either using your finder/file explorer or the cd command).
omni.ja (formerly omni.jar)
several unzip tools and archives (except for the latest version of 7-zip) currently cannot read omni.ja, due to the optimization that is applied to the file.
ZoomText
you may wish to read through the current issues on this page before reporting bugs.
Adding a new CSS property
also, it's very important not to touch the computed style data at all when there's no specified data provided (ecssunit_null); touching the computed style data in this case would break partial computation based on a start struct, which is when we computed style data on the basis of computed data we've already computed from a subset of the style rules that we're currently computing from.
Application cache implementation overview
then it associates any documents waiting for this update to finish with the current existing nsiapplicationcache.
A bird's-eye view of the Mozilla framework
the xpcom component keeps track of all interface pointers currently held by its clients using an internal reference count it increments via client calls to addref().
Chrome registration
note: extensions can't currently (bug 1131065) register components to load in the content process using the manifest file so this flag is largely useless to extension developers.
Cookies Preferences in Mozilla
the originating site (block third party cookies) 2 = block all cookies by default 3 = use p3p settings (note: this is only applicable to older mozilla suite and seamonkey versions.) 4 = storage access policy: block cookies from trackers network.cookie.lifetimepolicy default value: 0 0 = accept cookies normally 1 = prompt for each cookie (prompting was removed in firefox 44) 2 = accept for current session only 3 = accept for n days network.cookie.lifetime.days default value: 90 only used if network.cookie.lifetimepolicy is set to 3 sets the number of days that the lifetime of cookies should be limited to.
Creating Sandboxed HTTP Connections
since nsistreamlistener does not cover cookies, the current channel being used will need to be stored as a global, since another listener will be used for cookie notifications (covered in the next section).
Debugging Internet Explorer
to run internet explorer in a single process add a dword registry value to hkey_current_user\software\microsoft\internet explorer\main called tabprocgrowth and set it to 0.
Debugging on Windows
one requires setting an environment variable, while the other affects only the currently running program instance in memory.
Old Thunderbird build
the current status of the trunk can also be checked at https://treestatus.mozilla.org/ if the trunk is broken (i.e.
Simple SeaMonkey build
mk_add_options moz_objdir=/path/to/comm-central/obj-sm-debug ac_add_options --enable-application=suite ac_add_options --enable-debug ac_add_options --disable-optimize normally a shared build suffices for debugging purposes but current nightly releases are actually static builds which require even more memory to link.
Simple Thunderbird build
the current status of the trunk can also be checked at https://treestatus.mozilla.org/ if the trunk is broken (i.e.
pymake
usage if you use mach for everything, you don't have to worry about gmake and pymake: mach will run whatever is best for the current machine.
Gecko Logging
info 3 an informational message, often indicates the current program state.
Interface Compatibility
jsapi, nspr, nss, and other libraries which are currently shipped as separate shared libraries may be integrated into libxul, and extension authors should avoid linking against them.
Obsolete Build Caveats and Tips
warning: due to a bug in old versions of mozillabuild (prior to 1.6), if you download version 7.1 of the windows 7 sdk (which is the current version available), your build will fail, often while building cairo with "ocidl.h" errors.
Developer guide
treeherder treeherder shows the status of the tree (whether or not it currently builds successfully).
Displaying Places information using views
(nsiplacesview is currently not a true interface; the built-in views simply implement its methods and attributes directly.) as described above in using a view, this interface provides controllers and other callers a consistent, general way to interact with views.
Index
this new policy is designed as an alternative to the current policies, which have been available in firefox for many years.
Cross Process Object Wrappers
consider this code: mm.addmessagelistener("gotloadevent", function (msg) { mm.sendasyncmessage("changedocumenturi", {newuri: "hello.com"}); let uri = msg.objects.document.documenturi; dump("received load event: " + uri + "\n"); }); this sends a message asking the frame script to change the current document uri, then accesses the current document uri via a cpow.
Frame script environment
events besides the regular dom events being captured/bubbling up from content the current content object the following additional events get fired in a frame script environment: unload fires when the frame script environment is shut down, i.e.
Communicating with frame scripts
for example, suppose we load a script into the current <browser> on some event, and keep the browser message manager in an array, so we can send it messages: var messagemanagers = []; ...
Frame script environment
events besides the regular dom events being captured/bubbling up from content the current content object the following additional events get fired in a frame script environment: unload bubbles no fires when the frame script environment is shut down, i.e.
Tracking Protection
click the ⓘ symbol in the address bar to view information about the currently loaded page.
Firefox Operational Information Database: SQLite
in the manager, select the database you want to explore in the '(select profile database)' pulldown, click 'go', select one of the tables listed in the left column and see the current contents of the database in the 'browse & search' tab.) some databases are used by the browser itself, others are used by applications that you have installed or used; for example: content-prefs.sqlite cookies.sqlite download.sqlite formhistory.sqlite persmissions.sqlite places.sqlite search.sqlite signons.sqlite webappstore.sqlite ...
HTMLIFrameElement.executeScript()
http://example.com/index.html note: the options parameter does not currently seem to have much effect.
HTMLIFrameElement.getMuted()
the getmuted() method of the htmliframeelement indicates whether the browser <iframe> is currently muted.
HTMLIFrameElement.getVisible()
the getvisible() method of the htmliframeelement is used to request the current visible state of the browser <iframe>.
mozbrowserasyncscroll
that means that the value retrieved through the event object can be different than the real current position of the scroll when the event is processed.
mozbrowserlocationchange
example this example updates the url bar so that it will always display the correct url for the current location.
mozbrowserscrollviewchange
details the details property returns an anonymous javascript object with the following properties: state a domstring representing the current state of scrolling in the viewport — available values are started and stopped.
mozbrowservisibilitychange
the mozbrowservisibilitychange event is fired when the visibility state of the current browser iframe <iframe> changes, for example due to a call to setvisible().
HTMLIFrameElement.setActive()
the setactive() method of the htmliframeelement sets the current <iframe> as the active frame, which has an effect on how it is prioritized by the process manager.
HTMLIFrameElement.setVolume()
the setvolume() method of the htmliframeelement sets the current volume of the browser <iframe>.
Chrome-only API reference
MozillaGeckoChromeAPI
it currently works in (privileged) chrome code on firefox desktop (version 47 and above).chromeworkerif you're developing privileged code, and would like to create a worker that can use js-ctypes to perform calls to native code, you can do so by using chromeworker instead of the standard worker object.
Embedding Mozilla
embedding the editor this document describes the current state of editor embeddability, problems with the existing implementation, some possible embedding scenarios that we need to deal with, and an embedding solution that will fulfil them.
Gecko SDK
utility to compile idl files on os x, it's likely that you will receive a strange error when running the tool that looks something along the lines of this: dyld: library not loaded: /opt/local/lib/libintl.3.dylib referenced from: /users/varmaa/xulrunner-sdk/bin/./xpidl reason: image not found trace/bpt trap unfortunately, this is caused by a problem with the sdk build process which cannot currently be resolved (see bugzilla bug #430274).
Geckoview-Junit Tests
assumethat(sessionrule.env.isdebugbuild && sessionrule.env.cpuarch == "x86", equalto(false)) running tests on try to run these tests on try, use something like: mach try fuzzy -q geckoview-junit --artifact or mach try -b do -p android-x86_64 -u geckoview-junit --artifact currently, geckoview-junit is only run on android-x86_64.
Hacking with Bonsai
there is a web page, which records if the tree is open or closed what the date stamp of the last known good tree is who is on the hook for the current tree before the tree is opened, the list of checkins that happened when the tree was closed is reviewed to insure that only build related checkins took place.
How test harnesses work
python runner the python runner: sets up the testing environment sets up environment variables (mozrunner, currently) creates a profile (mozprofile via mozrunner) sets appropriate test preferences inserts a shim extension in the profile (for non-marionette tests) gathers the tests (manifestdestiny) potentially sets up an http server for test data (mozhttpd) invokes the binary (mozrunner) it is the job of the shim extension to shut down the browser logging (mozlog...
How to add a build-time test
xpcshell_tests be a list of subdirectories of the current directory which contain xpcshell tests.
How to get a stacktrace for a bug report
mozilla's crash report server currently only has debug information for mozilla builds and thus the crash reporter cannot work if you use a build from a linux distribution or if you compile from source code.
IPDL Tutorial
if if the child side crashes or becomes hung: any synchronous or rpc messages currently active will return false no further messages will be accepted (c++ methods will return false) each ipdl actor will receive an onerror message deallocpsubprotocol will be called on each manager protocol to deallocate any active subprotocols.
IPC Protocol Definition Language (IPDL)
current docs ipdl tutorial quick start: creating a new protocol quick start: extending a protocol ipdl type serialization ipdl best practices ipdl glossary pbackground future planned docs ipdl language reference error and shutdown handling in ipdl protocols how ipdl uses processes, threads, and sockets ipdl shared memory ...
Infallible memory allocation
currently, while code is transitioned to be compatible with infallible memory allocators, you have to explicitly decide whether to use infallible allocation or not.
Integrated Authentication
mozilla currently supports a whitelist of sites that are permitted to engage in spnego authentication with the browser.
JavaScript Tips
references this was started as a reprint of neil's guide some more current info on this blog post how to remove duplicate objects from an array javascript ...
AddonListener
addonlisteners can be registered with addaddonlistener() and will then receive notification of changes to the add-ons currently installed.
AsyncShutdown.jsm
info optionally, a function returning information about the current state of the blocker as an object.
DownloadList
d overview promise<array<download>> getall(); promise add(download adownload); promise remove(download adownload); promise addview(object aview); promise removeview(object aview); void removefinished([optional] function afilterfn); methods getall() retrieves a snapshot of the downloads that are currently in the list.
Geometry.jsm
note: although this module is usable from mobile, and is present in firefox 4, it's currently not used in firefox 4 and attempting to use it may produce unreliable results there.
Interfacing with the Add-on Repository
enabling the recommendation feature in current builds of firefox 4, the recommendation api doesn't work because the preference for the url to query to get recommended add-ons is not included by default; see bug 628785.
Following the Android Toasts Tutorial from a JNI Perspective
it only fills the amount of space required for the message, and the current activity remains visible and interactive.
NetUtil.jsm
you can call nsiinputstream.available() to get the number of bytes currently available.
OSFile.jsm
depending on the current load of the kernel, the current disk activity, the current load of the bus, the current rotation speed of the disk, the amount of battery power, etc.
Task.jsm
}); exception handling components.utils.import("resource://gre/modules/osfile.jsm") components.utils.import("resource://gre/modules/task.jsm") task.spawn(function* () { let currentdir = yield os.file.getcurrentdirectory(); let path = os.path.join(currentdir, ".mozconfig"); try { let info = yield os.file.stat(path); console.log("the .mozconfig file is " + info.size + " bytes long."); } catch (ex if ex instanceof os.file.error && ex.becausenosuchfile) { console.log("you don't have .mozconfig in " + currentdir); } }).then(null, components.utils.reporterror...
Webapps.jsm
importing components.utils.import("resource://gre/modules/webapps.jsm"); // exported symbol is domapplicationregistry method overview init: function() loadcurrentregistry: function() notifyappsregistrystart: function notifyappsregistrystart() notifyappsregistryready: function notifyappsregistryready() sanitizeredirects: function sanitizeredirects(asource) _savewidgetsfullpath: function(amanifest, adestapp) appkind: function(aapp, amanifest) updatepermissionsforapp: function(aid, aispreinstalled) updateofflinecacheforapp: function(aid) installpreinstalledapp: function installpreinstalledapp(aid) removeifhttpsduplicate: function(aid) installsystemapps: function(...
JavaScript code modules
pluralform.jsm supplies an easy way to get the correct plural forms for the current locale, as well as ways to localize to a specific plural rule.
Index
localizing current versions of firefox, thunderbird and seamonkey includes working with mercurial.
Localizing with Mozilla Translator
for the last two options, you should be able to adjust your current mt product paths so you can keep using it just like with cvs.
Patching a Localization
hg diff browser/chrome/browser/browser.dtd attach the patch to an existing bug for reference or review or create a new one if one doesn't currently exist.
Translation phase
if your locale has an hg repository hosted on the mozilla servers, you can track your localization's current progress by visiting the l10n dashboards.
SVN for Localizers
note: the directory you create will be located inside the directory that you're currently in with your console (or cygwin console).
Localization technical reviews
to the right, you'll see the current dashboard page for a german localization.
Mozilla Framework Based on Templates (MFBT)
it is fairly new, so its functionality is currently sparse.
Fonts for Mozilla's MathML engine
advanced setup arabic mathematical alphabetic symbols currently, very few fonts have appropriate glyphs for the arabic mathematical alphabetic symbols.
Fonts for Mozilla 2.0's MathML engine
note that currently, only the fonts in /fonts/stix-general/ are used for stretching mathematical operators with stix fonts.
MathML3Testsuite
the pages below contain our current results of the mathml 3 full testsuite for presentation mathml.
MathML In Action
your feedback can be manifested by putting mathml content on the web, reporting bugs in bugzilla, and, if you can help with code, inspecting/improving the current code, and/or picking up an item in the todo list.
MathML Accessibility in Mozilla
accessfu: mathml support in android and firefox os is currently being implemented in our accessfu module and a patch is available on bug 1163374.
Using the viewport meta tag to control layout on mobile browsers
otherwise, the relationship between css pixels and device pixels depends on the current zoom level.
Mozilla DOM Hacking Guide
we can change the url of the current window by assigning window.location.
Mozilla Port Blocking
currently you need to add preferences to either user.js or all.js.
Mozilla Development Strategies
you'll need to update, rebuild, re-test and make a diff against the current trunk once you feel your fix is done.
Mozilla projects on GitHub
rust-lang the rust programming language, designed for safe concurrent code.
BloatView
perl tools/bloatview/bloatdiff.pl <previous-log> <current-log> this will give you output of the form: bloat/leak delta report current file: dist/win32_d.obj/bin/bloatlogs/all-1999-10-22-133450.txt previous file: dist/win32_d.obj/bin/bloatlogs/all-1999-10-16-010302.txt -------------------------------------------------------------------------- class leaks delta bloat delta --------------------------------------...
Investigating leaks using DMD heap scan mode
first, in toolkit/components/terminator/nsterminator.cpp, delete everything in runwatchdog but the call to ns_setcurrentthreadname.
Profiling with Instruments
currently this means you need to build with jemalloc disabled (ac_add_options --disable-jemalloc).
Profiling with Xperf
for 64-bit windows 7 or vista, you'll need to do a registry tweak and then restart to enable stack walking: reg add "hklm\system\currentcontrolset\control\session manager\memory management" -v disablepagingexecutive -d 0x1 -t reg_dword -f symbol server setup with the latest versions of the windows performance toolkit, you can modify the symbol path directly from within the program via the trace menu.
Refcount tracing and balancing
note: due to an issue with the sandbox on windows (bug 1345568), refcount logging currently requires the moz_disable_content_sandbox environment variable to be set.
Phishing: a short definition
past and current countermeasures various technical, and social approaches, exist to combat phishing attacks.
A brief guide to Mozilla preferences
if the preference is defined as a sticky preference, the value true will be written by nightly even though it matches the current default, so when developeredition is run the preference keeps the desired value of true.
browser.download.lastDir.savePerSite
if no download directory for the current website has been stored, browser.download.lastdir will be used.
Preference reference
he web page is shown in the grid of the "new tab page" (about:newtab) which offers the most often visited pages for fast navigation.browser.search.context.loadinbackgroundbrowser.search.context.loadinbackground controls whether a search from the context menu with "search <search engine> for <selected text>" opening a new tab will give focus to it and load it in the foreground or keep focus on the current tab and open it in the background.browser.urlbar.formatting.enabledthe preference browser.urlbar.formatting.enabled controls whether the domain name including the top level domain is highlighted in the address bar by coloring it black and the other parts grey.browser.urlbar.trimurlsthe preference browser.urlbar.trimurls controls whether the protocol http and the trailing slash behind domain name ...
Preferences
mozilla preference reference a reference guide to all mozilla preferences; currently a work in progress.
Profile Manager
such profiles are currently being used by an instance of firefox.
Debugging out-of-memory problems
ideally, memory.dump_reports_on_oom would generate an about:memory dump, but it does not currently.
L20n HTML Bindings
<script type="application/l20n" src="../locales/strings.l20n"></script> note that you currently cannot use the manifest file and manually add resources via script tags at the same time (bug 923670).
Localization Use Cases
nding/unofficial/branding, as: <brandshortname "boot2gecko" _gender:"neutral"> now we can translate crash-banner-os2 into polish without sounding like a robot: <crashbanneros2[brandshortname::_gender] { masculine: "{{ brandshortname }} uległ awarii", feminine: "{{ brandshortname }} uległa awarii", neutral: "{{ brandshortname }} uległo awarii" }> this will give us, depending on the current branding, the following messages: firefox os uległ awarii boot2gecko uległo awarii isolation let's look at how the settings app formats sizes.
L20n
note: this document is in draft form/out-of-date — for current documentation please see our documentation on github.
AsyncTestUtils extended framework
asynctestutils is currently implemented by the first method (yielding control to the top-level event loop).
MailNews automated testing
although currently based on simple tests, these are useful for determining if new leaks have been introduced.
McCoy
signing from command line currently there is no support to run mccoy from command line under windows, but it is planned to add this support in the future.
NSPR Contributor Guide
[note that the current nspr module owners do not now nor never have been involved with nspr 1.0.].
NSPR Poll Method
the current implementation of pr_poll (the primary user of the poll method) requires that the events in *out_flags reflect the caller's view.
NSPR's Position On Abrupt Thread Termination
this memo describes my position on a facility that is currently under discussion for inclusion in the netscape portable runtime (nspr); the ability of a thread to abruptly exit.
I/O Functions
memory-mapped i/o functions are currently implemented for unix, linux, mac os x, and win32 only.
Interval Timing
printervaltime interval functions interval timing functions are divided into three groups: getting the current interval and ticks per second converting standard clock units to platform-dependent intervals converting platform-dependent intervals to standard clock units getting the current interval and ticks per second pr_intervalnow pr_tickspersecond converting standard clock units to platform-dependent intervals pr_secondstointerval pr_millisecondstointerval pr_microsecondstointerval conv...
Introduction to NSPR
the current implementation of nspr allows developers to compile a single source code base on macintosh (ppc), win32 (nt 3.51, nt 4.0, win'95), and over twenty versions of unix.
NSPR Error Handling
pr_io_pending_error an i/o operation has been attempted on a file descriptor that is currently busy with another operation.
PRCallOnceType
inprogress if not zero, the initialization process is currently being executed.
PRIOMethods
getsockopt get current setting of specified socket option.
PRSeekWhence
pr_seek_cur sets the file pointer to its current location plus the value of the offset parameter.
PR_CreatePipe
pr_createpipe is currently implemented on unix, linux, mac os x, and win32 only.
PR_DestroyLock
caution the caller must ensure that no thread is currently in a lock-specific function.
PR_DetachThread
description this function detaches the nspr thread from the currently executing native thread.
PR_ExitMonitor
the monitor object referenced must be one for which the calling thread currently holds the lock.
PR_GetError
returns the current thread's last set platform-independent error code.
PR_GetOSError
returns the current thread's last set os-specific error code.
PR_GetThreadPrivate
recovers the per-thread private data for the current thread.
PR_GetThreadScope
gets the scoping of the current thread.
PR_Interrupt
returns the function returns one of the following values: if the specified thread is currently blocked, pr_success.
PR_JoinJob
blocks the current thread until a job has completed.
PR_MkDir
caveat: the mode parameter is currently applicable only on unix platforms.
PR_Notify
the monitor object referenced must be one for which the calling thread currently holds the lock.
PR_NotifyAll
the monitor object referenced must be one for which the calling thread currently holds the lock.
PR_Open
this feature is currently only applicable on unix platforms.
PR_PushIOLayer
caution keeping the pointer to the stack even as layers are pushed onto the top of the stack is accomplished by swapping the contents of the file descriptor being pushed and the stack's current top layer file descriptor.
PR_ReadDir
skip the directory entry "." representing the current directory.
PR_Sleep
causes the current thread to yield for a specified amount of time.
PR_Wait
the monitor object referenced must be one for which the calling thread currently holds the lock.
Process Management and Interprocess Communication
management functions the process manipulation function fall into these categories: setting the attributes of a new process creating and managing processes setting the attributes of a new process the functions that create and manipulate attribute sets of new processes are: pr_newprocessattr pr_resetprocessattr pr_destroyprocessattr pr_processattrsetstdioredirect pr_processattrsetcurrentdirectory pr_processattrsetinheritablefd creating and managing processes the functions that create and manage processes are: pr_createprocess pr_detachprocess pr_waitprocess pr_killprocess ...
An overview of NSS Internals
newer generations of the database use the sqlite database to allow concurrent access by multiple applications.
Function_Name
see also copy of the mxr link, with the following text occurrences of function_name in the current nss source code (generated by mxr).
CERT_FindCertByDERCert
see also occurrences of cert_findcertbydercert in the current nss source code (generated by lxr).
CERT_FindCertByIssuerAndSN
caname->data; issuersn.derissuer.len = caname->len; issuersn.serialnumber.data = authoritykeyid->authcertserialnumber.data; issuersn.serialnumber.len = authoritykeyid->authcertserialnumber.len; issuercert = cert_findcertbyissuerandsn(cert->dbhandle, &issuersn); if ( issuercert == null ) { port_seterror (sec_error_unknown_issuer); } see also occurrences of cert_findcertbyissuerandsn in the current nss source code (generated by lxr).
NSS Certificate Download Specification
this document is currently being revised and has not yet been reviewed for accuracy.
Cryptography functions
mxr 3.2 and later pk11_getbestslot mxr 3.2 and later pk11_getbestslotmultiple mxr 3.2 and later pk11_getbestwrapmechanism mxr 3.2 and later pk11_getblocksize mxr 3.2 and later pk11_getcertfromprivatekey mxr 3.9.3 and later pk11_getcurrentwrapindex mxr 3.2 and later pk11_getdefaultarray mxr 3.8 and later pk11_getdefaultflags mxr 3.8 and later pk11_getdisabledreason mxr 3.8 and later pk11_getfirstsafe mxr 3.2 and later pk11_getinternalkeyslot mxr 3.2 and later pk11_ge...
NSS FAQ
MozillaProjectsNSSFAQ
however, there is little or no documentation currently available for the rest of the nss api.
FIPS Mode - an explanation
(note, the current version of fips 140 is revision 2, a.k.a.
HTTP delegation
this nss feature is currently targeted to first appear in nss version 3.11.1.
HTTP delegation
this nss feature is currently targeted to first appear in nss version 3.11.1.
JSS
MozillaProjectsNSSJSS
a current limitation to the configured sunpkcs11-nss bridge configuration is if you add a pkcs#11 module to the nss database such as for a smartcard, you won't be able to access that smartcard through the sunpkcs11-nss bridge.
NSS 3.12.4 release notes
currently nss 3.12.4 is in the "review pending" state in the fips 140-2 pre-validation list at http://csrc.nist.gov/groups/stm/cmvp/documents/140-1/140inprocess.pdf added crl distribution point support (see cert.h).
NSS 3.12.6 release notes
new functions for sni (see ssl.h for more information): sslsnisocketconfig return values: ssl_sni_current_config_is_used: libssl must use the default cert and key.
NSS_3.12_release_notes.html
7529: can't pass 0 as an unnamed null pointer argument to cert_createrdn bug 334683: extraneous semicolons cause empty declaration compiler warnings bug 335275: compile with the gcc flag -werror-implicit-function-declaration bug 354565: fipstest sha_test needs to detect sha tests that are incorrectly configured for bit oriented implementations bug 356595: on windows, rng_systeminfoforrng calls getcurrentprocess, which returns the constant (handle)-1.
NSS 3.14.1 release notes
bug 611451 - when built with the current version of apple xcode on mac os x, the nss shared libraries will now only export the public nss functions.
NSS 3.14.2 release notes
(https://bugzilla.mozilla.org/show_bug.cgi?id=816853) bug 772144 - basic support for running nss test suites on android devices.this is currently limited to running tests from a linux host machine using an ssh connection.
NSS 3.14.3 release notes
however, this attack is only partially mitigated if nss 3.14.3 is used with the current fips validated nss cryptographic module, version 3.12.9.1.
NSS 3.19.2.2 release notes
(current users of nss 3.19.3 or nss 3.19.4 are advised to update to nss 3.20.2, nss 3.21, or a later release.) distribution information the hg tag is nss_3_19_2_2_rtm.
NSS 3.19.2.3 release notes
(current users of nss 3.19.3, nss 3.19.4 or nss 3.20.x are advised to update to nss 3.21.1, nss 3.22.2, or a later release.) distribution information the hg tag is nss_3_19_2_3_rtm.
NSS 3.19.2.4 release notes
(current users of nss 3.19.3, nss 3.19.4 or nss 3.20.x are advised to update to nss 3.21.1, nss 3.22.2 or a later release.) distribution information the hg tag is nss_3_19_2_4_rtm.
NSS 3.20 release notes
the current implementation of nss will always use the first entry in the array that is passed as a parameter to the ssl_dhegroupprefset api.
NSS 3.28 release notes
ssl_signatureschemeprefget allows an application to learn the currently supported and enabled signature schemes for a socket.
NSS 3.30 release notes
this function currently only accepts an rsa public/private key pair.
NSS 3.35 release notes
note: dtls support is promoted in draft -23, but this is currently not compliant with the dtls 1.3 draft -23 specification.
NSS 3.43 release notes
note that while the mechanism is present, post-handshake authentication is currently not tls 1.3 compliant due to bug 1532312 notable changes in nss 3.43 the following ca certificates were added: cn = emsign root ca - g1 sha-256 fingerprint: 40f6af0346a99aa1cd1d555a4e9cce62c7f9634603ee406615833dc8c8d00367 cn = emsign ecc root ca - g3 sha-256 fingerprint: 86a1ecba089c4a8d3bbe2734c612ba341d813e043cf9e8a862cd5c57a36bbe6b cn = ems...
NSS 3.50 release notes
note that intel processors with sse4 but without avx are currently unable to use the improved chacha20/poly1305 due to a build issue; such platforms will fall-back to less optimized algorithms.
NSS Sample Code Utilities_1
strlen(tokenname); } } i = 0; do { int startphrase = i; int phraselen; /* handle the windows eol case */ while (phrases[i] != '\r' && phrases[i] != '\n' && i < nb) i++; /* terminate passphrase */ phrases[i++] = '\0'; /* clean up any eol before the start of the next passphrase */ while ( (i<nb) analyze="" char="" current="" getmodulepassword="" if="" int="" now="" passphrase="" phrase="&amp;phrases[startphrase];" phraselen="" pk11slotinfo="" pwdata="=" pwdata-="" retry="" return="" secupwdata="" the="" void="" while="">source != pw_none) { pr_fprintf(pr_stderr, "incorrect password/pin entered.\n"); return null; } switch (pwdata->source) { case pw_none: sprintf(prompt, "enter p...
Utilities for nss samples
selen; /* handle the windows eol case */ while (phrases[i] != '\r' && phrases[i] != '\n' && i < nb) i++; /* terminate passphrase */ phrases[i++] = '\0'; /* clean up any eol before the start of the next passphrase */ while ( (i<nb) && (phrases[i] == '\r' || phrases[i] == '\n')) { phrases[i++] = '\0'; } /* now analyze the current passphrase */ phrase = &phrases[startphrase]; if (!tokenname) break; if (port_strncmp(phrase, tokenname, tokenlen)) continue; phraselen = port_strlen(phrase); if (phraselen < (tokenlen+1)) continue; if (phrase[tokenlen] != ':') continue; phrase = &phrase[tokenlen+1]; break; } while (i<nb); phrase = port_strdup((...
Notes on TLS - SSL 3.0 Intolerant Servers
servers currently known to exhibit this intolerant behavior as of this writing, this problem has been reported for the following servers: (wherever there is an upgraded version which fixes the problem, it is indicated by an asterisked remark in the parentheses.
PKCS11 module installation
note: there is currently a bug in firefox where international characters may cause problems.
FC_CloseAllSessions
the nss cryptographic module currently doesn't call the surrender callback function notify.
FC_GetTokenInfo
ulsessioncount: number of sessions that this application currently has open with the token ulrwsessioncount: number of read/write sessions that this application currently has open with the token hardwareversion: hardware version number, for example, 8.3 (major=0x08, minor=0x03), which are the version numbers of the certificate and key databases, respectively.
FC_Logout
description logs the current user out of a user_functions session.
NSS_Initialize
nss_init_reserved - currently has no effect, but may be used in the future to trigger better cooperation between pkcs#11 modules used by both nss and the java sunpkcs11 provider.
NSS functions
mxr 3.2 and later pk11_getbestslot mxr 3.2 and later pk11_getbestslotmultiple mxr 3.2 and later pk11_getbestwrapmechanism mxr 3.2 and later pk11_getblocksize mxr 3.2 and later pk11_getcertfromprivatekey mxr 3.9.3 and later pk11_getcurrentwrapindex mxr 3.2 and later pk11_getdefaultarray mxr 3.8 and later pk11_getdefaultflags mxr 3.8 and later pk11_getdisabledreason mxr 3.8 and later pk11_getfirstsafe mxr 3.2 and later pk11_getinternalkeyslot mxr 3.2 and later pk11_ge...
NSS tools : crlutil
on windows nt the default is the current directory.
NSS tools : ssltab
if the tool detects a certificate chain, it saves the der-encoded certificates into files in the current directory.
NSS tools : ssltap
if the tool detects a certificate chain, it saves the der-encoded certificates into files in the current directory.
troubleshoot.html
the current workaround is to use some other shell in place of shmsdos, such as sh.exe, which should be distributed with the cygnus toolkit you installed to build nss.
OLD SSL Reference
upgraded documentation may be found in the current nss reference ssl reference newsgroup: mozilla.dev.tech.crypto writer: sean cotter manager: wan-teh chang chapter 1 overview of an ssl application ssl and related apis allow compliant applications to configure sockets for authenticated, tamper-proof, and encrypted communications.
gtstd.html
upgraded documentation may be found in the current nss reference getting started with ssl chapter 2 getting started with ssl this chapter describes how to set up your environment, including certificate and key databases.
sslkey.html
upgraded documentation may be found in the current nss reference key functions chapter 6 key functions this chapter describes two functions used to manipulate private keys and key databases such as the key3.db database provided with communicator.
ssltyp.html
upgraded documentation may be found in the current nss reference selected ssl types and structures chapter 3 selected ssl types and structures this chapter describes some of the most important types and structures used with the functions described in the rest of this document, and how to manage the memory used for them.
NSS Tools crlutil
on windows nt the default is the current directory.
NSS Tools ssltap
if the tool detects a certificate chain, it saves the der-encoded certificates into files in the current directory.
NSS tools : crlutil
MozillaProjectsNSStoolscrlutil
on windows nt the default is the current directory.
NSS tools : ssltap
MozillaProjectsNSStoolsssltap
if the tool detects a certificate chain, it saves the der-encoded certificates into files in the current directory.
Network Security Services
getting started nss releases this page contains information about the current and past releases of nss.
Necko Architecture
architecture after a few iterations of our original design, the current necko architecture looks something like this: urls necko's primary responsibility is moving data from one location, to another location.
Necko FAQ
currently you'd need to get the mozilla tree and at least build nspr, and xpcom.
Necko
currently the library is built as part of the mozilla distribution.
Tutorial: Embedding Rhino
this removes the association between the context and the current thread and is an essential cleanup action.
Rhino license
license for portions of the rhino debugger additionally, some files (currently the contents of toolsrc/org/mozilla/javascript/tools/debugger/treetable/) are available under the following license: * copyright 1997, 1998 sun microsystems, inc.
Rebranding SpiderMonkey (1.8.5)
we need to perform a recursive find and replace text operation on all files in the current directory.
SpiderMonkey Build Documentation
for a list of other available build options, type (assuming the current working directory is one of the above-created build directories): /bin/sh ../configure.in --help generating a compilation database some tools (like ides, static analyzers and refactoring tools) consume a file called compile_commands.json which contains a description of all the pieces required to build a piece of software so that tools don't have to also understand a build system.
GC Rooting Guide
there are currently no convenience typedefs for js::heap<t>.
How to embed the JavaScript engine
[mac] clang++ -std=c++11 -i<objdir>/dist/include -l<objdir>/dist/lib helloworld.cpp -o helloworld -lmozjs-31 -lz [linux] g++ -std=c++11 -i<objdir>/dist/include -l<objdir>/dist/lib helloworld.cpp -o helloworld -lmozjs-31 -lz -lpthread -ldl it should print "helloworld, it is time" (here time is the current time).
Exact Stack Rooting
caveats exact rooting transition period exact stack rooting is not currently enabled by default: we are still using conservative scanning.
Self-hosted builtins in SpiderMonkey
these docs describe the current state as of nightly 45.
JIT Optimization Strategies
optimization information is currently collected for the following operations: getproperty (obj.prop) setproperty (obj.prop = val) getelement (obj[elemname]) setelement (obj[elemname] = val) call (func(...)) at each operation site, ionmonkey tries a battery of strategies, from the most optimized but most restrictive to the least optimized but least restrictive.
JS::Call
thisobj js::handleobject / js::handlevalue the "current" object on which the function operates; the object specified here is "this" when the function executes.
JS::SetOutOfMemoryCallback
added in spidermonkey 38 description unlike the error reporter, which is only called if the exception for an oom bubbles up and is not caught, the js::outofmemorycallback is called immediately at the oom site to allow the embedding to capture the current state of heap allocation before anything is freed.
JSClass.flags
if this class has a finalizer that can be safely run concurrently with the main thread then this option can be specified.
JSConstDoubleSpec
obsolete since jsapi 35 currently these can be 0 or more of the following values or'd: jsprop_enumerate: property is visible in for loops.
JSFastNative
js_rval(cx, vp) returns the jsval that is currently in the return-value slot.
JSObjectOps.getAttributes
returns js_false on error or exception, else js_true with current attributes in *attrsp.
JSObjectPrincipalsFinder
for example, when a watchpoint triggers, the engine calls the callback, passing the watchpoint handler, to ensure that watchpoint handlers are invoked only when the watcher is permitted to watch the currently executing script.
JSSecurityCallbacks.contentSecurityPolicyAllows
description check whether runtime code generation is allowed for the current global.
JS_CallFunction
obj js::handleobject the "current" object on which the function operates; the object specified here is "this" when the function executes.
JS_ConvertArguments
if an asterisk (*) is present in format, it tells the conversion routine to skip converting the current argument.
JS_DefineElement
getter jsnative or jspropertyop getproperty method for retrieving the current property value.
JS_DefineProperty
these functions can currently replace jsprop_permanent properties, but such usage is deprecated.
JS_DefinePropertyWithTinyId
getter jspropertyop getproperty method for retrieving the current property value.
JS_DestroyScript
the script must not be currently executing (in any context, at any level of the stack) and must not be used again afterwards.
JS_EnterCrossCompartmentCall
description every jscontext has a current compartment.
JS_Enumerate
as long as obj is reachable, its current property ids are reachable.
JS_ExecuteScript
if the script is cross-compartment, it is cloned into the current compartment before executing.
JS_GetErrorPrototype
description js_geterrorprototype returns the original value of error.prototype from the global object of the current compartment of cx.
JS_GetGlobalForCompartmentOrNull
see also mxr id search for js_getglobalforcompartmentornull js_getglobalforobject js::currentglobalornull bug 687724 ...
JS_GetGlobalObject
someone should document common use case "giving the global object a name", which can be done with js_getglobalobject and js_setproperty see also mxr id search for js_getglobalobject js_getglobalforobject js_getglobalforscopechain js::currentglobalornull bug 868110 ...
JS_GetImplementationVersion
syntax const char * js_getimplementationversion(void); description js_getimplementationversion returns a hard-coded, english language string that specifies the version number of the js engine currently in use, and its release date.
JS_GetInstancePrivate
note that if obj is an instance of clasp, but there is no private data currently associated with the object, or the object cannot have private data, js_getinstanceprivate also returns null.
JS_GetLocaleCallbacks
js_getlocalecallbacks returns the address of the current locale callbacks struct, which may be nullptr.
JS_GetOptions
get the currently enabled jscontext options.
JS_GetSecurityCallbacks
js_getsecuritycallbacks returns the runtime's current security callbacks.
JS_GetVersion
description js_getversion returns the javascript version currently used by the given jscontext, cx.
JS_Init
it is currently not possible to initialize spidermonkey multiple times (that is, calling js_init, jsapi methods, then js_shutdown in that order, then doing so again).
JS_IsAssigning
syntax jsbool js_isassigning(jscontext *cx); name type description description js_isassigning returns true if a script is executing and its current bytecode is a set (assignment) operation, even if there are native (no script) stack frames between the script and the caller to js_isassigning.
JS_IsConstructing
determine whether the currently executing jsnative was called as a constructor.
JS_LeaveCrossCompartmentCall
description every jscontext has a current compartment.
JS_LookupProperty
do not automatically infer and enable other flags by looking at the currently executing bytecode.
JS_ReportError
this function can also raise a javascript exception which a currently executing script can catch.
JS_ReportErrorNumber
description these functions create a jserrorreport, populate it with an error message obtained from the given jserrorcallback, and either report it to the current error reporter callback or create an error object and set it as the pending exception.
JS_RestoreExceptionState
if any exception was pending when js_saveexceptionstate was called, the same exception will be set to pend for the current context.
JS_SaveExceptionState
description saves the current exception state (that is, any pending exception, or a cleared exception state) associated with the specified context cx, and returns a jsexceptionstate object holding this state.
JS_SetBranchCallback
this is the context that is currently executing the code that triggered the callback.
JS_SetGCCallback
during each complete garbage collection cycle, the current gc callback is called four times: jsgc_begin start of gc.
JS_SetGCZeal
(in a debug build of gecko, you can also set the current gc zeal level using the javascript.options.gczeal preference.) see also mxr id search for js_setgczeal mxr id search for js_gc_zeal js_schedulegc bug 308429 bug 650978 ...
JS_SetInterruptCallback
(in this case, the callback may terminate the script by returning false.) js_getinterruptcallback returns the currently installed interrupt callback, or null if none is currently installed.
JS_SetOptions
note that you may currently (jan 2009) experience bugs with this option enabled.
JS_SetParent
applications that use spidermonkey's security features typically use the parent relation to determine both (a) what security principals are attached to the currently executing script; and (b) what security principals are attached to the object being accessed.
JS_ShutDown
it is currently not possible to initialize spidermonkey multiple times (that is, calling js_init, then other jsapi methods, then js_shutdown in that order, then doing so again).
JS_ThrowStopIteration
description js_throwstopiteration throws the appropriate stopiteration object for the function currently executing in cx.
JS_malloc
implementation note: currently these four functions are implemented using the corresponding standard c functions.
Stored value
for a data property, this is exactly the same thing as the property's current value.
JSAPI reference
ptions obsolete since jsapi 27 enum jsversion jsversion_ecma_3 jsversion_1_6 jsversion_1_7 jsversion_1_8 jsversion_ecma_5 jsversion_default jsversion_unknown jsversion_latest js_getimplementationversion js_getversion js_setversionforcompartment added in spidermonkey 31 js_stringtoversion js_versiontostring js_setversion obsolete since jsapi 25 js::currentglobalornull added in spidermonkey 31 js_getglobalforscopechain obsolete since jsapi 25 js_getglobalobject obsolete since jsapi 24 js_setglobalobject obsolete since jsapi 25 js_initclass js_initstandardclasses js_resolvestandardclass js_enumeratestandardclasses js_enumerateresolvedstandardclasses obsolete since jsapi 24 js_isrunning js_saveframechain js_restoreframechain ...
Profiling SpiderMonkey
costs of thread safety currently, threadsafe spidermonkey costs us 10-15% on some benchmarks vs.
SpiderMonkey 1.8.8
currently only versions of visual studio prior to 2010 (also known as version 10) are known to be deficient in this manner, so the custom implementation (which is compatible with the one shipped in visual studio 2010 and later) is only invoked for those compilers.
SpiderMonkey 17
currently only versions of visual studio prior to 2010 (also known as version 10) are known to be deficient in this manner, so the custom implementation (which is compatible with the one shipped in visual studio 2010 and later) is only invoked for those compilers.
SpiderMonkey 24
currently only versions of visual studio prior to 2010 (also known as version 10) are known to be deficient in this manner, so the custom implementation (which is compatible with the one shipped in visual studio 2010 and later) is only invoked for those compilers.
SpiderMonkey 45
js_setcurrentembeddertimefunction (bug 1159507) js_getcurrentembeddertime (bug 1159507) js_mayresolvestandardclass (bug 1155946) js_getiteratorprototype (bug 1225392) js_globallexicalscope (bug 1202902) js_hasextensiblelexicalscope (bug 1202902) js_extensiblelexicalscope (bug 1202902) js_initreflectparse (bug 987514) js::toprimitive (bug 1206168) js::getfirstargumentastypehint (bug 1054756) js::objec...
SpiderMonkey releases
the easiest way to fetch the version corresponding to the current firefox release is to visit the treeherder page for the release repository and click on the first sm(pkg) link you see.
SavedFrame
capturing savedframe stacks from c++ use js::capturecurrentstack declared in jsapi.h.
SpiderMonkey: The Mozilla JavaScript runtime
spidermonkey internals: gc separate internals article on the gc spidermonkey internals: hacking tips collection of helpful tips & tools for hacking on the engine related topics javascript foss projects using or based on spidermonkey releases spidermonkey release notes current and past versions: 52, 45, 38, 31, 24, 17 community mailing list spidermonkey questions on stack overflow report a bug ...
TPS Tests
data definitions/asset list (optional, but all current tests have them).
WebReplayRoadmap
currently, only the debugger, console, and inspector developer tools will work correctly in a recording/replaying tab, and some features of these panels will not work, or will not work in the same way as when a normal tab is being debugged.
Zest tools
the following tools currently support zest: owasp zed attack proxy the zap add-on allows the user to create, edit and run zest scripts.
Mozilla Projects
shumway this article will help you understand shumway — mozilla's open standards-based flash renderer — and what it means for the community of developers currently creating the adobe flash platform.
Redis Tips
*/ if(err) throw err; /** * if results === null, it means that a concurrent client * changed the key while we were processing it and thus * the execution of the multi command was not performed.
Secure Development Guidelines
tion on specific security issues cover common coding mistakes and how they affect a product how to avoid making them how to mitigate them everything is oriented toward c/c++ introduction: gaining control specifics about the underlying architecture, using x86 as an example 6 basic registers (eax, ebx, ecx, edx, edi, esi) 2 stack-related registers (esp, ebp) mark top and bottom of current stack frame status register (eflags) contains various state information instruction pointer (eip) points to register being executed; can’t be modified directly introduction: gaining control (2) eip is modified using call or jump instructions attacks usually rely on obtaining control over the eip otherwise the attacker can try to control memory pointed to by a...
Handling Mozilla Security Bugs
applicants for membership must have someone currently in the security bug group who is willing to vouch for them and nominate them for membership.
Gecko states
ext_state_supports_autocompletion for editable areas that have any kind of autocompletion ext_state_defunct object no longer exists ext_state_selectable_text for text which is selectable, object must implement nsiaccessibletext ext_state_editable implements nsiaccessibleeditabletext ext_state_active this window is currently the active window ext_state_modal must do something with control before leaving it ext_state_multi_line edit control that can take multiple lines ext_state_horizontal uses horizontal layout ext_state_opaque indicates this object paints every pixel within its rectangular region ext_state_single_line this text object can only contain 1 line of text ext_state_transient ext_state_ver...
Implementation Details
msaa at-spi how to find the content window and load the document in xul-based clients, screen readers may need to find the content window so that they know where to start grabbing the accessible tree, in order to load the current document into a buffer in their own process.
XUL Accessibility
<label value="it's label for control" control="control" /> <hbox role="grouping" id="control" /> get tooltiptext attribute if the element is anonymous child of the element that is the direct child of toolbaritem element or the element is direct child of toolbaritem element then title attribute of toolbaritem element is used (currently it's used in firefox ui only) if the element has aria role and the role allows to aggregate name from subtree of element then generate name from subtree of the element description the following rules to generate accessible description are applied: check aria-describedby attribute, description is generated from elements pointed by aria-describedby attribute <description id="descr1">label1</...
Mork
MozillaTechMork
a minus before the table id indicates that all the rows currently stored in the table should be removed before adding more rows.
History Service Design
if a page can be added we first check if it exists already, then it is added or updated accordingly to the previous check, and common attributes are set based on concurrent visit properties.
Manipulating bookmarks using Places
you can fetch the current title of an item using the nsinavbookmarksservice.getitemtitle() method: var thistitle = bmsvc.getitemtitle(newbkmkid); this code will display an alert containing the title of the item referenced by the id newbkmkid.
Using the Places favicon service
currently, the default expiration time is set to one day in the future.
Using the Places history service
currently, this is used to store whether there was a scrollbar, which allows more efficient layout if the page is revisited.
Using the Places keywords API
keywords in firefox are currently created through the add keyword for this search contextual menu option in form text fields.
Using the Places tagging service
current tags set for the url persist, and tags which are already set for the given url are ignored.
STEEL
currently, steel has an steeliapplication interface that implements all the functions of extiapplication.
extIApplication
activewindow readonly attribute fueliwindow the currently active browser window.
extIExtension
enabled readonly attribute boolean true if the extension is currently enabled.
XML Extras
nsidomserializer (currently, the javascript constructor is xmlserializer()) nsidomparser (currently, the javascript constructor is domparser()) nsixmlhttprequest please see the xml linking and pointing section in xml in mozilla document for fixptr and xpointer documentation.
Binary compatibility
if mozilla decides to upgrade to a compiler that does not have the same abi as the current version, any built component may fail.
Bundling multiple binary components
the stub component is an xpcom component itself and when registered by xpcom, the code would sniff the runtime version and operating system then the stub load the appropriate "real" xpcom component for the current configuration.
XPCOM array guide
MozillaTechXPCOMGuideArrays
these enumerators maintain state about the current position in the array.
How to build an XPCOM component in JavaScript
note: (the -i flag is an uppercase i, not a lowercase l.) this will create the typelib file helloworld.xpt in the current working directory.
An Overview of XPCOM
currently you can write components in c, c++, or javascript (and sometimes python or java, depending on the state of the respective bindings), and there are efforts underway to build xpcom bindings for ruby and perl as well.
Component Internals
component discovery does not currently happen automatically in non-debug builds of gecko, however.
Creating the Component Code
what we'll be working on the component we'll be working on in this book controls a special mode in your browser that prevents users from leaving the current domain or a set of safe domains.
Finishing the Component
currently, the weblock implementation of the shouldload method compares the in parameter with each string in the white list.
Resources
linux: http://ftp.mozilla.org/pub/mozilla/releases/mozilla1.4a/gecko-sdk-i686-pc-linux-gnu-1.4a.tar.gz windows: http://ftp.mozilla.org/pub/mozilla/releases/mozilla1.4a/gecko-sdk-win32-1.4a.zip other mozilla downloads gecko resources internal string guide external string guide the gecko networking library ("necko") the netscape portable runtime environment embedding mozilla current module owners xpinstall xul xpcom resources the xpcom project page xulplanet's online xpcom reference information on xpconnect and scriptable components the smart pointer guide xpidl xpidl compiler reference general development resources the world wide web consortium url specification at the w3 gnu make « previous copyright (c) 2003 by doug turner and ian oeschger.
Using XPCOM Utilities to Make Things Easier
// in idl: method(in acstring thing); char* str = "how now brown cow?"; nsembedcstring data(str); rv = object->method(data); in this next example, the method is going to set the value of the string - as it might need to do when it returns the name of the current user or the last viewed url.
Making cross-thread calls using runnables
#include "nsthreadutils.h" class piresulttask : public nsrunnable { public: piresulttask(picallback callback, const nsacstring& result) : mcallback(callback) , mresult(result) , mworkerthread(do_getcurrentthread()) { moz_assert(!ns_ismainthread()); // this should be running on the worker thread } ns_imethod run() { moz_assert(ns_ismainthread()); // this method is supposed to run on the main thread!
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
they can also report their current position in the file.
How to build a binary XPCOM component using Visual Studio
recap: use the right gecko sdk for your xulrunner release use a microsoft compiler use pre-built glib-1.2.dll & libidl-0.6.dll libraries from wintools.zip download the sample project here is what the folder structure looks like: create a vc++ project visual studio project and file templates (or wizards) for creating xpcom modules and components do not currently exist.
Introduction to XPCOM for the DOM
since nsfoo implements nsifoo2, ifooptr2 will be assigned the address of the current instance of nsfoo.
Components.Exception
ception([ message [, result [, stack [, data ] ] ] ]); parameters message a string which can be displayed in the error console when your exception is thrown or in other developer-facing locations, defaulting to 'exception' result the nsresult value of the exception, which defaults to components.results.ns_error_failure stack an xpcom stack to be set on the exception (defaulting to the current stack chain) data any additional data you might want to store, defaulting to null example throw components.exception("i am throwing an exception from a javascript xpcom component."); ...
Components.returnCode
note that components.returncode is currently non-functional due to bug 287107.
Components.stack
components.stack is a read only property of type nsistackframe (idl definition) that represents a snapshot of the current javascript callstack.
Components.utils.Sandbox
example executing in current tab scope more ways to load scripts into a sandbox can be found on the loading scripts page.
Components.utils.exportFunction
the following options are currently defined: defineas: determines the name of the function in targetscope.
Components.utils.setGCZeal
this method calls through to that thusly: js_setgczeal(<current context>, zeal, js_default_zeal_freq, false); syntax components.utils.setgczeal(zeal); where zeal is the zeal value you wish to use.
Components.utils.unload
example you can unload a module called mymodule.jsm using the following line of code: components.utils.unload("resource://myaddon/modules/mymodule.jsm"); note: currently components.utils.unload clears the global object of an unloaded module.
PyXPCOM
current releases are now integrated with the mozilla build system.
XPConnect wrappers
note that a previous version of the current page recommended using __exposedprops__ to expose objects from chrome to content.
nsIRegistry
try { st.first(); do { var data = st.currentitem(); if( data instanceof ci.nsiregistrynode ) print("nsiregistrynode: " + data.nameutf8 + " (" + data.key + ")"); st.next(); } while( components.lastresult == 0 ); } catch(e) {} now, the output is something like: profiles (344) profiles/default (530) profiles/foo (1046) profiles/bar (1518) the number inside the parenthesis is the "key." you can use this key with the rest of th...
HOWTO
put the following at the end of your script: // do async processing // from <https://developer.mozilla.org/en/xpconnect/xpcshell/howto> print("doing async work"); gscriptdone = false; var gthreadmanager = cc["@mozilla.org/thread-manager;1"] .getservice(ci.nsithreadmanager); var mainthread = gthreadmanager.currentthread; while (!gscriptdone) mainthread.processnextevent(true); while (mainthread.haspendingevents()) mainthread.processnextevent(true); 2.
XPCshell Test Manifest Expressions
note that it currently seems like neither this list nor the one on the official docs is exhaustive, so if you need something and it's not here, best check the source code!
nsDirectoryService
for instance, it can give you the path of the system's temporary directory, desktop directory, current working directory, and so on.
Standard XPCOM components
for instance, it can give you the path of the system's temporary directory, desktop directory, current working directory, and so on.nslocalfilea component implementing nsilocalfile.
NS_InitXPCOM2
pass null to specify that the current working directory should be used.
NS_InitXPCOM3
pass null to specify that the current working directory should be used.
Folders
there are currently three folder classes - nslocalmailfolder, nsimapmailfolder, and nsnewsfolder.
NS_ConvertASCIItoUTF16
if size_type(-1) is passed for newlen, then the current length of the string is used.
NS_ConvertUTF16toUTF8
if size_type(-1) is passed for newlen, then the current length of the string is used.
NS_ConvertUTF8toUTF16
if size_type(-1) is passed for newlen, then the current length of the string is used.
NS_LossyConvertUTF16toASCII
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsACString_internal
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsAString_internal
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsAdoptingCString
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsAdoptingString
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsAutoString
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsCAutoString
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsCString
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsCountedRef
nscountedref differs from nsautoref in that nscountedref constructors add a reference to the resource, and in that nscountedref provides copy construction< and assignment operators enabling more than one concurrent reference to the same resource.
nsDependentCString
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsDependentCSubstring
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsDependentString
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsDependentSubstring
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsFixedCString
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsFixedString
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsPromiseFlatCString
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsPromiseFlatString
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsString
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsXPIDLCString
if size_type(-1) is passed for newlen, then the current length of the string is used.
nsXPIDLString
if size_type(-1) is passed for newlen, then the current length of the string is used.
IAccessibleComponent
they differ in their respective origin: the screen coordinate system has its origin in the upper left corner of the current screen.
amIWebInstallListener
onwebinstalldisabled() called when installation by websites is currently disabled.
amIWebInstallPrompt
toolkit/mozapps/extensions/amiwebinstalllistener.idlscriptable called when installation by websites is currently disabled.
imgIRequest
getstaticrequest() if this request is for an animated image, the method creates a new request which contains the current frame of the image.
mozIAsyncFavicons
however, if no favicon data is currently associated with the favicon uri, adatalen will be 0, adata will be an empty array, and amimetype will be an empty string.
mozIPlacesAutoComplete
methods registeropenpage() mark a page as being currently open.
mozIStorageVacuumParticipant
note: if the database is using the wal journal node and the current page size is not the expected one, the journal node will be changed to truncate because wal doesn't allow page size changes.
nsIAccessNode
language domstring the language for the current dom node, for example en, de, and so on.
ExtendSelection
« nsiaccessible page summary this method extends the current selection from its current accessible anchor node to this accessible.
GetRelation
remark currently we do not support multiple relations so the zero index may be valid only.
GroupPosition
void groupposition( out long agrouplevel, out long asimilaritemsingroup, out long apositioningroup ); parameters agrouplevel 1-based, similar to aria aria-level property asimilaritemsingroup 1-based, similar to aria aria-setsize property, inclusive of the current item.
nsIAppShellService
toplevelwindowismodal() obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) the appshell service needs to be informed of modal xul windows currently open.
nsIBadCertListener2
targetsite the site name that was used to open the current connection.
nsICache
if you make a request for only write access to a cache entry and another descriptor with write access is currently open, then the existing cache entry will be 'doomed', and you will be given a descriptor (with write access only) to a new cache entry.
nsICacheVisitor
return value returns true to visit the next entry on the current device, or if the end of the device has been reached, advance to the next device, otherwise returns false to advance to the next device.
nsICategoryManager
erfaces.nsicategorymanager); var enumerator = categorymanager.enumeratecategory("app-startup"); var entries = []; while (enumerator.hasmoreelements()) { var item = enumerator.getnext(); var entry = item.queryinterface(components.interfaces.nsisupportscstring) entries.push(entry.tostring()); } entries.sort(); var entriesstring = entries.join("\n"); dump(entriesstring + "\n"); disable currently loaded plugins by type this snippet here shows how to disable plugins that are currently loaded for the file type of pdf.
nsIClipboardOwner
the nsiclipboardowner interface notifies the clipboard owner about the current status of ownership of the clipboard transferable at given situation and time.
nsICommandLine
use this property instead of the working directory for the current process, since a redirected command line may have had a different working directory.
nsIConsoleService
there are quite a few category strings and they do not currently seem to be listed in a single place.
nsIContentFrameMessageManager
attributes content nsidomwindow: the current top level window in the frame or null.
nsIContentPrefObserver
oncontentprefset() called when the value of a preference is set (either by changing its current value or by creating the preference).
nsIContentSecurityPolicy
refinepolicy() updates the policy currently stored in the content security policy to be "refined" or tightened by the one specified in the string policystring.
nsIContentView
note: currently, only <frame> and <iframe> elements are handled as content views.
nsIController
return value return true if the specified command is currently available to be used; otherwise, it should return false.
nsIConverterInputStream
this is currently set to 8192 bytes.
nsICookieManager2
aissession true if the cookie should exist for the current session only.
nsICookiePromptService
return value returns 0 for denying a cookie, 1 for accepting a cookie, and 2 for accepting cookie for the current session only.
nsIDNSService
example let dnsservice = components.classes["@mozilla.org/network/dns-service;1"] .createinstance(components.interfaces.nsidnsservice); let thread = components.classes["@mozilla.org/thread-manager;1"] .getservice(components.interfaces.nsithreadmanager).currentthread; let host = "www.mozilla.org"; let listener = { onlookupcomplete: function(request, record, status) { if (!components.issuccesscode(status)) { // handle error here return; } let address = record.getnextaddrasstring(); console.log(host + " = " + address); } }; dnsservice.asyncresolve(host, 0, listener, thread); ...
nsIDOMFile
note that in gecko, this interface currently inherits from nsisupports, but in the file api specification, it should be a blob.
nsIDOMOfflineResourceList
onupdateready nsidomeventlistener an event listener to be called when a resource update is ready; this event is not currently used since versioned application caches aren't supported yet.
nsIDOMWindowInternal
opener nsidomwindowinternal returns a reference to the window that opened this current window.
nsIDirectoryIterator
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void init(in nsifilespec parent, in boolean resolvesymlink); boolean exist(); void next(); attributes attribute type description currentspec nsifilespec init() void init( in nsifilespec parent, in boolean resolvesymlink ); parameters parent resolvesymlink exist() boolean exists(); next() void next(); ...
getFile
c constant string value notes ns_os_home_dir "home" ns_os_temp_dir "tmpd" ns_os_current_working_dir "curworkd" ns_os_desktop_dir "desk" otherwise same as home ns_os_current_process_dir "curprocd" ns_xpcom_current_process_dir "xcurprocd" can be overriden by passing a "bin directory" to ns_initxpcom2().
nsIDirectoryServiceProvider2
if you are implementing this from js, you would be using components.returncode, but sadly this does not currently work (see bug 287107).
nsIDownload
state short the downloads current state.
nsIDownloadHistory
if the start time is not given, the current time is used.
nsIDownloadManagerUI
exceptions thrown ns_error_unexpected the user interface isn't currently open.
nsIEditorIMESupport
native code only!getpreferredimestate get preferred ime status of current widget.
nsIEffectiveTLDService
the tld space is currently expanding at a fairly great rate, and the copy of the psl firefox has may not be totally up to date (because it's not dynamically updated data).
nsIEnumerator
sample usage var iter = --------(); try { iter.first(); do { var data = iter.currentitem(); if( data instanceof ci.nsi------ ) { ...
nsIEnvironment
xpcom/threads/nsienvironment.idlscriptable scriptable access to the current process environment.
nsIEventListenerService
the objects are the ones that would be used as event.currenttarget while dispatching an event to aeventtarget.
nsIExternalProtocolService
isexposedprotocol() check whether a handler for a specific protocol is "exposed" as a visible feature of the current application.
nsIFactory
iid the iid of the interface being requested in the component which is being currently created.
nsIFrameLoaderOwner
ns_error_not_implemented if the swapping logic is not implemented for the either the current frame loader owner or the specified one with which you're trying to swap.
nsIGeolocationProvider
the nsigeolocationprovider interface provides information about the current users location to interested parties via nsigeolocationupdate.
nsIHttpServer
* @param path * the absolute path on the server against which requests will be served * from dir (e.g., "/", "/foo/", etc.); must begin and end with a forward * slash * @param dir * the directory to be used to serve all requests for paths underneath path * (except those further overridden by another, deeper path registered with * another directory); if null, any current mapping for the given path is * removed * @throws ns_error_invalid_arg * if dir is non-null and does not exist or is not a directory, or if path * does not begin with and end with a forward slash */ void registerdirectory(in string path, in nsifile dir); /** * associates files with the given extension with the given content-type when * served by this server, in the...
nsILivemarkService
ns_error_malformed_uri if the site uri annotation has somehow been corrupted (and can't be turned into an nsiuri) getlivemarkidforfeeduri() determines whether the feed uri is a currently registered livemark.
nsILocalFileMac
constants constant value description current_process_creator 0x8000000 use with setfiletype() to specify the signature of current process.
nsILoginManagerIEMigrationHelper
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void migrateandaddlogin(in nsilogininfo alogin); methods migrateandaddlogin() takes a login provided from nsieprofilemigrator, migrates it to the current login manager format, and adds it to the list of stored logins.
nsIMacDockSupport
if false, the application is only activated if other applications are not currently active.
nsIMemoryReporterManager
return value an enumerator of nsimemorymultireporters that are currently registered.
nsIMenuBoxObject
onkey 1.0) to get access to the box object for a given menu, use code like this: var boxobject = xulmenu.boxobject.queryinterface(components.interfaces.nsimenuboxobject); method overview boolean handlekeypress(in nsidomkeyevent keyevent); void openmenu(in boolean openflag); attributes attribute type description activechild nsidomelement the currently active menu or menuitem child of the menu box.
nsIMessageWakeupService
currently, services must expose a wrappedjsobject in order to support this; however, once bug 593407 is fixed, the service to be woken up must implement nsiframemessagelistener.
nsIMimeConverter
thunderbird provides a utility function which performs this for the currently selected message: markcurrentmessageasread().
nsIMsgCompFields
(bug 68784) messageid char * needtocheckcharset prbool indicates whether we need to check if the current documentcharset can represent all the characters in the message body.
nsIMsgDatabase
out octetptr key, out unsigned long len); comparecollationkeys() [noscript] long comparecollationkeys(in octetptr key1, in unsigned long len1, in octetptr key2, in unsigned long len2); getnewlist() the list of messages currently in the new state.
nsIMsgIdentity
signature nsilocalfile the file containing the current signature.
nsIMsgIncomingServer
loginatstartup boolean logonfallback boolean maxmessagesize long offlinesupportlevel long password acstring passwordpromptrequired boolean if the password for the server is available either via authentication in the current session or from password manager stored entries, return false.
nsINavHistoryQueryOptions
note: currently, only bookmark folder containers support being opened asynchronously.
nsINavHistoryResult
changing this value updates the corresponding options for the result so that reusing the current options and queries will always return results based on the current view.
nsINavHistoryResultViewObserver
boolean candrop( in long index, in long orientation ); parameters index the item over which the drag is currently located.
nsINavHistoryService
currently, history is disabled if the browser.history_expire_days pref is "0".
nsIPluginHost
void reloadplugins( in boolean reloadpages ); parameters reloadpages indicates whether currently visible pages should also be reloaded.
nsIPrefBranch2
the nsprefbranch object listens for xpcom-shutdown and frees all of the objects currently in its observer list.
nsIPrintingPrompt
the current default implementation for windows display a native print dialog but a xul-based progress dialog.
nsIPromptService
constant value description button_title_ok 1 these flags are used to select standard labels from the user's current locale.
nsIProtocolHandler
current versions of firefox assume that the uri has uri_loadable_by_anyone set, but this will not work starting with the mozilla 2 platform.
nsIProtocolProxyService
see nsiproxyinfo for currently defined flags.
nsIRadioInterfaceLayer
ed long long processid); void setupdatacall(in long radiotech, in domstring apn, in domstring user, in domstring passwd, in long chappap, in domstring pdptype); void starttone(in domstring dtmfchar); void stoptone(); void unregistercallback(in nsiriltelephonycallback callback); void unregisterdatacallcallback(in nsirildatacallback callback); attributes attribute type description currentstate jsval read only.
nsISHistoryListener
onhistoryreload() called when the current document is reloaded, for example due to an nsiwebnavigation.reload() call.
nsISSLErrorListener
targetsite the site name that was used to open the current connection.
nsIScreen
rotation unsigned long the screen's current rotation; you may set this to any of the values listed in screen rotation constants.
nsIScriptableInputStream
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview unsigned long available(); void close(); void init(in nsiinputstream ainputstream); string read(in unsigned long acount); acstring readbytes(in unsigned long acount); methods available() return the number of bytes currently available in the stream.
nsIScriptableUnicodeConverter
astring convertfrombytearray([const,array,size_is(acount)] in octet adata, in unsigned long acount); void converttobytearray(in astring astring,[optional] out unsigned long alen,[array, size_is(alen),retval] out octet adata); nsiinputstream converttoinputstream(in astring astring); attributes attribute type description charset string current character set.
nsISelectionImageService
void getimage( in short selectionvalue, out imgicontainer container ); parameters selectionvalue container reset() the current image is marked as invalid.
nsISmsService
hassupport() checks if the current platform has sms support.
nsISocketTransportService
currently "starttls", "ssl" and "udp" are supported.
nsIStreamConverter
stream converter users there are currently two ways to use a stream converter: synchronous: stream to stream.
nsITaggingService
current tags set for the url persist.
nsITaskbarPreview
method overview void invalidate(); attributes attribute type description active boolean indicates whether or not the preview is marked as active (currently selected) in the taskbar.
nsITraceableChannel
method overview nsistreamlistener setnewlistener(in nsistreamlistener alistener); methods setnewlistener() replaces the channel's current listener with a new one, returning the listener previously assigned to the channel.
nsITransactionList
note that currently there is no requirement for a transactionmanager implementation to associate a toplevel nsitransaction with a batch so it is possible for itemisbatch to return true and getitem() to return null.
nsITransferable
note: currently, this can only be used on windows (in order to support network principal information in drag operations).
nsITreeBoxObject
focused boolean whether or not we are currently focused.
nsIUpdatePatch
selected boolean true if this patch is currently selected as the patch to be downloaded and installed for this update transaction.
nsIUserInfo
toolkit/components/startup/public/nsiuserinfo.idlscriptable these are things the system may know about the current user.
nsIWebProgress
isloadingdocument prbool indicates whether or not a document is currently being loaded in the context of this nsiwebprogress instance.
nsIWifiAccessPoint
signal long the current signal strength in dbm.
nsIWifiListener
void onchange( [array, size_is(alen)] in nsiwifiaccesspoint accesspoints, in unsigned long alen ); parameters accesspoints an array of nsiwifiaccesspoint objects representing all currently-available wifi access points.
nsIWinTaskbar
this method is currently known to crash if used under certain conditions.
nsIWindowMediator
tion () { domwindow.alert('tab was selected') }, false); } }, false); }, onclosewindow: function (awindow) {}, onwindowtitlechange: function (awindow, atitle) {} }; //to register services.wm.addlistener(windowlistener); //services.wm.removelistener(windowlistener); //once you want to remove this listener execute removelistener, currently its commented out so you can copy paste this code in scratchpad and see it work native code only!calculatezposition a window wants to be moved in z-order.
nsIWindowsRegKey
constant value description root_key_classes_root 0x80000000 root_key_current_user 0x80000001 root_key_local_machine 0x80000002 access constants values for the mode parameter passed to the open() and create() methods.
nsIXPCException
message - a custom message set by the thrower (defaults to 'exception') result - the nsresult associated with this exception (defaults to components.results.ns_error_failure) stack - the stack chain (defaults to the current stack) data - additional data object of your choice (defaults to null) inner - an inner exception that triggered this, if available ...
nsIXULAppInfo
example display the application and the gecko version in an alert box: var info = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixulappinfo); alert("application version: " + info.version + "\n" + "gecko version: " + info.platformversion); example this example here uses nsixulappinfo to get the version of the current browser and then compares it: example - compare current browser version see also using nsixulappinfo nsixulruntime get thunderbird version firefox code snippets ...
nsIXULTemplateQueryProcessor
currently, the datasource supplied to the methods will always be an nsirdfdatasource or a dom node, and will always be the same one in between calls to initializeforbuilding() and done().
nsMsgFolderFlagType
* (note that directories may have zero children.) */ const nsmsgfolderflagtype directory = 0x00000008; /** whether the children of this folder are currently hidden in the listing.
XPCOM Interface Reference
rvicensicontentprefservice2nsicontentsecuritypolicynsicontentsniffernsicontentviewnsicontentviewmanagernsicontentviewernsicontrollernsicontrollersnsiconverterinputstreamnsiconverteroutputstreamnsicookiensicookie2nsicookieacceptdialognsicookieconsentnsicookiemanagernsicookiemanager2nsicookiepermissionnsicookiepromptservicensicookieservicensicookiestoragensicrashreporternsicryptohmacnsicryptohashnsicurrentcharsetlistenernsicyclecollectorlistenernsidbchangelistenernsidbfolderinfonsidnslistenernsidnsrecordnsidnsrequestnsidnsservicensidomcanvasrenderingcontext2dnsidomchromewindownsidomclientrectnsidomdesktopnotificationnsidomdesktopnotificationcenternsidomelementnsidomeventnsidomeventgroupnsidomeventlistenernsidomeventtargetnsidomfilensidomfileerrornsidomfileexceptionnsidomfilelistnsidomfilereadernsid...
XPCOM Interface Reference by grouping
using this guide this page lists the current (as of dec.
NS_CStringToUTF16
the set of possible error codes is currently unspecified.
NS_UTF16ToCString
the set of possible error codes is currently unspecified.
nsMsgViewCommandCheckState
it is (as far as i can tell) not currently used anywhere in thunderbird.
nsMsgViewCommandType
markallread 10 mark all messages currently shown as read expandall 11 expand all threads.
XPCOM Thread Synchronization
concurrentmethod() { nsautolock al(mlock); nsautomonitor am(mmonitor); if (needexpensivecomputation()) { nsautounlock au(mlock); } am.wait(); pr_notifycondvar(mcvar); } new usage using namespace mozilla; concurrentmethod() { mutexautolock al(mlock); monitorautoenter am(mmonitor); if (needexpensivecomputation()) { mutexauto...
Getting Started Guide
nscomptr is not currently directly supported by idl.
Using the clipboard
the data currently on the system clipboard is placed into the transferable.
XPCOM
this article will show you how to use the available interfaces in several mozilla products.aggregating the in-memory datasourcealready_addrefedalready_addrefed in association with nscomptr allows you to assign in a pointer without addrefing it.binary compatibilityif mozilla decides to upgrade to a compiler that does not have the same abi as the current version, any built component may fail.
pyxpidl
you can use a temporary directory or the current directory or whatever works best for you.
XPIDL
dictionaries, enums, and unions), are not currently supported.
XSLT 2.0
the code does not currently work on the mac (except for server edition supporting java 1.6) due to its lagging java support (and thus liveconnect support).
Address book sync client design
this provides feedback of the current sync operation.
MailNews fakeserver
up a nsimsgincomingserver locally localserver.someactionrequiringconnection(); server.performtest(); // nothing will be executed until the connection is closed // localserver.closecachedconnections() is generally a good way to do so server.resettest(); // set up second test server.performtest(); transaction = server.playtransaction(); // finished with tests server.stop(); } currently, fakeserver provides no means to keep a persistent connection past a test, requiring connections to be closed, possibly forcibly.
MailNews Filters
the protocol specific code will then apply all of the actions of the filter to the current msg header.
Mail and RDF
all rdf properties of a message currently come from the database that backs the containing folder.
Mail event system
events at the time this document is being written, these are the current events: nsifolder nsifolderlistener notifyitemadded onitemadded notifyitemremoved onitemremoved notifyitempropertychanged onitempropertychanged notifyitemintpropertychanged onitemintpropertychanged notifyitemboolpropertychanged onitemboolpropertychanged notifyitemunicharpropertychanged onitemunicharpropertychange...
Mailnews and Mail code review requirements
mike conley (:mconley) can also provide useful feedback, but blake is the current ultimate decider for ui choices in thunderbird.
Spam filtering
currently, spam filtering is does not work for news, but it would be possible to add support for this.
Building a Thunderbird extension 3: install manifest
this cannot be higher than the currently available version.
Building a Thunderbird extension 5: XUL
in the next section you will learn how to use javascript to modify your label so that it shows the current date.
Access Thunderbird Window Areas
var foldertree = getfoldertree(); var searchinput = getsearchinput(); var messagepane = getmessagepane(); var messagepaneframe = getmessagepaneframe(); var mailtoolbox = getmailtoolbox(); var currentmsgfolder = getloadedmsgfolder(); see the msgmail3panewindow.js for other helper methods ...
Access Window
the window object represents the window of the thunderbird application as well as the currently opened tabs.
customDBHeaders Preference
ile: <?xml version="1.0" ?> <overlay id="colsuperfluousoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type='application/javascript' src='chrome://superfluous/content/superfluous.js'/> <tree id="threadtree"> <treecols id="threadcols"> <splitter class="tree-splitter" /> <treecol id="colsuperfluous" persist="hidden ordinal width" currentview="unthreaded" flex="1" label="superfluous" tooltiptext="click to sort by superfluous" /> </treecols> </tree> </overlay> you should insure that whatever id you use for the treecol you're adding matches the reference from your javascript code (i.e.
Thunderbird
currently one of the most popular open source email clients, it is used by tens of millions of people around the world to bring together all their email accounts, chat, newsgroup and feed reading in a familiar high-productivity environment.
Using the Mozilla source server
if you click "yes", windbg will display *busy* in the status bar while it downloads the source, and then it will automatically open the file and highlight the current line.
WebIDL bindings
note that any other instances of the interface that you are passed in as arguments are the full web-facing version of the object, and not the js implementation, so you currently cannot access any private data.
Debugging Tips
printing cdata and ctype currently console.log doesn't show type information of cdata.
Using js-ctypes
the current working directory the directories listed in the path environment variable.
CType
big integer types the int64 and uint64 types provide access to 64-bit integer values, which javascript doesn't currently support.
Int64
because javascript doesn't currently include standard support for 64-bit integer values, js-ctypes offers the int64 and uint64 objects to let you work with c functions and data that need (or may need) values represented using a 64-bit data type.
UInt64
as javascript doesn't currently include standard support for 64-bit integer values, js-ctypes offers the int64 and uint64 objects to let you work with c functions and data that need (or may need) to use data represented using a 64-bit data type.
Memory - Plugins
npn_memflush requests the browser to free up a specified amount of memory if not enough is currently available for the plug-in's requirements.
Plug-in Development Overview - Plugins
displaying messages on the status line functionally, your plug-in is seamlessly integrated into the browser and operates as an addition to current browser capabilities.
Gecko Plugin API Reference - Plugins
g a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading files to an ftp server sending mail memory allocating and freeing memory mac os flushing memory (mac os only) version, ui, and status information displaying a status line message getting agent information getting the current version finding out if a feature exists reloading a plug-in plug-in side plug-in api this chapter describes methods in the plug-in api that are available from the plug-in object.
3D view - Firefox Developer Tools
mouse zoom in/out + / - scroll wheel up/down rotate left/right a / d mouse left/right rotate up/down w / s mouse up/down pan left/right ← / → mouse left/right pan up/down ↑ / ↓ mouse up/down reset zoom level 0 resets the zoom level to the default focus on selected node f makes sure the currently selected node is visible reset view r resets zoom, rotation, and panning to the default hide current node x makes the currently selected node invisible; this can be helpful if you need to get at a node that's obscured use cases for the 3d view there are a variety of ways the 3d view is useful: if you have broken html causing layout problems, looking a...
DOM Inspector FAQ - Firefox Developer Tools
there is currently no way to inspect dynamically-applied rules for other pseudo-classes or any pseudo-elements from the dom inspector ui.
Browser Console - Firefox Developer Tools
line (remember that to send multiple lines to the browser console, use shift+enter): var newtabbrowser = gbrowser.getbrowserfortab(gbrowser.selectedtab); newtabbrowser.addeventlistener("load", function() { newtabbrowser.contentdocument.body.innerhtml = "<h1>this page has been eaten</h1>"; }, true); newtabbrowser.contentdocument.location.href = "https://mozilla.org/"; it adds a listener to the currently selected tab's load event that will eat the new page, then loads a new page.
DOM Property Viewer - Firefox Developer Tools
the dom property viewer lets you inspect the properties of the dom as an expandable tree structure, starting from the window object of the current page or the selected iframe.
Access debugging in add-ons - Firefox Developer Tools
(currently a work in progress, see bug 653545.) ...
Step through code - Firefox Developer Tools
step in: advance to the next line in the function, unless on a function call, in which case enter the function being called step out: run to the end of the current function, in which case, the debugger will skip the return value from a function, returning execution to the caller split console when paused, you can press the esc key to open and close the split console to gain more insight into errors and variables: pause on breakpoints overlay since firefox 70, when your code is paused on a breakpoint an overlay appears on the viewport of the tab you are debugg...
Debugger keyboard shortcuts - Firefox Developer Tools
command windows macos linux close current file ctrl + w cmd + w ctrl + w search for a string in the current file ctrl + f cmd + f ctrl + f search for a string in all files ctrl + shift + f cmd + shift + f ctrl + shift + f find next in the current file ctrl + g cmd + g ctrl + g search for scripts by name ctrl + p cmd + p ctrl + p resume execution when at a breakpoint f8 f8 1 f8 step over f10 f10 1 f10 step into f11 f11 1 f11 step out shift + f11 shift + f11 1 shift + f11 toggle breakpoint on the currently selected line ctrl + b cmd + b ctrl + b toggle conditional breakpoint on the currently se...
Set a logpoint - Firefox Developer Tools
you can use any variable or function available in the current scope.
Debugger.Memory - Firefox Developer Tools
you can retrieve the current log by calling dbg.memory.drainallocationslog.
Debugger-API - Firefox Developer Tools
the debugger api cannot currently observe self-hosted javascript.
Debugger.Object - Firefox Developer Tools
theframe argument is the current stack frame, whose code is about to perform the operation on the object being reported.
Measure a portion of the page - Firefox Developer Tools
now when you mouse over the viewport, you'll see the mouse has a crosshair cursor with its current coordinates displayed beside it.
Aggregate view - Firefox Developer Tools
the "total count" column shows you the number of objects of each category that are currently allocated.
Dominators view - Firefox Developer Tools
in particular, allocation stacks are currently only recorded for objects, not for arrays, strings, or internal structures.
Memory - Firefox Developer Tools
the memory tool lets you take a snapshot of the current tab's memory heap.
Inspecting web sockets - Firefox Developer Tools
supported ws protocols the inspector currently supports the following web socket protocols: plain json socket.io sockjs signalr wamp the payload based on those protocols is parsed and displayed as an expandable tree for easy inspection, although you can of course still see the raw data (as sent over the wire) as well.
Network monitor recording - Firefox Developer Tools
pausing and resume network traffic recording the network monitor has a button that pauses and resumes recording of the current page's network traffic.
Edit CSS filters - Firefox Developer Tools
you can save the current filter to the preset list: click to edit the filter, display the preset list by clicking the icon as shown below.
Edit Shape Paths in CSS - Firefox Developer Tools
browser support the shape path editor currently works for shapes generated via clip-path; it will also work for shapes generated via shape-outside as of firefox 62.
Select an element - Firefox Developer Tools
the selected element is the element in the page that the inspector is currently focused on.
Select and highlight elements - Firefox Developer Tools
the selected element is the element in the page that the inspector is currently focused on.
Use the Inspector from the Web Console - Firefox Developer Tools
the element that's currently selected in the page inspector can be referenced in the web console using the variable $0.
Call Tree - Firefox Developer Tools
in the current version of the call tree, these are the most important columns.
UI Tour - Firefox Developer Tools
in the screenshot below we've selected that drop in the frame rate, and can see the long-running paint operation in more detail: details pane the details pane shows whichever tool is currently selected.
Validators - Firefox Developer Tools
checky checky adds a submenu to your netscape or mozilla context menu that allows you to run whatever page you're on through one of (currently) 18 different online validaton and analysis services.
View Source - Firefox Developer Tools
to activate view source: context-click in the page and select view page source press ctrl + u on windows and linux, or cmd + u on macos the command opens a new tab with the source for the current page.
Web console keyboard shortcuts - Firefox Developer Tools
te reverse search through command history/step backwards through matching commands f9 ctrl + r f9 step forward through matching command history (after initiating reverse search) shift + f9 ctrl + s shift + f9 move to the beginning of the line home ctrl + a ctrl + a move to the end of the line end ctrl + e ctrl + e execute the current expression enter return enter add a new line, for entering multiline expressions shift + enter shift + return shift + enter autocomplete popup these shortcuts apply while the autocomplete popup is open: command windows macos linux choose the current autocomplete suggestion tab tab tab cancel the autocomplete popup ...
Split console - Firefox Developer Tools
as usual, $0 works as a shorthand for the element currently selected in the inspector: when you use the split console with the debugger, the console's scope is the currently executing stack frame.
Web Console remoting - Firefox Developer Tools
the selectednodeactor property is an optional nodeactor id, which is used to indicate which node is currently selected in the inspector, if any.
ANGLE_instanced_arrays.drawArraysInstancedANGLE() - Web APIs
if gl.current_program is null, a gl.invalid_operation error is thrown.
AbortSignal - Web APIs
current version of firefox rejects the promise with a domexception you can find a full working example on github — see abort-api (see it running live also).
AddressErrors - Web APIs
that's done by removing all shipping options currently set on the request, then set up an object named shippingaddresserrors which contains a country property which is an error message describing why the stated country isn't being permitted as a value.
AnalyserNode.frequencyBinCount - Web APIs
example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
AnalyserNode.getFloatFrequencyData() - Web APIs
the getfloatfrequencydata() method of the analysernode interface copies the current frequency data into a float32array array passed into it.
AnalyserNode.maxDecibels - Web APIs
example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
AnalyserNode.minDecibels - Web APIs
example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
Animation.finish() - Web APIs
WebAPIAnimationfinish
the finish() method of the web animations api's animation interface sets the current playback time to the end of the animation corresponding to the current playback direction.
Animation.onfinish - Web APIs
you can force the animation into the "finished" state by setting its starttime to document.timeline.currenttime - (animation.currenttime * animation.playbackrate).
Animation.pending - Web APIs
WebAPIAnimationpending
the read-only animation.pending property of the web animations api indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
Animation.ready - Web APIs
WebAPIAnimationready
you'll typically use a construct similar to this when using the ready promise: animation.ready.then(function() { // do whatever needs to be done when // the animation is ready to run }); example in the following example, the state of the animation will be running when the current ready promise is resolved because the animation does not leave the pending play state in between the calls to pause and play and hence the current ready promise does not change.
AnimationEffect - Web APIs
the animationeffect interface of the web animations api defines current and future animation effects like keyframeeffect, which can be passed to animation objects for playing, and keyframeeffectreadonly (which is used by css animations and transitions).
AnimationEvent.initAnimationEvent() - Web APIs
animationiteration the current iteration just completed.
AnimationPlaybackEvent.timelineTime - Web APIs
value a number representing the current time in milliseconds, or null.
AnimationPlaybackEvent - Web APIs
attributes animationplaybackevent.currenttime the current time of the animation that generated the event.
AnimationTimeline - Web APIs
properties animationtimeline.currenttime read only returns the time value in milliseconds for this timeline or null if this timeline is inactive.
AudioBuffer.copyToChannel() - Web APIs
channelnumber the channel number of the current audiobuffer to copy the channel data to.
AudioBuffer.sampleRate - Web APIs
syntax var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); myarraybuffer.samplerate; value a floating-point value indicating the current sample rate of the buffers data, in samples per second.
AudioContext.createMediaElementSource() - Web APIs
when the mouse pointer is moved, the updatepage() function is invoked, which calculates the current gain as a ratio of mouse y position divided by overall window height.
AudioContext.outputLatency - Web APIs
the outputlatency read-only property of the audiocontext interface provides an estimation of the output latency of the current audio context.
AudioNode.disconnect() - Web APIs
output optional an index describing which output from the current audionode is to be disconnected.
AudioNode - Web APIs
WebAPIAudioNode
audionode.disconnect() allows us to disconnect the current node from another one it is already connected to.
AudioParam.cancelScheduledValues() - Web APIs
examples var gainnode = audioctx.creategain(); gainnode.gain.setvaluecurveattime(wavearray, audioctx.currenttime, 2); //'gain' is the audioparam gainnode.gain.cancelscheduledvalues(audioctx.currenttime); specifications specification status comment web audio apithe definition of 'cancelscheduledvalues' in that specification.
AudioParam.exponentialRampToValueAtTime() - Web APIs
ument.queryselector('.exp-ramp-minus'); // create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a gain node and set its gain value to 0.5 var gainnode = audioctx.creategain(); // connect the audiobuffersourcenode to the gainnode // and the gainnode to the destination gainnode.gain.setvalueattime(0, audioctx.currenttime); source.connect(gainnode); gainnode.connect(audioctx.destination); // set buttons to do something onclick exprampplus.onclick = function() { gainnode.gain.exponentialramptovalueattime(1.0, audioctx.currenttime + 2); } exprampminus.onclick = function() { gainnode.gain.exponentialramptovalueattime(0.01, audioctx.currenttime + 2); } note: a value of 0.01 was used for the value to ramp ...
AudioParam.linearRampToValueAtTime() - Web APIs
t.queryselector('.linear-ramp-minus'); // create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a gain node and set it's gain value to 0.5 var gainnode = audioctx.creategain(); // connect the audiobuffersourcenode to the gainnode // and the gainnode to the destination gainnode.gain.setvalueattime(0, audioctx.currenttime); source.connect(gainnode); gainnode.connect(audioctx.destination); // set buttons to do something onclick linearrampplus.onclick = function() { gainnode.gain.linearramptovalueattime(1.0, audioctx.currenttime + 2); } linearrampminus.onclick = function() { gainnode.gain.linearramptovalueattime(0, audioctx.currenttime + 2); } specifications specification status commen...
AudioParamDescriptor - Web APIs
const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('white-noise-processor.js') const whitenoisenode = new audioworkletnode(audiocontext, 'white-noise-processor') whitenoisenode.connect(audiocontext.destination) now we can change the gain on the node like this: const gainparam = whitenoisenode.parameters.get('customgain') gainparam.setvalueattime(0, audiocontext.currenttime) gainparam.linearramptovalueattime(0.5, audiocontext.currenttime + 0.5) specifications specification status comment web audio apithe definition of 'audioparamdescriptor' in that specification.
AudioProcessingEvent - Web APIs
playbacktime read only double the time when the audio will be played, as defined by the time of audiocontext.currenttime inputbuffer read only audiobuffer the buffer containing the input audio data to be processed.
AudioTrackList.onchange - Web APIs
example this snippet establishes a handler for the change event that looks at each of the tracks in the list, calling a function to update the state of a user interface control that indicates the current state of the track.
AudioWorkletNode() - Web APIs
exceptions notsupportederror the specified options.outputchannelcount is 0 or larger than the current implementation supports.
AudioWorkletNode.parameters - Web APIs
const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('white-noise-processor.js') const whitenoisenode = new audioworkletnode(audiocontext, 'white-noise-processor') whitenoisenode.connect(audiocontext.destination) now we can change the gain on the node like this: const gainparam = whitenoisenode.parameters.get('customgain') gainparam.setvalueattime(0, audiocontext.currenttime) gainparam.linearramptovalueattime(0.5, audiocontext.currenttime + 0.5) specifications specification status comment web audio apithe definition of 'parameters' in that specification.
AudioWorkletNodeOptions - Web APIs
this has the effect of changing the output channel count to dynamically change to the computed number of channels, based on the input's channel count and the current setting of the audionode property channelcountmode.
AudioWorkletProcessor.parameterDescriptors (static getter) - Web APIs
const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('white-noise-processor.js') const whitenoisenode = new audioworkletnode(audiocontext, 'white-noise-processor') whitenoisenode.connect(audiocontext.destination) now we can change the gain on the node like this: const gainparam = whitenoisenode.parameters.get('customgain') gainparam.setvalueattime(0, audiocontext.currenttime) gainparam.linearramptovalueattime(0.5, audiocontext.currenttime + 0.5) specifications specification status comment web audio apithe definition of 'parameterdescriptors' in that specification.
AuthenticatorAssertionResponse.userHandle - Web APIs
syntax userhandle = authenticatorassertionresponse.userhandle value an arraybuffer object which is an opaque identifier for the current user.
BaseAudioContext.createBiquadFilter() - Web APIs
er(); // connect the nodes together source = audioctx.createmediastreamsource(stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.setvalueattime(1000, audioctx.currenttime); biquadfilter.gain.setvalueattime(25, audioctx.currenttime); specifications specification status comment web audio apithe definition of 'createbiquadfilter()' in that specification.
BaseAudioContext.createChannelMerger() - Web APIs
var ac = new audiocontext(); ac.decodeaudiodata(somestereobuffer, function(data) { var source = ac.createbuffersource(); source.buffer = data; var splitter = ac.createchannelsplitter(2); source.connect(splitter); var merger = ac.createchannelmerger(2); // reduce the volume of the left channel only var gainnode = ac.creategain(); gainnode.gain.setvalueattime(0.5, ac.currenttime); splitter.connect(gainnode, 0); // connect the splitter back to the second input of the merger: we // effectively swap the channels, here, reversing the stereo image.
BaseAudioContext.createChannelSplitter() - Web APIs
var ac = new audiocontext(); ac.decodeaudiodata(somestereobuffer, function(data) { var source = ac.createbuffersource(); source.buffer = data; var splitter = ac.createchannelsplitter(2); source.connect(splitter); var merger = ac.createchannelmerger(2); // reduce the volume of the left channel only var gainnode = ac.creategain(); gainnode.gain.setvalueattime(0.5, ac.currenttime); splitter.connect(gainnode, 0); // connect the splitter back to the second input of the merger: we // effectively swap the channels, here, reversing the stereo image.
BaseAudioContext.createDelay() - Web APIs
var delay1; rangesynth.oninput = function() { delay1 = rangesynth.value; synthdelay.delaytime.setvalueattime(delay1, audioctx.currenttime); } specifications specification status comment web audio apithe definition of 'createdelay()' in that specification.
BaseAudioContext.createDynamicsCompressor() - Web APIs
// create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a compressor node var compressor = audioctx.createdynamicscompressor(); compressor.threshold.setvalueattime(-50, audioctx.currenttime); compressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function() { var active = button.getatt...
BaseAudioContext.createGain() - Web APIs
gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'creategain()' in that specification.
BaseAudioContext.createOscillator() - Web APIs
// create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(3000, audioctx.currenttime); // value in hertz oscillator.connect(audioctx.destination); oscillator.start(); specifications specification status comment web audio apithe definition of 'createoscillator' in that specification.
BaseAudioContext.createScriptProcessor() - Web APIs
important: webkit currently (version 31) requires that a valid buffersize be passed when calling this method.
BaseAudioContext.createStereoPanner() - Web APIs
tml; // create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a stereo panner var pannode = audioctx.createstereopanner(); // event handler function to increase panning to the right and left // when the slider is moved pancontrol.oninput = function() { pannode.pan.setvalueattime(pancontrol.value, audioctx.currenttime); panvalue.innerhtml = pancontrol.value; } // connect the mediaelementaudiosourcenode to the pannode // and the pannode to the destination, so we can play the // music and adjust the panning using the controls source.connect(pannode); pannode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'createstereopann...
BaseAudioContext.onstatechange - Web APIs
}; example the following snippet is taken from our audiocontext states demo (see it running live.) the onstatechange hander is used to log the current state to the console every time it changes.
BasicCardRequest.supportedNetworks - Web APIs
legal values are defined in the w3c's document card network identifiers approved for use with payment request api, and are currently: amex cartebancaire diners discover jcb mastercard mir unionpay visa example the following example shows a sample definition of the first parameter of the paymentrequest() constructor, the data property of which contains supportednetworks and supportedtypes properties.
BasicCardRequest.supportedTypes - Web APIs
legal values are defined in basiccardtype enum, and are currently: credit debit prepaid example the following example shows a sample definition of the first parameter of the paymentrequest() constructor, the data property of which contains supportednetworks and supportedtypes properties.
BatteryManager.chargingTime - Web APIs
if the battery is currently discharging, this value is infinity.
BatteryManager.dischargingTime - Web APIs
this value is infinity if the battery is currently charging rather than discharging, or if the system is unable to report the remaining discharging time.
BatteryManager.level - Web APIs
indicates the current battery charge level as a value between 0.0 and 1.0.
BatteryManager - Web APIs
properties batterymanager.charging read only a boolean value indicating whether or not the battery is currently being charged.
Using the Beacon API - Web APIs
the handler calls sendbeacon() with the current url.
BiquadFilterNode.frequency - Web APIs
the frequency property of the biquadfilternode interface is a k-rate audioparam, a double representing a frequency in the current filtering algorithm measured in hertz (hz).
BiquadFilterNode.gain - Web APIs
the gain property of the biquadfilternode interface is a a-rate audioparam, a double representing the gain used in the current filtering algorithm.
BiquadFilterNode.getFrequencyResponse() - Web APIs
the getfrequencyresponse() method of the biquadfilternode interface takes the current filtering algorithm's settings and calculates the frequency response for frequencies specified in a specified array of frequencies.
Bluetooth.getAvailability() - Web APIs
the getavailability() method of bluetooth interface of web bluetooth api interface exposes the bluetooth capabilities of the current device.
Bluetooth.getDevices() - Web APIs
note: this method returns a bluetoothdevice for each device the origin is currently allowed to access, even the ones that are out of range or powered off.
Bluetooth.referringDevice - Web APIs
the bluetooth.referringdevice attribute of the bluetooth interface returns a bluetoothdevice if the current document was opened in response to an instruction sent by this device and null otherwise.
Bluetooth - Web APIs
WebAPIBluetooth
bluetooth.referringdevice read only returns a reference to the device, if any, from which the user opened the current page.
BluetoothDevice.uuids - Web APIs
the bluetoothdevice.uuids read-only property lists the uuids of gatt services provided by the device, that the current origin is allowed to access.
BluetoothDevice - Web APIs
bluetoothdevice.uuids read only lists the uuid's of gatt services provided by the device, that the current origin is allowed to access.
BluetoothRemoteGATTCharacteristic - Web APIs
bluetoothremotegattcharacteristic.valueread only the currently cached characteristic value.
value - Web APIs
the bluetoothremotegattdescriptor.value read-only property returns an arraybuffer containing the currently cached descriptor value.
BluetoothRemoteGATTDescriptor - Web APIs
bluetoothremotegattdescriptor.valueread only returns the currently cached descriptor value.
CSS numeric factory functions - Web APIs
mples we use the css.vmax() numeric factory function to create a cssunitvalue: let height = css.vmax(50); console.log( height ); // cssunitvalue {value: 50, unit: "vmax"} console.log( height.value ) // 50 console.log( height.unit ) // vmax in this example, we set the margin on our element using the css.px() factory function: myelement.attributestylemap.set('margin', css.px(40)); let currentmargin = myelement.attributestylemap.get('margin'); console.log(currentmargin.value, currentmargin.unit); // 40, 'px' specification specification status comment css object model (cssom)the definition of 'numeric factory functions' in that specification.
CSSGroupingRule - Web APIs
cssgroupingrule.insertrule inserts a new style rule into the current style sheet.
CSSMathValue - Web APIs
cssmathinvert cssmathmax cssmathmin cssmathnegate cssmathproduct cssmathsum properties cssmathvalue.operator indicates the operator that the current subtype represents.
CSSRule.parentStyleSheet - Web APIs
the parentstylesheet property of the cssrule interface returns the stylesheet object in which the current rule is defined.
CSSStyleSheet.addRule() - Web APIs
if index is not specified, the next index after the last item currently in the list is used (that is, the value of cssstylesheet.cssrules.length).
CSSStyleSheet.insertRule() - Web APIs
the cssstylesheet.insertrule() method inserts a new css rule into the current style sheet, with some restrictions.
CSSValue.cssValueType - Web APIs
the cssvaluetype read-only property of the cssvalue interface represents the type of the current computed css property value.
Determining the dimensions of elements - Web APIs
if you need to know the actual size of the content, regardless of how much of it is currently visible, you need to use the element.scrollwidth and element.scrollheight properties.
Using the CSS Typed Object Model - Web APIs
appendchild(document.createtextnode(ofinterest[i])); styleslist.appendchild(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.appendchild(document.createtextnode( allcomputedstyles.get(ofinterest[i]))); styleslist.appendchild(cssvalue); } we included border-left-color to demonstrate that, had we included all the properties, every value that defaults to currentcolor (including caret-color, outline-color, text-decoration-color, column-rule-color, etc.) would return rgb(255, 0, 0).
Cache.put() - Web APIs
WebAPICacheput
the put() method of the cache interface allows key/value pairs to be added to the current cache object.
CacheStorage - Web APIs
async function deleteoldcaches( currentcache ) { const keys = await caches.keys(); for ( const key of keys ) { const isourcache = 'myapp-' === key.substr( 0, 6 ); if ( currentcache === key || !
CanvasPattern.setTransform() - Web APIs
the pattern gets applied if you set it as the current fillstyle and gets drawn onto the canvas when using the fillrect() method, for example.
CanvasRenderingContext2D.arc() - Web APIs
the canvasrenderingcontext2d.arc() method of the canvas 2d api adds a circular arc to the current sub-path.
CanvasRenderingContext2D.arcTo() - Web APIs
the canvasrenderingcontext2d.arcto() method of the canvas 2d api adds a circular arc to the current sub-path, using the given control points and radius.
CanvasRenderingContext2D.beginPath() - Web APIs
note: to create a new sub-path, i.e., one matching the current canvas state, you can use canvasrenderingcontext2d.moveto().
CanvasRenderingContext2D.closePath() - Web APIs
the canvasrenderingcontext2d.closepath() method of the canvas 2d api attempts to add a straight line from the current point to the start of the current sub-path.
CanvasRenderingContext2D.createLinearGradient() - Web APIs
note: gradient coordinates are global, i.e., relative to the current coordinate space.
CanvasRenderingContext2D.createRadialGradient() - Web APIs
note: gradient coordinates are global, i.e., relative to the current coordinate space.
CanvasRenderingContext2D.direction - Web APIs
the canvasrenderingcontext2d.direction property of the canvas 2d api specifies the current text direction used to draw text.
CanvasRenderingContext2D.drawFocusIfNeeded() - Web APIs
the canvasrenderingcontext2d.drawfocusifneeded() method of the canvas 2d api draws a focus ring around the current or given path, if the specified element is focused.
CanvasRenderingContext2D.drawWidgetAsOnScreen() - Web APIs
specifications not part of any current specification or draft.
CanvasRenderingContext2D.ellipse() - Web APIs
the canvasrenderingcontext2d.ellipse() method of the canvas 2d api adds an elliptical arc to the current sub-path.
CanvasRenderingContext2D.fill() - Web APIs
the canvasrenderingcontext2d.fill() method of the canvas 2d api fills the current or given path with the current fillstyle.
CanvasRenderingContext2D.font - Web APIs
the canvasrenderingcontext2d.font property of the canvas 2d api specifies the current text style to use when drawing text.
CanvasRenderingContext2D.scale() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // scaled rectangle ctx.scale(9, 3); ctx.fillstyle = 'red'; ctx.fillrect(10, 10, 8, 20); // reset current transformation matrix to the identity matrix ctx.settransform(1, 0, 0, 1, 0, 0); // non-scaled rectangle ctx.fillstyle = 'gray'; ctx.fillrect(10, 10, 8, 20); result the scaled rectangle is red, and the non-scaled rectangle is gray.
CanvasRenderingContext2D.scrollPathIntoView() - Web APIs
the canvasrenderingcontext2d.scrollpathintoview() method of the canvas 2d api scrolls the current or given path into view.
CanvasRenderingContext2D.shadowBlur - Web APIs
this value doesn't correspond to a number of pixels, and is not affected by the current transformation matrix.
CanvasRenderingContext2D.strokeText() - Web APIs
this method draws directly to the canvas without modifying the current path, so any subsequent fill() or stroke() calls will have no effect on it.
CanvasRenderingContext2D.textAlign - Web APIs
the canvasrenderingcontext2d.textalign property of the canvas 2d api specifies the current text alignment used when drawing text.
CanvasRenderingContext2D.textBaseline - Web APIs
the canvasrenderingcontext2d.textbaseline property of the canvas 2d api specifies the current text baseline used when drawing text.
Basic animations - Web APIs
age(moon, -3.5, -3.5); ctx.restore(); ctx.restore(); ctx.beginpath(); ctx.arc(150, 150, 105, 0, math.pi * 2, false); // earth orbit ctx.stroke(); ctx.drawimage(sun, 0, 0, 300, 300); window.requestanimationframe(draw); } init(); <canvas id="canvas" width="300" height="300"></canvas> screenshotlive sample an animated clock this example draws an animated clock, showing your current time.
Basic usage of canvas - Web APIs
this can look something like this: <canvas id="stockgraph" width="150" height="150"> current stock price: $3.15 + 0.15 </canvas> <canvas id="clock" width="150" height="150"> <img src="images/clock.png" width="150" height="150" alt=""/> </canvas> telling the user to use a different browser that supports canvas does not help users who can't read the canvas at all, for example.
Compositing and clipping - Web APIs
clip() turns the path currently being built into the current clipping path.
Pixel manipulation with canvas - Web APIs
for this, we need the current position of the mouse with layerx and layery, then we look up the pixel data on that position in the pixel array that getimagedata() provides us.
Using images - Web APIs
htmlvideoelement using an html <video> element as your image source grabs the current frame from the video and uses it as an image.
ChannelMergerNode - Web APIs
var ac = new audiocontext(); ac.decodeaudiodata(somestereobuffer, function(data) { var source = ac.createbuffersource(); source.buffer = data; var splitter = ac.createchannelsplitter(2); source.connect(splitter); var merger = ac.createchannelmerger(2); // reduce the volume of the left channel only var gainnode = ac.creategain(); gainnode.gain.setvalueattime(0.5, ac.currenttime); splitter.connect(gainnode, 0); // connect the splitter back to the second input of the merger: we // effectively swap the channels, here, reversing the stereo image.
ChannelSplitterNode - Web APIs
var ac = new audiocontext(); ac.decodeaudiodata(somestereobuffer, function(data) { var source = ac.createbuffersource(); source.buffer = data; var splitter = ac.createchannelsplitter(2); source.connect(splitter); var merger = ac.createchannelmerger(2); // reduce the volume of the left channel only var gainnode = ac.creategain(); gainnode.gain.setvalueattime(0.5, ac.currenttime); splitter.connect(gainnode, 0); // connect the splitter back to the second input of the merger: we // effectively swap the channels, here, reversing the stereo image.
Client.frameType - Web APIs
WebAPIClientframeType
the frametype read-only property of the client interface indicates the type of browsing context of the current client.
Clipboard.read() - Web APIs
WebAPIClipboardread
example after using navigator.permissions.query() to find out if we have (or if the user will be prompted to allow) "clipboard-read" access, this example fetches the data currently on the clipboard.
Clipboard.write() - Web APIs
WebAPIClipboardwrite
example this example function replaces the current contents of the clipboard with a specified string.
CompositionEvent - Web APIs
compositionevent.locale read only returns the locale of current input method (for example, the keyboard layout locale if the composition is associated with ime).
console.assert() - Web APIs
WebAPIConsoleassert
console.log('the word is %s', 'foo'); // output: the word is foo ...the use of such a string does not currently work as intended as a parameter for console.assert in all browsers: console.assert(false, 'the word is %s', 'foo'); // correct output in node.js and some browsers // (e.g.
Console.group() - Web APIs
WebAPIConsolegroup
to exit the current group, call console.groupend().
Console.groupEnd() - Web APIs
WebAPIConsolegroupEnd
exits the current inline group in the web console.
Console.timeLog() - Web APIs
WebAPIConsoletimeLog
logs the current value of a timer that was previously started by calling console.time() to the console.
Console API - Web APIs
by far the most commonly-used method is console.log, which is used to log the current value contained inside a specific variable.
Constraint validation API - Web APIs
if you don't do this, and a custom validity was previously set, the input will register as invalid, even if it current contains a valid value on submission.
ContentIndex.add() - Web APIs
WebAPIContentIndexadd
needs to be under the scope of the current service worker.
CredentialsContainer.preventSilentAccess() - Web APIs
the preventsilentaccess() method of the credentialscontainer interface sets a flag that specifies whether automatic log in is allowed for future visits to the current origin, then returns an empty promise.
CredentialsContainer - Web APIs
credentialscontainer.preventsilentaccess()secure context sets a flag that specifies whether automatic log in is allowed for future visits to the current origin, then returns an empty promise.
Crypto - Web APIs
WebAPICrypto
the crypto interface represents basic cryptography features available in the current context.
CustomElementRegistry.define() - Web APIs
one option is currently supported: extends: string specifying the name of a built-in element to extend.
DOMImplementation.createHTMLDocument() - Web APIs
example this example creates a new html document and inserts it into an <iframe> in the current document.
DOMPoint.DOMPoint() - Web APIs
WebAPIDOMPointDOMPoint
examples this example creates a dompoint representing the top-left corner of the current window, then creates a second point based on the first, which is then offset by 100 pixels both vertically and horizontally.
DOMPointInit - Web APIs
example this example creates a new dompoint representing the top-left corner of the current window, with a z component added to move the point closer to the user.
DOMPointReadOnly.toJSON() - Web APIs
example this example creates a dompoint object representing the top-left corner of the current window, in screen coordinates, then converts that to json.
DataTransfer.mozCursor - Web APIs
note: this property is currently only implemented on windows.
DataTransfer.setData() - Web APIs
tdata(), getdata() and cleardata()</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; // set the drag's format and data.
DataTransfer.setDragImage() - Web APIs
if element is an img element, then set the drag data store bitmap to the element's image (at its intrinsic size); otherwise, set the drag data store bitmap to an image generated from the given element (the exact mechanism for doing so is not currently specified).
DataTransfer - Web APIs
properties standard properties datatransfer.dropeffect gets the type of drag-and-drop operation currently selected or sets the operation to a new type.
DataTransferItem.webkitGetAsEntry() - Web APIs
once the current item is in the list, the item's isdirectory property is checked.
DataTransferItemList.length - Web APIs
the read-only length property of the datatransferitemlist interface returns the number of items currently in the drag item list.
DelayNode.delayTime - Web APIs
var delay1; rangesynth.oninput = function() { delay1 = rangesynth.value; synthdelay.delaytime.setvalueattime(delay1, audioctx.currenttime); } specifications specification status comment web audio apithe definition of 'delaytime' in that specification.
DelayNode - Web APIs
WebAPIDelayNode
var delay1; rangesynth.oninput = function() { delay1 = rangesynth.value; synthdelay.delaytime.setvalueattime(delay1, audioctx.currenttime); } specifications specification status comment web audio apithe definition of 'delaynode' in that specification.
DeprecationReportBody - Web APIs
anticipatedremoval a date object (rendered as a string) representing the date when the feature is expected to be removed from the current browser.
DeviceLightEvent.value - Web APIs
the value property provides the current level of the ambient light.
DeviceLightEvent - Web APIs
for example this may be useful to adjust the screen's brightness based on the current ambient light level in order to save energy or provide better readability.
DeviceMotionEvent - Web APIs
warning: currently, firefox and chrome do not handle the coordinates the same way.
DeviceOrientationEvent - Web APIs
warning: currently, firefox and chrome do not handle the coordinates the same way.
DeviceProximityEvent.value - Web APIs
the value property of deviceproximityevent objects provides the current distance between the device and the detected object, in centimeters.
DeviceProximityEvent - Web APIs
deviceproximityevent.value read only the current device proximity, in centimeters.
Document.bgColor - Web APIs
WebAPIDocumentbgColor
the deprecated bgcolor property gets or sets the background color of the current document.
Document.characterSet - Web APIs
the document.characterset read-only property returns the character encoding of the document that it's currently rendered with.
Document.createElement() - Web APIs
document.body.onload = addelement; function addelement () { // create a new div element const newdiv = document.createelement("div"); // and give it some content const newcontent = document.createtextnode("hi there and greetings!"); // add the text node to the newly created div newdiv.appendchild(newcontent); // add the newly created element and its content into the dom const currentdiv = document.getelementbyid("div1"); document.body.insertbefore(newdiv, currentdiv); } web component example the following example snippet is taken from our expanding-list-web-component example (see it live also).
Document.createNSResolver() - Web APIs
this adapter works like the dom level 3 method lookupnamespaceuri on nodes in resolving the namespaceuri from a given prefix using the current information available in the node's hierarchy at the time lookupnamespaceuri is called.
Document.createNodeIterator() - Web APIs
nodefilter.filter_accept : nodefilter.filter_reject; } } ); const pars = []; let currentnode; while (currentnode = nodeiterator.nextnode()) { pars.push(currentnode); } specifications specification status comment domthe definition of 'document.createnodeiterator' in that specification.
Document.createTreeWalker() - Web APIs
var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var nodelist = []; var currentnode = treewalker.currentnode; while(currentnode) { nodelist.push(currentnode); currentnode = treewalker.nextnode(); } specifications specification status comment domthe definition of 'document.createtreewalker' in that specification.
Document.documentURIObject - Web APIs
syntax var uri = document.documenturiobject; example // check that the uri scheme of the current tab in firefox is 'http', // assuming this code runs in context of browser.xul let uriobj = content.document.documenturiobject; let uriport = uriobj.port; if (uriobj.schemeis('http')) { ...
Document: dragover event - Web APIs
bubbles yes cancelable yes default action reset the current drag operation to "none".
Document.embeds - Web APIs
WebAPIDocumentembeds
the embeds read-only property of the document interface returns a list of the embedded <object> elements within the current document.
Document.enableStyleSheetsForSet() - Web APIs
enables the style sheets matching the specified name in the current style sheet set, and disables all other style sheets (except those without a title, which are always enabled).
Document.fgColor - Web APIs
WebAPIDocumentfgColor
fgcolor gets/sets the foreground color, or text color, of the current document.
Document.getElementsByTagNameNS() - Web APIs
note: currently parameters in this method are case-sensitive, but they were case-insensitive in firefox 3.5 and before.
Document.head - Web APIs
WebAPIDocumenthead
the head read-only property of the document interface returns the <head> element of the current document.
Document.height - Web APIs
WebAPIDocumentheight
in most cases, this is equal to the <body> element of the current document.
Document.implementation - Web APIs
the document.implementation property returns a domimplementation object associated with the current document.
Document.lastModified - Web APIs
the lastmodified property of the document interface returns a string containing the date and time on which the current document was last modified.
Document.lastStyleSheetSet - Web APIs
if the current style sheet set has not been changed by setting document.selectedstylesheetset, the returned value is null.
Document.location - Web APIs
WebAPIDocumentlocation
if the current document is not in a browsing context, the returned value is null.
Document.plugins - Web APIs
WebAPIDocumentplugins
the plugins read-only property of the document interface returns an htmlcollection object containing one or more htmlembedelements representing the <embed> elements in the current document.
Document.queryCommandState() - Web APIs
the querycommandstate() method will tell you if the current selection has a certain document.execcommand() command applied.
Document.releaseCapture() - Web APIs
the releasecapture() method releases mouse capture if it's currently enabled on an element within this document.
Document: selectionchange event - Web APIs
the selectionchange event of the selection api is fired when the current text selection on a document is changed.
Document.styleSheetSets - Web APIs
the stylesheetsets read-only property returns a live list of all of the currently-available style sheet sets.
Document.title - Web APIs
WebAPIDocumenttitle
the document.title property gets or sets the current title of the document.
Document.tooltipNode - Web APIs
the document.tooltipnode property returns the node which is the target of the current <xul:tooltip>.
Document.width - Web APIs
WebAPIDocumentwidth
returns the width of the <body> element of the current document in pixels.
DocumentOrShadowRoot.nodeFromPoint() - Web APIs
currently this method is only implemented in firefox, and only available to chrome code.
DocumentOrShadowRoot.nodesFromPoint() - Web APIs
currently this method is only implemented in firefox, and only available to chrome code.
DynamicsCompressorNode.attack - Web APIs
// create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a compressor node var compressor = audioctx.createdynamicscompressor(); compressor.threshold.setvalueattime(-50, audioctx.currenttime); compressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function() { var active = button.getatt...
DynamicsCompressorNode.knee - Web APIs
// create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a compressor node var compressor = audioctx.createdynamicscompressor(); compressor.threshold.setvalueattime(-50, audioctx.currenttime); compressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function() { var active = button.getatt...
DynamicsCompressorNode.ratio - Web APIs
// create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a compressor node var compressor = audioctx.createdynamicscompressor(); compressor.threshold.setvalueattime(-50, audioctx.currenttime); compressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function() { var active = button.getatt...
DynamicsCompressorNode.reduction - Web APIs
the reduction read-only property of the dynamicscompressornode interface is a float representing the amount of gain reduction currently applied by the compressor to the signal.
DynamicsCompressorNode.release - Web APIs
// create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a compressor node var compressor = audioctx.createdynamicscompressor(); compressor.threshold.setvalueattime(-50, audioctx.currenttime); compressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function() { var active = button.getatt...
DynamicsCompressorNode.threshold - Web APIs
// create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a compressor node var compressor = audioctx.createdynamicscompressor(); compressor.threshold.setvalueattime(-50, audioctx.currenttime); compressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); // connect the audiobuffersourcenode to the destination source.connect(audioctx.destination); button.onclick = function() { var active = button.getatt...
EffectTiming.direction - Web APIs
syntax var timingproperties = { direction: "normal" | "reverse" | "alternate" | "alternate-reverse" }; timingproperties.direction = "normal" | "reverse" | "alternate" | "alternate-reverse"; value a domstring which specifies the direction in which the animation should play as well as what to do when the playback reaches the end of the animation sequence in the current direction.
EffectTiming.duration - Web APIs
currently, a value of "auto" is the same as specifying 0.0.
EffectTiming.fill - Web APIs
WebAPIEffectTimingfill
for example, setting fill to "none" means the animation's effects are not applied to the element if the current time is outside the range of times during which the animation is running, while "forwards" ensures that once the animation's end time has been passed, the element will continue to be drawn in the state it was in at its last rendered frame.
EffectTiming.iterationStart - Web APIs
it's currently undefined what happens if you specify a value of iterationstart which is greater than the value of animationeffecttimingproperties.iterations.
Element: DOMActivate event - Web APIs
/www.w3.org/2000/svg" version="1.2" baseprofile="tiny" xmlns:ev="http://www.w3.org/2001/xml-events" width="6cm" height="5cm" viewbox="0 0 600 500"> <desc>example: invoke an ecmascript function from a domactivate event</desc> <!-- ecmascript to change the radius --> <script type="application/ecmascript"><![cdata[ function change(evt) { var circle = evt.target; var currentradius = circle.getfloattrait("r"); if (currentradius == 100) circle.setfloattrait("r", currentradius * 2); else circle.setfloattrait("r", currentradius * 0.5); } ]]></script> <!-- act on each domactivate event --> <circle cx="300" cy="225" r="100" fill="red"> <handler type="application/ecmascript" ev:event="domactivate"> change(evt); </handler> </circl...
Element.className - Web APIs
WebAPIElementclassName
syntax var cname = elementnodereference.classname; elementnodereference.classname = cname; cname is a string variable representing the class or space-separated classes of the current element.
Element: compositionend event - Web APIs
the compositionend event is fired when a text composition system such as an input method editor completes or cancels the current composition session.
Element: contextmenu event - Web APIs
in the latter case, the context menu is displayed at the bottom left of the focused element, unless the element is a tree, in which case the context menu is displayed at the bottom left of the current row.
Element: cut event - Web APIs
WebAPIElementcut event
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.
Element: fullscreenchange event - Web APIs
what that means to the example code is that, if an element is currently in full-screen mode, the fullscreenchange handler logs the id of the full-screen element to the console.
Element.getAnimations() - Web APIs
return value an array of animation objects, each representing an animation currently targetting the element on which this method is called, or one of its descendant elements if { subtree: true } is specified.
Element.getAttribute() - Web APIs
non-existing attributes essentially all web browsers (firefox, internet explorer, recent versions of opera, safari, konqueror, and icab, as a non-exhaustive list) return null when the specified attribute does not exist on the specified element; this is what the current dom specification draft specifies.
Element.getBoundingClientRect() - Web APIs
if you need the bounding rectangle relative to the top-left corner of the document, just add the current scrolling position to the top and left properties (these can be obtained using window.scrollx and window.scrolly) to get a bounding rectangle which is independent from the current scrolling position.
Element.getElementsByClassName() - Web APIs
usage notes as always, the returned collection is live, meaning that it always reflects the current state of the dom tree rooted at the element on which the function was called.
Element.hasAttributeNS() - Web APIs
hasattributens returns a boolean value indicating whether the current element has the specified attribute.
Element.hasAttributes() - Web APIs
the hasattributes() method of the element interface returns a boolean indicating whether the current element has any attributes or not.
Element: mousedown event - Web APIs
if isdrawing is true, the event handler calls the drawline function to draw a line from the stored x and y values to the current location.
Element: mousemove event - Web APIs
if isdrawing is true, the event handler calls the drawline function to draw a line from the stored x and y values to the current location.
Element: mouseup event - Web APIs
if isdrawing is true, the event handler calls the drawline function to draw a line from the stored x and y values to the current location.
Element.removeAttributeNS() - Web APIs
attrname is a string that names the attribute to be removed from the current node.
Element.removeAttributeNode() - Web APIs
the removeattributenode() method of the element object removes the specified attribute from the current element.
Element.scrollIntoViewIfNeeded() - Web APIs
the element.scrollintoviewifneeded() method scrolls the current element into the visible area of the browser window if it's not already within the visible area of the browser window.
Element.setAttribute() - Web APIs
to get the current value of an attribute, use getattribute(); to remove an attribute, call removeattribute().
Element.setCapture() - Web APIs
example in this example, the current mouse coordinates are drawn while you mouse around after clicking and holding down on an element.
Event.explicitOriginalTarget - Web APIs
for example, mouse events are retargeted to their parent node when they happen over text nodes (see bug 185889), and in that case currenttarget will show the parent and explicitoriginaltarget will show the text node.
Event.stopPropagation() - Web APIs
the stoppropagation() method of the event interface prevents further propagation of the current event in the capturing and bubbling phases.
ExtendableEvent() - Web APIs
currently no possible options exist inside the spec, but this has been defined for forward compatibility across the different derived events.
FeaturePolicy.allowedFeatures() - Web APIs
example the followin example logs all the allowed directives for the current document.
FeaturePolicy.features() - Web APIs
feature whose name appears on the list might not be allowed by the feature policy of the current execution context and/or might not be accessible because of user's permissions.
FeaturePolicy.getAllowlistForFeature() - Web APIs
the getallowlistforfeature() method of the featurepolicy allows query of the allow list for a specific feature for the current feature policy.
FetchEvent() - Web APIs
options are as follows: clientid read only the client that the current service worker is controlling.
FetchEvent.client - Web APIs
WebAPIFetchEventclient
the fetchevent.client read-only property returns the client that the current service worker is controlling.
FetchEvent.clientId - Web APIs
the clientid read-only property of the fetchevent interface returns the id of the client that the current service worker is controlling.
FetchEvent.navigationPreload - Web APIs
the navigationpreload read-only property of the fetchevent interface returns a promise that resolves to the instance of navigationpreloadmanager associated with the current service worker registration.
File.lastModifiedDate - Web APIs
files without a known last modified date returns the current date .
File.type - Web APIs
WebAPIFiletype
edia type(mime) indicating the type of the file, for example "image/png" for png images example <input type="file" multiple onchange="showtype(this)"> function showtype(fileinput) { var files = fileinput.files; for (var i = 0; i < files.length; i++) { var name = files[i].name; var type = files[i].type; alert("filename: " + name + " , type: " + type); } } note: based on the current implementation, browsers won't actually read the bytestream of a file to determine its media type.
FileEntrySync - Web APIs
file() returns a file that represents the current state of the file that this fileentry represents.
FileReader.readyState - Web APIs
the filereader readystate property provides the current state of the reading operation a filereader is in.
FileReader - Web APIs
loading 1 data is currently being loaded.
FileReaderSync.readAsArrayBuffer() - Web APIs
notreadableerror is raised when the resource cannot be read due to a permission problem, like a concurrent lock.
FileReaderSync.readAsBinaryString() - Web APIs
notreadableerror is raised when the resource cannot be read due to a permission problem, like a concurrent lock.
FileReaderSync.readAsDataURL() - Web APIs
notreadableerror is raised when the resource cannot be read due to a permission problem, like a concurrent lock.
FileReaderSync.readAsText() - Web APIs
notreadableerror is raised when the resource cannot be read due to a permission problem, like a concurrent lock.
FileSystem.name - Web APIs
WebAPIFileSystemname
this usvstring is unique among all file systems currently exposed by the file and directory entries api.
FileSystemDirectoryEntry.getDirectory() - Web APIs
these options are currently not useful in web contexts.
FileSystemDirectoryEntry.getFile() - Web APIs
these options are currently not useful in web contexts.
FileSystemDirectoryReader.readEntries() - Web APIs
once the current item is in the list, the item's isdirectory property is checked.
FileSystemDirectoryReader - Web APIs
because this is a non-standard api, whose specification is not currently on a standards track, it's important to keep in mind that not all browsers implement it, and those that do may implement only small portions of it.
FileSystemEntry - Web APIs
because this is a non-standard api, whose specification is not currently on a standards track, it's important to keep in mind that not all browsers implement it, and those that do may implement only small portions of it.
FileSystemFlags - Web APIs
note that these option flags currently don't have any useful meaning when used in the scope of web content, where security precautions prevent the creation of new files or the replacement of existing ones.
Introduction to the File and Directory Entries API - Web APIs
while firefox supports blob storage for indexeddb, chrome currently does not (chrome is still implementing support for blob storage in indexeddb).
Force Touch events - Web APIs
event properties the following property is known to be available on the webkitmouseforcewillbegin, mousedown, webkitmouseforcechanged, webkitmouseforcedown, webkitmouseforceup, mousemove, and mouseup event objects: mouseevent.webkitforce read only the amount of pressure currently being applied to the trackpad/touchscreen constants these constants are useful for determining the relative intensity of the pressure indicated by mouseevent.webkitforce: mouseevent.webkit_force_at_mouse_down read only minimum force necessary for a normal click mouseevent.webkit_force_at_force_mouse_down read only minimum force necessary for a force click specifications not part...
FormData.append() - Web APIs
WebAPIFormDataappend
example the following line creates an empty formdata object: var formdata = new formdata(); // currently empty you can add key/value pairs to this using formdata.append: formdata.append('username', 'chris'); formdata.append('userpic', myfileinput.files[0], 'chris.jpg'); as with regular form data, you can append multiple values with the same name.
FormData.set() - Web APIs
WebAPIFormDataset
example the following line creates an empty formdata object: var formdata = new formdata(); // currently empty you can set key/value pairs on this using formdata.set: formdata.set('username', 'chris'); formdata.set('userpic', myfileinput.files[0], 'chris.jpg'); if the sent value is different than string or blob it will be automatically converted to string: formdata.set('name', 72); formdata.get('name'); // "72" specifications specification status comment xmlhttpreques...
GainNode.gain - Web APIs
WebAPIGainNodegain
gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'gain' in that specification.
GainNode - Web APIs
WebAPIGainNode
gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'gainnode' in that specification.
Gamepad.buttons - Web APIs
WebAPIGamepadbuttons
each gamepadbutton object has two properties: pressed and value: the pressed property is a boolean indicating whether the button is currently pressed (true) or unpressed (false).
Gamepad.index - Web APIs
WebAPIGamepadindex
the gamepad.index property of the gamepad interface returns an integer that is auto-incremented to be unique for each device currently connected to the system.
Gamepad.mapping - Web APIs
WebAPIGamepadmapping
currently there is only one supported known layout–the standard gamepad.
Gamepad.timestamp - Web APIs
WebAPIGamepadtimestamp
note: this property is not currently supported anywhere.
Gamepad - Web APIs
WebAPIGamepad
gamepad.index read only an integer that is auto-incremented to be unique for each device currently connected to the system.
GamepadButton.pressed - Web APIs
the gamepadbutton.pressed property of the gamepadbutton interface returns a boolean indicating whether the button is currently pressed (true) or unpressed (false).
GamepadButton.value - Web APIs
the gamepadbutton.value property of the gamepadbutton interface returns a double value used to represent the current state of analog buttons on many modern gamepads, such as the triggers.
GamepadHapticActuator.type - Web APIs
syntax var myactuatortype = gamepadhapticactuatorinstance.type; value an enum of type gamepadhapticactuatortype; currently available types are: vibration — vibration hardware, which creates a rumbling effect.
Gamepad API - Web APIs
it contains three interfaces, two events and one specialist function, to respond to gamepads being connected and disconnected, and to access other information about the gamepads themselves, and what buttons and other controls are currently being pressed.
Geolocation - Web APIs
geolocation.getcurrentposition() secure context determines the device's current location and gives back a geolocationposition object with the data.
GeolocationPosition - Web APIs
geolocationposition.coords read only secure context returns a geolocationcoordinates object defining the current location.
GlobalEventHandlers.onabort - Web APIs
while the standard for aborting a document load is defined, html issue #3525 suggests that browsers should not currently fire the abort event on a window that would trigger onabort to be called.
GlobalEventHandlers.oncuechange - Web APIs
the cuechange event fires when a texttrack has changed the currently displaying cues.
GlobalEventHandlers.ondrag - Web APIs
> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function drag_handler(ev) { console.log("drag"); } function dragstart_handler(ev) { console.log("dragstart"); ev.datatransfer.setdata("text", ev.target.id); } function drop_handler(ev) { console.log("drop"); ev.currenttarget.style.background = "lightyellow"; ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } 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> <!-- <div clas...
GlobalEventHandlers.ondragover - Web APIs
> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function drag_handler(ev) { console.log("drag"); } function dragstart_handler(ev) { console.log("dragstart"); ev.datatransfer.setdata("text", ev.target.id); } function drop_handler(ev) { console.log("drop"); ev.currenttarget.style.background = "lightyellow"; ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } 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="sour...
GlobalEventHandlers.ondragstart - Web APIs
> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function drag_handler(ev) { console.log("drag"); } function dragstart_handler(ev) { console.log("dragstart"); ev.datatransfer.setdata("text", ev.target.id); } function drop_handler(ev) { console.log("drop"); ev.currenttarget.style.background = "lightyellow"; ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } 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="sour...
GlobalEventHandlers.ondrop - Web APIs
> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function drag_handler(ev) { console.log("drag"); } function dragstart_handler(ev) { console.log("dragstart"); ev.datatransfer.setdata("text", ev.target.id); } function drop_handler(ev) { console.log("drop"); ev.currenttarget.style.background = "lightyellow"; ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } 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 class="source">...
GlobalEventHandlers.onreset - Web APIs
example this example logs the current event.timestamp whenever you reset the form.
HTMLAnchorElement.rel - Web APIs
it is a domstring containing a space-separated list of link types indicating the relationship between the resource represented by the <a> element and the current document.
HTMLAnchorElement.relList - Web APIs
it is a live domtokenlist containing the set of link types indicating the relationship between the resource represented by the <a> element and the current document.
HTMLAreaElement.rel - Web APIs
it is a domstring containing a space-separated list of link types indicating the relationship between the resource represented by the <area> element and the current document.
HTMLAreaElement.relList - Web APIs
it is a live domtokenlist containing the set of link types indicating the relationship between the resource represented by the <area> element and the current document.
msAudioDeviceType - Web APIs
for real-time communications, you can use the msaudiodevicetype property with the value console, multimedia, or communications to specify where the current audio should output.
HTMLButtonElement - Web APIs
htmlbuttonelement.value is a domstring representing the current form control value of the button.
HTMLCollection - Web APIs
currently htmlcollections does not recognize purely numeric ids, which would cause conflict with the array-style access, though html5 does permit these.
HTMLDialogElement: cancel event - Web APIs
the cancel event fires on a <dialog> when the user instructs the browser that they wish to dismiss the current open dialog.
HTMLElement: animationcancel event - Web APIs
bubbles yes cancelable no interface animationevent event handler property onanimationcancel examples this code gets an element that's currently being animated and adds a listener to the animationcancel event.
HTMLElement: beforeinput event - Web APIs
bubbles yes cancelable yes interface inputevent event handler property none sync / async sync composed yes default action update the dom element examples this example logs current value of the element immediately before replacing that value with the new one applied to the <input> element.
inert - Web APIs
WebAPIHTMLElementinert
polyfills currently, browser support is lacking.
HTMLElement.offsetLeft - Web APIs
the htmlelement.offsetleft read-only property returns the number of pixels that the upper left corner of the current element is offset to the left within the htmlelement.offsetparent node.
HTMLElement.offsetParent - Web APIs
syntax parentobj = element.offsetparent; parentobj is an object reference to the element in which the current element is offset.
HTMLElement.offsetTop - Web APIs
the htmlelement.offsettop read-only property returns the distance of the current element relative to the top of the offsetparent node.
HTMLElement.onpaste - Web APIs
note that there is currently no dom-only way to obtain the text being pasted; you'll have to use an nsiclipboard to get that information.
HTMLElement.outerText - Web APIs
as a setter, it removes the current node and replaces it with the given text.
HTMLFormElement.name - Web APIs
the htmlformelement.name property represents the name of the current <form> element as a string.
HTMLFormElement: reset event - Web APIs
bubbles yes (although specified as a simple event that doesn't bubble) cancelable yes interface event event handler property globaleventhandlers.onreset examples this example uses eventtarget.addeventlistener() to listen for form resets, and logs the current event.timestamp whenever that occurs.
HTMLFormElement: submit event - Web APIs
examples this example uses eventtarget.addeventlistener() to listen for form submit, and logs the current event.timestamp whenever that occurs, then prevents the default action of submitting the form.
HTMLImageElement.height - Web APIs
mage height: <span class="size">?</span>px (resize to update)</p> <img src="/files/17373/clock-demo-200px.png" alt="clock" srcset="/files/17373/clock-demo-200px.png 200w, /files/17374/clock-demo-400px.png 400w" sizes="(max-width: 400px) 200px, 300px"> javascript the javascript code looks at the height to determine the height of the image given the width at which it's currently drawn.
HTMLImageElement.loading - Web APIs
the htmlimageelement property loading is a string whose value provides a hint to the user agent that tells the browser how to handle loading images which are currently outside the window's visual viewport.
HTMLInputElement.multiple - Web APIs
firefox currently only supports multiple for <input type="file">.
HTMLInputElement: search event - Web APIs
current ua implementations of <input type="search"> have an additional control to clear the field.
HTMLInputElement.setSelectionRange() - Web APIs
the htmlinputelement.setselectionrange() method sets the start and end positions of the current text selection in an <input> or <textarea> element.
HTMLInputElement.stepDown() - Web APIs
throws an invalid_state_err exception: if the method is not applicable to for the current type value, if the element has no step value, if the value cannot be converted to a number, if the resulting value is above the max or below the min.
HTMLKeygenElement - Web APIs
note: this page describes the keygen element interface as specified, not as currently implemented by gecko.
HTMLLinkElement.rel - Web APIs
it is a domstring containing a space-separated list of link types indicating the relationship between the resource represented by the <link> element and the current document.
HTMLLinkElement.relList - Web APIs
it is a live domtokenlist containing the set of link types indicating the relationship between the resource represented by the <link> element and the current document.
HTMLMediaElement.fastSeek() - Web APIs
note: if you need to seek with precision, you should set htmlmediaelement.currenttime instead.
HTMLMediaElement.networkState - Web APIs
the htmlmediaelement.networkstate property indicates the current state of the fetching of media over the network.
HTMLMediaElement.play() - Web APIs
possible errors include: notallowederror the user agent (browser) or operating system doesn't allow playback of media in the current context or situation.
HTMLMediaElement.playbackRate - Web APIs
the normal playback rate is multiplied by this value to obtain the current rate, so a value of 1.0 indicates normal speed.
HTMLMediaElement.seekToNextFrame() - Web APIs
the htmlmediaelement.seektonextframe() method asynchronously advances the the current play position to the next frame in the media.
HTMLMediaElement: seeked event - Web APIs
the seeked event is fired when a seek operation completed, the current playback position has changed, and the boolean seeking attribute is changed to false.
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).
HTMLObjectElement - Web APIs
htmlobjectelement.tabindex is a long representing the position of the element in the tabbing navigation order for the current document.
HTMLElement.blur() - Web APIs
the htmlelement.blur() method removes keyboard focus from the current element.
HTMLOrForeignElement.tabIndex - Web APIs
the tabindex property of the htmlorforeignelement interface represents the tab order of the current element.
HTMLOrForeignElement - Web APIs
e provides read/write access to all the custom data attributes (data-*) set on the element.nonce the nonce property of the htmlorforeignelement interface returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.tabindexthe tabindex property of the htmlorforeignelement interface represents the tab order of the current element.methodsblur()the htmlelement.blur() method removes keyboard focus from the current element.focus()the htmlelement.focus() method sets focus on the specified element, if it can be focused.
HTMLStyleElement.type - Web APIs
the htmlstyleelement.type read-only property returns the type of the current style.
HTMLTrackElement - Web APIs
cuechange sent when the underlying texttrack has changed the currently-presented cues.
HTMLVideoElement.getVideoPlaybackQuality() - Web APIs
syntax videopq = videoelement.getvideoplaybackquality(); return value a videoplaybackquality object providing information about the video element's current playback quality.
HTMLVideoElement.videoHeight - Web APIs
if the element is currently displaying the poster frame rather than rendered video, the poster frame's intrinsic size is considered to be the size of the <video> element.
HTMLVideoElement.videoWidth - Web APIs
if the element is currently displaying the poster frame rather than rendered video, the poster frame's intrinsic size is considered to be the size of the <video> element.
HTMLVideoElement - Web APIs
htmlvideoelement.getvideoplaybackquality() returns a videoplaybackquality object that contains the current playback metrics.
In depth: Microtasks and the JavaScript runtime environment - Web APIs
in other words, microtasks can enqueue new microtasks and those new microtasks will execute before the next task begins to run, and before the end of the current event loop iteration.
Headers() - Web APIs
WebAPIHeadersHeaders
example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to this using headers.append: myheaders.append('content-type', 'image/jpeg'); myheaders.get('content-type'); // returns 'image/jpeg' or you can add the headers you want as the headers object is created.
Headers.append() - Web APIs
WebAPIHeadersappend
example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to this using append(): myheaders.append('content-type', 'image/jpeg'); myheaders.get('content-type'); // returns 'image/jpeg' if the specified header already exists, append() will change its value to the specified value.
Headers.get() - Web APIs
WebAPIHeadersget
example creating an empty headers object is simple: var myheaders = new headers(); // currently empty myheaders.get('not-set'); // returns null you could add a header to this using headers.append, then retrieve it using get(): myheaders.append('content-type', 'image/jpeg'); myheaders.get('content-type'); // returns "image/jpeg" if the header has multiple values associated with it, the byte string will contain all the values, in the order they were added to the headers object: myhead...
Headers.getAll() - Web APIs
WebAPIHeadersgetAll
example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to this using headers.append, then retrieve it using getall(): myheaders.append('content-type', 'image/jpeg'); myheaders.getall('content-type'); // returns [ "image/jpeg" ] if the header has multiple values associated with it, the array will contain all the values, in the order they were added to the headers object: myheaders.append('accept-encoding', 'deflate'...
Headers.has() - Web APIs
WebAPIHeadershas
example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to this using headers.append, then test for the existence of it using has(): myheaders.append('content-type', 'image/jpeg'); myheaders.has('content-type'); // returns true myheaders.has('accept-encoding'); // returns false specifications specification status comment fetchthe definition of 'has()' in that specification.
Headers.set() - Web APIs
WebAPIHeadersset
example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to this using headers.append, then set a new value for this header using set(): myheaders.append('content-type', 'image/jpeg'); myheaders.set('content-type', 'text/html'); if the specified header does not already exist, set() will create it and set its value to the specified value.
History.length - Web APIs
WebAPIHistorylength
the history.length read-only property returns an integer representing the number of elements in the session history, including the currently loaded page.
History.scrollRestoration - Web APIs
examples query the current scroll restoration behavior.
History.state - Web APIs
WebAPIHistorystate
syntax const currentstate = history.state value the state at the top of the history stack.
IDBCursor.continuePrimaryKey() - Web APIs
invalidstateerror the cursor is currently being iterated or has iterated past its end.
IDBCursor.direction - Web APIs
also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
IDBCursor.key - Web APIs
WebAPIIDBCursorkey
also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
IDBCursorSync - Web APIs
method overview bool continue (in optional any key); void remove () raises (idbdatabaseexception); attributes attribute type description count readonly unsigned long long the total number of objects that share the current key.
IDBDatabase.transaction() - Web APIs
you're storing critical data that cannot be recomputed later) you can force a transaction to flush to disk before delivering the complete event by creating a transaction using the experimental (non-standard) readwriteflush mode (see idbdatabase.transaction.) this is currently experimental, and can only be used if the dom.indexeddb.experimental pref is set to true in about:config.
IDBDatabase - Web APIs
idbdatabase.objectstorenames read only a domstringlist that contains a list of the names of the object stores currently in the connected database.
IDBDatabaseException - Web APIs
transaction_inactive_err 7 a request was made against a transaction that is either not currently active or is already finished.
IDBFactory.deleteDatabase() - Web APIs
syntax for the current standard: var request = indexeddb.deletedatabase(name); for the experimental version with options (see below): var request = indexeddb.deletedatabase(name, options); parameters name the name of the database you want to delete.
IDBFactory - Web APIs
methods idbfactory.open the current method to request opening a connection to a database.
IDBIndex.isAutoLocale - Web APIs
'<td>' + cursor.value.company + '</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications not currently part of any specification.
IDBLocaleAwareKeyRange - Web APIs
gt;' + '&lt;td&gt;' + cursor.value.email + '&lt;/td&gt;' + '&lt;td&gt;' + cursor.value.phone + '&lt;/td&gt;' + '&lt;td&gt;' + cursor.value.age + '&lt;/td&gt;'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications not currently part of any specification.
IDBObjectStore.createIndex() - Web APIs
locale currently firefox-only (43+), this allows you to specify a locale for the index.
IDBObjectStore.delete() - Web APIs
bear in mind that if you are using a idbcursor, you can use the idbcursor.delete() method to more efficiently delete the current record — without having to explicitly look up the record's key.
IDBObjectStore.index() - Web APIs
the index() method of the idbobjectstore interface opens a named index in the current object store, after which it can be used to, for example, return a series of records sorted by that index using a cursor.
IDBObjectStore.openCursor() - Web APIs
agment we create a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store: var transaction = db.transaction("name", "readonly"); var objectstore = transaction.objectstore("name"); var request = objectstore.opencursor(); request.onsuccess = function(event) { var cursor = event.target.result; if(cursor) { // cursor.value contains the current record being iterated through // this is where you'd do something with the result cursor.continue(); } else { // no more results } }; specification specification status comment indexed database api 2.0the definition of 'opencursor()' in that specification.
IDBObjectStore.openKeyCursor() - Web APIs
eate a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store: var transaction = db.transaction("name", "readonly"); var objectstore = transaction.objectstore("name"); var request = objectstore.openkeycursor(); request.onsuccess = function(event) { var cursor = event.target.result; if(cursor) { // cursor.key contains the key of the current record being iterated through // note that there is no cursor.value, unlike for opencursor // this is where you'd do something with the result cursor.continue(); } else { // no more results } }; specifications specification status comment indexed database api 2.0the definition of 'openkeycursor()' in that specification.
IDBObjectStore - Web APIs
this is for deleting all current records out of an object store.
IDBObjectStoreSync - Web APIs
openindex() opens the index with the given name, using the mode of the current transaction.
IDBOpenDBRequest: upgradeneeded event - Web APIs
the upgradeneeded event is fired when an attempt was made to open a database with a version number higher than its current version.
IDBOpenDBRequest - Web APIs
upgradeneeded fired when an attempt was made to open a database with a version number higher than its current version.
IDBRequest.readyState - Web APIs
syntax var currentreadystate = request.readystate; value the idbrequestreadystate of the request, which takes one of the following two values: value meaning pending the request is pending.
IDBTransaction.abort() - Web APIs
at the end, we simply abort any activity done under the current transaction using abort().
IDBTransaction.onabort - Web APIs
the onabort event handler of the idbtransaction interface handles the abort event, fired, when the current transaction is aborted via the idbtransaction.abort method.
IDBTransaction.oncomplete - Web APIs
you're storing critical data that cannot be recomputed later) you can force a transaction to flush to disk before delivering the complete event by creating a transaction using the experimental (non-standard) readwriteflush mode (see idbdatabase.transaction.) this is currently experimental, and can only be used if the dom.indexeddb.experimental pref is set to true in about:config.
IDBTransaction - Web APIs
transactions of this mode cannot run concurrently with other transactions.
IIRFilterNode.getFrequencyResponse() - Web APIs
the getfrequencyresponse() method of the iirfilternode interface takes the current filtering algorithm's settings and calculates the frequency response for frequencies specified in a specified array of frequencies.
IIRFilterNode - Web APIs
it also has the following additional methods: getfrequencyresponse() uses the filter's current parameter settings to calculate the response for frequencies specified in the provided array of frequencies.
IdleDeadline - Web APIs
methods idledeadline.timeremaining() returns a domhighrestimestamp, which is a floating-point value providing an estimate of the number of milliseconds remaining in the current idle period.
ImageBitmapRenderingContext.transferFromImageBitmap() - Web APIs
// transfer the current frame to the visible canvas var bitmap = offscreen.transfertoimagebitmap(); htmlcanvas.transferfromimagebitmap(bitmap); specifications specification status comment html living standardthe definition of 'transferfromimagebitmap()' in that specification.
ImageCapture.getPhotoSettings() - Web APIs
the getphotosettings() method of the imagecapture interface returns a promise that resolves with a photosettings object containing the current photo configuration settings.
ImageCapture - Web APIs
imagecapture.getphotosettings() returns a promise that resolves with a photosettings object containing the current photo configuration settings.
Browser storage limits and eviction criteria - Web APIs
once the global limit for temporary storage is reached (more on the limit later), we try to find all currently unused origins (i.e., ones with no tabs/apps open that are keeping open datastores).
IndexedDB API - Web APIs
idbcursorwithvalue iterates over object stores and indexes and returns the cursor's current value.
InstallEvent.InstallEvent() - Web APIs
available options are as follows: activeworker: the serviceworker that is currently actively controlling the page.
InstallEvent.activeWorker - Web APIs
the activeworker read-only property of the installevent interface returns the serviceworker that is currently actively controlling the page.
IntersectionObserver.observe() - Web APIs
this element must be a descendant of the root element (or contained wtihin the current document, if the root is the document's viewport).
IntersectionObserverEntry.intersectionRatio - Web APIs
the intersectionobserverentry interface's read-only intersectionratio property tells you how much of the target element is currently visible within the root's intersection ratio, as a value between 0.0 and 1.0.
IntersectionObserverEntry.isIntersecting - Web APIs
example in this simple example, an intersection callback is used to update a counter of how many targeted elements are currently intersecting with the intersection root.
KeyboardEvent() - Web APIs
working draft current definition.
KeyboardEvent.initKeyEvent() - Web APIs
the initkeyevent is the current gecko equivalent of the dom level 3 events (initially drafted and also deprecated in favor of keyboardevent() keyboard.initkeyboardevent() method with the following arguments : typearg of type domstring canbubblearg of type boolean cancelablearg of type boolean viewarg of type views::abstractview keyidentifierarg of type domstring keylocationarg of type unsigned long modifierslist of type domstr...
KeyboardEvent.keyIdentifier - Web APIs
specifications not part of any current specification.
Keyboard API - Web APIs
“writing system keys” are defined in the writing system keys section of the ui events keyboardevent code values spec as the physical keys that change meaning based on the current locale and keyboard layout.
KeyframeEffect.KeyframeEffect() - Web APIs
iterationcomposite determines how values build from iteration to iteration in the current animation.
KeyframeEffect.iterationComposite - Web APIs
syntax // getting var iterationcompositeenumeration = keyframeeffect.iterationcomposite; // setting keyframeeffect.iterationcomposite = 'replace'; values replace the keyframeeffect value produced is independent of the current iteration.
KeyframeEffect - Web APIs
animationeffect.getcomputedtiming() returns the calculated, current timing values for this keyframe effect.
LargestContentfulPaint - Web APIs
properties largestcontentfulpaint.element the element that is the current largest contentful paint.
LayoutShiftAttribution - Web APIs
layoutshiftattribution.currentrect returns a domrect representing the position of the element after the shift.
LocalFileSystem - Web APIs
another api, the quota management api, lets you query an origin's current quota usage and allocation using window.webkitpersistentstorage.queryusageandquota().
Location: reload() - Web APIs
WebAPILocationreload
the location.reload() method reloads the current url, like the refresh button.
MIDIAccess - Web APIs
midiaccess.sysexenabled read only a boolean attribute indicating whether system exclusive support is enabled on the current midiaccess instance.
MIDIInput - Web APIs
WebAPIMIDIInput
event handlers midiinput.onmidimessage when the current port receives a midimessage it triggers a call to this event handler.
MIDIInputMap - Web APIs
the midiinputmap read-only interface of the web midi api provides a map-like interface to the currently available midi input ports.
MIDIOutputMap - Web APIs
the midioutputmap read-only interface of the web midi api provides a map-like interface to the currently available midi output ports.
MSCandidateWindowHide - Web APIs
syntax event property object.oncandidatewindowhide = handler; addeventlistener method object.addeventlistener("mscandidatewindowhide", handler, usecapture) nbsp; parameters pevtobj [in] type: ihtmleventobj pointer to an ihtmleventobj interface for the current event.
MSCandidateWindowShow - Web APIs
syntax event property object.oncandidatewindowshow = handler; addeventlistener method object.addeventlistener("mscandidatewindowshow", handler, usecapture) parameters pevtobj [in] type: ihtmleventobj pointer to an ihtmleventobj interface for the current event.
MSCandidateWindowUpdate - Web APIs
syntax event property object.oncandidatewindowupdate = handler; addeventlistener method object.addeventlistener("mscandidatewindowupdate", handler, usecapture) parameters pevtobj [in] type: ihtmleventobj pointer to an ihtmleventobj interface for the current event.
MediaDevices.getDisplayMedia() - Web APIs
notallowederror permission to access a screen area was denied by the user, or the current browsing instance is not permitted access to screen sharing.
MediaDevices.ondevicechange - Web APIs
this method is called any time we want to fetch the current list of media devices and then update the displayed lists of audo and video devices using that information.
MediaElementAudioSourceNode - Web APIs
when the mouse pointer is moved, the updatepage() function is invoked, which calculates the current gain as a ratio of mouse y position divided by overall window height.
MediaImage - Web APIs
its contents can be displayed by the user agent in appropriate contexts, like player interface to show the current playing video or audio track.
close() - Web APIs
the mediakeysession.close() method notifies that the current media session is no longer needed, and that the content decryption module should release any resources associated with this object and close it.
expiration - Web APIs
the mediakeysession.expiration read-only property returns the time after which the keys in the current session can no longer be used to decrypt media data, or nan if no such time exists.
keyStatuses - Web APIs
the mediakeysession.keystatuses read-only property returns a reference to a read-only mediakeystatusmap of the current session's keys and their statuses.
load() - Web APIs
}); parameter sessionid a unique string generated by the content decription module for the current media object and its associated keys or licenses.
remove() - Web APIs
the mediakeysession.remove() method returns a promise after removing any session data associated with the current object.
sessionId - Web APIs
the mediakeysession.sessionid read-only property contains a unique string generated by the cdm for the current media object and its associated keys or licenses.
MediaList.mediaText - Web APIs
examples the following would log to the console a textual representation of the medialist of the first stylesheet applied to the current document.
MediaList - Web APIs
WebAPIMediaList
examples the following would log to the console a textual representation of the medialist of the first stylesheet applied to the current document.
MediaQueryList - Web APIs
matchesread only a boolean that returns true if the document currently matches the media query list, or false if not.
MediaQueryListEvent - Web APIs
mediaquerylistevent.matchesread only a boolean that returns true if the document currently matches the media query list, or false if not.
MediaRecorder.requestData() - Web APIs
raise a dataavailable event containing a blob of the currently captured data (the blob is available under the event's data attribute.) create a new blob and place subsequently captured data into it.
MediaRecorder.resume() - Web APIs
continue gathering data into the current blob.
MediaRecorder.start() - Web APIs
notsupportederror the media stream you're attempting to record is inactive, or one or more of the stream's tracks is in a format that can't be recorded using the current configuration.
MediaRecorder.state - Web APIs
the mediarecorder.state read-only property returns the current state of the current mediarecorder object.
MediaSession.setPositionState() - Web APIs
the mediasession method setpositionstate() is used to update the current document's media playback position and speed for presentation by user's device in any kind of interface that provides details about ongoing media.
MediaSessionActionDetails.seekOffset - Web APIs
syntax let mediasessionactiondetails = { seekoffset: deltatimeinseconds }; let deltatime = mediasessionactiondetails.seekoffset; value a floating-point value indicating the time delta in seconds by which to move the playback position relative to its current timestamp.
MediaSource.duration - Web APIs
the duration property of the mediasource interface gets and sets the duration of the current media being presented.
MediaStreamTrack.applyConstraints() - Web APIs
if this parameter is omitted, all currently set custom constraints are cleared.
MediaStream Image Capture API - Web APIs
in addition to capturing data, it also allows you to retrieve information about device capabilities such as image size, red-eye reduction and whether or not there is a flash and what they are currently set to.
MediaTrackSettings.channelCount - Web APIs
the mediatracksettings dictionary's channelcount property is an integer indicating how many audio channel the mediastreamtrack is currently configured to have.
MediaTrackSettings.facingMode - Web APIs
the mediatracksettings dictionary's facingmode property is a domstring indicating the direction in which the camera producing the video track represented by the mediastreamtrack is currently facing.
MediaTrackSettings.sampleRate - Web APIs
the mediatracksettings dictionary's samplerate property is an integer indicating how many audio samples per second the mediastreamtrack is currently configured for.
MediaTrackSettings.sampleSize - Web APIs
the mediatracksettings dictionary's samplesize property is an integer indicating the linear sample size (in bits per sample) the mediastreamtrack is currently configured for.
Transcoding assets for Media Source Extensions - Web APIs
currently, mp4 containers with h.264 video and aac audio codecs have support across all modern browsers, while others don't.
Media Source API - Web APIs
htmlvideoelement.getvideoplaybackquality() returns a videoplaybackquality object for the currently played video.
MerchantValidationEvent.complete() - Web APIs
another payment request is currently being processed, the current payment request is not currently being displayed to the user, or payment information is currently being updated.
MouseEvent.buttons - Web APIs
working draft current working draft ...
MouseEvent.getModifierState() - Web APIs
the mouseevent.getmodifierstate() method returns the current state of the specified modifier key: true if the modifier is active (i.e., the modifier key is pressed or locked), otherwise, false.
MouseEvent.movementX - Web APIs
in other words, the value of the property is computed like this: currentevent.movementx = currentevent.screenx - previousevent.screenx.
MouseEvent.movementY - Web APIs
in other words, the value of the property is computed like this: currentevent.movementy = currentevent.screeny - previousevent.screeny.
MouseEvent.pageX - Web APIs
WebAPIMouseEventpageX
this includes any portion of the document not currently visible.
MouseEvent - Web APIs
mouseevent.getmodifierstate() returns the current state of the specified modifier key.
Using Navigation Timing - Web APIs
for example, to measure the perceived loading time for a page: window.addeventlistener("load", function() { let now = new date().gettime(); let loadingtime = now - performance.timing.navigationstart; document.queryselector(".output").innertext = loadingtime + " ms"; }, false); this code, executed when the load event occurs, subtracts from the current time the time at which the navigation whose timing was recorded began (performance.timing.navigationstart), and outputs that information to the screen by inserting it into an element.
Navigation Timing API - Web APIs
this article currently describes navigation timing level 1.
Navigator.clipboard - Web APIs
perhaps this code is being used in a browser extension that displays the current clipboard contents, automatically updating periodically or when specific events fire.
Navigator.connection - Web APIs
the navigator.connection read-only property returns a networkinformation object containing information about the system's connection, such as the current bandwidth of the user's device or whether the connection is metered.
Navigator.maxTouchPoints - Web APIs
the maxtouchpoints read-only property of the navigator interface returns the maximum number of simultaneous touch contact points are supported by the current device.
Navigator.oscpu - Web APIs
WebAPINavigatoroscpu
the navigator.oscpu property returns a string that identifies the current operating system.
Navigator.productSub - Web APIs
the navigator.productsub read-only property returns the build number of the current browser.
Navigator.vibrate() - Web APIs
WebAPINavigatorvibrate
passing a value of 0, an empty array, or an array containing all zeros will cancel any currently ongoing vibration pattern.
Navigator.xr - Web APIs
WebAPINavigatorxr
syntax const xr = navigator.xr value the xr object used to interface with the webxr device api in the current context.
NavigatorID.appVersion - Web APIs
this lead to the current situation, where browsers had to return fake values from these properties in order not to be locked out of some websites.
NavigatorID - Web APIs
navigatorid.useragent read only returns the user-agent string for the current browser.
NavigatorPlugins.javaEnabled() - Web APIs
this method indicates whether the current browser is java-enabled or not.
NavigatorStorage.storage - Web APIs
the navigatorstorage.storage read-only property returns the singleton storagemanager object used to access the overall storage capabilities of the browser for the current site or app.
NetworkInformation.downlinkMax - Web APIs
function logconnectiontype() { var connectiontype = 'not supported'; var downlinkmax = 'not supported'; if ('connection' in navigator) { connectiontype = navigator.connection.effectivetype; if ('downlinkmax' in navigator.connection) { downlinkmax = navigator.connection.downlinkmax; } } console.log('current connection type: ' + connectiontype + ' (downlink max: ' + downlinkmax + ')'); } logconnectiontype(); navigator.connection.addeventlistener('change', logconnectiontype); specifications specification status comment network information apithe definition of 'downlinkmax' in that specification.
NetworkInformation.rtt - Web APIs
the networkinformation.rtt read-only property returns the estimated effective round-trip time of the current connection, rounded to the nearest multiple of 25 milliseconds.
NetworkInformation - Web APIs
networkinformation.rtt read only returns the estimated effective round-trip time of the current connection, rounded to the nearest multiple of 25 milliseconds.
Node.appendChild() - Web APIs
WebAPINodeappendChild
if the given child is a reference to an existing node in the document, appendchild() moves it from its current position to the new position (there is no requirement to remove the node from its parent node before appending it to some other node).
Node.insertBefore() - Web APIs
WebAPINodeinsertBefore
if the given node already exists in the document, insertbefore() moves it from its current position to the new position.
Node.namespaceURI - Web APIs
WebAPINodenamespaceURI
when the node is a document, it returns the xml namespace for the current document.
Node.nodeName - Web APIs
WebAPINodenodeName
the nodename read-only property returns the name of the current node as a string.
Node.nodePrincipal - Web APIs
the node.nodeprincipal read-only property returns the nsiprincipal object representing current security context of the node.
Node.parentElement - Web APIs
syntax parentelement = node.parentelement parentelement is the parent element of the current node.
Node.parentNode - Web APIs
WebAPINodeparentNode
syntax parentnode = node.parentnode parentnode is the parent of the current node.
Node.rootNode - Web APIs
WebAPINoderootNode
the node.rootnode read-only property returns a node object representing the topmost node in the tree, or the current node if it's the topmost node in the tree.
NodeIterator.nextNode() - Web APIs
syntax node = nodeiterator.nextnode(); example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false // this optional argument is not used any more ); currentnode = nodeiterator.nextnode(); // returns the next node specifications specification status comment domthe definition of 'nodeiterator.nextnode' in that specification.
NotificationEvent.notification - Web APIs
console.log('notification tag:', event.notification.tag); console.log('notification data:', event.notification.data); event.notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications ...
NotificationEvent - Web APIs
example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications ...
Using the Notifications API - Web APIs
checking current permission status you can check to see if you already have permission by checking the value of the notification.permission read only property.
OfflineAudioContext.suspend() - Web APIs
invalidstateerror if the quantized frame number is one of the following: a negative number is less than or equal to the current time is greater than or equal to the total render duration is scheduled by another suspend for the same time specifications specification status comment web audio apithe definition of 'suspend()' in that specification.
OfflineAudioContext - Web APIs
offlineaudiocontext.startrendering() starts rendering the audio, taking into account the current connections and the current scheduled changes.
OffscreenCanvas.convertToBlob() - Web APIs
offscreen.converttoblob().then(function(blob) { console.log(blob); }); // blob { size: 334, type: "image/png" } specifications currently drafted as a proposal: offscreencanvas.
OffscreenCanvas.getContext() - Web APIs
note: this api is currently implemented for webgl1 and webgl2 contexts only.
OffscreenCanvas.convertToBlob() - Web APIs
offscreen.converttoblob().then(function(blob) { console.log(blob); }); // blob { size: 334, type: "image/png" } specifications currently drafted as a proposal: offscreencanvas.
OscillatorNode.type - Web APIs
// create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'type' in that specification.
OscillatorNode - Web APIs
// create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.connect(audioctx.destination); oscillator.start(); specifications specification status comment web audio apithe definition of 'oscillatornode' in that specification.
Paint​Worklet​.device​Pixel​Ratio - Web APIs
the paintworklet.devicepixelratio read-only property of the paintworklet interface returns the current device's ratio of physical pixels to logical pixels.
PaintWorklet.devicePixelRatio - Web APIs
the paintworklet.devicepixelratio read-only property of the paintworklet interface returns the current device's ratio of physical pixels to logical pixels.
PaintWorklet.devicePixelRatio - Web APIs
the paintworklet.devicepixelratio read-only property of the paintworklet interface returns the current device's ratio of physical pixels to logical pixels.
PannerNode.positionX - Web APIs
const context = new audiocontext(); const osc = new oscillatornode(context); const panner = new pannernode(context); panner.positionx.setvalueattime(-1, context.currenttime + 1); panner.positionx.setvalueattime(1, context.currenttime + 2); panner.positionx.setvalueattime(0, context.currenttime + 3); osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'positionx' in that specification.
PannerNode.positionY - Web APIs
const context = new audiocontext(); const osc = new oscillatornode(context); const panner = new pannernode(context); panner.panningmodel = 'hrtf'; panner.positiony.setvalueattime(1, context.currenttime + 1); panner.positiony.setvalueattime(-1, context.currenttime + 2); panner.positiony.setvalueattime(0, context.currenttime + 3); osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'positiony' in that specification.
PannerNode.positionZ - Web APIs
const context = new audiocontext(); const osc = new oscillatornode(context); const panner = new pannernode(context); panner.panningmodel = 'hrtf'; panner.positionz.setvalueattime(1, context.currenttime + 1); panner.positionz.setvalueattime(-1, context.currenttime + 2); panner.positionz.setvalueattime(0, context.currenttime + 3); osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'positionz' in that specification.
PannerNode.refDistance - Web APIs
e; // set the initial z position, then schedule the ramp panner.positionz.setvalueattime(0, starttime); panner.positionz.linearramptovalueattime(z_distance, starttime + note_length); osc.connect(panner) .connect(context.destination); osc.start(starttime); osc.stop(starttime + note_length); }; // this tone should decay immediately and fairly quickly scheduletesttone(1, context.currenttime); // this tone should decay slower and later than the previous one scheduletesttone(4, context.currenttime + note_length); // this tone should decay only slightly, and only start decaying fairly late scheduletesttone(7, context.currenttime + note_length * 2); after running this code, the resulting waveforms should look something like this: specifications specification status ...
PannerNode.rolloffFactor - Web APIs
r = rollofffactor; // set the initial z position, then schedule the ramp panner.positionz.setvalueattime(0, starttime); panner.positionz.linearramptovalueattime(z_distance, starttime + note_length); osc.connect(panner) .connect(context.destination); osc.start(starttime); osc.stop(starttime + note_length); }; // this tone should decay fairly quickly scheduletesttone(1, context.currenttime); // this tone should decay slower than the previous one scheduletesttone(0.5, context.currenttime + note_length); // this tone should decay only slightly scheduletesttone(0.1, context.currenttime + note_length * 2); after running this code, the resulting waveforms should look something like this: specifications specification status comment web audio apithe defini...
ParentNode.prepend() - Web APIs
syntax parentnode.prepend(...nodestoprepend); parameters nodestoprepend one or more nodes to insert before the first child node currently in the parentnode.
PasswordCredential - Web APIs
<form id="form" method="post"> <input type="text" name="id" autocomplete="username" /> <input type="password" name="password" autocomplete="current-password" /> <input type="hidden" name="csrf_token" value="*****" /> </form> then, a reference to this form element, using it to create a passwordcredential object, and storing it in the browser's password system.
PayerErrors - Web APIs
properties email optional if present, this domstring is a string describing the validation error from which the payer's email address—as given by paymentresponse.payeremail—currently suffers.
PaymentDetailsUpdate.error - Web APIs
this message can be used to explain to the user why they cannot submit their payment as currently specified—whether that's because the selected products cannot be shipped to their region or because their address is not served by any of the shipping companies you use.
PaymentRequest.PaymentRequest() - Web APIs
if this sequence is blank, it indicates the merchant cannot ship to the current shipping address.
PaymentRequest.abort() - Web APIs
var request = new paymentrequest(supportedinstruments, details, options); var paymenttimeout = window.settimeout(() => { window.cleartimeout(paymenttimeout); request.abort().then(() => { print('payment timed out after 20 minutes.'); }).catch(() => { print('unable to abort, because the user is currently in the process ' + 'of paying.'); }); }, 20 * 60 * 1000); /* 20 minutes */ specifications specification status comment payment request apithe definition of 'abort()' in that specification.
PaymentRequest: shippingoptionchange event - Web APIs
the string identifying the currently-selected shipping option can be found in the shippingoption property.
PaymentResponse - Web APIs
paymentresponse.requestid read only secure context returns the identifier of the paymentrequest that produced the current response.
Performance.memory - Web APIs
usedjsheapsize the currently active segment of js heap, in bytes.
Performance - Web APIs
the performance interface provides access to performance-related information for the current page.
PerformanceNavigation - Web APIs
the legacy performancenavigation interface represents information about how the navigation to the current document was done.
PerformanceObserver.takeRecords() - Web APIs
the takerecords() method of the performanceobserver interface returns the current list of performance entries stored in the performance observer, emptying it out.
PerformanceObserver - Web APIs
performanceobserver.takerecords() returns the current list of performance entries stored in the performance observer, emptying it out.
PerformanceObserverEntryList.getEntries() - Web APIs
this parameter is currently not supported on chrome or opera.
PerformanceResourceTiming.redirectEnd - Web APIs
when fetching a resource, if there are multiple http redirects, and any of the redirects have an origin that is different from the current document, and the timing allow check algorithm passes for each redirected resource, this property returns the time immediately after receiving the last byte of the response of the last redirect; otherwise, zero is returned.
PerformanceResourceTiming.redirectStart - Web APIs
if there are http redirects when fetching the resource and if any of the redirects are not from the same origin as the current document, but the timing allow check algorithm passes for each redirected resource, this property returns the starting time of the fetch that initiates the redirect; otherwise, zero is returned.
PerformanceResourceTiming - Web APIs
performanceresourcetiming.secureconnectionstartread only a domhighrestimestamp immediately before the browser starts the handshake process to secure the current connection.
PerformanceTiming.loadEventStart - Web APIs
the legacy performancetiming.loadeventstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the load event was sent for the current document.
PluginArray - Web APIs
pluginarray.refresh refreshes all plugins on the current page, optionally reloading documents.
Point - Web APIs
WebAPIPoint
it is not present in the current working draft of the css transforms level 1 specification.
PointerEvent.isPrimary - Web APIs
when two or more pointer device types are being used concurrently, multiple pointers (one for each pointertype) are considered primary.
PointerEvent.pointerId - Web APIs
let id; // let's assume that this is a previously saved pointerid target.addeventlistener('pointerdown', function(event) { // compare previous event's id that was cached // to current event's id and handle accordingly if (id === event.pointerid) process_event(event); }, false); specifications specification status comment pointer events – level 2the definition of 'pointerid' in that specification.
Multi-touch interaction - Web APIs
function update_background(ev) { // change background color based on the number of simultaneous touches/pointers // currently down: // white - target element has no touch points i.e.
PositionOptions.maximumAge - Web APIs
if set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position.
PositionOptions.timeout - Web APIs
the default value is infinity, meaning that getcurrentposition() won't return until the position is available.
ProgressEvent() - Web APIs
the progressevent() constructor returns a newly created progressevent, representing the current completion of a long process.
PublicKeyCredential.id - Web APIs
the id read-only property of the publickeycredential interface is a domstring, inherited from credential, which represents the identifier of the current publickeycredential instance.
PublicKeyCredential.rawId - Web APIs
this identifier is expected to be globally unique and is appointed for the current publickeycredential and its associated authenticatorassertionresponse.
PublicKeyCredential - Web APIs
with the current state of implementation, this method only resolves to true when windows hello is available on the system.
PushManager.registrations() - Web APIs
version the current version that the push endpoint is at.
PushManager.subscribe() - Web APIs
a new push subscription is created if the current service worker does not have an existing subscription.
PushRegistrationManager - Web APIs
pushregistrationmanager.getregistration() returns a promise that resolves the pushregistration associated with the current webapp.
PushSubscription.toJSON() - Web APIs
it currently only contains the subscription endpoint, as an endpoint member.
PushSubscription - Web APIs
pushsubscription.unsubscribe() starts the asynchronous process of unsubscribing from the push service, returning a promise that resolves to a boolean when the current subscription is successfully unregistered.
RTCConfiguration.bundlePolicy - Web APIs
all current major browsers are bundle compatible.
RTCConfiguration - Web APIs
icetransportpolicy optional the current ice transport policy; this must be one of the values from the rtcicetransportpolicy enumeration.
RTCDTMFSender.toneBuffer - Web APIs
the rtcdtmfsender interface's tonebuffer property returns a string containing a list of the dtmf tones currently queued for sending to the remote peer over the rtcpeerconnection.
RTCDTMFSender: tonechange event - Web APIs
examples this example establishes a handler for the tonechange event which updates an element to display the currently playing tone in its content, or, if all tones have played, the string "<none>".
RTCDTMFSender - Web APIs
f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="216" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">rtcdtmfsender</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties rtcdtmfsender.tonebuffer read only a domstring which contains the list of dtmf tones currently in the queue to be transmitted (tones which have already been played are no longer included in the string).
RTCDTMFToneChangeEvent.tone - Web APIs
syntax var tone = dtmftonechangeevent.tone; example this example establishes a handler for the tonechange event which updates an element to display the currently playing tone in its content, or, if all tones have played, the string "<none>".
RTCDataChannel: bufferedamountlow event - Web APIs
a bufferedamountlow event is sent to an rtcdatachannel when the number of bytes currently in the outbound data transfer buffer falls below the threshold specified in bufferedamountlowthreshold.
RTCDataChannel: message event - Web APIs
examples for a given rtcdatachannel, dc, created for a peer connection using its createdatachannel() method, this code sets up a handler for incoming messages and acts on them by adding the data contained within the message to the current document as a new <p> (paragraph) element.
RTCIceCandidate.usernameFragment - Web APIs
to do so, you can compare the value of usernamefragment to the current usernamefragment being used for the connection after receiving the candidate from the signaling server and before caling addicecandidate() to add it to the set of possible candidates.
RTCIceCandidate - Web APIs
methods tojson() given the rtcicecandidate's current configuration, tojson() returns a domstring containing a json representation of that configuration in the form of a rtcicecandidateinit object.
RTCIceCandidatePair.local - Web APIs
example this one-line example simply obtains the current candidate pair and then from that gets the local candidate.
RTCIceCandidatePair.remote - Web APIs
example this one-line example simply obtains the current candidate pair and then from that gets the remote candidate.
RTCIceCandidatePairStats.consentExpiredTimestamp - Web APIs
this indicates when the current stun bindings — the mapping of the ip address and port configurations for both peers on the webrtc connection — are due to expire.
RTCIceParameters.usernameFragment - Web APIs
the rtciceparameters dictionary's usernamefragment property specifies the username fragment ("ufrag") that uniquely identifies the corresponding ice session for the duration of the current ice session.
RTCIceTransport.getLocalCandidates() - Web APIs
the rtcicetransport method getlocalcandidates() returns an array of rtcicecandidate objects, one for each of the candidates that have been gathered by the local device during the current ice agent session.
RTCIdentityAssertion - Web APIs
the rtcidentityassertion interface of the the webrtc api represents the identity of the a remote peer of the current connection.
RTCInboundRtpStreamStats.firCount - Web APIs
syntax var fircount = rtcinboundrtpstreamstats.fircount; value an integer value indicating how many fir packets have been received by the sender during the current connection.
RTCOfferOptions - Web APIs
this is useful if network conditions have changed in a way that make the current configuration untenable or impractical, for instance.
RTCOutboundRtpStreamStats.firCount - Web APIs
syntax var fircount = rtcoutboundrtpstreamstats.fircount; value an integer value indicating how many fir packets have been received by the sender during the current connection.
RTCOutboundRtpStreamStats.qualityLimitationReason - Web APIs
the qualitylimitationreason property of the rtcoutboundrtpstreamstats dictionary is a string indicating the reason why the media quality in the stream is currently being reduced by the codec during encoding, or none if no quality reduction is being performed.
RTCOutboundRtpStreamStats - Web APIs
trackid the id of the rtcsenderaudiotrackattachmentstats or rtcsendervideotrackattachmentstats object containing the current track attachment to the rtcrtpsender responsible for this stream.
RTCPeerConnection() - Web APIs
icetransportpolicy optional the current ice transport policy; this must be one of the values from the rtcicetransportpolicy enum.
RTCPeerConnection.addIceCandidate() - Web APIs
invalidstateerror the rtcpeerconnection currently has no remote peer established (remotedescription is null).
RTCPeerConnection.close() - Web APIs
the rtcpeerconnection.close() method closes the current peer connection.
RTCPeerConnection.getStats() - Web APIs
this version of getstats() is obsolete; in addition, the data it returns is entirely different from the current specification, and the form of that data was never documented.
RTCPeerConnection: iceconnectionstatechange event - Web APIs
in this example, a handler for iceconnectionstatechange is set up to update a call state indicator by using the value of iceconnectionstate to create a string which corresponds to the name of a css class that we can assign to the status indicator to cause it to reflect the current state of the connection.
RTCPeerConnection.iceGatheringState - Web APIs
rtcicegatheringstate enum the rtcicegatheringstate enum defines string constants which reflect the current status of ice gathering, as returned using the rtcpeerconnection.icegatheringstate property.
RTCPeerConnection.onicegatheringstatechange - Web APIs
example this example updates status information presented to the user to let them know what's happening by examining the current value of the icegatheringstate property each time it changes and changing the contents of a status display based on the new information.
RTCPeerConnection.signalingState - Web APIs
rtcsignalingstate enum the rtcsignalingstate enum specifies the possible values of rtcpeerconnection.signalingstate, which indicates where in the process of signaling the exchange of offer and answer the connection currently is.
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
it takes as input the rtcpeerconnection being tested, calls getstats() to get a new rtcstatsreport with current statistics, then computes the results it's looking for, outputting those results as appropriate to the user by appending appropriate html to the contents of the <div> element whose class is stats-box.
RTCRemoteOutboundRtpStreamStats.remoteTimestamp - Web APIs
keep in mind that this means the clock may not be synchronized with the local clock, and that both the current time and the pace at which the clock runs may differ to some extent.
RTCRemoteOutboundRtpStreamStats - Web APIs
be aware that the remote clock may not be synchronized with the local clock (either in current time or speed at which time elapses).
RTCRtpReceiveParameters - Web APIs
properties this dictionary currently has no properties of its own; it exists for future expansion.
RTCRtpReceiver.getCapabilities() static function - Web APIs
the static function rtcrtpreceiver.getcapabilities() returns an rtcrtpcapabilities object describing the codecs and capabilities supported by rtcrtpreceivers on the current device.
RTCRtpReceiver.getContributingSources() - Web APIs
the getcontributingsources() method of the rtcrtpreceiver interface returns an array of rtcrtpcontributingsource instances, each corresponding to one csrc (contributing source) identifier received by the current rtcrtpreceiver in the last ten seconds.
RTCRtpReceiver.getSynchronizationSources() - Web APIs
the getsynchronizationsources() method of the rtcrtpreceiver interface returns an array of rtcrtpcontributingsource instances, each corresponding to one ssrc (synchronization source) identifier received by the current rtcrtpreceiver in the last ten seconds.
RTCRtpReceiver.track - Web APIs
the track read-only property of the rtcrtpreceiver interface returns the mediastreamtrack associated with the current rtcrtpreceiver instance.
RTCRtpStreamStats.firCount - Web APIs
syntax var fircount = rtcrtpstreamstats.fircount; value an integer value indicating how many fir packets have been received by the sender during the current connection.
RTCRtpTransceiver.direction - Web APIs
the transceiver's current direction is indicated by the currentdirection property.
RTCRtpTransceiver.receiver - Web APIs
syntax var rtpreceiver = rtcrtptransceiver.receiver; value an rtcrtpreceiver object which is responsible for receiving and decoding incoming media data whose media id is the same as the current value of mid.
RTCRtpTransceiver.sender - Web APIs
syntax var rtpsender = rtcrtptransceiver.sender; value an rtcrtpsender object used to encode and send media whose media id matches the current value of mid.
RTCRtpTransceiver - Web APIs
properties currentdirection read only a string from the enum rtcrtptransceiverdirection which indicates the transceiver's current directionality, or null if the transceiver is stopped or has never participated in an exchange of offers and answers.
RTCRtpTransceiverDirection - Web APIs
both the preferred direction and the currentdirection properties are of this type.
RTCSessionDescription() - Web APIs
a string which is a member of the rtcsdptype enum; it must have one of the following values: this enum defines strings that describe the current state of the session description, as used in the type property.
RTCSessionDescription - Web APIs
constants rtcsdptype this enum defines strings that describe the current state of the session description, as used in the type property.
RadioNodeList.value - Web APIs
on retrieving the value property, the value of the currently checked radio button is returned as a string.
RadioNodeList - Web APIs
on retrieving the value property, the value of the currently checked radio button is returned as a string.
Range.selectNodeContents() - Web APIs
eselect the contents of this paragraph.</p> <button id="select-button">select paragraph</button> <button id="deselect-button">deselect paragraph</button> javascript const p = document.getelementbyid('p'); const selectbutton = document.getelementbyid('select-button'); const deselectbutton = document.getelementbyid('deselect-button'); selectbutton.addeventlistener('click', e => { // clear any current selection const selection = window.getselection(); selection.removeallranges(); // select paragraph const range = document.createrange(); range.selectnodecontents(p); selection.addrange(range); }); deselectbutton.addeventlistener('click', e => { const selection = window.getselection(); selection.removeallranges(); }); result specifications specification status ...
ReadableByteStreamController.byobRequest - Web APIs
the byobrequest read-only property of the readablebytestreamcontroller interface returns the current byob pull request, or undefined if there are no pending requests.
ReadableByteStreamController - Web APIs
properties readablebytestreamcontroller.byobrequest read only returns the current byob pull request.
ReadableStream.getReader() - Web APIs
current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'getreader()' in that specification.
ReadableStream.pipeThrough() - Web APIs
the pipethrough() method of the readablestream interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.
ReadableStream.pipeTo() - Web APIs
the pipeto() method of the readablestream interface pipes the current readablestream to a given writablestream and returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
ReadableStreamBYOBRequest.view - Web APIs
the view getter property of the readablestreambyobrequest interface returns the current view.
ReadableStreamBYOBRequest - Web APIs
properties readablestreambyobrequest.view read only returns the current view.
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'readablestreamdefaultreader()' in that specification.
ReadableStreamDefaultReader.cancel() - Web APIs
current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'cancel()' in that specification.
ReadableStreamDefaultReader.read() - Web APIs
current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(processtext); }); } example 2 - handling text line by line this example shows how you might fetch a text file and handle it as a stream of text lines.
Report.type - Web APIs
WebAPIReporttype
currently the available types are deprecation, intervention, and crash.
Report - Web APIs
WebAPIReport
this contains the list of reports currently contained in the observer's report queue.
ReportingObserver.takeRecords() - Web APIs
the takerecords() method of the reportingobserver interface returns the current list of reports contained in the observer's report queue, and empties the queue.
ReportingObserver - Web APIs
reportingobserver.takerecords() returns the current list of reports contained in the observer's report queue, and empties the queue.
Reporting API - Web APIs
methods are then available on the observer to start collecting reports (reportingobserver.observe()), retrieve the reports currently in the report queue (reportingobserver.takerecords()), and disconnect the observer so it can no longer collect records (reportingobserver.disconnect()).
Request.cache - Web APIs
WebAPIRequestcache
syntax var currentcachemode = request.cache; value a requestcache value.
Request.clone() - Web APIs
WebAPIRequestclone
the clone() method of the request interface creates a copy of the current request object.
Request - Web APIs
WebAPIRequest
methods request.clone() creates a copy of the current request object.
ResizeObserver.observe() - Web APIs
currently this only has one possible option that can be set: box sets which box model the observer will observe changes to.
Resource Timing API - Web APIs
if the current context is a worker, the workerstart property can be used to obtain a domhighrestimestamp when the worker was started.
SVGElement: zoom event - Web APIs
the zoom event occurs when the user initiates an action which causes the current view of the svg document fragment to be rescaled.
SVGElement - Web APIs
svgelement.viewportelementread only the svgelement, which established the current viewport.
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.
getBBox() - Web APIs
the coordinates returned are with respect to the current svg space (after the application of all geometry attributes on all the elements contained in the target element).
SVGPathElement - Web APIs
svgpathelement.gettotallength() returns a float representing the computed value for the total length of the path using the browser's distance-along-a-path algorithm, as a distance in the current user coordinate system.
The 'X' property - Web APIs
usage context name x value <length> | <percentage> initial 0 applies to <mask> , ‘svg’, ‘rect’, ‘image’, ‘foreignobject’ inherited no percentages refer to the size of the current viewport (see units) media visual computed value absolute length or percentage animatable yes simple usage a <coordinate> is a length in the user coordinate system that is the given distance from the origin of the user coordinate system along the relevant axis (the x-axis for x coordinates, the y-axis for y coordinates).
SVGTextContentElement - Web APIs
svgtextcontentelement.getnumberofchars() returns a long representing the total number of addressable characters available for rendering within the current element, regardless of whether they will be rendered.
Screen.left - Web APIs
WebAPIScreenleft
returns the distance in pixels from the left side of the main screen to the left side of the current screen.
Screen.orientation - Web APIs
the orientation read-only property of the screen interface returns the current orientation of the screen.
ScreenOrientation.angle - Web APIs
the angle read-only property of the screenorientation interface returns the document's current orientation angle.
ScreenOrientation.type - Web APIs
the type read-only property of the screenorientation interface returns the document's current orientation type, one of "portrait-primary", "portrait-secondary", "landscape-primary", or "landscape-secondary".
Selection.anchorNode - Web APIs
working draft current ...
Selection.anchorOffset - Web APIs
working draft current ...
Selection.collapse() - Web APIs
the selection.collapse() method collapses the current selection to a single point.
Selection.collapseToEnd() - Web APIs
working draft current ...
Selection.collapseToStart() - Web APIs
working draft current ...
Selection.containsNode() - Web APIs
working draft current ...
Selection.deleteFromDocument() - Web APIs
working draft current ...
Selection.extend() - Web APIs
WebAPISelectionextend
working draft current browser compatibility the compatibility table on this page is generated from structured data.
Selection.focusOffset - Web APIs
working draft current ...
Selection.rangeCount - Web APIs
working draft current ...
Selection.removeAllRanges() - Web APIs
working draft current browser compatibility the compatibility table on this page is generated from structured data.
Selection.removeRange() - Web APIs
working draft current browser compatibility the compatibility table on this page is generated from structured data.
Selection.selectAllChildren() - Web APIs
working draft current definition ...
Sensor.stop() - Web APIs
WebAPISensorstop
the stop method of the sensor interface deactivates the current sensor.
SensorErrorEvent.SensorErrorEvent() - Web APIs
options optional currently only one option is supported: error: an instance of domexception.
Sensor APIs - Web APIs
ambientlightsensorsecure context returns the current light level or illuminance of the ambient light around the hosting device.
ServiceWorker.state - Web APIs
the state read-only property of the serviceworker interface returns a string representing the current state of the service worker.
ServiceWorker - Web APIs
}); } else { // the current browser doesn't support service workers.
ServiceWorkerContainer.controller - Web APIs
if (navigator.serviceworker.controller) { console.log(`this page is currently controlled by: ${navigator.serviceworker.controller}`); } else { console.log('this page is not currently controlled by a service worker.'); } } else { console.log('service workers are not supported.'); } specifications specification status comment service workersthe definition of 'serviceworkerregistration.controller' in that specification.
ServiceWorkerContainer.ready - Web APIs
it returns a promise that will never reject, and which waits indefinitely until the serviceworkerregistration associated with the current page has an active worker.
ServiceWorkerContainer.register() - Web APIs
currently available options are: scope: a usvstring representing a url that defines a service worker's registration scope; that is, what range of urls a service worker can control.
ServiceWorkerGlobalScope.onnotificationclick - Web APIs
}; example self.onnotificationclick = function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }; specifications ...
ServiceWorkerGlobalScope.skipWaiting() - Web APIs
use this method with clients.claim() to ensure that updates to the underlying service worker take effect immediately for both the current client and all other active clients.
ServiceWorkerGlobalScope - Web APIs
methods serviceworkerglobalscope.skipwaiting() allows the current service worker registration to progress from waiting to active state while service worker clients are using it.
ServiceWorkerRegistration.active - Web APIs
syntax var serviceworker = serviceworkerregistration.active; value a serviceworker object's property, if it is currently in an activated state.
ServiceWorkerRegistration.getNotifications() - Web APIs
the getnotifications() method of the serviceworkerregistration interface returns a list of the notifications in the order that they were created from the current origin via the current service worker registration.
ServiceWorkerRegistration.installing - Web APIs
syntax var serviceworker = serviceworkerregistration.installing; value a serviceworker object, if it is currently in an installing state.
ServiceWorkerRegistration.navigationPreload - Web APIs
the navigationpreload read-only property of the serviceworkerregistration interface returns the navigationpreloadmanager associated with the current service worker registration.
ServiceWorkerRegistration.periodicSync - Web APIs
examples // tbd specifications currently not part of any specification.
ServiceWorkerRegistration.showNotification() - Web APIs
you can also retrieve details of the notifications that have been fired from the current service worker using serviceworkerregistration.getnotifications().
ServiceWorkerRegistration.update() - Web APIs
it fetches the worker's script url, and if the new worker is not byte-by-byte identical to the current worker, it installs the new worker.
ServiceWorkerRegistration.waiting - Web APIs
syntax var serviceworker = serviceworkerregistration.waiting; value a serviceworker object, if it is currently in an installed state.
ServiceWorkerRegistration - Web APIs
an active worker will control a serviceworkerclient if the client's url falls within the scope of the registration (the scope option set when serviceworkercontainer.register is first called.) serviceworkerregistration.navigationpreload read only returns the instance of navigationpreloadmanager associated with the current service worker registration.
ServiceWorkerState - Web APIs
redundant a new service worker is replacing the current service worker, or the current service worker is being discarded due to an install failure.
Service Worker API - Web APIs
clients represents a container for a list of client objects; the main way to access the active service worker clients at the current origin.
SharedWorkerGlobalScope.applicationCache - Web APIs
important: application cache is deprecated as of firefox 44, and is no longer available in insecure contexts from firefox 60 onwards (bug 1354175, currently nightly/beta only).
SourceBuffer.appendBufferAsync() - Web APIs
async function fillsourcebuffer(buffer, msbuffer) { try { while(true) { await msbuffer.appendbufferasync(buffer); } } catch(e) { handleexception(e); } } specifications not currently part of any specification.
SourceBuffer.appendWindowEnd - Web APIs
its sourcebuffer.updating property is currently true), or this sourcebuffer has been removed from the mediasource.
SourceBuffer.appendWindowStart - Web APIs
its sourcebuffer.updating property is currently true), or this sourcebuffer has been removed from the mediasource.
SourceBuffer.audioTracks - Web APIs
the audiotracks read-only property of the sourcebuffer interface returns a list of the audio tracks currently contained inside the sourcebuffer.
SourceBuffer.buffered - Web APIs
the buffered read-only property of the sourcebuffer interface returns the time ranges that are currently buffered in the sourcebuffer as a normalized timeranges object.
SourceBuffer.removeAsync() - Web APIs
async function emptysourcebuffer(msbuffer) { await msbuffer.removeasync(0, infinity).catch(function(e) { handleexception(e); } } specifications not currently part of the mse specification.
SourceBuffer.textTracks - Web APIs
the texttracks read-only property of the sourcebuffer interface returns a list of the text tracks currently contained inside the sourcebuffer.
SourceBuffer.timestampOffset - Web APIs
their sourcebuffer.updating property is currently true), a media segment inside the sourcebuffer is currently being parsed, or this sourcebuffer has been removed from the mediasource.
SourceBuffer.trackDefaults - Web APIs
their sourcebuffer.updating property is currently true), or this sourcebuffer has been removed from the mediasource.
SourceBuffer.videoTracks - Web APIs
the videotracks read-only property of the sourcebuffer interface returns a list of the video tracks currently contained inside the sourcebuffer.
SpeechRecognition.continuous - Web APIs
it defaults to single results (false.) syntax var mycontinuous = myspeechrecognition.continuous; myspeechrecognition.continuous = true; value a boolean representing the current speechrecognition's continuous status.
SpeechRecognition.grammars - Web APIs
the grammars property of the speechrecognition interface returns and sets a collection of speechgrammar objects that represent the grammars that will be understood by the current speechrecognition.
SpeechRecognition.interimResults - Web APIs
syntax var myinterimresult = myspeechrecognition.interimresults; myspeechrecognition.interimresults = false; value a boolean representing the state of the current speechrecognition's interim results.
SpeechRecognition.onstart - Web APIs
the onstart property of the speechrecognition interface represents an event handler that will run when the speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current speechrecognition (when the start event fires.) syntax myspeechrecognition.onstart = function() { ...
SpeechRecognition.serviceURI - Web APIs
the serviceuri property of the speechrecognition interface specifies the location of the speech recognition service used by the current speechrecognition to handle the actual recognition.
SpeechRecognition.start() - Web APIs
the start() method of the web speech api starts the speech recognition service listening to incoming audio with intent to recognize grammars associated with the current speechrecognition.
SpeechRecognition: start event - Web APIs
the start event of the web speech api speechrecognition object is fired when the speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current speechrecognition.
SpeechRecognitionEvent - Web APIs
speechrecognitionevent.results read only returns a speechrecognitionresultlist object representing all the speech recognition results for the current session.
SpeechSynthesis.cancel() - Web APIs
if an utterance is currently being spoken, speaking will stop immediately.
SpeechSynthesis.getVoices() - Web APIs
the getvoices() method of the speechsynthesis interface returns a list of speechsynthesisvoice objects representing all the available voices on the current device.
SpeechSynthesis.paused - Web APIs
it can be set to paused even if nothing is currently being spoken through it.
SpeechSynthesisEvent - Web APIs
the speechsynthesisevent interface of the web speech api contains information about the current state of speechsynthesisutterance objects that have been processed in the speech service.
SpeechSynthesisUtterance.pitch - Web APIs
it can range between 0 (lowest) and 2 (highest), with 1 being the default pitch for the current platform or voice.
SpeechSynthesisUtterance.rate - Web APIs
it can range between 0.1 (lowest) and 10 (highest), with 1 being the default pitch for the current platform or voice, which should correspond to a normal speaking rate.
SpeechSynthesisVoice.default - Web APIs
the default read-only property of the speechsynthesisvoice interface returns a boolean indicating whether the voice is the default voice for the current app (true), or not (false.) note: for some devices, it might be the default voice for the voice's language.
SpeechSynthesisVoice - Web APIs
properties speechsynthesisvoice.default read only a boolean indicating whether the voice is the default voice for the current app language (true), or not (false.) speechsynthesisvoice.lang read only returns a bcp 47 language tag indicating the language of the voice.
StereoPannerNode.pan - Web APIs
tml; // create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a stereo panner var pannode = audioctx.createstereopanner(); // event handler function to increase panning to the right and left // when the slider is moved pancontrol.oninput = function() { pannode.pan.setvalueattime(pancontrol.value, audioctx.currenttime); panvalue.innerhtml = pancontrol.value; } // connect the mediaelementaudiosourcenode to the pannode // and the pannode to the destination, so we can play the // music and adjust the panning using the controls source.connect(pannode); pannode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'pan' in that spe...
StereoPannerNode - Web APIs
tml; // create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a stereo panner var pannode = audioctx.createstereopanner(); // event handler function to increase panning to the right and left // when the slider is moved pancontrol.oninput = function() { pannode.pan.setvalueattime(pancontrol.value, audioctx.currenttime); panvalue.innerhtml = pancontrol.value; } // connect the mediaelementaudiosourcenode to the pannode // and the pannode to the destination, so we can play the // music and adjust the panning using the controls source.connect(pannode); pannode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'stereopannernode...
Storage.length - Web APIs
WebAPIStoragelength
example the following function adds three data items to the local storage for the current domain, then returns the number of items in the storage: function populatestorage() { localstorage.setitem('bgcolor', 'yellow'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'cats.png'); return localstorage.length; // should return 3 } note: for a real world example, see our web storage demo.
StorageEstimate - Web APIs
usage secure context a numeric value in bytes approximating the amount of storage space currently being used by the site or web app, out of the available space as indicated by quota.
StorageQuota.queryInfo - Web APIs
the queryinfo() property of the storagequota interface returns a storageinfo object containting the current data usage and available quota information for the application.
StorageQuota - Web APIs
methods storagequota.queryinfo returns a storageinfo object containting the current data usage and available quota information for the application.
Storage API - Web APIs
origin 1 has some web storage data as well as some indexeddb data, but also has some free space left; its current usage hasn't yet reached its quota.
Streams API concepts - Web APIs
these currently have very limited availability in browsers.
StyleSheet.parentStyleSheet - Web APIs
syntax objref = stylesheet.parentstylesheet example // find the top level stylesheet if (stylesheet.parentstylesheet) { sheet = stylesheet.parentstylesheet; } else { sheet = stylesheet; } notes this property returns null if the current stylesheet is a top-level stylesheet or if stylesheet inclusion is not supported.
StyleSheet.title - Web APIs
WebAPIStyleSheettitle
the title property of the stylesheet interface returns the advisory title of the current style sheet.
SubmitEvent() - Web APIs
examples this code snippet locates a form in the current document, and then an html <button> within the form with the class submit on it.
SubmitEvent - Web APIs
note that currently, the only valid type for a submitevent is submit.
SyncEvent.SyncEvent() - Web APIs
lastchance: a boolean indicating that the user agent will not make further synchronization attempts after the current attempt.
SyncEvent - Web APIs
WebAPISyncEvent
syncevent.lastchance read only returns true if the user agent will not make further synchronization attempts after the current attempt.
Text.splitText() - Web APIs
WebAPITextsplitText
after the split, the current node contains all the content up to the specified offset point, and a newly created node of the same type contains the remaining text.
Text - Web APIs
WebAPIText
text.replacewholetext replaces the text of the current node and all logically adjacent nodes with the specified text.
TextMetrics - Web APIs
it takes into account the current font of the context.
TextTrackList.onchange - Web APIs
syntax texttracklist.onchange = eventhandler; example this snippet establishes a handler for the change event that looks at each of the tracks in the list, calling a function to update the state of a user interface control that indicates the current state of the track.
TouchEvent.changedTouches - Web APIs
the changedtouches read-only property is a touchlist whose touch points (touch objects) varies depending on the event type, as follows: for the touchstart event, it is a list of the touch points that became active with the current event.
UIEvent.layerX - Web APIs
WebAPIUIEventlayerX
the uievent.layerx read-only property returns the horizontal coordinate of the event relative to the current layer.
UIEvent.layerY - Web APIs
WebAPIUIEventlayerY
the uievent.layery read-only property returns the vertical coordinate of the event relative to the current layer.
UIEvent.pageX - Web APIs
WebAPIUIEventpageX
this value is relative to the left edge of the entire document, regardless of the current horizontal scrolling offset of the document.
URL - Web APIs
WebAPIURL
to get the search params from the current window's url, you can do this: // https://some.site/?id=123 const parsedurl = new url(window.location.href); console.log(parsedurl.searchparams.get("id")); // "123" the tostring() method of url just returns the value of the href property, so the constructor can be used to normalize and encode a url directly.
USBConfiguration.configurationValue - Web APIs
the configurationvalue read-only property of the usbconfiguration interface null syntax var value = usbconfiguration.configurationvalue value the configuration descriptor of the usbdevice specified in the constructor of the current usbconfiguration instance.
USBDevice.configuration - Web APIs
the configuration read only property of the usbdevice interface returns a usbconfiguration object for the currently selected interface for a paired usb device.
USBDevice.releaseInterface() - Web APIs
syntax var promise = usbdevice.releaseinterface(interfacenumber) parameters interfacenumber the device-specific index of the currently-claimed interface.
USBDevice - Web APIs
WebAPIUSBDevice
properties usbdevice.configuration read only a usbconfiguration object for the currently selected interface for a paired usb device.
UserDataHandler - Web APIs
constants constant value operation node_cloned 1 node.clonenode() node_imported 2 document.importnode() node_deleted unimplemented (see bug 550400) 3 node_renamed unimplemented 4 node.renamenode() node_adopted 5 document.adoptnode() (node_renamed is currently not supported since node.renamenode() is not supported.) specification dom level 3 core: userdatahandler ...
Vibration API - Web APIs
canceling existing vibrations calling navigator.vibrate() with a value of 0, an empty array, or an array containing all zeros will cancel any currently ongoing vibration pattern.
VideoTrackList.onchange - Web APIs
example this snippet establishes a handler for the change event that looks at each of the tracks in the list, calling a function to update the state of a user interface control that indicates the current state of the track.
VideoTrackList - Web APIs
selectedindex read only the index of the currently selected track, if any, or −1 otherwise.
Visual Viewport API - Web APIs
current browsers vary in how they handle this.
WEBGL_compressed_texture_astc.getSupportedProfiles() - Web APIs
currently, this can be: "ldr": low dynamic range.
WEBGL_compressed_texture_atc - Web APIs
availability: atc compression is typically available on mobile devices with adreno gpus, that are currently only built into qualcomm snapdragon devices.
WEBGL_compressed_texture_pvrtc - Web APIs
constants the compressed texture formats are exposed by four constants and can be used in two functions: compressedteximage2d() (where the height and width parameters must be powers of 2) and compressedtexsubimage2d() (where the the height and width parameters must equal the current values of the existing texture and the xoffset and yoffset parameters must be 0).
WakeLockSentinel - Web APIs
type read only returns a string representation of the currently acquired wakelocksentinel type.
WebGL2RenderingContext.bindTransformFeedback() - Web APIs
the webgl2renderingcontext.bindtransformfeedback() method of the webgl 2 api binds a passed webgltransformfeedback object to the current gl state.
WebGL2RenderingContext.clearBuffer[fiuv]() - Web APIs
the webgl2renderingcontext.clearbuffer[fiuv]() methods of the webgl 2 api clear buffers from the currently bound framebuffer.
WebGL2RenderingContext.copyTexSubImage3D() - Web APIs
the webgl2renderingcontext.copytexsubimage3d() method of the webgl api copies pixels from the current webglframebuffer into an existing 3d texture sub-image.
WebGL2RenderingContext.getBufferSubData() - Web APIs
an invalid_operation error is generated if: zero is bound to target target is transform_feedback_buffer, and any transform feedback object is currently active.
WebGL2RenderingContext.texImage3D() - Web APIs
used to upload data to the currently bound webgltexture from the webglbuffer bound to the pixel_unpack_buffer target.
WebGLRenderingContext.activeTexture() - Web APIs
examples the following call selects gl.texture1 as the current texture.
WebGLRenderingContext.bindFramebuffer() - Web APIs
examples binding a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); gl.bindframebuffer(gl.framebuffer, framebuffer); getting current bindings to check the current frame buffer binding, query the framebuffer_binding constant.
WebGLRenderingContext.bindRenderbuffer() - Web APIs
examples binding a renderbuffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var renderbuffer = gl.createrenderbuffer(); gl.bindrenderbuffer(gl.renderbuffer, renderbuffer); getting current bindings to check the current renderbuffer binding, query the renderbuffer_binding constant.
WebGLRenderingContext.bindTexture() - Web APIs
examples binding a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); getting current bindings to check the current texture binding, query the gl.texture_binding_2d or gl.texture_binding_cube_map constants.
WebGLRenderingContext.blendEquationSeparate() - Web APIs
examples to set the blend equations, use: gl.blendequationseparate(gl.func_add, gl.func_subtract); to get the current blend equations, query the blend_equation, blend_equation_rgb and blend_equation_alpha constants which return gl.func_add, gl.func_subtract, gl.func_reverse_subtract, or if the ext_blend_minmax is enabled: ext.min_ext or ext.max_ext.
WebGLRenderingContext.blendFunc() - Web APIs
gl.enable(gl.blend); gl.blendfunc(gl.src_color, gl.dst_color); to get the current blend function, query the blend_src_rgb, blend_src_alpha, blend_dst_rgb, and blend_dst_alpha constants which return one of the blend function constants.
WebGLRenderingContext.blendFuncSeparate() - Web APIs
gl.enable(gl.blend); gl.blendfuncseparate(gl.src_color, gl.dst_color, gl.one, gl.zero); to get the current blend function, query the blend_src_rgb, blend_src_alpha, blend_dst_rgb, and blend_dst_alpha constants which return one of the blend function constants.
WebGLRenderingContext.bufferData() - Web APIs
examples using bufferdata var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, 1024, gl.static_draw); getting buffer information to check the current buffer usage and buffer size, use the webglrenderingcontext.getbufferparameter() method.
WebGLRenderingContext.clear() - Web APIs
gl.clear(gl.depth_buffer_bit); gl.clear(gl.depth_buffer_bit | gl.color_buffer_bit); to get the current clear values, query the color_clear_value, depth_clear_value, and stencil_clear_value constants.
WebGLRenderingContext.clearColor() - Web APIs
examples gl.clearcolor(1, 0.5, 0.5, 3); to get the current clear color, query the color_clear_value constant which returns a float32array.
WebGLRenderingContext.clearDepth() - Web APIs
examples gl.cleardepth(0.5); to get the current depth clear value, query the depth_clear_value constant.
WebGLRenderingContext.clearStencil() - Web APIs
examples gl.clearstencil(1); to get the current stencil clear value, query the stencil_clear_value constant.
WebGLRenderingContext.colorMask() - Web APIs
examples gl.colormask(true, true, true, false); to get the current color mask, query the color_writemask constant which returns an array.
WebGLRenderingContext.copyTexImage2D() - Web APIs
the webglrenderingcontext.copyteximage2d() method of the webgl api copies pixels from the current webglframebuffer into a 2d texture image.
WebGLRenderingContext.copyTexSubImage2D() - Web APIs
the webglrenderingcontext.copytexsubimage2d() method of the webgl api copies pixels from the current webglframebuffer into an existing 2d texture sub-image.
WebGLRenderingContext.cullFace() - Web APIs
gl.enable(gl.cull_face); gl.cullface(gl.front_and_back); to check the current cull face mode, query the cull_face_mode constant.
WebGLRenderingContext.depthMask() - Web APIs
examples gl.depthmask(false); to get the current depth mask, query the depth_writemask constant which returns a boolean.
WebGLRenderingContext.depthRange() - Web APIs
examples gl.depthrange(0.2, 0.6); to check the current depth range, query the depth_range constant which returns a float32array gl.getparameter(gl.depth_range); // float32array[0.2, 0.6] specifications specification status comment webgl 1.0the definition of 'depthrange' in that specification.
WebGLRenderingContext.drawArrays() - Web APIs
if gl.current_program is null, a gl.invalid_operation error is thrown.
WebGLRenderingContext.drawingBufferHeight - Web APIs
the read-only webglrenderingcontext.drawingbufferheight property represents the actual height of the current drawing buffer.
WebGLRenderingContext.drawingBufferWidth - Web APIs
the read-only webglrenderingcontext.drawingbufferwidth property represents the actual width of the current drawing buffer.
WebGLRenderingContext.getExtension() - Web APIs
the current extensions are: angle_instanced_arrays ext_blend_minmax ext_color_buffer_float ext_color_buffer_half_float ext_disjoint_timer_query ext_float_blend ext_frag_depth ext_srgb ext_shader_texture_lod ext_texture_compression_bptc ext_texture_compression_rgtc ext_texture_filter_anisotropic khr_parallel_shader_compile oes_element_index_uint oes_fbo_render_mipmap oes_standard_derivati...
WebGLRenderingContext.getSupportedExtensions() - Web APIs
the current extensions are: angle_instanced_arrays ext_blend_minmax ext_color_buffer_float ext_color_buffer_half_float ext_disjoint_timer_query ext_float_blend ext_frag_depth ext_srgb ext_shader_texture_lod ext_texture_compression_bptc ext_texture_compression_rgtc ext_texture_filter_anisotropic khr_parallel_shader_compile oes_element_index_uint oes_fbo_render_mipmap oes_standard_derivati...
WebGLRenderingContext.polygonOffset() - Web APIs
gl.enable(gl.polygon_offset_fill); gl.polygonoffset(2, 3); to check the current polygon offset factor or units, query the polygon_offset_factor and polygon_offset_units constants.
WebGLRenderingContext.scissor() - Web APIs
clear) // turn off scissor test again gl.disable(gl.scissor_test); to get the current scissor box dimensions, query the scissor_box constant which returns an int32array.
WebGLRenderingContext.stencilFunc() - Web APIs
gl.enable(gl.stencil_test); gl.stencilfunc(gl.less, 0, 0b1110011); to get the current stencil function, reference value, or other stencil information, query the following constants with getparameter().
WebGLRenderingContext.stencilFuncSeparate() - Web APIs
gl.enable(gl.stencil_test); gl.stencilfuncseparate(gl.front, gl.less, 0.2, 1110011); to get the current stencil function, reference value, or other stencil information, query the following constants with getparameter().
WebGLRenderingContext.stencilMask() - Web APIs
examples gl.stencilmask(110101); to get the current stencil masks, query the stencil_writemask, stencil_back_writemask, or stencil_bits constants.
WebGLRenderingContext.stencilMaskSeparate() - Web APIs
examples gl.stencilmaskseparate(gl.front, 110101); to get the current stencil masks, query the stencil_writemask, stencil_back_writemask, or stencil_bits constants.
WebGLRenderingContext.texImage2D() - Web APIs
used to upload data to the currently bound webgltexture from the webglbuffer bound to the pixel_unpack_buffer target.
WebGLRenderingContext.useProgram() - Web APIs
the webglrenderingcontext.useprogram() method of the webgl api sets the specified webglprogram as part of the current rendering state.
WebGLRenderingContext.validateProgram() - Web APIs
it checks if it is successfully linked and if it can be used in the current webgl state.
WebGLRenderingContext.viewport() - Web APIs
int32array[16384, 16384] to get the current viewport, query the viewport constant.
Adding 2D content to a WebGL context - Web APIs
we do this by creating a float32array from the // javascript array, then use it to fill the current buffer.
Animating textures in WebGL - Web APIs
webgl knows how to pull the current frame out and use it as a texture.
Using WebGL extensions - Web APIs
extension list the current extensions are: angle_instanced_arrays ext_blend_minmax ext_color_buffer_float ext_color_buffer_half_float ext_disjoint_timer_query ext_float_blend ext_frag_depth ext_srgb ext_shader_texture_lod ext_texture_compression_bptc ext_texture_compression_rgtc ext_texture_filter_anisotropic khr_parallel_shader_compile oes_element_index_uint oes_fbo_render_mipmap oes_standard_derivati...
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
rtp is a data transport protocol, whose mission is to move data between two endpoints as efficiently as possible under current conditions.
Lifetime of a WebRTC session - Web APIs
this page is currently under construction, and some of the content will move to other pages as the webrtc guide material is built out.
Signaling and video calling - Web APIs
though not currently supported, a candidate received after media is already flowing could theoretically also be used to downgrade to a lower-bandwidth connection if needed.
Improving compatibility using WebRTC adapter.js - Web APIs
the webrtc adapter currently supports mozilla firefox, google chrome, apple safari, and microsoft edge.
WebSocket.extensions - Web APIs
this is currently only the empty string or a list of extensions as negotiated by the connection.
WebSocket.readyState - Web APIs
the websocket.readystate read-only property returns the current state of the websocket connection.
WebSocket.send() - Web APIs
WebAPIWebSocketsend
exceptions thrown invalid_state_err the connection is not currently open.
WebSocket - Web APIs
WebAPIWebSocket
websocket.readystate read only the current state of the connection.
Using bounded reference spaces - Web APIs
this is the only type of bounded reference space currently available; in all others, if you need boundaries, you will have to manage them yourself.
Lighting a WebXR setting - Web APIs
however, a specification is currently being drafted under the auspices of the w3c.
WebXR Device API - Web APIs
(optionally) mirror the output to a 2d display create vectors representing the movements of input controls at the most basic level, a scene is presented in 3d by computing the perspective to apply to the scene in order to render it from the viewpoint of each of the user's eyes by computing the position of each eye and rendering the scene from that position, looking in the direction the user is currently facing.
Web Audio API - Web APIs
it is an audionode audio-processing module that is linked to two buffers, one containing the current input, one containing the output.
Web NFC API - Web APIs
low-level operations are currently not supported by the api, however there is a public discussion about api that would add such functuionality.
Web Speech API - Web APIs
speechsynthesisevent contains information about the current state of speechsynthesisutterance objects that have been processed in the speech service.
Web Storage API - Web APIs
web storage interfaces storage allows you to set, retrieve and remove data for a specific domain and storage type (session or local.) window the web storage api extends the window object with two new properties — window.sessionstorage and window.localstorage — which provide access to the current domain's session and local storage objects respectively, and a window.onstorage event handler that fires when a storage area changes (e.g.
Web Workers API - Web APIs
worker()) that runs a named javascript file — this file contains the code that will run in the worker thread; workers run in another global context that is different from the current window.
Window.applicationCache - Web APIs
important: application cache is deprecated as of firefox 44, and is no longer available in insecure contexts from firefox 60 onwards (bug 1354175, currently nightly/beta only).
Window.blur() - Web APIs
WebAPIWindowblur
syntax window.blur() example window.blur(); notes the window.blur() method is the programmatic equivalent of the user shifting focus away from the current window.
Window.captureEvents() - Web APIs
--> <script> function reg() { window.captureevents(event.click); window.onclick = page_click; } function page_click() { alert('page click event detected!'); } </script> </head> <body onload="reg();"> <p>click anywhere on this page.</p> </body> </html> notes events raised in the dom by user activity (such as clicking buttons or shifting focus away from the current document) generally pass through the high-level window and document objects first before arriving at the object that initiated the event.
Window.closed - Web APIs
WebAPIWindowclosed
before attempting to change the url, it checks that the current window has an opener using the window.opener property and that the opener isn't closed: // check that an opener exists and is not closed if (window.opener && !window.opener.closed) { window.opener.location.href = 'http://www.mozilla.org'; } note that popups can only access the window that opened them.
Window.console - Web APIs
WebAPIWindowconsole
currently there are many implementation differences among browsers, but work is being done to bring them together and make them more consistent with one another.
Window.convertPointFromNodeToPage() - Web APIs
it is not present in the current css transforms module level 1 working draft.
Window.convertPointFromPageToNode - Web APIs
it is not present in the current css transforms module level 1 working draft.
Window: deviceorientation event - Web APIs
the deviceorientation event is fired when fresh data is available from an orientation sensor about the current orientation of the device as compared to the earth coordinate frame.
Window.event - Web APIs
WebAPIWindowevent
the read-only window property event returns the event which is currently being handled by the site's code.
Window.frames - Web APIs
WebAPIWindowframes
returns the window itself, which is an array-like object, listing the direct sub-frames of the current window.
Window.mozAnimationStartTime - Web APIs
syntax time = window.mozanimationstarttime; parameters time is the time in milliseconds since the epoch at which animations for the current window should be considered to have started.
Window.mozPaintCount - Web APIs
returns the number of times the current document has been painted to the screen in this window.
Window.ondeviceorientationabsolute - Web APIs
}); specifications this event handler is not currently part of any specification.
Window.onmozbeforepaint - Web APIs
the event handler receives as an input parameter an event whose timestamp property is the time, in milliseconds since epoch, that is the "current time" for the current animation frame.
Privileged features - Web APIs
the dependent feature is currently under revision to be removed (bug 214867) in msie 6, the nearest equivalent to this feature is the showmodelessdialog() method.
Window.opener - Web APIs
WebAPIWindowopener
syntax const openerwindow = window.opener value a window referring to the window that opened the current window (using window.open(), or by a link with target attribute set).
Window.pageYOffset - Web APIs
the read-only window property pageyoffset is an alias for scrolly; as such, it returns the number of pixels the document is currently scrolled along the vertical axis (that is, up or down) with a value of 0.0, indicating that the top edge of the document is currently aligned with the top edge of the window's content area.
Window.parent - Web APIs
WebAPIWindowparent
the window.parent property is a reference to the parent of the current window or subframe.
Window.performance - Web APIs
the window interface's performance property returns a performance object, which can be used to gather performance information about the current document.
Window.print() - Web APIs
WebAPIWindowprint
opens the print dialog to print the current document.
window.requestIdleCallback() - Web APIs
currently only one property is defined: timeout: if timeout is specified and has a positive value, and the callback has not already been called by the time timeout milliseconds have passed, the callback will be called during the next idle period, even if doing so risks causing a negative performance impact.
Window.restore() - Web APIs
WebAPIWindowrestore
this method is currently not working, but you can use: window.moveto(window.screenx, window.screeny); browser compatibility the compatibility table in this page is generated from structured data.
Window.screen - Web APIs
WebAPIWindowscreen
the screen object, implementing the screen interface, is a special object for inspecting properties of the screen on which the current window is being rendered.
Window.scrollByPages() - Web APIs
the window.scrollbypages() method scrolls the current document by the specified number of pages.
Window.self - Web APIs
WebAPIWindowself
if (window.parent.frames[0] != window.self) { // this window is not the first frame in the list } furthermore, when executing in the active document of a browsing context, window is a reference to the current global object and thus all of the following are equivalent: var w1 = window; var w2 = self; var w3 = window.window; var w4 = window.self; // w1, w2, w3, w4 all strictly equal, but only w2 will function in workers specifications specification status comment html living standardthe definition of 'window.self' in that specification.
Window.setCursor() - Web APIs
WebAPIWindowsetCursor
the window.setcursor() method sets the cursor for the current window.
Window.stop() - Web APIs
WebAPIWindowstop
the window.stop() stops further resource loading in the current browsing context, equivalent to the stop button in the browser.
Window.top - Web APIs
WebAPIWindowtop
syntax var topwindow = window.top; notes where the window.parent property returns the immediate parent of the current window, window.top returns the topmost window in the hierarchy of window objects.
Window.window - Web APIs
WebAPIWindowwindow
the default in the class could still be set as the current window object.
WindowClient.visibilityState - Web APIs
the visibilitystate read-only property of the windowclient interface indicates the visibility of the current client.
WindowEventHandlers.onafterprint - Web APIs
the onafterprint property of the windoweventhandlers mixin is the eventhandler for processing afterprint events for the current window.
WindowEventHandlers.onbeforeprint - Web APIs
the onbeforeprint property of the windoweventhandlers mixin is the eventhandler for processing beforeprint events for the current window.
WindowOrWorkerGlobalScope.caches - Web APIs
the caches read-only property of the windoworworkerglobalscope interface returns the cachestorage object associated with the current context.
WindowOrWorkerGlobalScope.fetch() - Web APIs
to automatically send cookies for the current domain, this option must be provided.
WindowOrWorkerGlobalScope.isSecureContext - Web APIs
the issecurecontext read-only property of the windoworworkerglobalscope interface returns a boolean indicating whether the current context is secure (true) or not (false).
WindowOrWorkerGlobalScope.queueMicrotask() - Web APIs
the microtask is a short function which will run after the current task has completed its work and when there is no other code waiting to be run before control of the execution context is returned to the browser's event loop.
WindowProxy - Web APIs
all operations performed on a windowproxy object will also be applied to the underlying window object it currently wraps.
Worker.prototype.postMessage() - Web APIs
when either of two form inputs (first and second) have their values changed, change events invoke postmessage() to send the value of both inputs to the current worker.
WorkerNavigator.connection - Web APIs
the workernavigator.connection read-only property returns a networkinformation object containing information about the system's connection, such as the current bandwidth of the user's device or whether the connection is metered.
Worklet.addModule() - Web APIs
WebAPIWorkletaddModule
the addmodule() method of the worklet interface loads the module in the given javascript file and adds it to the current worklet.
Worklet - Web APIs
WebAPIWorklet
methods worklet.addmodule() adds the script module at the given url to the current worklet.
Using XMLHttpRequest - Web APIs
*/ ifhaschanged("yourpage.html", function (nmodif, nvisit) { console.log("the page '" + this.filepath + "' has been changed on " + (new date(nmodif)).tolocalestring() + "!"); }); if you want to know if the current page has changed, please read the article about document.lastmodified.
XMLHttpRequest.getAllResponseHeaders() - Web APIs
note: for multipart requests, this returns the headers from the current part of the request, not from the original channel.
XMLHttpRequest.responseText - Web APIs
while handling an asynchronous request, the value of responsetext always has the current content received from the server, even if it's incomplete because the data has not been completely received yet.
XMLHttpRequestEventTarget.onprogress - Web APIs
event event.loaded the amount of data currently transfered.
XPathEvaluator.createNSResolver() - Web APIs
this adapter works like the dom level 3 method node.lookupnamespaceuri() in resolving the namespace uri from a given prefix using the current information available in the node's hierarchy at the time the method is called, also correctly resolving the implicit xml prefix.
XPathResult.snapshotItem() - Web APIs
unlike the iterator result, the snapshot does not become invalid, but may not correspond to the current document if it is mutated.
XPathResult - Web APIs
unlike the iterator result, the snapshot does not become invalid, but may not correspond to the current document if it is mutated.
XRFrame.getViewerPose() - Web APIs
syntax var xrviewerpose = xrframe.getviewerpose(referencespace); parameters referencespace an xrreferencespace object specifying the space to use as the reference point or base for the computation of the viewer's current pose.
XRFrameRequestCallback - Web APIs
the xrframerequestcallback is a callback function passed into xrsession.requestanimationframe (part of webxr api) to obtain the current time and the current xrframe.
XRHandedness - Web APIs
if gripspace is non-null, the function proceeds to get the pose for the gripspace transformed into the current reference space.
XRInputSource.handedness - Web APIs
if gripspace is non-null, the function proceeds to get the pose for the gripspace transformed into the current reference space.
XRInputSourceEvent - Web APIs
this frame may have been rendered in the past rather than being a current frame.
XRPermissionDescriptor - Web APIs
if the permission request promise is rejected, the error is handled (currently by just dumping it to the console using domxref("console.log()")}}).
XRReferenceSpaceEvent - Web APIs
currently, the only event that uses this type is the reset event.
XRReferenceSpaceType - Web APIs
the viewer isn't tracked at all; tracking is optimized for stability around the user's current position, so the native origin may drift as needed to accommodate that need.
XRRenderState.baseLayer - Web APIs
see the examples below to see how to use updaterenderstate() to set the current xrwebgllayer used for rendering the scene.
XRRenderState - Web APIs
when you apply changes using the xrsession method updaterenderstate(), the specified changes take effect after the current animation frame has completed, but before the next one begins.
XRRenderStateInit - Web APIs
usage notes any properties not specified in the xrrenderstateinit compliant object passed into updaterenderstate() are left at their current values.
XRRigidTransform - Web APIs
example this code snippet creates an xrrigidtransform to specify the offset and orientation in relation to the current reference space to use when creating a new reference space.
XRSession.onsqueeze - Web APIs
then we pass the currently held object and the target ray's transform matrix into a function we call dropobjectusingray() to drop the object, using the target ray to determine the surface upon which the object should be placed.
XRSession.onsqueezeend - Web APIs
in response to the end of the squeeze operation, this code looks to see if there is an object currently being held by the user by checking to see if the variable user.heldobject contains a reference to an object representing the held item.
XRSession.requestReferenceSpace() - Web APIs
the viewer isn't tracked at all; tracking is optimized for stability around the user's current position, so the native origin may drift as needed to accommodate that need.
XRSession: selectend event - Web APIs
upon receiving a select event, the mydropobject() function is called with the target object and the current target ray pose transform as inputs.
XRSession: selectstart event - Web APIs
upon receiving a select event, the mydropobject() function is called with the target object and the current target ray pose transform as inputs.
XRSession: squeezeend event - Web APIs
upon receiving a squeeze event, the mydropobject() function is called with the target object and the current target ray pose transform as inputs.
XRSession: squeezestart event - Web APIs
upon receiving a squeeze event, the mydropobject() function is called with the target object and the current target ray pose transform as inputs.
XRSession: visibilitychange event - Web APIs
the visibilitychange event is sent to an xrsession to inform it when it becomes visible or hidden, or when it becomes visible but not currently focused.
XRSessionInit - Web APIs
these values currently must come from the enumerated type xrreferencespacetype.
XRSystem: devicechange event - Web APIs
example the example shown here handles the devicechange event by toggling the availability of the "enter xr" button based on whether or not any immersive devices are currently available.
XRSystem: requestSession() - Web APIs
exceptions this method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: invalidstateerror the requested session mode is immersive-vr but there is already an immersive vr session either currently active or in the process of being set up.
XRSystem - Web APIs
WebAPIXRSystem
if, on the other hand, there is already an ongoing xr session, we instead call end() to end the current session.
XRView.transform - Web APIs
WebAPIXRViewtransform
currently, webxr doesn't support more than two views per pose, although room has been left to extend the specification to support that in the future with some additions to the api.
msCachingEnabled - Web APIs
the mscachingenabled method gets the current caching state for an xmlhttprequest.
msWriteProfilerMark - Web APIs
the event includes a pointer to a window object, current markup, and the event name passed as bstrprofilermarkname.
mssitemodejumplistitemremoved - Web APIs
parameters pevtobj [in] type: ihtmleventobj pointer to an ihtmleventobj interface for the current event.
msthumbnailclick - Web APIs
parameters pevtobj [in] type: ihtmleventobj pointer to an ihtmleventobj interface for the current event.
Web APIs
WebAPI
iatracksettings mediatracksupportedconstraints merchantvalidationevent messagechannel messageevent messageport metadata mimetype mimetypearray mouseevent mousescrollevent mousewheelevent mutationevent mutationobserver mutationobserverinit mutationrecord n ndefmessage ndefreader ndefreadingevent ndefrecord ndefwriter namelist namednodemap navigationpreloadmanager navigator navigatorconcurrenthardware navigatorid navigatorlanguage navigatoronline navigatorplugins navigatorstorage networkinformation node nodefilter nodeiterator nodelist nondocumenttypechildnode notation notification notificationaction notificationevent notifyaudioavailableevent o oes_element_index_uint oes_fbo_render_mipmap oes_standard_derivatives oes_texture_float oes_texture_float_linear oes_texture_half...
ARIA Screen Reader Implementors Guide - Accessibility
the most complete implementation of live regions currently is in firefox 3.
Using the aria-hidden attribute - Accessibility
wai-aria authoring practices 1.1 notes that aria-hidden="false" currently behaves inconsistently across browsers.
Using the aria-invalid attribute - Accessibility
any value not in the current vocabulary should be treated as true.
Using the aria-label attribute - Accessibility
the aria-label attribute is used to define a string that labels the current element.
Using the aria-valuetext attribute - Accessibility
value string representation of a number possible effects on user agents and assistive technology if the aria-valuetext attribute is absent, assistive technologies will rely solely on the aria-valuenow attribute for the current value.
Using the status role - Accessibility
assistive technology products should listen for such an event and notify the user accordingly: screen readers may provide a special key to announce the current status, and this should present the contents of any status live region.
Using ARIA: Roles, states, and properties - Accessibility
istitem math none note presentation row rowgroup rowheader separator table term textbox toolbar tooltip landmark roles banner complementary contentinfo form main navigation region search live region roles alert log marquee status timer window roles alertdialog dialog states and properties widget attributes aria-autocomplete aria-checked aria-current aria-disabled aria-errormessage aria-expanded aria-haspopup aria-hidden aria-invalid aria-label aria-level aria-modal aria-multiline aria-multiselectable aria-orientation aria-placeholder aria-pressed aria-readonly aria-required aria-selected aria-sort aria-valuemax aria-valuemin aria-valuenow aria-valuetext live region attributes aria-live aria-relevant aria-atomic...
ARIA: cell role - Accessibility
aria-rowindex attribute the aria-rowindex attribute is only needed if rows are hidden from the dom, to indicate which row, in the list of total rows, the current cell is in.
ARIA: document role - Accessibility
associated wai-aria roles, states, and properties aria-expanded include with a value of true or false if the document element is collapsible, to indicate if the document is currently expanded or collapsed.
ARIA: switch role - Accessibility
associated aria roles, states, and properties aria-checked attribute the aria-checked attribute is required when using the switch role, as it represents the current state of the widget that the switch role is applied to.
ARIA: textbox role - Accessibility
before using this technique, ensure that the browsers you need to target currently support it.
Multipart labels: Using ARIA for labels with embedded fields inside them - Accessibility
this technique works in firefox; however, it doesn't currently work in many other browsers, including ie.
Alerts - Accessibility
we need to change the two inputs for e-mail and name for this: <input name="name" id="name" aria-required="true" onblur="checkvalidity('name', ' ', 'invalid name entered!');"/> <br /> <input name="email" id="email" aria-required="true" onblur="checkvalidity('email', '@', 'invalid e-mail address');"/> testing the example if you use firefox 3 and a currently-supported screen reader, try the following: enter only your first name as the name.
ARIA - Accessibility
the aria-valuemin and aria-valuemax attributes specify the minimum and maximum values for the progress bar, and the aria-valuenow describes the current state of it and therefore must be kept updated with javascript.
Accessibility FAQ - Accessibility
mozilla accessibility project what are some of the built-in accessibility features that are currently supported in the browser?
Mobile accessibility checklist - Accessibility
everything other than the currently visible screen must be truly invisible (especially relevant for single page apps with multiple cards): use the hidden attribute or visibility or display style properties.
-moz-orient - CSS: Cascading Style Sheets
though submitted to the w3c, with positive initial feedback, this property is not yet part of any specification; currently, this is a mozilla-specific extension (that is, -moz-orient).
-webkit-border-before - CSS: Cascading Style Sheets
the transparent keyword maps to rgba(0,0,0,0).animation typediscrete formal syntax <'border-width'> | <'border-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-webkit-box-reflect - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
-webkit-mask-repeat-x - CSS: Cascading Style Sheets
when the next image is added, all of the current ones compress to allow room.
-webkit-mask-repeat-y - CSS: Cascading Style Sheets
when the next image is added, all of the current ones compress to allow room.
-webkit-tap-highlight-color - CSS: Cascading Style Sheets
formal definition initial valueblackapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-webkit-text-fill-color - CSS: Cascading Style Sheets
formal definition initial valuecurrentcolorapplies toall elementsinheritedyescomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-webkit-text-stroke-color - CSS: Cascading Style Sheets
formal definition initial valuecurrentcolorapplies toall elementsinheritedyescomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
:-moz-focusring - CSS: Cascading Style Sheets
the :-moz-focusring css pseudo-class is a mozilla extension that is similar to the :focus pseudo-class, but it only matches an element if it's currently focused and a focus ring or other indicator should be drawn around it.
:-moz-locale-dir(ltr) - CSS: Cascading Style Sheets
this is determined by the preference intl.uidirection.locale (where locale is the current locale) being set to "ltr".
:-moz-locale-dir(rtl) - CSS: Cascading Style Sheets
this is determined by the preference intl.uidirection.locale (where locale is the current locale) being set to "rtl".
:-moz-only-whitespace - CSS: Cascading Style Sheets
note: in selectors level 4 the :empty selector was changed to act like :-moz-only-whitespace, but no browser currently supports this yet.
::-moz-range-progress - CSS: Cascading Style Sheets
this portion corresponds to values lower than the value currently selected by the thumb (i.e., virtual knob).
::-webkit-search-cancel-button - CSS: Cascading Style Sheets
the ::-webkit-search-cancel-button css pseudo-element represents a button (the "cancel button") at the edge of an <input> of type="search" which clears away the current value of the <input> element.
::before (:before) - CSS: Cascading Style Sheets
WebCSS::before
html <ol> <li>crack eggs into bowl</li> <li>add milk</li> <li>add flour</li> <li aria-current='step'>mix thoroughly into a smooth batter</li> <li>pour a ladleful of batter onto a hot, greased, flat frying pan</li> <li>fry until the top of the pancake loses its gloss</li> <li>flip it over and fry for a couple more minutes</li> <li>serve with your favorite topping</li> </ol> css li { padding:0.5em; } li[aria-current='step'] { font-weight:bold; } li[aria-current='step']::af...
::placeholder - CSS: Cascading Style Sheets
in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for text content and 3:1 for larger text such as headings.
::selection - CSS: Cascading Style Sheets
to meet current web content accessibility guidelines (wcag), text content must have a contrast ratio of 4.5:1, or 3:1 for larger text such as headings.
:empty - CSS: Cascading Style Sheets
WebCSS:empty
note: in selectors level 4 the :empty pseudo-class was changed to act like :-moz-only-whitespace, but no browser currently supports this yet.
:fullscreen - CSS: Cascading Style Sheets
the :fullscreen css pseudo-class matches every element which is currently in full-screen mode.
:has() - CSS: Cascading Style Sheets
WebCSS:has
instead, browsers currently only support the use of :has() within stylesheets.
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
WebCSS:is
note that currently browsers support this functionality as :matches(), or through an older, prefixed pseudo-class — :any(), including older versions of chrome, firefox, and safari.
:placeholder-shown - CSS: Cascading Style Sheets
the :placeholder-shown css pseudo-class represents any <input> or <textarea> element that is currently displaying placeholder text.
:scope - CSS: Cascading Style Sheets
WebCSS:scope
/* selects a scoped element */ :scope { background-color: lime; } currently, when used in a stylesheet, :scope is the same as :root, since there is not at this time a way to explicitly establish a scoped element.
:target - CSS: Cascading Style Sheets
WebCSS:target
/* selects an element with an id matching the current url's fragment */ :target { border: 2px solid black; } for example, the following url has a fragment (denoted by the # sign) that points to an element called section2: http://www.example.com/index.html#section2 the following element would be selected by a :target selector when the current url is equal to the above: <section id="section2">example</section> syntax :target examples a table of contents the :target pseudo-class can be used to highlight the portion of a page that has been linked to from a table of contents.
:where() - CSS: Cascading Style Sheets
WebCSS:where
you can see the result below (although bear in mind that currently :is() and :where() are currently only enabled by default in firefox nightly, version 77+.
additive-symbols - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
fallback - CSS: Cascading Style Sheets
the fallback descriptor can be used to specify a counter style to fall back to if the current counter style cannot create a marker representation for a particular counter value.
negative - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
pad - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
prefix - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
suffix - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
symbols - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
system - CSS: Cascading Style Sheets
if the specified counter style name in extends, is not a currently defined counter style name, it will instead extend from the decimal counter style.
@counter-style - CSS: Cascading Style Sheets
image values for symbols is currently an 'at risk' feature, and is not implemented in any browser.
@document - CSS: Cascading Style Sheets
WebCSS@document
@document is currently only supported in firefox; if you wanted to replicate using such functionality in your own non-firefox browser, you could try using this polyfill by @an-error94, which uses a combination of a user script, data-* attributes, and attribute selectors.
unicode-range - CSS: Cascading Style Sheets
the unicode-range css descriptor sets the specific range of characters to be used from a font defined by @font-face and made available for use on the current page.
At-rules - CSS: Cascading Style Sheets
WebCSSAt-rule
(currently at the working draft stage) @counter-style — defines specific counter styles that are not part of the predefined set of styles.
Coordinate systems - CSS: Cascading Style Sheets
whenever the mouse enters, moves around inside, or exits the inner box, the corresponding event is handled by updating a set of informational messages within the box, listing out the current mouse coordinates in each of the four available coordinate systems.
Detecting CSS animation support - CSS: Cascading Style Sheets
if the browser does not support non-prefixed animation and animation is still false, we iterate over all the possible prefixes, since all the major browsers are currently prefixing this property and changing its name to animationname instead.
CSS Animations tips and tricks - CSS: Cascading Style Sheets
this has the effect of removing any other classes currently applied to the box, including the "changing" class that handles animation.
Using CSS animations - CSS: Cascading Style Sheets
letting the browser control the animation sequence lets the browser optimize performance and efficiency by, for example, reducing the update frequency of animations running in tabs that aren't currently visible.
CSS Animations - CSS: Cascading Style Sheets
currently offers a technique for replaying an animation which has already run through to completion, which the api doesn't support inherently.
Box alignment for block, absolutely positioned and table layout - CSS: Cascading Style Sheets
aligning in these layout methods today as we do not currently have browser support for box alignment in block layout, your options for alignment are either to use one of the existing alignment methods or, to make even a single item inside a container a flex item in order to use the alignment properties as specified in flexbox.
CSS Box Alignment - CSS: Cascading Style Sheets
however the specification notes that the box alignment specification should be referred to as it may add additional capabilities over what is currently in flexbox.
Color picker tool - CSS: Cascading Style Sheets
in addition, based on the currently-selected color, a palette for hsl and hsv, as well as alpha, is generated.
Spanning and Balancing Columns - CSS: Cascading Style Sheets
limitations of column-span in the current level 1 specification there are only two allowable values for column-span.
Styling Columns - CSS: Cascading Style Sheets
summary this details all the current ways in which column boxes can be styled.
CSS Containment - CSS: Cascading Style Sheets
note: style containment is "at-risk" in the spec and may not be supported everywhere (it's not currently supported in firefox).
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
future alignment features for flexbox at the beginning of this article i explained that the alignment properties currently contained in the level 1 flexbox specification are also included in box alignment level 3, which may well extend these properties and values in the future.
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
you will see that many of the listed bugs apply to old browser versions and are fixed in current browsers.
Flow Layout and Overflow - CSS: Cascading Style Sheets
these properties currently do not have implementations in browsers, so you will need to use the physical properties at the present time and adjust for your writing mode.
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
currently we can’t do things like target every other cell of the grid with our items.
Box alignment in CSS Grid Layout - CSS: Cascading Style Sheets
while the specification currently specifies alignment details for all layout methods, browsers have not fully implemented all of the specification; however, the css grid layout method has been widely adopted.
CSS Grid Layout and Accessibility - CSS: Cascading Style Sheets
currently the only way to do this is to use display: contents to cause the box generated by the ul to disappear from the dom.
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
there are also substantial differences between what shipped in ie10 and the current specification, even where the properties and values appear the same.
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
our inline-start is the left-hand column line as inline-start is always the point from which text would be written in the current writing mode, inline-end is the final column line of our grid.
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
don’t forget to find examples that are impossible to build with current methods.
Subgrid - CSS: Cascading Style Sheets
important: this feature is shipped in firefox 71, which is currently the only browser to implement subgrid.
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
using any four-value shorthand such as margin, padding, or border will currently use the physical versions, so if following the flow of the document is important, use the longhand properties for the time being.
Logical properties for sizing - CSS: Cascading Style Sheets
note that currently the logical values for resize are only supported by firefox.
Basic concepts of CSS Scroll Snap - CSS: Cascading Style Sheets
note: the scroll-snap-stop property is currently marked at risk in the current candidate recommendation spec, therefore it may be removed.
Browser compatibility and Scroll Snap - CSS: Cascading Style Sheets
in this initial example we have used the old specification alongside the current specification in order to make scroll snapping work in all browsers which support some form of scroll snapping.
CSS Scroll Snap - CSS: Cascading Style Sheets
css scroll snap is the current implementation.
CSS values and units - CSS: Cascading Style Sheets
a fourth value of revert was added in the cascade level 4 specification, but it does not currently have good browser support.
Questions about CSS - CSS: Cascading Style Sheets
WebCSSFAQ
an imported style sheet, using the css @import notation to automatically import and merge an external style sheet with the current style sheet style attributes specified by the viewer to the browser the default style sheet assumed by the browser in general, the web page creator's style sheet takes precedence, but it's recommended that browsers provide ways for the viewer to override the style attributes in some respects.
Breadcrumb Navigation - CSS: Cascading Style Sheets
accessibility concerns i have used the aria-label and aria-current attributes to help users understand what this navigation is and where the current page is in the structure.
Center an element - CSS: Cascading Style Sheets
however, support is currently limited for box alignment properties on block layout, so currently centering using flexbox is the most robust way to achieve this.
Column layouts - CSS: Cascading Style Sheets
there is currently no way to add a rule between flex items, and browser support for the column-gap and row-gap properties is limited.
Mozilla CSS extensions - CSS: Cascading Style Sheets
utton-dropdown toolbox tooltip treeheadercell treeheadersortarrow treeitem treetwisty treetwistyopen treeview window background-image gradients -moz-linear-gradient -moz-radial-gradient elements -moz-element sub-images -moz-image-rect() border-color -moz-use-text-colorobsolete since gecko 52 (removed in bug 1306214); use currentcolor instead.
Replaced elements - CSS: Cascading Style Sheets
put in simpler terms, they're elements whose contents are not affected by the current document's styles.
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
not all browsers currently render these correctly.
Syntax - CSS: Cascading Style Sheets
WebCSSSyntax
these statements only apply if a specific condition is matched: the @media at-rule content is applied only if the device on which the browser runs matches the expressed condition; the @document at-rule content is applied only if the current page matches some conditions, and so on.
WebKit CSS extensions - CSS: Cascading Style Sheets
::-webkit-file-upload-button ::-webkit-inner-spin-button ::-webkit-input-placeholder ::-webkit-media-controls ::-webkit-media-controls-current-time-display ::-webkit-media-controls-enclosure ::-webkit-media-controls-fullscreen-button ::-webkit-media-controls-mute-button ::-webkit-media-controls-overlay-enclosure ::-webkit-media-controls-panel ::-webkit-media-controls-play-button ::-webkit-media-controls-timeline ::-webkit-media-controls-time-remaining-display ::-webkit-media-controls-toggle-closed-captions-button ::-webkit-med...
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
div{ color: black; -webkit-appearance: media-controls-fullscreen-background; } <div>lorem</div> chrome safari media-controls-light-bar-background div{ color: black; -moz-appearance: media-controls-light-bar-background; -webkit-appearance: media-controls-light-bar-background; } <div>lorem</div> safari media-current-time-display div{ color: black; -webkit-appearance: media-current-time-display; } <div>lorem</div> chrome safari media-time-remaining-display div{ color: black; -webkit-appearance: media-time-remaining-display; } <div>lorem</div> chrome safari menulist-text div { color: black; -moz-appearance...
attr() - CSS: Cascading Style Sheets
WebCSSattr
currentcolor url <url> the attribute value is parsed as a string that is used inside a css url() function.
backdrop-filter - CSS: Cascading Style Sheets
)<grayscale()> = grayscale( <number-percentage> )<hue-rotate()> = hue-rotate( <angle> )<invert()> = invert( <number-percentage> )<opacity()> = opacity( [ <number-percentage> ] )<saturate()> = saturate( <number-percentage> )<sepia()> = sepia( <number-percentage> )where <number-percentage> = <number> | <percentage><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
background-image - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
background-repeat - CSS: Cascading Style Sheets
when the next image is added, all of the current ones compress to allow room.
background-size - CSS: Cascading Style Sheets
note: in gecko, background images created using the element() function are currently treated as images with the dimensions of the element, or of the background positioning area if the element is svg, with the corresponding intrinsic proportion.
background - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
border-block-color - CSS: Cascading Style Sheets
formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typediscrete formal syntax <'border-top-color'>{1,2} examples border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-block-color: ...
border-block-end-color - CSS: Cascading Style Sheets
formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-block-end-col...
border-block-start-color - CSS: Cascading Style Sheets
values <'color'> see border-color formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-block-start-c...
border-block-start - CSS: Cascading Style Sheets
as specifiedborder-top-style: as specifiedborder-block-start-color: computed coloranimation typeas each of the properties of the shorthand:border-block-start-color: a colorborder-block-start-style: discreteborder-block-start-width: a length formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-image-source - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
border-inline-color - CSS: Cascading Style Sheets
formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typediscrete formal syntax <'border-top-color'>{1,2} examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-inline-...
border-inline-end - CSS: Cascading Style Sheets
le: as specifiedborder-top-style: as specifiedborder-inline-end-color: computed coloranimation typeas each of the properties of the shorthand:border-inline-end-color: a colorborder-inline-end-style: discreteborder-inline-end-width: a length formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-inline-start-color - CSS: Cascading Style Sheets
formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-inline-start-color: red; } specifications ...
border-inline-start - CSS: Cascading Style Sheets
pecifiedborder-top-style: as specifiedborder-inline-start-color: computed coloranimation typeas each of the properties of the shorthand:border-inline-start-color: a colorborder-inline-start-style: discreteborder-inline-start-width: a length formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
box-align - CSS: Cascading Style Sheets
WebCSSbox-align
see flexbox for information about the current standard.
box-direction - CSS: Cascading Style Sheets
see flexbox for information about the current standard.
box-flex-group - CSS: Cascading Style Sheets
see flexbox for information about the current standard.
box-flex - CSS: Cascading Style Sheets
WebCSSbox-flex
see flexbox for information about the current standard.
box-lines - CSS: Cascading Style Sheets
WebCSSbox-lines
see flexbox for information about the current standard.
box-ordinal-group - CSS: Cascading Style Sheets
see flexbox for information about the current standard.
box-orient - CSS: Cascading Style Sheets
see flexbox for information about the current standard.
box-pack - CSS: Cascading Style Sheets
WebCSSbox-pack
see flexbox for information about the current standard.
calc() - CSS: Cascading Style Sheets
WebCSScalc
note: the chrome browser currently won’t accept some values returned by calc() when an integer is expected.
column-rule-color - CSS: Cascading Style Sheets
formal definition initial valuecurrentcolorapplies tomulticol elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
content - CSS: Cascading Style Sheets
WebCSScontent
)<leader-type> = dotted | solid | space | <string>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
counter-set - CSS: Cascading Style Sheets
if there isn't currently a counter of the given name on the element, the element will create a new counter of the given name with a starting value of 0 (though it may then immediately set or increment that value to something different).
counter() - CSS: Cascading Style Sheets
WebCSScounter
the counter() css function returns a string representing the current value of the named counter, if there is one.
counters() - CSS: Cascading Style Sheets
WebCSScounters
the counters() css function enables nested counters, returning a concatenated string representing the current values of the named counters, if there are any.
<filter-function> - CSS: Cascading Style Sheets
ed>blur</option> <option>brightness</option> <option>contrast</option> <option>drop-shadow</option> <option>grayscale</option> <option>hue-rotate</option> <option>invert</option> <option>opacity</option> <option>saturate</option> <option>sepia</option> </select> </li> <li> <input type="range"><output></output> </li> <li> <p>current value: <code></code></p> </li> </ul> css div { width: 300px; height: 300px; background: url(https://media.prod.mdn.mozit.cloud/attachments/2020/07/29/17350/3b4892b7e820122ac6dd7678891d4507/firefox.png) no-repeat center; } li { display: flex; align-items: center; justify-content: center; margin-bottom: 20px; } input { width: 60% } output { width: 5%; text-align: center; ...
font-size-adjust - CSS: Cascading Style Sheets
the font-size-adjust css property sets the size of lower-case letters relative to the current font size (which defines the size of upper-case letters).
font-size - CSS: Cascading Style Sheets
WebCSSfont-size
note that the value 2 is essentially a multiplier of the current em size.
font-variation-settings - CSS: Cascading Style Sheets
in some browsers, this is currently only true when the @font-face declaration includes a font-weight range.
font-weight - CSS: Cascading Style Sheets
the weights available depend on the font-family that is currently set.
<frequency-percentage> - CSS: Cascading Style Sheets
the pitch of a speaking voice, are not currently used in any css properties.
<frequency> - CSS: Cascading Style Sheets
WebCSSfrequency
it is not currently used in any css properties.
grid-template-columns - CSS: Cascading Style Sheets
the subgrid value is from level 2 of the grid specification and currently only has implementation in firefox 71 and onwards.
grid-template-rows - CSS: Cascading Style Sheets
the subgrid value is from level 2 of the grid specification and currently only has implementation in firefox 71 and onwards.
image() - CSS: Cascading Style Sheets
)where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
ime-mode - CSS: Cascading Style Sheets
WebCSSime-mode
values auto no change is made to the current input method editor state.
inherit - CSS: Cascading Style Sheets
WebCSSinherit
div#current { color: blue; } ...
<length> - CSS: Cascading Style Sheets
WebCSSlength
font-relative lengths font-relative lengths define the <length> value in terms of the size of a particular character or font attribute in the font currently in effect in an element or its parent.
letter-spacing - CSS: Cascading Style Sheets
syntax /* keyword value */ letter-spacing: normal; /* <length> values */ letter-spacing: 0.3em; letter-spacing: 3px; letter-spacing: .3px; /* global values */ letter-spacing: inherit; letter-spacing: initial; letter-spacing: unset; values normal the normal letter spacing for the current font.
line-height - CSS: Cascading Style Sheets
-moz-block-height sets the line height to the content height of the current block.
mask-border-source - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
mask-border - CSS: Cascading Style Sheets
div { width: 200px; background-color: lavender; border: 18px solid salmon; padding: 10px; /* prefixed longhand properties currently supported in chromium -webkit-mask-box-image-source: url(https://udn.realityripple.com/samples/2d/fd08a3134c.png); -webkit-mask-box-image-slice: 30 fill; -webkit-mask-box-image-width: 20px; -webkit-mask-box-image-repeat: round; -webkit-mask-box-image-outset: 1px; */ /* prefixed shorthand property currently supported in chromium */ -webkit-mask-box-image: url("https://...
mask-image - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
mask-repeat - CSS: Cascading Style Sheets
when the next image is added, all of the current ones compress to allow room.
opacity - CSS: Cascading Style Sheets
WebCSSopacity
in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for text content and 3:1 for larger text such as headings.
page-break-after - CSS: Cascading Style Sheets
the page-break-after css property adjusts page breaks after the current element.
page-break-before - CSS: Cascading Style Sheets
the page-break-before css property adjusts page breaks before the current element.
page-break-inside - CSS: Cascading Style Sheets
the page-break-inside css property adjusts page breaks inside the current element.
revert - CSS: Cascading Style Sheets
WebCSSrevert
the revert css keyword reverts the cascaded value of the property from its current value to the value the property would have had if no changes had been made by the current style origin to the current element.
scroll-snap-align - CSS: Cascading Style Sheets
safari currently has the two value syntax in the wrong order, the first value being inline the second block.
scrollbar-color - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscrolling boxesinheritedyescomputed valueas specifiedanimation typea color formal syntax auto | dark | light | <color>{2}where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
shape-outside - CSS: Cascading Style Sheets
| [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]<fill-rule> = nonzero | evenodd<image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
text-decoration-thickness - CSS: Cascading Style Sheets
<percentage> specifies the thickness of the text decoration line as a <percentage> of 1em in the current font.
text-decoration - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:text-decoration-color: currentcolortext-decoration-style: solidtext-decoration-line: noneapplies toall elements.
text-justify - CSS: Cascading Style Sheets
auto the browser chooses the best type of justification for the current situation based on a balance between performance and quality, but also on what is most appropriate for the language of the text (e.g., english, cjk languages, etc.).
text-shadow - CSS: Cascading Style Sheets
]where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
touch-action - CSS: Cascading Style Sheets
after a gesture starts, changes to touch-action will not have any impact on the behavior of the current gesture.
transition-property - CSS: Cascading Style Sheets
as such, you should avoid including any properties in the list that don't currently animate, as someday they might, causing unexpected results.
will-change - CSS: Cascading Style Sheets
chrome currently takes two actions, given particular css property idents: establish a new compositing layer or a new stacking context.
word-spacing - CSS: Cascading Style Sheets
syntax /* keyword value */ word-spacing: normal; /* <length> values */ word-spacing: 3px; word-spacing: 0.3em; /* <percentage> values */ word-spacing: 50%; word-spacing: 200%; /* global values */ word-spacing: inherit; word-spacing: initial; word-spacing: unset; values normal the normal inter-word spacing, as defined by the current font and/or the browser.
Web Audio playbackRate explained - Developer guides
ment first, and set up video and playback rate controls in html: <video id="myvideo" controls> <source src="https://udn.realityripple.com/samples/6f/08625b424a.m4v" type='video/mp4' /> <source src="https://udn.realityripple.com/samples/5b/8cd6da9c65.webm" type='video/webm' /> </video> <form> <input id="pbr" type="range" value="1" min="0.5" max="4" step="0.1" > <p>playback rate <span id="currentpbr">1</span></p> </form> and apply some javascript to it: window.onload = function () { var v = document.getelementbyid("myvideo"); var p = document.getelementbyid("pbr"); var c = document.getelementbyid("currentpbr"); p.addeventlistener('input',function(){ c.innerhtml = p.value; v.playbackrate = p.value; },false); }; finally, we listen for the input event firing on the <i...
Audio and video manipulation - Developer guides
libraries currently exist for the following formats : aac: aac.js alac: alac.js flac: flac.js mp3: mp3.js opus: opus.js vorbis: vorbis.js note: at audiocogs, you can try out a few demos; audiocogs also provides a framework, aurora.js, which is intended to help you author your own codecs in javascript.
Mouse gesture events - Developer guides
firefox uses this gesture to move backward and forward through the tabs in the current window.
Content categories - Developer guides
a few other elements belong to this category, but only if a specific condition is fulfilled: <area>, if it is a descendant of a <map> element <link>, if the itemprop attribute is present <meta>, if the itemprop attribute is present <style>, if the scoped attribute is present sectioning content elements belonging to the sectioning content model create a section in the current outline that defines the scope of <header> elements, <footer> elements, and heading content.
Making content editable - Developer guides
when using contenteditable, calling execcommand() will affect the currently active editable element.
Localizations and character encodings - Developer guides
for locales where the fallback encoding is currently iso-8859-1, it should be changed to windows-1252.
SVG-in-OpenType - Developer guides
the svg-in-opentype work is currently in the hands of the mpeg group.
The Web Open Font Format (WOFF) - Developer guides
WebGuideWOFF
both proprietary and free software browser vendors like the woff format, so it has the potential of becoming a truly universal, interoperable font format for the web, unlike other current font formats.
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
html provides a crossorigin attribute for images that, in combination with an appropriate cors header, allows images defined by the <img> element that are loaded from foreign origins to be used in a <canvas> as if they had been loaded from the current origin.
Date and time formats used in HTML - HTML: Hypertext Markup Language
while this format allows for time zones between -23:59 and +23:59, the current range of time zone offsets is -12:00 to +14:00, and no time zones are currently offset from the hour by anything other than 00, 30, or 45 minutes.
<address>: The Contact Address element - HTML: Hypertext Markup Language
WebHTMLElementaddress
typically an <address> element can be placed inside the <footer> element of the current section, if any.
<bdo>: The Bidirectional Text Override element - HTML: Hypertext Markup Language
WebHTMLElementbdo
the html bidirectional text override element (<bdo>) overrides the current directionality of text, so that the text within is rendered in a different direction.
<body>: The Document Body element - HTML: Hypertext Markup Language
WebHTMLElementbody
onhashchange function to call when the fragment identifier part (starting with the hash ('#') character) of the document's current address has changed.
<col> - HTML: Hypertext Markup Language
WebHTMLElementcol
width this attribute specifies a default width for each column in the current column group.
<details>: The Details disclosure element - HTML: Hypertext Markup Language
WebHTMLElementdetails
open this boolean attribute indicates whether or not the details — that is, the contents of the <details> element — are currently visible.
<html>: The HTML Document / Root element - HTML: Hypertext Markup Language
WebHTMLElementhtml
version specifies the version of the html document type definition that governs the current document.
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
WebHTMLElementiframe
the html inline frame element (<iframe>) represents a nested browsing context, embedding another html page into the current one.
<input type="hidden"> - HTML: Hypertext Markup Language
WebHTMLElementinputhidden
for example, the id of the content that is currently being ordered or edited, or a unique security token.
<input type="text"> - HTML: Hypertext Markup Language
WebHTMLElementinputtext
value the value attribute is a domstring that contains the current value of the text entered into the text field.
<isindex> - HTML: Hypertext Markup Language
WebHTMLElementisindex
kevin replies that he doesn't like the boolean nature of isindex and would prefer a system where everything is searchable and proposes to extend the current www framework with a specific httpd configuration and defined that some uris mapping create search queries.
<li> - HTML: Hypertext Markup Language
WebHTMLElementli
value this integer attribute indicates the current ordinal value of the list item as defined by the <ol> element.
<mark>: The Mark Text element - HTML: Hypertext Markup Language
WebHTMLElementmark
otherwise, <mark> indicates a portion of the document's content which is likely to be relevant to the user's current activity.
<menu> - HTML: Hypertext Markup Language
WebHTMLElementmenu
this document describes the current firefox implementation.
<menuitem> - HTML: Hypertext Markup Language
WebHTMLElementmenuitem
disabled boolean attribute which indicates that the command is not available in the current state.
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
WebHTMLElementmeta
the attribute is named http-equiv(alent) because all the allowed values are names of particular http headers: content-security-policy allows page authors to define a content policy for the current page.
<meter>: The HTML Meter element - HTML: Hypertext Markup Language
WebHTMLElementmeter
value the current numeric value.
<nav>: The Navigation Section element - HTML: Hypertext Markup Language
WebHTMLElementnav
the html <nav> element represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents.
<noembed>: The Embed Fallback element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementnoembed
while this element currently still works in many browsers, it is obsolete and should not be used.
<noscript> - HTML: Hypertext Markup Language
WebHTMLElementnoscript
the html <noscript> element defines a section of html to be inserted if a script type on the page is unsupported or if scripting is currently turned off in the browser.
<picture>: The Picture element - HTML: Hypertext Markup Language
WebHTMLElementpicture
to decide which url to load, the user agent examines each <source>'s srcset, media, and type attributes to select a compatible image that best matches the current layout and capabilities of the display device.
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
WebHTMLElementtrack
detecting cue changes the underlying texttrack, indicated by the track property, receives a cuechange event every time the currently-presented cue is changed.
<var>: The Variable element - HTML: Hypertext Markup Language
WebHTMLElementvar
it's typically presented using an italicized version of the current typeface, although that behavior is browser-dependent.
accesskey - HTML: Hypertext Markup Language
the accesskey global attribute provides a hint for generating a keyboard shortcut for the current element.
inputmode - HTML: Hypertext Markup Language
text (default value) standard input keyboard for the user's current locale.
is - HTML: Hypertext Markup Language
this attribute can only be used if the specified custom element name has been successfully defined in the current document, and extends the element type it is being applied to.
Global attributes - HTML: Hypertext Markup Language
list of global attributes accesskey provides a hint for generating a keyboard shortcut for the current element.
Link types: preload - HTML: Hypertext Markup Language
the preload keyword for the rel attribute of the <link> element indicates the user is highly likely to require the target resource for the current navigation, and therefore the browser must preemptively fetch and cache the resource.
HTML: Hypertext Markup Language
WebHTML
advanced topics cors enabled image the crossorigin attribute, in combination with an appropriate cors header, allows images defined by the <img> element to be loaded from foreign origins and used in a <canvas> element as if they were being loaded from the current origin.
HTTP authentication - HTTP
from firefox 59 onwards, image resources loaded from different origins to the current document are no longer able to trigger http authentication dialogs (bug 1423146), preventing user credentials being stolen if attackers were able to embed an arbitrary image into a third-party page.
Evolution of HTTP - HTTP
in fact, the current web security model has been developed after the creation of http!
MIME types (IANA media types) - HTTP
discrete types the discrete types currently registered with the iana are: applicationlist at iana any kind of binary data that doesn't fall explicitly into one of the other types; either data that will be executed or interpreted in some way or binary data that requires a specific application or category of application to use.
Reason: CORS header 'Access-Control-Allow-Origin' missing - HTTP
the response to the cors request is missing the required access-control-allow-origin header, which is used to determine whether or not the resource can be accessed by content operating within the current origin.
HTTP caching - HTTP
WebHTTPCaching
the expiration time is computed as follows: expirationtime = responsetime + freshnesslifetime - currentage where responsetime is the time at which the response was received according to the browser.
Connection management in HTTP/1.x - HTTP
the next request is only issued once the response to the current request has been received.
Using Feature Policy - HTTP
for every feature controlled by feature policy, the feature is only enabled in the current document or frame if its origin matches the allowed list of origins.
Age - HTTP
WebHTTPHeadersAge
if it is age: 0, it was probably just fetched from the origin server; otherwise it is usually calculated as a difference between the proxy's current date and the date general header included in the http response.
Connection - HTTP
the connection general header controls whether or not the network connection stays open after the current transaction finishes.
CSP: base-uri - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: child-src - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: connect-src - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: default-src - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: font-src - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: form-action - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: frame-src - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: img-src - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: manifest-src - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: media-src - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: navigate-to - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: object-src - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: prefetch-src - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: script-src-attr - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: script-src-elem - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: script-src - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: style-src-attr - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: style-src-elem - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: style-src - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
CSP: worker-src - HTTP
*.example.com: matches all attempts to load from any subdomain of example.com using the current protocol.
Content-Security-Policy - HTTP
so for compatibility with current browsers while also adding forward compatibility when browsers get report-to support, you can specify both report-uri and report-to: content-security-policy: ...; report-uri https://endpoint.example.com; report-to groupname in browsers that support report-to, the report-uri directive will be ignored.
Digest - HTTP
WebHTTPHeadersDigest
3owduoywxbf7kbu9dbpe= digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9dbpe=,unixsum=30637 specifications specification title draft-ietf-httpbis-digest-headers-latest resource digests for http this header was originally defined in rfc 3230, but the definition of "selected representation" in rfc 7231 made the original definition inconsistent with current http specifications.
Expect - HTTP
WebHTTPHeadersExpect
header type request header forbidden header name yes syntax no other expectations except "100-continue" are specified currently.
Feature-Policy: accelerometer - HTTP
the http feature-policy header accelerometer directive controls whether the current document is allowed to gather information about the acceleration of the device through the accelerometer interface.
Feature-Policy: ambient-light-sensor - HTTP
the http feature-policy header ambient-light-sensor directive controls whether the current document is allowed to gather information about the amount of light in the environment around the device through the ambientlightsensor interface.
Feature-Policy: autoplay - HTTP
the http feature-policy header autoplay directive controls whether the current document is allowed to autoplay media requested through the htmlmediaelement interface.
Feature-Policy: battery - HTTP
the http feature-policy header battery directive controls whether the current document is allowed to gather information about the acceleration of the device through the batterymanager interface obtained via navigator.getbattery().
Feature-Policy: camera - HTTP
the http feature-policy header camera directive controls whether the current document is allowed to use video input devices.
Feature-Policy: document-domain - HTTP
the http feature-policy header document-domain directive controls whether the current document is allowed to set document.domain.
Feature-Policy: encrypted-media - HTTP
the http feature-policy header encrypted-media directive controls whether the current document is allowed to use the encrypted media extensions api (eme).
Feature-Policy: fullscreen - HTTP
the http feature-policy header fullscreen directive controls whether the current document is allowed to use element.requestfullscreen().
Feature-Policy: gyroscope - HTTP
the http feature-policy header gyroscope directive controls whether the current document is allowed to gather information about the orientation of the device through the gyroscope interface.
Feature-Policy: layout-animations - HTTP
the http feature-policy header layout-animations directive controls whether the current document is allowed to show layout animations.
Feature-Policy: legacy-image-formats - HTTP
the http feature-policy header legacy-image-formats directive controls whether the current document is allowed to display images in legacy formats.
Feature-Policy: magnetometer - HTTP
the http feature-policy header magnetometer directive controls whether the current document is allowed to gather information about the orientation of the device through the magnetometer interface.
Feature-Policy: microphone - HTTP
the http feature-policy header microphone directive controls whether the current document is allowed to use audio input devices.
Feature-Policy: midi - HTTP
the http feature-policy header midi directive controls whether the current document is allowed to use the web midi api.
Feature-Policy: oversized-images - HTTP
the http feature-policy header oversized-images directive controls whether the current document is allowed to download and display large images.
Feature-Policy: payment - HTTP
the http feature-policy header field's payment directive controls whether the current document is allowed to use the payment request api.
Feature-Policy: picture-in-picture - HTTP
the http feature-policy header picture-in-picture directive controls whether the current document is allowed to play a video in a picture-in-picture mode via the corresponding api.
Feature-Policy: publickey-credentials-get - HTTP
the http feature-policy header publickey-credentials-get directive controls whether the current document is allowed to access web authentcation api to create new public-key credentials, i.e, via navigator.credentials.get({publickey: ..., ...}).
Feature-Policy: screen-wake-lock - HTTP
the http feature-policy header screen-wake-lock directive controls whether the current document is allowed to use screen wake lock api to indicate that device should not dim or turn off the screen.
Feature-Policy: sync-xhr - HTTP
the http feature-policy header sync-xhr directive controls whether the current document is allowed to make synchronous xmlhttprequest requests.
Feature-Policy: unoptimized-images - HTTP
the http feature-policy header unoptimized-images directive controls whether the current document is allowed to download and display unoptimized images.
Feature-Policy: unsized-media - HTTP
the http feature-policy header unsized-media directive controls whether the current document is allowed to change the size of media elements after the initial layout is complete.
Feature-Policy: usb - HTTP
the http feature-policy header usb directive controls whether the current document is allowed to use the webusb api.
Feature-Policy: vibrate - HTTP
the http feature-policy header vibrate directive controls whether the current document is allowed to trigger device vibrations via navigator.vibrate() method of vibration api.
Feature-Policy: wake-lock - HTTP
the http feature-policy header wake-lock directive controls whether the current document is allowed to use wake lock api to indicate that device should not enter power-saving mode.
web-share - HTTP
the http feature-policy header web-share directive controls controls whether the current document is allowed to use the navigator.share() of web share api to share text, links, images, and other content to arbitrary destiations of user's choice.
Feature-Policy: xr-spatial-tracking - HTTP
the http feature-policy header xr-spatial-tracking directive controls whether the current document is allowed to use the webxr device api.
Tk - HTTP
WebHTTPHeadersTk
the origin server is currently testing its communication of tracking status.
Transfer-Encoding - HTTP
the content-length header is omitted in this case and at the beginning of each chunk you need to add the length of the current chunk in hexadecimal format, followed by '\r\n' and then the chunk itself, followed by another '\r\n'.
Upgrade - HTTP
WebHTTPHeadersUpgrade
a server may also send the header as part of a 426 upgrade required response, to indicate that the server won't perform the request using the current protocol, but might do so if the protocol is changed.
Want-Digest - HTTP
em want-digest: sha;q=1 response: http/1.1 400 bad request want-digest: sha-256, sha-512 specifications specification title draft-ietf-httpbis-digest-headers-latest resource digests for http this header was originally defined in rfc 3230, but the definition of "selected representation" in rfc 7231 made the original definition inconsistent with current http specifications.
X-Forwarded-For - HTTP
examples x-forwarded-for: 2001:db8:85a3:8d3:1319:8a2e:370:7348 x-forwarded-for: 203.0.113.195 x-forwarded-for: 203.0.113.195, 70.41.3.18, 150.172.238.178 other non-standard forms: # used for some google services x-proxyuser-ip: 203.0.113.19 specifications not part of any current specification.
X-Forwarded-Host - HTTP
examples x-forwarded-host: id42.example-cdn.com specifications not part of any current specification.
X-Forwarded-Proto - HTTP
examples x-forwarded-proto: https other non-standard forms: # microsoft front-end-https: on x-forwarded-protocol: https x-forwarded-ssl: on x-url-scheme: https specifications not part of any current specification.
HTTP request methods - HTTP
WebHTTPMethods
put the put method replaces all current representations of the target resource with the request payload.
Network Error Logging - HTTP
servfail) dns.address_changed for security reasons, if the server ip address that delivered the original report is different to the current server ip address at time of error generation, the report data will be downgraded to only include information about this problem and the type set to dns.address_changed.
HTTP Public Key Pinning (HPKP) - HTTP
note: the current specification requires including a second pin for a backup key which isn't yet used in production.
405 Method Not Allowed - HTTP
WebHTTPStatus405
the server must generate an allow header field in a 405 response containing a list of the target resource's currently supported methods.
409 Conflict - HTTP
WebHTTPStatus409
the http 409 conflict response status code indicates a request conflict with current state of the server.
411 Length Required - HTTP
WebHTTPStatus411
note: by specification, when sending data in a series of chunks, the content-length header is omitted and at the beginning of each chunk you need to add the length of the current chunk in hexadecimal format.
412 Precondition Failed - HTTP
WebHTTPStatus412
for example, when editing mdn, the current wiki content is hashed and put into an etag in the response: etag: "33a64df551425fcc55e4d42a148795d9f25f89d4" when saving changes to a wiki page (posting data), the post request will contain the if-match header containing the etag values to check freshness against.
416 Range Not Satisfiable - HTTP
WebHTTPStatus416
the 416 response message contains a content-range indicating an unsatisfied range (that is a '*') followed by a '/' and the current length of the resource.
426 Upgrade Required - HTTP
WebHTTPStatus426
the http 426 upgrade required client error response code indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.
Closures - JavaScript
': 'your e-mail address'}, {'id': 'name', 'help': 'your full name'}, {'id': 'age', 'help': 'your age (you must be over 16)'} ]; for (var i = 0; i < helptext.length; i++) { (function() { var item = helptext[i]; document.getelementbyid(item.id).onfocus = function() { showhelp(item.help); } })(); // immediate event listener attachment with the current value of item (preserved until iteration).
Equality comparisons and sameness - JavaScript
internally, when an immutable property is redefined, the newly-specified value is compared against the current value using same-value equality.
Expressions and operators - JavaScript
this use the this keyword to refer to the current object.
Grammar and types - JavaScript
for example: var n = null; console.log(n * 32); // will log 0 to the console variable scope when you declare a variable outside of any function, it is called a global variable, because it is available to any other code in the current document.
Keyed collections - JavaScript
that also means that there is no list of current objects stored in the collection.
JavaScript modules - JavaScript
however, we've written the path a bit differently — we are using the dot (.) syntax to mean "the current location", followed by the path beyond that to the file we are trying to find.
Regular expressions - JavaScript
regexp.prototype.unicode y perform a "sticky" search that matches starting at the current position in the target string.
Working with objects - JavaScript
unction car(make, model, year, owner) { this.make = make; this.model = model; this.year = year; this.owner = owner; this.displaycar = displaycar; } then you can call the displaycar method for each of the objects as follows: car1.displaycar(); car2.displaycar(); using this for object references javascript has a special keyword, this, that you can use within a method to refer to the current object.
JavaScript technologies overview - JavaScript
a prototype-based inheritance mechanism built-in objects and functions (json, math, array.prototype methods, object introspection methods, etc.) strict mode browser support as of october 2016, the current versions of the major web browsers implement ecmascript 5.1 and ecmascript 2015, but older versions (still in use) implement ecmascript 5 only.
JavaScript language resources - JavaScript
the following ecmascript standards have been approved or are being worked on: name links release date description current editions ecma-262 10th edition pdf, html, working draft, repository 2019 ecmascript 2019 language specification ecma-262 9th edition pdf, html, working draft, repository 2018 ecmascript 2018 language specification ecma-402 5th edition working draft, repository 2018 ecmascript 2018 internationalization api specification obsolete/historical editions ecma-262 pdf ...
Memory Management - JavaScript
all improvements made in the field of javascript garbage collection (generational/incremental/concurrent/parallel garbage collection) over the last few years are implementation improvements of this algorithm, but not improvements over the garbage collection algorithm itself nor its reduction of the definition of when "an object is no longer needed".
SyntaxError: invalid regular expression flag "x" - JavaScript
to match newlines (added in ecmascript 2018) u unicode; treat pattern as a sequence of unicode code points y perform a "sticky" search that matches starting at the current position in the target string.
Arrow function expressions - JavaScript
so while searching for this which is not present in the current scope, an arrow function ends up finding the this from its enclosing scope.
The arguments object - JavaScript
using typeof with arguments the typeof operator returns 'object' when used with arguments console.log(typeof arguments); // 'object' the type of individual arguments can be determined by indexing arguments: console.log(typeof arguments[0]); // returns the type of the first argument properties arguments.callee reference to the currently executing function that the arguments belong to.
Array.prototype.toLocaleString() - JavaScript
let separator be the string value for the // list-separator string appropriate for the // host environment's current locale (this is // derived in an implementation-defined way).
Array.prototype.values() - JavaScript
: undefined, done: true } iteraror.next().value; // undefined one-use: the array iterator object is one use or temporary object example: var arr = ['a', 'b', 'c', 'd', 'e']; var iterator = arr.values(); for (let letter of iterator) { console.log(letter); } //"a" "b" "c" "d" "e" for (let letter of iterator) { console.log(letter); } // undefined reason: when next().done=true or currentindex>length the for..of loop ends.
Array - JavaScript
const fruits = [] fruits.push('banana', 'apple', 'peach') console.log(fruits.length) // 3 when setting a property on a javascript array when the property is a valid array index and that index is outside the current bounds of the array, the engine will update the array's length property accordingly: fruits[5] = 'mango' console.log(fruits[5]) // 'mango' console.log(object.keys(fruits)) // ['0', '1', '2', '5'] console.log(fruits.length) // 6 increasing the length.
ArrayBuffer.prototype.slice() - JavaScript
the range specified by the begin and end parameters is clamped to the valid index range for the current array.
DataView - JavaScript
return new int16array(buffer)[0] === 256; })(); console.log(littleendian); // true or false 64-bit integer values because javascript does not currently include standard support for 64-bit integer values, dataview does not offer native 64-bit operations.
Date() constructor - JavaScript
parameters there are four basic forms for the date() constructor: no parameters when no parameters are provided, the newly-created date object represents the current date and time as of the time of instantiation.
Date.prototype.getFullYear() - JavaScript
examples using getfullyear() the following example assigns the four-digit value of the current year to the variable year.
Date.prototype.getMilliseconds() - JavaScript
examples using getmilliseconds() the following example assigns the milliseconds portion of the current time to the variable milliseconds: var today = new date(); var milliseconds = today.getmilliseconds(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getmilliseconds' in that specification.
Date.prototype.getUTCDate() - JavaScript
examples using getutcdate() the following example assigns the day portion of the current date to the variable day.
Date.prototype.getUTCDay() - JavaScript
examples using getutcday() the following example assigns the weekday portion of the current date to the variable weekday.
Date.prototype.getUTCFullYear() - JavaScript
examples using getutcfullyear() the following example assigns the four-digit value of the current year to the variable year.
Date.prototype.getUTCHours() - JavaScript
examples using getutchours() the following example assigns the hours portion of the current time to the variable hours.
Date.prototype.getUTCMilliseconds() - JavaScript
examples using getutcmilliseconds() the following example assigns the milliseconds portion of the current time to the variable milliseconds.
Date.prototype.getUTCMinutes() - JavaScript
examples using getutcminutes() the following example assigns the minutes portion of the current time to the variable minutes.
Date.prototype.getUTCMonth() - JavaScript
examples using getutcmonth() the following example assigns the month portion of the current date to the variable month.
Date.prototype.getUTCSeconds() - JavaScript
examples using getutcseconds() the following example assigns the seconds portion of the current time to the variable seconds.
Date.prototype.setDate() - JavaScript
the setdate() method sets the day of the date object relative to the beginning of the currently set month.
EvalError() constructor - JavaScript
the line number of the code that caused the exception examples evalerror is not used in the current ecmascript specification and will thus not be thrown by the runtime.
EvalError - JavaScript
examples evalerror is not used in the current ecmascript specification and will thus not be thrown by the runtime.
FinalizationRegistry - JavaScript
garbage collection work can be split up over time using incremental and concurrent techniques.
Function.prototype.apply() - JavaScript
this refers to the current object (the calling object).
Function - JavaScript
function.caller specifies the function that invoked the currently executing function.
Intl.DisplayNames.prototype.resolvedOptions() - JavaScript
the intl.displaynames.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current displaynames object.
Intl​.List​Format​.prototype​.resolvedOptions() - JavaScript
the intl.listformat.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current listformat object.
Intl.NumberFormat() constructor - JavaScript
possible values are the iso 4217 currency codes, such as "usd" for the us dollar, "eur" for the euro, or "cny" for the chinese rmb — see the current currency & funds code list.
JSON.parse() - JavaScript
value * 2 // return value * 2 for numbers : value // return everything else unchanged ); // { p: 10 } json.parse('{"1": 1, "2": 2, "3": {"4": 4, "5": {"6": 6}}}', (key, value) => { console.log(key); // log the current property name, the last is "".
Map - JavaScript
in the current ecmascript specification, -0 and +0 are considered equal, although this was not so in earlier drafts.
Math.imul() - JavaScript
multiplying two numbers stored internally as integers (which is only possible with asmjs) with imul is the only potential circumstance where math.imul may prove performant in current browsers.
NaN - JavaScript
nan === nan; // false number.nan === nan; // false isnan(nan); // true isnan(number.nan); // true number.isnan(nan); // true function valueisnan(v) { return v !== v; } valueisnan(1); // false valueisnan(nan); // true valueisnan(number.nan); // true however, do note the difference between isnan() and number.isnan(): the former will return true if the value is currently nan, or if it is going to be nan after it is coerced to a number, while the latter will return true only if the value is currently nan: isnan('hello world'); // true number.isnan('hello world'); // false additionally, some array methods cannot find nan, while others can.
Object.setPrototypeOf() - JavaScript
warning: changing the [[prototype]] of an object is, by the nature of how modern javascript engines optimize property accesses, currently a very slow operation in every browser and javascript engine.
Promise.any() - JavaScript
it is currently in stage 4 of the tc39 process.
RegExp.prototype.flags - JavaScript
the flags property returns a string consisting of the flags of the current regular expression object.
Set.prototype.forEach() - JavaScript
syntax myset.foreach(callback[, thisarg]) parameters callback function to execute for each element, taking three arguments: currentvalue, currentkey the current element being processed in the set.
String.prototype.repeat() - JavaScript
but anyway, most current (august 2014) browsers can't handle // strings 1 << 28 chars or longer, so: if (str.length * count >= 1 << 28) throw new rangeerror('repeat count must not overflow maximum string size'); var maxcount = str.length * count; count = math.floor(math.log(count) / math.log(2)); while (count) { str += str; count--; } str += str.substring(0, maxcount - str...
String.prototype.toLocaleLowerCase() - JavaScript
the default locale is the host environment’s current locale.
String.prototype.toLocaleUpperCase() - JavaScript
the default locale is the host environment’s current locale.
Symbol.asyncIterator - JavaScript
built-in async iterables there are currently no built-in javascript objects that have the [symbol.asynciterator] key set by default.
TypedArray.prototype.subarray() - JavaScript
description the range specified by begin and end is clamped to the valid index range for the current array; if the computed length of the new array would be negative, it's clamped to zero.
WeakSet - JavaScript
note: this also means that there is no list of current objects stored in the collection.
WebAssembly.Module.customSections() - JavaScript
note that the webassembly text format currently doesn't have a syntax specified for adding new custom sections; you can however add a name section to your wasm during conversion from text format over to .wasm.
WebAssembly.Table.prototype.set() - JavaScript
we then print out the table length and contents of the two indexes (retrieved via table.prototype.get()) to show that the length is two, and the indexes currently contain no function references (they currently return null).
WebAssembly.Table - JavaScript
note: tables can currently only store function references, but this will likely be expanded in the future.
Pipeline operator (|>) - JavaScript
the experimental pipeline operator |> (currently at stage 1) pipes the value of an expression into a function.
class expression - JavaScript
const foo = class { constructor() {} bar() { return 'hello world!'; } }; const instance = new foo(); instance.bar(); // "hello world!" foo.name; // "foo" named class expressions if you want to refer to the current class inside the class body, you can create a named class expression.
Function expression - JavaScript
nothoisted(); // typeerror: nothoisted is not a function var nothoisted = function() { console.log('bar'); }; named function expression if you want to refer to the current function inside the function body, you need to create a named function expression.
typeof - JavaScript
typeof undeclaredvariable === 'undefined'; typeof newletvariable; // referenceerror typeof newconstvariable; // referenceerror typeof newclass; // referenceerror let newletvariable; const newconstvariable = 'hello'; class newclass{}; exceptions all current browsers expose a non-standard host object document.all with type undefined.
export - JavaScript
this can be achieved with the "export from" syntax: export { default as function1, function2 } from 'bar.js'; which is comparable to a combination of import and export: import { default as function1, function2 } from 'bar.js'; export { function1, function2 }; but where function1 and function2 do not become available inside the current module.
function* - JavaScript
y.from(someobj)); // [ 'a', 'b' ] generators are not constructable function* f() {} var obj = new f; // throws "typeerror: f is not a constructor generator defined in an expression const foo = function* () { yield 10; yield 20; }; const bar = foo(); console.log(bar.next()); // {value: 10, done: false} generator example function* powers(n){ //endless loop to generate for(let current =n;; current *= n){ yield current; } } for(let power of powers(2)){ //controlling generator if(power > 32) break; console.log(power) //2 //4 //8 //16 //32 } specifications specification ecmascript (ecma-262)the definition of 'function*' in that specification.
throw - JavaScript
execution of the current function will stop (the statements after throw won't be executed), and control will be passed to the first catch block in the call stack.
var - JavaScript
the scope of a variable declared with var is its current execution context and closures thereof, which is either the enclosing function and functions declared within it, or, for variables declared outside any function, global.
JavaScript
this documentation refers to the latest draft version, which is currently ecmascript 2020.
scope - Web app manifests
examples if the scope is relative, the manifest url is used as a base url: "scope": "/app/" the following scope limits navigation to the current site: "scope": "https://example.com/" finally, the following example limits navigation to a subdirectory of the current site: "scope": "https://example.com/subdirectory/" specification specification status comment feedback web app manifestthe definition of 'scope' in that specification.
Web app manifests
note: if the manifest requires credentials to fetch - the crossorigin attribute must be set to use-credentials, even if the manifest file is in the same origin as the current page.
<maction> - MathML
recommendation current specification mathml 2.0the definition of 'maction' in that specification.
<menclose> - MathML
recommendation current specification mathml 2.0the definition of 'menclose' in that specification.
<merror> - MathML
WebMathMLElementmerror
recommendation current specification mathml 2.0the definition of 'merror' in that specification.
<mfrac> - MathML
WebMathMLElementmfrac
recommendation current specification mathml 2.0the definition of 'mfrac' in that specification.
<mi> - MathML
WebMathMLElementmi
recommendation current specification mathml 2.0the definition of 'mi' in that specification.
<mlabeledtr> - MathML
recommendation current specification mathml 2.0the definition of 'mlabeledtr' in that specification.
<mmultiscripts> - MathML
recommendation current specification mathml 2.0the definition of 'mmultiscripts' in that specification.
<mn> - MathML
WebMathMLElementmn
recommendation current specification mathml 2.0the definition of 'mn' in that specification.
<mo> - MathML
WebMathMLElementmo
recommendation current specification mathml 2.0the definition of 'mo' in that specification.
<mover> - MathML
WebMathMLElementmover
recommendation current specification mathml 2.0the definition of 'mover' in that specification.
<mpadded> - MathML
recommendation current specification mathml 2.0the definition of 'mpadded' in that specification.
<mphantom> - MathML
recommendation current specification mathml 2.0the definition of 'mphantom' in that specification.
<mroot> - MathML
WebMathMLElementmroot
recommendation current specification mathml 2.0the definition of 'mroot' in that specification.
<mrow> - MathML
WebMathMLElementmrow
recommendation current specification mathml 2.0the definition of 'mrow' in that specification.
<ms> - MathML
WebMathMLElementms
recommendation current specification mathml 2.0the definition of 'ms' in that specification.
<mspace> - MathML
WebMathMLElementmspace
recommendation current specification mathml 2.0the definition of 'mspace' in that specification.
<msqrt> - MathML
WebMathMLElementmsqrt
recommendation current specification mathml 2.0the definition of 'msqrt' in that specification.
<msub> - MathML
WebMathMLElementmsub
recommendation current specification mathml 2.0the definition of 'msub' in that specification.
<msubsup> - MathML
recommendation current specification mathml 2.0the definition of 'msubsup' in that specification.
<msup> - MathML
WebMathMLElementmsup
recommendation current specification mathml 2.0the definition of 'msup' in that specification.
<mtable> - MathML
WebMathMLElementmtable
recommendation current specification mathml 2.0the definition of 'mtable' in that specification.
<mtd> - MathML
WebMathMLElementmtd
recommendation current specification mathml 2.0the definition of 'mtd' in that specification.
<mtext> - MathML
WebMathMLElementmtext
recommendation current specification mathml 2.0the definition of 'mtext' in that specification.
<mtr> - MathML
WebMathMLElementmtr
recommendation current specification mathml 2.0the definition of 'mtr' in that specification.
<munder> - MathML
WebMathMLElementmunder
recommendation current specification mathml 2.0the definition of 'munder' in that specification.
<munderover> - MathML
recommendation current specification mathml 2.0the definition of 'munderover' in that specification.
<semantics> - MathML
recommendation current specification mathml 2.0the definition of 'combining presentation and content markup ' in that specification.
Image file type and format guide - Web media technologies
licensing — jpeg (joint photographic experts group image) the jpeg (typically pronounced "jay-peg") image format is currently the most widely used lossy compression format for still images.
Populating the page: how browsers work - Web Performance
building the cssom is very, very fast and is not displayed in a unique color in current developer tools.
Lazy loading - Web Performance
polyfill include this polyfill to provide support for older and currently incompatible browsers: loading-attribute-polyfill intersection observer api intersection observers allow the user to know when an observed element enters or exits the browser’s viewport.
Optimizing startup performance - Web Performance
a desktop application doesn't need to be written in an asynchronous fashion because usually the operating system handles that for you, or the app is the only thing that matters which is currently running, depending on the operating environment.
Privacy, permissions, and information security
attacks by letting sites tell clients that they can only use https to communicate with the server http/2 while http/2 technically does not have to use encryption, most browser developers are only supporting it when used with https, so it can be thought of in that regard as being security-related permissions api provides a way to determine the status of permissions for the current browser context transport layer security (tls); formerly known as secure sockets layer (ssl) tls provides security and privacy by encrypting data during transport over the network.
Add to Home screen - Progressive web apps (PWAs)
the most relevant one to a2hs is the splash screen displayed when the app icon on the home screen is tapped and it first starts to load (this currently appears only when apps have been added to the home screen by chrome).
Introduction to progressive web apps - Progressive web apps (PWAs)
currently, safari has limited support for web app manifest and add to home screen and no support for web push notifications.
Media - Progressive web apps (PWAs)
there are five special selectors: selector selects e:hover any e element that has the pointer over it e:focus any e element that has keyboard focus e:active the e element that is involved in the current user action e:link any e element that is a hyperlink to a url that the user has not visited recently e:visited any e element that is a hyperlink to a url that the user has visited recently note: the information that can be obtained from the :visited selector is restricted in gecko 2.0.
Mobile first - Progressive web apps (PWAs)
if(!modernizr.mq('only all')) { require('respond'); } editorial note: this currently doesn't work, and i'm not sure why.
Web API reference - Web technology reference
WebReferenceAPI
document object model the dom is an api that allows access to and modification of the current document.
clip - SVG: Scalable Vector Graphics
WebSVGAttributeclip
unitless values, which indicate current user coordinates, are permitted on the coordinate values on the rect().
dominant-baseline - SVG: Scalable Vector Graphics
this re-scales the baseline-table for the current font-size.
filterUnits - SVG: Scalable Vector Graphics
only one element is using this attribute: <filter> usage notes value userspaceonuse | objectboundingbox default value objectboundingbox animatable yes userspaceonuse x, y, width and height represent values in the current coordinate system that results from taking the current user coordinate system in place at the time when the <filter> element is referenced (i.e., the user coordinate system for the element referencing the <filter> element via a filter attribute).
flood-color - SVG: Scalable Vector Graphics
the flood-color attribute indicates what color to use to flood the current filter primitive subregion.
path - SVG: Scalable Vector Graphics
WebSVGAttributepath
the effect of a motion path animation is a translation along the x- and y-axes of the current user coordinate system by the x and y values computed over time.
patternContentUnits - SVG: Scalable Vector Graphics
only one element is using this attribute: <pattern> html,body,svg { height:100% } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <!-- a pattern tile that content coordinates and values are computed against the current coordinate user space.
patternTransform - SVG: Scalable Vector Graphics
however, the current state of implementation isn't very good.
patternUnits - SVG: Scalable Vector Graphics
only one element is using this attribute: <pattern> html,body,svg { height:100% } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <!-- all geometry properties are relative to the current user space --> <pattern id="p1" x="12.5" y="12.5" width="25" height="25" patternunits="userspaceonuse"> <circle cx="10" cy="10" r="10" /> </pattern> <!-- all geometry properties are relative to the target bounding box --> <pattern id="p2" x=".125" y=".125" width=".25" height=".25" patternunits="objectboundingbox"> <circle cx="10" cy="10" r="10" /> </pattern> <!-- left square with user space tiles --> <rect x="10" y="10" w...
primitiveUnits - SVG: Scalable Vector Graphics
only one element is using this attribute: <filter> usage notes value userspaceonuse | objectboundingbox default value userspaceonuse animatable yes userspaceonuse this value indicates that any length values within the filter definitions represent values in the current user coordinate system in place at the time when the <filter> element is referenced (i.e., the user coordinate system for the element referencing the <filter> element via a filter attribute).
requiredExtensions - SVG: Scalable Vector Graphics
if all of the given extensions are supported, then the attribute evaluates to true; otherwise, the current element and its children are skipped and thus will not be rendered.
requiredFeatures - SVG: Scalable Vector Graphics
it determines whether or not all of the named features are supported by the browser; if all of them are supported, the attribute evaluates to true end the element is rendered; otherwise, the attribute evaluates to false and the current element and its children are skipped and thus will not be rendered.
stitchTiles - SVG: Scalable Vector Graphics
stitch this value indicates that the user agent will automatically adjust the x and y values of the base frequency such that the <feturbulence> node’s width and height (i.e., the width and height of the current subregion) contain an integral number of the tile width and height for the first octave.
stop-color - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following element: <stop> usage notes value currentcolor | <color> <icccolor> default value black animatable yes currentcolor this keyword denotes the current fill color and can be specified in the same manner as within a <paint> specification for the fill and stroke attributes.
stroke-dashoffset - SVG: Scalable Vector Graphics
he offset of the dash array for each line --> <path d="m0,5 h-3 m0,7 h3 m0,9 h-1" stroke="rgba(255,0,0,.5)" /> </svg> usage notes value <percentage> | <length> default value 0 animatable yes the offset is usually expressed in user units resolved against the pathlength but if a <percentage> is used, the value is resolved as a percentage of the current viewport.
transform - SVG: Scalable Vector Graphics
if optional parameters x and y are not supplied, the rotation is about the origin of the current user coordinate system.
vector-effect - SVG: Scalable Vector Graphics
normally stroking involves calculating stroke outline of the shapeʼs path in current user coordinate system and filling that outline with the stroke paint (color or gradient).
version - SVG: Scalable Vector Graphics
WebSVGAttributeversion
while it is specified to accept any number, the only two valid choices are currently 1.0 and 1.1.
visibility - SVG: Scalable Vector Graphics
with a value of hidden or collapse the current graphics element is invisible.
<a> - SVG: Scalable Vector Graphics
WebSVGElementa
ter-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes most notably: xlink:title aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<circle> - SVG: Scalable Vector Graphics
WebSVGElementcircle
acity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<ellipse> - SVG: Scalable Vector Graphics
WebSVGElementellipse
acity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<feMerge> - SVG: Scalable Vector Graphics
WebSVGElementfeMerge
the <femerge> svg element allows filter effects to be applied concurrently instead of sequentially.
<font-face-uri> - SVG: Scalable Vector Graphics
the <font-face-uri> svg element points to a remote definition of the current font.
<foreignObject> - SVG: Scalable Vector Graphics
acity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<g> - SVG: Scalable Vector Graphics
WebSVGElementg
acity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<line> - SVG: Scalable Vector Graphics
WebSVGElementline
acity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<mask> - SVG: Scalable Vector Graphics
WebSVGElementmask
the <mask> element defines an alpha mask for compositing the current object into the background.
<path> - SVG: Scalable Vector Graphics
WebSVGElementpath
acity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<polygon> - SVG: Scalable Vector Graphics
WebSVGElementpolygon
acity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<polyline> - SVG: Scalable Vector Graphics
WebSVGElementpolyline
acity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<rect> - SVG: Scalable Vector Graphics
WebSVGElementrect
acity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<solidcolor> - SVG: Scalable Vector Graphics
--> <solidcolor id="mycolor" solid-color="gold" solid-opacity="0.8"/> <!-- lineargradient with a single color stop is a less elegant way to achieve the same effect, but it works in current browsers.
<stop> - SVG: Scalable Vector Graphics
WebSVGElementstop
value type: currentcolor|<color>|<icccolor>; default value: black; animatable: yes stop-opacity this attribute defines the opacity of the gradient stop.
<text> - SVG: Scalable Vector Graphics
WebSVGElementtext
ule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<textPath> - SVG: Scalable Vector Graphics
WebSVGElementtextPath
acity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
<tspan> - SVG: Scalable Vector Graphics
WebSVGElementtspan
ule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria...
Example - SVG: Scalable Vector Graphics
</p> <p> this is done completely in w3c standards–xhtml, svg and javascript–no flash or any vendor specific extensions. currently, this will work in mozilla firefox version 1.5 and above.
Positions - SVG: Scalable Vector Graphics
the current mapping (for a single element or the whole image) of user units to screen units is called user coordinate system.
SVG fonts - SVG: Scalable Vector Graphics
svg fonts are currently supported only in safari and android browser.
Certificate Transparency - Web security
firefox does not currently check or require the use of ct logs for sites that users visit.
Referer header: privacy and security concerns - Web security
the referrer problem the referer (sic) header contains the address of the previous web page from which a link to the currently requested page was followed, which has lots of fairly innocent uses including analytics, logging, or optimized caching.
Features restricted to secure contexts - Web security
current features available only in secure contexts this section lists all the apis available only in secure contexts, along with browser versions the limitation was introduced in, as appropriate.
Subresource Integrity - Web security
an integrity value begins with at least one string, with each string including a prefix indicating a particular hash algorithm (currently the allowed prefixes are sha256, sha384, and sha512), followed by a dash, and ending with the actual base64-encoded hash.
Transport Layer Security - Web security
the current version of tls is 1.3 (rfc 8446).
HTML Imports - Web Components
firefox will not ship html imports in its current form.
document - XPath
since the uri is relative to the xsl document, document("") would return the root node of the current document.
lang - XPath
WebXPathFunctionslang
if the current node does not have an xml:lang attribute, then the value of the xml:lang attribute of the nearest ancestor that has an xml:lang attribute will determine the current node's language.
local-name - XPath
if this argument is omitted, the current context node will be used.
name - XPath
WebXPathFunctionsname
if this argument is omitted, the current context node will be used.
namespace-uri - XPath
if this argument is omitted, the current context node will be used.
number - XPath
if this argument is omitted, the current context node will be used.
Functions - XPath
boolean() ceiling() choose() concat() contains() count() current() xslt-specific document() xslt-specific element-available() false() floor() format-number() xslt-specific function-available() generate-id() xslt-specific id() (partially supported) key() xslt-specific lang() last() local-name() name() namespace-uri() normalize-space() not() number() position() round() starts-with() string() string-length() substring() substring-after() ...
Index - XPath
WebXPathIndex
24 current xslt, xslt_reference the current function can be used to get the context node in an xslt instruction.
Common XSLT Errors - XSLT: Extensible Stylesheet Language Transformations
to find out the current type, load the file in mozilla and look at the page info.
<xsl:apply-templates> - XSLT: Extensible Stylesheet Language Transformations
if this attribute is not set, all child nodes of the current node are selected.
<xsl:for-each> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementfor-each
it is often used to iterate through a set of nodes or to change the current node.
Resources - XSLT: Extensible Stylesheet Language Transformations
xsl results firefox extension (presently awaiting review) - allows one to experiment with xsl, by applying xsl stylesheets (which are manually entered, found via a url or on the file-system) to an xml document (the currently-loaded document or a manually entered/pasted one).
The Netscape XSLT/XPath Reference - XSLT: Extensible Stylesheet Language Transformations
) xsl:variable (supported) xsl:when (supported) xsl:with-param (supported) axes ancestor ancestor-or-self attribute child descendant descendant-or-self following following-sibling namespace (not supported) parent preceding preceding-sibling self functions boolean() (supported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-number() (supported) function-available() (supported) generate-id() (supported) id() (partially supported) key() (supported) lang() (supported) last() (supported) local-name() (supported) name() (supported) namespace-uri() (supported) normalize-space() ...
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
ported) xsl:variable (supported) xsl:when (supported) xsl:with-param (supported) axes ancestor ancestor-or-self attribute child descendant descendant-or-self following following-sibling namespace (not supported) parent preceding preceding-sibling self functions boolean() (supported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-number() (supported) function-available() (supported) generate-id() (supported) id() (partially supported) key() (supported) lang() (supported) last() (supported) local-name() (supported) name() (supported) namespace-uri() (supported) normalize-space() (supported) no...
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
transforming html unfortunately it is currently not supported to transform html nodes using xslt.
JavaScript/XSLT Bindings - XSLT: Extensible Stylesheet Language Transformations
if the generated fragment will be inserted into the current html document, passing in document is enough.
WebAssembly Concepts - WebAssembly
by itself, webassembly cannot currently directly access the dom; it can only call javascript, passing in integer and floating point primitive data types.
Exported WebAssembly functions - WebAssembly
if you try to call a exported wasm function that takes or returns an i64 type value, it currently throws an error because javascript currently has no precise way to represent an i64.
Compiling an Existing C Module to WebAssembly - WebAssembly
now you only need some html and javascript to load your new module: <script src="./a.out.js"></script> <script> module.onruntimeinitialized = async _ => { const api = { version: module.cwrap('version', 'number', []), }; console.log(api.version()); }; </script> and you will see the correct version number in the output: note: libwebp returns the current version a.b.c as a hexadecimal number 0xabc.