Search completed in 0.94 seconds.
2047 results for "length":
Your results are loading. Please wait...
ByteLengthQueuingStrategy.ByteLengthQueuingStrategy() - Web APIs
the bytelengthqueuingstrategy() constructor creates and returns a bytelengthqueuingstrategy object instance.
... the bytelengthqueuingstrategy() constructor creates and returns a bytelengthqueuingstrategy object instance.
... the bytelengthqueuingstrategy() constructor creates and returns a bytelengthqueuingstrategy object instance.
...And 3 more matches
<length> - CSS: Cascading Style Sheets
Web › CSS › length
the <length> css data type represents a distance value.
... the <length> css data type represents a distance value.
... the <length> css data type represents a distance value.
...And 29 more matches
Array.prototype.length - JavaScript
the length property of an object which is an instance of type array sets or returns the number of elements in that array.
...r of elements in that array.
... to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...And 26 more matches
pathLength - SVG: Scalable Vector Graphics
the pathlength attribute lets authors specify a total length for the path, in user units.
... the pathlength attribute lets authors specify a total length for the path, in user units.
... the pathlength attribute lets authors specify a total length for the path, in user units.
...And 25 more matches
SVGLength - Web APIs
Web › API › SVGLength
svg length interface the svglength interface correspond to the <length> basic data type.
... svg length interface the svglength interface correspond to the <length> basic data type.
...implement none methods void newvaluespecifiedunits(in unsigned short unittype, in float valueinspecifiedunits) void converttospecifiedunits(in unsigned short unittype) properties readonly unsigned short unittype float value float valueinspecifiedunits domstring valueasstring constants svg_lengthtype_unknown = 0 svg_lengthtype_number = 1 svg_lengthtype_percentage = 2 svg_lengthtype_ems = 3 svg_lengthtype_exs = 4 svg_lengthtype_px = 5 svg_lengthtype_cm = 6 svg_lengthtype_mm = 7 svg_lengthtype_in = 8 svg_lengthtype_pt = 9 svg_lengthtype_pc = 10 normative document svg 1.1 (2nd edition) example <svg height="200" on...
...And 22 more matches
textLength - SVG: Scalable Vector Graphics
the textlength attribute, available on svg <text> and <tspan> elements, lets you specify the width of the space into which the text will draw.
... the textlength attribute, available on svg <text> and <tspan> elements, lets you specify the width of the space into which the text will draw.
...th attribute, available on svg <text> and <tspan> elements, lets you specify the width of the space into which the text will draw.
...And 21 more matches
SVGLengthList - Web APIs
svg length list interface the svglengthlist defines a list of svglength objects.
... svg length list interface the svglengthlist defines a list of svglength objects.
... svg length list interface the svglengthlist defines a list of svglength objects.
...And 19 more matches
JS_HasArrayLength
obsolete since jsapi 8this feature is obsolete.
... obsolete since jsapi 8this feature is obsolete.
... obsolete since jsapi 8this feature is obsolete.
...And 17 more matches
RangeError: invalid array length - JavaScript
the javascript exception "invalid array length" occurs when creating an array or an arraybuffer which has a length which is either negative or larger or equal to 232, or when setting the array.length property to a value which is either negative or larger or equal to 232.
... the javascript exception "invalid array length" occurs when creating an array or an arraybuffer which has a length which is either negative or larger or equal to 232, or when setting the array.length property to a value which is either negative or larger or equal to 232.
... the javascript exception "invalid array length" occurs when creating an array or an arraybuffer which has a length which is either negative or larger or equal to 232, or when setting the array.length property to a value which is either negative or larger or equal to 232.
...And 17 more matches
JS_SetArrayLength
set the length property of an object.
... set the length property of an object.
... set the length property of an object.
...And 15 more matches
String length - JavaScript
the length property of a string object contains the length of the string, in utf-16 code units.
... the length property of a string object contains the length of the string, in utf-16 code units.
...of the string, in utf-16 code units.
...And 15 more matches
JS_GetLatin1StringCharsAndLength
this article covers features introduced in spidermonkey 38 get the chars and the length of a string.
... this article covers features introduced in spidermonkey 38 get the chars and the length of a string.
... this article covers features introduced in spidermonkey 38 get the chars and the length of a string.
...And 13 more matches
JS_GetArrayLength
retrieve the number of elements in an array object.
... retrieve the number of elements in an array object.
... retrieve the number of elements in an array object.
...And 12 more matches
Function.length - JavaScript
the length property indicates the number of parameters expected by the function.
... the length property indicates the number of parameters expected by the function.
...is interactive example is stored in a github repository.
...And 11 more matches
HTML attribute: maxlength - HTML: Hypertext Markup Language
the maxlength attribute defines the maximum number of characters (as utf-16 code units) the user can enter into an <input> or <textarea>.
... the maxlength attribute defines the maximum number of characters (as utf-16 code units) the user can enter into an <input> or <textarea>.
... the maxlength attribute defines the maximum number of characters (as utf-16 code units) the user can enter into an <input> or <textarea>.
...And 10 more matches
kernelUnitLength - SVG: Scalable Vector Graphics
the kernelunitlength attribute has two meanings based on the context it's used in.
...context it's used in.
... 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.
...And 10 more matches
HTML attribute: minlength - HTML: Hypertext Markup Language
the minlength attribute defines the minimum number of characters (as utf-16 code units) the user can enter into an <input> or <textarea>.
... the minlength attribute defines the minimum number of characters (as utf-16 code units) the user can enter into an <input> or <textarea>.
... the minlength attribute defines the minimum number of characters (as utf-16 code units) the user can enter into an <input> or <textarea>.
...And 9 more matches
<length-percentage> - CSS: Cascading Style Sheets
the <length-percentage> css data type represents a value that can be either a <length> or a <percentage>.
... the <length-percentage> css data type represents a value that can be either a <length> or a <percentage>.
... the <length-percentage> css data type represents a value that can be either a <length> or a <percentage>.
...And 8 more matches
lengthAdjust - SVG: Scalable Vector Graphics
the lengthadjust attribute controls how the text is stretched into the length defined by the textlength attribute.
... the lengthadjust attribute controls how the text is stretched into the length defined by the textlength attribute.
... the lengthadjust attribute controls how the text is stretched into the length defined by the textlength attribute.
...And 8 more matches
JS_GetStringCharsAndLength
obsolete since jsapi 33this feature is obsolete.
... obsolete since jsapi 33this feature is obsolete.
... obsolete since jsapi 33this feature is obsolete.
...And 7 more matches
DataView.prototype.byteLength - JavaScript
the bytelength accessor property represents the length (in bytes) of this view from the start of its arraybuffer or sharedarraybuffer.
... the bytelength accessor property represents the length (in bytes) of this view from the start of its arraybuffer or sharedarraybuffer.
...e interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...And 7 more matches
TypedArray.prototype.byteLength - JavaScript
the bytelength accessor property represents the length (in bytes) of a typed array.
... the bytelength accessor property represents the length (in bytes) of a typed array.
...nteractive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...And 7 more matches
TypedArray.prototype.length - JavaScript
the length accessor property represents the length (in elements) of a typed array.
... the length accessor property represents the length (in elements) of a typed array.
...he interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...And 7 more matches
ByteLengthQueuingStrategy - Web APIs
the bytelengthqueuingstrategy interface of the the streams api provides a built-in byte length queuing strategy that can be used when constructing streams.
... the bytelengthqueuingstrategy interface of the the streams api provides a built-in byte length queuing strategy that can be used when constructing streams.
... the bytelengthqueuingstrategy interface of the the streams api provides a built-in byte length queuing strategy that can be used when constructing streams.
...And 6 more matches
SVGAnimatedLengthList - Web APIs
svg animated length list interface the svganimatedlengthlist interface is used for attributes of type svglengthlist which can be animated.
... svg animated length list interface the svganimatedlengthlist interface is used for attributes of type svglengthlist which can be animated.
... svg animated length list interface the svganimatedlengthlist interface is used for attributes of type svglengthlist which can be animated.
...And 6 more matches
DOMTokenList.length - Web APIs
the length read-only property of the domtokenlist interface is an integer representing the number of objects stored in the object.
... the length read-only property of the domtokenlist interface is an integer representing the number of objects stored in the object.
... the length read-only property of the domtokenlist interface is an integer representing the number of objects stored in the object.
...And 5 more matches
JS_GetStringEncodingLength
this article covers features introduced in spidermonkey 1.8.5 get the length of a javascript string in bytes.
... this article covers features introduced in spidermonkey 1.8.5 get the length of a javascript string in bytes.
...y 1.8.5 get the length of a javascript string in bytes.
...And 4 more matches
JS_GetStringLength
return the length, in 16-bit code units, of a javascript string.
... return the length, in 16-bit code units, of a javascript string.
... return the length, in 16-bit code units, of a javascript string.
...And 4 more matches
DataTransferItemList.length - Web APIs
the read-only length property of the datatransferitemlist interface returns the number of items currently in the drag item list.
... the read-only length property of the datatransferitemlist interface returns the number of items currently in the drag item list.
... the read-only length property of the datatransferitemlist interface returns the number of items currently in the drag item list.
...And 4 more matches
SVGAnimatedLength - Web APIs
svg animated length interface the svganimatedlength interface is used for attributes of basic type <length> which can be animated.
... svg animated length interface the svganimatedlength interface is used for attributes of basic type <length> which can be animated.
... svg animated length interface the svganimatedlength interface is used for attributes of basic type <length> which can be animated.
...And 4 more matches
arguments.length - JavaScript
the arguments.length property contains the number of arguments passed to the function.
... the arguments.length property contains the number of arguments passed to the function.
... the arguments.length property contains the number of arguments passed to the function.
...And 4 more matches
WebAssembly.Table.prototype.length - JavaScript
the length prototype property of the webassembly.table object returns the length of the table, i.e.
... the length prototype property of the webassembly.table object returns the length of the table, i.e.
... the length prototype property of the webassembly.table object returns the length of the table, i.e.
...And 4 more matches
JS::GetDeflatedUTF8StringLength
this article covers features introduced in spidermonkey 38 returns the length of the char buffer required to encode given string as utf8.
... this article covers features introduced in spidermonkey 38 returns the length of the char buffer required to encode given string as utf8.
... this article covers features introduced in spidermonkey 38 returns the length of the char buffer required to encode given string as utf8.
...And 3 more matches
JS_IdArrayLength
this article covers features introduced in spidermonkey 17 get the length of a jsidarray.
... this article covers features introduced in spidermonkey 17 get the length of a jsidarray.
... this article covers features introduced in spidermonkey 17 get the length of a jsidarray.
...And 3 more matches
CSSUnparsedValue.length - Web APIs
the length read-only property of the cssunparsedvalue interface returns the number of items in the object.
... the length read-only property of the cssunparsedvalue interface returns the number of items in the object.
... the length read-only property of the cssunparsedvalue interface returns the number of items in the object.
...And 3 more matches
NodeList.length - Web APIs
Web › API › NodeList › length
the nodelist.length property returns the number of items in a nodelist.
... the nodelist.length property returns the number of items in a nodelist.
... the nodelist.length property returns the number of items in a nodelist.
...And 3 more matches
TimeRanges.length - Web APIs
Web › API › TimeRanges › length
the timeranges.length read-only property returns the number of ranges in the object.
... the timeranges.length read-only property returns the number of ranges in the object.
... the timeranges.length read-only property returns the number of ranges in the object.
...And 3 more matches
XPathResult.snapshotLength - Web APIs
the read-only snapshotlength property of the xpathresult interface represents the number of nodes in the result snapshot.
... the read-only snapshotlength property of the xpathresult interface represents the number of nodes in the result snapshot.
... the read-only snapshotlength property of the xpathresult interface represents the number of nodes in the result snapshot.
...And 3 more matches
XRInputSourceArray.length - Web APIs
the read-only length property returns an integer value indicating the number of items in the input source list represented by the xrinputsourcearray object.
... the read-only length property returns an integer value indicating the number of items in the input source list represented by the xrinputsourcearray object.
... returns an integer value indicating the number of items in the input source list represented by the xrinputsourcearray object.
...And 3 more matches
Content-Length - HTTP
the content-length entity header indicates the size of the entity-body, in bytes, sent to the recipient.
... the content-length entity header indicates the size of the entity-body, in bytes, sent to the recipient.
... the content-length entity header indicates the size of the entity-body, in bytes, sent to the recipient.
...And 3 more matches
AudioTrackList.length - Web APIs
the read-only audiotracklist property length returns the number of entries in the audiotracklist, each of which is an audiotrack representing one audio track in the media element.
... the read-only audiotracklist property length returns the number of entries in the audiotracklist, each of which is an audiotrack representing one audio track in the media element.
... included in the audiotracklist.
...And 2 more matches
CSSValueList.length - Web APIs
the length read-only property of the cssvaluelist interface represents the number of cssvalues in the list.
... the length read-only property of the cssvaluelist interface represents the number of cssvalues in the list.
... the length read-only property of the cssvaluelist interface represents the number of cssvalues in the list.
...And 2 more matches
HTMLFormElement.length - Web APIs
the htmlformelement.length read-only property returns the number of controls in the <form> element.
...the htmlformelement.length read-only property returns the number of controls in the <form> element.
...nts and htmlformelement.length are the following: <button> <fieldset> <input> (with the exception that any whose type is "image" are omitted for historical reasons) <object> <output> <select> <textarea> no other elements are included in the list returned by elements, which makes it an excellent way to get at the elements most important when processing forms.
...And 2 more matches
History.length - Web APIs
Web › API › History › length
the history.length read-only property returns an integer representing the number of elements in the session history, including the currently loaded page.
... the history.length read-only property returns an integer representing the number of elements in the session history, including the currently loaded page.
... the history.length read-only property returns an integer representing the number of elements in the session history, including the currently loaded page.
...And 2 more matches
SpeechGrammarList.length - Web APIs
the length read-only property of the speechgrammarlist interface returns the number of speechgrammar objects contained in the speechgrammarlist.
... the length read-only property of the speechgrammarlist interface returns the number of speechgrammar objects contained in the speechgrammarlist.
... the length read-only property of the speechgrammarlist interface returns the number of speechgrammar objects contained in the speechgrammarlist.
...And 2 more matches
SpeechRecognitionResult.length - Web APIs
the length read-only property of the speechrecognitionresult interface returns the length of the "array" — the number of speechrecognitionalternative objects contained in the result (also referred to as "n-best alternatives".) the number of alternatives contained in the result depends on what the speechrecognition.maxalternatives property was set to when the speech recognition was first initiated.
...y property of the speechrecognitionresult interface returns the length of the "array" — the number of speechrecognitionalternative objects contained in the result (also referred to as "n-best alternatives".) the number of alternatives contained in the result depends on what the speechrecognition.maxalternatives property was set to when the speech recognition was first initiated.
... interface returns the length of the "array" — the number of speechrecognitionalternative objects contained in the result (also referred to as "n-best alternatives".) the number of alternatives contained in the result depends on what the speechrecognition.maxalternatives property was set to when the speech recognition was first initiated.
...And 2 more matches
SpeechRecognitionResultList.length - Web APIs
the length read-only property of the speechrecognitionresultlist interface returns the length of the "array" — the number of speechrecognitionresult objects in the list.
... the length read-only property of the speechrecognitionresultlist interface returns the length of the "array" — the number of speechrecognitionresult objects in the list.
... the length read-only property of the speechrecognitionresultlist interface returns the length of the "array" — the number of speechrecognitionresult objects in the list.
...And 2 more matches
Storage.length - Web APIs
Web › API › Storage › length
the length read-only property of the storage interface returns the number of data items stored in a given storage object.
... the length read-only property of the storage interface returns the number of data items stored in a given storage object.
... the length read-only property of the storage interface returns the number of data items stored in a given storage object.
...And 2 more matches
411 Length Required - HTTP
Web › HTTP › Status › 411
the hypertext transfer protocol (http) 411 length required client error response code indicates that the server refuses to accept the request without a defined content-length header.
... the hypertext transfer protocol (http) 411 length required client error response code indicates that the server refuses to accept the request without a defined content-length header.
... the hypertext transfer protocol (http) 411 length required client error response code indicates that the server refuses to accept the request without a defined content-length header.
...And 2 more matches
ArrayBuffer.prototype.byteLength - JavaScript
the bytelength accessor property represents the length of an arraybuffer in bytes.
... the bytelength accessor property represents the length of an arraybuffer in bytes.
...t, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...And 2 more matches
SharedArrayBuffer.prototype.byteLength - JavaScript
the bytelength accessor property represents the length of an sharedarraybuffer in bytes.
... the bytelength accessor property represents the length of an sharedarraybuffer in bytes.
...'d like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...And 2 more matches
ByteLengthQueuingStrategy.size() - Web APIs
the size() method of the bytelengthqueuingstrategy interface returns the given chunk’s bytelength property.
... the size() method of the bytelengthqueuingstrategy interface returns the given chunk’s bytelength property.
... the size() method of the bytelengthqueuingstrategy interface returns the given chunk’s bytelength property.
... the size() method of the bytelengthqueuingstrategy interface returns the given chunk’s bytelength property.
OfflineAudioContext.length - Web APIs
the length property of the offlineaudiocontext interface returns an integer representing the size of the buffer in sample-frames.
... the length property of the offlineaudiocontext interface returns an integer representing the size of the buffer in sample-frames.
... the length property of the offlineaudiocontext interface returns an integer representing the size of the buffer in sample-frames.
... the length property of the offlineaudiocontext interface returns an integer representing the size of the buffer in sample-frames.
SVGGeometryElement.getTotalLength() - Web APIs
the svggeometryelement.gettotallength() method returns the user agent's computed value for the total length of the path in user units.
... the svggeometryelement.gettotallength() method returns the user agent's computed value for the total length of the path in user units.
... the svggeometryelement.gettotallength() method returns the user agent's computed value for the total length of the path in user units.
...iginally part of the svgpathelement interface.
SVGGeometryElement.pathLength - Web APIs
the svggeometryelement.pathlength property reflects the pathlength attribute and returns the total length of the path, in user units.
... the svggeometryelement.pathlength property reflects the pathlength attribute and returns the total length of the path, in user units.
... the svggeometryelement.pathlength property reflects the pathlength attribute and returns the total length of the path, in user units.
...rns the total length of the path, in user units.
SVGPathElement.getTotalLength() - Web APIs
the svgpathelement.gettotallength() method returns the user agent's computed value for the total length of the path in user units.
... the svgpathelement.gettotallength() method returns the user agent's computed value for the total length of the path in user units.
... the svgpathelement.gettotallength() method returns the user agent's computed value for the total length of the path in user units.
... in svg 2 this method was moved to the svggeometryelement interface, from which the svgpathelement inherits it.
SVGPathElement.pathLength - Web APIs
the svgpathelement.pathlength property reflects the pathlength attribute and returns the total length of the path, in user units.
... the svgpathelement.pathlength property reflects the pathlength attribute and returns the total length of the path, in user units.
... the svgpathelement.pathlength property reflects the pathlength attribute and returns the total length of the path, in user units.
... attribute and returns the total length of the path, in user units.
SourceBufferList.length - Web APIs
the length read-only property of the sourcebufferlist interface returns the number of sourcebuffer objects in the list.
... the length read-only property of the sourcebufferlist interface returns the number of sourcebuffer objects in the list.
... the length read-only property of the sourcebufferlist interface returns the number of sourcebuffer objects in the list.
... the length read-only property of the sourcebufferlist interface returns the number of sourcebuffer objects in the list.
TextTrackList.length - Web APIs
the read-only texttracklist property length returns the number of entries in the texttracklist, each of which is a texttrack representing one track in the media element.
... the read-only texttracklist property length returns the number of entries in the texttracklist, each of which is a texttrack representing one track in the media element.
...are included in the texttracklist.
...eryselector("video, audio"); var numtexttracks = 0; if (mediaelem.texttracks) { numtexttracks = mediaelem.texttracks.length; } note that this sample checks to be sure htmlmediaelement.texttracks is defined, to avoid failing on browsers without support for texttrack.
TouchList.length - Web APIs
Web › API › TouchList › length
the length read-only property indicates the number of items (touch points) in a given touchlist.
... the length read-only property indicates the number of items (touch points) in a given touchlist.
... the length read-only property indicates the number of items (touch points) in a given touchlist.
...ustrates the use of the touchlist interface's item method and the length property.
VideoTrackList.length - Web APIs
the read-only videotracklist property length returns the number of entries in the videotracklist, each of which is a videotrack representing one video track in the media element.
... the read-only videotracklist property length returns the number of entries in the videotracklist, each of which is a videotrack representing one video track in the media element.
... included in the videotracklist.
...eryselector("video"); var numvideotracks = 0; if (videoelem.videotracks) { numvideotracks = videoelem.videotracks.length; } note that this sample checks to be sure htmlmediaelement.videotracks is defined, to avoid failing on browsers without support for videotrack.
Window.length - Web APIs
Web › API › Window › length
returns the number of frames (either <frame> or <iframe> elements) in the window.
... returns the number of frames (either <frame> or <iframe> elements) in the window.
... returns the number of frames (either <frame> or <iframe> elements) in the window.
... or <iframe> elements) in the window.
AudioBuffer.length - Web APIs
the length property of the audiobuffer interface returns an integer representing the length, in sample-frames, of the pcm data stored in the buffer.
... the length property of the audiobuffer interface returns an integer representing the length, in sample-frames, of the pcm data stored in the buffer.
... 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.length); } specification specification status comment web audio apithe definition of 'length' in that specification.
CSSStyleDeclaration.length - Web APIs
the read-only property returns an integer that represents the number of style declarations in this css declaration block.
... value an integer that provides the number of styles explictly set on the parent of the instance.
...ly set styles on the following html element: <div id="div1" style="margin: 0 10px; background-color: #ca1; font-family: monospace"></div> javascript code: var mydiv = document.getelementbyid('div1'); var divstyle = mydiv.style; var len = divstyle.length; // 6 specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.length' in that specification.
ProgressEvent.lengthComputable - Web APIs
the progressevent.lengthcomputable read-only property is a boolean flag indicating if the resource concerned by the progressevent has a length that can be calculated.
... the progressevent.lengthcomputable read-only property is a boolean flag indicating if the resource concerned by the progressevent has a length that can be calculated.
... the progressevent.lengthcomputable read-only property is a boolean flag indicating if the resource concerned by the progressevent has a length that can be calculated.
SVGGeometryElement.getPointAtLength() - Web APIs
the svggeometryelement.getpointatlength() method returns the point at a given distance along the path.
... the svggeometryelement.getpointatlength() method returns the point at a given distance along the path.
...ed the property to it.
SVGPathElement.getPointAtLength() - Web APIs
the svgpathelement.getpointatlength() method returns the point at a given distance along the path.
... the svgpathelement.getpointatlength() method returns the point at a given distance along the path.
...herits it.
TrackDefaultList.length - Web APIs
the length read-only property of the trackdefaultlist interface returns the number of trackdefault objects in the list.
... the length read-only property of the trackdefaultlist interface returns the number of trackdefault objects in the list.
... the length read-only property of the trackdefaultlist interface returns the number of trackdefault objects in the list.
PR_GetErrorTextLength
gets the length of the error text.
... gets the length of the error text.
Length
« xpcom api reference summary the length function returns the number of storage units in the string's internal buffer (not including the null-terminator if present).
... « xpcom api reference summary the length function returns the number of storage units in the string's internal buffer (not including the null-terminator if present).
Length
« xpcom api reference summary the length function returns the number of storage units in the string's internal buffer (not including the null-terminator if present).
... « xpcom api reference summary the length function returns the number of storage units in the string's internal buffer (not including the null-terminator if present).
string-length - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the string-length function returns a number equal to the number of characters in a given string.
... xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the string-length function returns a number equal to the number of characters in a given string.
maxlength - Archive of obsolete content
« xul reference home maxlength type: integer the maximum number of characters that the textbox allows to be entered.
maxLength - Archive of obsolete content
« xul reference maxlength type: integer the maximum number of characters that the textbox allows to be entered.
textLength - Archive of obsolete content
« xul reference textlength type: integer holds the length of the text entered in the textbox.
StringView - Archive of obsolete content
lla.org/add-ons/code_snippets/stringview |*| https://developer.mozilla.org/docs/user:fusionchess |*| https://github.com/madmurphy/stringview.js |*| |*| this framework is released under the gnu lesser general public license, version 3 or later.
...offset /* optional */, nlength /* optional */) { var ftaview, awhole, araw, fputoutptcode, fgetoutptchrsize, ninptlen, nstartidx = isfinite(noffset) ?
...pe = 15; if (sencoding) { this.encoding = sencoding.tostring(); } encswitch: switch (this.encoding) { case "utf-8": fputoutptcode = stringview.pututf8charcode; fgetoutptchrsize = stringview.getutf8charlength; ftaview = uint8array; break encswitch; case "utf-16": fputoutptcode = stringview.pututf16charcode; fgetoutptchrsize = stringview.getutf16charlength; ftaview = uint16array; break encswitch; case "utf-32": ftaview = uint32array; ntranscrtype &= 14; break encswitch; default: /* case "ascii", or case "binarystring" or unknown cases */ ftaview = uint8array; ntranscrtype &= 14; } typeswitch: switch (typeof vinput) { case "string": /* the input argument is a primitive string: a ...
...And 140 more matches
Index - Web APIs
Web › API › Index
property, reference, web audio api, duration a double.
... 108 audiobuffer.getchanneldata() api, audiobuffer, method, reference, web audio api the getchanneldata() method of the audiobuffer interface returns a float32array containing the pcm data associated with the channel, defined by the channel parameter (with 0 representing the first channel).
...uffer.getchanneldata() api, audiobuffer, method, reference, web audio api the getchanneldata() method of the audiobuffer interface returns a float32array containing the pcm data associated with the channel, defined by the channel parameter (with 0 representing the first channel).
...And 123 more matches
JavaScript Daemons Management - Archive of obsolete content
d under the gnu public license, version 3 or later.
...bal "daemon" constructor */ function daemon (oowner, ftask, nrate, nlen, finit, fonstart) { if (!(this && this instanceof daemon)) { return; } if (arguments.length < 2) { throw new typeerror("daemon - not enough arguments"); } if (oowner) { this.owner = oowner }; this.task = ftask; if (isfinite(nrate) && nrate > 0) { this.rate = math.floor(nrate); } if (nlen > 0) { this.length = math.floor(nlen); } if (fonstart) { this.onstart = fonstart; } if (finit) { this.onstop = finit; finit.call(oowner, this.index, this.length, this.backw); } } /* create the daemon.blank() constructor and the global daemon.context object */ daemon.blank = function () {}; daemon.context = daemon.blank.prototype; /* make love with the gc :-) */ daemon.blank.pro...
... () {}; daemon.context = daemon.blank.prototype; /* make love with the gc :-) */ daemon.blank.prototype = /* important!
...And 55 more matches
height - SVG: Scalable Vector Graphics
Web › SVG › Attribute › height
the height attribute defines the vertical length of an element in the user coordinate system.
...pattern>, <rect>, <svg>, and <use> html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <!-- with a height of 0 or less, nothing will be rendered --> <rect y="0" x="0" width="90" height="0"/> <rect y="0" x="100" width="90" height="60"/> <rect y="0" x="200" width="90" height="100%"/> </svg> feblend for <feblend>, height defines the vertical length for the rendering area of the primitive.
... <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <!-- with a height of 0 or less, nothing will be rendered --> <rect y="0" x="0" width="90" height="0"/> <rect y="0" x="100" width="90" height="60"/> <rect y="0" x="200" width="90" height="100%"/> </svg> feblend for <feblend>, height defines the vertical length for the rendering area of the primitive.
...And 48 more matches
width - SVG: Scalable Vector Graphics
Web › SVG › Attribute › width
the width attribute defines the horizontal length of an element in the user coordinate system.
...pattern>, <rect>, <svg>, and <use> html,body,svg { height:100% } <svg viewbox="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <!-- with a width of 0 or less, nothing will be rendered --> <rect x="0" y="0" width="0" height="90"/> <rect x="0" y="100" width="60" height="90"/> <rect x="0" y="200" width="100%" height="90"/> </svg> feblend for <feblend>, width defines the horizontal length for the rendering area of the primitive.
... <svg viewbox="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <!-- with a width of 0 or less, nothing will be rendered --> <rect x="0" y="0" width="0" height="90"/> <rect x="0" y="100" width="60" height="90"/> <rect x="0" y="200" width="100%" height="90"/> </svg> feblend for <feblend>, width defines the horizontal length for the rendering area of the primitive.
...And 48 more matches
Index
null() returns the global object for whatever function is currently running on the context.
...value jsapi reference, reference, référence(2), spidermonkey js::falsevalue creates a js::value that represents the javascript value false.
...s::value that represents the javascript value false.
...And 47 more matches
Mozilla internal string guide
ing: builds on nsastring by guaranteeing a null-terminated storage.
...very string class is compatible with nsastring.
...tring has any value.
...And 45 more matches
Indexed collections - JavaScript
emp[0] would be employee number zero, emp[1] employee number one, and so on.
...n array the following statements create equivalent arrays: let arr = new array(element0, element1, ..., elementn) let arr = array(element0, element1, ..., elementn) let arr = [element0, element1, ..., elementn] element0, element1, ..., elementn is a list of values for the array's elements.
...or the array's elements.
...And 35 more matches
JXON - Archive of obsolete content
.org/licenses/gpl-3.0-standalone.html |*| \*/ function parsetext (svalue) { if (/^\s*$/.test(svalue)) { return null; } if (/^(?:true|false)$/i.test(svalue)) { return svalue.tolowercase() === "true"; } if (isfinite(svalue)) { return parsefloat(svalue); } if (isfinite(date.parse(svalue))) { return new date(svalue); } return svalue; } function jxontree (oxmlparent) { var nattrlen = 0, nlength = 0, scollectedtxt = ""; if (oxmlparent.haschildnodes()) { for (var onode, sprop, vcontent, nitem = 0; nitem < oxmlparent.childnodes.length; nitem++) { onode = oxmlparent.childnodes.item(nitem); if ((onode.nodetype - 1 | 1) === 3) { scollectedtxt += onode.nodetype === 3 ?
...3) or "cdatasection" (4) else if (onode.nodetype === 1 && !onode.prefix) { // nodetype is "element" (1) sprop = onode.nodename.tolowercase(); vcontent = new jxontree(onode); if (this.hasownproperty(sprop)) { if (this[sprop].constructor !== array) { this[sprop] = [this[sprop]]; } this[sprop].push(vcontent); } else { this[sprop] = vcontent; nlength++; } } } this.keyvalue = parsetext(scollectedtxt); } else { this.keyvalue = null; } if (oparentnode.hasattributes && oxmlparent.hasattributes()) { var oattrib; this.keyattributes = {}; for (nattrlen; nattrlen < oxmlparent.attributes.length; nattrlen++) { oattrib = oxmlparent.attributes.item(nattrlen); this.keyattributes[oattrib.name.tolowercase()] = parse...
....keyvalue = null; } if (oparentnode.hasattributes && oxmlparent.hasattributes()) { var oattrib; this.keyattributes = {}; for (nattrlen; nattrlen < oxmlparent.attributes.length; nattrlen++) { oattrib = oxmlparent.attributes.item(nattrlen); this.keyattributes[oattrib.name.tolowercase()] = parsetext(oattrib.value.trim()); } } /* * optional properties...
...And 33 more matches
Index
assword specify the slot's password.
...password.
... -w p12filepassword specify the pkcs #12 file password.
...And 33 more matches
x - SVG: Scalable Vector Graphics
Web › SVG › Attribute › x
<svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <rect x="20" y="20" width="60" height="60" /> <rect x="120" y="20" width="60" height="60" /> <rect x="220" y="20" width="60" height="60" /> </svg> altglyph warning: as of svg2 <altglyph> is deprecated and shouldn't be used.
..." height="60" /> </svg> altglyph warning: as of svg2 <altglyph> is deprecated and shouldn't be used.
... default value none animatable yes feblend for <feblend>, x defines the minimum x coordinate for the rendering area of the primitive.
...And 31 more matches
y - SVG: Scalable Vector Graphics
Web › SVG › Attribute › y
<svg viewbox="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <rect y="20" x="20" width="60" height="60" /> <rect y="120" x="20" width="60" height="60" /> <rect y="220" x="20" width="60" height="60" /> </svg> altglyph warning: as of svg2 <altglyph> is deprecated and shouldn't be used.
..." height="60" /> </svg> altglyph warning: as of svg2 <altglyph> is deprecated and shouldn't be used.
... default value none animatable yes feblend for <feblend>, y defines the minimum y coordinate for the rendering area of the primitive.
...And 31 more matches
TextEncoder.prototype.encodeInto() - Web APIs
o(string, uint8array); parameters string is a usvstring containing the text to encode.
...encodeintoatposition(string, u8array, position) { return encoder.encodeinto(string, position ?
...position) { return encoder.encodeinto(string, position ?
...And 30 more matches
<input type="tel"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › tel
mbers.
...g a specific input type for telephone numbers also makes adding custom validation and handling of phone numbers more convenient.
...ither represents a telephone number or is an empty string ("").
...And 29 more matches
NSS Tools ssltap
f options.
... and x options in this example turn on ssl parsing and show undecoded values in hex/ascii format.
...ssl parsing and show undecoded values in hex/ascii format.
...And 28 more matches
NSS tools : ssltap
Mozilla › Projects › NSS › tools › ssltap
e to accept connections, switch on looping mode with the -l option.
...n looping mode with the -l option.
... following examples show the output from commonly used combinations of options.
...And 28 more matches
nsIDOMWindowUtils
vekeyboardlayout, in long anativekeycode, in long amodifierflags, in astring acharacters, in astring aunmodifiedcharacters); void sendnativemouseevent(in long ascreenx, in long ascreeny, in long anativemessage, in long amodifierflags, in nsidomelement aelement); nsiquerycontenteventresult sendquerycontentevent(in unsigned long atype, in unsigned long aoffset, in unsigned long alength, in long ax, in long ay); obsolete since gecko 31.0 nsiquerycontenteventresult sendquerycontentevent(in unsigned long atype, in unsigned long aoffset, in unsigned long alength, in long ax, in long ay, [optional] in unsigned long aadditionalflags); boolean sendselectionsetevent(in unsigned long aoffset, in unsigned long alength, in boolean areverse); obsolete since gecko 31.0 ...
...result sendquerycontentevent(in unsigned long atype, in unsigned long aoffset, in unsigned long alength, in long ax, in long ay, [optional] in unsigned long aadditionalflags); boolean sendselectionsetevent(in unsigned long aoffset, in unsigned long alength, in boolean areverse); obsolete since gecko 31.0 boolean sendselectionsetevent(in unsigned long aoffset, in unsigned long alength, [optional] in unsigned long aadditionalflags); void sendsimplegestureevent(in astring atype, in float ax, in float ay, in unsigned long adirection, in double adelta, in long amodifiers); void sendtextevent(in astring acompositionstring, in long afirstclauselength, in unsigned long afirstclauseattr, in long asecondclauselength, in unsigned long asecondclauseattr, in long athir...
...onal] in unsigned long aadditionalflags); void sendsimplegestureevent(in astring atype, in float ax, in float ay, in unsigned long adirection, in double adelta, in long amodifiers); void sendtextevent(in astring acompositionstring, in long afirstclauselength, in unsigned long afirstclauseattr, in long asecondclauselength, in unsigned long asecondclauseattr, in long athirdclauselength, in unsigned long athirdclauseattr, in long acaretstart, in long acaretlength); obsolete since gecko 26 boolean sendtouchevent(in astring atype, [array, size_is(count)] in pruint32 aidentifiers, [array, size_is(count)] in print32 axs, [array, size_is(count)] in print32 ays, [array, size_is(count)] in pruint32 arxs, [array, size_is(count)] in pruint32 arys, [array, size_is(count)] in floa...
...And 28 more matches
<input type="email"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › email
ly applied as appropriate to visually denote whether the current value of the field is a valid e-mail address or not.
...as appropriate to visually denote whether the current value of the field is a valid e-mail address or not.
... e-mail addresses are validated to ensure that they're formatted properly.
...And 28 more matches
<input type="url"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › url
udo-classes are automatically applied as appropriate to visually denote whether the current value of the field is a valid url or not.
... are automatically applied as appropriate to visually denote whether the current value of the field is a valid url or not.
...details on how urls are validated to ensure that they're formatted properly.
...And 28 more matches
Content type - SVG: Scalable Vector Graphics
in css color module level 3, or one of the system color keywords listed in user preferences for colors (css2, section 18.2).
...ension to color, including the ability to specify icc-based colors, are represented using dom interface svgcolor.
...e represented using dom interface svgcolor.
...And 28 more matches
NSS tools : ssltab
r is not able to load images.
...mages.
...inue to accept connections, switch on looping mode with the -l option.
...And 27 more matches
NSS tools : ssltap
r is not able to load images.
...mages.
...inue to accept connections, switch on looping mode with the -l option.
...And 27 more matches
<input type="password"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › password
tual keyboards.
...rds.
...+000d) characters are not permitted in a password value.
...And 27 more matches
jspage - Archive of obsolete content
his;};d.implement=function(m,l,o){if(typeof m=="string"){return j(this,m,l,o);}for(var n in m){j(this,n,m[n],l); }return this;};if(c){d.implement(c);}return d;};native.genericize=function(b,c,a){if((!a||!b[c])&&typeof b.prototype[c]=="function"){b[c]=function(){var d=array.prototype.slice.call(arguments); return b.prototype[c].apply(d.shift(),d);};}};native.implement=function(d,c){for(var b=0,a=d.length;b<a;b++){d[b].implement(c);}};native.typize=function(a,b){if(!a.type){a.type=function(c){return($type(c)===b); };}};(function(){var a={array:array,date:date,function:function,number:number,regexp:regexp,string:string};for(var h in a){new native({name:h,initialize:a[h],protect:true}); }var d={"boolean":boolean,"native":native,object:object};for(var c in d){native.typize(d[c],c);}var f={array:["con...
...ative,object:object};for(var c in d){native.typize(d[c],c);}var f={array:["concat","indexof","join","lastindexof","pop","push","reverse","shift","slice","sort","splice","tostring","unshift","valueof"],string:["charat","charcodeat","concat","indexof","lastindexof","match","replace","search","slice","split","substr","substring","tolowercase","touppercase","valueof"]}; for(var e in f){for(var b=f[e].length;b--;){native.genericize(a[e],f[e][b],true);}}})();var hash=new native({name:"hash",initialize:function(a){if($type(a)=="hash"){a=$unlink(a.getclean()); }for(var b in a){this[b]=a[b];}return this;}});hash.implement({foreach:function(b,c){for(var a in this){if(this.hasownproperty(a)){b.call(c,this[a],a,this); }}},getclean:function(){var b={};for(var a in this){if(this.hasownproperty(a)){b[a]=this[a...
...ricize(a[e],f[e][b],true);}}})();var hash=new native({name:"hash",initialize:function(a){if($type(a)=="hash"){a=$unlink(a.getclean()); }for(var b in a){this[b]=a[b];}return this;}});hash.implement({foreach:function(b,c){for(var a in this){if(this.hasownproperty(a)){b.call(c,this[a],a,this); }}},getclean:function(){var b={};for(var a in this){if(this.hasownproperty(a)){b[a]=this[a];}}return b;},getlength:function(){var b=0;for(var a in this){if(this.hasownproperty(a)){b++; }}return b;}});hash.alias("foreach","each");array.implement({foreach:function(c,d){for(var b=0,a=this.length;b<a;b++){c.call(d,this[b],b,this);}}});array.alias("foreach","each"); function $a(b){if(b.item){var a=b.length,c=new array(a);while(a--){c[a]=b[a];}return c;}return array.prototype.slice.call(b);}function $arguments(a){r...
...And 26 more matches
<input type="search"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › search
ce for this interactive example is stored in a github repository.
... interactive example is stored in a github repository.
...details), the value can be any text string or an empty string ("").
...And 25 more matches
<input type="text"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › text
ource for this interactive example is stored in a github repository.
...his interactive example is stored in a github repository.
...t (see validation for more details), the value may be an empty string ("").
...And 25 more matches
Array - JavaScript
the javascript array class is a global object that is used in the construction of arrays; which are high-level, list-like objects.
... the javascript array class is a global object that is used in the construction of arrays; which are high-level, list-like objects.
...t or retrieve an element from the array list itself, but will set or access a variable associated with that array's object property collection.
...And 25 more matches
Client-side form validation - Learn web development
ry).
...uilt-in form validation one of the most significant features of html5 form controls is the ability to validate most user data without relying on javascript.
...ignificant features of html5 form controls is the ability to validate most user data without relying on javascript.
...And 24 more matches
imgIContainer
??????????????????"] .createinstance(components.interfaces.imgicontainer); method overview void addrestoredata([array, size_is(acount), const] in char data, in unsigned long acount); native code only!
...e(components.interfaces.imgicontainer); method overview void addrestoredata([array, size_is(acount), const] in char data, in unsigned long acount); native code only!
...n print32 ax, in print32 ay, in print32 awidth, in print32 aheight, in gfximageformat aformat, [array, size_is(imagelength)] out pruint8 imagedata, out unsigned long imagelength); native code only!
...And 24 more matches
Looping code - Learn web development
the point where the condition is no longer true.
...s gives us the following output: hidden code 2 <!doctype html> <html> <head> <meta charset="utf-8"> <title>basic for loop example</title> <style> </style> </head> <body> <p></p> <script> const cats = ['bill', 'jeff', 'pete', 'biggles', 'jasmin']; let info = 'my cats are called '; const para = document.queryselector('p'); for (let i = 0; i < cats.length; i++) { info += cats[i] + ', '; } para.textcontent = info; </script> </body> </html> note: you can find this example code on github too (also see it running live).
...can find this example code on github too (also see it running live).
...And 23 more matches
Value definition syntax - CSS: Cascading Style Sheets
ic data types in the physical location of their definition.
... thin 2vh bold 0 thin bold thin 3.5em but not: thin bold 3em, as bold is juxtaposed with the component defined by the brackets, it must appear before it.
...ponents are mandatory and should appear in the exact order.
...And 23 more matches
nsIAuthModule
netwerk/base/public/nsiauthmodule.idlscriptable this interface is intended to be used as server and client authentication service.
... netwerk/base/public/nsiauthmodule.idlscriptable this interface is intended to be used as server and client authentication service.
... 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void getnexttoken([const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength); void init(in string aservicename, in unsigned long aserviceflags, in wstring adomain, in wstring ausername, in wstring apassword); void unwrap([const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength); void wrap([const] in voidptr aintoken, in unsigned long aintokenlength, in boolean confidential, out voidptr aouttoken, out unsigned long aouttokenlength); constants constant value description req_default 0 default behavior.
...And 21 more matches
Arrays - Learn web development
lf inside another array by chaining two sets of square brackets together.
...ets of square brackets together.
...that is the third item inside the random array (see previous section), we could do something like this: random[2][2]; try making some more modifications to your array examples before moving on.
...And 20 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
f unicode characters.
...ws to anyone who has had to deal with internationalization.
...o deal with internationalization.
...And 19 more matches
CSS values and units - Learn web development
ng with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn about the different types of values and units used in css properties.
... page on mdn for each value will give you information about browser support.
... <integer> an <integer> is a whole number such as 1024 or -55.
...And 18 more matches
Useful string methods - Learn web development
previous overview: first steps next now that we've looked at the very basics of strings, let's move up a gear and start thinking about what useful operations we can do on strings with built-in methods, such as finding the length of a text string, joining and splitting strings, substituting one character in a string for another, and more.
...ou can see this if you go to the string object page and look down the list on the side of the page!
...look down the list on the side of the page!
...And 18 more matches
Background audio processing using AudioWorklet - Web APIs
speaker or the subwoofer, for example) is represented as a float32array whose values are the individual audio samples.
...fication, each block of audio your process() function receives contains 128 frames (that is, 128 samples for each channel), but it is planned that this value will change in the future, and may in fact vary depending on circumstances, so you should always check the array's length rather than assuming a particular size.
...d might have six or more channels.
...And 18 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
er by first clearing and then slowly typing content into the nodelist that matches a specified group of selectors.
...ype 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) ?
...rts[amap[npos]]; scroll(orel, npos + 1, beraseandstop) ?
...And 18 more matches
SVG documentation index - SVG: Scalable Vector Graphics
Web › SVG › Index
attribute defines the coordinate system used for attributes specified on the gradient elements.
....
...he values to be used within the the arithmetic operation of the <fecomposite> filter primitive.
...And 18 more matches
nsDependentCString
r findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replacea...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
...string data members no public members.
...And 17 more matches
background - CSS: Cascading Style Sheets
idth for horizontal offsets and to the height for vertical offsetsbackground-size: relative to the background positioning areacomputed valueas each of the properties of the shorthand:background-image: as specified, but with <url> values made absolutebackground-position: a list, each item consisting of two keywords representing the origin and two offsets from that origin, each given as an absolute length (if given a <length>), otherwise as a percentagebackground-size: as specified, but with relative lengths converted into absolute lengthsbackground-repeat: a list, each item consisting of two keywords, one per dimensionbackground-origin: as specifiedbackground-clip: as specifiedbackground-attachment: as specifiedbackground-color: computed coloranimation typeas each of the properties of the shortha...
...thsbackground-repeat: a list, each item consisting of two keywords, one per dimensionbackground-origin: as specifiedbackground-clip: as specifiedbackground-attachment: as specifiedbackground-color: computed coloranimation typeas each of the properties of the shorthand:background-color: a colorbackground-image: discretebackground-clip: discretebackground-position: repeatable list of simple list of length, percentage, or calcbackground-size: repeatable list of simple list of length, percentage, or calcbackground-repeat: discretebackground-attachment: discrete formal syntax [ <bg-layer> , ]* <final-bg-layer>where <bg-layer> = <bg-image> | <bg-position> [ / <bg-size> ]?
...ent: discrete formal syntax [ <bg-layer> , ]* <final-bg-layer>where <bg-layer> = <bg-image> | <bg-position> [ / <bg-size> ]?
...And 17 more matches
Working with data
cdataobj = type(value); if the size of the specified type isn't undefined, the specified value is converted to the given type.
...lue is converted to the given type.
...type represents a javascript string (that is, an array of jschar characters followed by a null terminator), a copy of that string is created and returned.
...And 16 more matches
Drawing graphics - Learn web development
es.
... rather than being at the top left corner.
... useful in many situations, like this one, where we want our design to be drawn relative to the center of the canvas.
...And 15 more matches
nss tech note5
ch to to do the operation pk11slotinfo* slot = pk11_getbestslot(ciphermech, null); or pk11slotinfo* slot = pk11_getinternalkeyslot(); /* alwys returns internal slot, may not be optimal */ prepare the key if using a raw key /* turn the raw key into a secitem */ secitem keyitem; keyitem.data = /* ptr to an array of key bytes */ keyitem.len = /* length of the array of key bytes */ /* turn the secitem into a key object */ pk11symkey* symkey = pk11_importsymkey(slot, ciphermech, pk11_originunwrap, cka_encrypt, &keyitem, null); if generating the key - see section generate a symmetric key <big>prepare th...
... cka_encrypt, &keyitem, null); if generating the key - see section generate a symmetric key <big>prepare the parameter for crypto context.
...d_ prefix) : md2, md5, sha1, sha256, sha384, sha512.
...And 15 more matches
nsDependentCString external
class declaration method overview constructors rebind get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind ...
...al find rfind findchar rfindchar appendint tointeger base classes nscstring_external data members no public members.
...nal data members no public members.
...And 15 more matches
nsFixedCString
r findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replacea...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
...acity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
...And 15 more matches
nsFixedString
rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replacea...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
...ty setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
...And 15 more matches
nsIBinaryInputStream
nt network protocols or to read from architecture-neutral disk files, that is ones that can be read and written by both big-endian and little-endian platforms.
...written by both big-endian and little-endian platforms.
...n and little-endian platforms.
...And 15 more matches
nsICompositionStringSynthesizer
first, you need to start composition: domwindowutils.sendcompositionevent("compositionstart", "", ""); next, dispatch composition string with crause information and caret information (optional): // set new composition string with .setstring().
...xt, dispatch composition string with crause information and caret information (optional): // set new composition string with .setstring().
...ng with .setstring().
...And 15 more matches
nsITextInputProcessor
tinputprocessorcallback for the detail.
...g or dispatch keyboard events.
...s selected clause to convert, and caret position is the end of the selected clause: // first, sets composition string.
...And 15 more matches
pad - CSS: Cascading Style Sheets
the pad descriptor can be used with custom counter style definitions when you need the marker representations to have a minimum length.
... the pad descriptor can be used with custom counter style definitions when you need the marker representations to have a minimum length.
... the pad descriptor can be used with custom counter style definitions when you need the marker representations to have a minimum length.
...And 15 more matches
NS ConvertUTF16toUTF8 external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
... appendint tointeger base classes nscstring_external data members no public members.
...nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 14 more matches
NS LossyConvertUTF16toASCII external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
... tointeger base classes nscstring_external data members no public members.
...nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 14 more matches
nsCString external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
...rnal() - source void nscstring_external(const nscstring_external&) - source parameters nscstring_external& astring void nscstring_external(const nsacstring&) - source parameters nsacstring& areadable void nscstring_external(const char*, pruint32) - source parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source...
...nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 14 more matches
nsDependentCSubstring external
class declaration method overview constructors rebind beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindch...
... find rfind findchar rfindchar appendint tointeger base classes nscstringcontainer data members no public members.
...ameters char* astart pruint32 alength void nsdependentcsubstring_external(const nsacstring&, pruint32) - source parameters nsacstring& astr pruint32 astartpos void nsdependentcsubstring_external(const nsacstring&, pruint32, pruint32) - source parameters nsacstring& astr pruint32 astartpos pruint32 alength rebind void rebind(const char*, pruint32) - source parameters char* astart pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 14 more matches
nsDependentString
rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replacea...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
...setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
...And 14 more matches
nsLiteralCString (External)
class declaration method overview rebind get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar r...
...perator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstring_external data members no public members.
...nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 14 more matches
nsLiteralString (External)
class declaration method overview rebind get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar r...
...perator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstring_external data members no public members.
...nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 14 more matches
HTMLTextAreaElement - Web APIs
disabled boolean: returns / sets the element's disabled attribute, indicating that the control is not available for interaction.
...ement's disabled attribute, indicating that the control is not available for interaction.
... parent form element.
...And 14 more matches
shape-outside - CSS: Cascading Style Sheets
et's url, and set the origin to the url of the containing document.
...typeyes, as specified for <basic-shape>, otherwise no formal syntax none | <shape-box> | <basic-shape> | <image>where <shape-box> = <box> | margin-box<basic-shape> = <inset()> | <circle()> | <ellipse()> | <polygon()> | <path()><image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <box> = border-box | padding-box | content-box<inset()> = inset( <length-percentage>{1,4} [ round <'border-radius'> ]?
...path()><image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <box> = border-box | padding-box | content-box<inset()> = inset( <length-percentage>{1,4} [ round <'border-radius'> ]?
...And 14 more matches
ArrayBuffer.transfer() - Archive of obsolete content
the static arraybuffer.transfer() method returns a new arraybuffer whose contents have been taken from the oldbuffer's data and then is either truncated or zero-extended by newbytelength.
... the static arraybuffer.transfer() method returns a new arraybuffer whose contents have been taken from the oldbuffer's data and then is either truncated or zero-extended by newbytelength.
... the static arraybuffer.transfer() method returns a new arraybuffer whose contents have been taken from the oldbuffer's data and then is either truncated or zero-extended by newbytelength.
...And 13 more matches
Following the Android Toasts Tutorial from a JNI Perspective
ater.
... firefox for android with the following code: window.nativewindow.toast.show("hello, firefox!", "short"); converting java to jni.jsm the first step is to look at the java code and see all the different types, methods, constructors, and fields that are being used.
...le jenv already, and we don't want to mix.
...And 13 more matches
NS_ConvertASCIItoUTF16
rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replacea...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsautostring data members no public members.
...or+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsautostring data members no public members.
...And 13 more matches
NS_ConvertUTF16toUTF8
r findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replacea...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscautostring data members no public members.
...getdata getmutabledata setisvoid stripchar base classes nscautostring data members no public members.
...And 13 more matches
NS_ConvertUTF8toUTF16
rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replacea...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsautostring data members no public members.
...ator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsautostring data members no public members.
...And 13 more matches
NS_LossyConvertUTF16toASCII
r findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replacea...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscautostring data members no public members.
... setisvoid stripchar base classes nscautostring data members no public members.
...And 13 more matches
PromiseFlatCString (External)
class declaration method overview get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar ...
...nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...harat char charat(pruint32) const - source parameters pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 13 more matches
nsACString (External)
oascii_external" shape="rect" title="ns_lossyconvertutf16toascii_external"> <area alt="" coords="803,294,925,342" href="http://developer.mozilla.org/en/nsliteralcstring_(external)" shape="rect" title="nsliteralcstring_(external)"></map> method overview beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< ope...
... operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger data members no public members.
...harat char charat(pruint32) const - source parameters pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 13 more matches
nsAdoptingCString
r findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsxpidlcstring data members no public members.
... appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsxpidlcstring data members no public members.
...And 13 more matches
nsAdoptingString
rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsxpidlstring data members no public members.
...dliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsxpidlstring data members no public members.
...And 13 more matches
nsAutoString
rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replacea...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsfixedstring data members no public members.
... setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsfixedstring data members no public members.
...And 13 more matches
nsCAutoString
mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignas...
...caseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsfixedcstring data members no public members.
... truncate getdata getmutabledata setisvoid stripchar base classes nsfixedcstring data members no public members.
...And 13 more matches
nsCAutoString (External)
class declaration method overview get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar ...
...nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...harat char charat(pruint32) const - source parameters pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 13 more matches
nsCString
r findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replacea...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsacstring_internal data members no public members.
... insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsacstring_internal data members no public members.
...And 13 more matches
nsCStringContainer (External)
class declaration method overview beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare(const char*, print32 (*) compare(const nsacstring&, print32 (*) equals(const char*, print32 (*) equals(const nsacstring&, print32 (*) operator< operator<= operator== operator>= operator>...
... rfind(const nsacstring&, print32, print32 (*) rfind(const char*, print32 (*) rfind(const char*, print32, print32 (*) findchar rfindchar appendint tointeger base classes nsacstring data members no public members.
...harat char charat(pruint32) const - source parameters pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 13 more matches
nsDependentCSubstring
ring class which wraps an external array of string characters.
...al(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsacstring_internal data members no public members.
...dliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsacstring_internal data members no public members.
...And 13 more matches
nsDependentString external
class declaration dependent strings method overview constructors rebind get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercas...
... find rfind findchar rfindchar appendint tointeger base classes nsstring_external data members no public members.
...no public members.
...And 13 more matches
nsDependentSubstring
ring class which wraps an external array of string characters.
...al(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsastring_internal data members no public members.
...ppendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsastring_internal data members no public members.
...And 13 more matches
nsString
rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replacea...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsastring_internal data members no public members.
...cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsastring_internal data members no public members.
...And 13 more matches
border-radius - CSS: Cascading Style Sheets
ues) / top-left | top-right-and-bottom-left | bottom-right */ border-radius: 10px 5px 2em / 20px 25px 30%; /* (first radius values) / top-left | top-right | bottom-right | bottom-left */ border-radius: 10px 5% / 20px 25em 30px 35em; /* global values */ border-radius: inherit; border-radius: initial; border-radius: unset; the border-radius property is specified as: one, two, three, or four <length> or <percentage> values.
... | top-right | bottom-right | bottom-left */ border-radius: 10px 5% / 20px 25em 30px 35em; /* global values */ border-radius: inherit; border-radius: initial; border-radius: unset; the border-radius property is specified as: one, two, three, or four <length> or <percentage> values.
...: initial; border-radius: unset; the border-radius property is specified as: one, two, three, or four <length> or <percentage> values.
...And 13 more matches
NS ConvertASCIItoUTF16 external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find ...
... appendint tointeger base classes nsstring_external data members no public members.
... parameters nsastring& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...And 12 more matches
NS ConvertUTF8toUTF16 external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find ...
...r appendint tointeger base classes nsstring_external data members no public members.
... parameters nsastring& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...And 12 more matches
nsACString_internal
ii"> <area alt="" coords="251,389,435,437" href="http://developer.mozilla.org/en/ns_convertutf16toutf8" shape="rect" title="ns_convertutf16toutf8"> <area alt="" coords="309,293,445,341" href="http://developer.mozilla.org/en/nsadoptingcstring" shape="rect" title="nsadoptingcstring"> </map> method overview constructors beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replac...
...al(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar data members no public members.
...void stripchar data members no public members.
...And 12 more matches
nsAString (External)
733,342" href="http://developer.mozilla.org/en/ns_convertutf8toutf16_external" shape="rect" title="ns_convertutf8toutf16_external"> <area alt="" coords="757,294,869,342" href="http://developer.mozilla.org/en/nsliteralstring_(external)" shape="rect" title="nsliteralstring_(external)"> </map> method overview beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint to...
...tripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger data members no public members.
...har* beginreading() const - source endreading prunichar* endreading() const - source charat prunichar charat(pruint32) const - source parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 12 more matches
nsAString_internal
tf16"> <area alt="" coords="216,389,400,437" href="http://developer.mozilla.org/en/ns_convertutf8toutf16" shape="rect" title="ns_convertutf8toutf16"> <area alt="" coords="277,293,405,341" href="http://developer.mozilla.org/en/nsadoptingstring" shape="rect" title="nsadoptingstring"> </map> method overview constructors beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replac...
...al(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar data members no public members.
... stripchar data members no public members.
...And 12 more matches
nsDependentSubstring external
class declaration substrings method overview constructors rebind beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare(const prunichar*, print32 (*) compare(const nsastring&, print32 (*) equals(const prunichar*, print32 (*) equals(const nsastring&, print32 (*) operator< operator<= ...
...(*) rfind findchar rfindchar appendint tointeger base classes nsstringcontainer data members no public members.
... parameters prunichar astart pruint32 alength void nsdependentsubstring_external(const nsastring&, pruint32) - source parameters nsastring astr pruint32 astartpos void nsdependentsubstring_external(const nsastring&, pruint32, pruint32) - source parameters nsastring astr pruint32 astartpos pruint32 alength rebind void rebind(const prunichar*, pruint32) - source parameters prunichar astart pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...And 12 more matches
nsPromiseFlatCString
r findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replacea...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
... aeliminatetrailing controls stripping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsastring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsastring_internal& astring void assignwithconversion(const prunichar*, print32) - source parameters prunichar* adata print32 alength appendwithconversion void appendwithconversion(const nsastring_internal&) - source parameters nsastring_internal& astring void appendwithconversion(const prunichar*, print32) - source parameters prunichar* adata print32 alength appendint void appendint(print32, print32) - source append the given integer to this string parameters print32 ainteger print32 aradix void ap...
...And 12 more matches
nsPromiseFlatString
rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replacea...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
... @param aeliminatetrailing controls stripping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsacstring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsacstring_internal& astring void assignwithconversion(const char*, print32) - source parameters char* adata print32 alength appendwithconversion void appendwithconversion(const nsacstring_internal&) - source parameters nsacstring_internal& astring void appendwithconversion(const char*, print32) - source parameters char* adata print32 alength appendint void appendint(print32, print32) - source append the given integer to this string parameters print32 ainteger print32 aradix void appendint(...
...And 12 more matches
nsString external
class declaration basic strings method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral ...
...l() - source void nsstring_external(const nsstring_external&) - source parameters nsstring_external& astring void nsstring_external(const nsastring&) - source parameters nsastring& areadable void nsstring_external(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source parameters nsstring_external& astring nsastring& operator=(const nsastring&) - source parameters nsastring& astring nsastring& operator=(const prunichar*) - sou...
... parameters nsastring& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...And 12 more matches
nsXPIDLCString
r findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
... aeliminatetrailing controls stripping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsastring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsastring_internal& astring void assignwithconversion(const prunichar*, print32) - source parameters prunichar* adata print32 alength appendwithconversion void appendwithconversion(const nsastring_internal&) - source parameters nsastring_internal& astring void appendwithconversion(const prunichar*, print32) - source parameters prunichar* adata print32 alength appendint void appendint(print32, print32) - source append the given integer to this string parameters print32 ainteger print32 aradix void ap...
...And 12 more matches
nsXPIDLString
rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
... @param aeliminatetrailing controls stripping of trailing ws parameters prbool aeliminateleading prbool aeliminatetrailing assignwithconversion void assignwithconversion(const nsacstring_internal&) - source assign/append/insert with _lossy_ conversion parameters nsacstring_internal& astring void assignwithconversion(const char*, print32) - source parameters char* adata print32 alength appendwithconversion void appendwithconversion(const nsacstring_internal&) - source parameters nsacstring_internal& astring void appendwithconversion(const char*, print32) - source parameters char* adata print32 alength appendint void appendint(print32, print32) - source append the given integer to this string parameters print32 ainteger print32 aradix void appendint(...
...And 12 more matches
Multi-touch interaction - Web APIs
horizontal move/pinch/zoom handling.
...ing.
...vice dependent).
...And 12 more matches
background-position - CSS: Cascading Style Sheets
github repository.
...osition>.
...alues are used, the length-percentage values are offsets for the preceding keyword value(s).
...And 12 more matches
translate - CSS: Cascading Style Sheets
Web › CSS › translate
orm property.
...r to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the transform value.
...*/ translate: 100px; translate: 50%; /* two values */ translate: 100px 200px; translate: 50% 105px; /* three values */ translate: 50% 105px 5rem; values single <length-percentage> value a <length> or <percentage> that specifies a 2d translation, with the same translation along both the x and y axes.
...And 12 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
Web › HTML › Element › input
novalidate image, submit bypass form control validation for form submission formtarget image, submit browsing context for form submission height image same as height attribute for <img>; vertical dimension list almost all value of the id attribute of the <datalist> of autocomplete options max numeric types maximum value maxlength password, search, tel, text, url maximum length (number of characters) of value min numeric types minimum value minlength password, search, tel, text, url minimum length (number of characters) of value multiple email, file boolean.
...is, the element fails constraint validation.
... the value of max may be lower than the value of min, which indicates that the range may wrap around; for example, this allows you to specify a time range from 10 pm to 4 am.
...And 12 more matches
JS_NewArrayObject
create a new array object.
... create a new array object.
...gth, jsval *vector); // obsolete since jsapi 30 name type description cx jscontext * the context in which to create the new array.
...And 11 more matches
PromiseFlatString (External)
class declaration method overview get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind fin...
... parameters nsastring& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...r charat(pruint32) const - source parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 11 more matches
nsAutoString (External)
class declaration method overview get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind fin...
... parameters nsastring& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...r charat(pruint32) const - source parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 11 more matches
nsStringContainer (External)
class declaration method overview beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar ...
...tor>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger base classes nsastring data members no public members.
...r charat(pruint32) const - source parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 11 more matches
Visualizations with Web Audio API - Web APIs
nd the second and third ones produce 8-bit unsigned integers, therefore a standard javascript array won't do — you need to use a float32array or uint8array array, depending on what data you are handling.
...e a float32array or uint8array array, depending on what data you are handling.
...ing.
...And 11 more matches
-webkit-box-reflect - CSS: Cascading Style Sheets
ransparent, white); /* global values */ -webkit-box-reflect: inherit; -webkit-box-reflect: initial; -webkit-box-reflect: unset; note: this feature is not intended to be used by web sites.
... syntax values above, below, right, left are keywords indicating in which direction the reflection is to happen.
...alpha-value>?
...And 11 more matches
CSS values and units - CSS: Cascading Style Sheets
component, for example 0.255, 128 or -1.2.
...e 45deg, 100ms, or 10px.
...e.
...And 11 more matches
mask - CSS: Cascading Style Sheets
Web › CSS › mask
ting area minus size of mask layer image (see the text for background-position)computed valueas each of the properties of the shorthand:mask-image: as specified, but with <url> values made absolutemask-mode: as specifiedmask-repeat: consists of two keywords, one per dimensionmask-position: consists of two keywords representing the origin and two offsets from that origin, each given as an absolute length (if given a <length>), otherwise as a percentage.mask-clip: as specifiedmask-origin: as specifiedmask-size: as specified, but with relative lengths converted into absolute lengthsmask-composite: as specifiedanimation typeas each of the properties of the shorthand:mask-image: discretemask-mode: discretemask-repeat: discretemask-position: repeatable list of simple list of length, percentage, or cal...
...as specifiedmask-size: as specified, but with relative lengths converted into absolute lengthsmask-composite: as specifiedanimation typeas each of the properties of the shorthand:mask-image: discretemask-mode: discretemask-repeat: discretemask-position: repeatable list of simple list of length, percentage, or calcmask-clip: discretemask-origin: discretemask-size: repeatable list of simple list of length, percentage, or calcmask-composite: discretecreates stacking contextyes formal syntax <mask-layer>#where <mask-layer> = <mask-reference> | <position> [ / <bg-size> ]?
...posite: discretecreates stacking contextyes formal syntax <mask-layer>#where <mask-layer> = <mask-reference> | <position> [ / <bg-size> ]?
...And 11 more matches
perspective-origin - CSS: Cascading Style Sheets
rigin: x-position y-position; /* when both x-position and y-position are keywords, the following is also valid */ perspective-origin: y-position x-position; /* global values */ perspective-origin: inherit; perspective-origin: initial; perspective-origin: unset; values x-position indicates the position of the abscissa of the vanishing point.
... y-position are keywords, the following is also valid */ perspective-origin: y-position x-position; /* global values */ perspective-origin: inherit; perspective-origin: initial; perspective-origin: unset; values x-position indicates the position of the abscissa of the vanishing point.
...rspective-origin: inherit; perspective-origin: initial; perspective-origin: unset; values x-position indicates the position of the abscissa of the vanishing point.
...And 11 more matches
TypedArray - JavaScript
(signed long long) biguint64array 0 to 264-1 8 64-bit unsigned integer bigint uint64_t (unsigned long long) constructor this object cannot be instantiated directly.
... uint64_t (unsigned long long) constructor this object cannot be instantiated directly.
...ly.
...And 11 more matches
JIT Optimization Strategies
uccess or a reason why the strategy failed to apply.
... to apply.
...up they provide, what kind of program characteristics can prevent them from being used, and common ways to enable the engine to utilize that optimization.
...And 10 more matches
Replace
« xpcom api reference summary the replace family of functions sets the value of a string's internal buffer.
... « xpcom api reference summary the replace family of functions sets the value of a string's internal buffer.
... « xpcom api reference summary the replace family of functions sets the value of a string's internal buffer.
...And 10 more matches
Replace
« xpcom api reference summary the replace family of functions sets the value of a string's internal buffer.
... « xpcom api reference summary the replace family of functions sets the value of a string's internal buffer.
... « xpcom api reference summary the replace family of functions sets the value of a string's internal buffer.
...And 10 more matches
Using the CSS Typed Object Model - Web APIs
<dl> we'll be populating const styleslist = document.queryselector('#regurgitation'); // retrieve all computed styles with computedstylemap() const allcomputedstyles = myelement.computedstylemap(); // array of properties we're interested in const ofinterest = ['font-weight', 'border-left-color', 'color', '--color']; // iterate through our properties of interest for ( let i = 0; i < ofinterest.length; i++ ) { // properties const cssproperty = document.createelement('dt'); cssproperty.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...
...itation'); // retrieve all computed styles with computedstylemap() const allcomputedstyles = myelement.computedstylemap(); // array of properties we're interested in const ofinterest = ['padding-top', 'margin-bottom', 'font-size', 'font-stretch', 'animation-duration', 'animation-iteration-count', 'width', 'height']; // iterate thru our properties of interest for ( let i = 0; i < ofinterest.length; i++ ) { // create a row const row = document.createelement( 'tr' ); // add the name of the property const cssproperty = document.createelement( 'td' ); cssproperty.appendchild( document.createtextnode( ofinterest[i] ) ); row.appendchild( cssproperty ); // and the unitless value const cssvalue = document.createelement( 'td' ); // shrink long floats to...
...ut should looks something like this: property value unit padding-top 0 px margin-bottom 16 px font-size 16 px font-stretch 100 percent animation-duration 0 s animation-iteration-count 1 number width auto undefined height auto undefined you'll note the <length> unit returned is px, the <percentage> unit returned is percent, the <time> unit is s for 'seconds', and the unitless <number> unit is number.
...And 10 more matches
Using the Gamepad API - Web APIs
lps prevent gamepads being used for fingerprinting the user.
...ing used for fingerprinting the user.
...ill be returned if there are no gamepads connected.) this can then be used to get the same information.
...And 10 more matches
Using CSS gradients - CSS: Cascading Style Sheets
"auto-spaced-linear-gradient"></div> div { width: 120px; height: 120px; } .auto-spaced-linear-gradient { background: linear-gradient(red, yellow, blue, orange); } positioning color stops you don't have to leave your color stops at their default positions.
...o on.
..., the center of the gradient is at the 50% 50% mark, and the gradient is elliptical matching the aspect ratio of it's box: <div class="simple-radial"></div> div { width: 240px; height: 120px; } .simple-radial { background: radial-gradient(red, blue); } positioning radial color stops again like linear gradients, you can position each radial color stop with a percentage or absolute length.
...And 10 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
talpha = function setalpha(value) { if (typeof(value) !== 'number' || isnan(value) === true || value < 0 || value > 1) return; this.a = parsefloat(value.tofixed(2)); }; color.prototype.sethexa = function sethexa(value) { var valid = /(^#{0,1}[0-9a-f]{6}$)|(^#{0,1}[0-9a-f]{3}$)/i.test(value); if (valid !== true) return; if (value[0] === '#') value = value.slice(1, value.length); if (value.length === 3) value = value.replace(/([0-9a-f])([0-9a-f])([0-9a-f])/i,'$1$1$2$2$3$3'); this.r = parseint(value.substr(0, 2), 16); this.g = parseint(value.substr(2, 2), 16); this.b = parseint(value.substr(4, 2), 16); this.alpha = 1; this.rgbtohsv(); }; /*========== conversion methods ==========*/ color.prototype.converttohsl = function converttohsl() { if (this...
... }; var subscribe = function subscribe(topic, callback) { if (subscribers[topic] === undefined) subscribers[topic] = []; subscribers[topic].push(callback); }; var unsubscribe = function unsubscribe(callback) { subscribers.indexof(callback); subscribers.splice(index, 1); }; var notify = function notify(topic, value) { if (subscribers[topic] === undefined || subscribers[topic].length === 0) return; var color = new color(value); for (var i in subscribers[topic]) subscribers[topic][i](color); }; var init = function init() { var elem = document.queryselectorall('.ui-color-picker'); var size = elem.length; for (var i = 0; i < size; i++) new colorpicker(elem[i]); }; return { init : init, color : color, rgbcolor : rgbcolor, rgbacolor : rgbacolor, ...
...n.classname = 'ui-dropdown'; for (var i in options) { var x = document.createelement('div'); x.setattribute('data-value', i); x.textcontent = options[i]; dropdown.appendchild(x); } new dropdown(dropdown); return dropdown; }; var setvalue = function setvalue(topic, index, send_notify) { if (dropdowns[topic] === undefined || index >= dropdowns[topic].dropmenu.children.length) return; dropdowns[topic].setnodevalue(dropdowns[topic].dropmenu.children[index], send_notify); }; var subscribe = function subscribe(topic, callback) { if (subscribers[topic] === undefined) subscribers[topic] = []; subscribers[topic].push(callback); }; var unsubscribe = function unsubscribe(topic, callback) { var index = subscribers[topic].indexof(callback); subscribers[to...
...And 10 more matches
attr() - CSS: Cascading Style Sheets
Web › CSS › attr
ue for the property, the property's minimum value.
...perty, the property's minimum value.
...ber <number> the attribute value is parsed as a css <number>.
...And 10 more matches
grid-template-columns - CSS: Cascading Style Sheets
ate-columns: [linename1 linename2] 100px repeat(auto-fit, [linename1] 300px) [linename3]; /* global values */ grid-template-columns: inherit; grid-template-columns: initial; grid-template-columns: unset; values none indicates that there is no explicit grid.
...linename2] 100px repeat(auto-fit, [linename1] 300px) [linename3]; /* global values */ grid-template-columns: inherit; grid-template-columns: initial; grid-template-columns: unset; values none indicates that there is no explicit grid.
...’s flex factor.
...And 10 more matches
grid-template-rows - CSS: Cascading Style Sheets
values */ grid-template-rows: inherit; grid-template-rows: initial; grid-template-rows: unset; this property may be specified as: either the keyword value none or a <track-list> value or an <auto-track-list> value.
...ws: inherit; grid-template-rows: initial; grid-template-rows: unset; this property may be specified as: either the keyword value none or a <track-list> value or an <auto-track-list> value.
...’s flex factor.
...And 10 more matches
Array.from() - JavaScript
syntax array.from(arraylike [, mapfn [, thisarg]]) parameters arraylike an array-like or iterable object to convert to an array.
...unction on each element of the array being created.
...tr.call(fn) === '[object function]' ); }; var tointeger = function (value) { var number = number(value); if (isnan(number)) return 0; if (number === 0 || !isfinite(number)) return number; return (number > 0 ?
...And 10 more matches
BigInt64Array() constructor - JavaScript
bigint64array object, which is, an array of 64-bit signed integers in the platform byte order.
...r byte order is needed, use dataview instead.
...e dataview instead.
...And 10 more matches
BigUint64Array() constructor - JavaScript
nt64array object, which is, an array of 64-bit unsigned integers in the platform byte order.
...e order is needed, use dataview instead.
...aview instead.
...And 10 more matches
Float32Array() constructor - JavaScript
point numbers (corresponding to the c float data type) in the platform byte order.
...rder is needed, use dataview instead.
...ew instead.
...And 10 more matches
Float64Array() constructor - JavaScript
point numbers (corresponding to the c double data type) in the platform byte order.
...rder is needed, use dataview instead.
...ew instead.
...And 10 more matches
Int16Array() constructor - JavaScript
creates an array of twos-complement 16-bit signed integers in the platform byte order.
...ver byte order is needed, use dataview instead.
...use dataview instead.
...And 10 more matches
Int32Array() constructor - JavaScript
creates an array of twos-complement 32-bit signed integers in the platform byte order.
...ver byte order is needed, use dataview instead.
...use dataview instead.
...And 10 more matches
Int8Array() constructor - JavaScript
the int8array() constructor creates a typed array of twos-complement 8-bit signed integers.
...yped array of twos-complement 8-bit signed integers.
...ent 8-bit signed integers.
...And 10 more matches
String.prototype.substr() - JavaScript
the substr() method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.
... a given number of characters afterwards.
...xamples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...And 10 more matches
Uint16Array() constructor - JavaScript
the uint16array() typed array constructor creates an array of 16-bit unsigned integers in the platform byte order.
... the uint16array() typed array constructor creates an array of 16-bit unsigned integers in the platform byte order.
... the uint16array() typed array constructor creates an array of 16-bit unsigned integers in the platform byte order.
...And 10 more matches
Uint32Array() constructor - JavaScript
constructor creates an array of 32-bit unsigned integers in the platform byte order.
...yte order is needed, use dataview instead.
...ataview instead.
...And 10 more matches
Uint8Array() constructor - JavaScript
the uint8array() constructor creates a typed array of 8-bit unsigned integers.
...eates a typed array of 8-bit unsigned integers.
...it unsigned integers.
...And 10 more matches
Uint8ClampedArray() constructor - JavaScript
lue that is out of the range of [0,255], 0 or 255 will be set instead; if you specify a non-integer, the nearest integer will be set.
...will be set.
...are initialized to 0.
...And 10 more matches
Tree View Details - Archive of obsolete content
in the visibledata structure indicate whether a row is a container and whether it is open respectively.
...unction(idx) { return this.visibledata[idx][1]; }, iscontaineropen: function(idx) { return this.visibledata[idx][2]; }, iscontainerempty: function(idx) { return false; }, isseparator: function(idx) { return false; }, issorted: function() { return false; }, iseditable: function(idx, column) { return false; }, } the rowcount function will return the length of the visibledata array.
...nction: getlevel: function(idx) { if (this.iscontainer(idx)) return 0; return 1; } the getlevel function is simple.
...And 9 more matches
Encrypt Decrypt_MAC_Using Token
cksize]; unsigned int ptextlen; unsigned char mac[digestsize]; unsigned int maclen; unsigned int nwritten; unsigned char encbuf[blocksize]; unsigned int encbuflen; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned int pad[1]; secitem paditem; unsigned int paddinglength; static unsigned int firsttime = 1; int j; ctxmac = pk11_createcontextbysymkey(ckm_md5_hmac, cka_sign, mk, &noparams); if (ctxmac == null) { pr_fprintf(pr_stderr, "can't create mac context\n"); rv = secfailure; goto cleanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm...
...nup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm_aes_cbc); /* read a buffer of plaintext from input file.
... goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm_aes_cbc); /* read a buffer of plaintext from input file.
...And 9 more matches
XPCOM array guide
Mozilla › Tech › XPCOM › Guide › Arrays
.nsimutablearray); // append some elements ...
...// append some elements ...
...d some elements ...
...And 9 more matches
IAccessibleEditableText
setattributes([in] long startoffset, [in] long endoffset, [in] bstr attributes ); methods copytext() copies the text range into the clipboard.
...s copytext() copies the text range into the clipboard.
...length.
...And 9 more matches
nsIBinaryOutputStream
byte first), as this is traditional network order.
...rk order.
...nsioutputstream last changed in gecko 1.7 method overview void setoutputstream(in nsioutputstream aoutputstream); void write8(in pruint8 abyte); void write16(in pruint16 a16); void write32(in pruint32 a32); void write64(in pruint64 a64); void writeboolean(in prbool aboolean); void writebytearray([array, size_is(alength)] in pruint8 abytes, in pruint32 alength); void writebytes(alength)] in string astring, in pruint32 alength); void writedouble(in double adouble); void writefloat(in float afloat); void writestringz(in string astring); void writeutf8z(in wstring astring); void writewstringz(in wstring astring); methods setoutputstream() sets the stream to which output is directed.
...And 9 more matches
nsIStringBundle
: nsisupports last changed in gecko 1.7 this interface is used by xul:stringbundle to retrieve strings.
...is interface is used by xul:stringbundle to retrieve strings.
...hat you use the methods of xul:stringbundle to access these functions unless necessary.
...And 9 more matches
ArrayType
arraytype represents c arrays syntax returns a new ctype representing an array data type.
... arraytype represents c arrays syntax returns a new ctype representing an array data type.
...ys syntax returns a new ctype representing an array data type.
...And 9 more matches
Element.classList - Web APIs
Web › API › Element › classList
ist.
...operty, allowtokenlistconstruction = 0, skippropchange = 0; function domtokenlist(){ if (!allowtokenlistconstruction) throw typeerror("illegal constructor"); // internally let it through } domtokenlist.prototype.tostring = domtokenlist.prototype.tolocalestring = function(){return this.value}; domtokenlist.prototype.add = function(){ a: for(var v=0, arglen=arguments.length,val="",ele=this[" ucl"],proto=ele[" uclp"]; v!==arglen; ++v) { val = arguments[v] + "", checkifvalidclasslistentry("add", val); for (var i=0, len=proto.length, resstr=val; i !== len; ++i) if (this[i] === val) continue a; else resstr += " " + this[i]; this[len] = val, proto.length += 1, proto.value = resstr; } skippropchange = 1, ...
... for (var i=0, len=proto.length, resstr=val; i !== len; ++i) if (this[i] === val) continue a; else resstr += " " + this[i]; this[len] = val, proto.length += 1, proto.value = resstr; } skippropchange = 1, ele.classname = proto.value, skippropchange = 0; }; domtokenlist.prototype.remove = function(){ for (var v=0, arglen=arguments.length,val="",ele=this[" ucl"],proto=ele[" uclp"]; v !== arglen; ++v) { val = arguments[v] + "", checkifvalidclasslistentry("remove", val); for (var i=0, len=proto.length, resstr="", is=0; i !== len; ++i) if(is){ this[i-1]=this[i] }else{ if(this[i] !== val){ resstr+=this[i]+" "; }else{ is=1; } } if (!is) continue; delete this[len], proto.le...
...And 9 more matches
SVGTextContentElement - Web APIs
idth="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="156" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgtextcontentelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants constant value description lengthadjust_unknown 0 some other value.
...troke-width="2px" /><text x="156" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgtextcontentelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants constant value description lengthadjust_unknown 0 some other value.
...font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgtextcontentelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants constant value description lengthadjust_unknown 0 some other value.
...And 9 more matches
Writing a WebSocket server in C# - Web APIs
gets the stream which is the communication channel.
... properties: int available this property indicates how many bytes of data have been sent.
...rmine the length of the message.
...And 9 more matches
Using XMLHttpRequest - Web APIs
data is now in the response var oreq = new xmlhttprequest(); oreq.addeventlistener("progress", updateprogress); oreq.addeventlistener("load", transfercomplete); oreq.addeventlistener("error", transferfailed); oreq.addeventlistener("abort", transfercanceled); oreq.open(); // ...
... transfer using xmlhttprequest.
...need to add the event listeners before calling open() on the request.
...And 9 more matches
additive-symbols - CSS: Cascading Style Sheets
alpha-value>?
...>?
...<alpha-value>?
...And 9 more matches
negative - CSS: Cascading Style Sheets
alpha-value>?
...>?
...<alpha-value>?
...And 9 more matches
prefix - CSS: Cascading Style Sheets
alpha-value>?
...>?
...<alpha-value>?
...And 9 more matches
suffix - CSS: Cascading Style Sheets
alpha-value>?
...>?
...<alpha-value>?
...And 9 more matches
symbols - CSS: Cascading Style Sheets
alpha-value>?
...>?
...<alpha-value>?
...And 9 more matches
background-image - CSS: Cascading Style Sheets
alpha-value>?
...>?
...<alpha-value>?
...And 9 more matches
border-image-source - CSS: Cascading Style Sheets
alpha-value>?
...>?
...<alpha-value>?
...And 9 more matches
box-shadow - CSS: Cascading Style Sheets
ur-radius | spread-radius | color */ box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2); /* inset | offset-x | offset-y | color */ box-shadow: inset 5em 1em gold; /* any number of shadows, separated by commas */ box-shadow: 3px 3px red, -1em 0 0.4em olive; /* global keywords */ box-shadow: inherit; box-shadow: initial; box-shadow: unset; specify a single box-shadow using: two, three, or four <length> values.
... inset if not specified (default), the shadow is assumed to be a drop shadow (as if the box were raised above the content).
...x).
...And 9 more matches
content - CSS: Cascading Style Sheets
Web › CSS › content
alpha-value>?
...>?
...<alpha-value>?
...And 9 more matches
cross-fade() - CSS: Cascading Style Sheets
gradient( [ from <angle> ]?
... from <angle> ]?
... | <angle>where <side-or-corner> = [ left | right ] | [ top | bottom ]<color-stop-list> = [ <linear-color-stop> [, <linear-color-hint>]?
...And 9 more matches
line-height - CSS: Cascading Style Sheets
late line box height.
...tax /* keyword value */ line-height: normal; /* unitless values: use this number multiplied by the element's font size */ line-height: 3.5; /* <length> values */ line-height: 3em; /* <percentage> values */ line-height: 34%; /* global values */ line-height: inherit; line-height: initial; line-height: unset; the line-height property is specified as any one of the following: a <number> a <length> a <percentage> the keyword normal.
...user agent.
...And 9 more matches
mask-border-source - CSS: Cascading Style Sheets
alpha-value>?
...>?
...<alpha-value>?
...And 9 more matches
mask-image - CSS: Cascading Style Sheets
alpha-value>?
...>?
...<alpha-value>?
...And 9 more matches
offset-path - CSS: Cascading Style Sheets
not motion.
....
...( [ <angle> && <size>?
...And 9 more matches
repeating-linear-gradient() - CSS: Cascading Style Sheets
s infinitely in all directions so as to cover its entire container.
... is a special kind of <image>.
...image>.
...And 9 more matches
String - JavaScript
the string object is used to represent and manipulate a sequence of characters.
...tor, which is usually more useful.
... more useful.
...And 9 more matches
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
this.todos = this.incomplete; } this is rather nice for clearing the todos — we just need to set the todos array to equal the list of incomplete todos.
... the todos — we just need to set the todos array to equal the list of incomplete todos.
...ad grammar!
...And 8 more matches
Add to iPhoto
in: shutdown: function() { this.lib.close(); } select api declarations let's take a look at a few of the key apis we declare for core foundation, to see how it's done.
...dentifies a range; that is, it identifies an offset to an item in a list and a number of items.
... cfindex location; cfindex length; } cfrange; to declare this for use with js-ctypes, we use the following code: this.cfrange = new ctypes.structtype("cfrange", [ {'location': ctypes.int32_t}, {'length': ctypes.int32_t}]); this defines corefoundation.cfrange to represent this data type, comprised of two 32-bit integer fields called location and length.
...And 8 more matches
SVGPathElement - Web APIs
target="_top"><rect x="-99" y="65" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="-29" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgpathelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} note: in svg 2 the getpathsegatlength() and createsvgpathseg* methods were removed and the pathlength property and the gettotallength() and getpointatlength() methods were moved to svggeometryelement.
.../text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} note: in svg 2 the getpathsegatlength() and createsvgpathseg* methods were removed and the pathlength property and the gettotallength() and getpointatlength() methods were moved to svggeometryelement.
...ointer-events: all;} note: in svg 2 the getpathsegatlength() and createsvgpathseg* methods were removed and the pathlength property and the gettotallength() and getpointatlength() methods were moved to svggeometryelement.
...And 8 more matches
Using the User Timing API - Web APIs
mark === undefined) { log("create marks: performance.mark not supported", 0); return; } else { log("create marks", 0); // create several performance marks including two with the same name performance.mark("mark-1"); do_work(50000); performance.mark("mark-2"); do_work(50000); performance.mark("mark-2"); var marks = ["mark-1", "mark-2", "mark-2"]; for (var i=0; i < marks.length; i++) log("...
...type), and performance.getentriesbyname(name, entrytype) ) to retrieve one or more marks.
...using getentries() var entries = performance.getentries(); var j=0; for (var i=0; i < entries.length; i++) { if (entries[i].entrytype == "mark") { if (j == 0) { log("= getentries()", 0); j++ } log("...
...And 8 more matches
max-height - CSS: Cascading Style Sheets
the max-height css descriptor specifies the maximum height of the viewport of a document defined via the @viewport at-rule.
...wport at-rule.
...set as close as possible to the initial viewport height considering the maximum height constraint.
...And 8 more matches
max-width - CSS: Cascading Style Sheets
the max-width css descriptor specifies the maximum width of the viewport of a document defined via the @viewport at-rule.
...ned via the @viewport at-rule.
...he width is set as close as possible to the initial viewport considering the maximum width constraint.
...And 8 more matches
min-height - CSS: Cascading Style Sheets
the min-height css descriptor specifies the minimum height of the viewport of a document defined via the @viewport at-rule.
...wport at-rule.
...set as close as possible to the initial viewport height considering the minimum height constraint.
...And 8 more matches
min-width - CSS: Cascading Style Sheets
the min-width css descriptor specifies the minimum width of the viewport of a document defined via @viewport.
...document defined via @viewport.
...min-width is set as close as possible to the initial viewport considering the minimum width constraint.
...And 8 more matches
Border-image generator - CSS: Cascading Style Sheets
allback) { if (subscribers[topic] === undefined) subscribers[topic] = []; subscribers[topic].push(callback); }; var unsubscribe = function unsubscribe(topic, callback) { subscribers[topic].indexof(callback); subscribers[topic].splice(index, 1); }; var notify = function notify() { if (subscribers[this.topic] === undefined) return; for (var i = 0; i < subscribers[this.topic].length; i++) subscribers[this.topic][i](this.value); }; var createslider = function createslider(topic, label) { var slider = document.createelement('div'); slider.classname = 'ui-input-slider'; slider.setattribute('data-topic', topic); if (label !== undefined) slider.setattribute('data-info', label); new inputslider(slider); return slider; }; var init = function init() { var...
...= function createslider(topic, label) { var slider = document.createelement('div'); slider.classname = 'ui-input-slider'; slider.setattribute('data-topic', topic); if (label !== undefined) slider.setattribute('data-info', label); new inputslider(slider); return slider; }; var init = function init() { var elem = document.queryselectorall('.ui-input-slider'); var size = elem.length; for (var i = 0; i < size; i++) new inputslider(elem[i]); }; return { init : init, setmax : setmax, setmin : setmin, setunit : setunit, setstep : setstep, getnode : getnode, getstep : getstep, setvalue : setvalue, subscribe : subscribe, unsubscribe : unsubscribe, setprecision : setprecision, setsensivity : setsensivity, getprecision : getprecision, createslider...
...c); dropdown.classname = 'ui-dropdown'; for (var i in options) { var x = document.createelement('div'); x.setattribute('data-value', i); x.textcontent = options[i]; dropdown.appendchild(x); } new dropdown(dropdown); return dropdown; }; var setvalue = function setvalue(topic, index) { if (dropdowns[topic] === undefined || index >= dropdowns[topic].dropmenu.children.length) return; dropdowns[topic].setnodevalue(dropdowns[topic].dropmenu.children[index]); }; var subscribe = function subscribe(topic, callback) { if (subscribers[topic] === undefined) subscribers[topic] = []; subscribers[topic].push(callback); }; var unsubscribe = function unsubscribe(topic, callback) { var index = subscribers[topic].indexof(callback); subscribers[topic].splice(i...
...And 8 more matches
border-bottom-left-radius - CSS: Cascading Style Sheets
0%; /* same as above: 20% of horizontal(width) and vertical(height) */ border-bottom-left-radius: 20% 20%; /* 20% of horizontal(width) and 10% of vertical(height) */ border-bottom-left-radius: 20% 10%; /* the corner is an ellipse */ /* border-bottom-left-radius: horizontal vertical */ border-bottom-left-radius: 0.5em 1em; border-bottom-left-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
...0% of vertical(height) */ border-bottom-left-radius: 20% 10%; /* the corner is an ellipse */ /* border-bottom-left-radius: horizontal vertical */ border-bottom-left-radius: 0.5em 1em; border-bottom-left-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
... */ border-bottom-left-radius: 0.5em 1em; border-bottom-left-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
...And 8 more matches
border-bottom-right-radius - CSS: Cascading Style Sheets
der-bottom-right-radius: 20% 20%; /* same as above */ /* 20% of horizontal(width) and vertical(height) */ border-bottom-right-radius: 20% 10%; /* 20% of horizontal(width) and 10% of vertical(height) */ /*the corner is an ellipse */ /* border-bottom-right-radius: horizontal vertical */ border-bottom-right-radius: 0.5em 1em; border-bottom-right-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
... /* 20% of horizontal(width) and 10% of vertical(height) */ /*the corner is an ellipse */ /* border-bottom-right-radius: horizontal vertical */ border-bottom-right-radius: 0.5em 1em; border-bottom-right-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
.../ border-bottom-right-radius: 0.5em 1em; border-bottom-right-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
...And 8 more matches
border-top-left-radius - CSS: Cascading Style Sheets
dius css property, the value of this property is then reset to its initial value by the shorthand property.
... */ /* border-top-left-radius: radius */ border-top-left-radius: 3px; /* the corner is an ellipse */ /* border-top-left-radius: horizontal vertical */ border-top-left-radius: 0.5em 1em; border-top-left-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
...tical */ border-top-left-radius: 0.5em 1em; border-top-left-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
...And 8 more matches
border-top-right-radius - CSS: Cascading Style Sheets
css property, the value of this property is then reset to its initial value by the shorthand property.
...* border-top-right-radius: radius */ border-top-right-radius: 3px; /* the corner is an ellipse */ /* border-top-right-radius: horizontal vertical */ border-top-right-radius: 0.5em 1em; border-top-right-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
...cal */ border-top-right-radius: 0.5em 1em; border-top-right-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
...And 8 more matches
font-size - CSS: Cascading Style Sheets
Web › CSS › font-size
the font-size css property sets the size of the font.
...ribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...t-size: xxx-large; /* <relative-size> values */ font-size: smaller; font-size: larger; /* <length> values */ font-size: 12px; font-size: 0.8em; /* <percentage> values */ font-size: 80%; /* global values */ font-size: inherit; font-size: initial; font-size: unset; the font-size property is specified in one of the following ways: as one of the absolute-size or relative-size keywords as a <length> or a <percentage>, relative to the parent element's font size values xx-small, x-small, small, medium, large, x-large, xx-large, xxx-large absolute-size keywords, based on the user's default font size (which is medium).
...And 8 more matches
<textarea> - HTML: Hypertext Markup Language
Web › HTML › Element › textarea
orm the form element that the <textarea> element is associated with (its "form owner").
...his attribute is not specified, the <textarea> element must be a descendant of a form element.
...he right hand corner, which can be used to alter the size of the element on the page.
...And 8 more matches
JavaScript modules - JavaScript
ich can be used to output report data into.
... name — a constant containing the string 'square'.
...> attribute is used to denote when a module is being pointed to, as you'll see below.
...And 8 more matches
Array.prototype.push() - JavaScript
the push() method adds one or more elements to the end of an array and returns the new length of the array.
...he new length of the array.
...tax arr.push([element1[, ...[, elementn]]]) parameters elementn the element(s) to add to the end of the array.
...And 8 more matches
String.prototype.normalize() - JavaScript
.
...sole.log(string1); // ñ console.log(string2); // ñ however, since the code points are different, string comparison will not treat them as equal.
...string2); // ñ however, since the code points are different, string comparison will not treat them as equal.
...And 8 more matches
<mpadded> - MathML
the mathml <mpadded> element is used to add extra padding and to set the general adjustment of position and size of enclosed contents.
... the mathml <mpadded> element is used to add extra padding and to set the general adjustment of position and size of enclosed contents.
... the mathml <mpadded> element is used to add extra padding and to set the general adjustment of position and size of enclosed contents.
...And 8 more matches
-ms-scroll-snap-points-x - Archive of obsolete content
the -ms-scroll-snap-points-x css property is a microsoft extension that specifies where snap-points will be located along the x-axis.
... the -ms-scroll-snap-points-x css property is a microsoft extension that specifies where snap-points will be located along the x-axis.
...rty is a microsoft extension that specifies where snap-points will be located along the x-axis.
...And 7 more matches
-ms-scroll-snap-points-y - Archive of obsolete content
the -ms-scroll-snap-points-y css property is a microsoft extension that specifies where snap-points will be located along the y-axis.
... the -ms-scroll-snap-points-y css property is a microsoft extension that specifies where snap-points will be located along the y-axis.
...rty is a microsoft extension that specifies where snap-points will be located along the y-axis.
...And 7 more matches
Processing XML with E4X - Archive of obsolete content
nux</os> <browser>firefox</browser> <language>javascript</language> <language>python</language> </likes> </person>; alert(person.name); // bob smith alert(person['name']); // bob smith alert(person.likes.browser); // firefox alert(person['likes'].browser); // firefox if you access something with more than one matching element, you get back an xmllist: alert(person.likes.language.length()); // 2 as with the dom, * can be used to access all child nodes: alert(person.likes.*.length()); // 4 while the .
...wser); // firefox if you access something with more than one matching element, you get back an xmllist: alert(person.likes.language.length()); // 2 as with the dom, * can be used to access all child nodes: alert(person.likes.*.length()); // 4 while the .
...you access something with more than one matching element, you get back an xmllist: alert(person.likes.language.length()); // 2 as with the dom, * can be used to access all child nodes: alert(person.likes.*.length()); // 4 while the .
...And 7 more matches
Enc Dec MAC Output Public Key as CSR
cksize]; unsigned int ptextlen; unsigned char mac[digestsize]; unsigned int maclen; unsigned int nwritten; unsigned char encbuf[blocksize]; unsigned int encbuflen; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned int pad[1]; secitem paditem; unsigned int paddinglength = 0; static unsigned int firsttime = 1; int j; ctxmac = pk11_createcontextbysymkey(ckm_md5_hmac, cka_sign, mk, &noparams); if (ctxmac == null) { pr_fprintf(pr_stderr, "can't create mac context\n"); rv = secfailure; goto cleanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen,...
...leanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm_aes_cbc); /* read a buffer of plaintext from input file */ while ((ptextlen = pr_read(infile, ptext, sizeof(ptext))) > 0) { /* encrypt using it using cbc, using previously created iv */ if (ptextlen != blocksize) { paddinglength = blocksize - ptextlen; for ( j=0; j < paddinglength; j++) { ptext[ptextlen+j] = (unsigned char)paddinglength; } ptextlen = blocksize; } rv = encrypt(ctxenc, encbuf, &encbuflen, sizeof(encbuf), ptext, ptextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "encrypt failure\n")...
...buf, encbuflen); /*pr_assert(nwritten == encbuflen);*/ rv = macupdate(ctxmac, ptext, ptextlen); if (rv != secsuccess) goto cleanup; } rv = macfinal(ctxmac, mac, &maclen, digestsize); if (rv != secsuccess) { pr_fprintf(pr_stderr, "macfinal failure\n"); goto cleanup; } if (maclen == 0) { pr_fprintf(pr_stderr, "bad mac length\n"); rv = secfailure; goto cleanup; } writetoheaderfile(mac, maclen, mac, headerfile); if (rv != secsuccess) { pr_fprintf(pr_stderr, "write mac failure\n"); goto cleanup; } pad[0] = paddinglength; paditem.type = sibuffer; paditem.data = (unsigned char *)pad; paditem.len = sizeof(pad[0]); writetoheaderfile(paditem.data, paditem...
...And 7 more matches
Working with ArrayBuffers
yimgdat = new imagedata(imgwidth, imgheight); method 1: passing arraytype cdata to uint8clampedarray.prototype.set one method is to get into a js-ctypes array, and then set it into the imagedata, as illustrated by the following code example.
...ght); method 1: passing arraytype cdata to uint8clampedarray.prototype.set one method is to get into a js-ctypes array, and then set it into the imagedata, as illustrated by the following code example.
...es a couple of milliseconds, however, the myimgdat.data.set takes up to 800ms for a size of 52,428,800 (which is image size of 1280 x 1024 pixels).
...And 7 more matches
URLs - Plugins
ability to post form data to cgi scripts using http or upload files to a remote server using ftp.
...ter identifies a local temporary file or data buffer that contains the data to post.
...s as those of npn_posturl.
...And 7 more matches
PluginArray - Web APIs
the pluginarray interface is used to store a list of plugin objects describing the available plugins; it's returned by the window.navigator.plugins property.
...ugins; it's returned by the window.navigator.plugins property.
...y the number of plugins in the array.
...And 7 more matches
clip-path - CSS: Cascading Style Sheets
Web › CSS › clip-path
der-boxcomputed valueas specified, but with <url> values made absoluteanimation typeyes, as specified for <basic-shape>, otherwise no formal syntax <clip-source> | [ <basic-shape> | <geometry-box> ] | nonewhere <clip-source> = <url><basic-shape> = <inset()> | <circle()> | <ellipse()> | <polygon()> | <path()><geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <inset()> = inset( <length-percentage>{1,4} [ round <'border-radius'> ]?
...rce> = <url><basic-shape> = <inset()> | <circle()> | <ellipse()> | <polygon()> | <path()><geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <inset()> = inset( <length-percentage>{1,4} [ round <'border-radius'> ]?
...hape> = <inset()> | <circle()> | <ellipse()> | <polygon()> | <path()><geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <inset()> = inset( <length-percentage>{1,4} [ round <'border-radius'> ]?
...And 7 more matches
height - CSS: Cascading Style Sheets
Web › CSS › height
ox, however, it instead determines the height of the border area.
...e to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...* global values */ height: inherit; height: initial; height: unset; values <length> defines the height as an absolute value.
...And 7 more matches
mask-size - CSS: Cascading Style Sheets
Web › CSS › mask-size
commas.
...of three ways: using the keyword contain using the keyword cover using width and height values to specify a size using width and height, you can supply one or two values: if only one value is given it sets the width, with the height set to auto.
...s: using the keyword contain using the keyword cover using width and height values to specify a size using width and height, you can supply one or two values: if only one value is given it sets the width, with the height set to auto.
...And 7 more matches
offset-distance - CSS: Cascading Style Sheets
the offset-distance css property specifies a position along an offset-path for an element to be placed.
... the offset-distance css property specifies a position along an offset-path for an element to be placed.
... the offset-distance css property specifies a position along an offset-path for an element to be placed.
...And 7 more matches
text-indent - CSS: Cascading Style Sheets
the text-indent css property sets the length of empty space (indentation) that is put before lines of text in a block.
...text in a block.
... block-level element's content box.
...And 7 more matches
transform - CSS: Cascading Style Sheets
Web › CSS › transform
rn off animations if the user has reduced animation specified in their system preferences.
...s reduced animation specified in their system preferences.
...on>+where <transform-function> = <matrix()> | <translate()> | <translatex()> | <translatey()> | <scale()> | <scalex()> | <scaley()> | <rotate()> | <skew()> | <skewx()> | <skewy()> | <matrix3d()> | <translate3d()> | <translatez()> | <scale3d()> | <scalez()> | <rotate3d()> | <rotatex()> | <rotatey()> | <rotatez()> | <perspective()>where <matrix()> = matrix( <number>#{6} )<translate()> = translate( <length-percentage> , <length-percentage>?
...And 7 more matches
transform-origin - SVG: Scalable Vector Graphics
the transform-origin svg attribute sets the origin for an item’s transformations.
...e sets the origin for an item’s transformations.
... note: as a presentation attribute in svg, transform-origin corresponds in syntax and behavior to the transform-origin property in css, and can be used as css property to style svg.
...And 7 more matches
Index - Archive of obsolete content
no summary!
...x.currentindex xul properties, xul reference no summary!
... tabbox.tabs xul properties, xul reference no summary!
...And 6 more matches
Anatomy of a video game - Game development
lly * think this whole example continues from the previous line.
...e example continues from the previous line.
...d between these two rendered frames.
...And 6 more matches
TypeScript support in Svelte - Learn web development
te, like before.
...ur export let todos line with the following: import type { todotype } from '../types/todo.type' export let todos: todotype[] notice that now typescript can infer that the t variable in todos.filter(t => t.completed) is of type todotype.
...e) => t.completed).length most of the time typescript will be able to correctly infer the reactive variable type, but sometimes you might get an "implicitly has an 'any' type" error when working with reactive assignments.
...And 6 more matches
JNI.jsm
javascript string.
...eturn value this function has no return value, if you try to store the return value in a variable, it will be undefined.
...ray, size_is(arr.length > number anynumber > 0)] in cdata avalsarray); .get() gets the value of the element in the array at given aindex.
...And 6 more matches
Bytecode Descriptions
getting a method in order to call it.
...tvalue step 5.
...om, jof_prop, jof_typeset, jof_ic getelem, callelem stack: obj, key ⇒ obj[key] get the value of the property obj[key].
...And 6 more matches
imgIEncoder
modules/libpr0n/public/imgiencoder.idlscriptable please add a summary to this article.
... modules/libpr0n/public/imgiencoder.idlscriptable please add a summary to this article.
...thod overview void addimageframe( [array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 frameformat, in astring frameoptions); void encodeclipboardimage(in nsiclipboardimage aclipboardimage, out nsifile aimagefile); obsolete since gecko 1.9 void endimageencode(); void initfromdata([array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 inputformat, in astring outputoptions); void startimageencode(in pruint32 width, in pruint32 height, in pruint32 inputformat, in astring outputoptions); constants possible values for input format (note that not all image formats support saving alpha channels): consta...
...And 6 more matches
nsIPrefLocalizedString
rapper interface for nsisupportsstring so the preferences service can have a unique identifier to distinguish between requests for normal wide strings nsisupportsstring) and 'localized' wide strings, which get their default values from properites files.
...supportsstring so the preferences service can have a unique identifier to distinguish between requests for normal wide strings nsisupportsstring) and 'localized' wide strings, which get their default values from properites files.
... the preferences service can have a unique identifier to distinguish between requests for normal wide strings nsisupportsstring) and 'localized' wide strings, which get their default values from properites files.
...And 6 more matches
WebIDL bindings
with that in mind, the generated iterable bindings expect the wrapper object to provide certain methods for the interface to access.
... more information on building this kind of structure.
...tter is declared to return.
...And 6 more matches
Using files from web applications - Web APIs
eventlistener("change", handlefiles, false); function handlefiles() { const filelist = this.files; /* now you can work with the file list */ } getting information about selected file(s) the filelist object provided by the dom lists all of the files selected by the user, each specified as a file object.
...function handlefiles() { const filelist = this.files; /* now you can work with the file list */ } getting information about selected file(s) the filelist object provided by the dom lists all of the files selected by the user, each specified as a file object.
...lected file(s) the filelist object provided by the dom lists all of the files selected by the user, each specified as a file object.
...And 6 more matches
SubtleCrypto.importKey() - Web APIs
wkey, "aes-gcm", true, ["encrypt", "decrypt"] ); } pkcs #8 import this example imports an rsa private signing key from a pem-encoded pkcs #8 object.
...t this example imports an rsa private signing key from a pem-encoded pkcs #8 object.
... for rsa-pss signing.
...And 6 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
logglerror("glclear"); const deltatime = (time - lastframetime) * 0.001; // convert to seconds lastframetime = time; for (let view of pose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); logglerror(`setting viewport for eye: ${view.eye}`); gl.canvas.width = viewport.width * pose.views.length; gl.canvas.height = viewport.height; drawscene(gl, view, programinfo, buffers, texture, deltatime); } } } the first thing we do is call requestanimationframe() to request that drawframe() be called again for the next frame to be rendered.
...bgl sample from which this code is derived.
... a matrix for instructive purposes, this example displays the contents of the important matrices used while rendering the scene.
...And 6 more matches
Box-shadow generator - CSS: Cascading Style Sheets
allback) { subscribers[topic].indexof(callback); subscribers[topic].splice(index, 1); } var notify = function notify() { if (subscribers[this.topic] === undefined) return; for (var i in subscribers[this.topic]) { subscribers[this.topic][i](this.value); } } var init = function init() { var elem, size; elem = document.queryselectorall('.ui-slider-btn-set'); size = elem.length; for (var i = 0; i < size; i++) setbuttoncomponent(elem[i]); elem = document.queryselectorall('.ui-slider-input'); size = elem.length; for (var i = 0; i < size; i++) setinputcomponent(elem[i]); elem = document.queryselectorall('.ui-slider'); size = elem.length; for (var i = 0; i < size; i++) new slider(elem[i]); } return { init : init, setvalue : setvalue, subscr...
...callback) { if (subscribers[topic] === undefined) subscribers[topic] = []; subscribers[topic].push(callback); } var unsubscribe = function unsubscribe(topic, callback) { subscribers[topic].indexof(callback); subscribers[topic].splice(index, 1); } var notify = function notify() { if (subscribers[this.topic] === undefined) return; for (var i = 0; i < subscribers[this.topic].length; i++) subscribers[this.topic][i](this.checkbox.checked); } var init = function init() { var elem = document.queryselectorall('.ui-checkbox'); var size = elem.length; for (var i = 0; i < size; i++) new checkbox(elem[i]); } return { init : init, setvalue : setvalue, subscribe : subscribe, unsubscribe : unsubscribe } })(); window.addeventlistener("load", function(){ bo...
...cmax) saturation = delta / cmax; } this.hue = 60 * hue | 0; if (this.hue < 0) this.hue += 360; this.saturation = (saturation * 100) | 0; this.value = (cmax * 100) | 0; } color.prototype.sethexa = function sethexa(value) { var valid = /(^#{0,1}[0-9a-f]{6}$)|(^#{0,1}[0-9a-f]{3}$)/i.test(value) if (valid !== true) return; if (value[0] === '#') value = value.slice(1, value.length); if (value.length === 3) value = value.replace(/([0-9a-f])([0-9a-f])([0-9a-f])/i,"$1$1$2$2$3$3"); this.r = parseint(value.substr(0, 2), 16); this.g = parseint(value.substr(2, 2), 16); this.b = parseint(value.substr(4, 2), 16); this.alpha = 1; } color.prototype.gethexa = function gethexa() { var r = this.r.tostring(16); var g = this.g.tostring(16); var b = this.b.tostring...
...And 6 more matches
Color picker tool - CSS: Cascading Style Sheets
unction setlightness(value) { if (typeof(value) !== 'number' || isnan(value) === true || value < 0 || value > 100) return; this.lightness = value; this.hsltorgb(); }; color.prototype.sethexa = function sethexa(value) { var valid = /(^#{0,1}[0-9a-f]{6}$)|(^#{0,1}[0-9a-f]{3}$)/i.test(value); if (valid !== true) return; if (value[0] === '#') value = value.slice(1, value.length); if (value.length === 3) value = value.replace(/([0-9a-f])([0-9a-f])([0-9a-f])/i,'$1$1$2$2$3$3'); this.r = parseint(value.substr(0, 2), 16); this.g = parseint(value.substr(2, 2), 16); this.b = parseint(value.substr(4, 2), 16); this.alpha = 1; this.rgbtohsv(); }; /*========== conversion methods ==========*/ color.prototype.converttohsl = function converttohsl() { if (this...
... }; var subscribe = function subscribe(topic, callback) { if (subscribers[topic] === undefined) subscribers[topic] = []; subscribers[topic].push(callback); }; var unsubscribe = function unsubscribe(callback) { subscribers.indexof(callback); subscribers.splice(index, 1); }; var notify = function notify(topic, value) { if (subscribers[topic] === undefined || subscribers[topic].length === 0) return; var color = new color(value); for (var i in subscribers[topic]) subscribers[topic][i](color); }; var init = function init() { var elem = document.queryselectorall('.ui-color-picker'); var size = elem.length; for (var i = 0; i < size; i++) new colorpicker(elem[i]); }; return { init : init, color : color, rgbcolor : rgbcolor, rgbacolor : rgbacolor, ...
...allback) { if (subscribers[topic] === undefined) subscribers[topic] = []; subscribers[topic].push(callback); }; var unsubscribe = function unsubscribe(topic, callback) { subscribers[topic].indexof(callback); subscribers[topic].splice(index, 1); }; var notify = function notify() { if (subscribers[this.topic] === undefined) return; for (var i = 0; i < subscribers[this.topic].length; i++) subscribers[this.topic][i](this.value); }; var createslider = function createslider(topic, label) { var slider = document.createelement('div'); slider.classname = 'ui-input-slider'; slider.setattribute('data-topic', topic); if (label !== undefined) slider.setattribute('data-info', label); new inputslider(slider); return slider; }; var init = function init() { var...
...And 6 more matches
background-size - CSS: Cascading Style Sheets
/ background-size: inherit; background-size: initial; background-size: unset; the background-size property is specified in one of the following ways: using the keyword values contain or cover.
...age as large as possible without cropping or stretching the image.
...ales the image as large as possible without stretching the image.
...And 6 more matches
border-end-end-radius - CSS: Cascading Style Sheets
the border-end-end-radius css property defines a logical border radius on an element, which maps to a physical border radius that depends on on the element's writing-mode, direction, and text-orientation.
...e */ border-end-end-radius: 10px; border-end-end-radius: 1em; /* with two values the corner will be an ellipse */ border-end-end-radius: 1em 2em; /* global values */ border-end-end-radius: inherit; border-end-end-radius: initial; border-end-end-radius: unset; for instance, in a horizontal-tb writing mode this property corresponds to the border-bottom-right-radius property.
...d-end-radius: 1em 2em; /* global values */ border-end-end-radius: inherit; border-end-end-radius: initial; border-end-end-radius: unset; for instance, in a horizontal-tb writing mode this property corresponds to the border-bottom-right-radius property.
...And 6 more matches
border-end-start-radius - CSS: Cascading Style Sheets
the border-end-start-radius css property defines a logical border radius on an element, which maps to a physical border radius depending on the element's writing-mode, direction, and text-orientation.
...er-end-start-radius: 10px; border-end-start-radius: 1em; /* with two values the corner will be an ellipse */ border-end-start-radius: 1em 2em; /* global values */ border-end-start-radius: inherit; border-end-start-radius: initial; border-end-start-radius: unset; for instance, in a horizontal-tb writing mode this property corresponds to the border-top-right-radius property.
...rt-radius: 1em 2em; /* global values */ border-end-start-radius: inherit; border-end-start-radius: initial; border-end-start-radius: unset; for instance, in a horizontal-tb writing mode this property corresponds to the border-top-right-radius property.
...And 6 more matches
border-spacing - CSS: Cascading Style Sheets
e cells in the first/last column or row is the sum of the relevant (horizontal or vertical) border-spacing and the relevant (top, right, bottom, or left) padding on the table.
...um of the relevant (horizontal or vertical) border-spacing and the relevant (top, right, bottom, or left) padding on the table.
...horizontal or vertical) border-spacing and the relevant (top, right, bottom, or left) padding on the table.
...And 6 more matches
border-start-end-radius - CSS: Cascading Style Sheets
the border-start-end-radius css property defines a logical border radius on an element, which maps to a physical border radius depending on the element's writing-mode, direction, and text-orientation.
...-start-end-radius: 10px; border-start-end-radius: 1em; /* with two values the corner will be an ellipse */ border-start-end-radius: 1em 2em; /* global values */ border-start-end-radius: inherit; border-start-end-radius: initial; border-start-end-radius: unset; for instance, in a horizontal-tb writing mode this property corresponds to the border-bottom-left-radius property.
...-radius: 1em 2em; /* global values */ border-start-end-radius: inherit; border-start-end-radius: initial; border-start-end-radius: unset; for instance, in a horizontal-tb writing mode this property corresponds to the border-bottom-left-radius property.
...And 6 more matches
border-start-start-radius - CSS: Cascading Style Sheets
the border-start-start-radius css property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's writing-mode, direction, and text-orientation.
...art-radius: 10px; border-start-start-radius: 1em; /* with two values the corner will be an ellipse */ border-start-start-radius: 1em 2em; /* global values */ border-start-start-radius: inherit; border-start-start-radius: initial; border-start-start-radius: unset; for instance, in a horizontal-tb writing mode this property corresponds to the border-top-left-radius property.
...dius: 1em 2em; /* global values */ border-start-start-radius: inherit; border-start-start-radius: initial; border-start-start-radius: unset; for instance, in a horizontal-tb writing mode this property corresponds to the border-top-left-radius property.
...And 6 more matches
column-gap (grid-column-gap) - CSS: Cascading Style Sheets
box alignment, it may be used in multi-column, flexible box, and grid layouts.
... */ column-gap: 3px; column-gap: 2.5em; /* <percentage> value */ column-gap: 3%; /* global values */ column-gap: inherit; column-gap: initial; column-gap: unset; the column-gap property is specified as one of the values listed below.
...ue */ column-gap: 3%; /* global values */ column-gap: inherit; column-gap: initial; column-gap: unset; the column-gap property is specified as one of the values listed below.
...And 6 more matches
offset-position - CSS: Cascading Style Sheets
the offset-position css property defines the initial position of the offset-path.
...osition>.
...sition.
...And 6 more matches
shape-margin - CSS: Cascading Style Sheets
css shape created using shape-outside.
...thub.com/mdn/interactive-examples and send us a pull request.
...quest.
...And 6 more matches
transform-origin - CSS: Cascading Style Sheets
or three values, where each value represents an offset.
... values.
...is center, then the first value represents the horizontal offset and the second represents the vertical offset.
...And 6 more matches
vertical-align - CSS: Cascading Style Sheets
amily: monospace; } note that vertical-align only applies to inline, inline-block and table-cell elements: you can't use it to vertically align block-level elements.
... subscript-baseline of its parent.
...eline of the element with the superscript-baseline of its parent.
...And 6 more matches
width - CSS: Cascading Style Sheets
Web › CSS › width
idth of the content area, but if box-sizing is set to border-box, it sets the width of the border area.
....
...300px; width: 25em; /* <percentage> value */ width: 75%; /* keyword values */ width: max-content; width: min-content; width: fit-content(20em); width: auto; /* global values */ width: inherit; width: initial; width: unset; the width property is specified as either: one of the following keyword values: min-content, max-content, fit-content, auto.
...And 6 more matches
Functions - JavaScript
return n < 2 ?
...new array let i; // declare variable for (i = 0; i != a.length; i++) result[i] = f(a[i]); return result; } in the following code, the function receives a function defined by a function expression and executes it for every element of the array received as a second argument.
... condition (equivalent to "!(x < 10)") return; // do stuff loop(x + 1); // the recursive call } loop(0); however, some algorithms cannot be simple iterative loops.
...And 6 more matches
TypeError: can't delete non-configurable array element - JavaScript
the javascript exception "can't delete non-configurable array element" occurs when it was attempted to shorten the length of an array, but one of the array's elements is non-configurable.
... javascript exception "can't delete non-configurable array element" occurs when it was attempted to shorten the length of an array, but one of the array's elements is non-configurable.
...ut one of the array's elements is non-configurable.
...And 6 more matches
Array() constructor - JavaScript
the array() constructor is used to create array objects.
... the array() constructor is used to create array objects.
...arraylength) parameters elementn a javascript array is initialized with the given elements, except in the case where a single argument is passed to the array constructor and that argument is a number (see the arraylength parameter below).
...And 6 more matches
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.
...ng (multiple times, if needed) until the resulting string reaches the given length.
...sulting string reaches the given length.
...And 6 more matches
String.prototype.substring() - JavaScript
t not including indexend.
...dexend is omitted, substring() extracts characters to the end of the string.
... console.log(anystring.substring(0, 1)) console.log(anystring.substring(1, 0)) // displays 'mozill' console.log(anystring.substring(0, 6)) // displays 'lla' console.log(anystring.substring(4)) console.log(anystring.substring(4, 7)) console.log(anystring.substring(7, 4)) // displays 'mozilla' console.log(anystring.substring(0, 7)) console.log(anystring.substring(0, 10)) using substring() with length property the following example uses the substring() method and length property to extract the last characters of a particular string.
...And 6 more matches
kerning - SVG: Scalable Vector Graphics
Web › SVG › Attribute › kerning
the kerning attribute indicates whether the spacing between glyphs should be adjusted based on kerning tables that are included in the relevant font (i.e., enable auto-kerning) or instead disable auto-kerning and set the spacing between them to a specific length (typically, zero).
...t but it has effect only on the following four elements: <altglyph>, <textpath>, <text>, <tref>, and <tspan> html, body, svg { height: 100%; font: 36px verdana, helvetica, arial, sans-serif; } <svg viewbox="0 0 150 125" xmlns="http://www.w3.org/2000/svg"> <text x="10" y="30" kerning="auto">auto</text> <text x="10" y="70" kerning="0">number</text> <text x="10" y="110" kerning="20px">length</text> </svg> usage notes value auto | <length> default value auto animatable yes auto this value indicates that the spacing between glyphs is adjusted based on kerning tables that are included in the font that will be used.
..." kerning="auto">auto</text> <text x="10" y="70" kerning="0">number</text> <text x="10" y="110" kerning="20px">length</text> </svg> usage notes value auto | <length> default value auto animatable yes auto this value indicates that the spacing between glyphs is adjusted based on kerning tables that are included in the font that will be used.
...And 6 more matches
XML Assignments - Archive of obsolete content
« previousnext » sometimes, you will want to use a more complex substitution apart from just taking an attribute from the xml.
... « previousnext » sometimes, you will want to use a more complex substitution apart from just taking an attribute from the xml.
...isplay not the name of a person, but the length of their name.
...And 5 more matches
textbox - Archive of obsolete content
perties | methods | related ] an input field where the user can enter text.
...ext, hidespinbuttons, increment, label, max, maxlength, min, multiline, newlines, onblur, onchange, onfocus, oninput, placeholder, preference, readonly, rows, searchbutton, size, spellcheck, tabindex, timeout, type, value, wrap, wraparound properties accessibletype, clickselectsall, decimalplaces, decimalsymbol, defaultvalue, disabled, editor, emptytext, increment, inputfield, label, max, maxlength, min, placeholder, readonly, searchbutton, selectionend, selectionstart, size, spinbuttons, tabindex, textlength, timeout, type, value, valuenumber, wraparound methods decrease, increase, reset, select, setselectionrange style classes plain examples <vbox> <label control="your-name" value="enter your name:"/> <textbox id="your-name" value="john"/> </vbox> attributes col...
...s and scale) attribute changes when the arrows are clicked(or scales are dragged).
...And 5 more matches
Backgrounds and borders - Learn web development
e below.
...o.
... the right size to fit inside the box.
...And 5 more matches
Debugging on Windows
nsiatom=<mstring,su> ; the following are not necessary in vc8 nscomptr<*>=<mrawptr,x> nsrefptr=<mrawptr,x> nsautoptr=<mrawptr,x> after you have made the changes and saved the file, you will need to restart visual c++ for the changes to take effect.
...mstring,su> ; the following are not necessary in vc8 nscomptr<*>=<mrawptr,x> nsrefptr=<mrawptr,x> nsautoptr=<mrawptr,x> after you have made the changes and saved the file, you will need to restart visual c++ for the changes to take effect.
...sary in vc8 nscomptr<*>=<mrawptr,x> nsrefptr=<mrawptr,x> nsautoptr=<mrawptr,x> after you have made the changes and saved the file, you will need to restart visual c++ for the changes to take effect.
...And 5 more matches
Encrypt Decrypt MAC Keys As Session Objects
cksize]; unsigned int ptextlen; unsigned char mac[digestsize]; unsigned int maclen; unsigned int nwritten; unsigned char encbuf[blocksize]; unsigned int encbuflen; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned int pad[1]; secitem paditem; unsigned int paddinglength; static unsigned int firsttime = 1; int j; ctxmac = pk11_createcontextbysymkey(ckm_md5_hmac, cka_sign, mk, &noparams); if (ctxmac == null) { pr_fprintf(pr_stderr, "can't create mac context\n"); rv = secfailure; goto cleanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm...
...eanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm_aes_cbc); /* read a buffer of plaintext from input file */ while ((ptextlen = pr_read(infile, ptext, sizeof(ptext))) > 0) { /* encrypt using it using cbc, using previously created iv */ if (ptextlen != blocksize) { paddinglength = blocksize - ptextlen; for ( j=0; j < paddinglength; j++) { ptext[ptextlen+j] = (unsigned char)paddinglength; } ptextlen = blocksize; } rv = encrypt(ctxenc, encbuf, &encbuflen, sizeof(encbuf), ptext, ptextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "encrypt failure\n")...
...mediate file */ nwritten = pr_write(encfile, encbuf, encbuflen); /*pr_assert(nwritten == encbuflen);*/ rv = macupdate(ctxmac, ptext, ptextlen); } rv = macfinal(ctxmac, mac, &maclen, digestsize); if (rv != secsuccess) { pr_fprintf(pr_stderr, "macfinal failure\n"); goto cleanup; } if (maclen == 0) { pr_fprintf(pr_stderr, "bad mac length\n"); rv = secfailure; goto cleanup; } writetoheaderfile(mac, maclen, mac, headerfile); if (rv != secsuccess) { pr_fprintf(pr_stderr, "write mac failure\n"); goto cleanup; } pad[0] = paddinglength; paditem.type = sibuffer; paditem.data = (unsigned char *)pad; paditem.len = sizeof(pad[0]); writetoheaderfile(paditem.data, paditem...
...And 5 more matches
Encrypt and decrypt MAC using token
cksize]; unsigned int ptextlen; unsigned char mac[digestsize]; unsigned int maclen; unsigned int nwritten; unsigned char encbuf[blocksize]; unsigned int encbuflen; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned int pad[1]; secitem paditem; unsigned int paddinglength; static unsigned int firsttime = 1; int j; ctxmac = pk11_createcontextbysymkey(ckm_md5_hmac, cka_sign, mk, &noparams); if (ctxmac == null) { pr_fprintf(pr_stderr, "can't create mac context\n"); rv = secfailure; goto cleanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm...
...eanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm_aes_cbc); /* read a buffer of plaintext from input file */ while ((ptextlen = pr_read(infile, ptext, sizeof(ptext))) > 0) { /* encrypt using it using cbc, using previously created iv */ if (ptextlen != blocksize) { paddinglength = blocksize - ptextlen; for ( j=0; j < paddinglength; j++) { ptext[ptextlen+j] = (unsigned char)paddinglength; } ptextlen = blocksize; } rv = encrypt(ctxenc, encbuf, &encbuflen, sizeof(encbuf), ptext, ptextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "encrypt failure\n")...
...mediate file */ nwritten = pr_write(encfile, encbuf, encbuflen); /*pr_assert(nwritten == encbuflen);*/ rv = macupdate(ctxmac, ptext, ptextlen); } rv = macfinal(ctxmac, mac, &maclen, digestsize); if (rv != secsuccess) { pr_fprintf(pr_stderr, "macfinal failure\n"); goto cleanup; } if (maclen == 0) { pr_fprintf(pr_stderr, "bad mac length\n"); rv = secfailure; goto cleanup; } writetoheaderfile(mac, maclen, mac, headerfile); if (rv != secsuccess) { pr_fprintf(pr_stderr, "write mac failure\n"); goto cleanup; } pad[0] = paddinglength; paditem.type = sibuffer; paditem.data = (unsigned char *)pad; paditem.len = sizeof(pad[0]); writetoheaderfile(paditem.data, paditem...
...And 5 more matches
NSS Sample Code Sample_3_Basic Encryption and MACing
cksize]; unsigned int ptextlen; unsigned char mac[digestsize]; unsigned int maclen; unsigned int nwritten; unsigned char encbuf[blocksize]; unsigned int encbuflen; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned int pad[1]; secitem paditem; unsigned int paddinglength; static unsigned int firsttime = 1; int j; ctxmac = pk11_createcontextbysymkey(ckm_md5_hmac, cka_sign, mk, &noparams); if (ctxmac == null) { pr_fprintf(pr_stderr, "can't create mac context\n"); rv = secfailure; goto cleanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm...
...eanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm_aes_cbc); /* read a buffer of plaintext from input file */ while ((ptextlen = pr_read(infile, ptext, sizeof(ptext))) > 0) { /* encrypt using it using cbc, using previously created iv */ if (ptextlen != blocksize) { paddinglength = blocksize - ptextlen; for ( j=0; j < paddinglength; j++) { ptext[ptextlen+j] = (unsigned char)paddinglength; } ptextlen = blocksize; } rv = encrypt(ctxenc, encbuf, &encbuflen, sizeof(encbuf), ptext, ptextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "encrypt failure\n")...
...mediate file */ nwritten = pr_write(encfile, encbuf, encbuflen); /*pr_assert(nwritten == encbuflen);*/ rv = macupdate(ctxmac, ptext, ptextlen); } rv = macfinal(ctxmac, mac, &maclen, digestsize); if (rv != secsuccess) { pr_fprintf(pr_stderr, "macfinal failure\n"); goto cleanup; } if (maclen == 0) { pr_fprintf(pr_stderr, "bad mac length\n"); rv = secfailure; goto cleanup; } writetoheaderfile(mac, maclen, mac, headerfile); if (rv != secsuccess) { pr_fprintf(pr_stderr, "write mac failure\n"); goto cleanup; } pad[0] = paddinglength; paditem.type = sibuffer; paditem.data = (unsigned char *)pad; paditem.len = sizeof(pad[0]); writetoheaderfile(paditem.data, paditem...
...And 5 more matches
EncDecMAC using token object - sample 3
r *iv, unsigned int ivlen, prbool ascii) { secstatus rv; unsigned char ptext[blocksize]; unsigned int ptextlen; unsigned char mac[digestsize]; unsigned int maclen; unsigned int nwritten; unsigned char encbuf[blocksize]; unsigned int encbuflen; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned int pad[1]; secitem paditem; unsigned int paddinglength; static unsigned int firsttime = 1; int j; ctxmac = pk11_createcontextbysymkey(ckm_md5_hmac, cka_sign, mk, &noparams); if (ctxmac == null) { pr_fprintf(pr_stderr, "can't create mac context\n"); rv = secfailure; goto cleanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm_aes_cbc); /* read a buffer of plaintext from input file */ while ((pte...
...(pr_stderr, "can't create mac context\n"); rv = secfailure; goto cleanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm_aes_cbc); /* read a buffer of plaintext from input file */ while ((ptextlen = pr_read(infile, ptext, sizeof(ptext))) > 0) { /* encrypt using it using cbc, using previously created iv */ if (ptextlen != blocksize) { paddinglength = blocksize - ptextlen; for ( j=0; j < paddinglength; j++) { ptext[ptextlen+j] = (unsigned char)paddinglength; } ptextlen = blocksize; } rv = encrypt(ctxenc, encbuf, &encbuflen, sizeof(encbuf), ptext, ptextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "encrypt failure\n"); goto cleanup; } /* save the last block of ciphertext as the next iv */ iv = encbuf; ivlen = encbuflen; /* write the cip...
...v */ iv = encbuf; ivlen = encbuflen; /* write the cipher text to intermediate file */ nwritten = pr_write(encfile, encbuf, encbuflen); /*pr_assert(nwritten == encbuflen);*/ rv = macupdate(ctxmac, ptext, ptextlen); } rv = macfinal(ctxmac, mac, &maclen, digestsize); if (rv != secsuccess) { pr_fprintf(pr_stderr, "macfinal failure\n"); goto cleanup; } if (maclen == 0) { pr_fprintf(pr_stderr, "bad mac length\n"); rv = secfailure; goto cleanup; } writetoheaderfile(mac, maclen, mac, headerfile); if (rv != secsuccess) { pr_fprintf(pr_stderr, "write mac failure\n"); goto cleanup; } pad[0] = paddinglength; paditem.type = sibuffer; paditem.data = (unsigned char *)pad; paditem.len = sizeof(pad[0]); writetoheaderfile(paditem.data, paditem.len, pad, headerfile); if (rv != secsuccess) { pr_fprintf(pr_stderr, "...
...And 5 more matches
JS::AutoVectorRooter
this article covers features introduced in spidermonkey 17 base class that roots an internal variable-size array of type t.
... this article covers features introduced in spidermonkey 17 base class that roots an internal variable-size array of type t.
... this article covers features introduced in spidermonkey 17 base class that roots an internal variable-size array of type t.
...And 5 more matches
JS_EncodeStringToBuffer
this article covers features introduced in spidermonkey 1.8.5 convert a javascript string to a c string.
...size_t js_encodestringtobuffer(jscontext *cx, jsstring *str, char *buffer, size_t length); name type description cx jscontext * a context.
..., the caller must be in a request on this jscontext.
...And 5 more matches
JSAPI reference
z js_newdependentstring js_getemptystringvalue js_getemptystring added in spidermonkey 1.8.5 js_concatstrings js_comparestrings js_stringequalsascii added in spidermonkey 1.8.5 js_flatstringequalsascii added in spidermonkey 1.8.5 js_stringhaslatin1chars added in spidermonkey 38 js_getstringcharat added in spidermonkey 38 js_getflatstringcharat added in spidermonkey 38 js_getstringlength js_encodestring added in spidermonkey 1.8 js_encodestringtoutf8 added in spidermonkey 24 js_encodestringtobuffer added in spidermonkey 1.8.5 js_getstringencodinglength added in spidermonkey 1.8.5 js_getlatin1flatstringchars added in spidermonkey 38 js_gettwobyteflatstringchars added in spidermonkey 38 js_getlatin1stringcharsandlength added in spidermonkey 38 js_gettwobytestringcharsandlen...
...tringtoutf8 added in spidermonkey 24 js_encodestringtobuffer added in spidermonkey 1.8.5 js_getstringencodinglength added in spidermonkey 1.8.5 js_getlatin1flatstringchars added in spidermonkey 38 js_gettwobyteflatstringchars added in spidermonkey 38 js_getlatin1stringcharsandlength added in spidermonkey 38 js_gettwobytestringcharsandlength added in spidermonkey 38 js::getdeflatedutf8stringlength added in spidermonkey 38 js::deflatestringtoutf8buffer added in spidermonkey 38 js_fileescapedstring added in spidermonkey 1.8.5 js_putescapedstring added in spidermonkey 1.8.5 js_putescapedflatstring added in spidermonkey 1.8.5 js_forget_string_flatness added in spidermonkey 1.8.5 js_stringisflat added in spidermonkey 38 js_assert_string_is_flat added in spidermonkey 1.8.5 js_flatt...
... spidermonkey 1.8.5 js_flattenstring added in spidermonkey 1.8.5 typedef jschar obsolete since jsapi 35 js_newstring obsolete since jsapi 1.8.5 js_newgrowablestring obsolete since jsapi 27 js_getstringbytes obsolete since jsapi 1.8.5 js_getstringbytesz obsolete since jsapi 1.8.5 js_getstringchars obsolete since jsapi 1.8.5 js_getstringcharsz obsolete since jsapi 33 js_getstringcharsandlength added in jsapi 1.8.5 obsolete since jsapi 33 js_getstringcharsz added in spidermonkey 1.8.5 obsolete since jsapi 33 js_getstringcharszandlength added in spidermonkey 1.8.5 obsolete since jsapi 33 js_getflatstringchars obsolete since jsapi 33 js_makestringimmutable obsolete since javascript 1.8.5 js_encodecharacters obsolete since jsapi 19 js_cstringsareutf8 obsolete since jsapi 19 js_setcs...
...And 5 more matches
Using the clipboard
face(ci.nsiwebnavigation); res.init(source); } return res; } here, the string "text to copy" will be copied but you can replace this with the text string that you want to copy.
...this with the text string that you want to copy.
...ansferable that it needs to transfer data of a certain flavor.
...And 5 more matches
AuthenticatorAssertionResponse.authenticatorData - Web APIs
henticatorassertionresponse interface returns an arraybuffer containing information from the authenticator such as the relying party id hash (rpidhash), a signature counter, test of user presence, user verification flags, and any extensions processed by the authenticator.
...n data (ed) - if set, extension data is present.
...ials.create() call.
...And 5 more matches
CSSPrimitiveValue.getFloatValue() - Web APIs
his css value doesn't contain a float value or can't be converted into the specified unit, a domexception is raised.
... an unsigned short representing the code for the unit type, in which the value should be returned.
...in which the value should be returned.
...And 5 more matches
CSSPrimitiveValue.primitiveType - Web APIs
property of the cssprimitivevalue interface represents the type of a css value.
...alue is a counter or counters function.
...g the value is an <angle> in degrees.
...And 5 more matches
CSSPrimitiveValue.setFloatValue() - Web APIs
ue can't accept the specified unit or the float value, the value will be unchanged and a domexception will be raised.
... an unsigned short representing the code for the unit type, in which the value should be returned.
...in which the value should be returned.
...And 5 more matches
CSSPrimitiveValue - Web APIs
events: all;} properties inherits properties from its parent, cssvalue.
...unter or counters function.
...ue is an <angle> in degrees.
...And 5 more matches
Using Performance Timeline - Web APIs
= undefined) { log("...
...50000); performance.measure("measure1", "begin", "end"); // use getentries() to iterate all entries var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("all entry[" + i + "]"); print_perf_entry(p[i]); } // use getentries(name, entrytype) to get specific entries p = performance.getentries({name : "measure1", entrytype: "measure"}); for (var i=0; i < p.length; i++) { log("begin and measure [" + i + "]"); print_perf_entry(p[i]); } // use getentriesbytype() to get all "mark" entries p = performance.getentriesbytype("mark"); for (var i=0; i < p.length; i++) { log ("mark only [" + i + "]"); print_perf_entry(p[i]); } // use getentriesbyname() to get all "mark" entries named "begin" p = performance.getentriesbyname("begin", "...
...asure [" + i + "]"); print_perf_entry(p[i]); } // use getentriesbytype() to get all "mark" entries p = performance.getentriesbytype("mark"); for (var i=0; i < p.length; i++) { log ("mark only [" + i + "]"); print_perf_entry(p[i]); } // use getentriesbyname() to get all "mark" entries named "begin" p = performance.getentriesbyname("begin", "mark"); for (var i=0; i < p.length; i++) { log ("begin and mark [" + i + "]"); print_perf_entry(p[i]); } } performanceentry interface the performanceentry interface encapsulates a single performance entry i.e.
...And 5 more matches
SVGSVGElement - Web APIs
o,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgsvgelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggraphicselement and also implements the ones from svgzoomandpan, svgfittoviewbox, and windoweventhandlers.
...v> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggraphicselement and also implements the ones from svgzoomandpan, svgfittoviewbox, and windoweventhandlers.
...s from its parent, svggraphicselement and also implements the ones from svgzoomandpan, svgfittoviewbox, and windoweventhandlers.
...And 5 more matches
Writing WebSocket servers - Web APIs
s in detail.
...---------------+ |f|r|r|r| opcode|m| payload len | extended payload length | |i|s|s|s| (4) |a| (7) | (16/64) | |n|v|v|v| |s| | (if payload len==126/127) | | |1|2|3| |k| | | +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - + | extended payload length continued, if payload len == 127 | + - - - - - - - - - - - - - - - +-------------------------------+ | |masking-key, if mask set to 1 | +-------------------------------+-------------------------------+ | masking-key (continued) | payload data | +-------------------------------- - - - - - - - - - - - - - - - + : ...
...f-8), 0x2 for binary, and other so-called "control codes" that will be discussed later.
...And 5 more matches
<basic-shape> - CSS: Cascading Style Sheets
end us a pull request.
... the ith vertex of the polygon.
... path( [<fill-rule>,]?
...And 5 more matches
border-image-width - CSS: Cascading Style Sheets
active example is stored in a github repository.
...e same width to all four sides.
...d, the first width applies to the top and bottom, the second to the left and right.
...And 5 more matches
border-width - CSS: Cascading Style Sheets
contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...pplies to the top and bottom, the second to the left and right.
...k, and the values are constant within a single document.
...And 5 more matches
bottom - CSS: Cascading Style Sheets
Web › CSS › bottom
to static, the bottom property has no effect.
... situations, if height is constrained in any way or position is set to relative, the top property takes precedence and the bottom property is ignored.
... any way or position is set to relative, the top property takes precedence and the bottom property is ignored.
...And 5 more matches
left - CSS: Cascading Style Sheets
Web › CSS › left
the left css property participates in specifying the horizontal position of a positioned element.
...hub repository.
...ute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...And 5 more matches
min-height - CSS: Cascading Style Sheets
aller than the value specified for min-height.
...e element's height is set to the value of min-height whenever min-height is larger than max-height or height.
... unset; values <length> defines the min-height as an absolute value.
...And 5 more matches
min-width - CSS: Cascading Style Sheets
Web › CSS › min-width
ing smaller than the value specified for min-width.
... request.
...width: unset; values <length> defines the min-width as an absolute value.
...And 5 more matches
offset-anchor - CSS: Cascading Style Sheets
the offset-anchor css property specifies the point inside the box of an element travelling along an offset-path that is actually moving along the path.
...s of an element's box.
... of <position>, except for in background(-position).
...And 5 more matches
repeating-radial-gradient() - CSS: Cascading Style Sheets
enter.
...ion included other keywords (cover and contain) as synonyms of the standard farthest-corner and closest-side, respectively.
...l stop position (either a <percentage> or a <length> along the gradient's axis).
...And 5 more matches
right - CSS: Cascading Style Sheets
Web › CSS › right
the right css property participates in specifying the horizontal position of a positioned element.
...ository.
...the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...And 5 more matches
scroll-snap-coordinate - CSS: Cascading Style Sheets
snap point.
...es the offset of the snap coordinates from the start edge of the element’s border box.
...the second value its y coordinate.
...And 5 more matches
scroll-snap-destination - CSS: Cascading Style Sheets
the offset of the snap destination from the start edge of the scroll container’s visual viewport.
...ion from the start edge of the scroll container’s visual viewport.
...nate.
...And 5 more matches
top - CSS: Cascading Style Sheets
Web › CSS › top
set to static, the top property has no effect.
...spected.
...ght is constrained in any way or position is set to relative, the top property takes precedence and the bottom property is ignored.
...And 5 more matches
translate() - CSS: Cascading Style Sheets
the translate() css function repositions an element in the horizontal and/or vertical directions.
...he translate() css function repositions an element in the horizontal and/or vertical directions.
...by a two-dimensional vector.
...And 5 more matches
word-spacing - CSS: Cascading Style Sheets
the word-spacing css property sets the length of space between words and between tags.
... the word-spacing css property sets the length of space between words and between tags.
...and send us a pull request.
...And 5 more matches
HTML documentation index - HTML: Hypertext Markup Language
Web › HTML › Index
element fails constraint validation.
...or equal to the value of the min attribute.
... the min attribute defines the minimum value that is acceptable and valid for the input containing the attribute.
...And 5 more matches
Text formatting - JavaScript
« previousnext » this chapter introduces how to work with strings and text in javascript.
... type.
...ring literals unless you specifically need to use a string object, because string objects can have counterintuitive behavior.
...And 5 more matches
Inheritance and the prototype chain - JavaScript
lete g.vertices; console.log(g.vertices); // print undefined with the class keyword ecmascript 2015 introduced a new set of keywords implementing classes.
....log(g.vertices); // print undefined with the class keyword ecmascript 2015 introduced a new set of keywords implementing classes.
...ces); // print undefined with the class keyword ecmascript 2015 introduced a new set of keywords implementing classes.
...And 5 more matches
Arrow function expressions - JavaScript
description see also "es6 in depth: arrow functions" on hacks.mozilla.org.
...ions: the need for shorter functions and the behavior of the this keyword.
... 'beryllium' ]; // this statement returns the array: [8, 6, 7, 9] elements.map(function(element) { return element.length; }); // the regular function above can be written as the arrow function below elements.map((element) => { return element.length; }); // [8, 6, 7, 9] // when there is only one parameter, we can remove the surrounding parentheses elements.map(element => { return element.length; }); // [8, 6, 7, 9] // when the only statement in an arrow function is `return`, we can remove `return` and remove // the surrounding curly brackets elements.map(element => element.length); // [8, 6, 7, 9] // in this case, because we only need the length property, we can use destructuring parameter: // notice that the `length` corresponds to the property we want to get whereas the // obviously...
...And 5 more matches
The arguments object - JavaScript
to that function.
... was called with, with the first entry's index at 0.
...ts]; the arguments object is useful for functions called with more arguments than they are formally declared to accept.
...And 5 more matches
Array.prototype.copyWithin() - JavaScript
the copywithin() method shallow copies part of an array to another location in the same array and returns it without modifying its length.
...ample is stored in a github repository.
...e https://github.com/mdn/interactive-examples and send us a pull request.
...And 5 more matches
WebAssembly.Table - JavaScript
enting a webassembly table, which stores function references.
... table, which stores function references.
...type.grow() increases the size of the table instance by a specified number of elements.
...And 5 more matches
<rect> - SVG: Scalable Vector Graphics
Web › SVG › Element › rect
position, width, and height.
...0% } <svg viewbox="0 0 220 100" xmlns="http://www.w3.org/2000/svg"> <!-- simple rectangle --> <rect width="100" height="100" /> <!-- rounded corner rectangle --> <rect x="120" width="100" height="100" rx="15" /> </svg> attributes x the x coordinate of the rect.
...idth="100" height="100" /> <!-- rounded corner rectangle --> <rect x="120" width="100" height="100" rx="15" /> </svg> attributes x the x coordinate of the rect.
...And 5 more matches
<text> - SVG: Scalable Vector Graphics
Web › SVG › Element › text
rty, the color property is for html only */ .rrrrr { font: italic 40px serif; fill: red; } </style> <text x="20" y="35" class="small">my</text> <text x="40" y="35" class="heavy">cat</text> <text x="55" y="55" class="small">is</text> <text x="65" y="55" class="rrrrr">grumpy!</text> </svg> attributes x the x coordinate of the starting point of the text baseline.
...small">my</text> <text x="40" y="35" class="heavy">cat</text> <text x="55" y="55" class="small">is</text> <text x="65" y="55" class="rrrrr">grumpy!</text> </svg> attributes x the x coordinate of the starting point of the text baseline.
...">grumpy!</text> </svg> attributes x the x coordinate of the starting point of the text baseline.
...And 5 more matches
<tspan> - SVG: Scalable Vector Graphics
Web › SVG › Element › tspan
dy,svg { height:100% } <svg viewbox="0 0 240 40" xmlns="http://www.w3.org/2000/svg"> <style> text { font: italic 12px serif; } tspan { font: bold 10px sans-serif; fill: red; } </style> <text x="10" y="30" class="small"> you are <tspan>not</tspan> a banana!
... tspan { font: bold 10px sans-serif; fill: red; } </style> <text x="10" y="30" class="small"> you are <tspan>not</tspan> a banana!
... </text> </svg> attributes x the x coordinate of the starting point of the text baseline.
...And 5 more matches
Encryption and Decryption - Archive of obsolete content
be used with the algorithm to produce an encrypted result or to decrypt previously encrypted information.
...e key to sign data with your digital signature-an important requirement for electronic commerce and other commercial applications of cryptography.
...algorithm is called a brute force attack.
...And 4 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
css selectors and relevant properties for each selector in the form of a tree, with a root node, sibling, descendant, child, and other relationship.
..., descendant, child, and other relationship.
...lossary, height, length, pixel, size, unit, width the css pixel—denoted in css with the suffix px—is a unit of length which roughly corresponds to the width or height of a single dot that can be comfortably seen by the human eye without strain, but is otherwise as small as possible.
...And 4 more matches
Accessibility in React - Learn web development
r user deletes a task from their list.
...their list.
... we already used earlier on.
...And 4 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
r moreactions.svelte component like this: <script> import { createeventdispatcher } from 'svelte' const dispatch = createeventdispatcher() export let todos let completed = true const checkall = () => { dispatch('checkall', completed) completed = !completed } const removecompleted = () => dispatch('removecompleted') $: completedtodos = todos.filter(t => t.completed).length </script> <div class="btn-group"> <button type="button" class="btn btn__primary" disabled={todos.length === 0} on:click={checkall}>{completed ?
...atus heading because it's near the list of todos, and it's a way to give a visual feedback about the removal of the task, as well as indicating what's happened to screenreader users.
...o give a visual feedback about the removal of the task, as well as indicating what's happened to screenreader users.
...And 4 more matches
Multiprocess on Windows
the chrome and content processes.
...t consist of arrays of interfaces recall that one of the limitations of typelibs is that their metadata isn't as rich as oicf metadata.
...l the difference between a scalar outparam and an array outparam.
...And 4 more matches
Log.jsm
conservative and keep to a minimum.
...nformation on the flow through the system.
...on.
...And 4 more matches
JIT Optimization Outcomes
ed in this operation.
...erty access did not match an optimizable type.
...d on the object is not one of the optimizable property names.
...And 4 more matches
JS::SourceBufferHolder
this article covers features introduced in spidermonkey 31 container class for passing in script source buffers to the js engine.
...dermonkey 31 container class for passing in script source buffers to the js engine.
...r class for passing in script source buffers to the js engine.
...And 4 more matches
JS_CompileScriptForPrincipals
obsolete since jsapi 28this feature is obsolete.
... try to avoid using it.
... const char *src, size_t length, const char *filename, unsigned int lineno); jsscript * js_compileucscriptforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const jschar *src, size_t length, const char *filename, unsigned int lineno); jsobject * js_compilescriptforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *src, size_t length, const char *filename, unsigned int lineno, jsversion version); // obsoleted since jsapi 19 jsobject * js_compileucscriptforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const jschar *src, size_t length, const char *filename, unsigned int lineno, jsversion version); // obsoleted since jsapi 19 name type description cx jscontext...
...And 4 more matches
JS_EvaluateScriptForPrincipals
obsolete since jsapi 30this feature is obsolete.
...sing it.
... const char *filename, unsigned int lineno, jsval *rval); jsbool js_evaluatescriptucforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const jschar *src, unsigned int length, const char *filename, unsigned int lineno, jsval *rval); jsbool js_evaluatescriptforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *bytes, unsigned int length, const char *filename, unsigned int lineno, jsval *rval, jsversion version); jsbool js_evaluateucscriptforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const jschar *chars, unsigned int length, const char *filename, unsigned int lineno, jsval *rval, jsversion version); name type description cx jscontext * the context in wh...
...And 4 more matches
JS_GetInternedStringChars
obsolete since jsapi 33this feature is obsolete.
...is feature is obsolete.
...be removed at any time.
...And 4 more matches
Index
Mozilla › Tech › XPCOM › Index
that informs the user as to the status of an update.
...e queryinterface() method: 1037 nsiurlformatter interfaces, interfaces:scriptable, reference, référence(2), xpcom interface reference variable names can contain 'a-z' letters and '_' characters.
...s for and displays the available updates.
...And 4 more matches
IAccessibleText
et is relative to the text() represented by this object.
...t() or the height of the preceding character, its width being at least one pixel so that the bounding box is not degenerate.
... as a call with the two arguments being exchanged.
...And 4 more matches
mozIStorageAggregateFunction
value of the function.
... sample code both of the following code samples assume that the variable dbconn is an opened mozistorageconnection.
...geconnection.
...And 4 more matches
nsIContentSniffer
r interface.
...nterface can determine a mime type from a chunk of bytes.
...fromcontent() given a chunk of data, determines a mime type.
...And 4 more matches
nsIJSON
t because they represent things that can't actually be properly described by idl; however, for the purposes of this article, we'll pretend they can be and ignore that issue.
...decode.
...nal javascript object, reconstructed from the json string.
...And 4 more matches
nsIPluginHost
native code only!loadplugins void loadplugins(); parameters none.
... will *always malloc()* output buffer (caller is responsible to free it) if input buffer starts with lf, which comes from 4.x spec http://developer.netscape.com/docs/manuals/communicator/plugin/pgfn2.htm#1007754 "if no custom headers are required, simply add a blank line ('\n') to the beginning of the file or buffer.", it skips that '\n' and considers rest of the input buffer as data.
... "if no custom headers are required, simply add a blank line ('\n') to the beginning of the file or buffer.", it skips that '\n' and considers rest of the input buffer as data.
...And 4 more matches
nsIRandomGenerator
netwerk/base/public/nsirandomgenerator.idlscriptable interface used to generate random data.
... netwerk/base/public/nsirandomgenerator.idlscriptable interface used to generate random data.
...ce used to generate random data.
...And 4 more matches
Declaring types
his you can either set the type of next to ctypes.voidptr_t, or to be more accurate, use the define technique: var struct = ctypes.structtype('struct'); struct.define([{ next: struct.ptr }]); arrays to declare a new array type, you use the ctypes.arraytype() method.when declaring a new array type, you provide a ctype indicating the type of each element in the array as well as an optional array length.
...pe, you use the ctypes.arraytype() method.when declaring a new array type, you provide a ctype indicating the type of each element in the array as well as an optional array length.
...a new array type, you provide a ctype indicating the type of each element in the array as well as an optional array length.
...And 4 more matches
CSSStyleSheet.insertRule() - Web APIs
nternal cssrulelist.
...in cssstylesheet.cssrules.
...], ['background-color', 'green', true] // 'true' for !important rules ], ['.myclass', ['background-color', 'yellow'] ] ]); */ function addstylesheetrules (rules) { var styleel = document.createelement('style'); // append <style> element to <head> document.head.appendchild(styleel); // grab style element's sheet var stylesheet = styleel.sheet; for (var i = 0; i < rules.length; i++) { var j = 1, rule = rules[i], selector = rule[0], propstr = ''; // if the second argument of a rule is an array of arrays, correct our variables.
...And 4 more matches
Applying styles and colors - Web APIs
of the line thickness.
...ecap.length; i++) { ctx.linewidth = 15; ctx.linecap = linecap[i]; ctx.beginpath(); ctx.moveto(25 + i * 50, 10); ctx.lineto(25 + i * 50, 140); ctx.stroke(); } } <canvas id="canvas" width="150" height="150"></canvas> draw(); screenshotlive sample a linejoin example the linejoin property determines how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified endpoints and control points are exactly at the same position, are skipped).
....
...And 4 more matches
HTMLAnchorElement.relList - Web APIs
ive domtokenlist containing the set of link types indicating the relationship between the resource represented by the <a> element and the current document.
...containing the set of link types indicating the relationship between the resource represented by the <a> element and the current document.
...ypes indicating the relationship between the resource represented by the <a> element and the current document.
...And 4 more matches
Microdata DOM API - Web APIs
thod, which returns an array of all the values.
... in an earlier example, a "http://example.org/animals#cat" item had two "http://example.com/color" values.
...is script looks up the first such item and then lists all its values.
...And 4 more matches
Using the Resource Timing API - Web APIs
the resource timing api provides a way to retrieve and analyze detailed network timing data regarding the loading of an application's resource(s).
... the source code.
...data can be used to help identify performance bottlenecks.
...And 4 more matches
SVGMarkerElement - Web APIs
arkerelement interface corresponds to the marker element.
...to the marker element.
... also implement none methods void setorienttoangle(in svgangle angle) void setorienttoauto() properties svganimatedlength refx svganimatedlength refy svganimatedenumeration markerunits svganimatedlength markerwidth svganimatedlength markerheight svganimatedenumeration orienttype svganimatedangle orientangle constants svg_marker_orient_unknown = 0 svg_marker_orient_auto = 1 svg_marker_orient_angle = 2 svg_markerunit...
...And 4 more matches
SubtleCrypto.wrapKey() - Web APIs
de(password), {name: "pbkdf2"}, false, ["derivebits", "derivekey"] ); } /* given some key material and some random salt derive an aes-kw key using pbkdf2.
...yption key const keymaterial = await getkeymaterial(); salt = window.crypto.getrandomvalues(new uint8array(16)); const wrappingkey = await getkey(keymaterial, salt); return window.crypto.subtle.wrapkey( "raw", keytowrap, wrappingkey, "aes-kw" ); } /* generate an encrypt/decrypt secret key, then wrap it.
...(password), {name: "pbkdf2"}, false, ["derivebits", "derivekey"] ); } /* given some key material and some random salt derive an aes-gcm key using pbkdf2.
...And 4 more matches
Touch events - Web APIs
progress.
...our handlemove() function being called.
...nt.
...And 4 more matches
ValidityState - Web APIs
ange css pseudo-classes.
... the value does not fit the rules determined by the step attribute (that is, it's not evenly divisible by the step value), or false if it does fit the step rule.
... by the step attribute (that is, it's not evenly divisible by the step value), or false if it does fit the step rule.
...And 4 more matches
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
hat situation, the complete coordinates for an object located at (1, 0, 3) are (1, 0, 3, 1).
...1, -2]; for the purposes of performing operations involving both the coordinates and the facing direction vector, the vector needs to include the w component.
...he development of libraries or to help you optimize code.
...And 4 more matches
size - CSS: Cascading Style Sheets
Web › CSS › @page › size
ize and orientation of the box which is used to represent a page.
...lues auto the user agent decides the size of the page.
... the user agent decides the size of the page.
...And 4 more matches
height - CSS: Cascading Style Sheets
Web › CSS › @viewport › height
the height css descriptor is a shorthand descriptor for setting both min-height and max-height of the viewport.
...both, the minimum height and the maximum height, to the value provided.
...ht, to the value provided.
...And 4 more matches
filter - CSS: Cascading Style Sheets
Web › CSS › filter
ss(3%); /* use no filter */ filter: none; /* global values */ filter: inherit; filter: initial; filter: unset; with a function, use the following: filter: <filter-function> [<filter-function>]* | none for a reference to an svg <filter> element, use the following: filter: url(file.svg#filter-element-id) interpolation if both the beginning and end filters have a function list of the same length without <url>, each of their filter functions is interpolated according to its specific rules.
...ction, use the following: filter: <filter-function> [<filter-function>]* | none for a reference to an svg <filter> element, use the following: filter: url(file.svg#filter-element-id) interpolation if both the beginning and end filters have a function list of the same length without <url>, each of their filter functions is interpolated according to its specific rules.
...al xml file.
...And 4 more matches
gap (grid-gap) - CSS: Cascading Style Sheets
Web › CSS › gap
tive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...out initially defined the grid-gap property.
...; gap: 21px 82%; /* calc() values */ gap: calc(10% + 20px); gap: calc(20px + 10%) calc(10% - 5px); /* global values */ gap: inherit; gap: initial; gap: unset; this property is specified as a value for <'row-gap'> followed optionally by a value for <'column-gap'>.
...And 4 more matches
margin-bottom - CSS: Cascading Style Sheets
farther from its neighbors, while a negative value places it closer.
...ces it closer.
... <length> values */ margin-bottom: 10px; /* an absolute length */ margin-bottom: 1em; /* relative to the text size */ margin-bottom: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-bottom: auto; /* global values */ margin-bottom: inherit; margin-bottom: initial; margin-bottom: unset; the margin-bottom property is specified as the keyword auto, or a <length>, or a <percentage>.
...And 4 more matches
margin-left - CSS: Cascading Style Sheets
active-examples and send us a pull request.
...ical margins of two adjacent boxes may fuse.
...ied.
...And 4 more matches
margin-right - CSS: Cascading Style Sheets
it farther from its neighbors, while a negative value places it closer.
...places it closer.
...ntax /* <length> values */ margin-right: 20px; /* an absolute length */ margin-right: 1em; /* relative to the text size */ margin-right: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-right: auto; /* global values */ margin-right: inherit; margin-right: initial; margin-right: unset; the margin-right property is specified as the keyword auto, or a <length>, or a <percentage>.
...And 4 more matches
margin-top - CSS: Cascading Style Sheets
it farther from its neighbors, while a negative value places it closer.
...e places it closer.
...> or <code>.
...And 4 more matches
margin - CSS: Cascading Style Sheets
Web › CSS › margin
lement.
...me margin to all four sides.
...fied, the margins apply to the top, right, bottom, and left in that order (clockwise).
...And 4 more matches
mask-border-width - CSS: Cascading Style Sheets
the mask-border-width css property sets the width of an element's mask border.
...e same width to all four sides.
...e first width applies to the top and bottom, the second to the left and right.
...And 4 more matches
max-height - CSS: Cascading Style Sheets
d value of the height property from becoming larger than the value specified for max-height.
... send us a pull request.
... unset; values <length> defines the max-height as an absolute value.
...And 4 more matches
object-position - CSS: Cascading Style Sheets
ne to four values that define the 2d position of the element.
...element is drawn outside its box.
...ition initial value50% 50%applies toreplaced elementsinheritedyespercentagesrefer to width and height of element itselfcomputed valueas specifiedanimation typerepeatable list of simple list of length, percentage, or calc formal syntax <position>where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
...And 4 more matches
row-gap (grid-row-gap) - CSS: Cascading Style Sheets
Web › CSS › row-gap
s project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...w-gap.
...erit; row-gap: initial; row-gap: unset; values <length-percentage> is the width of the gutter separating the rows.
...And 4 more matches
scroll-snap-points-x - CSS: Cascading Style Sheets
*/ scroll-snap-points-x: none; /* repeating snap points */ scroll-snap-points-x: repeat(400px); /* global values */ scroll-snap-points-x: inherit; scroll-snap-points-x: initial; scroll-snap-points-x: unset; syntax values none the scroll container does not define any snap points.
... inherit; scroll-snap-points-x: initial; scroll-snap-points-x: unset; syntax values none the scroll container does not define any snap points.
...percentage>) defines an interval at which snap points are defined, starting from the container's relevant start edge.
...And 4 more matches
scroll-snap-points-y - CSS: Cascading Style Sheets
*/ scroll-snap-points-y: none; /* repeated snap points */ scroll-snap-points-y: repeat(400px); /* global values */ scroll-snap-points-y: inherit; scroll-snap-points-y: initial; scroll-snap-points-y: unset; syntax values none the scroll container does not define any snap points.
...inherit; scroll-snap-points-y: initial; scroll-snap-points-y: unset; syntax values none the scroll container does not define any snap points.
...percentage>) defines an interval at which snap points are defined, starting from the container's relevant start edge.
...And 4 more matches
text-shadow - CSS: Cascading Style Sheets
offset-y | color */ text-shadow: 5px 5px #558abb; /* color | offset-x | offset-y */ text-shadow: white 2px 5px; /* offset-x | offset-y /* use defaults for color and blur-radius */ text-shadow: 5px 10px; /* global values */ text-shadow: inherit; text-shadow: initial; text-shadow: unset; this property is specified as a comma-separated list of shadows.
...| offset-y */ text-shadow: white 2px 5px; /* offset-x | offset-y /* use defaults for color and blur-radius */ text-shadow: 5px 10px; /* global values */ text-shadow: inherit; text-shadow: initial; text-shadow: unset; this property is specified as a comma-separated list of shadows.
...ts for color and blur-radius */ text-shadow: 5px 10px; /* global values */ text-shadow: inherit; text-shadow: initial; text-shadow: unset; this property is specified as a comma-separated list of shadows.
...And 4 more matches
HTML attribute reference - HTML: Hypertext Markup Language
her the media should start playing from the start when it's finished.
... upper bound of the lower range.
... have two faces: the content attribute and the idl (interface definition language) attribute.
...And 4 more matches
HTTP range requests - HTTP
ge media or downloading files with pause and resume functions, for example.
...ccept-ranges is present in http responses (and its value isn't "none"), the server supports range requests.
... header line to the request, which in this case is the range header requesting the first 1024 bytes.
...And 4 more matches
Grammar and types - JavaScript
array literals boolean literals floating-point literals numeric literals object literals regexp literals string literals array literals an array literal is a list of zero or more expressions, each of which represents an array element, enclosed in square brackets ([]).
...als array literals an array literal is a list of zero or more expressions, each of which represents an array element, enclosed in square brackets ([]).
... the array fills in the value undefined for the unspecified elements.
...And 4 more matches
DataView() constructor - JavaScript
the dataview() constructor is used to create dataview objects.
...e-examples and send us a pull request.
...ytelength]]) parameters buffer an existing arraybuffer or sharedarraybuffer to use as the storage backing the new dataview object.
...And 4 more matches
Function.prototype.apply() - JavaScript
ed arguments of the called object.
...e arguments of the called object when you use the apply method.
...uments to pass all the arguments to the called object.
...And 4 more matches
String.prototype.charAt() - JavaScript
f the single utf-16 code unit located at the specified offset into the string.
... the first character of str is returned.
...e character at index 4 is 'e' the character at index 999 is '' getting whole characters the following provides a means of ensuring that going through a string loop always provides a whole character, even if the string contains characters that are not in the basic multi-lingual plane.
...And 4 more matches
String.prototype.endsWith() - JavaScript
e endswith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
...ng, returning true or false as appropriate.
...he source for this interactive example is stored in a github repository.
...And 4 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.
...given string (repeated, if needed) so that the resulting string reaches a given length.
...the resulting string reaches a given length.
...And 4 more matches
TypedArray.prototype.fill() - JavaScript
alue.
...a github repository.
...rs value value to fill the typed array with.
...And 4 more matches
SVG Presentation Attributes - SVG: Scalable Vector Graphics
ned along the font baseline with respect to its parent.
...en the inline-progression-direction is vertical.
... it provides a hint to the browser about how to make speed vs.
...And 4 more matches
<line> - SVG: Scalable Vector Graphics
Web › SVG › Element › line
asic shape used to create a line connecting two points.
...g/2000/svg"> <line x1="0" y1="80" x2="100" y2="20" stroke="black" /> <!-- if you do not specify the stroke color the line will not be visible --> </svg> attributes x1 defines the x-axis coordinate of the line starting point.
...be visible --> </svg> attributes x1 defines the x-axis coordinate of the line starting point.
...And 4 more matches
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
zen string api is similar but not identical to the nonfrozen string api.
...t identical to the nonfrozen string api.
...pidlstring: - nsxpidlstring value; + nsstring value; ptr->gettermethod(getter_copies(value)); - const prunichar *strvalue = value; + // nsstring doesn't cast directly to prunichar*, use .get()+ const prunichar *strvalue = value.get(); the frozen string api doesn't accept a length for .truncate().
...And 3 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
r.
...lla_debug")allows user to print debugging messages if mozilla_debug is defined in either the shell for unix (export mozilla_debug=1) or in the command.com environment in windows (set mozilla_debug=1).
...rks: // 2) setup multiple ldap servers for fail-over var ldap_values; var ldap_servers = new array('ldap2.int-evry.fr', 'ldap1.int-evry.fr', 'openldap.int-evry.fr' ); // shuffle function to randomize the server array // setup the shuffle method for an array array.prototype.shuffle = function(times) { var i,j,t,l=this.length; while(times--) { with(math) { i = floor(random()*l); j = floor(random()*l); } t = this[i]; this[i] = this[j]; this[j] = t; } return this; } // mix up the ldap servers so we don't hit the same one each time ldap_servers.shuffle(10); ....
...And 3 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
example below will create an autocomplete textbox that will search the user's history.
...hange, oninput, onsearchcomplete, ontextentered, ontextreverted, open, readonly,showcommentcolumn, showimagecolumn, size, tabindex, tabscrolling, timeout, type, value properties accessibletype, completedefaultindex, controller, crop, disableautocomplete, disablekeynavigation, disabled, editable, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputfield, label, maxlength, maxrows, minresultsforpopup, open, popup, popupopen, searchcount, searchparam, selectionend, selectionstart, showcommentcolumn, showimagecolumn,size, tabindex, tabscrolling, textlength, textvalue, timeout, type, value methods getsearchat, onsearchcomplete, ontextentered, ontextreverted, select, setselectionrange examples <textbox type="autocomplete" autocompletesearch="history"/> att...
...ching, which means that the autocomplete popup will not disappear.
...And 3 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
n method.
..., showcommentcolumn, showcommentcolumn, showpopup, size, tabindex, tabscrolling, tabscrolling, timeout, type, useraction, value properties accessible, alwaysopenpopup, autofill, autofillaftermatch, completedefaultindex, crop, disableautocomplete, disabled, editable, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputfield, issearching, iswaiting, label, maxlength, maxrows, minresultsforpopup, nomatch, open, popup, popupopen, resultspopup, searchcount, searchparam, searchsessions, selectionend, selectionstart, sessioncount, showcommentcolumn, showpopup, size, tabindex, tabscrolling, textlength, textvalue, timeout, type, useraction, value methods addsession, clearresults, getdefaultsession, getresultat, getresultcount, getresultvalueat, gets...
...ching, which means that the autocomplete popup will not disappear.
...And 3 more matches
LiveConnect Overview - Archive of obsolete content
java.lang.string("hello world"); in the previous example, the variable mystring is a javaobject because it holds an instance of the java object string.
...ing = new packages.java.lang.string("hello world"); working with java arrays when any java method creates an array and you reference that array in javascript, you are working with a javaarray.
...en any java method creates an array and you reference that array in javascript, you are working with a javaarray.
...And 3 more matches
Implementing controls using the Gamepad API - Game development
ect(), there are two more methods in the gamepadapi object: update() and buttonpressed().
...e to the cache for(var k=0; k<gamepadapi.buttonsstatus.length; k++) { gamepadapi.buttonscache[k] = gamepadapi.buttonsstatus[k]; } // clear the buttons status gamepadapi.buttonsstatus = []; // get the gamepad object var c = gamepadapi.controller || {}; // loop through buttons and push the pressed ones to the array var pressed = []; if(c.buttons) { for(var b=0,t=c.buttons.length; b<t; b++) { if(c.buttons[b].pressed) { pressed.push(gamepadapi.buttons[b]); } } } // loop through axes and push their values to the array var axes = []; if(c.axes) { for(var a=0,x=c.axes.length; a<x; a++) { axes.push(c.axes[a].tofixed(2)); } } // assign received values gamepadapi.axesstatus = axes; gamepadapi.buttonsstatus = pressed; // ret...
...p to listen for button presses.
...And 3 more matches
Third-party APIs - Learn web development
n pass the resulting json to the displayresults() function so the data can be displayed in our ui.
...he data ok, let's look at how we'll display the data.
... section.removechild(section.firstchild); } const articles = json.response.docs; if(articles.length === 10) { nav.style.display = 'block'; } else { nav.style.display = 'none'; } if(articles.length === 0) { const para = document.createelement('p'); para.textcontent = 'no results returned.' section.appendchild(para); } else { for(var i = 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];...
...And 3 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
level variables.
...components/todos.svelte and give it some content, as follows: <script> let todos = [ { id: 1, name: 'create a svelte starter app', completed: true }, { id: 2, name: 'create your first component', completed: true }, { id: 3, name: 'complete the rest of the tutorial', completed: false } ] let totaltodos = todos.length let completedtodos = todos.filter(todo => todo.completed).length </script> now let's do something with that information.
...the ui.
...And 3 more matches
OS.File for the main thread
is snippet is useful as a demonstration of complex asynchronous programming with os.file – in most cases, function os.file.writeatomic is a better choice.
...asynchronous programming with os.file – in most cases, function os.file.writeatomic is a better choice.
...plete, finalize.
...And 3 more matches
PRHostEnt
a structure that defines a list of network addresses.
... a list of network addresses.
...h_addrtype; print32 h_length; #endif char **h_addr_list; } prhostent; fields the structure has the following fields: h_name pointer to the official name of host.
...And 3 more matches
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
*infile = null; certcertificate *cert = null; secitem data; unsigned char ptext[modblocksize]; unsigned char encbuf[modblocksize]; unsigned int ptextlen; int index; unsigned int nwritten; unsigned int pad[1]; secitem paditem; unsigned int paddinglength = 0; seckeypublickey *pubkey = null; /* if the intermediate encrypted file already exists, delete it*/ if (pr_access(encryptedfilename, pr_access_exists) == pr_success) { pr_delete(encryptedfilename); } /* read certificate from header file */ rv = readfromheaderfile(headerfilename, certenc, &data, pr_true); if (rv != secsuccess) { ...
...create_file | pr_rdwr | pr_append, 00660); if (!headerfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for writing.\n", headerfilename); rv = secfailure; goto cleanup; } /* read input file */ while ((ptextlen = pr_read(infile, ptext, sizeof(ptext))) > 0) { if (ptextlen != modblocksize) { paddinglength = modblocksize - ptextlen; for ( index=0; index < paddinglength; index++) { ptext[ptextlen+index] = (unsigned char)paddinglength; } ptextlen = modblocksize; } rv = pk11_pubencryptraw(pubkey, encbuf, ptext, ptextlen, null); nwritten = pr_write(encfile, encbuf, ptextlen); } /* write the padding to header...
... for ( index=0; index < paddinglength; index++) { ptext[ptextlen+index] = (unsigned char)paddinglength; } ptextlen = modblocksize; } rv = pk11_pubencryptraw(pubkey, encbuf, ptext, ptextlen, null); nwritten = pr_write(encfile, encbuf, ptextlen); } /* write the padding to header file */ pad[0] = paddinglength; paditem.type = sibuffer; paditem.data = (unsigned char *)pad; paditem.len = sizeof(pad[0]); writetoheaderfile(paditem.data, paditem.len, pad, headerfile); cleanup: if (headerfile) { pr_close(headerfile); } if (encfile) { pr_close(encfile); } if (infile) { pr_close(infile); } if (pubkey) { seckey_destroyp...
...And 3 more matches
sample2
derfilename, const char *encryptedfilename, const char *infilename) { secstatus rv; prfiledesc *headerfile = null; prfiledesc *encfile = null; prfiledesc *infile = null; certcertificate *cert = null; secitem data; unsigned char ptext[modblocksize]; unsigned char encbuf[modblocksize]; unsigned int ptextlen; int index; unsigned int nwritten; unsigned int pad[1]; secitem paditem; unsigned int paddinglength = 0; seckeypublickey *pubkey = null; /* if the intermediate encrypted file already exists, delete it*/ if (pr_access(encryptedfilename, pr_access_exists) == pr_success) { pr_delete(encryptedfilename); } /* read certificate from header file */ rv = readfromheaderfile(headerfilename, certenc, &data, pr_true); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not read certificate from header file...
...goto cleanup; } /* open the header file to write padding */ headerfile = pr_open(headerfilename, pr_create_file | pr_rdwr | pr_append, 00660); if (!headerfile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for writing.\n", headerfilename); rv = secfailure; goto cleanup; } /* read input file */ while ((ptextlen = pr_read(infile, ptext, sizeof(ptext))) > 0) { if (ptextlen != modblocksize) { paddinglength = modblocksize - ptextlen; for ( index=0; index < paddinglength; index++) { ptext[ptextlen+index] = (unsigned char)paddinglength; } ptextlen = modblocksize; } rv = pk11_pubencryptraw(pubkey, encbuf, ptext, ptextlen, null); nwritten = pr_write(encfile, encbuf, ptextlen); } /* write the padding to header file */ pad[0] = paddinglength; paditem.type = sibuffer; paditem.data = (unsigned char *)pad; p...
...ing to the certificate saved in the header file * and decrypts with it the contents of encryptedfilename to outfilename.
...And 3 more matches
JS::Compile
tures introduced in spidermonkey 17 compile a script for execution.
...ycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, file *file, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, const char *filename, js::mutablehandlescript script); // obsolete since jsapi 39 bool js::compile(jscontext *cx, js::...
... js::mutablehandlescript script); // obsolete since jsapi 39 bool js::compile(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlescript script); bool js::compile(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, file *file, js::mutablehandlescript script); bool...
...And 3 more matches
JS::CompileFunction
this article covers features introduced in spidermonkey 17 create a javascript function from a text string.
...me, unsigned nargs, const char *const *argnames, js::sourcebufferholder &srcbuf, js::mutablehandlefunction fun); bool js::compilefunction(jscontext *cx, js::autoobjectvector &scopechain, const js::readonlycompileoptions &options, const char *name, unsigned nargs, const char *const *argnames, const char *bytes, size_t length, js::mutablehandlefunction fun); name type description cx jscontext * the context in which to compile the function.
...ign the newly compiled function.
...And 3 more matches
JS::DeflateStringToUTF8Buffer
nged pointer to the buffer.
...he length of the buffer as dstlenp.
...of unicode characters written to the buffer.
...And 3 more matches
JS::Evaluate
ntroduced in spidermonkey 17 compile and execute a script.
...compileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, const char *filename, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, js::autoobjectvector &scopechain, const readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlevalue rval); // added in...
...js::mutablehandlevalue rval); // obsolete since jsapi 39 bool js::evaluate(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, const char *filename, js::mutablehandlevalue rval); ...
...And 3 more matches
JS_CompileFunction
obsolete since jsapi 36this feature is obsolete.
...m a text string.
...which the function is associated.
...And 3 more matches
JS_CompileFunctionForPrincipals
although it may still work in some browsers, its use is discouraged since it could be removed at any time.
...*cx, jsobject *obj, jsprincipals *principals, const char *name, unsigned int nargs, const char **argnames, const char *body, size_t length, const char *filename, unsigned int lineno); jsfunction * js_compileucfunctionforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *name, unsigned int nargs, const char **argnames, const jschar *body, size_t length, const char *filename, unsigned int lineno); name type description cx jscontext * the context in which to compile the function.
...rmation for this function.
...And 3 more matches
JS_CompileScript
compiles a script for execution.
... compiles a script for execution.
...tions &options, js::mutablehandlescript script); bool js_compileucscript(jscontext *cx, const char16_t *chars, size_t length, const js::compileoptions &options, js::mutablehandlescript script); // obsolete since jsapi 39 bool js_compilescript(jscontext *cx, js::handleobject obj, const char *ascii, size_t length, const js::compileoptions &options, js::mutablehandlescript script); bool js_compileucscript(jscontext *cx, js::handleobject obj, const char16_t *chars, size_t length, const js::compileoptions &options, js::mutablehandlescript script); name type description cx jscontext * po...
...And 3 more matches
Secure Development Guidelines
underflows example of an integer underflow int main() { unsigned int foo = 0; printf(“foo: 0x%08x\r\n”, foo); foo--; printf(“foo: 0x%08x\r\n”, foo); } integer overflows/underflows real-life example (bug 303213) jsbool js_str_escape(jscontext *cx, jsobject *obj, unsigned int argc, jsval *argv, jsval *rval){ ...
...nsigned int foo = 0; printf(“foo: 0x%08x\r\n”, foo); foo--; printf(“foo: 0x%08x\r\n”, foo); } integer overflows/underflows real-life example (bug 303213) jsbool js_str_escape(jscontext *cx, jsobject *obj, unsigned int argc, jsval *argv, jsval *rval){ ...
...a/b; } denial of service: divide int_min by -1 example: int main(int argc, char **argv) { int a, b; if (argc != 3) return 1; a = atoi(argv[1]); b = atoi(argv[2]); return b ?
...And 3 more matches
nsIMutableArray
s none.
...lements in higher position, up by one.
...d long index, in boolean weak ); parameters element the element to insert.
...And 3 more matches
NS_CStringSetDataRange
« xpcom api reference summary the ns_cstringsetdatarange function copies data into a section of the string's internal buffer.
... « xpcom api reference summary the ns_cstringsetdatarange function copies data into a section of the string's internal buffer.
...ring's internal buffer.
...And 3 more matches
NS_StringSetDataRange
« xpcom api reference summary the ns_stringsetdatarange function copies data into a section of the string's internal buffer.
... « xpcom api reference summary the ns_stringsetdatarange function copies data into a section of the string's internal buffer.
...ernal buffer.
...And 3 more matches
Monster example - Firefox Developer Tools
this article describes a very simple web page that we'll use to illustrate some features of the memory tool.
... this article describes a very simple web page that we'll use to illustrate some features of the memory tool.
...l.
...And 3 more matches
Using the CSS Painting API - Web APIs
s[0].tostring(); // if stroke arg is 'stroke', don't fill if (hasstroke === 'stroke') { ctx.fillstyle = 'transparent'; ctx.strokestyle = colour; } ...
... if (hasstroke === 'stroke') { ctx.fillstyle = 'transparent'; ctx.strokestyle = colour; } ...
...nt'; ctx.strokestyle = colour; } ...
...And 3 more matches
Using Fetch - Web APIs
'success:', result); }) .catch(error => { console.error('error:', error); }); uploading multiple files files can be uploaded using an html <input type="file" multiple /> input element, formdata() and fetch().
... if (readerdone) { break; } let remainder = chunk.substr(startindex); ({ value: chunk, done: readerdone } = await reader.read()); chunk = remainder + (chunk ?
...body of a cloned response or request will not cause it to be marked as read in the original.
...And 3 more matches
HTMLAreaElement.relList - Web APIs
st containing the set of link types indicating the relationship between the resource represented by the <area> element and the current document.
...he set of link types indicating the relationship between the resource represented by the <area> element and the current document.
...ng the relationship between the resource represented by the <area> element and the current document.
...And 3 more matches
HTMLLinkElement.relList - Web APIs
list containing the set of link types indicating the relationship between the resource represented by the <link> element and the current document.
... the set of link types indicating the relationship between the resource represented by the <link> element and the current document.
...ating the relationship between the resource represented by the <link> element and the current document.
...And 3 more matches
NodeList - Web APIs
Web › API › NodeList
ve vs.
... live and static.
...log(child_nodes.length); // outputs "3" static nodelists in other cases, the nodelist is static, where any changes in the dom does not affect the content of the collection.
...And 3 more matches
RsaPssParams - Web APIs
the rsapssparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.sign() or subtlecrypto.verify(), when using the rsa-pss algorithm.
... the rsapssparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.sign() or subtlecrypto.verify(), when using the rsa-pss algorithm.
... the rsapssparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.sign() or subtlecrypto.verify(), when using the rsa-pss algorithm.
...And 3 more matches
SVGGeometryElement - Web APIs
ometryelement" target="_top"><rect x="81" y="65" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="171" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svggeometryelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} note: the pathlength property and the gettotallength() and getpointatlength() methods were originally part of the svgpathelement interface.
...metryelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} note: the pathlength property and the gettotallength() and getpointatlength() methods were originally part of the svgpathelement interface.
...xt { fill: #0095dd; pointer-events: all;} note: the pathlength property and the gettotallength() and getpointatlength() methods were originally part of the svgpathelement interface.
...And 3 more matches
SVGRectElement - Web APIs
/><text x="-29" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgrectelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggeometryelement.
...middle" alignment-baseline="middle">svgrectelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggeometryelement.
...ll;} properties this interface also inherits properties from its parent, svggeometryelement.
...And 3 more matches
SubtleCrypto.deriveBits() - Web APIs
the derivebits() method of the subtlecrypto interface can be used to derive an array of bits from a base key.
...except that derivekey() returns a cryptokey object rather than an arraybuffer.
...se hkdf, pass an hkdfparams object.
...And 3 more matches
Using Web Workers - Web APIs
f two numbers and making an alert after three seconds.
...ance, event.data); } } now onto the worker.
....addlistener = function(name, listener) { listeners[name] = listener; } this.removelistener = function(name) { delete listeners[name]; } /* this functions takes at least one argument, the method name we want to query.
...And 3 more matches
Sending and Receiving Binary Data - Web APIs
code the image and read the pixels.
...o treat it as plain text, using a user-defined character set.
...equest(); oreq.open("post", url, true); oreq.onload = function (oevent) { // uploaded.
...And 3 more matches
-webkit-mask-position-x - CSS: Cascading Style Sheets
the -webkit-mask-position-x css property sets the initial horizontal position of a mask image.
... -50%; /* <length> values */ -webkit-mask-position-x: 50px; -webkit-mask-position-x: -1cm; /* multiple values values */ -webkit-mask-position-x: 50px, 25%, -3em; /* global values */ -webkit-mask-position-x: inherit; -webkit-mask-position-x: initial; -webkit-mask-position-x: unset; initial value0%applies toall elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete syntax values <length-percentage> a length indicating the position of the left edge of the image relative to the box's left padding edge.
...e of 0% means the left edge of the image is aligned with the box's left padding edge and a value of 100% means the right edge of the image is aligned with the box's right padding edge.
...And 3 more matches
-webkit-mask-position-y - CSS: Cascading Style Sheets
the -webkit-mask-position-y css property sets the initial vertical position of a mask image.
... -50%; /* <length> values */ -webkit-mask-position-y: 50px; -webkit-mask-position-y: -1cm; /* multiple values values */ -webkit-mask-position-y: 50px, 25%, -3em; /* global values */ -webkit-mask-position-y: inherit; -webkit-mask-position-y: initial; -webkit-mask-position-y: unset; initial value0%applies toall elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete syntax values <length-percentage> a length indicating the position of the top side of the image relative to the box's top padding edge.
...e of 0% means the top edge of the image is aligned with the box's top padding edge and a value of 100% means the bottom edge of the image is aligned with the box's bottom padding edge.
...And 3 more matches
background-position-x - CSS: Cascading Style Sheets
github.com/mdn/interactive-examples and send us a pull request.
...ition-x property is specified as one or more values, separated by commas.
...ght edge of the background image is aligned with the right edge of the container, thus a value of 50% horizontally centers the background image.
...And 3 more matches
background-position-y - CSS: Cascading Style Sheets
github.com/mdn/interactive-examples and send us a pull request.
...s specified as one or more values, separated by commas.
...ttom edge of the background image is aligned with the bottom edge of the container, thus a value of 50% vertically centers the background image.
...And 3 more matches
border-image-outset - CSS: Cascading Style Sheets
the border image that are rendered outside the element's border box with border-image-outset do not trigger overflow scrollbars and don't capture mouse events.
...| horizontal */ border-image-outset: 1 1.2; /* top | horizontal | bottom */ border-image-outset: 30px 2 45px; /* top | right | bottom | left */ border-image-outset: 7px 12px 14px 5px; /* global values */ border-image-outset: inherit; border-image-outset: initial; border-image-outset: unset; the border-image-outset property may be specified as one, two, three, or four values.
...alue is specified, it applies to all four sides.
...And 3 more matches
border-image - CSS: Cascading Style Sheets
pt internal table elements when border-collapse is collapse.
...border-collapse is collapse.
... the shorthand:border-image-slice: refer to the size of the border imageborder-image-width: refer to the width or height of the border image areacomputed valueas each of the properties of the shorthand:border-image-outset: as specified, but with relative lengths converted into absolute lengthsborder-image-repeat: as specifiedborder-image-slice: one to four percentage(s) (as specified) or absolute length(s), plus the keyword fill if specifiedborder-image-source: none or the image with its uri made absoluteborder-image-width: as specified, but with relative lengths converted into absolute lengthsanimation typediscrete formal syntax <'border-image-source'> | <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>?
...And 3 more matches
calc() - CSS: Cascading Style Sheets
Web › CSS › calc
the calc() css function lets you perform calculations when specifying css property values.
...expression as its parameter, with the expression's result used as the value.
...ight-hand side must be a <number>.
...And 3 more matches
column-width - CSS: Cascading Style Sheets
interactive example is stored in a github repository.
... a pull request.
...th.
...And 3 more matches
grid-template - CSS: Cascading Style Sheets
negrid-template-rows: nonegrid-template-areas: noneapplies togrid containersinheritednopercentagesas each of the properties of the shorthand:grid-template-columns: refer to corresponding dimension of the content areagrid-template-rows: refer to corresponding dimension of the content areacomputed valueas each of the properties of the shorthand:grid-template-columns: as specified, but with relative lengths converted into absolute lengthsgrid-template-rows: as specified, but with relative lengths converted into absolute lengthsgrid-template-areas: as specifiedanimation typediscrete formal syntax none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>?
...gths converted into absolute lengthsgrid-template-areas: as specifiedanimation typediscrete formal syntax none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>?
...rid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>?
...And 3 more matches
linear-gradient() - CSS: Cascading Style Sheets
xamples and send us a pull request.
...corner, starting blue and finishing red */ linear-gradient(to left top, blue, red); /* color stop: a gradient going from the bottom to top, starting blue, turning green at 40% of its length, and finishing red */ linear-gradient(0deg, blue, green 40%, red); /* color hint: a gradient going from the left to right, starting red, getting to the midpoint color 10% of the way across the length of the gradient, taking the rest of the 90% of the length to change to blue */ linear-gradient(.25turn, red, 10%, blue); /* multi-position color stop: a gradient tilted 45 degrees, with a red bottom-left half and a blue top-right half, with a hard line where the gradient changes from red to blue */ linear-gradient(45deg, red 0 50%, blue 50% 100%); values <side-or-corner> the positi...
...re equivalent to the angles 0deg, 180deg, 270deg, and 90deg, respectively.
...And 3 more matches
margin-inline - CSS: Cascading Style Sheets
the margin-inline css shorthand property is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
... the margin-inline css shorthand property is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
...mode, direction, and text-orientation.
...And 3 more matches
mask-border-outset - CSS: Cascading Style Sheets
the mask-border-outset css property specifies the distance by which an element's mask border is set out from its border box.
...rtical | horizontal */ mask-border-outset: 1 1.2; /* top | horizontal | bottom */ mask-border-outset: 30px 2 45px; /* top | right | bottom | left */ mask-border-outset: 7px 12px 14px 5px; /* global values */ mask-border-outset: inherit; mask-border-outset: initial; mask-border-outset: unset; the mask-border-outset property may be specified as one, two, three, or four values.
...me outset to all four sides.
...And 3 more matches
max-block-size - CSS: Cascading Style Sheets
the max-block-size css property specifies the maximum size of an element in the direction opposite that of the writing direction as specified by writing-mode.
... the writing direction is horizontal, then max-block-size is equivalent to max-height; if the writing direction is vertical, max-block-size is the same as max-width.
...the content (although this may instead be vertical rather than horizontal).
...And 3 more matches
max-width - CSS: Cascading Style Sheets
Web › CSS › max-width
the used value of the width property from becoming larger than the value specified by max-width.
...-examples and send us a pull request.
...width: unset; values <length> defines the max-width as an absolute value.
...And 3 more matches
outline-offset - CSS: Cascading Style Sheets
the outline-offset css property sets the amount of space between an outline and the edge or border of an element.
...urce for this interactive example is stored in a github repository.
...he outline so that there is no space between it and the element.
...And 3 more matches
outline-width - CSS: Cascading Style Sheets
ple is stored in a github repository.
...en more convenient to use the shorthand property outline when defining the appearance of an outline.
...utline when defining the appearance of an outline.
...And 3 more matches
padding - CSS: Cascading Style Sheets
Web › CSS › padding
ght padding-top syntax /* apply to all four sides */ padding: 1em; /* vertical | horizontal */ padding: 5% 10%; /* top | horizontal | bottom */ padding: 1em 2em 2em; /* top | right | bottom | left */ padding: 5px 1em 0 2em; /* global values */ padding: inherit; padding: initial; padding: unset; the padding property may be specified using one, two, three, or four values.
...adding to all four sides.
... 0padding-right: 0padding-top: 0applies toall elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column.
...And 3 more matches
perspective - CSS: Cascading Style Sheets
y determines the distance between the z=0 plane and the user in order to give a 3d-positioned element some perspective.
...bute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...And 3 more matches
scroll-padding-block-end - CSS: Cascading Style Sheets
ebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
...ease clone https://github.com/mdn/interactive-examples and send us a pull request.
... /* keyword values */ scroll-padding-block-end: auto; /* <length> values */ scroll-padding-block-end: 10px; scroll-padding-block-end: 1em; scroll-padding-block-end: 10%; /* global values */ scroll-padding-block-end: inherit; scroll-padding-block-end: initial; scroll-padding-block-end: unset; values <length-percentage> an inwards offset from the block end edge of the scrollport, as a valid length or a percentage.
...And 3 more matches
scroll-padding-block-start - CSS: Cascading Style Sheets
ars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
...ps://github.com/mdn/interactive-examples and send us a pull request.
...es */ scroll-padding-block-start: auto; /* <length> values */ scroll-padding-block-start: 10px; scroll-padding-block-start: 1em; scroll-padding-block-start: 10%; /* global values */ scroll-padding-block-start: inherit; scroll-padding-block-start: initial; scroll-padding-block-start: unset; values <length-percentage> an inwards offset from the block start edge of the scrollport, as a valid length or a percentage.
...And 3 more matches
scroll-padding-bottom - CSS: Cascading Style Sheets
sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
... examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
... pull request.
...And 3 more matches
scroll-padding-inline-end - CSS: Cascading Style Sheets
bars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
...one https://github.com/mdn/interactive-examples and send us a pull request.
...ord values */ scroll-padding-inline-end: auto; /* <length> values */ scroll-padding-inline-end: 10px; scroll-padding-inline-end: 1em; scroll-padding-inline-end: 10%; /* global values */ scroll-padding-inline-end: inherit; scroll-padding-inline-end: initial; scroll-padding-inline-end: unset; values <length-percentage> an inwards offset from the inline end edge of the scrollport, as a valid length or a percentage.
...And 3 more matches
scroll-padding-inline-start - CSS: Cascading Style Sheets
rs) or simply to put more breathing room between a targetted element and the edges of the scrollport.
...thub.com/mdn/interactive-examples and send us a pull request.
...roll-padding-inline-start: auto; /* <length> values */ scroll-padding-inline-start: 10px; scroll-padding-inline-start: 1em; scroll-padding-inline-start: 10%; /* global values */ scroll-padding-inline-start: inherit; scroll-padding-inline-start: initial; scroll-padding-inline-start: unset; values <length-percentage> an inwards offset from the inline start edge of the scrollport, as a valid length or a percentage.
...And 3 more matches
scroll-padding-left - CSS: Cascading Style Sheets
r sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
...he interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...es and send us a pull request.
...And 3 more matches
scroll-padding-right - CSS: Cascading Style Sheets
sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
...ractive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
... send us a pull request.
...And 3 more matches
scroll-padding-top - CSS: Cascading Style Sheets
or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
...te to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...e-examples and send us a pull request.
...And 3 more matches
Media buffering, seeking, and time ranges - Developer guides
ample: <audio id="my-audio" controls src="music.mp3"> </audio> we can access these attributes like so: var myaudio = document.getelementbyid('my-audio'); var bufferedtimeranges = myaudio.buffered; timeranges object timeranges are a series of non-overlapping ranges of time, with start and stop times.
...o 5 seconds and the second spanning 15 to 19 seconds.
...ntbyid('my-canvas'); var context = mycanvas.getcontext('2d'); context.fillstyle = 'lightgray'; context.fillrect(0, 0, mycanvas.width, mycanvas.height); context.fillstyle = 'red'; context.strokestyle = 'white'; var inc = mycanvas.width / myaudio.duration; // display timeranges myaudio.addeventlistener('seeked', function() { for (i = 0; i < myaudio.buffered.length; i++) { var startx = myaudio.buffered.start(i) * inc; var endx = myaudio.buffered.end(i) * inc; var width = endx - startx; context.fillrect(startx, 0, width, mycanvas.height); context.rect(startx, 0, width, mycanvas.height); context.stroke(); } }); } this works better with longer pieces of audio or video, but press play and click abou...
...And 3 more matches
Configuring servers for Ogg media - HTTP
helpful when configuring serers to host media properly.
...sumption that the user will play it.
... minute and 32.6 seconds long, this header would be: x-content-duration: 92.6 if your server provides the x-content-duration header when serving ogg media, gecko doesn't have to do any extra http requests to seek to the end of the file to calculate its duration.
...And 3 more matches
HTTP Messages - HTTP
Web › HTTP › Messages
can be quite long.
...l requests have one: requests fetching resources, like get, head, delete, or options, usually don't need one.
... the type of the header.
...And 3 more matches
Array.prototype.fill() - JavaScript
the fill() method changes all elements in an array to a static value, from a start index (default 0) to an end index (default array.length).
...ithub repository.
...active-examples and send us a pull request.
...And 3 more matches
Array.prototype.pop() - JavaScript
the pop() method removes the last element from an array and returns that element.
....com/mdn/interactive-examples and send us a pull request.
... creates the myfish array containing four elements, then removes its last element.
...And 3 more matches
Array.prototype.splice() - JavaScript
rce for this interactive example is stored in a github repository.
...a github repository.
... of the array, start will be set to the length of the array.
...And 3 more matches
SharedArrayBuffer - JavaScript
the sharedarraybuffer object is used to represent a generic, fixed-length raw binary data buffer, similar to the arraybuffer object, but in a way that they can be used to create views on shared memory.
...operator.
...aredarraybuffer whose contents are a copy of this sharedarraybuffer's bytes from begin, inclusive, up to end, exclusive.
...And 3 more matches
String.prototype.indexOf() - JavaScript
ll be searched for in str.
... 'undefined'.indexof() will return 0, as undefined is found at position 0 in the string undefined.
...her hand, 'hello world'.indexof('o', 11) (and with any fromindex value greater than 11) will return -1, as the search is started at position 11, a position after the end of the string.
...And 3 more matches
String.prototype.slice() - JavaScript
riginal string.
...thub repository.
...ve examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...And 3 more matches
WebAssembly.Table.prototype.set() - JavaScript
d at a given index to a different value.
...value void.
...geerror is thrown.
...And 3 more matches
JavaScript typed arrays - JavaScript
nk of data; it has no format to speak of and offers no mechanism for accessing its contents.
...ttprequest.prototype.send() xmlhttprequest instances' send() method now supports typed arrays and arraybuffer objects as argument.
...tween 0 and 255 inclusive.
...And 3 more matches
MathML attribute reference - MathML
s drawn to cross out carries.
...pression.
... unimplemented indentshiftfirst <mo>, <mspace> unimplemented indentshiftlast <mo>, <mspace> unimplemented indenttarget <mo>, <mspace> unimplemented infixlinebreakstyle <mstyle> specifies the default linebreakstyle to use for infix operators.
...And 3 more matches
refX - SVG: Scalable Vector Graphics
Web › SVG › Attribute › refX
the refx attribute defines the x coordinate of an element’s reference point.
...nate of an element’s reference point.
......
...And 3 more matches
refY - SVG: Scalable Vector Graphics
Web › SVG › Attribute › refY
the refy attribute defines the y coordinate of an element’s reference point.
...nate of an element’s reference point.
......
...And 3 more matches
stroke-linecap - SVG: Scalable Vector Graphics
following pink lines highlight the position of the path for each stroke --> <path d="m1,1 h4 m1,3 h4 m1,5 h4" stroke="pink" stroke-width="0.025" /> </svg> usage notes value butt | round | square default value butt animatable yes butt the butt value indicates that the stroke for each subpath does not extend beyond its two endpoints.
...cates that the stroke for each subpath does not extend beyond its two endpoints.
...h for each stroke --> <path d="m1,1 h4" stroke="pink" stroke-width="0.025" /> <circle cx="1" cy="1" r="0.05" fill="pink" /> <circle cx="5" cy="1" r="0.05" fill="pink" /> <circle cx="3" cy="3" r="0.05" fill="pink" /> </svg> round the round value indicates that at the end of each subpath the stroke will be extended by a half circle with a diameter equal to the stroke width.
...And 3 more matches
<ellipse> - SVG: Scalable Vector Graphics
Web › SVG › Element › ellipse
specify the exact orientation of the ellipse (if, for example, you wanted to draw an ellipse tilted at a 45 degree angle), but it can be rotated by using the transform attribute.
... degree angle), but it can be rotated by using the transform attribute.
...0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <ellipse cx="100" cy="50" rx="100" ry="50" /> </svg> attributes cx the x position of the ellipse.
...And 3 more matches
<radialGradient> - SVG: Scalable Vector Graphics
9/xlink"> <defs> <radialgradient id="mygradient"> <stop offset="10%" stop-color="gold" /> <stop offset="95%" stop-color="red" /> </radialgradient> </defs> <!-- using my linear gradient --> <circle cx="5" cy="5" r="4" fill="url('#mygradient')" /> </svg> attributes cx this attribute defines the x coordinate of the end circle of the radial gradient.
... </radialgradient> </defs> <!-- using my linear gradient --> <circle cx="5" cy="5" r="4" fill="url('#mygradient')" /> </svg> attributes cx this attribute defines the x coordinate of the end circle of the radial gradient.
...lue type: <length> ; default value: 50%; animatable: yes cy this attribute defines the y coordinate of the end circle of the radial gradient.
...And 3 more matches
<symbol> - SVG: Scalable Vector Graphics
Web › SVG › Element › symbol
ref="#mydot" x="5" y="5" style="opacity:1.0" /> <use xlink:href="#mydot" x="20" y="5" style="opacity:0.8" /> <use xlink:href="#mydot" x="35" y="5" style="opacity:0.6" /> <use xlink:href="#mydot" x="50" y="5" style="opacity:0.4" /> <use xlink:href="#mydot" x="65" y="5" style="opacity:0.2" /> </svg> attributes height this attribute determines the height of the symbol.
... this attribute defines how the svg fragment must be deformed if it is embedded in a container with a different aspect ratio.
...minymid| xmidymid| xmaxymid| xminymax| xmidymax| xmaxymax) (meet|slice)?
...And 3 more matches
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
svg 2 is the next major version of the svg standard, which is a complete rework of the svg 1.2 draft.
... svgelement.tabindex implemented (bug 778654) document.activeelement implementation status unknown globaleventhandlers on svgelement implementation status unknown options dictionary attribute for svggraphicselement.getbbox() implemented behind the preference svg.new-getbbox.enabled (bug 999964, bug 1019326) allow leading and trailing whitespace in <length>, <angle>, <number> and <integer> implementation status unknown form feed (u+000c) in whitespace implementation status unknown svgelement.xmlbase, svgelement.xmllang and svgelement.xmlspace removed implementation status unknown svgviewspec removed implementation status unknown svgelement.style removed implementation status unknown svggra...
...element.style removed implementation status unknown svggraphicselement.gettransformtoelement() removed not removed yet svggraphicselement.getctm() on the outermost element implementation status unknown animval attribute alias of baseval implementation status unknown dataset attribute for svgelement implementation status unknown moved pathlength attribute and gettotallength() and getpointatlength() methods from svgpathelement to svggeometryelement implemented (bug 1239100) document structure change notes svgsvgelement.suspendredraw(), svgsvgelement.unsuspendredraw(), and svgsvgelement.unsuspendredrawall() deprecated turned into no-ops (bug 734079) externalresourcesrequired attribute removed...
...And 3 more matches
Understanding WebAssembly text format - WebAssembly
nstances can also grow, for example via the memory.grow() method in javascript.
...javascript.
...ched and a new arraybuffer is created to point to the newer, bigger memory.
...And 3 more matches
Miscellaneous - Archive of obsolete content
added to the page (e.g., by page javascript).
...ntlistener("blur", function(e) {onblurinput(e);}, false); } } function onfocusinput(focusevent) { focusedcontrol = focusevent.originaltarget; } function onblurinput(blurevent) { focusedcontrol = null; } or var element = document.commanddispatcher.focusedelement; inserting text at the cursor function inserttext(element, snippet) { var selectionend = element.selectionstart + snippet.length; var currentvalue = element.value; var beforetext = currentvalue.substring(0, element.selectionstart); var aftertext = currentvalue.substring(element.selectionend, currentvalue.length); element.value = beforetext + snippet + aftertext; element.focus(); //put the cursor after the inserted text element.setselectionrange(selectionend, selectionend); } inserttext(document.getelement...
...ame), is: var fcbundle = components.classes["@mozilla.org/intl/stringbundle;1"] .getservice(components.interfaces.nsistringbundleservice) .createbundle("chrome://myext/locale/myext.properties"); function getstr(msg, args){ //get localised message if (args){ args = array.prototype.slice.call(arguments, 1); return fcbundle.formatstringfromname(msg,args,args.length); } else { return fcbundle.getstringfromname(msg); } } /* usage */ alert(getstr("invalid.url", "http://bad/url/", "3")); //for message with parameters alert(getstr("invalid.url")); //for message without parameters getting postdata of a webpage first, you need to get the browser you want, and its historysession.
...And 2 more matches
Visualizing an audio spectrum - Archive of obsolete content
trum example</title> </head> <body> <audio id="audio-element" src="song.ogg" controls="true" style="width: 512px;"> </audio> <div><canvas id="fft" width="512" height="200"></canvas></div> <script> var canvas = document.getelementbyid('fft'), ctx = canvas.getcontext('2d'), channels, rate, framebufferlength, fft; function loadedmetadata() { channels = audio.mozchannels; rate = audio.mozsamplerate; framebufferlength = audio.mozframebufferlength; fft = new fft(framebufferlength / channels, rate); } function audioavailable(event) { var fb = event.framebuffer, t = event.time, /* unused, but it's the...
...() { channels = audio.mozchannels; rate = audio.mozsamplerate; framebufferlength = audio.mozframebufferlength; fft = new fft(framebufferlength / channels, rate); } function audioavailable(event) { var fb = event.framebuffer, t = event.time, /* unused, but it's there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength / 2; i < fbl; i++ ) { // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } fft.forward(signal); // clear the canvas before drawing spectrum ctx.clearrect(0,0, canvas.
... = framebufferlength / 2; i < fbl; i++ ) { // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } fft.forward(signal); // clear the canvas before drawing spectrum ctx.clearrect(0,0, canvas.width, canvas.height); for (var i = 0; i < fft.spectrum.length; i++ ) { // multiply spectrum by a zoom value magnitude = fft.spectrum[i] * 4000; // draw rectangle bars for each frequency bin ctx.fillrect(i * 4, canvas.height, 3, -magnitude); } } var audio = document.getelementbyid('audio-element'); audio.addeventlistener('mozaudioavailable', audioavailable, false); audio.addeventlisten...
...And 2 more matches
Introducing the Audio API extension - Archive of obsolete content
has been deprecated since gecko 22, disabled since gecko 28, and removed from gecko 31.
...lement: <!doctype html> <html> <head> <title>javascript metadata example</title> </head> <body> <audio id="audio-element" src="song.ogg" controls="true" style="width: 512px;"> </audio> <script> function loadedmetadata() { channels = audio.mozchannels; rate = audio.mozsamplerate; framebufferlength = audio.mozframebufferlength; } var audio = document.getelementbyid('audio-element'); audio.addeventlistener('loadedmetadata', loadedmetadata, false); </script> </body> </html> the mozaudioavailable event as the audio is played, sample data is made available to the audio layer and the audio buffer (size defined in mozframebufferlength) gets filled with those samples.
...<head> <title>javascript visualization example</title> </head> <body> <audio id="audio-element" src="revolve.ogg" controls="true" style="width: 512px;"> </audio> <pre id="raw">hello</pre> <script> function loadedmetadata() { channels = audio.mozchannels; rate = audio.mozsamplerate; framebufferlength = audio.mozframebufferlength; } function audioavailable(event) { var framebuffer = event.framebuffer; var t = event.time; var text = "samples at: " + t + "\n"; text += framebuffer[0] + " " + framebuffer[1]; raw.innerhtml = text; } var raw = document.getelementbyid('raw'); var audio = document.getelementbyid('audio-elem...
...And 2 more matches
Reading from Files - Archive of obsolete content
he first 20.
...s from the stream and interpret them as an integer.
...hem as an integer.
...And 2 more matches
Index - Archive of obsolete content
Archive › Mozilla › XUL › Index
no summary!
...istbox.currentindex xul properties, xul reference no summary!
... 853 tabbox.tabs xul properties, xul reference no summary!
...And 2 more matches
Tree Box Objects - Archive of obsolete content
ed.
... page will be equivalent to 10 rows.
...flexible tree, the page size will grow and shrink, so you don't need to calculate the page size manually.
...And 2 more matches
XBL Example - Archive of obsolete content
method.
...f the text inside it.
...ll also need a constructor to initialize the label element so that it displays correctly when the slideshow is first displayed.
...And 2 more matches
SSL and TLS - Archive of obsolete content
keys.
...ication.
...pliant because it is too weak cryptographically.
...And 2 more matches
Desktop gamepad controls - Game development
when the device is connected: we can also show the id of the device — in the case above we're using the xbox 360 wireless controller.
...o store the latest info we'll write to it from the current frame.
...sconnect function removes the information from the object: disconnect: function(event) { delete gamepadapi.controller; gamepadapi.active = false; }, the update() function is executed in the update loop of the game on every frame, so it contains the latest information on the pressed buttons: update: function() { gamepadapi.buttons.cache = []; for(var k=0; k<gamepadapi.buttons.status.length; k++) { gamepadapi.buttons.cache[k] = gamepadapi.buttons.status[k]; } gamepadapi.buttons.status = []; var c = gamepadapi.controller || {}; var pressed = []; if(c.buttons) { for(var b=0,t=c.buttons.length; b<t; b++) { if(c.buttons[b].pressed) { pressed.push(gamepadapi.buttons.layout[b]); } } } var axes = []; if(c.axes) { for(var a=0,x=c.axes.leng...
...And 2 more matches
CSS pixel - MDN Web Docs Glossary: Definitions of Web-related terms
the css pixel—denoted in css with the suffix px—is a unit of length which roughly corresponds to the width or height of a single dot that can be comfortably seen by the human eye without strain, but is otherwise as small as possible.
... the css pixel—denoted in css with the suffix px—is a unit of length which roughly corresponds to the width or height of a single dot that can be comfortably seen by the human eye without strain, but is otherwise as small as possible.
...orresponds to the width or height of a single dot that can be comfortably seen by the human eye without strain, but is otherwise as small as possible.
...And 2 more matches
IDL - MDN Web Docs Glossary: Definitions of Web-related terms
have two faces: the content attribute and the idl (interface definition language) attribute.
...guage) attribute.
...rn their values as they are really used.
...And 2 more matches
Advanced styling effects - Learn web development
ritical level.</p> </article> now the css: p { margin: 0; } article { max-width: 500px; padding: 10px; background-color: red; background-image: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.25)); } .simple { box-shadow: 5px 5px 5px rgba(0,0,0,0.7); } this gives us the following result: you'll see that we've got four items in the box-shadow property value: the first length value is the horizontal offset — the distance to the right the shadow is offset from the original box (or left, if the value is negative).
...ear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.25)); } .simple { box-shadow: 5px 5px 5px rgba(0,0,0,0.7); } this gives us the following result: you'll see that we've got four items in the box-shadow property value: the first length value is the horizontal offset — the distance to the right the shadow is offset from the original box (or left, if the value is negative).
... see that we've got four items in the box-shadow property value: the first length value is the horizontal offset — the distance to the right the shadow is offset from the original box (or left, if the value is negative).
...And 2 more matches
Fundamental text and font styling - Learn web development
have nestled its way into his mighty throat.
...nt-size: 1.5rem; color: red; font-family: helvetica, arial, sans-serif; } text drop shadows you can apply drop shadows to your text using the text-shadow property.
...has to be included.
...And 2 more matches
Test your skills: Form validation - Learn web development
, we are providing you with a simple support query form, and we want you to add some validation features to it: make all of the input fields mandatory to complete before the form can be submitted.
...o add some validation features to it: make all of the input fields mandatory to complete before the form can be submitted.
...put fields mandatory to complete before the form can be submitted.
...And 2 more matches
HTML text fundamentals - Learn web development
ydown = function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { var scrollpos = textarea.scrolltop; var caretpos = textarea.selectionstart; var front = (textarea.value).substring(0, caretpos); var back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not t...
...ydown = function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { var scrollpos = textarea.scrolltop; var caretpos = textarea.selectionstart; var front = (textarea.value).substring(0, caretpos); var back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not t...
...ydown = function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { var scrollpos = textarea.scrolltop; var caretpos = textarea.selectionstart; var front = (textarea.value).substring(0, caretpos); var back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not t...
...And 2 more matches
sslerr.html
tes that the client and server have failed to come to agreement on the set of keys used to encrypt the application data and to check message integrity.
...e server.
...ue description sec_error_io -8192 an i/o error occurred during authentication; or an error occurred during crypto operation (other than signature verification).
...And 2 more matches
JS::CompileOffThread
this article covers features introduced in spidermonkey 31 compile a script off thread for execution.
... this article covers features introduced in spidermonkey 31 compile a script off thread for execution.
...aybe jscontext * pointer to a js context from which to derive runtime information.
...And 2 more matches
JS::HandleValueArray
:handlevaluearray(const js::callargs& args); js::handlevaluearray::frommarkedlocation(size_t len, const js::value *elements); js::handlevaluearray::subarray(const js::handlevaluearray& values, size_t startindex, size_t len); js::handlevaluearray::empty(); name type description value js::rootedvalue &amp; an element of newly created 1-length array.
...name type description value js::rootedvalue &amp; an element of newly created 1-length array.
...::rootedvalue &amp; an element of newly created 1-length array.
...And 2 more matches
JS_EncodeCharacters
16-bit string to an 8-bit string.
... can be obtained with js_getstringchars.
...the source string, in 16-bit values.
...And 2 more matches
JS_EvaluateScript
obsolete since jsapi 36this feature is obsolete.
... in some browsers, its use is discouraged since it could be removed at any time.
...cx jscontext * the context in which to run the script.
...And 2 more matches
JS_NewRegExpObject
create a new regexp object.
... create a new regexp object.
... jsobject * js_newregexpobject(jscontext *cx, js::handleobject obj, const char *bytes, size_t length, unsigned flags); jsobject * js_newucregexpobject(jscontext *cx, js::handleobject obj, const char16_t *chars, size_t length, unsigned flags); jsobject * js_newregexpobjectnostatics(jscontext *cx, char *bytes, size_t length, unsigned flags); jsobject * js_newucregexpobjectnostatics(jscontext *cx, char16_t *chars, size_t length, unsigned flags); name type description cx jscontext * the context in which to create the new object.
...And 2 more matches
JS_NewUCString
note: js_newstring() was removed in spidermonkey 1.8.5.
... note: js_newstring() was removed in spidermonkey 1.8.5.
...ame type description cx jscontext * the context in which to create the new string.
...And 2 more matches
XPCOM Stream Guide
Mozilla › Tech › XPCOM › Guide › Streams
tstream.
...m called nativestream, you can use code like this: var stream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interfaces.nsiscriptableinputstream); stream.init(nativestream); the stream provides .read(count), .available(), and .close() methods.
...eam = components.classes["@mozilla.org/storagestream;1"] .createinstance(components.interfaces.nsistoragestream) .getoutputstream(); var instream = components.classes["@mozilla.org/io/string-input-stream;1"] .createinstance(components.interfaces.nsistringinputstream); var data = "hello world"; instream.setdata(data, data.length); while (instream.available()) { outstream.writefrom(instream, instream.available()); } note this is an inefficient example: the only important part is how to feed the output stream.
...And 2 more matches
nsACString
umber of bytes stored in the string.
...es stored in the string.
...articular character encoding.
...And 2 more matches
nsAString
nits stored in the string.
...the string.
...cular character encoding.
...And 2 more matches
IAccessible2
scriptable please add a summary to this article.
...] long grouplevel, [out] long similaritemsingroup, [out] long positioningroup ); [propget] hresult indexinparent([out] long indexinparent ); [propget] hresult locale([out] ia2locale locale ); [propget] hresult localizedextendedrole([out] bstr localizedextendedrole ); [propget] hresult localizedextendedstates([in] long maxlocalizedextendedstates, [out, size_is(,maxlocalizedextendedstates), length_is(, nlocalizedextendedstates)] bstr localizedextendedstates, [out] long nlocalizedextendedstates ); [propget] hresult nextendedstates([out] long nextendedstates ); [propget] hresult nrelations([out] long nrelations ); [propget] hresult relation([in] long relationindex, [out] iaccessiblerelation relation ); [propget] hresult relations([in] long maxrelations, [out, size_is(maxrelations), l...
...s extendedrole return value s_false if there is nothing to return, [out] value is null.
...And 2 more matches
nsIAccessibleText
rangeendoffset return value getcharacteratoffset() it would be better to return an unsigned long here, to allow unicode chars > 16 bits.
... of all the characters in the text or the height of the preceding character, its width being at least one pixel so that the bounding box is not degenerate.
... on to the display at that point.
...And 2 more matches
nsICRLManager
security/manager/ssl/public/nsicrlmanager.idlscriptable please add a summary to this article.
...ublic/nsicrlmanager.idlscriptable please add a summary to this article.
...signed long autoupdatetype, in double noofdays ); parameters info autoupdatetype noofdays return value deletecrl() delete the crl.
...And 2 more matches
nsIClipboard
rits from: nsisupports last changed in gecko 30.0 (firefox 30.0 / thunderbird 30.0 / seamonkey 2.27) method overview void emptyclipboard(in long awhichclipboard); void forcedatatoclipboard(in long awhichclipboard); obsolete since gecko 1.8 void getdata(in nsitransferable atransferable, in long awhichclipboard); boolean hasdatamatchingflavors([array, size_is(alength)] in string aflavorlist, in unsigned long alength, in long awhichclipboard); void setdata(in nsitransferable atransferable, in nsiclipboardowner anowner, in long awhichclipboard); boolean supportsselectionclipboard(); boolean supportsfindclipboard(); constants most clipboard operations in firefox use kglobalclipboard, which is the one also used by the typical co...
...hich this operation applies.
...s() this method provides a way to give correct ui feedback about, for instance, whether a paste should be allowed.
...And 2 more matches
nsIContentViewManager
u have the view manager, you can call getcontentviewsin() to get a list of the content views for a given portion of the browser display, then use those nsicontentview objects to manipulate the content views.
...call getcontentviewsin() to get a list of the content views for a given portion of the browser display, then use those nsicontentview objects to manipulate the content views.
...lets you, for example, take the coordinates at which the user clicked (or touched) the screen, and expand outward to create a rectangle from that point.
...And 2 more matches
nsIDOMProgressEvent
the nsidomprogressevent is used in the media elements (<video> and <audio>) to inform interested code of the progress of the media download.
... the specification is complete, and is compatible with the webkit progressevent.
... methods initprogressevent() deprecated since gecko 22.0 this method has been removed from use in javascript in gecko 22.0.
...And 2 more matches
nsIMIMEInputStream
netwerk/base/public/nsimimeinputstream.idlscriptable the mime stream separates headers and a datastream.
...;1.
...putstream = components.classes["@mozilla.org/network/mime-input-stream;1"] .createinstance(components.interfaces.nsimimeinputstream); method overview void addheader(in string name, in string value); void setdata(in nsiinputstream stream); attributes attribute type description addcontentlength boolean when true a "content-length" header is automatically added to the stream.
...And 2 more matches
nsIProfile
gecko 1.8.1.
...been used in firefox since before firefox 1.0.
...ied profile.
...And 2 more matches
nsIUploadChannel
e/public/nsiuploadchannel.idlscriptable a channel may optionally implement this interface if it supports the notion of uploading a data stream.
...this channel.
... example, content-type and content-length) information prepended to the stream (by plugins) as well as clients (composer, uploading application) that want to upload data streams without any knowledge of protocol specifications.
...And 2 more matches
nsIUploadChannel2
netwerk/base/public/nsiuploadchannel2.idlscriptable please add a summary to this article.
...from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void explicitsetuploadstream(in nsiinputstream astream, in acstring acontenttype, in long long acontentlength, in acstring amethod, in boolean astreamhasheaders); methods explicitsetuploadstream() sets a stream to be uploaded by this channel with the specified content-type and content-length header values.
...s a stream to be uploaded by this channel with the specified content-type and content-length header values.
...And 2 more matches
AbstractRange - Web APIs
ition are the same, resulting in a zero-character-long range.
...han the length of the endcontainer node.
...nt, keep in mind that the element itself is a node, but so is any text inside it.
...And 2 more matches
AnalyserNode.frequencyBinCount - Web APIs
the frequencybincount read-only property of the analysernode interface is an unsigned integer half that of the analysernode.fftsize.
...argraph style" output of the current audio input.
...ore complete applied examples/information, check out our voice-change-o-matic demo (see app.js lines 128–205 for relevant code).
...And 2 more matches
AnalyserNode.getByteFrequencyData() - Web APIs
rray will represent the decibel value for 24000 hz.
...me and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
...d draw a "winamp bargraph style" output of the current audio input.
...And 2 more matches
AnalyserNode.getFloatFrequencyData() - Web APIs
t item of the array will represent the decibel value for 24000 hz.
...in data will be copied to.
...source //here, we use an audio file, but this could also be e.g.
...And 2 more matches
AnalyserNode.getFloatTimeDomainData() - Web APIs
m, or time-domain, data into a float32array array passed into it.
...canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
...y and draw an "oscilloscope style" output of the current audio input.
...And 2 more matches
EventTarget.addEventListener() - Web APIs
var e=new event(); e.srcelement=window; wrapper2(e); } } else { this.attachevent("on"+type,wrapper); eventlisteners.push({object:this,type:type,listener:listener,wrapper:wrapper}); } }; var removeeventlistener=function(type,listener /*, usecapture (will be ignored) */) { var counter=0; while (counter<eventlisteners.length) { var eventlistener=eventlisteners[counter]; if (eventlistener.object==this && eventlistener.type==type && eventlistener.listener==listener) { if (type=="domcontentloaded") { this.detachevent("onreadystatechange",eventlistener.wrapper); } else { this.detachevent("on"+type,eventlistener.wrapper); } eventlisteners.spli...
...t of dom 0, this technique for adding event listeners is very widely supported and requires no special cross-browser code.
... when very old browsers (like ie <=8) must be supported; see the table below for details on browser support for addeventlistener.
...And 2 more matches
FileList - Web APIs
Web › API › FileList
ws access to the items in this list.
... the requested file.
...iles[i]; alert(file.name); } here is a complete example.
...And 2 more matches
HmacImportParams - Web APIs
portkey() or subtlecrypto.unwrapkey(), when generating a key for the hmac algorithm.
...enerating a key for the hmac algorithm.
...s name a domstring.
...And 2 more matches
HmacKeyGenParams - Web APIs
mackeygenparams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.generatekey(), when generating a key for the hmac algorithm.
...b crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.generatekey(), when generating a key for the hmac algorithm.
...passed as the algorithm parameter into subtlecrypto.generatekey(), when generating a key for the hmac algorithm.
...And 2 more matches
NavigatorPlugins.plugins - Web APIs
exact name instead of enumerating the navigator.plugins array and comparing every plugin's name.
...flash = navigator.plugins.nameditem('shockwave flash'); if (typeof flash != 'object') { // flash is not present return undefined; } if(flash.version){ return flash.version; } else { //no version property (e.g.
...ameditem('shockwave flash'); if (typeof flash != 'object') { // flash is not present return undefined; } if(flash.version){ return flash.version; } else { //no version property (e.g.
...And 2 more matches
ReadableStream.cancel() - Web APIs
contextafter = 30; var caseinsensitive = true; var url = 'https://html.spec.whatwg.org/'; console.log(`searching '${url}' for '${searchterm}'`); fetch(url).then(response => { console.log('received headers'); var decoder = new textdecoder(); var reader = response.body.getreader(); var tomatch = caseinsensitive ?
...dy.getreader(); var tomatch = caseinsensitive ?
...ived} bytes of data so far`); buffer += decoder.decode(result.value, {stream: true}); // already found match & just context-gathering?
...And 2 more matches
SVGRadialGradientElement - Web APIs
41" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgradialgradientelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggradientelement.
..."middle">svgradialgradientelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggradientelement.
...s interface also inherits properties from its parent, svggradientelement.
...And 2 more matches
TextEncoder - Web APIs
code through a minifier (especially closure compiler) to turn sequences like 0x1e << 3 into 0xf0.
...ler) to turn sequences like 0x1e << 3 into 0xf0.
...e << 3 into 0xf0.
...And 2 more matches
TouchEvent.targetTouches - Web APIs
is example illustrates the touchevent object's touchevent.targettouches property.
...object's touchevent.targettouches property.
...t.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.
...And 2 more matches
WebGL2RenderingContext.uniform[1234][uif][v]() - Web APIs
f for float, and v for vector.
... combined with f.
...](u?i|f)v?
...And 2 more matches
WebGL2RenderingContext.uniformMatrix[234]x[234]fv() - Web APIs
the webgl2renderingcontext.uniformmatrix[234]x[234]fv() methods of the webgl 2 api specify matrix values for uniform variables.
...34]fv() methods of the webgl 2 api specify matrix values for uniform variables.
...2x2, 3x3, and 4x4 versions of this method.
...And 2 more matches
WebGLRenderingContext.vertexAttribPointer() - Web APIs
ttributes.
...l vector, or texture coordinate, that are defined in an arraybuffer and will be supplied to the vertex buffer object (vbo).
... functions have a slow performance and it is better to store the state inside your javascript application.
...And 2 more matches
Signaling and video calling - Web APIs
separate server.
...just call its send() method directly.
...ecific user.
...And 2 more matches
Advanced techniques: Creating and sequencing audio - Web APIs
et the parameter you are changing to (in this case the gain) and when you want to do this.
...ve); 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 + sweeplength); } note: we'll talk about the property baseaudiocontext.currenttime later, so don't worry if you're unsure of it for now.
...re audiobuffer objects come in.
...And 2 more matches
Worker.prototype.postMessage() - Web APIs
r, msg:', msg); switch (msg.data.atopic) { case 'do_sendmainarrbuff': sendmainarrbuff(msg.data.abuf) break; default: throw 'no atopic on incoming message to chromeworker'; } } myworker.addeventlistener('message', handlemessagefromworker); // ok lets create the buffer and send it var arrbuf = new arraybuffer(8); console.info('arrbuf.bytelength pre transfer:', arrbuf.bytelength); myworker.postmessage( { atopic: 'do_sendworkerarrbuff', abuf: arrbuf // the array buffer that we passed to the transferrable section 3 lines below }, [ arrbuf // the array buffer we created 9 lines above ] ); console.info('arrbuf.bytelength post transfer:', arrbuf.bytelength); worker code self.onmessage = function (m...
... transfer:', arrbuf.bytelength); worker code self.onmessage = function (msg) { switch (msg.data.atopic) { case 'do_sendworkerarrbuff': sendworkerarrbuff(msg.data.abuf) break; default: throw 'no atopic on incoming message to chromeworker'; } } function sendworkerarrbuff(abuf) { console.info('from worker, pre send back abuf.bytelength:', abuf.bytelength); self.postmessage({atopic:'do_sendmainarrbuff', abuf:abuf}, [abuf]); console.info('from worker, post send back abuf.bytelength:', abuf.bytelength); } output logged arrbuf.bytelength pre transfer: 8 bootstrap.js:40 arrbuf.bytelength post transfer: 0 bootstrap.js:42 from worker, pre send back abuf.bytelen...
...gth:', abuf.bytelength); } output logged arrbuf.bytelength pre transfer: 8 bootstrap.js:40 arrbuf.bytelength post transfer: 0 bootstrap.js:42 from worker, pre send back abuf.bytelength: 8 myworker.js:5:2 incoming message from worker, msg: message { ...
...And 2 more matches
-moz-outline-radius-bottomleft - CSS: Cascading Style Sheets
in mozilla applications, the -moz-outline-radius-bottomleft css property can be used to round the bottom-left corner of an element's outline.
... in mozilla applications, the -moz-outline-radius-bottomleft css property can be used to round the bottom-left corner of an element's outline.
...s property can be used to round the bottom-left corner of an element's outline.
...And 2 more matches
-moz-outline-radius-bottomright - CSS: Cascading Style Sheets
in mozilla applications, the -moz-outline-radius-bottomright css property can be used to round the bottom-right corner of an element's outline.
... in mozilla applications, the -moz-outline-radius-bottomright css property can be used to round the bottom-right corner of an element's outline.
...roperty can be used to round the bottom-right corner of an element's outline.
...And 2 more matches
-moz-outline-radius-topleft - CSS: Cascading Style Sheets
in mozilla applications, the -moz-outline-radius-topleft css property can be used to round the top-left corner of an element's outline.
... in mozilla applications, the -moz-outline-radius-topleft css property can be used to round the top-left corner of an element's outline.
...opleft css property can be used to round the top-left corner of an element's outline.
...And 2 more matches
-moz-outline-radius-topright - CSS: Cascading Style Sheets
in mozilla applications, the -moz-outline-radius-topright css property can be used to round the top-right corner of an element's outline.
... in mozilla applications, the -moz-outline-radius-topright css property can be used to round the top-right corner of an element's outline.
...ght css property can be used to round the top-right corner of an element's outline.
...And 2 more matches
width - CSS: Cascading Style Sheets
Web › CSS › @viewport › width
the width css descriptor is shorthand for setting both the min-width and the max-width descriptors of the viewport.
...e value provided.
... provided the first value will be set to the min-width and the second value will be set max-width.
...And 2 more matches
border-bottom-width - CSS: Cascading Style Sheets
ty sets the width of the bottom border of an element.
...ues */ border-bottom-width: thin; border-bottom-width: medium; border-bottom-width: thick; /* <length> values */ border-bottom-width: 10em; border-bottom-width: 3vmax; border-bottom-width: 6px; /* global keywords */ border-bottom-width: inherit; border-bottom-width: initial; border-bottom-width: unset; values <line-width> defines the width of the border, either as an explicit nonnegative <length> or a keyword.
...ion doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific.
...And 2 more matches
border-left-width - CSS: Cascading Style Sheets
s property sets the width of the left border of an element.
...ax /* keyword values */ border-left-width: thin; border-left-width: medium; border-left-width: thick; /* <length> values */ border-left-width: 10em; border-left-width: 3vmax; border-left-width: 6px; /* global keywords */ border-left-width: inherit; border-left-width: initial; border-left-width: unset; values <line-width> defines the width of the border, either as an explicit nonnegative <length> or a keyword.
...ion doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific.
...And 2 more matches
border-right-width - CSS: Cascading Style Sheets
operty sets the width of the right border of an element.
...yword values */ border-right-width: thin; border-right-width: medium; border-right-width: thick; /* <length> values */ border-right-width: 10em; border-right-width: 3vmax; border-right-width: 6px; /* global keywords */ border-right-width: inherit; border-right-width: initial; border-right-width: unset; values <line-width> defines the width of the border, either as an explicit nonnegative <length> or a keyword.
...ion doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific.
...And 2 more matches
border-top-width - CSS: Cascading Style Sheets
h css property sets the width of the top border of an element.
...st.
...ion doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific.
...And 2 more matches
border - CSS: Cascading Style Sheets
Web › CSS › border
border-color: as each of the properties of the shorthand:border-top-color: currentcolorborder-right-color: currentcolorborder-bottom-color: currentcolorborder-left-color: currentcolorapplies toall elements.
...lorborder-right-color: currentcolorborder-bottom-color: currentcolorborder-left-color: currentcolorapplies toall elements.
...or: currentcolorapplies toall elements.
...And 2 more matches
grid-auto-columns - CSS: Cascading Style Sheets
s positioned into a column that is not explicitly sized by grid-template-columns, implicit grid tracks are created to hold it.
...ent max-content auto; grid-auto-columns: 100px 150px 390px; grid-auto-columns: 10% 33.3%; grid-auto-columns: 0.5fr 3fr 1fr; grid-auto-columns: minmax(100px, auto) minmax(max-content, 2fr) minmax(20%, 80vmax); grid-auto-columns: 100px minmax(100px, auto) 10% 0.5fr fit-content(400px); /* global values */ grid-auto-columns: inherit; grid-auto-columns: initial; grid-auto-columns: unset; values <length> is a non-negative length.
... specified by min-width/min-height) of the grid items occupying the grid track.
...And 2 more matches
grid-auto-rows - CSS: Cascading Style Sheets
st.
...grid-auto-rows: min-content max-content auto; grid-auto-rows: 100px 150px 390px; grid-auto-rows: 10% 33.3%; grid-auto-rows: 0.5fr 3fr 1fr; grid-auto-rows: minmax(100px, auto) minmax(max-content, 2fr) minmax(20%, 80vmax); grid-auto-rows: 100px minmax(100px, auto) 10% 0.5fr fit-content(400px); /* global values */ grid-auto-rows: inherit; grid-auto-rows: initial; grid-auto-rows: unset; values <length> is a non-negative length.
...specified by min-width/min-height) of the grid items occupying the grid track.
...And 2 more matches
letter-spacing - CSS: Cascading Style Sheets
uses characters to spread farther apart, while negative values of letter-spacing bring characters closer together.
...*/ 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.
... one value that can ensure all font families automatically maintain their legibility.
...And 2 more matches
line-height-step - CSS: Cascading Style Sheets
the line-height-step css property sets the step unit for line box heights.
... the line-height-step css property sets the step unit for line box heights.
... the line-height-step css property sets the step unit for line box heights.
...And 2 more matches
margin-block-end - CSS: Cascading Style Sheets
ines the logical block end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation.
...s to a physical margin depending on the element's writing mode, directionality, and text orientation.
...r writing-mode, direction, and text-orientation.
...And 2 more matches
margin-block-start - CSS: Cascading Style Sheets
es the logical block start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation.
...to a physical margin depending on the element's writing mode, directionality, and text orientation.
...r writing-mode, direction, and text-orientation.
...And 2 more matches
margin-inline-end - CSS: Cascading Style Sheets
ponds to the margin-top, margin-right, margin-bottom or margin-left property depending on the values defined for writing-mode, direction, and text-orientation.
...in-left property depending on the values defined for writing-mode, direction, and text-orientation.
...inline-end: initial; margin-inline-end: unset; it relates to margin-block-start, margin-block-end, and margin-inline-start, which define the other margins of the element.
...And 2 more matches
margin-inline-start - CSS: Cascading Style Sheets
onds to the margin-top, margin-right, margin-bottom, or margin-left property depending on the values defined for writing-mode, direction, and text-orientation.
...n-left property depending on the values defined for writing-mode, direction, and text-orientation.
...* global values */ margin-inline-start: inherit; it relates to margin-block-start, margin-block-end, and margin-inline-end, which define the other margins of the element.
...And 2 more matches
mask-position - CSS: Cascading Style Sheets
l definition initial valuecenterapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednopercentagesrefer to size of mask painting area minus size of mask layer image (see the text for background-position)computed valueconsists of two keywords representing the origin and two offsets from that origin, each given as an absolute length (if given a <length>), otherwise as a percentage.animation typerepeatable list of simple list of length, percentage, or calc formal syntax <position>#where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
... from that origin, each given as an absolute length (if given a <length>), otherwise as a percentage.animation typerepeatable list of simple list of length, percentage, or calc formal syntax <position>#where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
... length (if given a <length>), otherwise as a percentage.animation typerepeatable list of simple list of length, percentage, or calc formal syntax <position>#where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
...And 2 more matches
minmax() - CSS: Cascading Style Sheets
Web › CSS › minmax
dth>, <track-breadth> values */ minmax(200px, 1fr) minmax(30%, 300px) minmax(400px, 50%) minmax(50%, min-content) minmax(300px, max-content) minmax(200px, auto) /* <inflexible-breadth>, <fixed-breadth> values */ minmax(400px, 50%) minmax(30%, 300px) minmax(min-content, 200px) minmax(max-content, 200px) minmax(auto, 300px) a function taking two parameters, min and max.
...ax-content, 200px) minmax(auto, 300px) a function taking two parameters, min and max.
...x(auto, 300px) a function taking two parameters, min and max.
...And 2 more matches
padding-block-end - CSS: Cascading Style Sheets
es the logical block end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation.
... physical padding depending on the element's writing mode, directionality, and text orientation.
...writing mode, directionality, and text orientation.
...And 2 more matches
padding-block-start - CSS: Cascading Style Sheets
the logical block start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation.
...hysical padding depending on the element's writing mode, directionality, and text orientation.
...ing mode, directionality, and text orientation.
...And 2 more matches
padding-bottom - CSS: Cascading Style Sheets
example is stored in a github repository.
....
...the width of the containing block.
...And 2 more matches
padding-inline-end - CSS: Cascading Style Sheets
s the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation.
... a physical padding depending on the element's writing mode, directionality, and text orientation.
...t's writing mode, directionality, and text orientation.
...And 2 more matches
padding-inline-start - CSS: Cascading Style Sheets
the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation.
... physical padding depending on the element's writing mode, directionality, and text orientation.
...writing mode, directionality, and text orientation.
...And 2 more matches
padding-left - CSS: Cascading Style Sheets
e example is stored in a github repository.
...ngle declaration.
...the width of the containing block.
...And 2 more matches
padding-right - CSS: Cascading Style Sheets
e example is stored in a github repository.
...laration.
...the width of the containing block.
...And 2 more matches
padding-top - CSS: Cascading Style Sheets
example is stored in a github repository.
...ith a single declaration.
...the width of the containing block.
...And 2 more matches
<position> - CSS: Cascading Style Sheets
l offsets.
.../ value keyword /* a value for horizontal position, keyword for vertical position */ value value /* a value for each direction (horizontal then vertical) */ /* 4-value syntax */ keyword value keyword value /* each value is an offset from the keyword that preceeds it */ formal syntax [ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length> | <percentage> ] [ top | center | bottom | <length> | <percentage> ]?
...lue /* a value for each direction (horizontal then vertical) */ /* 4-value syntax */ keyword value keyword value /* each value is an offset from the keyword that preceeds it */ formal syntax [ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length> | <percentage> ] [ top | center | bottom | <length> | <percentage> ]?
...And 2 more matches
scroll-padding-block - CSS: Cascading Style Sheets
scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport.
... is a shorthand for the following css properties: scroll-padding-block-end scroll-padding-block-start syntax /* keyword values */ scroll-padding-block: auto; /* <length> values */ scroll-padding-block: 10px; scroll-padding-block: 1em .5em; scroll-padding-block: 10%; /* global values */ scroll-padding-block: inherit; scroll-padding-block: initial; scroll-padding-block: unset; values <length-percentage> an inwards offset from the corresponding edge of the scrollport, as a valid length or a percentage.
...e.
...And 2 more matches
scroll-padding-inline - CSS: Cascading Style Sheets
ollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
...rthand for the following css properties: scroll-padding-inline-end scroll-padding-inline-start syntax /* keyword values */ scroll-padding-inline: auto; /* <length> values */ scroll-padding-inline: 10px; scroll-padding-inline: 1em .5em; scroll-padding-inline: 10%; /* global values */ scroll-padding-inline: inherit; scroll-padding-inline: initial; scroll-padding-inline: unset; values <length-percentage> an inwards offset from the corresponding edge of the scrollport, as a valid length or a percentage.
...e.
...And 2 more matches
scroll-padding - CSS: Cascading Style Sheets
ed by other content (such as fixed-positioned toolbars or sidebars), or simply to put more breathing room between a targeted element and the edges of the scrollport.
...ty is a shorthand for the following css properties: scroll-padding-bottom scroll-padding-left scroll-padding-right scroll-padding-top syntax /* keyword values */ scroll-padding: auto; /* <length> values */ scroll-padding: 10px; scroll-padding: 1em .5em 1em 1em; scroll-padding: 10%; /* global values */ scroll-padding: inherit; scroll-padding: initial; scroll-padding: unset; values <length-percentage> an inwards offset from the corresponding edge of the scrollport, as a valid <length> or a <percentage>.
... auto the offset is determind by the user agent.
...And 2 more matches
tab-size - CSS: Cascading Style Sheets
Web › CSS › tab-size
the tab-size css property is used to customize the width of tab characters (u+0009).
... property is used to customize the width of tab characters (u+0009).
...e: 2em; /* global values */ tab-size: inherit; tab-size: initial; tab-size: unset; values <integer> a multiple of the advance width of the space character (u+0020) to be used as the width of tabs.
...And 2 more matches
Constraint validation - Developer guides
step date an integer number of days unless the step is set to the any literal, the value must be min + an integral multiple of the step.
...e value must be min + an integral multiple of the step.
...nds range, number an integer minlength text, search, url, tel, email, password; also on the <textarea> element an integer length the number of characters (code points) must not be less than the value of the attribute, if non-empty.
...And 2 more matches
HTTP Index - HTTP
Web › HTTP › Index
entity-body.
...order to obtain the media-type referenced by the content-type header.
...lict response status code indicates a request conflict with current state of the server.
...And 2 more matches
A typical HTTP session - HTTP
Web › HTTP › Session
mainly used by the post method.
...e that final empty line, this separates the data block from the header block.
...ion about the data sent (e.g.
...And 2 more matches
Expressions and operators - JavaScript
nnot delete if declared with var) delete math.pi; // returns false (cannot delete non-configurable properties) delete myobj.h; // returns true (can delete user-defined properties) deleting array elements since arrays are just objects, it's technically possible to delete elements from them.
...ing results: typeof true; // returns "boolean" typeof null; // returns "object" for a number or string, the typeof operator returns the following results: typeof 62; // returns "number" typeof 'hello world'; // returns "string" for property values, the typeof operator returns the type of value the property contains: typeof document.lastmodified; // returns "string" typeof window.length; // returns "number" typeof math.ln2; // returns "number" for methods and functions, the typeof operator returns results as follows: typeof blur; // returns "function" typeof eval; // returns "function" typeof parseint; // returns "function" typeof shape.split; // returns "function" for predefined objects, the typeof operator returns results as follows: ...
..., and objectname is the name of an object.
...And 2 more matches
Array.prototype.reduce() - JavaScript
nction(callback /*, initialvalue*/) { if (this === null) { throw new typeerror( 'array.prototype.reduce ' + 'called on null or undefined' ); } if (typeof callback !== 'function') { throw new typeerror( callback + ' is not a function'); } // 1.
...*, initialvalue*/) { if (this === null) { throw new typeerror( 'array.prototype.reduce ' + 'called on null or undefined' ); } if (typeof callback !== 'function') { throw new typeerror( callback + ' is not a function'); } // 1.
... (this === null) { throw new typeerror( 'array.prototype.reduce ' + 'called on null or undefined' ); } if (typeof callback !== 'function') { throw new typeerror( callback + ' is not a function'); } // 1.
...And 2 more matches
Array.prototype.filter() - JavaScript
n ecma-262, 5th edition, assuming that fn.call evaluates to the original value of function.prototype.bind(), and that array.prototype.push() has its original value.
...ue = t[i]; // in case t is changed in callback if (func(t[i], i, t)){ res[c++] = kvalue; } } } } else{ while (++i !== len){ // checks to see if the key was set if (i in this){ kvalue = t[i]; if (func.call(thisarg, t[i], i, t)){ res[c++] = kvalue; } } } } res.length = c; // shrink down array to proper size return res; }; } examples filtering out all small values the following example uses filter() to create a filtered array that has all elements with values less than 10 removed.
...'an')) // ['banana', 'mango', 'orange'] affecting initial array (modifying, appending and deleting) the following examples tests the behavior of the filter method when the array is modified.
...And 2 more matches
Array.prototype.includes() - JavaScript
us a pull request.
...s not considered to be the same as 0.
...ally speaking, includes() uses the samevaluezero algorithm to determine whether the given element is found.
...And 2 more matches
Array.prototype.lastIndexOf() - JavaScript
ample is stored in a github repository.
...ithub repository.
...ttps://github.com/mdn/interactive-examples and send us a pull request.
...And 2 more matches
Array.prototype.reverse() - JavaScript
om/mdn/interactive-examples and send us a pull request.
...rray the following example creates an array a, containing three elements, then reverses the array.
... a.
...And 2 more matches
Array.prototype.unshift() - JavaScript
the unshift() method adds one or more elements to the beginning of an array and returns the new length of the array.
... the unshift() method adds one or more elements to the beginning of an array and returns the new length of the array.
...mentn]]) parameters elementn the elements to add to the front of the arr.
...And 2 more matches
BigInt64Array - JavaScript
m() creates a new bigint64array from an array-like or iterable object.
...igint64array from an array-like or iterable object.
...nd thus read only.
...And 2 more matches
BigUint64Array - JavaScript
reates a new biguint64array from an array-like or iterable object.
...64array from an array-like or iterable object.
...us read only.
...And 2 more matches
Float32Array - JavaScript
loat32array.from() creates a new float32array from an array-like or iterable object.
...creates a new float32array from an array-like or iterable object.
...t construction time and thus read only.
...And 2 more matches
Float64Array - JavaScript
loat64array.from() creates a new float64array from an array-like or iterable object.
...creates a new float64array from an array-like or iterable object.
...t construction time and thus read only.
...And 2 more matches
Function.prototype.bind() - JavaScript
ayprototypeslice = array.prototype.slice; function.prototype.bind = function(otherthis) { if (typeof this !== 'function') { // closest thing possible to the ecmascript 5 // internal iscallable function throw new typeerror('function.prototype.bind - what is trying to be bound is not callable'); } var baseargs= arrayprototypeslice.call(arguments, 1), baseargslength = baseargs.length, ftobind = this, fnop = function() {}, fbound = function() { baseargs.length = baseargslength; // reset to default base arguments baseargs.push.apply(baseargs, arguments); return ftobind.apply( fnop.prototype.isprototypeof(this) ?
...etion.
...ially implemented [without throw-on-delete behavior] if the implementation supports the __definegetter__ and __definesetter__ extensions.) the partial implementation creates functions that have a prototype property.
...And 2 more matches
Int16Array - JavaScript
c methods int16array.from() creates a new int16array from an array-like or iterable object.
...ray.from() creates a new int16array from an array-like or iterable object.
...ay fixed at construction time and thus read only.
...And 2 more matches
Int32Array - JavaScript
c methods int32array.from() creates a new int32array from an array-like or iterable object.
...ray.from() creates a new int32array from an array-like or iterable object.
...ay fixed at construction time and thus read only.
...And 2 more matches
Int8Array - JavaScript
static methods int8array.from() creates a new int8array from an array-like or iterable object.
...int8array.from() creates a new int8array from an array-like or iterable object.
...t8array fixed at construction time and thus read only.
...And 2 more matches
SharedArrayBuffer.prototype.slice() - JavaScript
extracts up to but not including end.
...ng an offset from the end of the sequence.
...racts the third element through the second-to-last element in the sequence.
...And 2 more matches
TypedArray.from() - JavaScript
gint64array biguint64array parameters source an array-like or iterable object to convert to a typed array.
...s (objects where you can get its elements, such as map and set).
...en working with proxy objects, it calls handler.set to create new elements rather than handler.defineproperty().
...And 2 more matches
Uint16Array - JavaScript
ds uint16array.from() creates a new uint16array from an array-like or iterable object.
...om() creates a new uint16array from an array-like or iterable object.
...xed at construction time and thus read only.
...And 2 more matches
Uint32Array - JavaScript
ds uint32array.from() creates a new uint32array from an array-like or iterable object.
...om() creates a new uint32array from an array-like or iterable object.
...xed at construction time and thus read only.
...And 2 more matches
Uint8Array - JavaScript
c methods uint8array.from() creates a new uint8array from an array-like or iterable object.
...ray.from() creates a new uint8array from an array-like or iterable object.
...ybuffer referenced by the uint8array fixed at construction time and thus read only.
...And 2 more matches
Uint8ClampedArray - JavaScript
new uint8clampedarray from an array-like or iterable object.
...y from an array-like or iterable object.
...hus read only.
...And 2 more matches
WebAssembly.Table() constructor - JavaScript
row to.
... if maximum is specified and is smaller than initial, a rangeerror is thrown.
...nstance the following example (see table2.html source code and live version) creates a new webassembly table instance with an initial size of 2 elements.
...And 2 more matches
<mo> - MathML
Web › MathML › Element › mo
) postfix, closing fences.
...rue" is set.
...ample fraktur ; example sans-serif ; example bold-sans-serif ; example sans-serif-italic ; example sans-serif-bold-italic ; example monospace ; example initial ; مثال tailed ; مثال looped ; مثال stretched ; مثال maxsize if stretchy is true, this attribute specifies the maximum size of the operator.
...And 2 more matches
word-spacing - SVG: Scalable Vector Graphics
the word-spacing attribute specifies spacing behavior between words.
... the word-spacing attribute specifies spacing behavior between words.
... the word-spacing attribute specifies spacing behavior between words.
...And 2 more matches
<circle> - SVG: Scalable Vector Graphics
Web › SVG › Element › circle
the <circle> svg element is an svg basic shape, used to draw circles based on a center point and a radius.
...circles based on a center point and a radius.
...50" r="50"/> </svg> attributes cx the x-axis coordinate of the center of the circle.
...And 2 more matches
<textPath> - SVG: Scalable Vector Graphics
Web › SVG › Element › textPath
90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50" /> <!-- </defs> --> <text> <textpath href="#mypath"> quick brown fox jumps over the lazy dog.
...q10,10 10,40 q10,70 45,70 q70,70 75,50" /> <!-- </defs> --> <text> <textpath href="#mypath"> quick brown fox jumps over the lazy dog.
...ath_data> ; default value: none; animatable: yes side which side of the path the text should be rendered.
...And 2 more matches
Example - SVG: Scalable Vector Graphics
r widget = document.getelementbyid('cursor'); widget.setattributens(null,'cx',mouse_x); widget.setattributens(null,'cy',mouse_y); } document.onmousemove = onmousemove; // determine (x,y) of the cursor function cursor() { return [mouse_x, mouse_y]; } // determine average (x,y) of the swarm function averagemoteposition() { if( !motes ) return [0,0]; if( motes.length == 0 ) return [0,0]; var i; var sum_x=0, sum_y=0; for(i=0; i<motes.length; i++) { sum_x += motes[i].x; sum_y += motes[i].y; } return [sum_x/motes.length, sum_y/motes.length]; } // a nicer, integer random function rand(modulo) { return math.round( math.random() * (modulo-1)); } // class mote function mote() { // dimensions of drawing area.
...y1',old_y); this.elt.setattributens(null,'x2',this.x); this.elt.setattributens(null,'y2',this.y); } function update() { // first call?
...ction update() { // first call?
...And 2 more matches
Forms related code snippets - Archive of obsolete content
otable = document.createelement("table"), ohrow = document.createelement("tr"), othead = 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 + "-dec...
...le.position = "absolute"; otable.style.left = otarget.offsetleft + "px"; otable.style.top = (otarget.offsettop + otarget.offsetheight) + "px"; otarget.parentnode.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(o...
...instances[this.id.replace(rbgnandend, "")]; othiscal.target.value = (this.innerhtml / 100).tofixed(2).substr(-2) + "\/" + (othiscal.current.getmonth() + 1) + "\/" + othiscal.current.getfullyear(); othiscal.container.parentnode.removechild(othiscal.container); return false; } function buildcalendars () { const afields = document.getelementsbyclassname(sdpclass), nlen = afields.length; for (var nitem = 0; nitem < nlen; new datepicker(afields[nitem++])); } const /* customizable by user */ sprefs = "zdp"; sdpclass = "date-picker", smonthsnames = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], sdays = ["m", "t", "w", "t", "f", "s", "s"], bzeroismonday = true, /* internal usage */ ainstances = [], ...
...or (var nitem = 0; nitem < nlen; new datepicker(afields[nitem++])); } const /* customizable by user */ sprefs = "zdp"; sdpclass = "date-picker", smonthsnames = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], sdays = ["m", "t", "w", "t", "f", "s", "s"], bzeroismonday = true, /* internal usage */ ainstances = [], amonthlengths = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], rbgnnan = /^\d+/, rbgnandend = /^\d+|\d+\d+$/g, rmonth = /\-month\-/, rdecrease = /\-decr\-/; var /* customizable by user */ nzindex = 1000; window.addeventlistener ?
Rosetta - Archive of obsolete content
"); if (!odicts.hasownproperty(smimetype)) { alert("rosetta.translatescript() \u2013 unknown mime-type \"" + smimetype + "\": script ignored."); return; } var ocompiled = document.createelement("script"); oscript.parentnode.insertbefore(obaton, oscript); oscript.parentnode.removechild(oscript); for (var aattrs = oscript.attributes, nattr = 0; nattr < aattrs.length; nattr++) { ocompiled.setattribute(aattrs[nattr].name, aattrs[nattr].value); } ocompiled.type = "text\/ecmascript"; if (oxhr200) { ocompiled.src = "data:text\/javascript," + encodeuricomponent(odicts[smimetype](oxhr200.responsetext)); } ocompiled.text = oxhr200 ?
....send(null); } function parsescript (oscript) { if (oscript.hasattribute("type") && !rignoremimes.test(oscript.getattribute("type").tolowercase())) { oscript.hasattribute("src") ?
... ascripts = document.getelementsbytagname("script"), nidx = 0; nidx < ascripts.length; parsescript(ascripts[nidx++]) ); } var odicts = {}, rignoremimes = /^\s*(?:text\/javascript|text\/ecmascript)\s*$/; this.translatescript = parsescript; this.translateall = parsedocument; this.appendcompiler = function (vmimetypes, fcompiler) { if (arguments.length < 2) { throw new typeerror("rosetta.appendcompiler() \u2013 not enough arguments"); } if (typeof fcompiler !== "function") { throw new typeerror("rosetta.appendcompiler() \u2013 second argument must be a function"); } if (!array.isarray(vmimetypes)) { odicts[(vmimetypes).tostring()] = fcompiler; return true; } for (var nidx = 0; nidx < vmimetypes...
...< 2) { throw new typeerror("rosetta.appendcompiler() \u2013 not enough arguments"); } if (typeof fcompiler !== "function") { throw new typeerror("rosetta.appendcompiler() \u2013 second argument must be a function"); } if (!array.isarray(vmimetypes)) { odicts[(vmimetypes).tostring()] = fcompiler; return true; } for (var nidx = 0; nidx < vmimetypes.length; nidx++) { odicts[(vmimetypes[nidx]).tostring()] = fcompiler; } return true; }; })(); now, imagine you need a compiler for scripts written in c (mime type: text/x-c).
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
all windows, including dialogs, etc.
...mozilla.org/network/file-output-stream;1'] .createinstance(components.interfaces.nsifileoutputstream); filestream.init(file, 2, 0x200, false); var binarystream = components.classes['@mozilla.org/binaryoutputstream;1'] .createinstance(components.interfaces.nsibinaryoutputstream); binarystream.setoutputstream(filestream); binarystream.writebytearray(array , array.length); binarystream.close(); filestream.close(); text file i/o text files are read the same way streams are.
...et = 'euc-jp'; var filestream = components .classes['@mozilla.org/network/file-output-stream;1'] .createinstance(components.interfaces.nsifileoutputstream); filestream.init(file, 2, 0x200, false); var converterstream = components .classes['@mozilla.org/intl/converter-output-stream;1'] .createinstance(components.interfaces.nsiconverteroutputstream); converterstream.init(filestream, charset, string.length, components.interfaces.nsiconverterinputstream.default_replacement_character); converterstream.writestring(string); converterstream.close(); filestream.close(); character encoding conversion firefox's internal representation of all text is in unicode.
...ines/sd', referrer); listing 22: loading a page with data transmitted via the post method var content = encodeuricomponent('password=foobar'); var referrer = null; var postdata = components.classes['@mozilla.org/io/string-input-stream;1'] .createinstance(components.interfaces.nsistringinputstream); content = 'content-type: application/x-www-form-urlencoded\n'+ 'content-length: '+content.length+'\n\n'+ content; postdata.setdata(content, content.length); var flags = components.interfaces.nsiwebnavigation.load_flags_none; browser.loaduriwithflags('http://piro.sakura.ne.jp/', flags, referrer, null, postdata); « previousnext » ...
Tabbed browser - Archive of obsolete content
.interfaces.nsiwindowmediator); var browserenumerator = wm.getenumerator("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.
... new tab with our custom attribute.
...is executed from its own window (for example, a settings/options dialog), you can use nsiwindowmediator to get a browser's window.
... the <tabbrowser/> element.
Tabs - Archive of obsolete content
Archive › Mozilla › Jetpack › UI › Tabs
note: this page documents the jetpack prototype, which is no longer under active development.
...e experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next!
...wserstring tostringstuffstring popstuffstring pushstuffstring reversestuffstring shiftstuffstring sortstuffstring splicestuffstring unshiftstuffstring onready()when the inherited document is fully loaded.
...tring onready()when the inherited document is fully loaded.
File object - Archive of obsolete content
t a file object that represents the standard input (stdin).
...ject that represents the standard input (stdin).
...ts the standard output (stdout).
...of data or encoding contained in the file.
Progress Meters - Archive of obsolete content
« previousnext » in this section, we'll look at creating progress meters.
...rogress meters.
....
...ntifier" mode="determined" value="50" max="100"/> the attributes are as follows: id the unique identifer of the progress meter mode the type of the progress meter.
E4X for templating - Archive of obsolete content
of a properties file: // localization function $s(msg, args){ //get localized message var strs = cc['@mozilla.org/intl/stringbundle;1'].getservice(ci.nsistringbundleservice).
...romname(msg); } for example, <toolbarbutton label={$s('mytoolbar.label')}/> conditionals function _if (cond, h, _else) { if (cond && cond != undefined) { // we need undefined condition for e4x return h(cond); } else if (_else) { return _else(cond); } return ''; // empty string allows conditions in attribute as well as element content } for example: {_if(elems.length(), function () <description>{elems[0]}</description>, function _else () <label>no data</label> )} note that the simple xmllist() constructor (<></>) may be useful to still be able to use an expression closure (i.e., without needing return statements and braces): {_if(elems.length(), function () <> <markup/> <markup/> </>)} note that, while it is convenient to store su...
...ngth(), function () <> <markup/> <markup/> </>)} note that, while it is convenient to store such e4x in separate file templates (to be eval()d at a later time, taking into account security considerations, such as escaping with the above), e4x content using such functions can also be easily serialized inline (and then perhaps converted to the dom) as needed: var list = <>{_if(elems.length(), function () <> <markup/> <markup/> </>)}</>.toxmlstring(); iterating functions such as the following foreach (which can work with arrays, objects, or e4x objects) are quite convenient in iterating over complex structures such as e4x would not normally allow.
..., h, lev) { var k, ret=<></>, it = 1; lev = lev || 0; if (typeof min === 'number') { if (typeof max !== 'number') { lev = h; h = arr; arr = max; max = min; min = 1; } } else { lev = arr; h = max; arr = min; max = number.positive_infinity; min = 1; } if (h.length === 1) { for (k in arr) { if (it < min) { ++it; continue; } if (it > max) { break; } ret+=h(arr[k], it, lev); // need to get it or lev via arguments[] since our length detection implies no explicit additional params; otherwise define with more than one param (see below) ...
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
nning var href = ...
... null, xpathresult.ordered_node_snapshot_type, null ); var a = []; for(var k = 0; k < xpathresult.snapshotlength; k++) { a[k] = xpathresult.snapshotitem(k); } responsenodes = a; } else { // otherwise, the response must be a single well-formed document response responsenodes = [response.documentelement]; // put in array so can ...
... else { // otherwise, the response must be a single well-formed document response responsenodes = [response.documentelement]; // put in array so can be treated the same way as the above } // prepend any node(s) (as xml) then remove xinclude for (j=0; j < responsenodes.length ; j++) { xincludeparent.insertbefore(responsenodes[j], xinclude); } xincludeparent.removechild(xinclude); } else if (responsetype === 'responsetext') { if (encname) { var encodingtype = response.mat...
...} // replace xinclude in doc with response now (as plain text or xml) } } } catch (e) { // use xi:fallback if xinclude retrieval above failed var xifallbackchildren = xifallback.childnodes; // prepend any node(s) then remove xinclude for (j=0; j < xifallbackchildren.length ; j++) { xincludeparent.insertbefore(xifallbackchildren[j], xinclude); } xincludeparent.removechild(xinclude); } } } return docu; } ...
Grids - Learn web development
your file: .container { display: grid; } unlike flexbox, the items will not immediately look any different.
...ng: 10px; background-color: rgb(207,232,220); border: 2px solid rgb(79,185,227); } <div class="container"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> <div>six</div> <div>seven</div> </div> .container { display: grid; grid-template-columns: 200px 200px 200px; } flexible grids with the fr unit in addition to creating grids using lengths and percentages, we can use the fr unit to flexibly size grid rows and columns.
...lexible tracks.
...f one of your tracks has something large inside it there will be less free space to share out.
Index - Learn web development
pt and useful string methods articles.
...e information you need — variables article.
... of this skill test is to assess whether you've understood our looping code article.
...ask is to help you check your understanding of the css box model.
Video and Audio APIs - Learn web development
e / 60); let seconds = math.floor(media.currenttime - minutes * 60); let minutevalue; let secondvalue; if (minutes < 10) { minutevalue = '0' + minutes; } else { minutevalue = minutes; } if (seconds < 10) { secondvalue = '0' + seconds; } else { secondvalue = seconds; } let mediatime = minutevalue + ':' + secondvalue; timer.textcontent = mediatime; let barlength = timerwrapper.clientwidth * (media.currenttime/media.duration); timerbar.style.width = barlength + 'px'; } this is a fairly long function, so let's go through it step by step: first of all, we work out the number of minutes and seconds in the htmlmediaelement.currenttime value.
...d secondvalue.
...he same way that a digital clock display works.
... the time value, so it displays in the ui.
Test your skills: Strings - Learn web development
.
...quote displays correctly?
... a theorem, two numeric values, and an incomplete string (the bits that need adding are marked with asterisks (*)).
... are marked with asterisks (*)).
What is JavaScript? - Learn web development
interesting — add the following code just below the "// javascript goes here" line: document.addeventlistener("domcontentloaded", function() { 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].addeventlistener('click', createparagraph); } }); save your file and refresh the browser — now you should see that when you click the button, a new paragraph is generated and placed below.
...javascript.
... with javascript, and it is inefficient — you'd have to include the onclick="createparagraph()" attribute on every button you want the javascript to apply to.
... para.textcontent = 'you clicked the button!'; document.body.appendchild(para); } /* 1.
Object building practice - Learn web development
each time this method is called.
...(0,255) + ',' + random(0,255) +')', size ); balls.push(ball); } the while loop creates a new instance of our ball() using random values generated with our random() function, then push()es it onto the end of our balls array, but only while the number of balls in the array is less than 25.
...rying the number in balls.length < 25 to get more or fewer balls on screen.
...shing to test your bouncing balls out!
Test your skills: Object-oriented JavaScript - Learn web development
ow, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascript console, in the case of the downloadable version).
...ascript console, in the case of the downloadable version).
...ength of the shape's outer edge) and logs the result to the console.
...created in the last task.
Client-Server Overview - Learn web development
sponse for this request is shown below.
...e we see the body content — which contains the actual html returned by the request.
...e server.
...tp/1.1 302 found server: apache x-backend-server: developer3.webapp.scl3.mozilla.com vary: cookie vary: accept-encoding content-type: text/html; charset=utf-8 date: wed, 07 sep 2016 00:38:13 gmt location: https://developer.mozilla.org/profiles/hamishwillee keep-alive: timeout=5, max=1000 connection: keep-alive x-frame-options: deny x-cache-info: not cacheable; request wasn't a get or head content-length: 0 note: the http responses and requests shown in these examples were captured using the fiddler application, but you can get similar information using web sniffers (e.g.
React interactivity: Events and state - Learn web development
t declaration to this: const newtask = { id: "todo-" + nanoid(), name: name, completed: false }; save everything, and try your app again — now you can add tasks without getting that warning about duplicate ids.
...t getting that warning about duplicate ids.
...the text of our heading accordingly.
...definition, before the return statement: const headingtext = `${tasklist.length} tasks remaining`; hrm.
Using Vue computed properties - Learn web development
roperties.
...uted properties the aim here is to add a summary count of our to-do list.
...operty to our component object, much like the methods property we've used previously.
...ve used previously.
Accessibility/LiveRegionDevGuide
ed with ":delete" and ":insert" being appended to complete the event type.
..." (default) indicates that the region can stand on it's own.
...d event object in at-spi and through the use of iaccessibletext::get_oldtext and iaccessibletext::get_newtext in iaccessible2.
... in at-spi and through the use of iaccessibletext::get_oldtext and iaccessibletext::get_newtext in iaccessible2.
How to implement a custom autocomplete search component
ber} the index of the default item that should be entered if * none is selected */ get defaultindex() { return this._defaultindex; }, /** * @return {string} description of the cause of a search failure */ get errordescription() { return this._errordescription; }, /** * @return {number} the number of matches */ get matchcount() { return this._results.length; }, /** * @return {string} the value of the result at the given index */ getvalueat: function(index) { return this._results[index]; }, /** * @return {string} the comment of the result at the given index */ getcommentat: function(index) { if (this._comments) return this._comments[index]; else return ''; }, /** * @return {string} the style h...
... return this._searchresult; }, /** * index of the default item that should be entered if none is selected */ get defaultindex() { return this._defaultindex; }, /** * a string describing the cause of a search failure */ get errordescription() { return this._errordescription; }, /** * the number of matches */ get matchcount() { return this._results.length; }, /** * get the value of the result at the given index */ getvalueat: function(index) { return this._results[index]; }, /** * get the comment of the result at the given index */ getcommentat: function(index) { return this._comments[index]; }, /** * get the style hint for the result at the given index */ getstyleat: function(index) { if (!this._...
...this autocomplete source assumes the developer attached a json string // to the the "autocompletesearchparam" attribute or "searchparam" property // of the <textbox> element.
...asses["@mozilla.org/dom/json;1"].createinstance(ci.nsijson); var searchresults = nativejson.decode(searchparam); // these 2 lines above are for thunderbird < v7 // since thunderbird 3, they can be replaced more efficiently by the following line: // var searchresults = json.parse(searchparam); var results = []; var comments = []; for (i=0; i<searchresults.length; i++) { if (searchresults[i].value.indexof(searchstring) == 0) { results.push(searchresults[i].value); if (searchresults[i].comment) comments.push(searchresults[i].comment); else comments.push(null); } } var newresult = new simpleautocompleteresult(searchstring, ci.nsiautocompleteresult.result_success, 0, "", result...
PR_SetErrorText
sets the text associated with an error.
... sets the text associated with an error.
... sets the text associated with an error.
... sets the text associated with an error.
PKCS #11 Module Specs
separated list of name/value pairs exactly like those specified in the pkcs #11 module spec.
...lags are: nomoddb don't open secmod.db and try to supply the strings.
..._token_info structure with an internationalize string (utf8).
...inimum password length for this token.
NSS functions
mxr 3.12 and later pk11_generatenewparam mxr 3.2 and later pk11_generaterandom mxr 3.2 and later pk11_generaterandomonslot mxr 3.11 and later pk11_getalltokens mxr 3.2 and later pk11_getallslotsforcert mxr 3.12 and later pk11_getbestkeylength 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_get...
...efaultflags 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_getinternalslot mxr 3.2 and later pk11_getkeygen mxr 3.4 and later pk11_getkeylength mxr 3.2 and later pk11_getkeystrength mxr 3.2 and later pk11_getmechanism mxr 3.2 and later pk11_getminimumpwdlength mxr 3.4 and later pk11_getmodinfo mxr 3.6 and later pk11_getmodule mxr 3.3 and later pk11_getmoduleid mxr ...
..._decodetimechoice mxr 3.9 and later der_encode mxr 3.4 and later der_encodetimechoice mxr 3.9 and later der_generalizedtimetotime mxr 3.2 and later der_getinteger mxr 3.2 and later der_generalizeddaytoascii mxr 3.11.7 and later der_lengths mxr 3.2 and later der_timetoutctime mxr 3.2 and later der_timechoicedaytoascii mxr 3.11.7 and later der_timetogeneralizedtime mxr 3.11.7 and later der_timetogeneralizedtimearena mxr 3.11.7 and later der_utcdaytoascii mxr 3.2 and later ...
...2 and later sec_asn1encodersetstreaming mxr 3.2 and later sec_asn1encodersettakefrombuf mxr 3.2 and later sec_asn1encoderstart mxr 3.2 and later sec_asn1encoderupdate mxr 3.2 and later sec_asn1encodeunsignedinteger mxr 3.11.1 and later sec_asn1lengthlength mxr 3.2 and later sec_dupcrl mxr 3.9 and later sec_getsignaturealgorithmoidtag mxr 3.10 and later sec_getregisteredhttpclient mxr 3.12 and later sec_pkcs5getcryptoalgorithm mxr 3.2 and later sec_pkcs5getkeylength mxr 3.2 and later ...
NSS tools : pk12util
and secmod.db) and new sqlite databases (cert9.db, key4.db, and pkcs11.txt).
...e databases (cert9.db, key4.db, and pkcs11.txt).
... assumes that the given databases are in the old format.
...bases are in the old format.
NSS tools : pk12util
assword specify the slot's password.
...password.
... -w p12filepassword specify the pkcs #12 file password.
...cify the pkcs #12 file password.
Scripting Java
s) { return "f(string)"; } public string f(int i) { return "f(int)"; } public string g(string s, int i) { return "g(string,int)"; } public string g(int i, string s) { return "g(int,string)"; } public static void main(string[] args) { overload o = new overload(); object[] a = new object[] { new integer(3), "hi", overload.class }; for (int i = 0; i != a.length; ++i) system.out.println(o.f(a[i])); } } when we compile and execute the program, it produces the output f(object) f(object) f(object) however, if we write a similar script var o = new packages.overload(); var a = [ 3, "hi", packages.overload ]; for (var i = 0; i != a.length; ++i) print(o.f(a[i])); and execute it, we get the output f(int) f(string) f(object) because...
... js> a[0] = 104 104 js> a[1] = 105 105 js> new java.lang.string(a) hi java strings and javascript strings it's important to keep in mind that java strings and javascript strings are not the same.
...same.
...nstances of the type java.lang.string and have all the methods defined by that class.
JSAutoByteString
the string.
...ar() free the owned string.
...edstring str(cx, js::tostring(cx, strval)); if (!str) return false; jsautobytestring bytes; if (!bytes.encodeutf8(cx, str)) /* calls js_encodestringtoutf8 internally */ return false; /* ...do something with bytes...
...e; jsautobytestring bytes; if (!bytes.encodeutf8(cx, str)) /* calls js_encodestringtoutf8 internally */ return false; /* ...do something with bytes...
JS_ExecuteRegExp
execute a new regexp object to given input string.
... execute a new regexp object to given input string.
... type description cx jscontext * the context.
... cx jscontext * the context.
JS_GetLatin1InternedStringChars
quest.
...aller must be in a request on this jscontext..
...ernedstringchars gets the characters of the string, str.
...s of the string, str.
JS_InternString
get an interned string - a jsstring that is protected from gc and automatically shared with other code that needs a jsstring with the same value.
... a jsstring that is protected from gc and automatically shared with other code that needs a jsstring with the same value.
..._t *s, size_t length); name type description cx jscontext * a context.
... jscontext * a context.
JS_IsIdentifier
this article covers features introduced in spidermonkey 17 test whether the given string is a valid ecmascript identifier.
...h); // added in spidermonkey 38 name type description cx jscontext * pointer to a js context from which to derive runtime information.
...nkey 38 name type description cx jscontext * pointer to a js context from which to derive runtime information.
...tifier bool * out parameter.
JS_NewDependentString
create a new javascript string containing a range of characters from an existing string.
... size_t length); name type description cx jscontext * the context in which to create the new string.
...gth); name type description cx jscontext * the context in which to create the new string.
...taining the characters for the new string.
Using XPCOM Components
component in javascript // xpconnect to cookiemanager // get the cookie manager component in javascript var cmgr = components.classes["@mozilla.org/cookiemanager;1"] .getservice(); cmgr = cmgr.queryinterface(components.interfaces.nsicookiemanager); // called as part of a largerdeleteallcookies() function function finalizecookiedeletions() { for (var c=0; c<deletedcookies.length; c++) { cmgr.remove(deletedcookies[c].host, deletedcookies[c].name, deletedcookies[c].path); } deletedcookies.length = 0; } connecting to components from the interface the mozilla user interface uses javascript that has been given access to xpcom components in the application core with a technology called xpconnect.
...lt rv = ns_getservicemanager(getter_addrefs(servman)); if (ns_failed(rv)) return -1; nscomptr<nsicookiemanager> cookiemanager; rv = servman->getservicebycontractid("@mozilla.org/cookiemanager", ns_get_iid(nsicookiemanager), getter_addrefs(cookiemanager)); if (ns_failed(rv)) return -1; pruint32 len; deletedcookies->getlength(&len); for (int c=0; c<len; c++) cookiemanager->remove(deletedcookies[c].host, deletedcookies[c].name, deletedcookies[c].path, pr_false); xxx: in the original document, there were only the first three parameters to the |remove| call.
...emanager); function loadcookies() { // load cookies into a table var enumerator = cmgr.enumerator; var count = 0; var showpolicyfield = false; while (enumerator.hasmoreelements()) { var nextcookie = enumerator.getnext(); nextcookie = nextcookie.queryinterface(components.interfaces.nsicookie); /* ....
...lements()) { var nextcookie = enumerator.getnext(); nextcookie = nextcookie.queryinterface(components.interfaces.nsicookie); /* ....
Append
« xpcom api reference summary the append family of functions appends a value to the end of a string's internal buffer.
... « xpcom api reference summary the append family of functions appends a value to the end of a string's internal buffer.
...eference summary the append family of functions appends a value to the end of a string's internal buffer.
...gth of adata, measured in storage units.
Assign
« xpcom api reference summary the assign family of functions sets the value of a string's internal buffer.
... « xpcom api reference summary the assign family of functions sets the value of a string's internal buffer.
... xpcom api reference summary the assign family of functions sets the value of a string's internal buffer.
...h of adata, measured in storage units.
Insert
family of functions inserts a value into a string's internal buffer.
...tion [in] an offset into the string's internal buffer specifying where to place the given characters.
...set into the string's internal buffer specifying where to place the given characters.
...d not be null terminated.
Append
« xpcom api reference summary the append family of functions appends a value to the end of a string's internal buffer.
... « xpcom api reference summary the append family of functions appends a value to the end of a string's internal buffer.
...reference summary the append family of functions appends a value to the end of a string's internal buffer.
...gth of adata, measured in storage units.
Assign
« xpcom api reference summary the assign family of functions sets the value of a string's internal buffer.
... « xpcom api reference summary the assign family of functions sets the value of a string's internal buffer.
......
...h of adata, measured in storage units.
Insert
t family of functions inserts a value into a string's internal buffer.
...tion [in] an offset into the string's internal buffer specifying where to place the given characters.
...set into the string's internal buffer specifying where to place the given characters.
...d not be null terminated.
nsEmbedCString
tring to copy into this string.
...arameters aabstractstring [in] a nsacstring to copy into this string.
...ctstring [in] a nsacstring to copy into this string.
... size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into this string.
nsEmbedString
mbedstring to copy into this string.
...; parameters aabstractstring [in] a nsastring to copy into this string.
...stractstring [in] a nsastring to copy into this string.
... size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into this string.
IAccessibleTable
[propget] hresult rowextentat([in] long row, [in] long column, [out] long nrowsspanned ); [propget] hresult rowheader([out] iaccessibletable accessibletable, [out] long startingcolumnindex ); [propget] hresult rowindex([in] long cellindex, [out] long rowindex ); hresult selectcolumn([in] long column ); [propget] hresult selectedchildren([in] long maxchildren, [out, size_is(,maxchildren), length_is(, nchildren)] long children, [out] long nchildren ); [propget] hresult selectedcolumns([in] long maxcolumns, [out, size_is(,maxcolumns), length_is(, ncolumns)] long columns, [out] long ncolumns ); [propget] hresult selectedrows([in] long maxrows, [out, size_is(,maxrows), length_is(, nrows)] long rows, [out] long nrows ); hresult selectrow([in] long row ); [propget] hresult summary([out...
...() selects a column and unselects all previously selected columns.
... based), allocated by the server.
...ach index is 0 based), allocated by the server.
mozITXTToHTMLConv
1.1) inherits from nsistreamconverter implemented by @mozilla.org/txttohtmlconv;1 as a service: var ios = components.classes["@mozilla.org/txttohtmlconv;1"] .getservice(components.interfaces.mozitxttohtmlconv); method overview unsigned long citeleveltxt(in wstring line, out unsigned long loglinestart) void findurlinplaintext(in wstring text, in long alength, in long apos, out long astartpos, out long aendpos) wstring scanhtml(in wstring text, in unsigned long whattodo) wstring scantxt(in wstring text, in unsigned long whattodo) constants conversion control attributes these bits allow you to control the conversion of text into html.
...the offset into the string of the first non-cite character.
...e cite level of the quote; that is, the number of text quote characters found at the beginning of the string.
... of the quote; that is, the number of text quote characters found at the beginning of the string.
nsIAnnotationService
id mime type.
...pe.
...notation is set in a different type.
...s set in a different type.
nsIBrowserHistory
in long long alastvisited); obsolete since gecko 15.0 void markpageasfollowedlink(in nsiuri auri); obsolete since gecko 22.0 void markpageastyped(in nsiuri auri); obsolete since gecko 22.0 void registeropenpage(in nsiuri auri); obsolete since gecko 9.0 void removeallpages(); void removepage(in nsiuri auri); void removepages([array, size_is(alength)] in nsiuri auris, in unsigned long alength, in boolean adobatchnotify); void removepagesbytimeframe(in long long abegintime, in long long aendtime); void removepagesfromhost(in autf8string ahost, in boolean aentiredomain); void removevisitsbytimeframe(in long long abegintime, in long long aendtime); void unregisteropenpage(in nsiuri auri); obsolete since g...
...n nsiuri auri ); parameters auri the added page which is to be removed.
...ed page which is to be removed.
...ovepage() repeatedly is preferable over calling this, since that's about the point at which the overhead of setting up a batch operation doesn't make sense anymore.
nsIChannel
tcharset acstring the character set of the channel's content if available and if applicable.
...he character set of the channel's content if available and if applicable.
...to textual data.
...avior is similar to contenttype.
nsILoginManager
eria.
... myloginmgr.findlogins({}, 'https://bugzilla.mozilla.org', '', '', {}); getalldisabledhosts() returns a list of all hosts for which login saving is disabled.
...ant to see if any logins are stored, use countlogins() instead.
...nt the number of elements in the returned array.
nsIMsgFolder
msgwindow msgwindow); void alertfilterchanged(in nsimsgwindow msgwindow); void throwalertmsg(in string msgname, in nsimsgwindow msgwindow); astring getstringwithfoldernamefrombundle(in string msgname); void notifycompactcompleted(); long comparesortkeys(in nsimsgfolder msgfolder); [noscript] void getsortkey(out octet_ptr key, out unsigned long length); boolean callfilterplugins(in nsimsgwindow amsgwindow); acstring getstringproperty(in string propertyname); void setstringproperty(in string propertyname, in acstring propertyvalue); boolean isancestorof(in nsimsgfolder folder); boolean containschildnamed(in astring name); nsimsgfolder getchildnamed(in astring aname); nsimsgfolder fi...
... void notifyitemremoved(in nsisupports item); void notifyfolderevent(in nsiatom event); void listdescendents(in nsisupportsarray descendents); void shutdown(in boolean shutdownchildren); void setinvfeditsearchscope(in boolean asearchthisfolder, in boolean asetonsubfolders); void copydatatooutputstreamforappend(in nsiinputstream aistream, in long alength, in nsioutputstream outputstream); void copydatadone(); void setjunkscoreformessages(in nsisupportsarray amessages, in acstring ajunkscore); void applyretentionsettings(); boolean fetchmsgpreviewtext([array, size_is (anumkeys)] in nsmsgkey akeystofetch, in unsigned long anumkeys, in boolean alocalonly, in nsiurllistener aurllistener); void addkeywordst...
... msgname, in nsimsgwindow msgwindow); getstringwithfoldernamefrombundle() astring getstringwithfoldernamefrombundle(in string msgname); notifycompactcompleted() void notifycompactcompleted(); comparesortkeys() long comparesortkeys(in nsimsgfolder msgfolder); getsortkey() [noscript] void getsortkey(out octet_ptr key, out unsigned long length); callfilterplugins() boolean callfilterplugins(in nsimsgwindow amsgwindow); getstringproperty() acstring getstringproperty(in string propertyname); setstringproperty() void setstringproperty(in string propertyname, in acstring propertyvalue); isancestorof() determines if this folder is an ancestor of the supplied folder.
...escendents(in nsisupportsarray descendents); shutdown() void shutdown(in boolean shutdownchildren); setinvfeditsearchscope() void setinvfeditsearchscope(in boolean asearchthisfolder, in boolean asetonsubfolders); copydatatooutputstreamforappend() void copydatatooutputstreamforappend(in nsiinputstream aistream, in long alength, in nsioutputstream outputstream); copydatadone() void copydatadone(); setjunkscoreformessages() void setjunkscoreformessages(in nsisupportsarray amessages, in acstring ajunkscore); applyretentionsettings() void applyretentionsettings(); fetchmsgpreviewtext() get the beginning of the message bodies for the passed i...
nsIMsgSearchCustomTerm
p).
... if term is available for any operator.
... in nsmsgsearchopvalue op); getavailableoperators /** * list the valid operators for this term.
...** * list the valid operators for this term.
nsITaggingService
ser/tagging-service;1"] .getservice(components.interfaces.nsitaggingservice); method overview void taguri(in nsiuri auri, in nsivariant atags); void untaguri(in nsiuri auri, in nsivariant atags); nsivariant geturisfortag(in astring atag); nsivariant gettagsforuri(in nsiuri auri, [optional] out unsigned long length, [retval, array, size_is(length)] out wstring atags); attributes attribute type description alltags nsivariant retrieves all tags used to tag uris in the data-base (sorted by name).
... all tags from the given uri.
...urisfortag() this method retrieves all uris tagged with the given tag.
...ring atag ); parameters atag the tag name.
NS_CStringContainerInit2
« xpcom api reference summary the ns_cstringcontainerinit2 function initializes a nscstringcontainer instance for use as a nsacstring.
...e as a nsacstring.
...t ns_cstringcontainerinit2( nscstringcontainer& acontainer, const char* adata = nsnull, pruint32 adatalength = pr_uint32_max, pruint32 aflags = 0 ); parameters acontainer [in] the nscstringcontainer instance to initialize.
...snull, pruint32 adatalength = pr_uint32_max, pruint32 aflags = 0 ); parameters acontainer [in] the nscstringcontainer instance to initialize.
NS_CStringCutData
« xpcom api reference summary the ns_cstringcutdata function removes a section of the string's internal buffer.
...the ns_cstringcutdata function removes a section of the string's internal buffer.
...data function removes a section of the string's internal buffer.
...include "nsstringapi.h" nsresult ns_cstringcutdata( nsacstring& astring, pruint32 acutstart, pruint32 acutlength ); parameters astring [in] a nsacstring instance to be modified.
NS_StringCutData
« xpcom api reference summary the ns_stringcutdata function removes a section of the string's internal buffer.
...e ns_stringcutdata function removes a section of the string's internal buffer.
...a function removes a section of the string's internal buffer.
...lude "nsstringapi.h" nsresult ns_stringcutdata( nsastring& astring, pruint32 acutstart, pruint32 acutlength ); parameters astring [in] a nsastring instance to be modified.
Using Objective-C from js-ctypes
synthesizer"); id tmp = objc_msgsend(nsspeechsynthesizer, alloc); selector for a method with arguments in this case, [nsspeechsynthesizer initwithvoice:] takes one argument; the selector name with a trailing colon.
..."); id tmp = objc_msgsend(nsspeechsynthesizer, alloc); selector for a method with arguments in this case, [nsspeechsynthesizer initwithvoice:] takes one argument; the selector name with a trailing colon.
...uments in this case, [nsspeechsynthesizer initwithvoice:] takes one argument; the selector name with a trailing colon.
...this case, [nsspeechsynthesizer initwithvoice:] takes one argument; the selector name with a trailing colon.
Type conversion
e' mystruct.v = false; console.log(mystruct.v.tostring()); // 'false' mystruct.v = 1; console.log(mystruct.v.tostring()); // 'true' mystruct.v = 0; console.log(mystruct.v.tostring()); // 'false' mystruct.v = 10; // throws error mystruct.v = "a"; // throws error integer types target type source converted value ctypes.char16_t js string (only if its length == 1) src.charcodeat(0) any integer types js number (only if fits to the size) src js boolean if src == true: 1 if src == false: 0 var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.char16_t } ])(); mystruct.v = 0x41; console.log(mystruct.v.tostring()); // "a" mystruct.v = true; console.log(mystruct.v.tostring()); // "\x01" mystruct.v ...
...e source converted value ctypes.char.array(n) js string (only if utf8 representation fits to the array) null-terminated utf8 string ctypes.signed_char.array(n) ctypes.unsigned_char.array(n) ctypes.char16_t.array(n) js string (only if fits to the array) null-terminated utf16 string any array types js array (only if array length is same) convert each element implicitly any array types any arraybuffer object (only if array length is same in bytes) copy data ctypes.int8_t.array(n) int8array (only if array length is same in bytes) ctypes.uint8_t.array(n) uint8array (only if array length is same in bytes) uintclamped8array (only if array length is same in byt...
... any arraybuffer object (only if array length is same in bytes) copy data ctypes.int8_t.array(n) int8array (only if array length is same in bytes) ctypes.uint8_t.array(n) uint8array (only if array length is same in bytes) uintclamped8array (only if array length is same in bytes) ctypes.int16_t.array(n) int16array (only if array length is same in bytes) ctypes.uint16_t.array(n) uint16array (only if array length is same in bytes) ctypes.int32_t.array(n) int32array (only if array length is same in bytes) ctypes.uint32_t.array(n) uint32array (only if array length is same in bytes) ctypes.float32_t.array(n) float32array (only if array length is same in bytes) ...
...6array (only if array length is same in bytes) ctypes.int32_t.array(n) int32array (only if array length is same in bytes) ctypes.uint32_t.array(n) uint32array (only if array length is same in bytes) ctypes.float32_t.array(n) float32array (only if array length is same in bytes) ctypes.float64_t.array(n) float64array (only if array length is same in bytes) var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.int16_t.array(5) } ])(); mystruct.v = [1, 2, 3, 4, 5]; console.log(mystruct.v.tostring()); // 'ctypes.int16_t.array(5)([0, 0, 0, 0, 0])' mystruct.v = int16array([1, 2, 3, 4, 5]); console.log(mystruct.v.tostring()); // 'ctypes.int16_t.array(5)([1, 2, 3, 4, 5])' mystruct.v = [1, 2, 3, 4]; // throw...
CData
ethod overview methods available on all cdata objects cdata address() string tosource() string tostring() properties properties of all cdata objects property type description constructor ctype the data type of the cdata object, as a ctype.
...nts.
...ratchpad/entehandle.js at master · noitidart/_scratchpad mdnfirefox" at js array position 36 (so 37 if count from 1), we see 183, and at 77 we see char code of 0 if casted to unsigned_char, if casted to char we see -73 at pos 36 but pos 77 still 0, if casted to jschar we see chineese characters in all spots expect spaces even null terminator is a chineese character console.info('ptrasarr.length:', ptrasarr.length); //console.log('debug-msg :: datacasted:', datacasted, uneval(datacasted), datacasted.tostring()); var charcode = []; var fromcharcode = [] for (var i=0; i<ptrasarr.length; i++) { //if known_len is correct, then will not hit null terminator so like in example of "_scratchpad/entehandle.js at master · noitidart/_scratchpad mdnfirefox" if you pas...
..., ptrasarr.length); //console.log('debug-msg :: datacasted:', datacasted, uneval(datacasted), datacasted.tostring()); var charcode = []; var fromcharcode = [] for (var i=0; i<ptrasarr.length; i++) { //if known_len is correct, then will not hit null terminator so like in example of "_scratchpad/entehandle.js at master · noitidart/_scratchpad mdnfirefox" if you pass length of 77, then null term will not get hit by this loop as null term is at pos 77 and we go till `< known_len` var thisunsignedcharcode = ptrasarr.addressofelement(i).contents; if (thisunsignedcharcode == 0) { // reached null terminator, break console.log('reached null terminator, at pos: ', i); break; } c...
UInt64
he value in the specified radix.
... } else { throw new error('invalid type at position ' + i + ' it must be a numeric string, a number, or a uint64.
...13) | c1) >>> 0; return uint64.join(ch, cl); } function uint64_or(...uint64) { // bitwise or // if there are logical or and bitwise or, bitwise or may be named `bor` or `bitor`, but i don't think there could be logical or, so i think just `or` is the right name ensureuint64(uint64); var hi = 0; var lo = 0; for (var i=0; i<uint64.length; i++) { hi |= uint64.hi(uint64[i]); lo |= uint64.lo(uint64[i]); } return uint64.join(hi >>> 0, lo >>> 0); } function uint64_and(...uint64) { // bitwise and could be applied to more than 2 operands, not sure if it's useful tho ensureuint64(uint64); var hi = uint64.hi(uint64[0]); var lo = uint64.lo(uint64[0]); ...
...uint64.hi(uint64[i]); lo |= uint64.lo(uint64[i]); } return uint64.join(hi >>> 0, lo >>> 0); } function uint64_and(...uint64) { // bitwise and could be applied to more than 2 operands, not sure if it's useful tho ensureuint64(uint64); var hi = uint64.hi(uint64[0]); var lo = uint64.lo(uint64[0]); for (var i=1; i<uint64.length; i++) { hi &= uint64.hi(uint64[i]); lo &= uint64.lo(uint64[i]); } return uint64.join(hi >>> 0, lo >>> 0); } see also ctypes int64 ...
Streams - Plugins
e plug-in through repeated calls to npp_writeready and npp_write.
...sponding npn_writeready function.
... example of sending a stream the following code creates a new stream of html text displayed by the browser in a new window, writes it, and destroys the stream.
...tted for simplicity.
Debugger.Memory - Firefox Developer Tools
tack indicating wheredobj’s referent was allocated.
...tion should be entered into the allocations log.
...g the same allocations within a global’s scope, the maximum allocationsamplingprobability of all the debuggers is used.
...string’s text is counted in its size.
AnalyserNode.getByteTimeDomainData() - Web APIs
ain, data into a uint8array (unsigned byte array) passed into it.
...ct time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
...tput of the current audio input.
...ser.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 < bufferlength; i++) { const v = dataarray[i]/128.0; const y = v * height/2; if(i === 0) canvasctx.moveto(x, y); else canvasctx.lineto(x, y); x += slicewidth; } canvasctx.lineto(width, height/2); canvasctx.stroke(); }; draw(); specifications specification status comment ...
AnalyserNode.maxDecibels - Web APIs
argraph style" output of the current audio input.
...ore complete applied examples/information, check out our voice-change-o-matic demo (see app.js lines 128–205 for relevant code).
...ck out our voice-change-o-matic demo (see app.js lines 128–205 for relevant code).
...size = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth + 1; } }; draw(); specifications specification status comment web audio apithe definition of 'maxdecibels' i...
AnalyserNode.minDecibels - Web APIs
argraph style" output of the current audio input.
...ore complete applied examples/information, check out our voice-change-o-matic demo (see app.js lines 128–205 for relevant code).
...ck out our voice-change-o-matic demo (see app.js lines 128–205 for relevant code).
...size = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth + 1; } }; draw(); specifications specification status comment web audio apithe definition of 'mindecibels' i...
AnalyserNode.smoothingTimeConstant - Web APIs
try cloning the above example and setting analyser.smoothingtimeconstant = 0; instead.
...thingtimeconstant = 0; instead.
...that the value changes are much more jarring.
...size = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth + 1; } }; draw(); specifications specification status comment web audio apithe definition of 'smoothingtimec...
BaseAudioContext.createBuffer() - Web APIs
as blocking other code execution.
...uffer(numofchannels, length, samplerate); parameters note: for an in-depth explanation of how audio buffers work, and what these parameters mean, read audio buffers: frames, samples and channels from our basic concepts guide.
...samples and channels from our basic concepts guide.
...buffer = audioctx.createbuffer(2, audioctx.samplerate * 3, audioctx.samplerate); // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < myarraybuffer.numberofchannels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < myarraybuffer.length; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } // get an audiobuffersourcenode.
Examples of web and XML development using the DOM - Web APIs
octype html> <html lang="en"> <head> <title>width/height example</title> <script> function init() { var arrimages = new array(3); arrimages[0] = document.getelementbyid("image1"); arrimages[1] = document.getelementbyid("image2"); arrimages[2] = document.getelementbyid("image3"); var objoutput = document.getelementbyid("output"); var strhtml = "<ul>"; for (var i = 0; i < arrimages.length; i++) { strhtml += "<li>image" + (i+1) + ": height=" + arrimages[i].height + ", width=" + arrimages[i].width + ", style.height=" + arrimages[i].style.height + ", style.width=" + arrimages[i].style.width + "<\/li>"; } strhtml += "<\/ul>"; objoutput.innerhtml = strhtml; } </script> </head> <body onload="init();"> <p>image 1: n...
...stylesheets the stylesheets property on the document object returns a list of the stylesheets that have been loaded on that document.
...nt object returns a list of the stylesheets that have been loaded on that document.
... { function addcell(row, text) { var cell = row.insertcell(-1); cell.appendchild(document.createtextnode(text)); } var e = e || window.event; document.getelementbyid('eventtype').innerhtml = e.type; var table = document.createelement('table'); var thead = table.createthead(); var row = thead.insertrow(-1); var lablelist = ['#', 'property', 'value']; var len = lablelist.length; for (var i=0; i<len; i++) { addcell(row, lablelist[i]); } var tbody = document.createelement('tbody'); table.appendchild(tbody); for (var p in e) { row = tbody.insertrow(-1); row.classname = (row.rowindex % 2)?
Using the Frame Timing API - Web APIs
entry type are created and the first observer constructor uses inline function syntax.
...s[i].name); } }); // only observe 'frame' events observe_frame.observe({entrytypes: ['frame']}); } function init () { create_frame_observer(); var obs = new performanceobserver(frame_observer_2); obs.observe({entrytypes: ['frame']}); } function frame_observer_2(list) { // log the frame entries var perfentries = list.getentriesbytype("frame"); for (var i=0; i < perfentries.length; i++) { console.log("obs #2: [" + i + "] = " + perfentries[i].name); } } <body onload="init(event)"> when the browser adds a new "frame" entry to the performance timeline, both of the observer callbacks will be invoked.
... // process the frame ...
...type.
HTMLFormElement.elements - Web APIs
the htmlformelement property elements returns an htmlformcontrolscollection listing all the form controls contained in the <form> element.
... form.
...m").elements; var inputbyindex = inputs[0]; var inputbyname = inputs["username"]; accessing form controls this example gets the form's element list, then iterates over the list, looking for <input> elements of type "text" so that some form of processing can be performed on them.
...cument.getelementbyid("my-form").elements; // iterate over the form controls for (i = 0; i < inputs.length; i++) { if (inputs[i].nodename === "input" && inputs[i].type === "text") { // update text input inputs[i].value.tolocaleuppercase(); } } disabling form controls var inputs = document.getelementbyid("my-form").elements; // iterate over the form controls for (i = 0; i < inputs.length; i++) { // disable all form controls inputs[i].setattribute("disabled", ""); } specifications specification status comment html living standardthe definition of 'htmlformelement.elements' in that specification.
HTMLInputElement - Web APIs
a button type (button, submit, reset, image).
...ossible values are: on: the browser can autocomplete the value using previously stored value off: the user must explicity enter a value max string: returns / sets the element's max attribute, containing the maximum (numeric or date-time) value for this item, which must not be less than its minimum (min attribute) value.
...'s maxlength attribute, containing the maximum number of characters (in unicode code points) that the value can have.
...umber of characters (in unicode code points) that the value can have.
HTMLMediaElement - Web APIs
aelement.disableremoteplayback a boolean that sets or returns the remote playback state, indicating whether the media element is allowed to have a remote playback ui.
... htmlmediaelement can use for decryption of media data during playback.
...currentsrc, otherwise it is equal to the media duration.
....
Timing element visibility with the Intersection Observer API - Web APIs
update the timers every second and schedule a redraw to update the timers we'll be drawing within each ad.
...nction simulates loading an ad and adding it to the page.
...ssic literature online free!" }, { bgcolor: "lightgrey", title: "3.14 shades of gray: a novel", body: "love really does make the world go round..." }, { bgcolor: "#fee", title: "flexbox florist", body: "when life's layout gets complicated, send flowers." } ]; let adbox, title, body, timerelem; let ad = ads[math.floor(math.random()*ads.length)]; if (replacebox) { adobserver.unobserve(replacebox); adbox = replacebox; title = replacebox.queryselector(".title"); body = replacebox.queryselector(".body"); timerelem = replacebox.queryselector(".timer"); } else { adbox = document.createelement("div"); adbox.classname = "ad"; title = document.createelement("h2"); body = document.createelement("p"); ...
... document.createelement().
Recording a media element - Web APIs
tbutton = document.getelementbyid("startbutton"); let stopbutton = document.getelementbyid("stopbutton"); let downloadbutton = document.getelementbyid("downloadbutton"); let logelement = document.getelementbyid("log"); let recordingtimems = 5000; most of these are references to elements we need to work with.
...d.
... timeouts, which can be very handy when chaining promises, as we'll see later.
...g(stream, lengthinms) { let recorder = new mediarecorder(stream); let data = []; recorder.ondataavailable = event => data.push(event.data); recorder.start(); log(recorder.state + " for " + (lengthinms/1000) + " seconds..."); let stopped = new promise((resolve, reject) => { recorder.onstop = resolve; recorder.onerror = event => reject(event.name); }); let recorded = wait(lengthinms).then( () => recorder.state == "recording" && recorder.stop() ); return promise.all([ stopped, recorded ]) .then(() => data); } startrecording() takes two input parameters: a mediastream to record from and the length in milliseconds of the recording to make.
OfflineAudioContext.OfflineAudioContext() - Web APIs
the offlineaudiocontext() constructor—part of the web audio api—creates and returns a new offlineaudiocontext object instance, which can then be used to render audio to an audiobuffer rather than to an audio output device.
...ions); parameters you can specify the parameters for the offlineaudiocontext() constructor as either the same set of parameters as are inputs into the audiocontext.createbuffer() method, or by passing those parameters in an options object.
... numberofchannels an integer specifying the number of channels the resulting audiobuffer should have.
..., read audio buffers: frames, samples and channels from our basic concepts guide.
Pinch zoom gestures - Web APIs
nged to "pink" and if the // distance is decreasing (zoom out), the color is changed to "lightblue".
...visually // indicate the pointer's target received a move event.
...ed for pointercancel, pointerleave and pointerout events.
...n id="clearlog" onclick="clearlog(event);">clear the log</button> <p></p> <output></output> </body> miscellaneous functions these functions support the application but aren't directly involved in the event flow.
SVGAngle - Web APIs
Web › API › SVGAngle
unittype the type of the value as specified by one of the svg_angletype_* constants defined on this interface.
...n the length corresponds to a read-only attribute, or when the object itself is read-only.
...ue as a domstring value, in the units expressed by unittype.
...alue as a number with an associated unittype, thereby replacing the values for all of the attributes on the object.
SVGEllipseElement - Web APIs
ize="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgellipseelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svggeometryelement.
...eelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svggeometryelement.
...roperties from its parent interface, svggeometryelement.
...eflecting the cx attribute of the given <ellipse> element.
SVGFEConvolveMatrixElement - Web APIs
te of the given element.
... an svganimatedinteger corresponding to the targety attribute of the given element.
...ement.
...umeration corresponding to the edgemode attribute of the given element.
SVGFEDiffuseLightingElement - Web APIs
vganimatedstring corresponding to the in attribute of the given element.
...ingelement.surfacescale read only an svganimatednumber corresponding to the surfacescale attribute of the given element.
...surfacescale attribute of the given element.
...ead only an svganimatednumber corresponding to the diffuseconstant attribute of the given element.
SVGFESpecularLightingElement - Web APIs
ponding to the surfacescale attribute of the given element.
...pecularconstant read only an svganimatednumber corresponding to the specularconstant attribute of the given element.
...onstant attribute of the given element.
... only an svganimatednumber corresponding to the specularexponent attribute of the given element.
SVGFilterElement - Web APIs
vganimatedenumeration that corresponds to the filterunits attribute of the given <filter> element.
...tants defined in svgunittypes.
...e primitiveunits attribute of the given <filter> element.
... read only an svganimatedlength that corresponds to the x attribute on the given <filter> element.
SVGFilterPrimitiveStandardAttributes - Web APIs
f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="181" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfilterprimitivestandardattributes</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties svgfilterprimitivestandardattributes.x read only an svganimatedlength corresponding to the x attribute of the given element.
...space" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfilterprimitivestandardattributes</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties svgfilterprimitivestandardattributes.x read only an svganimatedlength corresponding to the x attribute of the given element.
... a:hover text { fill: #0095dd; pointer-events: all;} properties svgfilterprimitivestandardattributes.x read only an svganimatedlength corresponding to the x attribute of the given element.
...tedlength corresponding to the x attribute of the given element.
SVGForeignObjectElement - Web APIs
solas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgforeignobjectelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggraphicselement and implements properties from svgurireference.
.../a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggraphicselement and implements properties from svgurireference.
...its parent, svggraphicselement and implements properties from svgurireference.
... corresponding to the x attribute of the given <foreignobject> element.
SVGImageElement - Web APIs
-events: all;} properties this interface also inherits properties from its parent, svggraphicselement.
... hint given to the browser on how it should decode the image.
...corresponding to the height attribute of the given <image> element.
... an svganimatedpreserveaspectratio corresponding to the preserveaspectratio attribute of the given <image> element.
SVGLineElement - Web APIs
><text x="-29" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svglineelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggeometryelement.
...ddle" alignment-baseline="middle">svglineelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggeometryelement.
...all;} properties this interface also inherits properties from its parent, svggeometryelement.
...read only returns an svganimatedlength that corresponds to attribute x1 on the given <line> element.
SVGLinearGradientElement - Web APIs
41" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svglineargradientelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggradientelement.
..."middle">svglineargradientelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggradientelement.
... interface also inherits properties from its parent, svggradientelement.
...h corresponding to the x1 attribute of the given <lineargradient> element.
SVGMaskElement - Web APIs
only an svganimatedenumeration corresponding to the maskunits attribute of the given <mask> element.
... of the constants defined in svgunittypes.
...responding to the maskcontentunits attribute of the given <mask> element.
...es.
The 'X' property - Web APIs
the x property describes the horizontal coordinate of the position of the element.
...ontal coordinate of the position of the element.
... 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).
...wport (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).
SVGTextPositioningElement - Web APIs
ont-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgtextpositioningelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svgtextcontentelement.
..."middle">svgtextpositioningelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svgtextcontentelement.
...erties this interface also inherits properties from its parent, svgtextcontentelement.
...nly returns an svganimatedlengthlist reflecting the x attribute of the given element.
SVGUseElement - Web APIs
amily="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svguseelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svggraphicselement and implements properties from svgurireference.
...dle">svguseelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svggraphicselement and implements properties from svgurireference.
...rties this interface also inherits properties from its parent interface, svggraphicselement and implements properties from svgurireference.
...ties from svgurireference.
SubtleCrypto.digest() - Web APIs
the digest() method of the subtlecrypto interface generates a digest of the given data.
... the digest() method of the subtlecrypto interface generates a digest of the given data.
...roduces an output 384 bits long.
...est length: const text = 'an obscure body in the s-k system, your majesty.
SubtleCrypto.unwrapKey() - Web APIs
04,21,36,55,93,1,132,242,242,192,156]; /* the wrapped key itself.
... salt originally used to derive the key.
... 40,148,187,39,234,96,151,16,158,114,113,109,164,47,108,94,148,35,232,221, 33,110,126,170,25,234,45,165,180,210,193,120,247,155,127]; /* the unwrapped signing key.
...salt originally used to derive the key.
TouchList.item() - Web APIs
Web › API › TouchList › item
the item() method returns the touch object at the specified index in the touchlist.
...) method returns the touch object at the specified index in the touchlist.
...dex); parameters index the index of the touch object to retrieve.
...ustrates the use of the touchlist interface's item method and the length property.
WebGL2RenderingContext.copyBufferSubData() - Web APIs
l transfer operations.
...ons.
... none.
...r data = new float32array(vertices); var length = vertices.length * 4; gl.bindbuffer(gl.array_buffer, srcbuffer); gl.bufferdata(gl.array_buffer, data, gl.static_draw); gl.bindbuffer(gl.copy_read_buffer, srcbuffer); gl.bindbuffer(gl.array_buffer, dstbuffer); gl.bufferdata(gl.array_buffer, new float32array(length), gl.static_draw); gl.copybuffersubdata(gl.copy_read_buffer, gl.array_buffer, 0, 0, length); specifications specification status comment webgl 2.0the definition of 'copybuffersubdata' in that specification.
WebGL2RenderingContext.getBufferSubData() - Web APIs
the webgl2renderingcontext.getbuffersubdata() method of the webgl 2 api reads data from a buffer binding point and writes them to an arraybuffer or sharedarraybuffer.
...: buffer used for pixel transfer operations.
...ecifying the byte offset from which to start reading from the buffer.
...null offset is less than zero.
WebGL constants - Web APIs
urrent element array buffer.
...urns a length-2 array with the lo value at 0, and hight at 1.
...l constants defined webgl 2 these constants are defined on the webgl2renderingcontext interface.
...also available in a webgl 2 context.
Writing a WebSocket server in Java - Web APIs
byte[] response = ("http/1.1 101 switching protocols\r\n" + "connection: upgrade\r\n" + "upgrade: websocket\r\n" + "sec-websocket-accept: " + base64.getencoder().encodetostring(messagedigest.getinstance("sha-1").digest((match.group(1) + "258eafa5-e914-47da-95ca-c5ab0dc85b11").getbytes("utf-8"))) + "\r\n\r\n").getbytes("utf-8"); out.write(response, 0, response.length); decoding messages after a successful handshake, client can send messages to the server, but now these are encoded.
... 225 225 210 198 131 130 182 194 135 - 129: fin (is this the whole message?) rsv1 rsv2 rsv3 opcode 1 0 0 0 0x1=0001 fin: you can send your message in frames, but now keep things simple.
... 0x1=0001 fin: you can send your message in frames, but now keep things simple.
...the message.
Border-radius generator - CSS: Cascading Style Sheets
].push(callback); } var unsubscribe = function unsubscribe(topic, callback) { subscribers[topic].indexof(callback); subscribers[topic].splice(index, 1); } var notify = function notify() { for (var i in subscribers[this.topic]) { subscribers[this.topic][i](this.value); } } var init = function init() { var elem = document.queryselectorall('.ui-input-slider'); var size = elem.length; for (var i = 0; i < size; i++) new inputslider(elem[i]); } return { init : init, setmax : setmax, setmin : setmin, setunit : setunit, getnode : getnode, setvalue : setvalue, subscribe : subscribe, unsubscribe : unsubscribe } })(); /** * ui-buttonmanager */ var buttonmanager = (function checkboxmanager() { var subscribers = []; var buttons = []; var checkbox = f...
...or); } } var subscribe = function subscribe(topic, callback) { if (subscribers[topic] === undefined) subscribers[topic] = []; subscribers[topic].push(callback); } var unsubscribe = function unsubscribe(topic, callback) { subscribers[topic].indexof(callback); subscribers[topic].splice(index, 1); } var notify = function notify() { for (var i = 0; i < subscribers[this.topic].length; i++) subscribers[this.topic][i](this.checkbox.checked); } var init = function init() { var elem = document.queryselectorall('.ui-checkbox'); var size = elem.length; for (var i = 0; i < size; i++) new checkbox(elem[i]); } return { init : init, setvalue : setvalue, subscribe : subscribe, unsubscribe : unsubscribe } })(); window.addeventlistener("load", function() { b...
...eviewuiheight = function updatepreviewuiheight() { var p = subject.parentelement.clientheight; var v = preview_ui.clientheight; console.log(p, v, (p - v ) / 2); preview_ui.style.top = (p - v) / 2 + "px" ; } var updateoutput = function updateoutput(corner, radius) { var values = radius.split(" "); borders1[corner] = values[0]; borders2[corner] = values[0]; if (values.length === 2) borders2[corner] = values[1]; var border_1_value = borders1.join(" "); var border_2_value = borders2.join(" "); var border_radius = 'border-radius: ' + border_1_value; if (border_2_value !== border_1_value) border_radius += ' / ' + border_2_value; border_radius += ';'; output.textcontent = border_radius; } var init = function init() { preview = getelemb...
...der_1_value) border_radius += ' / ' + border_2_value; border_radius += ';'; output.textcontent = border_radius; } var init = function init() { preview = getelembyid("preview"); subject = getelembyid("subject"); output = getelembyid("output"); preview_ui = getelembyid("radius-ui-sliders"); var elem = document.queryselectorall('.radius-container'); var size = elem.length; for (var i = 0; i < size; i++) radius_containers[i] = new radiuscontainer(elem[i]); inputslidermanager.subscribe("width", updateuiwidth); inputslidermanager.subscribe("height", updateuiheight); inputslidermanager.setvalue("width", subject.clientwidth); inputslidermanager.setvalue("height", subject.clientheight); } return { init : init, updateoutput : updateoutput ...
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
ong the main axis.
...much space there is available to lay out flex items, the browser needs to know how big the item is to start with.
...ou could give them all a flex-grow of 88, or 100, or 1.2 if you like — it is a ratio.
...ng the number of things that come into play.
Basic Shapes - CSS: Cascading Style Sheets
argin-box to border-box, padding-box or content-box to see how the reference box used as the starting point before offsets are calculated changes.
...are calculated changes.
... of <shape-radius>.
...o the farthest side of the reference box.
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
s now let's see some examples of what happens as we apply different scaling to these images.
...ing to these images.
... examples below, the enclosing rectangles are 300 pixels wide and 200 pixels tall.
...rendered in the auto case.
Viewport concepts - CSS: Cascading Style Sheets
you query the width or height of the window and document in chrome or firefox, you may get: document.documentelement.clientwidth /* 1200 */ window.innerwidth /* 1200 */ window.outerwidth /* 1200 */ document.documentelement.clientheight /* 800 */ window.innerheight /* 800 */ window.outerheight /* 900 */ there are several dom properties that can help you query viewport size, and other similar lengths: the document element's element.clientwidth is the inner width of a document in css pixels, including padding (but not borders, margins, or vertical scrollbars, if present).
...the area within the innerheight and innerwidth is generally considered the layout viewport.
...ayed within the layout viewport is considered a visual viewport.
...ength units based on the viewport size.
border-block-start-width - CSS: Cascading Style Sheets
us a pull request.
...r-block-start-width: 5px; border-block-start-width: thick; related properties are border-block-end-width, border-inline-start-width, and border-inline-end-width, which define the other border widths of the element.
...nitial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length values <'border-width'> the width of the border.
...ogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length values <'border-width'> the width of the border.
border-inline-end-width - CSS: Cascading Style Sheets
us a pull request.
...er-inline-end-width: 2px; border-inline-end-width: thick; related properties are border-block-start-width, border-block-end-width, and border-inline-start-width, which define the other border widths of the element.
...nitial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length values <'border-width'> the width of the border.
...ogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length values <'border-width'> the width of the border.
border-inline-end - CSS: Cascading Style Sheets
umborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browser to anotherapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style:...
...r-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style: as specifiedborder-right-style: 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 values the border-inline-end is specified with one or more of the following, in any order: <'border-width'> the width of the border.
...umborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browser to anotherapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style:...
...r-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style: as specifiedborder-right-style: 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> ]?
column-rule-width - CSS: Cascading Style Sheets
of the line drawn between columns in a multi-column layout.
...mn-rule-width: thick; /* <length> values */ column-rule-width: 1px; column-rule-width: 2.5em; /* global values */ column-rule-width: inherit; column-rule-width: initial; column-rule-width: unset; the column-rule-width property is specified as a single <'border-width'> value.
...th: initial; column-rule-width: unset; the column-rule-width property is specified as a single <'border-width'> value.
...rty is specified as a single <'border-width'> value.
fit-content() - CSS: Cascading Style Sheets
by auto, which is calculated similar to auto (i.e., minmax(auto, max-content)), except that the track size is clamped at argument if it is greater than the auto minimum.
....e., minmax(auto, max-content)), except that the track size is clamped at argument if it is greater than the auto minimum.
...e used as laid out box size for width, height, min-width, min-height, max-width and max-height, where the maximum and minimum sizes refer to the content size.
...x size for width, height, min-width, min-height, max-width and max-height, where the maximum and minimum sizes refer to the content size.
flex-basis - CSS: Cascading Style Sheets
sic sizing keywords */ flex-basis: fill; flex-basis: max-content; flex-basis: min-content; flex-basis: fit-content; /* automatically size based on the flex item’s content */ flex-basis: content; /* global values */ flex-basis: inherit; flex-basis: initial; flex-basis: unset; the flex-basis property is specified as either the keyword content or a <'width'>.
...93316, so auto once again means "look at my width or height property"; and a new content keyword is being introduced to trigger automatic sizing.
..."look at my width or height property"; and a new content keyword is being introduced to trigger automatic sizing.
...ight property"; and a new content keyword is being introduced to trigger automatic sizing.
margin-block - CSS: Cascading Style Sheets
the margin-block css shorthand property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
... the margin-block css shorthand property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
...ng-mode, direction, and text-orientation.
...ation.
max() - CSS: Cascading Style Sheets
Web › CSS › max
the max() css function lets you set the largest (most positive) value from a list of comma-separated expressions as the value of a css property value.
... value a property can have.
...sions, so you can use direct addition, subtraction, multiplication and division without using the calc() function itself.
...> <h1 class="responsive">this text is always legible, and is responsive, to a point</h1> think of the max() function as finding the minimum value allowed for a property.
<shape> - CSS: Cascading Style Sheets
Web › CSS › shape
o which the clip property applies.
... of clip-path.
...sing the rect() function, which produces a region in the form of a rectangle.
... top is a <length> representing the offset for the top of the rectangle relative to the top border of the element's box.
text-decoration-thickness - CSS: Cascading Style Sheets
the text-decoration-thickness css property sets the stroke thickness of the decoration line that is used on text in an element, such as a line-through, underline, or overline.
...ess: inherit; text-decoration-thickness: initial; text-decoration-thickness: unset; values auto the browser chooses an appropriate width for the text decoration line.
...hickness: unset; values auto the browser chooses an appropriate width for the text decoration line.
...thickness is constant across the whole box it is applied to, even if there are child elements with a different font size.
text-underline-offset - CSS: Cascading Style Sheets
text decoration line (applied using text-decoration) from its original position.
... /* length */ text-underline-offset: 0.1em; text-underline-offset: 3px; /* percentage */ text-underline-offset: 20%; /* global values */ text-underline-offset: inherit; text-underline-offset: initial; text-underline-offset: unset; the text-underline-offset property is specified as a single value from the list below.
...nderline-offset: 3px; /* percentage */ text-underline-offset: 20%; /* global values */ text-underline-offset: inherit; text-underline-offset: initial; text-underline-offset: unset; the text-underline-offset property is specified as a single value from the list below.
...ss the whole box that the underline is applied to, even if there are child elements with different font sizes or vertical alignment.
translateX() - CSS: Cascading Style Sheets
the translatex() css function repositions an element horizontally on the 2d plane.
... the translatex() css function repositions an element horizontally on the 2d plane.
... the translatex() css function repositions an element horizontally on the 2d plane.
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3 a translation is not a linear transformation in ℝ2 and can't be represented using a cartesian-coordinate matrix.
translateY() - CSS: Cascading Style Sheets
the translatey() css function repositions an element vertically on the 2d plane.
... the translatey() css function repositions an element vertically on the 2d plane.
... the translatey() css function repositions an element vertically on the 2d plane.
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3 a translation is not a linear transformation in ℝ2 and can't be represented using a cartesian-coordinate matrix.
transition-timing-function - CSS: Cascading Style Sheets
ion to link to the corresponding property to transition, as defined in transition-property.
... transition continues.
...lid red; color: white; transition-property: all; transition-duration: 7s; } .parent > div.box1{ width: 90vw; min-width: 24em; background-color: magenta; color: yellow; border: 1px solid orange; transition-property: all; transition-duration: 2s; } function updatetransition() { var els = document.queryselectorall(".parent > div[class]"); for(var c = els.length, i = 0; i < c; i++) { els[i].classlist.toggle("box1"); } } var intervalid = window.setinterval(updatetransition, 10000); .ease { transition-timing-function: ease; } .easein { transition-timing-function: ease-in; } .easeout { transition-timing-function: ease-out; } .easeinout { transition-timing-function: ease-in-out; } .linear { transition-timing-function: linear; } .cb ...
...solid red; color: white; transition-property: all; transition-duration:7s; } .parent > div.box1{ width: 90vw; min-width: 24em; background-color: magenta; color: yellow; border: 1px solid orange; transition-property: all; transition-duration:2s; } function updatetransition() { var els = document.queryselectorall(".parent > div[class]"); for(var c = els.length, i = 0; i < c; i++) { els[i].classlist.toggle("box1"); } } var intervalid = window.setinterval(updatetransition, 10000); .jump-start { transition-timing-function: steps(5, jump-start); } .jump-end { transition-timing-function: steps(5, jump-end); } .jump-none { transition-timing-function: steps(5, jump-none); } .jump-both { transition-timing-function: steps(5, jump-both); }...
Adding captions and subtitles to HTML5 video - Developer guides
ch browser where possible.
...eo's texttracks, reading their properties and building the menu up from there: var subtitlesmenu; if (video.texttracks) { var df = document.createdocumentfragment(); var subtitlesmenu = df.appendchild(document.createelement('ul')); subtitlesmenu.classname = 'subtitles-menu'; subtitlesmenu.appendchild(createmenuitem('subtitles-off', '', 'off')); for (var i = 0; i < video.texttracks.length; i++) { subtitlesmenu.appendchild(createmenuitem('subtitles-' + video.texttracks[i].language, video.texttracks[i].language, video.texttracks[i].label)); } videocontainer.appendchild(subtitlesmenu); } this code creates a documentfragment, which is used to hold an unordered list containing our subtitles menu.
...he creation of each list item and button is done by the createmenuitem() function, which is defined as follows: var subtitlemenubuttons = []; var createmenuitem = function(id, lang, label) { var listitem = document.createelement('li'); var button = listitem.appendchild(document.createelement('button')); button.setattribute('id', id); button.classname = 'subtitles-button'; if (lang.length > 0) button.setattribute('lang', lang); button.value = label; button.setattribute('data-state', 'inactive'); button.appendchild(document.createtextnode(label)); button.addeventlistener('click', function(e) { // set all buttons to inactive subtitlemenubuttons.map(function(v, i, a) { subtitlemenubuttons[i].setattribute('data-state', 'inactive'); }); // f...
... button.appendchild(document.createtextnode(label)); button.addeventlistener('click', function(e) { // set all buttons to inactive subtitlemenubuttons.map(function(v, i, a) { subtitlemenubuttons[i].setattribute('data-state', 'inactive'); }); // find the language to activate var lang = this.getattribute('lang'); for (var i = 0; i < video.texttracks.length; i++) { // for the 'subtitles-off' button, the first condition will never match so all will subtitles be turned off if (video.texttracks[i].language == lang) { video.texttracks[i].mode = 'showing'; this.setattribute('data-state', 'active'); } else { video.texttracks[i].mode = 'hidden'; } } subtitlesmenu.s...
Date and time formats used in HTML - HTML: Hypertext Markup Language
rally occurring slowing of earth's rotation.
...see the table in the section days of the month for the month numbers and their corresponding names (and lengths in days).
...th numbers and their corresponding names (and lengths in days).
... same string as the previous datetime-local string.
<input type="range"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › range
ogress> and <meter> elements, the orient attribute defines the orientation of the range slider.
... <meter> elements, the orient attribute defines the orientation of the range slider.
... not even care—or know—what the specific numeric value selected is.
... browsers some flexibility on how to present the range control.
Data URLs - HTTP
t to put a comma before the "data" segment, or to incorrectly encode the data into base64 format.
...o base64 format.
...hin a file, which can potentially be very wide relative to the width of the enclosing document.
...ed, tab, or spaces), but there are practical issues that arise when using base64 encoding.
Closures - JavaScript
e" name="name"></p> <p>age: <input type="text" id="age" name="age"></p> function showhelp(help) { document.getelementbyid('help').innerhtml = help; } function setuphelp() { var helptext = [ {'id': 'email', 'help': '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++) { var item = helptext[i]; document.getelementbyid(item.id).onfocus = function() { showhelp(item.help); } } } setuphelp(); try running the code in jsfiddle.
...howhelp(help) { document.getelementbyid('help').innerhtml = help; } function makehelpcallback(help) { return function() { showhelp(help); }; } function setuphelp() { var helptext = [ {'id': 'email', 'help': '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++) { var item = helptext[i]; document.getelementbyid(item.id).onfocus = makehelpcallback(item.help); } } setuphelp(); run the code using this jsfiddle link.
...xt array.
...to use more closures, you can use the let keyword introduced in es2015 : function showhelp(help) { document.getelementbyid('help').innerhtml = help; } function setuphelp() { var helptext = [ {'id': 'email', 'help': 'your e-mail address'}, {'id': 'name', 'help': 'your full name'}, {'id': 'age', 'help': 'your age (you must be over 16)'} ]; for (let i = 0; i < helptext.length; i++) { let item = helptext[i]; document.getelementbyid(item.id).onfocus = function() { showhelp(item.help); } } } setuphelp(); this example uses let instead of var, so every closure binds the block-scoped variable, meaning that no additional closures are required.
constructor - JavaScript
lse { console.log('unknown error', error); throw error; } } there can be only one special method with the name "constructor" in a class.
... } there can be only one special method with the name "constructor" in a class.
..." in a class.
...lass.
extends - JavaScript
lass extends parentclass { ...
...can be used to subclass custom classes as well as built-in objects.
...the .prototype of the extension must be an object or null.
...totype of the extension must be an object or null.
Array.prototype.findIndex() - JavaScript
return value the index of the first element in the array that passes the test.
...ed.
... https://tc39.github.io/ecma262/#sec-array.prototype.findindex if (!array.prototype.findindex) { object.defineproperty(array.prototype, 'findindex', { value: function(predicate) { // 1.
...62/#sec-array.prototype.findindex if (!array.prototype.findindex) { object.defineproperty(array.prototype, 'findindex', { value: function(predicate) { // 1.
Array.prototype.indexOf() - JavaScript
stored in a github repository.
...y cosmetic conciseness.
...ndexof = function(searchelement, fromindex) { "use strict"; var k; // 1.
... var k; // 1.
RegExpInstance.lastIndex - JavaScript
property attributes of regexpinstance.lastindex writable yes enumerable no configurable no description this property is set only if the regular expression instance used the g flag to indicate a global search, or the y flag to indicate a sticky search.
... no configurable no description this property is set only if the regular expression instance used the g flag to indicate a global search, or the y flag to indicate a sticky search.
...h, or the y flag to indicate a sticky search.
...equence of statements: var re = /(hi)?/g; matches the empty string.
String.prototype.repeat() - JavaScript
vert ' + this + ' to object'); var str = '' + this; // to convert string to integer.
... if (count == infinity) throw new rangeerror('repeat count must be less than infinity'); count = math.floor(count); if (str.length == 0 || count == 0) return ''; // ensuring count is a 31-bit integer allows us to heavily optimize the // main part.
... if (str.length == 0 || count == 0) return ''; // ensuring count is a 31-bit integer allows us to heavily optimize the // main part.
...(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.length); return str; } } examples using repeat 'abc'.repeat(-1) // rangeerror 'abc'.repeat(0) // '' 'abc'.repeat(1) // 'abc' 'abc'.repeat(2) // 'abcabc' 'abc'.repeat(3.5) // 'abcabcabc' (count will be converted to integer) 'abc'.repeat(1/0) // rangeerror ({ tostring: () => 'abc', repeat: string.prototype.repeat }).repeat(2) // 'abcabc' (repeat() is a generic method) specif...
in operator - JavaScript
ains the property with specified name (prop).
...ame (prop).
...s 'pi' in math // returns true // custom objects let mycar = {make: 'honda', model: 'accord', year: 1998} 'make' in mycar // returns true 'model' in mycar // returns true you must specify an object on the right side of the in operator.
...998} 'make' in mycar // returns true 'model' in mycar // returns true you must specify an object on the right side of the in operator.
super - JavaScript
that are common between rectangle and square.
...ght = height; this.width = width; } sayname() { console.log('hi, i am a ', this.name + '.'); } get area() { return this.height * this.width; } set area(value) { this._area = value; } } class square extends rectangle { constructor(length) { this.height; // referenceerror, super needs to be called first!
...('hi, i am a ', this.name + '.'); } get area() { return this.height * this.width; } set area(value) { this._area = value; } } class square extends rectangle { constructor(length) { this.height; // referenceerror, super needs to be called first!
...am a ', this.name + '.'); } get area() { return this.height * this.width; } set area(value) { this._area = value; } } class square extends rectangle { constructor(length) { this.height; // referenceerror, super needs to be called first!
label - JavaScript
= 0" // "i = 0, j = 1" // "i = 0, j = 2" // "i = 1, j = 0" // "i = 2, j = 0" // "i = 2, j = 1" // "i = 2, j = 2" // notice how it skips both "i = 1, j = 1" and "i = 1, j = 2" using a labeled continue statement given an array of items and an array of tests, this example counts the number of items that passes all the tests.
...j = 2" // "i = 1, j = 0" // "i = 2, j = 0" // "i = 2, j = 1" // "i = 2, j = 2" // notice how it skips both "i = 1, j = 1" and "i = 1, j = 2" using a labeled continue statement given an array of items and an array of tests, this example counts the number of items that passes all the tests.
... console.log('i = ' + i + ', j = ' + j); } } // output is: // "i = 0, j = 0" // "i = 0, j = 1" // "i = 0, j = 2" // "i = 1, j = 0" // notice the difference with the previous continue example using a labeled break statement given an array of items and an array of tests, this example determines whether all items pass all tests.
... + j); } } // output is: // "i = 0, j = 0" // "i = 0, j = 1" // "i = 0, j = 2" // "i = 1, j = 0" // notice the difference with the previous continue example using a labeled break statement given an array of items and an array of tests, this example determines whether all items pass all tests.
baseline-shift - SVG: Scalable Vector Graphics
sub- or superscript.
...element but it has effect only on the following four elements: <altglyph>, <textpath>, <tref>, and <tspan> usage notes value <length-percentage> | sub | super default value 0 animatable yes sub the dominant-baseline is shifted to the default position for subscripts.
...ect only on the following four elements: <altglyph>, <textpath>, <tref>, and <tspan> usage notes value <length-percentage> | sub | super default value 0 animatable yes sub the dominant-baseline is shifted to the default position for subscripts.
... sub | super default value 0 animatable yes sub the dominant-baseline is shifted to the default position for subscripts.
dx - SVG: Scalable Vector Graphics
Web › SVG › Attribute › dx
<altglyph>, if it contains a single value, dx defines a shift along the x-axis for all alternate glyph.
... text for <text>, if it contains a single value, dx defines a shift along the x-axis for all glyphs.
...used.
...for <tspan>, if it contains a single value, dx defines a shift along the x-axis for all alternate glyph.
dy - SVG: Scalable Vector Graphics
Web › SVG › Attribute › dy
ltglyph>, if it contains a single value, dy defines a shift along the y-axis for all alternate glyph.
... text for <text>, if it contains a single value, dy defines a shift along the y-axis for all glyphs.
...used.
... <tspan>, if it contains a single value, dy defines a shift along the y-axis for all alternate glyph.
startOffset - SVG: Scalable Vector Graphics
" d="m130,90 q210,90 210,45 q210,10 170,10 q130,10 130,40 q130,70 165,70 q190,70 195,50" /> <text> <textpath href="#path1" startoffset="0"> quick brown fox jumps over the lazy dog.
..." /> <text> <textpath href="#path1" startoffset="0"> quick brown fox jumps over the lazy dog.
...path href="#path1" startoffset="0"> quick brown fox jumps over the lazy dog.
...element.
<foreignObject> - SVG: Scalable Vector Graphics
context of an svg document --> <div xmlns="http://www.w3.org/1999/xhtml"> lorem ipsum dolor sit amet, consectetur adipiscing elit.
...t, consectetur adipiscing elit.
...allis, rutrum imperdiet eros.
...height the height of the foreignobject.
<linearGradient> - SVG: Scalable Vector Graphics
l> ; default value: none; animatable: yes spreadmethod this attribute indicates how the gradient behaves if it starts or ends inside the bounds of the shape containing the gradient.
...e type: pad|reflect|repeat ; default value: pad; animatable: yes x1 this attribute defines the x coordinate of the starting point of the vector gradient along which the linear gradient is drawn.
...ch the linear gradient is drawn.
...plate.
<pattern> - SVG: Scalable Vector Graphics
Web › SVG › Element › pattern
<pattern id="star" viewbox="0,0,10,10" width="10%" height="10%"> <polygon points="0,0 2,5 0,10 5,8 10,10 8,5 10,0 5,2"/> </pattern> </defs> <circle cx="50" cy="50" r="50" fill="url(#star)"/> <circle cx="180" cy="50" r="40" fill="none" stroke-width="20" stroke="url(#star)"/> </svg> attributes height this attribute determines the height of the pattern tile.
...e: (none| xminymin| xmidymin| xmaxymin| xminymid| xmidymid| xmaxymid| xminymax| xmidymax| xmaxymax) (meet|slice)?
... animatable: yes viewbox this attribute defines the bound of the svg viewport for the pattern fragment.
...cated since svg 2 this attribute reference a template pattern that provides default values for the <pattern> attributes.
<svg> - SVG: Scalable Vector Graphics
Web › SVG › Element › svg
pting language used by the svg fragment.
...recated since svg 2 which version of svg is used for the inner content of the element.
...g viewport coordinates for the current svg fragment.
...tangular viewport.
context-menu - Archive of obsolete content
ings.
...'self.on("context", function (node) {' + ' var pagehasimgs = !!document.queryselector("img");' + ' return pagehasimgs;' + '});' + 'self.on("click", function (node, data) {' + ' var imgs = document.queryselectorall("img");' + ' var imgsrcs = [];' + ' for (var i = 0 ; i < imgs.length; i++)' + ' imgsrcs.push(imgs[i].src);' + ' self.postmessage(imgsrcs);' + '});', onmessage: function (imgsrcs) { openimageeditor(imgsrcs); } }); show a "search with" menu when the user right-clicks an anchor that searches google or wikipedia with the text contained in the anchor: var cm = require("sdk/context-menu"); var googleitem =...
... uuidstr = uuid.number.substring(1,37); cm.item({ data: uuidstr+"this is a tooltip", label: "just a tigger, will never show up", contentscript: 'self.on("context", function(){self.postmessage(); return false;})', onmessage: function(){ var cmitems = getmostrecentbrowserwindow().document.queryselectorall(".addon-context-menu-item[value^='"+ uuidstr +"']"); for(var i=0; i < cmitems.length; i++) cmitems[i].tooltiptext = cmitems[i].value.substring(36); } }); globals constructors item(options) creates a labeled menu item that can perform an action when clicked.
util/list - Archive of obsolete content
item) function removes an item from a list list an ordered collection (also known as a sequence) disallowing duplicate elements.
...f its api is private except for the length property.
...mples: var { list } = require("sdk/util/list"); var mylist = list.compose({ add: function add(item1, item2, /*item3...*/) { array.slice(arguments).foreach(this._add.bind(this)); }, remove: function remove(item1, item2, /*item3...*/) { array.slice(arguments).foreach(this._remove.bind(this)); } }); mylist('foo', 'bar', 'baz').length == 3; // true new mylist('new', 'keyword').length == 2; // true mylist.apply(null, [1, 2, 3]).length == 3; // true let list = mylist(); list.length == 0; // true list.add(1, 2, 3) == 3; // true properties length number of elements in this list.
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
text input.
...parate elements—input for one line of text, and textarea for multiple lines.
... code in the script element's content.
XPCOM Objects - Archive of obsolete content
values in reality.
...ew object(); let childarray; this._prefservice.getchildlist("", {}, childarrayobj); // .value holds the actual array.
...this._prefservice.getchildlist("", {}, childarrayobj); // .value holds the actual array.
CSS3 - Archive of obsolete content
-width, break-after, break-before, and break-inside.
... css values and units module level 3 candidate recommendation makes initial and inherit keywords usable on any css property.
...itial and inherit keywords usable on any css property.
Creating a Web based tone generator - Archive of obsolete content
s var tail = null; // the function called with regular interval to populate // the audio output buffer.
... var available = currentposition + prebuffersize - currentwriteposition; if(available > 0) { // request some sound data from the callback function.
...currentwriteposition += written; } }, 100); } // control and generate the sound.
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
ple, an element node has type 1, while a text node has type 3 and a comment node is type 8.
... generates, it contains white spaces between xml nodes.
...t node has type 1, while a document node has type 9.
The new nsString class implementation (1999) - Archive of obsolete content
function api to manipulate nsstrimpl offers simple memory allocator api for specialized memory policy shares binary format with bstring coming soon: a new xpcom (nsistring) interface non-templatized; this is a requirement for gecko very efficient buffer manipulation architecture the fundamental data type in the new architecture is struct nsstrimpl, given below: struct nsstrimpl { print32 mlength; void* mbuffer; print32 mcapacity; char mcharsize; char munused; // and now for the nsstrimpl api...
...on-templatized; this is a requirement for gecko very efficient buffer manipulation architecture the fundamental data type in the new architecture is struct nsstrimpl, given below: struct nsstrimpl { print32 mlength; void* mbuffer; print32 mcapacity; char mcharsize; char munused; // and now for the nsstrimpl api...
...er manipulation architecture the fundamental data type in the new architecture is struct nsstrimpl, given below: struct nsstrimpl { print32 mlength; void* mbuffer; print32 mcapacity; char mcharsize; char munused; // and now for the nsstrimpl api...
Writing textual data - Archive of obsolete content
.createinstance(components.interfaces.nsiscriptableunicodeconverter); converter.charset = /* the character encoding you want, using utf-8 for this example */ "utf-8"; now you can convert and write to the stream: // this code assumes that os is your nsioutputstream // your_string here is the string you want to write.
..._string here is the string you want to write.
...nt to write.
Building accessible custom components in XUL - Archive of obsolete content
.focus(); } } function spreadsheet_left(current) { var next = find_cell_left(current); if (next) { next.focus(); } } function spreadsheet_right(current) { var next = find_cell_right(current); if (next) { next.focus(); } } function get_index_within_parent(current) { var arsiblings = current.parentnode.childnodes; for (var i = 0; i < arsiblings.length; i++) { if (arsiblings[i] == current) { return i; } } return -1; } function find_cell_up(current) { var row = get_index_within_parent(current); var arsiblings = current.parentnode.childnodes; return row == 0 ?
...== current) { return i; } } return -1; } function find_cell_up(current) { var row = get_index_within_parent(current); var arsiblings = current.parentnode.childnodes; return row == 0 ?
...ithin_parent(current.parentnode); var columns = current.parentnode.parentnode.childnodes; return column = 0 ?
Sorting and filtering a custom tree view - Archive of obsolete content
each(function(element) { //we'll match on every property for (var i in element) { if (prepareforcomparison(element[i]).indexof(filtertext) != -1) { table.push(element); break; } } }); } sort(); //restore scroll position if (topvisiblerow) { settopvisiblerow(topvisiblerow); } } //generic custom tree view stuff function treeview(table) { this.rowcount = table.length; this.getcelltext = function(row, col) { return table[row][col.id]; }; this.getcellvalue = function(row, col) { return table[row][col.id]; }; this.settree = function(treebox) { this.treebox = treebox; }; this.iseditable = function(row, col) { return col.editable; }; this.iscontainer = function(row){ return false; }; this.isseparator = function(row){ return false; }; this.issort...
...)) return -1; } return 0; } table.sort(columnsort); //setting these will make the sort option persist tree.setattribute("sortdirection", order == 1 ?
...unction gettopvisiblerow() { return tree.treeboxobject.getfirstvisiblerow(); } function settopvisiblerow(topvisiblerow) { return tree.treeboxobject.scrolltorow(topvisiblerow); } function inputfilter(event) { //do this now rather than doing it at every comparison var value = prepareforcomparison(event.target.value); setfilter(value); document.getelementbyid("clearfilter").disabled = value.length == 0; } function clearfilter() { document.getelementbyid("clearfilter").disabled = true; var filterelement = document.getelementbyid("filter"); filterelement.focus(); filterelement.value = ""; setfilter(""); } function setfilter(text) { filtertext = text; loadtable(); } ...
Multiple Rules - Archive of obsolete content
tically startswithmatch if a value starts with a specific string endswithmatch if a value ends with a specific string containsmatch if a value contains a substringto highlight results that contain a search term here is an example using the 'contains' operator: <vbox datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="person"> <assign var="?letters" expr="string-length(@name) - 1"/> </query> <rule> <where subject="?name" rel="contains" value=" "/> <action> <label uri="?" value="?name has two names for a total length of ?letters"/> </action> </rule> </template> </vbox> this example contains only one rule with a condition which checks for names that contain a space character, which has the effect of selecting only those pe...
...ultiple rules.
...the length of the name, minus one for the space character.
Rule Compilation - Archive of obsolete content
cannot be used inside hidden areas of the ui?
...den areas of the ui?
...which needs to get at the generated content will cause the template builder to generate output.
RDF Datasources - Archive of obsolete content
nc:personaltoolbarfolder the bookmark folder that corresponds to the personal toolbar folder.
...folder that corresponds to the personal toolbar folder.
...sponds to the personal toolbar folder.
progressmeter - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a meter which can be used to display the progress of a lengthy operation.
... « xul reference home [ examples | attributes | properties | methods | related ] a meter which can be used to display the progress of a lengthy operation.
....
application/http-index-format specification - Archive of obsolete content
rm to the following generic syntax: number: data where number is at least a three digit number (note that more digits are possible in the future) and data is separated from number by a colon and a space.
...0 line should be ignored.
... not set.
NPN_PostURL - Archive of obsolete content
, npbool file); parameters the function has the following parameters: instance pointer to the current plug-in instance.
...a frame by specifying the frame name as the target parameter.
...fer buf to the path name string for a file, and len to the length of the path string.
NPN_Write - Archive of obsolete content
into a stream produced by the plug-in and consumed by the browser.
...s the method returns, if desired.
...s the stream when it's done.
What is RSS - Archive of obsolete content
lse!
...e>tue, 23 aug 2005 21:02:05 -0800</pubdate> <enclosure url="http://katetv.example.com/show/4" length="1911146" type="application/ogg"/> </item> <item> <title>watch this</title> <guid>http://katetv.example.com/show/3</guid> <pubdate>tue, 16 aug 2005 16:11:57 -0400</pubdate> <enclosure url="http://katetv.example.com/show/3" length="1387442" type="application/ogg"/> </item> <item> <title>it is me again</title> <guid>http://katetv.example.com/show/2</guid> <pubdate>tue, 9 aug 2005 13:12:12 -0400</pubdate> <enclosure url="http://katetv.example.com/show/2" length="1894877" type="video/mpeg"/> </item> <item> <title>hello</title> ...
... <pubdate>tue, 9 aug 2005 13:12:12 -0400</pubdate> <enclosure url="http://katetv.example.com/show/2" length="1894877" type="video/mpeg"/> </item> <item> <title>hello</title> <guid>http://katetv.example.com/show/1</guid> <pubdate>tue, 2 aug 2005 18:22:14 -0400</pubdate> <enclosure url="http://katetv.example.com/show/1" length="17442215" type="application/ogg"/> </item> </channel> </rss> the observant reader may have noticed that the news web site and blogger examples were the same type of rss.
-ms-hyphenate-limit-zone - Archive of obsolete content
hyphenation zone.
...fiedanimation typediscrete syntax values <percentage> an integer followed by a percent sign (%), which specifies the width of the hyphenation zone, calculated with respect to the line box.
...pecifies the width of the hyphenation zone, calculated with respect to the line box.
-ms-wrap-margin - Archive of obsolete content
the -ms-wrap-margin css property is a microsoft extension that specifies a margin that offsets the inner wrap shape from other shapes.
... the -ms-wrap-margin css property is a microsoft extension that specifies a margin that offsets the inner wrap shape from other shapes.
...es.
Accessing XML children - Archive of obsolete content
ents of the type "bar".
...he list are reflected back in the element that the list originally came from.
...ist[0]; // returns " some text " list[1]; // returns " more text " you can similarly access comment nodes: xml.ignorecomments = false; var a = <foo> some <!-- abc --> text </foo>; var comments = a.comments(); alert(comments[0]); // returns <!-- abc --> the * selector will return all child nodes in an xml list.
The global XML object - Archive of obsolete content
er constructors such as object.
...); }; <foobar><foo/><foo/><foo/></foobar>.foocount() // returns 3 ignorecomments true by default.
...ents is true, the list returned by .comments() will be empty.
New in JavaScript 1.3 - Archive of obsolete content
ipt console was introduced.
... changed functionality in javascript 1.3 changes to date to conform with ecma-262 new constructor date(year, month, day, [,hours [, minutes [, seconds [, milliseconds ]]]]) additional method parameters: setmonth(month[, date]) sethours(hours[, min[, sec[, ms]]]) setminutes(min[, sec[, ms]]) setseconds(sec[, ms]) the length of an array (property length) is now an unsigned, 32-bit integer.
...onal method parameters: setmonth(month[, date]) sethours(hours[, min[, sec[, ms]]]) setminutes(min[, sec[, ms]]) setseconds(sec[, ms]) the length of an array (property length) is now an unsigned, 32-bit integer.
Archived JavaScript Reference - Archive of obsolete content
ray.unobserve()the array.unobserve() method was used to remove observers set by array.observe(), but has been deprecated and removed from browsers.
... array.unobserve() method was used to remove observers set by array.observe(), but has been deprecated and removed from browsers.
... used to remove observers set by array.observe(), but has been deprecated and removed from browsers.
Displaying a graphic with audio samples - Archive of obsolete content
src="revolve.ogg" controls="true" style="width: 512px;"> </audio> <div><canvas id="fft" width="512" height="200"></canvas></div> <img id="mozlogo" style="display:none" src="mozilla2.png"></img> <script> var canvas = document.getelementbyid('fft'), ctx = canvas.getcontext('2d'), channels, rate, framebufferlength, fft; function loadedmetadata() { channels = audio.mozchannels; rate = audio.mozsamplerate; framebufferlength = audio.mozframebufferlength; fft = new fft(framebufferlength / channels, rate); } function audioavailable(event) { var fb = event.framebuffer, t = event.time, /* unused, but ...
... channels = audio.mozchannels; rate = audio.mozsamplerate; framebufferlength = audio.mozframebufferlength; fft = new fft(framebufferlength / channels, rate); } function audioavailable(event) { var fb = event.framebuffer, t = event.time, /* unused, but it's there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength / 2; i < fbl; i++ ) { // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } // clear the canvas before drawing spectrum ctx.fillstyle = "rgb(0,0,0)"; ctx.fillrect (0,0...
... // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } // clear the canvas before drawing spectrum ctx.fillstyle = "rgb(0,0,0)"; ctx.fillrect (0,0, canvas.width, canvas.height); ctx.fillstyle = "rgb(255,255,255)"; for (var i = 0; i < signal.length; i++ ) { // multiply spectrum by a zoom value magnitude = signal[i] * 1000; // draw rectangle bars for each frequency bin ctx.fillrect(i * 4, canvas.height, 3, -magnitude); } ctx.drawimage(document.getelementbyid('mozlogo'),0,0, canvas.width, canvas.height); } var audio = document.getelementbyid('audio-element'); ...
Efficient animation for web games - Game development
on properties based on elapsed time.
...ed time.
...d.
Entity header - MDN Web Docs Glossary: Definitions of Web-related terms
an entity header is an http header that can be used in an http request or response, and describes the content of the body of themessage.
...y header is an http header that can be used in an http request or response, and describes the content of the body of themessage.
...either request, nor response headers, entity headers are often included in such terms.
CSS and JavaScript accessibility best practices - Learn web development
s can read them out alongside: <label for="name">enter your name:</label> <input type="text" name="name" id="name"> we only do the validation when the form is submitted — this is so that we don't update the ui too often and potentially confuse screen reader (and possibly other) users: form.onsubmit = validate; function validate(e) { errorlist.innerhtml = ''; for(let i = 0; i < formitems.length; i++) { const testitem = formitems[i]; if(testitem.input.value === '') { errorfield.style.left = '360px'; createlink(testitem); } } if(errorlist.innerhtml !== '') { e.preventdefault(); } } note: in this example, we are hiding and showing the error message box using absolute positioning rather than another method such as visibility or display, because it doesn'...
... a page reload (screen readers won't pick this up or alert users to it by default): <div class="errors" role="alert" aria-relevant="all"> <ul> </ul> </div> we will explain these attributes in our next article, which covers wai-aria in much more detail.
...een readers won't pick this up or alert users to it by default): <div class="errors" role="alert" aria-relevant="all"> <ul> </ul> </div> we will explain these attributes in our next article, which covers wai-aria in much more detail.
Sizing items in CSS - Learn web development
ake our <div> from the example above — we can give it specific width and height values, and it will now have that size no matter what content is placed into it.
...hat content is placed into it.
...t to overflow if there is more content than the element has space to fit inside it.
Beginner's guide to media queries - Learn web development
eens of popular phones and tablets were published in order that designs could be created to neatly match those viewports.
...iew the layout in responsive design mode in devtools we can see that it works pretty well as a straightforward mobile view of the site.
...tml on your computer.
Responsive design - Learn web development
previous overview: css layout next in the early days of web design, pages were built to target a particular screen size.
... when designing a website: you could create a liquid site, which would stretch to fill the browser window or a fixed width site, which would be a fixed size in pixels.
...s, and build a pixel perfect layout for it.
Advanced text formatting - Learn web development
function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { const scrollpos = textarea.scrolltop; const caretpos = textarea.selectionstart; const front = (textarea.value).substring(0, caretpos); const back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not t...
...function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { const scrollpos = textarea.scrolltop; const caretpos = textarea.selectionstart; const front = (textarea.value).substring(0, caretpos); const back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not t...
...function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { const scrollpos = textarea.scrolltop; const caretpos = textarea.selectionstart; const front = (textarea.value).substring(0, caretpos); const back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not t...
Getting started with HTML - Learn web development
ydown = function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { var scrollpos = textarea.scrolltop; var caretpos = textarea.selectionstart; var front = (textarea.value).substring(0, caretpos); var back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not t...
...ydown = function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { var scrollpos = textarea.scrolltop; var caretpos = textarea.selectionstart; var front = (textarea.value).substring(0, caretpos); var back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not t...
...ydown = function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { var scrollpos = textarea.scrolltop; var caretpos = textarea.selectionstart; var front = (textarea.value).substring(0, caretpos); var back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not t...
A first splash into JavaScript - Learn web development
guesssubmit.disabled = true; resetbutton = document.createelement('button'); resetbutton.textcontent = 'start new game'; document.body.append(resetbutton); resetbutton.addeventlistener('click', resetgame); } function resetgame() { guesscount = 1; const resetparas = document.queryselectorall('.resultparas p'); for(let i = 0 ; i < resetparas.length ; i++) { resetparas[i].textcontent = ''; } resetbutton.parentnode.removechild(resetbutton); guessfield.disabled = false; guesssubmit.disabled = false; guessfield.value = ''; guessfield.focus(); lastresult.style.backgroundcolor = 'white'; randomnumber = math.floor(math.random() * 100) + 1; } </script> </body> </html> have a go at pl...
...ttom of our existing html.
... every value of i, until i reaches a value of 21 (as discussed above).
Creating Sandboxed HTTP Connections
ener(callbackfunc); gchannel.notificationcallbacks = listener; gchannel.asyncopen(listener, null); function streamlistener(acallbackfunc) { this.mcallbackfunc = acallbackfunc; } streamlistener.prototype = { mdata: "", // nsistreamlistener onstartrequest: function (arequest, acontext) { this.mdata = ""; }, ondataavailable: function (arequest, acontext, astream, asourceoffset, alength) { var scriptableinputstream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interfaces.nsiscriptableinputstream); scriptableinputstream.init(astream); this.mdata += scriptableinputstream.read(alength); }, onstoprequest: function (arequest, acontext, astatus) { if (components.issuccesscode(astatus)) { // request was...
...r httpchannel = channel.queryinterface(components.interfaces.nsihttpchannel); httpchannel.referrer = referreruri; creating http posts to create an http post, a few additional steps are required after the nsichannel is created.
... first argument is the post data as a string, while the second argument is the length of that data.
Eclipse CDT
account of some changes that you yourself made) select "index > freshen all files" on that directory.
... the source file and line where the problem occurred.
...roblem occurred.
NSS Sample Code sample6
/* slot = pk11_getbestslot(ciphermech, null); didn't work.
... since we're using aes in this example, we're specifying * one of the valid keysizes (16, 24, 32) */ key = pk11_tokenkeygen(slot, ciphermech, 0, 32 /*keysize*/, &keyiditem, pr_true, 0); if (key == null) { fprintf(stderr, "pk11_tokenkeygen failed (err %d)\n", pr_geterror()); pk11_freeslot(slot); return; } fprintf(stderr, "key length of generated key is %d\n", pk11_getkeylength(key)); fprintf(stderr, "mechanism of key is %d (asked for %d)\n", pk11_getmechanism(key), ciphermech); pk11_freesymkey(key); key = pk11_findfixedkey(slot, ciphermech, &keyiditem, 0); if (key == null) { fprintf(stderr, "pk11_findfixedkey failed (err %d)\n", pr_geterror()); pk11_freeslot(slot); ret...
...intf(stderr, "mechanism of key is %d (asked for %d)\n", pk11_getmechanism(key), ciphermech); pk11_freesymkey(key); key = pk11_findfixedkey(slot, ciphermech, &keyiditem, 0); if (key == null) { fprintf(stderr, "pk11_findfixedkey failed (err %d)\n", pr_geterror()); pk11_freeslot(slot); return; } fprintf(stderr, "found key!\n"); fprintf(stderr, "key length of generated key is %d\n", pk11_getkeylength(key)); fprintf(stderr, "mechanism of key is %d (asked for %d)\n", pk11_getmechanism(key), ciphermech); pk11_freesymkey(key); pk11_freeslot(slot); } char *passwdcb(pk11slotinfo *info, prbool retry, void *arg) { if (!retry) return pl_strdup("test"); else return null; } ...
64-bit Compatibility
this article focuses on hacking tracemonkey code generation (jstracer.cpp, jsregex.cpp) in ways that will work on both 32-bit and 64-bit jit backends.
...ing tracemonkey code generation (jstracer.cpp, jsregex.cpp) in ways that will work on both 32-bit and 64-bit jit backends.
... i64 qursh i64, i32 i64 qcmov i32, i64, i64 i32 qior i64, i64 i64 qixor i64, i64 i64 qiaddp i64, i64 i64 qeq - quge i64, i64 i32 qcall n/a i64 extending or truncating native integers sometimes it is necessary to reduce a native integer to a 32-bit integer (for example, array or string lengths in tracemonkey) or extend a 32-bit integer to a native integer.
JS::AutoIdArray
s request.
... build, the caller must be in a request on this jscontext.
...of the owned array.
JS::CallArgs
3nd argument of jsnative) methods methods of js::callargs method description bool requireatleast(jscontext *cx, const char *fnname, unsigned required) returns true if there are at least required arguments passed in.
... access to the callee, this, the function call's arguments, and eventual return value for a function call.
... no arguments or a non-numeric arg0.
JSString
a jsstring represents a primitive javascript string in the jsapi.
... a jsstring represents a primitive javascript string in the jsapi.
... a jsstring represents a primitive javascript string in the jsapi.
JS_AliasElement
compatibility with existing applications.
...ement is currently out of scope, already exists, or the alias itself cannot be assigned to the element, js_aliaselement does not report an error, but returns js_false.
... element, js_aliaselement does not report an error, but returns js_false.
JS_BufferIsCompilableUnit
determine whether a buffer is compilable unit.
... *utf8, size_t length); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_EnumerateDiagnosticMemoryRegions
enumerate memory regions that contain diagnostic information..
...enumeratediagnosticmemorycallback callback); name type description callback jsenumeratediagnosticmemorycallback pointer to the new callback function to use.
...emorycallback callback); name type description callback jsenumeratediagnosticmemorycallback pointer to the new callback function to use.
JS_GetStringBytes
opped from each jschar.
...ection mechanism.
...he array.
JS_NewExternalString
create a new jsstring whose characters are stored in external memory.
... create a new jsstring whose characters are stored in external memory.
...character data before js_newexternalstring is called, and the array must remain in memory, with its contents unchanged, for as long as the javascript engine needs to hold on to it.
SpiderMonkey 1.8.5
js_addstringroot, js_removestringroot, etc.) that are easier to use correctly.
...js_forget_string_flatness js_fileescapedstring js_finishjsonparse (removed in future releases, replaced with js_parsejson) js_flatstringequalsascii js_flattenstring js_flushcaches js_freezeobject js_getcompartmentprivate js_getemptystring js_getflatstringchars js_getgcparameter js_getgcparameterforthread js_getglobalforscopechain js_getinternedstringchars js_getinternedstringcharsandlength js_getownpropertydescriptor js_getpropertyattrsgetterandsetterbyid js_getpropertybyid js_getpropertybyiddefault js_getpropertydefault js_getpropertydescriptorbyid js_getruntimesecuritycallbacks js_getsecuritycallbacks js_getstringcharsandlength js_getstringcharsz js_getstringcharszandlength js_getstringencodinglength js_haspropertybyid js_initctypesclass js_internjsstring js_iscon...
...text pointer, to figure out how the function was called.
Observer Notifications
le service, provided by the nsiidleservice interface.
...topics listed above, the idle service monitors user activity in general, whether related to the mozilla application or not (acting somewhat like the user activity/inactivity events a screen saver would be interested in).
...ot (acting somewhat like the user activity/inactivity events a screen saver would be interested in).
BeginReading
« xpcom api reference summary the beginreading function returns a const pointer to the first element of the string's internal buffer.
... « xpcom api reference summary the beginreading function returns a const pointer to the first element of the string's internal buffer.
...he result of the length method.
Cut
« xpcom api reference summary the cut function removes a section of the string's internal buffer.
... « xpcom api reference summary the cut function removes a section of the string's internal buffer.
... « xpcom api reference summary the cut function removes a section of the string's internal buffer.
BeginReading
« xpcom api reference summary the beginreading function returns a const pointer to the first element of the string's internal buffer.
... « xpcom api reference summary the beginreading function returns a const pointer to the first element of the string's internal buffer.
...he length method.
Cut
« xpcom api reference summary the cut function removes a section of the string's internal buffer.
... « xpcom api reference summary the cut function removes a section of the string's internal buffer.
... « xpcom api reference summary the cut function removes a section of the string's internal buffer.
nsIAccessibleTable
rowindexat( in long cellindex ); parameters cellindex the cell index.
...size, [retval, array, size_is(cellsarraysize)] out long cellsarray ); parameters cellsarraysize length of array.
...mnsarraysize, [retval, array, size_is(columnsarraysize)] out long columnsarray ); parameters columnsarraysize length of array.
nsIArray
xpcom/ds/nsiarray.idlscriptable this interface implements an array object.
...ray!
...a valid result for this method, but exceptions are thrown in other circumstances.
nsICryptoHash
56".
...vious example, we convert the binary result to a hex string.
...se other encodings.
nsIHapticFeedback
.getservice(components.interfaces.nsihapticfeedback); once you have the service, you can initiate haptic feedback (that is, cause the device to vibrate, if it's supported) by calling performsimpleaction(): hapticfeedback.performsimpleaction(components.interfaces.nsihapticfeedback.longpress); method overview void performsimpleaction(in long islongpress); constants press length constants constant value description shortpress 0 specify as the action type to perform a short vibration.
...constants press length constants constant value description shortpress 0 specify as the action type to perform a short vibration.
...on shortpress 0 specify as the action type to perform a short vibration.
nsIMsgDBHdr
c addresses.
...he length of the returned collation key.
...returned collation key.
nsIMsgSearchTerm
o set junk score?
...unk score?
... * @param ascopeterm scope of search * @param aoffset offset of message in message store.
nsITreeBoxObject
ase add a summary to this article.
... readonly: get the pixel position of the horizontal scrollbar.
... selectionregion nsiscriptableregion readonly: return the region for the visible parts of the selection, in device pixels.
NS_CStringAppendData
« xpcom api reference summary the ns_cstringappenddata function appends data to the existing value of a nsacstring instance.
...he ns_cstringappenddata function appends data to the existing value of a nsacstring instance.
...nddata function appends data to the existing value of a nsacstring instance.
NS_CStringInsertData
« xpcom api reference summary the ns_cstringinsertdata function appends data to the existing value of a nsacstring instance.
...nsstringapi.h" nsresult ns_cstringinsertdata( nsacstring& astring, pruint32 aoffset, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified.
... nsresult ns_cstringinsertdata( nsacstring& astring, pruint32 aoffset, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified.
NS_CStringSetData
« xpcom api reference summary the ns_cstringsetdata function copies data into the string's internal buffer.
...pi reference summary the ns_cstringsetdata function copies data into the string's internal buffer.
...mmary the ns_cstringsetdata function copies data into the string's internal buffer.
NS_StringAppendData
« xpcom api reference summary the ns_stringappenddata function appends data to the existing value of a nsastring instance.
...ngappenddata function appends data to the existing value of a nsastring instance.
...tion appends data to the existing value of a nsastring instance.
NS_StringInsertData
« xpcom api reference summary the ns_stringinsertdata function appends data to the existing value of a nsacstring instance.
....h" nsresult ns_stringinsertdata( nsacstring& astring, pruint32 aoffset, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified.
...s_stringinsertdata( nsacstring& astring, pruint32 aoffset, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified.
NS_StringSetData
« xpcom api reference summary the ns_stringsetdata function copies data into the string's internal buffer.
...reference summary the ns_stringsetdata function copies data into the string's internal buffer.
...y the ns_stringsetdata function copies data into the string's internal buffer.
Using js-ctypes
hout the extension.
... ctypes.int16_t); /* item hit */ var hit = 0; var msgerr = makestr("carbon says..."); var msgexp = makestr("we just called the standardalert carbon function from javascript!"); var err = stdalert(1, msgerr, msgexp, 0, hit); carbon.close(); the makestr() function is a utility routine that takes as input a standard javascript string and returns a carbon-style "pascal" string, which is a length byte followed by the characters of the string itself.
...fstringcreatewithcharacters = libcf.declare('cfstringcreatewithcharacters', ctypes.default_abi, cfstringref, // return cfallocatorref, // alloc unichar.ptr, // *chars cfindex // numchars ); // helper functions function makecfstr(jsstr) { // js str is just a string // returns a cfstr that must be released with cfrelease when done return cfstringcreatewithcharacters(null, jsstr, jsstr.length); } // main var mycfstrs = { head: makecfstr('core foundation says...'), body: makecfstr('we just called the equivalent of the "standardalert carbon function" for 64bit osx from javascript!') }; var rez = cfusernotificationdisplaynotice(0, kcfusernotificationcautionalertlevel, null, null, null, mycfstrs.head, mycfstrs.body, null); console.info('rez:', rez, rez.tostring(), uneval(rez)); // cfu...
Initialization and Destruction - Plugins
e save parameter specifies state or other information to save for reuse by a new instance with the same url.
...l.
...or leak memory when the saved data is discarded, the buf field should be a flat structure (a simple structure with no allocated substructures) allocated with npn_memalloc, as in this example: char* mydata = "here is some saved data.\n"; int32 mylength = strlen(mydata) + 1; *save = (npsaveddata*) npn_memalloc(sizeof(npsaveddata)); (*save)->len = mylength; (*save)->buf = (void*) npn_memalloc(mylength); strcpy((*save)->buf, mydata); if you allocate saved instance data in npp_destroy, be sure to allocate memory with this function, since the browser can delete the saved data with the equivalent of npn_memalloc at any time.
AesCtrParams - Web APIs
sed from one message to the next, while the counter should ensure that counter blocks are not reused within a single message.
...hin a single message.
... name a domstring.
AesGcmParams - Web APIs
ta that will not be encrypted but will be authenticated along with the encrypted data.
...all to decrypt(): if the data given to the decrypt() call does not match the original data, the decryption will throw an exception.
...and used for authentication in the corresponding decryption.
AnalyserNode.fftSize - Web APIs
collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
...t of the current audio input.
...ope 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 x = 0; for(var i = 0; i < bufferlength; i++) { var v = dataarray[i] / 128.0; var y = v * height/2; if(i === 0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height/2); canvasctx.stroke(); }; draw(); specificat...
AnalyserNode - Web APIs
collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
...ut of the current audio input.
...); // draw an oscilloscope of the current audio source function draw() { requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray); canvasctx.fillstyle = "rgb(200, 200, 200)"; canvasctx.fillrect(0, 0, canvas.width, canvas.height); canvasctx.linewidth = 2; canvasctx.strokestyle = "rgb(0, 0, 0)"; canvasctx.beginpath(); var slicewidth = canvas.width * 1.0 / bufferlength; var x = 0; for (var i = 0; i < bufferlength; i++) { var v = dataarray[i] / 128.0; var y = v * canvas.height / 2; if (i === 0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height / 2); canvasctx.stroke(); } draw(); specifications specification status comme...
AudioBuffer - Web APIs
s floating point buffer, with each samples between -1.0 and 1.0.
... and 1.0.
...yarraybuffer = audioctx.createbuffer(2, audioctx.samplerate * 3, audioctx.samplerate); // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < myarraybuffer.numberofchannels; channel++) { // this gives us the actual array that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < myarraybuffer.length; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } // get an audiobuffersourcenode.
AudioWorkletProcessor.process - Web APIs
uts, outputs, parameters); parameters inputs an array of inputs connected to the node, each item of which is, in turn, an array of channels.
...rocessor that outputs white noise to its first output.
...value for each sample // math.random range is [0; 1); we need [-1; 1] // this won't include exact 1 but is fine for now for simplicity channel[i] = (math.random() * 2 - 1) * // the array can contain 1 or 128 values // depending on if the automation is present // and if the automation rate is k-rate or a-rate (parameters['customgain'].length > 1 ?
BaseAudioContext.createAnalyser() - Web APIs
collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
...ut of the current audio input.
...ope 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 x = 0; for(var i = 0; i < bufferlength; i++) { var v = dataarray[i] / 128.0; var y = v * height/2; if(i === 0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height/2); canvasctx.stroke(); }; draw(); specificat...
CSSNumericValue.type - Web APIs
the type() method of the cssnumericvalue interface returns the type of cssnumericvalue, one of angle, flex, frequency, length, resolution, percent, percenthint, or time.
...e interface returns the type of cssnumericvalue, one of angle, flex, frequency, length, resolution, percent, percenthint, or time.
...ype of cssnumericvalue, one of angle, flex, frequency, length, resolution, percent, percenthint, or time.
CanvasRenderingContext2D.filter - Web APIs
property and accepts the same values.
... contrast of the drawing.
...of 100% leaves the drawing unchanged.
DOMTokenList.item() - Web APIs
Web › API › DOMTokenList › item
the item() method of the domtokenlist interface returns an item in the list by its index.
...ing representing the index of the item you want to return.
... we retrieve the list of classes set on a <span> element as a domtokenlist using element.classlist.
DataTransferItemList.remove() - Web APIs
the datatransferitemlist.remove() method removes the datatransferitem at the specified index from the list.
...atalist.add(ev.target.id, "text/plain"); // add some other items to the drag payload datalist.add("<p>...
...m is uri data[i].getasstring(function (s){ console.log("...
Document.getElementsByTagNameNS() - Web APIs
tsbytagnamens method is used.
...function getallparaelems() { var allparas = document.getelementsbytagnamens("http://www.w3.org/1999/xhtml", "p"); var num = allparas.length; alert("there are " + num + " &lt;p&gt; elements in this document"); } function div1paraelems() { var div1 = document.getelementbyid("div1") var div1paras = div1.getelementsbytagnamens("http://www.w3.org/1999/xhtml", "p"); var num = div1paras.length; alert("there are " + num + " &lt;p&gt; elements in div1 element"); } function div2paraelems() { var div2 = document.getelementbyid("div2") var div2paras = div2.getelementsbytagnamens("http://www.w3.org/1999/xhtml", "p"); var num = div2paras.length; alert("there are " + num + " &lt;p&gt; elements in div2 element"); } </script> </head> <body style="border: solid green 3px"> <p>som...
...ferent api), such as this wrapper class.) function getelementsbytagnamenswrapper (ns, elname, doc, context) { if (!doc) { doc = document; } if (!context) { context = doc; } var result = doc.evaluate('//*[local-name()="'+elname+'" and namespace-uri() = "'+ns+'"]', context, null, xpathresult.ordered_node_snapshot_type, null); var a = []; for(var i = 0; i < result.snapshotlength; i++) { a[i] = result.snapshotitem(i); } return a; } specifications specification status comment domthe definition of 'document.getelementsbytagnamens' in that specification.
Document.querySelectorAll() - Web APIs
eturn a list of the list items contained within a list whose id is userlist which have a data-active attribute whose value is 1: var container = document.queryselector("#userlist"); var matches = container.queryselectorall("li[data-active='1']"); accessing the matches once the nodelist of matching elements is returned, you can examine it just like any array.
...ueryselectorall() behaves differently than most common javascript dom libraries, which might lead to unexpected results.
...ase element on which the search is performed (.select).
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
of the node.) * * @param txt the text node whose data should be returned * @return a string giving the contents of the text node with * whitespace collapsed.
...the text node whose data should be returned * @return a string giving the contents of the text node with * whitespace collapsed.
... a string giving the contents of the text node with * whitespace collapsed.
Document Object Model (DOM) - Web APIs
ment svgtextpathelement svgtextpositioningelement svgtitleelement svgtrefelement svgtspanelement svguseelement svgunknownelement svgviewelement svgvkernelement svg data type interfaces here are the dom apis for data types used in the definitions of svg properties and attributes.
...xtpathelement svgtextpositioningelement svgtitleelement svgtrefelement svgtspanelement svguseelement svgunknownelement svgviewelement svgvkernelement svg data type interfaces here are the dom apis for data types used in the definitions of svg properties and attributes.
...icalrel svgpathsegcurvetocubicsmoothabs svgpathsegcurvetocubicsmoothrel svgpathsegcurvetoquadraticsmoothabs svgpathsegcurvetoquadraticsmoothrel svgpathseglist svgpoint svgpointlist svgpreserveaspectratio svgrect svgstringlist svgtransform svgtransformlist animated type svganimatedangle svganimatedboolean svganimatedenumeration svganimatedinteger svganimatedlength svganimatedlengthlist svganimatednumber svganimatednumberlist svganimatedpathdata svganimatedpoints svganimatedpreserveaspectratio svganimatedrect svganimatedstring svganimatedtransformlist smil-related interfaces elementtimecontrol timeevent other svg interfaces getsvgdocument shadowanimation svgcolorprofilerule svgcssrule svgdocument svgexception svgexterna...
Element.querySelectorAll() - Web APIs
a list of the list items contained within a list whose id is "userlist" which have a "data-active" attribute whose value is "1": var container = document.queryselector("#userlist"); var matches = container.queryselectorall("li[data-active='1']"); accessing the matches once the nodelist of matching elements is returned, you can examine it just like any array.
...ueryselectorall() behaves differently than most common javascript dom libraries, which might lead to unexpected results.
...e element on which the search is performed (".select").
HTMLAnchorElement.rel - Web APIs
the htmlanchorelement.rel property reflects the rel attribute.
... the htmlanchorelement.rel property reflects the rel attribute.
...mlanchorelement.rel property reflects the rel attribute.
HTMLAreaElement.rel - Web APIs
the htmlareaelement.rel property reflects the rel attribute.
... the htmlareaelement.rel property reflects the rel attribute.
...e htmlareaelement.rel property reflects the rel attribute.
HTMLFormElement - Web APIs
nospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlformelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, htmlelement.
...er to the individual element.
...info</button> <button type="button" onclick="setforminfo(this.form);">set</button> <button type="reset">reset</button> </p> <textarea id="form-info" rows="15" cols="20"></textarea> </form> <script> function getforminfo(){ // get a reference to the form via its name var f = document.forms["forma"]; // the form properties we're interested in var properties = [ 'elements', 'length', 'name', 'charset', 'action', 'acceptcharset', 'action', 'enctype', 'method', 'target' ]; // iterate over the properties, turning them into a string that we can display to the user var info = properties.map(function(property) { return property + ": " + f[property] }).join("\n"); // set the form's <textarea> to display the form's properties document.forms["forma"].elements['form-...
HTMLInputElement.mozSetFileNameArray() - Web APIs
the htmlinputelement.mozsetfilenamearray() method sets the names of the files that selected on an html input element.
... the htmlinputelement.mozsetfilenamearray() method sets the names of the files that selected on an html input element.
...not available in other browsers.
HTMLLinkElement.rel - Web APIs
ource represented by the <link> element and the current document.
...ed by the <link> element and the current document.
... the current document.
HTMLMedia​Element​.textTracks - Web APIs
nd="metadata" src="keystage2.vtt" srclang="en" label="key stage 2"> <track kind="metadata" src="keystage3.vtt" srclang="en" label="key stage 3"> </video> the htmlmediaelement.texttracks returns a texttrackslist thru which we can iterate.
..." srclang="en" label="key stage 2"> <track kind="metadata" src="keystage3.vtt" srclang="en" label="key stage 3"> </video> the htmlmediaelement.texttracks returns a texttrackslist thru which we can iterate.
...htmlmediaelement.texttracks returns a texttrackslist thru which we can iterate.
Using microtasks in JavaScript with queueMicrotask() - Web APIs
rom various sources into a single batch, avoiding the possible overhead involved with multiple calls to handle the same kind of work.
...the same kind of work.
...s get interesting.
ImageData() - Web APIs
e specified width and height will be created.
...bject that is 200 pixels wide and 100 pixels tall, containing a total of 20,000 pixels.
...th of 40000: it consists of 10,000 pixels, each of which is defined by 4 values.
Capabilities, constraints, and settings - Web APIs
artvideo() method handles setting up and starting the video stream.
...unction startvideo() { buildconstraints(); navigator.mediadevices.getusermedia({ video: videoconstraints, audio: audioconstraints }).then(function(stream) { let audiotracks = stream.getaudiotracks(); let videotracks = stream.getvideotracks(); videoelement.srcobject = stream; if (audiotracks.length) { audiotrack = audiotracks[0]; } if (videotracks.length) { videotrack = videotracks[0]; } }).then(function() { return new promise(function(resolve) { videoelement.onloadedmetadata = resolve; }); }).then(function() { getcurrentsettings(); }).catch(handleerror); } there are several steps here: it calls buildconstraints() to create the mediatrackconstraints objects for the two tracks from the code in the edit boxe...
...dds simple support for tabs to the <textarea> elements by making the tab key insert two space characters when either constraint edit box is focused.
NotifyAudioAvailableEvent - Web APIs
ull.
... the raw 32-bit floating-point audio data obtained from decoding the audio (e.g., the raw data being sent to the audio hardware vs.
...audio data obtained from decoding the audio (e.g., the raw data being sent to the audio hardware vs.
PannerNode.refDistance - Web APIs
at is outside the accepted range.
...e, resulting in a decrease in volume (decay) const scheduletesttone = (refdistance, starttime) => { const osc = new oscillatornode(context); const panner = new pannernode(context); panner.refdistance = refdistance; // 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 st...
...rt(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 comment web audio apithe definition of 'refdistance' in that specification.
PannerNode.rolloffFactor - Web APIs
al" the range is 0 to infinity.
...ulting in a decrease in volume (decay) const scheduletesttone = (rollofffactor, starttime) => { const osc = new oscillatornode(context); const panner = new pannernode(context); panner.rollofffactor = 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.curren...
...nect(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 definition of 'rollofffactor' in that specification.
RTCPeerConnection.getConfiguration() - Web APIs
; parameters this method takes no input parameters.
...ction's current configuration.
... 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.
ResizeObserverEntry.borderBoxSize - Web APIs
der box size of the observed element when the callback is run.
...upport elements that have multiple fragments, which occur in multi-column scenarios.
...ting-mode, this is the horizontal dimension, or width; if the writing-mode is vertical, this is the vertical dimension, or height.
SVGTransformList - Web APIs
long index) svgtransform replaceitem(in svgtransform newitem, in unsigned long index) svgtransform removeitem(in unsigned long index) svgtransform appenditem(in svgtransform newitem) svgtransform createsvgtransformfrommatrix(in svgmatrix) svgtransform consolidate() properties readonly unsigned long numberofitems readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type description numberofitems unsigned long the number of items in the list.
...createsvgtransformfrommatrix(in svgmatrix) svgtransform consolidate() properties readonly unsigned long numberofitems readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type description numberofitems unsigned long the number of items in the list.
... yeschrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yeslength non-standardchrome full support yesedge full support ≤79firefox full support 9ie ?
SubtleCrypto.deriveKey() - Web APIs
f the following exceptions are encountered: invalidaccesserror raised when the master key is not a key for the requested derivation algorithm or if the cryptokey.usages value of that key doesn't contain derivekey.
...en use derivekey() to derive a shared aes key, that they could use to encrypt messages.
...ortkey( "raw", enc.encode(password), "pbkdf2", false, ["derivebits", "derivekey"] ); } async function encrypt(plaintext, salt, iv) { let keymaterial = await getkeymaterial(); let key = await window.crypto.subtle.derivekey( { "name": "pbkdf2", salt: salt, "iterations": 100000, "hash": "sha-256" }, keymaterial, { "name": "aes-gcm", "length": 256}, true, [ "encrypt", "decrypt" ] ); return window.crypto.subtle.encrypt( { name: "aes-gcm", iv: iv }, key, plaintext ); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.derivekey()' in that specification.
SubtleCrypto.exportKey() - Web APIs
ndow.crypto.subtle.exportkey( "raw", key ); const exportedkeybuffer = new uint8array(exported); const exportkeyoutput = document.queryselector(".exported-key"); exportkeyoutput.textcontent = `[${exportedkeybuffer}]`; } /* generate an encrypt/decrypt secret key, then set up an event listener on the "export" button.
...dasbase64}\n-----end private key-----`; const exportkeyoutput = document.queryselector(".exported-key"); exportkeyoutput.textcontent = pemexported; } /* generate a sign/verify key pair, then set up an event listener on the "export" button.
...se64}\n-----end public key-----`; const exportkeyoutput = document.queryselector(".exported-key"); exportkeyoutput.textcontent = pemexported; } /* generate an encrypt/decrypt key pair, then set up an event listener on the "export" button.
Using Touch Events - Web APIs
's target element as well as the x and y coordinates of the touch point's position relative to the viewport, page, and screen.
...ouchmove, false); someelement.addeventlistener('touchcancel', process_touchcancel, false); someelement.addeventlistener('touchend', process_touchend, false); process an event in an event handler, implementing the application's gesture semantics.
...wo_touches(ev); break; case 3: handle_three_touches(ev); break; default: gesture_not_supported(ev); break; } } access the attributes of a touch point.
USBDevice.isochronousTransferIn() - Web APIs
the isochronoustransferin() method of the usbdevice interface returns a promise that resolves with a usbisochronousintransferresult when time sensitive information has been transmitted received from the usb device.
... the isochronoustransferin() method of the usbdevice interface returns a promise that resolves with a usbisochronousintransferresult when time sensitive information has been transmitted received from the usb device.
...oustransferin() method of the usbdevice interface returns a promise that resolves with a usbisochronousintransferresult when time sensitive information has been transmitted received from the usb device.
USBDevice.isochronousTransferOut() - Web APIs
the isochronoustransferout() method of the usbdevice interface returns a promise that resolves with a usbisochronousouttransferresult when time sensitive information has been transmitted to the usb device.
... interface returns a promise that resolves with a usbisochronousouttransferresult when time sensitive information has been transmitted to the usb device.
...promise that resolves with a usbisochronousouttransferresult when time sensitive information has been transmitted to the usb device.
ValidityState.patternMismatch - Web APIs
es are too long or too short, or contain characters that aren't digits, patternmismatch will be true.
...tain characters that aren't digits, patternmismatch will be true.
...s that aren't digits, patternmismatch will be true.
WebGLRenderingContext.bufferData() - Web APIs
the webglrenderingcontext.bufferdata() method of the webgl api initializes and creates the buffer object's data store.
...ding data from webgl, and used many times as the source for webgl drawing and image specification commands.
...uffer information to check the current buffer usage and buffer size, use the webglrenderingcontext.getbufferparameter() method.
Geometry and reference spaces in WebXR - Web APIs
y and the use of matrices and vectors to manage 3d representations of a scene is well beyond the scope of what can be accomplished in this article.
...sentations of a scene is well beyond the scope of what can be accomplished in this article.
...eter space encompasses the entire universe for the purposes of your code.
Basic concepts behind Web Audio API - Web APIs
ous sound wave, such as a band playing live, is converted to a sequence of samples (a discrete-time signal) that allow a computer to handle the audio in distinct blocks.
... six for 5.1, etc.) the sample rate is the number of those samples (or frames, since all samples of a frame play at the same time) that will play in one second, measured in hz.
...frame play at the same time) that will play in one second, measured in hz.
Using the Web Storage API - Web APIs
erted to strings).
... // firefox e.code === 1014 || // test name field too, because code might not be present // everything except firefox e.name === 'quotaexceedederror' || // firefox e.name === 'ns_error_dom_quota_reached') && // acknowledge quotaexceedederror only if there's something already stored (storage && storage.length !== 0); } } and here is how you would use it: if (storageavailable('localstorage')) { // yippee!
...e(); } else { setstyles(); } the storage.getitem() method is used to get a data item from storage; in this case, we are testing to see whether the bgcolor item exists; if not, we run populatestorage() to add the existing customization values to the storage.
WindowOrWorkerGlobalScope.btoa() - Web APIs
1 byte console.log(btoa(ok)); // yq== console.log(btoa(notok)); // error if you need to encode unicode text as ascii using btoa(), one option is to convert the string such that each 16-bit unit occupies only one byte.
... console.log(btoa(notok)); // error if you need to encode unicode text as ascii using btoa(), one option is to convert the string such that each 16-bit unit occupies only one byte.
...fer)); } // a string that contains characters occupying > 1 byte const mystring = "☸☹☺☻☼☾☿"; const converted = tobinary(mystring); const encoded = btoa(converted); console.log(encoded); // ocy5jjomoyy8jj4mpyy= if you do this, of course you'll have to reverse the conversion on the decoded string: function frombinary(binary) { const bytes = new uint8array(binary.length); for (let i = 0; i < bytes.length; i++) { bytes[i] = binary.charcodeat(i); } return string.fromcharcode(...new uint16array(bytes.buffer)); } const decoded = atob(encoded); const original = frombinary(decoded); console.log(original); // ☸☹☺☻☼☾☿ polyfill you can use a polifill from https://github.com/maxart2501/base64-js/blob/master/base64.js for browsers...
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
was called.
... { vcallback.apply(othis, aargs); } : vcallback, ndelay); }; note: these two replacements will also enable the html5 standard passage of arbitrary arguments to the callback functions of timers in ie.
...ethod, 2.5*1000, 2); // prints "two" after 2.5 seconds note: javascript 1.8.5 introduced the function.prototype.bind() method to set the value of this for all calls to a given function.
Web APIs
Web › API
batterymanager beforeinstallpromptevent beforeunloadevent biquadfilternode blob blobbuilder blobevent bluetooth bluetoothadvertisingdata bluetoothcharacteristicproperties bluetoothdevice bluetoothremotegattcharacteristic bluetoothremotegattdescriptor bluetoothremotegattserver bluetoothremotegattservice body broadcastchannel budgetservice budgetstate buffersource bytelengthqueuingstrategy bytestring c cdatasection css cssconditionrule csscounterstylerule cssgroupingrule cssimagevalue csskeyframerule csskeyframesrule csskeywordvalue cssmathproduct cssmathsum cssmathvalue cssmediarule cssnamespacerule cssnumericvalue cssomstring csspagerule csspositionvalue cssprimitivevalue csspseudoelement cssrule cssrulelist cssstyledeclaration cssstylerule...
...ion resizeobserver resizeobserverentry response rsahashedimportparams rsahashedkeygenparams rsaoaepparams rsapssparams s svgaelement svgaltglyphdefelement svgaltglyphelement svgaltglyphitemelement svgangle svganimatecolorelement svganimateelement svganimatemotionelement svganimatetransformelement svganimatedangle svganimatedboolean svganimatedenumeration svganimatedinteger svganimatedlength svganimatedlengthlist svganimatednumber svganimatednumberlist svganimatedpoints svganimatedpreserveaspectratio svganimatedrect svganimatedstring svganimatedtransformlist svganimationelement svgcircleelement svgclippathelement svgcolorprofileelement svgcomponenttransferfunctionelement svgcursorelement svgdefselement svgdescelement svgelement svgellipseelement svgevent svgexternalresourcesrequire...
...vgfetileelement svgfeturbulenceelement svgfilterelement svgfilterprimitivestandardattributes svgfontelement svgfontfaceelement svgfontfaceformatelement svgfontfacenameelement svgfontfacesrcelement svgfontfaceurielement svgforeignobjectelement svggelement svggeometryelement svgglyphelement svgglyphrefelement svggradientelement svggraphicselement svghkernelement svgimageelement svglength svglengthlist svglineelement svglineargradientelement svgmpathelement svgmaskelement svgmatrix svgmeshelement svgmetadataelement svgmissingglyphelement svgnumber svgnumberlist svgpathelement svgpatternelement svgpoint svgpolygonelement svgpolylineelement svgpreserveaspectratio svgradialgradientelement svgrect svgrectelement svgrenderingintent svgsvgelement svgscriptelement svgsetelement s...
Web Accessibility: Understanding Colors and Luminance - Accessibility
tive of luminance, a transition to or from a saturated red is also considered a risk" saturation is sometimes described as the "purity" or "intensity" of a color, and although these are good definitions for "pigments" in an artist's paint set, they are not quite accurate as definitions for color from a computer screen.
...red.
...with wavelengths longer than 600nm; the article makes the special note that "carmine" is close to the extreme spectrum.
-moz-outline-radius - CSS: Cascading Style Sheets
et; constituent properties this property is a shorthand for the following css properties: -moz-outline-radius-bottomleft -moz-outline-radius-bottomright -moz-outline-radius-topleft -moz-outline-radius-topright syntax values elliptical outlines and <percentage> values follow the syntax described in border-radius.
...ent properties this property is a shorthand for the following css properties: -moz-outline-radius-bottomleft -moz-outline-radius-bottomright -moz-outline-radius-topleft -moz-outline-radius-topright syntax values elliptical outlines and <percentage> values follow the syntax described in border-radius.
...z-outline-radius-bottomleft: refer to the corresponding dimension of the border boxcomputed valueas each of the properties of the shorthand:-moz-outline-radius-topleft: as specified-moz-outline-radius-topright: as specified-moz-outline-radius-bottomright: as specified-moz-outline-radius-bottomleft: as specifiedanimation typeas each of the properties of the shorthand:-moz-outline-radius-topleft: a length, percentage or calc();-moz-outline-radius-topright: a length, percentage or calc();-moz-outline-radius-bottomright: a length, percentage or calc();-moz-outline-radius-bottomleft: a length, percentage or calc(); formal syntax <outline-radius>{1,4} [ / <outline-radius>{1,4} ]?where <outline-radius> = <length> | <percentage> examples rounding an outline note: this example will not display the d...
-webkit-mask-box-image - CSS: Cascading Style Sheets
-webkit-mask-box-image sets the mask image for an element's border box.
...epeat>] where: <mask-box-image> <uri> | <gradient> | none <top> <right> <bottom> <left> <length> | <percentage> <x-repeat> <y-repeat> repeat | stretch | round | space values <uri> the location of the image resource to be used as a mask image.
...ient> | none <top> <right> <bottom> <left> <length> | <percentage> <x-repeat> <y-repeat> repeat | stretch | round | space values <uri> the location of the image resource to be used as a mask image.
-webkit-text-stroke-width - CSS: Cascading Style Sheets
the -webkit-text-stroke-width css property specifies the width of the stroke for text.
...webkit-text-stroke-width: 2px; -webkit-text-stroke-width: 0.1em; -webkit-text-stroke-width: 1mm; -webkit-text-stroke-width: 5pt; /* global values */ -webkit-text-stroke-width: inherit; -webkit-text-stroke-width: initial; -webkit-text-stroke-width: unset; values <line-width> the width of the stroke.
...oke-width: 0.1em; -webkit-text-stroke-width: 1mm; -webkit-text-stroke-width: 5pt; /* global values */ -webkit-text-stroke-width: inherit; -webkit-text-stroke-width: initial; -webkit-text-stroke-width: unset; values <line-width> the width of the stroke.
-webkit-text-stroke - CSS: Cascading Style Sheets
d color values */ -webkit-text-stroke: 4px navy; text-stroke: 4px navy; /* global values */ -webkit-text-stroke: inherit; -webkit-text-stroke: initial; -webkit-text-stroke: unset; text-stroke: inherit; text-stroke: initial; text-stroke: unset; constituent properties this property is a shorthand for the following css properties: -webkit-stroke-color -webkit-stroke-width syntax values <length> the width of the stroke.
...it-stroke-color -webkit-stroke-width syntax values <length> the width of the stroke.
...he 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> ]?
bleed - CSS: Cascading Style Sheets
Web › CSS › @page › bleed
the bleed css at-rule descriptor, used with the @page at-rule, specifies the extent of the page bleed area outside the page box.
... the bleed css at-rule descriptor, used with the @page at-rule, specifies the extent of the page bleed area outside the page box.
...d: 8pt; bleed: 1cm; values auto computes to 6pt if the value of marks is crop.
Cross-browser Flexbox mixins - CSS: Cascading Style Sheets
shrink the flex-shrink property sets the flex shrink factor.
... } flexbox basis the flex-basis property sets the flex basis.
... in the list and just return that.
Basic Concepts of grid layout - CSS: Cascading Style Sheets
</div> </div> .wrapper { display: grid; grid-template-columns: 200px 200px 200px; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } the fr unit tracks can be defined using any length unit.
...id-template-columns: 200px 200px 200px; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } the fr unit tracks can be defined using any length unit.
...v> * {box-sizing: border-box;} .wrapper { grid-column-gap: 10px; grid-row-gap: 1em; border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } any space used by gaps will be accounted for before space is assigned to the flexible length fr tracks, and gaps act for sizing purposes like a regular grid track, however you cannot place anything into a gap.
block-size - CSS: Cascading Style Sheets
size of an element's block, depending on its writing mode.
...if the writing mode is vertically oriented, the value of block-size relates to the width of the element; otherwise, it relates to the height of the element.
...ercentagesblock-size of containing blockcomputed valuesame as width and heightanimation typea length, percentage or calc(); syntax values the block-size property takes the same values as the width and height properties.
border-bottom - CSS: Cascading Style Sheets
dth.
...ments.
...roperties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-bottom-style: as specifiedborder-bottom-color: computed coloranimation typeas each of the 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-left - CSS: Cascading Style Sheets
rder-left-width.
...lies toall elements.
... each of the properties of the shorthand:border-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-left-style: as specifiedborder-left-color: computed coloranimation typeas each of 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
ght-width.
...all elements.
...f the properties of the shorthand:border-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-right-style: as specifiedborder-right-color: computed coloranimation typeas each of the 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
see border-top-width.
...olorapplies toall elements.
...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-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> ]?
clamp() - CSS: Cascading Style Sheets
Web › CSS › clamp
the clamp() css function clamps a value between an upper and lower bound.
...result is between the minimum and maximum values.
...sions, so you can use direct addition, subtraction, multiplication and division without using the calc() function itself.
column-rule - CSS: Cascading Style Sheets
ding values previously set using non-shorthand properties).
...details.
...n-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="co...
columns - CSS: Cascading Style Sheets
Web › CSS › columns
n width */ columns: 18em; /* column count */ columns: auto; columns: 2; /* both column width and count */ columns: 2 auto; columns: auto 12em; columns: auto auto; /* global values */ columns: inherit; columns: initial; columns: unset; the columns property may be specified as one or two of the values listed below, in any order.
...uto.
...see column-count.
conic-gradient() - CSS: Cascading Style Sheets
-gradient( hsl(360, 100%, 50%), hsl(315, 100%, 50%), hsl(270, 100%, 50%), hsl(225, 100%, 50%), hsl(180, 100%, 50%), hsl(135, 100%, 50%), hsl(90, 100%, 50%), hsl(45, 100%, 50%), hsl(0, 100%, 50%) ); values <angle> preceded by the from keyterm, and taking an angle as its value, defines the gradient rotation in clockwise direction.
...sition defines center of the gradient.
...if spun around the center of a circle, starting at the top and going clockwise.
<dimension> - CSS: Cascading Style Sheets
Web › CSS › dimension
the <dimension> css data type represents a <number> with a unit attached to it, for example 10px.
...inition of '<dimension>' in that specification.
...module level 3the definition of '<dimension>' in that specification.
flex - CSS: Cascading Style Sheets
Web › CSS › flex
ent size.
...e item's min-width or min-height.
...ow: 0flex-shrink: 1flex-basis: autoapplies toflex items, including in-flow pseudo-elementsinheritednocomputed valueas each of the properties of the shorthand:flex-grow: as specifiedflex-shrink: as specifiedflex-basis: as specified, but with relative lengths converted into absolute lengthsanimation typeas each of the properties of the shorthand:flex-grow: a numberflex-shrink: a numberflex-basis: a length, percentage or calc(); formal syntax none | [ <'flex-grow'> <'flex-shrink'>?
font - CSS: Cascading Style Sheets
Web › CSS › font
d:font-size: refer to the parent element's font sizeline-height: refer to the font size of the element itselfcomputed valueas each of the properties of the shorthand:font-style: as specifiedfont-variant: as specifiedfont-weight: the keyword or the numerical value as specified, with bolder and lighter transformed to the real valuefont-stretch: as specifiedfont-size: as specified, but with relative lengths converted into absolute lengthsline-height: for percentage and length values, the absolute length, otherwise as specifiedfont-family: as specifiedanimation typeas each of the properties of the shorthand:font-style: discretefont-variant: discretefont-weight: a font weightfont-stretch: a font stretchfont-size: a lengthline-height: either number or lengthfont-family: discrete formal syntax [ [ <'...
... getcheckedvalue("font_style") + " " + getcheckedvalue("font_variant") + " " + getcheckedvalue("font_weight") + " " + getcheckedvalue("font_size") + getcheckedvalue("line_height") + " " + getcheckedvalue("font_family"); return shorttext; } getcheckedvalue = function(radio_name) { oradio = document.forms[0].elements[radio_name]; for (var i = 0; i < oradio.length; i++) { if(oradio[i].checked) { var propinput = "input_" + radio_name, curelemname = "input_" + radio_name, curelem = document.getelementbyid(curelemname); curelem.value = oradio[i].value; return oradio[i].value; } } } setcss = function () { getproperties(); injectcss(shorttext); } injectcss = function(cssfragment) { old = document.body.get...
... var propinput = "input_" + radio_name, curelemname = "input_" + radio_name, curelem = document.getelementbyid(curelemname); curelem.value = oradio[i].value; return oradio[i].value; } } } setcss = function () { getproperties(); injectcss(shorttext); } injectcss = function(cssfragment) { old = document.body.getelementsbytagname("style"); if (old.length > 1) { old[1].parentelement.removechild(old[1]); } css = document.createelement("style"); css.innerhtml = ".fontshorthand{font: " + cssfragment + "}"; document.body.appendchild(css); } setcss(); specifications specification status comment css fonts module level 3the definition of 'font' in that specification.
min() - CSS: Cascading Style Sheets
Web › CSS › min
the min() css function lets you set the smallest (most negative) value from a list of comma-separated expressions as the value of a css property value.
...) value as providing the maximum value a property can have.
...sions, so you can use direct addition, subtraction, multiplication and division without using the calc() function itself.
padding-block - CSS: Cascading Style Sheets
the padding-block css shorthand property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation.
... the padding-block css shorthand property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation.
...ting-mode, direction, and text-orientation.
padding-inline - CSS: Cascading Style Sheets
the padding-inline css shorthand property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation.
... the padding-inline css shorthand property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation.
...ty takes the same values as the padding-left property.
radial-gradient() - CSS: Cascading Style Sheets
note: early implementations of this function included other keywords (cover and contain) as synonyms of the standard farthest-corner and closest-side, respectively.
...keywords (cover and contain) as synonyms of the standard farthest-corner and closest-side, respectively.
...ue 100% represents the intersection of the ending shape with the virtual gradient ray.
scroll-margin-block-end - CSS: Cascading Style Sheets
he transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets.
...in a github repository.
...gin-block-end: 10px; scroll-margin-block-end: 1em; /* global values */ scroll-margin-block-end: inherit; scroll-margin-block-end: initial; scroll-margin-block-end: unset; values <length> an outset from the block end edge of the scroll container.
scroll-margin-block-start - CSS: Cascading Style Sheets
e transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets.
... repository.
...art: 10px; scroll-margin-block-start: 1em; /* global values */ scroll-margin-block-start: inherit; scroll-margin-block-start: initial; scroll-margin-block-start: unset; values <length> an outset from the block start edge of the scroll container.
scroll-margin-block - CSS: Cascading Style Sheets
block dimension.
...ractive-examples and send us a pull request.
...is used for snapping this box to the snapport.
scroll-margin-bottom - CSS: Cascading Style Sheets
he transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets.
...mple is stored in a github repository.
...lues */ scroll-margin-bottom: 10px; scroll-margin-bottom: 1em; /* global values */ scroll-margin-bottom: inherit; scroll-margin-bottom: initial; scroll-margin-bottom: unset; values <length> an outset from the bottom edge of the scroll container.
scroll-margin-inline-end - CSS: Cascading Style Sheets
he transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets.
...github repository.
...ine-end: 10px; scroll-margin-inline-end: 1em; /* global values */ scroll-margin-inline-end: inherit; scroll-margin-inline-end: initial; scroll-margin-inline-end: unset; values <length> an outset from the inline end edge of the scroll container.
scroll-margin-inline-start - CSS: Cascading Style Sheets
he transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets.
...ository.
...0px; scroll-margin-inline-start: 1em; /* global values */ scroll-margin-inline-start: inherit; scroll-margin-inline-start: initial; scroll-margin-inline-start: unset; values <length> an outset from the inline start edge of the scroll container.
scroll-margin-inline - CSS: Cascading Style Sheets
the scroll-margin-inline shorthand property sets the scroll margins of an element in the inline dimension.
...f an element in the inline dimension.
...is used for snapping this box to the snapport.
scroll-margin-left - CSS: Cascading Style Sheets
e transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets.
...ctive example is stored in a github repository.
...<length> values */ scroll-margin-left: 10px; scroll-margin-left: 1em; /* global values */ scroll-margin-left: inherit; scroll-margin-left: initial; scroll-margin-left: unset; values <length> an outset from the left edge of the scroll container.
scroll-margin-right - CSS: Cascading Style Sheets
e transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets.
... example is stored in a github repository.
...th> values */ scroll-margin-right: 10px; scroll-margin-right: 1em; /* global values */ scroll-margin-right: inherit; scroll-margin-right: initial; scroll-margin-right: unset; values <length> an outset from the right edge of the scroll container.
scroll-margin-top - CSS: Cascading Style Sheets
he transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets.
...interactive example is stored in a github repository.
...ax /* <length> values */ scroll-margin-top: 10px; scroll-margin-top: 1em; /* global values */ scroll-margin-top: inherit; scroll-margin-top: initial; scroll-margin-top: unset; values <length> an outset from the top edge of the scroll container.
scroll-margin - CSS: Cascading Style Sheets
for this interactive example is stored in a github repository.
...-examples and send us a pull request.
...is used for snapping this box to the snapport.
translate3d() - CSS: Cascading Style Sheets
is interactive example is stored in a github repository.
...the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...es and send us a pull request.
HTML attribute: pattern - HTML: Hypertext Markup Language
passing all three components of the phone number, expecting 3-digits, 3-digits and 4-digits respectively, as defined by the pattern attribute set on each.
...ree components of the phone number, expecting 3-digits, 3-digits and 4-digits respectively, as defined by the pattern attribute set on each.
...the example below restricts the value to 4-8 characters and requires that it contain only lower-case letters.
<input type="file"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › file
llows (e.g.
...display() function.
...sert the image into the list item too by creating a new <img> and setting its src to the thumbnail.
Access-Control-Expose-Headers - HTTP
the access-control-expose-headers response header indicates which headers can be exposed as part of the response by listing their names.
...ut credentials (requests without http cookies or http authentication information).
... special semantics.
Transfer-Encoding - HTTP
et message.
... syntax transfer-encoding: chunked transfer-encoding: compress transfer-encoding: deflate transfer-encoding: gzip transfer-encoding: identity // several values can be listed, separated by a comma transfer-encoding: gzip, chunked directives chunked data is sent in a series of chunks.
... comma transfer-encoding: gzip, chunked directives chunked data is sent in a series of chunks.
TypeError: invalid arguments - JavaScript
the javascript exception "invalid arguments" occurs when typed array constructors are provided with a wrong argument.
...ybuffer object to create a new typed array.
...ped array.
Rest parameters - JavaScript
ment still gets put into an array.
...rom example above myfun("one", "two", "three") // a, one // b, two // manymoreargs, [three] below, the third argument isn't provided, but manymoreargs is still an array (albeit an empty one).
... // manymoreargs, [three] below, the third argument isn't provided, but manymoreargs is still an array (albeit an empty one).
Array.prototype.every() - JavaScript
type.every = function(callbackfn, thisarg) { 'use strict'; var t, k; if (this == null) { throw new typeerror('this is null or not defined'); } // 1.
... var t, k; if (this == null) { throw new typeerror('this is null or not defined'); } // 1.
...ngth".
Array.prototype.find() - JavaScript
ind with the following snippet: // https://tc39.github.io/ecma262/#sec-array.prototype.find if (!array.prototype.find) { object.defineproperty(array.prototype, 'find', { value: function(predicate) { // 1.
...owing snippet: // https://tc39.github.io/ecma262/#sec-array.prototype.find if (!array.prototype.find) { object.defineproperty(array.prototype, 'find', { value: function(predicate) { // 1.
...39.github.io/ecma262/#sec-array.prototype.find if (!array.prototype.find) { object.defineproperty(array.prototype, 'find', { value: function(predicate) { // 1.
Array.prototype.map() - JavaScript
array.prototype.map = function(callback/*, thisarg*/) { var t, a, k; if (this == null) { throw new typeerror('this is null or not defined'); } // 1.
...t, a, k; if (this == null) { throw new typeerror('this is null or not defined'); } // 1.
...length".
Array.prototype.shift() - JavaScript
the shift() method removes the first element from an array and returns that removed element.
...contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...oved element from the array; undefined if the array is empty.
Array.prototype.slice() - JavaScript
slice extracts up to but not including end.
...g end.
...lement (elements indexed 1, 2, and 3).
Array.prototype.toLocaleString() - JavaScript
://tc39.github.io/ecma402/#sup-array.prototype.tolocalestring if (!array.prototype.tolocalestring) { object.defineproperty(array.prototype, 'tolocalestring', { value: function(locales, options) { // 1.
.../ecma402/#sup-array.prototype.tolocalestring if (!array.prototype.tolocalestring) { object.defineproperty(array.prototype, 'tolocalestring', { value: function(locales, options) { // 1.
....tolocalestring if (!array.prototype.tolocalestring) { object.defineproperty(array.prototype, 'tolocalestring', { value: function(locales, options) { // 1.
ArrayBuffer() constructor - JavaScript
the arraybuffer() constructor is used to create arraybuffer objects.
... the arraybuffer() constructor is used to create arraybuffer objects.
...if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
ArrayBuffer - JavaScript
the arraybuffer object is used to represent a generic, fixed-length raw binary data buffer.
...fer.
....
Math.hypot() - JavaScript
[value1[, value2[, ...]]]) parameters value1, value2, ...
...t is infinity.
...ity = false; while (i--) { var arg = arguments[i]; if (arg === infinity || arg === -infinity) containsinfinity = true y += arg * arg } return containsinfinity ?
Proxy - JavaScript
rty the products proxy object evaluates the passed value and converts it to an array if needed.
... target will be table.rows.
...([ { name: 'firefox', type: 'browser' }, { name: 'seamonkey', type: 'browser' }, { name: 'thunderbird', type: 'mailer' } ], { get: function(obj, prop) { // the default behavior to return the value; prop is usually an integer if (prop in obj) { return obj[prop]; } // get the number of products; an alias of products.length if (prop === 'number') { return obj.length; } let result, types = {}; for (let product of obj) { if (product.name === prop) { result = product; } if (types[product.type]) { types[product.type].push(product); } else { types[product.type] = [product]; } } // get a product by name if (result) { return result; } // get products by type if (prop...
SharedArrayBuffer() constructor - JavaScript
note that sharedarraybuffer was disabled by default in all major browsers on 5 january, 2018 in response to spectre.
...is used to create a sharedarraybuffer object representing a generic, fixed-length raw binary data buffer, similar to the arraybuffer object.
...darraybuffer object representing a generic, fixed-length raw binary data buffer, similar to the arraybuffer object.
String.prototype.charCodeAt() - JavaScript
e utf-16 code unit.
...(or reproduce) the full character for individual character values of 65536 or greater, for such characters, it is necessary to retrieve not only charcodeat(i), but also charcodeat(i+1) (as if manipulating a string with two letters), or to use codepointat(i) instead.
...ove in the previous iteration return false; // hi = str.charcodeat(idx - 1); // low = code; // return ((hi - 0xd800) * 0x400) + // (low - 0xdc00) + 0x10000; } return code; } fixing charcodeat() to handle non-basic-multilingual-plane characters if their presence earlier in the string is known function knowncharcodeat(str, idx) { str += ''; var code, end = str.length; var surrogatepairs = /[\ud800-\udbff][\udc00-\udfff]/g; while ((surrogatepairs.exec(str)) != null) { var li = surrogatepairs.lastindex; if (li - 2 < idx) { idx++; } else { break; } } if (idx >= end || idx < 0) { return nan; } code = str.charcodeat(idx); var hi, low; if (0xd800 <= code && code <= 0xdbff) { hi = code; low = str.charco...
String.prototype.matchAll() - JavaScript
the while loop and exec with g.
...n for matchall is the improved access to capture groups.
...ed when using match() with the global /g flag: let regexp = /t(e)(st(\d?))/g; let str = 'test1test2'; str.match(regexp); // array ['test1', 'test2'] using matchall, you can access capture groups easily: let array = [...str.matchall(regexp)]; array[0]; // ['test1', 'e', 'st1', '1', index: 0, input: 'test1test2', length: 4] array[1]; // ['test2', 'e', 'st2', '2', index: 5, input: 'test1test2', length: 4] specifications specification ecmascript (ecma-262)the definition of 'string.prototype.matchall' in that specification.
Symbol.isConcatSpreadable - JavaScript
[1, 2, 3] numeric[symbol.isconcatspreadable] = false let alphanumeric = alpha.concat(numeric) console.log(alphanumeric) // result: ['a', 'b', 'c', [1, 2, 3] ] array-like objects for array-like objects, the default is to not spread.
...g(alphanumeric) // result: ['a', 'b', 'c', [1, 2, 3] ] array-like objects for array-like objects, the default is to not spread.
...the default is to not spread.
TypedArray.prototype.lastIndexOf() - JavaScript
the same algorithm as array.prototype.lastindexof().
... if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...mdn/interactive-examples and send us a pull request.
WebAssembly.Table.prototype.grow() - JavaScript
the grow() prototype method of the webassembly.table object increases the size of the table instance by a specified number of elements.
...h of the table.
...reason, a rangeerror is thrown.
Iteration protocols - JavaScript
red a non-well-formed iterable.
...function idmaker() { let index = 0; return { next: function() { return { value: index++, done: false }; } }; } let it = idmaker(); console.log(it.next().value); // '0' console.log(it.next().value); // '1' console.log(it.next().value); // '2' // ...
...// ...
class - JavaScript
, we first define a class named polygon, then extend it to create a class named square.
...class named polygon, then extend it to create a class named square.
...med polygon, then extend it to create a class named square.
Trailing commas - JavaScript
me.
...avascript ignores trailing commas in arrays: var arr = [ 1, 2, 3, ]; arr; // [1, 2, 3] arr.length; // 3 if more than one trailing comma is used, an elision (or hole) is produced.
...gth; // 5 objects starting with ecmascript 5, trailing commas in object literals are legal as well: var object = { foo: "bar", baz: "qwerty", age: 42, }; trailing commas in functions ecmascript 2017 allows trailing commas in function parameter lists.
<mspace> - MathML
Web › MathML › Element › mspace
the mathml <mspace> element is used to display a blank space, whose size is set by its attributes.
... the mathml <mspace> element is used to display a blank space, whose size is set by its attributes.
...e the baseline) of the space (see length for values and units).
Digital audio concepts - Web media technologies
ay are, then, actually vibrations in the air which cause the inner workings of the ear.
...use our ears are separated by several inches, thanks to being on opposite sides of our heads.
..., thanks to being on opposite sides of our heads.
Digital video concepts - Web media technologies
scale, with color being far less detailed.
...with two image sensor chips: one greyscale and one color.
...0 megapixels, while the color sensor is only about 7 megapixels.
Progressive web app structure - Progressive web apps (PWAs)
witter:</span> <a href='https://twitter.com/twitter'>@twitter</a></li>\n\ <li><span>website:</span> <a href='http://website/'>website</a></li>\n\ <li><span>github:</span> <a href='https://github'>github</a></li>\n\ <li><span>more:</span> <a href='http://js13kgames.com/entries/slug'>js13kgames.com/entries/slug</a></li>\n\ </ul>\n\ </article>"; var content = ''; for(var i=0; i<games.length; i++) { var entry = template.replace(/pos/g,(i+1)) .replace(/slug/g,games[i].slug) .replace(/name/g,games[i].name) .replace(/author/g,games[i].author) .replace(/twitter/g,games[i].twitter) .replace(/website/g,games[i].website) .replace(/github/g,games[i].github); entry = entry.replace('<a href=\'http:///\'></a>','-'); content += entry; }...
...("notifications"); button.addeventlistener('click', function(e) { notification.requestpermission().then(function(result) { if(result === 'granted') { randomnotification(); } }); }); the last block creates notifications that display a randomly-selected item from the games list: function randomnotification() { var randomitem = math.floor(math.random()*games.length); var notiftitle = games[randomitem].name; var notifbody = 'created by '+games[randomitem].author+'.'; var notifimg = 'data/img/'+games[randomitem].slug+'.jpg'; var options = { body: notifbody, icon: notifimg } var notif = new notification(notiftitle, options); settimeout(randomnotification, 30000); } the service worker the last file we will quickly l...
...s13kpwa/icons/icon-32.png', '/pwa-examples/js13kpwa/icons/icon-64.png', '/pwa-examples/js13kpwa/icons/icon-96.png', '/pwa-examples/js13kpwa/icons/icon-128.png', '/pwa-examples/js13kpwa/icons/icon-168.png', '/pwa-examples/js13kpwa/icons/icon-192.png', '/pwa-examples/js13kpwa/icons/icon-256.png', '/pwa-examples/js13kpwa/icons/icon-512.png' ]; var gamesimages = []; for(var i=0; i<games.length; i++) { gamesimages.push('data/img/'+games[i].slug+'.jpg'); } var contenttocache = appshellfiles.concat(gamesimages); the next block installs the service worker, which then actually caches all the files contained in the above list: self.addeventlistener('install', function(e) { console.log('[service worker] install'); e.waituntil( caches.open(cachename).then(function(cache) { co...
Structural overview of progressive web apps - Progressive web apps (PWAs)
href='https://twitter.com/twitter'> @twitter</a></li>\n\ <li><span>website:</span> <a href='http://website/'>website</a></li>\n\ <li><span>github:</span> <a href='https://github'>github</a></li>\n\ <li><span>more:</span> <a href='http://js13kgames.com/entries/slug'> js13kgames.com/entries/slug</a></li>\n\ </ul>\n\ </article>"; var content = ''; for(var i=0; i<games.length; i++) { var entry = template.replace(/pos/g,(i+1)) .replace(/slug/g,games[i].slug) .replace(/name/g,games[i].name) .replace(/author/g,games[i].author) .replace(/twitter/g,games[i].twitter) .replace(/website/g,games[i].website) .replace(/github/g,games[i].github); entry = entry.replace('<a href=\'http:///\'></a>','-'); content += entry; }...
... document.getelementbyid("notifications"); button.addeventlistener('click', function(e) { notification.requestpermission().then(function(result) { if (result === 'granted') { randomnotification(); } }); }); the randomnotification() function follows, rounding out the last of the code in the file: function randomnotification() { var randomitem = math.floor(math.random()*games.length); var notiftitle = games[randomitem].name; var notifbody = 'created by '+games[randomitem].author+'.'; var notifimg = 'data/img/'+games[randomitem].slug+'.jpg'; var options = { body: notifbody, icon: notifimg } var notif = new notification(notiftitle, options); settimeout(randomnotification, 30000); } the service worker the last file we'll briefly look at here is the se...
...s13kpwa/icons/icon-32.png', '/pwa-examples/js13kpwa/icons/icon-64.png', '/pwa-examples/js13kpwa/icons/icon-96.png', '/pwa-examples/js13kpwa/icons/icon-128.png', '/pwa-examples/js13kpwa/icons/icon-168.png', '/pwa-examples/js13kpwa/icons/icon-192.png', '/pwa-examples/js13kpwa/icons/icon-256.png', '/pwa-examples/js13kpwa/icons/icon-512.png' ]; var gamesimages = []; for(var i=0; i<games.length; i++) { gamesimages.push('data/img/'+games[i].slug+'.jpg'); } var contenttocache = appshellfiles.concat(gamesimages); with the file list prepared, it's time to install the service worker itself.
class - SVG: Scalable Vector Graphics
Web › SVG › Attribute › class
aracters: "space" (u+0020), "tab" (u+0009), "line feed" (u+000a), "carriage return" (u+000d), and "form-feed" (u+000c).
...eed" (u+000a), "carriage return" (u+000d), and "form-feed" (u+000c).
...return" (u+000d), and "form-feed" (u+000c).
cx - SVG: Scalable Vector Graphics
Web › SVG › Attribute › cx
" id="mygradient"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <circle cx="50" cy="50" r="45"/> <ellipse cx="150" cy="50" rx="45" ry="25" /> <rect x="205" y="5" width="90" height="90" fill="url(#mygradient)" /> </svg> circle for <circle>, cx defines the x-axis coordinate of the center of the shape.
...<circle>, cx defines the x-axis coordinate of the center of the shape.
...s coordinate of the center of the shape.
cy - SVG: Scalable Vector Graphics
Web › SVG › Attribute › cy
id="mygradient"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <circle cy="50" cx="50" r="45"/> <ellipse cy="150" cx="50" rx="45" ry="25" /> <rect x="5" y="205" width="90" height="90" fill="url(#mygradient)" /> </svg> circle for <circle>, cy defines the y-axis coordinate of the center of the shape.
...le>, cy defines the y-axis coordinate of the center of the shape.
...rdinate of the center of the shape.
letter-spacing - SVG: Scalable Vector Graphics
the letter-spacing attribute controls spacing between text characters, in addition to any spacing from the kerning attribute.
... the letter-spacing attribute controls spacing between text characters, in addition to any spacing from the kerning attribute.
...ut it has effect only on the following eight elements: <altglyph>, <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg viewbox="0 0 400 30" xmlns="http://www.w3.org/2000/svg"> <text y="20" letter-spacing="2">bigger letter-spacing</text> <text x="200" y="20" letter-spacing="-0.5">smaller letter-spacing</text> </svg> usage notes value normal | <length> default value normal animatable yes for a description of the values, please refer to the css letter-spacing property.
primitiveUnits - SVG: Scalable Vector Graphics
the primitiveunits attribute specifies the coordinate system for the various length values within the filter primitives and for the attributes that define the filter primitive subregion.
...specifies the coordinate system for the various length values within the filter primitives and for the attributes that define the filter primitive subregion.
... 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).
stroke-miterlimit - SVG: Scalable Vector Graphics
the stroke-miterlimit attribute is a presentation attribute defining a limit on the ratio of the miter length to the stroke-width used to draw a miter join.
...2,0 l0.75,-3 l0.75,3 m2,0 l0.5,-3 l0.5,3" /> </svg> when two line segments meet at a sharp angle and miter joins have been specified for stroke-linejoin, it is possible for the miter to extend far beyond the thickness of the line stroking the path.
...thickness of the line stroking the path.
SVG Attribute reference - SVG: Scalable Vector Graphics
Web › SVG › Attribute
nt-size-adjust font-stretch font-style font-variant font-weight format from fr fx fy g g1 g2 glyph-name glyph-orientation-horizontal glyph-orientation-vertical glyphref gradienttransform gradientunits h hanging height href hreflang horiz-adv-x horiz-origin-x i id ideographic image-rendering in in2 intercept k k k1 k2 k3 k4 kernelmatrix kernelunitlength kerning keypoints keysplines keytimes l lang lengthadjust letter-spacing lighting-color limitingconeangle local m marker-end marker-mid marker-start markerheight markerunits markerwidth mask maskcontentunits maskunits mathematical max media method min mode n name numoctaves o offset opacity operator order orient orientation origin overflow overl...
...ter-spacing lighting-color limitingconeangle local m marker-end marker-mid marker-start markerheight markerunits markerwidth mask maskcontentunits maskunits mathematical max media method min mode n name numoctaves o offset opacity operator order orient orientation origin overflow overline-position overline-thickness p panose-1 paint-order path pathlength patterncontentunits patterntransform patternunits ping pointer-events points pointsatx pointsaty pointsatz preservealpha preserveaspectratio primitiveunits r r radius referrerpolicy refx refy rel rendering-intent repeatcount repeatdur requiredextensions requiredfeatures restart result rotate rx ry s scale seed shape-rendering slope spacing specularconstan...
...ffset stddeviation stemh stemv stitchtiles stop-color stop-opacity strikethrough-position strikethrough-thickness string stroke stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width style surfacescale systemlanguage t tabindex tablevalues target targetx targety text-anchor text-decoration text-rendering textlength to transform transform-origin type u u1 u2 underline-position underline-thickness unicode unicode-bidi unicode-range units-per-em v v-alphabetic v-hanging v-ideographic v-mathematical values vector-effect version vert-adv-y vert-origin-x vert-origin-y viewbox viewtarget visibility w width widths word-spacing writing-mode x x x-height x1 x2 xchanne...
Texts - SVG: Scalable Vector Graphics
Web › SVG › Tutorial › Texts
e default current position.
...f values that are applied to consecutive characters, hence piling up the offset over time.
...l displacement.
substring - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the substring function returns a part of a given string.
... xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the substring function returns a part of a given string.
... xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the substring function returns a part of a given string.
For Further Reading - XSLT: Extensible Stylesheet Language Transformations
« transforming xml with xslt print books xslt: programmer's reference, second edition author: michael h.
...roup and the developer of his own open-source xslt processor, saxon.
...r xml technologies generally.
Reddit Example - Archive of obsolete content
is the panel.js content script that intercepts link clicks: $(window).click(function (event) { var t = event.target; // don't intercept the click if it isn't on a link.
... intercepts link clicks: $(window).click(function (event) { var t = event.target; // don't intercept the click if it isn't on a link.
Porting the Library Detector - Archive of obsolete content
ldiconhtml(icons[library.name], library.name + "&lt;br&gt;version: " + library.version); }); widgetcontent += htmlcontentpostamble; return widgetcontent; } function updatewidgetview(tab) { var widgetview = widget.getview(tab.window); if (!tab.libraries) { tab.libraries = []; } widgetview.content = buildwidgetviewcontent(tab.libraries); widgetview.width = tab.libraries.length * icon_width; } main.js will use the tabs module to update the widget's content when necessary (for example, when the user switches between tabs): tabs.on('activate', function(tab) { updatewidgetview(tab); }); tabs.on('ready', function(tab) { tab.libraries = []; }); showing the library detail the xul library detector displayed the detailed information about each library on mouseover in...
...a panel.
page-mod - Archive of obsolete content
la.org", contentscriptfile: data.url("element-getter.js"), onattach: function(worker) { worker.port.emit("getelements", tag); worker.port.on("gotelement", function(elementcontent) { console.log(elementcontent); }); } }); /data/element-getter.js: self.port.on("getelements", function(tag) { var elements = document.getelementsbytagname(tag); for (var i = 0; i < elements.length; i++) { self.port.emit("gotelement", elements[i].innerhtml); } }); when the user loads a document hosted at "mozilla.org": the content script "element-getter.js" is attached to the document and runs.
...h, when clicked, highlights all the div elements in the document loaded into the active tab: require("sdk/ui/button/action").actionbutton({ id: "highlight-divs", label: "highlight divs", icon: "./icon-16.png", onclick: function() { require("sdk/tabs").activetab.attach({ contentscript: 'var divs = document.getelementsbytagname("div");' + 'for (var i = 0; i < divs.length; ++i) {' + 'divs[i].setattribute("style", "border: solid red 1px;");' + '}' }); } }); to run this example you'll also have to have an icon file named "icon-16.png" saved in your add-on's "data" directory.
tabs - Archive of obsolete content
access tabs the module itself can be used as a list of all opened tabs across all windows.
...a callback function that will be registered for the 'deactivate' event.
windows - Archive of obsolete content
ction that is called when the window is made inactive.
...w : listeners are passed the window object that has become inactive.
io/file - Archive of obsolete content
xt mode, and its contents are assumed to be utf-8.
...string the path of the file to remove.
Creating Reusable Modules - Archive of obsolete content
e the internals of the module without breaking its users.
...t breaking its users.
File I/O - Archive of obsolete content
onents.interfaces.nsifileoutputstream); // use 0x02 | 0x10 to open file for appending.
...calfile); afile.initwithpath( "/tmp/mypicture.png" ); afile.createunique(components.interfaces.nsifile.normal_file_type, 0600); var stream = components.classes["@mozilla.org/network/safe-file-output-stream;1"].
Modules - Archive of obsolete content
be of concern because it is only being used on the exported_symbols array which should not depend on user input.
...symbols.length; i++) {thatobj[exported_symbols[i]] = eval(exported_symbols[i]);} } or for one-time-only usage of a module: (function (thatobj) { thatobj = thatobj || window; var exported_symbols = [ // put the symbols here ]; // your code here...
Post data to window - Archive of obsolete content
hod requests must wrap the encoded text in a mime // stream const cc = components.classes; const ci = components.interfaces; var stringstream = cc["@mozilla.org/io/string-input-stream;1"].
...nce(ci.nsistringinputstream); if ("data" in stringstream) // gecko 1.9 or newer stringstream.data = datastring; else // 1.8 or older stringstream.setdata(datastring, datastring.length); var postdata = cc["@mozilla.org/network/mime-input-stream;1"].
URI parsing - Archive of obsolete content
some sample code to determine the base domain without any suffixes: var etldservice = components.classes["@mozilla.org/network/effective-tld-service;1"].
... to determine the base domain without any suffixes: var etldservice = components.classes["@mozilla.org/network/effective-tld-service;1"].
xml:base support in old browsers - Archive of obsolete content
heck for xml base if there is no protocol // tests for 'scheme' per http://www.ietf.org/rfc/rfc2396.txt' xmlbase = getxmlbase (thisitem); if (!xmlbase.match(/\/$/) && !xlink.match(/\/$/)) { // if no preceding slash on xlink or trailing 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 + ...
...ed 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 += '/'; } link = loc.protocol + '//' + loc.host + dirpath + link; } } return link; } function getxmlbase (thisitem) { // fix: need to keep going up the chain if still a relative url!!!!!
getAttributeNS - Archive of obsolete content
e('xml:'+nsatt); // prefix must be 'xml' per the specs } var attrs2, result; var attrs = thisitem.attributes; var prefixatt = new regexp('^(.*):'+nsatt.replace(/\./g, '\\.')+'$'); // e.g., xlink:href // find any prefixes with the local-name being searched (escape period since only character (besides colon) allowed in an xml name which needs escaping) for (var j = 0; j < attrs.length; j++) { // 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 // che...
..., 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 found above with desired local name if (attrs2[i].nodename.match(xmlnsprefix) && attrs2[i].nodevalue === ns ) { // e.g., 'xmlns:xlink' and 'http://www.w3.org/1999/xlink' return attrs[j].nodevalue; } } thisitem = t...
How to convert an overlay extension to restartless - Archive of obsolete content
.utils.import("resource://gre/modules/services.jsm"); var stylesheets = ["chrome://myextension/skin/mystylesheet.css"]; function startup(data,reason) { ...
... null); stylesheetservice.loadandregistersheet(stylesheeturi, stylesheetservice.author_sheet); } ...
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
rt to utf-8 var converter = components.classes["@mozilla.org/intl/scriptableunicodeconverter"].
...ts that were dynamically generated the last time the submenu opened, and which are still left over.
The Box Model - Archive of obsolete content
ing the minwidth, maxwidth, minheight and maxheight attributes, or their css counterparts: min-width, max-width, min-height and max-height.
...g cases where a description won't be good enough.
Adding preferences to an extension - Archive of obsolete content
is" referring to the right object, so we need to reference // it by its full name var symbol = stockwatcher.tickersymbol; var fullurl = "http://quote.yahoo.com/d/quotes.csv?f=sl1d1t1c1ohgv&e=.csv&s=" + symbol; function inforeceived() { var samplepanel = document.getelementbyid('stockwatcher2'); var output = httprequest.responsetext; if (output.length) { // remove any whitespace from the end of the string output = output.replace(/\w*$/, ""); // build the tooltip string var fieldarray = output.split(","); samplepanel.label = symbol + ": " + fieldarray[1]; samplepanel.tooltiptext = "chg: " + fieldarray[4] + " | " + "open: " + fieldarray[5] + " | " + "low: " + fielda...
...her 2 options" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="sw2-stock-pane" label="stock settings"> <preferences> <preference id="pref_symbol" name="extensions.stockwatcher2.symbol" type="string"/> </preferences> <hbox align="center"> <label control="symbol" value="stock to watch: "/> <textbox preference="pref_symbol" id="symbol" maxlength="4"/> </hbox> </prefpane> </prefwindow> the <preferences> block establishes all the settings we implement as well as their types.
Underscores in class and ID Names - Archive of obsolete content
s is so, and how to keep your sites from being bitten by this problem.
...bitten by this problem.
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
urned via xmlhttprequest and generates markup based on the data provided in the dom nodes.
.../ /// calldevedge represents the inner-browsing function here // function calldevedge(loaddata,ele) { var x = new xmlremoterequest(); doc=x.getremotedocument(loaddata); document.getelementbyid("container").innerhtml=""; if(doc!=null) { tagname="article"; // ie fix if(document.all) tagname="nde:"+tagname; articles=doc.getelementsbytagname(tagname); for(i=0;i<articles.length;i++) { article=articles.item(i); tagname="title"; // ie fix if(document.all) tagname="nde:"+tagname; valuee=article.getelementsbytagname(tagname).item(0).firstchild.nodevalue; tagname="summary"; // ie fix if(document.all) tagname="nde:"+tagname; paraa=article.getelements...
Using XML Data Islands in Mozilla - Archive of obsolete content
ar parser = new domparser(); var doc = parser.parsefromstring(ordersource, "application/xml"); var lineitems = doc.getelementsbytagnamens("http://example.mozilla.org/purchaseorderml", "lineitem"); var firstprice = lineitems[0].getelementsbytagnamens("http://example.mozilla.org/purchaseorderml", "price")[0].textcontent; document.body.textcontent = "the purchase order contains " + lineitems.length + " line items.
...{ var doc = document.getelementbyid("purchase-order").contentdocument; var lineitems = doc.getelementsbytagnamens("http://example.mozilla.org/purchaseorderml", "lineitem"); var firstprice = lineitems[0].getelementsbytagnamens("http://example.mozilla.org/purchaseorderml", "price")[0].textcontent; document.getelementbyid("output-box").textcontent = "the purchase order contains " + lineitems.length + " line items.
Dehydra Object Reference - Archive of obsolete content
pointer and reference types property type description .ispointer boolean flag .isreference boolean flag .type type object the type this points to or references array type property type description .isarray boolean flag .max integer or normal fixed-size arrays, the index of the largest element of the array.
....ispointer boolean flag .isreference boolean flag .type type object the type this points to or references array type property type description .isarray boolean flag .max integer or normal fixed-size arrays, the index of the largest element of the array.
Code snippets - Archive of obsolete content
rk records // change '1000' as appropriate.
...e.service.storageurl + "bookmarks").get()); for each (let id in ids.sort()) { console.log(" " + id); } get a count of the number of members of a collection on the server let collection = "passwords"; components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); json.parse(new resource(weave.service.storageurl + collection).get()).length; dump the cleartext of each record in a collection to the console.
Basics - Archive of obsolete content
an .ico file.string jetpack.notifications.show("hello world");var mybody = " my first message body on jetpack";var myicon = "http://www.mozilla.com/favicon.ico";jetpack.notifications.show({title: "my first message on jetpack", body: mybody, icon: myicon}); class tabs in this class you can find information about the tabs in your firefox window.
...a.com/favicon.ico";jetpack.notifications.show({title: "my first message on jetpack", body: mybody, icon: myicon}); class tabs in this class you can find information about the tabs in your firefox window.
Simple Storage - Archive of obsolete content
st.jetpack.storage.simple.notes = jetpack.storage.simple.notes || [];var notes = jetpack.storage.simple.notes;// updates the jetpack menu with the current notes.
...a selection, add a note menuitem that makes a new note.
Simple Storage - Archive of obsolete content
k.storage.simple.notes = jetpack.storage.simple.notes || []; var notes = jetpack.storage.simple.notes; // updates the jetpack menu with the current notes.
...n, add a note menuitem that makes a new note.
Venkman Introduction - Archive of obsolete content
function name __toplevel__ is displayed for scripts that are not part of an actual function.
...ction.
ContextMenus - Archive of obsolete content
ier to use a single context menu containing every possible item, and show and hide the necessary items when needed.
...d 'rows' has no children and, if so, hides the 'delete' menu item by adjusting the item's hidden property.
Property - Archive of obsolete content
rltab hasuservalue height hidden hideseconds highlightnonmatches homepage hour hourleadingzero id ignoreblurwhilesearching image increment inputfield inverted is24hourclock ispm issearching iswaiting itemcount label labelelement lastpermanentchild lastselected left linkedpanel listboxobject locked markupdocumentviewer max maxheight maxlength maxrows maxwidth menu menuboxobject menupopup min minheight minresultsforpopup minwidth minute minuteleadingzero mode month monthleadingzero name next nomatch notificationshidden object observes onfirstpage onlastpage open ordinal orient pack pagecount pageid pageincrement pageindex pagestep parentcontainer palette persist pers...
...electedindex selecteditem selecteditems selectedpanel selectedtab selectionend selectionstart selstyle seltype sessioncount sessionhistory showcommentcolumn showpopup size smoothscroll spinbuttons src state statusbar statustext stringbundle strings style subject suppressonselect tabcontainer tabindex tabs tabscrolling tabpanels tag textlength textvalue timeout title toolbarname toolbarset tooltip tooltiptext top treeboxobject type uri useraction value valuenumber view webbrowserefind webnavigation webprogress width wizardpages wraparound year yearleadingzero related dom element properties dom:element.attributes dom:element.baseuri dom:element.childelementcount dom:element.childno...
Input Controls - Archive of obsolete content
ifier so that you can identify the textbox.
...e that while in html, several different kinds of fields can be created with the input element, in xul there are separate elements for each type.
Using SOAP in XULRunner 1.9 - Archive of obsolete content
ponsexml); 46,60c46,62 < $.ajax({ < type: "post", < url: soapclient.proxy, < datatype: "xml", < processdata: false, < data: content, < complete: getresponse, < contenttype: soapclient.contenttype + "; charset=\"" + soapclient.charset + "\"", < beforesend: function(req) { < req.setrequestheader("method", "post"); < req.setrequestheader("content-length", soapclient.contentlength); < req.setrequestheader("soapserver", soapclient.soapserver); < req.setrequestheader("soapaction", soapreq.action); < } < }); --- > var xhr = new xmlhttprequest(); > xhr.mozbackgroundrequest = true; > xhr.open('post', soapclient.proxy, true); > xhr.onreadystatechange = function() { > if (4 != xhr.readystate) { return; } > getr...
...--- > var xhr = new xmlhttprequest(); > xhr.mozbackgroundrequest = true; > xhr.open('post', soapclient.proxy, true); > xhr.onreadystatechange = function() { > if (4 != xhr.readystate) { return; } > getresponse(xhr); > }; > var headers = { > 'method': 'post', > 'content-type': soapclient.contenttype + '; charset="' + > soapclient.charset + '"', > 'content-length': soapclient.contentlength, > 'soapserver': soapclient.soapserver, > 'soapaction': soapreq.action > }; > for (var h in headers) { xhr.setrequestheader(h, headers[h]); } > xhr.send(content); ...
NPByteRange - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary represents a particular range of bytes from a stream.
...ge { int32 offset; /* negative offset = from the end */ uint32 length; struct _npbyterange* next; } npbyterange; fields the data structure has the following fields: offset offset in bytes to the start of the requested range.
NPN_GetAuthenticationInfo - Archive of obsolete content
port port number scheme http authentication scheme name realm http authentication realm username out parameter.
... may not be null-terminated.
NPStream - Archive of obsolete content
ields: plug-in-private value that the plug-in can use to store a pointer to private data associated with the instance; not modified by the browser.
...inter to private data associated with the instance; not modified by the browser.
NPString - Archive of obsolete content
that holds a pointer to a sequence of 8-bit units (nputf8) making up a utf-8 string, and the number of 8-bit units in the utf-8 string.
...er an npstring owns its string data and the data may be released through a call to npn_releasevariantvalue(), the string data must be allocated using npn_memalloc().
Browser Detection and Cross Browser Support - Archive of obsolete content
opera 5+ if (typeof(elm.style.left) == 'number') { // opera 5/6 do not implement the standard correctly // and assume that elm.style.left and similar properties // are numbers.
... for rv:1.9.1.3 it returns 1.090103 // function geckogetrv() { if (navigator.product != 'gecko') { return -1; } var rvvalue = 0; var ua = navigator.useragent.tolowercase(); var rvstart = ua.indexof('rv:'); var rvend = ua.indexof(')', rvstart); var rv = ua.substring(rvstart+3, rvend); var rvparts = rv.split('.'); var exp = 1; for (var i = 0; i < rvparts.length; i++) { var val = parseint(rvparts[i]); rvvalue += val / exp; exp *= 100; } return rvvalue; } // determine if the browser is any gecko // branch >= 1.0.1 or netscape 6.2.x/compuserve 7 // built after august 1, 2002 var rv = geckogetrv(); var found = false; if (rv >= 0) { // gecko browser if (navigator.productsub > '20020801') { if (rv >= 1.0001) { fou...
Browser Feature Detection - Archive of obsolete content
upported': false}, {name: 'visibility', 'supported': false}, {name: 'voicefamily', 'supported': false}, {name: 'volume', 'supported': false}, {name: 'widows', 'supported': false}, {name: 'zindex', 'supported': false} ] }; function supports(object, featureset) { var i; var features = _features[featureset]; var level = 0; if (!features) return level; for (i = 0; i < features.length; i++) if (typeof(object[features[i].name]) != 'undefined') { features[i].supported = true; ++level; } return math.floor( (100 * level) / features.length ); } function generatereport(object, featureset, description) { var i; var features = _features[featureset]; document.write('<p><b>' + featureset + ' support for properties/methods in ' + description + ', percentage of names d...
...oor( (100 * level) / features.length ); } function generatereport(object, featureset, description) { var i; var features = _features[featureset]; document.write('<p><b>' + featureset + ' support for properties/methods in ' + description + ', percentage of names defined = ' + supports(object, featureset) + '%<\/b><\/p>'); document.write('<table cellspacing="0">'); for (i = 0; i < features.length; i++) { if (features[i].supported) document.write('<tr><td>' + features[i].name + '<\/td><td>' + features[i].supported + '<\/td><\/tr>'); else document.write('<tr><td>' + features[i].name + '<\/td><td style="background-color:red">' + features[i].supported + '<\/td><\/tr>'); } document.write('<\/table>'); } var oldonerror = window.onerror; // suppress error messages...
-ms-scroll-limit-x-max - Archive of obsolete content
ms-scroll-limit-x-max css property is a microsoft extension that specifies the maximum value for the element.scrollleft property.
...value for the element.scrollleft property.
-ms-scroll-limit-x-min - Archive of obsolete content
the -ms-scroll-limit-x-min css property is a microsoft extension that specifies the minimum value for the element.scrollleft property.
...perty is a microsoft extension that specifies the minimum value for the element.scrollleft property.
-ms-scroll-limit-y-max - Archive of obsolete content
-ms-scroll-limit-y-max css property is a microsoft extension that specifies the maximum value for the element.scrolltop property.
...m value for the element.scrolltop property.
-ms-scroll-limit-y-min - Archive of obsolete content
the -ms-scroll-limit-y-min css property is a microsoft extension that specifies the minimum value for the element.scrolltop property.
...roperty is a microsoft extension that specifies the minimum value for the element.scrolltop property.
GetObject - Archive of obsolete content
ore apps or later.
... already loaded.
JavaArray - Archive of obsolete content
summary core object a wrapped java array accessed from within javascript code is a member of the type javaarray.
...erited by javaarray.
ParallelArray - Archive of obsolete content
her-order functions available on parallelarray attempted to execute in parallel, though they may fall back to sequential execution if necessary.
... in parallel, though they may fall back to sequential execution if necessary.
forEach - Archive of obsolete content
ve the old code as it isn't hosted anywhere (i thought the github reference contained the code) but inserted a faster implementation above while retaining the rest of the document.
...s not my mother tongue and i'm more concerned with the code quality that the english grammar ;-s dotnetcarpenter 30 june 2012 <hr> the compatibility section goes to extraordinary lengths in providing a foreach implementation.
WebVR — Virtual Reality for the Web - Game development
in your headset and receiving positional data for your head from the sensor, and those two are handled by hmdvrdevice (head-mounted display virtual reality device) and positionsensorvrdevice.
...ty device) and positionsensorvrdevice.
Base64 - MDN Web Docs Glossary: Definitions of Web-related terms
base64 digit represents exactly 6 bits of data.
...f data.
Request header - MDN Web Docs Glossary: Definitions of Web-related terms
uest header is an http header that can be used in an http request, and that doesn't relate to the content of the message.
...text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-language: en-us,en;q=0.5 accept-encoding: gzip, deflate, br referer: https://developer.mozilla.org/testpage.html connection: keep-alive upgrade-insecure-requests: 1 if-modified-since: mon, 18 jul 2016 02:36:04 gmt if-none-match: "c561c68d0ba92bbeb8b0fff2a9199f722e3a621a" cache-control: max-age=0 strictly speaking, the content-length header in this example is not a request header like the others, but an entity header: post /myform.html http/1.1 host: developer.mozilla.org user-agent: mozilla/5.0 (macintosh; intel mac os x 10.9; rv:50.0) gecko/20100101 firefox/50.0 content-length: 128 learn more technical knowledge list of all http headers ...
Practical positioning examples - Learn web development
z-index: 1; } adding our javascript the final step to getting this feature working is to add some javascript.
... as written in between your opening and closing <script> tags (you'll find these below the html content): var tabs = document.queryselectorall('.info-box li a'); var panels = document.queryselectorall('.info-box article'); for(i = 0; i < tabs.length; i++) { var tab = tabs[i]; settabhandler(tab, i); } function settabhandler(tab, tabpos) { tab.onclick = function() { for(i = 0; i < tabs.length; i++) { tabs[i].classname = ''; } tab.classname = 'active'; for(i = 0; i < panels.length; i++) { panels[i].classname = ''; } panels[tabpos].classname = 'active-panel'; } } this code does the following: first we save a reference to all the tabs and all the panels in two variables called tabs and panels, so we can easily do things to them later on.
How can we design for all types of users? - Learn web development
ernal engine.
... line width to around 60 or 70 characters.
What is a Domain Name? - Learn web development
.se can require the service to be provided in a given language or hosted in a certain country — they are supposed to indicate a resource in a particular language or country.
...edu tld is only for use by educational and academic institutions.
Sending form data - Learn web development
to say it to?</label> <input name="to" id="to" value="mom"> </div> <div> <button>send my greetings</button> </div> </form> when the form is submitted using the post method, you get no data appended to the url, and the http request looks like so, with the data included in the request body instead: post / http/2.0 host: foo.com content-type: application/x-www-form-urlencoded content-length: 13 say=hi&to=mom the content-length header indicates the size of the body, and the content-type header indicates the type of resource sent to the server.
... a post request they won't.
Images in HTML - Learn web development
ydown = function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { var scrollpos = textarea.scrolltop; var caretpos = textarea.selectionstart; var front = (textarea.value).substring(0, caretpos); var back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not t...
...ydown = function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { var scrollpos = textarea.scrolltop; var caretpos = textarea.selectionstart; var front = (textarea.value).substring(0, caretpos); var back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not t...
Responsive images - Learn web development
ax-width:600px)) — you'll learn more about these in the css topic, but for now let's just say that a media condition describes a possible state that the screen can be in.
...you'll learn more about these in the css topic, but for now let's just say that a media condition describes a possible state that the screen can be in.
Introduction to events - Learn web development
t a good idea.
...seful-eventtarget.html for the full source code; also see it running live here), we create 16 <div> elements using javascript.
Making decisions in your code — conditionals - Learn web development
function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { const scrollpos = textarea.scrolltop; const caretpos = textarea.selectionstart; const front = (textarea.value).substring(0, caretpos); const back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not ...
... function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { const scrollpos = textarea.scrolltop; const caretpos = textarea.selectionstart; const front = (textarea.value).substring(0, caretpos); const back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not ...
Test your skills: Arrays - Learn web development
e live code below to recreate the finished example: download the starting point for this task to work in your own editor or in an online editor.
...mple: download the starting point for this task to work in your own editor or in an online editor.
Solve common problems in your JavaScript code - Learn web development
crement values in javascript?
... a string?
Working with JSON - Learn web development
d it to the header.
...teelement('p'); const mypara3 = document.createelement('p'); const mylist = document.createelement('ul'); myh2.textcontent = heroes[i].name; mypara1.textcontent = 'secret identity: ' + heroes[i].secretidentity; mypara2.textcontent = 'age: ' + heroes[i].age; mypara3.textcontent = 'superpowers:'; const superpowers = heroes[i].powers; for (let j = 0; j < superpowers.length; j++) { const listitem = document.createelement('li'); listitem.textcontent = superpowers[j]; mylist.appendchild(listitem); } myarticle.appendchild(myh2); myarticle.appendchild(mypara1); myarticle.appendchild(mypara2); myarticle.appendchild(mypara3); myarticle.appendchild(mylist); section.appendchild(myarticle); } } to start with, we store the me...
Server-side web frameworks - Learn web development
ject.
...ing between choices to be displayed and data to be stored, along with a default value.
Working with Svelte stores - Learn web development
else if (filter === 'active') $alert = 'browsing active todos' else if (filter === 'completed') $alert = 'browsing completed todos' } and finally for now, update the const checkalltodos and const removecompletedtodos blocks as follows: const checkalltodos = (completed) => { todos = todos.map(t => ({...t, completed})) $alert = `${completed ?
...$alert = 'browsing completed todos' } and finally for now, update the const checkalltodos and const removecompletedtodos blocks as follows: const checkalltodos = (completed) => { todos = todos.map(t => ({...t, completed})) $alert = `${completed ?
Handling common JavaScript problems - Learn web development
an jshint, but it is more powerful too.
...local copy of our broken-ajax.html example (see the source code also).
Performance
ad load frame scripts on demand bad: // addon.js services.mm.loadframescript("framescript.js", /*delayed:*/ true) // stuff communicating with the framescript // 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.addmessagel...
...wser.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').length})", false) } function decoratebutton(button, count) { // do stuff with result } this executes the script only when it is needed and only in one tab and allows it to be garbage-collected immediately after execution.
JavaScript Tips
y to use the same names for method parameters as are used in the interface definition.
...e just xpcom objects with some of the interfaces precached.
Add-on Manager
various ways.
...enabled, or disabled at application startup.
Mozilla DOM Hacking Guide
cess(rv, rv); // use the dom to get the location object of the window object.
... a nsidomwindow pointer to call // getlocation() on it.
Mozilla Web Developer FAQ
ted using css.
...ing whatever browser x does in every conceivable case isn’t simple at all, even though it might appear to be simple when presented as a passing remark.
PL_strdup
tring.
...; parameter the function has a single parameter: s the string to copy, may be null.
PL_strlen
returns the length of a specified string (not including the trailing '\0') syntax pruint32 pl_strlen(const char *str); parameter the function has these parameter: str size in bytes of item to be allocated.
... returns the length of a specified string (not including the trailing '\0') syntax pruint32 pl_strlen(const char *str); parameter the function has these parameter: str size in bytes of item to be allocated.
PR_MemMap
maps a section of a file to memory.
... the section of file to be mapped.
Cryptography functions
mxr 3.12 and later pk11_generatenewparam mxr 3.2 and later pk11_generaterandom mxr 3.2 and later pk11_generaterandomonslot mxr 3.11 and later pk11_getalltokens mxr 3.2 and later pk11_getallslotsforcert mxr 3.12 and later pk11_getbestkeylength 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_get...
...efaultflags 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_getinternalslot mxr 3.2 and later pk11_getkeygen mxr 3.4 and later pk11_getkeylength mxr 3.2 and later pk11_getkeystrength mxr 3.2 and later pk11_getmechanism mxr 3.2 and later pk11_getminimumpwdlength mxr 3.4 and later pk11_getmodinfo mxr 3.6 and later pk11_getmodule mxr 3.3 and later pk11_getmoduleid mxr ...
NSS 3.48 release notes
nd pkcs#11 bug 1522203 - remove an old pentium pro performance workaround bug 1592557 - fix prng known-answer-test scripts bug 1586176 - encryptupdate should use maxout not block size (cve-2019-11745) bug 1593141 - add `notbefore` or similar "beginning-of-validity-period" parameter to mozilla::pkix::trustdomain::checkrevocation bug 1591363 - fix a pbkdf2 memory leak in nsc_generatekey if key length > max_key_len (256) bug 1592869 - use arm neon for ctr_xor bug 1566131 - ensure sha-1 fallback disabled in tls 1.2 bug 1577803 - mark pkcs#11 token as friendly if it implements ckp_public_certificates_token bug 1566126 - power ghash vector acceleration bug 1589073 - use of new pr_assert_arg in certdb.c bug 1590495 - fix a crash in pk11_makecertfromhandle bug 1591742 - ensure des iv length ...
... 1577803 - mark pkcs#11 token as friendly if it implements ckp_public_certificates_token bug 1566126 - power ghash vector acceleration bug 1589073 - use of new pr_assert_arg in certdb.c bug 1590495 - fix a crash in pk11_makecertfromhandle bug 1591742 - ensure des iv length is valid before usage from pkcs#11 bug 1588567 - enable mozilla::pkix gtests in nss ci bug 1591315 - update nsc_decrypt length in constant time bug 1562671 - increase nss mp kdf default iteration count, by default for modern key4 storage, optionally for legacy key3.db storage bug 1590972 - use -std=c99 rather than -std=gnu99 bug 1590676 - fix build if arm doesn't support neon bug 1575411 - enable tls extended master secret by default bug 1590970 - ssl_settimefunc has incomplete coverage bug 1590678 - remove -wmaybe...
NSS 3.55 release notes
(cve-2020-6829, cve-2020-12400) - replace p384 and p521 with new, verifiable implementations from fiat-crypto and ecckiila.
...en slot for a der-encoded certificate.
NSS API Guidelines
ave in a threaded environment.
...socket, or the ssl socket structure: update, final, encrypt, decrypt type functions operating on their state contexts, etc.
NSS Developer Tutorial
nss coding style formatting line length should not exceed 80 characters.
...aneous goto can be used, to simplify resource deallocation, before returning from a function.
NSS Sample Code sample4
key * # type, cert type etc * # answers for prompts: 5,9,n,y,-1,n,5,6,7,9,n * $ certutil -s -s "cn=test ca, o=bogus inc, l=mtn view, st=ca, c=us" \ * -n testca -t ctu,ctu,ctu -v 60 -x -d .
...ype etc * # answers for prompts: 5,9,n,y,-1,n,5,6,7,9,n * $ certutil -s -s "cn=test ca, o=bogus inc, l=mtn view, st=ca, c=us" \ * -n testca -t ctu,ctu,ctu -v 60 -x -d .
NSS Sample Code sample5
ops (encrypt with public key, * decrypt with private key) * * no nss db needed.
... key, * decrypt with private key) * * no nss db needed.
nss tech note7
-1_5), pkcs1 v1.5 padding is described like this: 02 || ps || 00 || m 00 at the beginning is missing.
...ike this: 02 || ps || 00 || m 00 at the beginning is missing.
NSS PKCS11 Functions
should make sure tokendescription is unique.
...ue.
Python binding for NSS
21 scm tag pynss_release_0_8_0 source download change log general modifications: secitem's now support indexing and slicing on their data clean up parsing and parameter validation of variable arg functions the following were added: secitem.type secitem.len secitem.data pk11symkey.key_data pk11symkey.key_length pk11symkey.slot create_context_by_sym_key param_from_iv generate_new_param get_iv_length get_block_size get_pad_mechanism release 0.7.0 release date 2009-09-18 scm tag source download change log general modifications: add support for symmetric encryption/decryption more sup...
... 2009-09-18 scm tag source download change log general modifications: add support for symmetric encryption/decryption more support for digests (hashes) the following classes added: pk11symkey pk11context the following methods and functions added: get_best_wrap_mechanism get_best_key_length key_gen derive get_key_length digest_key clone_context digest_begin digest_op cipher_op finalize digest_final read_hex hash_buf sec_oid_tag_str sec_oid_tag_name sec_oid_tag_from_name key_mechanism_type_name key_mechanism_type_from_name pk11_attribute_type_name pk11_attribute_type_from_name get_best...
FC_Decrypt
name fc_decrypt - decrypt a block of data.
...n_handle hsession, ck_byte_ptr pencrypteddata, ck_ulong usencrypteddatalen, ck_byte_ptr pdata, ck_ulong_ptr pusdatalen ); parameters hsession [in] session handle.
FC_DecryptDigestUpdate
name fc_decryptdigestupdate - continue a multi-part decrypt and digest operation syntax ck_rv fc_decryptdigestupdate( ck_session_handle hsession, ck_byte_ptr pencryptedpart, ck_ulong ulencryptedpartlen, ck_byte_ptr ppart, ck_ulong_ptr pulpartlen ); parameters hsession [in] session handle.
...andle hsession, ck_byte_ptr pencryptedpart, ck_ulong ulencryptedpartlen, ck_byte_ptr ppart, ck_ulong_ptr pulpartlen ); parameters hsession [in] session handle.
FC_DecryptVerifyUpdate
name fc_decryptverifyupdate - continue a multi-part decrypt and verify operation syntax ck_rv fc_decryptverifyupdate( ck_session_handle hsession, ck_byte_ptr pencrypteddata, ck_ulong ulencrypteddatalen, ck_byte_ptr pdata, ck_ulong_ptr puldatalen ); parameters hsession [in] session handle.
...andle hsession, ck_byte_ptr pencrypteddata, ck_ulong ulencrypteddatalen, ck_byte_ptr pdata, ck_ulong_ptr puldatalen ); parameters hsession [in] session handle.
FC_Digest
name fc_digest - digest a block of data.
...on_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr pdigest, ck_ulong_ptr pusdigestlen ); parameters hsession [in] session handle.
FC_DigestEncryptUpdate
name fc_digestencryptupdate - continue a multi-part digest and encryption operation syntax ck_rv fc_digestencryptupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong ulpartlen, ck_byte_ptr pencryptedpart, ck_ulong_ptr pulencryptedpartlen ); parameters hsession [in] session handle.
...ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong ulpartlen, ck_byte_ptr pencryptedpart, ck_ulong_ptr pulencryptedpartlen ); parameters hsession [in] session handle.
FC_GenerateRandom
name fc_generaterandom - generate a random number.
... fc_generaterandom - generate a random number.
FC_GetOperationState
name fc_getoperationstate - get the cryptographic operation state of a session.
...state of a session.
FC_SetPIN
name fc_setpin - modify the user's pin.
...he user's pin.
FC_Sign
name fc_sign - sign a block of data.
...ession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr psignature, ck_ulong_ptr pussignaturelen ); parameters hsession [in] session handle.
FC_SignEncryptUpdate
name fc_signencryptupdate - continue a multi-part signing and encryption operation syntax ck_rv fc_signencryptupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong ulpartlen, ck_byte_ptr pencryptedpart, ck_ulong_ptr pulencryptedpartlen ); parameters hsession [in] session handle.
...session_handle hsession, ck_byte_ptr ppart, ck_ulong ulpartlen, ck_byte_ptr pencryptedpart, ck_ulong_ptr pulencryptedpartlen ); parameters hsession [in] session handle.
FC_SignRecover
andle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr psignature, ck_ulong_ptr pussignaturelen ); parameters hsession [in] session handle.
...operation.
FC_UnwrapKey
ck_object_handle hunwrappingkey, ck_byte_ptr pwrappedkey, ck_ulong uswrappedkeylen, ck_attribute_ptr ptemplate, ck_ulong usattributecount, ck_object_handle_ptr phkey ); parameters hsession [in] session handle.
... pointer to the wrapped key.
FC_Verify
name fc_verify - sign a block of data.
... name fc_verify - sign a block of data.
FC_VerifyRecover
andle hsession, ck_byte_ptr psignature, ck_ulong ussignaturelen, ck_byte_ptr pdata, ck_ulong_ptr pusdatalen ); parameters hsession [in] session handle.
...operation.
FC_WrapKey
ct_handle hkey, ck_byte_ptr pwrappedkey, ck_ulong_ptr puswrappedkeylen ); parameters hsession [in] session handle.
...ession handle.
Utility functions
_decodetimechoice mxr 3.9 and later der_encode mxr 3.4 and later der_encodetimechoice mxr 3.9 and later der_generalizedtimetotime mxr 3.2 and later der_getinteger mxr 3.2 and later der_generalizeddaytoascii mxr 3.11.7 and later der_lengths mxr 3.2 and later der_timetoutctime mxr 3.2 and later der_timechoicedaytoascii mxr 3.11.7 and later der_timetogeneralizedtime mxr 3.11.7 and later der_timetogeneralizedtimearena mxr 3.11.7 and later der_utcdaytoascii mxr 3.2 and later ...
...2 and later sec_asn1encodersetstreaming mxr 3.2 and later sec_asn1encodersettakefrombuf mxr 3.2 and later sec_asn1encoderstart mxr 3.2 and later sec_asn1encoderupdate mxr 3.2 and later sec_asn1encodeunsignedinteger mxr 3.11.1 and later sec_asn1lengthlength mxr 3.2 and later sec_dupcrl mxr 3.9 and later sec_getsignaturealgorithmoidtag mxr 3.10 and later sec_getregisteredhttpclient mxr 3.12 and later sec_pkcs5getcryptoalgorithm mxr 3.2 and later sec_pkcs5getkeylength mxr 3.2 and later ...
NSS_3.12.3_release_notes.html
nss to allow shell-style wildcard patterns in certificates to match ssl server host names.
...ificates and crls based on weak hashes bug 471665: nss reports incorrect sizes for (aes) symmetric keys bug 471715: add cert to nssckbi to override rogue md5-collision ca cert bug 472291: crash in libpkix object leak tests due to null pointer dereferencing in pkix_build.c:3218.
Performance Hints
var statements use var statements when possible.
...tatements use var statements when possible.
Exact Stack Rooting
is that this requires us to overload operator->.
...tobject(foo) will not work as expected.
JSAPI User Guide
k here -- if it could be a gc thing, you must * add it to the gc's "root set" with js_add*root(cx, &thing) where thing * is a jsstring *, jsobject *, or jsdouble *, and remove the root before * rval goes out of scope, or when rval is no longer needed.
...s js_compileucfunctionforprincipals js_evaluatescript js_evaluateucscript js_evaluatescriptforprincipals js_evaluateucscriptforprincipals jschar-based functions work exactly like their char-based namesakes, except that where traditional functions take a char * argument, the unicode versions take a jschar * argument, usually with a separate argument specifying the length of the string in jschars.
JSIdArray
an array of property ids.
... an array of property ids.
JSPropertyOp
it is also called when the property is set via jsapi functions such as js_setproperty.
...e value left in *vp after the callback.
JS_CompareStrings
cx jscontext * the context to which both strings must belong.
...equences of code point value values.
JS_CompileUCFunctionForPrincipalsVersion
this article covers features introduced in spidermonkey 1.8.5 please provide a description for this function.
...name type description cx jscontext * the context.
JS_GetElement
r numeric property numbered index.
...t sets *vp to the element's current value.
JS_GetEmptyString
this article covers features introduced in spidermonkey 1.8.5 returns the empty string as a jsstring object.
...article covers features introduced in spidermonkey 1.8.5 returns the empty string as a jsstring object.
JS_GetLatin1FlatStringChars
xt..
...cannotgc &amp; a reference to js::autocheckcannotgc.
JS_GetStringCharAt
ngcharat(jsflatstring *str, size_t index); name type description cx jscontext * the context in which to create the new string.
...er.
JS_GetStringChars
obsolete since jsapi 33 name type description cx jscontext * (in js_getstringcharsz only) a context.
... type description cx jscontext * (in js_getstringcharsz only) a context.
JS_GetTwoByteExternalStringChars
escription str jsstring * a string to get characters.
... * a string to get characters.
JS_HasElement
lement or numeric property numbered index.
...undp to true.
JS_IdArrayGet
this article covers features introduced in spidermonkey 17 get the item of a jsidarray.
...nsigned index) name type description cx jscontext * a context.
JS_LookupElement
e.
...nd returns true (to indicate that no error occurred).
JS_PutEscapedString
str jsstring * or jsflatstring * a string to write into the file.
... js_putescapedstring and js_putescapedstring write str into buffer escaping any non-printable or non-ascii character using \escapes for js string literals.
SpiderMonkey 1.8.7
js_forget_string_flatness js_fileescapedstring js_finishjsonparse (removed in future releases, replaced with js_parsejson) js_flatstringequalsascii js_flattenstring js_flushcaches js_freezeobject js_getcompartmentprivate js_getemptystring js_getflatstringchars js_getgcparameter js_getgcparameterforthread js_getglobalforscopechain js_getinternedstringchars js_getinternedstringcharsandlength js_getownpropertydescriptor js_getpropertyattrsgetterandsetterbyid js_getpropertybyid js_getpropertybyiddefault js_getpropertydefault js_getpropertydescriptorbyid js_getruntimesecuritycallbacks js_getsecuritycallbacks js_getstringcharsandlength js_getstringcharsz js_getstringcharszandlength js_getstringencodinglength js_haspropertybyid js_initctypesclass js_internjsstring js_iscon...
...text pointer, to figure out how the function was called.
SpiderMonkey 38
bug 1037770) jsprop_ignore_value (bug 1037770) jsprop_propop_accessors (bug 1088002) jsprop_redefine_nonconfigurable (bug 1101123) js_addfinalizecallback (bug 996785) js_defineconstintegers (bug 1066020) js_getflatstringcharat (bug 1034627) js_getfunctionscript (bug 1069694) js_getlatin1flatstringchars (bug 1037869) js_getlatin1internedstringchars (bug 1037869) js_getlatin1stringcharsandlength (bug 1032726) js_getstringcharat (bug 1034627) js_gettwobyteexternalstringchars (bug 1034627) js_gettwobyteflatstringchars (bug 1037869) js_gettwobyteinternedstringchars (bug 1037869) js_gettwobytestringcharsandlength (bug 1032726) js_newplainobject (bug 1125356) js_removefinalizecallback (bug 996785) js_self_hosted_sym_fn (bug 1082672) js_sym_fn (bug 1082672) js_sym_fnspec (bug 1082672...
...(bug 1017323) js_deletepropertystub (bug 1103152) js_doubletoint32 (bug 1112774) js_doubletouint32 (bug 1112774) js_enumeratestub (bug 1103152) js_evaluatescript (bug 1100579) js_evaluateucscript (bug 1100579) js_executescriptversion (bug 1095660) js_getflatstringchars (bug 1037869) js_getfunctioncallback (bug 1103269) js_getinternedstringchars (bug 1037869) js_getinternedstringcharsandlength (bug 1037869) js_getstringcharsandlength (bug 1037869) js_getstringcharsz (bug 1037869) js_getstringcharszandlength (bug 1037869) js_gettypename (bug 1037718) js_isabouttobefinalized (bug 650161) js_lookupelement (bug 1094176) js_lookupproperty (bug 1094176) js_lookuppropertybyid (bug 1094176) js_lookupucproperty (bug 1094176) js_newpropertyiterator (bug 1081660) js_nextproperty (bug 1...
Feed content access API
sing code similar to this: fetch: function(feedurl) { var httprequest = null; function inforeceived() { var data = httprequest.responsetext; var ioservice = components.classes['@mozilla.org/network/io-service;1'] .getservice(components.interfaces.nsiioservice); var uri = ioservice.newuri(feedurl, null, null); if (data.length) { var parser = components.classes["@mozilla.org/feed-processor;1"] .createinstance(components.interfaces.nsifeedprocessor); var listener = new feedtestresultlistener(); try { parser.listener = listener; parser.parsefromstring(data, uri); } catch(e) { alert("error parsing feed."); ...
...indow var win = window.open("", "feedtest_window"); var doc = win.document.wrappedjsobject; doc.open(); // write the html header and page title doc.write("<html><head><title>feed: " + feed.title.text + "</title></head><body>"); doc.write("<h1>" + feed.title.text + "</h1><p>"); var itemarray = feed.items; var numitems = itemarray.length; // write the article information if (!numitems) { doc.write("<i>no news is good news!</i>"); } else { var i; var theentry; var theurl; var info; for (i=0; i<numitems; i++) { theentry = itemarray.queryelementat(i, components.interfaces.nsifeedentry); if (theentry) { ...
Places Developer Guide
"] .getservice(ci.nsinavbookmarksservice); var history = cc["@mozilla.org/browser/nav-history-service;1"] .getservice(ci.nsinavhistoryservice); var query = history.getnewquery(); // specify folders to be searched var folders = [bookmarks.toolbarfolder, bookmarks.bookmarksmenufolder, bookmarks.unfiledbookmarksfolder]; query.setfolders(folders, folders.length); // specify terms to search for, matches against title, url and tags query.searchterms = "firefox"; var options = history.getnewqueryoptions(); options.querytype = options.query_type_bookmarks; var result = history.executequery(query, options); // the root property of a query result is an object representing the folder you specified above.
...c.queryinterface(ci.nsibrowserhistory); var oururi = uri("http://www.mozilla.com"); // remove all visits for a single url from history browserhistory.removepage(oururi); // remove all visits for multiple urls from history var uristodelete = [oururi]; // will call nsinavhistoryobserver.onbeginupdatebatch/onendupdatebatch var donotify = false; browserhistory.removepages(uristodelete, uristodelete.length, donotify); // remove all visits within a given time period var enddate = date.now() * 1000; // now, in microseconds var startdate = enddate - (7 * 86400 * 1000 * 1000); // one week ago, in microseconds browserhistory.removepagesbytimeframe(startdate, enddate); // remove all pages for a given host var entiredomain = true; // will delete from all hosts from the given domain browserhistory.remove...
Components.Constructor
c sugar) for actions that can be accomplished using other common methods.
...ng javascript function: function components_constructor(contractid, interfacename, initializer) { var ccargs = arguments; function ctor() { var instance = components.classes[contractid] .createinstance(components.interfaces.nsisupports); if (ccargs.length > 1) { instance.queryinterface(components.interfaces[interfacename]); if (ccargs.length > 2) instance[initializer].apply(instance, arguments); } return instance; } return ctor; } ...
IAccessibleAction
xt menu.
...lement this method for single action controls since that would be redundant with the standard msaa programming practice of getting the mnemonic from get_acckeyboardshortcut.
IAccessibleRelation
n last changed in gecko 1.9 (firefox 3) method overview [propget] hresult localizedrelationtype([out] bstr localizedrelationtype ); [propget] hresult ntargets([out] long ntargets ); [propget] hresult relationtype([out] bstr relationtype ); [propget] hresult target([in] long targetindex, [out] iunknown target ); [propget] hresult targets([in] long maxtargets, [out, size_is(maxtargets), length_is( ntargets)] iunknown targets, [out] long ntargets ); methods localizedrelationtype() returns a localized version of the relation type.
...et.
mozISpellCheckingEngine
misspelled.
...tions for a misspelled word.
nsIAccessibleTextChangeEvent
accessible/public/nsiaccessibleevent.idlscriptable please add a summary to this article.
... accessible/public/nsiaccessibleevent.idlscriptable please add a summary to this article.
nsIConsoleService
ed since it could be removed at any time.
...holder word for messages, showing as a 0-length array when called from the script.
nsIDOMXPathResult
only.
... read only.
nsILoginManagerStorage
insavingenabled( in astring ahost, in boolean isenabled ); parameters ahost the host for which to enable or disable login saving.
...out a pathname (for example: "http://mozilla.com").
nsIMimeConverter
mailcharset, in long fieldnamelen, in long encodedwordsize); parameters header the string to encode into the mime-encoded form.
... in long encodedwordsize); parameters header the string to encode into the mime-encoded form.
nsIPromptService
in wstring atext, in pruint32 acount, [array, size_is(acount)] in wstring aselectlist, out long aoutselection ); aparent the parent window for the dialog.
...played.
nsIProtocolProxyService
r); constants constant value description resolve_non_blocking 1<<0 this flag may be passed to the resolve method to request that it fail instead of block the calling thread.
... "direct" - specifies a direct connection (useful for failover) the type name is case-insensitive.
nsIServerSocket
abacklog ); parameters aport the port of the server socket.
...to use the default value.
nsIVariant
ng in the iso-8859-1 character set.
...it is cast directly to prunichar.
NS_CStringGetMutableData
« xpcom api reference summary the ns_cstringgetmutabledata function gives the caller write access to the string's internal buffer.
... « xpcom api reference summary the ns_cstringgetmutabledata function gives the caller write access to the string's internal buffer.
Working with windows in chrome code
sheet href="chrome://global/skin/" type="text/css"?> <window onload="onload();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script><![cdata[ var gstatus, gprogressmeter; var maxprogress = 100; function onload() { gstatus = document.getelementbyid("status"); gprogressmeter = document.getelementbyid("progressmeter"); if("arguments" in window && window.arguments.length > 0) { maxprogress = window.arguments[0].maxprogress; setprogress(window.arguments[0].progress); setstatus(window.arguments[0].status); } } function setprogress(value) { gprogressmeter.value = 100 * value / maxprogress; } function setstatus(text) { gstatus.value = "status: " + text + "..."; } ]]></script> <label id="status" value="(no status)" /> <hbox> <progressmeter id="...
...g the data.
Debugger.Script - Firefox Developer Tools
erialized text format of the webassembly code.
...urcestart if the instance refers to a jsscript, the character within the debugger.source instance given by source at which this script’s code starts; zero-based.
AesKeyGenParams - Web APIs
rams dictionary of the web crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.generatekey(), when generating an aes key: that is, when the algorithm is identified as any of aes-cbc, aes-ctr, aes-gcm, or aes-kw.
...crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.generatekey(), when generating an aes key: that is, when the algorithm is identified as any of aes-cbc, aes-ctr, aes-gcm, or aes-kw.
AudioBuffer() - Web APIs
the audiobuffer constructor of the web audio api creates a new audiobuffer object.
... the audiobuffer constructor of the web audio api creates a new audiobuffer object.
AudioBuffer.copyFromChannel() - Web APIs
zeerror one of the input parameters has a value that is outside the accepted range: the value of channelnumber specifies a channel number which doesn't exist (that is, it's greater than or equal to the value of numberofchannels on the channel).
...n the channel).
AudioBufferSourceNode.loopEnd - Web APIs
e this code running live, or view the source.
...tion() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; songlength = buffer.duration; source.buffer = mybuffer; source.playbackrate.value = playbackcontrol.value; source.connect(audioctx.destination); source.loop = true; loopstartcontrol.setattribute('max', math.floor(songlength)); loopendcontrol.setattribute('max', math.floor(songlength)); }, function(e){"error with decoding audio data" + e.err}); } request.send(); } ...
AudioBufferSourceNode.loopStart - Web APIs
see this code running live, or view the source.
...tion() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; songlength = buffer.duration; source.buffer = mybuffer; source.playbackrate.value = playbackcontrol.value; source.connect(audioctx.destination); source.loop = true; loopstartcontrol.setattribute('max', math.floor(songlength)); loopendcontrol.setattribute('max', math.floor(songlength)); }, function(e){"error with decoding audio data" + e.err}); } request.send(); } ...
AudioParam.setTargetAtTime() - Web APIs
a reference to this audioparam object.
... timeconstant 99.3% n * timeconstant 1-e-n1 - e^{-n} examples in this example, we have a media source with two control buttons (see the webaudio-examples repo for the source code, or view the example live.) when these buttons are pressed, settargetattime() is used to fade the gain value up to 1.0, and down to 0, respectively, with the effect starting after 1 second, and the length of time the effect lasts being controlled by the timeconstant.
AudioTrackList.onremovetrack - Web APIs
bject which indicates in its track property which audio track has been removed from the media element.
...mple example just fetches the current number of audio tracks in the media element whenever a track is removed from the media element.
AudioTrackList - Web APIs
terface is used to represent a list of the audio tracks contained within a given html media element, with each track represented by a separate audiotrack object in the list.
...yselector("video").audiotracks; monitoring track count changes in this example, we have an app that displays information about the number of channels available.
AudioWorkletNode() - Web APIs
the value to initialize the numberofinputs property to.
...tom parameter and value being its initial value.
AudioWorkletNodeOptions - Web APIs
the value to initialize the numberofinputs property to.
...ue being its initial value.
Background Tasks API - Web APIs
there isn't any actual idle time available.
...re's enough idle time available to let us do some work or our timeout of one second expires.
BiquadFilterNode.getFrequencyResponse() - Web APIs
omputed phase response values in radians for each frequency value in the input frequencyarray.
...and output them in a human-readable list at the bottom of the page: var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = range.value; ...
Blob.size - Web APIs
Web › API › Blob › size
the blob interface's size property returns the size of the blob or file in bytes.
... uses an <input> element of type file to ask the user for a group of files, then iterates over those files outputting their names and lengths in bytes.
CSSStyleDeclaration - Web APIs
e, document.stylesheets[0].cssrules[0].style returns a cssstyledeclaration object on the first css rule in the document's first stylesheet.
...perty() modifies an existing css property or creates a new css property in the declaration block.
CSSUnparsedValue.CSSUnparsedValue() - Web APIs
property values that reference custom properties.
...unparsedvalue(members) parameters members an array whose values must be either a usvstring or a cssvariablereferencevalue.
CanvasRenderingContext2D.createImageData() - Web APIs
height arguments is zero.
... since each pixel consists of four values, the for loop iterates by multiples of four.
CanvasRenderingContext2D.lineJoin - Web APIs
the canvasrenderingcontext2d.linejoin property of the canvas 2d api determines the shape used to join two line segments where they meet.
...eto(280, 20); ctx.lineto(280, 150); ctx.stroke(); result comparison of line joins the example below draws three different paths, demonstrating each of the three linejoin options.
Basic animations - Web APIs
[0], h: this.h, w: this.w }, t)), this.sn.unshift(i), -1 != e) return console.log(e), fa[e].renew(), void (document.getelementbyid("score").innertext = number(document.getelementbyid("score").innertext) + 1); this.sn.pop(), console.log(6) } this.sn.foreach((t, e, i) => { if (0 == e || i.length - 1 == e) { var n = c.createlineargradient(t.x, t.y, t.x + this.w, t.y + this.h); i.length - 1 == e ?
...nt(t.x, t.y, t.x + this.w, t.y + this.h); i.length - 1 == e ?
Pixel manipulation with canvas - Web APIs
const canvaswidth = 1024; const getcolorindicesforcoord = (x, y, width) => { const red = y * (width * 4) + x * 4; return [red, red + 1, red + 2, red + 3]; }; const colorindices = getcolorindicesforcoord(xcoord, ycoord, canvaswidth); const [redindex, greenindex, blueindex, alphaindex] = colorindices; you may also access the size of the pixel array in bytes by reading the uint8clampedarray.length attribute: var numbytes = imagedata.data.length; creating an imagedata object to create a new, blank imagedata object, you should use the createimagedata() method.
...emos.org/files/5397/rhino.jpg'; img.onload = function() { draw(this); }; function draw(img) { var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.drawimage(img, 0, 0); img.style.display = 'none'; var imagedata = ctx.getimagedata(0, 0, canvas.width, canvas.height); var data = imagedata.data; var invert = function() { for (var i = 0; i < data.length; i += 4) { data[i] = 255 - data[i]; // red data[i + 1] = 255 - data[i + 1]; // green data[i + 2] = 255 - data[i + 2]; // blue } ctx.putimagedata(imagedata, 0, 0); }; var grayscale = function() { for (var i = 0; i < data.length; i += 4) { var avg = (data[i] + data[i + 1] + data[i + 2]) / 3; data[i] = avg; // red data[i + 1] = avg; //...
CharacterData - Web APIs
ce" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">characterdata</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, node, and implements the childnode and nondocumenttypechildnode interface.
...d domstring.
ChildNode.after() - Web APIs
Web › API › ChildNode › after
; }); this.parentnode.insertbefore(docfrag, this.nextsibling); } }); }); })([element.prototype, characterdata.prototype, documenttype.prototype]); another polyfill // from: https://github.com/fabiovergani/js-polyfill_element.prototype.after/blob/master/after.js (function(x){ var o=x.prototype,p='after'; if(!o[p]){ o[p]=function(){ var e, m=arguments, l=m.length, i=0, t=this, p=t.parentnode, n=node, s=string, d=document; if(p!==null){ while(i<l){ e=m[i]; if(e instanceof n){ t=t.nextsibling; if(t!==null){ p.insertbefore(e,t); }else{ p.appendchild(e); }; }else{ p.appendchild(d.createtextnode(s(e))); }; ++i; ...
... t=t.nextsibling; if(t!==null){ p.insertbefore(e,t); }else{ p.appendchild(e); }; }else{ p.appendchild(d.createtextnode(s(e))); }; ++i; }; }; }; }; })(element); /* minified: (function(x){ var o=x.prototype; o.after||(o.after=function(){var e,m=arguments,l=m.length,i=0,t=this,p=t.parentnode,n=node,s=string,d=document;if(p!==null){while(i<l){((e=m[i]) instanceof n)?(((t=t.nextsibling )!==null)?p.insertbefore(e,t):p.appendchild(e)):p.appendchild(d.createtextnode(s(e)));++i;}}}); }(element)); */ specification specification status comment domthe definition of 'childnode.after()' in that specification.
Crypto.getRandomValues() - Web APIs
or a uint32array.
...alues taken from an external source of pseudorandom numbers, such as a platform-specific random number function, the unix /dev/urandom device, or other source of random or pseudorandom data.
DOMStringList - Web APIs
a type returned by some apis which contains a list of domstring (strings).
... a type returned by some apis which contains a list of domstring (strings).
DOMTokenList - Web APIs
the domtokenlist interface represents a set of space-separated tokens.
...cts.
DataTransfer.items - Web APIs
ed = "move"; } function drop_handler(ev) { console.log("drop: target.id = " + ev.target.id); ev.preventdefault(); // get the id of the target and add the moved element to the target's dom var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); // print each format type if (ev.datatransfer.types != null) { for (var i=0; i < ev.datatransfer.types.length; i++) { console.log("...
...fer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); // print each format type if (ev.datatransfer.types != null) { for (var i=0; i < ev.datatransfer.types.length; i++) { console.log("...
DataTransfer.types - Web APIs
ed = "move"; } function drop_handler(ev) { console.log("drop: target.id = " + ev.target.id); ev.preventdefault(); // get the id of the target and add the moved element to the target's dom var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); // print each format type if (ev.datatransfer.types != null) { for (var i=0; i < ev.datatransfer.types.length; i++) { console.log("...
...fer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); // print each format type if (ev.datatransfer.types != null) { for (var i=0; i < ev.datatransfer.types.length; i++) { console.log("...
DataTransferItemList.DataTransferItem() - Web APIs
t using array-style syntax (that is datatransferitem[index]).
... datalist.add(ev.target.id, "text/plain"); // add some other items to the drag payload datalist.add("<p>...
DataTransferItemList.add() - Web APIs
atalist.add(ev.target.id, "text/plain"); // add some other items to the drag payload datalist.add("<p>...
...m is uri data[i].getasstring(function (s){ console.log("...
DataTransferItemList.clear() - Web APIs
atalist.add(ev.target.id, "text/plain"); // add some other items to the drag payload datalist.add("<p>...
...m is uri data[i].getasstring(function (s){ console.log("...
Document.anchors - Web APIs
Web › API › Document › anchors
the anchors read-only property of the document interface returns a list of all of the anchors in the document.
... example if (document.anchors.length >= 5) { dump("found too many anchors"); } the following is an example that auto populates a table of contents with every anchor on the page: <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>test</title> <script> function init() { var toc = document.getelementbyid("toc"); var i, li, newanchor; for (i = 0; i < document.anchors.length; i++) { li = document.createelement("li"); newanchor = document.createelement('a'); newanchor.href = "#" + document.anchors[i].name; newanchor.innerhtml = document.anchors[i].text; li.appendchild(newanchor); toc.appendchild(li); } } </script> </head> <body onload="init()"> <h1>title</h1> <h2><a name="contents">contents</a></h2> <ul id="toc"></ul> <h2><a name="plants">p...
Document.getElementsByTagName() - Web APIs
uses getelementsbytagname() to count the descendant paragraph elements of a particular parent (either the document itself or one of two nested <div> elements).
...lementsbytagname example</title> <script> function getallparaelems() { var allparas = document.getelementsbytagname('p'); var num = allparas.length; alert('there are ' + num + ' paragraph in this document'); } function div1paraelems() { var div1 = document.getelementbyid('div1'); var div1paras = div1.getelementsbytagname('p'); var num = div1paras.length; alert('there are ' + num + ' paragraph in #div1'); } function div2paraelems() { var div2 = document.getelementbyid('div2'); var div2paras = div2.getelementsbytagname('p'); var num = div2paras.length; alert('there are ' + num + ' paragraph in #div2'); } </script> </head> <body style="border: solid green 3px"> <p>some outer text</p> <p>some outer te...
DocumentOrShadowRoot.elementsFromPoint() - Web APIs
zontal coordinate of a point.
... an array of element objects.
DocumentOrShadowRoot.nodesFromPoint() - Web APIs
the horizontal coordinate of a point.
... returns an array of node objects.
Element.getAttributeNames() - Web APIs
tes.
...tributenames = element.getattributenames(); example // iterate over element's attributes for (let name of element.getattributenames()) { let value = element.getattribute(name); console.log(name, value); } polyfill if (element.prototype.getattributenames == undefined) { element.prototype.getattributenames = function () { var attributes = this.attributes; var length = attributes.length; var result = new array(length); for (var i = 0; i < length; i++) { result[i] = attributes[i].name; } return result; }; } specifications specification status comment domthe definition of 'element.getattributenames' in that specification.
Element.getClientRects() - Web APIs
raws the client rects for all html elements that have css class withclientrectsoverlay assigned.
... less.
Element.getElementsByClassName() - Web APIs
('red test'); examining the results you can use either the item() method on the returned htmlcollection or standard array syntax to examine individual elements in the collection.
...k as one might expect because "matches" will change as soon as any "colorbox" class is removed.
Element.matches() - Web APIs
Web › API › Element › matches
ing representing the selector to test.
...totype.matches) { element.prototype.matches = element.prototype.matchesselector || element.prototype.mozmatchesselector || element.prototype.msmatchesselector || element.prototype.omatchesselector || element.prototype.webkitmatchesselector || function(s) { var matches = (this.document || this.ownerdocument).queryselectorall(s), i = matches.length; while (--i >= 0 && matches.item(i) !== this) {} return i > -1; }; } however, given the practicality of supporting older browsers, the following should suffice for most (if not all) practical cases (i.e.
Event.eventPhase - Web APIs
Web › API › Event › eventPhase
divinfo = null, divs = null, usecapture = false; window.onload = function () { divinfo = document.getelementbyid('divinfo') divs = document.getelementsbytagname('div') chcapture = document.getelementbyid('chcapture') chcapture.onclick = function () { removelisteners() addlisteners() } clear() addlisteners() } function removelisteners() { for (let i = 0; i < divs.length; i++) { let d = divs[i] if (d.id != "divinfo") { d.removeeventlistener("click", ondivclick, true) d.removeeventlistener("click", ondivclick, false) } } } function addlisteners() { for (let i = 0; i < divs.length; i++) { let d = divs[i] if (d.id != "divinfo") { if (chcapture.checked) { d.addeventlistener("click", ondivclick, true) } ...
...alse } if (e.eventphase == 2) e.currenttarget.style.backgroundcolor = 'red'; let level = e.eventphase == 0 ?
Using FormData Objects - Web APIs
rmation that's not necessarily user-editable.
...s using formdata.
Gamepad - Web APIs
Web › API › Gamepad
in, or is most likely to be held in.
...to be held in.
GamepadEvent.gamepad - Web APIs
sociated gamepad data for fired gamepadconnected and gamepaddisconnected events.
...or fired gamepadconnected and gamepaddisconnected events.
GamepadEvent - Web APIs
amepadevent.gamepad read only returns a gamepad object, providing access to the associated gamepad data for the event fired.
...d only returns a gamepad object, providing access to the associated gamepad data for the event fired.
GlobalEventHandlers.oninput - Web APIs
lled for each alteration to an element's value.
... characters in an <input> element, every time you modify its contents.
HTMLCanvasElement.toDataURL() - Web APIs
picture" /> javascript window.addeventlistener('load', removecolors); function showcolorimg() { this.style.display = 'none'; this.nextsibling.style.display = 'inline'; } function showgrayimg() { this.previoussibling.style.display = 'inline'; this.style.display = 'none'; } function removecolors() { var aimages = document.getelementsbyclassname('grayscale'), nimgslen = aimages.length, ocanvas = document.createelement('canvas'), octx = ocanvas.getcontext('2d'); for (var nwidth, nheight, oimgdata, ograyimg, npixel, apix, npixlen, nimgid = 0; nimgid < nimgslen; nimgid++) { ocolorimg = aimages[nimgid]; nwidth = ocolorimg.offsetwidth; nheight = ocolorimg.offsetheight; ocanvas.width = nwidth; ocanvas.height = nheight; octx.drawimage(ocolorimg, ...
... nheight, oimgdata, ograyimg, npixel, apix, npixlen, nimgid = 0; nimgid < nimgslen; nimgid++) { ocolorimg = aimages[nimgid]; nwidth = ocolorimg.offsetwidth; nheight = ocolorimg.offsetheight; ocanvas.width = nwidth; ocanvas.height = nheight; octx.drawimage(ocolorimg, 0, 0); oimgdata = octx.getimagedata(0, 0, nwidth, nheight); apix = oimgdata.data; npixlen = apix.length; for (npixel = 0; npixel < npixlen; npixel += 4) { apix[npixel + 2] = apix[npixel + 1] = apix[npixel] = (apix[npixel] + apix[npixel + 1] + apix[npixel + 2]) / 3; } octx.putimagedata(oimgdata, 0, 0); ograyimg = new image(); ograyimg.src = ocanvas.todataurl(); ograyimg.onmouseover = showcolorimg; ocolorimg.onmouseout = showgrayimg; octx.clearrect(0, 0, nwidth, ...
HTMLCanvasElement - Web APIs
ttribute of the <canvas> element is a positive integer reflecting the number of logical pixels (or rgba values) going down one column of the canvas.
...l attribute of the <canvas> element is a positive integer reflecting the number of logical pixels (or rgba values) going across one row of the canvas.
HTMLImageElement.sizes - Web APIs
a media condition as defined by the media queries standard.
...ia condition.
HTMLInputElement.mozGetFileNameArray() - Web APIs
the htmlinputelement.mozgetfilenamearray() method returns an array of the names of the files that were selected by the user on an html input element.
... the htmlinputelement.mozgetfilenamearray() method returns an array of the names of the files that were selected by the user on an html input element.
HTMLInputElement.select() - Web APIs
nction selecttext() { const input = document.getelementbyid('text-box'); input.focus(); input.select(); } result notes calling element.select() will not necessarily focus the input, so it is often used with htmlelement.focus().
...ement.select() will not necessarily focus the input, so it is often used with htmlelement.focus().
HTMLInputElement.setSelectionRange() - Web APIs
wish to select all text of an input element, you can use the htmlinputelement.select() method instead.
...]); parameters if selectionend is less than selectionstart, then both are treated as the value of selectionend.
HTMLSelectElement.selectedOptions - Web APIs
an htmlcollection which lists every currently selected htmloptionelement which is either a child of the htmlselectelement or of an htmloptgroupelement within the <select> element.
... establishes the event handler for the button, as well as the event handler itself, looks like this: let orderbutton = document.getelementbyid("order"); let itemlist = document.getelementbyid("foods"); let outputbox = document.getelementbyid("output"); orderbutton.addeventlistener("click", function() { let collection = itemlist.selectedoptions; let output = ""; for (let i=0; i<collection.length; i++) { if (output === "") { output = "your order for the following items has been placed: "; } output += collection[i].label; if (i === (collection.length - 2) && (collection.length < 3)) { output += " and "; } else if (i < (collection.length - 2)) { output += ", "; } else if (i === (collection.length - 2)) { output += ", and "; } } if (...
HTMLSelectElement - Web APIs
indicates whether the control is disabled.
...idity and validationmessage properties.
The HTML DOM API - Web APIs
javascript const namefield = document.getelementbyid("username"); const sendbutton = document.getelementbyid("sendbutton") sendbutton.disabled = true; // [note: this is disabled since it causes this article to always load with this example focused and scrolled into view] //namefield.focus(); namefield.addeventlistener("input", event => { const elem = event.target; const valid = elem.value.length != 0; if (valid && sendbutton.disabled) { sendbutton.disabled = false; } else if (!valid && !sendbutton.disabled) { sendbutton.disabled = true; } }); this code uses the document interface's getelementbyid() method to get the dom object representing the <input> elements whose ids are username and sendbutton.
...se elements.
File drag and drop - Web APIs
process a file using the file api.
...= 0; i < ev.datatransfer.items.length; i++) { // if dropped items aren't files, reject them if (ev.datatransfer.items[i].kind === 'file') { var file = ev.datatransfer.items[i].getasfile(); console.log('...
Ajax navigation example - Web APIs
assign(surl); } } function processlink () { if (this.classname === sajaxclass) { requestpage(this.href); return false; } return true; } function init () { opageinfo.title = document.title; history.replacestate(opageinfo, opageinfo.title, opageinfo.url); for (var olink, nidx = 0, nlen = document.links.length; nidx < nlen; document.links[nidx++].onclick = processlink); } const /* customizable constants */ stargetid = "ajax-content", sviewkey = "view_as", sajaxclass = "ajax-nav", /* not customizable constants */ rsearch = /\?.*$/, rhost = /^[^\?]*\?*&*/, rview = new regexp("&" + sviewkey + "\\=[^&]*|&*$", "i"), rendqstmark = /\?$/, oloadingbox = docume...
...ect", 400: "bad request", 401: "unauthorized", 402: "payment required", 403: "forbidden", 404: "not found", 405: "method not allowed", 406: "not acceptable", 407: "proxy authentication required", 408: "request timeout", 409: "conflict", 410: "gone", 411: "length required", 412: "precondition failed", 413: "request entity too large", 414: "request-uri too long", 415: "unsupported media type", 416: "requested range not satisfiable", 417: "expectation failed", 422: "unprocessable entity", 423: "locked", 424: "failed dependency", 425: "unas...
History API - Web APIs
larly, you can move forward 2 pages by passing 2, and so forth.
...o forth.
IIRFilterNode.getFrequencyResponse() - Web APIs
magresponseoutput a float32array to receive the computed magnitudes of the freqency response for each frequency value in the frequencyarray.
...at the bottom of the page: var feedforwardcoefficients = [0.1, 0.2, 0.3, 0.4, 0.5]; var feedbackcoefficients = [0.5, 0.4, 0.3, 0.2, 0.1]; var iirfilter = audioctx.createiirfilter(feedforwardcoefficients, feedbackcoefficients); ...
ImageData.data - Web APIs
Web › API › ImageData › data
ta examples getting an imagedata object's pixel data this example creates an imagedata object that is 100 pixels wide and 100 pixels tall, making 10,000 pixels in all.
...el consists of four values within the data array, the for loop iterates by multiples of four.
Navigator.getGamepads() - Web APIs
the array may be null if a gamepad disconnects during a session, so that the remaining gamepads retain the same index.
... null if a gamepad disconnects during a session, so that the remaining gamepads retain the same index.
Node.childNodes - Web APIs
Web › API › Node › childNodes
ead-only property returns a live nodelist of child nodes of the given element where the first child node is assigned index 0.
...st = elementnodereference.childnodes; examples simple usage // parg is an object reference to a <p> element // first check that the element has child nodes if (parg.haschildnodes()) { let children = parg.childnodes; for (let i = 0; i < children.length; i++) { // do something with each child as children[i] // note: list is live!
Node.normalize() - Web APIs
Web › API › Node › normalize
de and all of its sub-tree into a "normalized" form.
... element.normalize(); example let wrapper = document.createelement("div"); wrapper.appendchild( document.createtextnode("part 1 ") ); wrapper.appendchild( document.createtextnode("part 2 ") ); // at this point, wrapper.childnodes.length === 2 // wrapper.childnodes[0].textcontent === "part 1 " // wrapper.childnodes[1].textcontent === "part 2 " wrapper.normalize(); // now, wrapper.childnodes.length === 1 // wrapper.childnodes[0].textcontent === "part 1 part 2 " specifications specification status comment domthe definition of 'node: normalize' in that specification.
ParentNode.children - Web APIs
h it was called.
...rdered collection of the dom elements which are children of node.
ParentNode.querySelectorAll() - Web APIs
ueryselectorall() behaves differently than most common javascript dom libraries, which might lead to unexpected results.
...ase element on which the search is performed (.select).
performance.getEntries() - Web APIs
supported"); return; } // create some performance entries via the mark() method performance.mark("begin"); do_work(50000); performance.mark("end"); performance.mark("begin"); do_work(100000); performance.mark("end"); do_work(200000); performance.mark("end"); // use getentries() to iterate through the each entry let p = performance.getentries(); for (var i=0; i < p.length; i++) { console.log("entry[" + i + "]"); check_performanceentry(p[i]); } // use getentriesbytype() to get all "mark" entries p = performance.getentriesbytype("mark"); for (let i=0; i < p.length; i++) { console.log ("mark only entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); } // use getentri...
...ark" entries p = performance.getentriesbytype("mark"); for (let i=0; i < p.length; i++) { console.log ("mark only entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); } // use getentriesbyname() to get all "mark" entries named "begin" p = performance.getentriesbyname("begin", "mark"); for (let i=0; i < p.length; i++) { console.log ("mark and begin entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); } } specifications specification status comment performance timeline level 2the definition of 'getentries()' in that specification.
performance.getEntriesByName() - Web APIs
supported"); return; } // create some performance entries via the mark() method performance.mark("begin"); do_work(50000); performance.mark("end"); performance.mark("begin"); do_work(100000); performance.mark("end"); do_work(200000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); check_performanceentry(p[i]); } // use getentries(name, entrytype) to get specific entries p = performance.getentries({name : "begin", entrytype: "mark"}); for (var i=0; i < p.length; i++) { log("begin[" + i + "]"); check_performanceentry(p[i]); } // use getentriesbytype() to get all "mark" entries p = performance.getentriesbytype("...
...+ "]"); check_performanceentry(p[i]); } // use getentries(name, entrytype) to get specific entries p = performance.getentries({name : "begin", entrytype: "mark"}); for (var i=0; i < p.length; i++) { log("begin[" + i + "]"); check_performanceentry(p[i]); } // use getentriesbytype() to get all "mark" entries p = performance.getentriesbytype("mark"); for (var i=0; i < p.length; i++) { log ("mark only entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); } // use getentriesbyname() to get all "mark" entries named "begin" p = performance.getentriesbyname("begin", "mark"); for (var i=0; i < p.length; i++) { log ("mark and begin entry[" + i + "]: name = " + p[i].name + "; ...
performance.getEntriesByType() - Web APIs
not supported"); return; } // create some performance entries via the mark() method performance.mark("begin"); dowork(50000); performance.mark("end"); performance.mark("begin"); dowork(100000); performance.mark("end"); dowork(200000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); checkperformanceentry(p[i]); } // use getentries(name, entrytype) to get specific entries p = performance.getentries({name : "begin", entrytype: "mark"}); for (var i=0; i < p.length; i++) { log("begin[" + i + "]"); checkperformanceentry(p[i]); } // use getentriesbytype() to get all "mark" entries p = performance.getentriesbytype("ma...
...i + "]"); checkperformanceentry(p[i]); } // use getentries(name, entrytype) to get specific entries p = performance.getentries({name : "begin", entrytype: "mark"}); for (var i=0; i < p.length; i++) { log("begin[" + i + "]"); checkperformanceentry(p[i]); } // use getentriesbytype() to get all "mark" entries p = performance.getentriesbytype("mark"); for (var i=0; i < p.length; i++) { log ("mark only entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); } // use getentriesbyname() to get all "mark" entries named "begin" p = performance.getentriesbyname("begin", "mark"); for (var i=0; i < p.length; i++) { log ("mark and begin entry[" + i + "]: name = " + p[i].name + "; ...
performance.mark() - Web APIs
Web › API › Performance › mark
example shows how to use mark() to create and retrieve performancemark entries.
...k("squirrel"); performance.mark("monkey"); performance.mark("monkey"); performance.mark("dog"); performance.mark("dog"); // get all of the performancemark entries.
PerformanceEntry.duration - Web APIs
try() { log("performanceentry support ..."); if (performance.mark === undefined) { log("...
...50000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); check_performanceentry(p[i]); } } function check_performanceentry(obj) { var properties = ["name", "entrytype", "starttime", "duration"]; var methods = ["tojson"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in obj; if (supported) log("..." + properties[i] + " = " + obj[properties[i]]); else log("..." + properties[i] + " = not supported"); } for (var i=0; i < methods.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[method...
PerformanceEntry.name - Web APIs
try() { log("performanceentry support ..."); if (performance.mark === undefined) { log("...
...50000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); check_performanceentry(p[i]); } } function check_performanceentry(obj) { var properties = ["name", "entrytype", "starttime", "duration"]; var methods = ["tojson"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in obj; if (supported) log("..." + properties[i] + " = " + obj[properties[i]]); else log("..." + properties[i] + " = not supported"); } for (var i=0; i < methods.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[method...
PerformanceEntry.startTime - Web APIs
try() { log("performanceentry support ..."); if (performance.mark === undefined) { log("...
...50000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); check_performanceentry(p[i]); } } function check_performanceentry(obj) { var properties = ["name", "entrytype", "starttime", "duration"]; var methods = ["tojson"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in obj; if (supported) log("..." + properties[i] + " = " + obj[properties[i]]); else log("..." + properties[i] + " = not supported"); } for (var i=0; i < methods.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[method...
PerformanceEntry.toJSON() - Web APIs
try() { log("performanceentry support ..."); if (performance.mark === undefined) { log("...
...50000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); check_performanceentry(p[i]); } } function check_performanceentry(obj) { var properties = ["name", "entrytype", "starttime", "duration"]; var methods = ["tojson"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in obj; if (supported) log("..." + properties[i] + " = " + obj[properties[i]]); else log("..." + properties[i] + " = not supported"); } for (var i=0; i < methods.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[method...
PerformanceEntry - Web APIs
formanceentry.tojson() returns a json representation of the performanceentry object.
... a list of all performance entries var p = performance.getentries(); for (var i=0; i < p.length; i++) { console.log("performanceentry[" + i + "]"); print_performanceentry(p[i]); } } function print_performanceentry(perfentry) { var properties = ["name", "entrytype", "starttime", "duration"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceObserverEntryList.getEntries() - Web APIs
name: " + pe.name + "; entrytype: " + pe.entrytype + "; starttime: " + pe.starttime + "; duration: " + pe.duration); } // create observer for all performance event types var observe_all = new performanceobserver(function(list, obs) { var perfentries; // print all entries perfentries = list.getentries(); for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } // print entries named "begin" with type "mark" perfentries = list.getentriesbyname("begin", "mark"); for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } // print entries with type "mark" perfentries = list.getentriesbytype("mark"); for (var i=0; i < perfentries.length; i++) { print_perf_entry(p...
...; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } }); // subscribe to all performance event types observe_all.observe({entrytypes: ['frame', 'mark', 'measure', 'navigation', 'resource', 'server']}); var observe_frame = new performanceobserver(function(list, obs) { var perfentries = list.getentries(); // should only have 'frame' entries for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } }); // subscribe to frame event only observe_frame.observe({entrytypes: ['frame']}); specifications specification status comment performance timeline level 2the definition of 'getentries()' in that specification.
PerformanceObserverEntryList.getEntriesByName() - Web APIs
name: " + pe.name + "; entrytype: " + pe.entrytype + "; starttime: " + pe.starttime + "; duration: " + pe.duration); } // create observer for all performance event types var observe_all = new performanceobserver(function(list, obs) { var perfentries; // print all entries perfentries = list.getentries(); for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } // print entries named "begin" with type "mark" perfentries = list.getentriesbyname("begin", "mark"); for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } // print entries with type "mark" perfentries = list.getentriesbytype("mark"); for (var i=0; i < perfentries.length; i++) { print_perf_entry(p...
...; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } }); // subscribe to all performance event types observe_all.observe({entrytypes: ['frame', 'mark', 'measure', 'navigation', 'resource', 'server']}); var observe_frame = new performanceobserver(function(list, obs) { var perfentries = list.getentries(); // should only have 'frame' entries for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } }); // subscribe to only the 'frame' event observe_frame.observe({entrytypes: ['frame']}); specifications specification status comment performance timeline level 2the definition of 'getentriesbyname()' in that specification.
PerformanceObserverEntryList.getEntriesByType() - Web APIs
name: " + pe.name + "; entrytype: " + pe.entrytype + "; starttime: " + pe.starttime + "; duration: " + pe.duration); } // create observer for all performance event types var observe_all = new performanceobserver(function(list, obs) { var perfentries; // print all entries perfentries = list.getentries(); for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } // print entries named "begin" with type "mark" perfentries = list.getentriesbyname("begin", "mark"); for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } // print entries with type "mark" perfentries = list.getentriesbytype("mark"); for (var i=0; i < perfentries.length; i++) { print_perf_entry(p...
...; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } }); // subscribe to all performance event types observe_all.observe({entrytypes: ['frame', 'mark', 'measure', 'navigation', 'resource', 'server']}); var observe_frame = new performanceobserver(function(list, obs) { var perfentries = list.getentries(); // should only have 'frame' entries for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } }); // subscribe to only the 'frame' event observe_frame.observe({entrytypes: ['frame']}); specifications specification status comment performance timeline level 2the definition of 'getentriesbytype()' in that specification.
PerformanceResourceTiming.connectEnd - Web APIs
ectend; return value a domhighrestimestamp representing the time after a connection is established.
...fentry) { // print timestamps of the *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.connectStart - Web APIs
ediately before the browser starts to establish the connection to the server to retrieve the resource.
...int timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.domainLookupEnd - Web APIs
representing the time immediately after the browser finishes the domain name lookup for the resource.
...fentry) { // print timestamps of the *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.domainLookupStart - Web APIs
a domhighrestimestamp immediately before the browser starts the domain name lookup for the resource.
...int timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.fetchStart - Web APIs
rt; return value a domhighrestimestamp immediately before the browser starts to fetch the resource.
...int timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.redirectEnd - Web APIs
urn value a timestamp immediately after receiving the last byte of the response of the last redirect.
...int timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.redirectStart - Web APIs
rt; return value a timestamp representing the start time of the fetch which initiates the redirect.
...int timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.requestStart - Web APIs
mp representing the time immediately before the browser starts requesting the resource from the server example in the following example, the value of the *start and *end properties of all "resource" type events are logged.
...int timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.responseEnd - Web APIs
byte of the resource or immediately before the transport connection is closed, whichever comes first.
...int timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.responseStart - Web APIs
ighrestimestamp immediately after the browser receives the first byte of the response from the server.
...int timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.secureConnectionStart - Web APIs
cess to secure the current connection.
...int timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.workerStart - Web APIs
is feature is available in web workers.
... the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart", "workerstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
Multi-touch interaction - Web APIs
"target1": return evcache1; case "target2": return evcache2; case "target3": return evcache3; default: log("error with cache handling",ev); } } function push_event(ev) { // save this event in the target's cache var cache = get_cache(ev); cache.push(ev); } function remove_event(ev) { // remove this event from the target's cache var cache = get_cache(ev); for (var i = 0; i < cache.length; i++) { if (cache[i].pointerid == ev.pointerid) { cache.splice(i, 1); break; } } } update background color the background color of the touch areas will change as follows: no active touches is white; one active touch is yellow; two simultaneous touches is ping and three or more simultaneous touches is lightblue.
...re simultaneous touches is lightblue.
PositionOptions.timeout - Web APIs
the positionoptions.timeout property is a positive long value representing the maximum length of time (in milliseconds) the device is allowed to take in order to return a position.
... the positionoptions.timeout property is a positive long value representing the maximum length of time (in milliseconds) the device is allowed to take in order to return a position.
ProgressEvent() - Web APIs
the progressevent() constructor returns a newly created progressevent, representing the current completion of a long process.
...r returns a newly created progressevent, representing the current completion of a long process.
ProgressEvent.initProgressEvent() - Web APIs
ocument.createevent("progressevent") method.
...d didn't complete.
ProgressEvent - Web APIs
font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">progressevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor progressevent() creates a progressevent event with the given parameters.
... initializes a progressevent created using the deprecated document.createevent("progressevent") method.
PushManager.registrations() - Web APIs
uccessful, the request's result will be an array of pushregistration objects.
...of pushregistration objects.
RTCDataChannel: bufferedamountlow event - Web APIs
redamountlowthreshold, which we have set to 65536.
...tcpeerconnection, this calls rtcpeerconnection.createdatachannel() to create the data channel.
RTCPeerConnection.getStreamById() - Web APIs
before any other code will create rtcpeerconnection.prototype.getstreambyid() if it's not natively available.
...https://bugs.chromium.org/p/chromium/issues/detail?id=698163&desc=5#c10 rtcpeerconnection.prototype.getstreambyid = function(id) { try { var localstreams = this.getlocalstreams(); var remotestreams = this.getremotestreams(); var i; for (i = 0; i < localstreams.length; i++) { if (localstreams[i].id == id) return localstreams[i]; } for (i = 0; i < remotestreams.length; i++) { if (remotestreams[i].id == id) return remotestreams[i]; } } catch(e) {} return null; } ...
Range.setEnd() - Web APIs
Web › API › Range › setEnd
enting the offset for the end of the range from the start of endnode.
...han zero.
ReadableStreamDefaultReader.read() - Web APIs
function processtext({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data.
... if (readerdone) { break; } let remainder = chunk.substr(startindex); ({value: chunk, done: readerdone} = await reader.read()); chunk = remainder + (chunk ?
ResizeObserverEntry.contentBoxSize - Web APIs
the contentboxsize read-only property of the resizeobserverentry interface returns an array containing the new content box size of the observed element when the callback is run.
....contentboxsize; value an object containing the new content box size of the observed element.
RsaHashedKeyGenParams - Web APIs
eb crypto api represents the object that should be passed as the algorithm parameter into subtlecrypto.generatekey(), when generating any rsa-based key pair: that is, when the algorithm is identified as any of rsassa-pkcs1-v1_5, rsa-pss, or rsa-oaep.
...ts the object that should be passed as the algorithm parameter into subtlecrypto.generatekey(), when generating any rsa-based key pair: that is, when the algorithm is identified as any of rsassa-pkcs1-v1_5, rsa-pss, or rsa-oaep.
SVGCursorElement - Web APIs
2px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgcursorelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svgelement, and implements properties from svgurireference.
...le">svgcursorelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svgelement, and implements properties from svgurireference.
SVGImageElement.height - Web APIs
the height read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the height attribute of the given <image> element.
... the height read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the height attribute of the given <image> element.
SVGImageElement.width - Web APIs
the width read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the width attribute of the given <image> element.
... the width read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the width attribute of the given <image> element.
SVGImageElement.x - Web APIs
Web › API › SVGImageElement › x
the x read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the x attribute of the given <image> element.
... the x read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the x attribute of the given <image> element.
SVGImageElement.y - Web APIs
Web › API › SVGImageElement › y
the y read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the y attribute of the given <image> element.
... the y read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the y attribute of the given <image> element.
SVGNumberList - Web APIs
svgnumber getitem(in unsigned long index) svgnumber insertitembefore(in svgnumber newitem, in unsigned long index) svgnumber replaceitem(in svgnumber newitem, in unsigned long index) svgnumber removeitem(in unsigned long index) svgnumber appenditem(in svgnumber newitem) properties readonly unsigned long numberofitems readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type description numberofitems unsigned long the number of items in the list.
...em(in unsigned long index) svgnumber appenditem(in svgnumber newitem) properties readonly unsigned long numberofitems readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type description numberofitems unsigned long the number of items in the list.
SVGStringList - Web APIs
domstring getitem(in unsigned long index) domstring insertitembefore(in domstring newitem, in unsigned long index) domstring replaceitem(in domstring newitem, in unsigned long index) domstring removeitem(in unsigned long index) domstring appenditem(in domstring newitem) properties readonly unsigned long numberofitems readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type description numberofitems unsigned long the number of items in the list.
...tem(in unsigned long index) domstring appenditem(in domstring newitem) properties readonly unsigned long numberofitems readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type description numberofitems unsigned long the number of items in the list.
ServiceWorkerGlobalScope: notificationclick event - Web APIs
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 onnotificationclick event handler property: self.onnotificationclick = function(event) { console.log('on notification click: ', event.notification.tag); event.notification.clo...
... use the onnotificationclick 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.
SpeechRecognitionResult - Web APIs
ents a single recognition match, which may contain multiple speechrecognitionalternative objects.
..., which may contain multiple speechrecognitionalternative objects.
SpeechRecognitionResultList - Web APIs
the speechrecognitionresultlist interface of the web speech api represents a list of speechrecognitionresult objects, or a single one if results are being captured in continuous mode.
... the speechrecognitionresultlist interface of the web speech api represents a list of speechrecognitionresult objects, or a single one if results are being captured in continuous mode.
SpeechSynthesis: voiceschanged event - Web APIs
e event event handler property onvoiceschanged examples this could be used to repopulate a list of voices that the user can choose between when the event fires.
...nt.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } }); or use the onvoiceschanged event handler property: synth.onvoiceschanged = function() { var voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } specifications specification status comment web speech apithe definition of 'speech synthe...
SpeechSynthesis - Web APIs
uttxt = document.queryselector('.txt'); var voiceselect = document.queryselector('select'); var pitch = document.queryselector('#pitch'); var pitchvalue = document.queryselector('.pitch-value'); var rate = document.queryselector('#rate'); var ratevalue = document.queryselector('.rate-value'); var voices = []; function populatevoicelist() { voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } populatevoicelist(); if (speechsynthe...
...lect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.pitch = pitch.value; utterthis.rate = rate.value; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesis' in that specification.
SpeechSynthesisUtterance.text - Web APIs
that will be synthesised when the utterance is spoken.
....queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisVoice - Web APIs
false.) speechsynthesisvoice.name read only returns a human-readable name that represents the voice.
...lect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.pitch = pitch.value; utterthis.rate = rate.value; synth.speak(utterthis); utterthis.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", wh...
Storage.key() - Web APIs
Web › API › Storage › key
yname = storage.key(index); parameters index an integer representing the number of the key you want to get the name of.
...ining the name of the key.
Streams API - Web APIs
writer represents a default writable stream writer that can be used to write chunks of data to a writable stream.
...ter that can be used to write chunks of data to a writable stream.
SubtleCrypto.encrypt() - Web APIs
t.queryselector(".aes-ctr #message"); let message = messagebox.value; let enc = new textencoder(); return enc.encode(message); } function encryptmessage(key) { let encoded = getmessageencoding(); // counter will be needed for decryption counter = window.crypto.getrandomvalues(new uint8array(16)); return window.crypto.subtle.encrypt( { name: "aes-ctr", counter, length: 64 }, key, encoded ); } let iv = new uint8array(16); let key = new uint8array(16); let data = new uint8array(12345); //crypto functions are wrapped in promises so we have to use await and make sure the function that //contains this code is an async function //encrypt function wants a cryptokey object const key_encoded = await crypto.subtle.importkey( "raw", key.buffer, 'aes...
...rapped in promises so we have to use await and make sure the function that //contains this code is an async function //encrypt function wants a cryptokey object const key_encoded = await crypto.subtle.importkey( "raw", key.buffer, 'aes-ctr' , false, ["encrypt", "decrypt"]); const encrypted_content = await window.crypto.subtle.encrypt( { name: "aes-ctr", counter: iv, length: 128 }, key_encoded, data ); //uint8array console.log(encrypted_content); aes-cbc this code fetches the contents of a text box, encodes it for encryption, and encrypts it using aes in cbc mode.
SubtleCrypto.generateKey() - Web APIs
or private but keyusages is empty.
...ac key generation this code generates an hmac signing key.
SubtleCrypto.sign() - Web APIs
Web › API › SubtleCrypto › sign
rifier are the same entity.
... the "message" textbox, and encode it in a form we can use for the sign operation.
TextTrackList.onremovetrack - Web APIs
in its track property which text track has been removed from the media element.
...ches the current number of text tracks in the first media element whenever a track is removed from the media element.
TextTrackList - Web APIs
t a list of the text tracks defined by the <track> element, with each track represented by a separate texttrack object in the list.
...queryselector("video").texttracks; monitoring track count changes in this example, we have an app that displays information about the number of channels available.
TimeRanges.end() - Web APIs
Web › API › TimeRanges › end
ified time range ends.
...ends.
TimeRanges.start() - Web APIs
Web › API › TimeRanges › start
me range begins.
... syntax starttime = timeranges.start(index) parameters index is the range number to return the starting time for.
TouchEvent.touches - Web APIs
ess of whether or not they've changed or what their target element was at touchstart time.
...llowing code snippet, the touchstart event handler checks the length of the touchevent.touches list to determine the number of touch points that were activated and then invokes different handlers depending on the number of touch points.
TransformStream - Web APIs
ues.
...m} } chaining multiple readablestreams together this is a useful one, where multiple streams can be conjoined.
USBDevice.controlTransferIn() - Web APIs
the controltransferin() method of the usbdevice interface returns a promise that resolves with a usbintransferresult when the result of a command or status request has been received from the usb device.
...specifying whether the tranfer is "standard" (common to all usb devices) "class" (common to an industry-standard class of devices) or "vendor".
USBDevice.transferIn() - Web APIs
the transferin() method of the usbdevice interface returns a promise that resolves with a usbtransferinresult when bulk or interrupt data is received from the usb device.
... the transferin() method of the usbdevice interface returns a promise that resolves with a usbtransferinresult when bulk or interrupt data is received from the usb device.
VideoTrackList.onremovetrack - Web APIs
bject which indicates in its track property which video track has been removed from the media element.
...mple example just fetches the current number of video tracks in the media element whenever a track is removed from the media element.
VideoTrackList - Web APIs
t of the video tracks contained within a <video> element, with each track represented by a separate videotrack object in the list.
...yselector("video").videotracks; monitoring track count changes in this example, we have an app that displays information about the number of channels available.
WebGLRenderingContext.bufferSubData() - Web APIs
the webglrenderingcontext.buffersubdata() method of the webgl api updates a subset of a buffer object's data store.
...unpack_buffer: buffer used for pixel transfer operations.
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
ufferview?
...al srcoffset, optional srclengthoverride); // read from buffer bound to gl.pixel_unpack_buffer void gl.compressedteximage3d(target, level, internalformat, width, height, depth, border, glsizei imagesize, glintptr offset); void gl.compressedteximage3d(target, level, internalformat, width, height, depth, border, arraybufferview srcdata, optional srcoffset, optional srclengthoverride); parameters target a glenum specifying the binding point (target) of the active texture.
WebGLRenderingContext.getParameter() - Web APIs
ents glint gl.max_uniform_block_size glint64 gl.max_uniform_buffer_bindings glint gl.max_varying_components glint gl.max_vertex_output_components glint gl.max_vertex_uniform_blocks glint gl.max_vertex_uniform_components glint gl.min_program_texel_offset glint gl.pack_row_length glint see pixelstorei.
...bindtransformfeedback.
WebGLRenderingContext.getShaderInfoLog() - Web APIs
he specified webglshader object.
...warning messages, and other information about the last compile operation.
WebGLRenderingContext.pixelStorei() - Web APIs
.unpack_colorspace_conversion_webgl default color space conversion or no color space conversion.
....
A basic 2D WebGL animation example - Web APIs
vas.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/vertexnumcomponents; currentangle = 0.0; rotationrate = 6; animatescene(); } after getting the webgl context, gl, we need to begin by building the shader program.
...ces) per triangle to be drawn, for a total of 12 values.
WebGL best practices - Web APIs
t res = gl.clientwaitsync(sync, flags, 0); if (res == gl.wait_failed) { reject(); return; } if (res == gl.timeout_expired) { settimeout(test, interval_ms); return; } resolve(); } test()); }); } async function getbuffersubdataasync( gl, target, buffer, srcbyteoffset, dstbuffer, /* optional */ dstoffset, /* optional */ length) { const sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); gl.flush(); await clientwaitasync(gl, sync, 0, 10); gl.deletesync(sync); gl.bindbuffer(target, buffer); gl.getbuffersubdata(target, srcbyteoffset, dstbuffer, dstoffset, length); gl.bindbuffer(target, null); return dest; } async function readpixelsasync(gl, x, y, w, h, format, type, dest) { const buf = gl.createb...
...async(gl, sync, 0, 10); gl.deletesync(sync); gl.bindbuffer(target, buffer); gl.getbuffersubdata(target, srcbyteoffset, dstbuffer, dstoffset, length); gl.bindbuffer(target, null); return dest; } async function readpixelsasync(gl, x, y, w, h, format, type, dest) { const buf = gl.createbuffer(); gl.bindbuffer(gl.pixel_pack_buffer, buf); gl.bufferdata(gl.pixel_pack_buffer, dest.bytelength, gl.stream_read); gl.readpixels(x, y, w, h, format, type, 0); gl.bindbuffer(gl.pixel_pack_buffer, null); await getbuffersubdataasync(gl, gl.pixel_pack_buffer, buf, 0, dest); gl.deletebuffer(buf); return dest; } canvas and webgl-related some tips are relevent to webgl, but deal with other apis.
Using DTMF with WebRTC - Web APIs
phone is obtained, gotstream() is called.
...onnectionstate property.
Example and tutorial: Simple synth keyboard - Web APIs
econtrol.value; // create the keys; skip any that are sharp or flat; for // our purposes we don't need them.
...em.classname = "octave"; keylist.foreach(function(key) { if (key[0].length == 1) { octaveelem.appendchild(createkey(key[0], idx, key[1])); } }); keyboard.appendchild(octaveelem); }); document.queryselector("div[data-note='b'][data-octave='5']").scrollintoview(false); sineterms = new float32array([0, 0, 1, 0, 1]); cosineterms = new float32array(sineterms.length); customwaveform = audiocontext.createperiodicwave(cosineterms, sineterms); for (i=0; i<9; i++) { osclist[i] = []; } } setup(); the table which maps note names and octaves to their frequenies is created by calling createnotetable().
Using the Web Speech API - Web APIs
is the default voice for the synthesis engine (checked by seeing if speechsynthesisvoice.default returns true.) we also create data- attributes for each option, containing the name and language of the associated voice, so we can grab them easily later on, and then append the options as children of the select.
...essary preparations made, we start the utterance being spoken by invoking speechsynthesis.speak(), passing it the speechsynthesisutterance instance as a parameter.
Window.frames - Web APIs
Web › API › Window › frames
returns the window itself, which is an array-like object, listing the direct sub-frames of the current window.
...object corresponding to the given <frame>'s or <iframe>'s content, not the (i)frame dom element (i.e., window.frames[0] is the same thing as document.getelementsbytagname("iframe")[0].contentwindow).
Window.speechSynthesis - Web APIs
voice to the voice selected in the <select> element, and start the utterance speaking via the speechsynthesis.speak() method.
...lect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesis' in that specification.
XRInputSource.gripSpace - Web APIs
space.
... space.
XRInputSourceArray - Web APIs
ource representing one input device connected to the webxr system.
...r you can use to go through all the values in the list.
XRRigidTransform.orientation - Web APIs
the read-only xrrigidtransform property orientation is a dompointreadonly containing a normalized quaternion (also called a unit quaternion or versor) specifying the rotational component of the transform represented by the object.
...rnion or versor) specifying the rotational component of the transform represented by the object.
XRViewerPose.views - Web APIs
erpose property views returns an array which contains every xrview which must be rendered in order to fully represent the scene from the viewpoint defined by the viewer pose.
...s use the current length of this array rather than caching the value.
ARIA: grid role - Accessibility
ole="gridcell"] { color: #000; } tbody td[role="gridcell"]:hover, tbody td[role="gridcell"]:focus { background-color: #f6f6f6; outline: 3px solid blue; } } javascript var selectables = document.queryselectorall('table td[role="gridcell"]'); selectables[0].setattribute('tabindex', 0); var trs = document.queryselectorall('table tbody tr'), row = 0, col = 0, maxrow = trs.length - 1, maxcol = 0; array.prototype.foreach.call(trs, function(gridrow, i){ array.prototype.foreach.call(gridrow.queryselectorall('td'), function(el, i){ el.dataset.row = row; el.dataset.col = col; col = col + 1; }); if (col>maxcol) { maxcol = col - 1; } col = 0; row = row + 1; }); function moveto(newrow, newcol) { var tgt = document.queryselector('[data-row="' + newrow...
...body td[role="gridcell"] { color: #000; } tbody td[role="gridcell"]:hover, tbody td[role="gridcell"]:focus { background-color: #f6f6f6; outline: 3px solid blue; } javascript var selectables = document.queryselectorall('table td[role="gridcell"]'); selectables[0].setattribute('tabindex', 0); var trs = document.queryselectorall('table tbody tr'), row = 0, col = 0, maxrow = trs.length - 1, maxcol = 0; array.prototype.foreach.call(trs, function(gridrow, i){ array.prototype.foreach.call(gridrow.queryselectorall('td'), function(el, i){ el.dataset.row = row; el.dataset.col = col; col = col + 1; }); if (col>maxcol) { maxcol = col - 1; } col = 0; row = row + 1; }); function moveto(newrow, newcol) { var tgt = document.queryselector('[data-row="' + newrow...
Web accessibility for seizures and physical reactions - Accessibility
colors.
...l fire alarms.
Detecting CSS animation support - CSS: Cascading Style Sheets
pport this code will check to see if css animation support is available: var animation = false, animationstring = 'animation', keyframeprefix = '', domprefixes = 'webkit moz o ms khtml'.split(' '), pfx = '', elem = document.createelement('div'); if( elem.style.animationname !== undefined ) { animation = true; } if( animation === false ) { for( var i = 0; i < domprefixes.length; i++ ) { if( elem.style[ domprefixes[i] + 'animationname' ] !== undefined ) { pfx = domprefixes[ i ]; animationstring = pfx + 'animation'; keyframeprefix = '-' + pfx.tolowercase() + '-'; animation = true; break; } } } for starters we define a few variables.
...animate in javascript fallback } else { elem.style[ animationstring ] = 'rotate 1s linear infinite'; var keyframes = '@' + keyframeprefix + 'keyframes rotate { '+ 'from {' + keyframeprefix + 'transform:rotate( 0deg ) }'+ 'to {' + keyframeprefix + 'transform:rotate( 360deg ) }'+ '}'; if( document.stylesheets && document.stylesheets.length ) { document.stylesheets[0].insertrule( keyframes, 0 ); } else { var s = document.createelement( 'style' ); s.innerhtml = keyframes; document.getelementsbytagname( 'head' )[ 0 ].appendchild( s ); } } this code looks at the value of animation; if it's false, we know we need to use our javascript fallback code to perform our animation.
Resizing background images with background-size - CSS: Cascading Style Sheets
he background.
... the name of the image file.
Styling Columns - CSS: Cascading Style Sheets
, it is now defined in box alignment in order to unify gaps between boxes in other specifications such as css grid layout.
... value of column-gap in multicol is 1em.
Logical properties for sizing - CSS: Cascading Style Sheets
e would be mapped to height.
...sical property inline-size width block-size height min-inline-size min-width min-block-size min-height max-inline-size max-width max-block-size max-height width and height example the logical mappings for width and height are inline-size, which sets the length in the inline dimension and block-size, which sets the length in the block dimension.
animation-timing-function - CSS: Cascading Style Sheets
he timing function that corresponds to a given animation, as determined by animation-name.
...ease-in-out equal to cubic-bezier(0.42, 0, 0.58, 1.0), with the animating properties slowly transitioning, speeding up, and then slowing down again.
background-blend-mode - CSS: Cascading Style Sheets
ith the element's background color.
...tive example is stored in a github repository.
border-block-end-width - CSS: Cascading Style Sheets
der-block-end-width: thick; related properties are border-block-start-width, border-inline-start-width, and border-inline-end-width, which define the other border widths of the element.
...ck-start-width, border-inline-start-width, and border-inline-end-width, which define the other border widths of the element.
border-block-end - CSS: Cascading Style Sheets
der-width.
...op-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 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-block-start - CSS: Cascading Style Sheets
umborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browser to anotherapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style:...
...p-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style: as specifiedborder-right-style: 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-inline-start-width - CSS: Cascading Style Sheets
der-inline-start-width: thick; related properties are border-block-start-width, border-block-end-width, and border-inline-end-width, which define the other border widths of the element.
...block-start-width, border-block-end-width, and border-inline-end-width, which define the other border widths of the element.
border-inline-start - CSS: Cascading Style Sheets
umborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browser to anotherapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style:...
...yle is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style: as specifiedborder-right-style: as specifiedborder-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> ]?
border-inline - CSS: Cascading Style Sheets
ion, and text-orientation.
...der-width.
clip - CSS: Cascading Style Sheets
Web › CSS › clip
ath property instead.
...s inside border edge.
drop-shadow() - CSS: Cascading Style Sheets
-shadow() filter function creates a shadow that conforms to the shape (alpha channel) of the image itself.
...<length> values that determine the shadow offset.
font-smooth - CSS: Cascading Style Sheets
the font-smooth css property controls the application of anti-aliasing when fonts are rendered.
...othing, typically grayscale.
grid - CSS: Cascading Style Sheets
Web › CSS › grid
hand:grid-template-rows: refer to corresponding dimension of the content areagrid-template-columns: refer to corresponding dimension of the content areagrid-auto-rows: refer to corresponding dimension of the content areagrid-auto-columns: refer to corresponding dimension of the content areacomputed valueas each of the properties of the shorthand:grid-template-rows: as specified, but with relative lengths converted into absolute lengthsgrid-template-columns: as specified, but with relative lengths converted into absolute lengthsgrid-template-areas: as specifiedgrid-auto-rows: the percentage as specified or the absolute lengthgrid-auto-columns: the percentage as specified or the absolute lengthgrid-auto-flow: as specifiedgrid-column-gap: the percentage as specified or the absolute lengthgrid-row-g...
...olumns: as specified, but with relative lengths converted into absolute lengthsgrid-template-areas: as specifiedgrid-auto-rows: the percentage as specified or the absolute lengthgrid-auto-columns: the percentage as specified or the absolute lengthgrid-auto-flow: as specifiedgrid-column-gap: the percentage as specified or the absolute lengthgrid-row-gap: the percentage as specified or the absolute lengthcolumn-gap: as specified, with <length>s made absolute, and normal computing to zero except on multi-column elementsrow-gap: as specified, with <length>s made absolute, and normal computing to zero except on multi-column elementsanimation typediscrete formal syntax <'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense?
inline-size - CSS: Cascading Style Sheets
l size of an element's block, depending on its writing mode.
...wise, it relates to the width of the element.
inset-block-end - CSS: Cascading Style Sheets
the inset-block-end css property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation.
...-end: inherit; inset-block-end: initial; inset-block-end: unset; syntax values the inset-block-end property takes the same values as the left property.
inset-block-start - CSS: Cascading Style Sheets
the inset-block-start css property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation.
...inherit; inset-block-start: initial; inset-block-start: unset; syntax values the inset-block-start property takes the same values as the left property.
inset-block - CSS: Cascading Style Sheets
the inset-block css property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation.
...r the following css properties: inset-block-end inset-block-start syntax values the inset-block property takes the same values as the left property.
inset-inline-end - CSS: Cascading Style Sheets
the inset-inline-end css property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation.
...hand for inset-inline-start and inset-inline-end is inset-inline.
inset-inline-start - CSS: Cascading Style Sheets
the inset-inline-start css property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation.
...nd for inset-inline-start and inset-inline-end is inset-inline.
inset-inline - CSS: Cascading Style Sheets
the inset-inline css property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation.
...the following css properties: inset-inline-end inset-inline-start syntax values the inset-inline property takes the same values as the left property.
inset - CSS: Cascading Style Sheets
Web › CSS › inset
the inset css property, though part of the logical specification, doesn't define logical block or inline offsets, and instead defines physical offsets, regardless of the element's writing mode, directionality, and text orientation.
...: auto; /* global values */ inset: inherit; inset: initial; inset: unset; syntax values the inset property takes the same values as the left property.
max-inline-size - CSS: Cascading Style Sheets
eight of the element, otherwise it relates to the maximal width of the element.
...content(20em); /* global values */ max-inline-size: inherit; max-inline-size: initial; max-inline-size: unset; values the max-inline-size property takes the same values as the max-width and max-height properties.
min-block-size - CSS: Cascading Style Sheets
f an element's block, depending on its writing mode.
...m height of the element.
min-inline-size - CSS: Cascading Style Sheets
f an element's block, depending on its writing mode.
...m width of the element.
offset - CSS: Cascading Style Sheets
Web › CSS › offset
3cm; offset: url(arc.svg) 30deg / 50px 100px; formal definition initial valueas each of the properties of the shorthand:offset-position: autooffset-path: noneoffset-distance: 0offset-anchor: autooffset-rotate: autoapplies totransformable elementsinheritednopercentagesas each of the properties of the shorthand:offset-position: refertosizeofcontainingblockoffset-distance: refer to the total path lengthoffset-anchor: relativetowidthandheightcomputed valueas each of the properties of the shorthand:offset-position: for <length> the absolute value, otherwise a percentageoffset-path: as specifiedoffset-distance: for <length> the absolute value, otherwise a percentageoffset-anchor: for <length> the absolute value, otherwise a percentageoffset-rotate: as specifiedanimation typeas each of the propertie...
...r <length> the absolute value, otherwise a percentageoffset-path: as specifiedoffset-distance: for <length> the absolute value, otherwise a percentageoffset-anchor: for <length> the absolute value, otherwise a percentageoffset-rotate: as specifiedanimation typeas each of the properties of the shorthand:offset-position: a positionoffset-path: as <angle>, <basic-shape> or <path()>offset-distance: a length, percentage or calc();offset-anchor: a positionoffset-rotate: as <angle>, <basic-shape> or <path()>creates stacking contextyes formal syntax [ <'offset-position'>?
outline - CSS: Cascading Style Sheets
Web › CSS › outline
: mediumapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:outline-color: for the keyword invert, the computed value is invert.
...if the value is translucent, the computed value will be the rgba() corresponding one.
repeating-conic-gradient() - CSS: Cascading Style Sheets
d in the upper left quandrant, offset by 3degrees so there is no up/down straight line */ background: repeating-conic-gradient( from 3deg at 25% 25%, hsl(200, 100%, 50%) 0deg 15deg, hsl(200, 100%, 60%) 10deg 30deg); ); values <angle> preceded by the from keyterm, and taking an angle as its value, defines the gradient rotation in clockwise direction.
...nt will be centered, .
scale - CSS: Cascading Style Sheets
Web › CSS › scale
ake the element grow */ scale: 2; /* values of less than 1 make the element shrink */ scale: 0.5; /* two values */ scale: 2 0.5; /* three values */ scale: 2 0.5 2; values single number value a <number> specifying a scale factor to make the affected element scale by the same factor along both the x and y axes.
...e a <number> specifying a scale factor to make the affected element scale by the same factor along both the x and y axes.
text-overflow - CSS: Cascading Style Sheets
overflow behavior for the end of the line (the right end for left-to-right text, the left end for right-to-left text).
...d.
perspective() - CSS: Cascading Style Sheets
//github.com/mdn/interactive-examples and send us a pull request.
...ength> value, which represents the distance between the user and the z=0 plane.
translateZ() - CSS: Cascading Style Sheets
element along the z-axis in 3d space, i.e., closer to or farther away from the viewer.
...which specifies how far inward or outward the element or elements move.
transition-delay - CSS: Cascading Style Sheets
nteractive example is stored in a github repository.
...the delay may be zero, positive, or negative: a value of 0s (or 0ms) will begin the transition effect immediately.
Getting Started - Developer guides
ttprequest(); xhr.open("get", "time-log.txt", true); xhr.onload = function() { updatedisplay(xhr.response); } xhr.send(); } function updatedisplay(text) { fulldata.textcontent = text; let timearray = text.split('\n'); // included because some file systems always include a blank line at the end of text files.
...tedisplay(xhr.response); } xhr.send(); } function updatedisplay(text) { fulldata.textcontent = text; let timearray = text.split('\n'); // included because some file systems always include a blank line at the end of text files.
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
Web › HTML › Element › audio
ute used to disable the capability of remote playback in devices that are attached using wired (hdmi, dvi, etc.) and wireless technologies (miracast, chromecast, dlna, airplay, etc).
...tribute that indicates whether the audio will be initially silenced.
<input type="checkbox"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › checkbox
ox is set to checked.
...erall = document.queryselector('input[id="enchtbl"]'); var ingredients = document.queryselectorall('ul input'); overall.addeventlistener('click', function(e) { e.preventdefault(); }); for(var i = 0; i < ingredients.length; i++) { ingredients[i].addeventlistener('click', updatedisplay); } function updatedisplay() { var checkedcount = 0; for(var i = 0; i < ingredients.length; i++) { if(ingredients[i].checked) { checkedcount++; } } if(checkedcount === 0) { overall.checked = false; overall.indeterminate = false; } else if(checkedcount === ingredients.length) { overall.checked = true; overall.indeterminate = false; } else { overall.checked = false; overall.indeterminate = true; } } note: ...
<table>: The Table element - HTML: Hypertext Markup Language
Web › HTML › Element › table
use the css background-color property.
...ame surrounding the table.
<video>: The Video Embed element - HTML: Hypertext Markup Language
Web › HTML › Element › video
some cases.
... is shown as the poster frame.
MIME types (IANA media types) - HTTP
lhost:8000 user-agent: mozilla/5.0 (macintosh; intel mac os x 10.9; rv:50.0) gecko/20100101 firefox/50.0 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-language: en-us,en;q=0.5 accept-encoding: gzip, deflate connection: keep-alive upgrade-insecure-requests: 1 content-type: multipart/form-data; boundary=---------------------------8721656041911415653955004498 content-length: 465 -----------------------------8721656041911415653955004498 content-disposition: form-data; name="mytextfield" test -----------------------------8721656041911415653955004498 content-disposition: form-data; name="mycheckbox" on -----------------------------8721656041911415653955004498 content-disposition: form-data; name="myfile"; filename="test.txt" content-type: text/plain simple file.
...ates that the document is composed of several parts, one for each of the requested ranges.
Browser detection using the user agent - HTTP
) && !/edge/.test(ua) && !window.msstream; var mediaqueryupdated = true, mql = []; function whenmediachanges(){mediaqueryupdated = true} var listentomediaquery = iswebkit ?
...i+1|0) if (mql[i][0] === mq) mql.splice(i, 1); mq.removelistener(whenmediachanges); } : listentomediaquery; var orientationchanged = false; addeventlistener("orientationchange", function(){ orientationchanged = true; }, passive_listener_option); addeventlistener("resize", settimeout.bind(0,function(){ if (orientationchanged && !mediaqueryupdated) for (var i=0,len=mql.length|0; i<len; i=i+1|0) mql[i][1]( mql[i][0] ); mediaqueryupdated = orientationchanged = false; },0)); which part of the user agent contains the information you are looking for?
Cross-Origin Resource Sharing (CORS) - HTTP
Web › HTTP › CORS
host: bar.other user-agent: mozilla/5.0 (macintosh; intel mac os x 10.14; rv:71.0) gecko/20100101 firefox/71.0 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-language: en-us,en;q=0.5 accept-encoding: gzip,deflate connection: keep-alive x-pingother: pingpong content-type: text/xml; charset=utf-8 referer: https://foo.example/examples/preflightinvocation.html content-length: 55 origin: https://foo.example pragma: no-cache cache-control: no-cache <person><name>arun</name></person> http/1.1 200 ok date: mon, 01 dec 2008 01:15:40 gmt server: apache/2 access-control-allow-origin: https://foo.example vary: accept-encoding, origin content-encoding: gzip content-length: 235 keep-alive: timeout=2, max=99 connection: keep-alive content-type: text/plain [some xml payload]...
...e/examples/credential.html origin: http://foo.example cookie: pageaccess=2 http/1.1 200 ok date: mon, 01 dec 2008 01:34:52 gmt server: apache/2 access-control-allow-origin: https://foo.example access-control-allow-credentials: true cache-control: no-cache pragma: no-cache set-cookie: pageaccess=3; expires=wed, 31-dec-2008 01:34:53 gmt vary: accept-encoding, origin content-encoding: gzip content-length: 106 keep-alive: timeout=2, max=100 connection: keep-alive content-type: text/plain [text/plain payload] although line 10 contains the cookie destined for the content on http://bar.other, if bar.other did not respond with an access-control-allow-credentials: true (line 17) the response would be ignored and not made available to web content.
Expect - HTTP
Web › HTTP › Headers › Expect
o properly handle the request.
...tinue informs recipients that the client is about to send a (presumably large) message body in this request and wishes to receive a 100 (continue) interim response.
Index - HTTP
Web › HTTP › Headers › Index
entity-body.
...order to obtain the media-type referenced by the content-type header.
Range - HTTP
Web › HTTP › Headers › Range
and return the whole document with a 200 status code.
...: <unit>=-<suffix-length> directives <unit> the unit in which ranges are specified.
Save-Data - HTTP
ault) indicates no.
...fter having switched from cellular to wi-fi]).
HTTP headers - HTTP
Web › HTTP › Headers
ts and responses, but with no relation to the data transmitted in the body.
...t track dnt expresses the user's tracking preference.
206 Partial Content - HTTP
Web › HTTP › Status › 206
eral ranges are sent back, the content-type is set to multipart/byteranges and each fragment covers one range, with content-range and content-type describing it.
...e: http/1.1 206 partial content date: wed, 15 nov 2015 06:25:24 gmt last-modified: wed, 15 nov 2015 04:58:08 gmt content-range: bytes 21010-47021/47022 content-length: 26012 content-type: image/gif ...
HTTP response status codes - HTTP
Web › HTTP › Status
one this response is sent when the requested content has been permanently deleted from server, with no forwarding address.
...rmanently deleted from server, with no forwarding address.
JavaScript data types and data structures - JavaScript
to boolean: if, ||, &&, boolean, !.
... anything.
Loops and iteration - JavaScript
on selected="selected">r&b</option> <option>jazz</option> <option>blues</option> <option>new age</option> <option>classical</option> <option>opera</option> </select> </p> <p><input id="btn" type="button" value="how many are selected?" /></p> </form> <script> function howmany(selectobject) { let numberselected = 0; for (let i = 0; i < selectobject.options.length; i++) { if (selectobject.options[i].selected) { numberselected++; } } return numberselected; } let btn = document.getelementbyid('btn'); btn.addeventlistener('click', function() { alert('number of options selected: ' + howmany(document.selectform.musictypes)); }); </script> do...while statement the do...while statement repeats until a specified condition evaluates to fals...
...tax of the break statement looks like this: break; break [label]; the first form of the syntax terminates the innermost enclosing loop or switch.
getter - JavaScript
n object literal with another get or with a data entry for the same property ({ get x() { }, get x() { } } and { x: ..., get x() { } } are forbidden).
...e same property ({ get x() { }, get x() { } } and { x: ..., get x() { } } are forbidden).
Functions - JavaScript
see rest parameters.
..."this is zero."); }; } examples returning a formatted number the following function returns a string containing the formatted representation of a number padded with leading zeros.
Array.prototype.flatMap() - JavaScript
above could have been achieved by using map itself, here is an example that better showcases the use of flatmap.
... itself, here is an example that better showcases the use of flatmap.
DataView - JavaScript
32((byteoffset|0) + 4|0, !!littleendian)>>>0); // combine the two 32-bit values and return return littleendian ?
...et|0) + 4|0, !!littleendian)>>>0); // combine the two 32-bit values and return return littleendian ?
Math.cos() - JavaScript
the math.cos() static function returns the cosine of the specified angle, which must be specified in radians.
... the math.cos() static function returns the cosine of the specified angle, which must be specified in radians.
Object.assign() - JavaScript
fore the error is raised.
...ble: true, enumerable: false, configurable: true object.defineproperty(object, "assign", { value: function assign(target, varargs) { // .length of function is 2 'use strict'; if (target === null || target === undefined) { throw new typeerror('cannot convert undefined or null to object'); } var to = object(target); for (var index = 1; index < arguments.length; index++) { var nextsource = arguments[index]; if (nextsource !== null && nextsource !== undefined) { for (var nextkey in nextsource) { // avoid bugs when hasownproperty is shadowed if (object.prototype.hasownproperty.call(nextsource, nextkey)) { to[nextkey] = nextsource[nextkey]; } } } } re...
Object.getOwnPropertyNames() - JavaScript
ble properties in the array and the ordering among the enumerable properties is not defined.
...a non-object argument will be coerced to an object.
Object.keys() - JavaScript
tion() { 'use strict'; var hasownproperty = object.prototype.hasownproperty, hasdontenumbug = !({ tostring: null }).propertyisenumerable('tostring'), dontenums = [ 'tostring', 'tolocalestring', 'valueof', 'hasownproperty', 'isprototypeof', 'propertyisenumerable', 'constructor' ], dontenumslength = dontenums.length; return function(obj) { if (typeof obj !== 'function' && (typeof obj !== 'object' || obj === null)) { throw new typeerror('object.keys called on non-object'); } var result = [], prop, i; for (prop in obj) { if (hasownproperty.call(obj, prop)) { result.push(prop); } } if (hasdontenumbug) { for ...
... return function(obj) { if (typeof obj !== 'function' && (typeof obj !== 'object' || obj === null)) { throw new typeerror('object.keys called on non-object'); } var result = [], prop, i; for (prop in obj) { if (hasownproperty.call(obj, prop)) { result.push(prop); } } if (hasdontenumbug) { for (i = 0; i < dontenumslength; i++) { if (hasownproperty.call(obj, dontenums[i])) { result.push(dontenums[i]); } } } return result; }; }()); } please note that the above code includes non-enumerable keys in ie7 (and maybe ie8), when passing in an object from a different window.
String.fromCodePoint() - JavaScript
string object you created.
... // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae codepoint -= 0x10000; codelen = codeunits.push( (codepoint >> 10) + 0xd800, // highsurrogate (codepoint % 0x400) + 0xdc00 // lowsurrogate ); } if (codelen >= 0x3fff) { result += stringfromcharcode.apply(null, codeunits); codeunits.length = 0; } } return result + stringfromcharcode.apply(null, codeunits); }; try { // ie 8 only supports `object.defineproperty` on dom elements object.defineproperty(string, "fromcodepoint", { "value": fromcodepoint, "configurable": true, "writable": true }); } catch(e) { string.fromcodepoint = fromcodepoint; } }(string.fromcharcode)); ex...
String.prototype.lastIndexOf() - JavaScript
eractive-examples and send us a pull request.
...match.
String.prototype.split() - JavaScript
this: mystring.split("\t").
...ndicating the original string (before the split), the separator used, the number of elements in the array, and the individual array elements.
String.prototype.toLocaleUpperCase() - JavaScript
elf.
...as touppercase(), but for some locales, such as turkish, whose case mappings do not follow the default case mappings in unicode, there may be a different result.
String.prototype.trimEnd() - JavaScript
lf.
...tring.prototype.padend the standard method name is trimend.
TypedArray.prototype.copyWithin() - JavaScript
the copywithin() method copies the sequence of array elements within the array to the position starting at target.
...this method has the same algorithm as array.prototype.copywithin.
TypedArray.prototype.set() - JavaScript
is stored in a github repository.
...ribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
WebAssembly.Memory.prototype.grow() - JavaScript
us size of the memory, in units of webassembly pages.
... memory instance with an initial size of 1 page (64kib), and a maximum size of 10 pages (640kib).
WebAssembly.Module.customSections() - JavaScript
wast2wasm simple-name-section.was -o simple-name-section.wasm --debug-names examples using customsections the following example (see the custom-section.html source and live example) compiles the loaded simple-name-section.wasm byte code.
...odule.customsections, looking to see whether the module instance contains a "name" custom section by checking that its length is more than 0.
eval() - JavaScript
is method to access descendant properties.
...n getdescendantprop(obj, desc) { var arr = desc.split('.'); while (arr.length) { obj = obj[arr.shift()]; } return obj; } var obj = {a: {b: {c: 0}}}; var proppath = getproppath(); // returns e.g.
Spread syntax (...) - JavaScript
hout spread syntax, you would have to do it indirectly through partial application: function applyandnew(constructor, args) { function partial () { return constructor.apply(this, args); }; if (typeof constructor.prototype === "object") { partial.prototype = object.create(constructor.prototype); } return partial; } function myconstructor () { console.log("arguments.length: " + arguments.length); console.log(arguments); this.prop1="val1"; this.prop2="val2"; }; const myarguments = ["hi", "how", "are", "you", "mr", null]; const myconstructorwitharguments = applyandnew(myconstructor, myarguments); console.log(new myconstructorwitharguments); // (internal log of myconstructor): arguments.length: 6 // (internal log of myconstructor): ["h...
... another iterating function is used when the merging occurs.
for await...of - JavaScript
a from url and calculates response size using the async generator.
... size using the async generator.
Template literals (Template strings) - JavaScript
agestr = 'youngster'; } // we can even return a string built using a template literal return `${str0}${personexp}${str1}${agestr}`; } let output = mytag`that ${ person } is a ${ age }`; console.log(output); // that mike is a youngster tag functions don't even need to return a string!
...tion tag(strings) { console.log(strings.raw[0]); } tag`string text line 1 \n string text line 2`; // logs "string text line 1 \n string text line 2" , // including the two characters '\' and 'n' in addition, the string.raw() method exists to create raw strings—just like the default template function and string concatenation would create.
Values - MathML
lengths several mathml presentation elements have attributes that accept length values used for size or spacing.
... lengths several mathml presentation elements have attributes that accept length values used for size or spacing.
<mmultiscripts> - MathML
.
...ml color names.
<msubsup> - MathML
sup>.
...tml color names.
<mtable> - MathML
Web › MathML › Element › mtable
e values are: none (default), solid and dashed.
...responding rows (e.g.
MathML documentation index - MathML
Web › MathML › Index
l, needsbeginnerupdate we will now prove the pythagorean theorem: 6 mathml attribute reference mathml, mathml reference this is an alphabetical list of mathml attributes.
...e reference mathml, mathml reference this is an alphabetical list of mathml attributes.
Image file type and format guide - Web media technologies
s format that all members of their service would be able to use.
...ression methods, but the most commonly used are the ccitt group 4 (and, for older fax systems, group 3) compression systems used for by fax software, as well as lzw and lossy jpeg compression.
Lazy loading - Web Performance
lazy loading is a strategy to identify resources as non-blocking (non-critical) and load these only when needed.
... have come to see huge increases in the number and size of assets sent to users.
markerHeight - SVG: Scalable Vector Graphics
the markerheight attribute represents the height of the viewport into which the <marker> is to be fitted when it is rendered according to the viewbox and preserveaspectratio attributes.
... the markerheight attribute represents the height of the viewport into which the <marker> is to be fitted when it is rendered according to the viewbox and preserveaspectratio attributes.
markerWidth - SVG: Scalable Vector Graphics
the markerwidth attribute represents the width of the viewport into which the <marker> is to be fitted when it is rendered according to the viewbox and preserveaspectratio attributes.
... the markerwidth attribute represents the width of the viewport into which the <marker> is to be fitted when it is rendered according to the viewbox and preserveaspectratio attributes.
r - SVG: Scalable Vector Graphics
Web › SVG › Attribute › r
0" y="120" width="60" height="60" fill="url(#mygradient000)" /> <rect x="120" y="120" width="60" height="60" fill="url(#mygradient050)" /> <rect x="220" y="120" width="60" height="60" fill="url(#mygradient100)" /> </svg> circle for <circle>, r defines the radius of the circle and therefor its size.
...css property for circles.
rx - SVG: Scalable Vector Graphics
Web › SVG › Attribute › rx
cx="250" cy="50" rx="50" ry="25" /> <rect x="20" y="120" width="60" height="60" rx="0" ry="15"/> <rect x="120" y="120" width="60" height="60" rx="15" ry="15"/> <rect x="220" y="120" width="60" height="60" rx="150" ry="15"/> </svg> ellipse for <ellipse>, rx defines the x-radius of the shape.
...ed for rx but not for ry (or the opposite), then the browser will consider the missing value equal to the defined one.
ry - SVG: Scalable Vector Graphics
Web › SVG › Attribute › ry
cx="250" cy="50" ry="50" rx="25" /> <rect x="20" y="120" width="60" height="60" ry="0" rx="15"/> <rect x="120" y="120" width="60" height="60" ry="15" rx="15"/> <rect x="220" y="120" width="60" height="60" ry="150" rx="15"/> </svg> ellipse for <ellipse>, ry defines the y-radius of the shape.
...ed for ry but not for rx (or the opposite), then the browser will consider the missing value equal to the defined one.
x1 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › x1
te: <line>, and <lineargradient> html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="5" y1="1" y2="9" stroke="red" /> <line x1="5" x2="5" y1="1" y2="9" stroke="green" /> <line x1="9" x2="5" y1="1" y2="9" stroke="blue" /> </svg> line for <line>, x1 defines the x coordinate of the starting point of the line.
...="1" y2="9" stroke="red" /> <line x1="5" x2="5" y1="1" y2="9" stroke="green" /> <line x1="9" x2="5" y1="1" y2="9" stroke="blue" /> </svg> lineargradient for <lineargradient>, x1 defines the x coordinate of the starting point of the gradient vector used to map the gradient stop values.
x2 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › x2
bute: <line>, and <lineargradient> html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="5" x2="1" y1="1" y2="9" stroke="red" /> <line x1="5" x2="5" y1="1" y2="9" stroke="green" /> <line x1="5" x2="9" y1="1" y2="9" stroke="blue" /> </svg> line for <line>, x2 defines the x coordinate of the ending point of the line.
...y1="1" y2="9" stroke="red" /> <line x1="5" x2="5" y1="1" y2="9" stroke="green" /> <line x1="5" x2="9" y1="1" y2="9" stroke="blue" /> </svg> lineargradient for <lineargradient>, x2 defines the x coordinate of the ending point of the gradient vector used to map the gradient stop values.
y1 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › y1
te: <line>, and <lineargradient> html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="9" y1="1" y2="5" stroke="red" /> <line x1="1" x2="9" y1="5" y2="5" stroke="green" /> <line x1="1" x2="9" y1="9" y2="5" stroke="blue" /> </svg> line for <line>, y1 defines the y coordinate of the starting point of the line.
...1="1" y2="5" stroke="red" /> <line x1="1" x2="9" y1="5" y2="5" stroke="green" /> <line x1="1" x2="9" y1="9" y2="5" stroke="blue" /> </svg> lineargradient for <lineargradient>, y1 defines the y coordinate of the starting point of the gradient vector used to map the gradient stop values.
y2 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › y2
e: <line>, and <lineargradient> html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="9" y1="5" y2="1" stroke="red" /> <line x1="1" x2="9" y1="5" y2="5" stroke="green" /> <line x1="1" x2="9" y1="5" y2="9" stroke="blue" /> </svg> line for <line>, y2 defines the y coordinate of the ending point of the line.
... y1="5" y2="1" stroke="red" /> <line x1="1" x2="9" y1="5" y2="5" stroke="green" /> <line x1="1" x2="9" y1="5" y2="9" stroke="blue" /> </svg> lineargradient for <lineargradient>, y2 defines the y coordinate of the ending point of the gradient vector used to map the gradient stop values.
<feDiffuseLighting> - SVG: Scalable Vector Graphics
ht maps together before applying it to the texture image.
...perator="arithmetic" k1="1" k2="0" k3="0" k4="0"/> </filter> <circle cx="390" cy="80" r="50" fill="green" filter="url(#lightme3)" /> </svg> expected rendering: live rendering: specifications specification status comment filter effects module level 1the definition of '<fediffuselighting>' in that specification.
<marker> - SVG: Scalable Vector Graphics
Web › SVG › Element › marker
0" fill="none" stroke="black" marker-start="url(#arrow)" marker-end="url(#arrow)" /> <!-- data line with polymarkers --> <polyline points="15,80 29,50 43,60 57,30 71,40 85,15" fill="none" stroke="grey" marker-start="url(#dot)" marker-mid="url(#dot)" marker-end="url(#dot)" /> </svg> attributes markerheight this attribute defines the height of the marker viewport.
...e height of the marker viewport.
<mask> - SVG: Scalable Vector Graphics
Web › SVG › Element › mask
,35 a20,20,0,0,1,50,35 a20,20,0,0,1,90,35 q90,65,50,95 q10,65,10,35 z" fill="black" /> </mask> <polygon points="-10,110 110,110 110,-10" fill="orange" /> <!-- with this mask applied, we "punch" a heart shape hole into the circle --> <circle cx="50" cy="50" r="50" mask="url(#mymask)" /> </svg> attributes height this attribute defines the height of the masking area.
...le: yes x this attribute defines the x-axis coordinate of the top-left corner of the masking area.
<path> - SVG: Scalable Vector Graphics
Web › SVG › Element › path
reated with a path element.
...100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path d="m 10,30 a 20,20 0,0,1 50,30 a 20,20 0,0,1 90,30 q 90,60 50,90 q 10,60 10,30 z"/> </svg> attributes d this attribute defines the shape of the path.
<polygon> - SVG: Scalable Vector Graphics
Web › SVG › Element › polygon
ints="0,100 50,25 50,75 100,0" /> <!-- example of the same polygon shape with stroke and no fill --> <polygon points="100,100 150,25 150,75 200,0" fill="none" stroke="black" /> </svg> attributes points this attribute defines the list of points (pairs of x,y absolute coordinates) required to draw the polygon.
...ple of the same polygon shape with stroke and no fill --> <polygon points="100,100 150,25 150,75 200,0" fill="none" stroke="black" /> </svg> attributes points this attribute defines the list of points (pairs of x,y absolute coordinates) required to draw the polygon.
<use> - SVG: Scalable Vector Graphics
Web › SVG › Element › use
xlink:href an <iri> reference to an element/fragment that needs to be duplicated.
...iri> ; default value: none; animatable: yes x the x coordinate of the use element.
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
(alignment-baseline, baseline-shift, dominant-baseline, kerning, letter-spacing, word-spacing, writing-mode, glyph-orientation-horizontal, glyph-orientation-vertical) recently implemented presentation attributes: direction, unicode-bidi, font-variant, text-decoration svgtextelement recently imlemented bindings: selectsubstring recently implemented attributes: textlength, lengthadjust tspan implemented.
...(alignment-baseline, baseline-shift, dominant-baseline, kerning, letter-spacing, word-spacing, writing-mode, glyph-orientation-horizontal, glyph-orientation-vertical) recently implemented presentation attributes: direction, unicode-bidi, font-variant, text-decoration svgtspanelement recently implemented bindings: selectsubstring recently implemented attributes: textlength, lengthadjust tref this feature, present in early draft of the spec, has been removed from it and is therefor not implemented (bug 273171).
Index - XPath
Web › XPath › Index
erence the round function returns a number that is the nearest integer to the given number.
...that is the nearest integer to the given number.
Introduction to using XPath in JavaScript - XPath
ulttype parameter is either: unordered_node_snapshot_type ordered_node_snapshot_type the xpathresult object returned is a static node-set of matched nodes, which allows us to access each node through the snapshotitem(itemnumber) method of the xpathresult object, where itemnumber is the index of the node to be retrieved.
... 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.
XPath snippets - XPath
the last name " + results[i].value); // get the 2nd person node results = evaluatexpath(people, "/people/person[2]"); // get all the person nodes that have addresses in denver results = evaluatexpath(people, "//person[address/@city='denver']"); // get all the addresses that have "south" in the street name results = evaluatexpath(people, "//address[contains(@street, 'south')]"); alert(results.length); docevaluatearray the following is a simple utility function to get (ordered) xpath results into an array, regardless of whether there is a special need for namespace resolvers, etc.
...// gives 'a' in html document with at least one link function docevaluatearray (expr, doc, context, resolver) { var i, result, a = []; doc = doc || (context ?
Using the WebAssembly JavaScript API - WebAssembly
again the argument is specified in units of webassembly pages: memory.grow(1); if a maximum value was supplied upon creation of the memory instance, attempts to grow past this maximum will throw a webassembly.rangeerror exception.
...nce, attempts to grow past this maximum will throw a webassembly.rangeerror exception.
Content Scripts - Archive of obsolete content
contentscriptfile: self.data.url("content-script.js"), contenturl: "http://en.wikipedia.org/wiki/internet" }); pageworker.port.on("first-para", function(firstpara) { console.log(firstpara); }); pageworker.port.emit("get-first-para"); // content-script.js self.port.on("get-first-para", getfirstpara); function getfirstpara() { var paras = document.getelementsbytagname("p"); if (paras.length > 0) { var firstpara = paras[0].textcontent; self.port.emit("first-para", firstpara); } } from page-mod a single page-mod object might attach its scripts to multiple pages, each with its own context in which the content scripts are executing, so it needs a separate channel (worker) for each page.
page-worker - Archive of obsolete content
usually) the port api.
util/collection - Archive of obsolete content
dy contained in the collection are ignored.
Canvas code snippets - Archive of obsolete content
s the following function will return the number of pixels in a canvas that have the rgb color of r, g and b.
Drag & Drop - Archive of obsolete content
tem 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(flavor, data, length); if (data) { try { var str = data.value.queryinterface(components.interfaces.nsisupportsstring); } catch(ex) { } if (str) { uri = _ios.newuri(str.data.split("\n")[0], null, null); } else { var file = data.value.queryinterface(components.interfaces...
HTML to DOM - Archive of obsolete content
an chrome-level) <div> in the current page, then parsing the html fragment and attaching that fragment to the <div>.
IsDefaultNamespace - Archive of obsolete content
re/namespaces-algorithms.html#isdefaultnamespacealgo function isdefaultnamespace(node, namespaceuri) { if (node.isdefaultnamespace) { return node.isdefaultnamespace(namespaceuri); } switch (node.nodetype) { case 1: // element_node if (!node.prefix) { return (node.namespaceuri === namespaceuri); } if (node.attributes.length) { for (var i=0; i < node.attributes.length; i++) { var att = node.attributes[i]; if (att.localname === 'xmlns') { return att.value === namespaceuri; } } } if (node.parentnode) { // entityreferences may have to be skipped to get to it ...
LookupNamespaceURI - Archive of obsolete content
pe) { case 1: // element_node (could also just test for node.element_node, etc., if supported in all browsers) if (node.namespaceuri != null && node.prefix === prefix) { // note: prefix could be "null" in the case we are looking for default namespace return node.namespaceuri; } if (node.attributes.length) { for (i = 0; i < node.attributes.length; i++) { att = node.attributes[i]; if (xmlnspattern.test(att.name) && xmlnspattern.exec(att.name)[1] === prefix) { if (att.value) { return att.value; } return null; // unknow...
LookupPrefix - Archive of obsolete content
only function _lookupnamespaceprefix (namespaceuri, originalelement) { var xmlnspattern = /^xmlns:(.*)$/; if (originalelement.namespaceuri && originalelement.namespaceuri === namespaceuri && originalelement.prefix && originalelement.lookupnamespaceuri(originalelement.prefix) === namespaceuri) { return originalelement.prefix; } if (originalelement.attributes && originalelement.attributes.length) { for (var i=0; i < originalelement.attributes.length; i++) { var att = originalelement.attributes[i]; xmlnspattern.lastindex = 0; var localname = att.localname || att.name.substr(att.name.indexof(':')+1); // latter test for ie which doesn't support localname if (localname.indexof(':') !== -1) { // for firefox when in html mode localname = localname.substr(att.name.indexof(':')...
Tabbox - Archive of obsolete content
ar 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 around if last tab is removed, widget fails to advance to next tab*/ if(-1 == tabbox.selectedindex && tabs.childnodes.length>0){ tabbox.selectedindex=0; } } creating a close tab button to have a tab close button, you must configure the style.
XPath - Archive of obsolete content
jax is a class written by javascript which return responsexml object to parsexml function function parsexml(obj)//obj is the returnxml object now { if(!obj.documentelement) { alert("your browser does't support this script!"); return; } var fields = [];//store the results if(window.activexobject) { var tobj = obj.documentelement.selectnodes("/root/field/item"); for(var i=0;i<tobj.length; i++) { fields.push(tobj[i].text); } } else { var tobj = obj.evaluate("/root/field/item",obj.documentelement,null, xpathresult.any_type, null); var tmp = tobj.iteratenext(); while(tmp) { fields.push(tmp.textcontent); tmp = tobj.iteratenext(); } } alert(fields); } //here is the demo xml file for xpath <?xml version="1.0"?> <root> <field> <item>art_id</item> <...
The Essentials of an Extension - Archive of obsolete content
our own system.
Creating a dynamic status bar extension - Archive of obsolete content
nction.
progress - Archive of obsolete content
n none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
Defining Cross-Browser Tooltips - Archive of obsolete content
-browser, standards-friendly way.
Monitoring WiFi access points - Archive of obsolete content
this example simply displays a list of the available access points.
Creating a hybrid CD - Archive of obsolete content
warning: the content of this article may be out of date.
Exception logging in JavaScript - Archive of obsolete content
javascript exceptions were always logged into the error console if they remained unhandled at the time execution returned back into c++ code.
Documentation for BiDi Mozilla - Archive of obsolete content
rsion to/from presentation forms nsbidipresutils layout/base/nsbidipresutils.cpp utilities for the layout engine including: resolve frames by bidi level split framesreorder frames format bidi text support for deletion and insertion of frames by editor nsbiditextframe layout/generic/nsbidiframes.cpp subclass of nsframe with additional method setoffsets, to adjust mcontentoffset and mcontentlength during bidi processing nsdirectionalframe layout/generic/nsbidiframes.cpp subclass of nsframethis is a special frame which represents a bidi control.
Layout System Overview - Archive of obsolete content
it.
Java in Firefox Extensions - Archive of obsolete content
ls.urlsetpolicy'; var policyclass = java.lang.class.forname( str, true, loader ); var policy = policyclass.newinstance(); policy.setouterpolicy(java.security.policy.getpolicy()); java.security.policy.setpolicy(policy); policy.addpermission(new java.security.allpermission()); for (var j=0; j < urls.length; j++) { policy.addurl(urls[j]); } }catch(e) { alert(e+'::'+e.linenumber); } } //get extension folder installation path...
statusBar - Archive of obsolete content
s functions to add and control the statusbar of the browser.
Priority Content - Archive of obsolete content
t currently on this list, feel free to add it.
Space Manager Detailed Design - Archive of obsolete content
allocated and returned for the // right part // // does not insert the new band rect into the linked list bandrect* splithorizontally(nscoord aright); // accessor functions prbool isoccupiedby(const nsiframe*) const; void addframe(const nsiframe*); void removeframe(const nsiframe*); prbool hassameframelist(const bandrect* abandrect) const; print32 length() const; }; // circular linked list of band rects struct bandlist : bandrect { bandlist(); // accessors prbool isempty() const {return pr_clist_is_empty((prcliststr*)this);} bandrect* head() const {return (bandrect*)pr_list_head(this);} bandrect* tail() const {return (bandrect*)pr_list_tail(this);} // operations void append(bandrect* abandrect) {pr_app...
Tuning Pageload - Archive of obsolete content
node at a time.
URIs and URLs - Archive of obsolete content
t consists of: scheme, username, password, host, port, directory, filebasename, fileextension, param, query and ref.
Venkman Internals - Archive of obsolete content
before the last instance of the word "function" on the line where this function starts.
DOM Interfaces - Archive of obsolete content
documenturl of type domstring - the url of a binding document.
Using XPInstall to Install Plugins - Archive of obsolete content
tfolder api call.
Windows Install - Archive of obsolete content
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(flongfilepath); if(sshortfilepath) { fren8dot3ini.writestring("rename", sshortfilepath, flongfilepath); binicreated = true; } } if(binicreated) updatewinreg4ren8dot3() ; } return(0); } // main var srdest;...
progressmeter.value - Archive of obsolete content
« xul reference home value type: integer an integer ranging from 0 to the maximum value that indicates the progress.
Attribute (XUL) - Archive of obsolete content
header hideseconds hidespinbuttons highlightnonmatches homepage href icon id ignoreblurwhilesearching ignorecase ignoreincolumnpicker ignorekeys image inactivetitlebarcolor increment index inputtooltiptext insertafter insertbefore instantapply inverted iscontainer isempty key keycode keytext label lastpage lastselected last-tab left linkedpanel max maxheight maxlength maxpos maxrows maxwidth member menu menuactive min minheight minresultsforpopup minwidth mode modifiers mousethrough movetoclick multiline multiple name negate newlines next noautofocus noautohide noinitialfocus nomatch norestorefocus object observes onbeforeaccept onbookmarkgroup onchange onclick onclosetab oncommand oncommandupdate ondialogaccept ondialogcan...
Getting File Information - Archive of obsolete content
it is also possible to modify the size of a file by setting the filesize (nsifile.attributes) attribute to a value.
Writing to Files - Archive of obsolete content
d, the data is written at the beginning of the file, overwriting what is already there.
How to implement a custom XUL query processor component - Archive of obsolete content
s no longer being used by the builder hasbeenremoved: function() { } }; // basic wrapper for nsisimpleenumerator function templateresultset(aarrayofdata) { this._index = 0; this._array = aarrayofdata; } templateresultset.prototype = { queryinterface: xpcomutils.generateqi([components.interfaces.nsisimpleenumerator]), hasmoreelements: function() { return this._index < this._array.length; }, getnext: function() { return new templateresult(this._array[this._index++]); } }; // the query processor class - implements nsixultemplatequeryprocessor function templatequeryprocessor() { // our basic list of data this._data = [ {name: "mark", age: 36, hair: "brown", eye: "brown"}, {name: "bill", age: 25, hair: "red", eye: "black"}, ...
Tooltips - Archive of obsolete content
on the element that the mouse is moved over.
Building Menus With Templates - Archive of obsolete content
ery simple to create a menu using a template.
Tree Widget Changes - Archive of obsolete content
n 1.
Adding Labels and Images - Archive of obsolete content
locks of text.
Adding Methods to XBL-defined Elements - Archive of obsolete content
lue="a stack:"/> <stack> <children/> </stack> </content> </binding> if you use the dom functions such as childnodes to get the children of the the xul box element with the id of outer, you willl find that it has has 4 children.
Document Object Model - Archive of obsolete content
irstchild property and then navigate through the children using the nextsibling property.
Focus and Selection - Archive of obsolete content
tarting and ending positions of the current selection respectively.
Introduction - Archive of obsolete content
king building cross-platform software time-consuming and costly.
More Event Handlers - Archive of obsolete content
moved onto an element.
Using spell checking in XUL - Archive of obsolete content
getting a list of suggestions to get a list of suggestions for a misspelled word, you call the suggest() method, specifying the word and an object to be filled with an array of possible suggestions.
XUL Questions and Answers - Archive of obsolete content
; selectedtreeitem = tree.view.getitematindex(tree.currentindex); selectedtreeitem.firstchild.setattribute('style', 'background: #ff0000'); what is an example of tab browser in xul?
XUL controls - Archive of obsolete content
<menulist editable="true"> <menupopup> <menuitem label="elephants"/> <menuitem label="kangaroos"/> <menuitem label="bats" /> </menupopup> </menulist> more information about the editable menulist element.
listbox - Archive of obsolete content
"/> </listhead> <listcols> <listcol/> <listcol flex="1"/> </listcols> </listbox> var thelist = document.getelementbyid('thelist'); gems = [ {gem: "ruby", price: "$3,500 - $4,600"}, {gem: "emerald", price: "$700 - 4,250"}, {gem: "blue sapphire", price: "$3,400 - $4,500"}, {gem: "diamond", price: "$5,600 - $16,000"} ]; for (var i = 0; i < gems.length; i++) { var row = document.createelement('listitem'); var cell = document.createelement('listcell'); cell.setattribute('label', gems[i].gem); row.appendchild(cell); cell = document.createelement('listcell'); cell.setattribute('label', gems[i].price ); row.appendchild(cell); thelist.appendchild(row); } attributes disabled type: boolean indicates whether ...
MacFAQ - Archive of obsolete content
rfaces.nsiwindowmediator); var win = windowmediator.getmostrecentwindow(singletonwindowtype); if (win) { window.close(); win.focus(); } } if (window.arguments && window.arguments[0]){ try { var cmdline = window.arguments[0] .queryinterface(components.interfaces.nsicommandline); for (var i = 0; i < cmdline.length; ++i) { debug(cmdline.getargument(i)) } } catch(ex) { debug(window.arguments[0]) // do something with window.arguments[0] //nspreferences.setunicharpref("myxul.cmdlinevalue", window.arguments[0]) } window.addeventlistener("load", checkotherwindows , false); } ]]></script> </window> ...
nsIContentPolicy - Archive of obsolete content
e.
2006-12-01 - Archive of obsolete content
show modal windows, using window.open(), from inside an untrusted script.
2006-11-03 - Archive of obsolete content
merged the reflow branch to a new branch (reflow_20061031_branch) off of the trunk.
Monitoring plugins - Archive of obsolete content
ion arrives your class must have an observe method, receiving 3 parameters (subject, topic and data).
NPN_GetValueForURL - Archive of obsolete content
ck the requested information.
NPN_PostURLNotify - Archive of obsolete content
npbool file, void* notifydata); parameters the function has the following parameters: instance current plug-in instance, specified by the plug-in.
NPN_SetValueForURL - Archive of obsolete content
len); parameters this function has the following parameters: instance pointer to the current plug-in instance.
NPP_Write - Archive of obsolete content
stream, int32 offset, int32 len, void* buf); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPSavedData - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary block of instance information saved after the plug-in instance is deleted; can be returned to the plug-in to restore the data in future instances of the plug-in.
NPVariant - Archive of obsolete content
_npvariant() initialize v to a variant of type npvarianttype_double with the value val.
The First Install Problem - Archive of obsolete content
user benefit: if there is another mimetype handler for application/x-myapp, only myapplication gets invoked.
SAX - Archive of obsolete content
on of the most commonly used content handler: function print(s) { dump(s + "\n"); } xmlreader.contenthandler = { // nsisaxcontenthandler startdocument: function() { print("startdocument"); }, enddocument: function() { print("enddocument"); }, startelement: function(uri, localname, qname, /*nsisaxattributes*/ attributes) { var attrs = []; for(var i=0; i<attributes.length; i++) { attrs.push(attributes.getqname(i) + "='" + attributes.getvalue(i) + "'"); } print("startelement: namespace='" + uri + "', localname='" + localname + "', qname='" + qname + "', attributes={" + attrs.join(",") + "}"); }, endelement: function(uri, localname, qname) { print("endelement: namespace='" + uri + "', localname='" + ...
Digital Signatures - Archive of obsolete content
mentioned at the beginning of this document.
Using SSH to connect to CVS - Archive of obsolete content
ild mozilla.
Using the W3C DOM - Archive of obsolete content
ne style settings for left and top as integers, parse the integer from the string by using parseint().
Array.observe() - Archive of obsolete content
removed elements.
Function.arity - Archive of obsolete content
the arity property used to return the number of arguments expected by the function, however, it no longer exists and has been replaced by the function.prototype.length property.
New in JavaScript 1.4 - Archive of obsolete content
released in 1999.
Object.prototype.__noSuchMethod__ - Archive of obsolete content
; o.baz(); // output // foo (1, 2, 3) // bar (4, 5) // baz () using __nosuchmethod__ to simulate multiple inheritance an example of code that implements a primitive form of multiple inheritance is shown below.
Object.prototype.watch() - Archive of obsolete content
a valid name and an age between 0 and 200.
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
presented in xml format as follows: <comments> <comment message="”jaxer" name="”nigel" id="”1”"></comment> ...
Implementation Status - Archive of obsolete content
y applied via a bind to an element fails to apply to child attributes 342319; 6.1.5 calculate supported 6.1.6 constraint supported 6.1.7 p3ptype unsupported 279049; 6.2.1 atomic datatype partial we will support simpletype's using length, minlength, maxlength, pattern, maxinclusive, mininclusive, maxexclusive, minexclusive, totaldigits, and fractiondigits 7.
Audio for Web games - Game development
start and stop times in seconds.
Win the game - Game development
ev-phaser-content-kit/demos/lesson12.html.
2D maze game with device orientation - Game development
ith an x and y position and t value for each.
CORS-safelisted request header - MDN Web Docs Glossary: Definitions of Web-related terms
ly have values consisting of 0-9, a-z, a-z, space or *,-.;=.
CORS-safelisted response header - MDN Web Docs Glossary: Definitions of Web-related terms
eaders listed in access-control-expose-headers).
First input delay - MDN Web Docs Glossary: Definitions of Web-related terms
first input delay (fid) measures the time from when a user first interacts with your site (i.e.
Flex - MDN Web Docs Glossary: Definitions of Web-related terms
it causes the element that it applies to to become a flex container, and the element's children to each become a flex item.
Forbidden header name - MDN Web Docs Glossary: Definitions of Web-related terms
nt retains full control over them.
Grid Tracks - MDN Web Docs Glossary: Definitions of Web-related terms
lumns and grid-template-rows properties or the shorthand grid or grid-template properties.
HTTP header - MDN Web Docs Glossary: Definitions of Web-related terms
the data eventually transmitted in the body.
Packet - MDN Web Docs Glossary: Definitions of Web-related terms
he high priority queue is emptied more quickly than lower priority queues when the network is congested.
Response header - MDN Web Docs Glossary: Definitions of Web-related terms
a response header is an http header that can be used in an http response and that doesn't relate to the content of the message.
Round Trip Time (RTT) - MDN Web Docs Glossary: Definitions of Web-related terms
round trip time (rtt) is the length time it takes for a data packet to be sent to a destination plus the time it takes for an acknowledgment of that packet to be received back at the origin.
Hash - MDN Web Docs Glossary: Definitions of Web-related terms
the hash function takes a variable length message input and produces a fixed-length hash output.
JPEG - MDN Web Docs Glossary: Definitions of Web-related terms
jpeg (joint photographic experts group) is a commonly used method of lossy compression for digital images.
WAI-ARIA basics - Learn web development
"hidden-alert" aria-live="assertive"></p> which is hidden from view using absolute positioning.
Fundamental CSS comprehension - Learn web development
include .card at the start of the selector chain in all your rules, so that these rules wouldn't interfere with the styling of any other elements if the business card were to be put on a page with a load of other content.
Pseudo-classes and pseudo-elements - Learn web development
— as that will change if the screen width or font-size changes — it is impossible to robustly do this by adding html.
Multiple-column layout - Learn web development
ave two opportunities to change the way that columns display: changing the size of the gap between columns using the column-gap.
Basic native form controls - Learn web development
r cannot modify the input value but it is still sent with the rest of the form data) or disabled (the input value can't be modified and is never sent with the rest of the form data).
Example 4 - Learn web development
'.option'), selectedindex = getindex(select); select.tabindex = 0; select.previouselementsibling.tabindex = -1; updatevalue(select, selectedindex); optionlist.foreach(function (option, index) { option.addeventlistener('click', function (event) { updatevalue(select, index); }); }); select.addeventlistener('keyup', function (event) { var length = optionlist.length, index = getindex(select); if (event.keycode === 27) { deactivateselect(select); } if (event.keycode === 40 && index < length - 1) { index++; } if (event.keycode === 38 && index > 0) { index--; } updatevalue(select, index); }); }); }); result ...
Example 5 - Learn web development
lue(select, index); }); }); select.addeventlistener('click', function (event) { toggleoptlist(select); }); select.addeventlistener('focus', function (event) { activeselect(select, selectlist); }); select.addeventlistener('blur', function (event) { deactivateselect(select); }); select.addeventlistener('keyup', function (event) { var length = optionlist.length, index = getindex(select); if (event.keycode === 27) { deactivateselect(select); } if (event.keycode === 40 && index < length - 1) { index++; } if (event.keycode === 38 && index > 0) { index--; } updatevalue(select, index); }); }); }); result ...
How to build custom form controls - Learn web development
// each time a user clicks on an option, we update the value accordingly optionlist.foreach(function (option, index) { option.addeventlistener('click', function (event) { updatevalue(select, index); }); }); // each time a user uses their keyboard on a focused control, we update the value accordingly select.addeventlistener('keyup', function (event) { var length = optionlist.length, index = getindex(select); // when the user hits the down arrow, we jump to the next option if (event.keycode === 40 && index < length - 1) { index++; } // when the user hits the up arrow, we jump to the previous option if (event.keycode === 38 && index > 0) { index--; } updatevalue(select, index); }); }); }); in the code abov...
Sending forms through JavaScript - Learn web development
e.dom.addeventlistener( "change", function () { if( reader.readystate === filereader.loading ) { reader.abort(); } reader.readasbinarystring( file.dom.files[0] ); } ); // senddata is our main function function senddata() { // if there is a selected file, wait it is read // if there is not, delay the execution of the function if( !file.binary && file.dom.files.length > 0 ) { settimeout( senddata, 10 ); return; } // to construct our multipart form data request, // we need an xmlhttprequest instance const xhr = new xmlhttprequest(); // we need a separator to define each part of the request const boundary = "blob"; // store our body request in a string.
Test your skills: Other controls - Learn web development
r help — see the assessment or further help section at the bottom of this page.
UI pseudo-classes - Learn web development
lling-checkbox').addeventlistener('change', togglebilling); }, false); function togglebilling() { // select the billing text fields let billingitems = document.queryselectorall('#billing input[type="text"]'); // select the billing text labels let billinglabels = document.queryselectorall('.billing-label'); // toggle the billing text fields and labels for (let i = 0; i < billingitems.length; i++) { billingitems[i].disabled = !billingitems[i].disabled; if(billinglabels[i].getattribute('class') === 'billing-label disabled-label') { billinglabels[i].setattribute('class', 'billing-label'); } else { billinglabels[i].setattribute('class', 'billing-label disabled-label'); } } } it uses the change event to let the user enable/disable the billing fields, and t...
Add a hitmap on top of an image - Learn web development
s are empty elements, but do require four attributes: shape coords shape takes one of four values: circle, rect, poly, and default.
Adding vector graphics to the Web - Learn web development
function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { const scrollpos = textarea.scrolltop; const caretpos = textarea.selectionstart; const front = (textarea.value).substring(0, caretpos); const back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not ...
From object to iframe — other embedding technologies - Learn web development
function(e){ if (e.keycode === 9) { e.preventdefault(); insertatcaret('\t'); } if (e.keycode === 27) { textarea.blur(); } }; function insertatcaret(text) { const scrollpos = textarea.scrolltop; const caretpos = textarea.selectionstart; const front = (textarea.value).substring(0, caretpos); const back = (textarea.value).substring(textarea.selectionend, textarea.value.length); textarea.value = front + text + back; caretpos = caretpos + text.length; textarea.selectionstart = caretpos; textarea.selectionend = caretpos; textarea.focus(); textarea.scrolltop = scrollpos; } // update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not t...
HTML table basics - Learn web development
Learn › HTML › Tables › Basics
ociations between row and column headers.
Graceful asynchronous programming with Promises - Learn web development
from success to failure or vice versa once the operation has completed.
Client-side storage - Learn web development
cord is not present, it will be undefined), its video files (stored as blobs) and the video name are passed straight to the displayvideo() function to place them in the ui.
Storing the information you need — Variables - Learn web development
sponding to the position of the value you want returned.
JavaScript First Steps - Learn web development
article we'll look at all the common things that you really ought to know about strings when learning javascript, such as creating strings, escaping quotes in string, and joining them together.
Setting up your own test automation environment - Learn web development
ole.log('form input editable'); } }); }); webdriver will now wait for 2 seconds before filling in the form field.
Browser chrome tests
bugger the following should work ./mach mochitest -f browser --debugger gdb browser/base/content/test/ run ./mach help mochitest-browser for more options.
Creating a Login Manager storage module
rvice;1"].
Simple Instantbird build
instructions for your os and then continue following these build instructions.
Reviewer Checklist
haredpreferences values, or build-time flags.
Communicating with frame scripts
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 = []; ...
overflow-clip-box-block
"> <div class="scroll padding-box"><span>abcdefghijklmnopqrstuvwxyzÅÄÖ</span></div> </div> css .scroll { overflow: auto; padding: 0 30px; width: 6em; border: 1px solid black; background: lime content-box; } .padding-box { overflow-clip-box-block: padding-box; } javascript function scrollsomeelements() { var elms = document.queryselectorall('.scroll'); for (i=0; i < elms.length; ++i) { elms[i].scrollleft=80; } } var elt = document.queryelementsbytagname('body')[0]; elt.addeventlistener("load", scrollsomeelements, false); result specifications this property has been proposed to the w3c csswg; it is not yet on the standard track but, if accepted, should appear in css overflow module level 3.
overflow-clip-box-inline
> <div class="scroll padding-box"><span>abcdefghijklmnopqrstuvwxyzÅÄÖ</span></div> </div> css .scroll { overflow: auto; padding: 0 30px; width: 6em; border: 1px solid black; background: lime content-box; } .padding-box { overflow-clip-box-inline: padding-box; } javascript function scrollsomeelements() { var elms = document.queryselectorall('.scroll'); for (i=0; i < elms.length; ++i) { elms[i].scrollleft=80; } } var elt = document.queryelementsbytagname('body')[0]; elt.addeventlistener("load", scrollsomeelements, false); result specifications this property has been proposed to the w3c csswg; it is not yet on the standard track but, if accepted, should appear in css overflow module level 3.
overflow-clip-box
ll padding-box"> <div class="scroll padding-box"><span>abcdefghijklmnopqrstuvwxyzÅÄÖ</span></div> </div> css .scroll { overflow: auto; padding: 0 30px; width: 6em; border: 1px solid black; background: lime content-box; } .padding-box { overflow-clip-box: padding-box; } js function scrollsomeelements() { var elms = document.queryselectorall('.scroll'); for (i=0; i < elms.length; ++i) { elms[i].scrollleft=80; } } var elt = document.queryelementsbytagname('body')[0]; elt.addeventlistener("load", scrollsomeelements, false); result specifications this property has been proposed to the w3c csswg; it is not yet on the standard track but, if accepted, should appear in css overflow module level 3.
HTTP Cache
a new writer.
IME handling guide
stored in mranges of widgetcompositionevent only when its message is ecompositionchange.
CustomizableUI.jsm
console.log('my widget moved'); var useicon; if (aarea == customizableui.area_panel) { useicon = 'chrome://branding/content/icon32.png'; } else { useicon = 'chrome://branding/content/icon16.png'; } var myinstances = customizableui.getwidget('noida').instances; for (var i=0; i<myinstances.length; i++) { myinstances[i].node.setattribute('image', useicon); } }, onwidgetdestroyed: function(awidgetid) { console.log('a widget destroyed so removing listener, arguments:', arguments); if (awidgetid != 'noida') { return } console.log('my widget destoryed'); customizableui.remov...
NetUtil.jsm
.
Examples
promises and then return when all are done?
Sqlite.jsm
lt in 2 insert statements being committed in a deferred transaction (assuming the inserts proceed without error, of course).
source-editor.jsm
ginning of the text.
Localization content best practices
rìobhainn a shàbhaladh in gaelic.
Localization technical reviews
es from the beginning, the region.properties files will be reverted to en-us.
Mozilla Framework Based on Templates (MFBT)
tures used throughout mozilla code, including in the javascript engine.
Using the viewport meta tag to control layout on mobile browsers
put device is very different from that of a typical computer display, the user agent should rescale pixel values.
powermetrics
how-process-coalition --show-process-gpu -n 1 -i 5000 --samplers tasks tells it to just do per-process measurements.
tools/power/rapl
distribution of 'total' values: mean = 8.85 w std dev = 3.50 w 0th percentile = 5.17 w (min) 5th percentile = 5.17 w 25th percentile = 5.17 w 50th percentile = 8.13 w 75th percentile = 11.16 w 95th percentile = 14.63 w 100th percentile = 14.63 w (max) the distribution data is omitted if there was zero or one samples taken.
AsyncTestUtils extended framework
you move them to.
NSPR Error Handling
this chapter describes the functions for retrieving and setting errors and the error codes set by nspr.
NSPR Types
this chapter describes the most common nspr types.
PRNetAddr
is binary-compatible with the socket address structures in the familiar berkeley socket interface, although this fact should not be relied upon.
PR_ExportFileMapAsString
creates a string identifying a prfilemap.
PR_GetRandomNoise
number.
PR_Initialize
lize implicitly calls pr_cleanup on exiting the primordial function.
PR_LOG
parameters: _module a pointer to a log module structure.
PR_Listen
listens for connections on a specified socket.
PR_Open
ting only.
PR_TransmitFile
rint32 hlen, prtransmitfileflags flags, printervaltime timeout); parameters the function has the following parameters: networksocket a pointer to a prfiledesc object representing the connected socket to send data over.
PR_Unmap
unmap a memory region that is backed by a memory-mapped file.
PR_Writev
of the following values: a positive number indicates the number of bytes successfully written.
NSS_3.12.1_release_notes.html
] bug 434099: nss relies on unchecked pkcs#11 object attribute values bug 434187: fix the gcc compiler warnings in nss/lib bug 434398: libpkix cannot find issuer cert immediately after checking it with ocsp bug 434808: certutil -b deadlock when importing two or more roots bug 434860: coverity 1150 - dead code in ocsp_createcertid bug 436428: remove unneeded assert from sec_pkcs7encryptlength bug 436430: make nss public headers compilable with no_nspr_10_support defined bug 436577: uninitialized variable in sec_pkcs5createalgorithmid bug 438685: libpkix doesn't try all the issuers in a bridge with multiple certs bug 438876: signtool is still using static libraries.
NSS_3.12.2_release_notes.html
ent failure reasons bug 408260: certutil usage doesn't give enough information about trust arguments bug 412311: replace pr_interval_no_wait with pr_interval_no_timeout in client initialization calls bug 423839: add multiple pkcs#11 token password command line option to nss tools.
NSS 3.12.5 release_notes
n functions see nss.h for details.
NSS 3.12.6 release notes
t_processocspresponse fails for any reason bug 515870: gcc compiler warnings in nss 3.12.4 bug 518255: the input buffer for sgn_update should be declared const bug 519550: allow the specification of an alternate library for sqlite bug 524167: crash in [[@ find_objects_by_template - nsstoken_findcertificatebyissuerandserialnumber] bug 526910: maxresponselength (initialized to pkix_default_max_response_length) is too small for downloading some crls.
NSS 3.15 release notes
llocitem, see bug 298649 and bug 298938.
NSS 3.17.3 release notes
or newer.
NSS 3.19.1 release notes
bug 1138554 / cve-2015-4000 - the minimum strength of keys that libssl will accept for finite field algorithms (rsa, diffie-hellman, and dsa) have been increased to 1023 bits.
NSS 3.27.2 Release Notes
this is a patch release to address a memory leak in the ssl_settrustanchors() function.
NSS 3.30 release notes
a_policy - identifier for a boolean pkcs#11 attribute, that should be set to true, if a ca is present because of it's acceptance according to the mozilla ca policy notable changes in nss 3.30 the tls server code has been enhanced to support session tickets when no rsa certificate (e.g.
NSS 3.44.4 release notes
s nspr 4.21 or newer.
NSS 3.45 release notes
params from lib/freebl/pqg.c (static analysis) bug 1509432 - de-duplicate code between mp_set_long and mp_set_ulong bug 1515011 - fix a mistake with chacha20-poly1305 test code where tags could be faked.
NSS 3.46 release notes
575411 for details.
NSS 3.47 release notes
cted bit set bug 1583068 - nss 3.47 should pick up fix from bug 1575821 (nspr 4.23) bug 1152625 - support aes hw acceleration on armv8 bug 1549225 - disable dsa signature schemes for tls 1.3 bug 1586947 - pk11_importandreturnprivatekey does not store nickname for ec keys bug 1586456 - unnecessary conditional in pki3hack, pk11load and stanpcertdb bug 1576307 - check mechanism param and param length before casting to mechanism-specific structs bug 1577953 - support longer (up to rfc maximum) hkdf outputs bug 1508776 - remove refcounting from sftk_freesession (cve-2019-11756) bug 1494063 - support tls exporter in tstclnt and selfserv bug 1581024 - heap overflow in nss utility "derdump" bug 1582343 - soft token mac verification not constant time bug 1578238 - handle invald tag sizes for ...
NSS 3.52.1 release notes
es nspr 4.25 or newer.
NSS Sample Code Sample1
received // from the primary in a file, and unwrap it each time the key is required // (such as at server startup).
NSS Sample Code sample2
alkeyslot(); is a simpler alternative but in * theory, it *may not* return the optimal slot for the operation.
NSS Sample Code sample3
sample code 3: hashing, mac /* * demonstration program for hashing and macs */ #include <iostream.h> #include "pk11pub.h" #include "nss.h" static void printdigest(unsigned char *digest, unsigned int len) { int i; cout << "length: " << len << endl; for(i = 0;i < len;i++) printf("%02x ", digest[i]); cout << endl; } /* * main */ int main(int argc, const char *argv[]) { int status = 0; pk11slotinfo *slot = 0; pk11symkey *key = 0; pk11context *context = 0; unsigned char data[80]; unsigned char digest[20]; /*is there a way to tell how large the output is?*/ unsigned int len; secstatus s; /* initialize nss * if your application code has already initialized nss, you can skip it * here.
nss tech note1
he decoder should skip decoding of the component.
FC_DecryptUpdate
name fc_decryptupdate - decrypt a block of a multi-part encryption operation.
FC_DigestFinal
pdigest, ck_ulong_ptr puldigestlen ); parameters hsession [in] session handle.
FC_DigestUpdate
name fc_digestupdate - process the next block of a multi-part digest operation.
FC_Encrypt
name fc_encrypt - encrypt a block of data.
FC_EncryptUpdate
name fc_encryptupdate - encrypt a block of a multi-part encryption operation.
FC_InitPIN
name fc_initpin() - initialize the user's pin.
FC_InitToken
name fc_inittoken() - initialize or re-initialize a token.
FC_Login
name fc_login() - log a user into a token.
FC_SeedRandom
name fc_seedrandom() - mix additional seed material into the random number generator.
FC_SetOperationState
e of a session.
FC_SignFinal
_ulong_ptr pussignaturelen ); parameters hsession [in] session handle.
FC_SignUpdate
name fc_signupdate - process the next block of a multi-part signing operation.
FC_VerifyFinal
name fc_verifyfinal - finish a multi-part verify operation.
FC_VerifyUpdate
name fc_verifyupdate - process the next block of a multi-part verify operation.
NSC_InitToken
name nsc_inittoken() - initialize or re-initialize a token.
NSC_Login
name nsc_login() - log a user into a token.
NSS tools : certutil
t from the current system time, in months, for the beginning of a certificate's validity period.
NSS reference
ctions.
sslfnc.html
values: if successful, zero.
sslintro.html
sen by user preference.
TLS Cipher Suite Discovery
dress of a block of memory allocated to receive that information, and the size in bytes of that block of memory.
NSS Tools certutil
month.
NSS Tools pk12util
dfile specify the text file containing the slot's password -k slotpassword specify a slot's password -w p12filepasswordfile specify the text file containing the pkcs 12 file's password -w p12filepassword specify the pkcs 12 file's password -c key-cipher specify the key encryption algorithm -c certcipher specify the pfx encryption algorithm -m | --key_len keylen specify the desired length of the symmetric key to be used to encrypt the private key -n | --cert_key_len certleylen specify the desired length of the symmetric key to be used to encrypt the top level protocol data unit password based encryption pkcs #12 provides for not only the protection of the private keys but also the certificate and meta-data associated with the keys.
certutil
et an offset from the current system time, in months, for the beginning of a certificate's validity period.
Tutorial: Embedding Rhino
ializes the standard objects (object, function, etc.) this must be done before scripts can be executed.
Rhino FAQ
frequently asked questions about rhino how do i create a java array from javascript?
Small Footprint
a few changes can be made to reduce the footprint of rhino for embeddings where space is at a premium.
Rhino overview
otype.tostring version 1.2 only returns array or object literal notation ("[1]" or "{a:1, b:2}" for example).
How to embed the JavaScript engine
nctions(cx, global, my_functions); how to call javascript functions from c first, create arguments for the call, here i create arguments with 2 items: // [spidermonkey 24] js::autovaluearray is not defined.
Property cache
p caches the results of part 1 above, telling which object contains the desired property.
JS::CompileOptions
arse when it's really needed).
JS::Value
boolean jsval_is_boolean(v) jsval_true, jsval_false, boolean_to_jsval(b) jsval_to_boolean(v) number jsval_is_number(v), jsval_is_int(v), jsval_is_double(v) jsval_zero, jsval_one, int_to_jsval(i), double_to_jsval(d) jsval_to_int(v), jsval_to_double(v) string jsval_is_string(v) string_to_jsval(str) jsval_to_string(v), js_getstringchars(str), js_getstringlength(str) object !jsval_is_primitive(v) object_to_jsval(obj) jsval_to_object(v) there was also a further method, jsval_is_object(v), which did not what you would expect -- return true if the value was an object -- but rather returned true if the value was an object or if it was null.
JSFunctionSpec
struct jsnativewrapper { jsnative op; const jsjitinfo *info; } jsnativewrapper; name type description name const char * the function's name.
JSVAL_IS_STRING
olete since jsapi 32this feature is obsolete.
JS_AliasProperty
me is the property's current name in the object, and alias is the alternate name to assign to the property.
JS_AlreadyHasOwnProperty
threadsafe build, the caller must be in a request on this jscontext.
JS_BeginRequest
constrain garbage collection.
JS_ConcatStrings
x jscontext * the context in which both the strings have been created.
JS_DefineElement
ns false.
JS_DefineFunction
property to create in obj.
JS_DefineProperty
xt * the context in which to define the property.
JS_DefinePropertyWithTinyId
cx jscontext * the context in which to define the property.
JS_DeleteElement
he prototype's element is not deleted.
JS_DeleteProperty
pointer to a js context from which to derive runtime information.
JS_DeleteProperty2
to a js context from which to derive runtime information.
JS_GetProperty
type description cx jscontext * a context.
JS_GetPropertyAttributes
context in which to look up property attributes.
JS_GetPropertyAttrsGetterAndSetter
in which to perform the property lookup.
JS_HasProperty
type description cx jscontext * a context.
JS_LookupProperty
r to a js context from which to derive runtime information.
JS_MakeStringImmutable
owable string (see js_newgrowablestring ) has a buffer that the javascript engine can reallocate so that concatenating it with another string is much faster.
JS_ParseJSON
len, jsval *vp); jsbool js_parsejsonwithreviver(jscontext *cx, const jschar *chars, uint32 len, jsval reviver, jsval *vp); name type description cx jscontext * pointer to a js context.
JS_SetOptions
ranch_callback jsoption_dont_report_uncaught when returning from the outermost api call, prevent uncaught exceptions from being converted to error reports.
JS_SetProperty
er to a js context from which to derive runtime information.
JS_SetPropertyAttributes
* the context in which to set the property attributes.
JS_SuspendRequest
count savedepth); name type description cx jscontext * the context whose current request is to be suspended or resumed.
Stored value
ty.
SpiderMonkey 1.8
.1.
SpiderMonkey 45
1178581) js_internstringn renamed to js_atomizeandpinstringn (bug 1178581) js_internstring renamed to js_atomizeandpinstring (bug 1178581) js_internucstringn renamed to js_atomizeandpinucstringn (bug 1178581) js_internucstring renamed to js_atomizeandpinucstring (bug 1178581) deleted apis js_getcompartmentstats js_seticumemoryfunctions js_isgcmarkingtracer js_ismarkinggray js_idarraylength js_idarrayget js_destroyidarray js_defaultvalue js_getparent js_setparent js::parsepropertydescriptorobject js_deleteproperty2 js_deletepropertybyid2 js_deleteucproperty2 js_deleteelement2 js_newfunctionbyid js_bindcallable js_decompilefunctionbody js_getlatin1internedstringchars js_gettwobyteinternedstringchars js_newdateobjectmsec js_cleardatecaches changed apis js_init ha...
Exploitable crashes
ocated right above the stack trace.
A Web PKI x509 certificate primer
$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.
An Overview of XPCOM
erface, respectively.
Starting WebLock
and information about how to usenecko, the gecko networking libraries, see http://www.mozilla.org/projects/netlib/.
Detailed XPCOM hashtable guide
but you should read most of xpcom/glue/pldhash.h if you intend to use pldhash.
Components.utils.getWeakReference
gecko 11.0, this method was changed to throw an exception if obj is null.
nsScriptableInputStream
omponent manager.
Clone
...
mozIAsyncFavicons
hey have been refreshed by other means.
mozIStorageBindingParamsArray
anged in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports you can only create these objects by calling the mozistoragestatement.newbindingparamsarray().
nsIAlertsService
ional in astring data, optional in nsiprincipal principal, optional in boolean inprivatebrowsing, optional ); parameters imageurl a url identifying the image to display in the notification alert.
nsICacheEntryDescriptor
f their corresponding meanings.
nsIClassInfo
s iids that instances of the class promise to implement.
nsICommandLine
, in boolean acasesensitive); astring getargument(in long aindex); boolean handleflag(in astring aflag, in boolean acasesensitive); astring handleflagwithparam(in astring aflag, in boolean acasesensitive); void removearguments(in long astart, in long aend); nsifile resolvefile(in astring aargument); nsiuri resolveuri(in astring aargument); attributes attribute type description length long number of arguments in the command line.
nsIContentPrefService2
e attribute will be undefined.
nsICryptoHMAC
invalid_arg if an unsupported algorithm type is passed.
nsIDNSService
from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) implemented by: @mozilla.org/network/dns-service;1.
nsIDOMFontFaceList
lic/nsidomfontfacelist.idlscriptable a list of nsidomfontface objects, each representing a single font face.
nsIDOMHTMLTimeRanges
nge, specifying the index number of the range to look up.
nsIDOMOfflineResourceList
boolean mozhasitem(in domstring uri); domstring mozitem(in unsigned long index); void mozremove(in domstring uri); void swapcache(); void update(); attributes attribute type description mozitems nsidomofflineresourcelist the list of dynamically-managed entries in the offline resource list.
nsIDOMStorage
the condition that this order not change by merely changing the value associated with a key, but the order may change when a key is added or removed.
nsIDOMStorage2
please add a summary to this article.
nsIDOMWindowInternal
ent has already been scrolled horizontally.
nsIFaviconService
freshed by other means.
nsIHttpServer
erfaces.nsihttpserver); return { get objectname () { return "webserver"; }, /** * @param integer|string port port or "host:port" * @param object opt optional options.
nsIIdleService
they get back, the observer topic is 'back' in gecko 15 and earlier or 'active' in gecko 16 and later.
nsILocalFile
ess.
nsILoginManagerPrompter
ecause the caller does not know the username of the login to be changed, anewlogin.username and anewlogin.usernamefield will be set (using the user's selection) before modifylogin() is called.
nsIMarkupDocumentViewer
his may be either "logical" or "visual".
nsIMimeHeaders
ameters headername missing description getallofthem missing description return value missing description exceptions thrown missing exception missing description initialize() void initialize( [const] in string allheaders, in long allheaderssize ); parameters allheaders insert the complete message content allheaderssize length of the passed in content exceptions thrown missing exception missing description remarks see also ...
nsIMsgHeaderParser
de only!parseheaderaddresses given a string which contains a list of header addresses, parses it into their component names and mailboxes.
nsINavBookmarksService
m.
nsIOutputStream
ate that we have copied len bytes to the segment *areadcount = len; return ns_ok; } // write the contents of asource into astream, using writesegments // to avoid intermediate buffer copies.
nsIProcess
ses["@mozilla.org/process/util;1"] .createinstance(components.interfaces.nsiprocess); process.init(file); // run the process.
nsIProperties
rty does not exist.
nsIPushSubscription
dh the ecdh public key, used as the input keying material in the hkdf invocation during encryption.
nsISHistory
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.
nsITransferable
ains its own copy of the data, so you can safely discard the original after making this call, if you wish.
nsITreeColumns
nfor(in nsidomelement element); nsitreecolumn getfirstcolumn(); nsitreecolumn getkeycolumn(); nsitreecolumn getlastcolumn(); nsitreecolumn getnamedcolumn(in astring id); nsitreecolumn getprimarycolumn(); nsitreecolumn getsortedcolumn(); void invalidatecolumns(); void restorenaturalorder(); attributes attribute type description count long the number of columns.
nsIURIFixup
nsiurifixupinfo getfixupuriinfo(in autf8string auritext, in unsigned long afixupflags); constants constant value description fixup_flag_none 0 no fixup flags.
nsIURLParser
os, out long schemelen, out unsigned long authoritypos, out long authoritylen, out unsigned long pathpos, out long pathlen); void parseuserinfo(in string userinfo, in long userinfolen, out unsigned long usernamepos, out long usernamelen, out unsigned long passwordpos, out long passwordlen); methods the string to parse in the methods may be given as a null terminated string, in which case the length argument should be -1.
nsIUpdateTimerManager
mer() presents a user interface that checks for and displays the available updates.
nsIWebContentHandlerRegistrar
ng, but its just finding a suitable contentwindow var domwindows = services.wm.getenumerator(null); while (domwindows.hasmoreelements()) { var adomwindow = domwindows.getnext(); if (adomwindow.gbrowser) { if (adomwindow.gbrowser.tabcontainer) { //adomwindow has tabs var tabs = adomwindow.gbrowser.tabcontainer.childnodes; for (var i = 0; i < tabs.length; i++) { console.log(tabs[i].linkedbrowser.contentwindow.location); if (tabs[i].linkedbrowser.contentwindow.location.hostname == myurihostname) { htmlcontentwindow = tabs[i].linkedbrowser.contentwindow; break; //break for loop } } if (htmlcontentwindow) { break; //break w...
nsIXPConnect
missing description exceptions thrown missing exception missing description native code only!setdebugmodewhenpossible when we place the browser in js debug mode, there can't be any js on the stack.
nsIZipWriter
ers\3k2kyc1\documents\prefs\prefs var xpi = fu.file(dir.path + '\\' + dir.leafname + '.zip'); zw.open(xpi, pr.pr_rdwr | pr.pr_create_file | pr.pr_truncate); //pr_truncate overwrites if file exists //pr_create_file creates file if it dne //pr_rdwr opens for reading and writing //recursviely add all var dirarr = [dir]; //adds dirs to this as it finds it for (var i=0; i<dirarr.length; i++) { cu.reporterror('adding contents of dir['+i+']: ' + dirarr[i].leafname + ' path: ' + dirarr[i].path); var direntries = dirarr[i].directoryentries; while (direntries.hasmoreelements()) { var entry = direntries.getnext().queryinterface(ci.nsifile); //entry is instance of nsifile so here https://developer.mozilla.org/docs/xpcom_interface_reference/nsifile ...
NS_CStringGetData
adata, prbool* aterminated = nsnull ); parameters astring [in] a nsacstring instance to inspect.
NS_StringGetData
h" pruint32 ns_stringgetdata( const nsastring& astring, const prunichar** adata, prbool* aterminated ); parameters astring [in] a nsastring instance to inspect.
Working with out parameters
lue properties of adata and adatalen.
XPIDL Syntax
Mozilla › Tech › XPIDL › Syntax
more powerful than xpidl itself can understand.
XPIDL
shared out-parameters should not be freed, as they are intended to refer to constant string literals.
Gloda examples
msadded(aitems, acollection) { }, onitemsmodified: function _onitemsmodified(aitems, acollection) { }, onitemsremoved: function _onitemsremoved(aitems, acollection) { }, onquerycompleted: function _onquerycompleted(id_coll) { //woops no identity if (id_coll.items.length <= 0) return; id = id_coll.items[0]; //now we use the identity to find all messages that person was involved with msg_q=gloda.newquery(gloda.noun_message) msg_q.involves(id) msg_q.getcollection({ /* called when new items are returned by the database q...
MailNews fakeserver
icletogroup newsarticle object, group (string), integral key for group nothing adds the message to the specified group with the specified key getgroup group name group object group is a map key->article, with the additional properties: flags, keys (array of keys), nextkey (next key to use for new articles) getgroupstats group name array of [size, min, max] the size is an estimate if nntp_real_length is not specified in the daemon flags.
Mail composition back end
essage *msgtoreplace, - if the delivery mode is set to nsmsgsaveasdraft, this is a pointer to the the nsimessage object for the message that needs to be replaced const char *attachment1_type, const char *attachment1_body, pruint32 attachment1_body_length, - the full text of the first attachment is provided via `attachment1_type' `attachment1_body' and `attachment1_body_length'.
Activity Manager examples
ementation class mycopyeventundo : public nsiactivityundohandler { public: ns_decl_isupports ns_decl_nsiactivityundohandler mycopyeventundo() {} private: ~mycopyeventundo() {} }; ns_impl_isupports1(mycopyeventundo, nsiactivityundohandler) ns_imethodimp mycopyeventundo::undo(nsiactivityevent *event, nsresult *result) { nsresult rv; // get the subjects of this copy event pruint32 length; nsivariant **subjectlist; rv = event->getsubjects(&length, &subjectlist); if(ns_failed(rv)) return rv; // first subject in the list is the source folder in this particular case nscomptr<nsimsgfolder> folder = do_queryinterface(subjectlist[0]); // get the initiator nsivariant *initiator; event->getinitiator(&initiator); if (initiator) { nsisupports* ptr; rv = ob...
Use SQLite
logs (id unique, log)'); tx.executesql('insert into logs (id, log) values (1, "foobar")'); tx.executesql('insert into logs (id, log) values (2, "logmsg")'); msg = '<p>log message created and row inserted.</p>'; document.queryselector('#status').innerhtml = msg; }); db.transaction(function (tx) { tx.executesql('select * from logs', [], function (tx, results) { var len = results.rows.length, i; msg = "<p>found rows: " + len + "</p>"; document.queryselector('#status').innerhtml += msg; for (i = 0; i < len; i++){ msg = "<p><b>" + results.rows.item(i).log + "</b></p>"; document.queryselector('#status').innerhtml += msg; } }, null); }); ...
PointerType
iting to this value writes the c conversion of the data into the pointed-to memory.
StructType
error fields are not yet defined.
ctypes
the ctypes object contains methods and predefined data types used to create and manage a library.
js-ctypes reference
constructors to create concrete instances of the given type, i.e.
DOM Inspector FAQ - Firefox Developer Tools
hat if i don't want to see those anonymous nodes?
Debugger.Frame - Firefox Developer Tools
.
Network request details - Firefox Developer Tools
ame": "backend-timing", "value": "d=74716 t=1560258099074460" }, { "name": "cache-control", "value": "private, must-revalidate, max-age=0" }, { "name": "content-disposition", "value": "inline; filename=api-result.js" }, { "name": "content-encoding", "value": "gzip" }, { "name": "content-length", "value": "673" }, { "name": "content-type", "value": "text/javascript; charset=utf-8" }, { "name": "date", "value": "tue, 11 jun 2019 13:01:39 gmt" }, { "name": "mediawiki-login-suppressed", "value": "true" }, { "name": "p3p", "value": "cp=\"this is not a p3p policy!
Waterfall - Firefox Developer Tools
ed markers in the waterfall represent garbage collection (gc) events, in which spidermonkey (the javascript engine in firefox) walks the heap looking for memory that's no longer reachable and subsequently releasing it.
Settings - Firefox Developer Tools
ed view.
Rich output - Firefox Developer Tools
) (4) […] ​ 0: object { status: "done", description: "morning pages", datecreated: 1552404478137 } ​ 1: object { status: "in progress", description: "refactor styles", datecreated: 1552404493169 } ​ 2: object { status: "to do", description: "create feedback form", datecreated: 1552404512630 } ​ 3: object { status: "to do", description: "normalize table", datecreated: 1552404533790 } ​ length: 4 ​ <prototype>: array [] debugger eval code:1:9 undefined highlighting and inspecting dom nodes if you hover the mouse over any dom element in the console output, it's highlighted on the page: in the screenshot above you'll also see a blue "target" icon next to the node in the console output: click it to switch to the inspector with that node selected.
Animation.finish() - Web APIs
Web › API › Animation › finish
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.
AnimationEffect.getComputedTiming() - Web APIs
ax var currenttimevalues = animation.getcomputedtiming(); parameters none.
AudioBuffer.copyToChannel() - Web APIs
nnel); parameters source a float32array that the channel data will be copied from.
AudioBufferSourceNode - Web APIs
ybuffer = audioctx.createbuffer(2, audioctx.samplerate * 3, audioctx.samplerate); // fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel < myarraybuffer.numberofchannels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < myarraybuffer.length; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } // get an audiobuffersourcenode.
AudioContext.createJavaScriptNode() - Web APIs
trates the use of createjavascriptnode(): var sinewave = function(context) { var that = this; this.x = 0; // initial sample number this.context = context; this.node = context.createjavascriptnode(1024, 1, 1); this.node.onaudioprocess = function(e) { that.process(e) }; } sinewave.prototype.process = function(e) { var data = e.outputbuffer.getchanneldata(0); for (var i = 0; i < data.length; ++i) { data[i] = math.sin(this.x++); } } sinewave.prototype.play = function() { this.node.connect(this.context.destination); } sinewave.prototype.pause = function() { this.node.disconnect(); } see also generating tones with the web audio api exploring the html5 web audio: visualizing sound ...
AudioParamDescriptor - Web APIs
e-noise-processor.js class whitenoiseprocessor extends audioworkletprocessor { static get parameterdescriptors () { return [{ name: 'customgain', defaultvalue: 1, minvalue: 0, maxvalue: 1, automationrate: 'a-rate' }] } process (inputs, outputs, parameters) { const output = outputs[0] output.foreach(channel => { for (let i = 0; i < channel.length; i++) { channel[i] = (math.random() * 2 - 1) * (parameters['customgain'].length > 1 ?
AudioProcessingEvent - Web APIs
outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (in this case there is only one) for (var channel = 0; channel < outputbuffer.numberofchannels; channel++) { var inputdata = inputbuffer.getchanneldata(channel); var outputdata = outputbuffer.getchanneldata(channel); // loop through the 4096 samples for (var sample = 0; sample < inputbuffer.length; sample++) { // make output equal to the same as the input outputdata[sample] = inputdata[sample]; // add noise to each output sample outputdata[sample] += ((math.random() * 2) - 1) * 0.2; } } } getdata(); // wire up play button playbutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } ...
AudioScheduledSourceNode.start() - Web APIs
ly) causes the sound to start playback immediately.
AudioWorkletNode.parameters - Web APIs
e-noise-processor.js class whitenoiseprocessor extends audioworkletprocessor { static get parameterdescriptors () { return [{ name: 'customgain', defaultvalue: 1, minvalue: 0, maxvalue: 1, automationrate: 'a-rate' }] } process (inputs, outputs, parameters) { const output = outputs[0] output.foreach(channel => { for (let i = 0; i < channel.length; i++) { channel[i] = (math.random() * 2 - 1) * (parameters['customgain'].length > 1 ?
AudioWorkletNode - Web APIs
tputs white noise.
AudioWorkletProcessor() - Web APIs
the value to initialize the numberofinputs property to.
AudioWorkletProcessor.parameterDescriptors (static getter) - Web APIs
e-noise-processor.js class whitenoiseprocessor extends audioworkletprocessor { static get parameterdescriptors () { return [{ name: 'customgain', defaultvalue: 1, minvalue: 0, maxvalue: 1, automationrate: 'a-rate' }] } process (inputs, outputs, parameters) { const output = outputs[0] output.foreach(channel => { for (let i = 0; i < channel.length; i++) { channel[i] = (math.random() * 2 - 1) * (parameters['customgain'].length > 1 ?
AudioWorkletProcessor - Web APIs
tputs white noise.
BaseAudioContext.createIIRFilter() - Web APIs
eates an iirfilternode, which represents a general infinite impulse response (iir) filter which can be configured to serve as various types of filter.
BaseAudioContext.createPeriodicWave() - Web APIs
cwave, which is used to define a periodic waveform that can be used to shape the output of an oscillatornode.
BaseAudioContext.createScriptProcessor() - Web APIs
outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (in this case there is only one) for (var channel = 0; channel < outputbuffer.numberofchannels; channel++) { var inputdata = inputbuffer.getchanneldata(channel); var outputdata = outputbuffer.getchanneldata(channel); // loop through the 4096 samples for (var sample = 0; sample < inputbuffer.length; sample++) { // make output equal to the same as the input outputdata[sample] = inputdata[sample]; // add noise to each output sample outputdata[sample] += ((math.random() * 2) - 1) * 0.2; } } } getdata(); // wire up play button playbutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } ...
Blob.type - Web APIs
Web › API › Blob › type
var i, fileinput, files, allowedfiletypes; // fileinput is a htmlinputelement: <input type="file" multiple id="myfileinput"> fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (simliar to nodelist) files = fileinput.files; // our application only allows gif, png, and jpeg images allowedfiletypes = ["image/png", "image/jpeg", "image/gif"]; for (i = 0; i < files.length; i++) { // test if file.type is an allowed file type.
Body.text() - Web APIs
Web › API › Body › text
create a new request using the request() constructor, then use it to fetch a specific .txt file.
CSS numeric factory functions - Web APIs
the css numeric factory functions, such as css.em() and css.turn() are methods that return cssunitvalues with the value being the numeric argument and the unit being the name of the method used.
CSSMathSum - Web APIs
h: calc(30% - 20px); } we add the javascript const stylemap = document.queryselector('div').computedstylemap(); console.log( stylemap.get('width') ); // cssmathsum {values: cssnumericarray, operator: "sum"} console.log( stylemap.get('width').operator ); // 'sum' console.log( stylemap.get('width').values ); // cssnumericarray {0: cssunitvalue, 1: cssunitvalue, length: 2} console.log( stylemap.get('width').values[0] ); // cssunitvalue {value: 30, unit: "percent"} console.log( stylemap.get('width').values[0].value ); // 30 console.log( stylemap.get('width').values[0].unit ); // 'percent' console.log( stylemap.get('width').values[1] ); // cssunitvalue {value: -20, unit: "px"} console.log( stylemap.get('width').values[1].value ); // -20 console...
CSSMathValue.operator - Web APIs
n</div> we assign a width with a calculation div { width: calc(50% - 0.5vw); } we add the javascript const stylemap = document.queryselector('div').computedstylemap(); console.log( stylemap.get('width') ); // cssmathsum {values: cssnumericarray, operator: "sum"} console.log( stylemap.get('width').values ); // cssnumericarray {0: cssunitvalue, 1: cssmathnegate, length: 2} console.log( stylemap.get('width').operator ); // 'sum' console.log( stylemap.get('width').values[1].operator ) // 'negate' the cssmathvalue.operator returns sum for the equation and negate for the operator on the second value.
CSSRuleList - Web APIs
only) array-like object containing an ordered collection of cssrule objects.
CSSStyleDeclaration.setProperty() - Web APIs
tn = document.queryselector('.color'); const box = document.queryselector('.box'); function random(min,max) { const num = math.floor(math.random()*(max-min)) + min; return num; } function randomcolor() { return 'rgb(' + random(0,255) + ', ' + random(0,255) + ', ' + random(0,255) + ')'; } const stylesheet = document.stylesheets[1]; let boxpararule; for(let i = 0; i < stylesheet.cssrules.length; i++) { if(stylesheet.cssrules[i].selectortext === '.box p') { boxpararule = stylesheet.cssrules[i]; } } function setrandomborder() { const newborder = random(1, 50) + 'px solid ' + randomcolor(); boxpararule.style.setproperty('border', newborder); } function setrandombgcolor() { const newbgcolor = randomcolor(); boxpararule.style.setproperty('background-color', newbgcolor); } ...
CSSStyleSheet.addRule() - Web APIs
t is the string undefined.
CSSStyleSheet.cssRules - Web APIs
rule.
CSSStyleSheet - Web APIs
see the notes section for the various ways a cssstylesheet object can be obtained.
CSSStyleValue.parse() - Web APIs
cssstylevalue object containing the first supplied value.
CSSUnparsedValue - Web APIs
yped object model api represents property values that reference custom properties.
CSSValueList - Web APIs
="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="181" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">cssvaluelist</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, cssvalue.
CSS Painting API - Web APIs
function, tell the document to include the worklet using the paintworklet addmodule() method, then include the image we created using the css paint() function.
CanvasRenderingContext2D.arcTo() - Web APIs
= { x: 0, y: 50 }; const p1 = { x: 100, y: 100 }; const p2 = { x: 150, y: 50 }; const p3 = { x: 200, y: 100 }; const labelpoint = function (p, offset, i = 0){ const {x, y} = offset; ctx.beginpath(); ctx.arc(p.x, p.y, 2, 0, math.pi * 2); ctx.fill(); ctx.filltext(`${i}:(${p.x}, ${p.y})`, p.x + x, p.y + y); } const drawpoints = function (points){ for (let i = 0; i < points.length; i++) { var p = points[i]; labelpoint(p, { x: 0, y: -20 } , i) } } // draw arc const drawarc = function ([p0, p1, p2], r) { ctx.beginpath(); ctx.moveto(p0.x, p0.y); ctx.arcto(p1.x, p1.y, p2.x, p2.y, r); ctx.lineto(p2.x, p2.y); ctx.stroke(); } let t0 = 0; let rr = 0; // the radius that changes over time let a = 0; // angle let pi2 = math.pi * 2; const loop = function (t) { ...
CanvasRenderingContext2D.lineCap - Web APIs
as" width="150" height="150"></canvas> const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const linecap = ['butt', 'round', 'square']; // draw guides ctx.strokestyle = '#09f'; ctx.beginpath(); ctx.moveto(10, 10); ctx.lineto(140, 10); ctx.moveto(10, 140); ctx.lineto(140, 140); ctx.stroke(); // draw lines ctx.strokestyle = 'black'; for (let i = 0; i < linecap.length; i++) { ctx.linewidth = 15; ctx.linecap = linecap[i]; ctx.beginpath(); ctx.moveto(25 + i * 50, 10); ctx.lineto(25 + i * 50, 140); ctx.stroke(); } screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.linecap' in that specification.
CanvasRenderingContext2D.setLineDash() - Web APIs
the setlinedash() method of the canvas 2d api's canvasrenderingcontext2d interface sets the line dash pattern used when stroking lines.
Manipulating video using canvas - Web APIs
s frame rate.
Compositing example - Web APIs
on createcanvas() { var canvas = document.createelement("canvas"); canvas.style.background = "url("+op_8x8.data+")"; canvas.style.border = "1px solid #000"; canvas.style.margin = "5px"; canvas.width = width/2; canvas.height = height/2; return canvas; } function runcomposite() { var dl = document.createelement("dl"); document.body.appendchild(dl); while(gco.length) { var pop = gco.pop(); var dt = document.createelement("dt"); dt.textcontent = pop; dl.appendchild(dt); var dd = document.createelement("dd"); var p = document.createelement("p"); p.textcontent = gcotext.pop(); dd.appendchild(p); var canvastodrawon = createcanvas(); var canvastodrawfrom = createcanvas(); var...
Using images - Web APIs
s some css to make things look nice: body { background: 0 -100px repeat-x url(https://mdn.mozillademos.org/files/5415/bg_gallery.png) #4f191a; margin: 10px; } img { display: none; } table { margin: 0 auto; } td { padding: 15px; } tying it all together is the javascript to draw our framed images: function draw() { // loop through all images for (var i = 0; i < document.images.length; i++) { // don't add a canvas for the frame image if (document.images[i].getattribute('id') != 'frame') { // create canvas element canvas = document.createelement('canvas'); canvas.setattribute('width', 132); canvas.setattribute('height', 150); // insert before the image document.images[i].parentnode.insertbefore(canvas,document.images[i]); ct...
Canvas API - Web APIs
t textmetrics offscreencanvas path2d imagebitmaprenderingcontext note: the interfaces related to the webglrenderingcontext are referenced under webgl.
ChildNode.replaceWith() - Web APIs
scoped into the with statement.
Client.url - Web APIs
Web › API › Client › url
t.url; value a usvstring.
Clients.matchAll() - Web APIs
Web › API › Clients › matchAll
ou want matched.
Clipboard.read() - Web APIs
Web › API › Clipboard › read
api if we have some kind of access to // the "clipboard-read" feature.
ContentIndex.getAll() - Web APIs
er each entry, building a list for the interface.
ContentIndex - Web APIs
er each entry, building a list for the interface.
Content Index API - Web APIs
er each entry, building a list for the interface.
CustomElementRegistry.define() - Web APIs
eb-component example (see it live also).
CustomElementRegistry - Web APIs
custom element after creating its class.
DOMImplementationList - Web APIs
returned by domimplementationsource.getdomimplementationlist() and domimplementationregistry.getdomimplementationlist() .
Binary strings - Web APIs
Web › API › DOMString › Binary
et, while the string "ÀÈÌÒÙ" does not.
DOMTokenList.forEach() - Web APIs
lasses.foreach( function(value, key, listobj) { span.textcontent += `${value} ${key}/${this} ++ `; }, "arg" ); result polyfill this polyfill adds compatibility to all browsers supporting es5: if (window.domtokenlist && !domtokenlist.prototype.foreach) { domtokenlist.prototype.foreach = function (callback, thisarg) { thisarg = thisarg || window; for (var i = 0; i < this.length; i++) { callback.call(thisarg, this[i], i, this); } }; } specifications specification status comment domthe definition of 'foreach() (as iterable<node>)' in that specification.
DataTransfer.mozGetDataAt() - Web APIs
ied item does not exist, null is returned.
DataTransfer.mozTypesAt() - Web APIs
minus one, an empty string list is returned.
DataTransferItem.getAsFile() - Web APIs
ntax file = datatransferitem.getasfile(); parameters none.
DataTransferItem.getAsString() - Web APIs
k parameter is a callback function which accepts one parameter: domstring the drag data item's string data.
DataTransferItem.kind - Web APIs
domstring representing the drag data item's kind.
DataTransferItem.type - Web APIs
lly given by a mime type, although a mime type is not required.
DataTransferItem.webkitGetAsEntry() - Web APIs
hat our drop zone can receive the drop: dropzone.addeventlistener("dragover", function(event) { event.preventdefault(); }, false); the event handler that kicks everything off, of course, is the handler for the drop event: dropzone.addeventlistener("drop", function(event) { let items = event.datatransfer.items; event.preventdefault(); listing.innerhtml = ""; for (let i=0; i<items.length; i++) { let item = items[i].webkitgetasentry(); if (item) { scanfiles(item, listing); } } }, false); this fetches the list of datatransferitem objects representing the items dropped from event.datatransfer.items.
DataTransferItemList - Web APIs
the datatransferitemlist object is a list of datatransferitem objects representing items being dragged.
DeprecationReportBody - Web APIs
we can now click the button to display the report details.
Document.caretRangeFromPoint() - Web APIs
ntx, e.clienty); textnode = range.startcontainer; offset = range.startoffset; } // only split text_nodes if (textnode && textnode.nodetype == 3) { let replacement = textnode.splittext(offset); let br = document.createelement('br'); textnode.parentnode.insertbefore(br, replacement); } } let paragraphs = document.getelementsbytagname("p"); for (let i = 0; i < paragraphs.length; i++) { paragraphs[i].addeventlistener('click', insertbreakatpoint, false); } result ...
Document.cookie - Web APIs
Web › API › Document › cookie
pdating its expiration time to zero.
Document.forms - Web APIs
Web › API › Document › forms
nt.
Document.getElementsByClassName() - Web APIs
le juice</span> <span class="foo bar">something random</span> <textarea id="resultarea" style="width:98%;height:7em"></textarea> javascript // getelementsbyclassname only selects elements that have both given classes var allorangejuicebyclass = document.getelementsbyclassname('orange juice'); var result = "document.getelementsbyclassname('orange juice')"; for (var i=0, len=allorangejuicebyclass.length|0; i<len; i=i+1|0) { result += "\n " + allorangejuicebyclass[i].textcontent; } // queryselector only selects full complete matches var allorangejuicequery = document.queryselectorall('.orange.juice'); result += "\n\ndocument.queryselectorall('.orange.juice')"; for (var i=0, len=allorangejuicequery.length|0; i<len; i=i+1|0) { result += "\n " + allorangejuicequery[i].textcontent; } doc...
Document.images - Web APIs
Web › API › Document › images
age notes you can use either javascript array notation or the item() method on the returned collection to access the items in the collection.
Document.links - Web APIs
Web › API › Document › links
the links read-only property of the document interface returns a collection of all <area> elements and <a> elements in a document with a value for the href attribute.
Document.scripts - Web APIs
Web › API › Document › scripts
property of the document interface returns a list of the <script> elements in the document.
Document.styleSheetSets - Web APIs
var sets = document.stylesheetsets; on return, sets is a list of style sheet sets that are available.
DocumentOrShadowRoot.caretPositionFromPoint() - Web APIs
textnode = range.startcontainer; offset = range.startoffset; } // only split text_nodes if (textnode.nodetype == 3) { var replacement = textnode.splittext(offset); var br = document.createelement('br'); textnode.parentnode.insertbefore(br, replacement); } } window.onload = function (){ var paragraphs = document.getelementsbytagname("p"); for (i=0 ; i < paragraphs.length; i++) { paragraphs[i].addeventlistener("click", insertbreakatpoint, false); } }; specifications specification status comment css object model (cssom) view modulethe definition of 'caretpositionfrompoint()' in that specification.
DocumentOrShadowRoot.getSelection() - Web APIs
e object's tostring() method is called and the returned value is passed to the function.
DocumentOrShadowRoot.styleSheets - Web APIs
the stylesheets read-only property of the documentorshadowroot interface returns a stylesheetlist of cssstylesheet objects, for stylesheets explicitly linked into or embedded in a document.
Introduction to the DOM - Web APIs
also implements the more basic node interface, from which element derives.
Element.attachShadow() - Web APIs
our custom element's contents to.
Element.attributes - Web APIs
attributes example</title> <script type="text/javascript"> function listattributes() { var paragraph = document.getelementbyid("paragraph"); var result = document.getelementbyid("result"); // first, let's verify that the paragraph has some attributes if (paragraph.hasattributes()) { var attrs = paragraph.attributes; var output = ""; for(var i = attrs.length - 1; i >= 0; i--) { output += attrs[i].name + "->" + attrs[i].value; } result.value = output; } else { result.value = "no attributes to show"; } } </script> </head> <body> <p id="paragraph" style="color: green;">sample paragraph</p> <form action=""> <p> <input type="button" value="show first attribute name and value" onclick="listattrib...
Element.closest() - Web APIs
Web › API › Element › closest
olyfill will do the job very slowly, but eventually.
Element.getElementsByTagNameNS() - Web APIs
ame is either the local name of elements to look for or the special value "*", which matches all elements (see element.localname and attr.localname).
Element.hasAttributes() - Web APIs
element has any attributes or not.
Event.currentTarget - Web APIs
event.currenttarget; value eventtarget examples event.currenttarget is interesting to use when attaching the same event handler to several elements.
Event.msConvertURL() - Web APIs
turn a value.
EventTarget - Web APIs
rget.prototype.listeners = null; eventtarget.prototype.addeventlistener = function(type, callback) { if (!(type in this.listeners)) { this.listeners[type] = []; } this.listeners[type].push(callback); }; eventtarget.prototype.removeeventlistener = function(type, callback) { if (!(type in this.listeners)) { return; } var stack = this.listeners[type]; for (var i = 0, l = stack.length; i < l; i++) { if (stack[i] === callback){ stack.splice(i, 1); return; } } }; eventtarget.prototype.dispatchevent = function(event) { if (!(event.type in this.listeners)) { return true; } var stack = this.listeners[event.type].slice(); for (var i = 0, l = stack.length; i < l; i++) { stack[i].call(this, event); } return !event.defaultprevented; }; spec...
File.getAsBinary() - Web APIs
Web › API › File › getAsBinary
linputelement: <input type="file" id="myfileinput" multiple> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (similar to nodelist) var files = fileinput.files; // object for allowed media types var accept = { binary : ["image/png", "image/jpeg"], text : ["text/plain", "text/css", "application/xml", "text/html"] }; var file; for (var i = 0; i < files.length; i++) { file = files[i]; // if file type could be detected if (file !== null) { if (accept.binary.indexof(file.type) > -1) { // file is a binary, which we accept var data = file.getasbinary(); } else if (accept.text.indexof(file.type) > -1) { // file is of type text, which we accept var data = file.getastext(); // modify data with string methods } ...
File.getAsText() - Web APIs
Web › API › File › getAsText
linputelement: <input type="file" id="myfileinput" multiple> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (similar to nodelist) var files = fileinput.files; // object for allowed media types var accept = { binary : ["image/png", "image/jpeg"], text : ["text/plain", "text/css", "application/xml", "text/html"] }; var file; for (var i = 0; i < files.length; i++) { file = files[i]; // if file type could be detected if (file !== null) { if (accept.text.indexof(file.mediatype) > -1) { // file is of type text, which we accept // make sure it's encoded as utf-8 var data = file.getastext("utf-8"); // modify data with string methods } else if (accept.binary.indexof(file.mediatype) > -1) { // binary } } }...
File.lastModifiedDate - Web APIs
.
File.name - Web APIs
Web › API › File › name
file represented by a file object.
File.type - Web APIs
Web › API › File › type
returns the media type (mime) of the file represented by a file object.
File.webkitRelativePath - Web APIs
ithin the selected directory hierarchies is generated and displayed.
FileReaderSync.readAsArrayBuffer() - Web APIs
ected: the resource has been modified by a third party; too many read are performed simultaneously; the file pointed by the resource is unsafe for a use from the web (like it is a system file).
FileReaderSync.readAsBinaryString() - Web APIs
ected: the resource has been modified by a third party; too many read are performed simultaneously; the file pointed by the resource is unsafe for a use from the web (like it is a system file).
FileReaderSync.readAsDataURL() - Web APIs
ected: the resource has been modified by a third party; too many read are performed simultaneously; the file pointed by the resource is unsafe for a use from the web (like it is a system file).
FileReaderSync.readAsText() - Web APIs
ected: the resource has been modified by a third party; too many read are performed simultaneously; the file pointed by the resource is unsafe for a use from the web (like it is a system file).
FileSystemDirectoryEntry.createReader() - Web APIs
to read the directory's entries.
FileSystemDirectoryReader.readEntries() - Web APIs
hat our drop zone can receive the drop: dropzone.addeventlistener("dragover", function(event) { event.preventdefault(); }, false); the event handler that kicks everything off, of course, is the handler for the drop event: dropzone.addeventlistener("drop", function(event) { let items = event.datatransfer.items; event.preventdefault(); listing.innerhtml = ""; for (let i=0; i<items.length; i++) { let item = items[i].webkitgetasentry(); if (item) { scanfiles(item, listing); } } }, false); this fetches the list of datatransferitem objects representing the items dropped from event.datatransfer.items.
FontFace.display - Web APIs
Web › API › FontFace › display
the display property of the fontface interface determines how a font face is displayed based on whether and when it is downloaded and ready to use.
Frame Timing API - Web APIs
0 fps (frames per second) for a 60 hz refresh rate is a common target for a good responsive user experience.
GlobalEventHandlers.onchange - Web APIs
ify its contents and then change focus away from it.
GlobalEventHandlers.onkeypress - Web APIs
.target.nodename.touppercase(); if (nchr === 0 || oevent.target.contenteditable.touppercase() === "true" || snodetype === "textarea" || snodetype === "input" && oevent.target.type.touppercase() === "text") { return true; } if (nchr !== ssecret.charcodeat(noffset)) { noffset = nchr === ssecret.charcodeat(0) ?
HTMLButtonElement.labels - Web APIs
els; return value a nodelist containing the <label> elements associated with the <button> element.
HTMLCollection.item - Web APIs
index value will not necessarily remain constant for a given node.
HTMLCollection - Web APIs
ument order) and offers methods and properties for selecting from the list.
HTMLInputElement.labels - Web APIs
ements = input.labels; return value a nodelist containing the <label> elements associated with the <input> element.
HTMLInputElement.multiple - Web APIs
the htmlinputelement.multiple property indicates if an input can have more than one value.
HTMLInputElement.webkitdirectory - Web APIs
ithin the selected directory hierarchies is generated and displayed.
HTMLMediaElement.audioTracks - Web APIs
k object which provides information about the track.
HTMLMediaElement.buffered - Web APIs
y is accessed.
HTMLMediaElement.currentTime - Web APIs
renttime to a new value seeks the media to the given time, if the media is available.
HTMLMediaElement.duration - Web APIs
the read-only htmlmediaelement property duration indicates the length of the element's media in seconds.
HTMLMediaElement: loadedmetadata event - Web APIs
target element default action none event handler property globaleventhandlers.onloadedmetadata specification html5 media additional properties property type description mozchannels read only int the number of channels.
HTMLMediaElement.seekable - Web APIs
e htmlmediaelement returns a timeranges object that contains the time ranges that the user is able to seek to, if any.
HTMLMeterElement.labels - Web APIs
a nodelist containing the <label> elements associated with the <meter> element.
Option() - Web APIs
s[key] = new option(element,key); }); append options with different parameters /* assuming we have the following html <select id="s"> <option>first</option> <option>second</option> <option>third</option> </select> */ var s = document.getelementbyid('s'); var options = [ 'zero', 'one', 'two' ]; options.foreach(function(element, key) { if (element == 'zero') { s[s.options.length] = new option(element, s.options.length, false, false); } if (element == 'one') { s[s.options.length] = new option(element, s.options.length, true, false); // will add the "selected" attribute } if (element == 'two') { s[s.options.length] = new option(element, s.options.length, false, true); // just will be selected in "view" } }); /* result <select id="s"> <option value="0">...
HTMLOptionsCollection - Web APIs
idth="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="286" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmloptionscollection</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties name type description length unsigned long as optionally allowed by the spec, this property isn't read-only.
HTMLOutputElement.labels - Web APIs
els; return value a nodelist containing the <label> elements associated with the <output> element.
HTMLPreElement - Web APIs
t-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlpreelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement.
HTMLProgressElement.labels - Web APIs
ist containing the <label> elements associated with the <progress> element.
HTMLSelectElement.labels - Web APIs
ted with the <select> element.
HTMLSelectElement.options - Web APIs
htmloptionscollection containing the <option> elements contained by the <select> element.
HTMLTableCellElement - Web APIs
ional and was not very well supported.
HTMLTableElement.rows - Web APIs
t.
HTMLTableElement.tBodies - Web APIs
of its content.
HTMLTableElement - Web APIs
ontaining the type of the internal borders of the table.
HTMLTextAreaElement.labels - Web APIs
value a nodelist containing the <label> elements associated with the <textarea> element.
In depth: Microtasks and the JavaScript runtime environment - Web APIs
de a browser which also needs processor time—let alone time to render and draw the site and its own ui, handle user events, and so forth—everything becomes clogged up far too easily nowadays.
Drag Operations - Web APIs
s most specific that is supported.
Dragging and Dropping Multiple Items - Web APIs
drop example the following example provides a box where the lists of items and formats dropped on it are displayed.
History - Web APIs
Web › API › History
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.
HkdfParams - Web APIs
using the hkdf algorithm.
LargestContentfulPaint - Web APIs
the buffered option to true.
Long Tasks API - Web APIs
at the task occurred within.
MediaError.message - Web APIs
case mediaerror.media_err_decode: s+= "an error occurred while decoding the audio."; break; case mediaerror.media_err_src_not_supported: s+= "the audio is missing or is in a format not supported by your browser."; break; default: s += "an unknown error occurred."; break; } let message = err.message; if (message && message.length) { s += " " + message; } displayerrormessage("<strong>error " + err.code + ":</strong> " + s + "<br>"); }; this gets the mediaerror object describing the error from the error property on the htmlaudioelement representing the audio player.
MediaList - Web APIs
Web › API › MediaList
dia queries of a stylesheet, e.g.
MediaPositionState.duration - Web APIs
he currently playing media as well as standard pause, play, forward, reverse, and other controls.
MediaRecorder.ondataavailable - Web APIs
be whatever is left over since the last event).
MediaTrackConstraints - Web APIs
light and dark.
Media Session API - Web APIs
ionaries mediaimage a mediaimage object contains information describing an image associated with the media.
MimeTypeArray - Web APIs
the mimetypearray interface returns an array of mimetype instances, each of which contains information about a supported browser plugins.
MouseEvent.movementX - Web APIs
previousevent.screenx.
NameList - Web APIs
Web › API › NameList
though this interface was previously implemented in gecko, there was no way to actually create one.
NamedNodeMap - Web APIs
n an array.
msSaveBlob - Web APIs
o be used when saving file.
msSaveOrOpenBlob - Web APIs
lob, defaultname); parameters blob a blob to be saved.
Navigator.vibrate() - Web APIs
Web › API › Navigator › vibrate
are exists.
NavigatorPlugins.mimeTypes - Web APIs
returns a mimetypearray object, which contains a list of mimetype objects representing the mime types recognized by the browser.
Node.hasChildNodes() - Web APIs
g with 'foo.childnodes' } polyfill here is one possible polyfill: ;(function(prototype) { prototype.haschildnodes = prototype.haschildnodes || function() { return !!this.firstchild; } })(node.prototype); there are various ways to determine whether the node has a child node: node.haschildnodes() node.firstchild != null (or just node.firstchild) node.childnodes && node.childnodes.length (or node.childnodes.length > 0) specifications specification status comment domthe definition of 'node: haschildnodes' in that specification.
Node - Web APIs
Web › API › Node
llback function for each node contained by a root node (including the root itself): function eachnode(rootnode, callback) { if (!callback) { const nodes = [] eachnode(rootnode, function(node) { nodes.push(node) }) return nodes } if (false === callback(rootnode)) { return false } if (rootnode.haschildnodes()) { const nodes = rootnode.childnodes for (let i = 0, l = nodes.length; i < l; ++i) { if (false === eachnode(nodes[i], callback)) { return } } } } syntax eachnode(rootnode, callback) description recursively calls a function for each descendant node of rootnode (including the root itself).
NodeList.prototype.forEach() - Web APIs
Web › API › NodeList › forEach
ults 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.foreach) { nodelist.prototype.foreach = function (callback, thisarg) { thisarg = thisarg || window; for (var i = 0; i < this.length; i++) { callback.call(thisarg, this[i], i, this); } }; } or if (window.nodelist && !nodelist.prototype.foreach) { nodelist.prototype.foreach = array.prototype.foreach; } the above behavior is how many browsers actually implement nodelist.prototype.foreach() (chrome, for example).
NotificationEvent.notification - Web APIs
ocess it in the notificationclick handler.
NotificationEvent - Web APIs
er that work is ongoing.
OfflineAudioContext - Web APIs
ndale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">offlineaudiocontext</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor offlineaudiocontext.offlineaudiocontext() creates a new offlineaudiocontext instance.
PaintWorklet.registerPaint - Web APIs
parent class of paintworklet, at worklet.addmodule().
PaintWorklet - Web APIs
js file.
ParentNode.lastElementChild - Web APIs
ernet explorer and safari.
PaymentRequest.onshippingoptionchange - Web APIs
ternational shipping'; shippingoption.amount.value = '10.00'; details.total.amount.value = '65.00'; // shipping to elsewhere is unsupported } else { // empty array indicates rejection of the address details.shippingoptions = []; return promise.resolve(details); console.log(details.error); } // hardcode for simplicity if (details.displayitems.length === 2) { details.displayitems[2] = shippingoption; } else { details.displayitems.push(shippingoption); } details.shippingoptions = [shippingoption]; return promise.resolve(details); })(details, request.shippingaddress)); }); specifications specification status comment payment request apithe definition of 'onshippingoptionchange' in that sp...
PaymentResponse.onpayerdetailchange - Web APIs
e(payerphone)); oldpayerphone = payerphone; } // as each validation promise resolves, add the results of the // validation to the errors list const errors = await promise.all(promisestovalidate).then(results => results.reduce((errors, result), object.assign(errors, result)) ); // if we found any errors, wait for them to be corrected if (object.getownpropertynames(errors).length) { await response.retry(errors); } else { // we have a good payment; send the data to the server await fetch("/pay-for-things/", { method: "post", body: response.json() }); response.complete("success"); } }; await response.retry({ payer: { email: "invalid domain.", phone: "invalid number.", }, }); specifications specification status comment ...
PaymentResponse: payerdetailchange event - Web APIs
e(payerphone)); oldpayerphone = payerphone; } // as each validation promise resolves, add the results of the // validation to the errors list const errors = await promise.all(promisestovalidate).then(results => results.reduce((errors, result), object.assign(errors, result)) ); // if we found any errors, wait for them to be corrected if (object.getownpropertynames(errors).length) { await response.retry(errors); } else { // we have a good payment; send the data to the server await fetch("/pay-for-things/", { method: "post", body: response.json() }); response.complete("success"); } }; await response.retry({ payer: { email: "invalid domain.", phone: "invalid number.", }, }); addeventlistener equivalent you could also set up the event hand...
performance.clearMarks() - Web APIs
estamp.
performance.clearMeasures() - Web APIs
argument is omitted, all performance entries with an entry type of "measure" will be removed.
performance.clearResourceTimings() - Web APIs
resource(); var supported = typeof performance.clearresourcetimings == "function"; if (supported) { console.log("run: performance.clearresourcetimings()"); performance.clearresourcetimings(); } else { console.log("performance.clearresourcetimings() not supported"); return; } // getentries should now return zero var p = performance.getentriesbytype("resource"); if (p.length == 0) console.log("...
PerformanceEntry.entryType - Web APIs
k for feature support before continuing if (performance.mark === undefined) { console.log("performance.mark not supported"); return; } // create a performance entry named "begin" via the mark() method performance.mark("begin"); // check the entrytype of all the "begin" entries var entriesnamedbegin = performance.getentriesbyname("begin"); for (var i=0; i < entriesnamedbegin.length; i++) { var typeofentry = entriesnamedbegin[i].entrytype; console.log("entry is type: " + typeofentry); } } specifications specification status comment performance timeline level 2the definition of 'entrytype' in that specification.
PerformanceNavigationTiming.domComplete - Web APIs
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
e a timestamp representing the time value equal to the time immediately after the current document's domcontentloaded event completes.
PerformanceNavigationTiming.domContentLoadedEventStart - Web APIs
presenting the time value equal to the time immediately before the user agent fires the domcontentloaded event at the current document.
PerformanceNavigationTiming.domInteractive - Web APIs
e 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
ax perfentry.loadeventend; return value a timestamp representing the time when the load event of the current document is completed.
PerformanceNavigationTiming.loadEventStart - Web APIs
turn 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
return value a number representing the number of redirects since the last non-redirect navigation under the current browsing context.
PerformanceNavigationTiming.type - Web APIs
erender hint.
PerformanceNavigationTiming.unloadEventEnd - Web APIs
estamp representing a time value equal to the time immediately after the user agent finishes the unload event of the previous document.
PerformanceNavigationTiming.unloadEventStart - Web APIs
stamp representing the time value equal to the time immediately before the user agent starts the unload event of the previous document.
PerformanceObserver() - Web APIs
n the callback is invoked, its first parameter is a list of performance observer entries and the second parameter is the observer object.
PeformanceObserver.disconnect() - Web APIs
the disconnect() method of the performanceobserver interface is used to stop the performance observer from receiving any performance entry events.
PerformanceObserver.observe() - Web APIs
ssage to the console to help developers debug their code.
PerformanceObserver.takeRecords() - Web APIs
rmanceobserver interface returns the current list of performance entries stored in the performance observer, emptying it out.
PerformanceObserverEntryList - Web APIs
performanceobserverentrylist.getentriesbyname() returns a list of explicitly observed performanceentry objects based on the given name and entry type.
PerformanceResourceTiming.decodedBodySize - Web APIs
dbodysize); else console.log("encodedbodysize = not supported"); if ("transfersize" in perfentry) console.log("transfersize = " + perfentry.transfersize); else console.log("transfersize = not supported"); } function check_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { log_sizes(p[i]); } } specifications specification status comment resource timing level 2the definition of 'decodedbodysize' in that specification.
PerformanceResourceTiming.encodedBodySize - Web APIs
dbodysize); else console.log("encodedbodysize = not supported"); if ("transfersize" in perfentry) console.log("transfersize = " + perfentry.transfersize); else console.log("transfersize = not supported"); } function check_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { log_sizes(p[i]); } } specifications specification status comment resource timing level 2the definition of 'encodedbodysize' in that specification.
PerformanceResourceTiming.initiatorType - Web APIs
ty string ("").
PerformanceResourceTiming.nextHopProtocol - Web APIs
urce.nexthopprotocol; return value a string representing the network protocol used to fetch the resource, as identified by the alpn protocol id (rfc7301).
PerformanceResourceTiming.transferSize - Web APIs
dbodysize); else console.log("encodedbodysize = not supported"); if ("transfersize" in perfentry) console.log("transfersize = " + perfentry.transfersize); else console.log("transfersize = not supported"); } function check_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { log_sizes(p[i]); } } specifications specification status comment resource timing level 2the definition of 'transfersize' in that specification.
PerformanceResourceTiming - Web APIs
the performanceresourcetiming interface enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources.
Using Pointer Events - Web APIs
tion copytouch(touch) { return { identifier: touch.pointerid, pagex: touch.clientx, pagey: touch.clienty }; } finding an ongoing touch the ongoingtouchindexbyid() function below scans through the ongoingtouches array to find the touch matching the given identifier, then returns that touch's index into the array.
PositionOptions.maximumAge - Web APIs
ons.maximumage property is a positive long value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return.
PositionOptions - Web APIs
rate position, it will do so.
ProgressEvent.total - Web APIs
read-only property is an integer representing the total amount of work that the underlying process is in the progress of performing.
RTCDTMFSender.insertDTMF() - Web APIs
o be transmitted to the recipient.
RTCDataChannel: error event - Web APIs
cific error detail types switch(err.errordetail) { case "sdp-syntax-error": console.error(" sdp syntax error in line ", err.sdplinenumber); break; case "idp-load-failure": console.error(" identity provider load failure: http error ", err.httprequeststatuscode); break; case "sctp-failure": if (err.sctpcausecode < sctpcausecodes.length) { console.error(" sctp failure: ", err.sctpcausecode); } else { console.error(" unknown sctp error"); } break; case "dtls-failure": if (err.receivedalert) { console.error(" received dlts failure alert: ", err.receivedalert); } if (err.sentalert) { console.error(" sent dlts failure alert: ", err.receivedalert); ...
RTCDataChannel.onbufferedamountlow - Web APIs
t which has occurred.
RTCPeerConnection.generateCertificate() - Web APIs
lgorithm a domstring identifying the algorithm to use in creating the key.
RTCPeerConnection.getDefaultIceServers() - Web APIs
return value an array of ice servers, specified as objects based on rtciceserver, which the browser will use if none are specified in the configuration of the rtcpeerconnection.
RTCRtpReceiver.getCapabilities() static function - Web APIs
that certain combinations of options may fail to work when you actually try to use them.
RTCRtpSender.getCapabilities() static function - Web APIs
le that certain combinations of options may fail to work when you actually try to use them.
ReadableStream.ReadableStream() - Web APIs
tream.
ReadableStream.getReader() - Web APIs
(function processtext({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data.
ReadableStream.tee() - Web APIs
en received reader.read().then(function processtext({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data.
ReadableStreamBYOBReader.read() - Web APIs
echunk, done: false }.
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
function processtext({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data.
ReadableStreamDefaultReader.cancel() - Web APIs
done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data.
Report - Web APIs
Web › API › Report
we can now click the button to display the report details.
Resource Timing API - Web APIs
the resource timing interfaces enable retrieving and analyzing detailed network timing data regarding the loading of an application's resource(s).
cx - Web APIs
the cx read-only property of the svgcircleelement interface reflects the cx attribute of a <circle> element and by that defines the x-coordinate of the circleʼs center.
cy - Web APIs
the cy read-only property of the svgcircleelement interface reflects the cy attribute of a <circle> element and by that defines the y-coordinate of the circleʼs center.
r - Web APIs
the r read-only property of the svgcircleelement interface reflects the r attribute of a <circle> element and by that defines the radius of the circle.
SVGTextPathElement - Web APIs
existing value to this type.
ScriptProcessorNode: audioprocess event - Web APIs
outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (in this case there is only one) for (var channel = 0; channel < outputbuffer.numberofchannels; channel++) { var inputdata = inputbuffer.getchanneldata(channel); var outputdata = outputbuffer.getchanneldata(channel); // loop through the 4096 samples for (var sample = 0; sample < inputbuffer.length; sample++) { // make output equal to the same as the input outputdata[sample] = inputdata[sample]; // add noise to each output sample outputdata[sample] += ((math.random() * 2) - 1) * 0.2; } } }) you could also set up the event handler using the scriptprocessornode.onaudioprocess property: scriptnode.onaudioprocess = function(audioprocessingevent) { ...
ScriptProcessorNode.bufferSize - Web APIs
outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (in this case there is only one) for (var channel = 0; channel < outputbuffer.numberofchannels; channel++) { var inputdata = inputbuffer.getchanneldata(channel); var outputdata = outputbuffer.getchanneldata(channel); // loop through the 4096 samples for (var sample = 0; sample < inputbuffer.length; sample++) { // make output equal to the same as the input outputdata[sample] = inputdata[sample]; // add noise to each output sample outputdata[sample] += ((math.random() * 2) - 1) * 0.2; } } } getdata(); // wire up play button playbutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } // when ...
ScriptProcessorNode.onaudioprocess - Web APIs
outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (in this case there is only one) for (var channel = 0; channel < outputbuffer.numberofchannels; channel++) { var inputdata = inputbuffer.getchanneldata(channel); var outputdata = outputbuffer.getchanneldata(channel); // loop through the 4096 samples for (var sample = 0; sample < inputbuffer.length; sample++) { // make output equal to the same as the input outputdata[sample] = inputdata[sample]; // add noise to each output sample outputdata[sample] += ((math.random() * 2) - 1) * 0.2; } } } getdata(); // wire up play button playbutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } ...
ScriptProcessorNode - Web APIs
outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (in this case there is only one) for (var channel = 0; channel < outputbuffer.numberofchannels; channel++) { var inputdata = inputbuffer.getchanneldata(channel); var outputdata = outputbuffer.getchanneldata(channel); // loop through the 4096 samples for (var sample = 0; sample < inputbuffer.length; sample++) { // make output equal to the same as the input outputdata[sample] = inputdata[sample]; // add noise to each output sample outputdata[sample] += ((math.random() * 2) - 1) * 0.2; } } } getdata(); // wire up play button playbutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } // when ...
Selection.addRange() - Web APIs
ong> selecting the <strong>strong words</strong>.</p> <button>select strong words</button> javascript let button = document.queryselector('button'); button.addeventlistener('click', function () { let selection = window.getselection(); let strongs = document.getelementsbytagname('strong'); if (selection.rangecount > 0) { selection.removeallranges(); } for (let i = 0; i < strongs.length; i++) { let range = document.createrange(); range.selectnode(strongs[i]); selection.addrange(range); } }); result specifications specification status comment selection apithe definition of 'selection.addrange()' in that specification.
ServiceWorkerGlobalScope.onnotificationclick - Web APIs
ick = function(notificationevent) { ...
ShadowRoot - Web APIs
updatestyle(this); } in the updatestyle() function itself, we get a reference to the shadow dom using element.shadowroot.
SourceBufferList: indexed property getter - Web APIs
terface allows the sourcebuffer objects in the list to be accessed with an array operator (i.e.
SourceBufferList - Web APIs
target="_top"><rect x="151" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="231" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sourcebufferlist</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties sourcebufferlist.length read only returns the number of sourcebuffer objects in the list.
SpeechGrammarList - Web APIs
nterface of the web speech api represents a list of speechgrammar objects containing words or patterns of words that we want the recognition service to recognize.
SpeechRecognitionEvent.results - Web APIs
nition results for the current session.
SpeechSynthesis.getVoices() - Web APIs
none.
SpeechSynthesis.onvoiceschanged - Web APIs
ee our speak easy synthesis demo.) note that firefox doesn't support it at present, and will just return a list of voices when speechsynthesis.getvoices() is fired.
SpeechSynthesis.speak() - Web APIs
gst other things) create a new utterance containing this text, then speak it by passing it into speak() as a parameter.
SpeechSynthesisErrorEvent.error - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisErrorEvent - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisUtterance.SpeechSynthesisUtterance() - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisUtterance.lang - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisUtterance.onboundary - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisUtterance.onend - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisUtterance.onerror - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisUtterance.onmark - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisUtterance.onpause - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisUtterance.onresume - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisUtterance.onstart - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisUtterance.pitch - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisUtterance.rate - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisUtterance.voice - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisUtterance.volume - Web APIs
.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
SpeechSynthesisUtterance - Web APIs
<input>, set the utterance's voice to the voice selected in the <select> element, and start the utterance speaking via the speechsynthesis.speak() method.
SpeechSynthesisVoice.default - Web APIs
e 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.lang - Web APIs
the lang read-only property of the speechsynthesisvoice interface returns a bcp 47 language tag indicating the language of the voice.
SpeechSynthesisVoice.localService - Web APIs
sizer service (false.) this property is provided to allow differentiation in the case that some voice options are provided by a remote service; it is possible that remote voices might have extra latency, bandwidth or cost associated with them, so such distinction may be useful.
SpeechSynthesisVoice.name - Web APIs
the name read-only property of the speechsynthesisvoice interface returns a human-readable name that represents the voice.
SpeechSynthesisVoice.voiceURI - Web APIs
thesisvoice interface returns the type of uri and location of the speech synthesis service for this voice.
StaticRange - Web APIs
constructor staticrange() creates a new staticrange object given the staticrangeinit dictionary specifying the default values for its properties.
Storage - Web APIs
Web › API › Storage
the storage interface of the web storage api provides access to a particular domain's session or local storage.
Using readable streams - Web APIs
a value has been received reader.read().then(function processtext({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data.
Using writable streams - Web APIs
ose(controller) { }, abort(reason) { } }, { highwatermark, size() }); the constructor takes two objects as parameters.
StylePropertyMapReadOnly.get() - Web APIs
// get the <dl> we'll be populating const styleslist = document.queryselector('#regurgitation'); // retrieve all computed styles with computedstylemap() const stylemap = myelement.computedstylemap(); // array of properties we're interested in const ofinterest = ['font-weight', 'border-left-color', 'color', '--colour']; // iterate thru our properties of interest for ( let i = 0; i < ofinterest.length; i++ ) { // properties const cssproperty = document.createelement('dt'); cssproperty.appendchild(document.createtextnode(ofinterest[i])); styleslist.appendchild(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.appendchild(document.createtextnode( stylemap.get(ofinterest[i]))); styleslist.appendchild(cssvalue); } specifications specifi...
StyleSheet.media - Web APIs
Web › API › StyleSheet › media
ike medialist object and can be removed with deletemedium() and added with appendmedium().
StyleSheetList - Web APIs
the stylesheetlist interface represents a list of stylesheet.
SubtleCrypto.decrypt() - Web APIs
ndow.crypto.subtle.decrypt( { name: "rsa-oaep" }, privatekey, ciphertext ); } aes-ctr this code decrypts ciphertext using aes in ctr mode.
SubtleCrypto.verify() - Web APIs
f it checks out, set the "valid" class on the signature.
SubtleCrypto - Web APIs
ography functions and key management functions.
Text.splitText() - Web APIs
Web › API › Text › splitText
offset, keeping both nodes in the tree as siblings.
TextTrack.mode - Web APIs
Web › API › TextTrack › mode
finished, the video automatically pauses playback.
TimeRanges - Web APIs
specified by a starting and ending time offset.
Touch.force - Web APIs
Web › API › Touch › force
ng.
Touch.identifier - Web APIs
Web › API › Touch › identifier
stylus's) movement on the surface until it is lifted off the surface.
Touch.pageX - Web APIs
Web › API › Touch › pageX
are accessed via the event's touchevent.changedtouches list.
Touch.pageY - Web APIs
Web › API › Touch › pageY
are accessed via the event's touchevent.changedtouches list.
Touch.screenX - Web APIs
Web › API › Touch › screenX
s invoked, each touch point's touch.screenx and touch.screeny coordinates are accessed.
Touch.target - Web APIs
Web › API › Touch › target
or this element is invoked, each touch point's touch.target property is accessed via the event's touchevent.targettouches list.
TouchEvent.changedTouches - Web APIs
in following code snippet, the touchmove event handler iterates through the changedtouches list and prints the identifier of each touch point that changed since the last event.
TouchList - Web APIs
Web › API › TouchList
the touchlist interface represents a list of contact points on a touch surface.
TrackDefaultList.TrackDefault() - Web APIs
aultlist interface allows the trackdefault objects in the list to be accessed with an array operator (i.e.
TrackDefaultList - Web APIs
ultlist interface represents a simple container list for multiple trackdefault objects.
USB.getDevices() - Web APIs
Web › API › USB › getDevices
ee usb.requestdevice().
USBDevice.clearHalt() - Web APIs
will reject if an invalid endpoint is supplied.
validityState.tooLong - Web APIs
the read-only toolong property of a validitystate object indicates if the value of an <input> or <textarea>, after having been edited by the user, exceeds the maximum code-unit length established by the element's maxlength attribute.
validityState.tooShort - Web APIs
the read-only tooshort property of a validitystate object indicates if the value of an <input>, <button>, <select>, <output>, <fieldset> or <textarea>, after having been edited by the user, is less than the minimum code-unit length established by the element's minlength attribute.
Vibration API - Web APIs
most modern mobile devices include vibration hardware, which lets software code provide physical feedback to the user by causing the device to shake.
VideoTrack - Web APIs
can then access the media's individual tracks using either array syntax or functions such as foreach().
WEBGL_compressed_texture_astc - Web APIs
extension exposes one new methods.
WebGL2RenderingContext.compressedTexSubImage3D() - Web APIs
ngle for a texture image in a compressed format.
WebGLRenderingContext.compressedTexSubImage2D() - Web APIs
l.compressedtexsubimage2d(target, level, xoffset, yoffset, width, height, format, arraybufferview?
WebGLRenderingContext.getActiveUniform() - Web APIs
ruct { float foo; vec4 bar; } d[2]; will result in: d[0].foo d[0].bar d[1].foo d[1].bar uniform blocks: one entry for each member.
WebGLRenderingContext.getProgramInfoLog() - Web APIs
ccurred during failed linking or validation of webglprogram objects.
Textures from code - Web APIs
.6em; } <script type="x-shader/x-vertex" id="vertex-shader"> #version 100 precision highp float; attribute vec2 position; void main() { gl_position = vec4(position, 0.0, 1.0); gl_pointsize = 128.0; } </script> <script type="x-shader/x-fragment" id="fragment-shader"> #version 100 precision mediump float; void main() { vec2 fragmentposition = 2.0*gl_pointcoord - 1.0; float distance = length(fragmentposition); float distancesqrd = distance * distance; gl_fragcolor = vec4( 0.2/distancesqrd, 0.1/distancesqrd, 0.0, 1.0 ); } </script> ;(function(){ "use strict" window.addeventlistener("load", setupwebgl, false); var gl, program; function setupwebgl (evt) { window.removeeventlistener(evt.type, setupwebgl, false); if (!(gl = getrenderingcontext())) return; ...
Creating 3D objects using WebGL - Web APIs
ace: white [1.0, 0.0, 0.0, 1.0], // back face: red [0.0, 1.0, 0.0, 1.0], // top face: green [0.0, 0.0, 1.0, 1.0], // bottom face: blue [1.0, 1.0, 0.0, 1.0], // right face: yellow [1.0, 0.0, 1.0, 1.0], // left face: purple ]; // convert the array of colors into a table for all the vertices.
A simple RTCDataChannel sample - Web APIs
</button> then there's a box which contains the text input box into which the user can type a message to transmit, with a button to send the entered text.
Writing WebSocket client applications - Web APIs
/em> signed in at " + timestr + "</b><br>"; break; case "message": text = "(" + timestr + ") <b>" + msg.name + "</b>: " + msg.text + "<br>"; break; case "rejectusername": text = "<b>your username has been set to <em>" + msg.name + "</em> because the name you chose is in use.</b><br>" break; case "userlist": var ul = ""; for (i=0; i < msg.users.length; i++) { ul += msg.users[i] + "<br>"; } document.getelementbyid("userlistbox").innerhtml = ul; break; } if (text.length) { f.write(text); document.getelementbyid("chatbox").contentwindow.scrollbypages(1); } }; here we use json.parse() to convert the json object back into the original object, then examine and act upon its contents.
Inputs and input sources - Web APIs
decide which controller is primary is to have a user-definable "handedness" preference that the user sets to indicate which of their hands is dominant.
Web Animations API Concepts - Web APIs
.
Web Audio API best practices - Web APIs
th the web audio api and it can be a little confusing as to which one you should use.
Migrating from webkitAudioContext - Web APIs
arguments are // the argument to the |start()| method of the audiobuffersourcenode.
Using IIR filters - Web APIs
ntsize); canvasctx.filltext('g', spacing-fontsize, (height-spacing+fontsize)/2); canvasctx.filltext('0', spacing-fontsize, height-spacing+fontsize); canvasctx.filltext('hz', width/2, height-spacing+fontsize); canvasctx.filltext('20k', width-spacing, height-spacing+fontsize); // loop over our magnitude response data and plot our filter canvasctx.beginpath(); for(let i = 0; i < magresponseoutput.length; i++) { if (i === 0) { canvasctx.moveto(spacing, height-(magresponseoutput[i]*100)-spacing ); } else { canvasctx.lineto((width/totalarrayitems)*i, height-(magresponseoutput[i]*100)-spacing ); } } canvasctx.stroke(); summary that's it for our iirfilter demo.
Attestation and Assertion - Web APIs
.
Window.crypto - Web APIs
Web › API › Window › crypto
strong random-number generator.
Window.getSelection() - Web APIs
e object's tostring() method is called and the returned value is passed to the function.
window.location - Web APIs
Web › API › Window › location
ed with the modified search string).
Window.openDialog() - Web APIs
Web › API › Window › openDialog
s it useful because of its different default assumptions.
Window - Web APIs
Web › API › Window
nnerheight read only gets the height of the content area of the browser window including, if rendered, the horizontal scrollbar.
WindowClient.focus() - Web APIs
the existing windowclient.
WindowClient.focused - Web APIs
focused; value a boolean.
WindowClient.visibilityState - Web APIs
property of the windowclient interface indicates the visibility of the current client.
WindowClient - Web APIs
"visible", or "prerender".
WorkerGlobalScope.self - Web APIs
global scope of the same type as that worker object written to the console — something like the following: dedicatedworkerglobalscope { undefined: undefined, infinity: infinity, math: mathconstructor, nan: nan, intl: object…} infinity: infinity array: function array() { [native code] } arguments: null caller: null isarray: function isarray() { [native code] } length: 1 name: "array" observe: function observe() { [native code] } prototype: array[0] unobserve: function unobserve() { [native code] } __proto__: function empty() {} <function scope> arraybuffer: function arraybuffer() { [native code] } blob: function blob() { [native code] } boolean: function boolean() { [native code] } dataview: function datavie...
WritableStream.WritableStream() - Web APIs
tream.
HTML in XMLHttpRequest - Web APIs
>]*\\s+id\\=[\"\']" + stargetid + "[\"\'][^>]*>" ,"i"), ssrc = oxhr.responsetext, aexec = ropen.exec(ssrc); return aexec ?
XMLHttpRequest.getAllResponseHeaders() - Web APIs
, an empty string is returned.
XMLHttpRequest.sendAsBinary() - Web APIs
l feature, here is a polyfill for browsers that don't support the sendasbinary() method but support typed arrays.
XPathEvaluator.createExpression() - Web APIs
e shows the use of the evaluate() method.
XPathEvaluator.evaluate() - Web APIs
e not_supported_err is raised.
XPathEvaluator - Web APIs
the use of the xpathevaluator interface.
XPathExpression.evaluate() - Web APIs
e shows the use of the evaluate() method.
XPathExpression - Web APIs
s the use of the xpathexpression interface.
XPathResult.snapshotItem() - Web APIs
type type_err is thrown.
XPathResult - Web APIs
ince this result was returned.
XRRigidTransform - Web APIs
tation.
ARIA: gridcell role - Accessibility
he table-style grouping of information's rows.
ARIA: tab role - Accessibility
er("click", changetabs); }); // enable arrow navigation between tabs in the tab list let tabfocus = 0; tablist.addeventlistener("keydown", e => { // move right if (e.keycode === 39 || e.keycode === 37) { tabs[tabfocus].setattribute("tabindex", -1); if (e.keycode === 39) { tabfocus++; // if we're at the end, go to the start if (tabfocus >= tabs.length) { tabfocus = 0; } // move left } else if (e.keycode === 37) { tabfocus--; // if we're at the start, move to the end if (tabfocus < 0) { tabfocus = tabs.length - 1; } } tabs[tabfocus].setattribute("tabindex", 0); tabs[tabfocus].focus(); } }); }); function changetabs(e) { const target = e.target; ...
ARIA: button role - Accessibility
keyboard // activate with enter or space // get the new name value from the input element let newnameinput = document.getelementbyid('newname'); let name = newnameinput.value; newnameinput.value = ''; // clear the text field newnameinput.focus(); // give the text field focus to enable entering and additional name.
Architecture - Accessibility
get the current line start and end offsets.
-webkit-border-before - CSS: Cascading Style Sheets
t-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browser to anotherapplies toall elementsinheritedyespercentagesas each of the properties of the shorthand:-webkit-border-before-width: logical-width of containing blockcomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style:...
-webkit-mask-repeat-y - CSS: Cascading Style Sheets
her one to be added.
::first-line (:first-line) - CSS: Cascading Style Sheets
the ::first-line css pseudo-element applies styles to the first line of a block-level element.
:disabled - CSS: Cascading Style Sheets
Web › CSS › :disabled
nt.addeventlistener('domcontentloaded', function () { // attach `change` event listener to checkbox document.getelementbyid('billing-checkbox').onchange = togglebilling; }, false); function togglebilling() { // select the billing text fields var billingitems = document.queryselectorall('#billing input[type="text"]'); // toggle the billing text fields for (var i = 0; i < billingitems.length; i++) { billingitems[i].disabled = !billingitems[i].disabled; } } result specifications specification status comment html living standardthe definition of ':disabled' in that specification.
:first - CSS: Cascading Style Sheets
Web › CSS › :first
ule, represents the first page of a printed document.
:indeterminate - CSS: Cascading Style Sheets
terminate form fields.
@counter-style - CSS: Cascading Style Sheets
, a symbol that is appended to the marker representation.
device-height - CSS: Cascading Style Sheets
the device-height css media feature can be used to test the height of an output device's rendering surface.
device-width - CSS: Cascading Style Sheets
the device-width css media feature can be used to test the width of an output device's rendering surface.
height - CSS: Cascading Style Sheets
Web › CSS › @media › height
the height css media feature can be used to apply styles based on the height of the viewport (or the page box, for paged media).
width - CSS: Cascading Style Sheets
Web › CSS › @media › width
the width css media feature can be used to test the width of the viewport (or the page box, for paged media).
@media - CSS: Cascading Style Sheets
Web › CSS › @media
ects whether scripting (i.e.
@page - CSS: Cascading Style Sheets
Web › CSS › @page
page box at which the page rendering is clipped.
@viewport - CSS: Cascading Style Sheets
Web › CSS › @viewport
note: see https://github.com/w3c/csswg-drafts/issues/4766 for discussion around @viewport's removal from the standards track.
Using CSS animations - CSS: Cascading Style Sheets
tion sequence should progress.
Using URL values for the cursor property - CSS: Cascading Style Sheets
the hotspot to be the pixel at (4,12) from the top left (0,0).
Basic Concepts of Multicol - CSS: Cascading Style Sheets
ether you may get fewer columns than specified in the value for column-count.
Logical properties for floating and positioning - CSS: Cascading Style Sheets
item follows the direction and writing-mode.
CSS Shapes - CSS: Cascading Style Sheets
to define a shape on a floated element, causing wrapping lines to wrap round the shape rather than following the rectangle of the element's box.
Using CSS transitions - CSS: Cascading Style Sheets
body> css content .box { border-style: solid; border-width: 1px; display: block; width: 100px; height: 100px; background-color: #0000ff; transition: width 2s, height 2s, background-color 2s, transform 2s; } .box:hover { background-color: #ffcccc; width: 200px; height: 200px; transform: rotate(180deg); } when property value lists are of different lengths if any property's list of values is shorter than the others, its values are repeated to make them match.
CSS data types - CSS: Cascading Style Sheets
Web › CSS › CSS Types
ons include the following: <angle> <angle-percentage> <angular-color-hint> <angular-color-stop> <attr-fallback> <attr-name> <basic-shape> <blend-mode> <calc-product> <calc-sum> <calc-value> <color> <color-stop> <color-stop-angle> <counter-style> <custom-ident> <dimension> <filter-function> <flex> <frequency> <frequency-percentage> <gradient> <ident> <image> <integer> <length> <length-percentage> <number> <number-percentage> <percentage> <position> <quote> <ratio> <resolution> <shape-box> <shape-radius> <string> <time> <time-percentage> <timing-function> <toggle-value> <transform-function> <type-or-unit> <url> <url-modifier> <zero> specifications specification status comment css values and units module level 4 edi...
Mozilla CSS extensions - CSS: Cascading Style Sheets
62 -moz-stackobsolete since gecko 62 -moz-markerobsolete since gecko 62 empty-cells -moz-show-background (default value in quirks mode) font -moz-button -moz-info -moz-desktop -moz-dialog (also a color) -moz-document -moz-workspace -moz-window -moz-list -moz-pull-down-menu -moz-field (also a color) font-family -moz-fixed image-rendering -moz-crisp-edges <length> -moz-calc list-style-type -moz-arabic-indic -moz-bengali -moz-cjk-earthly-branch -moz-cjk-heavenly-stem -moz-devanagari -moz-ethiopic-halehame -moz-ethiopic-halehame-am -moz-ethiopic-halehame-ti-er -moz-ethiopic-halehame-ti-et -moz-ethiopic-numeric -moz-gujarati -moz-gurmukhi -moz-hangul -moz-hangul-consonant -moz-japanese-formal -moz-japanese-informal -moz-kannada -m...
CSS reference - CSS: Cascading Style Sheets
Web › CSS › Reference
l()hsla()hue-rotate()hyphensi<ident><image>image()image-orientationimage-renderingimage-set()@importin:in-range:indeterminateinheritinitialinline-sizeinsetinset()inset-blockinset-block-endinset-block-startinset-inlineinset-inline-endinset-inline-start<integer>:invalidinvert()isolationjjustify-contentjustify-itemsjustify-selfkkhz@keyframesl:lang:last-child:last-of-typeleader():leftleft@left-bottom<length><length-percentage>letter-spacingline-breakline-heightlinear-gradient():linklist-stylelist-style-imagelist-style-positionlist-style-typelocal()mmarginmargin-blockmargin-block-endmargin-block-startmargin-bottommargin-inlinemargin-inline-endmargin-inline-startmargin-leftmargin-rightmargin-top::markermarks (@page)maskmask-bordermask-border-modemask-border-outsetmask-border-repeatmask-border-slicemas...
Cubic Bezier Generator - CSS: Cascading Style Sheets
<html> <canvas id="bezier" width="336" height="336"> </canvas> <form> <label for="x1">x1 = </label><input onchange="updatecanvas();" type="text" maxlength=6 id="x1" value="0.79" class='field'> <label for="y1">y1 = </label><input onchange="updatecanvas();return true;" type="text" maxlength=6 id="y1" value="0.33" class='field'> <label for="x2">x2 = </label><input onchange="updatecanvas();return true;" type="text" maxlength=6 id="x2" value="0.14" class='field'> <label for="y2">y2 = </label><input onchange="updatecanvas();return true;" type="text" maxlength=6 id="y2" value="0.53" class='field'> <br> <output id="output">log</output> </form> </html> .field { width: 40px; } function updatecanvas() { var x1 = d...
animation-duration - CSS: Cascading Style Sheets
the animation-duration css property sets the length of time that an animation takes to complete one cycle.
backdrop-filter - CSS: Cascading Style Sheets
and all graphics elementsinheritednocomputed valueas specifiedanimation typea filter function list formal syntax none | <filter-function-list>where <filter-function-list> = [ <filter-function> | <url> ]+where <filter-function> = <blur()> | <brightness()> | <contrast()> | <drop-shadow()> | <grayscale()> | <hue-rotate()> | <invert()> | <opacity()> | <saturate()> | <sepia()>where <blur()> = blur( <length> )<brightness()> = brightness( <number-percentage> )<contrast()> = contrast( [ <number-percentage> ] )<drop-shadow()> = drop-shadow( <length>{2,3} <color>?
border-block-width - CSS: Cascading Style Sheets
: 5px; border-block-width: thick; the border width in the other dimension can be set with border-inline-width, which sets border-inline-start-width, and border-inline-end-width.
border-block - CSS: Cascading Style Sheets
der-width.
border-image-slice - CSS: Cascading Style Sheets
ove the actual background.
border-inline-width - CSS: Cascading Style Sheets
th: 5px; border-inline-width: thick; the border width in the other dimension can be set with border-block-width, which sets border-block-start-width, and border-block-end-width.
border-style - CSS: Cascading Style Sheets
set, it won't be displayed.
blur() - CSS: Cascading Style Sheets
function applies a gaussian blur to the input image.
<flex> - CSS: Cascading Style Sheets
the <flex> css data type denotes a flexible length within a grid container.
<frequency-percentage> - CSS: Cascading Style Sheets
-integer 14khz the unit is case-insensitive, though non-si capitalization is not recommended.
<frequency> - CSS: Cascading Style Sheets
Web › CSS › frequency
-integer 14khz the unit is case-insensitive, though non-si capitalization is not recommended.
justify-content - CSS: Cascading Style Sheets
flex container, and the inline axis of a grid container.
mask-border - CSS: Cascading Style Sheets
iner elements excluding the defs element and all graphics elementsinheritednopercentagesas each of the properties of the shorthand:mask-border-slice: refer to size of the mask border imagemask-border-width: relative to width/height of the mask border image areacomputed valueas each of the properties of the shorthand:mask-border-mode: as specifiedmask-border-outset: as specified, but with relative lengths converted into absolute lengthsmask-border-repeat: as specifiedmask-border-slice: as specifiedmask-border-source: as specified, but with <url> values made absolutemask-border-width: as specified, but with relative lengths converted into absolute lengthsanimation typeas each of the properties of the shorthand:mask-border-mode: discretemask-border-outset: discretemask-border-repeat: discretemask-b...
<percentage> - CSS: Cascading Style Sheets
the <percentage> css data type represents a percentage value.
repeat() - CSS: Cascading Style Sheets
Web › CSS › repeat
100px, 1fr) [col-end]) repeat(auto-fill, 10px [col-start] 30% [col-middle] 400px [col-end]) /* <fixed-repeat> values */ repeat(4, 250px) repeat(4, [col-start] 250px [col-end]) repeat(4, [col-start] 60% [col-end]) repeat(4, [col-start] minmax(100px, 1fr) [col-end]) repeat(4, [col-start] fit-content(200px) [col-end]) repeat(4, 10px [col-start] 30% [col-middle] 400px [col-end]) syntax values <length> a positive integer length.
text-decoration-skip-ink - CSS: Cascading Style Sheets
us a pull request.
<time-percentage> - CSS: Cascading Style Sheets
ace not allowed between the space and the percentage sign valid times 12s positive integer -456ms negative integer 4.3ms non-integer 14ms the unit is case-insensitive, although capital letters are not recommended.
<time> - CSS: Cascading Style Sheets
Web › CSS › time
ween s and ms follows the logical 1s = 1000ms.
matrix() - CSS: Cascading Style Sheets
matrix.
matrix3d() - CSS: Cascading Style Sheets
ta type.
transition-duration - CSS: Cascading Style Sheets
the transition-duration css property sets the length of time a transition animation should take to complete.
transition - CSS: Cascading Style Sheets
naming a css property.
Cross-browser audio basics - Developer guides
ser preloads the audio, in other words, which part of the file it downloads when the <audio> element is initialized, and before the play button is pressed.
Audio and Video Delivery - Developer guides
llback content: <video controls> <source src="dynamicsearch.mp4" type="video/mp4"></source> <a href="dynamicsearch.mp4"> <img src="dynamicsearch.jpg" alt="dynamic app search in firefox os"> </a> <p>click image to play a video demo of dynamic app search</p> </video> var v = document.queryselector('video'), sources = v.queryselectorall('source'), lastsource = sources[sources.length-1]; lastsource.addeventlistener('error', function(ev) { var d = document.createelement('div'); d.innerhtml = v.innerhtml; v.parentnode.replacechild(d, v); }, false); audio/video javascript libraries a number of audio and video javascript libaries exist.
Audio and video manipulation - Developer guides
t("2d"); var self = this; this.video.addeventlistener("play", function() { self.width = self.video.width; self.height = self.video.height; self.timercallback(); }, false); }, computeframe: function() { this.ctx1.drawimage(this.video, 0, 0, this.width, this.height); var frame = this.ctx1.getimagedata(0, 0, this.width, this.height); var l = frame.data.length / 4; for (var i = 0; i < l; i++) { var grey = (frame.data[i * 4 + 0] + frame.data[i * 4 + 1] + frame.data[i * 4 + 2]) / 3; frame.data[i * 4 + 0] = grey; frame.data[i * 4 + 1] = grey; frame.data[i * 4 + 2] = grey; } this.ctx1.putimagedata(frame, 0, 0); return; } }; once the page has loaded you can call processor.doload() result this is a pretty ...
<hr>: The Thematic Break (Horizontal Rule) element - HTML: Hypertext Markup Language
Web › HTML › Element › hr
face htmlhrelement attributes this element's attributes include the global attributes.
<keygen> - HTML: Hypertext Markup Language
Web › HTML › Element › keygen
enge, and then digitally signed with the private key to produce a signedpublickeyandchallenge.
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
Web › HTML › Element › source
dom interface htmlsourceelement attributes this element includes the global attributes.
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
Web › HTML › Element › td
similar effect, use the css background-color property.
<th> - HTML: Hypertext Markup Language
Web › HTML › Element › th
char, this attribute is ignored.
Evolution of HTTP - HTTP
img/header-background.png http/1.1 host: developer.cdn.mozilla.net user-agent: mozilla/5.0 (macintosh; intel mac os x 10.9; rv:50.0) gecko/20100101 firefox/50.0 accept: */* accept-language: en-us,en;q=0.5 accept-encoding: gzip, deflate, br referer: https://developer.mozilla.org/docs/glossary/simple_header 200 ok age: 9578461 cache-control: public, max-age=315360000 connection: keep-alive content-length: 3077 content-type: image/png date: thu, 31 mar 2016 13:34:46 gmt last-modified: wed, 21 oct 2015 18:27:50 gmt server: apache (image content of 3077 bytes) http/1.1 was first published as rfc 2068 in january 1997.
Compression in HTTP - HTTP
t advertizes its will using the te header and the other node chooses the adequate method, applies it, and indicates its choice with the transfer-encoding header.
Access-Control-Allow-Headers - HTTP
headers, and origin, such as: options /resource/foo access-control-request-method: delete access-control-request-headers: origin, x-requested-with origin: https://foo.bar.org response if the server allows cors requests to use the delete method, it responds with an access-control-allow-methods response header, which lists delete along with the other methods it supports: http/1.1 200 ok content-length: 0 connection: keep-alive access-control-allow-origin: https://foo.bar.org access-control-allow-methods: post, get, options, delete access-control-max-age: 86400 if the requested method isn't supported, the server will respond with an error.
Content-Disposition - HTTP
filename and filename* differ only in that filename* uses the encoding defined in rfc 5987.
Content-Type - HTTP
type of the request is specified by the enctype attribute on the <form> element.
Set-Cookie - HTTP
ne value.
Trailer - HTTP
Web › HTTP › Headers › Trailer
request header needs to be set to "trailers" to allow trailer fields.
HEAD - HTTP
Web › HTTP › Methods › HEAD
the http head method requests the headers that would be returned if the head request's url was instead requested with the http get method.
PATCH - HTTP
Web › HTTP › Methods › PATCH
document formats accepted by the server.
POST - HTTP
Web › HTTP › Methods › POST
successful response has body yes safe no idempotent no cacheable only if freshness information is included allowed in html forms yes syntax post /test example a simple form using the default application/x-www-form-urlencoded content type: post /test http/1.1 host: foo.example content-type: application/x-www-form-urlencoded content-length: 27 field1=value1&field2=value2 a form using the multipart/form-data content type: post /test http/1.1 host: foo.example content-type: multipart/form-data;boundary="boundary" --boundary content-disposition: form-data; name="field1" value1 --boundary content-disposition: form-data; name="field2"; filename="example.txt" value2 --boundary-- specifications specification title ...
PUT - HTTP
Web › HTTP › Methods › PUT
ost requests may have additional effects, akin to placing an order several times.
Network Error Logging - HTTP
he ip address is invalid tcp.address_unreachable the ip address is unreachable tcp.failed the tcp connection failed due to reasons not covered by previous errors http.error the user agent successfully received a response, but it had a 4xx or 5xx status code http.protocol.error the connection was aborted due to an http protocol error http.response.invalid response is empty, has a content-length mismatch, has improper encoding, and/or other conditions that prevent user agent from processing the response http.response.redirect_loop the request was aborted due to a detected redirect loop http.failed the connection failed due to errors in http protocol not covered by previous errors specifications specification network error logging ...
An overview of HTTP - HTTP
Web › HTTP › Overview
ated in frames, making them impossible to read directly, but the principle remains the same.
416 Range Not Satisfiable - HTTP
Web › HTTP › Status › 416
(http) 416 range not satisfiable error response code indicates that a server cannot serve the requested ranges.
426 Upgrade Required - HTTP
Web › HTTP › Status › 426
ient 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.
Control flow and error handling - JavaScript
lean object!
Assertions - JavaScript
tches immediately before a line break character.
Regular expression syntax cheatsheet - JavaScript
tches immediately before a line break character.
Groups and ranges - JavaScript
the matched substring cannot be recalled from the resulting array's elements ([1], ..., [n]) or from the predefined regexp object's properties ($1, ..., $9).
The legacy Iterator protocol - JavaScript
legacy and es2015 iterator protocols the value was returned directly as a return value of calls to next, instead of the value property of a placeholder object iteration termination was expressed by throwing a stopiteration object.
Warning: String.x is deprecated; use String.prototype.x instead - JavaScript
methods = [ 'contains', 'substring', 'tolowercase', 'touppercase', 'charat', 'charcodeat', 'indexof', 'lastindexof', 'startswith', 'endswith', 'trim', 'trimleft', 'trimright', 'tolocalelowercase', 'normalize', 'tolocaleuppercase', 'localecompare', 'match', 'search', 'slice', 'replace', 'split', 'substr', 'concat', 'localecompare' ], methodcount = methods.length, assignstringgeneric = function(methodname) { var method = string.prototype[methodname]; string[methodname] = function(arg1) { return method.apply(arg1, array.prototype.slice.call(arguments, 1)); }; }; for (i = 0; i < methodcount; i++) { assignstringgeneric(methods[i]); } }()); ...
SyntaxError: for-in loop head declarations may not have initializers - JavaScript
= 0) in the head of the for-in loop.
TypeError: Reduce of empty array with no initial value - JavaScript
-3, -4, -5]; ints.filter(x => x > 0) // removes all elements .reduce((x, y) => x + y, 0) // the initial value is the neutral element of the addition another way would be two to handle the empty case, either before calling reduce, or in the callback after adding an unexpected dummy initial value.
JavaScript error reference - JavaScript
is listed by name (the type of error) and message (a more detailed human-readable error message).
Default parameters - JavaScript
day!') // ["david", "hi", "happy birthday!"] this functionality can be approximated like this, which demonstrates how many edge cases are handled: function go() { return ':p' } function withdefaults(a, b = 5, c = b, d = go(), e = this, f = arguments, g = this.value) { return [a, b, c, d, e, f, g] } function withoutdefaults(a, b, c, d, e, f, g) { switch (arguments.length) { case 0: a; case 1: b = 5; case 2: c = b; case 3: d = go(); case 4: e = this; case 5: f = arguments; case 6: g = this.value; default: } return [a, b, c, d, e, f, g]; } withdefaults.call({value: '=^_^='}); // [undefined, 5, 5, ":p", {value:"=^_^="}, arguments, "=^_^="] withoutdefaults.call({value: '=^_^='}); // [unde...
Array.prototype.reduceRight() - JavaScript
prototype.reduceright) { array.prototype.reduceright = function(callback /*, initialvalue*/) { 'use strict'; if (null === this || 'undefined' === typeof this) { throw new typeerror('array.prototype.reduce called on null or undefined'); } if ('function' !== typeof callback) { throw new typeerror(callback + ' is not a function'); } var t = object(this), len = t.length >>> 0, k = len - 1, value; if (arguments.length >= 2) { value = arguments[1]; } else { while (k >= 0 && !(k in t)) { k--; } if (k < 0) { throw new typeerror('reduce of empty array with no initial value'); } value = t[k--]; } for (; k >= 0; k--) { if (k in t) { value = callback(value, t[k], k, t); } } r...
Array.prototype.flat() - JavaScript
r.slice(); }; flatdeep(arr, infinity); // [1, 2, 3, 4, 5, 6] use a stack // non recursive flatten deep using a stack // note that depth control is hard/inefficient as we will need to tag each value with its own depth // also possible w/o reversing on shift/unshift, but array ops on the end tends to be faster function flatten(input) { const stack = [...input]; const res = []; while(stack.length) { // pop value from stack const next = stack.pop(); if(array.isarray(next)) { // push back array items, won't modify the original input stack.push(...next); } else { res.push(next); } } // reverse to restore input order return res.reverse(); } const arr = [1, 2, [3, 4, [5, 6]]]; flatten(arr); // [1, 2, 3, 4, 5, 6] use generator function function* f...
Array.prototype.forEach() - JavaScript
arraysparse.foreach((element) => { console.log(element) numcallbackruns++ }) console.log("numcallbackruns: ", numcallbackruns) // 1 // 3 // 7 // numcallbackruns: 3 // comment: as you can see the missing value between 3 and 7 didn't invoke callback function.
Array.isArray() - JavaScript
.isarray('array'); array.isarray(true); array.isarray(false); array.isarray(new uint8array(32)); array.isarray({ __proto__: array.prototype }); instanceof vs isarray when checking for array instance, array.isarray is preferred over instanceof because it works through iframes.
Array.prototype.join() - JavaScript
parator]) parameters separator optional specifies a string to separate each pair of adjacent elements of the array.
Array.of() - JavaScript
the array.of() method creates a new array instance from a variable number of arguments, regardless of number or type of the arguments.
Array.prototype.some() - JavaScript
cma-262, edition 5, 15.4.4.17 // reference: http://es5.github.io/#x15.4.4.17 if (!array.prototype.some) { array.prototype.some = function(fun, thisarg) { 'use strict'; if (this == null) { throw new typeerror('array.prototype.some called on null or undefined'); } if (typeof fun !== 'function') { throw new typeerror(); } var t = object(this); var len = t.length >>> 0; for (var i = 0; i < len; i++) { if (i in t && fun.call(thisarg, t[i], i, t)) { return true; } } return false; }; } examples testing value of array elements the following example tests whether any element in the array is bigger than 10.
Array.prototype.values() - JavaScript
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.
ArrayBuffer.prototype.slice() - JavaScript
er.
DataView.prototype.buffer - JavaScript
nd send us a pull request.
Date - JavaScript
1) // sun feb 01 1998 00:00:00 gmt+0000 (gmt) // deprecated method; 98 maps to 1998 here as well date.setyear(98) // sun feb 01 1998 00:00:00 gmt+0000 (gmt) date.setfullyear(98) // sat feb 01 0098 00:00:00 gmt+0000 (bst) calculating elapsed time the following examples show how to determine the elapsed time between two javascript dates in milliseconds.
Function.prototype.call() - JavaScript
in an array.
Function - JavaScript
sponding to the arguments passed to a function.
Generator.prototype.next() - JavaScript
2; yield 3; } const g = gen(); // "generator { }" g.next(); // "object { value: 1, done: false }" g.next(); // "object { value: 2, done: false }" g.next(); // "object { value: 3, done: false }" g.next(); // "object { value: undefined, done: true }" using next() with a list function* getpage(pagesize = 1, list) { let output = []; let index = 0; while (index < list.length) { output = []; for (let i = index; i < index + pagesize; i++) { if (list[i]) { output.push(list[i]); } } yield output; index += pagesize; } } list = [1, 2, 3, 4, 5, 6, 7, 8] var page = getpage(3, list); // generator { } page.next(); // object {value: (3) [1, 2, 3], done: false} page.next(); ...
Intl.ListFormat() constructor - JavaScript
okup" and "best fit"; the default is "best fit".
Intl.RelativeTimeFormat() constructor - JavaScript
the locale matching algorithm to use.
Intl.RelativeTimeFormat.prototype.resolvedOptions() - JavaScript
initialization of the given relativetimeformat object.
Intl - JavaScript
them) be considered for use in a given operation.
Math - JavaScript
d some functions (such as css transforms) can accept degrees, it is a good idea to keep functions handy that convert between the two: function degtorad(degrees) { return degrees * (math.pi / 180); }; function radtodeg(rad) { return rad / (math.pi / 180); }; calculating the height of an equalateral triangle if we want to calculate the height of an equalateral triangle, and we know its side length is 100, we can use the formulae length of the adjacent multiplied by the tangent of the angle is equal to the opposite.
Number.prototype.toFixed() - JavaScript
pport larger and smaller values as chosen.
Object.prototype.constructor - JavaScript
operty of an object.
Object.defineProperties() - JavaScript
peerror('bad set'); d.set = s; } if (('get' in d || 'set' in d) && ('value' in d || 'writable' in d)) throw new typeerror('identity-confused descriptor'); return d; } if (typeof obj !== 'object' || obj === null) throw new typeerror('bad obj'); properties = object(properties); var keys = object.keys(properties); var descs = []; for (var i = 0; i < keys.length; i++) descs.push([keys[i], converttodescriptor(properties[keys[i]])]); for (var i = 0; i < descs.length; i++) object.defineproperty(obj, descs[i][0], descs[i][1]); return obj; } examples using object.defineproperties var obj = {}; object.defineproperties(obj, { 'property1': { value: true, writable: true }, 'property2': { value: 'hello', writable: false } ...
Object.entries() - JavaScript
of the following: a demonstration implementation of object.entries in the tc39/proposal-object-values-entries (if you don't need any support for ie); a polyfill in the es-shims/object.entries repositories; or, you can use the simple, ready-to-deploy polyfill listed below: if (!object.entries) { object.entries = function( obj ){ var ownprops = object.keys( obj ), i = ownprops.length, resarray = new array(i); // preallocate the array while (i--) resarray[i] = [ownprops[i], obj[ownprops[i]]]; return resarray; }; } for the above polyfill code snippet, if you need support for ie<9, then you will also need an object.keys() polyfill (such as the one found on the object.keys page).
Object.freeze() - JavaScript
e array buffer views with elements > object.freeze(new dataview(new arraybuffer(32))) // no elements dataview {} > object.freeze(new float64array(new arraybuffer(64), 63, 0)) // no elements float64array [] > object.freeze(new float64array(new arraybuffer(64), 32, 2)) // has elements typeerror: cannot freeze array buffer views with elements note that; as the standard three properties (buf.bytelength, buf.byteoffset and buf.buffer) are read-only (as are those of an arraybuffer or sharedarraybuffer), there is no reason for attempting to freeze these properties.
Object.getOwnPropertySymbols() - JavaScript
.
Object.is() - JavaScript
value2); parameters value1 the first value to compare.
Object.prototype.propertyIsEnumerable() - JavaScript
var a = []; o.prop = 'is enumerable'; a[0] = 'is enumerable'; o.propertyisenumerable('prop'); // returns true a.propertyisenumerable(0); // returns true user-defined vs.
Object.setPrototypeOf() - JavaScript
name_3", "..."], "@function_body") *** object.appendchain(@object [, "@arg_name_1, @arg_name_2, @arg_name_3, ..."], "@function_body") * * appends the first non-native prototype of a chain to the native function.prototype object, then appends a * new function(["@arg"(s)], "@function_body") to that chain.
RangeError - JavaScript
tes an error when a value is not in the set or range of allowed values.
Reflect.getOwnPropertyDescriptor() - JavaScript
ndefined otherwise.
Reflect.ownKeys() - JavaScript
ptions a typeerror, if target is not an object.
Reflect.set() - JavaScript
hod allows you to set a property on an object.
String.prototype.codePointAt() - JavaScript
dom elements try { var object = {}; var $defineproperty = object.defineproperty; var result = $defineproperty(object, object, object) && $defineproperty; } catch(error) {} return result; }()); var codepointat = function(position) { if (this == null) { throw typeerror(); } var string = string(this); var size = string.length; // `tointeger` var index = position ?
String.fromCharCode() - JavaScript
the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.raw() - JavaScript
aw() string.raw`hi\n${2+3}!`; // 'hi\n5!', the character after 'hi' // is not a newline character, // '\' and 'n' are two characters.
String.prototype.startsWith() - JavaScript
ecification and may not be available in all javascript implementations yet.
String.prototype.trimStart() - JavaScript
w.string, proto=string.prototype; ((o,p)=>{ if(p in o?o[p]?false:true:true){ const r=/^\s+/; o[p]=o.trimleft||function(){ return this.replace(r,'') } } })(proto,'trimstart'); })(window); */ examples using trimstart() the following example displays the lowercase string 'foo ': var str = ' foo '; console.log(str.length); // 8 str = str.trimstart(); console.log(str.length); // 5 console.log(str); // 'foo ' specifications specification ecmascript (ecma-262)the definition of ' string.prototype.trimstart' in that specification.
TypedArray.prototype.buffer - JavaScript
uffer property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
TypedArray.prototype.indexOf() - JavaScript
thub repository.
TypedArray.prototype.slice() - JavaScript
tracts up to but not including end.
TypedArray.prototype.subarray() - JavaScript
included in the new view if this value is not specified.
WebAssembly.Table.prototype.get() - JavaScript
f the webassembly.table() object retrieves a function reference stored at a given index.
delete operator - JavaScript
delete foo.bar; // returns true // foo.bar is still available in the // prototype chain.
this - JavaScript
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].addeventlistener('click', bluify, false); } in an inline event handler when the code is called from an inline on-event handler, its this is set to the dom element on which the listener is placed: <button onclick="alert(this.tagname.tolowercase());"> show this </button> the above alert shows button.
yield - JavaScript
ators offer enormous power and control.
empty - JavaScript
site behavior, where you want multiple statements, but javascript only allows a single one, is possible using a block statement, which combines several statements into a single one.
with - JavaScript
ound to the property and the object containing the property.
<mfrac> - MathML
Web › MathML › Element › mfrac
tyle provided for use with stylesheets.
<mi> - MathML
Web › MathML › Element › mi
s, id, style provided for use with stylesheets.
<mn> - MathML
Web › MathML › Element › mn
s, id, style provided for use with stylesheets.
<ms> - MathML
Web › MathML › Element › ms
ft to right) or rtl (right to left).
<msub> - MathML
Web › MathML › Element › msub
sub>.
<msup> - MathML
Web › MathML › Element › msup
attributes class, id, style provided for use with stylesheets.
<mtext> - MathML
Web › MathML › Element › mtext
s, id, style provided for use with stylesheets.
Codecs used by WebRTC - Web media technologies
he local description, send the offer along to the remote peer, and so on, thereby triggering the renegotiation of the connection.
The "codecs" parameter in common media types - Web media technologies
ey share the same syntax.
Critical rendering path - Web Performance
se resources.
Understanding latency - Web Performance
ost immediately.
Web Performance
rendering flows.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
.png', '/pwa-examples/js13kpwa/icons/icon-192.png', '/pwa-examples/js13kpwa/icons/icon-256.png', '/pwa-examples/js13kpwa/icons/icon-512.png' ]; next, the links to images to be loaded along with the content from the data/games.js file are generated in the second array.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
th notifications and push.
Media - Progressive web apps (PWAs)
es, see media in the css specification.
Progressive web apps (PWAs)
es show you what need to do to implement a pwa, by examining a simple example and showing you how all the pieces work.
clipPathUnits - SVG: Scalable Vector Graphics
em as defined when the clipping path was created.
dur - SVG: Scalable Vector Graphics
Web › SVG › Attribute › dur
1s" repeatcount="indefinite"/> </rect> <rect x="120" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="3s" repeatcount="indefinite"/> </rect> </svg> usage notes value <clock-value> | media | indefinite default value indefinite animatable no <clock-value> this value specifies the length of the simple duration.
font-size - SVG: Scalable Vector Graphics
y element but it has effect only on the following eight elements: <altglyph>, <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg viewbox="0 0 200 30" xmlns="http://www.w3.org/2000/svg"> <text y="20" font-size="smaller">smaller</text> <text x="100" y="20" font-size="2em">2em</text> </svg> usage notes value <absolute-size> | <relative-size> | <length-percentage> default value medium animatable yes for a description of the values, please refer to the css font-size property.
fr - SVG: Scalable Vector Graphics
Web › SVG › Attribute › fr
x="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="25%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r="100" fill="url(#gradient2)" style="transform: translatex(240px);" /> </svg> usage notes value <length> default value 0 animatable none example <svg viewbox="0 0 120 120" width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop offset="0%" stop-color="red"/> <stop offset="100%" stop-color="blue"/> </radialgradient> </defs> <rect x=...
fx - SVG: Scalable Vector Graphics
Web › SVG › Attribute › fx
cx="0.5" cy="0.5" r="0.5" fx="0.75" fy="0.35" fr="5%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r="100" fill="url(#gradient2)" style="transform: translatex(240px);" /> </svg> usage notes value <length> default value coincides with the presentational value of cx for the element whether the value for cx was inherited or not.
fy - SVG: Scalable Vector Graphics
Web › SVG › Attribute › fy
cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.75" fr="5%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r="100" fill="url(#gradient2)" style="transform: translatex(240px);" /> </svg> usage notes value <length> default value coincides with the presentational value of cy for the element whether the value for cy was inherited or not.
max - SVG: Scalable Vector Graphics
Web › SVG › Attribute › max
values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> <animate attributename="cy" dur="4s" max="6s" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> usage notes value <clock-value> default value none animatable no <clock-value> specifies the length of the maximum value of the active duration, measured in local time.
min - SVG: Scalable Vector Graphics
Web › SVG › Attribute › min
e" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> <animate attributename="cy" dur="4s" min="2s" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> usage notes value <clock-value> default value 0 animatable no <clock-value> specifies the length of the minimum value of the active duration, measured in local time.
stroke-dasharray - SVG: Scalable Vector Graphics
ck" stroke-dasharray="4 1 2" /> <!-- dashes and gaps of various sizes with an even number of values --> <line x1="0" y1="9" x2="30" y2="9" stroke="black" stroke-dasharray="4 1 2 3" /> </svg> usage notes value none | <dasharray> default value none animatable yes <dasharray> a list of comma and/or white space separated <length>s and <percentage>s that specify the lengths of alternating dashes and gaps.
stroke-dashoffset - SVG: Scalable Vector Graphics
ends up in the same rendering as the previous example --> <line x1="0" y1="9" x2="30" y2="9" stroke="black" stroke-dasharray="3 1" stroke-dashoffset="1" /> <!-- the following red lines highlight the 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.
stroke-width - SVG: Scalable Vector Graphics
30 10" xmlns="http://www.w3.org/2000/svg"> <!-- default stroke width: 1 --> <circle cx="5" cy="5" r="3" stroke="green" /> <!-- stroke width as a number --> <circle cx="15" cy="5" r="3" stroke="green" stroke-width="3" /> <!-- stroke width as a percentage --> <circle cx="25" cy="5" r="3" stroke="green" stroke-width="2%" /> </svg> usage notes value <length> | <percentage> default value 1px animatable yes note: a percentage value is always computed as a percentage of the normalized viewbox diagonal length.
<feConvolveMatrix> - SVG: Scalable Vector Graphics
*200 + 2*220 + 1*240) / (9+8+7+6+5+4+3+2+1) usage context categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes in order kernelmatrix divisor bias targetx targety edgemode kernelunitlength preservealpha dom interface this element implements the svgfeconvolvematrixelement interface.
<feSpecularLighting> - SVG: Scalable Vector Graphics
applying it to the texture image.
<polyline> - SVG: Scalable Vector Graphics
Web › SVG › Element › polyline
ts="0,100 50,25 50,75 100,0" /> <!-- example of the same polyline shape with stroke and no fill --> <polyline points="100,100 150,25 150,75 200,0" fill="none" stroke="black" /> </svg> attributes points this attribute defines the list of points (pairs of x,y absolute coordinates) required to draw the polyline value type: <number>+ ; default value: ""; animatable: yes pathlength this attribute lets specify the total length for the path, in user units.
Positions - SVG: Scalable Vector Graphics
it area and enlarges the image to double size.
Same-origin policy - Web security
ow.postmessage.
Functions - XPath
() 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() substring-before() sum() system-property() xslt-specific translate() true() unparsed-entity-url() xslt-specific (not supported) ...
The Netscape XSLT/XPath Reference - XSLT: Extensible Stylesheet Language Transformations
ilable() (supported) generate-id() (supported) id() (partially supported) key() (supported) lang() (supported) last() (supported) local-name() (supported) name() (supported) namespace-uri() (supported) normalize-space() (supported) not() (supported) number() (supported) position() (supported) round() (supported) starts-with() (supported) string() (supported) string-length() (supported) substring() (supported) substring-after() (supported) substring-before() (supported) sum() (supported) system-property() (supported) translate() (supported) true() (supported) unparsed-entity-url() (not supported) ...
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
d) 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) not() (supported) number() (supported) position() (supported) round() (supported) starts-with() (supported) string() (supported) string-length() (supported) substring() (supported) substring-after() (supported) substring-before() (supported) sum() (supported) system-property() (supported) translate() (supported) true() (supported) unparsed-entity-url() (not supported) for further reading books online the world wide web consortium portals articles tutorials/examples mailing lists/newsgroups resource...
Exported WebAssembly functions - WebAssembly
the result function returned.
Compiling an Existing C Module to WebAssembly - WebAssembly
ts job.