Search completed in 1.02 seconds.
Basic math in JavaScript — numbers and operators - Learn web development
previous overview: first steps next at this point in the course we discuss math in javascript — how we can use operators and other features to successfully manipulate
numbers to do our bidding.
... types of
numbers in programming, even the humble decimal
number system that we all know so well is more complicated than you might think.
... we use different terms to describe different types of decimal
numbers, for example: integers are whole
numbers, e.g.
...And 39 more matches
<input type="number"> - HTML: Hypertext Markup Language
<input> elements of type
number are used to let the user enter a
number.
... on browsers that don't support inputs of type
number, a
number input falls back to type text.
... value any floating-point
number, or empty.
...And 35 more matches
Number - JavaScript
number is a primitive wrapper object used to represent and manipulate
numbers like 37 or -9.25.
... the
number constructor contains constants and methods for working with
numbers.
... values of other types can be converted to
numbers using the
number() function.
...And 35 more matches
Numbers and dates - JavaScript
« previousnext » this chapter introduces the concepts, objects and functions used to work with and perform calculations using
numbers and dates in javascript.
... this includes using
numbers written in various bases including decimal, binary, and hexadecimal, as well as the use of the global math object to perform a wide variety of mathematical operations on
numbers.
...
numbers in javascript,
numbers are implemented in double-precision 64-bit binary format ieee 754 (i.e., a
number between ±2−1022 and ±2+1023, or about ±10−308 to ±10+308, with a numeric precision of 53 bits).
...And 33 more matches
Intl.NumberFormat() constructor - JavaScript
the intl.
numberformat() constructor creates objects that enable language sensitive
number formatting.
... syntax new intl.
numberformat([locales[, options]]) parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
...the following unicode extension key is allowed: nu the
numbering system to be used.
...And 17 more matches
SVGNumberList - Web APIs
svg
number list interface the svg
numberlist defines a list of svg
number objects.
... an svg
numberlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... note: starting in gecko 5.0,the svg
numberlist dom interface is now indexable and can be accessed like arrays.
...And 14 more matches
<xsl:number> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:
number> element counts things sequentially.
... it can also be used to quickly format a
number.
... syntax <xsl:
number count=expression level="single" | "multiple" | "any" from=expression value=expression format=format-string lang=xml:lang-code letter-value="alphabetic" | "traditional" grouping-separator=character grouping-size=
number /> required attributes none.
...And 13 more matches
Intl.Locale.prototype.numberingSystem - JavaScript
the intl.locale.prototype.
numberingsystem property is an accessor property that returns the numeral system used by the locale.
... description a numeral system is a system for expressing
numbers.
... the
numberingsystem property helps to represent the different numeral systems used by various countries, regions, and cultures around the world.
...And 10 more matches
Number.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string with a language-sensitive representation of this
number.
... see the intl.
numberformat() constructor for details on these parameters and how to use them.
... return value a string with a language-sensitive representation of the given
number.
...And 9 more matches
JS_ReportErrorNumber
syntax void js_reporterror
number(jscontext *cx, jserrorcallback errorcallback, void *userref, const unsigned error
number, ...); void js_reporterror
numberuc(jscontext *cx, jserrorcallback errorcallback, void *userref, const unsigned error
number, ...); bool js_reporterrorflagsand
number(jscontext *cx, unsigned flags, jserrorcallback errorcallback, void *userref, const unsigned error
number, ...); bool js_reporterrorflagsand
numberuc(jscontext *cx, unsigned flags, jserrorcallback errorcallback, void *userref, const unsigned error
number, ...); void js_reporterror
numberuc...
...array(jscontext *cx, jserrorcallback errorcallback, void *userref, const unsigned error
number, const char16_t **args); // added in spidermonkey 19 name type description cx jscontext * the context in which to report the error.
... error
number const unsigned an error code.
...And 8 more matches
JS_ValueToNumber
replaced by js::to
number.
... convert any javascript value to a floating-point
number of type jsdouble.
... syntax jsbool js_valueto
number(jscontext *cx, jsval v, jsdouble *dp); name type description cx jscontext * the context in which to perform the conversion.
...And 8 more matches
Intl.NumberFormat.prototype.formatToParts() - JavaScript
the intl.
numberformat.prototype.formattoparts() method allows locale-aware formatting of strings produced by
numberformat formatters.
... syntax intl.
numberformat.prototype.formattoparts(
number) parameters
number optional a
number or bigint to format.
... return value an array of objects containing the formatted
number in parts.
...And 8 more matches
<number> - CSS: Cascading Style Sheets
the <
number> css data type represents a
number, being either an integer or a
number with a fractional component.
... syntax the syntax of <
number> extends the syntax of <integer>.
...there is no unit associated with
numbers.
...And 7 more matches
Intl.NumberFormat - JavaScript
the intl.
numberformat object is a constructor for objects that enable language sensitive
number formatting.
... constructor intl.
numberformat() creates a new
numberformat object.
... static methods intl.
numberformat.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
...And 7 more matches
Number.MAX_SAFE_INTEGER - JavaScript
the
number.max_safe_integer constant represents the maximum safe integer in javascript (253 - 1).
... property attributes of
number.max_safe_integer writable no enumerable no configurable no description the max_safe_integer constant has a value of 9007199254740991 (9,007,199,254,740,991 or ~9 quadrillion).
... the reasoning behind that
number is that javascript uses double-precision floating-point format
numbers as specified in ieee 754 and can only safely represent
numbers between -(253 - 1) and 253 - 1.
...And 6 more matches
Number.POSITIVE_INFINITY - JavaScript
the
number.positive_infinity property represents the positive infinity value.
... property attributes of
number.positive_infinity writable no enumerable no configurable no description the value of
number.positive_infinity is the same as the value of the global object's infinity property.
... any positive
number divided by positive_infinity is positive zero.
...And 6 more matches
Error.number - Archive of obsolete content
the error.
number property returns or sets the numeric value associated with a specific error.
... the error object's default property is
number.
... syntax object .
number [= error
number] parameters object any instance of the error object.
...And 5 more matches
Number.isNaN() - JavaScript
the
number.isnan() method determines whether the passed value is nan and its type is
number.
... syntax
number.isnan(value) parameters value the value to be tested for nan.
... return value true if the given value is nan and its type is
number; otherwise, false.
...And 5 more matches
Number.prototype.toExponential() - JavaScript
the toexponential() method returns a string representing the
number object in exponential notation.
...an integer specifying the
number of digits after the decimal point.
... defaults to as many digits as necessary to specify the
number.
...And 5 more matches
Number.prototype.toFixed() - JavaScript
the tofixed() method formats a
number using fixed-point notation.
... syntax numobj.tofixed([digits]) parameters digits optional the
number of digits to appear after the decimal point; this may be a value between 0 and 20, inclusive, and implementations may optionally support a larger range of values.
... return value a string representing the given
number using fixed-point notation.
...And 5 more matches
setValueNumber - Archive of obsolete content
summary sets the value of a key, when that value is a
number.
... method of winreg object syntax int setvalue
number ( string subkey, string valname,
number value ); parameters the method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
... value a
number representing the new string value.
...And 4 more matches
Number.NEGATIVE_INFINITY - JavaScript
the
number.negative_infinity property represents the negative infinity value.
... property attributes of
number.negative_infinity writable no enumerable no configurable no description the value of
number.negative_infinity is the same as the negative value of the global object's infinity property.
... you might use the
number.negative_infinity property to indicate an error condition that returns a finite
number in case of success.
...And 4 more matches
Number.parseFloat() - JavaScript
the
number.parsefloat() method parses an argument and returns a floating point
number.
... if a
number cannot be parsed from the argument, it returns nan.
... syntax
number.parsefloat(string) parameters string the value to parse.
...And 4 more matches
Number.prototype.toString() - JavaScript
the tostring() method returns a string representing the specified
number object.
... return value a string representing the specified
number object.
... description the
number object overrides the tostring() method of the object object.
...And 4 more matches
JS_NewNumberValue
use js_
numbervalue instead convert a c floating-point
number of type jsdouble to a jsval.
... syntax jsbool js_new
numbervalue(jscontext *cx, jsdouble d, jsval *rval); name type description cx jscontext * the context in which to create the new
number.
...on success, *rval receives a javascript
number with the value d.
...And 3 more matches
SVGAnimatedNumberList - Web APIs
svg animated
number list interface the svganimated
number interface is used for attributes which take a list of
numbers and which can be animated.
... interface overview also implement none methods none properties readonly svg
numberlist baseval readonly svg
numberlist animval normative document svg 1.1 (2nd edition) properties svganimated
numberlist.baseval read only is a svg
numberlist that represents the base value of the given attribute before applying any animations.
... svganimated
numberlist.animval read only is a read only svg
numberlist that represents the current animated value of the given attribute.
...And 3 more matches
SVGNumber - Web APIs
the svg
number interface corresponds to the <
number> basic data type.
... an svg
number object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... properties svg
number.value a float representing the
number.
...And 3 more matches
Intl.NumberFormat.prototype.format() - JavaScript
the intl.
numberformat.prototype.format() method formats a
number according to the locale and formatting options of this
numberformat object.
... syntax
numberformat.format(
number) parameters
number a
number or bigint to format.
... description the format getter function formats a
number into a string according to the locale and formatting options of this
numberformat object.
...And 3 more matches
Intl.NumberFormat.supportedLocalesOf() - JavaScript
the intl.
numberformat.supportedlocalesof() method returns an array containing those of the provided locales that are supported in
number formatting without having to fall back to the runtime's default locale.
... syntax intl.
numberformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... return value an array of strings representing a subset of the given locale tags that are supported in
number formatting without having to fall back to the runtime's default locale.
...And 3 more matches
Number.MIN_SAFE_INTEGER - JavaScript
the
number.min_safe_integer constant represents the minimum safe integer in javascript (-(253 - 1)).
... property attributes of
number.min_safe_integer writable no enumerable no configurable no description the min_safe_integer constant has a value of -9007199254740991 (-9,007,199,254,740,991 or about -9 quadrillion).
... the reasoning behind that
number is that javascript uses double-precision floating-point format
numbers as specified in ieee 754 and can only safely represent
numbers between -(253 - 1) and 253 - 1.
...And 3 more matches
Number.isFinite() - JavaScript
the
number.isfinite() method determines whether the passed value is a finite
number.
... syntax
number.isfinite(value) parameters value the value to be tested for finiteness.
... return value a boolean indicating whether or not the given value is a finite
number.
...And 3 more matches
Number.isSafeInteger() - JavaScript
the
number.issafeinteger() method determines whether the provided value is a
number that is a safe integer.
... a safe integer is an integer that can be exactly represented as an ieee-754 double precision
number, and whose ieee-754 representation cannot be the result of rounding any other integer to fit the ieee-754 representation.
...see what every programmer needs to know about floating point arithmetic for more information on floating point representations of
numbers.
...And 3 more matches
Number.prototype.toPrecision() - JavaScript
the toprecision() method returns a string representing the
number object to the specified precision.
... syntax numobj.toprecision([precision]) parameters precision optional an integer specifying the
number of significant digits.
... return value a string representing a
number object in fixed-point or exponential notation rounded to precision significant digits.
...And 3 more matches
Random Number Generator - MDN Web Docs Glossary: Definitions of Web-related terms
a prng (pseudorandom
number generator) is an algorithm that outputs
numbers in a complex, seemingly unpredictable pattern.
... truly random
numbers (say, from a radioactive source) are utterly unpredictable, whereas all algorithms are predictable, and a prng returns the same
numbers when passed the same starting parameters or seed.
...these include: that it's computationally unfeasible for an attacker (without knowledge of the seed) to predict its output that if an attacker can work out its current state, this should not enable the attacker to work out previously emitted
numbers.
...And 2 more matches
JS::ToNumber
syntax bool js::to
number(jscontext *cx, js::handlevalue v, double *out); name type description cx jscontext * the context in which to perform the conversion.
... description js::to
number converts a javascript value to a
number.
... it implements the to
number operator described in ecma 262-3 §9.3.
...And 2 more matches
JS_NumberValue
this article covers features introduced in spidermonkey 17 convert a c floating-point
number of type double to a js::value.
... replacement to js_new
numbervalue, js_newdoublevalue, js_newdouble.
... syntax // added in spidermonkey 42 js::value js_
numbervalue(double d); // obsolete since spidermonkey 42 jsval js_
numbervalue(double d); name type description d double the numeric value to convert.
...And 2 more matches
BasicCardResponse.cardNumber - Web APIs
the card
number property of the basiccardresponse dictionary contains the
number of the card used to make the payment.
... syntax "card
number" : "
number" value a domstring representing the credit card
number.
...this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like this: { "card
number' : '9999999999999999", "cardholdername' : 'mr.
...And 2 more matches
XPathResult.numberValue - Web APIs
the read-only
numbervalue property of the xpathresult interface returns the numeric value of a result with xpathresult.resulttype being
number_type.
... syntax var value = result.
numbervalue; return value the return value is the numeric value of the xpathresult returned by document.evaluate().
... exceptions type_err in case xpathresult.resulttype is not
number_type, an xpathexception of type type_err is thrown.
...And 2 more matches
Intl.NumberFormat.prototype.resolvedOptions() - JavaScript
the intl.
numberformat.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and
number formatting options computed during initialization of this
numberformat object.
... syntax
numberformat.resolvedoptions() return value a new object with properties reflecting the locale and
number formatting options computed during the initialization of the given
numberformat object.
...
numberingsystem the value provided for this properties in the options argument, if present, or the value requested using the unicode extension key "nu" or filled in as a default.
...And 2 more matches
Number.isInteger() - JavaScript
the
number.isinteger() method determines whether the passed value is an integer.
... syntax
number.isinteger(value) parameters value the value to be tested for being an integer.
...the method will also return true for floating point
numbers that can be represented as integer.
...And 2 more matches
Number.parseInt() - JavaScript
the
number.parseint() method parses a string argument and returns an integer of the specified radix or base.
... syntax
number.parseint(string,[ radix]) parameters string the value to parse.
... if the radix is smaller than 2 or bigger than 36, and the first non-whitespace character cannot be converted to a
number, nan is returned.
...And 2 more matches
number - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the
number function converts an object to a
number and returns the
number.
... syntax
number( [object] ) arguments object(optional) the object to be converted to a
number.
... returns the resulting
number after converting the object.
...And 2 more matches
Number.toInteger() - Archive of obsolete content
the
number.tointeger() method used to evaluate the passed value and convert it to an integer, but its implementation has been removed.
... syntax
number.tointeger(
number) parameters
number the value to be converted to an integer.
... examples using tointeger
number.tointeger(0.1); // 0
number.tointeger(1); // 1
number.tointeger(math.pi); // 3
number.tointeger(null); // 0 specifications not part of any standard.
...
number.tointeger() was part of the draft ecmascript 6 specification, but has been removed on august 23, 2013 in draft rev 17.
PLHashNumber
syntax #include <plhash.h> typedef pruint32 plhash
number; #define pl_hash_bits 32 description plhash
number is an unsigned 32-bit integer.
... plhash
number is the data type of the return value of a hash function.
... a hash function maps a key to a hash
number, which is then used to compute the index of the bucket.
... the macro pl_hash_bits is the size (in bits) of the plhash
number data type and has the value of 32.
JSVAL_IS_NUMBER
determine if a given jsval is a javascript
number.
... syntax jsval_is_
number(v) description jsval_is_
number(v) is true if v is a javascript
number.
... to convert a numeric jsval to a c floating-point
number, use js_valueto
number.
...if (jsval_is_
number(myitem)) { ...
AudioNode.numberOfInputs - Web APIs
the
numberofinputs property of the audionode interface returns the
number of inputs feeding the node.
... source nodes are defined as nodes having a
numberofinputs property with a value of 0.
... syntax var numinputs = audionode.
numberofinputs; value an integer ≥ 0.
... example const audioctx = new audiocontext(); const oscillator = audioctx.createoscillator(); const gainnode = audioctx.creategain(); oscillator.connect(gainnode).connect(audioctx.destination); console.log(oscillator.
numberofinputs); // 0 console.log(gainnode.
numberofinputs); // 1 console.log(audioctx.destination.
numberofinputs); // 1 specifications specification status comment web audio apithe definition of '
numberofinputs' in that specification.
Number.EPSILON - JavaScript
the
number.epsilon property represents the difference between 1 and the smallest floating point
number greater than 1.
... you do not have to create a
number object to access this static property (use
number.epsilon).
... property attributes of
number.epsilon writable no enumerable no configurable no description the epsilon property has a value of approximately 2.2204460492503130808472633361816e-16, or 2-52.
... polyfill if (
number.epsilon === undefined) {
number.epsilon = math.pow(2, -52); } examples testing equality x = 0.2; y = 0.3; z = 0.1; equal = (math.abs(x - y + z) <
number.epsilon); specifications specification ecmascript (ecma-262)the definition of '
number.epsilon' in that specification.
Number.MAX_VALUE - JavaScript
the
number.max_value property represents the maximum numeric value representable in javascript.
... property attributes of
number.max_value writable no enumerable no configurable no description the max_value property has a value of approximately 1.79e+308, or 21024.
... because max_value is a static property of
number, you always use it as
number.max_value, rather than as a property of a
number object you created.
... if (num1 * num2 <=
number.max_value) { func1(); } else { func2(); } specifications specification ecmascript (ecma-262)the definition of '
number.max_value' in that specification.
Number.MIN_VALUE - JavaScript
the
number.min_value property represents the smallest positive numeric value representable in javascript.
... property attributes of
number.min_value writable no enumerable no configurable no description the min_value property is the
number closest to 0, not the most negative
number, that javascript can represent.
... because min_value is a static property of
number, you always use it as
number.min_value, rather than as a property of a
number object you created.
... if (num1 / num2 >=
number.min_value) { func1(); } else { func2(); } specifications specification ecmascript (ecma-262)the definition of '
number.min_value' in that specification.
Number.NaN - JavaScript
the
number.nan property represents not-a-
number.
... you do not have to create a
number object to access this static property (use
number.nan).
... property attributes of
number.nan writable no enumerable no configurable no examples checking whether values are numeric function sanitise(x) { if (isnan(x)) { return
number.nan; } return x; } testing against nan see testing against nan on the nan page.
... specifications specification ecmascript (ecma-262)the definition of '
number.nan' in that specification.
format-number - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the format-
number function evaluates a
number and returns a string representing the
number in a given format.
... syntax format-
number(
number ,pattern [,decimal-format] ) arguments
number the
number to be formatted pattern a string in the format of the jdk 1.1 decimalformat class.
...here is the java se 6 decimalformat.) decimal-format (optional) the name of an xsl:decimal-format element that defines the
number format to be used.
... returns a string representing the
number in the new format.
getValueNumber - Archive of obsolete content
getvalue
number gets the value of a key when that value is a
number.
... method of winreg object syntax
number getvalue
number ( string subkey, string valname); parameters the getvaluestring method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
... returns
number value of the specified key or null if there's an error, the value is not found, or the value is not a string.
Floating Point Number to String Conversion
nspr provides functions that convert double-precision floating point
numbers to and from their character string representations.
...clinger, "how to read floating point
numbers accurately," proc.
...white, "how to print floating-point
numbers accurately," proc.
PR_GetProtoByNumber
looks up a protocol entry based on protocol's
number.
... syntax #include <prnetdb.h> prstatus pr_getprotoby
number( print32 protocol
number, char* buffer, print32 bufsize, prprotoent* result); parameters the function has the following parameters: protocol
number the
number assigned to the protocol.
... bufsize
number of bytes in the buffer parameter.
JS::NumberValue
syntax js::value js::
numbervalue(float f) js::value js::
numbervalue(double dbl) js::value js::
numbervalue(int8_t i) js::value js::
numbervalue(uint8_t i) js::value js::
numbervalue(int16_t i) js::value js::
numbervalue(uint16_t i) js::value js::
numbervalue(int32_t i) js::value js::
numbervalue(uint32_t i) name type description f or dbl or i any c integer or floating-point value to convert.
... description js::
numbervalue converts a c integer or floating-point value to js::value, the type of javascript values.
... see also mxr id search for js::
numbervalue js::value js::int32value js::float32value js::doublevalue js_
numbervalue ...
AudioBuffer.numberOfChannels - Web APIs
the
numberofchannels property of the audiobuffer interface returns an integer representing the
number of discrete audio channels described by the pcm data stored in the buffer.
... syntax var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); myarraybuffer.
numberofchannels; value an integer.
... 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.
numberofchannels); } specification specification status comment web audio apithe definition of '
numberofchannels' in that specification.
AudioNode.numberOfOutputs - Web APIs
the
numberofoutputs property of the audionode interface returns the
number of outputs coming out of the node.
... syntax var numoutputs = audionode.
numberofoutputs; value an integer ≥ 0.
... example const audioctx = new audiocontext(); const oscillator = audioctx.createoscillator(); const gainnode = audioctx.creategain(); oscillator.connect(gainnode).connect(audioctx.destination); console.log(oscillator.
numberofoutputs); // 1 console.log(gainnode.
numberofoutputs); // 1 console.log(audioctx.destination.
numberofoutputs); // 0 specifications specification status comment web audio apithe definition of '
numberofoutputs' in that specification.
SVGAnimatedNumber - Web APIs
svg animated
number interface the svganimated
number interface is used for attributes of basic type <
number> which can be animated.
... methods the svganimated
number interface do not provide any specific methods.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimated
numberchrome full support yesedge full support ≤18firefox full support yesie ?
SecurityPolicyViolationEvent.columnNumber - Web APIs
the column
number read-only property of the securitypolicyviolationevent interface is the column
number in the document or worker at which the violation occurred.
... syntax let colnum = violationeventinstance.column
number; value a
number representing the column
number where the violation occurred.
... example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.column
number); }); specifications specification status comment content security policy level 3the definition of 'column
number' in that specification.
SecurityPolicyViolationEvent.lineNumber - Web APIs
the line
number read-only property of the securitypolicyviolationevent interface is the line
number in the document or worker at which the violation occurred.
... syntax let line
number = violationeventinstance.line
number; value a
number representing the line
number at which the violation occurred.
... example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.line
number); }); specifications specification status comment content security policy level 3the definition of 'line
number' in that specification.
Number() constructor - JavaScript
the
number() constructor creates a
number object.
... syntax new
number(value) parameters value the numeric value of the object being created.
... examples creating
number objects const a = new
number('123'); // a === 123 is false const b =
number('123'); // b === 123 is true a instanceof
number; // is true b instanceof
number; // is false specifications specification ecmascript (ecma-262)the definition of '
number constructor' in that specification.
Number.prototype.valueOf() - JavaScript
the valueof() method returns the wrapped primitive value of a
number object.
... syntax numobj.valueof() return value a
number representing the primitive value of the specified
number object.
... examples using valueof let numobj = new
number(10) console.log(typeof numobj) // object let num = numobj.valueof() console.log(num) // 10 console.log(typeof num) //
number specifications specification ecmascript (ecma-262)the definition of '
number.prototype.valueof' in that specification.
Number - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript,
number is a numeric data type in the double-precision 64-bit floating point format (ieee 754).
... learn more general knowledge numeric types on wikipedia technical reference the javascript data structure:
number the javascript global object
number ...
Random Number Generator
this chapter describes the nspr random
number generator.
... random
number generator function pr_getrandomnoise - produces a random value for use as a seed value for another random
number generator.
USBDevice.serialNumber - Web APIs
the serial
number read only property of the usbdevice interface is the manufacturer-defined serial
number for the specific usb device.
... syntax var serial
number = usbdevice.serial
number value the serial
number for the specified usb device specifications specification status comment webusbthe definition of 'serial
number' in that specification.
::-moz-list-number - CSS: Cascading Style Sheets
the ::-moz-list-
number css pseudo-element is a mozilla extension that represents the marker (typically a
number) of a list item (<li>) in an ordered list (<ol>).
... syntax li::-moz-list-
number examples html <ol> <li>first item</li> <li>second item</li> <li>third item</li> </ol> css li::-moz-list-
number { font-style: italic; font-weight: bold; } result screenshotlive sample specifications not part of any standard.
Error.prototype.columnNumber - JavaScript
the column
number property contains the column
number in the line of the file that raised this error.
... examples using column
number var e = new error('could not parse input'); throw e; console.log(e.column
number) // 0 specifications not part of any standard.
Error.prototype.lineNumber - JavaScript
the line
number property contains the line
number in the file that raised this error.
... examples using line
number var e = new error('could not parse input'); throw e; console.log(e.line
number) // 2 alternative example using error event window.addeventlistener('error', function(e) { console.log(e.line
number); // 5 }); var e = new error('could not parse input'); throw e; this is not a standard feature and lacks widespread support.
Number.prototype.toSource() - JavaScript
syntax numobj.tosource()
number.tosource() return value a string representing the source code of the object.
... examples native function for the built-in
number object, tosource() returns the following string indicating that the source code is not available: function
number() { [native code] } for instances of
number, tosource() returns a string representing the source code.
valueNumber - Archive of obsolete content
« xul reference value
number type:
number in contrast to the value property which holds a string representation, the value
number property is a
number containing the current value of the
number box.
Index - Web APIs
found 5328 pages: # page tags and summary 1 web apis api, dom, landing, reference, web when writing code for the web, there are a large
number of web apis available.
... 36 addresserrors.phone api, address, addresserrors, payment request, payment request api, phone, phone
number, property, read-only, reference, telephone
number, téléphone, validation, payment an object based on addresserrors includes a phone property when the address's phone property couldn't be validated.
...this generally equates to the
number of data values you will have to play with for the visualization.
...And 210 more matches
source-editor.jsm
method overview initialization and destruction void destroy(); void init(element aelement, object aconfig, function acallback); search operations
number find(string astring, [optional] object options);
number findnext(boolean awrap);
number findprevious(boolean awrap); event management void addeventlistener(string aeventtype, function acallback); void removeeventlistener(string aeventtype, function acallback); undo stack operations boolean canredo(); boolean canundo(); ...
... void endcompoundchange(); boolean redo(); void resetundo(); void startcompoundchange(); boolean undo(); display management operations void focus();
number gettopindex(); boolean hasfocus(); void settopindex(
number atopindex); content management operations
number getcharcount(); string getindentationstring(); string getlinedelimiter();
number getlinecount();
number getlineend(
number alineindex, boolean aincludedelimiter);
number getlinestart(
number alineindex); string getmode(); string gettext([optional]
number astart, [optional]
number aend); string getselectedtext(); void setmode(string amode); void set...
...text(string atext, [optional]
number astart, [optional]
number aend); selection operations void dropselection();
number getcaretoffset(); object getcaretposition(); object getselection(); void setcaretoffset(
number aoffset); void setcaretposition(
number aline, [optional]
number acolumn, [optional]
number aalign); void setselection(
number astart,
number aend); breakpoint management void addbreakpoint(
number alineindex, [optional] string acondition); array getbreakpoints(); boolean removebreakpoint(
number alineindex); properties attribute type description dirty boolean set this value to false whenever you save the text; the editor will update it to true...
...And 59 more matches
Index
19 double_to_jsval jsapi reference, obsolete, spidermonkey double_to_jsval is the inverse of js::to
number.
...in this case, the application can still convert i to a jsval using js_new
numbervalue.
... 39 js::doublenanvalue jsapi reference, reference, référence(2), spidermonkey js::doublenanvalue returns a value of type js::value that represents an ieee floating-point quiet not-a-
number (nan).
...And 42 more matches
<input type="tel"> - HTML: Hypertext Markup Language
<input> elements of type tel are used to let the user enter and edit a telephone
number.
... unlike <input type="email"> and <input type="url"> , the input value is not automatically validated to a particular format before the form can be submitted, because formats for telephone
numbers vary so much around the world.
... despite the fact that inputs of type tel are functionally identical to standard text inputs, they do serve useful purposes; the most quickly apparent of these is that mobile browsers — especially on mobile phones — may opt to present a custom keypad optimized for entering phone
numbers.
...And 39 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
the <input> element is one of the most powerful and complex in all of html due to the sheer
number of combinations of input types and attributes.
... <input type="month" name="month"/> html5
number a control for entering a
number.
... <input type="
number" name="
number"/> html5 password a single-line text field whose value is obscured.
...And 37 more matches
StringView - Archive of obsolete content
to create a c-like interface for strings (i.e., an array of character codes — an arraybufferview in javascript) based upon the javascript arraybuffer interface to create a highly extensible library that anyone can extend by adding methods to the object stringview.prototype to create a collection of methods for such string-like objects (since now: stringviews) which work strictly on arrays of
numbers rather than on creating new immutable javascript strings to work with unicode encodings other than javascript's default utf-16 domstrings introduction as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times when it would be helpful for javascript code t...
... the code stringview.js "use strict"; /*\ |*| |*| ::
number.isinteger() polyfill :: |*| |*| /docs/web/javascript/reference/global_objects/
number/isinteger |*| \*/ if (!
number.isinteger) {
number.isinteger = function isinteger (nval) { return typeof nval === "
number" && isfinite(nval) && nval > -9007199254740992 && nval < 9007199254740992 && math.floor(nval) === nval; }; } /*\ |*| |*| stringview mdndeveloper network |*| |*| revision #12, march...
...nstartidx + nlength : ninptlen); } break typeswitch; default: /* the input argument is a
number, a boolean or a function: a new typedarray will be created.
...And 35 more matches
Index - Archive of obsolete content
when the mozilla developers make changes like this, they increase the skin version
number.
... this is the
number that is defined in contents.rdf.
...firefox 3 introduces new api that allows any
number of listeners to observe downloads.
...And 31 more matches
A first splash into JavaScript - Learn web development
here you'll build up a simple "guess the
number" game, step by step.
... example — guess the
number game in this article we'll show you how to build up the simple game you can see below: top hidden code <!doctype html> <html> <head> <meta charset="utf-8"> <title>
number guessing game</title> <style> html { font-family: sans-serif; } body { width: 50%; max-width: 800px; min-width: 480px; margin: ...
...0 auto; } .lastresult { color: white; padding: 3px; } </style> </head> <body> <h1>
number guessing game</h1> <p>we have selected a random
number between 1 and 100.
...And 30 more matches
Index
(note that it's important to look at the
number 11, as there are other pkcs standards with different
numbers that define quite different topics.) a software or hardware module conforming to the pkcs#11 standard implements an interface of c calls, which allow querying the characteristics and offered services of the module.
... a core element of nss is freebl, a base library providing hash functions, big
number calculations, and cryptographic algorithms.
...examples for the database files are key3.db and cert8.db, where the
numbers are file version
numbers.
...And 26 more matches
textbox - Archive of obsolete content
nly, 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, value
number, wraparound methods decrease, increase, reset, select, setselectionrange style classes plain examples <vbox> <label control="your-name" value="enter your name:"/> <textbox id="your-name" value="john"/> </vbox> attributes cols type: integer for multiline textboxes, the
number of columns to display.
... decimalplaces type: integer the
number of decimal places to display.
...the value infinity may be used if you want no limit on the
number of decimal places.
...And 22 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
8 ascii glossary, infrastructure ascii (american standard code for information interchange) is one of the most popular coding method used by computers for converting letters,
numbers, punctuation and control codes into digital form.
... 18 alpha (alpha channel) alpha, alpha channel, drawing, glossary, graphics, translucency, translucent, transparency, transparent, webgl, webxr, channel, color, pixel colors are represented in digital form as a collection of
numbers, each representing the strength or intensity level of a given component of the color.
... 71 character codingscripting, glossary, strings a character is either a symbol (letters,
numbers, punctuation) or non-printing "control" (e.g., carriage return or soft hyphen).
...And 21 more matches
PerfMeasurement.jsm
variable type description cpu_cycles uint64 the
number of cpu cycles elapsed.
... instructions uint64 the
number of instructions executed.
... cache_references uint64 the
number of memory accesses that occurred.
...And 21 more matches
JavaScript Daemons Management - Archive of obsolete content
"start" : "syncstart"](true); }; daemon.prototype.move = function (bsync, ncycles, bdirection) { /* warning: this method optionally requires the daemon.prototype.syncstart() method */ if (arguments.length > 1 && !isnan(ncycles)) { this.reversals =
number(ncycles); } this[bsync ?
..."start" : "syncstart"](!this.backw); }; /* settings tools */ daemon.prototype.makeloop = function () { this.reversals = infinity; }; daemon.prototype.unmakeloop = function () { this.reversals = 0; }; daemon.prototype.setrate = function (vto) { var nrate =
number(vto); if (!isfinite(nrate) || nrate < 1) { return; } this.rate = nrate; this.synchronize(); }; daemon.prototype.forceposition = function (vto) { if (isfinite(vto)) { this.index = math.round(math.abs(vto)); } }; daemon.prototype.getduration = function () { return this.rate * this.length; }; daemon.prototype.getdirection = function () { return this.isatend() !
...this.index : this.length - this.index) * this.rate) / (this.length * this.rate)); this.start(this.isatend() !== this.backw); } }; daemon.prototype.spread = function (ntime) { if (!isfinite(this.length)) { throw new typeerror("daemon.prototype.spread - the length is not a finite
number.
...And 19 more matches
Index
this document attempts to help them do so, first by explaining the underlying concepts, and second by describing a
number of common javascript patterns that cause leaks.
... 126 core xpcom functions functions, landing, mozilla, xpcom xpcom provides a
number of global functions which are used to initialize and shut down the xpcom library, as well as to allocate memory, get access to services, and to instantiate interfaces.
... 148 ns_if_addref xpcom, xpcom_macros macro 149 ns_if_release xpcom, xpcom_macros macro 150 ns_release xpcom, xpcom_macros macro 151 ns_warning xpcom, xpcom_macros macro 152 standard xpcom components components, landing, mozilla, needscontent, xpcom there are a
number of components provided in the standard implementation of xpcom; these are as follows.
...And 19 more matches
OS.File for the main thread
this example also shows the resolve value of open (an instance of os.file, this is a file, so you can do any of the methods on it found here), write (a
number indicating bytes written), and close (undefined, meaning there is no resolve value).
...ring path, [optional] in object options); promise<void> remove(in string path, [optional] in object options); promise<void> removeemptydir(in string path, [optional] in object options); promise<void> removedir(in string path, [optional] in object options); promise<void> setcurrentdirectory(in string path); promise<void> setdates(in string path, in date|
number accessdate, in date|
number modificationdate); promise<void> setpermissions(in string path, in object options ); promise<file.info> stat(in string path, [optional] in object options); promise<void> unixsymlink(in string targetpath, in string createpath); promise<void> writeatomic(in string path, in arrayview data, in object options); methods os.file.ope...
... note that the operating system limits the
number of files that can be opened simultaneously by one process, so do not forget to close that file once you have finished it, to ensure that you are not blocking the rest of the process.
...And 18 more matches
Shell global objects
timesaccessed returns a
number that indicates how many times this variable is accessed perfmeasurement see perfmeasurement.jsm.
... shell only functions functions always available version([
number]) get or force a script compilation version
number.
...options is an optional object that may have these properties: isrunonce use the isrunonce compiler option (default: false) noscriptrval use the no-script-rval compiler option (default: false) filename filename for error messages and debug info line
number starting line
number for error messages and debug info column
number starting column
number for error messages and debug info global global in which to execute the code newcontext if true, create and use a new cx (default: false) catchtermination if true, catch termination (failure without an exception value, as for slow scripts or out-of-memory) and return 'terminated' element...
...And 18 more matches
Content type - SVG: Scalable Vector Graphics
svg makes use of a
number of data types.
...when used in the value of a property in a stylesheet, an <angle> is defined as follows: angle ::=
number (~"deg" | ~"grad" | ~"rad")?
... when angles are used in an svg attribute, <angle> is instead defined as follows: angle ::=
number ("deg" | "grad" | "rad")?
...And 18 more matches
JXON - Archive of obsolete content
conversion snippets now imagine you have this sample xml document: example.xml <?xml version="1.0"?> <!doctype catalog system "catalog.dtd"> <catalog> <product description="cardigan sweater"> <catalog_item gender="men's"> <item_
number>qwz5671</item_
number> <price>39.95</price> <size description="medium"> <color_swatch image="red_cardigan.jpg">red</color_swatch> <color_swatch image="burgundy_cardigan.jpg">burgundy</color_swatch> </size> <size description="large"> <color_swatch image="red_cardigan.jpg">red</color_swatch> <color_swatch image="burgundy_cardigan.jpg">burgundy</color_s...
...watch> </size> </catalog_item> <catalog_item gender="women's"> <item_
number>rrx9856</item_
number> <discount_until>dec 25, 1995</discount_until> <price>42.50</price> <size description="medium"> <color_swatch image="black_cardigan.jpg">black</color_swatch> </size> </catalog_item> </product> <script type="text/javascript"><![cdata[function matchwo(a,b) { if (a < b && a < 0) { return 1; } else { return 0; } }]]></script> </catalog> first, create a dom tree like the previous example as described in the how to create a dom tree article.
... with this algorithm our example becomes: { "catalog": { "product": { "catalog_item": [{ "item_
number": { "keyvalue": "qwz5671" }, "price": { "keyvalue": 39.95 }, "size": [{ "color_swatch": [{ "keyvalue": "red", "keyattributes": { "image": "red_cardigan.jpg" } }, { "keyvalue": "burgundy", "keyattributes": { "image": "burgundy_cardigan.jpg" } ...
...And 17 more matches
Index - Learn web development
4 assessment: accessibility troubleshooting accessibility, assessment, beginner, css, codingscripting, html, javascript, learn, wai-aria in the assessment for this module, we present to you a simple site with a
number of accessibility issues that you need to diagnose and fix.
...a set
number of times per second), discusses what they are useful for, and considers their inherent issues.
... 52 general asynchronous programming concepts javascript, learn, promises, threads, asynchronous, blocking in this article, we'll run through a
number of important concepts relating to asynchronous programming, and how this looks in web browsers and javascript.
...And 17 more matches
Arrays - Learn web development
paste the following code into the console: let shopping = ['bread', 'milk', 'cheese', 'hummus', 'noodles']; shopping; in the above example, each element is a string, but in an array we can store various data types — strings,
numbers, objects, and even other arrays.
... we can also mix data types in a single array — we do not have to limit ourselves to storing only
numbers in one array, and in another only strings.
...so for example: let sequence = [1, 1, 2, 3, 5, 8, 13]; for (let i = 0; i < sequence.length; i++) { console.log(sequence[i]); } you'll learn about loops properly later on (in our looping code article), but briefly, this code is saying: start looping at item
number 0 in the array.
...And 17 more matches
Background Tasks API - Web APIs
</p> <div class="container"> <div class="label">decoding quantum filament tachyon emissions...</div> <progress id="progress" value="0"></progress> <div class="button" id="startbutton"> start </div> <div class="label counter"> task <span id="currenttask
number">0</span> of <span id="totaltaskcount">0</span> </div> </div> <div class="logbox"> <div class="logheader"> log </div> <div id="log"> </div> </div> the progress box uses a <progress> element to show the progress, along with a label with sections that are changed to present numeric information about the progress.
... variable declarations let tasklist = []; let totaltaskcount = 0; let currenttask
number = 0; let taskhandle = null; these variables are used to manage the list of tasks that are waiting to be performed, as well as status information about the task queue and its execution: tasklist is an array of objects, each representing one task waiting to be run.
... totaltaskcount is a counter of the
number of tasks that have been added to the queue; it will only go up, never down.
...And 17 more matches
What went wrong? Troubleshooting JavaScript - Learn web development
previous overview: first steps next when you built up the "guess the
number" game in the previous article, you may have found that it didn't work.
... an erroneous example to get started, let's return to our
number guessing game — except this time we'll be exploring a version that has some deliberate errors introduced.
... go to github and make yourself a local copy of
number-game-errors.html (see it running live here).
...And 16 more matches
Animated PNG graphics
subsequent frames are encoded in 'fdat' chunks, which have the same structure as 'idat' chunks, except preceded by a sequence
number.
... chunk sequence
numbers the 'fctl' and 'fdat' chunks have a 4 byte sequence
number.
...the purpose of this
number is to detect (and optionally correct) sequence errors in an animated png, since the png specification does not impose ordering restrictions on ancillary chunks.
...And 16 more matches
WebIDL bindings
for example, this webidl: interface myinterface { void dosomething(long
number); double dosomething(myinterface?
... otherinstance); [throws] myinterface dosomethingelse(optional long maybe
number); [throws] void dosomethingelse(myinterface otherinstance); void dotheother(any something); void doyetanotherthing(optional boolean actuallydoit = false); static void staticoperation(any arg); }; will require these method declarations: class myclass { void dosomething(int32_t a
number); double dosomething(myclass* aotherinstance); already_addrefed<myinterface> dosomethingelse(optional<int32_t> amaybe
number, errorresult& rv); void dosomethingelse(myclass& aotherinstance, errorresult& rv); void dotheother(jscontext* cx, js::value asomething); void doyetanotherthing(bool aactuallydoit); static void staticoperation(const globalobject& a...
... for example, this idl: [constructor, constructor(unsigned long some
number)] interface myinterface { }; will require the following declarations in myclass: class myclass { // various nsisupports stuff or whatnot static already_addrefed<myclass> constructor(const globalobject& aglobal, errorresult& rv); static already_addrefed<myclass> constructor(const globalobject& aglobal, uin...
...And 16 more matches
Date and time formats used in HTML - HTML: Hypertext Markup Language
year
numbers in order to simplify the basic format used for date strings in html, the specification requires that all years be given using the modern (or proleptic) gregorian calendar.
... the adjustments to the algorithm (taking a leap year when the year can be divided by 400, and skipping leap years when the year is divisible by 100) help to bring the average even closer to the correct
number of days (365.2425 days).
... months of the year there are 12 months in the year,
numbered 1 through 12.
...And 16 more matches
The "codecs" parameter in common media types - Web media technologies
all of these file types support a variety of codecs, and those codecs may have any
number of profiles, levels, and other configuration factors.
...each component is a fixed
number of characters long; if the value is less than that length, it must be padded with leading zeros.
... av1 codec parameter string components component details p the one-digit profile
number: av1 profile
numbers profile
number description 0 "main" profile; supports yuv 4:2:0 or monochrome bitstreams with bit depth of 8 or 10 bits per component.
...And 16 more matches
Reading from Files - Archive of obsolete content
while there is only one method to create an input stream, it provides a
number of options to control exactly how reading is performed.
...a binary stream would be used to read bytes or
numbers encoded within the file.
...this method actually takes a
number of additional arguments, however they are optional so they do not need to be specified if they aren't needed.
...And 15 more matches
sslfnc.html
it uses the ssl version
number 3.1, appearing to be a "minor" revision of ssl 3.0.
...the
number of values in the table is contained in an external 16-bit integer named ssl_numimplementedciphers.
... the cipher suite
numbers for the ssl_rsa_fips_with_3des_ede_cbc_sha and ssl_rsa_fips_with_des_cbc_sha cipher suites have been changed so that they are no longer "experimental" values.
...And 15 more matches
IAccessibleTable
columnextentat() returns the
number of columns occupied by the accessible object at the specified row and column in the table.
...lists, trees, and tables can have a large
number of children and thus it's possible that the child objects for those controls would only be created as needed.
...ncolumns() returns the total
number of columns in table.
...And 15 more matches
nsISmsRequestManager
notifycreatemessagelist() void notifycreatemessagelist( in long arequestid, in long alistid, in nsidommozsmsmessage amessage ); parameters arequestid a
number representing the id of the request.
... alistid a
number representing the id of the list.
... notifygetsmsfailed() void notifygetsmsfailed( in long arequestid, in long aerror ); parameters arequestid a
number representing the id of the request.
...And 15 more matches
Using IndexedDB - Web APIs
if the database does exist but you are specifying an upgraded version
number, an onupgradeneeded event is triggered straight away, allowing you to provide an updated schema in its handler.
... important: the version
number is an unsigned long long
number, which means that it can be a very big integer.
...so for example, don't use 2.4 as a version
number: var request = indexeddb.open("mytestdatabase", 2.4); // don't do this, as the version will be rounded to 2 generating handlers the first thing you'll want to do with almost all of the requests you generate is to add success and error handlers: request.onerror = function(event) { // do something with request.errorcode!
...And 15 more matches
JavaScript data types and data structures - JavaScript
variables in javascript are not directly associated with any particular value type, and any variable can be assigned (and re-assigned) values of all types: let foo = 42; // foo is now a
number foo = 'bar'; // foo is now a string foo = true; // foo is now a boolean data and structure types the latest ecmascript standard defines nine types: six data types that are primitives, checked by typeof operator: undefined : typeof instance === "undefined" boolean : typeof instance === "boolean"
number : typeof instance === "
number" string : typeof instance === "stri...
...
number type ecmascript has two built-in numeric types:
number and bigint (see below).
... the
number type is a double-precision 64-bit binary format ieee 754 value (
numbers between -(253 − 1) and 253 − 1).
...And 15 more matches
Functions - JavaScript
for example, the following code defines a simple function named square: function square(
number) { return
number *
number; } the function square takes one parameter, called
number.
... the function consists of one statement that says to return the parameter of the function (that is,
number) multiplied by itself.
... the statement return specifies the value returned by the function: return
number *
number; primitive parameters (such as a
number) are passed to functions by value; the value is passed to the function, but if the function changes the value of the parameter, this change is not reflected globally or in the calling function.
...And 15 more matches
SVG documentation index - SVG: Scalable Vector Graphics
3 compatibility sources svg the following sources are used for the compatibility tables on svg elements and attributes: 4 content type needstechnicalreview, svg, types, data types svg makes use of a
number of data types.
...after applying the kernelmatrix of the <feconvolvematrix> element to the input image to yield a
number and applied the divisor attribute, the bias attribute is added to each component.
...you may assign the same class name or names to any
number of elements, however, multiple class names must be separated by whitespace characters.
...And 15 more matches
The HTML5 input types - Learn web development
phone
number field a special field for filling in phone
numbers can be created using tel as the value of the type attribute: <input type="tel" id="tel" name="tel"> when accessed via a touch device with a dynamic keyboard, most devices will display a numeric keypad when type="tel" is encountered, meaning this type is useful whenever a numeric keypad is useful, and doesn't just have to be used for telephone ...
...
numbers.
... the following firefox for android keyboard screenshot provides an example: due to the wide variety of phone
number formats around the world, this type of field does not enforce any constraints on the value entered by a user (this means it may include letters, etc.).
...And 14 more matches
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
void usage(const char *progname) { fprintf(stderr, "\nusage: %s %s %s %s %s %s %s %s %s %s\n\n", progname, " -<g|a|h|e|ds|v> -d <dbdirpath> ", "[-p <dbpwd> | -f <dbpwdfile>] [-z <noisefilename>] [-a <\"\">]", "-s <subject> -r <csr> | ", "-n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serial
number> ] | ", "-n <nickname> -b <headerfilename> | ", "-b <headerfilename> -i <ipfilename> -e <encryptfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -e <encryptfilename> -o <opfilename> \n"); fprintf(stderr, "commands:\n\n"); fprintf(stderr, "%s %s\n --for ...
...generating cert request (for ca also)\n\n", progname, "-g -s <subject> -r <csr>"); fprintf(stderr, "%s %s\n --to input and store cert (for ca also)\n\n", progname, "-a -n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serial
number> ]"); fprintf(stderr, "%s %s\n --to put cert in header\n\n", progname, "-h -n <nickname> -b <headerfilename> [-v <\"\">]"); fprintf(stderr, "%s %s\n --to find public key from cert in header and encrypt\n\n", progname, "-e -b <headerfilename> -i <ipfilename> -e <encryptfilename> "); fprintf(stderr, "%s %s\n --decrypt using corresponding private key \n\n", progname, "-d -b <headerfilename> -e <encryptfilename> -o <opfilename>"); fprintf(stderr, "...
...printf(stderr, "%-30s - input file name\n\n", "-i <ipfilename>"); fprintf(stderr, "%-30s - header file name\n\n", "-b <headerfilename>"); fprintf(stderr, "%-30s - encrypt file name\n\n", "-e <encryptfilename>"); fprintf(stderr, "%-30s - output file name\n\n", "-o <opfilename>"); fprintf(stderr, "%-30s - certificate serial
number\n\n", "-m <serial
number>"); fprintf(stderr, "%-30s - certificate nickname\n\n", "-n <nickname>"); fprintf(stderr, "%-30s - certificate trust\n\n", "-t <trustargs>"); fprintf(stderr, "%-30s - certificate issuer nickname\n\n", "-u <issuernickname>"); fprintf(stderr, "%-30s - certificate signing request \n\n", ...
...And 14 more matches
sample2
vfy= 8, sig = 9 } headertype; /* * print usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s %s %s %s %s %s %s %s %s %s\n\n", progname, " -<g|a|h|e|ds|v> -d <dbdirpath> ", "[-p <dbpwd> | -f <dbpwdfile>] [-z <noisefilename>] [-a <\"\">]", "-s <subject> -r <csr> | ", "-n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serial
number> ] | ", "-n <nickname> -b <headerfilename> | ", "-b <headerfilename> -i <ipfilename> -e <encryptfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -e <encryptfilename> -o <opfilename> \n"); fprintf(stderr, "commands:\n\n"); fprintf(stderr, "%s %s\n --for generating cert request (for ca also)\n\n", progname, "-g -s <subject> -r <...
...csr>"); fprintf(stderr, "%s %s\n --to input and store cert (for ca also)\n\n", progname, "-a -n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serial
number> ]"); fprintf(stderr, "%s %s\n --to put cert in header\n\n", progname, "-h -n <nickname> -b <headerfilename> [-v <\"\">]"); fprintf(stderr, "%s %s\n --to find public key from cert in header and encrypt\n\n", progname, "-e -b <headerfilename> -i <ipfilename> -e <encryptfilename> "); fprintf(stderr, "%s %s\n --decrypt using corresponding private key \n\n", progname, "-d -b <headerfilename> -e <encryptfilename> -o <opfilename>"); fprintf(stderr, "%s %s\n --sign using private key \n\n", progname, "-s -b <headerfilename> -i <infilename> "); fprintf(stderr, "%s %s\n --verify using public key \n\n", progname, "-v -b <...
...f(stderr, "%-30s - noise file name [optional]\n\n", "-z <noisefilename>"); fprintf(stderr, "%-30s - input file name\n\n", "-i <ipfilename>"); fprintf(stderr, "%-30s - header file name\n\n", "-b <headerfilename>"); fprintf(stderr, "%-30s - encrypt file name\n\n", "-e <encryptfilename>"); fprintf(stderr, "%-30s - output file name\n\n", "-o <opfilename>"); fprintf(stderr, "%-30s - certificate serial
number\n\n", "-m <serial
number>"); fprintf(stderr, "%-30s - certificate nickname\n\n", "-n <nickname>"); fprintf(stderr, "%-30s - certificate trust\n\n", "-t <trustargs>"); fprintf(stderr, "%-30s - certificate issuer nickname\n\n", "-u <issuernickname>"); fprintf(stderr, "%-30s - certificate signing request \n\n", "-r <csr>"); fprintf(stderr, "%-30s - generate a self-signed cert [optional]\n\n", "-x"); ...
...And 14 more matches
HTML documentation index - HTML: Hypertext Markup Language
specifying the itemscope attribute for an element creates a new item, which results in a
number of name-value pairs that are associated with the element.
... 35 x-ms-format-detection attribute, html, html:microsoft extensions, non-standard, reference, x-ms-format-detection the x-ms-format-detection attribute determines whether data formats within the element’s text, like phone
numbers, are automatically converted to followable links.
... 41 html attribute: maxlength attribute, attributes, constraint validation the maxlength attribute defines the maximum
number of characters (as utf-16 code units) the user can enter into an <input> or <textarea>.
...And 14 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
javascript is now used by an incredible
number of high-profile applications, showing that deeper knowledge of this technology is an important skill for any web or mobile developer.
...javascript's types are:
number string boolean function object symbol (new in es2015) ...
...so the type diagram looks more like this:
number string boolean symbol (new in es2015) object function array date regexp null undefined and there are some built-in error types as well.
...And 14 more matches
Expressions and operators - JavaScript
these operators work as they do in most other programming languages when used with floating point
numbers (in particular, note that division by zero produces infinity).
...attempts to convert the operand to a
number, if it is not already.
... bitwise operators a bitwise operator treats their operands as a set of 32 bits (zeros and ones), rather than as decimal, hexadecimal, or octal
numbers.
...And 14 more matches
parseInt() - JavaScript
or nan when the radix is smaller than 2 or bigger than 36, or the first non-whitespace character cannot be converted to a
number.
... if not nan, the return value will be the integer that is the first argument taken as a
number in the specified radix.
... (for example, a radix of 10 converts from a decimal
number, 8 converts from octal, 16 from hexadecimal, and so on.) for radices above 10, letters of the english alphabet indicate numerals greater than 9.
...And 14 more matches
Index - Archive of obsolete content
this method has a
number of options to specify text or binary writing, the character set, and whether to append to an existing file or create a new one.
... 494 get
numberofvisiblerows xul methods, xul reference no summary!
... 602 menuitems xul, xul popup guide the menuitem element has a
number of features beyond just being a label for a menu command.
...And 13 more matches
Client-side form validation - Learn web development
"please enter your phone
number in the format xxx-xxxx" (a specific data format is required for it to be considered valid).
... "your password needs to be between 8 and 30 characters long and contain one uppercase letter, one symbol, and a
number." (a very specific data format is required for your data).
... minlength and maxlength: specifies the minimum and maximum length of textual data (strings) min and max: specifies the minimum and maximum values of numerical input types type: specifies whether the data needs to be a
number, an email address, or some other specific preset type.
...And 13 more matches
Looping code - Learn web development
body> <button>update</button> <canvas></canvas> <script> const btn = document.queryselector('button'); const canvas = document.queryselector('canvas'); const ctx = canvas.getcontext('2d'); let width = document.documentelement.clientwidth; let height = document.documentelement.clientheight; canvas.width = width; canvas.height = height; function random(
number) { return math.floor(math.random()*
number); } function draw() { ctx.clearrect(0,0,width,height); for (let i = 0; i < 100; i++) { ctx.beginpath(); ctx.fillstyle = 'rgba(255,0,0,0.5)'; ctx.arc(random(width), random(height), random(50), 0, 2 * math.pi); ctx.fill(); } } btn.addeventlistener('click',draw); </script> </bo...
...dy> </html> you don't have to understand all the code for now, but let's look at the part of the code that actually draws the 100 circles: for (let i = 0; i < 100; i++) { ctx.beginpath(); ctx.fillstyle = 'rgba(255,0,0,0.5)'; ctx.arc(random(width), random(height), random(50), 0, 2 * math.pi); ctx.fill(); } random(x), defined earlier in the code, returns a whole
number between 0 and x-1.
...only one
number has to change.
...And 13 more matches
Version, UI, and Status Information - Plugins
to do so, it must find the major and minor version
numbers, which are determined when the plug-in and navigator are compiled, and compare them.
...the plug-in can also use the version
number to find out whether a particular feature exists on the version of the browser that the plug-in is running in.
... the browser and plug-in api major version
numbers represent code release
numbers, and their minor version
numbers represent point release
numbers.
...And 13 more matches
compareTo - Archive of obsolete content
method of installversion object syntax compareto ( installversion version); compareto ( string version); compareto ( int major, int minor, int release, int build); parameters the compareto method has the following parameters: maj the major version
number.
... min minor version
number.
... rev revision
number.
...And 12 more matches
WebRequest.jsm
windowid
number the id of the window making the request, as an outerwindowid.
... parentwindowid
number type string the resource type.
... windowid
number the id of the window making the request, as an outerwindowid.
...And 12 more matches
nsISmsDatabaseService
getmessage() void getmessage( in long messageid, in long requestid, [optional] in unsigned long long processid ); parameters messageid a
number representing the id of the message.
... requestid a
number representing the id of the request.
... processid optional a
number representing the id of the process.
...And 12 more matches
The HTML autocomplete attribute - HTML: Hypertext Markup Language
for instance, a browser might let the user save their name, address, phone
number, and email addresses for autocomplete purposes.
... "cc-
number" a credit card
number or other
number identifying a payment method, such as an account
number.
... "cc-csc" the security code for the payment instrument; on credit cards, this is the 3-digit verification
number on the back of the card.
...And 12 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
events change and input supported common attributes autocomplete, list, readonly, and step idl attributes list, value, valueas
number.
... step the step attribute is a
number that specifies the granularity that the value must adhere to, or the special value any, which is described below.
... note: when the data entered by the user doesn't adhere to the stepping configuration, the user agent may round to the nearest valid value, preferring
numbers in the positive direction when there are two equally close options.
...And 12 more matches
Indexed collections - JavaScript
for example, consider an array called emp, which contains employees' names indexed by their numerical employee
number.
... so emp[0] would be employee
number zero, emp[1] employee
number one, and so on.
...the array's length property is set to the
number of arguments.
...And 12 more matches
Digital audio concepts - Web media technologies
representing audio in digital form involves a
number of steps and processes, with multiple formats available both for the raw audio and the encoded or compressed audio which is actually used on the web.
...this analog signal is then converted into digital form by a circuit that captures the incoming wave's amplitude at regular intervals, converting that data into a
number in a form that is understood by the audio recording system.
...the
number of samples taken per second is called the sample rate.
...And 12 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
maxlength type: integer the maximum
number of characters that the textbox allows to be entered.
... maxrows type: integer the
number of rows to show in the results list at a time.
... minresultsforpopup obsolete since gecko 1.9.1 type: integer the minimum
number of results that must be returned for the popup to be displayed.
...And 11 more matches
Browser Detection and Cross Browser Support - Archive of obsolete content
the original netscape browsers used a user agent string which began with the code name for the netscape browser followed by its version
number, e.g.
... browser vendor is_nav, is_ie, is_opera, is_hotjava, is_webtv, is_tvnavigator, is_aoltv browser version
number is_major (integer indicating major version
number: 2, 3, 4 ...), is_minor (float indicating full version
number: 2.02, 3.01, 4.04 ...) browser vendor and major version
number is_nav2, is_nav3, is_nav4, is_nav4up, is_nav6, is_nav6up, is_gecko, is_ie3, is_ie4, is_ie4up, is_ie5, is_ie5up, is_ie5_5, is_ie5_5up, is_ie6, is_ie6up, is_hotjava3, is_hotjava3up, is_opera2, is_opera3, is_oper...
...a4, is_opera5, is_opera5up javascript version
number is_js (float indicating full javascript version
number: 1, 1.1, 1.2 ...) os platform and version is_win, is_win16, is_win32, is_win31, is_win95, is_winnt, is_win98, is_winme, is_win2k, is_os2, is_mac, is_mac68k, is_macppc, is_unix, is_sun, is_sun4, is_sun5, is_suni86, is_irix, is_irix5, is_irix6, is_hpux, is_hpux9, is_hpux10, is_aix, is_aix1, is_aix2, is_aix3, is_aix4, is_linux, is_sco, is_unixware, is_mpras, is_reliant, is_dec, is_sinix, is_freebsd, is_bsd, is_vms detecting browsers using this level of detail is unworkable, unmaintainable and violates the basic principles of web authoring!
...And 11 more matches
LiveConnect Overview - Archive of obsolete content
for example, the following code creates the javaarray x with ten elements of type int: var x = java.lang.reflect.array.newinstance(java.lang.integer, 10); like the javascript array object, javaarray has a length property which returns the
number of elements in the array.
... unlike array.length, javaarray.length is a read-only property, because the
number of elements in a java array are fixed at the time of creation.
...these conversions are described in the following sections: javascript to java conversions java to javascript conversions javascript to java conversions when you call a java method and pass it parameters from javascript, the data types of the parameters you pass in are converted according to the rules described in the following sections:
number values boolean values string values undefined values null values javaarray and javaobject objects javaclass objects other javascript objects the return values of methods of netscape.javascript.jsobject are always converted to instances of java.lang.object.
...And 11 more matches
Function return values - Learn web development
you've already met return values a
number of times, although you may not have thought about them explicitly.
...the random() function takes one parameter — a whole
number — and it returns a whole random
number between 0 and that
number.
... it looks like this: function random(
number) { return math.floor(math.random() *
number); } this could be written as follows: function random(
number) { const result = math.floor(math.random() *
number); return result; } but the first version is quicker to write, and more compact.
...And 11 more matches
Handling text — strings in JavaScript - Learn web development
html provides structure and meaning to our text, css allows us to precisely style it, and javascript contains a
number of features for manipulating strings, creating custom welcome messages and prompts, showing the right text labels when needed, sorting terms into the desired order, and much more.
... strings — the basics strings are dealt with similarly to
numbers at first glance, but when you dig deeper you'll start to see some notable differences.
... creating a string to start with, enter the following lines: let string = 'the revolution will not be televised.'; string; just like we did with
numbers, we are declaring a variable, initializing it with a string value, and then returning the value.
...And 11 more matches
Creating localizable web applications
cheatsheet don't hardcode english text, formats (
numbers, dates, addresses, etc.), word order or sentence structure.
... don't put text or
numbers in images.
... text messages don't hardcode english content allow localizers to localize english content, such as: text messages,
number formats, date formats, word order and sentence structure.
...And 11 more matches
IAccessibleTable2
lists, trees, and tables can have a large
number of children and thus it's possible that the child objects for those controls would only be created as needed.
...ncolumns() returns the total
number of columns in table.
... [propget] hresult ncolumns( [out] long columncount ); parameters columncount
number of columns in table (including columns outside the current viewport) return value s_ok.
...And 11 more matches
nsIDOMWindowUtils
elementsrestyled read only unsigned long long the
number of elements which have been restyled for the current document.
...this
number also counts restyling of pseudo-elements and anonymous boxes.
... screenpixelspercsspixel float returns the
number of screen pixels per css pixel.
...And 11 more matches
nsIScriptError
method overview void init(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 line
number, in pruint32 column
number, in pruint32 flags, in string category); void initwithwindowid(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 line
number, in pruint32 column
number, in pruint32 flags, in string category, in unsigned long long innerwindowid); autf8string tostring(); attributes attribute type description categ...
... column
number pruint32 the column
number where the error occurred.
... errormessage astring the error message in a string format without any context/line
number information.
...And 11 more matches
RTCIceCandidatePairStats - Web APIs
in addition, it adds the following new properties: availableincomingbitrate optional provides an informative value representing the available inbound capacity of the network by reporting the total
number of bits per second available for all of the candidate pair's incoming rtp streams.
... availableoutgoingbitrate optional provides an informative value representing the available outbound capacity of the network by reporting the total
number of bits per second available for all of the candidate pair's outoing rtp streams.
... bytesreceieved optional the total
number of payload bytes received (that is, the total
number of bytes received minus any headers, padding, or other administrative overhead) on this candidate pair so far.
...And 11 more matches
attr() - CSS: Cascading Style Sheets
/* simple usage */ attr(data-count); attr(title); /* with type */ attr(src url); attr(data-count
number); attr(data-width px); /* with fallback */ attr(data-count
number, 0); attr(src url, ""); attr(data-width px, inherit); attr(data-something, "default"); syntax values attribute-name is the name of an attribute on the html element referenced in the css.
...
number <
number> the attribute value is parsed as a css <
number>.
... if it is not valid, that is not a
number or out of the range accepted by the css property, the default value is used.
...And 11 more matches
list-style-type - CSS: Cascading Style Sheets
disc a filled circle (default value) circle a hollow circle square a filled square decimal decimal
numbers beginning with 1 cjk-decimal han decimal
numbers e.g.
... 一, 二, 三, ..., 九八, 九九, 一〇〇 decimal-leading-zero decimal
numbers padded by initial zeros e.g.
...a, b, c, … z upper-latin is unsupported in ie7 and earlier arabic-indic -moz-arabic-indic example armenian traditional armenian
numbering (ayb/ayp, ben/pen, gim/keem… bengali -moz-bengali example cambodian * example is a synonym for khmer cjk-earthly-branch -moz-cjk-earthly-branch example cjk-heavenly-stem -moz-cjk-heavenly-stem example cjk-ideographic identical to trad-chinese-informal e.g.
...And 11 more matches
Storing the information you need — Variables - Learn web development
a variable is a container for a value, like a
number we might use in a sum, or a string that we might use as part of a sentence.
... another special thing about variables is that they can contain just about anything — not just strings and
numbers.
... don't use
numbers at the start of variables.
...And 10 more matches
Localization and Plurals
usage here are a couple terms used in this page to help keep things clear: plural rule: for a given language, there is a grammatical rule on how to change words, depending on the
number qualifying the word.
...if you don't know how many plural forms you need, check the pluralrule
number in chrome/global/intl.properties, and look up the corresponding entry in the following list of plural rules.
... list of plural rules this section contains a list of plural rules ordered by their plural rule
number.
...And 10 more matches
Advanced techniques: Creating and sequencing audio - Web APIs
tep="0.1" /> <label for="release">release</label> <input name="release" id="release" type="range" min="0" max="1" value="0.5" step="0.1" /> now we can create some variables over in javascript and have them change when the input values are updated: let attacktime = 0.2; const attackcontrol = document.queryselector('#attack'); attackcontrol.addeventlistener('input', function() { attacktime =
number(this.value); }, false); let releasetime = 0.5; const releasecontrol = document.queryselector('#release'); releasecontrol.addeventlistener('input', function() { releasetime =
number(this.value); }, false); the final playsweep() function now we can expand our playsweep() function.
... let pulsehz = 880; const hzcontrol = document.queryselector('#hz'); hzcontrol.addeventlistener('input', function() { pulsehz =
number(this.value); }, false); let lfohz = 30; const lfocontrol = document.queryselector('#lfo'); lfocontrol.addeventlistener('input', function() { lfohz =
number(this.value); }, false); the final playpulse() function here's the entire playpulse() function: let pulsetime = 1; function playpulse() { let osc = audioctx.createoscillator(); osc.type = 'sine'; osc.frequency.setvalueattime...
...noise is just random
numbers when it comes to audio data, so is, therefore, a relatively straightforward thing to create with code.
...And 10 more matches
Basic concepts behind Web Audio API - Web APIs
channel notation the
number of audio channels available on a signal is frequently presented in a numeric format, such as 2.0 or 5.1.
...the first
number is the
number of full frequency range audio channels that the signal includes.
... the
number after the period indicates the
number of those channels which are reserved for low-frequency effect (lfe) outputs; these are often referred to as subwoofers.
...And 10 more matches
<input type="date"> - HTML: Hypertext Markup Language
re chrome and opera, whose data control looks like so: the edge date control looks like: and the firefox date control looks like this: value a domstring representing a date in yyyy-mm-dd format, or empty events change and input supported common attributes autocomplete, list, readonly, and step idl attributes list, value, valueasdate, valueas
number.
... you can get and set the date value in javascript with the input element's value and valueas
number properties.
... for example: var datecontrol = document.queryselector('input[type="date"]'); datecontrol.value = '2017-06-01'; console.log(datecontrol.value); // prints "2017-06-01" console.log(datecontrol.valueas
number); // prints 1496275200000, a unix timestamp this code finds the first <input> element whose type is date, and sets its value to 2017-06-01 (june 1st, 2017).
...And 10 more matches
<input type="search"> - HTML: Hypertext Markup Language
additional attributes in addition to the attributes that operate on all <input> elements regardless of their type, search field inputs support the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum
number of characters the input should accept minlength the minimum
number of characters long the input can be and still be considered valid pattern a regular expression the input's contents must match in order to be valid placeholder an exemplar value to display in the input field whenever it is empty readonly a boolean attribute indicating whether or not ...
...the contents of the input should be read-only size a
number indicating how many characters wide the input field should be spellcheck controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used list the values of the list attribute is the id of a <datalist> element located in the same document.
... maxlength the maximum
number of characters (as utf-16 code units) the user can enter into the search field.
...And 10 more matches
Grammar and types - JavaScript
some examples of legal names are
number_hits, temp99, $credit, and _name.
...for example, if a variable called phone
number is declared in a document, you can refer to this variable from an iframe as parent.phone
number.
...
number.
...And 10 more matches
isNaN() - JavaScript
note, coercion inside the isnan function has interesting rules; you may alternatively want to use
number.isnan(), as defined in ecmascript 2015.
... for example, dividing zero by zero results in a nan — but dividing other
numbers by zero does not.
...when the argument to the isnan function is not of type
number, the value is first coerced to a
number.
...And 10 more matches
listbox - Archive of obsolete content
you may specify the
number of rows to display in the list using the rows attribute.
...ndex, value properties accessibletype, currentindex, currentitem, disabled, disablekeynavigation, itemcount, listboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, get
numberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, movebyoffset, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <listbox id="thelist"> <listitem label="ruby"/> <listitem label="emerald"/> <listitem label="sapphire" selected="true"/> <listitem label="diamond"/> </listbox> ...
... rows type: integer the
number of rows to display in the element.
...And 9 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
a set
number of times per second), discusses what they are useful for, and considers their inherent issues.
... introduction for a long time, the web platform has offered javascript programmers a
number of functions that allow them to asynchronously execute code after a certain time interval has elapsed, and to repeatedly execute a block of code asynchronously until you tell it to stop.
... a
number representing the time interval in milliseconds (1000 miliseconds equals 1 second) to wait before executing the code.
...And 9 more matches
TypeScript support in Svelte - Learn web development
for example, if you start adding an ms property to the alert component call, typescript will infer from the default value that the ms property should be a
number: and if you pass something that is not a
number it will complain about it: the application template has a validate script configured that runs svelte-check against your code.
... give todo.type.ts the following content: export type todotype = { id:
number name: string completed: boolean } note: the svelte template uses svelte-preprocess 4.0.0 to support typescript.
...(ts) (message, ms) => { you can fix these by specifying the corresponding types, like so: export let ms = 3000 let visible: boolean let timeout:
number const onmessagechange = (message: string, ms:
number) => { cleartimeout(timeout) if (!message) { // hide alert if message is empty note: there's no need to specify the ms type with export let ms:
number = 3000 because typescript is already inferring it from its default value.
...And 9 more matches
BloatView
reading individual bloat logs full bloatview output contains per-class statistics on allocations and refcounts, and provides gross
numbers on the amount of memory being leaked broken down by class.
... bytes per-inst - the
number of bytes returned if you were to write sizeof(class).
... note that this
number does not reflect any memory held onto by the class, such as internal buffers, etc.
...And 9 more matches
JSAPI User Guide
spidermonkey provides a few core javascript data types—
numbers, strings, arrays, objects, and so on—and a few methods, such as array.push.
...a js::value can be a
number, a string, a boolean value, a reference to an object (like an object, array, date, or function), or one of the special values null or undefined.
...in other cases, the jsval is a pointer to an object, string, or
number.
...And 9 more matches
imgIContainer
void endframedecode(in unsigned long frame
number); obsolete since gecko 2.0 void ensurecleanframe(in unsigned long aframenum, in 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!
... gfxiimageframe getframeat(in unsigned long index); obsolete since gecko 1.9.2 void getframecolormap(in unsigned long frame
number, [array, size_is(palettelength)] out pruint32 palettedata, out unsigned long palettelength); obsolete since gecko 2.0 unsigned long getframeimagedatalength(in unsigned long frame
number); obsolete since gecko 2.0 imagecontainer getimagecontainer(); native code only!
... obsolete since gecko 2.0 void setframeblendmethod(in unsigned long frame
number, in print32 ablendmethod); obsolete since gecko 2.0 void setframedisposalmethod(in unsigned long frame
number, in print32 adisposalmethod); obsolete since gecko 2.0 void setframehasnoalpha(in unsigned long frame
number); obsolete since gecko 2.0 void setframetimeout(in unsigned long frame
number, in print32 atimeout); obsolete since gecko 2.0 void startanimati...
...And 9 more matches
Debugger.Script - Firefox Developer Tools
startline if the instance refers to a jsscript, the
number of the line at which this script’s code starts, within the file or document named by url.
... linecount if the instance refers to a jsscript, the
number of lines this script’s code occupies, within the file or document named by url.
... getalloffsets() if the instance refers to a jsscript, return an arrayl describing the relationship between bytecode instruction offsets and source code positions in this script.l is sparse, and indexed by source line
number.
...And 9 more matches
Timing element visibility with the Intersection Observer API - Web APIs
in this article, we'll build a mock blog which has a
number of ads interspersed among the contents of the page, then use the intersection observer api to track how much time each ad is visible to the user.
... body { font-family: "open sans", "arial", "helvetica", sans-serif; background-color: aliceblue; } .wrapper { display: grid; grid-template-columns: auto minmax(min-content, 1fr); grid-template-rows: auto minmax(min-content, 1fr); max-width: 700px; margin: 0 auto; background-color: aliceblue; } the site's <body> is configured here to use one of a
number of common sans-serif fonts, and to use "aliceblue" as the background color.
... nextarticleid each article is given a unique id
number; this variable tracks the next id to use, starting with 1.
...And 9 more matches
Key Values - Web APIs
vk_lwin (0x5b) vk_rwin (0x5c) kvk_command (0x37) kvk_rightcommand (0x36) gdk_key_meta_l (0xffe7) gdk_key_meta_r (0xffe8) qt::key_meta (0x01000022) keycode_meta_left (117) keycode_meta_right (118) "numlock" the numlock (
number lock) key.
... toggles the numeric keypad between
number entry some other mode (often directional arrows).
... vk_oem_attn (0xf0) gdk_key_eisu_shift (0xff2f) gdk_key_eisu_toggle (0xff30) qt::key_eisu_shift (0x0100112f) qt::key_eisu_toggle (0x01001130) "codeinput" the code input key, which enables code input mode, which lets the user enter characters by typing their code points (their unicode character
numbers, typically).
...And 9 more matches
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
each color component can be represented as a
number between 0 and 255 (0x00 and 0xff) or, optionally, as a
number between 0 and 15 (0x0 and 0xf).
... all components must be specified using the same
number of digits.
... "#rrggbb" specifies a fully-opaque color whose red component is the hexadecimal
number 0xrr, green component is 0xgg, and blue component is 0xbb.
...And 9 more matches
Date - JavaScript
date objects contain a
number that represents milliseconds since 1 january 1970 utc.
... description the ecmascript epoch and timestamps a javascript date is fundamentally specified as the
number of milliseconds that have elapsed since midnight on january 1, 1970, utc.
... it should be noted that the maximum date is not of the same value as the maximum safe integer (
number.max_safe_integer is 9,007,199,254,740,991).
...And 9 more matches
Math.fround() - JavaScript
the math.fround() function returns the nearest 32-bit single precision float representation of a
number.
... syntax var singlefloat = math.fround(doublefloat); parameters doublefloat a
number.
... if the parameter is of a different type, it will get converted to a
number or to nan if it cannot be converted.
...And 9 more matches
Web video codec guide - Web media technologies
some have trouble with specific kinds of shapes and patterns, or aren't good at replicating sharp edges, or tend to lose detail in dark areas, or any
number of possibilities.
... the complexity introduced by motion results in larger intermediate frames due to the higher
number of differences between frames).
... effect of codec configuration on encoded output the algorithms used do encode video typically use one or more of a
number of general techniques to perform their encoding.
...And 9 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
maxlength type: integer the maximum
number of characters that the textbox allows to be entered.
... maxrows type: integer the
number of rows to show in the results list at a time.
... minresultsforpopup new in thunderbird 3requires seamonkey 2.0 type: integer the minimum
number of results that must be returned for the popup to be displayed.
...And 8 more matches
CSS values and units - Learn web development
numbers, lengths, and percentages there are various numeric data types that you might find yourself using in css.
... the following are all classed as numeric: data type description <integer> an <integer> is a whole
number such as 1024 or -55.
... <
number> a <
number> represents a decimal
number — it may or may not have a decimal point with a fractional component, for example 0.255, 128, or -1.2.
...And 8 more matches
Third-party APIs - Learn web development
changing the type of map there are a
number of different types of map that can be shown with the mapquest api.
... adding different controls the map has a
number of different controls available; by default it just shows a zoom control.
...initially the <script> element contains a
number of variables needed for the setup of the example; below we'll fill in the required functionality.
...And 8 more matches
Command line crash course - Learn web development
a large
number of tools can be used by typing commands into the command line; many come pre-installed on your system, and a huge
number of others are installable from package registries.
...): touch copy files: cp move files: mv delete files or directories: rm download files found at specific urls: curl search for fragments of text inside larger bodies of text: grep view a file's contents page by page: less, cat manipulate and transform streams of text (for example changing all the instances of <div>s in an html file to <article>): awk, tr, sed note: there are a
number of good tutorials on the web that go much deeper into the command line on the web — this is only a brief introduction!
... creating, copying, moving, removing there are a
number of other basic utility commands that you’ll probably end up using quite a lot as you work with the terminal.
...And 8 more matches
Introduction to the JavaScript shell
command line options there are a
number of command line options you can specify to control the shell.
... built-in functions to make the javascript shell more useful, there are a
number of built-in functions provided that you can use either from javascript programs or in interactive mode.
... countheap([start[, kind]]) added in spidermonkey 1.8 count the
number of live gc things in the heap, or things reachable from start when it is given and is not null.
...And 8 more matches
mozIStorageStatement
obparameter(in unsigned long aparamindex, [array,const,size_is(avaluesize)] in octet avalue, in unsigned long avaluesize); mozistoragependingstatement executeasync(mozistoragestatementcallback acallback); boolean executestep(); boolean step(); void execute(); attributes attribute type description columncount unsigned long
number of columns returned.
... parametercount unsigned long
number of parameters.
...this will be one less than the
number used in the sql (<code>?1</code> maps to <code>0</code>, and so on).
...And 8 more matches
Working with data
you cannot pass a length to the ctypes.array that is less then the string length, for example this throws: ctypes.jschar.array(3)('rawr'); // browser console throws: `error: arraytype has insufficient length` we can have multiple null-terminators by using a
number larger then the length of the string, like this: var cstr_notnullterminated = ctypes.jschar.array(10)('rawr'); // notice the `4` we pass here console.log(cstr_notnullterminated); // outputs to browser console: `cdata { length: 10 }` console.log(cstr_notnullterminated.tostring()); // outputs to browser console: `"ctypes.char16_t.array(5)(["r", "a", "w", "r", "\x00", "\x00", "\x00", "\x00", "\x00"...
... 64-bit integers while most numeric types in js-ctypes are represented by standard javascript
number objects, 64-bit integers cannot all be represented accurately by this type.
... for that reason, 64-bit and pointer-sized c values of numeric types don't get automatically converted to javascript
numbers.
...And 8 more matches
HTMLInputElement - Web APIs
properties that apply only to text/
number-containing or elements autocomplete string: returns / sets the element's autocomplete attribute, indicating whether the value of the control can be automatically completed by the browser.
... maxlength long: returns / sets the element's maxlength attribute, containing the maximum
number of characters (in unicode code points) that the value can have.
... (if you set this to a negative
number, an exception will be thrown.) min string: returns / sets the element's min attribute, containing the minimum (numeric or date-time) value for this item, which must not be greater than its maximum (max attribute) value.
...And 8 more matches
Checking when a deadline is due - Web APIs
human-readable dates are quite different, with a
number of different representations.
...
number inputs for the hour and minute parts of the deadline.
... on browsers that support type="
number", you get a nice little up and down arrow
number picker.
...And 8 more matches
compareVersion - Web APIs
if the version of registryname is smaller (earlier) than version, this method returns a negative
number.
... otherwise, this method returns a positive
number.
... -4 registryname has a smaller (earlier) major
number than version.
...And 8 more matches
RTCInboundRtpStreamStats - Web APIs
fecpacketsdiscarded an integer value indicating the
number of rtp forward error correction (fec) packets which have been received for this source, for which the error correction payload was discarded.
... fecpacketsreceived an integer value indicating the total
number of rtp fec packets received for this source.
... fircount an integer value which indicates the total
number of full intra request (fir) packets which this receiver has sent to the sender.
...And 8 more matches
Using Web Workers - Web APIs
but you can use a large
number of items available under window, including websockets, and data storage mechanisms like indexeddb.
...in this section we'll discuss the javascript found in our basic dedicated worker example (run dedicated worker): this allows you to enter two
numbers to be multiplied together.
... the
numbers are sent to a dedicated worker, multiplied together, and the result is returned to the page and displayed.
...And 8 more matches
HTML attribute: step - HTML: Hypertext Markup Language
valid for the numeric input types, including the date, month, week, time, datetime-local,
number and range types, the step attribute is a
number that specifies the granularity that the value must adhere to or the keyword any.
...if not explicitly included, step defaults to 1 for
number and range, and 1 unit type (minute, week, month, day) for the date/time input types.
... the value can must be a positive
number - integer or float -- or the special value any, which means no stepping is implied, and any value is allowed (barring other constraints, such as min and max).
...And 8 more matches
HTML attribute reference - HTML: Hypertext Markup Language
cols <textarea> defines the
number of columns in a textarea.
... colspan <td>, <th> the colspan attribute defines the
number of columns a cell should span.
... maxlength <input>, <textarea> defines the maximum
number of characters allowed in the element.
...And 8 more matches
BigInt - JavaScript
bigint is a built-in object that provides a way to represent whole
numbers larger than 253 - 1, which is the largest
number javascript can reliably represent with the
number primitive and represented by the
number.max_safe_integer constant.
... const thebiggestint = 9007199254740991n const alsohuge = bigint(9007199254740991) // ↪ 9007199254740991n const hugestring = bigint("9007199254740991") // ↪ 9007199254740991n const hugehex = bigint("0x1fffffffffffff") // ↪ 9007199254740991n const hugebin = bigint("0b11111111111111111111111111111111111111111111111111111") // ↪ 9007199254740991n bigint is similar to
number in some ways, but also differs in a few key matters — it cannot be used with methods in the built-in math object and cannot be mixed with instances of
number in operations; they must be coerced to the same type.
... be careful coercing values back and forth, however, as the precision of a bigint may be lost when it is coerced to a
number.
...And 8 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
because a xul document is also an xml document, it can contain xhtml, svg, mathml, and other elements; if you use external entity references, the xml document's contents are modularized; combined with other xml-related technologies, such as dom, xlink, or xslt, you can use it for a
number of different applications.
...this element takes a
number of attributes, and can easily be made to display controls (buttons, etc) using widgets and layouts native to whatever platform it is running on.
... buttons used in dialog windows a dialog element will display some
number of buttons at its bottom.
...And 7 more matches
Numeric Controls - Archive of obsolete content
number fields a textbox may be used for entering
numbers by setting the value of the type attribute to the value
number.
... this type of textbox may only be used to enter
numbers.
...naturally, this value should be a
number.
...And 7 more matches
Client-side storage - Learn web development
previous overview: client-side web apis modern web browsers support a
number of ways for web sites to store data on the user's computer — with the user's permission — then retrieve it when necessary.
... storing simple data — web storage the web storage api is very easy to use — you store simple name/value pairs of data (limited to strings,
numbers, etc.) and retrieve these values when needed.
... storing complex data — indexeddb the indexeddb api (sometimes abbreviated idb) is a complete database system available in the browser in which you can store complex related data, the types of which aren't limited to simple values like strings or
numbers.
...And 7 more matches
Mozilla accessibility architecture
each platform's accessibility api has made different assumptions, although there are a
number of common characteristics.
...the assistive technology can then use this information in a
number of ways.
...the algorithm used to calculate the
number of accessible children for an accessible node is expensive.
...And 7 more matches
Gecko info for Windows accessibility vendors
it would be impractical to
number all of the nodes in a document starting at 0, because whenever a node is inserted or removed it would be computationally very expensive to re
number things.
...the following html tags are exposed as bstr's: abbr, acronym, blockquote, dd, dl, dt, form, frame, h1, h2, h3, h4, h5, h6, iframe, q, tbody, tfoot, thead in addition, an html list uses the bullet bstr role to expose bullets and
numbers that are automatically inserted into the formatting by gecko.
... positional descriptions are supported the accdescription field is overriden for the following roles: role_listitem, role_menuitem, role_radiobutton, role_pagetab and role_outlineitem for everything other than outline item, the positional description is in the form "n of m" where n is an integer indicating the position within other similar objects in a group, and m represents the
number of objects in that group.
...And 7 more matches
Bytecode Descriptions
zero stack: ⇒ 0 push the
number 0.
... one stack: ⇒ 1 push the
number 1.
...it just calls to
number(val).
...And 7 more matches
UInt64
this may be specified as an integer (if the value can be represented as a 32-bit value), another 64-bit integer object (either signed or unsigned), or as a string, which may consist of an optional minus sign, followed by either a decimal
number or "0x" or "0x" followed by a hexadecimal
number.
...you can therefore use a string to represent a 64-bit value that is too large to represent as a 32-bit javascript
number.
...either it's not a
number, string, or 64-bit integer object, or it's a string that is incorrectly formatted or contains a value outside the range that can be represented in 64 bits.
...And 7 more matches
Streams - Plugins
finding out how much data the plug-in can accept after a call to npp_newstream and before writing data to the plug-in, the browser calls npp_writeready to determine the maximum
number of bytes that the plug-in can consume.
...if the plug-in allocates memory for the entire stream at once, it can return a large
number.
... this
number tells the browser that it can pass as much data to the instance as possible in a single call to npp_write.
...And 7 more matches
AudioWorkletNodeOptions - Web APIs
properties
numberofinputs optional the value to initialize the
numberofinputs property to.
...
numberofoutputs optional the value to initialize the
numberofoutputs property to.
... outputchannelcount optional an array defining the
number of channels for each output.
...And 7 more matches
Element - Web APIs
element.clientheight read only returns a
number representing the inner height of the element.
... element.clientleft read only returns a
number representing the width of the left border of the element.
... element.clienttop read only returns a
number representing the width of the top border of the element.
...And 7 more matches
RTCOutboundRtpStreamStats - Web APIs
fircount an integer value which indicates the total
number of full intra request (fir) packets which this rtcrtpsender has sent to the remote rtcrtpreceiver.
... framesencoded the
number of frames that have been successfully encoded so far for sending on this rtp stream.
... nackcount an integer value indicating the total
number of negative acknolwedgement (nack) packets this rtcrtpsender has received from the remote rtcrtpreceiver.
...And 7 more matches
WebGL model view projection - Web APIs
when the w component is a non-zero real
number then homogeneous coordinate easily translates back into a normal point in cartesian space.
... when
numbers are extremely large (or extremely small) on computers they begin to become less and less precise because there are only so many ones and zeros that are used to represent them.
... the more operations that are done on larger
numbers, the more and more errors accumulate into the result.
...And 7 more matches
<input type="range"> - HTML: Hypertext Markup Language
this is typically represented using a slider or dial control rather than a text entry box like the
number input type.
... value a domstring containing the string representation of the selected numeric value; use valueas
number to get the value as a
number.
... events change and input supported common attributes autocomplete, list, max, min, and step idl attributes list, value, and valueas
number methods stepdown() and stepup() validation there is no pattern validation available; however, the following forms of automatic validation are performed: if the value is set to something which can't be converted into a valid floating-point
number, validation fails because the input is suffering from a bad input.
...And 7 more matches
<input type="time"> - HTML: Hypertext Markup Language
events change and input supported common attributes autocomplete, list, readonly, and step idl attributes value, valueasdate, valueas
number, and list.
... step the step attribute is a
number that specifies the granularity that the value must adhere to, or the special value any, which is described below.
... note: when the data entered by the user doesn't adhere to the stepping configuration, the user agent may round to the nearest valid value, preferring
numbers in the positive direction when there are two equally close options.
...And 7 more matches
Equality comparisons and sameness - JavaScript
if the values have the same type, are not
numbers, and have the same value, they're considered equal.
... finally, if both values are
numbers, they're considered equal if they're both not nan and are the same value, or if one is +0 and one is -0.
...for all values except
numbers, it uses the obvious semantics: a value is only equal to itself.
...And 7 more matches
String.prototype.replace() - JavaScript
a
number of special replacement patterns are supported; see the "specifying a string as a parameter" section below.
... (the exact
number of arguments depends on whether the first argument is a regexp object—and, if so, how many parenthesized submatches it specifies.) the following example will set newstring to 'abc - 12345 - #$*%': function replacer(match, p1, p2, p3, offset, string) { // p1 is nondigits, p2 digits, and p3 non-alphanumerics return [p1, p2, p3].join(' - '); } let newstring = 'abc12345#$*%'.replace(/([^\d]*)...
...the fahrenheit degree should be a
number ending with "f".
...And 7 more matches
Index - XPath
19 ceiling xslt, xslt_reference the ceiling function evaluates a decimal
number and returns the smallest integer greater than or equal to the decimal
number.
... 23 count xslt, xslt_reference the count function counts the
number of nodes in a node-set and returns an integer.
... 28 floor xslt, xslt_reference the floor function evaluates a decimal
number and returns the largest integer less than or equal to the decimal
number.
...And 7 more matches
Introduction to using XPath in JavaScript - XPath
simple types when the desired result type in resulttype is specified as either:
number_type - a double string_type - a string boolean_type - a boolean we obtain the returned value of the expression by accessing the following properties respectively of the xpathresult object.
...
numbervalue stringvalue booleanvalue example the following uses the xpath expression count(//p) to obtain the
number of <p> elements in an html document: var paragraphcount = document.evaluate( 'count(//p)', document, null, xpathresult.any_type, null ); alert( 'this document contains ' + paragraphcount.
numbervalue + ' paragraph elements' ); although javascript allows us to convert the
number to a string for display, the xpath interface will not automatically convert the numerical result if the stringvalue property is requested, so the following code will not work: var paragraphcount = document.evaluate('count(//p)', document, null, xpathresult.any_type, null ); alert( 'this document contains ' + paragraphcount.stringvalue + ' paragraph elements' ); instead, it will return an exc...
... iterator example var iterator = document.evaluate('//phone
number', documentnode, null, xpathresult.unordered_node_iterator_type, null ); try { var thisnode = iterator.iteratenext(); while (thisnode) { alert( thisnode.textcontent ); thisnode = iterator.iteratenext(); } } catch (e) { alert( 'error: document tree modified during iteration ' + e ); } snapshots when the specified result type in the resulttype parameter is either: unordered_...
...And 7 more matches
Server-side web frameworks - Learn web development
# return httpresponse return httpresponse('output string to return') route requests to the appropriate handler most sites will provide a
number of different resources, accessible through distinct urls.
... urlpatterns = [ url(r'^$', views.index), # example: /best/myteamname/5/ url(r'^best/(?p<team_name>\w.+?)/(?p<team_
number>[0-9]+)/$', views.best), ] make it easy to access data in the request data can be encoded in an http request in a
number of ways.
...this stores the team name and team level as character fields and specifies a maximum
number of characters to be stored for each record.
...And 6 more matches
Handling common JavaScript problems - Learn web development
there are a
number of common javascript problems that you will want to be mindful of, such as: basic syntax and logic problems (again, check out troubleshooting javascript).
...when clicked, each one should alert a message containing its
number (the value of i at the time it was created), however each one reports i as 11, because for loops do all their iterating before nested functions are invoked.
... after the packages have finished installing, try loading up a javascript file: you'll see any issues highlighted with green (for warnings) and red (for errors) circles next to the line
numbers, and a separate panel at the bottom provides line
numbers, error messages, and sometimes suggested values or other fixes.
...And 6 more matches
nss tech note1
the
number of required templates is determined by the type of the first template.when multiple templates are required, the pointer must point to a null-terminated array of templates.
...it is specified in the upper 2 tag bits (
number 6 and 7).
...this information is stored in the next lowest tag bit (
number 5).
...And 6 more matches
TLS Cipher Suite Discovery
they must agree on these items: key establishment algorithm (such as rsa, dh, or ecdh) peer authentication algorithm (such as rsa, dsa, ecdsa) bulk data encryption algorithm (such as rc4, des, aes) and key size digest algorithm for message authentication checking (sha1, sha256) there are numerous available choices for each of those categories, and the
number of possible combinations of all those choices is large.
... each cipher suite is represented by a 16-bit
number.
... the
number of well-defined cipher suites grows with time, and no tls implementation offers all known cipher suites at all times.
...And 6 more matches
SpiderMonkey Internals
compiler the compiler consumes javascript source code and produces a script which contains bytecode, source annotations, and a pool of string,
number, and identifier literals.
... because the gc is exact, c/c++ applications must ensure that all live objects, strings, and
numbers are gc-reachable.
... standard library the methods for arrays, booleans, dates, functions,
numbers, and strings are implemented using the js api.
...And 6 more matches
JSAPI reference
compilefunctionforprincipals obsolete since jsapi 28 js_compileucfunction obsolete since jsapi 36 js_compileucfunctionforprincipals obsolete since jsapi 28 error handling struct jserrorformatstring added in spidermonkey 17 class jserrorreport class js::autosaveexceptionstate added in spidermonkey 31 enum jsexntype added in spidermonkey 17 js_reporterror js_reportwarning js_reporterror
number js_reporterror
numberuc js_reporterrorflagsand
number js_reporterrorflagsand
numberuc js_reporterror
numberucarray added in spidermonkey 24 js_reportoutofmemory js_reportallocationoverflow added in spidermonkey 1.8 js_geterrorreporter js_seterrorreporterobsolete since jsapi 52 js_errorfromexception js_geterrorprototype jsreport_is_exception jsreport_is_strict jsreport_is_warning jsrepor...
...versa: js_reportpendingexception js_errorfromexception js_throwreportederror obsolete since jsapi 29 values and types typedef jsval js::value js::value constructors: js::nullvalue added in spidermonkey 24 js::undefinedvalue added in spidermonkey 24 js::booleanvalue added in spidermonkey 24 js::truevalue added in spidermonkey 24 js::falsevalue added in spidermonkey 24 js::
numbervalue added in spidermonkey 24 js::int32value added in spidermonkey 24 js::doublevalue added in spidermonkey 24 js::float32value added in spidermonkey 24 js::stringvalue added in spidermonkey 24 js::objectvalue added in spidermonkey 24 js::objectornullvalue added in spidermonkey 24 js::symbolvalue added in spidermonkey 38 js::value constants: js::nullhandlevalue added in spidermonkey 2...
... jsval_is_null obsolete since jsapi 32 jsval_is_void obsolete since jsapi 32 jsval_is_boolean obsolete since jsapi 32 jsval_is_
number obsolete since jsapi 32 jsval_is_int obsolete since jsapi 32 jsval_is_double obsolete since jsapi 32 jsval_is_string obsolete since jsapi 32 jsval_is_object obsolete since jsapi 15 jsval_is_primitive obsolete since jsapi 32 jsval_is_gcthing obsolete since jsapi 32 high-level type-conversion routines for packing and unpacking function arguments.
...And 6 more matches
An Overview of XPCOM
object ownership in xpcom, since components may implement any
number of different interfaces, components must be reference counted.
... when a component gets created, an integer inside the component tracks the
number of clients who have an interface to the components -- also known as the reference count.
...this universally unique identifier (uuid) is a unique, 128-bit
number.
...And 6 more matches
IAccessible2
nextendedstates the
number of extended states returned; the size of the returned array.
...nlocalizedextendedstates the
number of localized extended states returned; the size of the returned array.
...nextendedstates() returns the
number of extended states.
...And 6 more matches
nsIAccessibleTable
columncount long the
number of columns in the table.
...obsolete since gecko 1.9.2 rowcount long the
number of rows in the table.
...obsolete since gecko 1.9.2 selectedcellcount unsigned long the total
number of selected cells.
...And 6 more matches
Int64
this may be specified as an integer (if the value can be represented as a 32-bit value), another 64-bit integer object (either signed or unsigned), or as a string, which may consist of an optional minus sign, followed by either a decimal
number or "0x" or "0x" followed by a hexadecimal
number.
...you can therefore use a string to represent a 64-bit value that is too large to represent as a 32-bit javascript
number.
...either it's not a
number, string, or 64-bit integer object, or it's a string that is incorrectly formatted or contains a value outside the range that can be represented in 64 bits.
...And 6 more matches
AudioWorkletProcessor() - Web APIs
available properties are as follows:
numberofinputs optional the value to initialize the
numberofinputs property to.
...
numberofoutputs optional the value to initialize the
numberofoutputs property to.
... outputchannelcount optional an array defining the
number of channels for each output.
...And 6 more matches
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
mebuffer_attachment_color_encoding gl.framebuffer_attachment_component_type gl.framebuffer_attachment_depth_size gl.framebuffer_attachment_green_size gl.framebuffer_attachment_red_size gl.framebuffer_attachment_stencil_size gl.framebuffer_attachment_texture_layer when using the ovr_multiview2 extension: ext.framebuffer_attachment_texture_num_views_ovr: the
number of views of the framebuffer object attachment.
... gl.framebuffer_attachment_alpha_size a glint indicating the
number of bits in the alpha component of the attachment.
... gl.framebuffer_attachment_blue_size a glint indicating the
number of bits in the blue component of the attachment.
...And 6 more matches
filter - CSS: Cascading Style Sheets
the value of angle defines the
number of degrees around the color circle the input samples will be adjusted.
...-table th { border: 1px solid rgb(187, 187, 187); padding: 0px 5px; background: none repeat scroll 0% 0% rgb(238, 238, 238); text-align: left; font-weight: bold; } table.standard-table td { padding: 5px; border: 1px solid rgb(204, 204, 204); text-align: left; vertical-align: top; width:25%; height:auto; } #img3 { height:100%; } combining functions you may combine any
number of functions to manipulate the rendering.
...puted 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>?
...And 6 more matches
HTML attribute: min - HTML: Hypertext Markup Language
if a value is specified for min that isn't a valid
number, the input has no minimum value.
... valid for the numeric input types, including the date, month, week, time, datetime-local,
number and range types, and the <meter> element, the min attribute is a
number that specifies the most negative value a form control to be considered valid.
... syntax if any is not explicity set, valid values for the
number, date/time input types, and range input types are equal to the basis for stepping - the min value and increments of the step value, up to the max value, if specified.
...And 6 more matches
<input type="email"> - HTML: Hypertext Markup Language
additional attributes in addition to the attributes that operate on all <input> elements regardless of their type, email inputs support the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum
number of characters the input should accept minlength the minimum
number of characters long the input can be and still be considered valid multiple whether or not to allow multiple, comma-separated, e-mail addresses to be entered pattern a regular expression the input's contents must match in order to be valid placeholder an exemplar value to display in t...
...he input field whenever it is empty readonly a boolean attribute indicating whether or not the contents of the input should be read-only size a
number indicating how many characters wide the input field should be list the values of the list attribute is the id of a <datalist> element located in the same document.
... maxlength the maximum
number of characters (as utf-16 code units) the user can enter into the email input.
...And 6 more matches
<input type="month"> - HTML: Hypertext Markup Language
the value is a string whose value is in the format "yyyy-mm", where yyyy is the four-digit year and mm is the month
number.
... step the step attribute is a
number that specifies the granularity that the value must adhere to, or the special value any, which is described below.
... note: when the data entered by the user doesn't adhere to the stepping configuration, the user agent may round to the nearest valid value, preferring
numbers in the positive direction when there are two equally close options.
...And 6 more matches
<input type="password"> - HTML: Hypertext Markup Language
rs minlength the minimum length in characters that will be considered valid pattern a regular expression the value must match in order to be valid placeholder an example value to display in the field when the field is empty readonly a boolean attribute which, if present, indicates that the field's contents should not be editable size the
number of characters wide the input field should be maxlength the maximum
number of characters (as utf-16 code units) the user can enter into the password field.
... minlength the minimum
number of characters (as utf-16 code units) the user can enter into the password entry field.
...with a pattern, you can mandate case rules, require the use of some
number of digits and/or punctuation characters, and so forth.
...And 6 more matches
<input type="url"> - HTML: Hypertext Markup Language
additional attributes in addition to the attributes that operate on all <input> elements regardless of their type, url inputs support the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum
number of characters the input should accept minlength the minimum
number of characters long the input can be and still be considered valid pattern a regular expression the input's contents must match in order to be valid placeholder an exemplar value to display in the input field whenever it is empty readonly a boolean attribute indicating whether or not ...
...the contents of the input should be read-only size a
number indicating how many characters wide the input field should be spellcheck controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used list the values of the list attribute is the id of a <datalist> element located in the same document.
... maxlength the maximum
number of characters (as utf-16 code units) the user can enter into the url input.
...And 6 more matches
<input type="week"> - HTML: Hypertext Markup Language
<input> elements of type week create input fields allowing easy entry of a year plus the iso 8601 week
number during that year (i.e., week 1 to 52 or 53).
... value a domstring representing a week and year, or empty events change and input supported common attributes autocomplete, list, readonly, and step idl attributes value, valueasdate, valueas
number, and list.
...st year and week to accept as valid input min the earliest year and week to accept as valid input readonly a boolean which, if present, indicates that the user cannot edit the field's contents step the stepping interval (the distance between allowed values) to use for both user interface and constraint validation max the latest (time-wise) year and week
number, in the string format discussed in the value section above, to accept.
...And 6 more matches
Regular expression syntax cheatsheet - JavaScript
for example, /\d/ or /[0-9]/ matches "2" in "b2 is the suite
number".
...for example, /\d/ or /[^0-9]/ matches "b" in "b2 is the suite
number".
...for example, /\d+(?!\.)/ matches a
number only if it is not followed by a decimal point.
...And 6 more matches
Intl.PluralRules() constructor - JavaScript
possible values are: "cardinal" for cardinal
numbers (refering to the quantity of things).
... "ordinal" for ordinal
number (refering to the ordering or ranking of things, e.g.
... minimumintegerdigits the minimum
number of integer digits to use.
...And 6 more matches
Math.hypot() - JavaScript
numbers.
...if at least one of the arguments cannot be converted to a
number, nan is returned.
... description calculating the hypotenuse of a right triangle, or the magnitude of a complex
number, uses the formula math.sqrt(v1*v1 + v2*v2), where v1 and v2 are the lengths of the triangle's legs, or the complex
number's real and complex components.
...And 6 more matches
Math - JavaScript
math works with the
number type.
...constants are defined with the full precision of real
numbers in javascript.
... math.asinh(x) returns the hyperbolic arcsine of a
number.
...And 6 more matches
lang/type - Archive of obsolete content
is
number(value) returns true if value is a
number, false otherwise.
... uses typeof operator to check type, and will only properly detect
number primitives: for example, a
number created with new
number() will always return false.
... let { is
number } = require('sdk/lang/type'); is
number(3.1415); // true is
number(100); // true is
number('100'); // false parameters value : mixed the variable to check.
...And 5 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
can be in e-mail address format or guid format --> <em:id>helloworld@xuldev.org</em:id> <!-- indicates that this add-on is an extension --> <em:type>2</em:type> <!-- extension name displayed in add-on manager --> <em:name>hello, world!</em:name> <!-- extension version
number.
... there is a version
numbering scheme you must follow --> <em:version>0.1</em:version> <!-- brief description displayed in add-on manager --> <em:description>my first extension.</em:description> <!-- name of extension's primary developer.
...there are a
number of ways to go about this; here, we’ll use the dom inspector (figure 5).
...And 5 more matches
Tree Box Objects - Archive of obsolete content
the scrollbylines() scrolls up or down by a certain
number of rows.
... use a positive
number to go down and a negative
number to go up.
... the scrollbypages() function scrolls by a
number of pages and is called automatically when the user presses the page up or page down keys while the tree is focused.
...And 5 more matches
richlistbox - Archive of obsolete content
ex, value properties accessibletype, currentindex, currentitem, disabled, disablekeynavigation, itemcount, scrollboxobject, selectedcount, selectedindex, selecteditem, selecteditems, seltype, suppressonselect, tabindex, value methods additemtoselection, appenditem, clearselection, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, get
numberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, movebyoffset, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <richlistbox> <richlistitem> <description>a xul description!</description> </richlistitem> <richlistitem> <button label="a xul button"/> </richlistitem> </...
... itemcount type: integer read only property holding the
number of child items.
... selectedcount type: integer returns the
number of items that are currently selected.
...And 5 more matches
NPN_Version - Archive of obsolete content
syntax #include <npapi.h> void npn_version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor); parameters the function has the following parameters: plugin_major pointer to a plug-in's major version
number; changes with major code release
number.
... plugin_minor pointer to a plug-in's minor version
number; changes with point release
number.
... netscape_major pointer to the browser's major version; changes with major code release
number.
...And 5 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
in addition to a public key, a certificate always includes the name of the entity it identifies, an expiration date, the name of the ca that issued the certificate, a serial
number, and other information.
...ssl is widely used on the internet, especially for interactions that involve exchanging confidential information such as credit card
numbers.
...the encrypted ssl session ensures that personal information sent over the network, such as credit card
numbers, cannot easily be intercepted.
...And 5 more matches
Legacy layout methods - Learn web development
you imagine your layout as a set
number of columns (e.g.
... layout containers that we want to span more than one column need to be given special classes to adjust their width values to the required
number of columns (plus gutters in between).
...each width is the result of adding up the column width of that
number of columns plus the gutter widths, which will always
number one less than the
number of columns.
...And 5 more matches
Tips for authoring fast-loading HTML pages - Learn web development
minimize the
number of files reducing the
number of files referenced in a web page lowers the
number of http connections required to download a page, thereby reducing the time for these requests to be sent, and for their responses to be received.
... if you use background images a lot in your css, you can reduce the
number of http lookups needed by combining the images into one, known as an image sprite.
... further reading: understanding cdns reduce domain lookups since each separate domain costs time in a dns lookup, the page load time will grow along with the
number of separate domains appearing in css link(s) and javascript and image src(es).
...And 5 more matches
Making decisions in your code — conditionals - Learn web development
for example, in a game, if the player's
number of lives is 0, then it's game over.
...we first looked at comparison operators back in our basic math in javascript —
numbers and operators article.
...for cases where you just want to set a variable to a certain choice of value or print out a particular statement depending on a condition, the syntax can be a bit cumbersome, especially if you've got a large
number of choices.
...And 5 more matches
Drawing graphics - Learn web development
add the following to the previous example, again below the previous javascript lines: ctx.strokestyle = 'rgb(255, 255, 255)'; ctx.strokerect(25, 25, 175, 200); the default width of strokes is 1 pixel; you can adjust the linewidth property value to change this (it takes a
number representing the
number of pixels wide the stroke is).
... there are also a
number of properties to help control text rendering such as font, which lets you specify font family, size, etc.
... the bottom of the javascript: function degtorad(degrees) { return degrees * math.pi / 180; }; function rand(min, max) { return math.floor(math.random() * (max-min+1)) + (min); } let length = 250; let moveoffset = 20; for(var i = 0; i < length; i++) { } here we are implementing the same degtorad() function we saw in the triangle example above, a rand() function that returns a random
number between given lower and upper bounds, length and moveoffset variables (which we'll find out more about later), and an empty for loop.
...And 5 more matches
HTMLIFrameElement.sendTouchEvent()
x an array of
numbers representing the x position of each touch point relative to the browser <iframe>'s visible area in css pixels.
... y an array of
numbers representing the y position of each touch point relative to the browser <iframe>'s visible area in css pixels.
... rx an array of
numbers representing the x radius of each touch point in css pixels.
...And 5 more matches
JNI.jsm
unlike c from js-ctypes, defining constants is not a manual magic
number method in jni, it is declared the same way we define functions, except in jni they are called fields.
... working with arrays creating/preallocating a typed array methods cdata .get(
number aindex); cdata .getelements(
number astart,
number alength); void .set(
number aindex, cdata avalue); void .setelements(
number astart, [array, size_is(arr.length >
number any
number > 0)] in cdata avalsarray); .get() gets the value of the element in the array at given aindex.
... cdata get(
number aindex); parameters aindex the position in the array to obtain.
...And 5 more matches
NSS API Guidelines
specifically, this library provides nss_init() for establishing default certificate, key, module databases, and initializing a default random
number generator.
...the library supports base-64 encoding/decoding, reader-writer locks, the secitem data type, der encoding/decoding, error types and
numbers, oid handling, and secure random
number generation.
...if you're good with tagging your releases, and then checking out (or exporting!) from the tag for your build, this saves you from messing around with specific files revision
numbers.
...And 5 more matches
Hacking Tips
the backtrace contains in the following order, the stack depth, the interpreter frame pointer (see js/src/vm/stack.h, stackframe class) or (nil) if compiled with ionmonkey, the file and line
number of the call location and under parentheses, the jsscript pointer and the jsbytecode pointer (pc) executed.
... step next a few times, so that the "code" variable gets generated print code->code_, which is the address of the code disassembly code read at this address (using x/ni address, where n is the
number of instructions you would like to see) here is an example.
...let's say that the line
number of this function is 4780, for instance: (gdb) b codegenerator.cpp:4780 breakpoint 1 at 0x84cade0: file /home/code/mozilla-central/js/src/ion/codegenerator.cpp, line 4780.
...And 5 more matches
mozIStorageBindingParams
this will be one less than the
number used in the sql (<code>?1</code> maps to <code>0</code>, and so on).
...this will be one less than the
number used in the sql (<code>?1</code> maps to <code>0</code>, and so on).
...this will be one less than the
number used in the sql (<code>?1</code> maps to <code>0</code>, and so on).
...And 5 more matches
nsIHttpChannelInternal
localport print32 the local port
number to which the channel is bound.
... remoteport print32 the remote port
number to which the channel is bound.
... methods getrequestversion() gets the request's major and minor version
numbers.
...And 5 more matches
nsITransactionManager
action(in nsitransaction atransaction); void endbatch(); nsitransactionlist getredolist(); nsitransactionlist getundolist(); nsitransaction peekredostack(); nsitransaction peekundostack(); void redotransaction(); void removelistener(in nsitransactionlistener alistener); void undotransaction(); attributes attribute type description maxtransactioncount long sets the maximum
number of transaction items the transaction manager will maintain at any time.
... this is commonly referred to as the
number of levels of undo.
...a value greater than zero indicates the max
number of transactions that can exist at any time on both the undo and redo stacks.
...And 5 more matches
Applying styles and colors - Web APIs
getlinedash() returns the current line dash pattern array containing an even
number of non-negative
numbers.
...values must be positive
numbers.
... 150); // draw guides ctx.strokestyle = '#09f'; ctx.linewidth = 2; ctx.strokerect(-5, 50, 160, 50); // set line styles ctx.strokestyle = '#000'; ctx.linewidth = 10; // check input if (document.getelementbyid('miterlimit').value.match(/\d+(\.\d+)?/)) { ctx.miterlimit = parsefloat(document.getelementbyid('miterlimit').value); } else { alert('value must be a positive
number'); } // draw lines ctx.beginpath(); ctx.moveto(0, 100); for (i = 0; i < 24 ; i++) { var dy = i % 2 == 0 ?
...And 5 more matches
Document.requestStorageAccess() - Web APIs
assuming all of the requirements above are satisfied, firefox will automatically grant storage access to the requesting origin on up to a threshold
number of first-party origins in the current session for the duration of user’s session, up to a maximum of 24 hours.
... after the requesting origin has exceeded the maximum allowable
number of storage access grants, any future call to requeststorageaccess() during the same browsing session will prompt the user.
... the maximum
number of concurrent storage access grants an origin can obtain is a positive integer currently defined as one percent of the
number of top-level origins visited in the current session or 5, whichever is higher.
...And 5 more matches
MediaConfiguration - Web APIs
if the media is an audio file, the audio configuration must include a valid audio mime type as contenttype, the
number of channels, the bitrate, and the sample rate.
... channels:
number of channels used by the audio track.
... bitrate:
number of bits used to encode one second of the audio file.
...And 5 more matches
SVGFESpotLightElement - Web APIs
svgfespotlightelement.x read only an svganimated
number corresponding to the x attribute of the given element.
... svgfespotlightelement.y read only an svganimated
number corresponding to the y attribute of the given element.
... svgfespotlightelement.z read only an svganimated
number corresponding to the z attribute of the given element.
...And 5 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
when to use msaa, and when not to it's a common mistake to say that msaa is not worth using, for a
number of reasons.
... don't use msaa if you're working with a small
number of at vendors, you can get everyone to agree on a different solution, and you're sure that you won't be needing to support other assistive technologies later.
...[important] get_accchildcount: get the
number of children of an iaccessible.
...And 5 more matches
<color> - CSS: Cascading Style Sheets
functional notation: rgb[a](r, g, b[, a]) r (red), g (green), and b (blue) can be either <
number>s or <percentage>s, where the
number 255 corresponds to 100%.
... a (alpha) can be a <
number> between 0 and 1, or a <percentage>, where the
number 1 corresponds to 100% (full opacity).
...when written as a unitless <
number>, it is interpreted as degrees, as specified in css color module level 3.
...And 5 more matches
flex - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: flex-grow flex-shrink flex-basis syntax /* keyword values */ flex: auto; flex: initial; flex: none; /* one value, unitless
number: flex-grow */ flex: 2; /* one value, width/height: flex-basis */ flex: 10em; flex: 30%; flex: min-content; /* two values: flex-grow | flex-basis */ flex: 1 30px; /* two values: flex-grow | flex-shrink */ flex: 2 2; /* three values: flex-grow | flex-shrink | flex-basis */ flex: 2 2 10%; /* global values */ flex: inherit; flex: initial; flex: unset; the flex property may be specified using o...
... one-value syntax: the value must be one of: a <
number>: in this case it is interpreted as flex: <
number> 1 0; the <flex-shrink> value is assumed to be 1 and the <flex-basis> value is assumed to be 0.
... two-value syntax: the first value must be a <
number> and it is interpreted as <flex-grow>.
...And 5 more matches
<resolution> - CSS: Cascading Style Sheets
syntax the <resolution> data type consists of a strictly positive <
number> followed by one of the units listed below.
... as with all css dimensions, there is no space between the unit literal and the
number.
... units dpi represents the
number of dots per inch.
...And 5 more matches
<textarea> - HTML: Hypertext Markup Language
the above example demonstrates a
number of features of <textarea>: an id attribute to allow the <textarea> to be associated with a <label> element for accessibility purposes a name attribute to set the name of the associated data point submitted to the server when the form is submitted.
... maxlength the maximum
number of characters (utf-16 code units) that the user can enter.
... if this value isn't specified, the user can enter an unlimited
number of characters.
...And 5 more matches
Browser detection using the user agent - HTTP
most browsers set the name and version in the format browsername/version
number, with the notable exception of internet explorer.
... must contain must not contain firefox firefox/xyz seamonkey/xyz seamonkey seamonkey/xyz chrome chrome/xyz chromium/xyz chromium chromium/xyz safari safari/xyz chrome/xyz or chromium/xyz safari gives two version
numbers: one technical in the safari/xyz token, and one user-friendly in a version/xyz token opera opr/xyz [1] opera/xyz [1] opera 15+ (blink-based engine) [2] opera 12- (presto-based engine) internet explorer ; msie xyz; [1] trident/7.0; .*rv:xyz [2] [1] internet explorer 10- [2] internet explorer 11 of course,...
...that's why browser detection using the user agent string is unreliable and should be done only with the check of the version
number (hijacking of past versions is less likely).
...And 5 more matches
HTTP headers - HTTP
content-dpr a
number that indicates the ratio between physical pixels over css pixels of the selected image response.
... dpr a
number that indicates the client’s current device pixel ratio (dpr), which is the ratio of physical pixels over css pixels (section 5.2 of [cssval]) of the layout viewport (section 9.1.1 of [css2]) on the device.
... viewport-width a
number that indicates the layout viewport width in css pixels.
...And 5 more matches
Regular expressions - JavaScript
quantifiers indicate
numbers of characters or expressions to match.
... characters / constructs corresponding article \, ., \cx, \d, \d, \f, \n, \r, \s, \s, \t, \v, \w, \w, \0, \xhh, \uhhhh, \uhhhhh, [\b] character classes ^, $, x(?=y), x(?!y), (?<=y)x, (?<!y)x, \b, \b assertions (x), (?:x), (?<name>x), x|y, [xyz], [^xyz], \
number groups and ranges *, +, ?, x{n}, x{n,}, x{n,m} quantifiers \p{unicodeproperty}, \p{unicodeproperty} unicode property escapes note: a larger cheatsheet is also available (only aggregating parts of those individual articles).
... examples note: several examples are also available in: the reference pages for exec(), test(), match(), matchall(), search(), replace(), split() this guide articles': character classes, assertions, groups and ranges, quantifiers, unicode property escapes using special characters to verify input in the following example, the user is expected to enter a phone
number.
...And 5 more matches
Text formatting - JavaScript
the length of a string is the
number of elements in it.
... string literals you can create simple strings using either single or double quotes: 'foo' "bar" more advanced strings can be created using escape sequences: hexadecimal escape sequences the
number after \x is interpreted as a hexadecimal
number.
...with unicode code point escapes, any character can be escaped using hexadecimal
numbers so that it is possible to use unicode code points up to 0x10ffff.
...And 5 more matches
Working with objects - JavaScript
however, any property name that is not a valid javascript identifier (for example, a property name that has a space or a hyphen, or that starts with a
number) can only be accessed using the square bracket notation.
...examples are as follows: // four variables are created and assigned in a single go, // separated by commas var myobj = new object(), str = 'mystring', rand = math.random(), obj = new object(); myobj.type = 'dot syntax'; myobj['date created'] = 'string with space'; myobj[str] = 'string value'; myobj[rand] = 'random
number'; myobj[obj] = 'object'; myobj[''] = 'even an empty string'; console.log(myobj); please note that all keys in the square bracket notation are converted to string unless they're symbols, since javascript object property names (keys) can only be strings or symbols (at some point, private names will also be added as the class fields proposal progresses, but you won't us...
... creating new objects javascript has a
number of predefined objects.
...And 5 more matches
Array.prototype.sort() - JavaScript
in a numeric sort, 9 comes before 80, but because
numbers are converted to strings, "80" comes before "9" in the unicode order.
... so, the compare function has the following form: function compare(a, b) { if (a is less than b by some ordering criterion) { return -1; } if (a is greater than b by the ordering criterion) { return 1; } // a must be equal to b return 0; } to compare
numbers instead of strings, the compare function can simply subtract b from a.
... the following function will sort the array in ascending order (if it doesn't contain infinity and nan): function compare
numbers(a, b) { return a - b; } the sort method can be conveniently used with function expressions: var
numbers = [4, 2, 5, 1, 3];
numbers.sort(function(a, b) { return a - b; }); console.log(
numbers); // [1, 2, 3, 4, 5] es2015 provides arrow function expressions with even shorter syntax.
...And 5 more matches
JSON.stringify() - JavaScript
replacer optional a function that alters the behavior of the stringification process, or an array of string and
number that serve as an allowlist for selecting/filtering the properties of the value object to be included in the json string.
... space optional a string or
number object that's used to insert white space into the output json string for readability purposes.
... if this is a
number, it indicates the
number of space characters to use as white space; this
number is capped at 10 (if it is greater, the value is just 10).
...And 5 more matches
Math.ceil() - JavaScript
the math.ceil() function always rounds a
number up to the next largest integer.
... syntax math.ceil(x) parameters x a
number.
... return value the smallest integer greater than or equal to the given
number.
...And 5 more matches
Math.floor() - JavaScript
the math.floor() function returns the largest integer less than or equal to a given
number.
... syntax math.floor(x) parameters x a
number.
... return value a
number representing the largest integer less than or equal to the specified
number.
...And 5 more matches
Lexical grammar - JavaScript
any
number of lines of code can be disabled this way.
... true false numeric literals the
number and bigint types use numeric literals.
... decimal 1234567890 42 // caution when using with a leading zero: 0888 // 888 parsed as decimal 0777 // parsed as octal, 511 in decimal note that decimal literals can start with a zero (0) followed by another decimal digit, but if all digits after the leading 0 are smaller than 8, the
number is interpreted as an octal
number.
...And 5 more matches
kernelUnitLength - SVG: Scalable Vector Graphics
value <
number-optional-
number> default value pixel in offscreen bitmap animatable yes <
number-optional-
number> the first
number is the x value.
... the second
number is the y value.
... the first
number is the x value.
...And 5 more matches
jspage - Archive of obsolete content
ction(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:["concat","indexof","join","lastindexof","pop","push","reverse","shift","slice","sort","splice","tostring","unshift","valueof"],string:["charat","charcodeat","concat","indexof","lastindex...
...l;}function $random(b,a){return math.floor(math.random()*(a-b+1)+b);}function $splat(b){var a=$type(b); return(a)?((a!="array"&&a!="arguments")?[b]:b):[];}var $time=date.now||function(){return +new date;};function $try(){for(var b=0,a=arguments.length;b<a; b++){try{return arguments[b]();}catch(c){}}return null;}function $type(a){if(a==undefined){return false;}if(a.$family){return(a.$family.name=="
number"&&!isfinite(a))?false:a.$family.name; }if(a.nodename){switch(a.nodetype){case 1:return"element";case 3:return(/\s/).test(a.nodevalue)?"textnode":"whitespace";}}else{if(typeof a.length=="
number"){if(a.callee){return"arguments"; }else{if(a.item){return"collection";}}}}return typeof a;}function $unlink(c){var b;switch($type(c)){case"object":b={};for(var e in c){b[e]=$unlink(c[e]); }break;case"hash":...
...ents:a});},bind:function(b,a){return this.create({bind:b,arguments:a}); },bindwithevent:function(b,a){return this.create({bind:b,arguments:a,event:true});},attempt:function(a,b){return this.create({bind:b,arguments:a,attempt:true})(); },delay:function(b,c,a){return this.create({bind:c,arguments:a,delay:b})();},periodical:function(c,b,a){return this.create({bind:b,arguments:a,periodical:c})(); }});
number.implement({limit:function(b,a){return math.min(a,math.max(b,this));},round:function(a){a=math.pow(10,a||0);return math.round(this*a)/a;},times:function(b,c){for(var a=0; a<this;a++){b.call(c,a,this);}},tofloat:function(){return parsefloat(this);},toint:function(a){return parseint(this,a||10);}});
number.alias("times","each"); (function(b){var a={};b.each(function(c){if(!
number[c]){a[c]=function(){...
...And 4 more matches
Adding Properties to XBL-defined Elements - Archive of obsolete content
the example below creates a button which generates and stores a random
number.
... you can retrieve this same
number multiple times by getting the
number property from the button.
...xul: <box id="random-box" class="randomizer"/> <button label="generate" oncommand="document.getelementbyid('random-box').
number=math.random();"/> <button label="show" oncommand="alert(document.getelementbyid('random-box').
number)"/> xbl: <binding id="randomizer"> <implementation> <field name="
number"/> </implementation> </binding> a
number field has been defined in the binding, which stores the random
number.
...And 4 more matches
XBL Example - Archive of obsolete content
along the bottom, we'll need a button to go the previous page, a label to display the current page
number, and a button to go to the next page.
...the flex attribute has been added to a
number of elements so that it stretches in the right way.
...when getting this custom property, it will need to retrieve the value of the selectedindex attribute of the deck, which holds the
number of the currently displayed page.
...And 4 more matches
WAI-ARIA basics - Learn web development
for example, html5 introduced a
number of semantic elements to define common page features (<nav>, <footer>, etc.) before these were available, developers would simply use <div>s with ids or classes, e.g.
...rors" role="alert" aria-relevant="all"> <ul> </ul> </div> role="alert" automatically turns the element it is applied to into a live region, so changes to it are read out; it also semantically identifies it as an alert message (important time/context sensitive information), and represents a better, more accessible way of delivering an alert to a user (modal dialogs like alert() calls have a
number of accessibility problems; see popup windows by webaim).
...update the <input> elements like so: <input type="text" name="name" id="name" aria-required="true"> <input type="
number" name="age" id="age" aria-required="true"> if you save the example now and test it with a screenreader, you should hear something like "enter your name star, required, edit text".
...And 4 more matches
Test your skills: Math - Learn web development
this aim of this skill test is to assess whether you've understood our basic math in javascript —
numbers and operators article.
...finally, we need to write a test that proves that this value is an even
number.
... so, try updating the live code below to recreate the finished example, following these steps: create four variables that contain
numbers.
...And 4 more matches
Useful string methods - Learn web development
when you create a string, for example by using let string = 'this is my string'; your variable becomes a string object instance, and as a result has a large
number of properties and methods available to it.
...try entering the following lines: let browsertype = 'mozilla'; browsertype.length; this should return the
number 7, because "mozilla" is 7 characters long.
...inside the square brackets you include the
number of the character you want to return, so for example to retrieve the first letter you'd do this: browsertype[0]; remember: computers count from 0, not 1!
...And 4 more matches
Refcount tracing and balancing
xpcom_mem_alloc_log for platforms that don't have stack-crawl support, xpcom supports logging at the call site to addref/release using the usual cpp __file__ and __line__
number macro expansion hackery.
...note that setting xpcom_mem_log_classes will also list the serial
number of each object that leaked in the "bloat log" (that is, the file specified by the xpcom_mem_bloat_log variable; see the bloatview documentation for more details).
... an object's serial
number is simply a unique
number, starting at one, that is assigned to the object when it is allocated.
...And 4 more matches
NSS Code Coverage
numbers in tested files example: 72.69% (165/227/731) 72.69% - ratio of tested blocks and total blocks in file (generated by tcov).
...
numbers in not tested files example: not tested (0/?/878).
...- total blocks in file (there is no trivial method to get this
number without tcov).
...And 4 more matches
NSS tools : certutil
arguments arguments modify a command option and are usually lower case,
numbers, or symbols.
... -m serial-
number assign a unique serial
number to a certificate being created.
...if no serial
number is provided a default serial
number is made from the current time.
...And 4 more matches
NSS Tools certutil
-m serial-
number assign a unique serial
number to a certificate being created.
...the default serial
number is 0 (zero).
... serial
numbers are limited to integers.
...And 4 more matches
certutil
-m serial-
number assign a unique serial
number to a certificate being created.
...the default serial
number is 0 (zero).
... serial
numbers are limited to integers.
...And 4 more matches
Statistics API
total_time:
number (milliseconds) - the amount of wall time that this gc consumed.
... compartments_collected: integer - the
number of compartments that were collected by the gc.
... compartment_count: integer - the
number of compartments that were present in the system at the end of the gc.
...And 4 more matches
JS_GetGCParameter
typedef enum jsgcparamkey { jsgc_max_bytes, jsgc_max_malloc_bytes, jsgc_max_nursery_bytes, jsgc_bytes, jsgc_
number, jsgc_mode, jsgc_unused_chunks, jsgc_total_chunks, jsgc_slice_time_budget, jsgc_mark_stack_limit, jsgc_high_frequency_time_limit, jsgc_high_frequency_low_limit, jsgc_high_frequency_high_limit, jsgc_high_frequency_heap_growth_max, jsgc_high_frequency_heap_growth_min, jsgc_low_frequency_heap_growth, jsgc_dynamic_heap_growth, jsgc_dynamic_mark_slic...
... jsgc_max_malloc_bytes / "maxmallocbytes"
number of js_malloc bytes before last ditch gc.
... jsgc_
number / "gc
number"
number of times gc has been invoked.
...And 4 more matches
JS_NewDouble
use js_new
numbervalue instead.
... syntax jsdouble * js_newdouble(jscontext *cx, jsdouble d); name type description cx jscontext * the context in which to create the new
number.
... d jsdouble the
number to copy.
...And 4 more matches
Parser API
line
number default: 1 the initial line
number to use for source location information.
...the line
number and filename properties of the syntax error object indicate the source location of the syntax error.
... the node's source location, the field is null; otherwise it is an object consisting of a start position (the position of the first character of the parsed source region) and an end position (the position of the first character after the parsed source region): interface sourcelocation { source: string | null; start: position; end: position; } each position object consists of a line
number (1-indexed) and a column
number (0-indexed): interface position { line: uint32 >= 1; column: uint32 >= 0; } programs interface program <: node { type: "program"; body: [ statement ]; } a complete program source tree.
...And 4 more matches
Mozilla internal string guide
there are a
number of additional string classes: classes which exist primarily as constructors for the other types, particularly nsdependent[c]string and nsdependent[c]substring.
...common read-only methods: .length() - the
number of code units (bytes for 8-bit string classes and char16_ts for 16-bit string classes) in the string.
...if you want a
number other than 64, use the templated types nsautostringn / nsautocstringn.
...And 4 more matches
mozIStorageConnection
anumarguments the
number of arguments the function takes.
... the expression may use "?#" to indicate sequentially
numbered parameters (?1, ?2, etc) or ":name" to indicate named parameters.
... anumarguments the
number of arguments the function takes.
...And 4 more matches
nsIConsoleService
count the
number of messages in the array.
... void getmessagearray( [optional] out pruint32 count, [retval, array, size_is(count)] out nsiconsolemessage messages ); parameters count the
number of messages in the array.
...in this example nsiscripterror, which implements nsiconsolemessage, is used to include information about the source file and line
number of the error.
...And 4 more matches
nsIDOMWindow
scrollby() scrolls the window by a given
number of pixels relative to the current scroll position.
... void scrollby( in long xscrolldif, in long yscrolldif ); parameters xscrolldif the
number of pixels by which to scroll horizontally.
... yscrolldif the
number of pixels by which to scroll vertically.
...And 4 more matches
nsIFile
diskspaceavailable print64 the
number of bytes available to non-superuser on the disk volume containing the nsifile.
... filesize print64 the value of this attribute is the
number of bytes corresponding to the data represented by the file.
... the value of this attribute is the
number of bytes corresponding to the data represented by the symbolic link.
...And 4 more matches
nsIInputStream
methods available() determine
number of bytes available in the stream.
... in addition to the
number of bytes available in the stream, this method also informs the caller of the current status of the stream.
... return value
number of bytes currently available in the stream, or pr_uint32_max if the size of the stream exceeds pr_uint32_max.
...And 4 more matches
nsILoginManager
nsiautocompleteresult autocompletesearch( in astring asearchstring, in nsiautocompleteresult apreviousresult, in nsidomhtmlinputelement aelement ); parameters asearchstring missing description apreviousresult missing description aelement missing description return value missing description countlogins() returns the
number of logins matching the specified criteria.
... called when only the
number of logins is needed, and not the actual logins (which avoids prompting the user for a master password, as the logins don't need to be decrypted).
... return value the
number of logins matching the parameters passed.
...And 4 more matches
nsILoginManagerStorage
countlogins() implement this method to return the
number of logins matching the specified criteria.
... return value the
number of logins that match the specified criteria.
...void findlogins( out unsigned long count, in astring ahostname, in astring aactionurl, in astring ahttprealm, [retval, array, size_is(count)] out nsilogininfo logins ); parameters count return in this parameter the
number of matching logins found by the search.
...And 4 more matches
nsIRadioInterfaceLayer
= components.classes["@mozilla.org/telephony/system-worker-manager;1"] .getservice(components.interfaces.nsiinterfacerequestor) .createinstance(components.interfaces.nsiradiointerfacelayer); method overview void answercall(in unsigned long callindex); void deactivatedatacall(in domstring cid, in domstring reason); void dial(in domstring
number); void enumeratecalls(in nsiriltelephonycallback callback); void getdatacalllist(); unsigned short get
numberofmessagesfortext(in domstring text); void hangup(in unsigned long callindex); void registercallback(in nsiriltelephonycallback callback); void registerdatacallcallback(in nsirildatacallback callback); void rejectcall(in unsigned long callindex); void sendsms(in domstring nu...
...void dial( in domstring
number ); parameters
number missing description exceptions thrown missing exception missing description enumeratecalls() will continue calling callback.enumeratecallstate until the callback returns false.
...exceptions thrown missing exception missing description get
numberofmessagesfortext() returns the
number of multi-part sms needed for a given text (160 characters for one sms).
...And 4 more matches
Adding items to the Folder Pane
the result is a javascript file that will add a "
numbers" container to the end of thunderbird's "all folders" mode.
... that container will have 3 child-items, the
numbers 1, 2, and 3.
... clicking on those items will display the
number in the main viewing pane of thunderbird.
...And 4 more matches
ArrayType
ctype arraytype() type[ length] ); parameters type: it represents the type of the elements or variable which is going to be present in an array length optional it denotes the
number of entries present in an array or the
number of elements that an array should contain.
... exceptions thrown typeerror type is not a ctype, or type.size is undefined.if the length is specifed but if it is not a valid one,then it is also thrown rangeerror the size of the resulting array can't be represented as both a size_t and as a javascript
number.
... length
number the
number of elements in the array, or undefined if the array type doesn't have a specified length.
...And 4 more matches
CSS Grid Inspector: Examine grid layouts - Firefox Developer Tools
discovering css grids when an html element on your page has display: grid applied to it, a
number of features are made available in the devtools to provide easy access to grid features.
... the layout view grid section when grids are included on a page, the css pane's layout view includes a "grid" section containing a
number of options for viewing those grids.
... grid options the grid section of the layout view looks like this: you'll see a
number of options contained within: overlay grid: contains a checkbox for each grid present on the page, along with various options.
...And 4 more matches
Call Tree - Firefox Developer Tools
statistically, the
number of samples taken in which we were executing a particular function corresponds to the amount of time the browser spent executing it.
...each row represents a function in which at least one sample was taken, and the rows are ordered by the
number of samples taken while in that function, highest to lowest.
... samples is the
number of samples that were taken when we were executing this particular function, including its children (the other functions called by this particular function).
...And 4 more matches
Crypto.getRandomValues() - Web APIs
the array given as the parameter is filled with random
numbers (random in its cryptographic meaning).
... to guarantee enough performance, implementations are not using a truly random
number generator, but they are using a pseudo-random
number generator seeded with a value with enough entropy.
... the pseudo-random
number generator algorithm (prng) may vary across user agents, but is suitable for cryptographic purposes.
...And 4 more matches
SVGLengthList - Web APIs
svglength initialize(in svglength newitem) svglength getitem(in unsigned long index) svglength insertitembefore(in svglength newitem, in unsigned long index) svglength replaceitem(in svglength newitem, in unsigned long index) svglength removeitem(in unsigned long index) svglength appenditem(in svglength 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.
... length unsigned long the
number of items in the list.
...the first item is
number 0.
...And 4 more matches
SVGStringList - Web APIs
ring initialize(in domstring newitem) 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.
... length unsigned long a mirror of the value in
numberofitems, for consistency with other interfaces.
...the first item is
number 0.
...And 4 more matches
SVGTransformList - Web APIs
efore(in svgtransform newitem, in unsigned 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.
... length unsigned long the
number of items in the list.
...the first item is
number 0.
...And 4 more matches
Selection - Web APIs
selection.anchoroffsetread only returns a
number representing the offset of the selection's anchor within the anchornode.
... if anchornode is a text node, this is the
number of characters within anchornode preceding the anchor.
... if anchornode is an element, this is the
number of child nodes of the anchornode preceding the anchor.
...And 4 more matches
Window - Web APIs
window.length read only returns the
number of frames in the window.
... window.scrollx read only returns the
number of pixels that the document has already been scrolled horizontally.
... window.scrolly read only returns the
number of pixels that the document has already been scrolled vertically.
...And 4 more matches
OpenType font features guide - CSS: Cascading Style Sheets
these include things like ligatures (special glyphs that combine characters like 'fi' or 'ffl'), kerning (adjustments to the spacing between specific letterform pairings), fractions, numeral styles, and a
number of others.
... numerals within paragraphs of text set as 'oldstyle' sit more comfortably between lower-case letters, and likewise setting them as 'tabular
numbers' will make them line up better when setting a list of costs in a table say.
... the font features there are a
number of different features to consider.
...And 4 more matches
backdrop-filter - CSS: Cascading Style Sheets
puted 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>?
... )<grayscale()> = grayscale( <
number-percentage> )<hue-rotate()> = hue-rotate( <angle> )<invert()> = invert( <
number-percentage> )<opacity()> = opacity( [ <
number-percentage> ] )<saturate()> = saturate( <
number-percentage> )<sepia()> = sepia( <
number-percentage> )where <
number-percentage> = <
number> | <percentage><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... ) | rgb( <
number>{3} [ / <alpha-value> ]?
...And 4 more matches
content - CSS: Cascading Style Sheets
this value can be any
number of text characters.
... <counter>() the value of a css counter, generally a
number.
...) | rgb( <
number>{3} [ / <alpha-value> ]?
...And 4 more matches
font-variant-numeric - CSS: Cascading Style Sheets
the font-variant-numeric css property controls the usage of alternate glyphs for
numbers, fractions, and ordinal markers.
... <numeric-figure-values> these values control the figures used for
numbers.
... two values are possible: lining-nums activating the set of figures where
numbers are all lying on the baseline.
...And 4 more matches
font-weight - CSS: Cascading Style Sheets
<
number> a <
number> value between 1 and 1000, inclusive.
... higher
numbers represent weights that are bolder than (or as bold as) lower
numbers.
... css fonts level 4 extends the syntax to accept any
number between 1 and 1000 and introduces variable fonts, which can make use of this much finer-grained range of font weights.
...And 4 more matches
<input type="text"> - HTML: Hypertext Markup Language
additional attributes in addition to the attributes that operate on all <input> elements regardless of their type, text inputs support the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum
number of characters the input should accept minlength the minimum
number of characters long the input can be and still be considered valid pattern a regular expression the input's contents must match in order to be valid placeholder an exemplar value to display in the input field whenever it is empty readonly a boolean attribute indicating whether or not ...
...the contents of the input should be read-only size a
number indicating how many characters wide the input field should be spellcheck controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used list the values of the list attribute is the id of a <datalist> element located in the same document.
... maxlength the maximum
number of characters (as utf-16 code units) the user can enter into the text input.
...And 4 more matches
<ol>: The Ordered List element - HTML: Hypertext Markup Language
the html <ol> element represents an ordered list of items — typically rendered as a
numbered list.
...items will be
numbered from high to low.
...always an arabic numeral (1, 2, 3, etc.), even when the
numbering type is letters or roman numerals.
...And 4 more matches
Array.prototype.map() - JavaScript
return a return a; }; } examples mapping an array of
numbers to an array of square roots the following code takes an array of
numbers and creates a new array containing the square roots of the
numbers in the first array.
... let
numbers = [1, 4, 9] let roots =
numbers.map(function(num) { return math.sqrt(num) }) // roots is now [1, 2, 3] //
numbers is still [1, 4, 9] using map to reformat objects in an array the following code takes an array of objects and creates a new array containing the newly reformatted objects.
... let kvarray = [{key: 1, value: 10}, {key: 2, value: 20}, {key: 3, value: 30}] let reformattedarray = kvarray.map(obj => { let robj = {} robj[obj.key] = obj.value return robj }) // reformattedarray is now [{1: 10}, {2: 20}, {3: 30}], // kvarray is still: // [{key: 1, value: 10}, // {key: 2, value: 20}, // {key: 3, value: 30}] mapping an array of
numbers using a function containing an argument the following code shows how map works when a function requiring one argument is used with it.
...And 4 more matches
Math.clz32() - JavaScript
the math.clz32() function returns the
number of leading zero bits in the 32-bit binary representation of a
number.
... syntax math.clz32(x) parameters x a
number.
... return value the
number of leading zero bits in the 32-bit binary representation of the given
number.
...And 4 more matches
Math.imul() - JavaScript
syntax var product = math.imul(a, b); parameters a first
number.
... b second
number.
...if you use normal javascript floating point
numbers in imul, you will experience a degrade in performance.
...And 4 more matches
Math.random() - JavaScript
the math.random() function returns a floating-point, pseudo-random
number in the range 0 to less than 1 (inclusive of 0, but not 1) with approximately uniform distribution over that range — which you can then scale to your desired range.
... the implementation selects the initial seed to the random
number generation algorithm; it cannot be chosen or reset by the user.
... math.random() does not provide cryptographically secure random
numbers.
...And 4 more matches
Math.random() - JavaScript
the math.random() function returns a floating-point, pseudo-random
number in the range 0 to less than 1 (inclusive of 0, but not 1) with approximately uniform distribution over that range — which you can then scale to your desired range.
... the implementation selects the initial seed to the random
number generation algorithm; it cannot be chosen or reset by the user.
... math.random() does not provide cryptographically secure random
numbers.
...And 4 more matches
Math.sign() - JavaScript
the math.sign() function returns either a positive or negative +/- 1, indicating the sign of a
number passed into the argument.
... if the
number passed into math.sign() is 0, it will return a +/- 0.
... note that if the
number is positive, an explicit (+) will not be returned.
...And 4 more matches
NaN - JavaScript
the global nan property is a value representing not-a-
number.
... the initial value of nan is not-a-
number — the same as the value of
number.nan.
... there are five different types of operations that return nan:
number cannot be parsed (e.g.
...And 4 more matches
Promise - JavaScript
the example function tetheredget
number() shows that a promise generator will utilize reject() while setting up an asynchronous call, or within the call-back, or both.
... note that function troublewithget
number() ends with a throw().
... "use strict"; // to experiment with error handling, "threshold" values cause errors randomly const threshold_a = 8; // can use zero 0 to guarantee error function tetheredget
number(resolve, reject) { try { settimeout( function() { const randomint = date.now(); const value = randomint % 10; try { if(value >= threshold_a) { throw new error(`too large: ${value}`); } } catch(msg) { reject(`error in callback ${msg}`); } resolve(value); return; }, 500); // to experi...
...And 4 more matches
String.prototype.match() - JavaScript
it barked.'; const capturingregex = /(?<animal>fox|cat) jumps over/; const found = paragraph.match(capturingregex); console.log(found.groups); // {animal: "fox"} using match() with no parameter const str = "nothing will come of nothing."; str.match(); // returns [""] a non-regexp object as the parameter when the regexp parameter is a string or a
number, it is implicitly converted to a regexp by using new regexp(regexp).
... if it is a positive
number with a positive sign, regexp() will ignore the positive sign.
... const str1 = "nan means not a
number.
...And 4 more matches
String - JavaScript
(the same is true of boolean and
numbers.) string literals (denoted by double or single quotes) and strings returned from string calls in a non-constructor context (that is, called without using the new keyword) are primitive strings.
...for example: let s1 = '2 + 2' // creates a string primitive let s2 = new string('2 + 2') // creates a string object console.log(eval(s1)) // returns the
number 4 console.log(eval(s2)) // returns the string "2 + 2" for these reasons, the code may break when it encounters string objects when it expects a primitive string instead, although generally, authors need not worry about the distinction.
... console.log(eval(s2.valueof())) // returns the
number 4 escape notation special characters can be encoded using escape notation: code output \xxx (where xxx is 1–3 octal digits; range of 0–377) iso-8859-1 character / unicode code point between u+0000 and u+00ff \' single quote \" double quote \\ backslash \n new line \r carriage return \v vertical tab \t tab \b backspace \f form feed \uxxxx (where xxxx is 4 hex digits; range of 0x0000–0xffff) utf-16 code unit / unicode code point between u+0000 and u+ffff \u{x} ...
...And 4 more matches
parseFloat() - JavaScript
the parsefloat() function parses an argument (converting it to a string first if needed) and returns a floating point
number.
... return value a floating point
number parsed from the given string.
... or nan when the first non-whitespace character cannot be converted to a
number.
...And 4 more matches
pathLength - SVG: Scalable Vector Graphics
value <
number> default value none animatable yes ellipse for <ellipse>, pathlength lets authors specify a total length for the ellipse, in user units.
... value <
number> default value none animatable yes line for <line>, pathlength lets authors specify a total length for the line, in user units.
... value <
number> default value none animatable yes path for <path>, pathlength lets authors specify a total length for the path, in user units.
...And 4 more matches
viewBox - SVG: Scalable Vector Graphics
the value of the viewbox attribute is a list of four
numbers: min-x, min-y, width and height.
... the
numbers separated by whitespace and/or a comma, which specify a rectangle in user space which is mapped to the bounds of the viewport established for the associated svg element (not the browser viewport).
... value <
number>?, <
number>?, <
number>?, <
number> default value none animatable yes pattern for <pattern>, viewbox defines the position and dimension for the content of the pattern tile.
...And 4 more matches
<line> - SVG: Scalable Vector Graphics
value type: <length>|<percentage>|<
number> ; default value: 0; animatable: yes x2 defines the x-axis coordinate of the line ending point.
... value type: <length>|<percentage>|<
number> ; default value: 0; animatable: yes y1 defines the y-axis coordinate of the line starting point.
... value type: <length>|<percentage>|<
number> ; default value: 0; animatable: yes y2 defines the y-axis coordinate of the line ending point.
...And 4 more matches
panel - Archive of obsolete content
parameters options : object optional options: name type width
number the width of the panel in pixels.
... height
number the height of the panel in pixels.
... parameters options : object optional options: name type width
number the width of the panel in pixels.
...And 3 more matches
lang/functional - Archive of obsolete content
let { method } = require("sdk/lang/functional"); let my
number = { times: method(times), add: method(add),
number: 0 }; function times (target, x) { return target.
number *= x; } function add (target, x) { return target.
number += x; } console.log(my
number.
number); // 0 my
number.add(10); // 10 my
number.times(2); // 20 my
number.add(3); // 23 parameters lambda : function the function to be wrapped and returned.
...: function takes a variable
number of functions as arguments and composes them from right to left.
... delay(fn, ms, arguments) much like settimeout, delay invokes a function after waiting a set
number of milliseconds.
...And 3 more matches
cfx - Archive of obsolete content
there are also a
number of internal commands, which are more likely to be useful to sdk developers than to add-on developers.
... --times=iterations execute tests iterations
number of times.
... internal commands cfx testcfx this will run a
number of tests on the cfx tool, including tests against the documentation.
...And 3 more matches
Appendix D: Loading Scripts - Archive of obsolete content
because there are such a diverse array of add-ons, and because the needs of developers have grown organically over time, the gecko runtime provides a
number of means to dynamically load and execute javascript files.
... flexibility: the evalinsandbox method accepts several parameters, including the url, line
number, and javascript version of the file from which the code being evaluated was extracted.
... this information is invaluable for debugging, and the flexibility with which it can be specified makes this method useful for extracting javascript from a
number of file formats other than raw javascript scripts.
...And 3 more matches
Getting Started - Archive of obsolete content
directories in \mozilla\chrome\classic\skin\classic there are a
number of different directories which contain the skin information for the default packages that come with mozilla.
...change the blue part to whatever you want your theme called and then its version
number.
... place your theme name and version
number on this line point to your preview.png/preview.jpg/preview.gif here the packages section lists which components of the browser suit that you are modifying.
...And 3 more matches
JavaScript crypto - Archive of obsolete content
services are provided to enable: smart card events, generating certificate requests, importing user certs, generating random
numbers, logging out of your tokens, and signing text.
... pkcs11_mech_md2_flag: hashing must be able to function without authentication.* pkcs11_random_flag: use token's random
number generator.
...many hardware random
number generators are not as secure as the netscape internal one.
...And 3 more matches
Venkman Introduction - Archive of obsolete content
the line column in this view displays the line
number that this function starts on.
...the break command takes a file pattern and line
number.
... any loaded file which matches the file pattern, and contains an executable line at the requested line
number will have a breakpoint set.
...And 3 more matches
Tree View Details - Archive of obsolete content
function init() { document.getelementbyid("elementlist").view = treeview; } the custom tree view will need to implement a
number of methods, of which the important ones will be examined individually.
...note that it should return the current
number of visible rows, not the total.
... the rowcountchanged function takes two arguments, the index where the first row was inserted and the
number of rows to insert.
...And 3 more matches
The Implementation of the Application Object Model - Archive of obsolete content
the data itself can be fed in from any
number of different sources (e.g., from a local file system, from your bookmarks file, or from some remote downloadable rdf file), and can then be combined into a single graph.
...in our current architecture, we have a set of content nodes obtained from any
number of data sources.
...yet another example of this problem arises from the need to perform fast sorts on a potentially large
number of content items.
...And 3 more matches
tree - Archive of obsolete content
the tree may contain any
number of rows and any
number of columns.
...this type is suitable for rdf generated trees with a fairly small
number of rows.
... rows type: integer the
number of rows to display in the element.
...And 3 more matches
Mozilla release FAQ - Archive of obsolete content
mozilla is continually available via cvs, and also is occasionally released as versioned
numbers.
... if built from cvs, the date of the cvs checkout is the best way to refer to the version, otherwise use the release
number.
... older versions used milestone
numbers (e.g.
...And 3 more matches
-moz-border-bottom-colors - Archive of obsolete content
if the border is wider than the
number of specified colors, the remaining part of the border is the innermost color specified.
...) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...And 3 more matches
-moz-border-left-colors - Archive of obsolete content
if the border is wider than the
number of specified colors, the remaining part of the border is the innermost color specified.
...) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...And 3 more matches
-moz-border-right-colors - Archive of obsolete content
if the border is wider than the
number of specified colors, the remaining part of the border is the innermost color specified.
...) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...And 3 more matches
-moz-border-top-colors - Archive of obsolete content
if the border is wider than the
number of specified colors, the remaining part of the border is the innermost color specified.
...) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...And 3 more matches
Array comprehensions - Archive of obsolete content
the following comprehension takes an array of
numbers and creates a new array of the double of each of those
numbers.
... var
numbers = [1, 2, 3, 4]; var doubled = [for (i of
numbers) i * 2]; console.log(doubled); // logs 2,4,6,8 this is equivalent to the following map() operation: var doubled =
numbers.map(i => i * 2); comprehensions can also be used to select items that match a particular expression.
... here is a comprehension which selects only even
numbers: var
numbers = [1, 2, 3, 21, 22, 30]; var evens = [for (i of
numbers) if (i % 2 === 0) i]; console.log(evens); // logs 2,22,30 filter() can be used for the same purpose: var evens =
numbers.filter(i => i % 2 === 0); map() and filter() style operations can be combined into a single array comprehension.
...And 3 more matches
Grid Lines - MDN Web Docs Glossary: Definitions of Web-related terms
border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 100px 100px; } lines can be addressed using their line
number.
...lines
numbers respect the writing mode of the document and so in a right-to-left language for example, column line 1 will be on the right of the grid.
... the image below shows the line
numbers of the grid, assuming the language is left-to-right.
...And 3 more matches
Pseudo-classes and pseudo-elements - Learn web development
there are a large
number of these, and they often serve quite specific purposes.
... for example, if you wanted to select the first line of a paragraph you could wrap it in a <span> element and use an element selector; however, that would fail if the
number of words you had wrapped were longer or shorter than the parent element's width.
... the ::first-line pseudo-element selector will do this for you reliably — if the
number of words increases and decreases it will still only select the first line.
...And 3 more matches
Supporting older browsers - Learn web development
before deciding on the approach to take, find out the
number of visitors coming to your site using older browsers.
... you should also consider the type of devices and the way people use your site, for example, you may expect a higher than an average
number of mobile devices.
...in my experience, developers are often very worried about the experience of 1% of users in an old version of internet explorer, while not considering at all the far greater
number who have accessibility needs.
...And 3 more matches
JavaScript basics - Learn web development
let myvariable = 'bob';
number this is a
number.
...
numbers don't have quotes around them.
... operator explanation symbol(s) example addition add two
numbers together or combine two strings.
...And 3 more matches
Introduction to events - Learn web development
in the following example, we have a single <button>, which when pressed, makes the background change to a random color: <button>change color</button> button { margin: 10px }; the javascript looks like so: const btn = document.queryselector('button'); function random(
number) { return math.floor(math.random() * (
number+1)); } btn.onclick = function() { const rndcol = 'rgb(' + random(255) + ',' + random(255) + ',' + random(255) + ')'; document.body.style.backgroundcolor = rndcol; } in this code, we store a reference to the button inside a constant called btn, using the document.queryselector() function.
... we also define a function that returns a random
number.
...the btn constant points to a <button> element, and this type of object has a
number of events that can fire on it, and therefore, event handlers available.
...And 3 more matches
Introduction to web APIs - Learn web development
there are a huge
number of apis available in modern browsers that allow you to do a wide variety of things in your code.
...there are a
number of options available, e.g.
... let's return to the example of the web audio api — this is a fairly complex api, which consists of a
number of objects.
...And 3 more matches
Object building practice - Learn web development
the last bit of the initial script looks as follows: function random(min, max) { const num = math.floor(math.random() * (max - min + 1)) + min; return num; } this function takes two
numbers as arguments, and returns a random
number in the range between the two.
... the last two parameters specify the start and end
number of degrees around the circle that the arc is drawn between.
...random(0 + size,width - size), random(0 + size,height - size), random(-7,7), random(-7,7), 'rgb(' + random(0,255) + ',' + random(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.
...And 3 more matches
Client-Server Overview - Learn web development
note: static sites are excellent when you have a small
number of pages and you want to send the same content to every user.
... however they can have a significant cost to maintain as the
number of pages becomes larger.
... the diagram below shows the main elements of the "team coach" website, along with
numbered labels for the sequence of operations when the coach accesses their "best team" list.
...And 3 more matches
Introducing a complete toolchain - Learn web development
git is the revision control tool, whereas github is an online store for git repositories (plus a
number of useful tools for working with them).
... you can interact with git in a
number of different ways, from using the command line to issue commands, to using a git gui app to issue the same commands by pushing buttons, or even from directly inside your code editor, as seen in the visual studio code example below: anyway, installing git is all we need to do for now.
... you can check whether you've already got it installed globally using the following command: prettier -v if installed, you'll get a version
number returned like 2.0.2; if not, it'll return something along the lines of "command not found".
...And 3 more matches
SourceMap.jsm
the only argument is an object with the following properties: line: the line
number in the generated source.
... column: the column
number in the generated source.
... line: the line
number in the original source, or null if this information is not available.
...And 3 more matches
Memory reporting
they provide more information to dmd, which is a tool that helps keep about:memory's "heap-unclassified"
number low.
... other considerations a
number of the existing basic data structures already have sizeof{in,ex}cludingthis functions, e.g.
... sometimes you might want to split the measurements of an object into two or more
numbers, e.g.
...And 3 more matches
PKCS11 FAQ
s/mime-capable certificates are also looked up by issuer/serial
number.
... will nss use the random
number generation features of pkcs #11?
... only if you identify your token as the default random
number generator.
...And 3 more matches
NSS tools : modutil
a password is equivalent to a personal identification
number (pin).
... modutil supports several mechanisms: rsa, dsa, rc2, rc4, rc5, aes, des, dh, sha1, sha256, sha512, ssl, tls, md5, md2, random (for random
number generation), and friendly (meaning certificates are publicly readable).
...s: 2 slots attached status: loaded slot: nss internal cryptographic services token: nss generic crypto services slot: nss user private key and certificate services token: nss certificate db ----------------------------------------------------------- passing a specific module name with the -list returns details information about the module itself, like supported cipher mechanisms, version
numbers, serial
numbers, and other information about the module and the token it is loaded on.
...And 3 more matches
NSS tools : modutil
a password is equivalent to a personal identification
number (pin).
... modutil supports several mechanisms: rsa, dsa, rc2, rc4, rc5, aes, des, dh, sha1, sha256, sha512, ssl, tls, md5, md2, random (for random
number generation), and friendly (meaning certificates are publicly readable).
... slot: nss internal cryptographic services token: nss generic crypto services slot: nss user private key and certificate services token: nss certificate db ----------------------------------------------------------- passing a specific module name with the -list returns details information about the module itself, like supported cipher mechanisms, version
numbers, serial
numbers, and other information about the module and the token it is loaded on.
...And 3 more matches
JSAPI Cookbook
to query whether a value has a particular type, use a correspondingly named member testing function: // javascript var v = computesomevalue(); var isstring = typeof v === "string"; var is
number = typeof v === "
number"; var isnull = v === null; var isboolean = typeof v === "boolean"; var isobject = typeof v === "object" && v !== null; /* jsapi */ js::rootedvalue v(cx, computesomevalue()); bool isstring = v.isstring(); bool is
number = v.is
number(); bool isint32 = v.isint32(); // note: internal representation, not numeric value bool isnull = v.isnull(); bool isboolean = v.isboolean(); bo...
... * otherwise, convert the
number to floating point (see the next example).
... */ js::callargs args = js::callargsfromvp(argc, vp); args.rval().setint32(23); return true; returning a floating-point
number // javascript return 3.14159; /* jsapi */ js::callargs args = js::callargsfromvp(argc, vp); args.rval().setdouble(3.14159); exception handling throw the most common idiom is to create a new error object and throw that.
...And 3 more matches
TPS Tests
a test file may contain an arbitrary
number of sections, each involving the same or different profiles, so that one test file may be used to test the effect of syncing and modifying a common set of data (from a single sync account) over a series of different events and clients.
... note: be prepared not to use your computer for 15 or so minutes after starting a full run of tps, as it will open and close a fairly large
number of firefox windows.
...typically there are two profiles used, but any
number of profiles could be used in theory (other than 0).
...And 3 more matches
Starting WebLock
for example, you might have a category named "important people" in which the name-value pairs would be names and phone
numbers.
...recall that every interface has a unique
number that is assigned to it.
...on the macintosh platform, for example, files are represented as a triplet - two
numbers and one string - so using a string on the macintosh does not adequately identify files on that operating system.
...And 3 more matches
IAccessibleTableCell
[out] long rowextents, [out] long columnextents, [out] boolean isselected ); [propget] hresult rowextent([out] long nrowsspanned ); [propget] hresult rowheadercells([out, size_is(, nrowheadercells,)] iunknown cellaccessibles, [out] long nrowheadercells ); [propget] hresult rowindex([out] long rowindex ); [propget] hresult table([out] iunknown table ); methods columnextent() returns the
number of columns occupied by this cell accessible.
...ncolumnheadercells the
number of accessibles returned; the size of the returned array.
...rowextents
number of cells spanned by this cell in this row.
...And 3 more matches
inIDOMUtils
getruleline() returns the line
number of the specified css style rule in its source file.
... unsigned long getruleline( in nsidomcssstylerule arule ); parameters arule the style rule to retrieve the line
number of.
... return value the line
number of the style rule; the url of the rule can be obtained from its parent style sheet object.
...And 3 more matches
nsIOutputStream
acount the size of the buffer, or the maximum
number of bytes to copy from the buffer.
... return value this method returns the
number of bytes copied from the buffer (may be less than acount).
... acount the maximum
number of bytes to write to the stream.
...And 3 more matches
nsITreeBoxObject
long getlastvisiblerow(); getpagelength() gets the
number of possible visible rows.
... void scrollbylines(in long numlines); parameters numlines the
number of lines to scroll.
... void scrollbypages(in long numpages); parameters numpages the
number of pages to scroll.
...And 3 more matches
nsPIPromptService
the pressed button
number will be returned.
...e
numberbuttons the value is 2.
... this is the
number of the visible buttons on the dialog.
...And 3 more matches
XPIDL
the following is the correspondence table: table 1: standard idl types idl c++ in parameter c++ out parameter js type notes boolean bool bool* boolean char char char* string only chars in range \u0000-\u00ff permitted double double double*
number float float float*
number long int32_t int32_t*
number long long int64_t int64_t*
number octet uint8_t uint8_t*
number short int16_t int16_t*
number string const char* char** string only chars in range \u0000-\u00ff permitted most of the time you don't w...
...ant to use this type but autf8string or acstring unsigned long uint32_t uint32_t*
number unsigned long long uint64_t uint64_t*
number unsigned short uint16_t uint16_t*
number wchar char16_t char16_t* string full unicode set permitted wstring const char16_t* char16_t** string full unicode set permitted most of the time you don't want to use this type but astring.
... in addition to this list, nearly every idl file includes nsrootidl.idl in some fashion, which also defines the following types: table 2: types provided by nsrootidl.idl idl typedef c++ in parameter c++ out parameter js type notes prtime (xpidl unsigned long long typedef, 64 bits)
number prtime is in microseconds, while js date assumes time in milliseconds nsresult (xpidl unsigned long typedef, 32 bits)
number nsrefcnt (xpidl unsigned long typedef, 32 bits)
number size_t (xpidl unsigned long typedef, 32 bits)
number voidptr void* void* not allowed charptr char* char** not allowed ...
...And 3 more matches
Add to iPhoto
this extension uses a
number of methods and data types, as well as constants, from three system frameworks.
... cfrange cfrange is a structure that identifies a range; that is, it identifies an offset to an item in a list and a
number of items.
...we'll be using a
number of these methods, but for brevity's sake, since these are generally simple declarations, let's look at only the cfrelease() and cfretain() declarations.
...And 3 more matches
Index - Firefox Developer Tools
it then provides a
number of views of the heap that can show you which objects account for memory usage and exactly where in your code you are allocating memory.
...statistically, the
number of samples taken in which we were executing a particular function corresponds to the amount of time the browser spent executing it.
... 89 how to to open the performance tools: 90 scenarios needscontent performance scenarios 91 animating css properties css animation, developer tools, web performance with css animations you specify a
number of keyframes, each of which uses css to define the appearance of the element at a particular stage of the animation.
...And 3 more matches
Examine and edit CSS - Firefox Developer Tools
filename and line
number: on the right-hand side is a link to the rule.
...(note that this setting is independent of the "browser styles" checkbox in the computed view.) user-agent styles are displayed against a different background, and the link to the filename and line
number contains the prefix (user agent): element {} rule the element {} rule at the top of the rules list isn't actually a css rule.
... displaying pseudo-elements the rule view displays the following pseudo-elements, if they are applied to the selected element: ::after ::backdrop ::before ::first-letter ::first-line ::selection :-moz-color-swatch :-moz-
number-spin-box :-moz-
number-spin-down :-moz-
number-spin-up :-moz-
number-text :-moz-
number-wrapper :-moz-placeholder :-moz-progress-bar :-moz-range-progress :-moz-range-thumb :-moz-range-track :-moz-selection if the selected element has pseudo-elements applied to it, they are displayed before the selected element but hidden by a disclosure triangle: clicking the triangle displays them: ...
...And 3 more matches
AudioWorkletNode() - Web APIs
available properties are as follows:
numberofinputs optional the value to initialize the
numberofinputs property to.
...
numberofoutputs optional the value to initialize the
numberofoutputs property to.
... outputchannelcount optional an array defining the
number of channels for each output.
...And 3 more matches
CSS Typed Object Model API - Web APIs
this is easier for authors (for example, numeric values are reflected with actual js
numbers, and have unit-aware mathematical operations defined for them).
... cssnumericvalue an interface representing operations that all numeric values can perform, including: cssnumericvalue.add - adds supplied
numbers to the cssnumericvalue.
... cssnumericvalue.sub - subtracts supplied
numbers to the cssnumericvalue.
...And 3 more matches
HTMLInputElement.stepDown() - Web APIs
the htmlinputelement.stepdown([n]) method decrements the value of a numeric type of <input> element by the value of the step attribute or up to n multiples of the step attribute if a
number is passed as the parameter.
... valid on all numeric, date, and time input types that support the step attribute, includingdate, month, week, time, datetime-local,
number, and range.
...throws an invalid_state_err exception: if the method is not applicable to for the current type value, if the element has no step value, if the value cannot be converted to a
number, if the resulting value is above the max or below the min.
...And 3 more matches
HTMLTextAreaElement - Web APIs
inputmode maxlength long: returns / sets the element's maxlength attribute, indicating the maximum
number of characters the user can enter.
... minlength long: returns / sets the element's minlength attribute, indicating the minimum
number of characters the user can enter.
... rows unsigned long: returns / sets the element's rows attribute, indicating the
number of visible text lines for the control.
...And 3 more matches
RTCRtpStreamStats - Web APIs
fircount a count of the total
number of full intra request (fir) packets received by the sender.
...a fir packet is sent by the receiving end of the stream when it falls behind or has lost packets and is unable to continue decoding the stream; the sending end of the stream receives the fir packet and responds by sending a full frame instead of a delta frame, thereby letting the receiver "catch up." the higher this
number is, the more often a problem of this nature arose, which can be a sign of network congestion or an overburdened receiving device.
... nackcount the
number of times the receiver notified the sender that one or more rtp packets has been lost by sending a negative acknowledgement (nack, also called "generic nack") packet to the sender.
...And 3 more matches
SVGComponentTransferFunctionElement - Web APIs
svgcomponenttransferfunctionelement.tablevalues read only an svganimated
numberlist corresponding to the tablevalues attribute of the given element.
... svgcomponenttransferfunctionelement.slope read only an svganimated
number corresponding to the slope attribute of the given element.
... svgcomponenttransferfunctionelement.intercept read only an svganimated
number corresponding to the intercept attribute of the given element.
...And 3 more matches
SVGPathSegList - Web APIs
svgpathseg insertitembefore(in svgpathseg newitem, in unsigned long index) svgpathseg replaceitem(in svgpathseg newitem, in unsigned long index) svgpathseg removeitem(in unsigned long index) svgpathseg appenditem(in svgpathseg newitem) properties readonly unsigned long
numberofitems normative document svg 1.1 (2nd edition) properties name type description
numberofitemsread only unsigned long the
number of items in the list.
...the first item is
number 0.
...the first item is
number 0.
...And 3 more matches
SVGPointList - Web APIs
em(in unsigned long index) svgpoint insertitembefore(in svgpoint newitem, in unsigned long index) svgpoint replaceitem(in svgpoint newitem, in unsigned long index) svgpoint removeitem(in unsigned long index) svgpoint appenditem(in svgpoint newitem) properties readonly unsigned long
numberofitems normative document svg 1.1 (2nd edition) properties name type description
numberofitems unsigned long the
number of items in the list.
...the first item is
number 0.
...the first item is
number 0.
...And 3 more matches
WebGL constants - Web APIs
active_attributes 0x8b89 passed to getprogramparameter to get the
number of attributes active in a program.
... active_uniforms 0x8b86 passed to getprogramparamter to get the
number of uniforms active in a program.
... max_vertex_attribs 0x8869 the maximum
number of entries possible in the vertex attribute list.
...And 3 more matches
Matrix math for the web - Web APIs
this is a special transformation matrix which functions much like the
number 1 does in scalar multiplication; just like n * 1 = n, multiplying any matrix by the identity matrix gives a resulting matrix whose values match the original matrix.
... multiplying a matrix and a point in our example code we have defined a function to multiply a matrix and a point — multiplymatrixandpoint(): // point • matrix function multiplymatrixandpoint(matrix, point) { // give a simple variable name to each part of the matrix, a column and row
number let c0r0 = matrix[ 0], c1r0 = matrix[ 1], c2r0 = matrix[ 2], c3r0 = matrix[ 3]; let c0r1 = matrix[ 4], c1r1 = matrix[ 5], c2r1 = matrix[ 6], c3r1 = matrix[ 7]; let c0r2 = matrix[ 8], c1r2 = matrix[ 9], c2r2 = matrix[10], c3r2 = matrix[11]; let c0r3 = matrix[12], c1r3 = matrix[13], c2r3 = matrix[14], c3r3 = matrix[15]; // now set some simple names for the point let x = point[0]; let...
...when multiplying
numbers, a * b = c, and b * a = c are both true.
...And 3 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
options this example has a
number of options you can configure by adjusting the values of constants before you load it in the browser.
...code looks like this: const xrotationdegreespersecond = 25; const yrotationdegreespersecond = 15; const zrotationdegreespersecond = 35; const enablerotation = true; const allowmouserotation = true; const allowkeyboardmotion = true; const enableforcepolyfill = false; //const session_type = "immersive-vr"; const session_type = "inline"; const mouse_speed = 0.003; xrotationdegreespersecond the
number of degrees of rotation to apply around the x axis per second.
... yrotationdegreespersecond the
number of degrees to rotate around the y axis each second.
...And 3 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
it is called with three arguments: index (the iterative index of each invocation), length (the
number of total invocations assigned to the daemon - finite or infinity) and backwards (a boolean expressing whether the index is increasing or decreasing).
... rate (optional) the time lapse (in
number of milliseconds) between each invocation.
... length (optional) the total
number of invocations.
...And 3 more matches
ARIA Test Cases - Accessibility
normally, the
number of items contained within the list, and the nesting level (if this is not the outermost list) is announced upon entering.
...for example, what about reading the line
number if the user requests that info?
...optionally, when opening an item, announce the
number of sub items that just became available.
...And 3 more matches
ARIA: cell role - Accessibility
a cell can contain a
number of property attributes clarifying the cell's position within the tabular data structure, including aria-colindex, aria-colspan, aria-rowindex, and aria-rowspan.
... states and properties aria-colspan similar to the html <th> and <td> colspan attribute, it defines the
number of columns spanned by the cell.
... aria-rowspan similar to the html <th> and <td> rowspan attribute, it defines the
number of rows spanned by the cell.
...And 3 more matches
ARIA: table role - Accessibility
if any rows or columns are hidden, the aria-colcount or aria-rowcount should be included indicating the total
number of columns or rows, respectively, along with the aria-colindex or aria-rowindex on each cell.
...it provides an explicit indication of the
number of columns in the full table.
... set the value to the total
number of columns in the full table.
...And 3 more matches
additive-symbols - CSS: Cascading Style Sheets
the additive system is used to construct sign-value
numbering systems such as roman numerals.
...) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...And 3 more matches
pad - CSS: Cascading Style Sheets
a common usage of the pad descriptor is when you need your list to start
numbering from 01 and go through 02, 03 and so on, instead of just 1, 2, 3...
...) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...And 3 more matches
symbols - CSS: Cascading Style Sheets
symbols: a b c d e; symbols: "\24b6" "\24b7" "\24b8" d e; symbols: "0" "1" "2" "4" "5" "6" "7" "8" "9"; symbols: url('first.svg') url('second.svg') url('third.svg'); symbols: indic-
numbers; the symbols descriptor must be specified when the value of the system descriptor is cyclic, numeric, alphabetic, symbolic, or fixed.
...) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...And 3 more matches
Handling content breaks in multicol - CSS: Cascading Style Sheets
the orphans property controls the
number of lines left on their own at the end of a fragment.
... the widows property controls the
number left on their own at the start of a fragment.
... the orphans and widows properties take an integer as a value, which represents the
number of lines to keep together at the end and start of a fragment, respectively.
...And 3 more matches
Variable fonts guide - CSS: Cascading Style Sheets
standard (or static) fonts in the past, a typeface would be produced as a
number of individual fonts, and each font would represent one specific width/weight/style combination.
...these are still applied when dealing with non-variable or variable fonts, but with variable ones, any
number from 1 to 1000 is now valid.
...this is typically set in css using the font-stretch property, with values expressed as a percentage above or below ‘normal’ (100%), any
number greater than 0 is technically valid—though it is far more likely that the range would fall closer to the 100% mark, such as 75%-125%.
...And 3 more matches
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
in the article covering the basic concepts of grid layout, we started to look at how to position items on a grid using line
numbers.
... starting your exploration of grid with
numbered lines is the most logical place to begin, as when you use grid layout you always have
numbered lines.
... the lines are
numbered for columns and rows, and are indexed from 1.
...And 3 more matches
CSS values and units - CSS: Cascading Style Sheets
numeric data types <integer> <
number> <dimension> <percentage> integers an integer is one or more decimal digits, 0 through 9, such as 1024 or -55.
...
numbers a <
number> represents a real
number, which may or may not have a decimal point with a fractional component, for example 0.255, 128 or -1.2.
...
numbers may also be preceded by a + or - symbol.
...And 3 more matches
box-shadow - CSS: Cascading Style Sheets
syntax /* keyword values */ box-shadow: none; /* offset-x | offset-y | color */ box-shadow: 60px -16px teal; /* offset-x | offset-y | blur-radius | color */ box-shadow: 10px 5px 5px black; /* offset-x | offset-y | blur-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.
...) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...And 3 more matches
shape-outside - CSS: Cascading Style Sheets
if both shapes are of type polygon(), both polygons have the same
number of vertices, and use the same <fill-rule>, interpolate between each value in the shape functions.
...) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...And 3 more matches
Cross-browser audio basics - Developer guides
audio html attributes we can specify a
number of attributes with the audio tag to further determine the way audio is initialized.
... note: a very early spec specified that the browser should return no instead of an empty string, but thankfully the
number of people using older browsers that implement this version of the spec are few and far between.
... the value of currenttime is a
number which represents the time in seconds.
...And 3 more matches
Audio and Video Delivery - Developer guides
we can deliver audio and video on the web in a
number of ways, ranging from 'static' media files to adaptive live streams.
... dash also provides a
number of profiles including simple ondemand profiles that no preprocessing and splitting up of media files.
... there are also a
number of cloud based services that will convert your media to both hls and dash.
...And 3 more matches
Constraint validation - Developer guides
patternmismatch constraint violation min range,
number a valid
number the value must be greater than or equal to the value.
... rangeunderflow constraint violation date, month, week a valid date datetime, datetime-local, time a valid date and time max range,
number a valid
number the value must be less than or equal to the value rangeoverflow constraint violation date, month, week a valid date datetime, datetime-local, time a valid date and time required text, search, url, tel, email, password, date, datetime, datetime-local, month, week, time,
number, checkbox, radio, file; also on the <select> and <textarea> elements none as it is a boolean attribute: its presence means true, its absence means false there must be a value (if set).
... valuemissing constraint violation step date an integer
number of days unless the step is set to the any literal, the value must be min + an integral multiple of the step.
...And 3 more matches
<sub>: The Subscript element - HTML: Hypertext Markup Language
appropriate use cases for <sub> include (but aren't necessarily limited to): marking up footnote
numbers.
... see footnote
numbers for an example.
... marking up the subscript in mathematical variable
numbers (although you may also consider using a mathml formula for this).
...And 3 more matches
Proxy Auto-Configuration (PAC) file - HTTP
the port
number is not included in this parameter.
... return value format the javascript function returns a single string if the string is null, no proxies should be used the string can contain any
number of the following building blocks, separated by a semicolon: direct connections should be made directly, without any proxies proxy host:port the specified proxy should be used socks host:port the specified socks server should be used recent versions of firefox support as well: http host:port the specified proxy should be used https host:port the specified https proxy should be used socks4 host:port socks5 host:port the specified socks server (with...
... the pac file is named proxy.pac command line: pactester -p ~/pacparser-master/tests/proxy.pac -u http://www.mozilla.org (passes the host parameter www.mozilla.org and the url parameter http://www.mozilla.org) isplainhostname() syntax isplainhostname(host) parameters host the hostname from the url (excluding port
number).
...And 3 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.
...when you extend an array by changing its length property, the
number of actual elements increases; for example, if you set length to 3 when it is currently 2, the array now contains 3 elements, which causes the third element to be a non-iterable empty slot.
...console.log(arr); // [ 1, 2, <3 empty items> ] arr.foreach(element => console.log(element)); // 1 // 2 as you can see, the length property does not necessarily indicate the
number of defined values in the array.
...And 3 more matches
DataView - JavaScript
the dataview view provides a low-level interface for reading and writing multiple
number types in a binary arraybuffer, without having to care about the platform's endianness.
... description endianness multi-byte
number formats are represented in memory differently depending on machine architecture — see endianness for an explanation.
...as a workaround, you could implement your own getuint64() function to obtain a value with precision up to
number.max_safe_integer, which could suffice for certain cases.
...And 3 more matches
JSON - JavaScript
description javascript and json differences json is a syntax for serializing objects, arrays,
numbers, strings, booleans, and null.
...
numbers leading zeros are prohibited.
... full json syntax the full json syntax is as follows: json = null or true or false or json
number or jsonstring or jsonobject or jsonarray json
number = - positive
number or positive
number positive
number = decimal
number or decimal
number .
...And 3 more matches
Object.prototype.valueOf() - JavaScript
in +new
number()).
... suppose you have an object type my
numbertype and you want to create a valueof method for it.
... the following code assigns a user-defined function to the object's valueof method: my
numbertype.prototype.valueof = function() { return customprimitivevalue; }; with the preceding code in place, any time an object of type my
numbertype is used in a context where it is to be represented as a primitive value, javascript automatically calls the function defined in the preceding code.
...And 3 more matches
Web audio codec guide - Web media technologies
however, a
number of factors do still affect the encoded audio quality and size.
... the table below lists a
number of key source audio file format factors and their impact on the encoded audio.
... the effect of source audio format and contents on the encoded audio quality and size feature effect on quality effect on size channel count the
number of channels affects only the perception of directionality, not the quality.
...And 3 more matches
Understanding WebAssembly text format - WebAssembly
in the current iteration, there can be at most 1 return type, but later this will be relaxed to any
number.
... each parameter has a type explicitly declared; wasm currently has four available
number types (plus reference types; see the reference types) section below): i32: 32-bit integer i64: 64-bit integer f32: 32-bit float f64: 64-bit float a single parameter is written (param i32) and the return type is written (result i32), hence a binary function that takes two 32-bit integers and returns a 64-bit float would be written like this: (func (param i32) (param i32) (result f64) ...
...although the browser compiles it to something more efficient, wasm execution is defined in terms of a stack machine where the basic idea is that every type of instruction pushes and/or pops a certain
number of i32/i64/f32/f64 values to/from a stack.
...And 3 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
firefox itself includes a great
number of xpcom components, and they can be used in extensions as well.
... each component is identified with a contract id in the form @domain_name/module_name/component_name;version_
number, and implements one or more interfaces that determine what functions can be called on these components.
...on windows vista, it will be located at c:\users\username\appdata\roaming\mozilla\firefox\profiles\random
number.default\ ; on windows xp or 2000, it will be c:\documents and settings\username\application data\mozilla\firefox\profiles\random
number.default\ ; on linux, it will be ~/.mozilla/firefox/random
number.default/ ; on mac os x, it will be ~/library/application support/firefox/profiles/random
number.default/ in the interests of security, delete these lines from prefs.js after finishing these tests.
...And 2 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
lockpref("ldap_2.servers.ldapint.auth.savepassword", true); lockpref("ldap_2.servers.ldapint.description", "ldap int"); lockpref("ldap_2.servers.ldapint.filename", "abook-1.mab"); lockpref("ldap_2.servers.ldapint.uri", "ldap://ldap1.int-evry.fr:389/ou=people,dc=int-evry,dc=fr??sub"); lockpref("ldap_2.servers.history.filename", "history.mab"); lockpref("ldap_2.servers.history.replication.lastchange
number", 0); lockpref("ldap_2.servers.pab.filename", "abook.mab"); lockpref("ldap_2.servers.pab.replication.lastchange
number", 0); //account lockpref("mail.account.account1.server", "server1"); lockpref("mail.account.account2.identities", "id1"); lockpref("mail.account.account2.server", "server2"); lockpref("mail.accountmanager.accounts", "account1,account2"); lockpref("mail.accountmanager.defaultaccou...
...ry france"); lockpref("mail.startup.enabledmailcheckonce", true); lockpref("mail.ui.folderpane.version", 3); lockpref("mailnews.ui.threadpane.version", 2); //ldap config lockpref("mail.identity.id1.directoryserver", "ldap_2.servers.ldapint"); lockpref("ldap_2.prefs_migrated", true); lockpref("ldap_2.servers.history.filename", "history.mab"); lockpref("ldap_2.servers.history.replication.lastchange
number", 0); lockpref("ldap_2.servers.ldapint.auth.savepassword", true); lockpref("ldap_2.servers.ldapint.description", "ldap-int"); lockpref("ldap_2.servers.ldapint.filename", "abook-1.mab"); lockpref("ldap_2.servers.ldapint.position", 3); lockpref("ldap_2.servers.ldapint.uri", "ldap://ldap1.int-evry.fr:389/ou=people,dc=int-evry,dc=fr??sub"); lockpref("ldap_2.servers.pab.filename", "abook.mab"); lockpr...
...ef("ldap_2.servers.pab.replication.lastchange
number", 0); //news config lockpref("mail.server.server3.hostname", "news.int-evry.fr"); lockpref("mail.server.server3.max_cached_connections", 2); lockpref("mail.server.server3.name", "news.int-evry.fr"); lockpref("mail.server.server3.type", "nntp"); lockpref("mail.server.server3.username", env_user); //call to ldap to get user's attribute.
...And 2 more matches
Bookmark Keywords - Archive of obsolete content
laying the groundwork we're going to pick a relatively easy example to illustrate this process: a keymark that will let the user jump straight to a specific bugzilla entry by entering its
number.
... the quickest way to start is to simply look up any random bug in the bugzilla system-- the actual
number doesn't matter.
...replace the bug's
number (82839) with the string %s.
...And 2 more matches
Space Manager Detailed Design - Archive of obsolete content
frameinfo { nsiframe* const mframe; nsrect mrect; // rectangular region frameinfo* mnext; frameinfo(nsiframe* aframe, const nsrect& arect); #ifdef ns_build_refcnt_logging ~frameinfo(); #endif }; // doubly linked list of band rects struct bandrect : prcliststr { nscoord mleft, mtop; nscoord mright, mbottom; printn mnumframes; //
number of frames occupying this rect union { nsiframe* mframe; // single frame occupying the space nsvoidarray* mframes; // list of frames occupying the space }; bandrect(nscoord aleft, nscoord atop, nscoord aright, nscoord abottom, nsiframe*); bandrect(nscoord aleft, nscoord atop, nscoord aright, nscoord abottom, nsv...
...the #define ns_space_manager_cache_size is used to control the
number of space manager instances that can be present in the recycler, currently 4.
...the caller also provides a collection of banddata objects (an array) and the
number of items that the collection can handle.
...And 2 more matches
Stacks and Decks - Archive of obsolete content
there are a
number of elements that are specialized types of boxes, such as toolbars and tabbed panels.
...any
number of elements may be stacked up in a stack.
... shadowing with stacks one convenient use of the stack element however is that you could emulate a
number of css properties with it.
...And 2 more matches
Tree Selection - Archive of obsolete content
the tree provides a
number of functions which can be used to determine whether an item is selected.
...the first function returns the
number of selection ranges there are.
...you would then write a loop for the
number of ranges, calling getrangeat() to get the actual indices of the start and end of the range.
...And 2 more matches
Trees - Archive of obsolete content
the set of columns is defined by a
number of treecol elements, one for each column.
...this means that the tree is scalable to any
number of rows without any performance problems.
...however, you may specify a specific
number of rows to appear in a tree by setting the rows attribute on the tree element.
...And 2 more matches
scale - Archive of obsolete content
increment type: integer the amount by which the curpos (for scroll bars) or value (for
number boxes and scale) attribute changes when the arrows are clicked(or scales are dragged).
... type: integer the maximum value that the scale or
number box may be set to.
... the default value is 100 for scales and infinity for
number boxes.
...And 2 more matches
Processing XML with E4X - Archive of obsolete content
this node has one attribute, type, which can be accessed and updated in a
number of ways: alert(languages.@type); // alerts "dynamic" languages.@type = "agile"; alert(languages.@type); // alerts "agile" alert(languages.tostring()); /* alerts: <languages type="agile"><lang>javascript</lang><lang>python</lang></languages> */ note that if one wishes to make comparisons of retrieved attributes with other strings, it is necessary to convert the attribute first, even ...
...} working with xml objects xml objects provide a
number of methods for inspecting and updating their contents.
... objects representing xml elements provide a
number of useful methods, some of which are illustrated below: todo: add all of the methods to the javascript reference, link from here alert(person.name.text()) // bob smith var xml = person.name.toxmlstring(); // a string containing xml var personcopy = person.copy(); // a deep copy of the xml object var child = person.child(1); // the second child node; in this case the <likes> element working ...
...And 2 more matches
Type coercion - MDN Web Docs Glossary: Definitions of Web-related terms
type coercion is the automatic or implicit conversion of values from one data type to another (such as strings to
numbers).
... examples const value1 = '5'; const value2 = 9; let sum = value1 + value2; console.log(sum); in the above example, javascript has coerced the 9 from a
number into a string and then concatenated the two values together, resulting in a string of 59.
... javascript had a choice between a string or a
number and decided to use a string.
...And 2 more matches
Test your skills: Form validation - Learn web development
change the type of the "email address" and "phone
number" fields to make the browser apply some more specific validation suitable for the data being asked for.
... give the "user name" field a required length of between 5 and 20 characters, the "phone
number" field a maximum length of 15 characters, and the "comment" field a maximum length of 200 characters.
... all of the user names in our application consist of a single letter, followed by a dot, followed by three or more letters or
numbers.
...And 2 more matches
UI pseudo-classes - Learn web development
note: a
number of the pseudo-classes discussed here are concerned with styling form controls based on their validation state (is their data valid, or not?) you'll learn much more about setting and controlling validation constraints in our next article — client-side form validation — but for now we'll keep things simple with regards to form validation, so it doesn't confuse things.
... note: numeric input types are date, month, week, time, datetime-local,
number, and range.
... the numeric input looks like this: <div> <label for="age">age (must be 12+): </label> <input id="age" name="age" type="
number" min="12" max="120" required> <span></span> </div> and the css looks like this: input + span { position: relative; } input + span::after { font-size: 0.7rem; position: absolute; padding: 5px 10px; top: -26px; } input:required + span::after { color: white; background-color: black; content: "required"; left: -70px; } input:out-of-range + span::after { color: white; back...
...And 2 more matches
Test your skills: Loops - Learn web development
loops 2 in this next task, we want you to write a simple program that, given a name, searches an array of objects containing names and phone
numbers (phonebook) and, if it finds the name, outputs the name and phone
number into the paragraph (para) and then exits the loop before it has run its course.
... isprime() — a function that, when passed a
number, returns true if the
number is a prime
number, and false if not.
... you need to use a loop to go through the
numbers 2 to 500 backwards (1 is not counted as a prime
number), and run the provided isprime() function on them.
...And 2 more matches
Solve common problems in your JavaScript code - Learn web development
for example: correct wrong elem.style.color = 'red'; elem.style.color = 'red;' functions there are a
number of things that can go wrong with functions.
... object notation versus normal assignment when you assign something normally in javascript, you use a single equals sign, e.g.: const my
number = 0; with objects, however, you need to take care to use the correct syntax.
... math what types of
number do you have to deal with in web development?
...And 2 more matches
What is web performance? - Learn web development
a general strategy is to make your files as small as possible, reduce the
number of http requests made as much as possible, and employ clever loading techniques (such as preload) to make files available sooner.
...there are a lot of best practices to consider in making apps feel smooth, for example using css animations rather than javascript for animation, and minimizing the
number of repaints the ui requires due to changes in the dom.
...this involves a
number of metrics (measurable indicators that can indicate success or failure) and tools to meaure those metrics, which we will discuss throughout this module.
...And 2 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
we'll also create two variables to keep track of the total
number of tasks and the completed tasks.
...find the <h2> heading with an id of list-heading and replace the hardcoded
number of active and completed tasks with dynamic expressions: <h2 id="list-heading">{completedtodos} out of {totaltodos} items completed</h2> go to the app, and you should see the "2 out of 3 items completed" message as before, but this time the information is coming from the todos array.
...observe how the
numbers in the message are updated appropriately.
...And 2 more matches
Using Vue computed properties - Learn web development
previous overview: client-side javascript frameworks next in this article we'll add a counter that displays the
number of completed todo items, using a feature of vue called computed properties.
...the list summary method will get the
number of finished todoitems, and return a string reporting this.
... computed: { listsummary() { const
numberfinisheditems = this.todoitems.filter(item =>item.done).length return `${
numberfinisheditems} out of ${this.todoitems.length} items completed` } } now we can add {{listsummary}} directly to our template; we'll add this inside an <h2> element, just above our <ul>.
...And 2 more matches
Handling common accessibility problems - Learn web development
note: accessibility is morally the right thing to do, and good for business (
numbers of disabled users, users on mobile devices, etc.
... missing alt text can be tested for in a
number of ways, for example using accessibility auditing tools.
... auditing tools there are a
number of auditing tools available that you can feed your web pages into.
...And 2 more matches
Handling common HTML and CSS problems - Learn web development
after the packages have finished installing, try loading up an html file and a css file: you'll see any issues highlighted with green (for warnings) and red (for errors) circles next to the line
numbers, and a separate panel at the bottom provides line
numbers, error messages, and sometimes suggested values or other fixes.
... html5 form elements also exhibit fallback qualities — html5 introduced some special <input> types for inputting specific information into forms, such as times, dates, colors,
numbers, etc.
... the button has a
number of declarations that style, but the two we are most interested in are as follows: button { ...
...And 2 more matches
Adding phishing protection data providers
each data provider has a unique id
number.
... the data provider with the id
number 0 is the default data provider shipped with firefox.
... when installing a new provider, you should use the next unused
number.
...And 2 more matches
Performance best practices for Firefox front-end engineers
because styles are normally scoped to the entire document, the cost of doing these style calculations is proportional to the
number of dom nodes in the document (and the
number of styles being applied).
... it should be possible to write a test that gets the nsidomwindowutils for a browser window, records the
number of styleflushes, then synchronously calls the function that you want to test, and immediately after checks the styleflushes attribute again.
...a
number of tests have been written that exercise various functions of the browser (opening tabs, opening windows) and ensure that we don’t add new uninterruptible reflows accidentally while those actions occur.
...And 2 more matches
HTMLIFrameElement.sendMouseEvent()
x a
number representing the x position of the cursor relative to the browser <iframe>'s visible area in css pixels.
... y a
number representing the y position of the cursor relative to the browser <iframe>'s visible area in css pixels.
... button a
number representing which button has been pressed on the mouse: 0 (left button), 1 (middle button), or 2 (right button).
...And 2 more matches
Gecko Profiler FAQ
this documents lists a
number of questions asked by people in preparation for a tutorial session about the gecko profiler.
... the gecko profiler currently doesn’t have the ability to show you information about line
numbers, neither for js code nor for native code.
...the only way that i’ve tried before is to use a “difference calltree”: in the regular call tree, each node of the calltree is assigned a weight which is just the
number of samples that were under this call stack.
...And 2 more matches
Leak-hunting strategies and tips
(by most of the leaks, i mean the leaks of large
numbers of different types of objects or leaks of objects that are known to entrain many non-logged objects such as js objects.
... seeing a leaked globalwindowimpl, nsxulpdglobalobject, nsxbldocglobalobject, or nsxpcwrappedjs is a sign that there could be significant
numbers of js objects leaked.) for example, start with bringing up the mail window and closing the window without doing anything.
...(when i refer to the size of a graph of objects, i'm referring to the
number of objects, not the size in bytes.
...And 2 more matches
Introduction to NSPR
a thread has a limited
number of resources that it truly owns.
... nspr threads are scheduled in two separate domains: local threads are scheduled within a process only and are handled entirely by nspr, either by completely emulating threads on each host operating system (os) that doesn't support threads, or by using the threading facilities of each host os that does support threads to emulate a relatively large
number of local threads by using a relatively small
number of native threads.
...each thread has a built-in per-thread error
number and error string that are updated when nspr operations fail.
...And 2 more matches
PRExplodedTime
tm_month:
number of months past tm_year.
... tm_hour:
number of hours past tm_mday.
... tm_min:
number of minutes past tm_hour.
...And 2 more matches
PRIOMethods
read read up to the specified
number of bytes into buffer.
... write write specified
number of bytes from buffer.
... available determine
number of bytes available for reading.
...And 2 more matches
PR_GetRandomNoise
produces a random value for use as a seed value for another random
number generator.
... syntax #include <prrng.h> nspr_api(prsize) pr_getrandomnoise( void *buf, prsize size ); parameters the function has these parameters: buf a pointer to a caller-supplied buffer to contain the generated random
number.
... size the size, in bytes, of the requested random
number.
...And 2 more matches
NSS_3.12_release_notes.html
encodecertpoliciesextension (see cert.h) cert_encodeinfoaccessextension (see cert.h) cert_encodeinhibitanyextension (see cert.h) cert_encodenoticereference (see cert.h) cert_encodepolicyconstraintsextension (see cert.h) cert_encodepolicymappingextension (see cert.h) cert_encodesubjectkeyid (see certdb/cert.h) cert_encodeusernotice (see cert.h) cert_findcrlentryreasonexten (see cert.h) cert_findcrl
numberexten (see cert.h) cert_findnameconstraintsexten (see cert.h) cert_getclassicocspdisabledpolicy (see cert.h) cert_getclassicocspenabledhardfailurepolicy (see cert.h) cert_getclassicocspenabledsoftfailurepolicy (see cert.h) cert_getpkixverifynistrevocationpolicy (see cert.h) cert_getusepkixforvalidation (see cert.h) cert_getvaliddnspatternsfromcert (see cert.h) cert_newtempcertificate (see cert.h) ...
...e cryptohi.h) vfy_verifydatawithalgorithmid (see cryptohi.h) vfy_verifydigestdirect (see cryptohi.h) vfy_verifydigestwithalgorithmid (see cryptohi.h) new macros for camellia support (see blapit.h): nss_camellia nss_camellia_cbc camellia_block_size new macros for rsa (see blapit.h): rsa_max_modulus_bits rsa_max_exponent_bits new macros in certt.h: x.509 v3 ku_encipher_only cert_max_serial_
number_bytes cert_max_dn_bytes pkix cert_rev_m_do_not_test_using_this_method cert_rev_m_test_using_this_method cert_rev_m_allow_network_fetching cert_rev_m_forbid_network_fetching cert_rev_m_allow_implicit_default_source cert_rev_m_ignore_implicit_default_source cert_rev_m_skip_test_on_missing_source cert_rev_m_require_info_on_missing_source cert_rev_m_ignore_missing_fresh_info cert_rev_m_fail_on_miss...
...bug 287061: crl
number should be a big integer, not ulong bug 301213: combine internal libpkix function tests into a single statically linked program bug 324740: add generation of sia and aia extensions to certutil bug 339737: libpkix ocsp checking calls cert_verifycert bug 358785: merge nss_libpkix_branch back to trunk bug 365966: infinite recursive call in vfy_verifydigestdirect bug 382078: pkix default http client r...
...And 2 more matches
PKCS11 Implement
the version
numbers, manufacturer ids, and so on are displayed when the user views the information.
...the slots are expected to remain static: that is, the module never has more slots or fewer slots than the
number on the original list.
...if the token is a removable device, nss may call c_gettokeninfo anytime it's looking for a new token to check whether the token is write protected, whether it can generate random
numbers, and so on.
...And 2 more matches
FC_GetTokenInfo
serial
number: the device's serial
number as a string, "0000000000000000", 16 characters and not null-terminated.
... ckf_rng (0x00000001): this device has a random
number generator ckf_write_protected (0x00000002): this device is read-only ckf_login_required (0x00000004): this device requires the user to log in to use some of its services ckf_user_pin_initialized (0x00000008): the user's password has been initialized ckf_dual_crypto_operations (0x00000200): a single session with the token can perform dual cryptographic operations ckf_token_initialized (0x00000400): the token has been initialized.
... ulsessioncount:
number of sessions that this application currently has open with the token ulrwsessioncount:
number of read/write sessions that this application currently has open with the token hardwareversion: hardware version
number, for example, 8.3 (major=0x08, minor=0x03), which are the version
numbers of the certificate and key databases, respectively.
...And 2 more matches
NSS Tools crlutil
dn:: is a ca distinguished name cert-serial: authority certificate serial
number.
... issueraltnames non-critical name-list where: subjaltnames: identifies the name of an extension should be set to 0 since this is non-critical extension name-list: comma separated list of names add crl
number extension: the crl
number is a non-critical crl extension which conveys a monotonically increasing sequence
number for a given crl scope and crl issuer.
... this extension allows users to easily determine when a particular crl supersedes another crl crl
number non-critical
number where: crl
number: identifies the name of an extension critical: should be set to 0 since this is non-critical extension
number: value of long which identifies the sequential
number of a crl.
...And 2 more matches
Tracing JIT
every timespidermonkey interprets a backward-jump bytecode, the monitor makes note of the
number of times the jump-target program-counter (pc) value has been jumped-to.
... this
number is called the hit count for the pc.
... recording mode is temporary -- ideally it only lasts as long as it takes to record a single iteration of a loop in the interpreter -- and can end in a
number of ways.
...And 2 more matches
JS::Value
a c++ variable of type js::value represents a value in javascript: a string,
number, object (including arrays and functions), boolean, symbol, null, or undefined.
...alue type tests constructor accessors mutators null val.isnull() js::nullvalue() n/a val.setnull() undefined val.isundefined() js::undefinedvalue() n/a val.setundefined() boolean val.isboolean(), val.istrue(), val.isfalse() js::booleanvalue(bool), js::truevalue(), js::falsevalue() val.toboolean() val.setboolean(bool)
number val.isint32(), val.isdouble(), val.is
number() js::
numbervalue(any
number type), js::int32value(int32_t), js::doublevalue(double), js::float32value(float) val.toint32(), val.todouble(), val.to
number() val.setint32(int32_t), val.set
number(uint32_t), val.set
number(double) string val.isstring() js::stringvalue(jsstring*) val.tostring() val.setstring(jsstring *) ...
... object val.isobject() js::objectvalue(jsobject&), js::objectornullvalue(jsobject*) val.toobject() val.setobject(jsobject &) symbol val.issymbol() js::symbolvalue(js::symbol*) val.tosymbol() val.setsymbol(js::symbol &)
numbers are stored in a js::value either as a double or as an int32_t.
...And 2 more matches
JS_CompileFunction
nargs unsigned int
number of arguments to pass to the function.
... lineno unsigned int line
number.
...nargs is the
number of arguments the function takes, and argnames is a pointer to the first element of an array of names to assign each argument.
...And 2 more matches
JS_CompileFunctionForPrincipals
nargs unsigned int
number of arguments to pass to the function.
... lineno unsigned int line
number.
...nargs is the
number of arguments the function takes, and argnames is a pointer to the first element of an array of names to assign each argument.
...And 2 more matches
JS_SetArrayLength
length uint32_t
number of array elements to set.
...length indicates the
number of elements.
...you can call js_setarraylength either to set the
number of elements for an array object you created without specifying an initial
number of elements, or to change the
number of elements allocated for an array.
...And 2 more matches
SpiderMonkey 1.8.5
js_newdouble, js_newdoublevalue, and js_new
numbervalue are gone.
... note that there are a very small
number of incompatibilities between es5 and and es3, the version of ecmascript supported by spidermonkey versions 1.5 through 1.8.
...jsapi no longer represents floating-point
numbers (and integers more than 31 bits long) as pointers to jsdouble; instead, the jsdouble value is directly stored in the jsval.
...And 2 more matches
SpiderMonkey 1.8.8
these release notes are an incomplete draft and were initially seeded from the 1.8.5 release notes, so lots of the information here isn't actually new to spidermonkey 1.8.8 (nor is it even the case that the version
number will be 1.8.8!).
... —insert-actual-release-date-here platform support spidermonkey 1.8.8 is supported on all the platforms where firefox insert-actual-firefox-version-
number-here runs.
... a significant
number of typedefs of built-in types, or of types which are now standardized, have been removed.
...And 2 more matches
imgIEncoder
frames=# -- default: "1" total
number of frames in the image.
...plays=# -- default: "0"
number of times to play the animation sequence.
...delay=# -- default: "500"
number of milliseconds to display the frame, before moving to the next frame.
...And 2 more matches
mozIStorageAggregateFunction
there are a
number of already defined aggregate functions provided by sqlite.
...var standarddeviationfunc = { _
numbers: [], onstep: function(aarguments) { this._
numbers.push(aarguments.getint32(0)); }, onfinal: function() { let total = 0; let ilength = this._
numbers.length; this._
numbers.foreach(function(elt) { total += elt }); let mean = total / this._
numbers.length; let data = this._
numbers.map(function(elt) { let value = elt - mean; return value * value; }); t...
...otal = 0; data.foreach(function(elt) { total += elt }); this._
numbers = []; return math.sqrt(total / ilength); } }; // now, register our function with the database connection.
...And 2 more matches
nsIAccessible
action
number 0 is the default action.
... childcount
number of accessible children.
... value accessible value -- a
number or a secondary text equivalent for this node.
...And 2 more matches
nsIAutoCompleteInput
maxrows unsigned long the maximum
number of rows to display in the autocomplete suggestion popup.
... minresultsforpopup unsigned long specifies a minimum
number of search results that must be available before the autocomplete popup will open.
... searchcount unsigned long the
number of autocomplete sessions to search.
...And 2 more matches
nsICookieManager2
countcookiesfromhost() returns the
number of cookies that would be returned to a given host.
...this should consist only of the host portion of the uri and should not contain a leading dot, port
number, or other information.
... return value the
number of matching cookies found.
...And 2 more matches
nsIDOMWindowInternal
pagexoffset long returns the
number of pixels that the document has already been scrolled horizontally.
... pageyoffset long returns the
number of pixels that the document has already been scrolled vertically.
... scrollmaxx long returns the maximum
number of pixels that the document can be scrolled horizontally.
...And 2 more matches
nsIDialogParamBlock
inherits from: nsisupports last changed in gecko 1.7 method overview print32 getint( in print32 inindex ); wstring getstring( in print32 inindex ); void setint( in print32 inindex, in print32 inint ); void set
numberstrings( in print32 innumstrings ); void setstring( in print32 inindex, in wstring instring); attributes attribute type description objects nsimutablearray a place where you can store an nsimutablearray to pass nsisupports.
...must be in the range 0..15 unless set
numberstrings was called.
... set
numberstrings() set the maximum
number of strings to pass.
...And 2 more matches
nsIEffectiveTLDService
getbasedomain(in nsiuri auri, [optional] in pruint32 aadditionalparts); acstring getbasedomainfromhost(in autf8string ahost, [optional] in pruint32 aadditionalparts); acstring getpublicsuffix(in nsiuri auri); acstring getpublicsuffixfromhost(in autf8string ahost); methods getbasedomain() returns the base domain of a uri; that is, the public suffix with a given
number of additional domain name parts.
... aadditionalparts the
number of domain name parts to be returned in addition to the public suffix.
... return value an acstring containing the base domain (public suffix plus the requested
number of additional parts).
...And 2 more matches
nsIMemoryReporter
constant value description units_bytes 0 the amount is specified as a
number of bytes.
...for example, the
number of tabs currently open.
... units_count_cumulative 2 the amount contains the
number of times some event has occurred since the application started up.
...And 2 more matches
nsIMsgDBHdr
linecount unsigned long indicates the size of the message body in
number of lines.
... numreferences unsigned short readonly: indicates the
number of references this header has.
...must be less than the total
number of references.
...And 2 more matches
nsIMsgDBView
numselected long readonly: the
number of messages currently selected.
... return values count upon return, the count variable may contain the
number of messages in the folder.
... return values acount upon return, the count variable may contain the
number of messages loaded.
...And 2 more matches
nsIMsgFolder
numsubfolders unsigned long readonly: returns the
number of sub folders that this folder has.
...id renamesubfolders(in nsimsgwindow msgwindow, in nsimsgfolder oldfolder); generateuniquesubfoldername() astring generateuniquesubfoldername(in astring prefix, in nsimsgfolder otherfolder); updatesummarytotals() void updatesummarytotals(in boolean force); summarychanged() void summarychanged(); getnumunread() get the total
number of unread messages in this folder, or in all subfolders.
... long getnumunread(in boolean deep); gettotalmessages() get the total
number of messages in this folder, or in all subfolders.
...And 2 more matches
nsIScriptError2
method overview void initwithwindowid(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 line
number, in pruint32 column
number, in pruint32 flags, in string category, in unsigned long long innerwindowid); attributes attribute type description innerwindowid unsigned long long the inner window id with which the error is associated.
... methods initwithwindowid() void init( in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 line
number, in pruint32 column
number, in pruint32 flags, in string category, in unsigned long long innerwindowid ); parameters message the text of the message to add to the log.
... sourceline the line
number in the source file on which the error occurred.
...And 2 more matches
nsISessionStore
getclosedtabcount() returns the
number of restorable tabs for a given window.
... return value the
number of restorable tabs in the window.
... getclosedwindowcount() returns the
number of restorable windows.
...And 2 more matches
nsISmsService
tance, use: var smsservice = components.classes["@mozilla.org/sms/smsservice;1"] .createinstance(components.interfaces.nsismsservice); method overview [implicit_jscontext] nsidommozsmsmessage createsmsmessage(in long id, in domstring delivery, in domstring sender, in domstring receiver, in domstring body, in jsval timestamp, in bool read ); unsigned short get
numberofmessagesfortext(in domstring text); boolean hassupport(); void send(in domstring
number, in domstring message, in long requestid, [optional] in unsigned long long processid); methods createsmsmessage() [implicit_jscontext] nsidommozsmsmessage createsmsmessage( in long id, in domstring delivery, in domstring sender, in domstring receiver, in domstring body, ...
...in jsval timestamp, in bool read ); parameters id a
number representing the id of the message.
... return value a smsmessage get
numberofmessagesfortext() unsigned short get
numberofmessagesfortext( in domstring text ); parameters text a domstring text to check.
...And 2 more matches
Type conversion
(buffer); // here ctypes.char.array(10)() is converted to ctypes.char.ptr type implicit conversion can be tested in the following way: var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.bool } ])(); mystruct.v = 1; console.log(mystruct.v.tostring()); // 'true' boolean type target type source converted value ctypes.bool js boolean src js
number (0 or 1) if src == 0: false if src == 1: true var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.bool } ])(); mystruct.v = true; console.log(mystruct.v.tostring()); // 'true' mystruct.v = false; console.log(mystruct.v.tostring()); // 'false' mystruct.v = 1; console.log(mystruct.v.tostring()); // 'true' mystruct.v = 0; console.log(mystruct.v.tostring()); // 'fals...
...e' mystruct.v = 10; // throws error mystruct.v = "a"; // throws error integer types target type source converted value ctypes.char16_t js string (only if its length == 1) src.charcodeat(0) any integer types js
number (only if fits to the size) src js boolean if src == true: 1 if src == false: 0 var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.char16_t } ])(); mystruct.v = 0x41; console.log(mystruct.v.tostring()); // "a" mystruct.v = true; console.log(mystruct.v.tostring()); // "\x01" mystruct.v = "x"; console.log(mystruct.v.tostring()); // "x" mystruct.v = "xx"; // throws error var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.int16_t } ])(); mys...
...es.char16_t ctypes.uint8_t ctypes.uint16_t ctypes.unsigned_short var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.int16_t } ])(); mystruct.v = ctypes.int8_t(10); console.log(mystruct.v.tostring()); // 10 mystruct.v = ctypes.int32_t(10); // throws error float types target type source converted value any float types js
number (only if fits to the size) src pointer types target type source converted value any pointer types null nullptr ctypes.voidptr_t any pointer types src any array types src.addressofelement(0) ctypes.pointertype(t) ctypes.arraytype(t) src.addressofelement(0) ctypes.arraytype(t, n) src.addressofelement(...
...And 2 more matches
Set a breakpoint - Firefox Developer Tools
the source pane context menu in the source pane, you can handle setting breakpoints by bringing up the context menu over a line
number.
... there are a few options available here: add breakpoint: add a standard unconditional breakpoint at this line
number (see below).
...you can set an unconditional breakpoint using the context menu (see above), or by: clicking on the line
number for the line you want to break at in the source pane.
...And 2 more matches
Aggregate view - Firefox Developer Tools
the "total count" column shows you the
number of objects of each category that are currently allocated.
... the "total bytes" column shows you the
number of bytes occupied by objects in each category, and that
number as a percentage of the whole heap size for that tab.
...this page simply runs a script that creates a large
number of dom nodes (200 htmldivelement objects and 4000 htmlspanelement objects).
...And 2 more matches
AudioNode - Web APIs
the web audio api will up-mix or down-mix the
number of channels as required; check the web audio spec for details.
... audionode.
numberofinputs read only returns the
number of inputs feeding the node.
... source nodes are defined as nodes having a
numberofinputs property with a value of 0.
...And 2 more matches
BaseAudioContext.createScriptProcessor() - Web APIs
syntax var scriptprocessor = audioctx.createscriptprocessor(buffersize,
numberofinputchannels,
numberofoutputchannels); parameters buffersize the buffer size in units of sample-frames.
...
numberofinputchannels integer specifying the
number of channels for this node's input, defaults to 2.
...
numberofoutputchannels integer specifying the
number of channels for this node's output, defaults to 2.
...And 2 more matches
Using the CSS Typed Object Model - Web APIs
it is a class that defines
numbers with units of measurement like 20px, 40%, 200ms, or 7.
... stylestable.appendchild( row ); } for those of you using a non-supporting browser, the above output 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.
... // csstransformvalue let transform = allcomputedstyles.get('transform'); console.log( transform ); // csstransformvalue {0: cssscale, 1: csstranslate, length: 2, is2d: true} console.log( transform.length ); // 1 console.log( transform[0] ); // cssscale {x: cssunitvalue, y: cssunitvalue, z: cssunitvalue, is2d: true} console.log( transform[0].x ); // cssunitvalue {value: 0.95, unit: "
number"} console.log( transform[0].y ); // cssunitvalue {value: 0.95, unit: "
number"} console.log( transform[0].z ); // cssunitvalue {value: 1, unit: "
number"} console.log( transform.is2d ); // true // cssimagevalue let bgimage = allcomputedstyles.get('background-image'); console.log( bgimage ); // cssimagevalue console.log( bgimage.tostring() ); // url("https://mdn.mozillademos.org/...
...And 2 more matches
DOMPointReadOnly() - Web APIs
syntax point = new dompointreadonly(x, y, z, w); parameters x optional the value of the horizontal coordinate, x, as a floating point
number.
... y optional the value of the vertical coordinate, y, as a floating point
number.
... z optional the value of the depth coordinate, z, as a floating point
number.
...And 2 more matches
EffectTiming.easing - Web APIs
cubic-bezier(<
number>, <
number>, <
number>, <
number>) specifies a cubic bézier timing function.
... the four
numbers specify points p1 and p2 of the curve as (x1, y1, x2, y2).
... frames(<integer>) specifies a frames timing function, which breaks the animation down into a
number of equal time intervals but also displays the start (0%) and end (100%) states for an equal amount of time to the other intervals.
...And 2 more matches
HTMLMediaElement - Web APIs
htmlmediaelement.mozframebufferlength is a unsigned long that indicates the
number of samples that will be returned in the framebuffer of each mozaudioavailable event.
... this
number is a total for all channels, and by default is set to be the
number of channels * 1024 (e.g., 2 channels * 1024 samples = 2048 total).
...the size given must be a
number between 512 and 16384.
...And 2 more matches
Recording a media element - Web APIs
function wait(delayinms) { return new promise(resolve => settimeout(resolve, delayinms)); } the wait() function returns a new promise which resolves once the specified
number of milliseconds have elapsed.
...we always record no more than the specified
number of milliseconds of media, although if the media stops before that time is reached, mediarecorder automatically stops recording as well.
... lines 6-7 starts the recording process by calling recorder.start(), and outputs a message to the log with the updated state of the recorder and the
number of seconds it will be recording.
...And 2 more matches
Navigator - Web APIs
navigatorconcurrenthardware.hardwareconcurrency read only returns the
number of logical processor cores available.
... navigator.maxtouchpoints read only returns the maximum
number of simultaneous touch contact points are supported by the current device.
...this value is an approximation given by rounding to the nearest power of 2 and dividing that
number by 1024.
...And 2 more matches
PayerErrors.phone - Web APIs
the phone property is found in a payererrors object if the payername returned in the response couldn't be validated as a valid phone
number.
...if the payer's phone
number validated successfully, the phone property is omitted from the payererrors object.
... syntax payerphone = payererrors.phone; value if this property is present in the payererrors object, the payer's phone
number couldn't be successfully validated, and the phone property's value is a domstring explaining the error.
...And 2 more matches
SVGFEConvolveMatrixElement - Web APIs
svgfeconvolvematrixelement.kernelmatrix read only an svganimated
numberlist corresponding to the kernelmatrix attribute of the given element.
... svgfeconvolvematrixelement.divisor read only an svganimated
number corresponding to the divisor attribute of the given element.
... svgfeconvolvematrixelement.bias read only an svganimated
number corresponding to the bias attribute of the given element.
...And 2 more matches
SVGFESpecularLightingElement - Web APIs
svgfespecularlightingelement.surfacescale read only an svganimated
number corresponding to the surfacescale attribute of the given element.
... svgfespecularlightingelement.specularconstant read only an svganimated
number corresponding to the specularconstant attribute of the given element.
... svgfespecularlightingelement.specularexponent read only an svganimated
number corresponding to the specularexponent attribute of the given element.
...And 2 more matches
WebGLRenderingContext.getProgramParameter() - Web APIs
gl.attached_shaders: returns a glint indicating the
number of attached shaders to a program.
... gl.active_attributes: returns a glint indicating the
number of active attribute variables to a program.
... gl.active_uniforms: returns a glint indicating the
number of active uniform variables to a program.
...And 2 more matches
WebGLRenderingContext.vertexAttribPointer() - Web APIs
size a glint specifying the
number of components per vertex attribute.
...possible values: gl.byte: signed 8-bit integer, with values in [-128, 127] gl.short: signed 16-bit integer, with values in [-32768, 32767] gl.unsigned_byte: unsigned 8-bit integer, with values in [0, 255] gl.unsigned_short: unsigned 16-bit integer, with values in [0, 65535] gl.float: 32-bit ieee floating point
number when using a webgl 2 context, the following values are available additionally: gl.half_float: 16-bit ieee floating point
number normalized a glboolean specifying whether integer data values should be normalized into a certain range when being cast to a float.
... the maximum
number of vertex attributes depends on the graphics card, and you can call gl.getparameter(gl.max_vertex_attribs) to get this value.
...And 2 more matches
Rendering and the WebXR frame animation callback - Web APIs
this figure goes by a
number of different names, but they're all equivalent or nearly so: refresh rate vertical refresh rate vertical blanking rate (vbl) vertical sync rate vertical refresh rate there are other similar terms used as well, but regardless of what it's called, the unit of measurement applied is the hertz, or hz.
...that means that the maximum
number of frames it can display in a second is 60.
...by configuring the scene based on time rather than frame
number, you can ensure your rendered frames match what's expected instead of falling behind.
...And 2 more matches
Background audio processing using AudioWorklet - Web APIs
each input can have a
number of channels.
...each input may have a different
number of channels, and each channel has its own array of samples.
... thus, given the input list inputlist: const
numberofinputs = inputlist.length; const firstinput = inputlist[0]; const firstinputchannelcount = firstinput.length; const firstinputfirstchannel = firstinput[0]; // (or inputlist[0][0]) const firstchannelbytecount = firstinputfirstchannel.length; const firstbyteoffirstchannel = firstinputfirstchannel[0]; // (or inputlist[0][0][0]) the output list is structured in exactly the same way; it's an array of outputs, each of which is an array of channels, each of which is an array of float32array objects, which contain the samples for that channel.
...And 2 more matches
negative - CSS: Cascading Style Sheets
) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...) | rgba( <
number>{3} [ / <alpha-value> ]?
...And 2 more matches
prefix - CSS: Cascading Style Sheets
) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...) | rgba( <
number>{3} [ / <alpha-value> ]?
...And 2 more matches
speak-as - CSS: Cascading Style Sheets
syntax /* keyword values */ speak-as: auto; speak-as: bullets; speak-as:
numbers; speak-as: words; speak-as: spell-out; /* @counter-style name value */ speak-as: <counter-style-name>; values auto if the value of speak-as is specified as auto, then the effective value of speak-as will be determined based on the value of the system descriptor: if the value of system is alphabetic, the effective value of speak-as will be spell-out.
... for all other cases, specifying auto has the same effect as specifying speak-as:
numbers.
...
numbers the numerical value of the counter will be read out in the document language.
...And 2 more matches
suffix - CSS: Cascading Style Sheets
) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...) | rgba( <
number>{3} [ / <alpha-value> ]?
...And 2 more matches
system - CSS: Cascading Style Sheets
alphabetic interprets the specified symbols as digits, to an alphabetic
numbering system.
... numeric interprets the counter symbols as digits in a place-value
numbering system.
... additive used to represent "sign-value"
numbering systems, such as roman numerals, which rather than reuse digits in different positions to obtain different values, define additional digits for larger values.
...And 2 more matches
font-weight - CSS: Cascading Style Sheets
<
number> a <
number> value between 1 and 1000, inclusive.
... higher
numbers represent weights that are bolder than (or as bold as) lower
numbers.
... css fonts level 4 extends the syntax to accept any
number between 1 and 1000, inclusive, and introduces variable fonts, which can make use of this much finer-grained range of font weights.
...And 2 more matches
color - CSS: Cascading Style Sheets
the color css media feature can be used to test the
number of bits per color component (red, green, blue) of the output device.
... syntax the color feature is specified as an <integer> value that represents the
number of bits per color component (red, green, blue) of the output device.
... note: if the various color components are represented by different
numbers of bits, the smallest
number is used.
...And 2 more matches
Layout using named grid lines - CSS: Cascading Style Sheets
.wrapper { display: grid; grid-template-columns: [main-start] 1fr [content-start] 1fr [content-end] 1fr [main-end]; grid-template-rows: [main-start] 100px [content-start] 100px [content-end] 100px [main-end]; } once the lines have names, we can use the name to place the item rather than the line
number.
...-row-start: main-start; } .box4 { grid-column-start: content-start; grid-column-end: main-end; grid-row-start: content-end; } <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> <div class="box4">four</div> </div> everything else about line-based placement still works in the same way and you can mix named lines and line
numbers.
... naming lines is useful when creating a responsive design where you redefine the grid, rather than then needing to redefine the content position by changing the line
number in your media queries, you can ensure that the line is always named the same in your definitions.
...And 2 more matches
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
rather than setting the end line
number, i have chosen to say how many tracks this element should span, using the span keyword.
... i like this approach as when working with a multiple-column layout system we usually think of blocks in terms of the
number of tracks of the grid they span, and adjust that for different breakpoints.
...every breakpoint will use a 12-column grid, however the
number of tracks that items will span changes depending on the size of the screen.
...And 2 more matches
Subgrid - CSS: Cascading Style Sheets
note that line
numbering restarts inside the subgrid — column line 1, when inside the subgrid, is the first line of the subgrid.
... the subgridded element doesn't inherit the line
numbers of the parent grid.
... this means that you can safely lay out a component that may be placed in different positions on the main grid, knowing that the line
numbers on the component will always be the same.
...And 2 more matches
<angle> - CSS: Cascading Style Sheets
syntax the <angle> data type consists of a <
number> followed by one of the units listed below.
... as with all dimensions, there is no space between the unit literal and the
number.
... the angle unit is optional after the
number 0.
...And 2 more matches
border-image-outset - CSS: Cascading Style Sheets
syntax /* <length> value */ border-image-outset: 1rem; /* <
number> value */ border-image-outset: 1.5; /* vertical | 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 ...
...each value is a <length> or <
number>.
... values <length> the size of the border-image outset as a dimension — a
number with a unit.
...And 2 more matches
border - CSS: Cascading Style Sheets
) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...) | rgba( <
number>{3} [ / <alpha-value> ]?
...And 2 more matches
color - CSS: Cascading Style Sheets
) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...) | rgba( <
number>{3} [ / <alpha-value> ]?
...And 2 more matches
<easing-function> - CSS: Cascading Style Sheets
they correlate a time ratio to an output ratio, both expressed as <
number>s.
... syntax cubic-bezier(x1, y1, x2, y2) where: x1, y1, x2, y2 are <
number> values representing the abscissas, and ordinates of the p1 and p2 points defining the cubic bézier curve.
... syntax steps(
number_of_steps, direction) where:
number_of_steps is a strictly positive <integer>, representing the amount of equidistant treads composing the stepping function.
...And 2 more matches
<frequency> - CSS: Cascading Style Sheets
syntax the <frequency> data type consists of a <
number> followed by one of the units listed below.
... as with all css dimensions, there is no space between the unit literal and the
number.
... note: although the
number 0 is always the same regardless of unit, the unit may not be omitted.
...And 2 more matches
image() - CSS: Cascading Style Sheets
) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...) | rgba( <
number>{3} [ / <alpha-value> ]?
...And 2 more matches
initial-letter - CSS: Cascading Style Sheets
normal; /* numeric values */ initial-letter: 1.5; /* initial letter occupies 1.5 lines */ initial-letter: 3.0; /* initial letter occupies 3 lines */ initial-letter: 3.0 2; /* initial letter occupies 3 lines and sinks 2 lines */ /* global values */ initial-letter: inherit; initial-letter: initial; initial-letter: unset; syntax the keyword value normal, or a <
number> optionally followed by an <integer>.
... <
number> defines the size of the initial letter, in terms of how many lines it occupies.
... <integer> defines the
number of lines the initial letter should sink when the size of it is given.
...And 2 more matches
line-height - CSS: Cascading Style Sheets
syntax /* 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.
... <
number> (unitless) the used value is this unitless <
number> multiplied by the element's own font size.
... the computed value is the same as the specified <
number>.
...And 2 more matches
mask - CSS: Cascading Style Sheets
) | rgb( <
number>{3} [ / <alpha-value> ]?
...) | rgb( <
number>#{3} , <alpha-value>?
...) | rgba( <
number>{3} [ / <alpha-value> ]?
...And 2 more matches
repeat() - CSS: Cascading Style Sheets
the repeat() css function represents a repeated fragment of the track list, allowing a large
number of columns or rows that exhibit a recurring pattern to be written in a more compact form.
... auto-fill if the grid container has a definite or maximal size in the relevant axis, then the
number of repetitions is the largest possible positive integer that does not cause the grid to overflow its grid container.
...if any
number of repetitions would overflow, then the repetition is 1.
...And 2 more matches
<time> - CSS: Cascading Style Sheets
syntax the <time> data type consists of a <
number> followed by one of the units listed below.
...as with all dimensions, there is no space between the unit literal and the
number.
... note: although the
number 0 is always the same regardless of unit, the unit may not be omitted.
...And 2 more matches
rotate3d() - CSS: Cascading Style Sheets
syntax the amount of rotation created by rotate3d() is specified by three <
number>s and one <angle>.
... the <
number>s represent the x-, y-, and z-coordinates of the vector denoting the axis of rotation.
... rotate3d(x, y, z, a) values x is a <
number> describing the x-coordinate of the vector denoting the axis of rotation which could between 0 and 1.
...And 2 more matches
<colgroup> - HTML: Hypertext Markup Language
span this attribute contains a positive integer indicating the
number of consecutive columns the <colgroup> element spans.
... if the table doesn't use a colspan attribute, use one td:nth-child(an+b) css selector per column, where a is the total
number of the columns in the table and b is the ordinal position of this column in the table.
...typical values for this include a period (.) when attempting to align
numbers or monetary values.
...And 2 more matches
<img>: The Image Embed element - HTML: Hypertext Markup Language
this can happen in a
number of situations, including: the src attribute is empty ("") or null.
...there are a
number of situations in which a browser might not display images, such as: non-visual browsers (such as those used by people with visual impairments) the user chooses not to display images (saving bandwidth, privacy reasons) the image is invalid or an unsupported type in these cases, the browser may replace the image with the text in the element's alt attribute.
... a pixel density descriptor (a positive floating point
number directly followed by x).
...And 2 more matches
<input type="file"> - HTML: Hypertext Markup Language
for instance, there are a
number of ways microsoft word files can be identified, so a site that accepts word files might use an <input> like this: <input type="file" id="docpicker" accept=".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"> capture the capture attribute value is a string that specifies which camera to use for capture of image or video data, if the accept a...
...the filelist behaves like an array, so you can check its length property to get the
number of selected files.
... lastmodified a
number specifying the date and time at which the file was last modified, in milliseconds since the unix epoch (january 1, 1970 at midnight).
...And 2 more matches
Date - HTTP
<day> 2 digit day
number, e.g.
... <year> 4 digit year
number, e.g.
... <hour> 2 digit hour
number, e.g.
...And 2 more matches
If-Modified-Since - HTTP
<day> 2 digit day
number, e.g.
... <year> 4 digit year
number, e.g.
... <hour> 2 digit hour
number, e.g.
...And 2 more matches
If-Range - HTTP
<day> 2 digit day
number, e.g.
... <year> 4 digit year
number, e.g.
... <hour> 2 digit hour
number, e.g.
...And 2 more matches
If-Unmodified-Since - HTTP
<day> 2 digit day
number, e.g.
... <year> 4 digit year
number, e.g.
... <hour> 2 digit hour
number, e.g.
...And 2 more matches
Last-Modified - HTTP
<day> 2 digit day
number, e.g.
... <year> 4 digit year
number, e.g.
... <hour> 2 digit hour
number, e.g.
...And 2 more matches
Control flow and error handling - JavaScript
for example: var b = new boolean(false); if (b) // this condition evaluates to true if (b == true) // this condition evaluates to false example in the following example, the function checkdata returns true if the
number of characters in a text object is three.
...while it is common to throw
numbers or strings as errors, it is frequently more effective to use one of the exception types specifically created for this purpose: ecmascript exceptions domexception and domerror throw statement use the throw statement to throw an exception.
...the following code throws several exceptions of varying types: throw 'error2'; // string type throw 42; //
number type throw true; // boolean type throw {tostring: function() { return "i'm an object!"; } }; note: you can specify an object when you throw an exception.
...And 2 more matches
Loops and iteration - JavaScript
console.log('walking east one step'); } there are many different kinds of loops, but they all essentially do the same thing: they repeat an action some
number of times.
... (note that it's possible that
number could be zero!) the various loop mechanisms offer different ways to determine the start and end points of the loop.
... example in the example below, the function contains a for statement that counts the
number of selected options in a scrolling list (a <select> element that allows multiple selections).
...And 2 more matches
RangeError: radix must be an integer - JavaScript
the javascript exception "radix must be an integer at least 2 and no greater than 36" occurs when the optional radix parameter of the
number.prototype.tostring() or the bigint.prototype.tostring() method was specified and is not between 2 and 36.
... the optional radix parameter of the
number.prototype.tostring() or the bigint.prototype.tostring() method was specified.
... its value must be an integer (a
number) between 2 and 36, specifying the base of the
number system to be used for representing numeric values.
...And 2 more matches
The arguments object - JavaScript
this technique is useful for functions that can be passed a variable
number of arguments, such as math.min().
... this example function accepts any
number of string arguments and returns the longest one: function longeststring() { var longest = ''; for (var i=0; i < arguments.length; i++) { if (arguments[i].length > longest.length) { longest = arguments[i]; } } return longest; } you can use arguments.length to count how many arguments the function was called with.
... arguments.length the
number of arguments that were passed to the function.
...And 2 more matches
Array() constructor - JavaScript
syntax [element0, element1, ..., elementn] new array(element0, element1[, ...[, elementn]]) new array(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).
... arraylength if the only argument passed to the array constructor is an integer between 0 and 232-1 (inclusive), this returns a new javascript array with its length property set to that
number (note: this implies an array of arraylength empty slots, not slots with actual undefined values).
... if the argument is any other
number, a rangeerror exception is thrown.
...And 2 more matches
Array - JavaScript
y index position let removeditem = fruits.splice(pos, 1) // this is how to remove an item // ["strawberry", "mango"] remove items from an index position let vegetables = ['cabbage', 'turnip', 'radish', 'carrot'] console.log(vegetables) // ["cabbage", "turnip", "radish", "carrot"] let pos = 1 let n = 2 let removeditems = vegetables.splice(pos, n) // this is how to remove items, n defines the
number of items to be removed, // starting at the index position specified by pos and progressing toward the end of array.
... using an invalid index
number returns undefined.
...the
number of possible parenthesized substrings is unlimited.
...And 2 more matches
Intl - JavaScript
the intl object is the namespace for the ecmascript internationalization api, which provides language sensitive string comparison,
number formatting, and date and time formatting.
... intl.
numberformat() constructor for objects that enable language-sensitive
number formatting.
...javascript internationalization functions use the "u" (unicode) extension, which can be used to request additional customization of collator,
numberformat, or datetimeformat objects.
...And 2 more matches
Math.log1p() - JavaScript
the math.log1p() function returns the natural logarithm (base e) of 1 + a
number, that is ∀x>-1,math.log1p(x)=ln(1+x)\forall x > -1, \mathtt{\operatorname{math.log1p}(x)} = \ln(1 + x) the source for this interactive example is stored in a github repository.
... syntax math.log1p(x) parameters x a
number.
... return value the natural logarithm (base e) of 1 plus the given
number.
...And 2 more matches
Math.max() - JavaScript
the math.max() function returns the largest of the zero or more
numbers given as input parameters.
...
numbers.
... return value the largest of the given
numbers.
...And 2 more matches
Math.min() - JavaScript
the static function math.min() returns the lowest-valued
number passed into it, or nan if any parameter isn't a
number and can't be converted into one.
... zero or more
numbers among which the lowest value will be selected and returned.
... return value the smallest of the given
numbers.
...And 2 more matches
Math.trunc() - JavaScript
the math.trunc() function returns the integer part of a
number by removing any fractional digits.
... syntax math.trunc(x) parameters x a
number.
... return value the integer part of the given
number.
...And 2 more matches
ReferenceError() constructor - JavaScript
syntax new referenceerror([message[, filename[, line
number]]]) parameters message optional optional.
... line
number optional optional.
... the line
number of the code that caused the exception.
...And 2 more matches
String.prototype.split() - JavaScript
limit optional a non-negative integer limiting the
number of pieces.
...after splitting the string, the function logs messages indicating the original string (before the split), the separator used, the
number of elements in the array, and the individual array elements.
... harry trump ;fred barney; helen rigby ; bill abel ;chris hand [ "harry trump", "fred barney", "helen rigby", "bill abel", "chris hand", "" ] returning a limited
number of splits in the following example, split() looks for spaces in a string and returns the first 3 splits that it finds.
...And 2 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.
...the
number of characters to extract.
... if start is a positive
number, the index starts counting at the start of the string.
...And 2 more matches
TypedArray - JavaScript
instead, there are a
number of different global properties, whose values are typed array constructors for specific element types, listed below.
..._t uint16array 0 to 65535 2 16-bit unsigned integer unsigned short uint16_t int32array -2147483648 to 2147483647 4 32-bit two's complement signed integer long int32_t uint32array 0 to 4294967295 4 32-bit unsigned integer unsigned long uint32_t float32array 1.2×10-38 to 3.4×1038 4 32-bit ieee floating point
number (7 significant digits e.g., 1.1234567) unrestricted float float float64array 5.0×10-324 to 1.8×10308 8 64-bit ieee floating point
number (16 significant digits e.g., 1.123...15) unrestricted double double bigint64array -263 to 263-1 8 64-bit two's complement signed integer bigint int64_t (signed long long) biguint64array 0 to 264...
... static properties typedarray.bytes_per_element returns a
number value of the element size for the different typedarray objects.
...And 2 more matches
URIError() constructor - JavaScript
syntax new urierror([message[, filename[, line
number]]]) parameters message optional optional.
... line
number optional optional.
... the line
number of the code that caused the exception.
...And 2 more matches
isFinite() - JavaScript
the global isfinite() function determines whether the passed value is a finite
number.
... if needed, the parameter is first converted to a
number.
... you can use this function to determine whether a
number is a finite
number.
...And 2 more matches
typeof - JavaScript
type result undefined "undefined" null "object" (see below) boolean "boolean"
number "
number" bigint (new in ecmascript 2020) "bigint" string "string" symbol (new in ecmascript 2015) "symbol" function object (implements [[call]] in ecma-262 terms) "function" any other object "object" note: ecmascript 2019 and older permitted implementations to have typeof return any implementation-defined string value for non-...
... examples basic usage //
numbers typeof 37 === '
number'; typeof 3.14 === '
number'; typeof(42) === '
number'; typeof math.ln2 === '
number'; typeof infinity === '
number'; typeof nan === '
number'; // despite being "not-a-
number" typeof
number('1') === '
number'; //
number tries to parse things into
numbers typeof
number('shoe') === '
number'; // including values that cannot be type coerced to a
number typeof 42n === 'bigint'; // strings typeof '' === 'string'; typeof 'bla' === 'string'; typeof `template literal` === 'string'; typeof '1' === 'string'; // note that a
number within a string is still typeof string typeof (typeof 1) === 'string'; // typeo...
...typeof new boolean(true) === 'object'; typeof new
number(1) === 'object'; typeof new string('abc') === 'object'; // functions typeof function() {} === 'function'; typeof class c {} === 'function'; typeof math.sin === 'function'; typeof null // this stands since the beginning of javascript typeof null === 'object'; in the first implementation of javascript, javascript values were represented as a type tag and a value.
...And 2 more matches
Digital video concepts - Web media technologies
rgb most computer graphics models use the rgb color system, wherein some
number of bits of data are used to represent each of the red, green, and blue components of the color of an individual pixel, and an image is comprised of a two-dimensional array of these pixels.
...this decoding operation must mirror the method used during encoding, which is represented by three
numbers separated by colons (":").
... the first
number specifies the
number of luminance samples per row encoded from the 4x2 pixel block.
...And 2 more matches
The building blocks of responsive design - Progressive web apps (PWAs)
gh it in parts: @media all and (max-width: 480px) { x-card:nth-child(1), x-card:nth-child(2), x-card:nth-child(3) { width: 100%; float: none; padding: 0; } button { margin-top: 0; border-radius: 0; } x-card:nth-child(1) video, x-card:nth-child(2) img { border-radius: 0px; border: none; padding: 0; background-color: 0; } this first block resets a
number of different things from the widescreen layouts that were't required for the mobile app.
...ry, like so: button { background: url(images/low-res-header.jpg) 1rem center ; } @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and ( min-resolution: 192dpi), only screen and ( min-resolution: 2dppx) { button { background: url(images/high-res-header.jpg) 1rem center ; } } this looks rather complicated, but really it's not — we are providing a
number of media query options, as at this time different browsers support different resolution media query types and even units.
...there is no mechanism inherent in html images for serving different image files dependent on viewport size, and, due to a
number of irksome browser behavior realities, solutions are more difficult to hack together than you would imagine.
...And 2 more matches
kernelMatrix - SVG: Scalable Vector Graphics
the kernelmatrix attribute defines the list of
numbers that make up the kernel matrix for the <feconvolvematrix> element.
...the
number of entries in the list must equal to <orderx> by <ordery> as defined in the order attribute.
.../> </filter> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolvematrix1);"/> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolvematrix2); transform:translatex(220px);"/> </svg> usage notes value <list of
numbers> default value none animatable yes <list of
numbers> the list of <
number>s that make up the kernel matrix for the convolution.
...And 2 more matches
textLength - SVG: Scalable Vector Graphics
four elements are using this attribute: <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg viewbox="0 0 200 60" xmlns="http://www.w3.org/2000/svg"> <text y="20" textlength="6em">small text length</text> <text y="40" textlength="120%">big text length</text> </svg> usage notes value <length-percentage> | <
number> default value none animatable yes <length-percentage> this value specifies the width of the space the text will be adjusted to occupy as absolute length or percentage.
... <
number> a numeric value outlines a length referring to the units of the current coordinate system.
...idthslider"); const widthdisplay = document.getelementbyid("widthdisplay"); const textelement = document.getelementbyid("hello"); const baselength = math.floor(textelement.textlength.baseval.value); widthslider.value = baselength; widthslider.addeventlistener("input", function(event) { textelement.textlength.baseval.newvaluespecifiedunits( svglength.svg_lengthtype_px, widthslider.valueas
number); widthdisplay.innertext = widthslider.value; }, false); widthslider.dispatchevent(new event("input")); after fetching the element references, an eventlistener is established by calling addeventlistener() on the slider control, to receive any input events which occur.
...And 2 more matches
values - SVG: Scalable Vector Graphics
the values attribute has different meanings, depending upon the context where itʼs used, either it defines a sequence of values used over the course of an animation, or itʼs a list of
numbers for a color matrix, which is interpreted differently depending on the type of color change to be performed.
... fecolormatrix for the <fecolormatrix> element, values is a list of
numbers interpreted differently depending on the value of the type attribute.
... value <list-of-
numbers> default value if type="matrix", identity matrix, if type="saturate", 1, resulting in identity matrix, if type="huerotate", 0, resulting in identity matrix animatable yes <list-of-
numbers> the value is a list of
numbers, which is interpreted differently depending on the value of the type attribute: for type="matrix", values is a list of 20 matrix values (a00 a01 a02 a03 a04 a10 a11 ...
...And 2 more matches
Fills and Strokes - SVG: Scalable Vector Graphics
vg width="200" height="150" xmlns="http://www.w3.org/2000/svg" version="1.1"> <path d="m 10 75 q 50 10 100 75 t 190 75" stroke="black" stroke-linecap="round" stroke-dasharray="5,10,5" fill="none"/> <path d="m 10 75 l 190 75" stroke="red" stroke-linecap="round" stroke-width="1" stroke-dasharray="5,5" fill="none"/> </svg> the stroke-dasharray attribute takes a series of comma-separated
numbers as its argument.
... note: unlike <path>s, these
numbers must be comma-separated (whitespace is ignored).
... the first
number specifies a distance for the filled area, and the second a distance for the unfilled area.
...And 2 more matches
simple-storage - Archive of obsolete content
to store a value, just assign it to a property on storage: var ss = require("sdk/simple-storage"); ss.storage.myarray = [1, 1, 2, 3, 5, 8, 13]; ss.storage.myboolean = true; ss.storage.mynull = null; ss.storage.my
number = 3.1337; ss.storage.myobject = { a: "foo", b: { c: true }, d: null }; ss.storage.mystring = "o frabjous day!"; you can store array, boolean,
number, object, null, and string values.
...if you're within your quota, it's a
number from 0 to 1 (so a value of 0.5 means that you're using 50% of your quota and 1.0 means you're using your entire quota).
...properties with array, boolean,
number, object, null, and string values will be persisted.
... quotausage a
number in the range [0, infinity) that indicates the percentage of quota occupied by storage.
event/core - Archive of obsolete content
message : object|
number|string|boolean first argument that will be passed to listeners.
... arguments : object|
number|string|boolean more arguments that will be passed to listeners.
... count() returns a
number of event listeners registered for the given event type on the given event target.
... returns
number :
number of listeners ...
places/bookmarks - Archive of obsolete content
index
number the index of the bookmark within its group.
... index
number the index of the bookmark group within its parent group.
... index
number the index of the bookmark group within its parent group.
... options : object optional options: name type count
number the
number of bookmark items to return.
util/list - Archive of obsolete content
globals constructors list(element1, element2, ...) constructor can takes any
number of elements and creates an instance of list populated with the specified elements.
... parameters element1 : object|string|
number element2 : object|string|
number ...
... : object|string|
number functions addlistitem(list, item) function adds a item to a list.
.....*/) { 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.
jpm - Archive of obsolete content
jpm usage is: jpm [command] [options] jpm supports the following global options: -h, --help - show a help message and exit -v, --version - print the jpm version
number --addon-dir - directory for your source code, defaulting to the current directory installation jpm is distributed with the node package manager npm.
...specify --stop-on-error to stop running tests after the first failure: jpm test --stop-on-error --tbpl print test output in treeherder format --times
number run tests
number of times: jpm test --times 2 -v --verbose verbose operation.
... your add-on at this exact version
number already exists, so it was not signed.
... increment the version
number in your package.json file and run the command again.
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
it has a
number of useful qualities: it is generic, extensible, and easy to validate as well-formed.
... nevertheless, the rise of web services like google maps, which used javascript and asynchronous communications, created an awareness of a set of technologies nicknamed ajax (asynchronous javascript and xml); that plus the advent of a
number of libraries that paper over implementation differences between different web browsers has more recently led to a re-evaluation of javascript as a programming language.
... firefox 3.5 includes a
number of extensions to the specification standardized in ecmascript 3rd edition, and can use javascript 1.7 and javascript 1.8.
... there are a
number of levels to the dom with different levels of functionality.
No Proxy For configuration - Archive of obsolete content
ozilla.org) an ip address ip address "1.2.3.4" does not block hostnames that resolve to the ip address ("127.0.0.1" does not block "localhost") a network network w/ cidr block "10.0.0.0/8" does not block hostnames that resolve to the ip address range (10.0.0.0/8 is not "no proxy for intranet hostnames") optional - port-specific (optional) ":" + port
number "<filter>:81" only black-lists port.
...not usable for large
number of filters (ad blocking).
... localhost proxy 127.0.0.1 local host direct confirm the filter uses only suffix matches (hostname unit tests) hostname hostname direct name hostname direct host hostname proxy domains with
numbers 3com.com .3com.com direct fqdns hostname.domain.com hostname.domain.com domain.com proxy hostname.domain.com hostname.domain.com direct hostname.domain.com host.hostname.domain.com direct .domain.com .domain.com domain.com hostname.domain.com host.hostname.domain.com proxy dir...
... 127.0.0.1 proxy ports 1 127.0.0.1 proxy no port .mozilla.org www.mozilla.org:80 www.mozilla.org:81 direct direct port
number .mozilla.org:80 www.mozilla.org:80 www.mozilla.org direct direct :81 www.mozilla.org:81 proxy developer notes the no_proxy for logic is written in c++.
Downloading Nightly or Trunk Builds - Archive of obsolete content
so to figure out how to download a cutting edge or bleeding edge or 'beta' version of firefox, you need to look for a "build" (which is developer-speak for the packaged files you can download) of 1.9.1 (the
number of the underlying 'platform' called 'gecko' or 'mozilla' that firefox uses).
... as it turns out there is a platform
number for every firefox
number, but they are not the same
number.
...however, the
numbers are not used all of the time.
...and very often neither names nor
numbers are used, but rather special words indicating relative order are used.
JavaScript Client API - Archive of obsolete content
creating a custom engine the sync client ships with a
number of engines out of the box (history, bookmarks, etc).
...it also has to maintain a "score", which is a
number from 0 to 100 which represents "how badly does this data type need to be synced right now".
...the score
number is used by the scheduler to decide when your engine will be synced.
...the higher you set this
number, the more urgently the scheduler treats your request.
Introducing the Audio API extension - Archive of obsolete content
this event has the following attributes: mozchannels:
number of channels mozsamplerate: sample rate per second mozframebufferlength:
number of samples collected in all channels this information is needed later to decode the audio data stream.
...users must create an audio object and then use the mozsetup() function to specify the
number of channels and the frequency (in hz).
...the function returns the
number of samples written, which is useful for the next writing.
... you can see an example below: // write samples using a js array var samples = [0.242, 0.127, 0.0, -0.058, -0.242, ...]; var
numbersampleswritten = audiooutput.mozwriteaudio(samples); // write samples using a typed array var samples = new float32array([0.242, 0.127, 0.0, -0.058, -0.242, ...]); var
numbersampleswritten = audiooutput.mozwriteaudio(samples); in the following example, we create an audio pulse: <!doctype html> <html> <head> <title>generating audio in real time</title> <script type="text/javascript"> function playtone() { var output = new audio(); output.mozsetup(1, 44100); var samples = new float32array(22050); for (var i = 0; i < samples.length ; i++) { samples[i] = math.sin( i / 20 ); } output.mozwriteaudi...
Modularization techniques - Archive of obsolete content
the ids are unique 128 bit
numbers that are based on uuids.
...note that one interface can have a
number of classes that implement it, so there is not necessarily a one-to-one mapping from iids to cids.
...there are a
number of basic reference counting rules to remember.
... nsresult refreshfoo(ifoo **afoo) { if (afoo == null || *afoo == null) { return ns_error_null_parameter; } if ((*afoo)->stale()) { ns_release(*afoo); *afoo = mfoo; ns_addref(*afoo); } return ns_ok; } global and member variables both global and member variables have lifetimes that can be changed by any
number of functions.
init - Archive of obsolete content
method of installversion object syntax init ( int maj, int min, int rev, int bld ); init ( string version ); parameters the init method has the following parameters: maj the major version
number.
... min minor version
number.
... rev revision
number.
... bld build
number.
Writing to Files - Archive of obsolete content
this method has a
number of options to specify text or binary writing, the character set, and whether to append to an existing file or create a new one.
...creating and appending to files a
number of flags control whether a new file is created when writing or whether data is appended to an existing file.
...writing binary data in addition to text, binary values may be written to a file either as bytes or as
numbers.
... a
number of methods are available which may be used for this.
Result Generation - Archive of obsolete content
since it's a graph, arrows can point all over the place and nodes can have any
number of arrows pointing out of them and pointing at them.
...once you have selected a starting point, you use a
number of statements which indicate where to go next when navigating the graph.
...query processing a query for an rdf datasource consists of a
number of statements, placed as children of the query element.
...while the information network created by the template builder contains a
number of different pieces of necessary information, for the purposes of this discussion, we will only be interested in the list of possible results.
XML Assignments - Archive of obsolete content
however, you cannot use a expression that returns a
number in the query, as the query must return dom nodes as results.
...for each result, the ?namelength variable will be assigned the length of the name attribute on the result node, and the ?siblings variable will be assigned the
number of sibling nodes the result has.
... (in this case, the
number of xml node siblings in the document, not the
number of real siblings the people have, clearly the people in the datasource aren't actually siblings).
... naturally, the
number of siblings will be the same for all children, but you could imagine a more complex query expression that generated nodes where this wasn't actually the case.
Focus and Selection - Archive of obsolete content
this attribute should be set to a
number.
...example 2 : source view <script> function displayfocus(){ var elem=document.getelementbyid('sbar'); elem.setattribute('value','enter your phone
number.'); } </script> <textbox id="tbox1"/> <textbox id="tbox2" onfocus="displayfocus();"/> <description id="sbar" value=""/> the focus event, when it occurs, will call the displayfocus function.
...this interface also provides a
number of other methods which may be useful.
...one additional useful property of textboxes is the textlength property, which holds the total
number of characters in the field.
Manipulating Lists - Archive of obsolete content
« previousnext » the xul listbox provides a
number of specialized methods.
... example 3 : source view <script> function doselect(){ var val = document.getelementbyid('
number').value; val =
number(val); if (val != null) document.getelementbyid('level').selectedindex = val - 1; } </script> <hbox align="center"> <label value="enter a
number from 1 to 3:"/> <textbox id="
number"/> <button label="select" oncommand="doselect();"/> </hbox> <radiogroup id="level"> <radio label="excellent"/> <radio label="good"/> <radio label="poor"/> </radiogroup> list...
...this interface provides a
number of functions specifically for handling multiple selection.
... for example the selecteditems property holds a list of the items that are selected, while the selectedcount property holds the
number of items selected.
Styling a Tree - Archive of obsolete content
this is because you can specify the style for a
number of parts of the cell individually.
... treechildren::-moz-tree-row(readonly) { border: 1px solid red; } treechildren::-moz-tree-row(readonly, unread) { background-color: rgb(80%, 80%, 80%); } default properties the properties list for tree elements contain a small
number of default properties, which you can also use in a style sheet.
... even this property is set for even
numbered rows.
... odd this property is set for odd
numbered rows.
application/http-index-format specification - Archive of obsolete content
syntax every line in the file must conform 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.
... the syntax of data is defined by the syntax spec for every
number type.
... if a
number is encountered that a parser does not understand the parser is required to ignore that line.
...
number codes 100 a human readable comment line.
-ms-hyphenate-limit-lines - Archive of obsolete content
the -ms-hyphenate-limit-lines css property is a microsoft extension specifying the maximum
number of consecutive lines in an element that may be ended with a hyphenated word.
... initial valueno-limitapplies toblock container elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values no-limit indicates that hyphenation is not limited based on the
number of consecutive hyphenated lines.
... in the flow above the consecutive hyphenated lines limit would be an infinitely large positive
number.
... <integer> indicates the maximum
number of successive hyphenated lines.
XForms Input Element - Archive of obsolete content
(xhtml/xul) datepicker - used to represent data of type xsd:date (xhtml/xul) calendar - used to represent data of type xsd:date when appearance attribute also has the value 'full' (xhtml/xul) month list - used to represent data of type xsd:gmonth (xhtml only) days list - used to represent data of type xsd:gday (xhtml only)
number field - used to represent data of numeric type (fx 3.0 only, xul only) more detail about each of these widgets follows below.
...
number field this widget is similar to a spin button widget.
...for several of the schema data types that inherit from xsd:decimal, this
numberfield widget will allow the user to only type those values that are allowed by the type.
... these inheriting types are: xsd:integer xsd:nonpositiveinteger xsd:negativeinteger xsd:long xsd:int xsd:short xsd:byte xsd:nonnegativeinteger xsd:unsignedlong xsd:unsignedint xsd:unsignedshort xsd:unsignedbyte xsd:positiveinteger analogous widget is <xul:textbox type="
number"/> (will be available in fx 3.0) specific handling of attributes incremental - if "true", the bound instance node will be updated when the user clicks on the up or down spin buttons or directly edits the field and then sets focus elsewhere.
Fixing Incorrectly Sized List Item Markers - Archive of obsolete content
shortly before mozilla 0.9.4 was finished, a bug was introduced that affects the sizing of list item markers (such as the
numbers in an ordered list).
...this is most obvious in ordered lists, where the
number that precedes each list item may be obviously different than the content that follows it.
...the following rule is derived from mozilla's html.css file: *|*:-moz-list-bullet, *|*:-moz-list-
number {font-size: 1em;} this rule tells gecko-based browsers to use the computed value of font-size for the marker's parent, which is the list item itself.
... authors who are not concerned with making sure the rule applies across all namespaces can use a slightly more simplified rule: *:-moz-list-bullet, *:-moz-list-
number {font-size: 1em;} recommendations if it is important to make list item markers match the font size of the content, use one of the suggested rules.
Anatomy of a video game - Game development
high resolution time, on the other hand, counts the
number of milliseconds since navigationstart (when the previous document is unloaded).
... this value is returned as a decimal
number accurate to a thousandth of a millisecond.
... it is known as a domhighrestimestamp but, for all intents and purposes, consider it a floating point
number.
... draw on requestanimationframe and use it to poke a web worker containing the update method with the
number of ticks to compute, if any.
Extra lives - Game development
new variables add the following new variables below the existing ones in your code: var lives = 3; var livestext; var lifelosttext; these respectively will store the
number of lives, the text label that displays the
number of lives that remain, and a text label that will be shown on screen when the player loses one of their lives.
...ead of executing an anonymous function and showing the alert right away : ball.events.onoutofbounds.add(function(){ alert('game over!'); location.reload(); }, this); we will assign a new function called ballleavescreen; delete the previous event handler (shown above) and replace it with the following line: ball.events.onoutofbounds.add(ballleavescreen, this); we want to decrease the
number of lives every time the ball leaves the canvas.
...game.world.width*0.5, game.world.height-5); game.input.ondown.addonce(function(){ lifelosttext.visible = false; ball.body.velocity.set(150, -150); }, this); } else { alert('you lost, game over!'); location.reload(); } } instead of instantly printing out the alert when you lose a life, we first subtract one life from the current
number and check if it's a non-zero value.
... when the
number of available lives reaches zero, the game is over and the game over alert message will be shown.
Visual typescript game engine - Game development
*/ private aspectratio:
number = 1.333; /** * domain is simple url address, * recommendent to use for local propose lan ip * like : 192.168.0.xxx if you wanna run ant test app with server.
... * default value is 12034 */ private rtcserverport:
number = 12034; /** * connectorport is access port used to connect * session web socket.
... */ private connectorport:
number = 1234; /** * broadcasterport port used to connect multimedia server multirtc3.
... * default value is 9001 */ private broadcasterport:
number = 9001; /** * @description important note for this property: if you * disable (false) you cant use account system or any other * network.
Mobile accessibility - Learn web development
press the voiceover slider to enable it (you'll also see a
number of other options related to voiceover on this page).
...if you have a passcode set, you can select each
number by swiping/sliding (as explained above) and then double-tapping to enter each
number when you've found the right one.
... using the rotor when voiceover is turned on, you have a navigation feature called the rotor available to you, which allows you to quickly choose from a
number of common useful options.
...for example: types
number, tel, and email display suitable virtual keyboards for entering
numbers/telephone
numbers.
Beginner's guide to media queries - Learn web development
note: there were a
number of other media types defined in the level 3 media queries specification; these have been deprecated and should be avoided.
... there are a
number of other media features that you can test for, although some of the newer features introduced in level 4 and 5 of the media queries specification have limited browser support.
... there are a
number of other options you can put inside the content attribute of the viewport meta tag — see using the viewport meta tag to control layout on mobile browsers for more details.
... with the example open in your browser, make the screen wider and narrower to see the
number of column tracks change.
Responsive design - Learn web development
flexible layout before responsive design a
number of approaches were developed to try to solve the downsides of the liquid or fixed-width methods of building websites.
...that approach would be impossible given the vast
number of differently-sized devices that exist, and the fact that on desktop at least, people do not always have their browser window maximized.
...therefore the
number of columns will change according to how much space there is.
...it encompasses a
number of css and html features and techniques and is now essentially just how we build websites by default.
Styling lists - Learn web development
there are three properties you should know about to start with, which can be set on <ul> or <ol> elements: list-style-type: sets the type of bullets to use for the list, for example, square or circle bullets for an unordered list, or
numbers, letters or roman numerals for an ordered list.
...starting from a
number other than 1, or counting backwards, or counting in steps of more than 1.
... start the start attribute allows you to start the list counting from a
number other than 1.
...the following example: <ol> <li value="2">toast pita, leave to cool, then slice down the edge.</li> <li value="4">fry the halloumi in a shallow, non-stick pan, until browned on both sides.</li> <li value="6">wash and chop the salad.</li> <li value="8">fill pita with salad, hummus, and fried halloumi.</li> </ol> gives you this output: note: even if you are using a non-
number list-style-type, you still need to use the equivalent numerical values in the value attribute.
Advanced form styling - Learn web development
take the following example, which shows a
number of the "ugly" form features in action: this example has the following css applied to it: body { font-family: 'josefin sans', sans-serif; margin: 20px auto; max-width: 400px; } form > div { margin-bottom: 20px; } select { -webkit-appearance: none; appearance: none; } .select-wrapper { position: relative; } .select-wrapper::after { content: "▼"; font-size: 1rem; top: 6...
...herit; font-size: 100%; padding: 0; margin: 0; box-sizing: border-box; width: 100%; padding: 5px; height: 30px; } input[type="text"], input[type="datetime-local"], input[type="color"], select { box-shadow: inset 1px 1px 3px #ccc; border-radius: 5px; } label { margin-bottom: 5px; } button { width: 60%; margin: 0 auto; } note: if you want to test these examples across a
number of browsers simultaneously, you can find it live here (also see here for the source code).
... note: it is worth mentioning <input type="
number"> here too — this also has a spinner that you can use to increment/decrement values, so potentially suffers from the same problem.
... however, in the case of the
number type the data being collected is simpler, and it is easy to just use a text input type instead if desired (or tel if you want mobile browsers to show the numeric keypad).
Images in HTML - Learn web development
it can come in handy for a
number of reasons: the user is visually impaired, and is using a screen reader to read the web out to them.
...you can find your image's width and height in a
number of ways.
...in our example, we could do this: <img src="images/dinosaur.jpg" alt="the head and torso of a dinosaur skeleton; it has a large head with long sharp teeth" width="400" height="341" title="a t-rex on display in the manchester university museum"> this gives us a tooltip on mouse hover, just like link titles: however, this is not recommended — title has a
number of accessibility problems, mainly based around the fact that screen reader support is very unpredictable and most browsers won't show it unless you are hovering with a mouse (so e.g.
...nkeyup = function(){ // we only want to save the state when the user code is being shown, // not the solution, so that solution is not saved over the user code if(solution.value === 'show solution') { userentry = textarea.value; } else { solutionentry = textarea.value; } updatecode(); }; annotating images with figures and figure captions speaking of captions, there are a
number of ways that you could add a caption to go with your image.
Graceful asynchronous programming with Promises - Learn web development
this would make it work for any
number of items, not just three.
... take a copy of the previous example, and replace the existing timeoutpromise() definition with this: function timeoutpromise(message, interval) { return new promise((resolve, reject) => { if (message === '' || typeof message !== 'string') { reject('message is empty or not a string'); } else if (interval < 0 || typeof interval !== '
number') { reject('interval is negative or not a
number'); } else { settimeout(function(){ resolve(message); }, interval); } }); }; here we are passing two arguments into a custom function — a message to do something with, and the time interval to pass before doing the thing.
...if it is negative or not a
number, we reject the promise with a suitable error message.
...now try setting the message to an empty string or the interval to a negative
number, for example, and you'll be able to see the promise reject with the appropriate error messages!
Functions — reusable blocks of code - Learn web development
source string, // with the target string, and returns the newly formed string or every time we manipulated an array: let myarray = ['i', 'love', 'chocolate', 'frogs']; let madeastring = myarray.join(' '); console.log(madeastring); // the join() function takes an array, joins // all the array items together into a single // string, and returns this new string or every time we generated a random
number: let my
number = math.random(); // the random() function generates a random
number between // 0 and up to but not including 1, and returns that
number ...we were using a function!
...the above function for example calls the random() function three times, which is defined by the following code: function random(
number) { return math.floor(math.random()*
number); } we needed this function because the browser's built-in math.random() function only generates a random decimal
number between 0 and 1.
... we wanted a random whole
number between 0 and a specified
number.
...when called, it always returns a random
number between 0 and 1: let my
number = math.random(); the browser's built-in string replace() function however needs two parameters — the substring to find in the main string, and the substring to replace that string with: let mytext = 'i am a string'; let newstring = mytext.replace('string', 'sausage'); note: when you need to specify multiple parameters, they are separated by commas.
Video and Audio APIs - Learn web development
you'll see a
number of features; the html is dominated by the video player and its controls: <div class="player"> <video controls> <source src="video/sintel-short.mp4" type="video/mp4"> <source src="video/sintel-short.webm" type="video/webm"> <!-- fallback content here --> </video> <div class="controls"> <button class="play" data-icon="p" aria-label="play pause toggle"></button> <button cl...
... < 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.
... the two if statements work out whether the
number of minutes and seconds are less than 10.
... we set the width of the inner <div> to equal the calculated bar length, plus "px", so it will be set to that
number of pixels.
JavaScript First Steps - Learn web development
after that, we discuss some key building blocks in detail, such as variables, strings,
numbers and arrays.
...here you'll build up a simple "guess the
number" game, step by step.
...troubleshooting javascript when you built up the "guess the
number" game in the previous article, you may have found that it didn't work.
... basic math in javascript —
numbers and operators at this point in the course we discuss maths in javascript — how we can combine operators and other features to successfully manipulate
numbers to do our bidding.
Adding features to our bouncing balls demo - Learn web development
finally, we want to add a score counter to track the
number of balls left to capture.
... keep a count of the
number of balls on screen in some way.
... increment the count and display the updated
number of balls each time a ball is added to the scene.
... decrement the count and display the updated
number of balls each time the evil circle eats a ball (causes it not to exist).
Object prototypes - Learn web development
if you look at the object reference page, you'll see listed in the left hand side a large
number of properties and methods — many more than the
number of inherited members we saw available on the person1 object.
...now try the following: object.prototype you'll see a large
number of methods defined on object's prototype property, which are then available on objects that inherit from object, as shown earlier.
... you'll see other examples of prototype chain inheritance all over javascript — try looking for the methods and properties defined on the prototype of the string, date,
number, and array global objects, for example.
... these all have a
number of members defined on their prototype, which is why for example when you create a string, like this: let mystring = 'this is my string.'; mystring immediately has a
number of useful methods available on it, like split(), indexof(), replace(), etc.
Test your skills: Object basics - Learn web development
members: a
number representing the
number of members the band has.
... formed: a
number representing the year the band formed.
... split: a
number representing the year the band split up, or false if they are still together.
... released: a
number representing the year the album was released.
Website security - Learn web development
while all that sounds very ominous, the good news is that if you're using a server-side web framework, it will almost certainly enable "by default" robust and well-thought-out defense mechanisms against a
number of the more common attacks.
... a
number of other concrete steps you can take are: use more effective password management.
...for example, if your users must store sensitive information like credit card details, only display enough of the card
number that it can be identified by the user, and not enough that it can be copied by an attacker and used on another site.
... the most common pattern at this time is to only display the last 4 digits of a credit card
number.
Introduction to client-side frameworks - Learn web development
this is perhaps the hardest metric to measure, because community size does not correlate directly to easy-to-access
numbers.
... you can check a project's
number of github stars or weekly npm downloads to get an idea of its popularity, but sometimes the best thing to do is search a few forums or talk to other developers.
... static site generators static site generators are programs that dynamically generate all the webpages of a multi-page website — including any relevant css or javascript — so that they can be published in any
number of places.
...there are a
number of advantages of this approach, mostly around performance (your user's device isn’t building the page with javascript; it's already complete) and security (static pages have fewer attack vectors).
Strategies for carrying out testing - Learn web development
you might also know that a
number of people still use ie 9.
...there are a
number of sites that provide such stats, for example: netmarketshare statcounter these are both very north america-centric, and not particularly accurate, but they can give you an idea of broad trends.
... note: we also need to consider accessibility — there are a
number of useful tools you can install on your machine to facilitate accessibility testing, but we'll cover those in the handling common accessibility problems article, later in the course.
...there are a
number of popular virtual machine apps available, such as parallels, vmware, and virtual box; we personally like the latter, because it is free.
Package management basics - Learn web development
a web project can have any
number of dependencies, ranging from none to many, and your dependencies might include sub-dependencies that you didn't explicitly install — your dependencies may have their own dependencies.
...there are also a
number of other emerging clients, such as pnpm.
... version: the starting version
number for the app: again, just press return to accept the default 1.0.0.
...if you take a look in the directory you ran the parcel command in, you’ll find a
number of new files; the most interesting of which are: node_modules: the dependency files of parcel and date-fns.
Continuous Integration
each test is executed multiple times to produce a
number of data replicates.
... the talos harness produces a single
number per test (typically the median of all the replicates excluding the first 1-5), which are stored in treeherder's database, and are accessible via the perfherder interface.
... games benchmarking (firefox) under development, the games benchmarking harness (aka mozbench) will allow a
number of games-related benchmarks to be run against firefox and chrome.
...the "orange factor" is the average
number of intermittent test failures that occur per push.
mozbrowserfindchange
searchlimit a
number indicating the maximum
number of searches that can be returned.
...
numberofmatches a
number indicating the
number of matches returned by the search.
... activematchordinal a
number indicating the position of the currently highlighted search result, e.g.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserfindchange", function(event) { console.log("currently highlighted: " + event.details.activematchordinal + " out of " + event.details.
numberofmatches); }); related events mozbrowserasyncscroll mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
HTTP Cache
//github.com/realityripple/uxp/blob/master/netwerk/base/public/nsiloadcontextinfo.idl it is a helper interface wrapping following four arguments into a single one: private-browsing boolean flag anonymous load boolean flag app id
number (0 for no app) is-in-browser boolean flag helper functions to create nsiloadcontextinfo objects: c++ consumers: functions at loadcontextinfo.h exported header js consumers: resource://gre/modules/loadcontextinfo.jsm module methods two storage objects created with the same set of nsiloadcontextinfo arguments are identical, contain...
...dispatching to a level with a lower
number is executed sooner then dispatching to higher
number layers; also any loop on lower levels yields to higher levels so that scheduled deletion of 1000 files will not block opening cache entries.
...we also - in a thread-safe manner - count the
number of consumers keeping a reference on each entry.
... keeps the
number of consumers keeping a reference to it.
How to implement a custom autocomplete search component
cu = components.utils; cu.import('resource://gre/modules/xpcomutils.jsm'); const class_id = components.id('x753d830-ba1e-11e0-962b-0800200c9a66'); // ← change this const class_name = "basic autocomplete"; const contract_id = '@mozilla.org/autocomplete/search;1?name=basic-autocomplete'; /** * @constructor * * @implements {nsiautocompleteresult} * * @param {string} searchstring * @param {
number} searchresult * @param {
number} defaultindex * @param {string} errordescription * @param {array.<string>} results * @param {array.<string>|null=} comments */ function providerautocompleteresult(searchstring, searchresult, defaultindex, errordescription, results, comments) { this._searchstring = searchstring; this._searchresult = searchresult; this._defaultindex = defaultindex; this...
...._errordescription = errordescription; this._results = results; this._comments = comments; } providerautocompleteresult.prototype = { _searchstring: "", _searchresult: 0, _defaultindex: 0, _errordescription: "", _results: [], _comments: [], /** * @return {string} the original search string */ get searchstring() { return this._searchstring; }, /** * @return {
number} the result code of this result object, either: * result_ignored (invalid searchstring) * result_failure (failure) * result_nomatch (no matches found) * result_success (matches found) */ get searchresult() { return this._searchresult; }, /** * @return {
number} the index of the default item that should be entered if * none is selected */ get d...
...efaultindex() { 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 hint for the result at the given index */ getstyleat: function(index) { if (!this._comment...
... result_success (matches found) */ get searchresult() { 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...
Internationalized Domain Names (IDN) Support in Mozilla Browsers
the punycode proposal uses only restricted ascii characters and
numbers (a-z0-9) and a hyphen (-).
...icann = internet corporation for assigned names and
numbers.) the guideline allows domain name registrars in each country to limit the use of characters for domain names.
...for example, most sample links on the following test pages can be used without any further setting: http://www.nunames.nu/eu-lang-test.htm (domain names with latin 1 accented characters) http://www.nunames.nu/lldemo/default.htm (domain names in other languages) on july 10, 2003 and thereafter, you can access a large
number of japanese domain name sites under the .jp top domain with no further setting on netscape 7.1/mozilla 1.4: http://mitsuketa-nihongo.jp race (row-based ascii compatible encoding) almost all idn registration data are expected to change to punycode by the end of 2003.
... idn is a global trend and is likely to be adopted by a large
number of sites making it easier for average internet users to find web sites.
Assert.jsm
promise rejects( promise, expected, message ); parameters promise promise promise to wait for rejection and catch eventual thrown errors expected test reference to evaluate against the thrown result from block message short explanation of the expected result greater() the greater than assertion tests two
numbers with the > operator.
... undefined greater( lhs, rhs, message ); parameters lhs the left hand side of the operator rhs the right hand side of the operator message short explanation of the expected result greaterorequal() the greater or equal than assertion tests two
numbers with the >= operator.
... undefined greaterorequal( lhs, rhs, message ); parameters lhs the left hand side of the operator rhs the right hand side of the operator message short explanation of the expected result less() the lesser than assertion tests two
numbers with the < operator.
... undefined less( lhs, rhs, message ); parameters lhs the left hand side of the operator rhs the right hand side of the operator message short explanation of the expected result lessorequal() the lesser or equal than assertion tests two
numbers with the <= operator.
OS.File.Info
(as of firefox 38 this is always true on all systems, this is a bug: bugzilla 1145885) (on windows this returns false for hard links) size the
number of bytes in the file.
... platform-specific attributes unix unixowner a
number holding the identifier of the unix owner of this file.
... unixgroup a
number holding the identifier of the unix group of this file.
... unixmode a
number holding the unix access rights to this file.
Application Translation with Mercurial
if it is a red text consisting of a
number and the word 'missing', then there are untranslated texts and you can move on with this guide.
... choosing what to translate go to the localization status page and click on the '<
number> missing' label of the firefox branch on which you want to translate, e.g.
..."firefox <version
number> translation".
...this patch needs a name, choose something meaning full like "firefox-<version
number>-more-details".
Localization content best practices
when you have to change a key id, adding a progressive
number to the existing key should always be used as a last resort.
... there is an established format for localization comments: it's important to follow the format as closely as possible, since there are a
number of automated tools that parse these comments for easier access and use by localizers.
...some locales use a space between the
number and the % symbol, some don't, some use a non-breaking space.
...# see: http://developer.mozilla.org/en/docs/localization_and_plurals # #1 is the
number of cookies to delete # example: delete-cookies = delete #1 cookie;delete #1 cookies important: always include the localization note with this format if you use a plural form in firefox.
gettext
a definition of a string with plurals takes three arguments: the singular form of the english string, the plural form of the english string, and the
number basing on which the function will return the correct (singular or plural) form of the string.
...gettext will return one of the msgstrs, depending on the
number passed to the gettext function in the code ($num in the above example).
...for example, for english, the plural rule is of the following form: plural-forms: nplurals=2; plural=n != 1; the first part defines the
number of different plural forms (2).
...for example, --keyword=n___:1,2,4c tells xgettext to look for n___() calls, and extract the first argument as the singular string, the second argument as the plural string and the fourth argument as the context (the third argument is reserved for the
number in this example).
DMD
you will be able to get function names, but not line
numbers.
... some platforms (linux, mac, android) require stack fixing, which adds missing filename, function name and line
number information.
...you can choose a smaller
number, in which case more allocations will be aggregated into each record, but you'll have less context.
... or you can choose a larger
number, in which cases allocations will be split across more records, but you will have more context.
A guide to searching crash reports
the mozilla crash-stats site provides facilities for investigating large
numbers of firefox crash reports.
... the
numbers are large because this search matched all firefox crash reports from the past seven days.
...if the
number of matches is large -- in this case it exceeds 1.3 million, just as we saw in the "signature facet" tab -- the results will be spread across multiple pages, which you can visit by clicking the links at the top right of the tab.
... the
number of crash reports matching this search is in the thousands, i.e.
Midas
fontsize a
number this command will set the fontsize for a selection or at the insertion point if there is no selection.
... the given
number is such as would be used in the "size" attribute of the font tag.
...if the caret is inside a bulleted item, the bulleted item becomes a
numbered item.
...if the caret is inside a
numbered item, the
numbered item becomes a bulleted item.
PR_cnvtf
converts a floating point
number to a string.
... prcsn the
number of digits of precision to which to generate the floating point value.
... fval the double-precision floating point
number to be converted.
... description pr_cnvtf is a simpler interface to convert a floating point
number to a string.
PR_dtoa
converts a floating point
number to a string.
... syntax #include <prdtoa.h> prstatus pr_dtoa( prfloat64 d, printn mode, printn ndigits, printn *decpt, printn *sign, char **rve, char *buf, prsize bufsz); parameters the function has these parameters: d the floating point
number to be converted to a string.
... ndigits the
number of digits desired in the output string.
... description this function converts the specified floating point
number to a string, using the method specified by mode.
An overview of NSS Internals
(note that it's important to look at the
number 11, as there are other pkcs standards with different
numbers that define quite different topics.) a software or hardware module conforming to the pkcs#11 standard implements an interface of c calls, which allow querying the characteristics and offered services of the module.
... a core element of nss is freebl, a base library providing hash functions, big
number calculations, and cryptographic algorithms.
...examples for the database files are key3.db and cert8.db, where the
numbers are file version
numbers.
... it should be noted that the first database format that can be accessed simultaneously by multiple applications is key4.db/cert9.db – database files with lower
numbers will most likely experience unrecoverable corruption if you access them with multiple applications at the same time.
CERT_FindCertByIssuerAndSN
find a certificate in the database with the given issuer and serial
number.
... syntax #include <cert.h> certcertificate *cert_findcertbyissuerandsn ( certcertdbhandle *handle, certissuerandsn *issuerandsn ); parameters handle in pointer to a certcertdbhandle representing the certificate database to look in issuerandsn in pointer to a certissuerandsn that must be properly formed to contain the issuer name and the serial
number (see [example]) description this function creates a certificate key using the issuerandsn and it then uses the key to find the matching certificate in the database.
... returns a pointer to a certcertificate representing the certificate in the database that matched the issuer and serial
number, or null if none was found.
... example certissuerandsn issuersn; issuersn.derissuer.data = caname->data; issuersn.derissuer.len = caname->len; issuersn.serial
number.data = authoritykeyid->authcertserial
number.data; issuersn.serial
number.len = authoritykeyid->authcertserial
number.len; issuercert = cert_findcertbyissuerandsn(cert->dbhandle, &issuersn); if ( issuercert == null ) { port_seterror (sec_error_unknown_issuer); } see also occurrences of cert_findcertbyissuerandsn in the current nss source code (generated by lxr).
NSS tools : crlutil
dn:: is a ca distinguished name cert-serial: authority certificate serial
number.
... issueraltnames non-critical name-list where: subjaltnames: identifies the name of an extension should be set to 0 since this is non-critical extension name-list: comma separated list of names * add crl
number extension: the crl
number is a non-critical crl extension which conveys a monotonically increasing sequence
number for a given crl scope and crl issuer.
... this extension allows users to easily determine when a particular crl supersedes another crl crl
number non-critical
number where: crl
number: identifies the name of an extension critical: should be set to 0 since this is non-critical extension
number: value of long which identifies the sequential
number of a crl.
... invaliditydate non-critical date where: crl
number: identifies the name of an extension non-critical: should be set to 0 since this is non-critical extension date: invalidity date of a cert.
NSS Tools modutil
in this context, the term "password" is equivalent to a personal identification
number (pin).
...the following mechanisms are currently available: rsa, dsa, rc2, rc4, rc5, des, dh, fortezza, sha1, md5, md2, random (for random
number generation), and friendly (meaning certificates are publicly readable).
... internal pkcs #11 modulelibrary file: **internal only module**manufacturer: netscape communications corp description: communicator internal crypto svcpkcs #11 version 2.0library version: 4.0cipher enable flags: nonedefault mechanism flags: rsa:dsa:rc2:rc4:des:sha1:md5:md2slot: communicator internal cryptographic services version 4.0manufacturer: netscape communications corp type: softwareversion
number: 4.1firmware version: 0.0status: enabledtoken name: communicator generic crypto svcstoken manufacturer: netscape communications corp token model: libsec 4.0 token serial
number: 0000000000000000token version: 4.0token firmware version: 0.0access: write protectedlogin type: public (no login required)user pin: not initializedslot: communicator user private key and certificate servicesmanufacturer: ...
...netscape communications corp type: softwareversion
number: 3.0firmware version: 0.0status: enabledtoken name: communicator certificate db token manufacturer: netscape communications corp token model: libsec 4.0 token serial
number: 0000000000000000token version: 7.0token firmware version: 0.0access: not write protectedlogin type: login requireduser pin: not initialized setting a default provider this example makes the specified module a default provider for the rsa, dsa, and rc2 security mechanisms: modutil -default "cryptographic module" -dbdir c:\databases -mechanisms rsa:dsa:rc2 the security module database tool displays a warning: warning: performing this operation while communicator is running couldcause corruption of your security databases.
NSS tools : crlutil
dn:: is a ca distinguished name cert-serial: authority certificate serial
number.
... issueraltnames non-critical name-list where: subjaltnames: identifies the name of an extension should be set to 0 since this is non-critical extension name-list: comma separated list of names * add crl
number extension: the crl
number is a non-critical crl extension which conveys a monotonically increasing sequence
number for a given crl scope and crl issuer.
... this extension allows users to easily determine when a particular crl supersedes another crl crl
number non-critical
number where: crl
number: identifies the name of an extension critical: should be set to 0 since this is non-critical extension
number: value of long which identifies the sequential
number of a crl.
... invaliditydate non-critical date where: crl
number: identifies the name of an extension non-critical: should be set to 0 since this is non-critical extension date: invalidity date of a cert.
Rhino shell
-version version
number specifies the language version to compile with.
... the string version
number must be one of 100, 110, 120, 130, 140, 150, 160 or 170.
... version([
number]) get or set javascript version
number.
... if no argument is supplied, the current version
number is returned.
JS::CallArgs
syntax js::callargs js::callargsfromvp(unsigned argc, js::value *vp); name type description args unsigned
number of argument.
... methods inherited from js::callargsbase method description unsigned length() const returns the
number of arguments..
... if (args.length() == 0 || !args[0].is
number()) { args.rval().setint32(0); return true; } // access to the callee must occur before accessing/setting // the return value.
... handlevalue thisv = rec.thisv(); args.rval().set(js::
numbervalue(args.length() * args[0].to
number())); // callee() and calleev() will now assert.
JS::DeflateStringToUTF8Buffer
dstlenp size_t* the pointer to receive the
number of bytes written to the buffer.
... numcharsp size_t* the pointer to receive the
number of unicode characters written to the buffer.
... if dstlenp is provided, it will be updated to hold the
number of bytes written to the buffer.
... if numcharsp is provided, it will be updated to hold the
number of unicode characters written to the buffer.
JSErrorReport
lineno unsigned line
number in the source that caused the error.
... error
number unsigned the error
number.
...lineno indicates the line
number of the script containing the error.
... see also mxr id search for jserrorreport js_reporterror js_reportwarning js_reportoutofmemory js_seterrorreporter js_reporterror
number js_reporterror
numberuc js_reporterrorflagsand
number js_reporterrorflagsand
numberuc js_reportpendingexception ...
JS_AliasElement
this name corresponds to a string representation of the element's current index
number.
... alias jsint alias
number to assign to the element.
... description js_aliaselement assigns an alternate index
number for an element or numeric property associated with a native object.
...an alias does not replace an element's current index
number; it supplements it, providing a second way to reference the element.
JS_ConvertArguments
added in spidermonkey 31 argc unsigned the
number of arguments to convert.
...argc indicates the
number of js values you are passing in for conversion.
... if argc is less than the
number of arguments required by format, js_convertargument reports an error and returns false.
... if argc is greater than the
number of arguments described in format, the extraneous arguments are ignored.
JS_NewDoubleValue
use js_
numbervalue instead.
... create a floating-point jsval syntax jsbool js_newdoublevalue(jscontext *cx, jsdouble d, jsval *rval); name type description cx jscontext * the context in which to create the new
number.
...on success, *rval receives a javascript
number with the value d.
...see also js_
numbervalue bug 549143 ...
JS_ValueToInt32
first it converts v to a floating-point
number as if by calling js::to
number.
... if the result is nan, an infinity, or a
number outside the 32-bit range, js_valuetoint32 reports an error and conversion fails.
... otherwise, the floating-point
number is rounded to the nearest integer value.
...js::toint32 rounds as specified in ecma 262-3 §9.5, while this routine rounds by adding 0.5 to the converted float-point
number and truncating the result at the decimal point.
SpiderMonkey 1.8.7
note that there are a very small
number of incompatibilities between es5 and and es3, the version of ecmascript supported by spidermonkey versions 1.5 through 1.8.
...jsapi no longer represents floating-point
numbers (and integers more than 31 bits long) as pointers to jsdouble; instead, the jsdouble value is directly stored in the jsval.
... embedders must be careful when converting
numbers from jsvals into c.
...
numbers spidermonkey 1.8.5 now stores integers up to 32-bits in the jsval.
Redis Tips
but some commands only work with
numbers (like incr); for these, if your key can't be parsed as a
number, it's an error: redis> set foo pie ok redis> incr foo (error) err value is not an integer or out of range atomic counters i guess that sounds like geiger counters.
... redis> set foo 42 ok redis> incr foo (integer) 43 redis> incrby foo 17 (integer) 60 notice that these results come back as
numbers, not strings.
... commands will only crash if you feed them the wrong arguments or wrong
number of arguments.
... so the score would be <score_
number>.<extra_data_
number>.
Gecko object attributes
applied to: grid, heading, listitem, row, tablist exposed in aria: aria-level posinset if this item is in a group, what is the item
number within the group, where the size is defined by the setsize attribute.
... applied to: listitem, option exposed in aria: aria-posinset setsize if this item is in a group, this indicates the
number of items in the group.
... applied to: any object that supports the hypertext interface note: deprecated, use display attribute instead line-
number the current line
number of the caret, whether simply because the "browse with caret" option is on, or the caret used for editing text.
... the line
number is relative to the top of the currently focused area (the document, a rich text editable area, or an input control).
Setting up the Gecko SDK
there is now separate archive with gecko-sdk, just xul-runner-sdk.): linux: http://ftp.mozilla.org/pub/mozi....8.0.4.tar.bz2 windows: http://ftp.mozilla.org/pub/mozi...vc-1.8.0.4.zip mac: http://ftp.mozilla.org/pub/mozi...ac-1.8.0.4.zip note that the version
number for the archives above is 1.8.
... xpcom exports a
number of binaries that should be mentioned at this point.
... we also link against a
number of libraries in the object/library modules line: nspr4.lib plds4.lib plc4.lib embedstring.lib xpcomglue.lib both of these settings are shown below: the last change you need to make to set up the gecko sdk in your project is to change the "use run-time library" setting to "multithreaded dll." since this change is configuration dependent, you must make set the release configuration run-...
...the makefile allows you to specify any
number of options for your build environment, including the path and configuration updates you need to build with the gecko sdk.
IAccessibleHypertext
hyperlink if the given index is valid, that is it lies in the interval from 0 to the
number of links minus one, a reference to the specified hyperlink object is returned.
...if iaccessibletext is used to represent the text containing the link, then the character index is only valid if it is greater than or equal to zero and lower than the
number of characters in the text.
...nhyperlinks() returns the
number of links and link groups contained within this hypertext paragraph.
... [propget] hresult nhyperlinks( [out] long hyperlinkcount ); parameters hyperlinkcount the
number of links and link groups within this hypertext paragraph.
IAccessibleText
ncharacters() returns total
number of characters.
...lists, trees, and tables can have a large
number of children and thus it's possible that the child objects for those controls would only be created as needed.
...nselections() returns the
number of active non-contiguous selections.
...lists, trees, and tables can have a large
number of children and thus it's possible that the child objects for those controls would only be created as needed.
nsIAnnotationService
you should stick to ascii letters and
numbers plus "_", "-", and "/".
...you should stick to ascii letters and
numbers plus "_", "-", and "/".
...you should stick to ascii letters and
numbers plus "_", "-", and "/".
...you should stick to ascii letters and
numbers plus "_", "-", and "/".
nsIBinaryInputStream
unsigned long readarraybuffer(in pruint32 alength, in jsval aarraybuffer); parameters alength the
number of bytes that should be read.
... return value the
number of bytes actually read into aarraybuffer.
... void readbytearray( in pruint32 alength, [array, size_is(alength), retval] out pruint8 abytes ); parameters alength the
number of bytes that must be read.
... void readbytes( in pruint32 alength, [size_is(alength), retval] out string astring ); parameters alength the
number of bytes to read.
nsIBinaryOutputStream
alength the
number of bytes to write to the stream.
...alength the
number of bytes to write to the stream.
... writedouble() writes a double precision floating point
number to the stream.
... writefloat() writes a floating point
number to the stream.
nsIDOMHTMLAudioElement
returns the current offset of the audio stream, specified as the
number of samples that have played since the beginning of the stream.
...void mozsetup( in pruint32 channels, in pruint32 rate ); parameters channels the
number of audio channels the audio stream should use.
... return value the actual
number of bytes written to the stream.
...ns_error_dom_index_size_err the
number of samples specified doesn't divide evenly across the
number of channels; you must provide exactly the same
number of samples for all channels.
nsIDOMProgressEvent
loaded unsigned long long the
number of bytes transferred since the beginning of the operation.
... total unsigned long long the total
number of bytes of content that will be transferred during the operation.
... loadedarg the
number of bytes already transferred.
... totalarg the total
number of bytes to be transferred.
nsIDebug
aline line
number of abort request.
...aline line
number of assertion.
...aline line
number of break request.
...aline line
number of warning.
nsIJumpListBuilder
the default
number of allowed items in a jump list is ten.
... users can change the
number through system preferences.
...applications do not have control over the
number of items allowed in jump lists; excess items added are dropped by the system.
... maxlistitems short the maximum
number of jump list items the current desktop can support.
nsIProcess
count the
number of arguments in the args array.
... count the
number of arguments passed in the args array.
... count the
number of arguments in the args array.
... count the
number of arguments passed in the args array.
nsIScriptableInputStream
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview unsigned long available(); void close(); void init(in nsiinputstream ainputstream); string read(in unsigned long acount); acstring readbytes(in unsigned long acount); methods available() return the
number of bytes currently available in the stream.
...return value the
number of bytes.
...string read( in unsigned long acount ); parameters acount the maximum
number of bytes to read from the stream.
...acstring readbytes( in unsigned long acount ); parameters acount the maximum
number of bytes to read.
nsIXPConnect
nsistackframe createstackframelocation(in pruint32 alanguage, in string afilename, in string afunctionname, in print32 aline
number, in nsistackframe acaller); void debugdump(in short depth); void debugdumpevalinjsstackframe(in pruint32 aframe
number, in string asourcetext); void debugdumpjsstack(in prbool showargs, in prbool showlocals, in prbool showthisprops); void debugdumpobject(in nsisupports acomobj, in short depth); [noscript,notxpcom] prbool definedomquickstubs(in jscontext...
... return value missing description exceptions thrown missing exception missing description createstackframelocation() nsistackframe createstackframelocation( in pruint32 alanguage, in string afilename, in string afunctionname, in print32 aline
number, in nsistackframe acaller ); parameters alanguage missing description afilename missing description afunctionname missing description aline
number missing description acaller missing description return value missing description exceptions thrown missing exception missing description debugdump() void debugdump( in short depth ); parameters depth missing descriptio...
...n exceptions thrown missing exception missing description debugdumpevalinjsstackframe() void debugdumpevalinjsstackframe( in pruint32 aframe
number, in string asourcetext ); parameters aframe
number missing description asourcetext missing description exceptions thrown missing exception missing description debugdumpjsstack() void debugdumpjsstack( in prbool showargs, in prbool showlocals, in prbool showthisprops ); parameters showargs missing description showlocals missing description showthisprops missing description exceptions thrown missing exception missing description debugdumpobject() void debugdumpobject( in nsisupports acomobj, in short depth ); parameters acomobj missing description depth missing description exceptions th...
... interfacecount the
number of interfaces the class implements.
Building a Thunderbird extension 3: install manifest
<em:version>1.0</em:version>: this is the version
number of your extension.
...it is not the thunderbird version
number (which is stored in the minversion and maxversion fields).
...see valid application versions for a list of the supported version
numbers and formats.
...see valid application versions for a list of the supported version
numbers and formats.
Toolkit version format
each version part is itself parsed as a sequence of four parts: <
number-a><string-b><
number-c><string-d>.
...
numbers are integers base 10 (may be negative), strings are non-numeric ascii characters.
... a few examples of valid version parts: 0 (as in 1.0): <
number-a>=0 5a (as in 1.5a): <
number-a>=5, <string-b>=a 5pre4 (as in 3.5pre4): <
number-a>=5, <string-b>=pre, <
number-c>=4 * (as in 1.0.*): <string-b>=* a few special parsing rules are applied for backwards compatibility and readability: if the version part is a single asterisk, it is interpreted as an infinitely-large
number: 1.5.0.* is the same as 1.5.0.(infinity) if string-b is a plus sign,
number-a is incremented to be compatible with the firefox 1.0.x version format: 1.0+ is the same as 1.1pre the rationale behind splitting a version part into a sequence of strings and
numbers is that when comparing version parts, the numeric parts are compared as
numbers, e.g.
... comparing version parts version parts are also compared left to right, parts a and c are compared as
numbers, while parts b and d are compared byte-wise.
StructType
rangeerror the size of the structure, in bytes, cannot be represented both as a size_t and as a javascript
number.
...each field descriptor contains the field's name and its type, such as {'serial
number': ctypes.int}.
... a complete field descriptor list might look like this: [ {'serial
number': ctypes.int}, {'username': ctypes.char.ptr} ] properties property type description fields ctype[] a sealed array of field descriptors.
... size
number the size of the type, in bytes.
ctypes
arraytype(type[, length]); cdata cast(data, type); ctype functiontype(abi, returntype[, argtype1, ...]); cdata int64(n); string libraryname(name); library open(libspec); ctype pointertype(typespec); ctype structtype(name[, fields]); cdata uint64(n); properties property type description errno
number the value of the latest system error.
... winlasterror
number|undefined the value of the latest windows error.
...because of this, ctypes.int64 and ctypes.uint64 do not automatically convert to javascript
numbers.
... types whose size varies depending on platform because it's unknown whether these values will be 32-bit or 64-bit, they are not automatically converted into javascript
numbers.
Initialization and Destruction - Plugins
the argc parameter is the
number of html arguments in the element.
... it determines the
number of attributes in the arrays specified by the argn and argv parameters.
...for example, a video player could save the last frame
number to be displayed.
... when the user returns to the page, the previous frame
number is passed to the new instance of the plug-in, so it can initially display the same frame.
Accessibility Inspector - Firefox Developer Tools
childcount — the
number of child items the current item has in the accessibility tree hierarchy.
... indexinparent — an index value indicating what
number child the item is, inside its parent.
... notable related features when the accessibility features are turned on, there are a
number of useful additional features available in the devtools, which are detailed below: context menu options an extra context menu option is added, both for the general context menu on the web page when right/ctrl + clicking a ui feature, and the html pane of the page inspector when right/ctrl + clicking a dom element: when you choose the inspect accessibility properties/show accessibility prop...
...the
numbers are followed by aaa and a checkmark in green, indicating that the large text has a contrast ratio of 4.5:1 or more, meeting the criteria for enhanced contrast, or level aaa.
Debugger.Memory - Firefox Developer Tools
allocationsamplingprobability a
number between 0 and 1 that indicates the probability with which each new allocation should be entered into the allocations log.
... maxallocationsloglength the maximum
number of allocation sites to accumulate in the allocations log at a time.
...known values include the following: “gc mode” “malloc bytes trigger” “allocation trigger” “requested” gccycle
number the gc cycle’s “
number”.
... does not correspond to the
number of gc cycles that have run, but is guaranteed to be monotonically increasing.
Debugger.Object - Firefox Developer Tools
errorline
number if the referent is an error object, this is the line
number at which the referent was created; undefined otherwise.
... errorcolumn
number if the referent is an error object, this is the column
number at which the referent was created; undefined otherwise.
... promiselifetime if the referent is a promise, this is the
number of milliseconds elapsed since the promise was created.
... promisetimetoresolution if the referent is a promise, this is the
number of milliseconds elapsed between when the promise was created and when it was resolved.
Network request list - Firefox Developer Tools
cookies: the
number of request cookies associated to the request.
... set-cookies: the
number of response cookies associated to the request.
... transferred: the
number of bytes that were actually transferred to load the resource, or a message about why the resource was not transferred.
... a
number value is less than size if the resource was compressed.
Intensive JavaScript - Firefox Developer Tools
at the top of the stack is a function called calculateprimes(), and we can see its filename and line
number.
... isprime = false; break; } } if (isprime) { primes.push(candidate); } } return primes; } function dopointlesscomputationswithblocking() { var primes = calculateprimes(iterations, multiplier); pointlesscomputationsbutton.disabled = false; console.log(primes); } we're just running a (very inefficient) primality test 50 times, for some quite large
numbers.
... using requestanimationframe in the first attempt at fixing this, we'll split up the function into a
number of much smaller self-contained functions, and schedule each one using requestanimationframe().
... it's pretty simple to split up calculateprimes(): we will just calculate primality for each
number in a separate function: function dopointlesscomputationswithrequestanimationframe() { function testcandidate(index) { // finishing condition if (index == iterations) { console.log(primes); pointlesscomputationsbutton.disabled = false; return; } // test this
number var candidate = index * (multiplier * math.random()); var isprime = true; for (var c = 2; c <= math.sqrt(candidate); ++c) { if (candidate % c === 0) { ...
Console messages - Firefox Developer Tools
number of occurrences if a line that generates a warning or error is executed more than once, it is only logged once and this counter appears to indicate how many times it was encountered.
... filename and line
number for javascript, css and console api messages, the message can be traced to a specific line of code.
... the console then provides a link to the filename and line
number that generated the message.
... for errors and warnings, when you turn off display of the category, a
number appears next to the button text to indicate how many messages of that type are available.
AudioBufferSourceNode - Web APIs
0" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="666" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">audiobuffersourcenode</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} an audiobuffersourcenode has no inputs and exactly one output, which has the same
number of channels as the audiobuffer indicated by its buffer property.
...
number of inputs 0
number of outputs 1 channel count defined by the associated audiobuffer constructor audiobuffersourcenode() creates and returns a new audiobuffersourcenode object.
... audiobuffersourcenode.loopend optional a floating-point
number indicating the time, in seconds, at which playback of the audiobuffer stops and loops back to the time indicated by loopstart, if loop is true.
... var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create an empty three-second stereo buffer at the sample rate of the audiocontext var myarraybuffer = 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.
AudioConfiguration - Web APIs
channels: the
number of channels used by the audio track.
... bitrate: the
number of bits used to encode one second of the audio file.
... samplerate: the
number of audio samples making up one second of the audio file.
... examples //create media configuration to be tested const mediaconfig = { type : 'file', // 'record', 'transmission', or 'media-source' audio : { contenttype : "audio/ogg", // valid content type channels : 2, // audio channels used by the track bitrate : 132700, //
number of bits used to encode 1s of audio samplerate : 5200 //
number of audio samples making up that 1s.
BaseAudioContext.createBuffer() - Web APIs
numofchannels an integer representing the
number of channels this buffer should have.
...to determine the length to use for a specific
number of seconds of audio, use numseconds * samplerate.
... exceptions notsupportederror one or more of the options are negative or otherwise has an invalid value (such as
numberofchannels being higher than supported, or a samplerate outside the nominal range).
... var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create an empty three-second stereo buffer at the sample rate of the audiocontext var myarraybuffer = 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.
BasicCardResponse - Web APIs
the basiccardresponse dictionary (related to the payment request api, although defined in the basic card payment spec) defines an object structure for payment response details such as the
number/expiry date of the card used to make the payment, and the billing address.
... properties basiccardresponse.card
number read only secure context contains the
number of the card used to make the payment.
...this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like this: { "card
number' : '9999999999999999", "cardholdername' : 'mr.
... samsung internet android full support 7.0card
numberchrome no support noedge no support ≤18 — 79firefox full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled p...
ConstrainDouble - Web APIs
the constraindouble type is used to specify a constraint for a property whose value is a double-precision floating-point
number.
... properties if the value of a constraindouble is an object rather than a
number, it may have the properties below in addition the properties it inherits from doublerange.
... exact a double-precision floating-point
number specifying a specific, required, value the property must have to be considered acceptable.
... ideal a double-precision floating-point
number specifying a value the property would ideally have, but which can be considered optional if necessary to find a match.
DataTransfer - Web APIs
deprecated properties datatransfer.mozitemcount read only gives the
number of items in the drag operation.
...the index is in the range from zero to the
number of items minus one.
...the index should be in the range from zero to the
number of items minus one.
...if the index is not in the range from 0 to the
number of items minus one, an empty string list is returned.
DeviceOrientationEvent - Web APIs
deviceorientationevent.alpha read only a
number representing the motion of the device around the z axis, express in degrees with values ranging from 0 to 360.
... deviceorientationevent.beta read only a
number representing the motion of the device around the x axis, express in degrees with values ranging from -180 to 180.
... deviceorientationevent.gamma read only a
number representing the motion of the device around the y axis, express in degrees with values ranging from -90 to 90.
... deviceorientationevent.webkitcompassheading read only a
number represents the difference between the motion of the device around the z axis of the world system and the direction of the north, express in degrees with values ranging from 0 to 360.
EffectTiming - Web APIs
properties delay optional the
number of milliseconds to delay the start of the animation.
... duration optional the
number of milliseconds each iteration of the animation takes to complete.
... enddelay optional the
number of milliseconds to delay after the end of an animation.
... iterations optional the
number of times the animation should repeat.
Element.animate() - Web APIs
delay optional the
number of milliseconds to delay the start of the animation.
... duration optional the
number of milliseconds each iteration of the animation takes to complete.
... enddelay optional the
number of milliseconds to delay after the end of an animation.
... iterations optional the
number of times the animation should repeat.
Element.scrollTop - Web APIs
the element.scrolltop property gets or sets the
number of pixels that an element's content is scrolled vertically.
... syntax // get the
number of pixels scrolled.
... var intelemscrolltop = someelement.scrolltop; after running this code, intelemscrolltop is an integer corresponding to the
number of pixels that the element's content has been scrolled upwards.
... // set the
number of pixels scrolled.
HTMLInputElement.stepUp() - Web APIs
ts: <input type="month" min="2019-12" step="12"> week 1 (week) two week increments: <input type="week" min="2019-w23" step="2"> time 60 (seconds) 900 second (15 minute) increments: <input type="time" min="09:00" step="900"> datetime-local 1 (day) same day of the week: <input type="datetime-local" min="019-12-25t19:30" step="7">
number 1 0.1 increments <input type="
number" min="0" step="0.1" max="10"> range 1 increments by 2: <input type="range" min="0" step="2" max="10"> the method, when invoked, changes the form control's value by the value given in the step attribute, multiplied by the parameter, within the constraints set on the form control.
... example click the button in this example to increment the
number input type: html <p> <label>enter a
number between 0 and 400 that is divisible by 5: <input type="
number" step="5" id="the
number" min="0" max="400"> </label> </p> <p> <label>enter how many values of step you would like to increment by or leave it blank: <input type="
number" step="1" id="incrementer" min="0" max="25"> </label> </p> <input type="button" value="increment" id="thebutt...
...on"> javascript /* make the button call the function */ let button = document.getelementbyid('thebutton') button.addeventlistener('click', function() { steponup() }) function steponup() { let input = document.getelementbyid('the
number') let val = document.getelementbyid('incrementer').value if (val) { /* increment with a parameter */ input.stepup(val) } else { /* or without a parameter.
...if the parameter is 0, the
number will not be incremented.
msSetVideoRectangle - Web APIs
syntax htmlvideoelement.mssetvideorectangle(); parameters left a
number representing left-side position.
... top a
number representing top position.
... right a
number representing right-side position.
... bottom a
number representing bottom position.
Intersection Observer API - Web APIs
one thing the intersection observer api can't tell you: the exact
number of pixels that overlap or specifically which ones they are; however, it covers the much more common use case of "if they intersect by somewhere around n%, i need to do something." intersection observer concepts and usage the intersection observer api allows you to configure a callback that is called: (1) whenever one element, called the target, intersects either the device viewport or a specif...
... threshold either a single
number or an array of
numbers which indicate at what percentage of the target's visibility the observer's callback should be executed.
...provides methods for creating and managing an observer which can watch any
number of target elements for the same intersection configuration.
...the threshold list is built programmatically in this example since there are a
number of them and the
number is intended to be adjustable.
KeyboardEvent - Web APIs
keyboardevent.location read only returns a
number representing the location of the key on the keyboard or other input device.
... keyboardevent.charcode read only returns a
number representing the unicode reference
number of the key; this attribute is used only by the keypress event.
... keyboardevent.keycode read only returns a
number representing a system and implementation dependent numerical code identifying the unmodified value of the pressed key.
... keyboardevent.which read only returns a
number representing a system and implementation dependent numeric code identifying the unmodified value of the pressed key; this is usually the same as keycode.
KeyframeEffect.KeyframeEffect() - Web APIs
keyframeoptions optional either an integer representing the animation's duration (in milliseconds), or an object containing one or more of the following: delay optional the
number of milliseconds to delay the start of the animation.
... duration optional the
number of milliseconds each iteration of the animation takes to complete.
... enddelay optional the
number of milliseconds to delay after the end of an animation.
... iterations optional the
number of times the animation should repeat.
KeyframeEffectOptions - Web APIs
delay optional the
number of milliseconds to delay the start of the animation.
... duration optional the
number of milliseconds each iteration of the animation takes to complete.
... enddelay optional the
number of milliseconds to delay after the end of an animation.
... iterations optional the
number of times the animation should repeat.
MediaDevices.getUserMedia() - Web APIs
plain values are inherently ideal, which means that the first of our resolution examples above could have been written like this: { audio: true, video: { width: { ideal: 1280 }, height: { ideal: 720 } } } not all constraints are
numbers.
... for example, on mobile devices, the following will prefer the front camera (if one is available) over the rear one: { audio: true, video: { facingmode: "user" } } to require the rear camera, use: { audio: true, video: { facingmode: { exact: "environment" } } } another non-
number constraint is the deviceid constraint.
... security there are a
number of ways security management and controls in a user agent can cause getusermedia() to return a security-related error.
...there are a
number of insecure ways to load a document that might, in turn, attempt to call getusermedia().
navigator.hardwareConcurrency - Web APIs
the navigator.hardwareconcurrency read-only property returns the
number of logical processors available to run threads on the user's computer.
... syntax logicalprocessors = window.navigator.hardwareconcurrency value a
number indicating the
number of logical processor cores.
...the
number of logical processor cores can be used to measure the
number of threads which can effectively be run at once without them having to context switch.
... the browser may, however, choose to report a lower
number of logical cores in order to represent more accurately the
number of workers that can run at once, so don't treat this as an absolute measurement of the
number of cores in the user's system.
Notification.maxActions - Web APIs
the maxactions attribute of the notification interface returns the maximum
number of actions supported by the device and the user agent.
... effectively, this is the maximum
number of elements in notification.actions array which will be respected by the user agent.
... syntax notification.maxactions value an integer
number which indicates the largest
number of notification actions that can be presented to the user by the user agent and the device.
... examples the following snippet logs the maximum
number of supported actions.
RTCDataChannel: error event - Web APIs
d while shutting down", "restart of an association with new addresses", "user-initiated abort", "protocol violation" ]; dc.addeventlistener("error", ev => { const err = ev.error; console.error("webrtc error: ", err.message); // handle specific error detail types switch(err.errordetail) { case "sdp-syntax-error": console.error(" sdp syntax error in line ", err.sdpline
number); 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"); } b...
...reak; 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); } break; } // add source file name and line information console.error(" error in file ", err.filename, " at line ", err.line
number, ", column ", err.column
number); }, false); the received event provides details in an rtcerror object called error; rtcerror is an extension of the domexception interface.
...the message string is always output, as is information about the source file's name, line
number, and column
number at which the error occurred.
...for example, an sdp syntax error displays the line
number of the error within the sdp, and an sctp error displays a message corresponding to the sctp cause code.
RTCDataChannel - Web APIs
the default is "blob".bufferedamount read only the read-only rtcdatachannel property bufferedamount returns the
number of bytes of data currently queued to be sent over the data channel.bufferedamountlowthreshold the rtcdatachannel property bufferedamountlowthreshold is used to specify the
number of bytes of buffered outgoing data that is considered "low." the default value is 0.id read only the read-only rtcdatachannel property id returns an id
number (between 0 and 65,534) which uniquely identifies the rtcda...
...these labels are not required to be unique.maxpacketlifetime read only the read-only rtcdatachannel property maxpacketlifetime returns the amount of time, in milliseconds, the browser is allowed to take to attempt to transmit a message, as set when the data channel was created, or null.maxretransmits read only the read-only rtcdatachannel property maxretransmits returns the maximum
number of times the browser should try to retransmit a message before giving up, as set when the data channel was created, or null, which indicates that there is no maximum.negotiated read only the read-only rtcdatachannel property negotiated indicates whether the rtcdatachannel's connection was negotiated by the web app (true) or by the webrtc layer (false).ordered read only the read-only rtcdatachan...
...roperty readystate returns an enum of type rtcdatachannelstate which indicates the state of the data channel's underlying data connection.reliable read only the read-only rtcdatachannel property reliable indicates whether or not the data channel is reliable.stream read only the deprecated (and never part of the official specification) read-only rtcdatachannel property stream returns an id
number (between 0 and 65,535) which uniquely identifies the rtcdatachannel.event handlersalso inherits event handlers from: eventtargetonbufferedamountlow the rtcdatachannel.onbufferedamountlow property is an eventhandler which specifies a function the browser calls when the bufferedamountlow event is sent to the rtcdatachannel.
... events bufferedamountlow sent to the channel's onbufferedamountlow event handler when the
number of bytes of data in the outgoing data buffer falls below the value specified by bufferedamountlowthreshold.
RTCIceCandidate.port - Web APIs
the rtcicecandidate interface's read-only port property contains the port
number on the device at the address given by ip at which the candidate's peer can be reached.
... syntax var port = rtcicecandidate.port; value a 16-bit
number indicating the port
number on the device at the address indicated by ip at which the candidate's peer can be reached.
... usage notes consider this sdp attribute line (a-line) which describes an ice candidate: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host the port
number is found in the sixth field, which is "44323".
... example this code snippet fetches the ip address and port
number of the candidate, storing them into an object for future use.
RTCIceCandidate - Web APIs
when starting a webrtc peer connection, typically a
number of candidates are proposed by each end of the connection, until they mutually agree upon one which describes the connection they decide will be best.
... port read only an integer value indicating the candidate's port
number.
... relatedport read only for a candidate that is derived from another, such as a relay or reflexive candidate, the relatedport is a
number indicating the port
number of the candidate from which this candidate is derived.
... sdpmlineindex read only if not null, sdpmlineindex indicates the zero-based index
number of the media description (as defined in rfc 4566) in the sdp with which the candidate is associated.
RTCIceCandidatePairStats.circuitBreakerTriggerCount - Web APIs
the rtcicecandidatepairstats property circuitbreakertriggercount indicates the
number of times the circuit-breaker has been triggered to indicate a connection timeout or other unexpected connection abort on this specific connection configuration.
... syntax cbtcount = rtcicecandidatepairstats.circuitbreakertriggercount; value an integer value indicating the
number of times the circuit-breaker has been triggered for the 5-tuple used by this connection.
... the source port
number.
... the destination port
number.
RTCPeerConnection.createDataChannel() - Web APIs
maxpacketlifetime optional the maximum
number of milliseconds that attempts to transfer a message may take in unreliable mode.
... while this value is a 16-bit unsigned
number, each user agent may clamp it to whatever maximum it deems appropriate.
... maxretransmits optional the maximum
number of times the user agent should attempt to retransmit a message which fails the first time in unreliable mode.
... while this value is a16-bit unsigned
number, each user agent may clamp it to whatever maximum it deems appropriate.
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
we compute the
number of packets sent during this interval—packetssent—by subtracting the two reports' values for the packetssent property.
... similarly, the
number of bytes sent during this interval—bytessent—is calculated by subtracting the starting statistics object's bytessent property from that of the ending statistics.
... the
number of frames decoded during this interval—framesdecoded—is determined by subtracting startrecord's framesdecoded from endrecord.framesdecoded.
...the box contains a
number of log entries, the last handful of which are visible.
SVGFEDiffuseLightingElement - Web APIs
svgfediffuselightingelement.surfacescale read only an svganimated
number corresponding to the surfacescale attribute of the given element.
... svgfediffuselightingelement.diffuseconstant read only an svganimated
number corresponding to the diffuseconstant attribute of the given element.
... svgfediffuselightingelement.kernelunitlengthx read only an svganimated
number corresponding to the x component of the kernelunitlength attribute of the given element.
... svgfediffuselightingelement.kernelunitlengthy read only an svganimated
number corresponding to the y component of the kernelunitlength attribute of the given element.
SVGFEDropShadowElement - Web APIs
svgfedropshadowelement.dx read only an svganimated
number corresponding to the dx attribute of the given element.
... svgfedropshadowelement.dy read only an svganimated
number corresponding to the dy attribute of the given element.
... svgfedropshadowelement.stddeviationx read only an svganimated
number corresponding to the (possibly automatically computed) x component of the stddeviationx attribute of the given element.
... svgfedropshadowelement.stddeviationy read only an svganimated
number corresponding to the (possibly automatically computed) y component of the stddeviationy attribute of the given element.
Selection.setBaseAndExtent() - Web APIs
anchoroffset the
number of child nodes from the start of the anchor node that should be excluded from the selection.
... focusoffset the
number of child nodes from the start of the focus node that should be included in the selection.
... exceptions if anchoroffset is larger than the
number of child nodes inside anchornode, or if focusoffset is larger than the
number of child nodes inside focusnode, an indexsizeerror exception is thrown.
... <h1>setbaseandextent example</h1> <div> <p class="one"><span>fish</span><span>dog</span><span>cat</span><span>bird</span></p> <p>middle</p> <p class="two"><span>car</span><span>bike</span><span>boat</span><span>plane</span></p> </div> <div> <p> <label for="aoffset">anchor offset</label> <input id="aoffset" name="aoffset" type="
number" value="0"> </p> <p> <label for="foffset">focus offset</label> <input id="foffset" name="foffset" type="
number" value="0"> </p> <p><button>capture selection</button></p> </div> <p><strong>output</strong>: <span class="output"></span></p> the javascript looks like so: var one = document.queryselector('.one'); var two = document.queryselector('.two'); var aoffset = document.gete...
USBDevice - Web APIs
usbdevice.deviceversionmajor read only the major version
number of the device in a semantic versioning scheme.
... usbdevice.deviceversionminor read only the minor version
number of the device in a semantic versioning scheme.
... usbdevice.deviceversionsubminor read only the patch version
number of the device in a semantic versioning scheme.
... usbdevice.serial
number read only the manufacturer-defined serial
number for the specific usb device.
USBEndpoint - Web APIs
constructor usbendpoint.usbendpoint creates a new usbendpoint object which will be populated with information about the endpoint on the provided usbaltenateinterface with the given endpoint
number and transfer direction.
... properties usbendpoint.endpoint
number returns this endpoint's "endpoint
number" which is a value from 1 to 15 extracted from the bendpointaddress field of the endpoint descriptor defining this endpoint.
...for example, a usb serial device must provide bulk input and output endpoints but their endpoint
numbers will depend on what other interfaces the device provides.
... if (endpoint.type != "bulk") { continue; } if (endpoint.direction == "in") { inendpoint = endpoint.endpoint
number; } else if (endpoint.direction == "out") { outendpoint = endpoint.endpoint
number; } } } specifications specification status comment webusbthe definition of 'usbendpoint' in that specification.
Vibration API - Web APIs
the pattern may consist of either a single integer, describing the
number of milliseconds to vibrate, or an array of integers describing a pattern of vibrations and pauses.
...each value in the array is converted to an integer, then interpreted alternately as the
number of milliseconds the device should vibrate and the
number of milliseconds it should not be vibrating.
... you may specify as many vibration/pause pairs as you like, and you may provide either an even or odd
number of entries; it's worth noting that you don't have to provide a pause as your last entry since the vibration automatically stops at the end of each vibration period.
...t vibration: var vibrateinterval; // starts vibration at passed in level function startvibrate(duration) { navigator.vibrate(duration); } // stops vibration function stopvibrate() { // clear interval and stop persistent vibrating if(vibrateinterval) clearinterval(vibrateinterval); navigator.vibrate(0); } // start persistent vibration at given duration and interval // assumes a
number value is given function startpersistentvibrate(duration, interval) { vibrateinterval = setinterval(function() { startvibrate(duration); }, interval); } of course, the snippet above doesn't take into account the array method of vibration; persistent array-based vibration will require calculating the sum of the array items and creating an interval based on that
number (with an addi...
WebGLRenderingContext.pixelStorei() - Web APIs
glenum gl.browser_default_webgl gl.browser_default_webgl, gl.none webgl when using a webgl 2 context, the following values are available additionally: constant description type default value allowed values (for param) specified in gl.pack_row_length
number of pixels in a row.
... glint 0 0 to infinity opengl es 3.0 gl.pack_skip_pixels
number of pixel locations skipped before the first pixel is written into memory.
... glint 0 0 to infinity opengl es 3.0 gl.pack_skip_rows
number of rows of pixel locations skipped before the first pixel is written into memory glint 0 0 to infinity opengl es 3.0 gl.unpack_row_length
number of pixels in a row.
... glint 0 0 to infinity opengl es 3.0 gl.unpack_image_height image height used for reading pixel data from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_pixels
number of pixel images skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_rows
number of rows of pixel locations skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_images
number of pixel images skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 examples setting the pixel storage mode affects the webglrenderingcontext.readpixels() operations, as well as unpacking of textures with...
WebGL types - Web APIs
glfloat unrestricted float 32-bit ieee floating point
number.
... glclampf unrestricted float clamped 32-bit ieee floating point
number.
... type web idl type description glint64 long long signed 64-bit integer
number.
... type web idl type description gluint64ext long long unsigned 64-bit integer
number.
WebGL best practices - Web APIs
2) compute the
number of pixels covered by a maximized browser window.
... now adjust all internal caching in the application (webglbuffers, webgltextures, etc.) to obey a maximum size, computed by this constant multiplied by the
number of pixels covered by the current browser window.
... this requires estimating the
number of bytes consumed by each texture, for example.
...rgb) on some systems are emulated a
number of formats (particularly three-channel formats) are emulated.
Signaling and video calling - Web APIs
this can be done in a
number of ways; what's demonstrated here is just one possible way to structure signaling messages.
... each ice message suggests a communication protocol (tcp or udp), ip address, port
number, connection type (for example, whether the specified ip is the peer itself or a relay server), along with other information needed to link the two computers together.
...the exact process will vary, of course, but in general there are a few key points at which signaling messages get handled: the signaling process involves this exchange of messages among a
number of points: each user's client running within a web browser each user's web browser the signaling server the web server hosting the chat service imagine that naomi and priya are engaged in a discussion using the chat software, and naomi decides to open a video call between the two.
... dealing with state changes there are a
number of additional events you can set listeners for which notifying your code of a variety of state changes.
WebSocket.send() - Web APIs
the websocket.send() method enqueues the specified data to be transmitted to the server over the websocket connection, increasing the value of bufferedamount by the
number of bytes needed to contain the data.
...the string is added to the buffer in utf-8 format, and the value of bufferedamount is increased by the
number of bytes required to represent the utf-8 string.
... arraybuffer you can send the underlying binary data used by a typed array object; its binary data contents are queued in the buffer, increasing the value of bufferedamount by the requisite
number of bytes.
... arraybufferview you can send any javascript typed array object as a binary frame; its binary data contents are queued in the buffer, increasing the value of bufferedamount by the requisite
number of bytes.
Using the Web Speech API - Web APIs
the web speech api has a main controller interface for this — speechrecognition — plus a
number of closely-related interfaces for representing grammar, results, etc.
... speechrecognition.maxalternatives: sets the
number of alternative potential matches that should be returned per result.
... the web speech api has a main controller interface for this — speechsynthesis — plus a
number of closely-related interfaces for representing text to be synthesised (known as utterances), voices to be used for the utterance, etc.
...when speechsynthesis.pause() is invoked, this returns a message reporting the character
number and name that the speech was paused at.
Window.pageYOffset - Web APIs
the read-only window property pageyoffset is an alias for scrolly; as such, it returns the
number of pixels the document is currently scrolled along the vertical axis (that is, up or down) with a value of 0.0, indicating that the top edge of the document is currently aligned with the top edge of the window's content area.
... the corresponding pagexoffset property, which returns the
number of pixels scrolled along the horizontal axis (left and right), is an alias for scrollx.
... syntax yoffset = window.pageyoffset; value a floating-point
number specifying the
number of pixels the document is scrolled vertically within its containing window.
... this
number is subpixel precise, so it may not be an integer.
Window.scrollX - Web APIs
the read-only scrollx property of the window interface returns the
number of pixels that the document is currently scrolled horizontally.
... this value is subpixel precise in modern browsers, meaning that it isn't necessarily a whole
number.
... you can get the
number of pixels the document is scrolled vertically from the scrolly property.
... syntax var x = window.scrollx; value in practice, the returned value is a double-precision floating-point value indicating the
number of pixels the document is currently scrolled horizontally from the origin, where a positive value means the content is scrolled to the left.
Window.scrollY - Web APIs
the read-only scrolly property of the window interface returns the
number of pixels that the document is currently scrolled vertically.
... this value is subpixel precise in modern browsers, meaning that it isn't necessarily a whole
number.
... you can get the
number of pixels the document is scrolled horizontally from the scrollx property.
... syntax var y = window.scrolly value in practice, the returned value is a double-precision floating-point value indicating the
number of pixels the document is currently scrolled vertically from the origin, where a positive value means the content is scrolled to upward.
XPathResult - Web APIs
xpathresult.
numbervalueread only a
number representing the value of the result if resulttype is
number_type.
... xpathresult.resulttyperead only a
number code representing the type of the result, as defined by the type constants.
... xpathresult.snapshotlengthread only the
number of nodes in the result snapshot.
...
number_type 1 a result containing a single
number.
ARIA: feed role - Accessibility
if the
number of articles is known, set aria-setsize on the articles themselves.
... however, if the total
number is extremely large, indefinite, or changes often, set aria-setsize="-1" to indicate that the size of the feed is not known.
...each article element has aria-posinset set to a value that represents its position in the feed and an aria-setsize set to a value that represents either the total
number of articles that have been loaded or the total
number in the feed, depending on which value is more helpful to users.
... if the total
number in the feed is not known, set aria-setsize="-1".
ARIA: row role - Accessibility
a row can contain a
number of attributes clarifying the row's role, including aria-colindex, aria-level, aria-rowindex, and aria-selected.
... the attribute takes as its value an integer between 1 and the total
number of columns within the table, grid or treegrid.
... when placed on the row, the aria-colindex defines an element's column index or position with respect to the total
number of columns within a row.
...the attribute, placed with a unique value on each row, takes as its value an integer between 1 and the total
number of rows within the table, grid or treegrid, indicating the position, or index, of each row.
Web Accessibility: Understanding Colors and Luminance - Accessibility
looking at how the rgb color space is used to describe a color "red", you can see that the same color may be expressed in a shorthand, three-digit hex
number that converts to a rgb value, as a full six-digit hex
number that also converts to the same rgb value, or as a rgba value, expressed in percentages.
... interpreting for the w3c standard above, that would mean that white, normalized to 1, would have an rgb value of rgb(255, 255, 255) and black, normalized to 0, would have an rgb value of rgb(0,0,0) where do these
numbers of 0 to 255 come from?
... according to the article, hypersensitive cones, the authors note that "by population, about 64% of the cones are red-sensitive, about 32% green sensitive, and about 2% are blue sensitive." surprisingly, although cones that are blue-sensitive typically make up the fewest
number of cones, they are also the most "sensitive" to color.
... the concept of color saturation is a difficult one to understand when only looking at
numbers and terminology, so consider looking at the image below to illustrate the concept of saturation in a color.
font-variation-settings - CSS: Cascading Style Sheets
<string> <
number> when rendering text, the list of opentype axis names is passed to the text layout engine to enable or disable font features.
... each setting is always a <string> of 4 ascii characters, followed by a <
number> indicating the axis value.
...the <
number> can be fractional or negative.
... formal definition related at-rule@font-faceinitial valuenormalcomputed valueas specified formal syntax normal | [ <string> <
number> ]# examples setting font weight and stretch in a @font-face rule @font-face { font-family: 'opentypefont'; src: url('open_type_font.woff2') format('woff2'); font-weight: normal; font-style: normal; font-variation-settings: 'wght' 400, 'wdth' 300; } specifications specification status comment css fonts module level 4the definition of 'font-variation-settings' in that specification.
Color picker tool - CSS: Cascading Style Sheets
obj.value; this.format = '' + obj.format; this.lightness = obj.lightness; }; color.prototype.setformat = function setformat(format) { if (format === 'hsv') this.format = 'hsv'; if (format === 'hsl') this.format = 'hsl'; }; /*========== methods to set color properties ==========*/ color.prototype.isvalidrgbvalue = function isvalidrgbvalue(value) { return (typeof(value) === '
number' && isnan(value) === false && value >= 0 && value <= 255); }; color.prototype.setrgba = function setrgba(red, green, blue, alpha) { if (this.isvalidrgbvalue(red) === false || this.isvalidrgbvalue(green) === false || this.isvalidrgbvalue(blue) === false) return; this.r = red | 0; this.g = green | 0; this.b = blue | 0; if (this.isvalidrgbvalue(alpha) === true) this.
....sethsv = function sethsv(hue, saturation, value) { this.hue = hue; this.saturation = saturation; this.value = value; this.hsvtorgb(); }; color.prototype.sethsl = function sethsl(hue, saturation, lightness) { this.hue = hue; this.saturation = saturation; this.lightness = lightness; this.hsltorgb(); }; color.prototype.sethue = function sethue(value) { if (typeof(value) !== '
number' || isnan(value) === true || value < 0 || value > 359) return; this.hue = value; this.updatergb(); }; color.prototype.setsaturation = function setsaturation(value) { if (typeof(value) !== '
number' || isnan(value) === true || value < 0 || value > 100) return; this.saturation = value; this.updatergb(); }; color.prototype.setvalue = function setvalue(value) { if (typeof...
...(value) !== '
number' || isnan(value) === true || value < 0 || value > 100) return; this.value = value; this.hsvtorgb(); }; color.prototype.setlightness = function 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,...
...is.color.g; this.setcolor(this.color); }; colorpicker.prototype.inputchangeblue = function inputchangeblue(e) { var value = parseint(e.target.value); this.color.setbyname('b', value); e.target.value = this.color.b; this.setcolor(this.color); }; colorpicker.prototype.inputchangealpha = function inputchangealpha(e) { var value = parsefloat(e.target.value); if (typeof value === '
number' && isnan(value) === false && value >= 0 && value <= 1) this.color.a = value.tofixed(2); e.target.value = this.color.a; this.updatealphapicker(); }; colorpicker.prototype.inputchangehexa = function inputchangehexa(e) { var value = e.target.value; this.color.sethexa(value); this.setcolor(this.color); }; /***********************************************************************...
Basic Concepts of Multicol - CSS: Cascading Style Sheets
the column-count property the column-count property specifies the
number of columns that you would like the content to be displayed as.
... the browser will then assign the correct amount of space to each column box to create the requested
number of columns.
... using column-count and column-width together if you specify both properties on a multicol container then column-count will act as a maximum
number of columns.
... therefore the behaviour as described for column-width will happen, until the
number of columns in column-count is reached.
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
we need to add up the flex grow factors, then divide the total amount of positive free space in the flex container by that
number, which in this case is 4.
...you can use large
numbers, or decimals — it is up to you.
...play around with the different values — as for flex-grow you can use decimals or larger
numbers here.
... mastering sizing of flex items the key to really understanding how flex item sizing works is in understanding the
number of things that come into play.
Basic Concepts of grid layout - CSS: Cascading Style Sheets
item placement you can place items into a precise location on the grid using line
numbers, names or by targeting an area of the grid.
...grid then gives us
numbered lines to use when positioning items.
... lines are
numbered according to the writing mode of the document.
...if we return to our example with items positioned by line
number, we can change this to make two items overlap.
Linear-gradient Generator - CSS: Cascading Style Sheets
obj.value; this.format = '' + obj.format; this.lightness = obj.lightness; }; color.prototype.setformat = function setformat(format) { if (format === 'hsv') this.format = 'hsv'; if (format === 'hsl') this.format = 'hsl'; }; /*========== methods to set color properties ==========*/ color.prototype.isvalidrgbvalue = function isvalidrgbvalue(value) { return (typeof(value) === '
number' && isnan(value) === false && value >= 0 && value <= 255); }; color.prototype.setrgba = function setrgba(red, green, blue, alpha) { if (this.isvalidrgbvalue(red) === false || this.isvalidrgbvalue(green) === false || this.isvalidrgbvalue(blue) === false) return; this.r = red | 0; this.g = green | 0; this.b = blue | 0; if (this.isvalidrgbvalue(alpha) === true) this.
....sethsv = function sethsv(hue, saturation, value) { this.hue = hue; this.saturation = saturation; this.value = value; this.hsvtorgb(); }; color.prototype.sethsl = function sethsl(hue, saturation, lightness) { this.hue = hue; this.saturation = saturation; this.lightness = lightness; this.hsltorgb(); }; color.prototype.sethue = function sethue(value) { if (typeof(value) !== '
number' || isnan(value) === true || value < 0 || value > 359) return; this.hue = value; this.updatergb(); }; color.prototype.setsaturation = function setsaturation(value) { if (typeof(value) !== '
number' || isnan(value) === true || value < 0 || value > 100) return; this.saturation = value; this.updatergb(); }; color.prototype.setvalue = function setvalue(value) { if (typeof...
...(value) !== '
number' || isnan(value) === true || value < 0 || value > 100) return; this.value = value; this.hsvtorgb(); }; color.prototype.setlightness = function setlightness(value) { if (typeof(value) !== '
number' || isnan(value) === true || value < 0 || value > 100) return; this.lightness = value; this.hsltorgb(); }; color.prototype.setalpha = 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) ...
...is.color.g; this.setcolor(this.color); }; colorpicker.prototype.inputchangeblue = function inputchangeblue(e) { var value = parseint(e.target.value); this.color.setbyname('b', value); e.target.value = this.color.b; this.setcolor(this.color); }; colorpicker.prototype.inputchangealpha = function inputchangealpha(e) { var value = parsefloat(e.target.value); if (typeof value === '
number' && isnan(value) === false && value >= 0 && value <= 1) this.color.a = value.tofixed(2); e.target.value = this.color.a; this.updatealphapicker(); this.updatepreviewcolor(); }; colorpicker.prototype.inputchangehexa = function inputchangehexa(e) { var value = e.target.value; this.color.sethexa(value); this.setcolor(this.color); }; /******************************************...
<alpha-value> - CSS: Cascading Style Sheets
the <alpha-value> css data type represents a value that can be either a <
number> or a <percentage>, specifying the alpha channel or transparency of a color.
... syntax the value of an <alpha-value> is given as either a <
number> or a <percentage>.
... if given as a
number, the useful range is 0 (fully transparent) to 1.0 (fully opaque), with decimal values in between; that is, 0.5 indicates that half of the foreground color is used and half of the background color is used.
... interpolation when animated, values of the <alpha-value> css data type are interpolated as real, floating-point
numbers.
animation-iteration-count - CSS: Cascading Style Sheets
the animation-iteration-count css property sets the
number of times an animation sequence should be played before stopping.
... syntax /* keyword value */ animation-iteration-count: infinite; /* <
number> values */ animation-iteration-count: 3; animation-iteration-count: 2.4; /* multiple values */ animation-iteration-count: 2, 0, infinite; the animation-iteration-count property is specified as one or more comma-separated values.
... <
number> the
number of times the animation will repeat; this is 1 by default.
... formal definition initial value1applies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <single-animation-iteration-count>#where <single-animation-iteration-count> = infinite | <
number> examples see css animations for examples.
border-image-slice - CSS: Cascading Style Sheets
rder-image-slice: 10% 30%; /* top | horizontal | bottom */ border-image-slice: 30 30% 45; /* top | right | bottom | left */ border-image-slice: 7 12 14 5; /* using the `fill` keyword */ border-image-slice: 10% fill 7 12; /* global values */ border-image-slice: inherit; border-image-slice: initial; border-image-slice: unset; the border-image-slice property may be specified using one to four <
number-percentage> values to represent the position of each image slice.
... values <
number> represents an edge offset in pixels for raster images and coordinates for vector images.
... for vector images, the
number is relative to the element's size, not the size of the source image, so percentages are generally preferable in these cases.
...it also applies to ::first-letter.inheritednopercentagesrefer to the size of the border imagecomputed valueone to four percentage(s) (as specified) or absolute length(s), plus the keyword fill if specifiedanimation typeby computed value type formal syntax <
number-percentage>{1,4} && fill?where <
number-percentage> = <
number> | <percentage> examples adjustable border width and slice the folowing example shows a simple <div> with a border image set on it.
calc() - CSS: Cascading Style Sheets
it can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <
number>, or <integer> is allowed.
...at least one of the arguments must be a <
number>.
...the right-hand side must be a <
number>.
... formal syntax calc( <calc-sum> )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <
number> ]*where <calc-value> = <
number> | <dimension> | <percentage> | ( <calc-sum> ) accessibility concerns when calc() is used for controlling text size, be sure that one of the values includes a relative length unit, for example: h1 { font-size: calc(1.5rem + 3vw); } this ensures that text size will scale if the page is zoomed.
column-count - CSS: Cascading Style Sheets
the column-count css property breaks an element's content into the specified
number of columns.
... syntax /* keyword value */ column-count: auto; /* <integer> value */ column-count: 3; /* global values */ column-count: inherit; column-count: initial; column-count: unset; values auto the
number of columns is determined by other css properties, such as column-width.
... <integer> is a strictly positive <integer> describing the ideal
number of columns into which the content of the element will be flowed.
... if the column-width is also set to a non-auto value, it merely indicates the maximum allowed
number of columns.
<dimension> - CSS: Cascading Style Sheets
the <dimension> css data type represents a <
number> with a unit attached to it, for example 10px.
... syntax the syntax of <dimension> is a <
number> immediately followed by a unit which is an identifier.
... examples valid dimensions 12px 12 pixels 1rem 1 rem 1.2pt 1.2 points 2200ms 2200 milliseconds 5s 5 seconds 200hz 200 hertz 200hz 200 hertz (values are case insensitive) invalid dimensions 12 px the unit must come immediately after the
number.
... recommendation defined under
numbers and length css level 1the definition of '<dimension>' in that specification.
font-size-adjust - CSS: Cascading Style Sheets
to use this property in a way that is compatible with browsers that do not support font-size-adjust, it is specified as a
number that the font-size property is multiplied by.
... <
number> choose the size of the font so that its lowercase letters (as determined by the x-height of the font) are the specified
number times the font-size.
... the
number specified should generally be the aspect ratio (ratio of x-height to font size) of the first choice font-family.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typea
number formal syntax none | <
number> examples adjusting lower-case letter sizes html <p class="times">this text uses the times font (10px), which is hard to read in small sizes.</p> <p class="verdana">this text uses the verdana font (10px), which has relatively large lowercase letters.</p> <p class="adjtimes">this is the 10px times, but now adjusted to the same aspect ratio as the verdana.</p> css .times { font-family: times, serif; fo...
font-variation-settings - CSS: Cascading Style Sheets
<string> <
number> when rendering text, the list of variable font axis names is passed to the text layout engine to enable or disable font features.
... each setting is always one or more pairs consisting of a <string> of 4 ascii characters followed by a <
number> indicating the axis value to set.
...the <
number> can be fractional or negative, depending on the value range available in your font, as defined by the font designer.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typea transform formal syntax normal | [ <string> <
number> ]# examples you can find a
number of other variable fonts examples at our variable fonts guide, v-fonts.com, and axis-praxis.org.
<length> - CSS: Cascading Style Sheets
syntax the <length> data type consists of a <
number> followed by one of the units listed below.
... as with all css dimensions, there is no space between the unit literal and the
number.
... the length unit is optional after the
number 0.
... interpolation when animated, values of the <length> data type are interpolated as real, floating-point
numbers.
mask-border-outset - CSS: Cascading Style Sheets
syntax /* <length> value */ mask-border-outset: 1rem; /* <
number> value */ mask-border-outset: 1.5; /* vertical | 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.
... each value is a <length> or <
number>.
... <
number> the size of the mask border outset as a multiple of the corresponding border-width.
... formal definition initial value0applies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typediscrete formal syntax [ <length> | <
number> ]{1,4} examples basic usage this property doesn't appear to be supported anywhere yet.
mask-border-slice - CSS: Cascading Style Sheets
al */ mask-border-slice: 10% 30%; /* top | horizontal | bottom */ mask-border-slice: 30 30% 45; /* top | right | bottom | left */ mask-border-slice: 7 12 14 5; /* using the `fill` keyword */ mask-border-slice: 10% fill 7 12; /* global values */ mask-border-slice: inherit; mask-border-slice: initial; mask-border-slice: unset; the mask-border-slice property may be specified using one to four <
number-percentage> values to represent the position of each image slice.
... values <
number> represents an edge offset in pixels for raster images and coordinates for vector images.
... for vector images, the
number is relative to the element's size, not the size of the source image, so percentages are generally preferable in these cases.
... formal definition initial value0applies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednopercentagesrefer to size of the mask border imagecomputed valueas specifiedanimation typediscrete formal syntax <
number-percentage>{1,4} fill?where <
number-percentage> = <
number> | <percentage> examples basic usage this property doesn't appear to be supported anywhere yet.
scale - CSS: Cascading Style Sheets
syntax /* keyword values */ scale: none; /* single values */ /* values of more than 1 make 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.
... two length/percentage values two <
number>s that specify the x and y axis scaling values (respectively) of a 2d scale.
... three length/percentage values three <
number>s that specify the x, y, and z axis scaling values (respectively) of a 3d scale.
... formal definition initial valuenoneapplies totransformable elementsinheritednocomputed valueas specifiedanimation typea transformcreates stacking contextyes formal syntax none | <
number>{1,3} examples scaling an element on hover html <div> <p class="scale">scaling</p> </div> css * { box-sizing: border-box; } html { font-family: sans-serif; } div { width: 150px; margin: 0 auto; } p { padding: 10px 5px; border: 3px solid black; border-radius: 20px; width: 150px; font-size: 1.2rem; text-align: center; } .scale { transition: scale 1s; } div:hover .scale { scale: 2 0.7; } result specifications specification status comment css...
text-transform - CSS: Cascading Style Sheets
a letter is defined as a character that is part of unicode's letter or
number general categories ; thus, any punctuation marks or symbols at the beginning of a word are ignored.
...the keyword target the first letter, that is the first unicode character part of the letter or
number general category.
...the keyword target the first letter, that is the first unicode character part of the letter or
number general category.
... working draft from css level 2 (revision 1)the definition of 'text-transform' in that specification., extends letters to any unicode character in the
number or letter general category.
transform - CSS: Cascading Style Sheets
here <transform-list> = <transform-function>+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>?
... )<translatex()> = translatex( <length-percentage> )<translatey()> = translatey( <length-percentage> )<scale()> = scale( <
number> , <
number>?
... )<scalex()> = scalex( <
number> )<scaley()> = scaley( <
number> )<rotate()> = rotate( [ <angle> | <zero> ] )<skew()> = skew( [ <angle> | <zero> ] , [ <angle> | <zero> ]?
... )<skewx()> = skewx( [ <angle> | <zero> ] )<skewy()> = skewy( [ <angle> | <zero> ] )<matrix3d()> = matrix3d( <
number>#{16} )<translate3d()> = translate3d( <length-percentage> , <length-percentage> , <length> )<translatez()> = translatez( <length> )<scale3d()> = scale3d( <
number> , <
number> , <
number> )<scalez()> = scalez( <
number> )<rotate3d()> = rotate3d( <
number> , <
number> , <
number> , [ <angle> | <zero> ] )<rotatex()> = rotatex( [ <angle> | <zero> ] )<rotatey()> = rotatey( [ <angle> | <zero> ] )<rotatez()> = rotatez( [ <angle> | <zero> ] )<perspective()> = perspective( <length> )where <length-percentage> = <length> | <percentage> examples translating and rotating an element html <div>transformed element</div> css div { border: solid red; transform: translate(30px, 20px) rotate(20de...
HTML attribute: max - HTML: Hypertext Markup Language
valid for the numeric input types, including the date, month, week, time, datetime-local,
number and range types, and both the <progress> and <meter> elements, the max attribute is a
number that specifies the most positive value a form control to be considered valid.
... date yyyy-mm-dd <input type="date" max="2019-12-25" step="1"> month yyyy-mm <input type="month" max="2019-12" step="12"> week yyyy-w## <input type="week" max="2019-w23" step=""> time hh:mm <input type="time" max="17:00" step="900"> datetime-local yyyy-mm-ddthh:mm <input type="datetime-local" min="2019-12-25t23:59">
number <
number> <input type="
number" min="0" step="5" max="100"> range <
number> <input type="range" min="60" step="5" max="100"> note: when the data entered by the user doesn't adhere to the maximum value set, the value is considered invalid in contraint validation and will match the :invalid and :out-of-range pseudoclasses see client-side validation and rangeoverflow for ...
...if present, must have a value greater than zero and be a valid floating point
number.
... syntax for max values for other elements input type syntax example <progress> <
number> <progress id="file" max="100" value="70"> 70% </progress> <meter> <
number> <meter id="fuel" min="0" max="100" low="33" high="66" optimum="80" value="40"> at 40/100</meter> ...
<col> - HTML: Hypertext Markup Language
span this attribute contains a positive integer indicating the
number of consecutive columns the <col> element spans.
...typical values for this include a period (.) when attempting to align
numbers or monetary values.
... charoff this attribute is used to indicate the
number of characters to offset the column data from the alignment characters specified by the char attribute.
... if the table doesn't use a colspan attribute, use the td:nth-child(an+b) css selector where a is the total
number of the columns in the table and b is the ordinal position of the column in the table.
<li> - HTML: Hypertext Markup Language
in ordered lists, they are usually displayed with an ascending counter on the left, such as a
number or letter.
...the only allowed value for this attribute is a
number, even if the list is displayed with roman numerals or letters.
... list items that follow this one continue
numbering from the value set.
... type this character attribute indicates the
numbering type: a: lowercase letters a: uppercase letters i: lowercase roman numerals i: uppercase roman numerals 1:
numbers this type overrides the one used by its parent <ol> element, if any.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
there are a
number of other common types you'll come across.
... for example, a link to the site's favicon: <link rel="icon" href="favicon.ico"> there are a
number of other icon rel values, mainly used to indicate special icon types for use on various mobile platforms, e.g.: <link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-icon-114.png" type="image/png"> the sizes attribute indicates the icon size, while the type contains the mime type of the resource being linked.
...also this attribute doesn't stand for "revision" and must not be used with a version
number, even though many sites misuse it in this way.
... preload examples you can find a
number of <link rel="preload"> examples in preloading content with rel="preload".
Standard metadata names - HTML: Hypertext Markup Language
values for the content of <meta name="viewport"> value possible subvalues description width a positive integer
number, or the text device-width defines the pixel width of the viewport that you want the web site to be rendered at.
... initial-scale a positive
number between 0.0 and 10.0 defines the ratio between the device width (device-width in portrait mode or device-height in landscape mode) and the viewport size.
... maximum-scale a positive
number between 0.0 and 10.0 defines the maximum amount to zoom in.
... minimum-scale a positive
number between 0.0 and 10.0 defines the minimum zoom level.
<tr>: The Table Row element - HTML: Hypertext Markup Language
this uses the char and charoff to establish the alignment character (typically "." or "," when aligning numerical data) and the
number of characters that should follow the alignment character.
...typical values for this include a period (".") or comma (",") when attempting to align
numbers or monetary values.
... charoffobsolete since html5 a domstring indicating the
number of characters on the tail end of the column's data should be displayed after the alignment character specified by the char attribute.
... for example, when displaying money values for currencies that use hundredths of a unit (such as the dollar, which is divided into 100 cents), you would typically specify a value of 2, so that in tandem with char being set to ".", the values in a column would be cleanly aligned on the decimal points, with the
number of cents properly displayed to the right of the decimal point.
CSP: base-uri - HTTP
base-uri <source>; content-security-policy: base-uri <source> <source>; sources while this directive uses the same arguments as other csp directives, some of them don’t make sense for `<base>`, such as the keywords 'unsafe-inline' and 'strict-dynamic' <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (
number used once).
CSP: child-src - HTTP
syntax one or more sources can be allowed for the child-src policy: content-security-policy: child-src <source>; content-security-policy: child-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' a whitelist for specific inline scripts using a cryptographic nonce (
number used once).
CSP: connect-src - HTTP
syntax one or more sources can be allowed for the connect-src policy: content-security-policy: connect-src <source>; content-security-policy: connect-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (
number used once).
CSP: default-src - HTTP
csp version 1 directive type fetch directive syntax one or more sources can be allowed for the default-src policy: content-security-policy: default-src <source>; content-security-policy: default-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (
number used once).
CSP: font-src - HTTP
syntax one or more sources can be allowed for the font-src policy: content-security-policy: font-src <source>; content-security-policy: font-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' a whitelist for specific inline scripts using a cryptographic nonce (
number used once).
CSP: form-action - HTTP
syntax one or more sources can be set for the form-action policy: content-security-policy: form-action <source>; content-security-policy: form-action <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (
number used once).
CSP: frame-src - HTTP
syntax one or more sources can be allowed for the frame-src policy: content-security-policy: frame-src <source>; content-security-policy: frame-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' a whitelist for specific inline scripts using a cryptographic nonce (
number used once).
CSP: img-src - HTTP
syntax one or more sources can be allowed for the img-src policy: content-security-policy: img-src <source>; content-security-policy: img-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (
number used once).
CSP: manifest-src - HTTP
syntax one or more sources can be allowed for the manifest-src policy: content-security-policy: manifest-src <source>; content-security-policy: manifest-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' a whitelist for specific inline scripts using a cryptographic nonce (
number used once).
CSP: media-src - HTTP
syntax one or more sources can be allowed for the media-src policy: content-security-policy: media-src <source>; content-security-policy: media-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' a whitelist for specific inline scripts using a cryptographic nonce (
number used once).
CSP: navigate-to - HTTP
syntax one or more sources can be set for the navigate-to policy: content-security-policy: navigate-to <source>; content-security-policy: navigate-to <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (
number used once).
CSP: object-src - HTTP
syntax one or more sources can be allowed for the object-src policy: content-security-policy: object-src <source>; content-security-policy: object-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' a whitelist for specific inline scripts using a cryptographic nonce (
number used once).
CSP: prefetch-src - HTTP
syntax one or more sources can be allowed for the prefetch-src policy: content-security-policy: prefetch-src <source>; content-security-policy: prefetch-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (
number used once).
CSP: script-src-attr - HTTP
: script-src-attr <source>; content-security-policy: script-src-attr <source> <source>; script-src-attr can be used in conjunction with script-src: content-security-policy: script-src <source>; content-security-policy: script-src-attr <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (
number used once).
CSP: script-src-elem - HTTP
: script-src-elem <source>; content-security-policy: script-src-elem <source> <source>; script-src-elem can be used in conjunction with script-src: content-security-policy: script-src <source>; content-security-policy: script-src-elem <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (
number used once).
CSP: script-src - HTTP
syntax one or more sources can be allowed for the script-src policy: content-security-policy: script-src <source>; content-security-policy: script-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (
number used once).
CSP: style-src-attr - HTTP
y-policy: style-src-attr <source>; content-security-policy: style-src-attr <source> <source>; style-src-attr can be used in conjunction with style-src: content-security-policy: style-src <source>; content-security-policy: style-src-attr <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (
number used once).
CSP: style-src-elem - HTTP
licy: style-src-elem <source>; content-security-policy: style-src-elem <source> <source>; style-src-elem can be used in conjunction with style-src: content-security-policy: style-src <source>; content-security-policy: style-src-elem <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (
number used once).
CSP: style-src - HTTP
syntax one or more sources can be allowed for the style-src policy: content-security-policy: style-src <source>; content-security-policy: style-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' an allow-list for specific inline scripts using a cryptographic nonce (
number used once).
CSP: worker-src - HTTP
syntax one or more sources can be allowed for the worker-src policy: content-security-policy: worker-src <source>; content-security-policy: worker-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
... 'nonce-<base64-value>' a whitelist for specific inline scripts using a cryptographic nonce (
number used once).
Firefox user agent string reference - HTTP
for example: mozilla/5.0 (android 4.4; mobile; rv:41.0) gecko/41.0 firefox/41.0 mozilla/5.0 (android 4.4; tablet; rv:41.0) gecko/41.0 firefox/41.0 the version
numbers are not relevant.
... firefox os version
number while the version
number for firefox os is not included in the ua string, it is possible to infer version information from the gecko version
number present in the ua string.
... firefox os version
number gecko version
number 1.0.1 18.0 1.1 18.1 1.2 26.0 1.3 28.0 1.4 30.0 2.0 32.0 2.1 34.0 2.2 37 2.5 44 it's easy to find the correspondences by looking at the mercurial repository names: repositories starting by mozilla-b2g are the release repositories for firefox os, and have both firefox os and gecko versions in their names.
... firefox os has a four-digit version
number: x.x.x.y.
HTTP Index - HTTP
this directive is intended for web sites with large
numbers of insecure legacy urls that need to be rewritten.
... 113 dpr client hints, http, http header the dpr header is a client hints headers which represents the client device pixel ratio (dpr), which is the the
number of physical device pixels corresponding to every css pixel.
... 155 host http, reference, header the host request header specifies the domain name of the server (for virtual hosting), and (optionally) the tcp port
number on which the server is listening.
... 277 server-side access control (cors) cors, http, php access control systems perform authorization identification, authentication, access approval, and accountability of entities through login credentials including passwords, personal identification
numbers (pins), biometric scans, and physical or electronic keys.
Assertions - JavaScript
for example, /\d+(?!\.)/ matches a
number only if it is not followed by a decimal point.
...for example, /(?<!-)\d+/ matches a
number only if it is not preceded by a minus sign.
.../(?<!-)\d+/.exec('-3') match is not found because the
number is preceded by the minus sign.
...ssertion // js lookahead assertion x(?=y) let regex = /first(?= test)/g; console.log('first test'.match(regex)); // [ 'first' ] console.log('first peach'.match(regex)); // null console.log('this is a first test in a year.'.match(regex)); // [ 'first' ] console.log('this is a first peach in a month.'.match(regex)); // null basic negative lookahead assertion for example, /\d+(?!\.)/ matches a
number only if it is not followed by a decimal point.
Warning: 08/09 is not a legal ECMA-262 octal constant - JavaScript
the javascript warning "08 (or 09) is not a legal ecma-262 octal constant" occurs when 08 or 09
number literals are used.
... they can't be interpreted as an octal
number.
... decimal literals can start with a zero (0) followed by another decimal digit, but if all digits after the leading 0 are smaller than 8, the
number is interpreted as an octal
number.
... examples invalid octal
numbers 08; 09; // syntaxerror: 08 is not a legal ecma-262 octal constant // syntaxerror: "0"-prefixed octal literals and octal escape sequences // are deprecated valid octal
numbers use a leading zero followed by the letter "o"; 0o755; 0o644; ...
RangeError: precision is out of range - JavaScript
the javascript exception "precision is out of range" occurs when a
number that's outside of the range of 0 and 20 (or 21) was passed into tofixed or toprecision.
... message rangeerror: the
number of fractional digits is out of range (edge) rangeerror: the precision is out of range (edge) rangeerror: precision {0} out of range (firefox) rangeerror: toexponential() argument must be between 0 and 20 (chrome) rangeerror: tofixed() digits argument must be between 0 and 20 (chrome) rangeerror: toprecision() argument must be between 1 and 21 (chrome) error type rangeerror what went wrong?
... there was an out of range precision argument in one of these methods:
number.prototype.toexponential()
number.prototype.tofixed()
number.prototype.toprecision() the allowed range for these methods is usually between 0 and 20 (or 21).
... method firefox (spidermonkey) chrome, opera (v8)
number.prototype.toexponential() 0 to 100 0 to 20
number.prototype.tofixed() -20 to 100 0 to 20
number.prototype.toprecision() 1 to 100 1 to 21 examples invalid cases 77.1234.toexponential(-1); // rangeerror 77.1234.toexponential(101); // rangeerror 2.34.tofixed(-100); // rangeerror 2.34.tofixed(1001); // rangeerror 1234.5.toprecision(-1); // rangeerror 1234.5.toprecision(101); // rangeerror valid cases 77.1234.toexponential(4); // 7.7123e+1 77.1234.toexponential(2); // 7.71e+1 2.34.tofixed(1); // 2.3 2.35.tofixed(1); // 2.4 (note that it rounds up in this case) 5.123456.toprec...
arguments.length - JavaScript
the arguments.length property contains the
number of arguments passed to the function.
... description the arguments.length property provides the
number of arguments actually passed to a function.
... examples using arguments.length in this example we define a function that can add two or more
numbers together.
...*/) { base =
number(base); for (var i = 1; i < arguments.length; i++) { base +=
number(arguments[i]); } return base; } note the difference between function.length and arguments.length specifications specification ecmascript (ecma-262)the definition of 'arguments exotic objects' in that specification.
Array.from() - JavaScript
ol(symbol.iterator)'; } catch { symboliterator = 'symbol(symbol.iterator)'; } var tostr = object.prototype.tostring; var iscallable = function (fn) { return ( typeof fn === 'function' || tostr.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 ?
... 1 : -1) * math.floor(math.abs(
number)); }; var maxsafeinteger = math.pow(2, 53) - 1; var tolength = function (value) { var len = tointeger(value); return math.min(math.max(len, 0), maxsafeinteger); }; var setgetitemhandler = function setgetitemhandler(isiterator, items) { var iterator = isiterator && items[symboliterator](); return function getitem(k) { return isiterator ?
...from(mapper.values()); // ['a', 'b']; array.from(mapper.keys()); // ['1', '2']; array from an array-like object (arguments) function f() { return array.from(arguments); } f(1, 2, 3); // [ 1, 2, 3 ] using arrow functions and array.from() // using an arrow function as the map function to // manipulate the elements array.from([1, 2, 3], x => x + x); // [2, 4, 6] // generate a sequence of
numbers // since the array is initialized with `undefined` on each position, // the value of `v` below will be `undefined` array.from({length: 5}, (v, i) => i); // [0, 1, 2, 3, 4] sequence generator (range) // sequence generator function (commonly referred to as "range", e.g.
... clojure, php etc) const range = (start, stop, step) => array.from({ length: (stop - start) / step + 1}, (_, i) => start + (i * step)); // generate
numbers range 0..4 range(0, 4, 1); // [0, 1, 2, 3, 4] // generate
numbers range 1..10 with step of 2 range(1, 10, 2); // [1, 3, 5, 7, 9] // generate the alphabet using array.from making use of it being ordered as a sequence range('a'.charcodeat(0), 'z'.charcodeat(0), 1).map(x => string.fromcharcode(x)); // ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"] specifications specification initial publication ecmascript (ecma-262)the definition of 'array.from' in that specification.
BigInt.prototype.toLocaleString() - JavaScript
see the intl.
numberformat() constructor for details on these parameters and how to use them.
... performance when formatting large
numbers of
numbers, it is better to create a
numberformat object and use the function provided by its
numberformat.format property.
...english locale using locales this example shows some of the variations in localized
number formats.
...og(bigint.tolocalestring('de-de')); // → 123.456.789.123.456.789 // arabic in most arabic speaking countries uses eastern arabic digits console.log(bigint.tolocalestring('ar-eg')); // → ١٢٣٬٤٥٦٬٧٨٩٬١٢٣٬٤٥٦٬٧٨٩ // india uses thousands/lakh/crore separators console.log(bigint.tolocalestring('en-in')); // → 1,23,45,67,89,12,34,56,789 // the nu extension key requests a
numbering system, e.g.
Date.prototype[@@toPrimitive] - JavaScript
depending on the argument, the method can return either a string or a
number.
... description the [@@toprimitive]() method of the date object returns a primitive value, that is either of type
number or of type string.
... if hint is "
number", [@@toprimitive]() first tries to call valueof, and if that fails, it calls tostring.
... examples returning date primitives const testdate = new date(1590757517834); // "date fri may 29 2020 14:05:17 gmt+0100 (british summer time)" testdate[symbol.toprimitive]('string'); // returns "date fri may 29 2020 14:05:17 gmt+0100 (british summer time)" testdate[symbol.toprimitive]('
number'); // returns "1590757517834" testdate[symbol.toprimitive]('default'); // returns "date fri may 29 2020 14:05:17 gmt+0100 (british summer time)" specifications specification ecmascript (ecma-262)the definition of 'date.prototype.@@toprimitive' in that specification.
Date.UTC() - JavaScript
it returns the
number of milliseconds since january 1, 1970, 00:00:00 utc.
... return value a
number representing the
number of milliseconds for the given date since january 1, 1970, 00:00:00, utc.
... description utc() takes comma-delimited date and time parameters and returns the
number of milliseconds between january 1, 1970, 00:00:00, universal time and the specified date and time.
... date.utc() returns a time value as a
number instead of creating a date object.
Date.parse() - JavaScript
the date.parse() method parses a string representation of a date, and returns the
number of milliseconds since january 1, 1970, 00:00:00 utc or nan if the string is unrecognized or, in some cases, contains illegal date values (e.g.
...(other formats may be used, but results are implementation-dependent.) return value a
number representing the milliseconds elapsed since january 1, 1970, 00:00:00 utc and the date obtained by parsing the given string representation of a date.
... description the parse() method takes a date string (such as "2011-10-10t14:48:00") and returns the
number of milliseconds since january 1, 1970, 00:00:00 utc.
... while time zone specifiers are used during date string parsing to interpret the argument, the value returned is always the
number of milliseconds between january 1, 1970 00:00:00 utc and the point in time represented by the argument or nan.
Date.prototype.setMilliseconds() - JavaScript
syntax dateobj.setmilliseconds(millisecondsvalue) parameters millisecondsvalue a
number between 0 and 999, representing the milliseconds.
... return value the
number of milliseconds between 1 january 1970 00:00:00 utc and the updated date.
... description if you specify a
number outside the expected range, the date information in the date object is updated accordingly.
... for example, if you specify 1005, the
number of seconds is incremented by 1, and 5 is used for the milliseconds.
Error.prototype.stack - JavaScript
description each step will be separated by a newline, with the first part of the line being the function name (if not a call from the global scope), then by an at (@) sign, the file location (except when the function is the error constructor as the error is being thrown), a colon, and, if there is a file location, the line
number.
... (note that the error object also possesses the filename, line
number and column
number properties for retrieving these from the error thrown (but only the error, and not its trace).) note that this is the format used by firefox.
...) { try { throw new error('myerror'); } catch(e) { alert(e.stack); } } function b() { trace(); } function a() { b(3, 4, '\n\n', undefined, {}); } a('first call, firstarg'); </script> assuming the above markup is saved as c:\example.html on a windows file system it produces an alert message box with the following text: starting with firefox 30 and later containing the column
number: trace@file:///c:/example.html:9:17 b@file:///c:/example.html:16:13 a@file:///c:/example.html:19:13 @file:///c:/example.html:21:9 firefox 14 to firefox 29: trace@file:///c:/example.html:9 b@file:///c:/example.html:16 a@file:///c:/example.html:19 @file:///c:/example.html:21 firefox 13 and earlier would instead produce the following text: error("myerror")@:0 trace()@file:///c:/example.html:9 b...
...(3,4,"\n\n",(void 0),[object object])@file:///c:/example.html:16 a("first call, firstarg")@file:///c:/example.html:19 @file:///c:/example.html:21 stack of eval'ed code starting with firefox 30, the error stack of code in function() and eval() calls, now produces stacks with more detailed information about the line and column
numbers inside these calls.
Error - JavaScript
error.prototype.
number a non-standard microsoft property for an error
number.
... error.prototype.line
number a non-standard mozilla property for the line
number in the file that raised this error.
... error.prototype.column
number a non-standard mozilla property for the column
number in the line that raised this error.
... function customerror(foo, message, filename, line
number) { var instance = new error(message, filename, line
number); instance.name = 'customerror'; instance.foo = foo; object.setprototypeof(instance, object.getprototypeof(this)); if (error.capturestacktrace) { error.capturestacktrace(instance, customerror); } return instance; } customerror.prototype = object.create(error.prototype, { constructor: { value: error, enumerable:...
EvalError() constructor - JavaScript
syntax new evalerror([message[, filename[, line
number]]]) parameters message optional.
...the name of the file containing the code that caused the exception line
number optional.
... the line
number of the code that caused the exception examples evalerror is not used in the current ecmascript specification and will thus not be thrown by the runtime.
... creating an evalerror try { throw new evalerror('hello', 'somefile.js', 10); } catch (e) { console.log(e instanceof evalerror); // true console.log(e.message); // "hello" console.log(e.name); // "evalerror" console.log(e.filename); // "somefile.js" console.log(e.line
number); // 10 console.log(e.column
number); // 0 console.log(e.stack); // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
Float32Array - JavaScript
the float32array typed array represents an array of 32-bit floating point
numbers (corresponding to the c float data type) in the platform byte order.
... static properties float32array.bytes_per_element returns a
number value of the element size.
... float32array.of() creates a new float32array with a variable
number of arguments.
... float32array.prototype.length returns the
number of elements hold in the float32array.
Float64Array - JavaScript
the float64array typed array represents an array of 64-bit floating point
numbers (corresponding to the c double data type) in the platform byte order.
... static properties float64array.bytes_per_element returns a
number value of the element size.
... float64array.of() creates a new float64array with a variable
number of arguments.
... float64array.prototype.length returns the
number of elements hold in the float64array.
Function.prototype.apply() - JavaScript
and, because push accepts a variable
number of arguments, you can also push multiple elements at once.
... // min/max
number in an array const
numbers = [5, 6, 2, 3, 7]; // using math.min/math.max apply let max = math.max.apply(null,
numbers); // this about equal to math.max(
numbers[0], ...) // or math.max(5, 6, ...) let min = math.min.apply(null,
numbers); // vs.
... simple loop based algorithm max = -infinity, min = +infinity; for (let i = 0; i <
numbers.length; i++) { if (
numbers[i] > max) { max =
numbers[i]; } if (
numbers[i] < min) { min =
numbers[i]; } } but beware: by using apply this way, you run the risk of exceeding the javascript engine's argument length limit.
...more perniciously, others will arbitrarily limit the
number of arguments actually passed to the applied function.
Function.length - JavaScript
the length property indicates the
number of parameters expected by the function.
...the
number of formal parameters.
... this
number excludes the rest parameter and only includes parameters before the first one with a default value.
... by contrast, arguments.length is local to a function and provides the
number of arguments actually passed to the function.
Map - JavaScript
size the
number of items in a map is easily retrieved from its size property.
... the
number of items in an object must be determined manually.
... instance properties map.prototype.size returns the
number of key/value pairs in the map object.
...even though every nan is not equal to itself (nan !== nan is true), the following example works because nans are indistinguishable from each other: let mymap = new map() mymap.set(nan, 'not a
number') mymap.get(nan) // "not a
number" let othernan =
number('foo') mymap.get(othernan) // "not a
number" iterating map with for..of maps can be iterated using a for..of loop: let mymap = new map() mymap.set(0, 'zero') mymap.set(1, 'one') for (let [key, value] of mymap) { console.log(key + ' = ' + value) } // 0 = zero // 1 = one for (let key of mymap.keys()) { console.log(key) } // 0 // 1...
Math.acosh() - JavaScript
the math.acosh() function returns the hyperbolic arc-cosine of a
number, that is ∀x≥1,math.acosh(x)=arcosh(x)= the unique y≥0such thatcosh(y)=x\forall x \geq 1, \mathtt{\operatorname{math.acosh}(x)} = \operatorname{arcosh}(x) = \text{ the unique } \; y \geq 0 \; \text{such that} \; \cosh(y) = x the source for this interactive example is stored in a github repository.
... syntax math.acosh(x) parameters x a
number.
... return value the hyperbolic arc-cosine of the given
number.
... if the
number is less than 1, nan.
Math.cbrt() - JavaScript
the math.cbrt() function returns the cube root of a
number, that is math.cbrt(x)=x3=the uniqueysuch thaty3=x\mathtt{math.cbrt(x)} = \sqrt[3]{x} = \text{the unique} \; y \; \text{such that} \; y^3 = x the source for this interactive example is stored in a github repository.
... syntax math.cbrt(x) parameters x a
number.
... return value the cube root of the given
number.
... polyfill for all x≥0x \geq 0, have x3=x1/3\sqrt[3]{x} = x^{1/3} so this can be emulated by the following function: if (!math.cbrt) { math.cbrt = (function(pow) { return function cbrt(x){ // ensure negative
numbers remain negative: return x < 0 ?
Math.log() - JavaScript
the math.log() function returns the natural logarithm (base e) of a
number, that is ∀x>0,math.log(x)=ln(x)=the uniqueysuch thatey=x\forall x > 0, \mathtt{\operatorname{math.log}(x)} = \ln(x) = \text{the unique} \; y \; \text{such that} \; e^y = x the javascript math.log() function is equivalent to ln(x) in mathematics.
... syntax math.log(x) parameters x a
number.
... return value the natural logarithm (base e) of the given
number.
... if the
number is negative, nan is returned.
Math.log10() - JavaScript
the math.log10() function returns the base 10 logarithm of a
number, that is ∀x>0,math.log10(x)=log10(x)=the uniqueysuch that10y=x\forall x > 0, \mathtt{\operatorname{math.log10}(x)} = \log_10(x) = \text{the unique} \; y \; \text{such that} \; 10^y = x the source for this interactive example is stored in a github repository.
... syntax math.log10(x) parameters x a
number.
... return value the base 10 logarithm of the given
number.
... if the
number is negative, nan is returned.
Math.log2() - JavaScript
the math.log2() function returns the base 2 logarithm of a
number, that is ∀x>0,math.log2(x)=log2(x)=the uniqueysuch that2y=x\forall x > 0, \mathtt{\operatorname{math.log2}(x)} = \log_2(x) = \text{the unique} \; y \; \text{such that} \; 2^y = x the source for this interactive example is stored in a github repository.
... syntax math.log2(x) parameters x a
number.
... return value the base 2 logarithm of the given
number.
... if the
number is negative, nan is returned.
Math.round() - JavaScript
the math.round() function returns the value of a
number rounded to the nearest integer.
... syntax math.round(x) parameters x a
number.
... return value the value of the given
number rounded to the nearest integer.
... note that this differs from many languages' round() functions, which often round this case to the next integer away from zero, instead giving a different result in the case of negative
numbers with a fractional part of exactly 0.5.
Math.sqrt() - JavaScript
the math.sqrt() function returns the square root of a
number, that is ∀x≥0,math.sqrt(x)=x=the uniquey≥0such thaty2=x\forall x \geq 0, \mathtt{math.sqrt(x)} = \sqrt{x} = \text{the unique} \; y \geq 0 \; \text{such that} \; y^2 = x the source for this interactive example is stored in a github repository.
... syntax math.sqrt(x) parameters x a
number.
... return value the square root of the given
number.
... if the
number is negative, nan is returned.
Proxy - JavaScript
examples basic example in this simple example, the
number 37 gets returned as the default value when the property name is not in the object.
... let validator = { set: function(obj, prop, value) { if (prop === 'age') { if (!
number.isinteger(value)) { throw new typeerror('the age is not an integer'); } if (value > 200) { throw new rangeerror('the age seems invalid'); } } // the default behavior to store the value obj[prop] = value; // indicate success return true; } }; const person = new proxy({}, validator); person.age = 100; console.log(person.age); // 100 person...
... let products = new proxy([ { 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 ...
...); console.log(products[0]); // { name: 'firefox', type: 'browser' } console.log(products['firefox']); // { name: 'firefox', type: 'browser' } console.log(products['chrome']); // undefined console.log(products.browser); // [{ name: 'firefox', type: 'browser' }, { name: 'seamonkey', type: 'browser' }] console.log(products.types); // ['browser', 'mailer'] console.log(products.
number); // 3 a complete traps list example now in order to create a complete sample traps list, for didactic purposes, we will try to proxify a non-native object that is particularly suited to this type of operation: the doccookies global object created by the "little framework" published on the document.cookie page.
ReferenceError - JavaScript
referenceerror.prototype.line
number line
number in file that raised this error.
... referenceerror.prototype.column
number column
number in line that raised this error.
... examples catching a referenceerror try { let a = undefinedvariable } catch (e) { console.log(e instanceof referenceerror) // true console.log(e.message) // "undefinedvariable is not defined" console.log(e.name) // "referenceerror" console.log(e.filename) // "scratchpad/1" console.log(e.line
number) // 2 console.log(e.column
number) // 6 console.log(e.stack) // "@scratchpad/2:2:7\n" } creating a referenceerror try { throw new referenceerror('hello', 'somefile.js', 10) } catch (e) { console.log(e instanceof referenceerror) // true console.log(e.message) // "hello" console.log(e.name) //...
... "referenceerror" console.log(e.filename) // "somefile.js" console.log(e.line
number) // 10 console.log(e.column
number) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'referenceerror' in that specification.
RegExp.$1-$9 - JavaScript
the
number of possible parenthesized substrings is unlimited, but the regexp object can only hold the first nine.
... var re = /(\w+)\s(\w+)/; var str = 'john smith'; str.replace(re, '$2, $1'); // "smith, john" regexp.$1; // "john" regexp.$2; // "smith" using $n with regexp.test the following script uses the test() method of the regexp instance to grab a
number in a generic string.
... var str = 'test 24'; var
number = /(\d+)/.test(str) ?
... regexp.$1 : '0';
number; // "24" please note that any operation involving the usage of other regular expressions between a re.test(str) call and the regexp.$n property, might have side effects, so that accessing these special properties should be done instantly, otherwise the result might be unexpected.
String length - JavaScript
description this property returns the
number of code units in the string.
... utf-16, the string format used by javascript, uses a single 16-bit code unit to represent the most common characters, but needs to use two code units for less commonly-used characters, so it's possible for the value returned by length to not match the actual
number of characters in the string.
... the static property string.length is unrelated to the length of strings, it's the arity of the string function (loosely, the
number of formal parameters it has), which is 1.
... unicode since `length` counts code units instead of characters, if you want to get the
number of characters you need something like this: function getcharacterlength (str) { // the string iterator that is used here iterates over characters, // not mere code units return [...str].length; } console.log(getcharacterlength('a\ud87e\udc04z')); // 3 // while not recommended, you could add this to each string as follows: object.defineproperty(string.prototype, 'charlength', { get () { return getcharacterlength(this); } }); console.log('a\ud87e\udc04z'.charlength); // 3 examples basic usage let x = 'mozilla'; let empty = ''; console.log(x + ' is ' + x.length + ' code units long'); /* "mozilla is 7 code units long" */ console.log('the empty string has a length of ' + empty.le...
TypeError() constructor - JavaScript
syntax new typeerror([message[, filename[, line
number]]]) parameters message optional optional.
...the name of the file containing the code that caused the exception line
number optional optional.
... the line
number of the code that caused the exception examples catching a typeerror try { null.f() } catch (e) { console.log(e instanceof typeerror) // true console.log(e.message) // "null has no properties" console.log(e.name) // "typeerror" console.log(e.filename) // "scratchpad/1" console.log(e.line
number) // 2 console.log(e.column
number) // 2 console.log(e.stack) // "@scratchpad/2:2:3\n" } creating a typeerror try { throw new typeerror('hello', "somefile.js", 10) } catch (e) { console.log(e instanceof typeerror) // true console.log(e.message) // "hello" console.log(e.name) // "typeerror" console.log(e.filename) // "somefile.js" cons...
...ole.log(e.line
number) // 10 console.log(e.column
number) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
TypeError - JavaScript
typeerror.prototype.line
number line
number in file that raised this error.
... typeerror.prototype.column
number column
number in line that raised this error.
... examples catching a typeerror try { null.f() } catch (e) { console.log(e instanceof typeerror) // true console.log(e.message) // "null has no properties" console.log(e.name) // "typeerror" console.log(e.filename) // "scratchpad/1" console.log(e.line
number) // 2 console.log(e.column
number) // 2 console.log(e.stack) // "@scratchpad/2:2:3\n" } creating a typeerror try { throw new typeerror('hello', "somefile.js", 10) } catch (e) { console.log(e instanceof typeerror) // true console.log(e.message) // "hello" console.log(e.name) // "typeerror" console.log(e.filename) ...
... // "somefile.js" console.log(e.line
number) // 10 console.log(e.column
number) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'typeerror' in that specification.
URIError - JavaScript
urierror.prototype.line
number line
number in file that raised this error.
... urierror.prototype.column
number column
number in line that raised this error.
... examples catching an urierror try { decodeuricomponent('%') } catch (e) { console.log(e instanceof urierror) // true console.log(e.message) // "malformed uri sequence" console.log(e.name) // "urierror" console.log(e.filename) // "scratchpad/1" console.log(e.line
number) // 2 console.log(e.column
number) // 2 console.log(e.stack) // "@scratchpad/2:2:3\n" } creating an urierror try { throw new urierror('hello', 'somefile.js', 10) } catch (e) { console.log(e instanceof urierror) // true console.log(e.message) // "hello" console.log(e.name) // "urierror" console.log(e.filename) ...
... // "somefile.js" console.log(e.line
number) // 10 console.log(e.column
number) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'urierror' in that specification.
Equality (==) - JavaScript
if the operands are of different types, try to convert them to the same type before comparing: when comparing a
number to a string, try to convert the string to a numeric value.
... if one of the operands is an object and the other is a
number or a string, try to convert the object to a primitive using the object's valueof() and tostring() methods.
...
number: return true only if both operands have the same value.
... == 1; // true "hello" == "hello"; // true comparison with type conversion "1" == 1; // true 1 == "1"; // true 0 == false; // true 0 == null; // false 0 == undefined; // false 0 == !!null; // true, look at logical not operator 0 == !!undefined; // true, look at logical not operator null == undefined; // true const
number1 = new
number(3); const
number2 = new
number(3);
number1 == 3; // true
number1 ==
number2; // false comparison of objects const object1 = {"key": "value"} const object2 = {"key": "value"}; object1 == object2 // false object2 == object2 // true comparing strings and string objects note that strings constructed using new string() are objects.
Unary plus (+) - JavaScript
the unary plus operator (+) precedes its operand and evaluates to its operand but attempts to convert it into a
number, if it isn't already.
... syntax operator: +x description although unary negation (-) also can convert non-
numbers, unary plus is the fastest and preferred way of converting something into a
number, because it does not perform any other operations on the
number.
...negative
numbers are supported (though not for hex).
... examples usage with
numbers const x = 1; const y = -1; console.log(+x); // 1 console.log(+y); // -1 usage with non-
numbers +true // 1 +false // 0 +null // 0 +function(val){ return val } // nan +1n // throws typeerror: cannot convert bigint value to
number specifications specification ecmascript (ecma-262)the definition of 'unary plus operator' in that specification.
Unsigned right shift (>>>) - JavaScript
the unsigned right shift operator (>>>) (zero-fill right shift) shifts the first operand the specified
number of bits to the right.
... syntax a >>> b description this operator shifts the first operand the specified
number of bits to the right.
... for non-negative
numbers, zero-fill right shift and sign-propagating right shift yield the same result.
... 9 (base 10): 00000000000000000000000000001001 (base 2) -------------------------------- 9 >>> 2 (base 10): 00000000000000000000000000000010 (base 2) = 2 (base 10) however, this is not the case for negative
numbers.
Strict mode - JavaScript
the octal syntax isn't part of ecmascript 5, but it's supported in all browsers by prefixing the octal
number with a zero: 0644 === 420 and "\045" === "%".
... in ecmascript 2015 octal
number is supported by prefixing a
number with "0o".
... var a = 0o10; // es2015: octal novice developers sometimes believe a leading zero prefix has no semantic meaning, so they use it as an alignment device — but this changes the
number's meaning!
...for a normal function, this is always an object: either the provided object if called with an object-valued this; the value, boxed, if called with a boolean, string, or
number this; or the global object if called with an undefined or null this.
Media container formats (file types) - Web media technologies
common container formats while there are a vast
number of media container formats, the ones listed below are the ones you are most likely to encounter.
...quicktime files are primarily supported by macos, but for a
number of years, quicktime for windows was available to access them on windows.
... in addition, a
number of third-party components are available for quicktime, some of which add support for additional codecs.
... general purpose video, preferably in an open format webm (ideally with mp4 fallback) general purpose video mp4 (ideally with webm or ogg fallback) high compression optimized for slow connections 3gp (ideally with mp4 fallback) compatibility with older devices/browsers quicktime (ideally with avi and/or mpeg-2 fallback) these suggestions make a
number of assumptions.
Graphic design for responsive sites - Progressive web apps (PWAs)
there are a
number of workarounds, but none of them are perfect right now.
...the issue here is that raster images, when rendered on high res devices, are in danger of appearing tiny because the same
number of pixels is being shown in a much smaller screen space.
...making your own font file can be a bit fiddly, but there are a
number of good icon font services available such as font awesome.
... interactive images if your images need to feature some level of interactivity, such as links, other clickable areas, or animation, there are a
number of options available.
SVG Presentation Attributes - SVG: Scalable Vector Graphics
value: <
number>|<percentage>; animatable: yes fill-rule it indicates how to determine what side of a path is inside a shape.
... value: <
number>|<percentage>; animatable: yes font-family it indicates which font family will be used to render the text of the element.
... value: <
number>|none|inherit; animatable: yes font-stretch it selects a normal, condensed, or expanded face from a font.
... value: <
number>; animatable: yes stroke-opacity defines the opacity of the stroke of a shape.
dx - SVG: Scalable Vector Graphics
value <
number> default value 2 animatable yes feoffset for <feoffset>, dx defines the x offset of the filter input graphic.
... value <
number> default value 0 animatable yes glyphref warning: as of svg2 <glyphref> is deprecated and shouldn't be used.
... value <
number> default value 0 animatable yes text for <text>, if it contains a single value, dx defines a shift along the x-axis for all glyphs.
....w3.org/2000/svg"> <!-- lines materialized the position of the glyphs --> <line x1="0" x2="100%" y1="25%" y2="25%" /> <line x1="0" x2="100%" y1="50%" y2="50%" /> <line x1="0" x2="100%" y1="75%" y2="75%" /> <line x1="10%" x2="10%" y1="0" y2="100%" /> <line x1="30%" x2="30%" y1="0" y2="100%" /> <line x1="60%" x2="60%" y1="0" y2="100%" /> <!-- behaviors change based on the
number of values in the attributes --> <text dx="20%" x="10%" y="25%">svg</text> <text dx="0 10%" x="10%" y="50%">svg</text> <text dx="0 10% 20%" x="10%" y="75%">svg</text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } tref warning: as of svg2 <tref> is deprecated and shouldn't be used.
dy - SVG: Scalable Vector Graphics
value <
number> default value 2 animatable yes feoffset for <feoffset>, dy defines the y offset of the filter input graphic.
... value <
number> default value 0 animatable yes glyphref warning: as of svg2 <glyphref> is deprecated and shouldn't be used.
... value <
number> default value 0 animatable yes text for <text>, if it contains a single value, dy defines a shift along the y-axis for all glyphs.
... <!-- horizontal lines --> <line x1="0" x2="100%" y1="30" y2="30" /> <line x1="0" x2="100%" y1="40" y2="40" /> <line x1="0" x2="100%" y1="50" y2="50" /> <line x1="0" x2="100%" y1="60" y2="60" /> <!-- vertical lines --> <line x1="10" x2="10" y1="0" y2="100%" /> <line x1="50" x2="50" y1="0" y2="100%" /> <line x1="90" x2="90" y1="0" y2="100%" /> <!-- behaviors change based on the
number of values in the attributes --> <text dy="20" x="10" y="30">svg</text> <text dy="0 10" x="50" y="30">svg</text> <text dy="0 10 20" x="90" y="30">svg</text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } tref warning: as of svg2 <tref> is deprecated and shouldn't be used.
order - SVG: Scalable Vector Graphics
y="0" width="100%" height="100%"> <feturbulence basefrequency="0.025" seed="0" /> <feconvolvematrix kernelmatrix="3 0 0 0 0 0 0 0 -4" order="1 1 1"/> </filter> <rect x="0" y="0" width="200" height="200" style="filter:url(#emboss1);" /> <rect x="0" y="0" width="200" height="200" style="filter:url(#emboss2); transform: translatex(220px);" /> </svg> usage notes value <
number-optional-
number> default value 3 animatable yes <
number-optional-
number> this value indicates the
number of cells in each dimension for the kernel matrix.
...the first
number, indicates the
number of columns in the matrix.
... the second
number, indicates the
number of rows in the matrix.
... if no second
number is not provided, it defaults to the first
number.
panose-1 - SVG: Scalable Vector Graphics
the panose-1 attribute indicates the panose-1
number of a font face.
...the panose system consists of a set of ten
numbers that categorize the key attributes of a latin typeface, a classification procedure for creating those
numbers, and mapper software that determines the closest possible font match given a set of typefaces.
... only one element is using this attribute: <font-face> usage notes value <integer>{10} default value 0 0 0 0 0 0 0 0 0 0 animatable no <integer>{10} this value specifies a panose-1
number and consists of ten decimal integers, separated by whitespace.
...all fonts will match the panose
number if this value is used.
points - SVG: Scalable Vector Graphics
each point is defined by a pair of
number representing a x and a y coordinate in the user coordinate system.
... if the attribute contains an odd
number of coordinates, the last one will be ignored.
... value [ <
number>+ ]# default value none animatable yes example html,body,svg { height:100% } <svg viewbox="-10 -10 120 120" xmlns="http://www.w3.org/2000/svg"> <!-- polyline is an open shape --> <polyline stroke="black" fill="none" points="50,0 21,90 98,35 2,35 79,90"/> </svg> polygon for <polygon>, points defines a list of points, each representing a vertex of the s...
... value [ <
number>+ ]# default value none animatable yes example html,body,svg { height:100% } <svg viewbox="-10 -10 120 120" xmlns="http://www.w3.org/2000/svg"> <!-- polygon is an closed shape --> <polygon stroke="black" fill="none" points="50,0 21,90 98,35 2,35 79,90" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'points' in that specification.
Basic shapes - SVG: Scalable Vector Graphics
each
number must be separated by a space, comma, eol, or a line feed character.
... each point must contain two
numbers: an x coordinate and a y coordinate.
... <polygon points="50, 160 55, 180 70, 180 60, 190 65, 205 50, 195 35, 205 40, 190 30, 180 45, 180"/> points a list of points, each
number separated by a space, comma, eol, or a line feed character.
... each point must contain two
numbers: an x coordinate and a y coordinate.
XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations
on a related note, any attribute in an lre and some attributes of a limited
number of xslt elements can also include what is known as an attribute value template.
... use the {{listsubpages}} macro once the bcd for <xsl:fallback>, <xsl:import>, <xsl:namespace-alias>, <xsl:
number>, <xsl:output>, <xsl:stylesheet>, <xsl:text> and <xsl:value-of> is fully migrated.
... <xsl:apply-imports><xsl:apply-templates><xsl:attribute-set><xsl:attribute><xsl:call-template><xsl:choose><xsl:comment><xsl:copy-of><xsl:copy><xsl:decimal-format><xsl:element><xsl:fallback><xsl:for-each><xsl:if><xsl:import><xsl:include><xsl:key><xsl:message><xsl:namespace-alias><xsl:
number><xsl:otherwise><xsl:output><xsl:param><xsl:preserve-space><xsl:processing-instruction><xsl:sort><xsl:strip-space><xsl:stylesheet><xsl:template><xsl:text><xsl:transform><xsl:value-of><xsl:variable><xsl:when><xsl:with-param> <xsl:apply-imports> <xsl:apply-templates> <xsl:attribute> <xsl:attribute-set> <xsl:call-template> <xsl:choose> <xsl:comment> <xsl:copy> <xsl:copy-of> <xsl:decimal-format> <xsl:element> <xsl:fallback> (not supported) <xsl:for-each> <xsl:if> <xsl:import> (mostly supported) <x...
...sl:include> <xsl:key> <xsl:message> <xsl:namespace-alias> (not supported) <xsl:
number> (partially supported) <xsl:otherwise> <xsl:output> (partially supported) <xsl:param> <xsl:preserve-space> <xsl:processing-instruction> <xsl:sort> <xsl:strip-space> <xsl:stylesheet> (partially supported) <xsl:template> <xsl:text> (partially supported) <xsl:transform> <xsl:value-of> (partially supported) <xsl:variable> <xsl:when> <xsl:with-param> ...
Index - XSLT: Extensible Stylesheet Language Transformations
25 <xsl:choose> element, reference, xslt, choose the <xsl:choose> element defines a choice among a
number of alternatives.
... 29 <xsl:decimal-format> element, reference, xslt, decimal-format the <xsl:decimal-format> element defines the characters and symbols that are to be used in converting
numbers into strings using theformat-
number( ) function.
... 39 <xsl:
number> element,
number, reference, xslt the <xsl:
number> element counts things sequentially.
... it can also be used to quickly format a
number.
Compiling an Existing C Module to WebAssembly - WebAssembly
now you only need some html and javascript to load your new module: <script src="./a.out.js"></script> <script> module.onruntimeinitialized = async _ => { const api = { version: module.cwrap('version', '
number', []), }; console.log(api.version()); }; </script> and you will see the correct version
number in the output: note: libwebp returns the current version a.b.c as a hexadecimal
number 0xabc.
... get an image from javascript into wasm getting the encoder's version
number is great, but encoding an actual image would be more impressive.
...when the pointer is returned to javascript land, it is treated as just a
number.
... after exposing the function to javascript using cwrap, you can use that
number to find the start of our buffer and copy the image data: const api = { version: module.cwrap('version', '
number', []), create_buffer: module.cwrap('create_buffer', '
number', ['
number', '
number']), destroy_buffer: module.cwrap('destroy_buffer', '', ['
number']), }; const image = await loadimage('./image.jpg'); const p = api.create_buffer(image.width, image.height); module.heap8.set(image.data, p); // ...
context-menu - Archive of obsolete content
if the total
number of menu items in the main context menu from all add-ons exceeds a certain
number (normally 10 but configurable with the extensions.addon-sdk.context-menu.overflowthreshold preference) all of the menu items will instead appear in an overflow menu to avoid making the context menu too large.
...this example updates the item's label based on the
number of times it's been clicked: var numclicks = 0; var myitem = require("sdk/context-menu").item({ label: "click me: " + numclicks, contentscript: 'self.on("click", self.postmessage);', onmessage: function () { numclicks++; this.label = "click me: " + numclicks; // setting myitem.label is equivalent.
... const { getmostrecentbrowserwindow } = require("sdk/window/utils"); var cm = require("sdk/context-menu"); var uuid = require('sdk/util/uuid').uuid(); var 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++) cmi...
page-mod - Archive of obsolete content
the pagemod constructor takes a
number of other options to control its behavior: contentstyle lists stylesheets to attach, supplied as strings.
... you can specify a url exactly: var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://www.iana.org/domains/example/", contentscript: 'window.alert("page matches ruleset");' }); you can specify a
number of wildcard forms, for example: var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscript: 'window.alert("matched!");' }); you can specify a set of urls using a regular expression.
...for example: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*", contentscriptfile: data.url("show.js"), contentscriptoptions: { showoptions: true,
numbers: [1, 2], greeting: "hello!" } }); the values are accessible to content scripts via the self.options property: // show.js if (self.options.showoptions) { window.alert(self.options.greeting); var sum = self.options.
numbers[0] + self.options.
numbers[1]; window.alert(sum); } the values can be any json-serializable value: a string,
number, boolean, null, array of json-seria...
preferences/service - Archive of obsolete content
value : string,
number,boolean preference value.
... parameters name : string defaultvalue : string,
number,boolean preference value.
... returns string,
number,boolean : preference value, returns defaultvalue if no preference is set, returns undefined if defaultvalue is not provided.
Localization - Archive of obsolete content
for example, english has two forms: a singular form for "one", and a plural form for "everything else, including zero": one tomato no tomatoes two tomatoes but russian has different forms for
numbers ending in 1 (except 11),
numbers ending in 2-4 (except 12-14) and other
numbers: один помидор // one tomato два помидора // two tomatoes пять помидоров // five tomatoes the sdk uses the unicode cldr data to describe the different plural forms used by different languages.
...in this scheme a language maps each distinct range of
numbers on to one of up to six forms, identified by the following categories: zero, one, two, few, many, and other.
... limitations the current localization support is a first step towards full support, and contains a
number of limitations.
Miscellaneous - Archive of obsolete content
event.detail contains the
number of lines to scroll.
...that was attempt
number %s.
... const nob = 128; //
number of bytes var buffer = ''; var prng = components.classes['@mozilla.org/security/random-generator;1']; var bytebucket = prng.getservice(components.interfaces.nsirandomgenerator).generaterandombytes(nob, buffer); detecting full screen mode on/off it works for that global 'window' object at least.
Extension Etiquette - Archive of obsolete content
don't be redundant and include "extension," "mozilla/firefox/thunderbird," or the version
number in the name.
... version
numbering please follow the mozilla pattern: major version dot current incarnation dot security/bugfix release (like 1.0.7).
...for a large
number of options for your extension, break the options window into multiple pages (tabs) that are well labeled.
How to convert an overlay extension to restartless - Archive of obsolete content
se 32: return getucharpref(prefname,branch); // pref_string case 64: return branch.getintpref(prefname); // pref_int case 128: return branch.getboolpref(prefname); // pref_bool } } function setgenericpref(branch,prefname,prefvalue) { switch (typeof prefvalue) { case "string": setucharpref(prefname,prefvalue,branch); return; case "
number": branch.setintpref(prefname,prefvalue); return; case "boolean": branch.setboolpref(prefname,prefvalue); return; } } function setdefaultpref(prefname,prefvalue) { var defaultbranch = services.prefs.getdefaultbranch(null); setgenericpref(defaultbranch,prefname,prefvalue); } function getucharpref(prefname,branch) // unicode getcharpref { ...
... thus, you will probably want to use version
numbers in the icon name (the id of the window for which the icon exists).
... this is accomplished by passing a random
number in a parameter after a '?'.
Creating regular expressions for a microsummary generator - Archive of obsolete content
to identify which parts are unique and which are common, let's look at the urls of several other auction item pages: http://cgi.ebay.com/ws/ebayisapi.dll?viewitem&item=130017517168 http://cgi.ebay.com/ws/ebayisapi.dll?viewitem&item=290019763032 http://cgi.ebay.com/ws/ebayisapi.dll?viewitem&item=170019463424 based on these examples, it looks like the unique part is the item
number at the end of the urls, and everything else is common to all urls.
... so we remove the item
number, leaving us with the following regular expression: ^http://cgi\.ebay\.com/ws/ebayisapi\.dll\?viewitem&item= accommodating variations in query parameters we now have a regular expression that matches all four example urls.
...7qqcmdzviewitem http://cgi.ebay.com/ahm-ho-scale-firefox-tank-car_w0qqitemz290019763032qqihz019qqcategoryz19130qqcmdzviewitem http://cgi.ebay.com/inuyasha-anime-pin-of-kirara-kilala-firefox_w0qqitemz170019463424qqihz007qqcategoryz39557qqcmdzviewitem based on these examples, it looks like the urls all start with "http://cgi.ebay.com/", they all contain the string "qqitemz" followed by the item
number, and they all end with the string "qqcmdzviewitem".
Dehydra Object Reference - Archive of obsolete content
each member of the array has the following properties: { name: string, value: string or
number, if applicable } see an example on enforcing final classes.
...for example, an int[10] would have .max = 9 .variablelength boolean flag true if the type represents a c99 variable-length array type
number type property type description .precision integer for floating-point types, the precision of the type .min integer for integer types, the minimum value capable of being stored .max integer for integer types, the maximum value capable of being stored .issigned boolean flag for integer types, true if the type stores signed values .isunsigned boolean flag for integer types, true ...
...if the type stores unsigned values .bitfieldbits integer if the type represents a bitfield, the
number of bits used by the bitfield .bitfieldof
number type object if the type represents a bitfield, the base type of the bitfield.
Download Manager preferences - Archive of obsolete content
browser.download.manager.flashcount indicates the
number of times the appropriate user interface element should be "flashed" to get the user's attention when a download completes.
... browser.download.manager.resumeonwakedelay an integer value indicating the
number of milliseconds to wait after the system wakes up from sleep before resuming downloads.
... browser.download.manager.showalertinterval the minimum
number of milliseconds that must elapse between download complete alerts; if two downloads complete within this amount of time, only one alert is displayed.
Java in Firefox Extensions - Archive of obsolete content
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.line
number); } } //get extension folder installation path...
...the following is a somewhat simplified snippet from xquseme: var reflect = java.lang.reflect; // build an array of the class types which are expected by our constructor (in this case, java.io.file and a class from another jar we loaded, com.sleepycat.db.environmentconfig) var paramtypes = reflect.array.newinstance(java.lang.class, 2); // 2nd argument should indicate the
number of items in following array paramtypes[0] = java.io.file; var envconfigclass = loader.loadclass('com.sleepycat.db.environmentconfig'); paramtypes[1] = envconfigclass; // get the constructor var constructor = envclass.getconstructor(paramtypes); // now that we have the constructor with the right parameter types, we can build the specific arguments we wish to pass to it var arglist = reflect.array.
...newinstance(java.lang.object, 2); // 2nd argument should indicate the
number of items in the following array var mydir = new java.io.file(dirurl); // a file url arglist[0] = mydir; var envconfig = envconfigclass.newinstance(); arglist[1] = envconfig; // call our constructor with our arguments var env = constructor.newinstance(arglist); be aware that liveconnect, while now actively supported by sun has only recently been reimplemented for use in mozilla, so there may still be some bugs (though many prior liveconnect bugs, such as try-catch not catching java exceptions, the failure of auto-converting javascript arrays properly, etc., have now been fixed).
Table Cellmap - Archive of obsolete content
rposes: quick lookup of table structural data store of the border collapse data the cellmap code is contained in nscellmap.cpp and nscellmap.h this document does currently describe only the quick lookup part of the game, border collapse is still far away cellmap data - overview the entries in the cellmap contain information about the table cell frame corresponding to a given row and column
number (celldata.h).
... rowspan =
number [cn] this attribute specifies the
number of rows spanned by the current cell.
... colspan =
number [cn] this attribute specifies the
number of columns spanned by the current cell.
Using Breakpoints in Venkman - Archive of obsolete content
to debug an extension, uncheck "exclude browser files" on the debug menu and your installed extension files should appear in the loaded scripts list.) venkman also indicates that one or more breakpoints have been set in the loaded scripts view, where red dots appear next to the files in which breakpoints have been set, along with the line
number where the function begins whose code is being stopped.
... once you've created a script that will be executed when the associated breakpoint is hit, you can select a
number of different options from the future breakpoint properties dialog that determine how venkman will deal with the output of the associated script.
... the
number of times the breakpoint has been hit is passed in as a parameter to the breakpoint script.
toString - Archive of obsolete content
returns the major, minor, revision, and build
numbers represented as a single string.
... the init() function can input the version
number as a single string or as a series of parameters representing the version
numbers of the installation.
... to get the version
number out of an installversion object in order to compare it with other versions, you can call tostring() and get back the version as a string in the format "maj.min.rev.bld." example var vi = new installversion(); vi.init("999.888.777.666"); //random string vistring = vi.tostring(); ...
decimalplaces - Archive of obsolete content
« xul reference home decimalplaces type: integer the
number of decimal places to display.
...the value infinity may be used if you want no limit on the
number of decimal places.
... note that decimal
numbers are stored as floats.
rows - Archive of obsolete content
« xul reference home rows type: integer the
number of rows to display in the element.
... if the element contains more than this
number of rows, a scrollbar will appear which the user can use to scroll to the other rows.
... to get the actual
number of rows in the element, use the getrowcount method.
timeout - Archive of obsolete content
« xul reference home timeout type: integer for autocomplete textboxes, the
number of milliseconds before the textbox starts searching for completions.
...for search textboxes, the
number of milliseconds before the timer fires a command event.
...for timed textboxes, the
number of milliseconds before the timer fires a command event.
Accessing Files - Archive of obsolete content
a
number of starting directories may be used, for instance, the user's home directory, the desktop, the system's temporary folder, and so forth.
...var file = io.getfile("profile", "sample.txt"); the nsiscriptableio object is a global object always available within an application or extension which provides a
number of useful functions for dealing with files.
... there are a
number of other values that may be used, most of which are platform specific.
Multiple Rules - Archive of obsolete content
operatordescriptionexample equalsmatch if a value equals anothermatch a specific value lessmatch if a
number is less than anothermatch only negative values with one rule, positive values with another greatermatch if a
number is greater than anotherdisplay values greater than 1000 differently beforematch if a value comes before another alphabetically aftermatch if a value comes after another alphabetically startswithmatch if a value starts with a specific string endswithmatch if a value ends with a speci...
...adding to the previous example, here we check for people with a space in their name, and a total
number of letters less than 15.
...naturally, this won't work for people with more than two names (joan of arc for instance), but rule conditions allow a
number of useful ways to filter results.
Things I've tried to do with XUL - Archive of obsolete content
this is a grab-bag type of faq, with a list of things that should work (hopefully with bug
numbers), things that don't work (hopefully with explanations), and workarounds for both of the above.
... enn: percentages won't have any effect in these examples though, since the actual height of the container isn't known, and 30% of an unknown
number is still an unknown
number.
... while this works at first, after a
number of rows have been added it breaks and stops displaying the first cell (the one specified by the appenditem call).
Box Objects - Archive of obsolete content
however, there are a
number of subtypes, about 25 or so, for specific xul elements.
...the base box object, or the interface nsiboxobject, however, has a
number of properties which are quite useful for xul development.
...l="button 1" oncommand="alert('next is: ' + this.boxobject.nextsibling.label);"/> <button label="button 2" hidden="true"/> <button label="button 3" oncommand="alert('next is: ' + this.boxobject.nextsibling.label);"/> <button label="button 4" collapsed="true"/> </hbox> box ordering attributes when a xul box is laid out on a window, the elements are ordered according to a
number of properties, for instance the orientation, their ordinal group and their direction.
Custom Tree Views - Archive of obsolete content
the following example shows this: <tree id="my-tree" flex="1"> <treecols> <treecol id="namecol" label="name" flex="1"/> <treecol id="datecol" label="date" flex="1"/> </treecols> <treechildren/> </tree> to assign data to be displayed in the tree, the view object needs to be created which is used to indicate the value of each cell, the total
number of rows plus other optional information.
... rowcount this property should be set to the total
number of rows in the tree.
...the contents of the cells in the first column will be set to the text 'row x' where x is the row
number.
Document Object Model - Archive of obsolete content
we've added the id attribute to a
number of elements in the find file dialog.
...the xulelement interface has a
number of properties and methods specific to xul elements, many inherited from the generic dom element interface.
... the dom provides a
number of namespace related functions similar to the non-namespace ones.
Input Controls - Archive of obsolete content
maxlength the maximum
number of characters that the textbox allows.
...this should be set to the
number of rows and columns of characters to display.
...seamonkey or waterfox and remote-xul-manager from https://github.com/jvillalobos/remote-xul-manager find files example so far : source view in the next section, we will look at some elements for entering and selecting
numbers.
Install Scripts - Archive of obsolete content
the script will contain javascript code which calls a
number of install functions.
...in an install script, there is no associated window, however the global object will be an install object which contains a
number of functions to customize the install process.
...because of this, you can easily specify a
number of files to be installed, come across some kind of error, and abort the whole process without modifying the user's system.
List Controls - Archive of obsolete content
« previousnext » xul has a
number of types of elements for creating list boxes.
... list boxes a list box is used to display a
number of items in a list.
...set it to the
number of rows to display in the list box.
More Event Handlers - Archive of obsolete content
the event object has a
number of properties which can be examined during an event.
...mouse button event properties when a mouse button event occurs, a
number of additional properties are available to determine which mouse buttons were pressed and the location of the mouse pointer.
...the detail property holds the
number of times the button has been clicked quickly in sequence.
Using Spacers - Archive of obsolete content
as we'll see, you can use a series of spacers to create a
number of layout effects.
...you can use a higher
number as the value of the flex attribute.
...it is recommended that you use lower
numbers for readability.
XUL Structure - Archive of obsolete content
firefox and thunderbird, as well as
number of other components are all written in xul and are all accessible via chrome urls.
... the content/browser directory contains a
number of files with .xul and .js extensions.
... a skin is made up of css files and a
number of images used to define the look of an interface.
XUL accessibility guidelines - Archive of obsolete content
a common example of this occurrence in the us is with phone
number form fields.
... us phone
numbers are often displayed on the web in two main formats xxx-xxx-xxxx or (xxx) xxx-xxxx.
...for example, if the user provides letters where
numbers are required in a form, this should not break the application.
arrowscrollbox - Archive of obsolete content
scrollincrement type: integer a read only property that lets you retrieve the
number of pixels by which scrolling will occur when the arrowscrollbox is clicked.
... scrollbyindex( lines ) return type: no return value scrolls the contents of the arrowscrollbox by a certain
number of lines.
... scrollbypixels( pixels ) return type: no return value scrolls the contents of the arrowscrollbox by a certain
number of pixels.
tabbrowser - Archive of obsolete content
tabmodalpromptshowing type: integer the
number of tab modal prompts currently attached to the current tab.
...use a positive
number to go forward and a negative
number to go back.
...the properties of params are following: boolean inbackground boolean replace boolean allowthirdpartyfixup tab targettab
number newindex object postdatas
number usercontextid note: this is the xul method on <browser> / <tabbrowser>, not the global function in chrome://browser/content/browser.js.
2006-11-17 - Archive of obsolete content
mozilla scheduled downtime - 11/14/2006, 9:30pm - 1:00am pst a
number of machines are going to go down.
... discussion from 50 to 100 locales continuation of the discussion of how to make l10n easier and increase the
number of locals with which mozilla products ship.
... version
numbering changes continuation of the discussion about preed's announcement of version
number changes meetings project status meeting (notes) ...
NPP_WriteReady - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary determines maximum
number of bytes that the plug-in can consume.
... returns returns the maximum
number of bytes that an instance is prepared to accept from the stream.
...if the plug-in is allocating memory for the entire stream at once (an as_file stream), it can return a very large
number.
Adobe Flash - Archive of obsolete content
every plugin exposes a description string that typically includes the plugin's name and version
number.
...the description string is broken into an array of constituent strings based on an invocation of the match method with a regular expression that assumes that the string format will be in the format flash major rminor where major can be a major revision such as "5" or "6" and minor is the subsidiary version
number.
...this is currently not the case, but 12 is a sufficiently high version
number (current versions are version 6r.79) to allow for some leeway for fixing this down the road.
Introduction to SSL - Archive of obsolete content
this confirmation might be important if the user, for example, is sending a credit card
number over the network and wants to check the receiving server's identity.
...however, the steps involved can be summarized as follows (assuming the use of the cipher suites listed in "cipher suites with rsa key exchange"): the client sends the server the client's ssl version
number, cipher settings, randomly generated data, and other information the server needs to communicate with the client using ssl.
... the server sends the client the server's ssl version
number, cipher settings, randomly generated data, and other information the client needs to communicate with the server over ssl.
-ms-hyphenate-limit-chars - Archive of obsolete content
the -ms-hyphenate-limit-chars css property is a microsoft extension that specifies one to three values indicating the minimum
number of characters in a hyphenated word.
... if the word does not meet the required minimum
number of characters in the word, before the hyphen, or after the hyphen, then the word is not hyphenated.
... <integer>{1,3} one to three integer values, corresponding to the word limit, the minimum
number of characters required before a hyphenation break, and the minimum
number of characters required following a hyphenation break, respectively.
VBArray.dimensions - Archive of obsolete content
the vbarray.dimensions method returns the
number of dimensions in a vbarray.
... example the dimensions method provides a way to retrieve the
number of dimensions in a specified vbarray.
...the second part is javascript code that determines the
number of dimensions in the safe array and the upper bound of each dimension.
New in JavaScript 1.2 - Archive of obsolete content
number now converts a specified object to a
number.
...
number now produces nan rather than an error if x is a string that does not contain a well-formed numeric literal.
... string.prototype.substring(): no longer swaps index
numbers when the first index is greater than the second.
Reference - Archive of obsolete content
this is
number 2.
...a subset of the "object > (function, everything else)" chain could be object > function > (object, function, array, string, boolean,
number, date, regexp, error).
...js ..." (no version
number).
Implementation Status - Archive of obsolete content
istitem supported 5.2.3 xforms:listitems supported 5.2.4 xforms:daytimeduration supported 5.2.5 xforms:yearmonthduration supported 5.2.6 xforms:email unsupported 5.2.7 xforms:card-
number unsupported supported types: string, normalized string, token, language, boolean, gday, gmonth, gyear, gyearmonth, gmonthday, date, time, datetime, duration, integer, nonpositiveinteger, negativeinteger, positiveinteger, long, int, short, unsignedlong, unsignedint, unsignedshort, byte, unsignedbyte, float, decimal, anyuri, base64binary, hexbinary, qname 6.
...inding in other xml vocabularies unsupported not a compliance requirement for an xforms processor 7.4.6 binding examples supported 7.5 xforms core function library supported 7.6.1 boolean-from-string() supported 7.6.2 is-card-
number() unsupported 7.7.1 avg() supported 7.7.2 min() supported 7.7.3 max() supported 7.7.4 count-non-empty() supported 7.7.5 index() partial binds using index() are not wor...
... 9.1.1 group supported 9.2.1 switch partial @selected not working inside repeats 339937; 9.2.2 case partial 302497; 329143; 9.3 repeat module partial 264329; 273706; 9.3.1 repeat partial we do not support
number attribute 302026; 9.3.2 nested repeats supported 9.3.3 repeat processing partial we currently obey the 1.0 rules for repeat 9.3.4 user interface interaction partial we currently obey the 1.0 rules for repeat, no support for @
number 302026; 9.3.5 ...
XForms Alert Element - Archive of obsolete content
s:model> <xforms:instance> <data xmlns=""> <x>10</x> </data> </xforms:instance> <xforms:bind id="x" nodeset="x" type="xsd:integer"/> </xforms:model> <style> @namespace xforms url("http://www.w3.org/2002/xforms"); xforms|input:invalid xforms|alert.inline { display: inline; font-style: italic; width: 40%; } } </style> <xforms:input bind="x"> <xforms:label>you can type only
numbers (validation happens on blur): </xforms:label> <xforms:alert>wrong value!
... you should type only
numbers!</xforms:alert> </xforms:input> <xforms:input bind="x"> <xforms:label>you can type only
numbers (validation happens on blur): </xforms:label> <xforms:alert class="inline">wrong value!
... you should type only
numbers!</xforms:alert> </xforms:input> ...
XForms Repeat Element - Archive of obsolete content
number - isn't supported type restrictions the repeat element can be bound to a nodeset.
...to accommodate this, xforms 1.0 defines an alternative syntax that is functionally equivalent to the repeat element, using the following attributes: repeat-model repeat-bind repeat-nodeset repeat-startindex repeat-
number additionally, when using xforms action setindex, its repeat attribute (which contains an idref) can point to any element carrying these repeat attributes.
...there are a
number of errors that may occur, especially when these attributes are used with html:table.
Parsing microformats in JavaScript - Archive of obsolete content
telgetter() specifically retrieves a telephone
number from a microformat node.
... this handles the fact that telephone
numbers use "value" as the name of one of their subproperties, but "value" is also used for value excerpting.
... return value a string containing the telephone
number.
The Business Benefits of Web Standards - Archive of obsolete content
the
number of sites which do not include proper titles and descriptions in the meta is surprising.
...while some browsers have quirks that cause different behavior by platform, mozilla-based browsers are designed to behave identically on all supported platforms (mac, linux, unix, windows...) web content is increasingly being accessed by a growing
number of user agents other than browsers, or by browsers on different platforms - for example mobile telephones.
...the content creator - who may be a journalist, a music producer, or may come from any one of a
number of disciplines; need not become involved in the actual process of publishing that content at all.
Audio for Web games - Game development
you'll also reduce the
number of server requests and save bandwidth.
...the "countdown.mp3" mp3 file consists of a
number being spoken every 2 seconds, the idea being that we play back that
number when the corresponding button is pressed.
...the web audio api not only enables us to position a
number of audio sources in three-dimensional space but it can also allow us to apply filters that make that audio appear more realistic.
Build the brick field - Game development
var brickrowcount = 3; var brickcolumncount = 5; var brickwidth = 75; var brickheight = 20; var brickpadding = 10; var brickoffsettop = 30; var brickoffsetleft = 30; here we've defined the
number of rows and columns of bricks , their width and height, the padding between the bricks so they won't touch each other and a top and left offset so they won't start being drawn right from the edge of the canvas.
...what we need to do is include some calculations that will work out the x and y position of each brick for each loop iteration: var brickx = (c*(brickwidth+brickpadding))+brickoffsetleft; var bricky = (r*(brickheight+brickpadding))+brickoffsettop; each brickx position is worked out as brickwidth + brickpadding, multiplied by the column
number, c, plus the brickoffsetleft; the logic for the bricky is identical except that it uses the values for row
number, r, brickheight, and brickoffsettop.
...add the following just above the drawball() call: drawbricks(); compare your code at this point, the game has got a little more interesting again : exercise: try changing the
number of bricks in a row or a column, or their positions.
Finishing up - Game development
let's first add a variable to store the
number of lives in the same place where we declared our other variables: var lives = 3; drawing the life counter looks almost the same as drawing the score counter — add the following function to your code, below the drawscore() function: function drawlives() { ctx.font = "16px arial"; ctx.fillstyle = "#0095dd"; ctx.filltext("lives: "+lives, canvas.width-65, 20); } instead of ending th...
...e game immediately, we will decrease the
number of lives until they are no longer available.
... exercise: change the
number of lives and the angle the ball bounces off the paddle.
Build the brick field - Game development
ject, as this will come in handy very soon: function initbricks() { brickinfo = { width: 50, height: 20, count: { row: 3, col: 7 }, offset: { top: 50, left: 60 }, padding: 10 }; } this brickinfo object will hold all the information we need: the width and height of a single brick, the
number of rows and columns of bricks we will see on screen, the top and left offset (the location on the canvas where we shall start to draw the bricks) and the padding between each row and column of bricks.
... at the bottom of the initbricks() function: bricks = game.add.group(); we can loop through the rows and columns to create new brick on each iteration — add the following nested loop below the previous line of code: for(c=0; c<brickinfo.count.col; c++) { for(r=0; r<brickinfo.count.row; r++) { // create new brick and add it to the group } } this way we will create the exact
number of bricks we need and have them all contained in a group.
...update the brickx and bricky lines as follows: var brickx = (c*(brickinfo.width+brickinfo.padding))+brickinfo.offset.left; var bricky = (r*(brickinfo.height+brickinfo.padding))+brickinfo.offset.top; each brickx position is worked out as brickinfo.width plus brickinfo.padding, multiplied by the column
number, c, plus the brickinfo.offset.left; the logic for the bricky is identical except that it uses the values for row
number, r, brickinfo.height, and brickinfo.offset.top.
2D maze game with device orientation - Game development
to implement this we have to create a variable for storing the actual
number of seconds elapsed from the start of the game, and to show it for the player in the game.
...; this.totaltimetext.settext("total time: "+this.totaltimer); this.leveltext.settext("level: "+this.level+" / "+this.maxlevels); this.ball.body.x = this.ballstartpos.x; this.ball.body.y = this.ballstartpos.y; this.ball.body.velocity.x = 0; this.ball.body.velocity.y = 0; this.showlevel(); } }, if the current level is equal to the maximum
number of levels (in this case 5), then the game is finished — you'll get a congratulations message along with the
number of seconds elapsed through the whole game, and a button to press that takes you to the main menu.
...in this tutorial we used phaser, but there are a
number of other frameworks worth considering too like impactjs, construct 2 or playcanvas — it depends on your preferences, coding skills (or lack thereof), project scale, requirements and other aspects.
IDL - MDN Web Docs Glossary: Definitions of Web-related terms
idl attributes are not always strings; for example, input.maxlength is a
number (a signed long).
... when using idl attributes, you read or set values of the desired type, so input.maxlength is always going to return a
number and when you set input.maxlength ,it wants a
number.
... if you pass another type, it is automatically converted to a
number as specified by the standard javascript rules for type conversion.
Loop - MDN Web Docs Glossary: Definitions of Web-related terms
an example would be the process of getting an item of data and changing it, and then making sure some condition is checked such as, if a counter has reached a prescribed
number.
... example: for(var i = 0; i < 10; i++){ console.log(i) } //this loop will print
numbers 0-9, will stop when condition is met (i = 10) for the above example, the syntax is as follows: statement 1 sets the variable for the loop (var i = 0).
... example: var i = 0; while(i < 5){ console.log(i) i++ } //this loop will print
number 0-4, will stop when condition becomes false (i >=5) for the above example, the syntax is as follows: the code block will continue to run as long as the variable (i) is less than 5.
Backgrounds and borders - Learn web development
styling backgrounds in css the css background property is a shorthand for a
number of background longhand properties that we will meet in this lesson.
...however, what happens when different properties have different
numbers of values?
... the answer is that the smaller
numbers of values will cycle — in the above example there are four background images but only two background-position values.
Fundamental CSS comprehension - Learn web development
the final step before you move on is to attempt the assessment for the module — this involves a
number of related exercises that must be completed in order to create the final design — a business card/gamer card/social media profile.
...recall from earlier that the content box height should be 30px — this gives you all the
numbers you need to calculate the line height.
...recall from earlier that the content box height should be 30px — this gives you all the
numbers you need to calculate the line height.
Organizing your CSS - Learn web development
other common systems there are a large
number of these systems in use.
...there are a
number of tools which we refer to as pre-processors and post-processors.
...by using the include functionality in sass (partials) these can then all be compiled together into one, or a small
number of stylesheets to actually link into your website.
Grids - Learn web development
we do this by setting the value of grid-template-columns using repeat() notation, but instead of passing in a
number, pass in the keyword auto-fill.
...we do this using the following properties: grid-column-start grid-column-end grid-row-start grid-row-end these properties can all have a line
number as the value.
...d; grid-template-areas: "header header" "sidebar content" "footer footer"; grid-template-columns: 1fr 3fr; grid-gap: 20px; } header { grid-area: header; } article { grid-area: content; } aside { grid-area: sidebar; } footer { grid-area: footer; } reload the page and you will see that your items have been placed just as before without us needing to use any line
numbers!
Fundamental text and font styling - Learn web development
web safe fonts speaking of font availability, there are only a certain
number of fonts that are generally available across all systems and can therefore be used without much worry.
...font size (set with the font-size property) can take values measured in most of these units (and others, such as percentages), however the most common units you'll use to size text are: px (pixels): the
number of pixels high you want the text to be.
... font-variant-numeric: control the usage of alternate glyphs for
numbers, fractions, and ordinal markers.
What are browser developer tools? - Learn web development
next to each rule is the file name and line
number the rule is defined in.
... you'll notice a
number of clickable tabs at the top of the css viewer: computed: this shows the computed styles for the currently selected element (the final, normalized values that the browser applies).
...in the following image, the highlight on the
number 18 shows that the line has a breakpoint set.
How to structure a web form - Learn web development
this form will contain a
number of control types that you may not yet understand.
...the second is an <input> element of type tel, for entering a credit card
number; while we could have used the
number type, we don't want the
number's spinner ui.
...following below the previous section: <section> <h2>payment information</h2> <p> <label for="card"> <span>card type:</span> </label> <select id="card" name="usercard"> <option value="visa">visa</option> <option value="mc">mastercard</option> <option value="amex">american express</option> </select> </p> <p> <label for="
number"> <span>card
number:</span> <strong><abbr title="required">*</abbr></strong> </label> <input type="tel" id="
number" name="card
number"> </p> <p> <label for="date"> <span>expiration date:</span> <strong><abbr title="required">*</abbr></strong> <em>formatted as mm/dd/yyyy</em> </label> <input type="date" id="date" name="ex...
Using data attributes - Learn web development
just use data attributes for that: <article id="electric-cars" data-columns="3" data-index-
number="12314" data-parent="cars"> ...
... const article = document.queryselector('#electric-cars'); article.dataset.columns // "3" article.dataset.index
number // "12314" article.dataset.parent // "cars" each property is a string and can be read and written.
...
number values must be quoted in the selector for the styling to take effect.
HTML table basics - Learn web development
name mass (1024kg) diameter (km) density (kg/m3) gravity (m/s2) length of day (hours) distance from sun (106km) mean temperature (°c)
number of moons notes terrestial planets mercury 0.330 4,879 5427 3.7 4222.6 57.9 167 0 closest to the sun venus 4.87 12,104 5243 8.9 2802.0 108.2 464 0 earth 5.97 12,756 5514 9.8 24.0 149.6 15 1 our world mars 0.642 6,792 3933 3.7 24.7 227.9 -65 2 th...
...both accept a unitless
number value, which equals the
number of rows or columns you want spanned.
... if we wanted to apply the styling information to both columns, we could just include one <col> element with a span attribute on it, like this: <colgroup> <col style="background-color: yellow" span="2"> </colgroup> just like colspan and rowspan, span takes a unitless
number value that specifies the
number of columns you want the styling to apply to.
Introducing asynchronous JavaScript - Learn web development
using callbacks is slightly old-fashioned now, but you'll still see them in use in a
number of older-but-still-commonly-used apis.
...' + eachname); }); in this example we loop through an array of greek gods and print the index
numbers and values to the console.
...one difference is that we've included a
number of console.log() statements to illustrate an order that you might think the code would execute in.
Silly story generator - Learn web development
objective: to test comprehension of javascript fundamentals, such as variables,
numbers, operators, strings, and arrays.
...the following for example turns the background of the <html> element red — so the entire browser window should go red if the javascript is applied properly: document.queryselector('html').style.backgroundcolor = 'red'; math.round() is a built-in javascript method that simply rounds the result of a calculation to the nearest whole
number.
...troubleshooting javascript storing the information you need — variables basic math in javascript —
numbers and operators handling text — strings in javascript useful string methods arrays assessment: silly story generator ...
JavaScript object basics - Learn web development
the syntax always follows this pattern: const objectname = { member1name: member1value, member2name: member2value, member3name: member3value }; the value of an object member can be pretty much anything — in our person object we've got a string, a
number, two arrays, and two functions.
...instead of using these: person.age person.name.first you can use person['age'] person['name']['first'] this looks very similar to how you access the items in an array, and it is basically the same thing — instead of using an index
number to select an item, you are using the name associated with each member's value.
... it is no wonder that objects are sometimes called associative arrays — they map strings to values in the same way that arrays map
numbers to values.
Measuring performance - Learn web development
performance apis when writing code for the web, there are a large
number of web apis available that allow you to create your own performance measuring tools.
... tools and metrics there are a
number of different tools available to help you improve performance.
...for example, bundling tools pack your code into single files to reduce the
number of http requests or minifiers that remove all whitespace from your code to make the files smaller.
Introduction to the server side - Learn web development
server-side code can be written in any
number of programming languages — examples of popular server-side web languages include php, python, ruby, c#, and nodejs(javascript).
... search for a
number of keywords and note how the page structure doesn't change, even though the results do.
... lastly, you should understand that server-side code can be written in a
number of programming languages and that you should use a web framework to make the whole process easier.
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
here we'll get the todo counter to update to show the correct
number of todos still to complete, and correctly apply styling to completed todos (i.e.
...nd find the newly-created todomvc/app/components/footer.js file and update it to the following: import component from '@glimmer/component'; import { inject as service } from '@ember/service'; export default class footercomponent extends component { @service('todo-data') todos; } now we need to go back to our todo-data.js file and add some functionality that will allow us to return the
number of incomplete todos (useful for showing how many are left), and clear the completed todos out of the list (which is what the “clear completed” functionality needs).
... first of all, replace this line: <strong>0</strong> todos left with this, which populates the incomplete
number with the length of the incomplete array: <strong>{{this.todos.incomplete.length}}</strong> todos left next, replace this: <button type="button" class="clear-completed"> with this: <button type="button" class="clear-completed" {{on 'click' this.todos.clearcompleted}}> so now when the button is clicked, the clearcompleted() action we added earlier is run.
Framework main features - Learn web development
what if we wanted to only allow
numbers to be passed into this function?
... typescript makes that possible: function add(a:
number, b:
number) { return a + b; } the :
number written after each parameter here tells typescript that both a and b must be
numbers.
... here’s a quick test for our counterbutton written with the help of react testing library — it tests a
number of things, such as the button's existance, and whether the button is displaying the correct text after being clicked 0, 1, and 2 times: import react from "react"; import { render, fireevent } from "@testing-library/react"; import "@testing-library/jest-dom/extend-expect"; import counterbutton from "./counterbutton"; it("renders a semantic with an initial state of 0", () => { const { getbyrol...
Understanding client-side JavaScript frameworks - Learn web development
here we'll get the todo counter to update to show the correct
number of todos still to complete, and correctly apply styling to completed todos (i.e.
...using vue computed properties in this article we'll add a counter that displays the
number of completed todo items, using a feature of vue called computed properties.
... as a beginner, trying to choose what to focus on out of the huge
number of choices available is a very real problem.
Introduction to cross browser testing - Learn web development
cross browser testing is the practice of making sure that the web sites and web apps you create work across an acceptable
number of web browsers.
... second, when we say "across an acceptable
number of web browsers", we don't mean 100% of the browsers in the world — this is just about impossible.
...you can set up your own testing automation system (selenium being the popular app of choice) that could for example load your site in a
number of different browsers, and: see if a button click causes something to happen successfully (like for example, a map displaying), displaying the results once the tests are completed take a screenshot of each, allowing you to see if a layout is consistent across the different browsers.
Client-side tooling overview - Learn web development
it is easy to become overwhelmed by the sheer
number of tools that can be included in a single project.
...often linters can be configured to not only report errors, but also report any violations of a specified style guide that you team might be using (for example code that is using the wrong
number of spaces for indentation, or using template literals rather than regular string literals).
... others there are a
number of other tool types available to use in the post-development stage, including code climate for gathering code quality metrics, the webhint browser extension for performing runtime analysis of cross-browser compatibility and other checks, github bots for providing more powerful github functionality, updown for providing app uptime monitoring, and so many more!
Accessibility API cross-reference
checked checked checked aria-checked checked (boolean attribute) defines the total
number of columns in a table, grid, or treegrid.
... n/a n/a aria-colcount defines an element's column index or position with respect to the total
number of columns within a table, grid, or treegrid.
... n/a n/a aria-colindex defines the
number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
Software accessibility: Where are we today?
hearing impaired we must also consider the increasing
numbers of aging baby boomers that are beginning to experience problems with their sight, vision or dexterity.
...gnome, kde, staroffice, koffice, mozilla and all other gui software packages in linux are unuseable by large
numbers of disabled users.
...mozilla developers follow the general front-end accessibility requirements: there are a
number of potential "gotchas" when developing xul ui.
Creating a spell check dictionary add-on
this file contains information about your add-on such as name and version
number (see below).
... <?xml version="1.0"?> <rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <description about="urn:mozilla:install-manifest"> <em:id>locale-code@dictionaries.addons.mozilla.org</em:id> <em:version>version
number</em:version> <em:type>64</em:type> <em:unpack>true</em:unpack> <em:name>name</em:name> <!-- other install.rdf metadata such as em:localized, em:description, em:creator, em:developer, em:translator, em:contributor or em:homepageurl --> <!-- firefox --> <em:targetapplication> <description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e9738...
... the em:version should follow the rules of mozilla add-on version
numbers, and if you update an existing dictionary add-on, the new version
number must be greater than the old one.
Creating reftest-based unit tests
if one has software that multiplies
numbers, one wants a regression test to show that 2 * 2 continues to be calculated to be 4, not something similar to but not quite exactly 4.
...for example, the html 4.01 specification at the w3c specifies that text inside of a <blockquote> will be indented, but it does not specify the
number of pixels of the indentation.
...new tests can be added to the reftest.list file, which can contain any
number of tests.
Eclipse CDT Manual Setup
if you want line
numbers, tick "show line
numbers".
... select "c/c++ > build > console" and set "limit console output (
number of lines)" to something large, like "1000000".
... select "c/c++ > editor > scalability" and set "enable scalability mode when the
number of lines in the file is more than:" to something larger, like 100000.
Commenting IDL for better documentation
* * @param
number the saying
number to return.
...if the specified * quote
number is invalid, an exception is thrown.
... */ astring getfunnysaying(in integer
number); /** * says something appreciative of the tastiness of the cookie in the specified * language.
Contributing to the Mozilla code base
there are a
number of ways to do this: search bugzilla for relevant keywords.
... when you commit your code, please use the following format for your commit message: `bug
number - what your patch does; r?reviewer` for example, a commit message may look like `bug 1234567 - remove reflow by caching element size.
...after fixing a nontrivial
number of bugs you should request level 3 access so you can land your own code after it has been reviewed.
Experimental features in Firefox
editor's note: when adding features to these tables, please try to include a link to the relevant bug or bugs using the bug macro: {{bug(bug-
number)}}.
... nightly 75 no developer edition 75 no beta 75 no release 75 no preference name layout.css.focus-visible.enabled single
numbers as aspect ratio in media queries support for using a single <
number> as a <ratio> when specifying the aspect ratio for a media query.
... nightly 70 no developer edition 70 no beta 70 no release 70 no preference name layout.css.aspect-ratio-
number.enabled property: backdrop-filter the backdrop-filter property applies filter effects to the area behind an element.
Message manager overview
its most important functions and attributes are: childcount : contains the
number of children (typically, browser windows) getchildat() : get the child at the given index loadframescript() : load a frame script into every tab in the browser broadcastasyncmessage() : send a message to frame scripts addmessagelistener() : start listening to a specific message from all frame scripts removemessagelistener() : stop listening to a specific message ...
... its most important functions and attributes are: childcount : contains the
number of children (typically, browser tabs) getchildat() : get the child at the given index loadframescript() : load a frame script into every tab in this window broadcastasyncmessage() : send a message to all frame scripts in this window addmessagelistener() : start listening to a specific message from frame scripts removemessagelistener() : stop listening to a specific messag...
... its most important functions and attributes are: childcount : contains the
number of children (child processes, plus the in-content child) getchildat() : get the child at the given index loadprocessscript() : load a process script into every content process broadcastasyncmessage() : send a message to all process scripts addmessagelistener() : start listening to a specific message from process scripts removemessagelistener() : stop listening to a specif...
HTML parser threading
the speculation object has a queue of tree ops (into which the tree builder will now flush ops to instead of the tree op stage), an owning reference to the nshtml5owningutf16buffer that contains the starting point of the speculation, an index into the nshtml5owningutf16buffer defining the exact starting point within the buffer, the line
number of the tokenizer at that point and a snapshot of the tree op state.
... the line
number and the snapshot are also added to the tree op that attempts to execute scripts (before flushing it).
...the tokenizer gets its line
number restored from the speculation object.
Download
currentbytes read only
number number of bytes currently transferred.
... progress read only
number progress percent, from 0 to 100.
... totalbytes read only
number when hasprogress is true, this indicates the total
number of bytes to be transferred before the download finishes; this value can be zero if the file is empty.
DownloadSummary
progresstotalbytes read only
number indicates the total
number of bytes to be transferred before completing all the downloads that are currently in progress.
... for downloads that do not have a known final size, the
number of bytes currently transferred is reported as part of this property.
... progresscurrentbytes read only
number number of bytes currently transferred as part of all the downloads that are currently in progress.
NetUtil.jsm
readinputstreamtostring() reads a given
number of bytes from an input stream, returning a string containing those bytes.
... acount the
number of bytes to read from the stream.
... you can call nsiinputstream.available() to get the
number of bytes currently available.
OS.File.Error
} catch (ex) { if (ex instanceof os.file.error && ex.becausenosuchfile) { // the file does not exist } } global object os.file.error methods overview the following functions are utility functions that may be used to construct instances of os.file.error, setting the platform-specific error
number.
... platform-specific attributes unixerrno (defined under unix only) the system error
number (errno) for the error.
... winlasterror (defined under windows only) the system error
number (getlasterror) for the error.
Mozilla Web Developer FAQ
lengths other than zero should be followed by a proper unit without a space between the
number and the unit (eg.
...in fact, since the input to the browser can be of arbitrary length, there is no upper bound for the
number of distinct ways of deviating from the standards.
...(likewise, there is no upper bound for the
number of ways different features of the standards themselves can be combined, which makes software quality assurance challenging.) also, the ways in which browser x reacts to some standards-incompliant input are not all intentional.
Build Metrics
num_constructors
number of static constructors found by the compiler in the firefox c++ codebase.
... compiler warnings
number of compiler warnings detected during a build.
...so the value may fluctuate from build to build even if the
number of compiler warnings didn't actually change.
JS::PerfMeasurement
urrent implementation can measure eleven different types of low-level hardware and software events: events that can be measured bitmask passed to constructor counter variable what it measures perfmeasurement::cpu_cycles .cpu_cycles raw cpu clock cycles ::instructions .instructions total instructions executed ::cache_references .cache_references total
number of memory accesses ::cache_misses .cache_misses memory accesses that missed the cache ::branch_instructions .branch_instructions branch instructions executed ::branch_misses .branch_misses branch instructions that were not predicted correctly ::bus_cycles .bus_cycles total memory bus cycles ::page_faults ...
...perfmeasurement::all in a constructor call, this special value means "measure everything that can possibly be measured." perfmeasurement::num_measurable_events this constant equals the total
number of events defined by the api - not necessarily the total
number of events that a particular os allows you to measure.
... all presently-measurable events are measured with counters, not timers; that is, there is no defined relation between the
numbers you get from this interface, and wall-clock time.
Power profiling overview
the other states have higher
numbers and reflect increasing deeper idle states.
...the important thing is that c0 is always the active state, and for the idle states a higher
number always means less power consumption.
...p0 is the state where the processor is operating at maximum frequency and voltage, and higher-
numbered p-states operate at a lower frequency and voltage to reduce power consumption.
powermetrics
quick start powermetrics provides a vast
number of measurements.
...change this
number to get shorter or longer samples.
... id: coalition/process id
number.
tools/power/rapl
if the processor does not support gpu or ram estimates then " n/a " will be printed in the relevant column instead of a
number, and it will contribute zero to the total.
... once sampling is finished — either because the user interrupted it, or because the requested
number of samples has been taken — the following summary data is shown: 10 samples taken over a period of 10.000 seconds 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.
...the
number of samples to take.
Leak And Bloat Tests
provide a consistent
number from build to build where no source code has changed.
...results printed on tinderbox output, these consist of: mail rlk reference count leaks mail lk total bytes malloc'ed and not free'd mail mh maximum heap size mail a allocations -
number of calls to malloc and friends.
...il.server.server2.directory", "/home/moztest/.thunderbird/t7i1txfw.minimum/mail/tinderbox"); user_pref("mail.attachment.store.version", 1); user_pref("mail.folder.views.version", 1); user_pref("mail.spam.version", 1); user_pref("mailnews.quotingprefs.version", 1); user_pref("mailnews.ui.threadpane.version", 6); changes to leak and bloat tests date and time (pst) description approx effect on
numbers pre dec 2008 initial version - 2008/12/07 11:20 bug 463594 disabled os x and outlook address books via the preference settings mac lk -56.2kb.
PRErrorCode
syntax #include <prerror.h> typedef print32 prerrorcode description the service nspr offers in this area is the ability to associate a thread-specific condition with an error
number.
... the error
number namespace is not well managed.
... nspr assumes error
numbers starting at -6000 (decimal) and progressing towards zero.
PR_Available
determines the
number of bytes (expressed as a 32-bit integer) that are available for reading beyond the current read-write pointer in a specified file or socket.
... returns the function returns one of the following values: if the function completes successfully, it returns the
number of bytes that are available for reading.
... see also if the
number of bytes available for reading is out of the range of a 32-bit integer, use pr_available64.
PR_Available64
determines the
number of bytes (expressed as a 32-bit integer) that are available for reading beyond the current read-write pointer in a specified file or socket.
... returns the function returns one of the following values: if the function completes successfully, it returns the
number of bytes that are available for reading.
... see also if the
number of bytes available for reading is within the range of a 32-bit integer, use pr_available.
PR_Calloc
allocates zeroed memory from the heap for a
number of objects of a given size.
... syntax #include <prmem.h> void *pr_calloc ( pruint32 nelem, pruint32 elsize); parameters nelem the
number of elements of size elsize to be allocated.
... description this function allocates memory on the heap for the specified
number of objects of the specified size.
PR_GetError
syntax #include <prerror.h> prerrorcode pr_geterror(void) returns the value returned is a 32-bit
number.
... nspr provides no direct interpretation of the
number's value.
... nspr does use pr_seterror to set error
numbers defined in error codes.
PR_InitializeNetAddr
port the port
number to be assigned in the network address structure.
... description pr_initializenetaddr allows the assignment of special network address values and the port
number, while also setting the state that indicates the version of the address being used.
...this allows the caller to change the network address' port
number assignment without affecting the host address.
PR_Poll
npds the
number of elements in the pds array.
... returns the function returns one of these values: if successful, the function returns a positive
number indicating the
number of prpolldesc structures in pds that have events.
...a count of the
number of ready descriptors is returned unless a timeout occurs, in which case zero is returned.
PR_SetConcurrency
syntax #include <prinit.h> void pr_setconcurrency(pruintn numcpus); parameter pr_setconcurrency has one parameter: numcpus the
number of extra virtual processor threads to be created.
... description setting concurrency controls the
number of virtual processors that nspr uses to implement its m x n threading model.
... virtual processors are actuallyglobal threads, each of which is designed to support an arbitrary
number oflocal threads.
PR_strtod
converts the prefix of a decimal string to the nearest double-precision floating point
number.
... description pr_strtod converts the prefix of the input decimal string pointed to by s00 to a nearest double-precision floating point
number.
...if no
number can be formed, se is set to s00, and 0 is returned.
Threads
threading types and constants threading functions a thread has a limited
number of resources that it truly owns.
... pr_sleep causes a thread to yield to other threads for a specified
number of ticks.
... setting global thread concurrency pr_setconcurrency sets the
number of global threads used by nspr to create local threads.
NSS 3.35 release notes
this includes a large
number of changes since 3.34, which supported only draft -18.
... keyupdate will be used automatically, if a cipher is used for a sufficient
number of records.
... note: the value of ssl_tls13_key_share_xtn value, from the sslextensiontype, has been re
numbered to match changes in tls 1.3.
Enc Dec MAC Output Public Key as CSR
ecupwdata *pwdata) { ck_mechanism_type mechanism; secoidtag algtag; pk11rsagenparams rsaparams; void *params; seckeyprivatekey *privkey = null; secstatus rv; unsigned char randbuf[blocksize + 1]; rv = generaterandom(randbuf, blocksize); if (rv != secsuccess) { fprintf(stderr, "error while generating the random
numbers : %s\n", port_errortostring(rv)); goto cleanup; } pk11_randomupdate(randbuf, blocksize); switch (keytype) { case rsakey: rsaparams.keysizeinbits = size; rsaparams.pe = publicexponent; mechanism = ckm_rsa_pkcs_key_pair_gen; algtag = sec_oid_pkcs1_md5_with_rsa_encry...
...uflen; unsigned char ptext[blocksize]; unsigned int ptextlen = 0; unsigned char ctext[64]; unsigned int ctextlen; unsigned char newmac[digestsize]; unsigned int newmaclen = 0; unsigned int newptextlen = 0; unsigned int count = 0; unsigned int temp = 0; unsigned int block
number = 0; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned char iv[blocksize]; unsigned int ivlen = ivitem->len; unsigned int paddinglength; int j; memcpy(iv, ivitem->data, ivitem->len); paddinglength = (unsigned int)paditem->data[0]; ctxmac = pk11_createcontextbysymkey(ckm_md5...
... if (rv != secsuccess) { goto cleanup; } if (count == infilelength) { decbuflen = decbuflen-paddinglength; } /* write the plain text to out file */ temp = pr_write(outfile, decbuf, decbuflen); if (temp != decbuflen) { pr_fprintf(pr_stderr, "write error\n"); rv = secfailure; break; } block
number++; } if (rv != secsuccess) { goto cleanup; } rv = macfinal(ctxmac, newmac, &newmaclen, sizeof(newmac)); if (rv != secsuccess) { goto cleanup; } if (port_memcmp(macitem->data, newmac, newmaclen) == 0) { rv = secsuccess; } else { pr_fprintf(pr_stderr, "check mac : failure\n"); pr_fprintf(pr_stderr, "extracted : "); printasascii(pr_stderr, m...
Notes on TLS - SSL 3.0 Intolerant Servers
problem a
number of netscape 6.x/7.x and mozilla users have reported that some secure sites -- typically sites featuring online transactions or online banking over the https protocol -- do not display any content at all.
... cause there are some
number of web servers in production today which incorrectly implement the ssl 3.0 specification.
...it is designed to permit a server to detect a man-in-the-middle that is altering the ssl client hello (connection) requests as they pass from the client to the server, altering them by changing the protocol version
number to a lower version
number.
FC_FindObjects
usmaxobjectcount [in] maximum
number of handles to retrieve.
... pusobjectcount [out] pointer to location to receive the
number of returned handles.
... description fc_findobjects returns the next set of object handles matching the criteria set up by the previous call to fc_findobjectsinit and sets the object count variable to their
number or to zero if there are none.
FC_SeedRandom
name fc_seedrandom() - mix additional seed material into the random
number generator.
... description fc_seedrandom() mixes additional seed material into the token's random
number generator.
... note that fc_seedrandom() doesn't provide the initial seed material for the random
number generator.
NSS tools : ssltab
instead of outputting raw data, the command interprets each record as a
numbered line of hex values, followed by the same data as ascii characters.
...the files are named cert.0x, where x is the sequence
number of the certificate.
...the following are well-known port
numbers: * http 80 * https 443 * smtp 25 * ftp 21 * imap 143 * imaps 993 (imap over ssl) * nntp 119 * nntps 563 (nntp over ssl) usage and examples you can use the ssl debugging tool to intercept any connection information.
NSS tools : ssltap
instead of outputting raw data, the command interprets each record as a
numbered line of hex values, followed by the same data as ascii characters.
...the files are named cert.0x, where x is the sequence
number of the certificate.
...the following are well-known port
numbers: * http 80 * https 443 * smtp 25 * ftp 21 * imap 143 * imaps 993 (imap over ssl) * nntp 119 * nntps 563 (nntp over ssl) usage and examples you can use the ssl debugging tool to intercept any connection information.
sslerr.html
ssl_error_unsupported_version -12279 "peer using unsupported version of security protocol." on a client socket, this means the remote server has attempted to negotiate the use of a version of ssl that is not supported by the nss library, probably an invalid version
number.
...(certain of these error codes have more specific meanings, as described.) ssl_error_generate_random_failure -12223 "ssl experienced a failure of its random
number generator." ssl_error_sign_hashes_failure -12222 "unable to digitally sign data required to verify your certificate." ssl_error_extract_public_key_failure -12221 "ssl was unable to extract the public key from the peer's certificate." ssl_error_server_key_exchange_failure -12220 "unspecified failure while processing ssl server key exchange handshake." ...
..."invalid ocsp signing certificate in ocsp response." sec_error_revoked_certificate_crl -8047 "certificate is revoked in issuer's certificate revocation list." sec_error_revoked_certificate_ocsp -8046 "issuer's ocsp responder reports certificate is revoked." sec_error_crl_invalid_version -8045 "issuer's certificate revocation list has an unknown version
number." sec_error_crl_v1_critical_extension -8044 "issuer's v1 certificate revocation list has a critical extension." sec_error_crl_unknown_critical_extension -8043 "issuer's v2 certificate revocation list has an unknown critical extension." sec_error_unknown_object_type -8042 "unknown object type specified." sec_error_incompatible_pkcs11 -8041 ...
NSS Tools ssltap
instead of outputting raw data, the command interprets each record as a
numbered line of hex values, followed by the same data as ascii characters.
...the files are named cert.0x, where x is the sequence
number of the certificate.
...the following are well-known port
numbers: http 80 https 443 smtp 25 ftp 21 imap 143 imaps 993 (imap over ssl) nntp 119 nntps 563 (nntp over ssl) examples you can use the ssl debugging tool to intercept any connection information.
NSS tools : ssltap
instead of outputting raw data, the command interprets each record as a
numbered line of hex values, followed by the same data as ascii characters.
...the files are named cert.0x, where x is the sequence
number of the certificate.
... the following are well-known port
numbers: * http 80 * https 443 * smtp 25 * ftp 21 * imap 143 * imaps 993 (imap over ssl) * nntp 119 * nntps 563 (nntp over ssl) usage and examples you can use the ssl debugging tool to intercept any connection information.
Rhino Debugger
simply single-click on the line
number of the line at which you want to set a breakpoint.
... if the selected line contains executable code a red dot will appear next to the line
number and a breakpoint will be set at that location.
... simply single-click on the red dot or the line
number of the line at which you want to clear a breakpoint.
The JavaScript Runtime
these types are implemented with the following java types and values: javascript fundamental type java type undefined a singleton object defined by context.getundefinedtype() null null boolean java.lang.boolean
number java.lang.
number, that is, any of java.lang.byte, java.lang.short, java.lang.integer, java.lang.float, or java.lang.double.
...however, this is not the implementation used in practice because a
number to string conversion is too expensive to be performed on every array access.
...similarly, values of
numbers that do not fix in integers (like 1.1 and 0x100000000) must be converted to strings.
Scripting Java
the reason is that javascript has its own top-level objects boolean, math,
number, object, and string that are different from the classes by those names defined in the java.lang package.
... as an example, consider the following java class that defines a
number of overloaded methods and calls them.
...for example, if we call overload's method g with two integers we get an error because neither form of the method is closer to the argument types than the other: js> o.g(3,4) js:"<stdin>", line 2: the choice of java method overload.g matching javascript argument types (
number,
number) is ambiguous; candidate methods are: class java.lang.string g(java.lang.string,int) class java.lang.string g(int,java.lang.string) see java method overloading and liveconnect 3 for a more precise definition of overloading semantics.
DOUBLE_TO_JSVAL
description double_to_jsval is the inverse of js::to
number.
... to convert a c float, double to type js::value, use js_
numbervalue instead.
... see also mxr id search for double_to_jsval js::to
number js_
numbervalue js::doublevalue bug 1177892 -- removed ...
JS::CompileFunction
nargs unsigned
number of arguments to pass to the function.
...nargs is the
number of arguments the function takes, and argnames is a pointer to the first element of an array of names to assign each argument.
... the
number of argument names should match the
number of arguments specified in nargs.
JS::CompileOptions
lineno unsigned line
number of the first line of the source code (1-origin).
... column unsigned column
number of the first line of the source code (0-origin).
...js shell interactive" "js shell load" "js shell evaluate" "js shell run" "js shell disfile" "js shell compfile" "js shell parse" "js shell syntaxparse" "js shell offthreadcompilescript" and the following are used in self-hosted code and debugger: "self-hosted" "debugger eval" introductionlineno unsigned line
number in the source code which introduces this source code.
JS::CreateError
syntax // added in spidermonkey 45 bool js::createerror(jscontext *cx, jsexntype type, handleobject stack, handlestring filename, uint32_t line
number, uint32_t column
number, jserrorreport *report, handlestring message, mutablehandlevalue rval); // obsolete since jsapi 39 bool js::createerror(jscontext *cx, jsexntype type, handlestring stack, handlestring filename, uint32_t line
number, uint32_t column
number, jserrorreport *report, handlestring message, mutablehandlevalue rval); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... line
number uint32_t the value of error.prototype.line
number.
... column
number uint32_t the value of error.prototype.column
number.
JS::DoubleValue
this article covers features introduced in spidermonkey 24 convert a c floating-point
number of type double to a js::value.
... description js::doublevalue converts a c floating-point
number of type double to js::value, the type of javascript values.
... see also mxr id search for js::doublevalue js::value js::int32value js::float32value js::
numbervalue js_
numbervalue ...
JS::Float32Value
this article covers features introduced in spidermonkey 24 convert a c floating-point
number of type float to a js::value.
... description js::float32value converts a c floating-point
number of type float to js::value, the type of javascript values.
... see also mxr id search for js::float32value js::value js::int32value js::doublevalue js::
numbervalue js_
numbervalue ...
JSErrorFormatString
argcount uint16_t the
number of arguments to expand in the formatted error message.
... description jserrorformatstring is a struct to represent error message and type, returned by js_reporterror
number function.
... see also mxr id search for jserrorformatstring jsexntype js_reporterror
number bug 684526 ...
JSReserveSlotsOp
a class cannot freely use a reserveslots hook to reserve a different
number of slots for each object.
... the optional jsclass.reserveslots hook allows a class to make computed per-instance object slots reservations, in addition to or instead of using jsclass_has_reserved_slots(n) in the jsclass.flags initializer to reserve a constant-per-class
number of slots.
... implementations of this hook should return the
number of slots to reserve, not including any reserved by using jsclass_has_reserved_slots(n) in jsclass.flags.
JSVAL_IS_DOUBLE
determines if a given jsval is a
number represented as a jsdouble.
... syntax jsval_is_double(v) description jsval_is_double(v) is true if v is a
number represented in memory as a jsdouble.
... to check whether v is a
number, regardless of implementation details, use jsval_is_
number instead.
JSVAL_IS_INT
determine if a given jsval is a javascript
number represented in memory as an integer.
... syntax jsval_is_int(v) description jsval_is_int(v) is true if the jsval v is a
number represented in memory as an integer.
... to test whether a value is a
number, regardless of how it is represented in memory, use jsval_is_
number instead.
JS_CallFunction
added in spidermonkey 31 argc unsigned
number of arguments you are passing to the function.
...there should be one value for each argument you pass to the function; the
number of arguments you pass may be different from the
number of arguments defined for the function.
... in argc, indicate the
number of arguments passed to the function.
JS_DoubleToInt32
this article covers features introduced in spidermonkey 17 convert a c floating-point
number of type double to 32-bit integer per ecma spec.
... description js_doubletoint32 converts a c floating-point
number of type double to int32, a signed 32-bit integer.
... js_doubletouint32 converts a c floating-point
number of type double to uint32, an unsigned 32-bit integer.
JS_GetFunctionArity
get the
number of arguments a function expects.
... description js_getfunctionarity returns the
number of formal parameters of a function, fun.
...otherwise fun is implemented in javascript, and the result is the
number of identifiers in its formal parameter list (see ecma 262-3 §13).
JS_GetNaNValue
get the not-a-
number (nan) floating-point
number as a value of type js::value.
... description js_getnanvalue returns a value of type js::value that represents an ieee floating-point quiet not-a-
number (nan).
...so do
number("xyzzy") and math.sin("frank").
JS_PushArguments
convert any
number of arguments to jsvals and store the resulting jsvals in an array.
... various (in js_pusharguments) a variable
number of arguments to be converted to jsvals.
...if successful, js_pusharguments would return a pointer to the first element of an array of four jsvals: a boolean, a
number, an object (or null), and a boolean.
SpiderMonkey 17
a significant
number of typedefs of built-in types, or of types which are now standardized, have been removed.
... js_isscriptframe jsclass_new_resolve_gets_start flag js_new
numbervalue js_finalizestub js_clearnewbornroots jsclass_mark_is_trace flag js_setscriptstackquota api changes break out and discuss all api changes here...
... jsclass prototype has changed a
number of optional members have been removed from the jsclass prototype.
Creating the Component Code
the weblock component must do a
number of things to register itself.
...all of the 128-bit
numbers used in xpcom - the class and the interface ids - are examples of uuids, or universal unique identifiers, which were discussed in object interface discovery.
...uuidgen is a command-line tool that returns a unique 128-bit
number when you call it with no arguments: $ uuidgen ce32e3ff-36f8-425f-94be-d85b26e634ee on windows, a program called guidgen.exe does the same thing and also provides a graphical user interface if you'd rather point and click.
Using XPCOM Utilities to Make Things Easier
xpcom macros the xpcom framework includes a
number of macros for making c++ development easier.
... ns_impl_isupports1(classname, interface1) also, if you implement more than one interface, you can simply change the 1 in the macro to the
number of interfaces you support and list the interfaces, separated by commas.
... the following table summarizes the macro usage in this portion of the weblock.cpp source file: common xpcom macros ns_impl_isupportsn implements nsisupports for a given class with n
number of interfaces ns_decl_isupports declares methods of nsisupports including mrefcnt ns_init_isupports initializes mrefcnt to zero.
XPCOM hashtable guide
data type hashtable class none (for a hash set) nsthashtable simple types (
numbers, booleans, etc) nsdatahashtable structs or classes (nsstring, custom defined structs or classes that are not reference-counted) nsclasshashtable reference-counted concrete classes nsrefptrhashtable interface pointers nsinterfacehashtable each of these classes is a template with two parameters.
... there are a
number of builtin hash keys available in nshashkeys.h, the more useful of which are listed below.
... key type hashkey class strings nsstringhashkey/nscstringhashkey integers nsuint32hashkey/nsuint64hashkey pointers nsptrhashkey<t> owned interface pointers nsisupportshashkey reference-counted concrete classes nsrefptrhashkey there are a
number of more esoteric hashkey classes in nshashkeys.h, and you can always roll your own if none of these fit your needs (make sure you're not duplicating an existing hashkey class though!) once you've determined what hashtable and hashkey classes you need, you can put it all together.
IAccessibleAction
nbindings the
number of key bindings returned; the size of the returned array.
...nactions() returns the
number of accessible actions available in this object.
...hresult nactions( [out] long nactions ); parameters nactions the returned value of the
number of actions is zero if there are no actions.
amIWebInstallListener
acount optional the
number of addoninstalls.
... acount optional the
number of addoninstalls.
... acount optional the
number of addoninstalls.
nsIBrowserSearchService
void getdefaultengines( [optional] out unsigned long enginecount, [retval, array, size_is(enginecount)] out nsisearchengine engines ); parameters enginecount the
number of default search engines.
...void getengines( [optional] out unsigned long enginecount, [retval, array, size_is(enginecount)] out nsisearchengine engines ); parameters enginecount the
number of all installed search engines.
...void getvisibleengines( [optional] out unsigned long enginecount, [retval, array, size_is(enginecount)] out nsisearchengine engines ); parameters enginecount the
number of hidden installed search engines.
nsIContentView
methods scrollby() scrolls the content view by the specified
number of chrome-document css pixels along each axis.
... void scrollby( in float dxpx, in float dypx ); parameters dxpx the
number of css pixels to scroll on the x axis; specify a positive value to scroll to the right or a negative value to scroll to the left.
... dypx the
number of css pixels to scroll on the y axis; specify a positive value to scroll down or a negative value to scroll up.
nsIControllers
exceptions thrown ns_error_failure the id is greater than the
number of controllers that have been inserted, or the controller has since been removed.
... getcontrollercount() returns the current
number of controllers.
...return value the
number of controllers currently in the list of controllers.
nsIFeedProgressListener
d gecko 1.8 inherits from: nsifeedresultlistener last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void handleentry(in nsifeedentry entry, in nsifeedresult result); void handlefeedatfirstentry(in nsifeedresult result); void handlestartfeed(in nsifeedresult result); void reporterror(in astring errortext, in long line
number, in boolean bozo); methods handleentry() called after each entry or item is processed.
... void reporterror( in astring errortext, in long line
number, in boolean bozo ); parameters errortext a short description of the error.
... line
number the line on which the error occurred.
nsIHttpActivityObserver
socket transport activity when the activity type is activity_type_socket_transport and the subtype is status_sending_to, the aextrasizedata parameter contains the
number of bytes sent.
... because a single http transaction may consist of multiple chunks of data transmitted through separate socket writes, each socket activity notification will only reflect the
number of bytes transmitted in that chunk.
...activity_subtype_response_complete aextrasizedata contains the total
number of bytes received.
nsIMessenger
void saveallattachments(in unsigned long count, [array, size_is(count)] in string contenttypearray, [array, size_is(count)] in string urlarray, [array, size_is(count)] in string displaynamearray, [array, size_is(count)] in string messageuriarray); parameters count the
number of attachments being saved.
...] in string contenttypearray, [array, size_is(count)] in string urlarray, [array, size_is(count)] in string displaynamearray, [array, size_is(count)] in string messageuriarray, in boolean savefirst, [optional] in boolean withoutwarning); parameters count the
number of attachments to be deleted.
... acount the
number of items in the history.
nsINavHistoryResultNode
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) attributes attribute type description accesscount unsigned long total
number of times the uri has been accessed.
... for hosts, this is the total
number of the children under it, rather than the total
number of times the host has been accessed (getting that information would require an additional query, so for performance reasons that information isn't given by default).
... indentlevel long this is the
number of levels between this node and the top of the hierarchy.
nsISHistory
overview void addshistorylistener(in nsishistorylistener alistener); nsishentry getentryatindex(in long index, in boolean modifyindex); void purgehistory(in long numentries); void reloadcurrententry(); void removeshistorylistener(in nsishistorylistener alistener); attributes attribute type description count long the
number of toplevel documents currently available in session history.
... maxlength long used to get/set the maximum
number of toplevel documents, session history can hold for each instance.
...void purgehistory( in long numentries ); parameters numentries the
number of toplevel documents to be purged from history.
nsIScreen
t, out long top, out long width, out long height); void getrect(out long left, out long top, out long width, out long height); void lockminimumbrightness(in unsigned long brightness); void unlockminimumbrightness(in unsigned long brightness); attributes attribute type description colordepth long the screen's color depth; this is the
number of bits used to represent a color.
... pixeldepth long the screen's pixel depth; this is the
number of bits used to represent a pixel.
... brightness_levels 2 the
number of different brightness levels.
nsIStreamListener
aoffset
number of bytes that were sent in previous ondataavailable() calls for this request.
...if that
number is greater than or equal to 2^32, this parameter will be pr_uint32_max (2^32 - 1).
... acount the
number of bytes available for reading.
nsIThreadPool
when you send events to the thread pool, the pool creates a new thread to process the event, up to the
number of threads specified by the threadlimit attribute.
... method overview void shutdown(); attributes attribute type description idlethreadlimit unsigned long get/set the maximum
number of idle threads that are kept alive.
... threadlimit unsigned long the maximum
number of threads allowed at once in the pool; you may change this value by altering this attribute.
nsITransactionList
inherits from: nsisupports last changed in gecko 1.7 method overview nsitransactionlist getchildlistforitem(in long aindex); nsitransaction getitem(in long aindex); long getnumchildrenforitem(in long aindex); boolean itemisbatch(in long aindex); attributes attribute type description numitems long the
number of transactions contained in this list.
... return value missing description getnumchildrenforitem() returns the
number of child (auto-aggreated) transactions the item at aindex has.
... return value the
number of child (auto-aggreated) transactions the item at aindex has.
nsITreeSelection
vertselection(); boolean isselected(in long index); void rangedselect(in long startindex, in long endindex, in boolean augment); void select(in long index); void selectall(); void timedselect(in long index, in long delay); void toggleselect(in long index); attributes attribute type description count long the
number of rows currently selected in this tree.
... count
number of rows changed.
...return value long -
number of selection ranges invalidateselection() can be used to invalidate the selection.
nsIUpdateCheckListener
updatecount the
number of updates in the updates array.
...position the
number of bytes downloaded so far.
... totalsize the total
number of bytes that need to be downloaded.
nsIVersionComparator
a version-part consists of up to four parts, all of which are optional: <
number-a><string-b><
number-c><string-d (everything else)> a version-part may also consist of a single asterisk "*" which indicates * "infinity".
...
numbers are base-10, and are zero if left out.
... for additional backwards compatibility, if "string-b" is "+" then "
number-a" is incremented by 1 and "string-b" becomes "pre".
Storage
similarly, the c++ looks like this: nscomptr<mozistoragestatement> statement; rv = dbconn->createstatement(ns_literal_cstring("select * from table_name where column_name = ?1"), getter_addrefs(statement)); ns_ensure_success(rv, rv); this example uses the
numbered placeholder indexed by zero for a parameter to be bound later (described in binding parameters).
... note: numerical indexes for parameters are always one less than the
number you write in the sql.
... c++ example: nscomptr<mozistoragestatement> statement; rv = mdbconn->createstatement(ns_literal_cstring("select * from table_name where id = ?1"), getter_addrefs(statement)); ns_ensure_success(rv, rv); rv = statement->bindint32parameter(0, 1234); ns_ensure_success(rv, rv); note: numerical indexes for parameters are always one less than the
number you write in the sql.
XPIDL Syntax
the following is a list of potential features which are parseable but may not result in expected code: struct, union, and enumerated types array declarators (appears to be supported in xpidl_header.c but not xpidl_typelib.c) exception declarations module declarations variable arguments (that makes the abnf get more wonky) sequence types max-length strings fixed-point
numbers "any" and "long double" types.
... pyxpidl syntax idlfile = *(cdata / include / interface / typedef / native) typedef = "typedef" identifer identifier ";" native = [attributes] "native" identifier "(" nativeid ")" interface = [attributes] "interface" identifier" [ifacebase] [ifacebody] ";" ifacebase = ":" identifier ifacebody = "{" *(member) "}" member = cdata / "const" identifier identifier "="
number ";" member /= [attributes] ["readonly"] "attribute" identifier identifer ";" member /= [attributes] identifier identifier "(" paramlist ")" raises ";" paramlist = [param *("," param)] raises = ["raises" "(" identifier *("," identifier) ")"] attributes = "[" attribute *("," attribute) "]" attribute = (identifier / const) ["(" (identifier / iid) ")"] param = [attributes] ("in" / "out" / "inout") identifier identifi...
...er
number =
number / identifier
number /= "("
number ")"
number /= "-"
number number /=
number ("+" / "-" / "*")
number number /=
number ("<<" / >>")
number number /=
number "|"
number ; lexical tokens, i'm going to specify these in regex form
number = /-?\d+|0x[0-9a-fa-f]+/ cdata = /%{[ ]*c\+\+[ ]*\n(.*?\n?)%}[ ]*(c\+\+)?/s include = /\#include[ \t]+"[^"\n]+"/ nativeid = /[^()\n]+(?=\))/ iid = /[0-9a-fa-f]{8}-[0-9a-fa-f]{4}-[0-9a-fa-f]{4}-[0-9a-fa-f]{12}/ identifier = /unsigned long long|unsigned short|unsigned long|long long|[a-za-z][a-za-z_0-9]*/ ...
Index
the result is a javascript file that will add a "
numbers" container to the end of thunderbird's "all folders" mode.
... that container will have 3 child-items, the
numbers 1, 2, and 3.
... clicking on those items will display the
number in the main viewing pane of thunderbird.
LDAP Support
for large companies, there may be a large
number of users in the directory with the same name.
... address book attribute ldap attribute firstname givenname lastname sn lastname surname displayname cn displayname commonname displayname displayname nickname xmozillanickname primaryemail mail secondemail xmozillasecondemail workphone telephone
number homephone homephone fax
number fax fax
number facsimiletelephone
number pager
number pager pager
number pagerphone cellular
number mobile cellular
number cellphone cellular
number carphone workaddress postofficebox workaddress streetaddress workcity l workcity lo...
...cality workstate st workstate region workzipcode postalcode workzipcode zip workcountry countryname jobtitle title department ou department orgunit department department department department
number company o company company workcountry countryname _aimscreenname nscpaimscreenname webpage1 workurl webpage2 homeurl birthyear birthyear custom1 custom1 custom2 custom2 custom3 custom3 custom4 custom4 notes notes notes description prefermailformat xmozillausehtmlmail lastmodifieddate modifytimestamp ...
MailNews fakeserver
writing a new fakeserver since the
number of protocols we use is very small, most people shouldn't have to write an entirely new daemon and handler setup by themselves.
...i tend to like using 1024 + default port
number myself.
... if the server is stopped helper for performtest istestfinished none if the test is finished helper for performtest playtransaction none the transaction the transaction is an object with two properties: us, and them; us is an array of responses we sent, them an array of commands received resettest none nothing prepares the server for the next test without closing the connection start port
number nothing starts the server listening stop none nothing stops the server and closes the connection using fakeserver in qa testing debug output from fakeservers it is possible to get the fakeservers to dump to the console the commands they have sent and received.
Mail and RDF
from this resource, you can follow a
number of arcs to find servers, folders, and finally messages.
...it also answers queries about various properties of folders such as the total
number of messages, whether or not this folder is actually a root server, and so forth.
... for example, the folder pane needs to display the
number of messages in the inbox.
Working with windows in chrome code
technically speaking, it implements a
number of interfaces, including nsidomjswindow and nsidomwindow, but it also contains the user-defined properties for global variables and functions of the window.
... example 1: passing data to window when opening it with opendialog when you open a window using window.opendialog or nsiwindowwatcher.openwindow, you can pass an arbitrary
number of arguments to that window.
... storing shared data in preferences if you just need to store a string or a
number, writing a whole xpcom component may be an unnecessary complication.
Declaring types
the ctypes object offers a
number of constructor methods that let you declare types.
...you may declare your array either with a specific
number of elements, or with no predetermined size.
...for example, to create a type for an array of c standard i/o file pointers (perhaps for tracking a
number of active files on disk): const file = new ctypes.structtype("file").ptr; // create file as a file * type const filearray = new ctypes.arraytype(file); // create a filearray type in this example, file is an opaque pointer we can use to refer to c file records, as defined in stdio.h.
Working with ArrayBuffers
var casted = ctypes.cast(pixelbuffer.address(), ctypes.uint8_t.array(myimgdata.data.length).ptr).contents; // myimgdat.data.length is imgwidth * imgheight * 4 because per pixel there is r, g, b, a
numbers casted.tostring(); // "ctypes.uint8_t.array(640000)([45, 66, 135, 255, 99, 86, 55, 255, ..........
... method 2: manually handled another strategy is to handle it manually, as illustrated by the following code example: var casted = ctypes.cast(pixelbuffer.address(), ctypes.uint8_t.array(myimgdata.data.length).ptr).contents; // myimgdat.data.length is imgwidth * imgheight *4 because per pixel there is r, g, b, a
numbers /** method a **/ for (var nindex = 0; nindex < casted.length; nindex = nindex + 4) { // casted.length is same as myimgdat.data.length var r = casted[nindex]; var g = casted[nindex + 1]; var b = casted[nindex + 2]; var a = casted[nindex + 3]; myimgdat.data[nindex] = r; myimgdat.data[nindex + 1] = g; myimgdat.data[nindex + 2] = b; myimgdat.data[nindex + 3] = a; } ...
...pes.void_t.ptr, // *dest ctypes.void_t.ptr, // *src ctypes.size_t // count ); } catch (ex) { throw new error('i dont know where to memcpy is defined on your operating system, "' + os.constants.sys.name + '"'); lib.close() } memcpy(myimgdat.data, pixelbuffer, myimgdat.data.length); // myimgdat.data.length is imgwidth * imgheight *4 because per pixel there is r, g, b, a
numbers lib.close(); see also type conversion ...
Mozilla
javascript libraries from mozilla projects in addition to firefox and other applications, mozilla developers have created a
number of useful javascript libraries you can use in your projects.
... mozilla projects mozilla has a
number of projects other than firefox itself.
... mozilla projects on github there are a
number of tools and services whose code is hosted on github.
UI Tour - Firefox Developer Tools
breakpoints have a blue arrow overlaid on the line
number.
...they will be evaluated when code execution is paused: variable tooltip hover on a variable show a tooltip with its value inside: call stack when the debugger's paused, you'll see a call stack: each level of the call stack gets a line, with the name of the function and the filename and line
number.
...(to remove this restriction, choose unignore source in the context menu of the sources list or the source pane.) copy stack trace copies all items in the call stack (including their uris and line
number) to the clipboard.
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
this stops logging allocations, and displays a tree of allocations: an allocation plot, displayed in the console the
numbers at the left edge of each line show the total
number of objects allocated at that site or at sites called from there.
...(the line
number for the onclick handler is 1, indicating that the allocating call is located on line one of the handler text itself.
... we will probably change this to be the line
number within page.html, not the line
number within the handler code.) the onclick handler calls dodivsandspans, which calls divsandspans, which invokes closures of factory to do all the actual allocation.
Migrating from Firebug - Firefox Developer Tools
like in firebug it lists the total execution time of each function call under total time as well as the
number of calls under samples, the time spent within the function under self time and the related percentages in reference to the total execution time.
... developer toolbar display of error count when there are javascript errors on a page, the firebug start button shows a badge with their
number.
... the devtools show the
number of errors in the developer toolbar.
CSS Flexbox Inspector: Examine Flexbox layouts - Firefox Developer Tools
discovering flex containers when an html element on your page has display: flex applied to it, a
number of features are made available in the devtools to provide easy access to flexbox layout features.
...once you select an element whose display is defined as flex, the panel will include a
number of options for viewing details about the flex container and flex items within it.
... flex item properties the flex items within the flex container are displayed as a
numbered list in the flex items section.
Allocations - Firefox Developer Tools
it includes the following columns: self count: the
number of allocation-samples that were taken in this function (also shown as a percentage of the total) self bytes: the total
number of bytes allocated in the allocation-samples in this function (also shown as a percentage of the total) rows are sorted by the "self bytes" column.
... so in the example above: 8904 samples were taken in signallater(), which is 28.57% of the total
number of samples taken those samples allocated 1102888 bytes, which is 30.01% of the total memory allocated in all samples next to each function name is a disclosure arrow.
...this shows you all the allocations that collectively triggered this gc event: if you're seeing these problems, consider whether you can reduce the
number or size of the allocations you're making here.
Web Console Helpers - Firefox Developer Tools
the resulttype parameter specifies the type of result to return; it can be an xpathresult constant, or a corresponding string: "
number", "string", "bool", "node", or "nodes"; if not provided, any_type is used.
... --delay
number the
number of seconds to delay before taking the screenshot.
... --dpr
number the device pixel ratio to use when taking the screenshot.
The JavaScript input interpreter - Firefox Developer Tools
the resulttype parameter specifies the type of result to return; it can be an xpathresult constant, or a corresponding string: "
number", "string", "bool", "node", or "nodes"; if not provided, any_type is used.
... --delay
number the
number of seconds to delay before taking the screenshot.
... --dpr
number the device pixel ratio to use when taking the screenshot.
Web Console remoting - Firefox Developer Tools
the pageerror packet is: { "from": "conn0.console9", "type": "pageerror", "pageerror": { "errormessage": "referenceerror: foo is not defined", "sourcename": "http://localhost/~mihai/mozilla/test.js", "linetext": "", "line
number": 6, "column
number": 0, "category": "content javascript", "timestamp": 1347294508210, "error": false, "warning": false, "exception": true, "strict": false, "private": false, } } the packet is similar to nsiscripterror - for simplicity.
...in bug 783499 we did a
number of changes that allowed us to reuse the objectactor from the debugger.
... for each console message we receive in the server, we send the following consoleapicall packet to the client: { "from": "conn0.console9", "type": "consoleapicall", "message": { "level": "error", "filename": "http://localhost/~mihai/mozilla/test.html", "line
number": 149, "functionname": "", "timestamp": 1347302713771, "private": false, "arguments": [ "error omg aloha ", { "type": "object", "classname": "htmlbodyelement", "actor": "conn0.consoleobj20" }, " 960 739 3.141592653589793 %a", "zuzu", { "type": "null" }, { "type": "undefined" } ] } } similar to how we send th...
AudioBuffer() - Web APIs
to determine the length to use for a specific
number of seconds of audio, use numseconds * samplerate.
...
numberofchannels: the
number of channels for the buffer.
... exceptions notsupportederror one or more of the options are negative or otherwise has an invalid value (such as
numberofchannels being higher than supported, or a samplerate outside the nominal range).
AudioBuffer.copyFromChannel() - Web APIs
syntax myarraybuffer.copyfromchannel(destination, channel
number, startinchannel); parameters destination a float32array to copy the channel's samples to.
... channel
number the channel
number of the current audiobuffer to copy the channel data from.
... exceptions indexsizeerror one of the input parameters has a value that is outside the accepted range: the value of channel
number specifies a channel
number which doesn't exist (that is, it's greater than or equal to the value of
numberofchannels on the channel).
AudioBuffer.copyToChannel() - Web APIs
syntax myarraybuffer.copytochannel(source, channel
number, startinchannel); parameters source a float32array that the channel data will be copied from.
... channel
number the channel
number of the current audiobuffer to copy the channel data to.
... if channel
number is greater than or equal to audiobuffer.
numberofchannels, an index_size_err will be thrown.
AudioContext.createJavaScriptNode() - Web APIs
numinputchannels the
number of input channels in the audio stream.
... numoutputchannels the
number of output channels in the audio stream.
... example the following script illustrates 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 ...
AudioDestinationNode - Web APIs
the
number of channels in the input must be between 0 and the maxchannelcount value or an exception is raised.
...
number of inputs 1
number of outputs 0 channel count mode "explicit" channel count 2 channel interpretation "speakers" properties inherits properties from its parent, audionode.
... audiodestinationnode.maxchannelcount is an unsigned long defining the maximum
number of channels that the physical device can handle.
AudioNode.channelCountMode - Web APIs
the possible values of channelcountmode and their meanings are: value description the following audionode children default to this value max the
number of channels is equal to the maximum
number of channels of all connections.
... gainnode, delaynode, scriptprocessornode, channelmergernode, biquadfilternode, waveshapernode clamped-max the
number of channels is equal to the maximum
number of channels of all connections, clamped to the value of channelcount.
... pannernode, convolvernode, dynamicscompressornode explicit the
number of channels is defined by the value of channelcount.
AudioNode.connect() - Web APIs
the index
numbers are defined according to the
number of output channels (see audio channels).
...the index
numbers are defined according to the
number of input channels (see audio channels).
...ntext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); // create an normal oscillator to make sound var oscillator = audioctx.createoscillator(); // create a second oscillator that will be used as an lfo (low-frequency // oscillator), and will control a parameter var lfo = audioctx.createoscillator(); // set the frequency of the second oscillator to a low
number lfo.frequency.value = 2.0; // 2hz: two oscillations par second // create a gain whose gain audioparam will be controlled by the lfo var gain = audioctx.creategain(); // connect the lfo to the gain audioparam.
AudioParam.setValueCurveAtTime() - Web APIs
syntax var paramref = param.setvaluecurveattime(values, starttime, duration); parameters values an array of floating-point
numbers representing the value curve the audioparam will change through along the specified duration.
... every value in the array must be a finite
number; if any value is nan, infinity, or -infinity, a typeerror exception is thrown.
... rangeerror the specified starttime is either negative or a non-finite value, or duration is not a finite, strictly positive
number.
AudioParam.value - Web APIs
syntax var curvalue = audioparam.value; audioparam.value = newvalue; value a floating-point
number indicating the parameter's value as of the current time.
... usage notes value precision and variation the data type used internally to store value is a single-precision (32-bit) floating point
number, while javascript uses 64-bit double-precision floating point
numbers.
... consider this example: const source = new audiobuffersourcenode(...); const rate = 5.3; source.playbackrate.value = rate; console.log(source.playbackrate.value === rate); the log output will be false, because the playback rate parameter, rate, was converted to the 32-bit floating-point
number closest to 5.3, which yields 5.300000190734863.
AudioProcessingEvent - Web APIs
the
number of channels is defined as a parameter,
numberofinputchannels, of the factory method audiocontext.createscriptprocessor().
...the
number of channels is defined as a parameter,
numberofoutputchannels, of the factory method audiocontext.createscriptprocessor().
...ocess = function(audioprocessingevent) { // the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var 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 outputdat...
AudioScheduledSourceNode.start() - Web APIs
offset optional a floating-point
number indicating the offset, in seconds, into the audio buffer where playback should begin.
... duration optional a floating-point
number indicating the duration, in seconds, to be played.
...the times are calculated by adding the desired
number of seconds to the context's current time stamp returned by audiocontext.currenttime.
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.
... syntax var trackcount = audiotracklist.length; value a
number indicating how many audio tracks are included in the audiotracklist.
... example this snippet gets the
number of audio tracks in the first <video> element found in the dom by queryselector().
BatteryManager - Web APIs
batterymanager.chargingtime read only a
number representing the remaining time in seconds until the battery is fully charged, or 0 if the battery is already fully charged.
... batterymanager.dischargingtime read only a
number representing the remaining time in seconds until the battery is completely discharged and the system will suspend.
... batterymanager.level read only a
number representing the system's battery charge level scaled to a value between 0.0 and 1.0.
CSSPrimitiveValue - Web APIs
there is one exception for color percentage values: since a color percentage value is relative to the range 0-255, a color percentage value can be converted to a
number (see also the rgbcolor interface).
... css_dimension the value is a <
number> with an unknown dimension.
... css_
number the value is a simple <
number>.
CSSStyleDeclaration.length - Web APIs
the read-only property returns an integer that represents the
number of style declarations in this css declaration block.
... syntax var num = styles.length; value an integer that provides the
number of styles explictly set on the parent of the instance.
... example the following gets the
number of explicitly 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.
Compositing example - Web APIs
this sample program demonstrates a
number of compositing operations.
... window.onload = function() { // lum in srgb var lum = { r: 0.33, g: 0.33, b: 0.33 }; // resize canvas canvas1.width = width; canvas1.height = height; canvas2.width = width; canvas2.height = height; lightmix() colorsphere(); runcomposite(); return; }; and this code, runcomposite(), handles the bulk of the work, relying on a
number of utility functions to do the hard parts.
... ctx.fillrect(0, height/2 - 20, width/2, 20); ctx.fillstyle = "#fff"; ctx.font = "14px arial"; ctx.filltext('new content', 5, height/2 - 5); ctx.restore(); dd.appendchild(canvastodrawon); dd.appendchild(canvastodrawfrom); dd.appendchild(canvastodrawresult); dl.appendchild(dd); } }; utility functions the program relies on a
number of utility functions.
Transformations - Web APIs
rotate(angle) rotates the canvas clockwise around the current origin by the angle
number of radians.
...both parameters are real
numbers.
... using negative
numbers you can do axis mirroring (for example using translate(0,canvas.height); scale(1,-1); you will have the well-known cartesian coordinate system, with the origin in the bottom left corner).
ChannelMergerNode - Web APIs
if channelmergernode has one single output, but as many inputs as there are channels to merge; the
number of inputs is defined as a parameter of its constructor and the call to audiocontext.createchannelmerger.
...
number of inputs variable; default to 6.
...
number of outputs 1 channel count mode "max" channel count 2 (not used in the default count mode) channel interpretation "speakers" constructor channelmergernode() creates a new channelmergernode object instance.
console - Web APIs
console.count() log the
number of times this line has been called with the given label.
...
number formatting is supported, for example console.log("foo %.2d", 1.1) will output the
number as two significant figures with a leading 0: foo 01 %s outputs a string.
...formatting is supported, for example console.log("foo %.2f", 1.1) will output the
number to 2 decimal places: foo 1.10 note: precision formatting doesn't work in chrome each of these pulls the next argument after the format string off the parameter list.
DOMHighResTimeStamp - Web APIs
the time, given in milliseconds, should be accurate to 5 µs (microseconds), with the fractional part of the
number indicating fractions of a millisecond.
... value the value of a domhighrestimestamp is a double-precision floating-point
number which describes the
number of milliseconds (accurate to within 5 microseconds if the device supports it) elapsed between two points in time.
...*/ let elapsedtime = performance.now() - starttime; upon completion, the value of elapsedtime is the
number of milliseconds that have elapsed since you recorded the starting time in line 1.
DOMMatrixReadOnly.translate() - Web APIs
dommatrix.translate(translatex, translatey[, translatez]) parameters translatex a
number representing the abscissa (x-coordinate) of the translating vector.
... translatey a
number representing the ordinate (y-coordinate) of the translating vector.
... translatez optional a
number representing the z component of the translating vector.
DOMMatrixReadOnly - Web APIs
dommatrixreadonly.rotate() returns a new dommatrix created by rotating the source matrix around each of its axes by the specified
number of degrees.
...the elements are stored into the array as single-precision floating-point
numbers in column-major (colexographical access, or "colex") order.
...the elements are stored into the array as double-precision floating-point
numbers in column-major (colexographical access access or "colex") order.
DataTransfer.mozItemCount - Web APIs
the datatransfer.mozitemcount property returns the
number of items being dragged.
... this can be used, for example, to get the
number of files being dragged.
... syntax datatransfer.mozitemcount; return value a
number representing the
number of items being dragged.
DeviceOrientationEvent.DeviceOrientationEvent() - Web APIs
options optional options are as follows: alpha: a
number representing the motion of the device around the z axis, express in degrees with values ranging from 0 to 360.
... beta: a
number representing the motion of the device around the x axis, express in degrees with values ranging from -180 to 180.
... gamma: a
number representing the motion of the device around the y axis, express in degrees with values ranging from -90 to 90.
EffectTiming.iterations - Web APIs
the web animations api dictionary effecttiming's iterations property specifies the
number of times the animation should repeat.
... syntax var timingproperties = { iterations:
numberofiterations }; timingproperties.iterations =
numberofiterations; value a floating-point value specifying the
number of times the animation sequence will play through.
... exceptions typeerror an attempt was made to set the value of this property to a negative
number or nan.
Element.scrollLeft - Web APIs
the element.scrollleft property gets or sets the
number of pixels that an element's content is scrolled from its left edge.
... syntax getting the value // get the
number of pixels scrolled var sleft = element.scrollleft; sleft is an integer representing the
number of pixels that element has been scrolled from the left edge.
... setting the value // set the
number of pixels scrolled element.scrollleft = 10; scrollleft can be specified as any integer value.
EventSource - Web APIs
when not used over http/2, sse suffers from a limitation to the maximum
number of open connections, which can be specially painful when opening various tabs as the limit is per browser and set to a very low
number (6).
...when using http/2, the maximum
number of simultaneous http streams is negotiated between the server and the client (defaults to 100).
... eventsource.readystate read only a
number representing the state of the connection.
Using FormData Objects - Web APIs
creating a formdata object from scratch you can build a formdata object yourself, instantiating it then appending fields to it by calling its append() method, like this: var formdata = new formdata(); formdata.append("username", "groucho"); formdata.append("accountnum", 123456); //
number 123456 is immediately converted to a string "123456" // html file input, chosen by user formdata.append("userfile", fileinputelement.files[0]); // javascript file-like object var content = '<a id="a"><b id="b">hey!</b></a>'; // the body of the new file...
...the
number assigned to the field "accountnum" is immediately converted into a string by the formdata.append() method (the field's value can be a blob, file, or a string: if the value is neither a blob nor a file, the value is converted to a string).
...t(); request.open("post", "submitform.php"); request.send(new formdata(formelement)); you can also append additional data to the formdata object between retrieving it from a form and sending it, like this: var formelement = document.queryselector("form"); var formdata = new formdata(formelement); var request = new xmlhttprequest(); request.open("post", "submitform.php"); formdata.append("serial
number", serial
number++); request.send(formdata); this lets you augment the form's data before sending it along, to include additional information that's not necessarily user-editable.
Using the Geolocation API - Web APIs
const watchid = navigator.geolocation.watchposition((position) => { dosomething(position.coords.latitude, position.coords.longitude); }); the watchposition() method returns an id
number that can be used to uniquely identify the requested position watcher; you use this value in tandem with the clearwatch() method to stop watching the user's location.
... the geolocationcoordinates instance contains a
number of properties, but the two you'll use most commonly are latitude and longitude, which are what you need to draw your position on a map.
... hence many geolocation success callbacks look fairly simple: function success(position) { const latitude = position.coords.latitude; const longitude = position.coords.longitude; // do something with your latitude and longitude } you can however get a
number of other bits of information from a geolocationcoordinates object, including altitude, speed, what direction the device is facing, and an accuracy measure of the altitude, longitude, and latitude data.
HTMLAudioElement - Web APIs
mozcurrentsampleoffset() returns the
number of samples form the beginning of the stream that have been written so far into the audio stream created by calling mozwriteaudio().
... mozsetup() sets up the audio stream to allow writing, given the
number of audio channels (1 or 2) and the sample rate in khz.
... mozwriteaudio() writes a batch of audio frames to the stream at the current offset, returning the
number of bytes actually written to the stream.
HTMLFormElement.length - Web APIs
the htmlformelement.length read-only property returns the
number of controls in the <form> element.
... syntax numcontrols = form.length; value numcontrols is the
number of form controls within the <form>.
... this is the same as the
number of the elements in the htmlformcontrolscollection returned by the elements property.
HTMLOListElement - Web APIs
htmlolistelement.reversed is a boolean value reflecting the reversed and defining if the
numbering is descending, that is its value is true, or ascending (false).
... htmlolistelement.start is a long value reflecting the start and defining the value of the first
number of the first element of the list.
...it can have the following values: '1' meaning that decimal
numbers are used: 1, 2, 3, 4, 5, … 'a' meaning that the lowercase latin alphabet is used: a, b, c, d, e, … 'a' meaning that the uppercase latin alphabet is used: a, b, c, d, e, … 'i' meaning that the lowercase latin numerals are used: i, ii, iii, iv, v, … 'i' meaning that the uppercase latin numerals are used: i, ii, iii, iv, v, … htmlolistelement.compact is a boolean indicating that spacing between list items should be reduced.
HTMLTableCellElement - Web APIs
htmltablecellelement.colspan an unsigned long integer indicating the
number of columns this cell must span; this lets the cell occupy space across multiple columns of the table.
... htmltablecellelement.rowspan an unsigned long integer indicating the
number of rows this cell must span; this lets a cell occupy space across multiple rows of the table.
... htmltablecellelement.width a domstring specifying the
number of pixels wide the cell should be drawn, if possible.
IDBCursor.advance() - Web APIs
the advance() method of the idbcursor interface sets the
number of times a cursor should move its position forward.
... syntax cursor.advance(count); parameters count the
number of times to move the cursor forward.
... typeerror the value passed into the count parameter was zero or a negative
number.
IDBObjectStore.count() - Web APIs
the count() method of the idbobjectstore interface returns an idbrequest object, and, in a separate thread, returns the total
number of records that match the provided key or idbkeyrange.
... if no arguments are provided, it returns the total
number of records in the store.
... example in this simple fragment we create a transaction, retrieve an object store, then count the
number of records in the store using count() — when the success handler fires, we log the count value (an integer) to the console.
IDBObjectStore - Web APIs
idbobjectstore.count() returns an idbrequest object, and, in a separate thread, returns the total
number of records that match the provided key or idbkeyrange.
... if no arguments are provided, it returns the total
number of records in the store.
... db = dbopenrequest.result; }; // this event handles the event whereby a new version of // the database needs to be created either one has not // been created before, or a new version
number has been // submitted via the window.indexeddb.open line above dbopenrequest.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); // define what data items t...
IDBOpenDBRequest.onupgradeneeded - Web APIs
the onupgradeneeded property of the idbopendbrequest interface is the event handler for the upgradeneeded event, triggered when a database of a bigger version
number than the existing stored database is loaded.
...}; example in the following example you can see the onupgradeneeded handler being used to update the database structure if a database with a higher version
number is loaded.
...either one has not been created // before, or a new version
number has been submitted via the // window.indexeddb.open line above.
IDBOpenDBRequest - Web APIs
upgradeneeded fired when an attempt was made to open a database with a version
number higher than its current version.
... example in the following example you can see the onupgradeneeded handler being used to update the database structure if a database with a higher version
number is loaded.
...this is used a lot below db = dbopenrequest.result; // run the displaydata() function to populate the task // listwith all the to-do list data already in the idb displaydata(); }; // this event handles the event whereby a new version of // the database needs to be created either one has not // been created before, or a new version
number has been // submitted via the window.indexeddb.open line above // it is only implemented in recent browsers dbopenrequest.onupgradeneeded = function(event) { var db = this.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle...
InterventionReportBody - Web APIs
line
number a
number representing the line in the source file in which the intervention occurred, if known, or null otherwise.
... column
number a
number representing the column in the source file in which the intervention occurred, if known, or null otherwise.
... examples let options = { types: ['intervention'], buffered: true } let observer = new reportingobserver(function(reports, observer) { let firstreport = reports[0]; console.log(firstreport.type); // intervention console.log(firstreport.body.id); console.log(firstreport.body.message); console.log(firstreport.body.sourcefile); console.log(firstreport.body.line
number); console.log(firstreport.body.column
number); }, options); specifications specification status comment reporting apithe definition of 'interventionreportbody' in that specification.
MediaRecorder.start() - Web APIs
you can record the entire duration of the media into a single blob (or until you call requestdata()), or you can specify the
number of milliseconds to record at a time.
... syntax mediarecorder.start(timeslice) parameters timeslice optional the
number of milliseconds to record into each blob.
... invalidmodificationerror the
number of tracks on the stream being recorded has changed.
Using the Media Capabilities API - Web APIs
the bitrate is the
number of bits used to encode one second of video.
... the framerate is the
number of frames which are played per second of time when playing the video.
... const videoconfiguration = { type: "file", video: { contenttype: "video/webm;codecs=vp8", width: 800, height: 600, bitrate: 10000, framerate: 15 } }; had we been querying the decodability of an audio file, we would create an audio configuration including the
number of channels and sample rate, leaving out the properties that apply only to video—namely, the dimensions and the frame rate: const audioconfiguration = { type: "file", audio: { contenttype: "audio/ogg", channels: 2, bitrate: 132700, samplerate: 5200 } }; had we been testing encoding capabilities, we would have created a mediaencodingconfiguration, which requires the type of media being tested — either record (for recording media, i.e.
MouseEvent.buttons - Web APIs
each button that can be pressed is represented by a given
number (see below).
... if more than one button is pressed, the button values are added together to produce a new
number.
... syntax var buttonspressed = instanceofmouseevent.buttons return value a
number representing one or more buttons.
MouseEvent.pageX - Web APIs
syntax var pagex = mouseevent.pagex; value a floating-point
number of pixels from the left edge of the document at which the mouse was clicked, regardless of any scrolling or viewport positioning that may be in effect.
... this property was originally specified in the touch events specification as a long integer, but was redefined in the cssom view module to be a double-precision floating-point
number to allow for subpixel precision.
... even though numeric types both are represented by
number in javascript, they may be handled differently internally in the browser's code, resulting in potential behavior differences.
NavigatorConcurrentHardware - Web APIs
the
number of logical processor cores is a way to measure the
number of threads which can effectively be run at once without them having to share cpus.
...the browser may, however, choose to reduce the
number in order to represent more accurately the
number of workers that can run at once properties navigatorconcurrenthardware.hardwareconcurrency read only returns the
number of logical processors which may be available to the user agent.
... this value is always at least 1, and will be 1 if the actual
number of logical processors can't be determined.
NodeList - Web APIs
properties nodelist.length the
number of nodes in the nodelist.
...(in this case, the keys are
numbers starting from 0 and the values are nodes.) nodelist.foreach() executes a provided function once per nodelist element, passing the element as an argument to the function.
...(in this case, the keys are
numbers starting from 0.) nodelist.values() returns an iterator allowing code to go through all values (nodes) of the key/value pairs contained in the collection.
OVR_multiview2 - Web APIs
framebuffer_attachment_texture_num_views_ovr
number of views of the framebuffer object attachment.
... max_views_ovr the maximum
number of views.
... most vr headsets have two views, but there are prototypes of headset with ultra-wide fov using 4 views which is currently the maximum
number of views supported by multiview.
OfflineAudioContext.OfflineAudioContext() - Web APIs
syntax var offlineaudioctx = new offlineaudiocontext(
numberofchannels, length, samplerate); var offlineaudioctx = new offlineaudiocontext(options); 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.
... example const offlinectx = new offlineaudiocontext({
numberofchannels: 2, length: 44100 * 40, samplerate: 44100, }); const source = offlinectx.createbuffersource(); // etc...
PayerErrors - Web APIs
the payer details include the payer's name, phone
number, and email address.
...if this property is absent, the paer name is fine phone optional if present, this string is an error message explaining why the payer's phone
number (paymentresponse.payerphone) failed validation.
... this property is absent if the phone
number passed validation.
PaymentAddress.phone - Web APIs
the read-only phone property of the paymentaddress interface returns a string containing the telephone
number of the recipient or contact person.
... syntax var paymentphone = paymentaddress.phone; value a domstring containing the telephone
number for the recipient of the shipment or of the responsible party for payment.
... if no phone
number is available, this value is an empty string.
PaymentAddress - Web APIs
the exact size and content varies by country or location and can include, for example, a street name, house
number, apartment
number, rural delivery route, descriptive instructions, or post office box
number.
... paymentaddress.phone read only a domstring specifying the telephone
number of the recipient or contact person.
...this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like this: { "card
number' : '9999999999999999", "cardholdername' : 'pat straw", "cardsecuritycode" : "999", "expirymonth" : "07", "expiryyear" : "2021", "billingaddress" : { "country" : "gb", // etc.
PaymentCurrencyAmount.value - Web APIs
the contents of this string must be a valid decimal
number; that is, some
number of digits between 0 and 9 with up to one optional decimal point.
... important note: the
number given in this string is always specified using the period (".") as the decimal point, rather than the comma (","), even if the user's locale normally uses the comma.
...this must be a valid decimal
number, with an optional leading minus sign ("-"), then one or more decimal digits 0 through 9, optionally with a decimal point (".") with at least one digit following it to represent fractional units.
Payment Request API - Web APIs
the payment request api is meant to reduce the
number of steps needed to complete a payment online, potentially doing away with checkout forms.
... consistent error handling: the browser can check the validity of card
numbers, and can tell the user if a card has expired (or is about to expire).
... basiccardresponse defines an object structure for payment response details such as the
number/expiry date of the card used to make the payment, and the billing address.
PerformanceResourceTiming - Web APIs
performanceresourcetiming.transfersizeread only a
number representing the size (in octets) of the fetched resource.
... performanceresourcetiming.encodedbodysizeread only a
number representing the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
... performanceresourcetiming.decodedbodysizeread only a
number that is the size (in octets) received from the fetch (http or cache) of the message body, after removing any applied content-codings.
RTCDataChannel.bufferedAmount - Web APIs
the read-only rtcdatachannel property bufferedamount returns the
number of bytes of data currently queued to be sent over the data channel.
... syntax var amount = adatachannel.bufferedamount; value the
number of bytes of data currently queued to be sent over the data channel but have not yet been sent.
... example the snippet below includes a function which changes the contents of a block with the id "buffersize" to a string indicating the
number of bytes currently buffered on an rtcdatachannel.
RTCDataChannel.bufferedAmountLowThreshold - Web APIs
the rtcdatachannel property bufferedamountlowthreshold is used to specify the
number of bytes of buffered outgoing data that is considered "low." the default value is 0.
... when the
number of buffered outgoing bytes, as indicated by the bufferedamount property, falls to or below this value, a bufferedamountlow event is fired.
... syntax var threshold = adatachannel.bufferedamountlowthreshold; adatachannel.bufferedamountlowthreshold = threshold; value the
number of queued outgoing data bytes below which the buffer is considered to be "low." example in this snippet of code, bufferedamountlowthreshold is set to 64kb, and a handler for the bufferedamountlow event is established by setting the rtcdatachannel.onbufferedamountlow property to a function which should send more data into the buffer by calling send().
RTCError - Web APIs
sdpline
number read only if errordetail is sdp-syntax-error, this property is a long integer identifying the line
number of the sdp on which the syntax error occurred.
... datachannel.addeventlistener("error", (event) => { let error = event.error; if (error.errordetail === "sdp-syntax-error") { let errline = error.sdpline
number; let errmessage = error.message; let alertmessage = `a syntax error occurred interpreting line ${errline} of the sdp: ${errmessage}`; showmyalertmessage("data channel error", alertmessage); } else { terminatemyconnection(); } }); if the error is an sdp syntax error—indicated by its errordetail property being sdp-syntax-error—, a message string is constructed to present ...
...the error message and the line
number within the sdp at which the error occurred.
RTCErrorEvent.error - Web APIs
sdpline
number read only if errordetail is sdp-syntax-error, this property is a long integer identifying the line
number of the sdp on which the syntax error occurred.
... datachannel.addeventlistener("error", (event) => { let error = event.error; if (error.errordetail === "sdp-syntax-error") { let errline = error.sdpline
number; let errmessage = error.message; let alertmessage = `a syntax error occurred interpreting line ${errline} of the sdp: ${errmessage}`; showmyalertmessage("data channel error", alertmessage); } else { terminatemyconnection(); } }); if the error is an sdp syntax error—indicated by its errordetail property being sdp-syntax-error—, a message string is constructed to present ...
...the error message and the line
number within the sdp at which the error occurred.
RTCIceCandidate.relatedPort - Web APIs
the rtcicecandidate interface's read-only relatedport property indicates the port
number of reflexive or relay candidates.
... syntax var relport = rtcicecandidate.relatedport; value an unsigned 16-bit value containing the candidate's related port
number, if any.
... here's an sdp attribute line (a-line) describing an ice candidate discovered by the stun server: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 6502 typ srflx raddr 192.168.2.77 rport 32768 generation 0 the remote port, relatedport, is the
number immediately following the "rport" label on the a-line, or 32768.
RTCIceCandidatePairStats.bytesReceived - Web APIs
the rtcicecandidatepairstats property bytesreceived indicates the total
number of payload bytes—that is, bytes which aren't overhead such as headers or padding—that hve been received to date on the connection described by the candidate pair.
... the bytessent property reports the
number of bytes sent so far on the described connection.
... syntax received = rtcicecandidatepairstats.bytesreceived; value an integer value indicating the total
number of bytes received so far on the connection described by this candidate pair.
RTCIceCandidatePairStats.bytesSent - Web APIs
the rtcicecandidatepairstats property bytessent indicates the total
number of payload bytes—that is, bytes which aren't overhead such as headers or padding—that hve been sent so far on the connection described by the candidate pair.
... the bytesreceived property reports the
number of bytes received so far on the described connection.
... syntax sent = rtcicecandidatepairstats.bytessent; value an integer value indicating the total
number of bytes sent so far on the connection described by this candidate pair.
RTCIceCandidatePairStats.packetsReceived - Web APIs
the rtcicecandidatepairstats dictionary's packetsreceived property indicates the total
number of packets of any kind that have been received on the connection described by the pair of candidates.
... the
number of packets sent to date on the connection can be obtained using packetssent.
... syntax packetsreceived = rtcicecandidatepairstats.packetsreceived; value an integer value indicating the total
number of packets, of any kind, which have been received on the connection described by the two candidates comprising this pair.
RTCIceCandidatePairStats.packetsSent - Web APIs
the rtcicecandidatepairstats dictionary's packetssent property indicates the total
number of packets which have been sent on the connection described by the pair of candidates.
... the
number of packets received to date on the connection can be obtained using packetsreceived.
... syntax packetssent = rtcicecandidatepairstats.packetssent; value an integer value indicating the total
number of packets, of any kind, which have been sent on the connection described by the two candidates comprising this pair.
RTCIceCandidatePairStats.requestsReceived - Web APIs
the rtcicecandidatepairstats dictionary's requestsreceived property indicates the total
number of stun connectivity check requests that have been received so far on the connection described by this pairing of candidates.
... syntax requestsreceived = rtcicecandidatepairstats.requestsreceived; value an integer value which specifies the
number of stun connectivity and/or consent requests that have been received to date on the connection described by this pair of ice candidates.
... note: the reported
number of requests includes retransmissions.
RTCIceCandidatePairStats.requestsSent - Web APIs
the rtcicecandidatepairstats dictionary's requestssent property indicates the total
number of stun connectivity check requests that have been sent so far on the connection described by this pair of candidates.
... syntax requestssent = rtcicecandidatepairstats.requestssent; value an integer value which specifies the
number of stun connectivity requests that have been sent to date on the connection described by this pair of ice candidates.
... note: the reported
number of requests does not include retransmissions.
RTCIceCandidatePairStats.retransmissionsReceived - Web APIs
the rtcicecandidatepairstats dictionary's retransmissionsreceived property indicates the total
number of stun connectivity check request retransmissions that have been received so far on the pair of candidates.
... the
number of retransmissions that have been sent on the connection can be found in retransmissionssent.
... syntax retransmissionsreceived = rtcicecandidatepairstats.retransmissionsreceived; value an integer value indicating the total
number of retransmitted stun connectivity check requests have been received on the connection referenced by this candidate pair so far.
RTCIceCandidatePairStats.retransmissionsSent - Web APIs
the rtcicecandidatepairstats dictionary's retransmissionssent property indicates the total
number of stun connectivity check request retransmissions that have been sent so far on the pair of candidates.
... the
number of retransmissions that have been received on the connection can be found in retransmissionsreceived.
... syntax retransmissionssent = rtcicecandidatepairstats.retransmissionssent; value an integer value indicating the total
number of retransmitted stun connectivity check requests have been sent on the connection referenced by this candidate pair so far.
RTCInboundRtpStreamStats.framesDecoded - Web APIs
the framesdecoded property of the rtcinboundrtpstreamstats dictionary indicates the total
number of frames which have been decoded successfully for this media source.
... syntax var framesdecoded = rtcinboundrtpstreamstats.framesdecoded; value an integer value indicating the total
number of video frames which have been decoded for this stream so far.
... this represents the
number of frames that would have been displayed assuming no frames were skipped.
RTCInboundRtpStreamStats.perDscpPacketsReceived - Web APIs
the perdscppacketsreceived property of the rtcinboundrtpstreamstats dictionary is a record comprised of key/value pairs in which each key is a string representation of a differentiated services code point and the value is the
number of packets received for that dcsp.
...each key is the string representation of a single differentiated services code point (dscp)'s id
number.
... note: due to network bleaching and remapping, the
numbers seen on this record are not necessarily going to match the values as they were when the data was sent.
RTCInboundRtpStreamStats.qpSum - Web APIs
in general, the higher this
number is, the more heavily compressed the video data is.
...this value takes the place of the range of values, thereby reducing the
number of different values that appear in the overall data set, making the data more compressible.
...you can, for example, use the value of rtcreceivedrtpstreamstats.framesdecoded if receiving the media or rtcsentrtpstreamstats.framesencoded if sending it to get the
number of frames handled so far, and compute an average from there.
RTCOutboundRtpStreamStats.perDscpPacketsSent - Web APIs
the perdscppacketssent property of the rtcoutboundrtpstreamstats dictionary is a record comprised of key/value pairs in which each key is a string representation of a differentiated services code point and the value is the
number of packets sent for that dcsp.
...each key is the string representation of a single differentiated services code point (dscp)'s id
number.
... note: due to network bleaching and remapping, the
numbers seen on this record are not necessarily going to match the values as they were when the data was sent.
RTCOutboundRtpStreamStats.qpSum - Web APIs
in general, the higher this
number is, the more heavily compressed the video data is.
...this value takes the place of the range of values, thereby reducing the
number of different values that appear in the overall data set, making the data more compressible.
...you can use the value of rtcsentrtpstreamstats.framesencoded to get the
number of frames that have been encoded so far, and compute an average from there.
RTCRtpStreamStats.qpSum - Web APIs
in general, the higher this
number is, the more heavily compressed the video data is.
...this value takes the place of the range of values, thereby reducing the
number of different values that appear in the overall data set, making the data more compressible.
...you can, for example, use the value of rtcreceivedrtpstreamstats.framesdecoded if receiving the media or rtcsentrtpstreamstats.framesencoded if sending it to get the
number of frames handled so far, and compute an average from there.
Range.endOffset - Web APIs
the range.endoffset read-only property returns a
number representing where in the range.endcontainer the range ends.
... if the endcontainer is a node of type text, comment, or cdatasection, then the offset is the
number of characters from the start of the endcontainer to the boundary point of the range.
... for other node types, the endoffset is the
number of child nodes between the start of the endcontainer and the boundary point of the range.
Range.startOffset - Web APIs
the range.startoffset read-only property returns a
number representing where in the startcontainer the range starts.
... if the startcontainer is a node of type text, comment, or cdatasection, then the offset is the
number of characters from the start of the startcontainer to the boundary point of the range.
... for other node types, the startoffset is the
number of child nodes between the start of the startcontainer and the boundary point of the range.
SVGAngle - Web APIs
the svgangle interface is used to represent a value that can be an <angle> or <
number> value.
... svg_angletype_unspecified a unitless <
number> interpreted as a value in degrees.
... methods newvaluespecifiedunits reset the value as a
number with an associated unittype, thereby replacing the values for all of the attributes on the object.
SVGFEPointLightElement - Web APIs
svgfepointlightelement.x read only an svganimated
number corresponding to the x attribute of the given element.
... svgfepointlightelement.y read only an svganimated
number corresponding to the y attribute of the given element.
... svgfepointlightelement.z read only an svganimated
number corresponding to the z attribute of the given element.
SVGFETurbulenceElement - Web APIs
svgfeturbulenceelement.basefrequencyx read only an svganimated
number corresponding to the x component of the basefrequency attribute of the given element.
... svgfeturbulenceelement.basefrequencyy read only an svganimated
number corresponding to the y component of the basefrequency attribute of the given element.
... svgfeturbulenceelement.seed read only an svganimated
number corresponding to the seed attribute of the given element.
SVGLength - Web APIs
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" onload="start();" version="1.1" width="200" x...
... svg_lengthtype_
number 1 no unit type was provided (i.e., a unitless value was specified), which indicates a value in user units.
... methods name & arguments return description newvaluespecifiedunits(in unsigned short unittype, in float valueinspecifiedunits) void reset the value as a
number with an associated unittype, thereby replacing the values for all of the attributes on the object.
ScriptProcessorNode - Web APIs
small
numbers lower the latency, but large
number may be necessary to avoid audio breakup and glitches.
...
number of inputs 1
number of outputs 1 channel count mode "max" channel count 2 (not used in the default count mode) channel interpretation "speakers" properties inherits properties from its parent, audionode.
...ocess = function(audioprocessingevent) { // the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var 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 outputdat...
ScrollToOptions - Web APIs
a scrolltooptions dictionary can be provided as a parameter for the following methods: window.scroll() window.scrollby() window.scrollto() element.scroll() element.scrollby() element.scrollto() properties scrolltooptions.top specifies the
number of pixels along the y axis to scroll the window or element.
... scrolltooptions.left specifies the
number of pixels along the x axis to scroll the window or element.
... examples in our scrolltooptions example (see it live) we include a form that allows the user to enter three values — two
numbers representing the left and top properties (i.e.
SecurityPolicyViolationEvent - Web APIs
securitypolicyviolationevent.column
numberread only the column
number in the document or worker at which the violation occurred.
... securitypolicyviolationevent.line
numberread only the line
number in the document or worker at which the violation occurred.
... securitypolicyviolationevent.statuscoderead only a
number representing the http status code of the document or worker in which the violation occurred.
Selection.anchorOffset - Web APIs
the selection.anchoroffset read-only property returns the
number of characters that the selection's anchor is offset within the selection.anchornode.
... this
number is zero-based.
... syntax
number = sel.anchoroffset specifications specification status comment selection apithe definition of 'selection.anchoroffset' in that specification.
Storage.length - Web APIs
the length read-only property of the storage interface returns the
number of data items stored in a given storage object.
... syntax length = storage.length; return value the
number of items stored in the storage object.
... example the following function adds three data items to the local storage for the current domain, then returns the
number of items in the storage: function populatestorage() { localstorage.setitem('bgcolor', 'yellow'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'cats.png'); return localstorage.length; // should return 3 } note: for a real world example, see our web storage demo.
SubtleCrypto - Web APIs
the subtlecrypto interface of the web crypto api provides a
number of low-level cryptographic functions.
... warning: this api provides a
number of low-level cryptographic primitives.
...you can choose one of a
number of export formats.
TextEncoder.prototype.encodeInto() - Web APIs
return value a textencoderencodeintoresult dictionary, which contains two members: read the
number of utf-16 units of code from the source that has been converted over to utf-8.
... written the
number of bytes modified in the destination uint8array.
...codeinto; if (!globaltextencoder) { window["textencoder"] = textencoder; } else if (!(globaltextencoderprototype = globaltextencoder["prototype"])["encodeinto"]) { globaltextencoderinstance = new globaltextencoder; globaltextencoderprototype["encodeinto"] = function(string, u8arr) { // unfortunately, there's no way i can think of to quickly extract the
number of bits written and the
number of bytes read and such var strlen = string.length|0, u8len = u8arr.length|0; if (strlen < ((u8len >> 1) + 3|0)) { // in most circumstances, this means its safe.
TextRange - Web APIs
textrange.move() collapses the range and moves the blank range by a specified
number of units.
... textrange.moveend() moves the end of the range by a specified
number of units.
... textrange.movestart() moves the start of the range by a specified
number of units.
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.
... syntax var trackcount = texttracklist.length; value a
number indicating how many text tracks are included in the texttracklist.
... example this snippet gets the
number of text tracks in the first media element found in the dom by queryselector().
URL.port - Web APIs
the port property of the url interface is a usvstring containing the port
number of the url.
... if the url does not contain an explicit port
number, it will be set to ''.
... syntax const port
number = url.port url.port = newport
number value a usvstring.
USBInterface - Web APIs
constructor usbinterface.usbinterface creates a new usbinterface object which will be populated with information about the interface on the provided usbconfiguration with the given interface
number.
... properties usbinterface.interface
numberread only returns the interface
number of this interface.
... this is equal to the binterface
number field of the interface descriptor defining this interface.
VTTCue - Web APIs
vttcue.snaptolines returns true if the vttcue.line attribute is an integer
number of lines or a percentage of the video size.
...this can be the string auto or a
number whose interpretation depends on the value of vttcue.snaptolines.
...this can be the string auto or a
number representing the percentage of the vttcue.region, or the video size if vttcue.region is null.
validityState.badInput - Web APIs
for example, if you have a
number input element whose content is a string.
... note: while this is unsupported in internet explorer, any non-numeric value will be dismissed from the field if it is a
number input.
... example <input type="
number" id="age"> var input = document.getelementbyid("age"); if (input.validity.badinput) { console.log("bad input detected…"); } else { console.log("content of input ok."); } specifications specification status comment html living standardthe definition of 'validitystate.badinput' in that specification.
VideoConfiguration - Web APIs
bitrate: the
number of bits used to encode one second of the video file.
... framerate: the
number of frames making up one second of video playback.
... examples // create media configuration to be tested const mediaconfig = { type : 'file', // see mediadecodingconfiguration and mediaencodingconfiguration video : { contenttype : "video/webm;codecs=vp8", // valid content type width : 800, // width of the video height : 600, // height of the video bitrate : 10000, //
number of bits used to encode 1s of video framerate : 30 //
number of frames making up that 1s.
VideoPlaybackQuality.totalVideoFrames - Web APIs
the videoplaybackquality interface's totalvideoframes read-only property returns the total
number of video frames that have been displayed or dropped since the media was loaded.
... syntax value = videoplaybackquality.totalvideoframes; value the total
number of frames that the <video> element has displayed or dropped since the media was loaded into it.
... essentially, this is the
number of frames the element would have presented had no problems occurred.
VideoPlaybackQuality - Web APIs
droppedvideoframes read only an unsigned long giving the
number of video frames dropped since the creation of the associated htmlvideoelement.
... totalvideoframes read only an unsigned long giving the
number of video frames created and dropped since the creation of the associated htmlvideoelement.
... obsolete properties corruptedvideoframes read only an unsigned long giving the
number of video frames corrupted since the creation of the associated htmlvideoelement.
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.
... syntax var trackcount = videotracklist.length; value a
number indicating how many video tracks are included in the videotracklist.
... example this snippet gets the
number of video tracks in the first <video> element found in the dom by queryselector().
WaveShaperNode - Web APIs
number of inputs 1
number of outputs 1 channel count mode "max" channel count 2 (not used in the default count mode) channel interpretation "speakers" constructor waveshapernode() creates a new instance of an waveshapernode object.
... waveshapernode.curve is a float32array of
numbers describing the distortion to apply.
... function makedistortioncurve(amount) { var k = typeof amount === '
number' ?
WebGL2RenderingContext - Web APIs
webgl2renderingcontext.renderbufferstoragemultisample() creates and initializes a renderbuffer object's data store and allows specifying the
number of samples to be used.
... programs and shaders webgl2renderingcontext.getfragdatalocation() returns the binding of color
numbers to user-defined varying out variables.
... webgl2renderingcontext.getuniformindices() retrieves the indices of a
number of uniforms within a webglprogram.
WebGLRenderingContext.enableVertexAttribArray() - Web APIs
attributes are referenced by an index
number into the list of attributes maintained by the gpu.
... syntax void gl.enablevertexattribarray(index); parameters index a gluint specifying the index
number that uniquely identifies the vertex attribute to enable.
... webglrenderingcontext.invalid_value the specified index is invalid; that is, it's greater than or equal to the maximum
number of entries permitted in the context's vertex attribute list, as indicated by the value of webglrenderingcontext.max_vertex_attribs.
WebGLRenderingContext.getParameter() - Web APIs
ext.max_color_attachments_webgl glint webgl_draw_buffers the maximum
number of framebuffer color attachment points.
... ext.max_draw_buffers_webgl glint webgl_draw_buffers the maximum
number of draw buffers.
... ext.max_views_ovr glint ovr_multiview2 maximum
number of views.
WebGLRenderingContext.uniform[1234][fi][v]() - Web APIs
possible types: a floating point
number for floating point values (methods with "f").
... a sequence of floating point
numbers (for example a float32array or an array of
numbers) for floating point vector methods (methods with "fv").
... an integer
number for integer values (methods with "i").
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
this was due to a small
number of issues with the api and some potential race conditions that needed to be prevented.
...it could be as simple as assigning the polite role to the first peer to connect to the signaling server, or you could do something more elaborate like having the peers exchange random
numbers and assigning the polite role to the winner.
...ror and needed to restart negotiation, you might have done something like this: pc.onnegotiationneeded = async options => { await pc.setlocaldescription(await pc.createoffer(options)); signaler.send({ description: pc.localdescription }); }; pc.oniceconnectionstatechange = () => { if (pc.iceconnectionstate === "failed") { pc.onnegotiationneeded({ icerestart: true }); } }; this has a
number of reliability issues and outright bugs (such as failing if the iceconnectionstatechange event fires when the signaling state isn't stable), but there was no way you could actually request an ice restart other than by creating and sending an offer with the icerestart option set to true.
Geometry and reference spaces in WebXR - Web APIs
since the value is a floating-point
number, it may be accurate to well better than the millisecond level, depending on the platform and hardware.
...since an object is represented by some
number of polygons made up of a
number of points in space, applying the same transform to every point that makes up the object will apply that same transform to the entire object overall.
... defining spatial relationships with reference spaces there are a
number of commonly used ways to reference the positions and orientations of objects relative to their environment, as well as to constrain the environment itself.
Inputs and input sources - Web APIs
motion-sensing controllers, which use accelerometers, magnetometers, and other sensors for motion tracking and targeting and may additionally include any
number of buttons, joysticks, thumbpads, touchpads, force sensors, and so on to provide additional input sources for both targeting and selection.
... there are a
number of examples showing how to handle select events throughout the documentation, such as in the section on targeting and the targeting ray elsewhere in this article.
...this may include the same buttons that trigger the standard xrinputsource actions, but may include any
number of additional buttons and controls.
Lighting a WebXR setting - Web APIs
security and privacy concerns there are a
number of potential security issues involved with collecting all of this data in order to generate and apply lighting to your virtual objects using real-world data.
...but browsers are required to take a
number of steps to make it difficult to physically locate the user without their consent.
... another scenario in which lighting estimation can be used to obtain information about the user without permission: if the light sensor is close enough to the user's display to detect lighting changes caused by the contents of the display, an algorithm could be used to determine whether or not the user is watching a particular video—or even to potentially identify which of a
number of videos the user is watching.
WebXR performance guide - Web APIs
this section will combine information from https://github.com/immersive-web/webxr/blob/master/explainer.md#controlling-depth-precision and https://github.com/immersive-web/webxr/blob/master/explainer.md#preventing-the-compositor-from-using-the-depth-buffer optimizing memory use when using libraries that perform things such as matrix mathematics, you typically have a
number of working variables through which various vectors, matrices, and quaternions pass over time.
... while an individual vector or matrix doesn't occupy an inordinate amount of memory, the sheer
number of vectors and matrices and other structures that are used to build each frame of a 3d scene means the memory management becomes a problem eventually if you keep allocating and de-allocating memory objects.
...but it's inefficient, because it allocates as local variables a
number of things, including at least two matrices, an array of vertices, and more.
Migrating from webkitAudioContext - Web APIs
for example, if we have code that looks like this: var gainnode = context.creategain(); gainnode.gain.settargetvalueattime(0.0, 10.0, 1.0); you can rename the method, and be compliant with the standard, like so: var gainnode = context.creategain(); gainnode.gain.settargetattime(0.0, 10.0, 1.0); enumerated values that changed the original webkitaudiocontext api used c-style
number based enumerated values in the api.
... if you need to count the
number of playing source nodes, you can maintain the count by handling the ended event on the source nodes, as shown above.
... startsource(src0, 0); startsource(src1, 0); // some time later, query the
number of sources...
Web Audio API - Web APIs
web audio api interfaces the web audio api has a
number of interfaces and associated events, which we have split up into nine categories of functionality.
...in this article, we'll share a
number of best practices — guidelines, tips, and tricks for working with the web audio api.web audio spatialization basicshopefully, this article has given you an insight into how web audio spatialization works, and what each of the pannernode properties do (there are quite a few of them).
... examples you can find a
number of examples at our webaudio-example repo on github.
Web Authentication API - Web APIs
in their most basic forms, both create() and get() receive a very large random
number called a challenge from the server and they return the challenge signed by the private key back to the server.
...smith" }, pubkeycredparams: [{ type: "public-key", alg: -7 }], attestation: "direct", timeout: 60000, challenge: new uint8array([ // must be a cryptographically random
number sent from a server 0x8c, 0x0a, 0x26, 0xff, 0x22, 0x91, 0xc1, 0xe9, 0xb9, 0x4e, 0x2e, 0x17, 0x1a, 0x98, 0x6a, 0x73, 0x71, 0x9d, 0x43, 0x48, 0xd5, 0xa7, 0x6a, 0x15, 0x7e, 0x38, 0x94, 0x52, 0x77, 0x97, 0x0f, 0xef ]).buffer } }; // sample arguments for login var getcredentialdefaultargs = { publickey: { timeout: 60000, // allowcredentials: [new...
...credential] // see below challenge: new uint8array([ // must be a cryptographically random
number sent from a server 0x79, 0x50, 0x68, 0x71, 0xda, 0xee, 0xee, 0xb9, 0x94, 0xc3, 0xc2, 0x15, 0x67, 0x65, 0x26, 0x22, 0xe3, 0xf3, 0xab, 0x3b, 0x78, 0x2e, 0xd5, 0x6f, 0x81, 0x26, 0xe2, 0xa6, 0x01, 0x7d, 0x74, 0x50 ]).buffer }, }; // register / create a new credential navigator.credentials.create(createcredentialdefaultargs) .then((cred) => { console.log("new credential", cred); // normally the credential ids available for an account would come from a server // but we can just copy them from above...
Window.requestAnimationFrame() - Web APIs
the
number of callbacks is usually 60 times per second, but will generally match the display refresh rate in most web browsers as per w3c recommendation.
... the callback method is passed a single argument, a domhighrestimestamp, which indicates the current time (based on the
number of milliseconds since time origin).
...this timestamp is a decimal
number, in milliseconds, but with a minimal precision of 1ms (1000 µs).
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
reasons for delays longer than specified there are a
number of reasons why a timeout may take longer to fire than anticipated.
... timeouts throttled to ≥ 4ms in modern browsers, settimeout()/setinterval() calls are throttled to a minimum of once every 4 ms when successive calls are triggered due to callback nesting (where the nesting level is at least a certain depth), or after certain
number of successive intervals.
...these resolve a
number of issues with apps which play note-based music not being able to time or synchronize the music properly when the tab is in the background.
Using XMLHttpRequest - Web APIs
*/ however, more modern techniques are available, since the responsetype attribute now supports a
number of additional content types, which makes sending and receiving binary data much easier.
... the progress event handler, specified by the updateprogress() function in this example, receives the total
number of bytes to transfer as well as the
number of bytes transferred so far in the event's total and loaded fields.
...formdata objects can be utilized in a
number of ways with an xmlhttprequest.
XPathResult.snapshotLength - Web APIs
the read-only snapshotlength property of the xpathresult interface represents the
number of nodes in the result snapshot.
... syntax var snapshotlength = result.snapshotlength; return value an integer value representing the
number of nodes in the result snapshot.
... html <div>xpath example</div> <div>
number of matched nodes: <output></output></div> javascript var xpath = "//div"; var result = document.evaluate(xpath, document, null, xpathresult.ordered_node_snapshot_type, null); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.snapshotlength' in that specification.
Web APIs
when writing code for the web, there are a large
number of web apis available.
... response rsahashedimportparams rsahashedkeygenparams rsaoaepparams rsapssparams s svgaelement svgaltglyphdefelement svgaltglyphelement svgaltglyphitemelement svgangle svganimatecolorelement svganimateelement svganimatemotionelement svganimatetransformelement svganimatedangle svganimatedboolean svganimatedenumeration svganimatedinteger svganimatedlength svganimatedlengthlist svganimated
number svganimated
numberlist svganimatedpoints svganimatedpreserveaspectratio svganimatedrect svganimatedstring svganimatedtransformlist svganimationelement svgcircleelement svgclippathelement svgcolorprofileelement svgcomponenttransferfunctionelement svgcursorelement svgdefselement svgdescelement svgelement svgellipseelement svgevent svgexternalresourcesrequired svgfeblendelement svgfecolormatrixel...
...enameelement svgfontfacesrcelement svgfontfaceurielement svgforeignobjectelement svggelement svggeometryelement svgglyphelement svgglyphrefelement svggradientelement svggraphicselement svghkernelement svgimageelement svglength svglengthlist svglineelement svglineargradientelement svgmpathelement svgmaskelement svgmatrix svgmeshelement svgmetadataelement svgmissingglyphelement svg
number svg
numberlist svgpathelement svgpatternelement svgpoint svgpolygonelement svgpolylineelement svgpreserveaspectratio svgradialgradientelement svgrect svgrectelement svgrenderingintent svgsvgelement svgscriptelement svgsetelement svgsolidcolorelement svgstopelement svgstringlist svgstylable svgstyleelement svgswitchelement svgsymbolelement svgtrefelement svgtspanelement svgtests svgtextconten...
ARIA annotations - Accessibility
associating annotated elements with their details there are a
number of different ways in which you can associate ui features with text labels or descriptions for accessibility purposes.
...as an example, let’s say you have a poll/voting ui widget that shows
numbers of votes, but you want to summarize the purpose of the widget in a clear description because the ui does not make it clear: <section aria-description="choose your favourite fruit — the fruit with the highest
number of votes will be added to the lunch options next week."> <p>pick your favourite fruit:</p> <form> <ul> <li><label>apple: <input type="radio" name="fruit" value="apple...
...i><label>orange: <input type="radio" name="fruit" value="orange"></label></li> <li><label>banana: <input type="radio" name="fruit" value="banana"></label></li> </ul> </form> </section> if the descriptive text does appear in the ui, you can link the description to the widget using aria-describedby, like so: <p id="fruit-desc">choose your favourite fruit — the fruit with the highest
number of votes will be added to the lunch options next week.</p> <section aria-describedby="fruit-desc"> <form> <ul> <li><label>apple: <input type="radio" name="fruit" value="apple"></label></li> <li><label>orange: <input type="radio" name="fruit" value="orange"></label></li> <li><label>banana: <input type="radio" name="fruit" value="banana"></label></li> </ul> </form> </...
ARIA: tab role - Accessibility
some assistive technology will provide a count of the
number of tab role elements inside a tablist, and inform users of which tab they currently have targeted.
...if the counter is greater than the
number of tab elements we have, we circle back to the first tab by setting that counter to 0.
... if the left arrow is being pressed, we decrease our tab focus counter by one, and if it is then less than 0, we set it
number of tab elements minus one (to get to the last element).
-webkit-line-clamp - CSS: Cascading Style Sheets
the -webkit-line-clamp css property allows limiting of the contents of a block container to the specified
number of lines.
... in most cases you will also want to set overflow to hidden, otherwise the contents won't be clipped but an ellipsis will still be shown after the specified
number of lines.
... <integer> this value specifies the
number of lines after which the content will be clamped.
-webkit-device-pixel-ratio - CSS: Cascading Style Sheets
syntax the -webkit-device-pixel-ratio feature is specified as a <
number> value.
... values <
number> the
number of device pixels used to represent each css px.
... although the value is a <
number>, and thus doesn't syntactically allow units, its implicit unit is dppx.
@media - CSS: Cascading Style Sheets
aspect-ratio width-to-height aspect ratio of the viewport color
number of bits per color component of the output device, or zero if the device isn't color color-gamut approximate range of colors that are supported by the user agent and output device added in media queries level 4.
... color-index
number of entries in the output device's color lookup table, or zero if the device does not use such a table device-aspect-ratio width-to-height aspect ratio of the output device deprecated in media queries level 4.
...<mf-value>where <mf-name> = <ident><mf-value> = <
number> | <dimension> | <ident> | <ratio> examples testing for print and screen media types @media print { body { font-size: 10pt; } } @media screen { body { font-size: 13px; } } @media screen, print { body { line-height: 1.2; } } @media only screen and (min-width: 320px) and (max-width: 480px) and (resolution: 150dpi) { body { line-height: 1.4; } } introduced in media queries le...
max-zoom - CSS: Cascading Style Sheets
syntax /* keyword value */ max-zoom: auto; /* <
number> values */ max-zoom: 0.8; max-zoom: 2.0; /* <percentage> value */ max-zoom: 150%; values auto the user agent will set the document's upper zoom factor limit.
... <
number> a non-negative
number limiting the maximum value of the zoom factor.
... formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative
number or percentage as specified formal syntax auto | <
number> | <percentage> examples setting max-zoom @viewport { max-zoom: 1.5; } specifications specification status comment css device adaptationthe definition of '"max-zoom" descriptor' in that specification.
min-zoom - CSS: Cascading Style Sheets
syntax /* keyword value */ min-zoom: auto; /* <
number> values */ min-zoom: 0.8; min-zoom: 2.0; /* <percentage> value */ min-zoom: 150%; values auto the user agent will set the document's lower zoom factor limit.
... <
number> a non-negative
number limiting the minimum value of the zoom factor.
... formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative
number or percentage as specified formal syntax auto | <
number> | <percentage> examples setting min zoom factor @viewport { min-zoom: 2.0; } specifications specification status comment css device adaptationthe definition of '"min-zoom" descriptor' in that specification.
zoom - CSS: Cascading Style Sheets
syntax /* keyword value */ zoom: auto; /* <
number> values */ zoom: 0.8; zoom: 2.0; /* <percentage> values */ zoom: 150%; values auto the user agent will set the document's initial zoom factor.
... <
number> a non-negative
number used as the zoom factor.
... formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative
number or percentage as specified formal syntax auto | <
number> | <percentage> examples setting viewport zoom factor @viewport { zoom: 2.0; } specifications specification status comment css device adaptationthe definition of '"zoom" descriptor' in that specification.
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
the history of flexbox as with all css specifications the flexbox specification went through a large
number of changes before it became the candidate recommendation that we have today.
...to create a flex container you would use display: box and there were a
number of box-* properties, which did things that you will recognise from flexbox today.
... note also that internet explorer 11 supports the modern display: flex specification however it has a
number of bugs in the implementation.
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
with the flex layout, if we drag our window wider and smaller, the flexbox does a nice job of adjusting the
number of items in each row according to the available space.
... 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; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> </div> .wrapper { display: grid; grid-template-columns: repeat(auto-fill, 200px); } a flexible
number of tracks this isn’t quite the same as flexbox.
...ground-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> </div> .wrapper { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } we now have the ability to create a grid with a flexible
number of flexible tracks, but see items laid out on the grid aligned by rows and columns at the same time.
Using media queries - CSS: Cascading Style Sheets
syntax a media query is composed of an optional media type and any
number of media feature expressions.
... aspect-ratio width-to-height aspect ratio of the viewport color
number of bits per color component of the output device, or zero if the device isn't color color-gamut approximate range of colors that are supported by the user agent and output device added in media queries level 4.
... color-index
number of entries in the output device's color lookup table, or zero if the device does not use such a table device-aspect-ratio width-to-height aspect ratio of the output device deprecated in media queries level 4.
animation-timing-function - CSS: Cascading Style Sheets
the step timing functions divides the input time into a specified
number of intervals that are equal in length.
... it is defined by a
number of steps and a step position.
... formal definition initial valueeaseapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <timing-function>#where <timing-function> = linear | <cubic-bezier-timing-function> | <step-timing-function>where <cubic-bezier-timing-function> = ease | ease-in | ease-out | ease-in-out | cubic-bezier(<
number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[0,1]>, <
number>, <
number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[0,1]>, <
number>)<step-timing-function> =...
animation - CSS: Cascading Style Sheets
values <single-animation-iteration-count> the
number of times the animation is played.
...te formal syntax <single-animation>#where <single-animation> = <time> | <timing-function> | <time> | <single-animation-iteration-count> | <single-animation-direction> | <single-animation-fill-mode> | <single-animation-play-state> | [ none | <keyframes-name> ]where <timing-function> = linear | <cubic-bezier-timing-function> | <step-timing-function><single-animation-iteration-count> = infinite | <
number><single-animation-direction> = normal | reverse | alternate | alternate-reverse<single-animation-fill-mode> = none | forwards | backwards | both<single-animation-play-state> = running | paused<keyframes-name> = <custom-ident> | <string>where <cubic-bezier-timing-function> = ease | ease-in | ease-out | ease-in-out | cubic-bezier(<
number <a href="/docs/css/value_definition_syntax#brackets" title="b...
...rackets: enclose several entities, combinators, and multipliers to transform them as a single component">[0,1]>, <
number>, <
number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[0,1]>, <
number>)<step-timing-function> = step-start | step-end | steps(<integer>[, <step-position>]?)where <step-position> = jump-start | jump-end | jump-none | jump-both | start | end examples cylon eye <div class="view_port"> <div class="polling_message"> listening for dispatches </div> <div class="cylon_eye"></div> </div> .polling_message { color: white; float: left; margin-right: 2%; } .view_port { background-color: black; height: 25px; width: 100%; overflow: hidden; } ...
<basic-shape> - CSS: Cascading Style Sheets
if both shapes are of type polygon(), both polygons have the same
number of vertices, and use the same <fill-rule>, interpolate between each value in the shape functions.
... if both shapes are of type path(), both paths strings have the same
number and types of path data commands in the same order, interpolate each path data command as real
numbers.
...note that both polygons have the same
number of vertices, which is necessary for this type of animation to work.
border-image-width - CSS: Cascading Style Sheets
syntax /* keyword value */ border-image-width: auto; /* <length> value */ border-image-width: 1rem; /* <percentage> value */ border-image-width: 25%; /* <
number> value */ border-image-width: 3; /* vertical | horizontal */ border-image-width: 2em 3em; /* top | horizontal | bottom */ border-image-width: 5% 15% 10%; /* top | right | bottom | left */ border-image-width: 5% 2em 10% auto; /* global values */ border-image-width: inherit; border-image-width: initial; border-image-width: unset; the border-image-width property may be specified using one, two...
... <
number> the width of the border, specified as a multiple of the corresponding border-width.
...it also applies to ::first-letter.inheritednopercentagesrefer to the width or height of the border image areacomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typeby computed value type formal syntax [ <length-percentage> | <
number> | auto ]{1,4}where <length-percentage> = <length> | <percentage> examples tiling a border image this example creates a border image using the following ".png" file, which is 90 by 90 pixels: thus, each circle in the source image is 30 by 30 pixels.
columns - CSS: Cascading Style Sheets
the columns css shorthand property sets the
number of columns to use when drawing an element's contents, as well as those columns' widths.
... <'column-count'> the ideal
number of columns into which the element's content should be flowed, defined as an <integer> or the keyword auto.
... if neither this value nor the column's width are auto, it merely indicates the maximum allowable
number of columns.
flex-grow - CSS: Cascading Style Sheets
syntax /* <
number> values */ flex-grow: 3; flex-grow: 0.6; /* global values */ flex-grow: inherit; flex-grow: initial; flex-grow: unset; the flex-grow property is specified as a single <
number>.
... values <
number> see <
number>.
... formal definition initial value0applies toflex items, including in-flow pseudo-elementsinheritednocomputed valueas specifiedanimation typea
number formal syntax <
number> examples setting flex item grow factor html <h4>this is a flex-grow</h4> <h5>a,b,c and f are flex-grow:1 .
flex-shrink - CSS: Cascading Style Sheets
syntax /* <
number> values */ flex-shrink: 2; flex-shrink: 0.6; /* global values */ flex-shrink: inherit; flex-shrink: initial; flex-shrink: unset; the flex-shrink property is specified as a single <
number>.
... values <
number> see <
number>.
... formal definition initial value1applies toflex items, including in-flow pseudo-elementsinheritednocomputed valueas specifiedanimation typea
number formal syntax <
number> examples setting flex item shrink factor html <p>the width of content is 500px; the flex-basis of the flex items is 120px.</p> <p>a, b, c have flex-shrink:1 set.
<frequency-percentage> - CSS: Cascading Style Sheets
examples valid percentage values 90% positive percentage +90% positive percentage with leading + -90% negative percentage — not valid for all properties that use percentages invalid percentage values 90 % no space is allowed between the
number and the unit valid frequency values 12hz positive integer 4.3hz non-integer 14khz the unit is case-insensitive, though non-si capitalization is not recommended.
... +0hz zero, with a leading + and a unit -0khz zero, with a leading - and a unit invalid frequency values 12.0 this is a <
number>, not an <frequency>, because it is missing a unit.
... 7 hz no space is allowed between the
number and the unit.
<integer> - CSS: Cascading Style Sheets
the <integer> css data type is a special type of <
number> that represents a whole
number, whether positive or negative.
...the calculation is done as if they were real, floating-point
numbers; the discrete value is obtained using the floor function.
... examples valid integers 12 positive integer (without a leading + sign) +123 positive integer (with a leading + sign) -456 negative integer 0 zero +0 zero, with a leading + -0 zero, with a leading - invalid integers 12.0 this is a <
number>, not an <integer>, though it represents an integer.
mask-border-width - CSS: Cascading Style Sheets
syntax /* keyword value */ mask-border-width: auto; /* <length> value */ mask-border-width: 1rem; /* <percentage> value */ mask-border-width: 25%; /* <
number> value */ mask-border-width: 3; /* vertical | horizontal */ mask-border-width: 2em 3em; /* top | horizontal | bottom */ mask-border-width: 5% 15% 10%; /* top | right | bottom | left */ mask-border-width: 5% 2em 10% auto; /* global values */ mask-border-width: inherit; mask-border-width: initial; mask-border-width: unset; the mask-border-width property may be specified using one, two, three, or four values chosen from the list of values below.
... <
number> the width of the mask border, specified as a multiple of the corresponding border-width.
... formal definition initial valueautoapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednopercentagesrelative to width/height of the mask border image areacomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typediscrete formal syntax [ <length-percentage> | <
number> | auto ]{1,4}where <length-percentage> = <length> | <percentage> examples basic usage this property doesn't appear to be supported anywhere yet.
opacity - CSS: Cascading Style Sheets
syntax values <alpha-value> a <
number> in the range 0.0 to 1.0, inclusive, or a <percentage> in the range 0% to 100%, inclusive, representing the opacity of the channel (that is, the value of its alpha channel).
... any <
number> strictly between 0 and 1 the element is translucent (that is, content behind the element can be seen).
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial value1.0applies toall elementsinheritednocomputed valuethe specified value, clipped in the range [0,1]animation typea
number formal syntax <alpha-value>where <alpha-value> = <
number> | <percentage> examples setting background opacity html <div class="light">you can barely see this.</div> <div class="medium">this is easier to see.</div> <div class="heavy">this is very easy to see.</div> css div { background-color: yellow; } .light { opacity: 0.2; /* barely see the text over the background */ } .medium { opac...
<percentage> - CSS: Cascading Style Sheets
syntax the <percentage> data type consists of a <
number> followed by the percentage sign (%).
...as with all css dimensions, there is no space between the symbol and the
number.
... interpolation when animated, values of the <percentage> data type are interpolated as real, floating-point
numbers.
<ratio> - CSS: Cascading Style Sheets
the first
number represents the width, while the second represents the height.
... in media queries level 4, the <ratio> date type is updated to consist of a strictly positive <
number> followed by a forward slash ('/', unicode u+002f solidus) and a second strictly positive <
number>.
... in addition a single <
number> as a value is allowable.
scale3d() - CSS: Cascading Style Sheets
scale3d(sx, sy, sz) values sx is a <
number> representing the abscissa of the scaling vector.
... sy is a <
number> representing the ordinate of the scaling vector.
... sz is a <
number> representing the z-component of the scaling vector.
transition-timing-function - CSS: Cascading Style Sheets
the step timing functions divides the input time into a specified
number of intervals that are equal in length.
... it is defined by a
number of steps and a step position.
... formal definition initial valueeaseapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <timing-function>#where <timing-function> = linear | <cubic-bezier-timing-function> | <step-timing-function>where <cubic-bezier-timing-function> = ease | ease-in | ease-out | ease-in-out | cubic-bezier(<
number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[0,1]>, <
number>, <
number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[0,1]>, <
number>)<step-timing-function> =...
zoom - CSS: Cascading Style Sheets
/* keyword values */ zoom: normal; zoom: reset; /* <percentage> values */ zoom: 50%; zoom: 200%; /* <
number> values */ zoom: 1.1; zoom: 0.7; /* global values */ zoom: inherit; zoom: initial; zoom: unset; syntax values normal render this element at its normal size.
... <
number> zoom factor.
... formal definition initial valuenormalapplies toall elementsinheritednocomputed valueas specifiedanimation typean integer formal syntax normal | reset | <
number> | <percentage> examples first example html <p class="small">small</p> <p class="normal">normal</p> <p class="big">big</p> css p.small { zoom: 75%; } p.normal { zoom: normal; } p.big { zoom: 2.5; } p { display: inline-block; } p:hover { zoom: reset; } result second example html <div id="a" class="circle"></div> <div id="b" class="circle"></div> <div id="c" class="circle"></div> css div.circle { width: 25px; height: 25px; border-radius: 100%; text-align: center; vertica...
Event reference
upgradeneeded indexeddb an attempt was made to open a database with a version
number higher than its current version.
... dommousescroll mozilla specific the wheel button of a pointing device is rotated (detail attribute is a
number of lines).
... mozmousepixelscroll mozilla specific the wheel button of a pointing device is rotated (detail attribute is a
number of pixels).
Creating a cross-browser video player - Developer guides
setup before dealing with the individual buttons, a
number of initialisation calls are required.
...a
number of variables pointing to html elements are required: var videocontainer = document.getelementbyid('videocontainer'); var video = document.getelementbyid('video'); var videocontrols = document.getelementbyid('video-controls'); as mentioned earlier, the browser's default controls now need to be disabled, and the custom controls need to be displayed: // hide the default controls video.controls =...
... alas it has been implemented in browsers in a
number of weird and wonderful ways which requires a lot of extra code to check for various prefixed versions of attributes and methods so as to call the right one.
Index - Developer guides
2 ajax ajax, dom, json, javascript, references, xmlhttprequest asynchronous javascript and xml, while not a technology in itself, is a term coined in 2005 by jesse james garrett, that describes a "new" approach to using a
number of existing technologies together 3 community ajax if you know of useful mailing lists, newsgroups, forums, or other communities related to ajax, please link to them here.
... 17 event developer guide dom, event, guide, needsupdate, events events refers both to a design pattern used for the asynchronous handling of various incidents which occur in the lifetime of a web page and to the naming, characterization, and use of a large
number of incidents of different types.
...there are a
number of possible scenarios: 39 svg-in-opentype draft, fonts, guide, needscontent the svg-in-opentype work is currently in the hands of the mpeg group.
<a>: The Anchor element - HTML: Hypertext Markup Language
links are not restricted to http-based urls — they can use any url scheme supported by browsers: sections of a page with fragment urls pieces of media files with media fragments telephone
numbers with tel: urls email addresses with mailto: urls while web browsers may not support other url schemes, web sites can with registerprotocolhandler() hreflang hints at the human language of the linked url.
... linking to telephone
numbers <a href="tel:+49.157.0156">+49 157 0156</a> <a href="tel:+1(555)5309">(555) 5309</a> tel: link behavior varies with device capabilities: cellular devices autodial the
number.
... other behaviors include saving the
number to contacts, or sending the
number to another device.
<bgsound>: The Background Sound element (obsolete) - HTML: Hypertext Markup Language
attributes balance this attribute defines a
number between -10,000 and +10,000 that determines how the volume will be divided between the speakers.
... loop this attribute indicates the
number of times a sound is to be played and either has a numeric value or the keyword infinite.
... volume this attribute defines a
number between -10,000 and 0 that determines the loudness of a page's background sound.
<input type="image"> - HTML: Hypertext Markup Language
height a
number specifying the height, in css pixels, at which to draw the image specified by the src attribute.
... width a
number indicating the width at which to draw the image, in css pixels.
... overriding default form behaviors <input type="image"> elements — like regular submit buttons — can accept a
number of attributes that override the default form behavior: formaction html5 the uri of a program that processes the information submitted by the input element; overrides the action attribute of the element's form owner.
<output>: The Output element - HTML: Hypertext Markup Language
examples in the following example, the form provides a slider whose value can range between 0 and 100, and an <input> element into which you can enter a second
number.
... the two
numbers are added together, and the result is displayed in the <output> element each time the value of any of the controls changes.
... <form oninput="result.value=parseint(a.value)+parseint(b.value)"> <input type="range" id="b" name="b" value="50" /> + <input type="
number" id="a" name="a" value="10" /> = <output name="result" for="a b">60</output> </form> accessibility concerns many browsers implement this element as an aria-live region.
<sup>: The Superscript element - HTML: Hypertext Markup Language
representing ordinal
numbers, such as "4th" instead of "fourth." see ordinal
numbers for examples.
... examples exponents exponents, or powers of a
number, are among the most common uses of superscripted text.
...among the most common uses of superior lettering is the presentation of certain abbreviations in french: <p>robert a présenté son rapport à m<sup>lle</sup> bernard.</p> the resulting output: ordinal
numbers ordinal
numbers, such as "fourth" in english or "quinto" in spanish may be abbreviated using numerals and language-specific text rendered in superscript: <p>the ordinal
number "fifth" can be abbreviated in various languages as follows:</p> <ul> <li>english: 5<sup>th</sup></li> <li>french: 5<sup>ème</sup></li> </ul> the output: specifications specification status commen...
<tbody>: The Table Body element - HTML: Hypertext Markup Language
typical values for this include a period (.) when attempting to align
numbers or monetary values.
... charoff this attribute is used to indicate the
number of characters to offset the column data from the alignment characters specified by the char attribute.
... basic example in this relatively simple example, we create a table listing information about a group of students with a <thead> and a <tbody>, with a
number of rows in the body.
MIME types (IANA media types) - HTTP
the internet assigned
numbers authority (iana) is responsible for all official mime types, and you can find the most up-to-date and complete list at their media types page.
... magic
numbers.
...not all file types have magic
numbers, so this is not 100% reliable either.
HTTP caching - HTTP
for example, an isp or your company might have set up a web proxy as part of its local network infrastructure to serve many users so that popular resources are reused a
number of times, reducing network traffic and latency.
...infrequently updated files are named in a specific way: in their url, usually in the filename, a revision (or version)
number is added.
... the revision version added to revved resources doesn't need to be a classical revision string like 1.1.3, or even a monotonously growing suite of
number.
CSP: frame-ancestors - HTTP
only the sources listed below are allowed: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port
number, separated by spaces.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port
number, indicating that all legal ports are valid for the source.
... 'self' refers to the origin from which the protected document is being served, including the same url scheme and port
number.
Groups and ranges - JavaScript
for example, to extract the united states area code from a phone
number, we could use /\((?<area>\d\d\d)\)/.
... the resulting
number would appear under matches.groups.area.
... examples counting vowels var aliceexcerpt = "there was a long silence after this, and alice could only hear whispers now and then."; var regexpvowels = /[aeiouy]/g; console.log("
number of vowels:", aliceexcerpt.match(regexpvowels).length); //
number of vowels: 25 using groups let personlist = `first_name: john, last_name: doe first_name: jane, last_name: smith`; let regexpnames = /first_name: (\w+), last_name: (\w+)/mg; let match = regexpnames.exec(personlist); do { console.log(`hello ${match[1]} ${match[2]}`); } while((match = regexpnames.exec(personlist)) !== null); u...
Unicode property escapes - JavaScript
the value decimal_
number for the general_category property may be written nd, digit, or decimal_
number).
... they can be used to match letters,
numbers, symbols, punctuations, spaces, etc.
... unicode property escapes categories encompass much more characters and \p{letter} or \p{
number} will work for any script.
Deprecated and obsolete features - JavaScript
object property description __count__ returns the
number of enumerable properties directly on a user-defined object.
... function property description arity
number of formal arguments.
...
number number.tointeger() parallelarray parallelarray statements for each...in is deprecated.
TypeError: can't assign to property "x" on "y": not an object - JavaScript
the javascript strict mode exception "can't assign to property" occurs when attempting to create a property on primitive value such as a symbol, a string, a
number or a boolean.
... in strict_mode, a typeerror is raised when attempting to create a property on primitive value such as a symbol, a string, a
number or a boolean.
... the problem might be that an unexpected value is flowing at an unexpected place, or that an object variant of a string or a
number is expected.
SyntaxError: identifier starts immediately after numeric literal - JavaScript
message syntaxerror: unexpected identifier after numeric literal (edge) syntaxerror: identifier starts immediately after numeric literal (firefox) syntaxerror: unexpected
number (chrome) error type syntaxerror what went wrong?
... examples variable names starting with numeric literals variable names can't start with
numbers in javascript.
... the following fails: var 1life = 'foo'; // syntaxerror: identifier starts immediately after numeric literal var foo = 1life; // syntaxerror: identifier starts immediately after numeric literal alert(1.foo); // syntaxerror: identifier starts immediately after numeric literal you will need to rename your variable to avoid the leading
number.
RangeError: repeat count must be non-negative - JavaScript
the javascript exception "repeat count must be non-negative" occurs when the string.prototype.repeat() method is used with a count argument that is a negative
number.
...it has a count parameter indicating the
number of times to repeat the string.
... it must be between 0 and less than positive infinity and cannot be a negative
number.
TypeError: cannot use 'in' operator to search for 'x' in 'y' - JavaScript
the javascript exception "right-hand side of 'in' should be an object" occurs when the in operator was used to search in strings, or in
numbers, or other primitive types.
...you can't search in strings, or in
numbers, or other primitive types.
...the in operator checks the index
number, not the value at that index.
arguments.callee - JavaScript
well, at any point in time you can find the deepest caller of any function on the stack, and as i said above looking at the call stack has one single major effect: it makes a large
number of optimizations impossible, or much much more difficult.
...basically it means that any call site that may have been trivially inlinable accumulates a large
number of guards: function f(a, b, c, d, e) { return a ?
... b * c : d * e; } if the javascript interpreter cannot guarantee that all the provided arguments are
numbers at the point that the call is made, it needs to either insert checks for all the arguments before the inlined code, or it cannot inline the function.
Functions - JavaScript
rest parameters the rest parameter syntax allows representing an indefinite
number of arguments as an array.
... arguments.length: the
number of arguments passed to the function.
... a safer way to define functions conditionally is to assign a function expression to a variable: var zero; if (shoulddefinezero) { zero = function() { console.log("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.concat() - JavaScript
data types such as strings,
numbers and booleans (not string,
number, and boolean objects): concat copies the values of strings and
numbers into the new array.
... examples concatenating two arrays the following code concatenates two arrays: const letters = ['a', 'b', 'c']; const
numbers = [1, 2, 3]; letters.concat(
numbers); // result in ['a', 'b', 'c', 1, 2, 3] concatenating three arrays the following code concatenates three arrays: const num1 = [1, 2, 3]; const num2 = [4, 5, 6]; const num3 = [7, 8, 9]; const
numbers = num1.concat(num2, num3); console.log(
numbers); // results in [1, 2, 3, 4, 5, 6, 7, 8, 9] concatenating values to an array the following code concatenates three values to an array: const ...
...letters = ['a', 'b', 'c']; const alphanumeric = letters.concat(1, [2, 3]); console.log(alphanumeric); // results in ['a', 'b', 'c', 1, 2, 3] concatenating nested arrays the following code concatenates nested arrays and demonstrates retention of references: const num1 = [[1]]; const num2 = [2, [3]]; const
numbers = num1.concat(num2); console.log(
numbers); // results in [[1], 2, [3]] // modify the first element of num1 num1[0].push(4); console.log(
numbers); // results in [[1, 4], 2, [3]] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.concat' in that specification.
Array.prototype.lastIndexOf() - JavaScript
this algorithm is exactly the one specified in ecma-262, 5th edition, assuming object, typeerror,
number, math.floor, math.abs, and math.min have their original values.
...ithub.io/#x15.4.4.15 if (!array.prototype.lastindexof) { array.prototype.lastindexof = function(searchelement /*, fromindex*/) { 'use strict'; if (this === void 0 || this === null) { throw new typeerror(); } var n, k, t = object(this), len = t.length >>> 0; if (len === 0) { return -1; } n = len - 1; if (arguments.length > 1) { n =
number(arguments[1]); if (n != n) { n = 0; } else if (n != 0 && n != (1 / 0) && n != -(1 / 0)) { n = (n > 0 || -1) * math.floor(math.abs(n)); } } for (k = n >= 0 ?
... var
numbers = [2, 5, 9, 2];
numbers.lastindexof(2); // 3
numbers.lastindexof(7); // -1
numbers.lastindexof(2, 3); // 3
numbers.lastindexof(2, 2); // 0
numbers.lastindexof(2, -2); // 0
numbers.lastindexof(2, -1); // 3 finding all the occurrences of an element the following example uses lastindexof to find all the indices of an element in a given array, using push to add them to another array as ...
Array.prototype.splice() - JavaScript
deletecount optional an integer indicating the
number of elements in the array to remove from start.
... if deletecount is omitted, or if its value is equal to or larger than array.length - start (that is, if it is equal to or greater than the
number of elements left in the array, starting at start), then all the elements from start to the end of the array will be deleted.
... description if the specified
number of elements to insert differs from the
number of elements being removed, the array's length will be changed.
BigInt64Array - JavaScript
static properties bigint64array.bytes_per_element returns a
number value of the element size.
... bigint64array.of() creates a new bigint64array with a variable
number of arguments.
... bigint64array.prototype.length returns the
number of elements hold in the bigint64array.
BigUint64Array - JavaScript
static properties biguint64array.bytes_per_element returns a
number value of the element size.
... biguint64array.of() creates a new biguint64array with a variable
number of arguments.
... biguint64array.prototype.length returns the
number of elements hold in the biguint64array.
DataView() constructor - JavaScript
bytelength optional the
number of elements in the byte array.
...(that probably wasn't a very helpful description.) you can think of the returned object as an "interpreter" of the array buffer of bytes — it knows how to convert
numbers to fit within the buffer correctly, both when reading and writing to it.
... this means handling integer and float conversion, endianness, and other details of representing
numbers in binary form.
Date.prototype.getFullYear() - JavaScript
syntax dateobj.getfullyear() return value a
number corresponding to the year of the given date, according to local time.
... description the value returned by getfullyear() is an absolute
number.
... for dates between the years 1000 and 9999, getfullyear() returns a four-digit
number, for example, 1995.
Date.prototype.setHours() - JavaScript
the sethours() method sets the hours for a specified date according to local time, and returns the
number of milliseconds since january 1, 1970 00:00:00 utc until the time represented by the updated date instance.
...ideally, a
number between 0 and 999, representing the milliseconds.
... return value the
number of milliseconds between january 1, 1970 00:00:00 utc and the updated date.
Date.prototype.setTime() - JavaScript
the settime() method sets the date object to the time represented by a
number of milliseconds since january 1, 1970, 00:00:00 utc.
... syntax dateobj.settime(timevalue) parameters timevalue an integer representing the
number of milliseconds since 1 january 1970, 00:00:00 utc.
... return value the
number of milliseconds between 1 january 1970 00:00:00 utc and the updated date (effectively, the value of the argument).
Date.prototype.setUTCHours() - JavaScript
the setutchours() method sets the hour for a specified date according to universal time, and returns the
number of milliseconds since january 1, 1970 00:00:00 utc until the time represented by the updated date instance.
...a
number between 0 and 999, representing the milliseconds.
... return value the
number of milliseconds between january 1, 1970 00:00:00 utc and the updated date.
Error() constructor - JavaScript
syntax new error([message[, filename[, line
number]]]) parameters messageoptional a human-readable description of the error.
... line
number optional the value for the line
number property on the created error object.
... defaults to the line
number containing the error() constructor invocation.
EvalError - JavaScript
evalerror.prototype.line
number line
number in file that raised this error.
... evalerror.prototype.column
number column
number in line that raised this error.
... creating an evalerror try { throw new evalerror('hello', 'somefile.js', 10); } catch (e) { console.log(e instanceof evalerror); // true console.log(e.message); // "hello" console.log(e.name); // "evalerror" console.log(e.filename); // "somefile.js" console.log(e.line
number); // 10 console.log(e.column
number); // 0 console.log(e.stack); // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'evalerror' in that specification.
Infinity - JavaScript
the initial value of infinity is
number.positive_infinity.
... the value infinity (positive infinity) is greater than any other
number.
... this value behaves slightly differently than mathematical infinity; see
number.positive_infinity for details.
Int16Array - JavaScript
static properties int16array.bytes_per_element returns a
number value of the element size.
... int16array.of() creates a new int16array with a variable
number of arguments.
... int16array.prototype.length returns the
number of elements hold in the int16array.
Int32Array - JavaScript
static properties int32array.bytes_per_element returns a
number value of the element size.
... int32array.of() creates a new int32array with a variable
number of arguments.
... int32array.prototype.length returns the
number of elements hold in the int32array.
Int8Array - JavaScript
static properties int8array.bytes_per_element returns a
number value of the element size.
... int8array.of() creates a new int8array with a variable
number of arguments.
... int8array.prototype.length returns the
number of elements hold in the int8array.
InternalError() constructor - JavaScript
syntax new internalerror([message[, filename[, line
number]]]) parameters message optional.
...the name of the file containing the code that caused the exception line
number optional.
... the line
number of the code that caused the exception examples creating a new internalerror new internalerror("engine failure"); specifications not part of any standard.
Intl.DateTimeFormat() constructor - JavaScript
the following unicode extension keys are allowed: nu
numbering system.
...possible values include: "full" "long" "medium" "short" fractionalseconddigits the
number of fractional seconds to apply when calling format().
...
numberingsystem
numbering system.
Intl.RelativeTimeFormat.prototype.formatToParts() - JavaScript
description the intl.relativetimeformat.prototype.formattoparts method is a version of the format method which it returns an array of objects which represent "parts" of the object, separating the formatted
number into its consituent parts and separating it from other surrounding text.
... these objects have two properties: type a
numberformat formattoparts type, and value, which is the string which is the component of the output.
... if a "part" came from
numberformat, it will have a unit property which indicates the unit being formatted; literals which are part of the larger frame will not have this property.
Intl.RelativeTimeFormat.prototype.resolvedOptions() - JavaScript
syntax relativetimeformat.resolvedoptions() return value a new object with properties reflecting the locale and
number formatting options computed during the initialization of the given relativetimeformat object.
...
numberingsystem the value requested using the unicode extension key "nu" or filled in as a default.
... examples using the resolvedoptions method var de = new intl.relativetimeformat('de-de'); var usedoptions = de.resolvedoptions(); usedoptions.locale; // "de-de" usedoptions.style; // "long" usedoptions.numeric; // "always" usedoptions.
numberingsystem; // "latn" specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat.resolvedoptions()' in that specification.
JSON.parse() - JavaScript
return value the object, array, string,
number, boolean, or null value corresponding to the given json text.
... json.parse('{"p": 5}', (key, value) => typeof value === '
number' ?
... value * 2 // return value * 2 for
numbers : value // return everything else unchanged ); // { p: 10 } json.parse('{"1": 1, "2": 2, "3": {"4": 4, "5": {"6": 6}}}', (key, value) => { console.log(key); // log the current property name, the last is "".
Math.abs() - JavaScript
the math.abs() function returns the absolute value of a
number, that is math.abs(x)=|x|={xifx>00ifx=0-xifx<0{\mathtt{\operatorname{math.abs}(z)}} = {|z|} = \begin{cases} x & \text{if} \quad x \geq 0 \\ x & \text{if} \quad x < 0 \end{cases} the source for this interactive example is stored in a github repository.
... syntax math.abs(x) parameters x a
number.
... return value the absolute value of the given
number.
Math.acos() - JavaScript
the math.acos() function returns the arccosine (in radians) of a
number, that is ∀x∊[-1;1],math.acos(x)=arccos(x)= the unique y∊[0;π]such thatcos(y)=x\forall x \in [{-1};1],\;\mathtt{\operatorname{math.acos}(x)} = \arccos(x) = \text{ the unique } \; y \in [0; \pi] \, \text{such that} \; \cos(y) = x the source for this interactive example is stored in a github repository.
... syntax math.acos(x) parameters x a
number representing a cosine, where x is between -1 and 1.
... return value the arccosine (angle in radians) of the given
number if it's between -1 and 1; otherwise, nan.
Math.asin() - JavaScript
the math.asin() function returns the arcsine (in radians) of a
number, that is ∀x∊[-1;1],math.asin(x)=arcsin(x)= the unique y∊[-π2;π2]such thatsin(y)=x\forall x \in [{-1};1],\;\mathtt{\operatorname{math.asin}(x)} = \arcsin(x) = \text{ the unique } \; y \in \left[-\frac{\pi}{2}; \frac{\pi}{2}\right] \, \text{such that} \; \sin(y) = x the source for this interactive example is stored in a github repository.
... syntax math.asin(x) parameters x a
number.
... return value the arcsine (in radians) of the given
number if it's between -1 and 1; otherwise, nan.
Math.asinh() - JavaScript
the math.asinh() function returns the hyperbolic arcsine of a
number, that is math.asinh(x)=arsinh(x)= the unique ysuch thatsinh(y)=x\mathtt{\operatorname{math.asinh}(x)} = \operatorname{arsinh}(x) = \text{ the unique } \; y \; \text{such that} \; \sinh(y) = x the source for this interactive example is stored in a github repository.
... syntax math.asinh(x) parameters x a
number.
... return value the hyperbolic arcsine of the given
number.
Math.atan() - JavaScript
the math.atan() function returns the arctangent (in radians) of a
number, that is math.atan(x)=arctan(x)= the unique y∊[-π2;π2]such thattan(y)=x\mathtt{\operatorname{math.atan}(x)} = \arctan(x) = \text{ the unique } \; y \in \left[-\frac{\pi}{2}; \frac{\pi}{2}\right] \, \text{such that} \; \tan(y) = x the source for this interactive example is stored in a github repository.
... syntax math.atan(x) parameters x a
number.
... return value the arctangent (in radians) of the given
number.
Math.atanh() - JavaScript
the math.atanh() function returns the hyperbolic arctangent of a
number, that is ∀x∊(-1,1),math.atanh(x)=arctanh(x)= the unique ysuch thattanh(y)=x\forall x \in \left( -1, 1 \right), \mathtt{\operatorname{math.atanh}(x)} = \operatorname{arctanh}(x) = \text{ the unique } \; y \; \text{such that} \; \tanh(y) = x the source for this interactive example is stored in a github repository.
... syntax math.atanh(x) parameters x a
number.
... return value the hyperbolic arctangent of the given
number.
Math.cosh() - JavaScript
the math.cosh() function returns the hyperbolic cosine of a
number, that can be expressed using the constant e: math.cosh(x)=ex+e-x2\mathtt{\operatorname{math.cosh(x)}} = \frac{e^x + e^{-x}}{2} the source for this interactive example is stored in a github repository.
... syntax math.cosh(x) parameters x a
number.
... return value the hyperbolic cosine of the given
number.
Math.exp() - JavaScript
the math.exp() function returns ex, where x is the argument, and e is euler's
number (also known as napier's constant), the base of the natural logarithms.
... syntax math.exp(x) parameters x a
number.
... return value a
number representing ex, where e is euler's
number and x is the argument.
Math.pow() - JavaScript
syntax math.pow(base, exponent) parameters base the base
number.
... return value a
number representing the given base taken to the power of the given exponent.
...pow(8, 1/3); // 2 (cube root of 8) math.pow(2, 0.5); // 1.4142135623730951 (square root of 2) math.pow(2, 1/3); // 1.2599210498948732 (cube root of 2) // signed exponents math.pow(7, -2); // 0.02040816326530612 (1/49) math.pow(8, -1/3); // 0.5 // signed bases math.pow(-7, 2); // 49 (squares are positive) math.pow(-7, 3); // -343 (cubes can be negative) math.pow(-7, 0.5); // nan (negative
numbers don't have a real square root) // due to "even" and "odd" roots laying close to each other, // and limits in the floating
number precision, // negative bases with fractional exponents always return nan math.pow(-7, 1/3); // nan specifications specification ecmascript (ecma-262)the definition of 'math.pow' in that specification.
Math.sin() - JavaScript
the math.sin() function returns the sine of a
number.
... syntax math.sin(x) parameters x a
number (given in radians).
... return value the sine of the given
number.
Math.sinh() - JavaScript
the math.sinh() function returns the hyperbolic sine of a
number, that can be expressed using the constant e: math.sinh(x)=ex-e-x2\mathtt{\operatorname{math.sinh(x)}} = \frac{e^x - e^{-x}}{2} the source for this interactive example is stored in a github repository.
... syntax math.sinh(x) parameters x a
number.
... return value the hyperbolic sine of the given
number.
Math.tan() - JavaScript
the math.tan() function returns the tangent of a
number.
... syntax math.tan(x) parameters x a
number representing an angle in radians.
... return value the tangent of the given
number.
Object.prototype.constructor - JavaScript
let o = {} o.constructor === object // true let o = new object o.constructor === object // true let a = [] a.constructor === array // true let a = new array a.constructor === array // true let n = new
number(3) n.constructor ===
number // true examples displaying the constructor of an object the following example creates a constructor (tree) and an object of that type (thetree).
... function type () {} let types = [ new array(), [], new boolean(), true, // remains unchanged new date(), new error(), new function(), function () {}, math, new
number(), 1, // remains unchanged new object(), {}, new regexp(), /(?:)/, new string(), 'test' // remains unchanged ] for (let i = 0; i < types.length; i++) { types[i].constructor = type types[i] = [types[i].constructor, types[i] instanceof type, types[i].tostring()] } console.log(types.join('\n')) this example displays the following output (comments added...
...error // new error() function type() {},false,function anonymous() { } // new function() function type() {},false,function () {} // function () {} function type() {},false,[object math] // math function type() {},false,0 // new
number() function
number() { [native code] },false,1 // 1 function type() {},false,[object object] // new object() function type() {},false,[object object] // {} function type() {},false,/(?:)/ // new regexp() function type() {},false,/(?:)/ // /(?
Object.prototype.toLocaleString() - JavaScript
objects overriding tolocalestring array: array.prototype.tolocalestring()
number:
number.prototype.tolocalestring() date: date.prototype.tolocalestring() typedarray: typedarray.prototype.tolocalestring() bigint: bigint.prototype.tolocalestring() examples array tolocalestring() override on array objects, tolocalestring() can be used to print array values as a string, optionally with locale-specific identifiers (such as currency symbols) appended to them: for example: ...
...date tolocalestring() override on date objects, tolocalestring() is used to print out date displays more suitable for specific locales: for example: const testdate = new date(date.now()); // "date fri may 29 2020 18:04:24 gmt+0100 (british summer time)" let dedate = testdate.tolocalestring('de'); // "29.5.2020, 18:04:24" var frdate = testdate.tolocalestring('fr'); //"29/05/2020 à 18:04:24"
number tolocalestring() override on
number objects, tolocalestring() is used to print out
number displays more suitable for specific locales, e.g.
... with the correct separators: for example: const test
number = 2901234564; // "2901234564" let de
number = test
number.tolocalestring('de'); // "2.901.234.564" let fr
number = test
number.tolocalestring('fr'); // "2 901 234 564" specifications specification ecmascript (ecma-262)the definition of 'object.prototype.tolocalestring' in that specification.
RangeError - JavaScript
this can be encountered when: passing a value that is not one of the allowed string values to string.prototype.normalize(), or when attempting to create an array of an illegal length with the array constructor, or when passing bad values to the numeric methods
number.prototype.toexponential(),
number.prototype.tofixed() or
number.prototype.toprecision().
... rangeerror.prototype.line
number line
number in file that raised this error.
... rangeerror.prototype.column
number column
number in line that raised this error.
String.prototype.charCodeAt() - JavaScript
if index is not a
number, it defaults to 0.
... return value a
number representing the utf-16 code unit value of the character at the given index.
... backward compatibility: in historic versions (like javascript 1.2) the charcodeat() method returns a
number indicating the iso-latin-1 codeset value of the character at the given index.
String.prototype.localeCompare() - JavaScript
the localecompare() method returns a
number indicating whether a reference string comes before, or after, or is the same as the given string in sort order.
... return value a negative
number if referencestr occurs before comparestring; positive if the referencestr occurs after comparestring; 0 if they are equivalent.
... performance when comparing large
numbers of strings, such as in sorting large arrays, it is better to create an intl.collator object and use the function provided by its compare property.
String.prototype.repeat() - JavaScript
the repeat() method constructs and returns a new string which contains the specified
number of copies of the string on which it was called, concatenated together.
... syntax str.repeat(count) parameters count an integer between 0 and +infinity, indicating the
number of times to repeat the string.
... return value a new string containing the specified
number of copies of the given string.
SyntaxError - JavaScript
syntaxerror.prototype.line
number line
number in file that raised this error.
... syntaxerror.prototype.column
number column
number in line that raised this error.
... examples catching a syntaxerror try { eval('hoo bar'); } catch (e) { console.error(e instanceof syntaxerror); console.error(e.message); console.error(e.name); console.error(e.filename); console.error(e.line
number); console.error(e.column
number); console.error(e.stack); } creating a syntaxerror try { throw new syntaxerror('hello', 'somefile.js', 10); } catch (e) { console.error(e instanceof syntaxerror); // true console.error(e.message); // hello console.error(e.name); // syntaxerror console.error(e.filename); // somefile.js console.error(e.line
number); // 10 console.error(e.column
number); // 0 console.e...
TypedArray.prototype.map() - JavaScript
examples mapping a typed array to a typed array of square roots the following code takes a typed array and creates a new typed array containing the square roots of the
numbers in the first typed array.
... const
numbers = new uint8array([1, 4, 9]); const roots =
numbers.map(math.sqrt); // roots is now: uint8array [1, 2, 3], //
numbers is still uint8array [1, 4, 9] mapping a typed array of
numbers using a function containing an argument the following code shows how map works when a function requiring one argument is used with it.
... const
numbers = new uint8array([1, 4, 9]); const doubles =
numbers.map(function(num) { return num * 2; }); // doubles is now uint8array [2, 8, 18] //
numbers is still uint8array [1, 4, 9] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.map' in that specification.
Uint16Array - JavaScript
static properties uint16array.bytes_per_element returns a
number value of the element size.
... uint16array.of() creates a new uint16array with a variable
number of arguments.
... uint16array.prototype.length returns the
number of elements hold in the uint16array.
Uint32Array - JavaScript
static properties uint32array.bytes_per_element returns a
number value of the element size.
... uint32array.of() creates a new uint32array with a variable
number of arguments.
... uint32array.prototype.length returns the
number of elements hold in the uint32array.
Uint8Array - JavaScript
static properties uint8array.bytes_per_element returns a
number value of the element size.
... uint8array.of() creates a new uint8array with a variable
number of arguments.
... uint8array.prototype.length returns the
number of elements held in the uint8array.
Uint8ClampedArray - JavaScript
static properties uint8clampedarray.bytes_per_element returns a
number value of the element size.
... uint8clampedarray.of() creates a new uint8clampedarray from a variable
number of arguments.
... uint8clampedarray.prototype.length returns the
number of elements hold in the uintclamped8array.
WebAssembly.CompileError() constructor - JavaScript
syntax new webassembly.compileerror(message, filename, line
number) parameters message optional human-readable description of the error.
... line
number optional the line
number of the code that caused the exception.
...et creates a new compileerror instance, and logs its details to the console: try { throw new webassembly.compileerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof compileerror); // true console.log(e.message); // "hello" console.log(e.name); // "compileerror" console.log(e.filename); // "somefile" console.log(e.line
number); // 10 console.log(e.column
number); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javascript interfacethe definition of 'webassembly constructors' in that specification.
WebAssembly.CompileError - JavaScript
webassembly.compileerror.prototype.line
number line
number in file that raised this error.
... webassembly.compileerror.prototype.column
number column
number in line that raised this error.
...et creates a new compileerror instance, and logs its details to the console: try { throw new webassembly.compileerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof compileerror); // true console.log(e.message); // "hello" console.log(e.name); // "compileerror" console.log(e.filename); // "somefile" console.log(e.line
number); // 10 console.log(e.column
number); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javascript interfacethe definition of 'webassembly constructors' in that specification.
WebAssembly.LinkError() constructor - JavaScript
syntax new webassembly.linkerror(message, filename, line
number) parameters message optional human-readable description of the error.
... line
number optional the line
number of the code that caused the exception.
...lowing snippet creates a new linkerror instance, and logs its details to the console: try { throw new webassembly.linkerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof linkerror); // true console.log(e.message); // "hello" console.log(e.name); // "linkerror" console.log(e.filename); // "somefile" console.log(e.line
number); // 10 console.log(e.column
number); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javascript interfacethe definition of 'linkerror' in that specification.
WebAssembly.LinkError - JavaScript
webassembly.linkerror.prototype.line
number line
number in file that raised this error.
... webassembly.linkerror.prototype.column
number column
number in line that raised this error.
...lowing snippet creates a new linkerror instance, and logs its details to the console: try { throw new webassembly.linkerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof linkerror); // true console.log(e.message); // "hello" console.log(e.name); // "linkerror" console.log(e.filename); // "somefile" console.log(e.line
number); // 10 console.log(e.column
number); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javascript interfacethe definition of 'linkerror' in that specification.
WebAssembly.Memory.prototype.grow() - JavaScript
the grow() protoype method of the memory object increases the size of the memory instance by a specified
number of webassembly pages.
... syntax memory.grow(
number); parameters
number the
number of webassembly pages you want to grow the memory by (each one is 64kib in size).
... var memory = new webassembly.memory({initial:1, maximum:10}); we can then grow the instance by one page like so: const bytesperpage = 64 * 1024; console.log(memory.buffer.bytelength / bytesperpage); // "1" console.log(memory.grow(1)); // "1" console.log(memory.buffer.bytelength / bytesperpage); // "2" note the return value of grow() here is the previous
number of webassembly pages.
WebAssembly.RuntimeError() constructor - JavaScript
syntax new webassembly.runtimeerror(message, filename, line
number) parameters message optional human-readable description of the error.
... line
number optional the line
number of the code that caused the exception.
...et creates a new runtimeerror instance, and logs its details to the console: try { throw new webassembly.runtimeerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof runtimeerror); // true console.log(e.message); // "hello" console.log(e.name); // "runtimeerror" console.log(e.filename); // "somefile" console.log(e.line
number); // 10 console.log(e.column
number); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javascript interfacethe definition of 'webassembly.runtimeerror constructor' in that specification.
WebAssembly.RuntimeError - JavaScript
webassembly.runtimeerror.prototype.line
number line
number in file that raised this error.
... webassembly.runtimeerror.prototype.column
number column
number in line that raised this error.
...et creates a new runtimeerror instance, and logs its details to the console: try { throw new webassembly.runtimeerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof runtimeerror); // true console.log(e.message); // "hello" console.log(e.name); // "runtimeerror" console.log(e.filename); // "somefile" console.log(e.line
number); // 10 console.log(e.column
number); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javascript interfacethe definition of 'webassembly constructors' in that specification.
Standard built-in objects - JavaScript
error aggregateerror evalerror internalerror rangeerror referenceerror syntaxerror typeerror urierror
numbers and dates these are the base objects representing
numbers, dates, and mathematical calculations.
...
number bigint math date text processing these objects represent strings and support manipulating them.
... intl intl.collator intl.datetimeformat intl.listformat intl.
numberformat intl.pluralrules intl.relativetimeformat intl.locale webassembly webassembly webassembly.module webassembly.instance webassembly.memory webassembly.table webassembly.compileerror webassembly.linkerror webassembly.runtimeerror other arguments ...
Bitwise NOT (~) - JavaScript
numbers with more than 32 bits get their most significant bits discarded.
... the truth table for the not operation is: a not a 0 1 1 0 9 (base 10) = 00000000000000000000000000001001 (base 2) -------------------------------- ~9 (base 10) = 11111111111111111111111111110110 (base 2) = -10 (base 10) bitwise noting any
number x yields -(x + 1).
... note that due to using 32-bit representation for
numbers both ~-1 and ~4294967295 (232-1) results in 0.
Left shift (<<) - JavaScript
the left shift operator (<<) shifts the first operand the specified
number of bits to the left.
... syntax a << b description this operator shifts the first operand the specified
number of bits to the left.
... 9 (base 10): 00000000000000000000000000001001 (base 2) -------------------------------- 9 << 2 (base 10): 00000000000000000000000000100100 (base 2) = 36 (base 10) bitwise shifting any
number x to the left by y bits yields x * 2 ** y.
JavaScript typed arrays - JavaScript
each entry in a javascript typed array is a raw binary value in one of a
number of supported formats, from 8-bit integers to 64-bit floating-point
numbers.
...a view provides a context — that is, a data type, starting offset, and the
number of elements — that turns the data into a typed array.
..._t uint16array 0 to 65535 2 16-bit unsigned integer unsigned short uint16_t int32array -2147483648 to 2147483647 4 32-bit two's complement signed integer long int32_t uint32array 0 to 4294967295 4 32-bit unsigned integer unsigned long uint32_t float32array 1.2×10-38 to 3.4×1038 4 32-bit ieee floating point
number (7 significant digits e.g., 1.123456) unrestricted float float float64array 5.0×10-324 to 1.8×10308 8 64-bit ieee floating point
number (16 significant digits e.g., 1.123...15) unrestricted double double bigint64array -263 to 263-1 8 64-bit two's complement signed integer bigint int64_t (signed long long) biguint64array 0 to 264-...
Image file type and format guide - Web media technologies
in the tables below, the term bits per component refers to the
number of bits used to represent each color component.
...bit depth, on the other hand, is the total
number of bits used to represent each pixel in memory.
...<picture> is used as a wrapper for a
number of <source> elements, each specifying a version of the image in a different format or under different media conditions, as well as an <img> element which defines where to display the image and the fallback to the default or "most compatible" version.
Critical rendering path - Web Performance
the greater the
number of nodes, the longer the following events in the critical rendering path will take.
... layout performance is impacted by the dom -- the greater the
number of nodes, the longer layout takes.
...performance tips include 1) minimizing the
number of critical resources by deferring their download, marking them as async, or eliminating them altogether, 2) optimizing the
number of requests required along with the file size of each request, and 3) optimizing the order in which critical resources are loaded by prioritizing the downloading critical assets, shorten the critical path length.
Understanding latency - Web Performance
the greater the
number and size of these requests, the greater the impact of high latency on user experience.
...the greater the
number of hostnames, the more dns lookups need to be done.
...like dns, the greater the
number of server connections needed, the more time is spend creating server connections.
diffuseConstant - SVG: Scalable Vector Graphics
in svg, this can be any non-negative
number.
...the brighter the lighting-color, the smaller this
number should be.
...00%"> <fediffuselighting in="sourcegraphic" diffuseconstant="2"> <fepointlight x="60" y="60" z="20" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting2); transform: translatex(220px);" /> </svg> usage notes value <
number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'diffuseconstant' in that specification.
font-size-adjust - SVG: Scalable Vector Graphics
</text> </svg> usage notes default value none value none | <
number> animatable yes none choose the size of the font based only on the font-size property.
... <
number> choose the size of the font so that its lowercase letters (as determined by the x-height of the font) are the specified
number times the font-size.
... the
number specified should generally be the aspect ratio (ratio of x-height to font size) of the first choice font-family.
markerHeight - SVG: Scalable Vector Graphics
only one element is using this attribute: <marker> usage notes value <length-percentage> | <
number> default value 3 animatable yes <length-percentage> this value defines either an absolute or a relative height of the marker.
... <
number> this value defines the height of the marker in the units defined by the markerunits attribute.
... candidate recommendation allowed percentage and
number values.
markerWidth - SVG: Scalable Vector Graphics
only one element is using this attribute: <marker> usage notes value <length-percentage> | <
number> default value 3 animatable yes <length-percentage> this value defines either an absolute or a relative width of the marker.
... <
number> this value defines the width of the marker in the units defined by the markerunits attribute.
... candidate recommendation allowed percentage and
number values.
numOctaves - SVG: Scalable Vector Graphics
the numoctaves attribute defines the
number of octaves for the noise function of the <feturbulence> primitive.
... the higher the
number of octaves, the more natural the noise looks.
...%"> <feturbulence basefrequency="0.025" numoctaves="3" /> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#noise1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#noise2); transform: translatex(220px);" /> </svg> usage notes value <integer> default value 1 animatable yes <integer> defines the
number of octaves.
radius - SVG: Scalable Vector Graphics
if two
numbers are provided, the first
number represents the x-radius and the second one the y-radius.
... if one
number is provided, then that value is used for both x and y.
... usage notes value <
number-optional-
number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'radius' in that specification.
refX - SVG: Scalable Vector Graphics
value <length-percentage> | <
number> | left | center | right default value 0 animatable yes <length-percentage> lengths are interpreted as being in the coordinate system of the marker contents, after application of the viewbox and preserveaspectratio attributes.
... <
number>
numbers are interpreted as being in the coordinate system of the marker contents, after application of the viewbox and preserveaspectratio attributes.
... <
number>
numbers are interpreted as being in the coordinate system of the marker contents, after application of the viewbox and preserveaspectratio attributes.
refY - SVG: Scalable Vector Graphics
value <length-percentage> | <
number> | top | center | bottom default value 0 animatable yes <length-percentage> lengths are interpreted as being in the coordinate system of the marker contents, after application of the viewbox and preserveaspectratio attributes.
... <
number>
numbers are interpreted as being in the coordinate system of the marker contents, after application of the viewbox and preserveaspectratio attributes.
... <
number>
numbers are interpreted as being in the coordinate system of the marker contents, after application of the viewbox and preserveaspectratio attributes.
tableValues - SVG: Scalable Vector Graphics
the tablevalues attribute defines a list of
numbers defining a lookup table of values for a for a color component transfer function.
... <fefuncb type="table" tablevalues="1 0"/> </fecomponenttransfer> </filter> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer1);" /> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer2); transform: translatex(220px);" /> </svg> usage notes value <list-of-
numbers> default value empty list resulting in identity transfer animatable yes <list-of-
numbers> this value holds a comma- and/or space-separated list of <
number>s, which define a lookup table for the color component transfer function.
... each
number can be between 0 and 1.
x - SVG: Scalable Vector Graphics
value <
number> default value 0 animatable yes fespecularlighting for <fespecularlighting>, x defines the minimum x coordinate for the rendering area of the primitive.
... value <
number> default value 0 animatable yes fetile for <fetile>, x defines the minimum x coordinate for the rendering area of the primitive.
... value <
number> default value 0 for the first glyphref, and the end x coordinate of the previous <glyphref> for all subsequent sibling <glyphref>.
y - SVG: Scalable Vector Graphics
value <
number> default value 0 animatable yes fespecularlighting for <fespecularlighting>, y defines the minimum y coordinate for the rendering area of the primitive.
... value <
number> default value 0 animatable yes fetile for <fetile>, y defines the minimum y coordinate for the rendering area of the primitive.
... value <
number> default value none animatable yes image for <image>, y defines the y coordinate of the uper left corner of the image.
<animateMotion> - SVG: Scalable Vector Graphics
viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="lightgrey" d="m20,50 c20,-50 180,150 180,50 c180-50 20,150 20,50 z" /> <circle r="5" fill="red"> <animatemotion dur="10s" repeatcount="indefinite" path="m20,50 c20,-50 180,150 180,50 c180-50 20,150 20,50 z" /> </circle> </svg> usage context categoriesanimation elementpermitted contentany
number of the following elements, in any order:descriptive elements<mpath> attributes keypoints this attribute indicate, in the range [0,1], how far is the object along the path for each keytimes associated values.
... value type: <
number>*; default value: none; animatable: no path this attribute defines the path of the motion, using the same syntax as the d attribute.
... value type: <
number>|auto|auto-reverse; default value: 0; animatable: no note: for <animatemotion> the default value for the calcmode attribute is paced animation attributes animation timing attributes begin, dur, end, min, max, restart, repeatcount, repeatdur, fill animation value attributes calcmode, values, keytimes, keysplines, from, to, by other animation attributes most notably: attributename, additive, accumulate animation event attributes most notably: onbegin, onend, onrepeat global attributes core attributes most notably: id styling attributes class, styl...
<feColorMatrix> - SVG: Scalable Vector Graphics
these specified amounts can be any real
number, though the final r' will be clamped between 0 and 1.
... r' = r1 * r + r2 * g + r3 * b + r4 * a + r5 new red = [ r1 * old red ] + [ r2 * old green ] + [ r3 * old blue ] + [ r4 * old alpha ] + [ shift of r5 ] if, say, we want to make a completely black image redder, we can make the r5 a positive real
number x, boosting the redness on every pixel of the new image by x.
... 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 type values dom interface this element implements the svgfecolormatrixelement interface.
<feDropShadow> - SVG: Scalable Vector Graphics
value type: <
number>; default value: 2; animatable: yes dy this attribute defines the y offset of the drop shadow.
... value type: <
number>; default value: 2; animatable: yes stddeviation this attribute defines the standard deviation for the blur operation in the drop shadow.
... value type: <
number>; default value: 2; animatable: yes global attributes core attributes most notably: id styling attributes class, style filter primitive attributes height, in, result, x, y, width presentation attributes most notably: flood-color, flood-opacity usage notes categoriesfilter primitive elementpermitted contentany
number of the following elements, in any order:<animate>, <script>, <set> specifications specification status comment filter effects module level 1the definition of '<fedropshadow>' in that specification.
<polygon> - SVG: Scalable Vector Graphics
value type: <
number>+ ; default value: ""; animatable: yes pathlength this attribute lets specify the total length for the path, in user units.
... value type: <
number> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount,...
...ectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<polygon>' in that specification.
<polyline> - SVG: Scalable Vector Graphics
polyline with the default fill --> <polyline points="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.
... value type: <
number> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount,...
...ectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<polyline>' in that specification.
<svg> - SVG: Scalable Vector Graphics
value type: <
number> ; default value: none; animatable: no viewbox the svg viewport coordinates for the current svg fragment.
... value type: <list-of-
numbers> ; default value: none; animatable: yes width the displayed width of the rectangular viewport.
..., aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable...
<textPath> - SVG: Scalable Vector Graphics
value type: <length>|<percentage>|<
number> ; default value: 0; animatable: yes textlength the width of the space into which the text will render.
... value type: <length>|<percentage>|<
number> ; default value: auto; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-c...
...ceholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:title usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any
number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specifications specification status comment scalable vector graphics (svg) 2the definition of '<textpath>' in that specification.
Certificate Transparency - Web security
the specification states that compliant servers must provide a
number of these scts to tls clients when they connect.
... this can be accomplished via a
number of different mechanisms: x.509v3 certificate extension which embeds signed certificate timestamps directly into the leaf certificate a tls extension of type signed_certificate_timestamp sent during the handshake ocsp stapling (that is, the status_request tls extension) and providing a signedcertificatetimestamplist with one or more scts with the x.509 certificate extension, the included scts are decided by the issuing ca.
... apple requires a varying
number of scts in order for safari and other servers to trust server certificates.
Same-origin policy - Web security
the port
number is checked separately by the browser.
... any call to document.domain, including document.domain = document.domain, causes the port
number to be overwritten with null.
...it has to be set in both so their port
numbers are both null.
ceiling - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the ceiling function evaluates a decimal
number and returns the smallest integer greater than or equal to the decimal
number.
... syntax ceiling(
number ) arguments
number the
number to be evaluated.
... returns the nearest integer greater than or equal to
number.
floor - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the floor function evaluates a decimal
number and returns the largest integer less than or equal to the decimal
number.
... syntax floor(
number ) arguments
number the decimal
number to be evaluated.
... returns the nearest integer less than or equal to
number.
sum - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the sum function returns a
number that is the sum of the numeric values of each node in a given node-set.
...each node in this node-set is evaluated as if it were passed to the
number() function, and a sum of the resulting
numbers is returned.
... returns a
number.
<xsl:template> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:template match=pattern name=name mode=name priority=
number> <xsl:param> [optional] template </xsl:template> required attributes none.
...this can be any
number other than infinity.
... the processor uses this
number when more than one template matches the same node.
port - Archive of obsolete content
it may be called with any
number of parameters, but is most likely to be called with a name for the message and an optional payload.
...this means that it needs to be a string,
number, boolean, null, array of json-serializable values, or an object whose property values are themselves json-serializable.
Communicating using "port" - Archive of obsolete content
it may be called with any
number of parameters, but is most likely to be called with a name for the message and an optional payload.
...this means that it needs to be a string,
number, boolean, null, array of json-serializable values, or an object whose property values are themselves json-serializable.
l10n - Archive of obsolete content
if you're supplying different localizations for a string depending on the
number of items (that is, whether to use a singular or plural form) then get() takes a second integer parameter which indicates the
number of items there are.
...if you're supplying different localizations for a string for singular or plural forms, this parameter is the
number of items there are in this case.
io/file - Archive of obsolete content
join(...) takes a variable
number of strings, joins them on the file system's path separator, and returns the result.
...: strings a variable
number of strings to join.
package.json - Archive of obsolete content
engines object with supported applications (key) and required version
numbers (value).
... the version
number can both specify a minimum and maximum version separated by a space.
Finding window handles - Archive of obsolete content
x-window-system-interaction.html#gdk-x11-get-server-time var gdk_x11_get_server_time = gdk.declare('gdk_x11_get_server_time', ctypes.default_abi, guint32, gdkwindow.ptr); var browserwindow_madeintogdkwinptr = gdkwindow.ptr(ctypes.uint64(gdkwindowptrstring)); var rez_gst = gdk_x11_get_server_time(browserwindow_madeintogdkwinptr); console.info('rez_gst:', rez_gst, uneval(rez_gst)); // return is a
number of ms since the computer (xserver) was on var rez_gwf = gdk_window_focus(browserwindow_madeintogdkwinptr, rez_gst); console.info('rez_gwf:', rez_gwf, uneval(rez_gwf)); // return is void so this will be undefined gdk.close(); gtk+ components.utils.import('resource://gre/modules/services.jsm'); var browserwindow = services.wm.getmostrecentwindow('navigator:browser'); if (!browserwindow) { ...
...id so cant do .tostring on it var browserwindow_madeintogtkwindowptr = ctypes.cast(gptr, gtkwindow.ptr); // focusing window this way is better, so it maintains proper history in case you or some other app want to focus "most recent window" by timestamp // var rez_gst = gdk_x11_get_server_time(browserwindow_madeintogdkwinptr); // console.info('rez_gst:', rez_gst, uneval(rez_gst)); // return is a
number of ms since the computer (xserver) was on // var rez_gwpwt = gtk_window_present_with_time(browserwindow_madeintogtkwindowptr, rez_gst); // console.info('rez_gwaf:', rez_gwpwt, uneval(rez_gwpwt)); var rez_gwp = gtk_window_present(browserwindow_madeintogtkwindowptr); console.info('rez_gwaf:', rez_gwaf, uneval(rez_gwaf)); gdk.close(); gtk.close(); x11 warning this example below does not focus a...
JavaScript timers - Archive of obsolete content
this timestamp is equal to the
number of milliseconds since the navigationstart attribute of the performance.timing interface.
... date.now() date.now() returns the
number of milliseconds elapsed since 1 january 1970 00:00:00 utc.
Enhanced Extension Installation - Archive of obsolete content
the format here is similar to firefox 1.0 except there is no longer a count value that needs to be kept in sync with the
number of lines...
... the file is written simply as extension#=<absolute path to item> and is read until there are no more
numbers.
Extension Versioning, Update and Compatibility - Archive of obsolete content
the * actually represents an infinitely high
number and so is really only sensibly used in the maxversion.
...--> <rdf:description about="urn:mozilla:extension:foobar@developer.mozilla.org"> <em:updates> <rdf:seq> <!-- each li is a different version of the same add-on --> <rdf:li> <rdf:description> <em:version>2.2</em:version> <!-- this is the version
number of the add-on --> <!-- one targetapplication for each application the add-on is compatible with --> <em:targetapplication> <rdf:description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minversion>1.5</em:minversion> <em:maxversion>2.0.0.*</em:maxversion> <!-- this is where this ve...
Jetpack Processes - Archive of obsolete content
individual lines of the form //@line 1 "foo.js" can be used to specify filename and line
number information for debugging purposes.
...the error object contains the following properties: filename, line
number, and message.
Appendix: What you should know about open-source software licenses - Archive of obsolete content
a
number of rhel clones have appeared, such as centos, where the trademarked parts have been scrubbed away by a community effort.
... because oss licenses aren’t directly applicable to these other media, a
number of other licenses for documents and other resources have appeared, such as the following: gnu free documentation license (gfdl) creative commons the gfdl is a license for documents and was created by the fsf, the same people behind the gpl and lgpl.
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
if you want to use terapad2, for example, insert the following: c:\app\tpad090\terapad.exe /jl=%l %f table 1: parameters used in mozunit parameter description %f filename %l line
number %c column
number the author uses meadow, which is opened using gnuserv.
...tests = { '2 1 +': function() { var calc = new rpncalc.rpncalc(); calc.init(); calc.push(2); calc.push(1); calc.plus(); assert.equals(calc.pop(), 3); } } listing 3: additional content for calc.js function rpncalc() { this.stack = new array(); } rpncalc.prototype = { init: function() { this.stack = new array(); }, push: function(val) { this.stack.push(
number(val)); }, _letfunc: function(func) { a = this.pop(); b = this.pop(); this.push(func(a, b)); }, plus: function() { return this._letfunc(this._plus); }, _plus: function(a, b) { return a + b; }, pop: function() { return this.stack.pop(); } } check for errors now you’re ready for your first test.
Chapter 1: Introduction to Extensions - Archive of obsolete content
this lowers the threshold both to using and to developing extensions; that fact, combined with firefox's rapidly growing popularity, has created a positive feedback loop, with the
number of extension users and extension developers growing explosively—there are now more than 7000 extensions and themes published at the firefox add-ons site (https://addons.mozilla.org).
... there are a
number of one-trick gag extensions that aren’t very useful.
Handling Preferences - Archive of obsolete content
firefox loads user preferences from a
number of sources.
...--> </preferences> after you define the preferences you need, you associate them with the form elements in your window or pane using the preference attribute: <textbox preference="xulschoolhello-message-count-pref" type="
number" min="0" max="100" /> in this case we use a numeric field to set the message count preference.
CSS3 - Archive of obsolete content
each module being standardized independently, the standard css consists of css2.1 amended and extended by the completed modules, not necessary all with the same level
number.
...this is useful to align
number on the decimal point.
progress - Archive of obsolete content
loaded unsigned long (long) the
number of bytes transferred since the beginning of the operation.
... total unsigned long (long) the total
number of bytes of content that will be transferred during the operation.
MMgc - Archive of obsolete content
[mem] private 5877 (23.0m) 100% [mem] mmgc 5792 (22.6m) 98% [mem] unmanaged 13 (52k) 0% [mem] managed 2596 (10.1m) 44% [mem] free 3081 (12.0m) 52% [mem] jit 0 (0k) 0% [mem] other 85 (340k) 1% [mem] bytes (interal fragmentation) 2527 (9.9m) 96% [mem] managed bytes 2520 (9.8m) 97% [mem] unmanaged bytes 7 (28k) 53% [mem] -------- gross stats end -----
numbers are in pages (with m and k in parens).
... private is the
number of private committed pages in the process, mmgc is the amount of memory gcheap has asked for from the os (not including jit).
FAQ - Archive of obsolete content
when the mozilla developers make changes like this, they increase the skin version
number.
... this is the
number that is defined in contents.rdf.
Style System Overview - Archive of obsolete content
pl ↓ ↓ ↓ ↓ h1 nscssdeclaration h2 ↙ ↘ nscsscolor — color: green nscsstext — text-align: right text-indent: 0 css style rule representation problem: the rule structures use too much memory (a few hundred kilobytes for all our chrome), and require large
numbers of allocations to construct.
...(thus these structs can be called inherited structs or reset structs.) in the normal case, a style rule has a small
number of declarations (hitting only a small
number of structs).
Using microformats - Archive of obsolete content
count() counts the
number of microformats in a document that match specified criteria.
... return value an integer value indicating the
number of microformats that match the specified criteria.
Code snippets - Archive of obsolete content
payload.engines[engine].version = 0; // or any other version
number you like.
... len = " + len + ", " + record.title); } } print an alphabetically sorted list of members of a collection components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); let ids = json.parse(new resource(weave.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.
Tabs - Archive of obsolete content
blah(lengthstringfocusedstringtostringstringpopstringpushstringreversestringshiftstringsortstringsplicestringunshiftstring)this is some default text lengththe
number of open tabsstring focusedthe current tab in your browserstring tostringstuffstring popstuffstring pushstuffstring reversestuffstring shiftstuffstring sortstuffstring splicestuffstring unshiftstuffstring onready()when the inherited document is fully loaded.
... urlurl to be openedstring jetpack.tabs.open("http://www.example.com/"); blah(lengthstringfocusedstringtostringstringpopstringpushstringreversestringshiftstringsortstringsplicestringunshiftstring)this is some default text lengththe
number of open tabsstring focusedthe current tab in your browserstring tostringstuffstring popstuffstring pushstuffstring reversestuffstring shiftstuffstring sortstuffstring splicestuffstring unshiftstuffstring onready()when the inherited document is fully loaded.
Monitoring downloads - Archive of obsolete content
firefox 3 introduces new api that allows any
number of listeners to observe downloads.
...these methods take as a parameter the zero-based index
number of the column whose value you wish to retrieve.
Remotely debugging Firefox for Metro - Archive of obsolete content
t the following required preference: devtools.debugger.remote-enabled = true you may also want to set these optional preferences: devtools.debugger.force-local = false (if you want to connect from a different machine over the network) devtools.debugger.remote-host (to change the tcp hostname where firefox will listen for connections) devtools.debugger.remote-port (to change the tcp port
number where firefox will listen for connections) devtools.debugger.prompt-connection = false (allow connections without displaying a confirmation prompt.
... if you are connecting to firefox for metro on a different computer or a different port, enter the appropriate hostname and port
number and then press "connect." in the windows 8 (metro) browser next you'll see a dialog in firefox for metro asking you to confirm the connection.
File object - Archive of obsolete content
instance properties file.length the length of the file in bytes, or the
number of entries in the directory.
... file.read() read a fixed
number of bytes from the file.
Running Tamarin acceptance tests - Archive of obsolete content
notes on using acceptance runtests.py threading in order to speed up the execution time of the acceptance testsuite, the runtests script automatically detects the
number of cores on the machine and sets an equivalent
number of threads.
...55bca954565 features avmsystem_32bit;avmsystem_unaligned_int_access;avmsystem_little_endian;avmsystem_arm;avmsystem_unix; avmfeature_jit;avmfeature_abc_interp;avmfeature_selftest;avmfeature_eval;avmfeature_protect_jitmem; avmfeature_shared_gcheap;avmfeature_cache_gqcn;avmfeature_safepoints;avmfeature_swf12;avmfeature_swf13;avmtweak_exact_tracing; running acceptance tests --androidthreads sets the
number of threads to the
number of phones found via usb.
Tamarin Build System Documentation - Archive of obsolete content
create a user repository, instructions are https://developer.mozilla.org/en/publishing_mercurial_clones go to the request a sandbox build page http://tamarin-builds.mozilla.org/build_trigger/requestbuild.cfm enter the repository url, revision
number, email address, and description.
...; cd scripts edit environment.sh, change the basedir and buildsdir settings (around line 51) basedir=~/hg/tamarin-redux (path to my test repository) (next line) buildsdir=~/hg/builds (a directory to store downloaded builds) always set current working directory to the scripts directory when running a script run a script (e.g.) ../all/run-acceptance-release.sh <optional hg revision
number like 1902> how do i navigate the build status page?
Venkman Internals - Archive of obsolete content
the starting line of the function is scriptwrapper.jsdscript.baseline
number (one based).
...from here, you can set and clear breakpoints by line
number (instead of by program counter), locate a scriptwrapper for a given line
number, and do a few other useful things.
confirm - Archive of obsolete content
method of install object syntax int confirm( string atext ); int confirm( string atext, string adialogtitle,
number abuttonflags, string abutton0title, string abutton1title, string abutton2title, string acheckmsg, object acheckstate ); parameters the second, extended confirm() method is supported starting with gecko 1.8.
... it accepts any
number of parameters up to 8.
Methods - Archive of obsolete content
getvalue
number retrieves the value of a key, when that value is an integer.
... setvalue
number sets the value of a key, when that value is an integer.
max - Archive of obsolete content
« xul reference home type: integer the maximum value that the scale or
number box may be set to.
... the default value is 100 for scales and infinity for
number boxes.
textbox.type - Archive of obsolete content
for more information about autocomplete textboxes, see the autocomplete documentation (xpfe [thunderbird/seamonkey]) (firefox)
number a textbox that only allows the user to enter
numbers.
...there are several attributes that allow the
number textbox to be configured, including decimalplaces, min, max, increment, wraparound, hidespinbuttons, and textbox.value.
Getting File Information - Archive of obsolete content
the nsifile object has a
number of useful attributes which may be used to retrieve information about a file.
... file.permissions = 0640; it is common to use an octal
number (a
number in base 8 beginning with 0) for permissions as it can make the value easier to read.
IO - Archive of obsolete content
it provides a
number of useful functions for dealing with files.
...the returned value is still a nsifile object, however a
number of methods may be used which are only of value for subdirectories.
MenuModification - Archive of obsolete content
modifying a menu menus have a
number of methods which may be used to add and remove items.
... menu.appenditem("open", ""); menu.removeitemat(menu.itemcount - 1); the itemcount property holds the
number of items within the menu.
Rule Compilation - Archive of obsolete content
var length = vbox.childnodes.length; this request to return the
number of children of the vbox will make the template builder process the query and output content.
...however, it also means that the dom api usage, such as an attempt to get the
number of child nodes as above, will also not include generated items until the menu is opened.
XML Templates - Archive of obsolete content
"/> <person name="julius caesar" gender="male"/> <person name="ferdinand magellan" gender="male"/> <person name="laura secord" gender="female"/> </people> <listbox datasources="#famouspeople" ref="*" querytype="xml"> <template> <query expr="person"/> <action> <listitem uri="?" label="?name"/> </action> </template> </listbox> here, an anchor reference, starting with a
number sign (#) is used for the datasources attribute.
... it refers to an element with that id (without the
number sign) and uses that node as the source xml node instead of a separate file.
Complete - Archive of obsolete content
these version checks depend on the version
numbers specified in the install.rdf file.
...to adopt this approach, set the maxversion to a large
number like 99.
Adding Style Sheets - Archive of obsolete content
you can include any
number of style sheets in a similar way.
...this can be done with the code below, allowing you to remove the import from the xul file: style import from xul: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> style import from css: @import url(chrome://global/skin/); the second syntax is preferred because it reduces the
number of dependencies within the xul file itself.
Commands - Archive of obsolete content
in addition, text fields and other widgets have a
number of commands which they already support that you can invoke.
...nsicontrollers has a
number of methods that may be used to manipulate the controllers.
Manifest Files - Archive of obsolete content
in this case, a version
number is being used as part of the theme name, but that is optional if you are making your own theme.
... mozilla doesn't handle the version
number in a special way; the version
number is just part of the theme name.
More Tree Features - Archive of obsolete content
the tree view has a
number of functions which specify the hierarchy of the items in a tree.
...you will need to save a
number of attributes as indicated in the example below: example 2 : source view <tree enablecolumndrag="true" flex="1"> <treecols> <treecol id="runner" label="runner" flex="2" persist="width ordinal hidden" /> <splitter class="tree-splitter" /> <treecol id="city" label="home city" flex="2" persist="width ordinal hidden" /> <splitter class="tree-splitter" /> <treecol id="starttime" ...
Popup Menus - Archive of obsolete content
this way, you can have a
number of popups and associate them with different elements.
...it can be set to a
number of values, which are described briefly below: after_start the popup appears below the element with the left edges of the element and the popup window aligned.
Property Files - Archive of obsolete content
the element has a
number of functions which can be used to get strings from the property file and get other locale information.
...getting a string from the bundle this stringbundle element has a
number of properties.
RDF Datasources - Archive of obsolete content
other mozilla datasources mozilla provides a
number of other built-in datasources.
...home.netscape.com/nc-rdf#name title of the page page http://home.netscape.com/nc-rdf#page page name referrer http://home.netscape.com/nc-rdf#referrer referrer of the page url http://home.netscape.com/nc-rdf#url url of the page visit count http://home.netscape.com/nc-rdf#visitcount
number of page visits a typical history list will display a tree with a selection of these fields.
Simple Menu Bars - Archive of obsolete content
creating a menu xul has a
number of different ways of creating menus.
...the menu features of xul consist of a
number of different elements which allow you to create menu bars or popup menus.
Toolbars - Archive of obsolete content
« previousnext » a toolbar is usually placed along the top of a window and contains a
number of buttons that perform common functions.
...adding a toolbar like a
number of elements, xul toolbars are a type of box.
XML - Archive of obsolete content
using a combination of xul's ready-made widgets (e.g., menubar, scrollbar, progressmeter, and so on) and xul's incorporation of such standards as html4, dom1/2, and cascading stylesheets, you can design any interface that you can imagine, using any
number of different features, tools, and methodologies.
...you can author an infinite
number of memos using our new markup language, and all will be structured in a consistent, foreseeable way.
XUL controls - Archive of obsolete content
<textbox type="autocomplete" autocompletesearch="history"/> textbox reference <textbox type="
number"> a textbox for entering
numbers.
... <textbox type="
number" min="1" max="20"/> textbox reference <textbox type="password"> a textbox that hides the characters typed, used for entering passwords.
browser - Archive of obsolete content
this boundary has a
number of special effects, such as making window.top == window (unless the browser is added to a chrome document), and preventing documents from inheriting the principal of the parent document.
...use a positive
number to go forward and a negative
number to go back.
menu - Archive of obsolete content
itemcount type: integer read only property holding the
number of child items.
...items are
numbered starting at the first item displayed in the list.
menupopup - Archive of obsolete content
x, y for an anchored popup, the x and y arguments may be used to offset the popup from its anchored position by some
number, measured in css pixels.
... to have a popup appear relative to another element yet still offset by some
number of pixels, determine the actual screen position of the element using the boxobject.screenx and boxobject.screeny properties of the element, and use those as the x and y arguments offset by the desired values.
tabs - Archive of obsolete content
itemcount type: integer read only property holding the
number of child items.
...items are
numbered starting at the first item displayed in the list.
tooltip - Archive of obsolete content
x, y for an anchored popup, the x and y arguments may be used to offset the popup from its anchored position by some
number, measured in css pixels.
... to have a popup appear relative to another element yet still offset by some
number of pixels, determine the actual screen position of the element using the boxobject.screenx and boxobject.screeny properties of the element, and use those as the x and y arguments offset by the desired values.
wizard - Archive of obsolete content
pagecount type: integer this property holds the
number of pages in the wizard.
... pagestep type: integer this property returns the
number of pages that the user has navigated through so far, meaning that the user would press the back button this many times to go back to the beginning.
XUL Application Packaging - Archive of obsolete content
required name example: name=testapplication version specifies the application version
number.
... required see toolkit version format for version
numbering details example: version=0.1 buildid specifies a unique build identifier.
2006-11-03 - Archive of obsolete content
on november 2nd gery replied with the bug
number 358706.
... announcements a change in tp2's
numbers on october 31st adam guthrie announced that: rob helmer will be adding his patch to fix tp2's reporting of average pre-load times.
2006-11-10 - Archive of obsolete content
code freeze for these versions is on november 26 version
numbering changes paul reed announced changes to the way version
numbers are done for pre-releases.
... discussion version
numbering changes some discussion about paul's announcement of version
number changes meetings november 6 project status meeting (notes) november 7 bon echoe status meeting (notes) november 8 gecko 1.9/gran paradiso status meeting: (agenda) ...
Monitoring plugins - Archive of obsolete content
below are a
number of javascript snippets that would be useful to developers trying to use this feature: registration to register for runtime notifications with the observer service you must create a class with an observe method which receives 3 parameters (subject, topic and data) as well as a register method that contains the following code: var observerservice = components.classes["@mozilla.org/observer-ser...
...n length: observe: function(subject, topic, data) { if (topic == "experimental-notify-plugin-call" ) { if (data > 0.500) { alert("runtime is: " + data); } } } note: this is just a simplified example and the use of alert() is discouraged as the component can send hundreds of notifications each second and could potentially cause your browser to crash if an excessive
number of alert boxes are displayed.
NPN_Invoke - Archive of obsolete content
argcount the
number of arguments in the args array.
...description the method arguments are passed as an array of npvariants, and the
number of arguments is passed in.
NPN_Write - Archive of obsolete content
returns if successful, the function returns a positive integer representing the
number of bytes written (consumed by the browser).
... this
number depends on the size of the browser's memory buffers, the
number of active streams, and other factors.
NPString - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npstring is a struct 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.
...utf8length the
number of bytes in the utf-8 string (not the
number of characters).
NPAPI plugin reference - Archive of obsolete content
(remark: hence the name "npp_write" is misleading - just think of:"data_arrived") npp_writeready determines maximum
number of bytes that the plug-in can consume.
... npstring npstring is a struct 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.
Why RSS Slash is Popular - Counting Your Comments - Archive of obsolete content
tle>review of sin city</title> <guid>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:2005/05/15/114</guid> <pubdate>sun, 15 may 2005 13:02:08 -0500</lastbuilddate></pubdate> <link>http://www.example.com/blog/2005/05/15/114</link> <slash:comments>43</slash:comments> </item> <item> <title>what is the 3571st prime
number</title> <guid>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:2005/05/15/113</guid> <pubdate>sun, 15 may 2005 10:55:12 -0500</lastbuilddate></pubdate> <link>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:2005/05/15/113</link> <slash:comments>72</slash:comments> </item> <item> <title>first article!</title> ...
...this element gives the (current) total
number of comments made for the item -- for the blog post.
What is RSS - Archive of obsolete content
if you notice though, the rss versioning
number got all messed up at this point, since rss 0.92 is newer than rss 1.0.
...userland bumped up the version
number all the way up to 2.0 because the rss-dev working group already used 1.0 with their rdf-based rss 1.0.
NSPR Release Engineering Guide - Archive of obsolete content
feature complete update ...pr/include/prinit.h with release
numbers build all targets, debug and optimized on all platforms using local directories run the test suite on all targets verify release
numbers show up in binaries resolve testing anomalies tag the tree with nsprpub_release_x_y_z_beta beta release checkout a whole new tree using the tag from above build all targets, debug and optimized on all platforms using the command: gmake release mdist=<dir>/mdist build_
number=vx.y.z [build_opt=1 | use_debug_rtl=1] copy the bits from mdist to /share/builds/components/nspr20/.vx.y.z 1 run exp...
...lode.pl run the test suite on all targets, using binaries & headers from shipped bits resolve testing anomalies tag the tree with nsprpub_release_x_y[_z] release candidate checkout a whole new tree using tag (including fixes) tag the treey with nsprpub_release_x_y_z build all targets, debug and optimized on all platforms using the command: gmake release mdist=<dir>/mdist build_
number=vx.y.z [build_opt=1 | use_debug_rtl=1] copy the bits from mdist to /share/builds/components/nspr20/.vx.y.z in /share/builds/components/nspr20/ run the following scripts: explode.pl rename.sh symlink.sh rtm bits rename the .vx.y.z directory to vx.y.z (remove the hidden directory 'dot').
Threats - Archive of obsolete content
for example, someone could learn your credit card
number, record a sensitive conversation, or intercept classified information.
... phishing is a method of a social engineering with the goal of obtaining sensitive data such as passwords, usernames, credit card
numbers.
Vulnerabilities - Archive of obsolete content
an example is the
number of consecutive failed authentication attempts to permit before locking out a user account.
... because of the
number of vulnerabilities inherent in security configuration settings and software feature misuse possibilities, plus the
number of software flaw vulnerabilities on a system at any given time, there may be dozens or hundreds of vulnerabilities on a single system.
Theme changes in Firefox 3 - Archive of obsolete content
browser changes requiring theme updates there are a
number of changed and deleted files in the browser that may require you to make changes to your theme.
... mac os x mac os x themes for firefox 3 should add these two rules to the end of chrome://global/skin/wizard.css: .wizard-buttons-btm { padding:xpx; } .wizard-label-box { display: none; } the numeric value ofx, the
number of pixels of padding in .wizard-buttons-btm, should be the same as the value of the margin for .wizard-buttons-box-2.
CSS - Archive of obsolete content
serves as the region's data source.-ms-high-contrast-adjustthe -ms-high-contrast-adjust css property is a microsoft extension that gets or sets a value indicating whether to override any css properties that would have been set in high contrast mode.-ms-hyphenate-limit-charsthe -ms-hyphenate-limit-chars css property is a microsoft extension that specifies one to three values indicating the minimum
number of characters in a hyphenated word.
... if the word does not meet the required minimum
number of characters in the word, before the hyphen, or after the hyphen, then the word is not hyphenated.-ms-hyphenate-limit-linesthe -ms-hyphenate-limit-lines css property is a microsoft extension specifying the maximum
number of consecutive lines in an element that may be ended with a hyphenated word.-ms-hyphenate-limit-zonethe -ms-hyphenate-limit-zone css property is a microsoft extension specifying the width of the hyphenation zone.-ms-ime-alignthe -ms-ime-align css property is a microsoft extension aligning the input method editor (ime) candidate window box relative to the element on which the ime composition is active.
Generator comprehensions - Archive of obsolete content
var
numbers = [1, 2, 3]; // generator function (function*() { for (let i of
numbers) { yield i * i; } })(); // generator comprehension (for (i of
numbers) i * i ); // result: both return a generator which yields [1, 4, 9] example 2: using if in generator.
... var
numbers = [1, 2, 3]; // generator function (function*() { for (let i of
numbers) { if (i < 3) { yield i * 1; } } })(); // generator comprehension (for (i of
numbers) if (i < 3) i); // result: both return a generator which yields [1, 2] specifications generator comprehensions were initially in the ecmascript 2015 draft, but got removed in revision 27 (august 2014).
Error.description - Archive of obsolete content
try { // cause an error: x = y } catch(e) { // prints "[object error]": document.write(e) document.write (" "); // prints 5009: document.write((e.
number & 0xffff)) document.write (" "); // prints "'y' is undefined": document.write(e.description); document.write (" "); // prints "'y' is undefined": document.write(e.message) } requirements supported in the following document modes: quirks, internet explorer 6 standards, internet explorer 7 standards, internet explorer 8 standards, internet explorer 9 standards, internet explorer ...
... applies to: error object see also
number property (error) message property (error) name property (error) ...
VBArray.lbound - Archive of obsolete content
if dimension is greater than the
number of dimensions in the vbarray, or is negative, the method generates a "subscript out of range" error.
...the second part is javascript code that determines the
number of dimensions in the safe array and the lower bound of each dimension.
VBArray.ubound - Archive of obsolete content
if dim is greater than the
number of dimensions in the vbarray, or is negative, the method generates a "subscript out of range" error.
...the second part is javascript code that determines the
number of dimensions in the safe array and the upper bound of each dimension.
VBArray - Archive of obsolete content
the dimensions method retrieves the
number of dimensions in the array; the lbound and ubound methods retrieve the range of indices used by each dimension.
... methods vbarray.dimensions returns the
number of dimensions in a vbarray.
Microsoft JavaScript extensions - Archive of obsolete content
microsoft browsers (internet explorer, and in a few cases, microsoft edge) support a
number of special microsoft extensions to the otherwise standard javascript apis.
... objects activexobject debug enumerator vbarray functions getobject scriptengine scriptenginebuildversion scriptenginemajorversion scriptengineminorversion statements @cc-on @if @set other date.getvardate() error.description error.
number error.stacktracelimit ...
New in JavaScript 1.1 - Archive of obsolete content
--> new features in javascript 1.1 new objects array boolean function
number new properties
number.max_value
number.min_value nan
number.negative_infinity
number.positive_infinity new methods array.prototype.join() array.prototype.reverse() array.prototype.sort() array.prototype.split() new operators typeof void other new features <noscript> liveconnect.
... isnan() now works on every platform (not only unix anymore) parsefloat() and parseint() now return nan on all platforms, if the first character of the specified string cannot be converted to a
number; in previous releases, it returned nan on solaris and irix and zero on all other platforms.
JSException - Archive of obsolete content
lineno the line
number of the file, if possible.
... declaration public int getwrappedexceptiontype() description getwrappedexceptiontype() returns an int that matches one of the following static ints declared by the jsexception class: exception_type_empty exception_type_void exception_type_object exception_type_function exception_type_string exception_type_
number exception_type_boolean ...
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
overview there are a
number of standards, procedures, and processes that an organization can use.
...trical and electronics engineers ) ietf (internet engineering task force ) irtf (internet research task force ) iso (international standards organization ) itu (international telecommunication union ) oasis (organization for the advancement of structured information standards ) oma (open mobile alliance ), uni (unicode consortium ) w3c (world wide web consortium ) iana (internet assigned
numbers authority ) ecma international like the processes and standards that accountants and project managers must follow, the above-mentioned standards organizations provide focus and direction for the development engineering community.
Describing microformats in JavaScript - Archive of obsolete content
microformat definition format the microformat definition must contain the following entries: mfversion specifies the version
number of the microformat api to which the definition was written.
...possible values are: datetime an iso date anyuri a uri email an email address tel a telephone
number html html including tags float a floating-point
number microformat a microformat microformat_property a specific property within the microformat specified by microformat.
Windows Media in Netscape - Archive of obsolete content
scripting the windows media player control the
number of methods and properties that are exposed by the windows media player, including the events that the player throws for handling by scripts in the web page containing the control, are covered in detail by the windows media player sdk.
...for example, the following uses dhtml behaviors to associate a set of behaviors with a span element, which is then interrogated for its version
number (the script attempts to verify that the windows media player control is at version 9): <span style="behavior:url(#default#clientcaps)" id="cc"></span> <script language=javascript> var cv = cc.getcomponentversion( "{6bf52a52-394a-11d3-b153-00c04f79faa6}", "componentid" ); if (cv == null || cv == "") { top.location.href = "http://foo.bar.foo/checkref"; } </script> netscape 7.1 does not sup...
Examples - Game development
this page lists a
number of impressive web technology demos for you to get inspiration from, and generally have fun with.
... 2048 a sliding
number tiles puzzle game.
Building up a basic demo with A-Frame - Game development
we are passing some initial variables to that shape: the radius of the outer edge of the torus, the radius of the tube, and
number of segments along the circumference of the tube face respectively.
...the community is growing, just like the
number of supported vr devices — it's a great time to start experimenting with such frameworks.
Implementing controls using the Gamepad API - Game development
there's also a
number of other devices with various different button layouts that more or less work across browser implementations.
...now the length of the array of gamepads has to be n+1 where n is the
number of connected devices — when there's one device connected and it has the index of 1, the array's length is 2 and it will look like this: [null, [object gamepad]].
Track the score and win - Game development
the first parameter is the text itself — the code above shows the current
number of points — and the last two parameters are the coordinates where the text will be placed on the canvas.
... compare your code the latest code looks (and works) like this, in case you want to compare and contrast it with yours: exercise: add more points per brick hit, print out the
number of collected points in the end game alert box.
Falsy - MDN Web Docs Glossary: Definitions of Web-related terms
there are 8 falsy values: false the keyword false 0 the
number zero -0 the
number negative zero 0n bigint, when used as a boolean, follows the same rule as a
number.
... "" empty string value null null - the absence of any value undefined undefined - the primitive value nan nan - not a
number objects are falsy if and only if they have the [[ishtmldda]] internal slot.
NaN - MDN Web Docs Glossary: Definitions of Web-related terms
nan (not a
number) is a numeric data type that means an undefined value or value that cannot be represented, especially results of floating-point calculations.
... for example, nans can represent infinity, result of division by zero, missing value, or the square root of a negative (which is imaginary, whereas a floating-point
number is real).
RGB - MDN Web Docs Glossary: Definitions of Web-related terms
each color is described by a sequence of three
numbers (typically between 0.0 and 1.0, or between 0 and 255) that represent the different intensities (or contributions) of red, green, and blue, in determining the final color.
...in opengl, webgl, and glsl the red-green-blue components are fractions (floating-point
numbers between 0.0 and 1.0), although in the actual color buffer they are typically stored as 8-bit integers.
Recursion - MDN Web Docs Glossary: Definitions of Web-related terms
examples recursive function calls itself until condition met the following python code defines a function that takes a
number, prints it, and then calls itself again with the
number's value -1.
... it keeps going until the
number is equal to 0, in which case it stops.
Type - MDN Web Docs Glossary: Definitions of Web-related terms
for example, a boolean data type can hold only a true or false value at any given time, whereas a string has the ability to hold a string or a sequence of characters, a
number can hold numerical values of any kind, and so on.
...for example, a value of type
number can be multiplied by another
number, but not by a string - even if that string contains only a
number, such as the string "2".
Unicode - MDN Web Docs Glossary: Definitions of Web-related terms
unicode is a standard character set that
numbers and defines characters from the world's different languages, writing systems, and symbols.
... by assigning each character a
number, programmers can create character encodings, to let computers store, process, and transmit any combination of languages in the same file or program.
MDN Web Docs Glossary: Definitions of Web-related terms
mozilla firefox mutable mvc n namespace nan nat native navigation directive netscape navigator network throttling nntp node node (dom) node (networking) node.js non-normative normative null nullish value
number o object object reference oop opengl openssl opera browser operand operator origin ota owasp p p2p pac packet page load time page prediction parameter parent object parse parser ...
... property property (css) property (javascript) protocol prototype prototype-based programming proxy server pseudo-class pseudo-element pseudocode public-key cryptography python q quality values quaternion quic r rail random
number generator raster image rdf real user monitoring (rum) recursion reference reflow regular expression rendering engine repo reporting directive request header resource timing response header responsive web design rest rgb ril robots.txt ...
Assessment: Accessibility troubleshooting - Learn web development
previous overview: accessibility in the assessment for this module, we present to you a simple site with a
number of accessibility issues that you need to diagnose and fix.
...as it stands, it has a
number of accessibility issues — your task is to explore the existing site and fix them to the best of your abilities, answering the questions given below.
CSS and JavaScript accessibility best practices - Learn web development
there are a
number of contrast checking tools online that you can enter your foreground and background colors into, to check them.
... real form validation would be much more complex than this — you'd want to check that the entered name actually looks like a name, the entered age is actually a
number and is realistic (e.g.
Cascade and inheritance - Learn web development
note: on mdn css property reference pages you can find a technical information box, usually at the bottom of the specifications section, which lists a
number of data points about that property, including whether it is inherited or not.
...selector seven, however, beats both five and six — it has the same
number of sub-selectors in the chain as five, but an element has been swapped out for a class selector.
Test your skills: tables - Learn web development
there are a
number of ways that you can achieve this, but i suggest following similar patterns as used in the tutorial to do the following things.
... align headings and data for columns containing
numbers right.
The box model - Learn web development
there are a
number of rules that dictate when margins do and do not collapse.
... for styling borders, there are a large
number of properties — there are four borders, and each border has a style, width and color that we might want to manipulate.
Practical positioning examples - Learn web development
in addition, so-called "single page apps" are becoming very popular — especially for mobile web uis — because having everything served as a single file cuts down on the
number of http requests required to view all the content, thereby improving performance.
...when run, the function is passed a reference to the particular tab it is being run for, and an index
number i that indentifies the tab's position in the tabs array.
Getting started with CSS - Learn web development
there are a
number of selectors that can help you here, but for now we will look at just a couple.
... wrapping up in this tutorial, we have taken a look at a
number of ways in which you can style a document using css.
How do you set up a local testing server? - Learn web development
to check python is installed, enter the following command: python -v # or you might have the py command available, # in which case try py -v this should return a version
number.
... note: if you already have something running on port 8000, you can choose another port by running the server command followed by an alternative port
number, e.g.
Basic native form controls - Learn web development
they can be constrained in size (the physical size of the box) and maxlength (the maximum
number of characters that can be entered into the box).
... note: html5 enhanced the basic original single line text field by adding special values for the type attribute that enforce specific validation constraints and other features, for example specific to entering urls or
numbers.
Other form controls - Learn web development
rows specifies the
number of visible text rows for the control.
... <progress max="100" value="75">75/100</progress> this is for implementing anything requiring progress reporting, such as the percentage of total files downloaded, or the
number of questions filled in on a questionnaire.
Sending form data - Learn web development
the http protocol provides several ways to perform a request; html form data can be transmitted via a
number of different methods, the most common being the get method and the post method to understand the difference between those two methods, let's step back and examine how http works.
... the website security article of our server-side learning topic discusses a
number of common attacks and potential defences against them in detail.
Test your skills: HTML5 controls - Learn web development
create appropriate inputs for a user to update their details for: email website phone
number favourite color try updating the 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.
... html5 controls 2 next, we want you to implement a slider control to allow the user to choose a maximum
number of people to invite to their party.
Advanced text formatting - Learn web development
for example: <p>my birthday is on the 25<sup>th</sup> of may 2001.</p> <p>caffeine's chemical formula is c<sub>8</sub>h<sub>10</sub>n<sub>4</sub>o<sub>2</sub>.</p> <p>if x<sup>2</sup> is 9, x must equal 3 or -3.</p> the output of this code looks like so: representing computer code there are a
number of elements available for marking up computer code using html: <code>: for marking up generic pieces of computer code.
...--> <time datetime="19:30:01.856">19:30:01.856</time> <!-- date and time --> <time datetime="2016-01-20t19:30">7.30pm, 20 january 2016</time> <!-- date and time with timezone offset --> <time datetime="2016-01-20t19:30+01:00">7.30pm, 20 january 2016 is 8.30pm in france</time> <!-- calling out a specific week
number --> <time datetime="2016-w04">the fourth week of 2016</time> test your skills!
Debugging HTML - Learn web development
you'll see that each message comes with a line and column
number to help you to locate the error easily.
...the line
numbers point to the last few lines of the file, and this error message comes with a line of code that points out an example of an open element: example: <a href="https://www.mozilla.org/>link to mozilla homepage</a> ↩ </ul>↩ </body>↩</html> note: an attribute missing a closing quote can result in an open element because the rest of the document is interpreted as the attribute's content.
Document and website structure - Learn web development
previous overview: introduction to html next in addition to defining individual parts of your page (such as "a paragraph" or "an image"), html also boasts a
number of block level elements used to define areas of your website (such as "the header", "the navigation menu", "the main content column").
... in your html code, you can mark up sections of content based on their functionality — you can use elements that represent the sections of content described above unambiguously, and assistive technologies like screenreaders can recognise those elements and help with tasks like "find the main navigation", or "find the main content." as we mentioned earlier in the course, there are a
number of consequences of not using the right element structure and semantics for the right job.
Getting started with HTML - Learn web development
anchors can take a
number of attributes, but several are as follows: href: this attribute's value specifies the web address for the link.
...nto the input box --> <input type="text" disabled> <!-- text input is allowed, as it doesn't contain the disabled attribute --> <input type="text"> for reference, the example above also includes a non-disabled form input element.the html from the example above produces this result: omitting quotes around attribute values if you look at code for a lot of other sites, you might come across a
number of strange markup styles, including attribute values without quotes.
HTML text fundamentals - Learn web development
it has been adapted from a
number of different recipes that i have read over the years.
...it has been adapted from a
number of different recipes that i have read over the years.</p>\n\n<p>hummus is a delicious thick paste used heavily in greek and middle eastern dishes.
Responsive images - Learn web development
and conversely, a small raster image starts to look grainy when displayed larger than its original size (a raster image is a set
number of pixels wide and a set
number of pixels tall, as we saw when we looked at vector graphics).
...responsive image technologies were implemented recently to solve the problems indicated above by letting you offer the browser several image files, either all showing the same thing but containing different
numbers of pixels (resolution switching), or different images suitable for different space allocations (art direction).
Video and audio content - Learn web development
this kind of technology worked ok, but it had a
number of problems, including not working well with html/css features, security issues, and accessibility issues.
... other <video> features there are a
number of other features you can include when displaying an html video.
General asynchronous programming concepts - Learn web development
overview: asynchronous next in this article, we'll run through a
number of important concepts relating to asynchronous programming, and how this looks in web browsers and javascript.
...we couldn't render our 1 million blue circles inside our worker; it can basically just do the
number crunching.
Asynchronous JavaScript - Learn web development
guides general asynchronous programming concepts in this article we'll run through a
number of important concepts relating to asynchronous programming, and how this looks in web browsers and javascript.
...a set
number of times per second), talk about what they are useful for, and look at their inherent issues.
Test your skills: Functions - Learn web development
the three improvements we want you to make are: refactor the code that generates the random
number into a separate function called random(), which takes as parameters two generic bounds that the random
number should be between, and returns the result.
... update the choosename() function so that it makes use of the random
number function, takes the array to choose from as a parameter (making it more flexible), and returns the result.
Manipulating documents - Learn web development
it is useful to familiarize yourself with this terminology before working with the dom, as a
number of the code terms you'll come across make use of them.
...you just have to make sure your data is in the right format; javascript makes it easier than many other languages, being weakly typed — for example
numbers will convert to strings automatically when you want to print them to the screen.
What is JavaScript? - Learn web development
script loading strategies there are a
number of issues involved with getting scripts to load at the right time.
...troubleshooting javascript storing the information you need — variables basic math in javascript —
numbers and operators handling text — strings in javascript useful string methods arrays assessment: silly story generator ...
Working with JSON - Learn web development
you can include the same basic data types inside json as you can in a standard javascript object — strings,
numbers, arrays, booleans, and other object literals.
...so for example, a single string or
number would be a valid json object.
Object-oriented JavaScript for beginners - Learn web development
there are lots of things you could know about a person (their address, height, shoe size, dna profile, passport
number, significant personality traits ...) , but in this case we are only interested in showing their name, age, gender, and interests, and we also want to be able to write a short introduction about them based on this data, and get them to say hello.
...think about how the sentences should be structured differently depending on gender, and depending on whether the
number of listed interests is 1, 2, or more than 2.
Aprender y obtener ayuda - Learn web development
videos there are also a
number of sites that have video learning content on them.
... browser testing it is often a good idea to see if your problem is affecting all browsers, or whether it only occurs in one or a small
number of browsers.
Web performance - Learn web development
in this article we discuss the impact images have on performance, and the methods to reduce the
number of bytes sent per image.
...by minimizing the
number of dom nodes, making sure the best order and attributes are used for including content such as styles, scripts, media, and third-party scripts, you can drastically improve the user experience.
Accessibility in React - Learn web development
using useeffect() to control our heading focus now that we've stored how many tasks we previously had, we can set up a useeffect() hook to run when our
number of tasks changes, which will focus the heading if the
number of tasks we have now is less than with it previously was — i.e.
...the dependencies passed into this hook ensure it will only try to re-run when either of those values (the
number of current tasks, or the
number of previous tasks) changes.
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
d:this={todosstatus} {todos} /> now we can call the exported focus() method from our removetodo() function: function removetodo(todo) { todos = todos.filter(t => t.id !== todo.id) todosstatus.focus() // give focus to status heading } go back to your app — now if you delete any todo, the status heading will be focussed — this is useful to highlight the change in
numbers of todos, both to sighted users and screenreader users.
... repl to see the current state of the code in a repl, visit: https://svelte.dev/repl/d1fa84a5a4494366b179c87395940039?version=3.23.2 summary in this article we have finished adding all the required functionality to our app, plus we've taken care of a
number of accessibility and usability issues.
Embedding API for Accessibility
for double-sized text, use nsidomwindow::settextzoom(2.0); using accessibility preferences there are a
number of prefs related to accessibility.
...be aware that in debug builds, this can cause a great
number of assertions (bug 71598) to use prefs in embedding, use something like the following code: #include "nsipref.h"; nsresult rv; nscomptr<nsipref> prefs(do_getservice(ns_pref_contractid, &rv)); prefs->setboolpref("bool.pref.name", pr_true /* or pr_false */); prefs->setintpref("int.pref.name", newvalue); prefs->setcharpref("string.pref.name", newcharstarvalue); to manually add a pref to your settings, add a line like the following to your prefs.js: user_pref("accessibility.browsewithcaret", true); accessibility prefs refere...
Mozilla’s UAAG evaluation report
(p1) vg renders html, css, and a
number of graphic image formats.
...(p1) c uses standard keyboard api, works with a
number of assistive technologies 6.7 api character encodings.
Accessible Toolkit Checklist
get_accchildcount: get the
number of children of an iaccessible.
... get_accvalue: get the "value" of the iaccessible, for example a
number in a slider, a url for a link, the text a user entered in a field.
Cookies Preferences in Mozilla
and seamonkey versions.) 4 = storage access policy: block cookies from trackers network.cookie.lifetimepolicy default value: 0 0 = accept cookies normally 1 = prompt for each cookie (prompting was removed in firefox 44) 2 = accept for current session only 3 = accept for n days network.cookie.lifetime.days default value: 90 only used if network.cookie.lifetimepolicy is set to 3 sets the
number of days that the lifetime of cookies should be limited to.
... network.cookie.alwaysacceptsessioncookies default value: false only used if network.cookie.lifetimepolicy is set to 1 true = accepts session cookies without prompting false = prompts for session cookies network.cookie.thirdparty.sessiononly default value: false true = restrict third party cookies to the session only false = no restrictions on third party cookies network.cookie.max
number default value: 1000 configures the maximum amount of cookies to be stored valid range is from 0-65535, rfc 2109 and 2965 require this to be at least 300 network.cookie.maxperhost default value: 50 configures the maximum amount of cookies to be stored per host valid range is from 0-65535, rfc 2109 and 2965 require this to be at least 20 network.cookie.disablecookieformailnews default value: tru...
HTTP logging
this is accomplished by splitting the log into up to 4 separate files (their filenames have a
numbered extension, .0, .1, .2, .3) the logging back end cycles the files it writes to, while ensuring that the sum of these files’ sizes will never go over the specified limit.
... note 1: the file with the largest
number is not guarantied to be the last file written!
SVG Guidelines
ill-rule attribute when the element is a descendant of a <clippath> unreferenced/unused clip paths, masks or defs (example) styling basics privilege short lowercase hex for colors don't use excessive precision for numeric values (usually comes from illustrator) use descriptive ids avoid inline styles and use class names or svg attributes examples here are some examples for excessive
number precision: 5.000000e-02 → 0.05 (as seen here) -3.728928e-10 → 0 (as seen here) translate(0.000000, -1.000000) → translate(0, -1) (as seen here) as for descriptive ids: for gradients: svg_id1 → gradient1 (as seen here) use of class names avoid using a class if that class is only used once in the file if that class only sets a fill or a stroke, it's better to set the fill/st...
...lete command line tool: https://github.com/svg/svgo alternatives to svgo: https://github.com/razrfalcon/svgcleaner https://github.com/scour-project/scour gui for command line tool (use with "prettify code" and "remove <title>" options on): https://jakearchibald.github.io/svgomg/ good alternative to svgo/svgomg: https://petercollingridge.appspot.com/svg-editor fixes the excessive
number precision: https://simon.html5.org/tools/js/svg-optimizer/ converts inline styles to svg attributes: https://www.w3.org/wiki/svgtidy raphaeljs has a couple of utilities that may be useful: raphael.js ...
Error codes returned by Mozilla APIs
ns_error_dom_invalid_expression_err (0x805b0033) ns_error_dom_type_err (0x805b0034) ns_error_dom_security_err (0x805303e8) ns_error_dom_secman_err (0x805303e9) ns_error_dom_wrong_type_err (0x805303ea) ns_error_dom_not_object_err (0x805303eb) ns_error_dom_not_xpc_object_err (0x805303ec) ns_error_dom_not_
number_err (0x805303ed) ns_error_dom_not_boolean_err (0x805303ee) ns_error_dom_not_function_err (0x805303ef) ns_error_dom_too_few_parameters_err (0x805303f0) ns_error_dom_bad_document_domain (0x805303f1) ns_error_dom_prop_access_denied (0x805303f2) ns_error_dom_xpconnect_access_denied (0x805303f3) ns_error_dom_bad_uri (0x805303f4) ns_error_dom_retval_undefined (0x805303f5...
...0x80570016) ns_error_xpc_bad_cid (0x80570017) ns_error_xpc_bad_iid (0x80570018) ns_error_xpc_cant_create_wn (0x80570019) ns_error_xpc_js_threw_exception (0x8057001a) ns_error_xpc_js_threw_native_object (0x8057001b) ns_error_xpc_js_threw_js_object (0x8057001c) ns_error_xpc_js_threw_null (0x8057001d) ns_error_xpc_js_threw_string (0x8057001e) ns_error_xpc_js_threw_
number (0x8057001f) ns_error_xpc_javascript_error (0x80570020) ns_error_xpc_javascript_error_with_details (0x80570021) ns_error_xpc_cant_convert_primitive_to_array (0x80570022) ns_error_xpc_cant_convert_object_to_array (0x80570023) ns_error_xpc_not_enough_elements_in_array (0x80570024) ns_error_xpc_cant_get_array_info (0x80570025) ns_error_xpc_not_enough_chars_in_string (0x80...
Firefox UI considerations for web developers
there are a
number of places within the firefox user interface where web sites are listed for the user to choose a destination to visit or a site to manage in some way.
... top sites the top sites box lists a user-configurable
number of rows of icons serving as quick links to sites the user commonly visits, or that the user has chosen to pin to the top sites list in order to have quick access to them.
HTMLIFrameElement.getScreenshot()
parameters maxwidth a
number representing the maximum width of the screenshot in device pixels.
... maxheight a
number representing the maximum height of the screenshot in device pixels.
HTMLIFrameElement.getVolume()
the volume value is available in the request.result property, and is a floating point
number between 0 and 1.
... promise version: a promise that resolves with the volume value — a floating point
number between 0 and 1.
mozbrowserresize
details the details property returns an anonymous javascript object with the following properties: width a
number representing the new width of the <iframe> viewport, in device pixels.
... height a
number representing the new height of the <iframe> viewport, in device pixels.
mozbrowserscroll
details the details property returns an anonymous javascript object with the following properties: top a
number representing the new vertical scroll position of the <iframe> viewport — in css pixels — from the top of the viewport.
... left a
number representing the new horizontal scroll position of the <iframe> viewport — in css pixels — from the left of the viewport.
mozbrowserscrollareachanged
details the details property returns an anonymous javascript object with the following properties: width a
number representing the new scroll area width of the <iframe> viewport, in css pixels.
... height a
number representing the new scroll area height of the <iframe> viewport, in css pixels.
HTMLIFrameElement.setVolume()
syntax instanceofhtmliframeelement.setvolume(
number); returns void.
... parameters
number a floating point
number representing the volume you want to set — this can have a value between 0 and 1.
Embedding the editor
they should need to do as little work as possible to get basic editing functionality, be able to have any
number of <editor>s per window, and control whether those <editor>s are in html or plain text mode.
...current problems the current composer architecture was created while other parts of mozilla were still under development, and as a result it suffers from a
number of shortcomings, and anachronisms.
Getting Started with Chat
the following are some helpful commands which can be used by firebot: bug ###### when a bug
number is mentioned in a message, firebot automatically displays the link and summary from bugzilla for that bug.
... /msg firebot cid displays a unique 128-bit
number which can be used to identify a class or component.
IME handling guide
ime is used by chinese, japanese, korean and taiwan users for inputting chinese characters because the
number of them is beyond thousands and cannot be input from the keyboard directly.
... "text", "password", "
number", etc.
AddonType
uipriority integer a
number used to determine the order of types displayed in the user interface.
... the lower the
number the higher in the list the type will appear.
Add-on Repository
void retrieverecommendedaddons( in integer maxresults, in searchcallback callback ); parameters maxresults the maximum
number of results to return.
... maxresults the maximum
number of results to return.
CustomizableUI.jsm
negative values or values greater than the
number of widgets will be interpreted to mean moving the widget to respectively the first or last position.
... panel_column_count
number 3, the (constant)
number of columns in the menu panel.
Using the viewport meta tag to control layout on mobile browsers
it can be set to a specific
number of pixels like width=600 or to the special value device-width, which is the width of the screen in css pixels at a scale of 100%.
...it is recommended that the pixel unit refer to the whole
number of device pixels that best approximates the reference pixel.
Mozilla DOM Hacking Guide
static print32 getarrayindexfromid(jscontext *cx, jsval id, prbool *ais
number = nsnull): if the js value is an integer, then *ais
number is true, and the integer is returned.
... else, *ais
number is false and -1 is returned.
Mozilla Port Blocking
"access to the port
number given has been disabled for security reasons." "establishing a connection to an unsafe or otherwise banned port was prohibited" "0x804b0013 (ns_error_port_access_not_allowed)" if your product or web site uses a port which is blocked by mozilla's default port blocking rules, you can either change the port of your service to a unblocked value (recommended if possible) or ask your mozilla users to e...
...modifying mozilla's port blocking at run time users can modify the default port blocking through the addition of preferences containing comma delimited lists of port
numbers to the user.js file (for single users with the user_pref(…) command) in the user's profile directory.
Profiling with Xperf
(note that it's not the first version
number in the about window; that's the windows version.) if you have an older version, you will experience bugs, especially around symbol loading for local builds.
... disabling all but one core will make the
numbers add up to 100%.
about:memory
don't click "measure..." repeatedly, because that will cause the memory usage of about:memory itself to rise, due to it discarding and regenerating large
numbers of dom nodes.
...if this
number is low, it's likely that memory allocations will fail due to lack of virtual address space quite soon.
Phishing: a short definition
as most phishing attacks start with unsolicited email messages, a clear starting point is improving spam filters, thus reducing the
number of fraudulent messages reaching users.
... verification via text message if a service supports verification, via sms, it sends a text message with a one-time pin to the user’s phone
number.
AsyncTestUtils extended framework
(see the bottom of this page for links to the source files.) count: 10 the
number of messages that should be in the set.
...if you pass a
number greater than 1, then you get a direct reply-chain that long.
About NSPR
calendar times are 64-bit signed
numbers with units of microseconds.
...negative times extend to times before 1970, and positive
numbers forward.
Logging
ogmodulelevel two environment variables control the behavior of logging at execution time: nspr_log_modules nspr_log_file logging functions and macros the functions and macros for logging are: pr_newlogmodule pr_setlogfile pr_setlogbuffering pr_logprint pr_logflush pr_log_test pr_log pr_assert pr_assert pr_static_assert (new in nspr 4.6.6xxx this hasn't been released yet; the
number is a logical guess) pr_not_reached use example the following sample code fragment demonstrates use of the logging and debugging aids.
...ironment variable nspr_log_modules to userstuff:5 static void userlogstuff( void ) { prlogmoduleinfo *mylm; printn i; pr_static_assert(5 > 4); /* nspr 4.6.6 or newer */ mylm = pr_newlogmodule( "userstuff" ); pr_assert( mylm ); pr_log( mylm, pr_log_notice, ("log a notice %d\n", 999 )); for (i = 0; i < 10 ; i++ ) { pr_log( mylm, pr_log_debug, ("log debug
number: %d\n", i)); pr_sleep( 500 ); } pr_log( mylm, pr_log_notice, "that's all folks\n"); } /* end userlogstuff() */ see also nspr logging reference ...
NSPR Types
) dowhatimean( void ); static void pr_callback rootfunction(void *arg); in dowhim.c: pr_implement( void ) dowhatimean( void ) { return; }; prthread *thread = pr_createthread(..., rootfunction, ...); algebraic types nspr provides the following type definitions with unambiguous bit widths for algebraic operations: 8-, 16-, and 32-bit integer types 64-bit integer types floating-point
number type for convenience, nspr also provides type definitions with platform-dependent bit widths: native os integer types 8-, 16-, and 32-bit integer types signed integers print8 print16 print32 unsigned integers pruint8 pruint16 pruint32 64-bit integer types different platforms treat 64-bit numeric fields in different ways.
... print64 pruint64 floating-point
number type the nspr floating-point type is always 64 bits.
Network Addresses
typically, the only numeric declarations required are the well-known port
numbers that are part of the prnetaddr structure.
...dr converting between a string and a network address pr_stringtonetaddr pr_netaddrtostring converting address formats pr_convertipv4addrtoipv6 getting host names and addresses pr_gethostbyname pr_gethostbyaddr pr_enumeratehostent pr_getaddrinfobyname pr_enumerateaddrinfo pr_getcanonnamefromaddrinfo pr_freeaddrinfo getting protocol entries pr_getprotobyname pr_getprotoby
number ...
PL_HashString
syntax #include <plhash.h> plhash
number pl_hashstring(const void *key); parameter the function has the following parameter: key a pointer to a character string.
... returns the hash
number for the specified key.
PL_NewHashTable
syntax #include <plhash.h> plhashtable *pl_newhashtable( pruint32 numbuckets, plhashfunction keyhash, plhashcomparator keycompare, plhashcomparator valuecompare, const plhashallocops *allocops, void *allocpriv ); parameters the function has the following parameters: numbuckets the
number of buckets in the hash table.
...you can pass a value of 0 as numbuckets to create the default
number of buckets in the new table.
PRProtoEnt
protocol entry returned by pr_getprotobyname and pr_getprotoby
number.
... p_num protocol
number.
PR_AcceptRead
amount the
number of bytes of data to receive.
... returns a positive
number indicates the
number of bytes read from the peer.
PR_CreateThreadPool
syntax #include <prtpool.h> nspr_api(prthreadpool *) pr_createthreadpool( print32 initial_threads, print32 max_threads, pruint32 stacksize ); parameters the function has the following parameters: initial_threads the
number of threads to be created within this thread pool.
... max_threads the limit on the
number of threads that will be created to server the thread pool.
PR_Read
returns one of the following values: a positive
number indicates the
number of bytes actually read in.
... description the thread invoking pr_read blocks until it encounters an end-of-stream indication, some positive
number of bytes (but no more than amount bytes) are read in, or an error occurs.
PR_Recv
returns the function returns one of the following values: a positive
number indicates the
number of bytes actually received.
... description pr_recv blocks until some positive
number of bytes are transferred, a timeout occurs, or an error occurs.
PR_RecvFrom
returns the function returns one of the following values: a positive
number indicates the
number of bytes actually received.
... description pr_recvfrom receives up to a specified
number of bytes from socket, which may or may not be connected.
PR_Send
returns the function returns one of the following values: a positive
number indicates the
number of bytes successfully sent.
... if the parameter fd is a blocking socket, this
number must always equal amount.
PR_SendTo
returns the function returns one of the following values: a positive
number indicates the
number of bytes successfully sent.
... description pr_sendto sends a specified
number of bytes from a socket to the specified destination address.
PR_SetError
if there is no appropriate os error
number, a zero may be supplied.
... description nspr does not validate the value of the error
number or os error
number being specified.
PR_TicksPerSecond
returns the
number of ticks per second currently used to determine the value of printervaltime.
... syntax #include <prinrval.h> pruint32 pr_tickspersecond(void); returns an integer between 1000 and 100000 indicating the
number of ticks per second counted by printervaltime on the current platform.
PR_Writev
size
number of priovec structures in the iov array.
... returns one of the following values: a positive
number indicates the
number of bytes successfully written.
NSPR API Reference
c operations pr_atomicincrement pr_atomicdecrement pr_atomicset interval timing interval time type and constants interval functions date and time types and constants time parameter callback functions functions memory management operations memory allocation functions memory allocation macros string operations pl_strlen pl_strcpy pl_strdup pl_strfree floating point
number to string conversion pr_strtod pr_dtoa pr_cnvtf long long (64-bit) integers bitmaps formatted printing linked lists linked list types prclist linked list macros pr_init_clist pr_init_static_clist pr_append_link pr_insert_link pr_next_link pr_prev_link pr_remove_link pr_remove_and_init_link pr_insert_before pr_insert_after dynamic l...
...flush pr_log_test pr_log pr_assert pr_assert pr_not_reached use example instrumentation counters named shared memory shared memory protocol named shared memory functions anonymous shared memory anonymous memory protocol anonymous shared memory functions ipc semaphores ipc semaphore functions thread pools thread pool types thread pool functions random
number generator random
number generator function hash tables hash tables and type constants hash table functions nspr error handling error type error functions error codes ...
NSPR release process
set the nspr version
number.
... remove "beta" from the nspr version
number for the final release.
Encrypt Decrypt MAC Keys As Session Objects
uflen; unsigned char ptext[blocksize]; unsigned int ptextlen = 0; unsigned char ctext[64]; unsigned int ctextlen; unsigned char newmac[digestsize]; unsigned int newmaclen = 0; unsigned int newptextlen = 0; unsigned int count = 0; unsigned int temp = 0; unsigned int block
number = 0; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned char iv[blocksize]; unsigned int ivlen = ivitem->len; unsigned int filelength; unsigned int paddinglength; int j; memcpy(iv, ivitem->data, ivitem->len); paddinglength = (unsigned int)paditem->data[0]; ctxmac = pk11_...
...buflen-paddinglength; } /* write the plain text to out file */ temp = pr_write(outfile, decbuf, decbuflen); if (temp != decbuflen) { pr_fprintf(pr_stderr, "write error\n"); rv = secfailure; break; } /* save last block of ciphertext */ memcpy(iv, decbuf, decbuflen); ivlen = decbuflen; block
number++; } if (rv != secsuccess) { goto cleanup; } rv = macfinal(ctxmac, newmac, &newmaclen, sizeof(newmac)); if (rv != secsuccess) { goto cleanup; } if (port_memcmp(macitem->data, newmac, newmaclen) == 0) { rv = secsuccess; } else { pr_fprintf(pr_stderr, "check mac : failure\n"); pr_fprintf(pr_stderr, "extracted : "); printashex(pr_stderr, mac...
Encrypt and decrypt MAC using token
uflen; unsigned char ptext[blocksize]; unsigned int ptextlen = 0; unsigned char ctext[64]; unsigned int ctextlen; unsigned char newmac[digestsize]; unsigned int newmaclen = 0; unsigned int newptextlen = 0; unsigned int count = 0; unsigned int temp = 0; unsigned int block
number = 0; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned char iv[blocksize]; unsigned int ivlen = ivitem->len; unsigned int filelength; unsigned int paddinglength; int j; memcpy(iv, ivitem->data, ivitem->len); paddinglength = (unsigned int)paditem->data[0]; ctxmac = pk11_...
...buflen-paddinglength; } /* write the plain text to out file */ temp = pr_write(outfile, decbuf, decbuflen); if (temp != decbuflen) { pr_fprintf(pr_stderr, "write error\n"); rv = secfailure; break; } /* save last block of ciphertext */ memcpy(iv, decbuf, decbuflen); ivlen = decbuflen; block
number++; } if (rv != secsuccess) { goto cleanup; } rv = macfinal(ctxmac, newmac, &newmaclen, sizeof(newmac)); if (rv != secsuccess) { goto cleanup; } if (port_memcmp(macitem->data, newmac, newmaclen) == 0) { rv = secsuccess; } else { pr_fprintf(pr_stderr, "check mac : failure\n"); pr_fprintf(pr_stderr, "extracted : "); printashex(pr_stderr, mac...
NSS 3.18.1 release notes
but when firefox 38 went into beta, there was a huge spike in the
number of certificate verification errors attributed to this change.
... cn=mcsholding test, o=mcsholding, c=eg sha1 fingerprint: e1:f3:59:1e:76:98:65:c4:e4:47:ac:c3:7e:af:c9:e2:bf:e4:c5:76 the version
number of the updated root ca list has been set to 2.4 bugs fixed in nss 3.18.1 this bugzilla query returns all the bugs fixed in nss 3.18.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.18.1 compatibility nss 3.18.1 shared libraries are backward compatible with all older nss 3.18 shared libraries.
NSS 3.21 release notes
l_getpreliminarychannelinfo - obtains information about a tls channel prior to the handshake being completed, for use with the callbacks that are invoked during the handshake ssl_signatureprefset - configures the enabled signature and hash algorithms for tls ssl_signatureprefget - retrieves the currently configured signature and hash algorithms ssl_signaturemaxcount - obtains the maximum
number signature algorithms that can be configured with ssl_signatureprefset in utilpars.h nssutil_argparsemodulespecex - takes a module spec and breaks it into shared library string, module name string, module parameters string, nss specific parameters string, and nss configuration parameter strings.
... authority of wosign g2 sha1 fingerprint: fb:ed:dc:90:65:b7:27:20:37:bc:55:0c:9c:56:de:bb:f2:78:94:e1 cn = ca wosign ecc root sha1 fingerprint: d2:7a:d2:be:ed:94:c0:a1:3c:c7:25:21:ea:5d:71:be:81:19:f3:2b cn = oiste wisekey global root gb ca sha1 fingerprint: 0f:f9:40:76:18:d3:d7:6a:4b:98:f0:a8:35:9e:0c:fd:27:ac:cc:ed the version
number of the updated root ca list has been set to 2.6 bugs fixed in nss 3.21 this bugzilla query returns all the bugs fixed in nss 3.21: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.21 acknowledgements the nss development team would like to thank karthikeyan bhargavan from inria for responsibly disclosing ...
NSS 3.28.5 release notes
:8a:d6:af:00:90:35:dd:94:57 trust flags: email cn = tubitak kamu sm ssl kok sertifikasi - surum 1 sha-256 fingerprint: 46:ed:c3:68:90:46:d5:3a:45:3f:b3:10:4a:b8:0d:ca:ec:65:8b:26:60:ea:16:29:dd:7e:86:79:90:64:87:16 trust flags: websites technically constrained to: gov.tr, k12.tr, pol.tr, mil.tr, tsk.tr, kep.tr, bel.tr, edu.tr, org.tr the version
number of the updated root ca list has been set to 2.14.
... (the version
numbers 2.12 and 2.13 for the root ca list have been skipped.) bugs fixed in nss 3.28.5 bug 1350859 - march 2017 batch of root ca changes.
Encrypt Decrypt_MAC_Using Token
uflen; unsigned char ptext[blocksize]; unsigned int ptextlen = 0; unsigned char ctext[64]; unsigned int ctextlen; unsigned char newmac[digestsize]; unsigned int newmaclen = 0; unsigned int newptextlen = 0; unsigned int count = 0; unsigned int temp = 0; unsigned int block
number = 0; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned char iv[blocksize]; unsigned int ivlen = ivitem->len; unsigned int filelength; unsigned int paddinglength; int j; memcpy(iv, ivitem->data, ivitem->len); paddinglength = (unsigned int)paditem->data[0]; ctxmac = pk11_...
...*/ memcpy(iv, decbuf, decbuflen); ivlen = decbuflen; block
number++; } if (rv != secsuccess) { goto cleanup; } rv = macfinal(ctxmac, newmac, &newmaclen, sizeof(newmac)); if (rv != secsuccess) { goto cleanup; } if (port_memcmp(macitem->data, newmac, newmaclen) == 0) { rv = secsuccess; } else { pr_fprintf(pr_stderr, "check mac : failure\n"); pr_fprintf(pr_stderr, "extracted : "); printashex(pr_stderr, mac...
NSS Sample Code Sample_3_Basic Encryption and MACing
uflen; unsigned char ptext[blocksize]; unsigned int ptextlen = 0; unsigned char ctext[64]; unsigned int ctextlen; unsigned char newmac[digestsize]; unsigned int newmaclen = 0; unsigned int newptextlen = 0; unsigned int count = 0; unsigned int temp = 0; unsigned int block
number = 0; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned char iv[blocksize]; unsigned int ivlen = ivitem->len; unsigned int filelength; unsigned int paddinglength; int j; memcpy(iv, ivitem->data, ivitem->len); paddinglength = (unsigned int)paditem->data[0]; ctxmac = pk11_...
...buflen-paddinglength; } /* write the plain text to out file */ temp = pr_write(outfile, decbuf, decbuflen); if (temp != decbuflen) { pr_fprintf(pr_stderr, "write error\n"); rv = secfailure; break; } /* save last block of ciphertext */ memcpy(iv, decbuf, decbuflen); ivlen = decbuflen; block
number++; } if (rv != secsuccess) { goto cleanup; } rv = macfinal(ctxmac, newmac, &newmaclen, sizeof(newmac)); if (rv != secsuccess) { goto cleanup; } if (port_memcmp(macitem->data, newmac, newmaclen) == 0) { rv = secsuccess; } else { pr_fprintf(pr_stderr, "check mac : failure\n"); pr_fprintf(pr_stderr, "extracted : "); printashex(pr_stderr, mac...
EncDecMAC using token object - sample 3
m *ivitem, secitem *paditem) { secstatus rv; prfiledesc* infile; prfiledesc* outfile; unsigned char decbuf[64]; unsigned int decbuflen; unsigned char ptext[blocksize]; unsigned int ptextlen = 0; unsigned char ctext[64]; unsigned int ctextlen; unsigned char newmac[digestsize]; unsigned int newmaclen = 0; unsigned int newptextlen = 0; unsigned int count = 0; unsigned int temp = 0; unsigned int block
number = 0; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned char iv[blocksize]; unsigned int ivlen = ivitem->len; unsigned int filelength; unsigned int paddinglength; int j; memcpy(iv, ivitem->data, ivitem->len); paddinglength = (unsigned int)paditem->data[0]; ctxmac = pk11_createcontextbysymkey(ckm_md5_hmac, cka_sign, mk, &noparams); if (ctxmac...
...ctxmac, decbuf, decbuflen); if (rv != secsuccess) { goto cleanup; } if (count == filelength) { decbuflen = decbuflen-paddinglength; } /* write the plain text to out file */ temp = pr_write(outfile, decbuf, decbuflen); if (temp != decbuflen) { pr_fprintf(pr_stderr, "write error\n"); rv = secfailure; break; } /* save last block of ciphertext */ memcpy(iv, decbuf, decbuflen); ivlen = decbuflen; block
number++; } if (rv != secsuccess) { goto cleanup; } rv = macfinal(ctxmac, newmac, &newmaclen, sizeof(newmac)); if (rv != secsuccess) { goto cleanup; } if (port_memcmp(macitem->data, newmac, newmaclen) == 0) { rv = secsuccess; } else { pr_fprintf(pr_stderr, "check mac : failure\n"); pr_fprintf(pr_stderr, "extracted : "); printashex(pr_stderr, macitem->data, macitem->len); pr_fprintf(pr_stderr, "computed ...
Utilities for nss samples
generate random
numbers.
...s generaterandom(unsigned char *rbuf, int rsize) { char meter[] = { "\r| |" }; int fd, count; int c; secstatus rv = secsuccess; cc_t orig_cc_min; cc_t orig_cc_time; tcflag_t orig_lflag; struct termios tio; fprintf(stderr, "to generate random
numbers, " "continue typing until the progress meter is full:\n\n"); fprintf(stderr, "%s", meter); fprintf(stderr, "\r|"); /* turn off echo on stdin & return on 1 char instead of nl */ fd = fileno(stdin); tcgetattr(fd, &tio); orig_lflag = tio.c_lflag; orig_cc_min = tio.c_cc[vmin]; orig_cc_time = tio.c_cc[vtime]; tio.c_lflag &= ~echo; tio.c_lflag &= ~...
NSS sources building testing
find the directory that contains the highest version
number.
... once the test suite has completed, a summary will be printed that shows the
number of failures.
NSS Tools sslstrength
however, the port
number is an optional argument, and if not given, will default to the https port (443).
... other for references, here is a table of well-known ssl port
numbers: https 443 imaps 993 nntps 563 ...
NSS PKCS11 Functions
it should have some
number to make this unique.
... many tokens keep track of the
number of attempts to enter a password and do not allow further attempts after a certain point.
Python binding for NSS
thus it's major version
number is still at zero.
...me() nss.nss.x509_ext_key_usage() nss.nss.x509_key_usage() the following class methods and properties were added: note: it's a method if the name is suffixed with (), a propety otherwise socket.next() socket.readlines() socket.sendall() sslsocket.next() sslsocket.readlines() sslsocket.sendall() authkeyid.key_id authkeyid.serial_
number authkeyid.get_general_names() crldistributionpoint.issuer crldistributionpoint.get_general_names() crldistributionpoint.get_reasons() certdb.find_crl_by_cert() certdb.find_crl_by_name() certificate.extensions certificateextension.critical certificateextension.name certificateextension.oid certificateextension.oid_tag certificateextension...
FC_GenerateKeyPair
uspublickeyattributecount [in]
number of attributes in the public key template.
...usprivatekeyattributecount [in]
number of attributes in the private key template.
FC_GetInfo
on return, the ck_info structure that pinfo points to has the following information: cryptokiversion: pkcs #11 interface version
number implemented by the pkcs #11 library.
... libraryversion: pkcs #11 library version
number, for example, 3.11 (major=0x03, minor=0x0b).
NSS environment variables
variable type description introduced in version nsrandcount integer (byte count) sets the maximum
number of bytes to read from the file named in the environment variable nsrandfile (see below).
... 3.12.3 nsrandfile string (file name) uses this file to seed the pseudo random
number generator.
NSS tools : pk12util
id encryption algorithm: pkcs #12 v2 pbe with sha-1 and 3key triple des-cbc parameters: salt: 45:2e:6a:a0:03:4d:7b:a1:63:3c:15:ea:67:37:62:1f iteration count: 1 (0x1) certificate: data: version: 3 (0x2) serial
number: 13 (0xd) signature algorithm: pkcs #1 sha-1 with rsa encryption issuer: "e=personal-freemail@thawte.com,cn=thawte personal freemail c a,ou=certification services division,o=thawte consulting,l=cape t own,st=western cape,c=za" alternatively, the -r prints the certificates and then exports them into separate der binary files.
...each certificate is written to a sequentially-
number file, beginning with file0001.der and continuing through file000n.der, incrementing the
number for every certificate: # pk12util -l test.p12 -r enter password for pkcs12 file: key(shrouded): friendly name: thawte freemail member's thawte consulting (pty) ltd.
NSS reference
random
number generation this api consists of the two routines used for pseudorandom
number generation -- pk11_generaterandomonslot and pk11_generaterandom -- and the two routines used for seeding pseudorandom
number generation -- pk11_seedrandom and pk11_randomupdate.
...sec_pkcs12destroyexportcontext sec_pkcs12decoderstart sec_pkcs12decoderimportbags sec_pkcs12decoderupdate sec_pkcs12decoderfinish sec_pkcs12decodervalidatebags sec_pkcs12decoderverify sec_pkcs12decodergetcerts sec_pkcs12decodersettargettokencas sec_pkcs12decoderiterateinit sec_pkcs12decoderiteratenext sec_pkcs12isencryptionallowed sec_pkcs12setpreferredcipher nspr functions a small
number of nspr functions are required for using the certificate verification and ssl functions in nss.
NSS_3.12.3_release_notes.html
the information in this table is excerpted from https://developer.mozilla.org/en/nss_reference/nss_environment_variables environment variable value type description nsrandcount integer (byte count) sets the maximum
number of bytes to read from the file named in the environment variable nsrandfile (see below).
... bug 466736: incorrect use of nss_use_64 in lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c bug 466745: random
number generator fails on windows ce bug 467298: sql db code uses local cache on local file system bug 468279: softoken crash importing email cert into newly upgraded db bug 468532: trusted ca trust flags not being honored in cert_verifycert bug 469583: coverity: uninitialized variable used in sec_pkcs5createalgorithmid bug 469944: when built with microsoft compilers bug 470351: crlutil buil...
NSS Tools sslstrength
however, the port
number is an optional argument, and if not given, will default to the https port (443).
... other for references, here is a table of well-known ssl port
numbers: https 443 imaps 993 nntps 563 ...
NSS tools : pk12util
id encryption algorithm: pkcs #12 v2 pbe with sha-1 and 3key triple des-cbc parameters: salt: 45:2e:6a:a0:03:4d:7b:a1:63:3c:15:ea:67:37:62:1f iteration count: 1 (0x1) certificate: data: version: 3 (0x2) serial
number: 13 (0xd) signature algorithm: pkcs #1 sha-1 with rsa encryption issuer: "e=personal-freemail@thawte.com,cn=thawte personal freemail c a,ou=certification services division,o=thawte consulting,l=cape t own,st=western cape,c=za" ....
...each certificate is written to a sequentially-
number file, beginning with file0001.der and continuing through file000n.der, incrementing the
number for every certificate: # pk12util -l test.p12 -r enter password for pkcs12 file: key(shrouded): friendly name: thawte freemail member's thawte consulting (pty) ltd.
NSS tools : signtool
the symbol # represents a
number from 0 to 9, where 0 means no compression and 9 means maximum compression.
...acceptable characters are
numbers, letters, spaces, and apostrophes.
Rhino and BSF
it provides a framework for using a
number of scripting languages with java.
... this framework has been embedded in a
number of open source projects, including the xsl processor xalan and the xml/java build tool ant.
Rhino JavaScript compiler
-version version
number specifies the language version to compile with.
... the string version
number must be one of 100, 110, 120, 130, 140, 150, 160, or 170.
Rhino optimization
simple data and type flow analysis is performed to determine which javascript variables can be allocated to java vm registers, and which variables are used only as
numbers.
...arguments are passed as object/
number pairs to reduce conversion overhead.
Creating JavaScript jstest reftests
before using test262, spidermonkey had a fair
number of internal tests of conformance to ecmascript, and many of those tests remain in the js/src/non262 directory as regressions.
...for example, reportcompare sometimes considers
numbers to be the same if they are "close enough" to each other, even if the == operator would return false.
JIT Optimization Strategies
this optimization can fail for a
number of reasons.
... this optimization can fail for a
number of reasons.
JS::DoubleNaNValue
this article covers features introduced in spidermonkey 24 create a not-a-
number (nan) floating-point
number as a value of type js::value.
... syntax js::value js::doublenanvalue() description js::doublenanvalue returns a value of type js::value that represents an ieee floating-point quiet not-a-
number (nan).
JS::OrdinaryToPrimitive
most users should not call this -- use js::to
number, js::toboolean, or js::tostring instead.
... see also mxr id search for js::ordinarytoprimitive js::to
number js::toboolean js::tostring bug 1103152 ...
JSConvertOp
hint will be jstype_string or jstype_
number to pass the corresponding type as a hint, or jstype_void to pass no hint.
...however, the engine itself only requires support for jstype_string, jstype_
number, and jstype_void, if js_convertvalue is not used.
JSNewEnumerateOp
the
number of properties that will be enumerated should be returned as an integer jsval in *idp, if idp is non-null, and provided the
number of enumerable properties is known.
... if idp is non-null and the
number of enumerable properties can't be computed in advance, *idp should be set to jsval_zero.
JSObject
almost every object can have any
number of its own properties.
... depending on the jsclass, an object may have a private data pointer and any
number of reserved slots.
JSPropertySpec
tinyid int8 obsolete since jsapi 31 unique id
number for the property to aid in resolving getproperty and setproperty method calls.
... flags uint8_t the bitwise or of any
number of property attributes.
JSVAL_TO_DOUBLE
syntax jsdouble jsval_to_double(jsval v); description jsval_to_double casts a specified js value, v, to a c floating-point
number of type jsdouble.
...to convert any value to a
number, use js_valueto
number instead.
JS_CompileScriptForPrincipals
lineno unsigned int line
number.
...similarly, lineno is used to report the line
number of the script or file where an error occurred during compilation.
JS_ConvertValue
type must be one of jstype_void, jstype_object, jstype_function, jstype_string, jstype_
number, or jstype_boolean.
... converting to jstype_
number works exactly like js::to
number.
JS_DefineFunction
nargs unsigned
number of arguments that are passed to the function when it is called.
...nargs indicates the
number of arguments the function expects to receive.
JS_DumpHeap
maxdepth size_t the upper bound on the
number of edges to descend from the graph roots.
...there are a fixed
number of different layouts that the gc knows about.
JS_EncodeCharacters
on failure, *dstlenp receives the
number of bytes written to dst before the error occurred.
... to calculate the
number of bytes needed, call js_encodecharacters twice, like this: /* determine how many bytes to allocate.
JS_EvaluateScript
lineno unsigned int line
number.
...similarly, lineno is used to report the line
number of the script or file where an error occurred during compilation.
JS_EvaluateScriptForPrincipals
lineno unsigned int line
number.
...similarly, lineno is used to report the line
number of the script or file where an error occurred during compilation.
JS_FS
nargs uint16_t the
number of arguments the function expects.
... flags uint16 the bitwise or of any
number of function flags.
JS_GetArrayLength
retrieve the
number of elements in an array object.
...if obj is an array (see js_isarrayobject), this is guaranteed to succeed, because the .length property of an array is always a
number and can't be deleted or redefined.
JS_GetImplementationVersion
get the version
number of the js engine.
... syntax const char * js_getimplementationversion(void); description js_getimplementationversion returns a hard-coded, english language string that specifies the version
number of the js engine currently in use, and its release date.
JS_GetTypeName
type jstype one of jstype_void, jstype_object, jstype_function, jstype_string, jstype_
number, or jstype_boolean.
...the following table lists jstypes and the string literals reported by js_gettypename: type literal jstype_void "undefined" jstype_object "object" jstype_function "function" jstype_string "string" jstype_
number "
number" jstype_boolean "boolean" any other value null see also js_convertvalue js_typeofvalue js_valuetoboolean js_valuetofunction js_valuetoint32 js_valueto
number js_valuetoobject js_valuetostring bug 1037718 ...
JS_NewContext
javascript objects, functions, strings, and
numbers may be shared among the contexts in a jsruntime, but they cannot be shared across jsruntimes.
...(the jsapi does not provide a way to adjust the stack depth limit.) passing a large
number for stackchunksize is a mistake.
JS_NewExternalString
length size_t the
number of characters in the array chars.
...this must be an id
number previously returned by a successful call to js_addexternalstringfinalizer.
JS_NewFunction
nargs unsigned
number of arguments the function expects.
...nargs is the
number of arguments the function expects.
JS_NewRuntime
untime * js_newruntime(uint32_t maxbytes, uint32_t maxnurserybytes = js::defaultnurserybytes, jsruntime *parentruntime = nullptr); jsruntime * js_newruntime(uint32_t maxbytes, jsusehelperthreads usehelperthreads, jsruntime *parentruntime = nullptr); // deprecated since jsapi 32 name type description maxbytes uint32 maximum
number of allocated bytes after which garbage collection is run.
...maxbytes specifies the
number of allocated bytes after which garbage collection is run.
JS_SetOptions
mxr id search for jsoption_compile_n_go jsoption_atline //@line
number ["filename"] option supported for the xul preprocessor and kindred beasts.
... mxr id search for jsoption_xml jsoption_allow_xml added in spidermonkey 15 if this is off, e4x syntax isn't supported no matter what version
number is set.
JS_TypeOfValue
the return value is always one of jstype_void, jstype_object, jstype_function, jstype_string, jstype_
number, or jstype_boolean.
... see also mxr id search for js_typeofvalue js_convertvalue js_gettypename js_valuetoboolean js_valuetofunction js_valuetoint32 js_valueto
number js_valuetoobject js_valuetostring ...
JS_ValueToECMAInt32
all three functions first convert v to a floating-point
number as if by calling js_valueto
number; nan values are then converted to zero.
... see also js::touint16 js::toint32 js::touint32 js::toint64 js::touint64 js::to
number bug 933810 bug 933946 ...
JS_ValueToString
if v is a
number, conversion succeeds, and the result is a string representation of that
number as specified in ecma 262-3 §9.8.1.
...otherwise the result is a decimal representation of the
number, possibly using exponential notation.
jsdouble
jsdouble is a c floating-point
number type.
...arithmetic on jsdouble values in c should behave exactly like the floating-point arithmetic in javascript, except that c and javascript may treat not-a-
number values differently.
JSDBGAPI
breakpoints js_settrap js_gettrapopcode js_cleartrap js_clearscripttraps js_clearalltraps js_handletrap js_setinterrupt js_clearinterrupt watchpoints js_setwatchpoint js_clearwatchpoint js_clearwatchpointsforobject js_clearallwatchpoints inspecting the stack js_pctoline
number js_line
numbertopc js_getfunctionscript js_getfunctionnative js_getfunctionfastnative js_getscriptprincipals typedef jsstackframe js_frameiterator js_getframescript js_getframepc js_getscriptedcaller js_stackframeprincipals js_evalframeprincipals js_getframeannotation js_setframeannotation js_getframeprincipalarray js_isnativeframe js_getframeobject js_getframescopechain js_getframecallobject...
... js_getframethis js_getframefunction js_getframefunctionobject js_isconstructorframe js_isdebuggerframe js_getframereturnvalue js_setframereturnvalue js_getframecalleeobject js_getscriptfilename js_getscriptbaseline
number js_getscriptlineextent js_getscriptversion js_gettopscriptfilenameflags js_getscriptfilenameflags js_flagscriptfilenameprefix jsfilename_null jsfilename_system jsfilename_protected evaluating debug code js_evaluateinstackframe examining object properties typedef jspropertydesc jspd_enumerate jspd_readonly jspd_permanent jspd_alias jspd_argument jspd_variable jspd_exception jspd_error typedef jspropertydescarray js_propertyiterator js_getpropertydesc js_getpropertydescarray js_putpropertydescarray hooks js_setdebugg...
SavedFrame
line the line
number for this stack frame.
... column the column
number for this stack frame.
Web Replay
relaxing non-determinism here has a
number of ripple effects in other areas.
... these spawn a
number of threads which do not participate in the recording: any events they execute are live.
Mozilla Projects
mozilla has a
number of projects other than firefox itself.
...it provides a
number of functions and capabilities, including: mccoy mccoy uses xulrunner which is bound to break, for details see this post.
Handling Mozilla Security Bugs
the mozilla security bug group the mozilla security module owner and peers will form the core of the mozilla security bug group, and will select a
number of other people to round out the group's membership.
...(as described previously, once added to the security bug group, that person would then have automatic access to all bugs marked security-sensitive, without having to be explicitly added to the cc list for each one.) note that, although we intend to make it relatively simple for a new person to join the security bug group, and we are not limiting the size of the group to any arbitrary
number, we do not want the group to expand without any limits whatsoever.
Gecko events
event_hyperlink_
number_of_anchors_changed the
number of anchors assoicated with this hyperlink object has changed.
...event_hypertext_nlinks_changed the
number of hyperlinks associated with a hypertext object changed.
Embedded Dialog API
(line
number accurate in version 1.30).
...a powerplant example can be found at cbrowserapp::overridecomponents (line
number accurate in version 1.24) and an mfc example at cmfcembedapp::overridecomponents (line
number accurate in version 1.20).
The Places database
the position column
numbers each of the peers beneath a given parent starting with 0 and incrementing higher with each addition.
... the fk column provides the id
number of the corresponding record in moz_places.
Frecency algorithm
points for each sampled visit = (bonus / 100.0) * weight final frecency score for visited uri = ceiling(total visit count * sum of points for sampled visits /
number of sampled visits) example this is an example of a frecency calculation for a uri that is bookmarked and has been visited twice recently (once yesterday, and once last week by clicking a link), and two other times more than 90 days ago: 0 default score +140 100 * (140/100.0) - first bucket weight and bookmarked bonus +84 70 * (120/100.0) - second bucke...
...t weight and followed-link bonus +14 10 * (140/100.0) - fifth bucket weight and bookmarked bonus +14 10 * (140/100.0) - fifth bucket weight and bookmarked bonus -- 252 (4 * 252 / 4) - final frecency score notes the
number of sampled visits is min(10 most recent visits pref, total visit counts).
History Service Design
visits are expired based on user preferences, there is an hard limit on the minimum
number of days that should be retained, visits in that range won't never expire.
... visits inside a slushy limit (> than the hard limit) will be removed only if we are over a maximum
number of pages we can retain, for performance issues.
Places Expiration
preferences usually there is no need to tweak or set any preference, since adaptive behavior should satisfy each need, though in case of unexpected issues it's possible to act on some hidden preferences: places.history.expiration.interval_seconds: minimum
number of seconds between expiration steps.
... places.history.expiration.max_pages: the maximum
number of pages that may be retained in the database before starting to expire.
places.sqlite Database Troubleshooting
sqlite> .clone places.sqlite sqlite> pragma user_version; note the version
number returned by the last pragma query.
... nn must be replaced with the
number we had noted previously: sqlite> pragma user_version = nn; let's update the page_size value: sqlite> pragma journal_mode = truncate; sqlite> pragma page_size = 32768; sqlite> vacuum; sqlite> pragma journal_mode = wal; sqlite> .exit copy the new places.sqlite to the profile folder, overwriting the existing one.
Preferences API
preferences api allows you to save and read strings,
numbers, booleans, and references to files to the preferences store.
... it is relatively easy to use, while providing a
number of useful user and developer features, including support for default preferences, user overrides via user.js, and locking.
Avoiding leaks in JavaScript XPCOM components
this document attempts to help them do so, first by explaining the underlying concepts, and second by describing a
number of common javascript patterns that cause leaks.
...in this strategy, the object has a member that is the
number of other objects that "own" it.
XPCShell Reference
version(newversion) version() returns the javascript engine version
number.
... if you pass a
number to it, it will set the version
number (and return the old version
number).
nsACString
size_type [pruint32] type used to represent the
number of bytes stored in the string.
... length the length function returns the
number of storage units in the string's internal buffer (not including the null-terminator if present).
nsAString
size_type [pruint32] type used to represent the
number of double-byte units stored in the string.
... length the length function returns the
number of storage units in the string's internal buffer (not including the null-terminator if present).
IAccessibleRelation
ntargets() returns the
number of targets() for this relation.
...ntargets actual
number of targets in the returned array (not more than maxtargets) return value s_false if there is nothing to return, ntargets() is set to 0.
IAccessibleValue
method overview [propget] hresult currentvalue([out] variant currentvalue ); [propget] hresult maximumvalue([out] variant maximumvalue ); [propget] hresult minimumvalue([out] variant minimumvalue ); hresult setcurrentvalue([in] variant value ); methods currentvalue() returns the value of this object as a
number.
...setcurrentvalue() sets the value of this object to the given
number.
imgIDecoder
count the maximum
number of bytes to write to the image.
... return value the
number of bytes actually written to the image, or undefined if an error occurred.
nsIAccessibleEvent
event_hyperlink_
number_of_anchors_changed 0x0052 0x004e the
number of anchors associated with this hyperlink object has changed.
... event_hypertext_nlinks_changed 0x0058 0x0054 the
number of hyperlinks associated with a hypertext object changed.
nsIAccessibleTableCell
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview boolean isselected(); attributes attribute type description columnextent long return the
number of columns occupied by this cell.
... rowextent long return the
number of rows occupied by this accessible cell.
nsIAccessibleTreeCache
invalidatecache() invalidates the
number of cached treeitem accessibles.
...acount the
number of treeitem accessibles to invalidate, the
number sign specifies whether rows have been inserted (plus) or removed (minus) treeviewchanged() invalidates children created for the previous tree view.
nsIAppShell
void create( inout int argc, inout string argv ); parameters argc the
number of parameters passed in on the command line.
...when the
number of calls that pass pr_true is subtracted from the
number of calls that pass pr_false is greater than 0, performance is given precedence over preventing event starvation.
nsIArray
method overview nsisimpleenumerator enumerate(); unsigned long indexof(in unsigned long startindex, in nsisupports element); void queryelementat(in unsigned long index, in nsiidref uuid, [iid_is(uuid), retval] out nsqiresult result); attributes attribute type description length unsigned long the
number of elements in the array.
... return value a
number >= startindex which is the position of the element in the array.
nsIBrowserHistory
for performance reasons this does not return the real
number of entries.
... alength the
number of pages listed in the auris array.
nsICollection
count() returns the
number of items in the collection.
...return value
number of items in the list.
nsIDOMChromeWindow
getattentionwithcyclecount() same as getattention method excepting that this can specify the maximum
number of times to animate the window per system conventions.
... void getattentionwithcyclecount( in long acyclecount ); parameters acyclecount the maximum
number of times to animate the window per system conventions.
nsIDOMHTMLTimeRanges
each time range represented by an nsidomhtmltimeranges object has an index
number; you call the start() and end() methods to obtain the start and end times of each range, specifying the index
number of the range to look up.
... last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsisupports method overview float start(in unsigned long index); float end(in unsigned long index); attributes attribute type description length unsigned long the
number of ranges represented by the nsidomhtmltimeranges object.
nsIDOMMozNetworkStatsData
1.0 66 introduced gecko 18.0 inherits from: nsisupports last changed in gecko 18.0 (firefox 18.0 / thunderbird 18.0 / seamonkey 2.15) attributes attribute type description rxbytes unsigned long the
number of bytes received on the connection.
... txbytes unsigned long the
number of bytes transmitted on the connection.
nsIDOMXPathResult
numbervalue double if resulttype is
number_type, the numeric value of the xpath value.
...
number_type 1 type is a single
number.
nsIDocShell
higher
numbers override lower ones.
...void historypurged( in long numentries ); parameters numentries the
number of entries removed.
nsIEventListenerService
acount on return, contains the
number of elements in the returned array.
... acount on return, the
number of returned listener descriptors.
nsIException
inherits from: nsisupports last changed in gecko 1.7 method overview string tostring(); attributes attribute type description column
number pruint32 valid column
numbers begin at 0.
... line
number pruint32 valid line
numbers begin at '1'.
nsIJSID
number string read only.
...void initialize( in string idstring ); parameters idstring the
number to initialize the jsid, in string format, e.g.
nsIMessageBroadcaster
parameters name type description aindex
number the index of the subordinate message manager to retrieve.
...attributes childcount
number: the
number of subordinate message managers.
nsIMsgHeaderParser
the returned value is the
number of addresses, or a negative error code; the names and addresses are returned into the provided pointers as consecutive null-terminated strings.
... numaddresses the
number of addresses in the header.
nsIMsgThread
subject acstring subject of the thread newestmsgdate unsigned long numchildren unsigned long readonly:
number of messages in the thread.
... numunreadchildren unsigned long readonly:
number of unread messages in the thread.
nsINavHistoryContainerResultNode
(firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsinavhistoryresultnode findnodebydetails(in autf8string auristring, in prtime atime, in long long aitemid, in boolean arecursive); nsinavhistoryresultnode getchild(in unsigned long aindex); unsigned long getchildindex(in nsinavhistoryresultnode anode); attributes attribute type description childcount unsigned long the
number of child nodes; accessing this throws an ns_error_not_available exception of containeropen is false.
... remarks there are a
number of untested methods on this interface that are not documented at present, and are disabled in the idl file.
nsINavHistoryQuery
void gettransitions( out unsigned long count, optional [retval,array,size_is(count)] out unsigned long transitions ); parameters count optional the
number of transitions transitions missing description settransitions() when the set of transitions is nonempty, results are limited to pages which have at least one visit for each of the transition types.
...count the
number of transitions.
nsIPrinterEnumerator
void enumerateprinters( out pruint32 acount, [retval, array, size_is(acount)] out wstring aresult ); parameters acount returns
number of printers returned.
... initprintsettingsfromprinter() initializes certain settings from the native printer into the printsettings these settings include, but are not limited to: page orientation, page size,
number of copies.
nsIProfile
profilecount long the
number of profiles.
...void getprofilelist( out unsigned long length, [retval, array, size_is(length)] out wstring profilenames ); parameters length on return, contains the
number of profiles in the profilenames array.
nsIProgressEventSink
aprogress numeric value in the range 0 to aprogressmax indicating the
number of bytes transfered thus far.
... aprogressmax numeric value indicating maximum
number of bytes that will be transfered (or 0xffffffffffffffff if total is unknown).
nsIPushSubscription
pushcount long long the total
number of messages sent to this subscription.
... quota long the
number of remaining background messages for this subscription, or -1 if exempt.
nsISocketTransportService
this will fail with the error code ns_error_not_available if the maximum
number of sockets is already reached.
... notifywhencanattachsocket if the
number of sockets reaches the limit, then consumers can be notified when the
number of sockets becomes less than the limit.
nsIStringBundle
the id should refer to a string in the bundle that uses %s, and the
number of strings you pass must be the same here and in the properties file (that is you can't omit %1 and use only %2).
...the name should refer to a string in the bundle that uses %s, and the
number of strings you pass must be the same here and in the properties file (that is you can't omit %1 and use only %2).
nsIThreadObserver
recursiondepth the
number of calls to nsithread.processnextevent() on the call stack in addition to the current call.
... recursiondepth the
number of calls to nsithread.processnextevent() on the call stack in addition to the current call.
nsITransport
asegmentcount if open_unbuffered is not set, then this parameter specifies the maximum
number of buffer segments (pass 0 to use default value).
...asegmentcount if open_unbuffered is not set, then this parameter specifies the maximum
number of buffer segments (pass 0 to use default value).
nsIUpdate
if you want a real version
number use appversion.
... name astring the name of the update, in the form "application_name update_version" patchcount unsigned long the
number of patches supplied by this update.
nsIVariant
count the
number of elements in the array.
...note that this will do strange things with negative
numbers, and float and double values greater than the numeric limits of a print64 will not convert correctly.
nsIWindowsRegKey
void writebinaryvalue(in astring name, in acstring data); void writeint64value(in astring name, in unsigned long long data); void writeintvalue(in astring name, in unsigned long data); void writestringvalue(in astring name, in astring data); attributes attribute type description childcount unsigned long this attribute returns the
number of child keys.
... valuecount unsigned long this attribute returns the
number of values under this key.
nsIXPCScriptable
if idp is non-null, and provided the
number of enumerable properties is known, the
number of properties that will be enumerated should be returned as an integer jsval in idp.
... if idp is non-null and the
number of enumerable properties cannot be computed in advance, idp should be set to jsval_zero.
nsIZipReader
manifestentriescount pruint32 the
number of entries in the manifest.
...the characters a and z must either both be letters or both be
numbers, with the character represented by 'a' having a lower ascii value than the character represented by 'z'.
nsIZipReaderCache
void init( in unsigned long cachesize ); parameters cachesize the
number of released entries to maintain before beginning to throw some out.
... the
number of outstanding entries can be much greater than this
number, this is the count for those otherwise unused entries.
nsMsgSearchAttrib
const nsmsgsearchattribvalue name = 17; const nsmsgsearchattribvalue displayname = 18; const nsmsgsearchattribvalue nickname = 19; const nsmsgsearchattribvalue screenname = 20; const nsmsgsearchattribvalue email = 21; const nsmsgsearchattribvalue additionalemail = 22; const nsmsgsearchattribvalue phone
number = 23; const nsmsgsearchattribvalue workphone = 24; const nsmsgsearchattribvalue homephone = 25; const nsmsgsearchattribvalue fax = 26; const nsmsgsearchattribvalue pager = 27; const nsmsgsearchattribvalue mobile = 28; const nsmsgsearchattribvalue city = 29; const nsmsgsearchattribvalue street = 30; const nsmsgsearchattribvalue title = 31; const nsmsgse...
...the
number can be changed, * however, because we never persist attribvalues as integers.
NS_CStringGetMutableData
adatalength [in] the
number of characters to resize the string's internal buffer to or pr_uint32_max to return the buffer as-is.
... return values this function returns the
number of characters contained in the string's internal buffer (excluding any null-terminator).
XPCOM reference
core xpcom functionsxpcom provides a
number of global functions which are used to initialize and shut down the xpcom library, as well as to allocate memory, get access to services, and to instantiate interfaces.foldersthe folder classes all implement the nsimsgfolder interface.
...for example, to request the 'show all threads' view use the constant:nsstaticmoduleinfothis data structure is used by ns_initxpcom3 to specify static xpcom modules.standard xpcom componentsthere are a
number of components provided in the standard implementation of xpcom; these are as follows.xpcom glue classesthese "glue" classes are provided to make it easier to use xpcom from c++ code.xpcom interface referencethis is a reference to the xpcom interfaces provided by the mozilla platform.xpcom interface reference by groupingthis page lists the current (as of dec.
Setting HTTP request headers
the nsihttpchannel interface has a
number of properties and methods, but the method that is of interest to us is setrequestheader.
...note that the
number of parameter that the observe method takes is important.
Performance
if the user shuts down the browser soon after you do this type of operation, you can delay shutdown (possibly for many tens of seconds for large
numbers of transactions and slow disks), making it look like the browser is hung.
...this value controls the
number of pages of the file that can be kept in memory at once.
Xptcall Porting Guide
the idea here is that the class has a vtbl full of a large
number of generic stubs.
...to change the
number of stubs or to change their specific declaration) using the perl script xptcall/public/genstubs.pl.
Mail client architecture overview
there are also a
number of protocol independant subsystems that have a symbiotic relationship with base: libmime - for dealing with rfc822 messages and their mime parts.
... address book - the address book contains lists of people and all attributes associated with them such as their e-mail address, phone
number, etc.
Mail event system
because the
number of messages in the folder have increased, this change in total message count needs to be broadcast to the world.
...nsimsgmailsession also contains a
number of other methods that are completely unrealted to folder notification.
Using the Multiple Accounts API
preference: mail.server.server.check_time - integer,
number of minutes between checks for new mail preference: mail.server.server.remember_password - boolean, should we remember the password?
... preference: mail.server.server.max_cached_connections - integer, max
number of connections left open to the server preference: mail.server.server.empty_trash_threshhold integer, (should not be imap-specific) max k of wasted diskspace before we purge a folder preference: mail.server.server.delete_model - integer, delete model (move to trash, imap delete, purge immediately, not sure of values) preference: mail.server.server.timeout - integer,
number of m...
Using COM from js-ctypes
tinterest; void* getevents; void* getinfo; /* end inherit from ispeventsource */ /* start ispvoice */ void* setoutput; void* getoutputobjecttoken; void* getoutputstream; void* pause; void* resume; void* setvoice; void* getvoice; hresult (__stdcall *speak)(struct myispvoice*, lpcwstr pwcs, dword dwflags, ulong* pulstream
number); void* speakstream; void* getstatus; void* skip; void* setpriority; void* getpriority; void* setalertboundary; void* getalertboundary; void* setrate; void* getrate; void* setvolume; void* getvolume; void* waituntildone; void* setsyncspeaktimeout; void* getsyncspeaktimeout; void* speakcompleteevent; void* isuisupported; void* dis...
...voidptr_t }, { 'pause': ctypes.voidptr_t }, { 'resume': ctypes.voidptr_t }, { 'setvoice': ctypes.voidptr_t }, { 'getvoice': ctypes.voidptr_t }, { 'speak': ctypes.functiontype(callback_abi, hresult, // return [ ispvoice.ptr, lpcwstr, // *pwcs dword, // dwflags ulong // *pulstream
number ]).ptr }, { 'speakstream': ctypes.voidptr_t }, { 'getstatus': ctypes.voidptr_t }, { 'skip': ctypes.voidptr_t }, { 'setpriority': ctypes.voidptr_t }, { 'getpriority': ctypes.voidptr_t }, { 'setalertboundary': ctypes.voidptr_t }, { 'getalertboundary': ctypes.voidptr_t }, { 'setrate': ctypes.voidptr_t }, { 'getrate': ctypes.voidptr_t }, { 'setvolum...
CType
size
number the size of the type, in bytes.
... ctype array( [n] }; parameters n optional the
number of elements in the declared array type.
js-ctypes reference
out of the box, js-ctypes supports a
number of predefined types.
... 64-bit integer handling because javascript
number objects can't directly represent every possible 64-bit integer value, js-ctypes provides new types for these.
Constants - Plugins
plug-in version constants constant value description np_version_major 0 major version
number; changes with major code release
number.
... np_version_minor 22 minor version
number; changes with point release
number.
Plug-in Basics - Plugins
plug-ins like these are now available: multimedia viewers such as adobe flash and adobe acrobat utilities that provide object embedding and compression/decompression services applications that range from personal information managers to games the range of possibilities for using plug-in technology seems boundless, as shown by the growing
numbers of independent software vendors who are creating new and innovative plug-ins.
... the embed element has a
number of attributes that determine the appearance and size of the plug-in instance, including these: the border and frameborder attributes specify the size of a border for the plug-in or draw a borderless plug-in.
Search - Firefox Developer Tools
the debugger will display the
number of matches in the code and highlight each result: using the outline tab if you are searching for a specific function within the current javascript file, you can use the outline tab in the debugger to find it quickly.
... if the string exists in any of the files in the project, the search will return a list showing a list by file and line
number.
Tree map view - Firefox Developer Tools
here are some example snapshots, as they appear in the tree map view: this treemap is from the dom allocation example, which simply runs a script that creates a large
number of dom nodes (200 htmldivelement objects and 4000 htmlspanelement objects).
...you can see the much larger proportion of the heap occupied by scripts, that are loaded from a large
number of origins.
Network request details - Firefox Developer Tools
these details include: last fetched: the date the resource was last fetched fetched count: the
number of times in the current session that the resource has been fetched data size: the size of the resource.
... the browser imposes a limit on the
number of simultaneous connections that can be made to a single server.
Animating CSS properties - Firefox Developer Tools
with css animations you specify a
number of keyframes, each of which uses css to define the appearance of the element at a particular stage of the animation.
... there are a
number of elements, and we've added a linear-gradient background and a box-shadow to each element, because they are both relatively expensive effects to paint.
Responsive Design Mode - Firefox Developer Tools
screen size - you can edit the width and height values to change the device size by editing a
number directly or using the up and down keys to increase or decrease the value by 1 pixels on each keypress or hold and shift to change the value by 10.
... the characteristics emulated are: download speed upload speed minimum latency the table below lists the
numbers associated with each network type, but please do not rely on this feature for exact performance measurements; it's intended to give an approximate idea of the user experience in different conditions.
Taking screenshots - Firefox Developer Tools
--delay
number the
number of seconds to delay before taking the screenshot; you can use an interger or floating point
number.
... --dpr
number the device pixel ratio to use when taking the screenshot.
View Source - Firefox Developer Tools
if the
number is higher than the lines in a file, you receive an error message.
... link to a line
number it is possible to link to a particular line, by adding the #linennn anchor to the url the browser will jump to the nnn line.
Web Console UI Tour - Firefox Developer Tools
toolbar the toolbar across the top contains a
number of features: garbage can: click this icon to clear the contents of the console.
... group similar messages: when enabled, similar types of messages are grouped together, with an indicator of the
number of occurrences.
AbsoluteOrientationSensor - Web APIs
syntax var absoluteorientationsensor = new absoluteorientationsensor([options]) parameters options optional options are as follows: frequency: the desired
number of times per second a sample should be taken, meaning the
number of times per second that sensor.onreading will be called.
... a whole
number or decimal may be used, the latter for frequencies less than a second.
Accelerometer.Accelerometer() - Web APIs
syntax var accelerometer = new accelerometer([options]) parameters options optional options are as follows: frequency: the desired
number of times per second a sample should be taken, meaning the
number of times per second that sensor.onerror will be called.
... a whole
number or decimal may be used, the latter for frequencies less than a second.
AesCtrParams - Web APIs
typically this is achieved by splitting the initial counter block value into two concatenated parts: a nonce (that is, a
number that may only be used once).
... length a
number — the
number of bits in the counter block that are used for the actual counter.
AesGcmParams - Web APIs
the aes-gcm specification recommends that the iv should be 96 bits long, and typically contains bits from a random
number generator.
... taglength optional a
number.
AmbientLightSensor.AmbientLightSensor() - Web APIs
syntax var ambientlightsensor = new ambientlightsensor(options) parameters options optional currently only one option is supported: frequency: the desired
number of times per second a sample should be taken, meaning the
number of times per second that sensor.onreading will be called.
... a whole
number or decimal may be used, the latter for frequencies less than a second.
AnalyserNode.frequencyBinCount - Web APIs
this generally equates to the
number of data values you will have to play with for the visualization.
... syntax var arraylength = analysernode.frequencybincount; value an unsigned integer, equal to the
number of values that analysernode.getbytefrequencydata() and analysernode.getfloatfrequencydata() copy into the provided typedarray.
AnalyserNode - Web APIs
number of inputs 1
number of outputs 1 (but may be left unconnected) channel count mode "max" channel count 2 channel interpretation "speakers" inheritance this interface inherits from the following parent interfaces: <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666...
...this generally equates to the
number of data values you will have to play with for the visualization.
AudioBuffer - Web APIs
audiobuffer.
numberofchannels read only returns an integer representing the
number of discrete audio channels described by the pcm data stored in the buffer.
... var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create an empty three-second stereo buffer at the sample rate of the audiocontext var myarraybuffer = 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.
AudioBufferSourceNode.loopEnd - Web APIs
the loopend property of the audiobuffersourcenode interface specifies is a floating point
number specifying, in seconds, at what offset into playing the audiobuffer playback should loop back to the time indicated by the loopstart property.
... syntax audiobuffersourcenode.loopend = endoffsetinseconds; var endoffsetinseconds = audiobuffersourcenode.loopend; value a floating-point
number indicating the offset, in seconds, into the audio buffer at which each loop will loop return to the beginning of the loop (that is, the current play time gets reset to audiobuffersourcenode.loopstart).
AudioNode.channelInterpretation - Web APIs
when the
number of channels doesn't match between an input and an output, up- or down-mixing happens according the following rules.
...this fallback is therefore not future proof as the behavior of the browsers for a specific
number of channels may change in the future.
AudioNode.disconnect() - Web APIs
the index
numbers are defined according to the
number of output channels (see audio channels).
...the index
numbers are defined according to the
number of input channels (see audio channels).
AudioTrackList.onremovetrack - Web APIs
example this simple example just fetches the current
number of audio tracks in the media element whenever a track is removed from the media element.
... document.queryselector("my-video").audiotracks.onremovetrack = function(event) { mytrackcount = document.queryselector("my-video").audiotracks.length; }; the current
number of audio tracks remaining in the media element is obtained from audiotracklist property length.
AudioTrackList - Web APIs
length read only the
number of tracks in the list.
... var audiotracks = document.queryselector("video").audiotracks; monitoring track count changes in this example, we have an app that displays information about the
number of channels available.
AudioWorkletProcessor.process - Web APIs
the
number of inputs and thus the length of that array is fixed at the construction of the node (see audioworkletnodeoptions).
... the
number of channels in each input may vary, depending on channelcount and channelcountmode properties.
BaseAudioContext.sampleRate - Web APIs
the samplerate property of the baseaudiocontext interface returns a floating point
number representing the sample rate, in samples per second, used by all nodes in this audio context.
... syntax baseaudiocontext.samplerate; value a floating point
number indicating the audio context's sample rate, in samples per second.
BasicCardRequest - Web APIs
instead of using this property, it is up to the server to check support for the card given the information coded into the account
number.
...this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like this: { "card
number' : '9999999999999999", "cardholdername' : 'mr dick straw", "cardsecuritycode" : "999", "expirymonth" : "07", "expiryyear" : "2021", "billingaddress" : { "country" : "gb", // etc.
BasicCardResponse.cardSecurityCode - Web APIs
syntax "cardsecuritycode" : "
number" value a domstring representing the card security code.
...this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like this: { "card
number' : '9999999999999999", "cardholdername' : 'mr.
BasicCardResponse.cardholderName - Web APIs
the card
number property of the basiccardresponse dictionary contains the cardholder name of the card used to make the payment.
...this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like this: { "card
number' : '9999999999999999", "cardholdername' : 'mr.
BasicCardResponse.expiryMonth - Web APIs
syntax "expirymonth" : "
number" value a domstring representing the card expiry month as a two-digit
number in the range 01 to 12.
...this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like this: { "card
number' : '9999999999999999", "cardholdername' : 'mr.
BasicCardResponse.expiryYear - Web APIs
syntax "expiryyear" : "
number" value a domstring representing the card expiry year as a four-digit
number in the range 0000 to 9999.
...this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like this: { "card
number' : '9999999999999999", "cardholdername' : 'mr.
deviceClass - Web APIs
the bluetoothdevice.deviceclass read-only property returns a
number representing the bluetooth devices "class of device".
... syntax var deviceclass = instanceofbluetoothdevice.deviceclass returns a
number.
CSS numeric factory functions - Web APIs
syntax css.
number(
number); css.percent(
number); // <length> css.em(
number); css.ex(
number); css.ch(
number); css.ic(
number); css.rem(
number); css.lh(
number); css.rlh(
number); css.vw(
number); css.vh(
number); css.vi(
number); css.vb(
number); css.vmin(
number); css.vmax(
number); css.cm(
number); css.mm(
number); css.q(
number); css.in(
number); css.pt(
number); css.pc(
number); css.px(
number); // <angle> css.deg(
number); css.grad(
number); css.rad(
number); css.turn(
number); // <time> css.s(
number); c...
...ss.ms(
number); // <frequency> css.hz(
number); css.khz(
number); // <resolution> css.dpi(
number); css.dpcm(
number); css.dppx(
number); // <flex> css.fr(
number); examples we use the css.vmax() numeric factory function to create a cssunitvalue: let height = css.vmax(50); console.log( height ); // cssunitvalue {value: 50, unit: "vmax"} console.log( height.value ) // 50 console.log( height.unit ) // vmax in this example, we set the margin on our element using the css.px() factory function: myelement.attributestylemap.set('margin', css.px(40)); let currentmargin = myelement.attributestylemap.get('margin'); console.log(currentmargin.value, currentmargin.unit); // 40, 'px' specification specification status comment css object model (cssom)the definition of 'nume...
CSSNumericValue.add() - Web APIs
the add() method of the cssnumericvalue interface adds a supplied
number to the cssnumericvalue.
... syntax var cssmathsum = cssnumericvalue.add(double | cssnumericvalue); parameters
number either a
number or a cssnumericvalue.
CSSNumericValue.max() - Web APIs
syntax var cssunitvalue = cssnumericvalue.man(
number1 ...
...
numbern); parameters
number either a
number or a cssnumericvalue.
CSSNumericValue.min() - Web APIs
syntax var cssunitvalue = cssnumericvalue.min(
number1 ...
...
numbern); parameters
number either a
number or a cssnumericvalue.
CSSNumericValue.sub() - Web APIs
the sub() method of the cssnumericvalue interface subtracts a supplied
number from the cssnumericvalue.
... syntax var cssmathsum = cssnumericvalue.sub(
number); parameters
number either a
number or a cssmathsum.
CSSNumericValue.sum() - Web APIs
the sub() method of the cssnumericvalue interface subtracts a supplied
number from the cssnumericvalue.
... syntax var cssmathsum = cssnumericvalue.sub(
number); parameters
number either a
number or a cssmathsum return value a cssmathsum exceptions typeerror indicates that an invalid type was passed to the method.
CSSNumericValue - Web APIs
event handlers no methods cssnumericvalue.add adds a supplied
number to the cssnumericvalue.
... cssnumericvalue.sub subtracts a supplied
number from the cssnumericvalue.
CSSValueList.length - Web APIs
the length read-only property of the cssvaluelist interface represents the
number of cssvalues in the list.
... syntax var length = cssvaluelist.length; value an unsigned long representing the
number of cssvalues.
CSSValueList - Web APIs
cssvaluelist.lengthread only an unsigned long representing the
number of cssvalues in the list.
...if index is greater than or equal to the
number of values in the list, this returns null.
Using the CSS properties and values API - Web APIs
eight: 40vh; display: block; width: 100%; font-size: 3vw; } window.css.registerproperty({ name: '--registered', syntax: '<color>', inherits: false, initialvalue: 'red', }); while not functionally accurate, a good way to think about the difference between the unregistered property in the above example and the registered property is the difference between a <custom-ident> and a
number when trying to animate height.
... you cannot transition or animate from auto to a
number because the browser doesn't know what the value of auto is until it's calculated.
CanvasGradient.addColorStop() - Web APIs
syntax void gradient.addcolorstop(offset, color); parameters offset a
number between 0 and 1, inclusive, representing the position of the color stop.
... 0 represents the start of the gradient and 1 represents the end; an index_size_err is raised if the
number is outside that range.
CanvasRenderingContext2D.getLineDash() - Web APIs
syntax ctx.getlinedash(); return value an array of
numbers that specify distances to alternately draw a line and a gap (in coordinate space units).
... if the
number, when setting the elements, is odd, the elements of the array get copied and concatenated.
CanvasRenderingContext2D.setLineDash() - Web APIs
syntax ctx.setlinedash(segments); parameters segments an array of
numbers that specify distances to alternately draw a line and a gap (in coordinate space units).
... if the
number of elements in the array is odd, the elements of the array get copied and concatenated.
CanvasRenderingContext2D.shadowBlur - Web APIs
syntax ctx.shadowblur = level; level a non-negative float specifying the level of shadow blur, where 0 represents no blur and larger
numbers represent increasingly more blur.
... this value doesn't correspond to a
number of pixels, and is not affected by the current transformation matrix.
Manipulating video using canvas - Web APIs
line 4 computes the
number of pixels in the image by dividing the total size of the frame's image data by four.
... the for loop that begins on line 6 scans through the frame's pixels, pulling out the red, green, and blue values for each pixel, and compares the values against predetermined
numbers that are used to detect the green screen that will be replaced with the still background image imported from foo.png.
Basic animations - Web APIs
the
number of callbacks is usually 60 times per second and may be reduced to a lower rate when running in background tabs.
...i.y = 0 : i.y < 0 && (i.y = h), e = fa.findindex(t => coll({ ...this.sn[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 ?
ChannelMergerNode() - Web APIs
options optional a channelmergeroptions dictionary object defining the properties you want the channelmergernode to have (also inherits parameters from the audionodeoptions dictionary):
numberofinputs: a
number defining the
number of inputs the channelmergernode should have.
... example var ac = new audiocontext(); var options = {
numberofinputs : 2 } var mymerger = new channelmergernode(ac, options); specifications specification status comment web audio apithe definition of 'channelmergernode' in that specification.
ChannelSplitterNode.ChannelSplitterNode() - Web APIs
options optional a channelsplitteroptions dictionary object defining the properties you want the channelsplitternode to have (it also inherits the options defined in the audionodeoptions dictionary):
numberofoutputs: a
number defining the
number of inputs the channelsplitternode should have.
... example var ac = new audiocontext(); var options = {
numberofoutputs : 2 } var mysplitter = new channelsplitternode(ac, options); specifications specification status comment web audio apithe definition of 'channelsplitternode' in that specification.
console.assert() - Web APIs
examples the following code example demonstrates the use of a javascript object following the assertion: const errormsg = 'the # is not even'; for (let
number = 2;
number <= 5;
number += 1) { console.log('the # is ' +
number); console.assert(
number % 2 === 0, {
number:
number, errormsg: errormsg}); // or, using es2015 object property shorthand: // console.assert(
number % 2 === 0, {
number, errormsg}); } // output: // the # is 2 // the # is 3 // assertion failed: {
number: 3, errormsg: "the # is not even"} // the # is 4 // the # is 5 // ass...
...ertion failed: {
number: 5, errormsg: "the # is not even"} note that, while a string containing a substitution string works as a parameter for console.log in node and many, if not most, browsers...
console.count() - Web APIs
the console.count() method logs the
number of times that this particular call to count() has been called.
...if supplied, count() outputs the
number of times it has been called with that label.
ConstrainULong - Web APIs
the constrainulong type is used to specify a constraint for a property whose value is an integral
number.
... properties if the value of a constrainulong is an object rather than a
number, it may have the properties below in addition to the properties it inherits from ulongrange.
DOMLocator - Web APIs
properties domlocator.line
number read only returns a positive integer or -1.
... domlocator.column
number read only returns a positive integer or -1.
DOMPointInit - Web APIs
dompointinit.y an unrestricted floating-point
number providing the point's y-coordinate.
... dompointinit.w the point's w perspective value, given as an unrestricted floating-point
number.
DataTransfer.mozTypesAt() - Web APIs
if the index is not in the range from 0 to the
number of items minus one, an empty string list is returned.
...if the index is not in the range from 0 to the
number of items minus one, an empty string list is returned.
DataTransferItemList.length - Web APIs
the read-only length property of the datatransferitemlist interface returns the
number of items currently in the drag item list.
... syntax length = datatransferitemlist.length; value the
number of drag data items in the list, or 0 if the list is empty or disabled.
DeprecationReportBody - Web APIs
line
number a
number representing the line in the source file in which the deprecated feature was used, if known, or null otherwise.
... column
number a
number representing the column in the source file in which the deprecated feature was used, if known, or null otherwise.
Document.open() - Web APIs
examples the following simple code opens the document and replaces its content with a
number of different html fragments, before closing it again.
... document.open(); document.write("<p>hello world!</p>"); document.write("<p>i am a fish</p>"); document.write("<p>the
number is 42</p>"); document.close(); notes an automatic document.open() call happens when document.write() is called after the page has loaded.
Document - Web APIs
the document interface is extended with the parentnode interface: parentnode.childelementcount read only returns the
number of children of this parentnode which are elements.
... document.xmlversion obsolete since gecko 10 returns the version
number as specified in the xml declaration or "1.0" if the declaration is absent.
Examples of web and XML development using the DOM - Web APIs
put the following code into a blank text file and load it into a variety of browsers, you'll be surprised at the different
number and names of properties.
... there are a
number of other convenience methods belonging to the table interface that can be used for creating and modifying tables.
Document Object Model (DOM) - Web APIs
static type svgangle svgcolor svgicccolor svgelementinstance svgelementinstancelist svglength svglengthlist svgmatrix svgnamelist svg
number svg
numberlist svgpaint svgpathseg svgpathsegclosepath svgpathsegmovetoabs svgpathsegmovetorel svgpathseglinetoabs svgpathseglinetorel svgpathsegcurvetocubicabs svgpathsegcurvetocubicrel svgpathsegcurvetoquadraticabs svgpathsegcurvetoquadraticrel svgpathsegarcabs svgpathsegarcrel svgpathseglinetohorizontalabs svgpathseglinetohorizontalrel svgpathsegline...
... svgpathsegcurvetocubicsmoothrel svgpathsegcurvetoquadraticsmoothabs svgpathsegcurvetoquadraticsmoothrel svgpathseglist svgpoint svgpointlist svgpreserveaspectratio svgrect svgstringlist svgtransform svgtransformlist animated type svganimatedangle svganimatedboolean svganimatedenumeration svganimatedinteger svganimatedlength svganimatedlengthlist svganimated
number svganimated
numberlist svganimatedpathdata svganimatedpoints svganimatedpreserveaspectratio svganimatedrect svganimatedstring svganimatedtransformlist smil-related interfaces elementtimecontrol timeevent other svg interfaces getsvgdocument shadowanimation svgcolorprofilerule svgcssrule svgdocument svgexception svgexternalresourcesrequired svgfittoviewbox svg...
EXT_disjoint_timer_query - Web APIs
types this extension exposes a new type: gluint64ext unsigned 64-bit integer
number.
... ext.query_counter_bits_ext a glint indicating the
number of bits used to hold the query result for the given target.
EffectTiming.delay - Web APIs
the effecttiming dictionary's delay property in the web animations api represents the
number of milliseconds to delay the start of the animation.
... syntax var timingproperties = { delay: delayinmilliseconds }; timingproperties.delay = delayinmilliseconds; value a
number specifying the delay, in milliseconds, from the start of the animation's play cycle to the beginning of its active interval (the time index at which actual animation begins).
EffectTiming.duration - Web APIs
syntax var timingproperties = { duration: durationinmilliseconds | "auto" }; timingproperties.duration = durationinmilliseconds | "auto"; value the
number of milliseconds long a single beginning-to-end iteration of the animation should take.
... exceptions typeerror the specified value is either a string other than "auto", a
number less than zero, nan, or some other type of object entirely.
EffectTiming.endDelay - Web APIs
the enddelay property of the effecttiming dictionary (part of the web animations api) indicates the
number of milliseconds to delay after the active period of an animation sequence.
... syntax var timingproperties = { enddelay: delayinmilliseconds } timingproperties.enddelay = delayinmilliseconds; value a
number representing the end delay, specified in milliseconds.
EffectTiming.iterationStart - Web APIs
web animations api's effecttiming dictionary's iterationstart property specifies the repetition
number which repetition the animation begins at and its progress through it.
... syntax var timingproperties = { iterationstart = iteration
number }; timingproperties.iterationstart = iteration
number; value a floating-point value whose value is at least 0 and is not +infinity, indicating the offset into the
number of iterations the animation sequence is to run at which to start animating.
Element: click event - Web APIs
usage notes the mouseevent object passed into the event handler for click has its detail property set to the
number of times the target was clicked.
... examples this example displays the
number of consecutive clicks on a <button>.
Element.getBoundingClientRect() - Web APIs
scripts without access to these properties can use code like this: // for scrollx (((t = document.documentelement) || (t = document.body.parentnode)) && typeof t.scrollleft == '
number' ?
... t : document.body).scrollleft // for scrolly (((t = document.documentelement) || (t = document.body.parentnode)) && typeof t.scrolltop == '
number' ?
Element: mouseenter event - Web APIs
with deep hierarchies, the
number of mouseenter events sent can be quite huge and cause significant performance problems.
...it then adds an item to the list with the
number of the mouseenter or mouseleave event.
ErrorEvent - Web APIs
errorevent.lineno read only is an integer containing the line
number of the script file on which the error occurred.
... errorevent.colno read only is an integer containing the column
number of the script file on which the error occurred.
EventSource.readyState - Web APIs
the readystate read-only property of the eventsource interface returns a
number representing the state of the connection.
... syntax var myreadystate = eventsource.readystate; value a
number representing the state of the connection.
File.lastModified - Web APIs
the file.lastmodified read-only property provides the last modified date of the file as the
number of milliseconds since the unix epoch (january 1, 1970 at midnight).
... syntax const time = instanceoffile.lastmodified; value a
number that represents the
number of milliseconds since the unix epoch.
FileRequest.onprogress - Web APIs
those objects contain two properties: loaded a
number representing the current amount of bytes processed by the operation.
... total a
number representing the total amount of bytes that will be processed by the operation.
File and Directory Entries API support in Firefox - Web APIs
over time, a
number of popular sites and web applications came to use it, often without providing any means of falling back to standard apis or even checking to be sure the api is available before using it.
... this has caused a
number of popular web sites not to work properly on browsers other than chrome.
GainNode - Web APIs
a gainnode always has exactly one input and one output, both with the same
number of channels.
...
number of inputs 1
number of outputs 1 channel count mode "max" channel count 2 (not used in the default count mode) channel interpretation "speakers" constructor gainnode() creates a new instance of a gainnode object.
Gyroscope.Gyroscope() - Web APIs
syntax var gyroscope = new gyroscope([options]) parameters options optional options are as follows: frequency: the desired
number of times per second a sample should be taken, meaning the
number of times per second that sensor.onreading will be called.
... a whole
number or decimal may be used, the latter for frequencies less than a second.
HTMLCanvasElement - Web APIs
htmlcanvaselement.height the height html attribute of the <canvas> element is a positive integer reflecting the
number of logical pixels (or rgba values) going down one column of the canvas.
... htmlcanvaselement.width the width html 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.
HTMLFontElement.size - Web APIs
it contains either an integer
number in the range of 1-7 or a relative value to increase/decrease the value of the size attribute of the <basefont> element.
... the format of the string must follow one of the following html microsyntaxes: microsyntax description examples valid size
number string integer
number in the range of 1-7 6 relative size string +x or -x, where x is the
number relative to the value of the size attribute of the <basefont> element (the result should be in the same range of 1-7) +2 -1 syntax sizestring = fontobj.size; fontobj.size = sizestring; examples // assumes there is <font id="f"> element in the html var f = document.getelementbyid("f"); f.size = "6"; specifications the <font> tag is not supported in html5 and as a result neither is <font>.size .
HTMLHyperlinkElementUtils.port - Web APIs
the htmlhyperlinkelementutils.port property is a usvstring containing the port
number of the url.
... if the url does not contain an explicit port
number, it will be set to ''.
HTMLMarqueeElement - Web APIs
htmlmarqueeelement.loop sets the
number of times the marquee will scroll.
...it can only fire when the loop attribute is set to some
number that is greater than 0.
HTMLMediaElement: loadedmetadata event - Web APIs
bubbles no cancelable no interface event 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.
... mozframebufferlength read only int the
number of samples collected in all channels.
HTMLSelectElement - Web APIs
htmlselectelement.length an unsigned long the
number of <option> elements in this select element.
... htmlselectelement.size a long reflecting the size html attribute, which contains the
number of visible items in the control.
HTMLTableElement.insertRow() - Web APIs
if index is -1 or equal to the
number of rows, the row is appended as the last row.
... if index is greater than the
number of rows, an indexsizeerror exception will result.
HTMLTableRowElement.insertCell() - Web APIs
if index is -1 or equal to the
number of cells, the cell is appended as the last cell in the row.
... if index is greater than the
number of cells, an indexsizeerror exception will result.
HTMLVideoElement.getVideoPlaybackQuality() - Web APIs
example this example updates an element to indicate the total
number of video frames that have elapsed so far in the playback process.
... this value includes any dropped or corrupted frames, so it's not the same as "total
number of frames played." var videoelem = document.getelementbyid("my_vid"); var counterelem = document.getelementbyid("counter"); var quality = videoelem.getvideoplaybackquality(); counterelem.innertext = quality.totalvideoframes; specifications specification status comment media playback qualitythe definition of 'htmlvideoelement.getvideoplaybackquality()' in that specification.
IDBCursor - Web APIs
you can have an unlimited
number of cursors at the same time.
... methods idbcursor.advance() sets the
number of times a cursor should move its position forward.
IDBCursorSync - Web APIs
you can have only one instance of idbcursorsync representing a cursor, but you can have an unlimited
number of cursors at the same time.
... method overview bool continue (in optional any key); void remove () raises (idbdatabaseexception); attributes attribute type description count readonly unsigned long long the total
number of objects that share the current key.
IDBFactory.open() - Web APIs
experimental gecko options object options (version and storage) optional in gecko, since version 26, you can include a non-standard options object as a parameter of idbfactory.open that contains the version
number of the database, plus a storage value that specifies whether you want to use persistent or temporary storage.
... exceptions this method may raise a domexception of the following types: exception description typeerror the value of version is zero or a negative
number or not a
number.
IDBIndex.count() - Web APIs
the count() method of the idbindex interface returns an idbrequest object, and in a separate thread, returns the
number of records within a key range.
... myindex.count() is then used to count the
number of records in the index, and the result of that request is logged to the console when its success callback returns.
IDBIndex.getAll() - Web APIs
count optional the
number records to return.
... if this value exceeds the
number of records in the query, the browser will only retrieve the first item.
IDBIndex.getAllKeys() - Web APIs
count optional the
number records to return.
... if this value exceeds the
number of records in the query, the browser will only retrieve the first item.
IDBObjectStore.deleteIndex() - Web APIs
example in the following example you can see the idbopendbrequest.onupgradeneeded handler being used to update the database structure if a database with a higher version
number is loaded.
...this is used a lot below db = this.result; // run the displaydata() function to populate the task list with all the to-do list data already in the idb displaydata(); }; // this event handles the event whereby a new version of the database needs to be created // either one has not been created before, or a new version
number has been submitted via the // window.indexeddb.open line above //it is only implemented in recent browsers dbopenrequest.onupgradeneeded = function(event) { var db = this.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle"...
IDBTransaction - Web APIs
transaction failures transactions can fail for a fixed
number of reasons, all of which (except the user agent crash) will trigger an abort callback: abort due to bad requests, e.g.
...this mode is for updating the version
number of transactions that were started using the setversion() method of idbdatabase objects.
IIRFilterNode - Web APIs
number of inputs 1
number of outputs 1 channel count mode "max" channel count same as on the input channel interpretation "speakers" typically, it's best to use the biquadfilternode interface to implement higher-order filters.
...it includes some different coefficient values for different lowpass frequencies — you can change the value of the filter
number constant to a value between 0 and 3 to check out the different available effects.
IdleDeadline.timeRemaining() - Web APIs
the timeremaining() method on the idledeadline interface returns the estimated
number of milliseconds remaining in the current idle period.
... syntax timeremaining = idledeadline.timeremaining(); return value a domhighrestimestamp value (which is a floating-point
number) representing the
number of milliseconds the user agent estimates are left in the current idle period.
Basic concepts - Web APIs
the key must be of a data type that has a
number that is greater than the one before it.
... value each record has a value, which could include anything that can be expressed in javascript, including boolean,
number, string, date, object, array, regexp, undefined, and null.
KeyboardLayoutMap.size - Web APIs
the size read-only property of the keyboardlayoutmap interface returns the
number of elements in the map.
... syntax var size = keyboardlayoutmap.size() value a
number.
KeyframeEffect.setKeyframes() - Web APIs
element.animate({ opacity: [ 0, 1 ], // [ from, to ] color: [ "#fff", "#000" ] // [ from, to ] }, 2000); using this format, the
number of elements in each array does not need to be equal.
... the following special attributes may also be specified: offset the offset of the keyframe specified as a
number between 0.0 and 1.0 inclusive or null.
LinearAccelerationSensor.LinearAccelerationSensor() - Web APIs
syntax var linearaccelerationsensor = new linearaccelerationsensor([options]) parameters options optional options are as follows: frequency: the desired
number of times per second a sample should be taken, meaning the
number of times per second that sensor.onreading will be called.
... a whole
number or decimal may be used, the latter for frequencies less than a second.
Location: port - Web APIs
the port property of the location interface is a usvstring containing the port
number of the url.
... if the url does not contain an explicit port
number, it will be set to ''.
MSManipulationEvent.initMSManipulationEvent() - Web APIs
example interface msmanipulationevent extends uievent { readonly currentstate:
number; readonly inertiadestinationx:
number; readonly inertiadestinationy:
number; readonly laststate:
number; initmsmanipulationevent(typearg: string, canbubblearg: boolean, cancelablearg: boolean, viewarg: window, detailarg:
number, laststate:
number, currentstate:
number): void; readonly ms_manipulation_state_active:
number; readonly ms_manipulation_state_cancelled:
number; ...
... readonly ms_manipulation_state_committed:
number; readonly ms_manipulation_state_dragging:
number; readonly ms_manipulation_state_inertia:
number; readonly ms_manipulation_state_preselect:
number; readonly ms_manipulation_state_selecting:
number; readonly ms_manipulation_state_stopped:
number; } see also msmanipulationevent microsoft api extensions ...
MSManipulationEvent - Web APIs
example interface msmanipulationevent extends uievent { readonly currentstate:
number; readonly inertiadestinationx:
number; readonly inertiadestinationy:
number; readonly laststate:
number; initmsmanipulationevent(typearg: string, canbubblearg: boolean, cancelablearg: boolean, viewarg: window, detailarg:
number, laststate:
number, currentstate:
number): void; readonly ms_manipulation_state_active:
number; readonly ms_manipulation_state_cancelled:
number; ...
... readonly ms_manipulation_state_committed:
number; readonly ms_manipulation_state_dragging:
number; readonly ms_manipulation_state_inertia:
number; readonly ms_manipulation_state_preselect:
number; readonly ms_manipulation_state_selecting:
number; readonly ms_manipulation_state_stopped:
number; } see also touchevent msmanipulationstatechanged microsoft api extensions ...
Magnetometer.Magnetometer() - Web APIs
syntax var magnetometer = new magnetometer([options]) parameters options optional options are as follows: frequency: the desired
number of times per second a sample should be taken, meaning the
number of times per second that sensor.onreading will be called.
... a whole
number or decimal may be used, the latter for frequencies less than a second.
MediaElementAudioSourceNode - Web APIs
the amount of channels in the output equals the
number of channels of the audio referenced by the htmlmediaelement used in the creation of the node, or is 1 if the htmlmediaelement has no audio.
...
number of inputs 0
number of outputs 1 channel count defined by the media in the htmlmediaelement passed to the audiocontext.createmediaelementsource method that created it.
MediaStreamAudioDestinationNode - Web APIs
number of inputs 1
number of outputs 0 channel count 2 channel count mode "explicit" channel count interpretation "speakers" constructor mediastreamaudiodestinationnode.mediastreamaudiodestinationnode() creates a new mediastreamaudiodestinationnode object instance.
... mediastreamaudiodestinationnode.stream is a mediastream containing a single audiomediastreamtrack with the same
number of channels as the node itself.
MediaStreamAudioSourceNode - Web APIs
the
number of channels output by the node matches the
number of tracks found in the selected audio track.
...
number of inputs 0
number of outputs 1 channel count defined by the first audio mediastreamtrack passed to the audiocontext.createmediastreamsource() method that created it.
MediaTrackSettings.aspectRatio - Web APIs
the mediatracksettings dictionary's aspectratio property is a double-precision floating-point
number indicating the aspect ratio of the mediastreamtrack as currently configured.
... syntax var aspectratio = mediatracksettings.aspectratio; value a double-precision floating-point
number indicating the current configuration of the track's aspect ratio.
MediaTrackSettings.frameRate - Web APIs
the mediatracksettings dictionary's framerate property is a double-precision floating-point
number indicating the frame rate, in frames per second, of the mediastreamtrack as currently configured.
... syntax var framerate = mediatracksettings.framerate; value a double-precision floating-point
number indicating the current configuration of the track's frame rate, in frames per second.
MediaTrackSettings.latency - Web APIs
the mediatracksettings dictionary's latency property is a double-precision floating-point
number indicating the estimated latency (specified in seconds) of the mediastreamtrack as currently configured.
... syntax var latency = mediatracksettings.latency; value a double-precision floating-point
number indicating the estimated latency, in seconds, of the audio track as currently configured.
MediaTrackSettings.volume - Web APIs
the mediatracksettings dictionary's volume property is a double-precision floating-point
number indicating the volume of the mediastreamtrack as currently configured, as a value from 0.0 (silence) to 1.0 (maximum supported volume for the device).
... syntax var volume = mediatracksettings.volume; value a double-precision floating-point
number indicating the volume, from 0.0 to 1.0, of the audio track as currently configured.
Navigator.deviceMemory - Web APIs
it’s approximated by rounding down to the nearest power of 2, then dividing that
number by 1024.
... syntax memoryamount = navigator.devicememory value a floating point
number; one of 0.25, 0.5, 1, 2, 4, 8.
NodeList.length - Web APIs
the nodelist.length property returns the
number of items in a nodelist.
... syntax numitems = nodelist.length numitems is an integer value representing the
number of items in a nodelist.
OscillatorNode - Web APIs
its basic property defaults (see audionode for definitions) are:
number of inputs 0
number of outputs 1 channel count mode max channel count 2 (not used in the default count mode) channel interpretation speakers constructor oscillatornode() creates a new instance of an oscillatornode object, optionally providing an object specifying default values for the node's properties.
... oscillatornode.type a string which specifies the shape of waveform to play; this can be one of a
number of standard values, or custom to use a periodicwave to describe a custom waveform.
PannerNode - Web APIs
number of inputs 1
number of outputs 1 channel count mode "clamped-max" channel count 2 channel interpretation "speakers" constructor pannernode.pannernode creates a new pannernode object instance.
...this feature was not clearly specified and had a
number of issues, so it was removed from the specification.
PaymentResponse.onpayerdetailchange - Web APIs
examples in the example below, onpayerdetailchange is used to set up a listener for the payerdetailchange event in order to validate the information entered by the user, requesting that any mistakes be corrected // options for paymentrequest(), indicating that shipping address, // payer email address, name, and phone
number all be collected.
...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 payment request apithe definition of 'onpayerdetailchange' in that specification.
PaymentResponse: payerdetailchange event - Web APIs
stupdateevent event handler property onpayerdetailchange examples in the example below, onpayerdetailchange is used to set up a listener for the payerdetailchange event in order to validate the information entered by the user, requesting that any mistakes be corrected // options for paymentrequest(), indicating that shipping address, // payer email address, name, and phone
number all be collected.
...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 handler using the addeventlistener() method: response.addeventlistener("payerdetailchange", async ev => { ...
PaymentResponse - Web APIs
paymentresponse.payerphone read only secure context returns the phone
number supplied by the user.
...allows the developer to revalidate any requested user data (e.g., the phone
number or the email address) if it changes.
performance.setResourceTimingBufferSize() - Web APIs
the setresourcetimingbuffersize() method sets the browser's resource timing buffer size to the specified
number of "resource" performance entry type objects.
... syntax performance.setresourcetimingbuffersize(maxsize); arguments maxsize a
number representing the maximum
number of performance entry objects the browser should hold in its performance entry buffer.
Performance - Web APIs
performance.now() returns a domhighrestimestamp representing the
number of milliseconds elapsed since a reference instant.
... performance.setresourcetimingbuffersize() sets the browser's resource timing buffer size to the specified
number of "resource" type performance entry objects.
PerformanceNavigationTiming.redirectCount - Web APIs
the redirectcount property returns a timestamp representing the
number of redirects since the last non-redirect navigation under the current browsing context.
... syntax perfentry.redirectcount; return value a
number representing the
number of redirects since the last non-redirect navigation under the current browsing context.
Plugin - Web APIs
plugin.version read only the plugin's version
number string.
... methods plugin.item returns the mime type of a supported content type, given the index
number into a list of supported types.
Multi-touch interaction - Web APIs
in this application, when a pointer is placed down on an element, the background color of the element changes, depending on the
number of active touch points the element has.
... function update_background(ev) { // change background color based on the
number of simultaneous touches/pointers // currently down: // white - target element has no touch points i.e.
Push API - Web APIs
firefox allows a limited
number (quota) of push messages to be sent to an application, although push messages that generate notifications are exempt from this limit.
... note: chrome versions earlier than 52 require you to set up a project on google cloud messaging to send push messages, and use the associated project
number and api key when sending push notifications.
RTCDataChannel: bufferedamountlow event - Web APIs
a bufferedamountlow event is sent to an rtcdatachannel when the
number of bytes currently in the outbound data transfer buffer falls below the threshold specified in bufferedamountlowthreshold.
... bubbles no cancelable no interface event event handler property onbufferedamountlow examples this example sets up a handler for bufferedamountlow to request more data any time the data channel's buffer falls below the
number of bytes specified by bufferedamountlowthreshold, which we have set to 65536.
RTCDataChannel.id - Web APIs
the read-only rtcdatachannel property id returns an id
number (between 0 and 65,534) which uniquely identifies the rtcdatachannel.
... while the label property doesn't have to be unique, this id
number is guaranteed to be unique among all data channels.
RTCDataChannel.maxRetransmits - Web APIs
the read-only rtcdatachannel property maxretransmits returns the maximum
number of times the browser should try to retransmit a message before giving up, as set when the data channel was created, or null, which indicates that there is no maximum.
... syntax var tries = adatachannel.maxretransmits; value the maximum
number of times the browser will try to retransmit a message before giving up, or null if not set when rtcpeerconnection.createdatachannel() was called.
RTCDtlsTransport - Web APIs
the
number of dtls transports created and how they're used depends on the bundling mode used when creating the rtcpeerconnection.
...thus, a connection that has any
number of audio and video channels will always have exactly one dtls transport for audio and one for video communications.
RTCIceCandidatePairStats.consentRequestsSent - Web APIs
the rtcicecandidatepairstats property consentrequestssent specifies the
number of consent requests that have been sent by this peer to the remote peer on the connection described by the pair of candidates.
... syntax consentrequestssent = rtcicecandidatepairstats.consentrequestssent; value an integer indicating the
number of consent requests this peer has sent to the other peer over the connection described by the pair of candidates referenced by this rtcicecandidatepairstats object.
RTCIceCandidatePairStats.responsesReceived - Web APIs
the responsesreceived property in the rtcicecandidatepairstats dictionary indicates the total
number of stun connectivity check responses that have been received on the connection described by this pair of candidates.
... syntax responsesreceived = rtcicecandidatepairstats.responsesreceived; value an integer value which specifies the
number of stun connectivity request responses that have been received on the connection described by this pair of candidates so far.
RTCIceCandidatePairStats.responsesSent - Web APIs
the rtcicecandidatepairstats dictionary's responsessent property indicates the total
number of stun connectivity check responses that have been sent so far on the connection described by this pair of candidates.
... syntax responsessent = rtcicecandidatepairstats.responsessent; value an integer value indicating the
number of times a repsonse has been sent to a stun connectivity check request.
RTCInboundRtpStreamStats.averageRtcpInterval - Web APIs
because the interval's value is determined in part by the
number of active senders, it will be different for each user of a service.
... since this value is also used to determine the
number of seconds after a stream starts to flow before the first rtcp packet should be sent, the result is that if many users try to start using the service at the same time, the server won't be flooded with rtcp packets coming in all at once.
RTCInboundRtpStreamStats.bytesReceived - Web APIs
the rtcinboundrtpstreamstats dictionary's bytesreceived property is an integer value which indicates the total
number of bytes received so far from this synchronization source (ssrc).
... syntax var bytesreceived = rtcinboundrtpstreamstats.bytesreceived; value an unsigned integer value indicating the total
number of bytes received so far on this rtp stream, not including header and padding bytes.
RTCInboundRtpStreamStats.packetsDuplicated - Web APIs
the packetsduplicated property of the rtcinboundrtpstreamstats dictionary indicates the total
number of packets discarded because they were duplicates of previously-received packets.
... usage notes duplicate packets are detected when a packet has the same rtp sequence
number as another packet that has previously been processed.
RTCInboundRtpStreamStats.pliCount - Web APIs
the plicount property of the rtcinboundrtpstreamstats dictionary states the
number of times the rtcrtpreceiver described by these statistics sent a picture loss indication (pli) packet to the sender.
... syntax var plicount = rtcinboundrtpstreamstats.plicount; value an integer value indicating the
number of times a pli packet was sent by the rtcrtpreceiver to the sender.
RTCInboundRtpStreamStats.sliCount - Web APIs
in general, what's usually of interest is that the higher this
number is, the more the stream data is becoming corrupted between the sender and the receiver, requiring resends or dropping frames.
... syntax var slicount = rtcinboundrtpstreamstats.slicount; value an unsigned integer indicating the
number of sli packets this receiver sent to the remote sender due to lost runs of macroblocks.
RTCOutboundRtpStreamStats.averageRtcpInterval - Web APIs
because the interval's value is determined in part by the
number of active senders, it will be different for each user of a service.
... since this value is also used to determine the
number of seconds after a stream starts to flow before the first rtcp packet should be sent, the result is that if many users try to start using the service at the same time, the server won't be flooded with rtcp packets coming in all at once.
RTCOutboundRtpStreamStats.framesEncoded - Web APIs
the framesencoded property of the rtcoutboundrtpstreamstats dictionary indicates the total
number of frames that have been encoded by this rtcrtpsender for this media source.
... syntax var framesencoded = rtcoutboundrtpstreamstats.framesencoded; value an integer value indicating the total
number of video frames that this sender has encoded so far for this stream.
RTCOutboundRtpStreamStats.pliCount - Web APIs
the plicount property of the rtcoutboundrtpstreamstats dictionary states the
number of times the remote peer's rtcrtpreceiver sent a picture loss indication (pli) packet to the rtcrtpsender for which this object provides statistics.
... syntax var plicount = rtcoutboundrtpstreamstats.plicount; value an integer value indicating the
number of times a pli packet was sent to this sender by the remote peer's rtcrtpreceiver.
RTCOutboundRtpStreamStats.sliCount - Web APIs
an sli packet is used by a decoder to let the encoder (the sender) know that it's detected corruption of one or more consecutive macroblocks, in scan order, in the received media.in general, what's usually of interest is that the higher this
number is, the more the stream data is becoming corrupted between the sender and the receiver, causing the receiver to request retransmits or to drop frames entirely.
... syntax var slicount = rtcoutboundrtpstreamstats.slicount; value an unsigned integer indicating the
number of sli packets the sender received from the receiver due to lost runs of macroblocks.
RTCPeerConnection.addIceCandidate() - Web APIs
operationerror this can happen for a
number of reasons: the value specified for sdpmid is non-null and doesn't match the media description id of any media description included within the remotedescription.
... the specified value of sdpmlineindex is greater than or equal to the
number of media descriptions included in the remote description.
RTCPeerConnection.setRemoteDescription() - Web APIs
the error object's sdpline
number property indicates the line
number within the sdp on which the syntax error was detected.
...this happens instead of throwing an exception, thereby reducing the
number of potential errors which might occur, and simplifies the processing you need to do when you receive an offer, by eliminating the need to handle the offer/answer process differently depending on whether the local peer is the caller or callee.
RTCPeerConnectionIceErrorEvent - Web APIs
if no host candidate can reach the server, this property is set to the
number 701, which is outside the range of valid stun error codes.
... port read only an unsigned integer value giving the port
number over which communication with the stun or turn server is taking place, using the ip address given in address.
RTCRemoteOutboundRtpStreamStats.reportsSent - Web APIs
the rtcremoteoutboundrtpstreamstats dictionary's reportssent property provides the
number of sender reports (srs) the remote peer has transmitted to the local peer.
... syntax let reportcount = rtcremoteoutboundrtpstreamstats.reportssent; value an integer value which indicates the total
number of rtcp sender reports so far sent by the remote peer to the local peer.
RTCRtpCodecParameters - Web APIs
most of the fields in this property take values which are defined and maintained by the internet assigned
numbers authority (iana).
... channels optional an unsigned short integer indicating the
number of channels the codec should support.
RTCRtpEncodingParameters - Web APIs
maxbitrate an unsigned long integer indicating the maximum
number of bits per second to allow for this encoding.
... maxframerate a double-precision floating-point value specifying the maximum
number of frames per second to allow for this encoding.
RTCRtpSendParameters.encodings - Web APIs
maxbitrate an unsigned long integer indicating the maximum
number of bits per second to allow for this encoding.
... maxframerate a double-precision floating-point value specifying the maximum
number of frames per second to allow for this encoding.
RTCRtpSender.setParameters() - Web APIs
invalidmodificationerror one of the following problems was detected: the
number of encodings specified in the parameters object's encodings property does not match the
number of encodings currently listed for the rtcrtpsender.
... you cannot change the
number of encoding options once the sender has been created.
RTCRtpStreamStats.pliCount - Web APIs
the plicount property of the rtcrtpstreamstats dictionary states the
number of times the stream's receiving end sent a picture loss indication (pli) packet to the sender.
... syntax var plicount = rtcrtpstreamstats.plicount; value an integer value indicating the
number of times a pli packet was sent by the stream's receiver to the sender.
Range.comparePoint() - Web APIs
if the reference node is a node of type text, comment, or cdatasection, then offset is the
number of characters from the start of reference node.
... for other node types, offset is the
number of child nodes between the start of the reference node.
Range.setEnd() - Web APIs
usage notes if the endnode is a node of type text, comment, or cdatasection, then endoffset is the
number of characters from the start of endnode.
... for other node types, endoffset is the
number of child nodes between the start of the endnode.
Range.setStart() - Web APIs
if the startnode is a node of type text, comment, or cdatasection, then startoffset is the
number of characters from the start of startnode.
... for other node types, startoffset is the
number of child nodes between the start of the startnode.
Range - Web APIs
range.endoffset read only returns a
number representing where in the endcontainer the range ends.
... range.startoffset read only returns a
number representing where in the startcontainer the range starts.
RelativeOrientationSensor.RelativeOrientationSensor() - Web APIs
syntax var relativeorientationsensor = new relativeorientationsensor([options]) parameters options optional options are as follows: frequency: the desired
number of times per second a sample should be taken, meaning the
number of times per second that sensor.onreading will be called.
... a whole
number or decimal may be used, the latter for frequencies less than a second.
SVGFEDistantLightElement - Web APIs
svgfedistantlightelement.azimuth read only an svganimated
number corresponding to the azimuth attribute of the given element.
... svgfedistantlightelement.elevation read only an svganimated
number corresponding to the elevation attribute of the given element.
SVGFEGaussianBlurElement - Web APIs
svgfegaussianblurelement.stddeviationx read only an svganimated
number corresponding to the (possibly automatically computed) x component of the stddeviation attribute of the given element.
... svgfegaussianblurelement.stddeviationy read only an svganimated
number corresponding to the (possibly automatically computed) y component of the stddeviation attribute of the given element.
SVGFEMorphologyElement - Web APIs
svgfemorphologyelement.radiusx read only an svganimated
number corresponding to the x component of the radius attribute of the given element.
... svgfemorphologyelement.radiusy read only an svganimated
number corresponding to the y component of the radius attribute of the given element.
SVGFEOffsetElement - Web APIs
svgfeoffsetelement.dx read only an svganimated
number corresponding to the dx attribute of the given element.
... svgfeoffsetelement.dy read only an svganimated
number corresponding to the dy attribute of the given element.
Screen.availHeight - Web APIs
you can similarly use screen.availwidth to get the
number of pixels which are horizontally available to the browser for its use.
... syntax let availheight = window.screen.availheight; value a numeric value indicating the
number of css pixels tall the screen's available space is.
ScrollToOptions.left - Web APIs
the left property of the scrolltooptions dictionary specifies the
number of pixels along the x axis to scroll the window or element.
... examples in our scrolltooptions example (see it live) we include a form that allows the user to enter three values — two
numbers representing the left and top properties (i.e.
ScrollToOptions.top - Web APIs
the top property of the scrolltooptions dictionary specifies the
number of pixels along the y axis to scroll the window or element.
... examples in our scrolltooptions example (see it live) we include a form that allows the user to enter three values — two
numbers representing the left and top properties (i.e.
SecurityPolicyViolationEvent.statusCode - Web APIs
the statuscode read-only property of the securitypolicyviolationevent interface is a
number representing the http status code of the document or worker in which the violation occurred.
... syntax let status = violationeventinstance.statuscode; value a
number representing the status code of the document or worker in which the violation occurred.
Selection.focusOffset - Web APIs
the selection.focusoffset read-only property returns the
number of characters that the selection's focus is offset within the selection.focusnode.
... this
number is zero-based.
Sensor APIs - Web APIs
the option is a
number that specifies the
number of readings per second.
... a whole
number or decimal may be used, the latter for frequencies less than a second.
Using server-sent events - Web APIs
when not used over http/2, sse suffers from a limitation to the maximum
number of open connections, which can be especially painful when opening multiple tabs, as the limit is per browser and is set to a very low
number (6).
...when using http/2, the maximum
number of simultaneous http streams is negotiated between the server and the client (defaults to 100).
SourceBufferList.length - Web APIs
the length read-only property of the sourcebufferlist interface returns the
number of sourcebuffer objects in the list.
... syntax var mylistlength = sourcebufferlist.length; value an unsigned long
number.
SpeechGrammarList.length - Web APIs
the length read-only property of the speechgrammarlist interface returns the
number of speechgrammar objects contained in the speechgrammarlist.
... syntax var mylistlength = speechgrammarlistinstance.length; value a
number indicating the
number of speechgrammar objects contained in the speechgrammarlist.
SpeechRecognition.maxAlternatives - Web APIs
the maxalternatives property of the speechrecognition interface sets the maximum
number of speechrecognitionalternatives provided per speechrecognitionresult.
... syntax var mymaxalternative
number = myspeechrecognition.maxalternatives; myspeechrecognition.maxalternatives = 2; value a
number representing the maximum returned alternatives for each result.
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.
... syntax var mylength = speechrecognitionresultinstance.length; returns a
number.
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.
... syntax var mylength = speechrecognitionresultlistinstance.length; returns a
number.
Storage.key() - Web APIs
the key() method of the storage interface, when passed a
number n, returns the name of the nth key in a given storage object.
... syntax var akeyname = storage.key(index); parameters index an integer representing the
number of the key you want to get the name of.
Storage - Web APIs
properties storage.length read only returns an integer representing the
number of data items stored in the storage object.
... methods storage.key() when passed a
number n, this method will return the name of the nth key in the storage.
Storage Access API - Web APIs
concepts and usage most browsers implement a
number of storage access policies that restrict access to cookies and site data for embedded, cross-origin resources.
...prompting heuristics currently vary across the two implementers of the storage access api — safari shows prompts for all embedded tracking content that has not previously received storage access, while firefox only prompts users after a tracking origin has requested storage access on more than a threshold
number of sites.
TextTrackList.onremovetrack - Web APIs
example this simple example just fetches the current
number of text tracks in the first media element whenever a track is removed from the media element.
... document.queryselectorall("video, audio")[0].texttracks.onremovetrack = function(event) { mytrackcount = document.queryselectorall("video, audio")[0].texttracks.length; }; the current
number of text tracks remaining in the media element is obtained from texttracklist property length.
TextTrackList - Web APIs
length read only the
number of tracks in the list.
... var texttracks = document.queryselector("video").texttracks; monitoring track count changes in this example, we have an app that displays information about the
number of channels available.
TimeRanges - Web APIs
you reference each time range by using the start() and end() methods, passing the index
number of the time range you want to retrieve.
... properties timeranges.length read only returns an unsigned long representing the
number of time ranges represented by the time range object.
TouchEvent.touches - Web APIs
in following 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.
... someelement.addeventlistener('touchstart', function(e) { // invoke the appropriate handler depending on the //
number of touch points.
TouchList.length - Web APIs
the length read-only property indicates the
number of items (touch points) in a given touchlist.
... syntax var numtouches = touchlist.length; return value numtouches the
number of touch points in touchlist.
TrackDefaultList.length - Web APIs
the length read-only property of the trackdefaultlist interface returns the
number of trackdefault objects in the list.
... syntax var mylistlength = trackdefaultlist.length; value an unsigned long
number.
USB.getDevices() - Web APIs
example the following example logs the product name and serial
number of paired devices to the console.
... navigator.usb.getdevices() .then(devices => { console.log("total devices: " + devices.length); devices.foreach(device => { console.log("product name: " + device.productname + ", serial
number " + device.serial
number); }); }); specifications specification status comment webusbthe definition of 'getdevices' in that specification.
USB.requestDevice() - Web APIs
each filter object can have the following properties: vendorid productid classcode subclasscode protocolcode serial
number return value a promise that resolves with an instance of usbdevice.
... the
number of filters does not specifiy the
number of devices shown by the user agent.
USBAlternateInterface - Web APIs
constructor usbalternateinterface.usbalternateinterface creates a new usbalternateinterface object which will be populated with information about the alternate interface of the provided usbinterface with the given alternate setting
number.
... properties usbalternateinterface.alternatesettingread only returns the alternate setting
number of this interface.
USBDevice.clearHalt() - Web APIs
syntax var promise = usbdevice.clearhalt(direction, endpoint
number) parameters direction indicates whether the devices input or output should be cleared.
... endpoint
number indicates the
number of the endpoint to clear.
USBDevice.deviceVersionMajor - Web APIs
the deviceversionmajor read only property of the usbdevice interface he major version
number of the device in a semantic versioning scheme.
... syntax var serial
number = usbdevice.deviceversionmajor value a
number.
USBDevice.deviceVersionMinor - Web APIs
the deviceversionminor read only property of the usbdevice interface the minor version
number of the device in a semantic versioning scheme.
... syntax var serial
number = usbdevice.deviceversionminor value a
number.
USBDevice.deviceVersionSubminor - Web APIs
the deviceversionsubminor read only property of the usbdevice interface the patch version
number of the device in a semantic versioning scheme.
... syntax var serial
number = usbdevice.deviceversionsubminor value a
number.
USBDevice.transferIn() - Web APIs
syntax var promise = usbdevice.transferin(endpoint
number, length) parameters endpoint
number the
number of a device-specific endpoint (buffer).
... length the maximum
number of bytes that will be read back from the device.
ValidityState.patternMismatch - Web APIs
examples given the following: <p> <label>enter your phone
number in the format (123)456-7890 (<input name="tel1" type="tel" pattern="[0-9]{3}" placeholder="###" aria-label="3-digit area code" size="2"/>)- <input name="tel2" type="tel" pattern="[0-9]{3}" placeholder="###" aria-label="3-digit prefix" size="2"/> - <input name="tel3" type="tel" pattern="[0-9]{4}" placeholder="####" aria-label="4-digit
number" size="3"/> </label> </p> here we have 3 secti...
...ons for a north american phone
number with an implicit label encompassing 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.
ValidityState.rangeOverflow - Web APIs
if the field is numeric in nature, including the date, month, week, time, datetime-local,
number and range types and a max value is set, if the value don't doesn't conform to the constraints set by the max value, the rangeoverflow property will be true.
... given the following: <input type="
number" min="20" max="40" step="2"/> if value > 40, rangeoverflow will be true.
ValidityState.rangeUnderflow - Web APIs
if the field is numeric in nature, including the date, month, week, time, datetime-local,
number and range types and a min value is set, if the value don't doesn't conform to the constraints set by the min value, the rangeunderflow property will be true.
... given the following: <input type="
number" min="20" max="40" step="2"/> if value < 20, rangeunderflow will be true.
ValidityState.stepMismatch - Web APIs
if the field is numeric in nature, including the date, month, week, time, datetime-local,
number and range types and the step value is not any, if the value don't doesn't conform to the constraints set by the step and min values, then stepmismatch will be true.
... given the following: <input type="
number" min="20" max="40" step="2"/> if (value - min) / 2 != 0, stepmismatch will be true.
VideoPlaybackQuality.corruptedVideoFrames - Web APIs
the videoplaybackquality interface's read-only corruptedvideoframes property the
number of corrupted video frames that have been received since the <video> element was last loaded or reloaded.
... syntax corruptframefount = videoplaybackquality.corruptedvideoframes; value the
number of corrupted video frames that have been received since the <video> element was last loaded or reloaded.
VideoPlaybackQuality.creationTime - Web APIs
the read-only creationtime property on the videoplaybackquality interface reports the
number of milliseconds since the browsing context was created this quality sample was recorded.
... syntax value = videoplaybackquality.creationtime; value a domhighrestimestamp object which indicates the
number of milliseconds that elapased between the time the browsing context was created and the time at which this sample of the video quality was obtained.
VideoPlaybackQuality.droppedVideoFrames - Web APIs
the read-only droppedvideoframes property of the videoplaybackquality interface returns the
number of video frames which have been dropped rather than being displayed since the last time the media was loaded into the htmlvideoelement.
... syntax value = videoplaybackquality.droppedvideoframes; value an unsigned 64-bit value indicating the
number of frames that have been dropped since the last time the media in the <video> element was loaded or reloaded.
VideoTrackList.onremovetrack - Web APIs
example this simple example just fetches the current
number of video tracks in the media element whenever a track is removed from the media element.
... document.queryselector("my-video").videotracks.onremovetrack = function(event) { mytrackcount = document.queryselector("my-video").videotracks.length; }; the current
number of video tracks remaining in the media element is obtained from videotracklist property length.
VideoTrackList - Web APIs
length read only the
number of tracks in the list.
... var videotracks = document.queryselector("video").videotracks; monitoring track count changes in this example, we have an app that displays information about the
number of channels available.
WEBGL_draw_buffers - Web APIs
ext.max_color_attachments_webgl a glint indicating the maximum
number of framebuffer color attachment points.
... ext.max_draw_buffers_webgl a glint indicating the maximum
number of draw buffers.
WaveShaperNode.curve - Web APIs
the curve property of the waveshapernode interface is a float32array of
numbers describing the distortion to apply.
... function makedistortioncurve(amount) { var k = typeof amount === '
number' ?
WaveShaperNode.oversample - Web APIs
once applied, the
number of samples is reduced to its initial
numbers.
... function makedistortioncurve(amount) { var k = typeof amount === '
number' ?
WebGL2RenderingContext.getFragDataLocation() - Web APIs
the webgl2renderingcontext.getfragdatalocation() method of the webgl 2 api returns the binding of color
numbers to user-defined varying out variables.
... return value a glint indicating the assigned color
number binding, or -1 otherwise.
WebGL2RenderingContext.renderbufferStorageMultisample() - Web APIs
the webgl2renderingcontext.renderbufferstoragemultisample() method of the webgl 2 api returns creates and initializes a renderbuffer object's data store and allows specifying a
number of samples to be used.
... samples a glsizei specifying the
number of samples to be used for the renderbuffer storage.
A basic 2D WebGL animation example - Web APIs
with the vertex data now provided to webgl, we set vertexnumcomponents to the
number of components in each vertex (2, since they're 2d vertexes) and vertexcount to the
number of vertexes in the vertex list.
...we use that and the saved time at which the last frame was drawn, previoustime, along with the
number of degrees per second the square should rotate (degreespersecond) to calculate the new value of currentangle.
Raining rectangles - Web APIs
var rect = this; // we get three random
numbers and use them for new rectangle // size and position.
... for each we use a different
number, // because we want horizontal size, vertical size and // position to be determined independently.
Using WebRTC data channels - Web APIs
at a fundamental level, the individual network packets can't be larger than a certain value (the exact
number depends on the network and the transport layer being used).
...this feature requires that each piece of the message have consecutive sequence
numbers, so they have to be transmitted one after another, without any other data interleaved between them.
Writing WebSocket servers - Web APIs
for example, you might keep a table of usernames or id
numbers along with the corresponding websocket and other data that you need to associate with that connection.
...once the payload length and masking key is decoded, you can read that
number of bytes from the socket.
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
as in all things, the position of an object in space—even if that space if virtual—can be represented using three
numbers that indicate its position relative to the origin, whose position is defined to be (0, 0, 0).
...there are a
number of terms that are helpful to understand, primarily around camera movement, as these terms are used to describe designed viewpoint changes with the virtual camera.
Fundamentals of WebXR - Web APIs
the types and
number of sensors included will determine how many degrees of freedom the user has.
... there are a
number of theories surrounding exactly what about virtual reality causes some people to feel uncomfortable or sick, most of which focusing on the idea that even subtle differences between what the brain thinks should be happening and what is being seen can cause these symptoms.
Starting up and shutting down a WebXR session - Web APIs
permissions and security there are a
number of security measures in place revolving around webxr.
... important session maintenance events over the course of your webxr session, you may receive any of a
number of events which indicate changes to the state of the session, or which let you know about things you need to do to keep the session operating properly.
Keyframe Formats - Web APIs
element.animate({ opacity: [ 0, 1 ], // [ from, to ] color: [ "#fff", "#000" ] // [ from, to ] }, 2000); using this format, the
number of elements in each array does not need to be equal.
... the following special attributes may also be specified: offset the offset of the keyframe specified as a
number between 0.0 and 1.0 inclusive or null.
Using the Web Animations API - Web APIs
it will automatically divide the animation into equal parts based on the
number of keys you give it.
... there are a
number of small differences between the terminology used in css animations and the terminology used in web animations.
Controlling multiple parameters with ConstantSourceNode - Web APIs
while this is an extremely simple example, imagine having a 32 oscillator synthesizer with multiple linked parameters in play across a
number of patched nodes.
... being able to shorten the
number of operations to adjust them all will prove invaluable for code size and performance both.
Visualizations with Web Audio API - Web APIs
the first one produces 32-bit floating point
numbers, and 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.
... function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); now we set our barwidth to be equal to the canvas width divided by the
number of bars (the buffer length).
Web audio spatialization basics - Web APIs
let's set up a rotation rate, which we'll convert into a radian range value for use in math.sin and math.cos later, when we want to figure out the new coordinates when we're rotating our boombox: // set up rotation constants const rotationrate = 60; // bigger
number equals slower sound rotation const q = math.pi/rotationrate; //rotation increment in radians we can also use this to work out degrees rotated, which will help with the css transforms we will have to create (note we need both an x and y-axis for the css transforms): // get degrees for css const degreesx = (q * 180)/math.pi; const degreesy = (q * 180)/math.pi; let's take a look at our left ro...
...the panner node does some very involved maths under the hood; there are a
number of tests here so you can keep track of the status of the inner workings of this node across different platforms.
Window.crypto - Web APIs
syntax var cryptoobj = window.crypto || window.mscrypto; // for ie 11 value an instance of the crypto interface, providing access to general-purpose cryptography and a strong random-
number generator.
... javascript genrandom
numbers = function getrandom
numbers() { var array = new uint32array(10); window.crypto.getrandomvalues(array); var randtext = document.getelementbyid("myrandtext"); randtext.innerhtml = "the random
numbers are: " for (var i = 0; i < array.length; i++) { randtext.innerhtml += array[i] + " "; } } html <p id="myrandtext">the random
numbers are: </p> <button type="button" onclick='genrandom
numbers()'>generate 10 random
numbers</button> result specifications specification status comment web cryptography apithe definition of 'window.crypto' in that specification.
Window.length - Web APIs
returns the
number of frames (either <frame> or <iframe> elements) in the window.
... syntax framescount = window.length; framescount is the
number of frames.
window.postMessage() - Web APIs
normally, scripts on different pages are allowed to access each other if and only if the pages they originate from share the same protocol, port
number, and host (also known as the "same-origin policy").
...this string is the concatenation of the protocol and "://", the host name if one exists, and ":" followed by a port
number if a port is present and differs from the default port for the given protocol.
Window.prompt() - Web APIs
for example, if their answer should be a
number, you should cast the value to
number.
... const a
number =
number(window.prompt("type a
number", "")); specification specification status comment html living standardthe definition of 'prompt()' in that specification.
Window.resizeBy() - Web APIs
syntax window.resizeby(xdelta, ydelta) parameters xdelta is the
number of pixels to grow the window horizontally.
... ydelta is the
number of pixels to grow the window vertically.
Window.scrollByLines() - Web APIs
the window.scrollbylines() method scrolls the document by the specified
number of lines.
... syntax window.scrollbylines(lines) parameters lines is the
number of lines to scroll the document by.
Window.scrollByPages() - Web APIs
the window.scrollbypages() method scrolls the current document by the specified
number of pages.
... syntax window.scrollbypages(pages) parameters pages is the
number of pages to scroll.
Window.scrollMaxX - Web APIs
the window.scrollmaxx read-only property returns the maximum
number of pixels that the document can be scrolled horizontally.
... syntax xmax = window.scrollmaxx xmax is the
number of pixels.
Window.scrollMaxY - Web APIs
the window.scrollmaxy read-only property returns the maximum
number of pixels that the document can be scrolled vertically.
... syntax ymax = window.scrollmaxy ymax is the
number of pixels.
XMLHttpRequest - Web APIs
xmlhttprequest.timeout is an unsigned long representing the
number of milliseconds a request can take before automatically being terminated.
... since then, a
number of additional event handlers have been implemented in various browsers (onload, onerror, onprogress, etc.).
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.
... syntax let inputsourcecount = xrinputsourcearray.length; value an integer value indicating the
number of xrinputsource objects representing webxr input sources are includled in the array.
XRInputSourceArray - Web APIs
in addition to being able to access the input sources in the list using standard array notation (that is, with index
numbers insize square brackets), methods are available to allow the use of iterators and the foreach() method is also available.
... length read only the
number of xrinputsource objects in the list.
XRView - Web APIs
usage notes positions and
number of xrviews per frame while rendering a scene, the set of views that are used to render the scene for the viewer as of the current frame are obtained by calling the xrframe object's getviewerpose() method to get the xrviewerpose representing (in essence) the position of the viewer's head.
... in addition, the
number of views can change at any time, depending on the needs of the time.
Using the aria-valuenow attribute - Accessibility
when the rendered value cannot be accurately represented as a
number, authors should use the aria-valuetext attribute in conjunction with aria-valuenow to provide a user-friendly representation of the range's current value.
... value string representation of a
number possible effects on user agents and assistive technology for elements with role progressbar and scrollbar, assistive technologies should render the actual value as a percentage, calculated as a position on the range from aria-valuemin to aria-valuemax if both are defined, otherwise the actual value with a percent indicator.
Using the aria-valuetext attribute - Accessibility
authors should only set the aria-valuetext attribute when the rendered value cannot be accurately represented as a
number.
... value string representation of a
number possible effects on user agents and assistive technology if the aria-valuetext attribute is absent, assistive technologies will rely solely on the aria-valuenow attribute for the current value.
ARIA: grid role - Accessibility
page down moves focus down an author-determined
number of rows, typically scrolling so the bottom row in the currently visible set of rows becomes one of the first visible rows.
... page up moves focus up an author-determined
number of rows, typically scrolling so the top row in the currently visible set of rows becomes one of the last visible rows.
ARIA: gridcell role - Accessibility
use aria-colcount and aria-rowcount on the parent element with role="grid" applied to it to set the total
number of columns or rows.
...3 id="table-title">jovian gas giant planets</h3> <div role="grid" aria-describedby="table-title"> <div role="rowgroup"> <div role="row"> <div role="columnheader">name</div> <div role="columnheader">diameter (km)</div> <div role="columnheader">length of day (hours)</div> <div role="columnheader">distance from sun (10<sup>6</sup>km)</div> <div role="columnheader">
number of moons</div> </div> </div> <div role="rowgroup"> <div role="row"> <div role="gridcell">jupiter</div> <div role="gridcell">142,984</div> <div role="gridcell">9.9</div> <div role="gridcell">778.6</div> <div role="gridcell">67</div> </div> </div> <div role="rowgroup"> <div role="row"> <div role="gridcell">saturn</div> <div role="gri...
Web applications and ARIA FAQ - Accessibility
javascript toolkits aria roles, states, and properties have been added to a
number of popular javascript user interface toolkits, including: dojo/dijit jquery ui fluid infusion google closure google web toolkit bbc glow yahoo!
... html5 introduces a
number of useful new semantic tags to html.
Multipart labels: Using ARIA for labels with embedded fields inside them - Accessibility
“delete history after” is to the left of the textbox, x is the
number, for example 21, and the word “days” follows the textbox, forming a sentence that is easy to understand.
... if you’re using a screen reader, have you noticed that, when you go to this setting in firefox, it tells you “delete history after 21 days”?, followed by the announcement that you’re in a textbox, and that it contains the
number 21.
::-webkit-inner-spin-button - CSS: Cascading Style Sheets
the ::-webkit-inner-spin-button css pseudo-element is used to style the inner part of the spinner button of
number picker input elements.
... html <input type="
number"> css input[type=
number]::-webkit-inner-spin-button { cursor: pointer; } result specifications not part of any standard.
::-webkit-outer-spin-button - CSS: Cascading Style Sheets
the ::-webkit-outer-spin-button css pseudo-element is used to style the outer part of the spinner button of
number picker <input> elements.
... html <input type="
number"> css input::-webkit-outer-spin-button { -webkit-appearance: none; } result specifications not part of any standard.
:placeholder-shown - CSS: Cascading Style Sheets
html <input id="input1" placeholder="name, rank, and serial
number"> <br><br> <input id="input2" placeholder="name, rank, and serial
number"> css #input2:placeholder-shown { text-overflow: ellipsis; } result customized input field the following example highlights the branch and id code fields with a custom style.
... html <form id="test"> <p> <label for="name">enter student name:</label> <input id="name" placeholder="student name"/> </p> <p> <label for="branch">enter student branch:</label> <input id="branch" placeholder="student branch"/> </p> <p> <label for="sid">enter student id:</label> <input type="
number" pattern="[0-9]{8}" title="8 digit id" id="sid" class="studentid" placeholder="8 digit id"/> </p> <input type="submit"/> </form> css input { background-color: #e8e8e8; color: black; } input.studentid:placeholder-shown { background-color: yellow; color: red; font-style: italic; } result specifications specification status comment selectors level 4the definition of ':placeholder-shown' in that specification.
color-index - CSS: Cascading Style Sheets
the color-index css media feature can be used to test the
number of entries in the output device's color lookup table.
... syntax the color-index feature is specified as an <integer> value representing the
number of entries in the output device's color lookup table.
monochrome - CSS: Cascading Style Sheets
the monochrome css media feature can be used to test the
number of bits per pixel in the monochrome frame buffer of the output device.
... syntax the monochrome feature is specified as an <integer> representing the
number of bits per pixel in the monochrome frame buffer.
Box-shadow generator - CSS: Cascading Style Sheets
ha(topic); if (action === 'hexa') inputchangehexa(topic); }); subscribe(topic, function(value) { node.children[1].value = value; }); } var inputchangehsv = function actionhsv(topic) { var selector = "[data-action='set-hsv-" + topic + "']"; var node = document.queryselector("#colorpicker " + selector); var value = parseint(node.value); if (typeof value === '
number' && isnan(value) === false && value >= 0 && value < 360) color[topic] = value; color.updatergb(); updateui(); } var inputchangergb = function inputchangergb(topic) { var selector = "[data-action='set-rgb-" + topic + "']"; var node = document.queryselector("#colorpicker " + selector); var value = parseint(node.value); if (typeof value === '
number' && isnan(value) =...
...== false && value >= 0 && value <= 255) color[topic] = value; color.updatehsv(); updateui(); } var inputchangealpha = function inputchangealpha(topic) { var selector = "[data-action='set-alpha-" + topic + "']"; var node = document.queryselector("#colorpicker " + selector); var value = parsefloat(node.value); if (typeof value === '
number' && isnan(value) === false && value >= 0 && value <= 1) color.a = value.tofixed(2); updateui(); } var inputchangehexa = function inputchangehexa(topic) { var selector = "[data-action='set-hexa-" + topic + "']"; var node = document.queryselector("#colorpicker " + selector); var value = node.value; color.sethexa(value); color.updatehsv(); updateui(); } var setmousetracking = function setmouset...
CSS Fonts - CSS: Cascading Style Sheets
font-family: "helvetica neue", "arial", sans-serif; font-style: italic; font-weight: 100; font-variant-ligatures: normal; font-size: 2rem; letter-spacing: 1px; } <p>three hundred years ago<br> i thought i might get some sleep<br> i stretched myself out onna antique bed<br> an' my spirit did a midnite creep</p> the result is as follows: variable fonts examples you can find a
number of variable fonts examples at v-fonts.com and axis-praxis.org; see also our variable fonts guide for more information and usage information.
...these include things like ligatures (special glyphs that combine characters like 'fi' or 'ffl'), kerning (adjustments to the spacing between specific letterform pairings), fractions, numeral styles, and a
number of others.
Grid template areas - CSS: Cascading Style Sheets
this time, instead of placing my items using line
numbers specified on the items themselves, i create the whole layout on the grid container.
...this means that you must have the same
number of cells for each row, if empty with a full stop character demonstrating that the cell is to be left empty.
Using z-index - CSS: Cascading Style Sheets
if you are not familiar with the z-axis, imagine the page as a stack of layers, each one having a
number.
... layers are rendered in numerical order, with larger
numbers above smaller
numbers.
Column layouts - CSS: Cascading Style Sheets
you will often need to create a layout which has a
number of columns, and css provides several ways to do this.
... requirements there are a
number of design patterns you might want to achieve with your columns: a continuous thread of content broken up into newspaper-style columns.
Mozilla CSS extensions - CSS: Cascading Style Sheets
mozilla applications such as firefox support a
number of special mozilla extensions to css, including properties, values, pseudo-elements and pseudo-classes, at-rules, and media queries.
...[matches :link and :visited] :-moz-broken ::-moz-canvas ::-moz-color-swatch ::-moz-cell-content :-moz-drag-over f – i :-moz-first-node ::-moz-focus-inner ::-moz-focus-outer :-moz-focusring :-moz-full-screen :-moz-full-screen-ancestor :-moz-handler-blocked :-moz-handler-crashed :-moz-handler-disabled ::-moz-inline-table l :-moz-last-node :-moz-list-bullet :-moz-list-
number :-moz-loading :-moz-locale-dir(ltr) :-moz-locale-dir(rtl) :-moz-lwtheme :-moz-lwtheme-brighttext :-moz-lwtheme-darktext n – r :-moz-native-anonymous :-moz-only-whitespace ::-moz-page ::-moz-page-sequence ::-moz-pagebreak ::-moz-pagecontent :-moz-placeholderobsolete since gecko 51 ::-moz-placeholderdeprecated since gecko 51 ::-moz-progress-bar ::-moz-range-progress ::-moz-...
Tools - CSS: Cascading Style Sheets
css offers a
number of powerful features that can be tricky to use, or have a
number of parameters, so that it's helpful to be able to visualize them while you work on them.
... this page offers links to a
number of useful tools that will help you build the css to style your content using these features.
box-flex - CSS: Cascading Style Sheets
/* <
number> values */ -moz-box-flex: 0; -moz-box-flex: 2; -moz-box-flex: 3.5; -webkit-box-flex: 0; -webkit-box-flex: 2; -webkit-box-flex: 3.5; /* global values */ -moz-box-flex: inherit; -moz-box-flex: initial; -moz-box-flex: unset; -webkit-box-flex: inherit; -webkit-box-flex: initial; -webkit-box-flex: unset; syntax the box-flex property is specified as a <
number>.
... formal definition initial value0applies toelements that are direct children of an element with a css display value of -moz-box or -moz-inline-box or -webkit-box or -webkit-inline-boxinheritednocomputed valueas specifiedanimation typediscrete formal syntax <
number> examples setting box-flex <!doctype html> <html> <head> <title>-moz-box-flex example</title> <style> div.example { display: -moz-box; display: -webkit-box; border: 1px solid black; width: 100%; } div.example > p:nth-child(1) { -moz-box-flex: 1; /* mozilla */ -webkit-box-flex: 1; /* webkit */ border: 1...
box-lines - CSS: Cascading Style Sheets
this process can repeat to an arbitrary
number of lines.
... once the
number of lines has been determined, elements with a computed value for box-flex other than 0 stretch as necessary in an attempt to fill the remaining space on the lines.
clamp() - CSS: Cascading Style Sheets
the clamp() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <
number>, or <integer> is allowed.
... formal syntax clamp( <calc-sum>#{3} )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <
number> ]*where <calc-value> = <
number> | <dimension> | <percentage> | ( <calc-sum> ) examples min, max, and clamp comparison in this example we have a simple responsive example that makes use of min(), max(), and clamp() for some of the sizes.
counter-increment - CSS: Cascading Style Sheets
note: the counter's value can be reset to an arbitrary
number using the counter-reset css property.
...you may specify as many counters to increment as you want, with each name or name-
number pair separated by a space.
cursor - CSS: Cascading Style Sheets
each <url> may be optionally followed by a pair of space-separated
numbers, which represent <x><y> coordinates.
...two unitless nonnegative
numbers less than 32.
brightness() - CSS: Cascading Style Sheets
syntax brightness(amount) parameters amount the brightness of the result, specified as a <
number> or a <percentage>.
... examples setting brightness using
numbers and percentages brightness(0%) /* completely black */ brightness(0.4) /* 40% brightness */ brightness(1) /* no effect */ brightness(200%) /* double brightness */ specifications specification status filter effects module level 1the definition of 'brightness()' in that specification.
contrast() - CSS: Cascading Style Sheets
syntax contrast(amount) parameters amount the contrast of the result, specified as a <
number> or a <percentage>.
... examples setting contrast using
numbers and percentages contrast(0) /* completely gray */ contrast(65%) /* 65% contrast */ contrast(1) /* no effect */ contrast(200%) /* double contrast */ specifications specification status filter effects module level 1the definition of 'contrast()' in that specification.
<flex> - CSS: Cascading Style Sheets
syntax the <flex> data type is specified as a <
number> followed by the unit fr.
...as with all css dimensions, there is no space between the unit and the
number.
max() - CSS: Cascading Style Sheets
the max() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <
number>, or <integer> is allowed.
... formal syntax max( <calc-sum># )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <
number> ]*where <calc-value> = <
number> | <dimension> | <percentage> | ( <calc-sum> ) examples setting a minimum size for a font another use case for css functions is allow a font size to grow while ensuring it is at least a mimum size, enabling responsive font sizes while ensuring legibility.
min() - CSS: Cascading Style Sheets
the min() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <
number>, or <integer> is allowed.
... formal syntax min( <calc-sum># )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <
number> ]*where <calc-value> = <
number> | <dimension> | <percentage> | ( <calc-sum> ) accessibility concerns when using min() to set a maximum font size, ensure that the font can still be scaled at least 200% for readability (without assistive technology like a zoom function).
orphans - CSS: Cascading Style Sheets
the orphans css property sets the minimum
number of lines in a block container that must be shown at the bottom of a page, region, or column.
...(the paragraph continues on a following page.) syntax values <integer> the minimum
number of lines that can stay by themselves at the bottom of a fragment before a fragmentation break.
rotate - CSS: Cascading Style Sheets
vector plus angle value three <
number>s representing an origin-centered vector that defines a line around which you want to rotate the element, plus an <angle> specifying the angle to rotate the element through.
... formal definition initial valuenoneapplies totransformable elementsinheritednocomputed valueas specifiedanimation typea transformcreates stacking contextyes formal syntax none | <angle> | [ x | y | z | <
number>{3} ] && <angle> examples rotate an element on hover html <div> <p class="rotate">rotation</p> </div> css * { box-sizing: border-box; } html { font-family: sans-serif; } div { width: 150px; margin: 0 auto; } p { padding: 10px 5px; border: 3px solid black; border-radius: 20px; width: 150px; font-size: 1.2rem; text-align: center; } .rotate { transition: rotate 1s; } div:hover .rotate { rotate: 1 -0.5 1 180deg; } result specifications ...
shape-image-threshold - CSS: Cascading Style Sheets
/* <
number> value */ shape-image-threshold: 0.7; /* global values */ shape-image-threshold: inherit; shape-image-threshold: initial; shape-image-threshold: unset; syntax values <alpha-value> sets the threshold used for extracting a shape from an image.
... formal definition initial value0.0applies tofloatsinheritednocomputed valuethe same as the specified value after clipping the <
number> to the range [0.0, 1.0].animation typea
number formal syntax <alpha-value>where <alpha-value> = <
number> | <percentage> examples aligning text to a gradient this example creates a <div> block with a gradient background image.
symbols() - CSS: Cascading Style Sheets
numeric: the system interprets the given values as the successive units of a place-value
numbering system.
... alphabetic: the system interprets the given values as the digits of an alphabetic
numbering system, like a place-value
numbering system but without 0.
matrix() - CSS: Cascading Style Sheets
matrix(a, b, c, d, tx, ty) values a b c d are <
number>s describing the linear transformation.
... tx ty are <
number>s describing the translation to apply.
matrix3d() - CSS: Cascading Style Sheets
matrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4) values a1 b1 c1 d1 a2 b2 c2 d2 a3 b3 c3 d3 are <
number>s describing the linear transformation.
... a4 b4 c4 d4 are <
number>s describing the translation to apply.
scale() - CSS: Cascading Style Sheets
scale(sx) scale(sx, sy) values sx a <
number> representing the abscissa of the scaling vector.
... sy a <
number> representing the ordinate of the scaling vector.
transition - CSS: Cascading Style Sheets
in short, extra transition descriptions beyond the
number of properties actually being animated are ignored.
...animation typediscrete formal syntax <single-transition>#where <single-transition> = [ none | <single-transition-property> ] | <time> | <timing-function> | <time>where <single-transition-property> = all | <custom-ident><timing-function> = linear | <cubic-bezier-timing-function> | <step-timing-function>where <cubic-bezier-timing-function> = ease | ease-in | ease-out | ease-in-out | cubic-bezier(<
number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[0,1]>, <
number>, <
number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[0,1]>, <
number>)<step-timing-function> =...
widows - CSS: Cascading Style Sheets
the widows css property sets the minimum
number of lines in a block container that must be shown at the top of a page, region, or column.
...(the paragraph is continued from a prior page.) syntax values <integer> the minimum
number of lines that can stay by themselves at the top of a new fragment after a fragmentation break.
math:max() - EXSLT
to compute the maximum value of the node-set, the node set is sorted into descending order as it would be using xsl:sort() with a data type of
number.
... the maximum value is then the first node in the sorted list, converted into a
number.
math:min() - EXSLT
to compute the minimum value of the node-set, the node set is sorted into ascending order as it would be using xsl:sort() with a data type of
number.
... the minimum value is then the first node in the sorted list, converted into a
number.
Video player styling basics - Developer guides
as mentioned earlier, a data-state attribute is now used to indicate whether the video controls are visible or not and these also need to be styled: .controls[data-state=hidden] { display:none; } .controls[data-state=visible] { display:block; } there are a
number of properties that also need to be set for all elements within the video controls: .controls > * { float:left; width:3.90625%; height:100%; margin-left:0.1953125%; display:block; } .controls > *:first-child { margin-left:0; } all elements are floated left, as they are to be aligned next to one another, and each element is set to have a width of nearly 4% (again the actual val...
... javascript that's really it for the immediate styling; the next task is making a
number of javascript changes to ensure that everything works as expected.
Challenge solutions - Developer guides
solution add this rule to your stylesheet: p:before{ content: url("yellow-pin.png"); } lists lower roman numerals challenge add a rule to your stylesheet, to
number the oceans using roman numerals from i to v.
... solution add a rule to the body element (parent of the headings) to reset a new counter, and one to display and increment the counter on the headings: /*
numbered headings */ body {counter-reset: headnum;} h3:before { content: "(" counter(headnum, upper-latin) ") "; counter-increment: headnum; } boxes ocean border challenge add one rule to your stylesheet, making a wide border all around the oceans in a color that reminds you of the sea.
Mouse gesture events - Developer guides
note: this event is sent whenever the movement of the user's fingers exceeds the
number of pixels indicated by the browser.gesture.pinch.threshold preference.
... note: this event is sent whenever the movement of the user's fingers exceeds the
number of pixels indicated by the browser.gesture.pinch.threshold preference.
Overview of events and handlers - Developer guides
finally, browsers define a large
number of objects as event emitters and define a wide variety of event types generated by the objects.
... notable events web browsers define a large
number of events so it is not practical to list them all.
HTML attribute: pattern - HTML: Hypertext Markup Language
examples given the following: <p> <label>enter your phone
number in the format (123)456-7890 (<input name="tel1" type="tel" pattern="[0-9]{3}" placeholder="###" aria-label="3-digit area code" size="2"/>)- <input name="tel2" type="tel" pattern="[0-9]{3}" placeholder="###" aria-label="3-digit prefix" size="2"/> - <input name="tel3" type="tel" pattern="[0-9]{4}" placeholder="####" aria-label="4-digit
number" size="3"/> </label> </p> here we have 3 secti...
...ons for a north american phone
number with an implicit label encompassing 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.
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
grammar considerations in languages with grammatical
number (that is, languages where the
number of items affects the grammar of a sentence), use the same grammatical
number in your title attribute as inside your <abbr> element.
... this is especially important in languages with more than two
numbers, such as arabic, but is also relevant in english.
<input type="checkbox"> - HTML: Hypertext Markup Language
the most common is when a checkbox is available that "owns" a
number of sub-options (which are also checkboxes).
...when you check or uncheck an ingredient's checkbox, a javascript function checks the total
number of checked ingredients: if none are checked, the recipe name's checkbox is set to unchecked.
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
refresh this instruction specifies: the
number of seconds until the page should be reloaded - only if the content attribute contains a positive integer.
... the
number of seconds until the page should redirect to another - only if the content attribute contains a positive integer followed by the string ';url=', and a valid url.
<nextid>: The NeXT ID element (Obsolete) - HTML: Hypertext Markup Language
html "0.c" - from january 23, 1991 though november 23, 1992 this early version of html introduced <nextid> in a non-sgml compliant form that simply used the numeric value alone as an "attribute." html "0.d" - from november 26, 1992 through may 24, 1993 during this span, next and the oldest surviving dtd's show <nextid> to take only a
number for a value of its newly-introduced attribute n.
... html "1.k" - version 1 (first release) in this first published draft of html, <nextid> is the same as it would take in html 2, finally allowing the use of a name instead of only a
number for its attribute value.
<select>: The HTML Select element - HTML: Hypertext Markup Language
when multiple is specified), this attribute represents the
number of rows in the list that should be visible at one time.
... usage notes selecting multiple options on a desktop computer, there are a
number of ways to select multiple options in a <select> element with a multiple attribute: mouse users can hold the ctrl, command, or shift keys (depending on what makes sense for your operating system) and then click multiple options to select/deselect them.
<tfoot>: The Table Foot element - HTML: Hypertext Markup Language
typical values for this include a period (.) when attempting to align
numbers or monetary values.
... charoff deprecated since html4obsolete since html5 this attribute is used to indicate the
number of characters to offset the column data from the alignment characters specified by the char attribute.
<thead>: The Table Head element - HTML: Hypertext Markup Language
typical values for this include a period (.) when attempting to align
numbers or monetary values.
... charoff in html 4, in html5 this attribute is used to indicate the
number of characters to offset the column data from the alignment characters specified by the char attribute.
HTML elements reference - HTML: Hypertext Markup Language
<ol> the html <ol> element represents an ordered list of items — typically rendered as a
numbered list.
... forms html provides a
number of elements which can be used together to create forms which the user can fill out and submit to the web site or application.
Link types - HTML: Hypertext Markup Language
if one or several up link types are also present, the
number of these up indicates the depth of the current page in the hierarchy.
... the
number of up link types indicates the depth difference between the current page and the linked resource.
Content negotiation - HTTP
this value is an approximation given by rounding to the nearest power of 2 and dividing that
number by 1024.
... a product token is a name followed by a '/' and a version
number, like firefox/4.0.1.
Alt-Svc - HTTP
<alt-authority> the quoted string specifying the alternative authority which consists of an optional host override, a colon, and a mandatory port
number.
... ma=<max-age>optional the
number of seconds for which the alternative service is considered fresh.
DPR - HTTP
the dpr header is a client hints headers which represents the client device pixel ratio (dpr), which is the the
number of physical device pixels corresponding to every css pixel.
... syntax dpr: <
number> examples server first needs to opt in to receive dpr header by sending the response headers accept-ch containing dpr and accept-ch-lifetime.
Host - HTTP
the host request header specifies the host and port
number of the server to which the request is being sent.
... <port> optional tcp port
number on which the server is listening.
Index - HTTP
this directive is intended for web sites with large
numbers of insecure legacy urls that need to be rewritten.
... 76 host http, reference, header the host request header specifies the domain name of the server (for virtual hosting), and (optionally) the tcp port
number on which the server is listening.
Set-Cookie - HTTP
max-age=<
number> optional
number of seconds until the cookie expires.
... a zero or negative
number will expire the cookie immediately.
A typical HTTP session - HTTP
as of http/1.1, the connection is no longer closed after completing the third phase, and the client is now granted a further request: this means the second and third phases can now be performed any
number of times.
...the url of a page to fetch contains both the domain name, and the port
number, though the latter can be omitted if it is 80.
Iterators and generators - JavaScript
javascript provides a
number of ways of iterating over a collection, from simple for loops to map() and filter().
... return result; } return { value: iterationcount, done: true } } }; return rangeiterator; } using the iterator then looks like this: const it = makerangeiterator(1, 10, 2); let result = it.next(); while (!result.done) { console.log(result.value); // 1 3 5 7 9 result = it.next(); } console.log("iterated over sequence of size: ", result.value); // [5
numbers returned, that took interval in between: 0 to 10] note: it is not possible to know reflectively whether a particular object is an iterator.
JavaScript modules - JavaScript
node.js has had this ability for a long time, and there are a
number of javascript libraries and frameworks that enable module usage (for example, other commonjs and amd-based module systems like requirejs, and more recently webpack and babel).
... fortunately there are a
number of ways to get around this.
Character classes - JavaScript
for example, /\d/ or /[0-9]/ matches "2" in "b2 is the suite
number".
...for example, /\d/ or /[^0-9]/ matches "b" in "b2 is the suite
number".
Quantifiers - JavaScript
quantifiers indicate
numbers of characters or expressions to match.
...for example, /e?le?/ matches the "el" in "angel" and the "le" in "angle." if used immediately after any of the quantifiers *, +, ?, or {}, makes the quantifier non-greedy (matching the minimum
number of times), as opposed to the default, which is greedy (matching the maximum
number of times).
JavaScript technologies overview - JavaScript
among other things, ecmascript defines: language syntax (parsing rules, keywords, control flow, object literal initialization, ...) error handling mechanisms (throw, try...catch, ability to create user-defined error types) types (boolean,
number, string, function, object, ...) the global object.
...the internationalization api provides collation (string comparison),
number formatting, and date-and-time formatting for javascript applications, letting the applications choose the language and tailor the functionality to their needs.
constructor - JavaScript
lass is a derived class, the default constructor calls the parent constructor, passing along any arguments that were provided: constructor(...args) { super(...args); } that enables code like this to work: class validationerror extends error { printcustomermessage() { return `validation failed :-( (details: ${this.message})`; } } try { throw new validationerror("not a valid phone
number"); } catch (error) { if (error instanceof validationerror) { console.log(error.name); // this is error instead of validationerror!
...for example: class validationerror extends error { constructor(message) { super(message); // call parent class constructor this.name = 'validationerror'; this.code = '42'; } printcustomermessage() { return `validation failed :-( (details: ${this.message}, code: ${this.code})`; } } try { throw new validationerror("not a valid phone
number"); } catch (error) { if (error instanceof validationerror) { console.log(error.name); // now this is validationerror!
SyntaxError: JSON.parse: bad parsing - JavaScript
message syntaxerror: json.parse: unterminated string literal syntaxerror: json.parse: bad control character in string literal syntaxerror: json.parse: bad character in string literal syntaxerror: json.parse: bad unicode escape syntaxerror: json.parse: bad escape character syntaxerror: json.parse: unterminated string syntaxerror: json.parse: no
number after minus sign syntaxerror: json.parse: unexpected non-digit syntaxerror: json.parse: missing digits after decimal point syntaxerror: json.parse: unterminated fractional
number syntaxerror: json.parse: missing digits after exponent indicator syntaxerror: json.parse: missing digits after exponent sign syntaxerror: json.parse: exponent part is missing a
number syntaxerror: json.parse: unexpected ...
... json.parse('{"foo": 01}'); // syntaxerror: json.parse: expected ',' or '}' after property value // in object at line 1 column 2 of the json data json.parse('{"foo": 1.}'); // syntaxerror: json.parse: unterminated fractional
number // at line 1 column 2 of the json data instead write just 1 without a zero and use at least one digit after a decimal point: json.parse('{"foo": 1}'); json.parse('{"foo": 1.0}'); ...
SyntaxError: Malformed formal parameter - JavaScript
or maybe you accidentally passed an invalid value, like a
number or object.
... examples invalid cases var f = function('x y', 'return x + y;'); // syntaxerror (missing a comma) var f = function('x,', 'return x;'); // syntaxerror (extraneous comma) var f = function(37, "alert('ok')"); // syntaxerror (
numbers can't be argument names) valid cases var f = function('x, y', 'return x + y;'); // correctly punctuated var f = function('x', 'return x;'); // if you can, avoid using function - this is much faster var f = function(x) { return x; }; ...
SyntaxError: missing formal parameter - JavaScript
in the declaration of a function, the parameters must be identifiers, not any value like
numbers, strings, or objects.
...all these function declarations fail, as they are providing values for their parameters: function square(3) { return
number *
number; }; // syntaxerror: missing formal parameter function greet("howdy") { return greeting; }; // syntaxerror: missing formal parameter function log({ obj: "value"}) { console.log(arg) }; // syntaxerror: missing formal parameter you will need to use identifiers in function declarations: function square(
number) { return
number *
number; }; function greet(greeting) { return greet...
ReferenceError: "x" is not defined - JavaScript
variables defined inside a function cannot be accessed from anywhere outside the function, because the variable is defined only in the scope of the function function
numbers() { var num1 = 2, num2 = 3; return num1 + num2; } console.log(num1); // referenceerror num1 is not defined.
... var num1 = 2, num2 = 3; function
numbers() { return num1 + num2; } console.log(
numbers()); // 5 ...
SyntaxError: Unexpected token - JavaScript
for (let i = 0; i < 5,; ++i) { console.log(i); } // syntaxerror: expected expression, got ')' correct would be omitting the comma or adding another expression: for (let i = 0; i < 5; ++i) { console.log(i); } not enough brackets sometimes, you leave out brackets around if statements: function round(n, upperbound, lowerbound){ if(n > upperbound) || (n < lowerbound){ throw '
number ' + string(n) + ' is more than ' + string(upperbound) + ' or less than ' + string(lowerbound); }else if(n < ((upperbound + lowerbound)/2)){ return lowerbound; }else{ return upperbound; } } // syntaxerror: expected expression, got '||' the brackets may look correct at first, but note how the || is outside the brackets.
... correct would be putting brackets around the ||: function round(n, upperbound, lowerbound){ if((n > upperbound) || (n < lowerbound)){ throw '
number ' + string(n) + ' is more than ' + string(upperbound) + ' or less than ' + string(lowerbound); }else if(n < ((upperbound + lowerbound)/2)){ return lowerbound; }else{ return upperbound; } } ...
Default parameters - JavaScript
function test(num = 1) { console.log(typeof num) } test() // '
number' (num is set to 1) test(undefined) // '
number' (num is set to 1 too) // test with other falsy values: test('') // 'string' (num is set to '') test(null) // 'object' (num is set to null) evaluated at call time the default argument is evaluated at call time.
... function append(value, array = []) { array.push(value) return array } append(1) // [1] append(2) // [2], not [1, 2] this even applies to functions and variables: function callsomething(thing = something()) { return thing } let
numberoftimescalled = 0 function something() {
numberoftimescalled += 1 return
numberoftimescalled } callsomething() // 1 callsomething() // 2 earlier parameters are available to later default parameters parameters defined earlier (to the left) are available to later default parameters: function greet(name, greeting, message = greeting + ' ' + name) { return [name, greeting, message] } greet('david', 'hi') // ["david", "hi", "hi david"...
Array.prototype.filter() - JavaScript
function isbigenough(value) { return value >= 10 } let filtered = [12, 5, 8, 130, 44].filter(isbigenough) // filtered is [12, 130, 44] find all prime
numbers in an array the following example returns all prime
numbers in the array: const array = [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]; function isprime(num) { for (let i = 2; num > i; i++) { if (num % i == 0) { return false; } } return num > 1; } console.log(array.filter(isprime)); // [2, 3, 5, 7, 11, 13] filtering invalid entries from json the following ex...
... let arr = [ { id: 15 }, { id: -1 }, { id: 0 }, { id: 3 }, { id: 12.2 }, { }, { id: null }, { id: nan }, { id: 'undefined' } ] let invalidentries = 0 function filterbyid(item) { if (
number.isfinite(item.id) && item.id !== 0) { return true } invalidentries++ return false; } let arrbyid = arr.filter(filterbyid) console.log('filtered array\n', arrbyid) // filtered array // [{ id: 15 }, { id: -1 }, { id: 3 }, { id: 12.2 }] console.log('
number of invalid entries = ', invalidentries) //
number of invalid entries = 5 searching in array following example uses filter() to filter array content based on search criteria.
Array.prototype.flatMap() - JavaScript
for adding and removing items during a map() flatmap can be used as a way to add and remove items (modify the
number of items) during a map.
... // let's say we want to remove all the negative
numbers // and split the odd
numbers into an even
number and a 1 let a = [5, 4, -3, 20, 17, -33, -4, 18] // |\ \ x | | \ x x | // [4,1, 4, 20, 16, 1, 18] a.flatmap( (n) => (n < 0) ?
Array.prototype.push() - JavaScript
if the length property cannot be converted into a
number, the index used is 0.
... do not use this method if the second array (morevegs in the example) is very large because the maximum
number of parameters that one function can take is limited in practice.
Array.prototype.slice() - JavaScript
for strings,
numbers and booleans (not string,
number and boolean objects), slice copies the values into the new array.
... changes to the string,
number, or boolean in one array do not affect the other array.
Array.prototype.toLocaleString() - JavaScript
options optional an object with configuration properties, for
numbers see
number.prototype.tolocalestring(), and for dates see date.prototype.tolocalestring().
... object: object.prototype.tolocalestring()
number:
number.prototype.tolocalestring() date: date.prototype.tolocalestring() always display the currency for the strings and
numbers in the prices array: var prices = ['¥7', 500, 8123, 12]; prices.tolocalestring('ja-jp', { style: 'currency', currency: 'jpy' }); // "¥7,¥500,¥8,123,¥12" for more examples, see also the intl,
numberformat, and datetimeformat pages.
BigInt.prototype.toString() - JavaScript
for example, for hexadecimal
numbers (base 16) a through f are used.
...-0.0 is an ieee floating-point concept that only appears in the javascript
number type.
Date() constructor - JavaScript
date objects contain a
number that represents milliseconds since 1 january 1970 utc.
... time value or timestamp
number value an integer value representing the
number of milliseconds since january 1, 1970, 00:00:00 utc (the ecmascript epoch, equivalent to the unix epoch), with leap seconds ignored.
Date.prototype.getTime() - JavaScript
the gettime() method returns the
number of milliseconds* since the unix epoch.
... syntax dateobj.gettime() return value a
number representing the milliseconds elapsed between 1 january 1970 00:00:00 utc and the given date.
Date.prototype.getUTCFullYear() - JavaScript
syntax dateobj.getutcfullyear() return value a
number representing the year in the given date according to universal time.
... description the value returned by getutcfullyear() is an absolute
number that is compliant with year-2000, for example, 1995.
Date.now() - JavaScript
the static date.now() method returns the
number of milliseconds elapsed since january 1, 1970 00:00:00 utc.
... syntax var timeinms = date.now(); return value a
number representing the milliseconds elapsed since the unix epoch.
Date.prototype.setDate() - JavaScript
return value the
number of milliseconds between 1 january 1970 00:00:00 utc and the given date (the date object is also changed in place).
... if a negative
number is provided for dayvalue, the date will be set counting backwards from the last day of the previous month.
Date.prototype.setMinutes() - JavaScript
a
number between 0 and 999, representing the milliseconds.
... return value the
number of milliseconds between 1 january 1970 00:00:00 utc and the updated date.
Date.prototype.setMonth() - JavaScript
return value the
number of milliseconds between 1 january 1970 00:00:00 utc and the updated date.
...conceptually it will add the
number of days given by the current day of the month to the 1st day of the new month specified as the parameter, to return the new date.
Date.prototype.setSeconds() - JavaScript
a
number between 0 and 999, representing the milliseconds.
... return value the
number of milliseconds between 1 january 1970 00:00:00 utc and the updated date.
Date.prototype.setUTCMilliseconds() - JavaScript
syntax dateobj.setutcmilliseconds(millisecondsvalue) parameters millisecondsvalue a
number between 0 and 999, representing the milliseconds.
... return value the
number of milliseconds between 1 january 1970 00:00:00 utc and the updated date.
Date.prototype.setYear() - JavaScript
return value the
number of milliseconds between 1 january 1970 00:00:00 utc and the updated date.
... description if yearvalue is a
number between 0 and 99 (inclusive), then the year for dateobj is set to 1900 + yearvalue.
Date.prototype.valueOf() - JavaScript
syntax dateobj.valueof() return value the
number of milliseconds between 1 january 1970 00:00:00 utc and the given date.
... description the valueof() method returns the primitive value of a date object as a
number data type, the
number of milliseconds since midnight 01 january, 1970 utc.
Error.prototype.toSource() - JavaScript
for example: (newname(message ,filename,line
number)) where these attributes correspond to the respective properties of the error instance.
... note: be aware that the properties used by the tosource method in the creation of this string are mutable and may not accurately reflect the function used to create an error instance or the filename or line
number where the actual error occurred.
InternalError - JavaScript
internalerror.prototype.line
number line
number in file that raised this error.
... internalerror.prototype.column
number column
number in line that raised this error.
Intl.DateTimeFormat.prototype.resolvedOptions() - JavaScript
"gregory"
numberingsystem the values requested using the unicode extension keys "ca" and "nu" or filled in as default values.
... examples using the resolvedoptions method var germanfakeregion = new intl.datetimeformat('de-xx', { timezone: 'utc' }); var usedoptions = germanfakeregion.resolvedoptions(); usedoptions.locale; // "de" usedoptions.calendar; // "gregory" usedoptions.
numberingsystem; // "latn" usedoptions.timezone; // "utc" usedoptions.month; // "numeric" specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.datetimeformat.prototype.resolvedoptions' in that specification.
Intl.Locale - JavaScript
extension tags hold information about locale aspects such as calendar type, clock type, and
numbering system type.
... intl.locale.prototype.
numberingsystem returns the numeral system used by the locale.
Intl.PluralRules.select() - JavaScript
syntax pluralcategory = pluralrule.select(
number) parameters
number the
number to get a plural rule for.
... return value a string representing the pluralization category of the
number, can be one of zero, one, two, few, many or other.
Math.expm1() - JavaScript
syntax math.expm1(x) parameters x a
number.
... return value a
number representing ex - 1, where e is euler's
number and x is the argument.
Math.tanh() - JavaScript
the math.tanh() function returns the hyperbolic tangent of a
number, that is tanhx=sinhxcoshx=ex-e-xex+e-x=e2x-1e2x+1\tanh x = \frac{\sinh x}{\cosh x} = \frac {e^x - e^{-x}} {e^x + e^{-x}} = \frac{e^{2x} - 1}{e^{2x}+1} syntax math.tanh(x) parameters x a
number.
... return value the hyperbolic tangent of the given
number.
Object.is() - JavaScript
two values are the same if one of the following holds: both undefined both null both true or both false both strings of the same length with the same characters in the same order both the same object (means both object have same reference) both
numbers and both +0 both -0 both nan or both non-zero and both not nan and both have the same value this is not the same as being equal according to the == operator.
...the === operator (and the == operator as well) treats the
number values -0 and +0 as equal and treats
number.nan as not equal to nan.
Object.setPrototypeOf() - JavaScript
does nothing if the prototype parameter isn't an object or null (i.e.,
number, string, boolean, or undefined).
...('felis'); console.log(ocat.ismammal); // 'yes' function animal() { this.breathing = 'yes'; } object.appendchain(ocat, new animal()); console.log(ocat.breathing); // 'yes' second example: transforming a primitive value into an instance of its constructor and append its chain to a prototype function mysymbol() { this.issymbol = 'yes'; } var nprime = 17; console.log(typeof nprime); // '
number' var oprime = object.appendchain(nprime, new mysymbol()); console.log(oprime); // '17' console.log(oprime.issymbol); // 'yes' console.log(typeof oprime); // 'object' third example: appending a chain to the function.prototype object and appending a new function to that chain function person(sname) { this.identity = sname; } var george = object.appendchain(new person('george'), ...
Object.prototype.toString() - JavaScript
parameters for
numbers and bigints tostring() takes an optional parameter radix the value of radix must be minimum 2 and maximum 36.
... by using radix you can also convert base 10
numbers (like 1,2,3,4,5,.........) to another base
numbers, in example below we are converting base 10
number to a base 2 (binary)
number let basetenint = 10; console.log(basetenint.tostring(2)); // expected output is "1010" and same for big integers let bignum = bigint(20); console.log(bignum.tostring(2)); // expected output is "10100" some common radix are 2 for binary
numbers, 8 for octal
numbers, 10 for decimal
numbers, 16 for hexadecimal
numbers.
RangeError() constructor - JavaScript
syntax new rangeerror([message[, filename[, line
number]]]) parameters message optional human-readable description of the error.
... filename optional the name of the file containing the code that caused the exception line
number optional the line
number of the code that caused the exception examples using rangeerror (for numeric values) function check(n) { if( !(n >= -500 && n <= 500) ) { throw new rangeerror("the argument must be between -500 and 500.") } } try { check(2000) } catch(error) { if (error instanceof rangeerror) { // handle the error } } using rangeerror (for non-numeric values) function check(value) { if(["apple", "banana", "carrot"].includes(value) === false) { throw new rangeerror('the argument must be an "apple", "banana", or "carrot".') } } try { check("cabbage") } catch(error) { if(error instanceof rangeerror) { ...
RegExp.prototype[@@split]() - JavaScript
limit optional integer specifying a limit on the
number of splits to be found.
... the [@@split]() method still splits on every match of this regexp pattern (or, in the syntax above, regexp), until the
number of split items match the limit or the string falls short of this pattern.
Set - JavaScript
instance properties set.prototype.size returns the
number of values in the set object.
...console.log([...myset]) // will show you exactly the same array as myarray remove duplicate elements from the array // use to remove duplicate elements from the array const
numbers = [2,3,4,4,2,3,3,4,4,5,5,6,6,7,5,32,3,4,5] console.log([...new set(
numbers)]) // [2, 3, 4, 5, 6, 7, 32] relation with strings let text = 'india' let myset = new set(text) // set ['i', 'n', 'd', 'i', 'a'] myset.size // 5 //case sensitive & duplicate ommision new set("firefox") // set(7) [ "f", "i", "r", "e", "f", "o", "x" ] new set("firefox") // set(6) [ "f", "i", "r", "e", "o", "x" ] ...
String.prototype.charAt() - JavaScript
mp character directly for (var i = 0, chr; i < str.length; i++) { if ((chr = getwholechar(str, i)) === false) { continue; } // adapt this line at the top of each loop, passing in the whole string and // the current iteration and returning a variable to represent the // individual character console.log(chr); } function getwholechar(str, i) { var code = str.charcodeat(i); if (
number.isnan(code)) { return ''; // position not found } if (code < 0xd800 || code > 0xdfff) { return str.charat(i); } // high surrogate (could change last hex to 0xdb7f to treat high private // surrogates as single characters) if (0xd800 <= code && code <= 0xdbff) { if (str.length <= (i + 1)) { throw 'high surrogate without following low surrogate'; } var next = s...
...irectly for (let i = 0, chr; i < str.length; i++) { [chr, i] = getwholecharandi(str, i) // adapt this line at the top of each loop, passing in the whole string and // the current iteration and returning an array with the individual character // and 'i' value (only changed if a surrogate pair) console.log(chr) } function getwholecharandi(str, i) { let code = str.charcodeat(i) if (
number.isnan(code)) { return '' // position not found } if (code < 0xd800 || code > 0xdfff) { return [str.charat(i), i] // normal character, keeping 'i' the same } // high surrogate (could change last hex to 0xdb7f to treat high private // surrogates as single characters) if (0xd800 <= code && code <= 0xdbff) { if (str.length <= (i + 1)) { throw 'high surrogate without f...
String.prototype.codePointAt() - JavaScript
return value a
number representing the code point value of the character at the given pos.
...
number(position) : 0; if (index != index) { // better `isnan` index = 0; } // account for out-of-bounds indices: if (index < 0 || index >= size) { return undefined; } // get the first code unit var first = string.charcodeat(index); var second; if ( // check if it’s the start of a surrogate pair first >= 0xd800 && first <= 0x...
String.fromCharCode() - JavaScript
syntax string.fromcharcode(num1[, ...[, numn]]) parameters num1, ..., numn a sequence of
numbers that are utf-16 code units.
...
numbers greater than 0xffff are truncated.
String.prototype.replaceAll() - JavaScript
a
number of special replacement patterns are supported; see the "specifying a string as a parameter" section below.
... (the exact
number of arguments depends on whether the first argument is a regexp object—and, if so, how many parenthesized submatches it specifies.) examples using replaceall 'aabbcc'.replaceall('b', '.'); // 'aa..cc' non-global regex throws when using a regular expression search value, it must be global.
String.prototype.substring() - JavaScript
the arguments of substring() represent the starting and ending indexes, while the arguments of substr() represent the starting index and the
number of characters to include in the returned string.
... console.log(text.slice(-5, 2)) // => "" console.log(text.slice(-5, -2)) // => "zil" see the slice() page for more examples with negative
numbers.
Symbol.toPrimitive - JavaScript
the hint argument can be one of "
number", "string", and "default".
...var obj2 = { [symbol.toprimitive](hint) { if (hint == '
number') { return 10; } if (hint == 'string') { return 'hello'; } return true; } }; console.log(+obj2); // 10 -- hint is "
number" console.log(`${obj2}`); // "hello" -- hint is "string" console.log(obj2 + ''); // "true" -- hint is "default" specifications specification ecmascript (ecma-262)the definition of 'symbol.toprimitive' in that sp...
Symbol - JavaScript
foo') === symbol('foo') // false the following syntax with the new operator will throw a typeerror: let sym = new symbol() // typeerror this prevents authors from creating an explicit symbol wrapper object instead of a new symbol value and might be surprising as creating explicit wrapper objects around primitive data types is generally possible (for example, new boolean, new string and new
number).
... when trying to convert a symbol to a
number, a typeerror will be thrown (e.g.
SyntaxError() constructor - JavaScript
syntax new syntaxerror([message[, filename[, line
number]]]) parameters message optional human-readable description of the error filename optional the name of the file containing the code that caused the exception line
number optional the line
number of the code that caused the exception examples catching a syntaxerror try { eval('hoo bar'); } catch (e) { console.error(e instanceof syntaxerror); console.error(e.message); console.error(e.name); console.error(e.filename); console.error(e.line
number); console.error(e.column
number); console.error(e.stack); } creating a syntaxerror try { throw new syntaxerror('hello', 'somefile.js', ...
...10); } catch (e) { console.error(e instanceof syntaxerror); // true console.error(e.message); // hello console.error(e.name); // syntaxerror console.error(e.filename); // somefile.js console.error(e.line
number); // 10 console.error(e.column
number); // 0 console.error(e.stack); // @debugger eval code:3:9 } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
TypedArray.BYTES_PER_ELEMENT - JavaScript
property attributes of typedarray.bytes_per_element writable no enumerable no configurable no description typedarray objects differ from each other in the
number of bytes per element and in the way the bytes are interpreted.
... the bytes_per_element constant contains the
number of bytes each element in the given typedarray has.
TypedArray.name - JavaScript
property attributes of typedarray.name writable no enumerable no configurable no description typedarray objects differ from each other in the
number of bytes per element and in the way the bytes are interpreted.
...the second part is a
number describing the bit-size of the array.
TypedArray.prototype.sort() - JavaScript
let
numbers = new uint8array([40, 1, 5, 200]);
numbers.sort(); // uint8array [ 1, 5, 40, 200 ] // unlike plain arrays, a compare function is not required // to sort the
numbers numerically.
... // regular arrays require a compare function to sort numerically:
numbers = [40, 1, 5, 200];
numbers.sort(); // [1, 200, 40, 5]
numbers.sort((a, b) => a - b); // compare
numbers // [ 1, 5, 40, 200 ] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.sort' in that specification.
TypedArray.prototype.toLocaleString() - JavaScript
this method has the same algorithm as array.prototype.tolocalestring() and, as the typed array elements are
numbers, the same algorithm as
number.prototype.tolocalestring() applies for each element.
... see the intl.
numberformat() constructor for details on these parameters and how to use them.
TypedArray.prototype.toString() - JavaScript
var
numbers = new uint8array([2, 5, 8, 1, 4])
numbers.tostring(); // "2,5,8,1,4" javascript calls the tostring method automatically when a typed array is to be represented as a text value or when an array is referred to in a string concatenation.
... compatibility if a browser doesn't support the typedarray.prototype.tostring() method yet, javascript will call the tostring method of object: var
numbers = new uint8array([2, 5, 8, 1, 4])
numbers.tostring(); // "[object uint8array]" specifications specification ecmascript (ecma-262)the definition of 'array.prototype.tostring' in that specification.
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.
... syntax table.grow(
number); parameters
number the
number of elements you want to grow the table by.
WebAssembly.Table - JavaScript
the
number of elements.
... table.prototype.grow() increases the size of the table instance by a specified
number of elements.
Bitwise AND (&) - JavaScript
numbers with more than 32 bits get their most significant bits discarded.
... 9 (base 10) = 00000000000000000000000000001001 (base 2) 14 (base 10) = 00000000000000000000000000001110 (base 2) -------------------------------- 14 & 9 (base 10) = 00000000000000000000000000001000 (base 2) = 8 (base 10) bitwise anding any
number x with 0 yields 0.
Bitwise OR (|) - JavaScript
numbers with more than 32 bits get their most significant bits discarded.
... 9 (base 10) = 00000000000000000000000000001001 (base 2) 14 (base 10) = 00000000000000000000000000001110 (base 2) -------------------------------- 14 | 9 (base 10) = 00000000000000000000000000001111 (base 2) = 15 (base 10) bitwise oring any
number x with 0 yields x.
Bitwise XOR (^) - JavaScript
numbers with more than 32 bits get their most significant bits discarded.
... 9 (base 10) = 00000000000000000000000000001001 (base 2) 14 (base 10) = 00000000000000000000000000001110 (base 2) -------------------------------- 14 ^ 9 (base 10) = 00000000000000000000000000000111 (base 2) = 7 (base 10) bitwise xoring any
number x with 0 yields x.
Exponentiation (**) - JavaScript
that is, you cannot put a unary operator (+/-/~/!/delete/void/typeof) immediately before the base
number; doing so will cause a syntaxerror.
... examples basic exponentiation 2 ** 3 // 8 3 ** 2 // 9 3 ** 2.5 // 15.588457268119896 10 ** -1 // 0.1 nan ** 2 // nan associativity 2 ** 3 ** 2 // 512 2 ** (3 ** 2) // 512 (2 ** 3) ** 2 // 64 usage with unary operators to invert the sign of the result of an exponentiation expression: -(2 ** 2) // -4 to force the base of an exponentiation expression to be a negative
number: (-2) ** 2 // 4 specifications specification ecmascript (ecma-262)the definition of 'exponentiation operator' in that specification.
Greater than (>) - JavaScript
examples string to string comparison console.log("a" > "b"); // false console.log("a" > "a"); // false console.log("a" > "3"); // true string to
number comparison console.log("5" > 3); // true console.log("3" > 3); // false console.log("3" > 5); // false console.log("hello" > 5); // false console.log(5 > "hello"); // false console.log("5" > 3n); // true console.log("3" > 5n); // false
number to
number comparison console.log(5 > 3); // true console.log(3 > 3); // fals...
...e console.log(3 > 5); // false
number to bigint comparison console.log(5n > 3); // true console.log(3 > 5n); // false comparing boolean, null, undefined, nan console.log(true > false); // true console.log(false > true); // false console.log(true > 0); // true console.log(true > 1); // false console.log(null > 0); // false console.log(1 > null); // true console.log(undefined > 3); // false console.log(3 > undefined); // false console.log(3 > nan); // false console.log(nan > 3); // false specifications specification ecmascript (ecma-262)the definition of 'relational operators' in that specification.
Less than (<) - JavaScript
examples string to string comparison console.log("a" < "b"); // true console.log("a" < "a"); // false console.log("a" < "3"); // false string to
number comparison console.log("5" < 3); // false console.log("3" < 3); // false console.log("3" < 5); // true console.log("hello" < 5); // false console.log(5 < "hello"); // false console.log("5" < 3n); // false console.log("3" < 5n); // true
number to
number comparison console.log(5 < 3); // false console.log(3 < 3); // fal...
...se console.log(3 < 5); // true
number to bigint comparison console.log(5n < 3); // false console.log(3 < 5n); // true comparing boolean, null, undefined, nan console.log(true < false); // false console.log(false < true); // true console.log(0 < true); // true console.log(true < 1); // false console.log(null < 0); // false console.log(null < 1); // true console.log(undefined < 3); // false console.log(3 < undefined); // false console.log(3 < nan); // false console.log(nan < 3); // false specifications specification ecmascript (ecma-262)the definition of 'relational operators' in that specification.
Object initializer - JavaScript
in json the values can only be strings,
numbers, arrays, true, false, null, or another (json) object.
...the values of these keys are a string "bar", the
number 42, and another object.
Right shift (>>) - JavaScript
the right shift operator (>>) shifts the first operand the specified
number of bits to the right.
... syntax a >> b description this operator shifts the first operand the specified
number of bits to the right.
this - JavaScript
primitives like 7 or 'foo' will be converted to an object using the related constructor, so the primitive
number 7 is converted to an object as if by new
number(7) and the string 'foo' to an object as if by new string('foo'), e.g.
... function bar() { console.log(object.prototype.tostring.call(this)); } bar.call(7); // [object
number] bar.call('foo'); // [object string] bar.call(undefined); // [object global] the bind method ecmascript 5 introduced function.prototype.bind().
Expressions and operators - JavaScript
+ the unary plus operator converts its operand to
number type.
... - the unary negation operator converts its operand to
number type and then negates it.
const - JavaScript
my_fav = 20; // my_fav is 7 console.log('my favorite
number is: ' + my_fav); // trying to redeclare a constant throws an error // uncaught syntaxerror: identifier 'my_fav' has already been declared const my_fav = 20; // the name my_fav is reserved for constant above, so this will fail too var my_fav = 20; // this throws an error too let my_fav = 20; block scoping it's important to note the nature of block scoping.
... if (my_fav === 7) { // this is fine and creates a block scoped my_fav variable // (works equally well with let to declare a block scoped non const variable) let my_fav = 20; // my_fav is now 20 console.log('my favorite
number is ' + my_fav); // this gets hoisted into the global context and throws an error var my_fav = 20; } // my_fav is still 7 console.log('my favorite
number is ' + my_fav); const needs to be initialized // throws an error // uncaught syntaxerror: missing initializer in const declaration const foo; const in objects and arrays const also works on objects and arrays.
function declaration - JavaScript
maximum
number of arguments varies in different engines.
...use the function before you declared it: hoisted(); // logs "foo" function hoisted() { console.log('foo'); } note that function expressions are not hoisted: nothoisted(); // typeerror: nothoisted is not a function var nothoisted = function() { console.log('bar'); }; examples using function the following code declares a function that returns the total amount of sales, when given the
number of units sold of products a, b, and c.
JavaScript reference - JavaScript
ined globalthis function properties eval() isfinite() isnan() parsefloat() parseint() decodeuri() decodeuricomponent() encodeuri() encodeuricomponent() fundamental objects object function boolean symbol error objects error aggregateerror evalerror internalerror rangeerror referenceerror syntaxerror typeerror urierror
numbers & dates
number bigint math date text processing string regexp indexed collections array int8array uint8array uint8clampedarray int16array uint16array int32array uint32array float32array float64array bigint64array biguint64array keyed collections map set weakmap weakset structured data arraybuffer sharedarraybuffer atomics ...
... dataview json control abstraction promise generator generatorfunction asyncfunction reflection reflect proxy internationalization intl intl.collator intl.datetimeformat intl.displaynames intl.listformat intl.locale intl.
numberformat intl.pluralrules intl.relativetimeformat webassembly webassembly webassembly.module webassembly.instance webassembly.memory webassembly.table webassembly.compileerror webassembly.linkerror webassembly.runtimeerror statements javascript statements and declarations control flowblock break continue empty if...else switch throw try...catch declarations var let const functions and classes function function* async function return class ite...
JavaScript
the complete modules available there are as follows: javascript first steps answers some fundamental questions such as "what is javascript?", "what does it look like?", and "what can it do?", along with discussing key javascript features such as variables, strings,
numbers, and arrays.
... standard objects get to know standard built-in objects array, boolean, date, error, function, json, math,
number, object, regexp, string, map, set, weakmap, weakset, and others.
<mtable> - MathML
in addition, values of the align attribute can end with a row
number (e.g.
... examples alignment with row
number rendering: <math> <mi>x</mi> <mo>=</mo> <mtable frame="solid" rowlines="solid" align="axis 3"> <mtr> <mtd><mi>a</mi></mtd> <mtd><mi>b</mi></mtd> </mtr> <mtr> <mtd><mi>c</mi></mtd> <mtd><mi>d</mi></mtd> </mtr> <mtr> <mtd><mi>e</mi></mtd> <mtd><mi>f</mi></mtd> ...
MathML documentation index - MathML
in addition you must not nest a second <math> element in another, but you can have an arbitrary
number of other child elements in it.
...for example, a
number is a 0-dimensional array, or a 0th-order tensor.
Codecs used by WebRTC - Web media technologies
max-fs if specified and supported by the software, max-fs specifies the maximum size of a single video frame, given as a
number of macroblocks.
... video there are a
number of factors that come into play when deciding upon a video codec (or set of codecs) to support.
Animation performance and frame rate - Web Performance
with css animations you specify a
number of keyframes, each of which uses css to define the appearance of the element at a particular stage of the animation.
... there are a
number of elements, and we've added a linear-gradient background and a box-shadow to each element, because they are both relatively expensive effects to paint.
Introduction to progressive web apps - Progressive web apps (PWAs)
pwas are web apps developed using a
number of specific technologies and standard patterns to allow them to take advantage of both web and native app features.
...this is very different from apps in app stores, which may have a
number of similarly-named apps, some of which may even be based on your own site, which only adds to the confusion.
Mobile first - Progressive web apps (PWAs)
volo has a
number of useful commands available, of which we will just use a couple: volo server: starts a local web server at localhost:8080 and runs your app through it: great for easy testing.
... built-in features of the mortar template mortar templates contain a
number of built-in features.
baseFrequency - SVG: Scalable Vector Graphics
<feturbulence basefrequency="0.025" /> </filter> <filter id="noise2" x="0" y="0" width="100%" height="100%"> <feturbulence basefrequency="0.05" /> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#noise1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#noise2); transform: translatex(220px);" /> </svg> usage notes value <
number-optional-
number> default value 0 animatable yes <
number-optional-
number> if two
numbers are provided, the first one represents the base frequency in the horizontal direction and the second one the base frequency in the vertical direction.
... if one
number is provided, then that value is used for both x and y.
bias - SVG: Scalable Vector Graphics
after applying the kernelmatrix of the <feconvolvematrix> element to the input image to yield a
number and applied the divisor attribute, the bias attribute is added to each component.
... usage notes value <
number> default value 0 animatable yes one application of bias is when it is desirable to have 0.5 gray value be the zero response of the filter.
d - SVG: Scalable Vector Graphics
a path definition is a list of path commands where each command is composed of a command letter and
numbers that represent the command parameters.
...each command is composed of a command letter and
numbers that represent the command parameters.
divisor - SVG: Scalable Vector Graphics
the divisor attribute specifies the value by which the resulting
number of applying the kernelmatrix of a <feconvolvematrix> element to the input image color value is divided to yield the destination color value.
...isor="8"/> </filter> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolvematrix1);"/> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolvematrix2); transform:translatex(220px);"/> </svg> usage notes value <
number> default value sum of all values in kernelmatrix or 1 if sum is 0 animatable yes <
number> this value defines the divisor.
fill-rule - SVG: Scalable Vector Graphics
with the path segment moving in the opposite direction (one square drawn clockwise, the other anti-clockwise) --> <path fill-rule="nonzero" stroke="red" d="m210,0 h90 v90 h-90 z m230,20 v50 h50 v-50 z"/> </svg> evenodd the value evenodd determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and counting the
number of path segments from the given shape that the ray crosses.
... if this
number is odd, the point is inside; if even, the point is outside.
flood-opacity - SVG: Scalable Vector Graphics
een" flood-opacity="0.3" x="0" y="0" width="200" height="200"/> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood2); transform: translatex(220px);" /> </svg> usage notes value <alpha-value> initial value 1 animatable yes <alpha-value> a
number or percentage indicating the opacity value to use across the current filter primitive subregion.
... a
number of 0 or a percentage of 0% represents a fully transparent color, 1 or 100% represents a fully opaque color.
font-weight - SVG: Scalable Vector Graphics
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-weight="normal">normal text</text> <text x="100" y="20" font-weight="bold">bold text</text> </svg> usage notes value normal | bold | bolder | lighter | <
number> default value normal animatable yes for a description of the values, please refer to the css font-weight property.
... working draft defines font-weight to accept any
numbers between 1 and 1000.
horiz-adv-x - SVG: Scalable Vector Graphics
value <
number> default value none animatable no <
number> this value indicates the horizontal advance of the glyph.
... value <
number> default value <font>ʼs horiz-adv-x value animatable no <
number> this value indicates the horizontal advance of the glyph.
kerning - SVG: Scalable Vector Graphics
sentation attribute, it can be applied to any element 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.
... if a length is provided without a unit identifier (e.g., an unqualified
number such as 128), the length is processed as a width value in the current user coordinate system.
keyPoints - SVG: Scalable Vector Graphics
fill="none" id="motionpath"/> <circle cx="10" cy="110" r="3" fill="lightgrey"/> <circle cx="110" cy="10" r="3" fill="lightgrey"/> <circle r="5" fill="red"> <animatemotion dur="3s" repeatcount="indefinite" keypoints="0;0.5;1" keytimes="0;0.15;1" calcmode="linear"> <mpath xlink:href="#motionpath"/> </animatemotion> </circle> </svg> usage notes value <
number> [; <
number>]* ;?
... default value none animatable no <
number> [; <
number>] ;?
orient - SVG: Scalable Vector Graphics
s> <polyline points="10,10 10,90 90,90" fill="none" stroke="black" marker-start="url(#arrow)" marker-end="url(#arrow)" /> <polyline points="15,80 29,50 43,60 57,30 71,40 85,15" fill="none" stroke="grey" marker-start="url(#dataarrow)" marker-mid="url(#dataarrow)" marker-end="url(#dataarrow)" /> </svg> usage notes value auto | auto-start-reverse | <angle> | <
number> default value 0 animatable yes (non-additive) auto this value indicates that the marker is oriented such that its positive x-axis is pointing in a direction relative to the path at the position the marker is placed.
... <
number> this value indicates an angle in degrees.
repeatCount - SVG: Scalable Vector Graphics
the repeatcount attribute indicates the
number of times an animation will take place.
...ttp://www.w3.org/2000/svg"> <rect x="0" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatcount="5"/> </rect> <rect x="120" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatcount="indefinite"/> </rect> </svg> usage notes value <
number> | indefinite default value none animatable no <
number> this value specifies the
number of iterations.
rotate - SVG: Scalable Vector Graphics
usage notes value auto | auto-reverse | <
number> default value 0 animatable no the auto and auto-reverse values allow the animated element's rotation to change dynamically as it travels along the path.
... setting rotate's value to a
number specifies a constant rotation, in degrees, that does not change with the animation.
seed - SVG: Scalable Vector Graphics
the seed attribute represents the starting
number for the pseudo random
number generator of the <feturbulence> filter primitive.
...sefrequency="0.025" seed="0" /> </filter> <filter id="noise2" x="0" y="0" width="100%" height="100%"> <feturbulence basefrequency="0.025" seed="100" /> </filter> <rect x="0" y="0" width="200" height="200" style="filter:url(#noise1);" /> <rect x="0" y="0" width="200" height="200" style="filter:url(#noise2); transform: translatex(220px);" /> </svg> usage notes value <
number> default value 0 animatable yes example <svg width="200" height="200" viewbox="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <feturbulence basefrequency="0.05" seed="1000" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g...
specularExponent - SVG: Scalable Vector Graphics
value <
number> default value 1 animatable yes fespotlight for <fespotlight>, specularexponent defines the exponent value controlling the focus for the light source.
... value <
number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'specularexponent for <fespecularlighting>' in that specification.
startOffset - SVG: Scalable Vector Graphics
</textpath> </text> </svg> usage notes value <length-percentage> | <
number> default value 0 animatable yes <length-percentage> a length represents a distance along the path measured in the current user coordinate system for the <textpath> element.
... <
number> this value indicates a distance along the path measured in the current user coordinate system for the <textpath> element.
stdDeviation - SVG: Scalable Vector Graphics
%" height="160%"> <fegaussianblur stddeviation="10" /> </filter> <circle cx="100" cy="100" r="50" style="filter: url(#gaussianblur1);" /> <circle cx="100" cy="100" r="50" style="filter: url(#gaussianblur2); transform: translatex(140px);" /> <circle cx="100" cy="100" r="50" style="filter: url(#gaussianblur3); transform: translatex(280px);" /> </svg> usage notes value <
number-optional-
number> default value 0 animatable yes <
number-optional-
number> if two
numbers are provided, the first
number represents a standard deviation value along the x-axis.
...if one
number is provided, then that value is used for both x and y.
stroke-dasharray - SVG: Scalable Vector Graphics
dashes nor gaps --> <line x1="0" y1="1" x2="30" y2="1" stroke="black" /> <!-- dashes and gaps of the same size --> <line x1="0" y1="3" x2="30" y2="3" stroke="black" stroke-dasharray="4" /> <!-- dashes and gaps of different sizes --> <line x1="0" y1="5" x2="30" y2="5" stroke="black" stroke-dasharray="4 1" /> <!-- dashes and gaps of various sizes with an odd
number of values --> <line x1="0" y1="7" x2="30" y2="7" stroke="black" 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 ...
... if an odd
number of values is provided, then the list of values is repeated to yield an even
number of values.
surfaceScale - SVG: Scalable Vector Graphics
value <
number> default value 1 animatable yes fediffuselighting for <fediffuselighting>, surfacescale defines the height of the surface.
... value <
number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'surfacescale for <fediffuselighting>' in that specification.
units-per-em - SVG: Scalable Vector Graphics
the units-per-em attribute specifies the
number of coordinate units on the "em square", an abstract square whose height is the intended distance between lines of type in the same type size.
... only one element is using this attribute: <font-face> usage notes value <
number> default value 1000 animatable no <
number> this value indicates the the
number of coordinate units on the em square.
version - SVG: Scalable Vector Graphics
while it is specified to accept any
number, the only two valid choices are currently 1.0 and 1.1.
... <svg version="1.1" viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="80" height="80"/> </svg> usage notes value <
number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'version' in that specification.
vert-adv-y - SVG: Scalable Vector Graphics
value <
number> default value 1 em as of units-per-em animatable no <
number> this value indicates the default vertical advance of the glyph in vertical direction glyph, missing-glyph for <glyph> and <missing-glyph> elements, vert-adv-y specifies the vertical advance for a glyph in vertical orientation.
... value <
number> default value <font>ʼs vert-adv-y value animatable no <
number> this value indicates the vertical advance of the glyph in vertical direction specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-adv-y for <glyph> and <missing-glyph>' in that specification.
z - SVG: Scalable Vector Graphics
value <
number> default value 1 animatable yes fespotlight for <fespotlight>, z defines the location along the z-axis for the light source in the coordinate system established by the primitiveunits attribute on the <filter> element.
... value <
number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'z for <fepointlight>' in that specification.
<circle> - SVG: Scalable Vector Graphics
value type: <
number> ; default value: none; animatable: yes note: starting with svg2, cx, cy, and r are geometry properties, meaning those attributes can also be used as css properties for that element.
...ectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<circle>' in that specification.
<ellipse> - SVG: Scalable Vector Graphics
value type: <
number> ; default value: none; animatable: yes note: starting with svg2 cx, cy, rx and ry are geometry properties, meaning those attributes can also be used as css properties for that element.
...ectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<ellipse>' in that specification.
<marker> - SVG: Scalable Vector Graphics
value type: <list-of-
numbers> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opa...
...odal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment svg mark...
<path> - SVG: Scalable Vector Graphics
value type: <
number> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-render...
...tiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, shape elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment svg pathsthe definition of '<path>' in that specification.
<pattern> - SVG: Scalable Vector Graphics
value type: <list-of-
numbers> ; default value: none; animatable: yes width this attribute determines the width of the pattern tile.
...ation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes most notably: xlink:title usage notes categoriescontainer elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable...
<rect> - SVG: Scalable Vector Graphics
value type: <
number> ; default value: none; animatable: yes note: starting with svg2, x, y, width, height, rx and ry are geometry properties, meaning those attributes can also be used as css properties for that element.
...ectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<rect>' in that specification.
<stop> - SVG: Scalable Vector Graphics
value type: <
number>|<percentage>; default value: 0; animatable: yes stop-color this attribute defines the color of the gradient stop.
... value type: <opacity>; default value: 1; animatable: yes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes presentation attributes most notably: color, display, stop-color, stop-opacity, visibility usage notes categoriesgradient elementpermitted contentany
number of the following elements, in any order:<animate>, <animatecolor>, <set> specifications specification status comment scalable vector graphics (svg) 2the definition of '<stop>' in that specification.
<symbol> - SVG: Scalable Vector Graphics
value type: <list-of-
numbers> ; default value: none; animatable: yes width this attribute determines the width of the symbol.
..., aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> note: a <symbol> element itself is not meant to be rendered.
<text> - SVG: Scalable Vector Graphics
value type: <list-of-
number> ; default value: none; animatable: yes lengthadjust how the text is stretched or compressed to fit the width defined by the textlength attribute.
...le, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, text content elementpermitted contentcharacter data and any
number of the following elements, in any order:animation elementsdescriptive elementstext content elements<a> specifications specification status comment scalable vector graphics (svg) 2the definition of '<text>' in that specification.
<tspan> - SVG: Scalable Vector Graphics
value type: <list-of-
number> ; default value: none; animatable: yes lengthadjust how the text is stretched or compressed to fit the width defined by the textlength attribute.
...rientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any
number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specifications specification status comment scalable vector graphics (svg) 2the definition of '<tspan>' in that specification.
Introduction - SVG: Scalable Vector Graphics
before you start there are a
number of drawing applications available such as inkscape which are free and use svg as their native file format.
... attribute values in svg must be placed inside quotes, even if they are
numbers.
Paths - SVG: Scalable Vector Graphics
there are an infinite
number of bézier curves, but only two simple ones are available in <path> elements: a cubic one, called with c, and a quadratic one, called with q.
...because the start and end points for any path going around a circle are the same point, there are an infinite
number of circles that could be chosen, and the actual path is undefined.
Texts - SVG: Scalable Vector Graphics
the attribute may also contain a list of
numbers, that are one by one applied to the single characters of the tspan element.
...a list of
numbers makes each character rotate to its respective value, with remaining characters rotating according to the last value.
boolean - XPath
the expression can refer to
numbers and node-sets as well as booleans.
... notes a
number evaluates to false if it is positive or negative zero or nan.
count - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the count function counts the
number of nodes in a node-set and returns an integer.
... returns an integer representing the
number of nodes in a node-set.
round - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the round function returns a
number that is the nearest integer to the given
number.
... syntax round(decimal ) arguments decimal the decimal
number to be rounded.
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.
... returns an integer equal to the
number of characters in the string.
string - XPath
a
number is converted as follows: nan is converted to the string nan.
... decimal
numbers between -1 and 1 are converted to a string with a single leading 0 before the decimal point.
<xsl:decimal-format> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:decimal-format> element defines the characters and symbols that are to be used in converting
numbers into strings using theformat-
number( ) function.
... nan specifies the string used when the value is not a
number.
<xsl:sort> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:sort select=expression order="ascending" | "descending" case-order="upper-first" | "lower-first" lang=xml:lang-code data-type="text" | "
number" /> required attributes none.
...the allowable values are "text" and "
number" with "text" being the default.
The Netscape XSLT/XPath Reference - XSLT: Extensible Stylesheet Language Transformations
(supported) xsl:choose (supported) xsl:comment (supported) xsl:copy (supported) xsl:copy-of (supported) xsl:decimal-format (supported) xsl:element (supported) xsl:fallback (not supported) xsl:for-each (supported) xsl:if (supported) xsl:import (mostly supported) xsl:include (supported) xsl:key (supported) xsl:message (supported) xsl:namespace-alias (not supported) xsl:
number (partially supported) xsl:otherwise (supported) xsl:output (partially supported) xsl:param (supported) xsl:preserve-space (supported) xsl:processing-instruction xsl:sort (supported) xsl:strip-space (supported) xsl:stylesheet (partially supported) xsl:template (supported) xsl:text (partially supported) xsl:transform (supported) xsl:value-of (partially supported) xsl:variab...
...descendant descendant-or-self following following-sibling namespace (not supported) parent preceding preceding-sibling self functions boolean() (supported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-
number() (supported) function-available() (supported) generate-id() (supported) id() (partially supported) key() (supported) lang() (supported) last() (supported) local-name() (supported) name() (supported) namespace-uri() (supported) normalize-space() (supported) not() (supported)
number() (supported) position() (supported) round() (supported) starts-with() (supported) s...
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
:call-template (supported) xsl:choose (supported) xsl:comment (supported) xsl:copy (supported) xsl:copy-of (supported) xsl:decimal-format (supported) xsl:element (supported) xsl:fallback (not supported) xsl:for-each (supported) xsl:if (supported) xsl:import (mostly supported) xsl:include (supported) xsl:key (supported) xsl:message (supported) xsl:namespace-alias (not supported) xsl:
number (partially supported) xsl:otherwise (supported) xsl:output (partially supported) xsl:param (supported) xsl:preserve-space (supported) xsl:processing-instruction xsl:sort (supported) xsl:strip-space (supported) xsl:stylesheet (partially supported) xsl:template (supported) xsl:text (partially supported) xsl:transform (supported) xsl:value-of (partially supported) xsl:variable (supporte...
...te child descendant descendant-or-self following following-sibling namespace (not supported) parent preceding preceding-sibling self functions boolean() (supported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-
number() (supported) function-available() (supported) generate-id() (supported) id() (partially supported) key() (supported) lang() (supported) last() (supported) local-name() (supported) name() (supported) namespace-uri() (supported) normalize-space() (supported) not() (supported)
number() (supported) position() (supported) round() (supported) starts-with() (supported) string() (support...
WebAssembly Concepts - WebAssembly
we have run into performance problems, however, when trying to use javascript for more intensive use cases like 3d games, virtual and augmented reality, computer vision, image/video editing, and a
number of other domains that demand native performance (see webassembly use cases for more ideas).
...there are a
number of online wasm assembler choices, such as: wasmfiddle wasmfiddle++ wasmexplorer these are great resources for people who are trying to figure out where to start, but they lack some of the tooling and optimizations of emscripten.
Exported WebAssembly functions - WebAssembly
when you call them, you get some activity in the background to convert the arguments into types that wasm can work with (for example converting javascript
numbers to int32), the arguments are passed to the function inside your wasm module, the function is invoked, and the result is converted and passed back to javascript.
... some other particulars to be aware of with exported webassembly functions: their length property is the
number of declared arguments in the wasm function signature.
Classes and Inheritance - Archive of obsolete content
the constructor property is supposed to be non-configurable, non-e
numberable, and non-writable, so the correct way to define it is as follows: circle.prototype = object.create(shape.prototype, { constructor: { value: circle } }); overriding methods as a final example, we show how to override the stub implementation of the method draw in shape with a more specialized one in circle.
tabs - Archive of obsolete content
var tabs = require("sdk/tabs"); console.log("title of active tab is " + tabs.activetab.title); length the
number of open tabs across all windows.
url - Archive of obsolete content
for example: var url = require("sdk/url").url("https://developer.mozilla.org/add-ons?example=true&visible=yes#top"); console.log(url.host); // developer.mozilla.org port the port
number of the url, null if none was specified.
HTML to DOM - Archive of obsolete content
the returned <body> object is of type element here is a sample that counts the
number of paragraphs in a string: var dompars = htmlparser('<p>foo</p><p>bar</p>'); alert(dompars.getelementsbytagname('p').length); if htmlparser() returns the element name html (instead of body), you have all document object with its complete functions list, therefore you can retrieve info within div tag like this: var dompars = htmlparser("<div id='userinfo'>john was a mediocre programmer, but pe...
Rosetta - Archive of obsolete content
ith scripts written in ecmascript: example.html: html example <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>rosetta c example</title> <script type="text/javascript" src="rosetta.js"></script> <script type="text/javascript" src="rosetta_c.js"></script> <script type="text/x-csrc"> #include <stdio.h> int main () { printf("hello world
number 1!\n"); return 0; } </script> <script type="text/x-c" src="example.c"></script> </head> <body> <p>lorem ipsum</p> <script type="text/javascript"> rosetta.translateall(); </script> </body> </html> example.c: c example #include <stdio.h> int main () { printf("hello world
number 2!\n"); return 0; } if creating a compiler for the c programming language, as in the example above, can rea...
Windows - Archive of obsolete content
1; var windowname = "yourwindowname"; while (wenum.hasmoreelements()) { var win = wenum.getnext(); if (win.name == windowname) { win.focus(); return; } index++ } window.open("chrome://to/your/window.xul", windowname, "features"); uniquely identifying dom windows requires gecko 2.0(firefox 4 / thunderbird 3.3 / seamonkey 2.1) in gecko, each dom window has a unique 64-bit id
number.
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
ble: function clickify(elem, address) { elem.setattribute("href", address); elem.setattribute("onclick", "openwindow(this.getattribute('href'))"); } escaping functions when the code fragment in question is not an event handler attribute and there is no feasible way to pass the data through other means, they must be escaped with functions such as uneval, string.quote, json.stringify, or
number.
Session store API - Archive of obsolete content
using the session store api in seamonkey there are a
number of differences between the session store api in firefox and the api in seamonkey 2.0: the class name is @mozilla.org/suite/sessionstore;1 var ss = components.classes["@mozilla.org/suite/sessionstore;1"] .getservice(components.interfaces.nsisessionstore); when restoring a window, closed tabs in that window are not currently restored.
Firefox addons developer guide - Archive of obsolete content
there should be some introductory text on the table of contents page at https://developer.mozilla.org/en/firefox_addons_developer_guide obviously there are a
number of fixme items in the content that need dealing with, but those are already known.
DOMSubtreeModified - Archive of obsolete content
this event has been deprecated in favor of the mutation observer api this event can cause infinite loops if you decide to change the dom inside the event handler, hence it has been disabled in a
number of browsers (see domattrmodified and domsubtreemodified events are no longer fired when style attribute is changed via cssom for example).
cert_override.txt - Archive of obsolete content
.2.16.840.1.101.3.4.2.2 sha-512: oid.2.16.840.1.101.3.4.2.3 certificate fingerprint using previous hash algorithm one or more characters for override type: m : allow mismatches in the hostname u : allow untrusted certs (whether it's self signed cert or a missing or invalid issuer cert) t : allow errors in the validity time, for example, for expired or not yet valid certs certificate's serial
number and the issuer name as a base64 encoded string ...
Images, Tables, and Mysterious Gaps - Archive of obsolete content
of course, documents authored in xhtml strict or html strict will trigger the "standards" rendering mode, so we're going to go through two basic ways to address the problem in strict documents, and a
number of ways to call on these "fixes." setting images to be blocks the first choice, and one that will work for most graphically-intense designs, is to convert the image from being an inline element to a block-level element.
Plug-n-Hack Phase1 - Archive of obsolete content
the configuration document should then listen for a
number of other events: configuresectoolstarted - this notifies the document that the browser is processing the configuration; if this event is not received within a reasonable amount of time after the configuresectool event has been fired, you might want to warn the user that pnh does not seem to be supported by this browser (perhaps prompting them to install the appropriate addon).
New Skin Notes - Archive of obsolete content
since i manage a
number of sites for which i must respect quality standards at 800 pixels width for compatibility (we accept break 640 compatibility nowadays except for sites intended for pdas/ppcs), i find myself needing to use ctrl+- with the devmo wikki currently, not to change my global settings of course, which are fine and factory-default, working well with the other sites i visit regularily or manage...
RDF Datasource How-To - Archive of obsolete content
an "imap datasource" would use the imap protocol to translate your mail server's inbox as a collection of statements like "message
number 126's subject is 'make money fast on the internet'" and "message
number 126 was sent by 'spammer128@hotmail.com'".
Abc Assembler Tests - Archive of obsolete content
compare_
numbereq(name:string, expected:*, actual:*, fractiondigits:int=-1):void - compare 2
numbers up to fractiondigits this is to be used for high precision
numbers that may vary slightly due to platform differences.
Tamarin Acceptance Test Template - Archive of obsolete content
* * ***** end license block ***** */ var section = "test"; // provide a document reference (ie, actionscript section) var version = "as3"; // version of ecmascript or actionscript var title = "test"; // provide ecma section title or a description var bug
number = ""; starttest(); // leave this alone /** * calls to addtestcase here.
Running Tamarin performance tests - Archive of obsolete content
random run tests in random order --seed explicitly specify random seed for --random -s --avm2 second avmplus command to use --avmname nickname for avm to use as column header --avm2name nickname for avm2 to use as column header --detail display results in 'old-style' format --raw output all raw test values -i --iterations
number of times to repeat test -l --log logs results to a file -k --socketlog logs results to a socket server -r --runtime name of the runtime vm used, including switch info eg.
Tamarin-central rev 703:2cee46be9ce0 - Archive of obsolete content
buildsize flash10576k tc-700740k tc-703655k known issues known failures in the acceptance testsuite include:
number failures in testsuite when running on linux windows mobile system.privatebytes and -memstats privatebytes always returns 0 amd64 longjmp hack needs reengineering on non-windows platforms different runtime errors when -dforcemir set in acceptance test run arm: math failures running with thumb or arm jit and interp.
URIs and URLs - Archive of obsolete content
it also might be necessary to implement a new urlparser for a new protocol but that might not be necessary because necko already provides uri implementations that can deal with a
number of schemes, by implementing the generic urlparser defined in rfc 2396.
Creating XPI Installer Modules - Archive of obsolete content
// displayname from contents.rdf "barley.jar", // jar source getfolder("chrome"), // target folder ""); // target subdir // registerchrome(type, location, source) registerchrome(package | delayed_chrome, getfolder("chrome","barley.jar"), "content/"); if (err==success) performinstall(); else cancelinstall(err); note that there is no version
number on barley, and so the name + version parameter has a "v" and then nothing else.
Install script template - Archive of obsolete content
errorcode="+myregstatus); return myregstatus; } // write the version
number of the plug-in myregstatus = winreg.setvaluestring(mymozillapluginpath, "version", pluginversion); if (myregstatus != 0) { logcomment("moz registerplid: could not write plugin version.
modDateChanged - Archive of obsolete content
method of file object syntax boolean moddatechanged (filespecobject asourcefolder,
number anolddate); parameters the moddatechanged method has the following parameters: asourcefolder a filespecobject representing the file to be queried.
windowsShortcut - Archive of obsolete content
method of file object syntax int windowsshortcut( folderobject atarget, folderobject ashortcutpath, string adescription, folderobject aworkingpath, string aparams, folderobject aicon,
number aiconid); parameters the windowsshortcut method has the following parameters: atarget a filespecobject representing the absolute path (including filename) to file that the shortcut will be created for.
XPInstall API reference - Archive of obsolete content
move rename size windowsgetshortname windowsregisterserver windowsshortcut winprofile no properties methods getstring writestring winreg no properties methods createkey deletekey deletevalue enumkeys enumvaluenames getvalue getvalue
number getvaluestring iskeywritable keyexists setrootkey setvalue setvalue
number setvaluestring valueexists winregvalue constructor other information return codes see complete list examples trigger scripts and install scripts code samples file.macalias file.windowsshortcut install.adddirectory install.addf...
browser.type - Archive of obsolete content
this boundary has a
number of special effects, such as making window.top == window (unless the browser is added to a chrome document), and preventing documents from inheriting the principal of the parent document.
chromemargin - Archive of obsolete content
the specified string should contain four
numbers, separated by commas, indicating the margin in pixels for the top, right, bottom, and left edges of the window, respectively.
increment - Archive of obsolete content
« xul reference home increment type: integer the amount by which the curpos (for scroll bars) or value (for
number boxes and scale) attribute changes when the arrows are clicked(or scales are dragged).
query.type - Archive of obsolete content
« xul reference home type type: one of the values below the type of the parameter's value integer 32 bit integer int64 64 bit integer double double-precision floating-point
number string string literal, the default value ...
script.type - Archive of obsolete content
if you omit this attribute, the default (and older) javascript version is used (like you get when including a javascript file from web content without specifying a version
number).
showPopup - Archive of obsolete content
to have a popup appear relative to another element yet still offset by some
number of pixels, determine the actual screen position of the element using the boxobject.screenx and boxobject.screeny properties of the element, and use those as the x and y arguments offset by the desired values.
startEditing - Archive of obsolete content
« xul reference home startediting( row, column ) return type: no return value activates user editing of the given cell, which is specified by row index
number and the nsitreecolumn in which it is located.
timedSelect - Archive of obsolete content
« xul reference home timedselect( item, timeout ) return type: no return value selects the item specified by the argument item after the
number of milliseconds given by the timeout argument.
Methods - Archive of obsolete content
ble expandtoolbar extra1 extra2 focus getbrowseratindex getbrowserfordocument getbrowserfortab getbrowserindexfordocument getbutton getdefaultsession geteditor getelementsbyattribute getelementsbyattributens getformattedstring gethtmleditor getindexoffirstvisiblerow getindexofitem getitematindex getnextitem getnotificationbox getnotificationwithvalue get
numberofvisiblerows getpagebyid getpreviousitem getresultat getresultcount getresultvalueat getrowcount getsearchat getselecteditem getsession getsessionbyname getsessionresultat getsessionstatusat getsessionvalueat getstring goback gobackgroup godown goforward goforwardgroup gohome goto gotoindex goup hidepopup increase increasepage insertitem ins...
Popup Guide - Archive of obsolete content
popup types xul provides a
number of different types of elements which may be used to create popup menus or other types of popup widgets, which vary based on the manner in which they are attached to an element and the manner in which they are opened.
pageStep - Archive of obsolete content
« xul reference pagestep type: integer this property returns the
number of pages that the user has navigated through so far, meaning that the user would press the back button this many times to go back to the beginning.
Property - Archive of obsolete content
history 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 value
number view webbrowserefind webnavigation webprogress width wizardpages wraparound year yearleadingzero related dom element properties dom:element.attributes dom:element.baseuri dom:element.childelementcount dom:element.childnodes dom:element.children dom:element.clientheight dom:element.clientleft dom:element.clienttop dom:element.clientwidth dom:element.clonenod...
SQLite Templates - Archive of obsolete content
.sqlite" ref="*" querytype="storage"> <template> <query> select name, from myfriends where age >= :minage && age <= :maxage <param id="minage" name="minage" type="integer">30</param> <param id="maxage" name="maxage" type="integer">40</param> </query> <action> <listitem uri="?" label="?name"/> </action> </template> </listbox> here, the age is an integer
number, so the type attribute is set to integer.
Simple Query Syntax - Archive of obsolete content
ery statements are evaluated, the data network will look something like this: (?1 = http://www.xulplanet.com/rdf/myphotos, ?2 = http://www.xulplanet.com/ndeakin/images/t/palace.jpg) (?1 = http://www.xulplanet.com/rdf/myphotos, ?2 = http://www.xulplanet.com/ndeakin/images/t/canal.jpg) (?1 = http://www.xulplanet.com/rdf/myphotos, ?2 = http://www.xulplanet.com/ndeakin/images/t/obselisk.jpg) the
numbers are used here for the variable names, but they are really just randomly generated so you can't refer to them in any way.
Sorting Results - Archive of obsolete content
1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:r="http://www.xulplanet.com/rdf/" xmlns:nc="http://home.netscape.com/nc-rdf#"> <rdf:description rdf:about="http://www.xulplanet.com/ndeakin/images/t/palace.jpg"> <r:date nc:parsetype="date">1125966767295<r:date> </rdf:description> </rdf:rdf> you can also specify parsetype="integer" for
numbers which will allow sorting numerically.
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
<handlers> <handler event="click" button="0" action="alert('left button pressed');"/> <handler event="mouseup" button="1" action="alert('middle button pressed')"/> <handler event="click" button="2" action="alert('right button pressed');"/> </handlers> handling key events for key events, you can use a
number of attributes similar to those for the key element to match a specific key and match only when certain modifer keys are pressed.
Adding Methods to XBL-defined Elements - Archive of obsolete content
xul: <box id="num" class="labeledbutton" title="
number of things:" value="52"/> <button label="show" oncommand="document.getelementbyid('num').showtitle(true)"/> <button label="hide" oncommand="document.getelementbyid('num').showtitle(false)"/> xbl: <binding id="labeledbutton"> <content> <xul:label xbl:inherits="value=title"/> <xul:label xbl:inherits="value"/> </content> <implementation> <method name="showtitle"> <parameter...
Grids - Archive of obsolete content
column spanning there is no means of making a cell span a particular
number of multiple columns or rows (see discussion for a way of achieving the same effect).
Groupboxes - Archive of obsolete content
this could be used to add extra elements within the structure, such as in the following example: example 3 : source view <radiogroup> <radio id="no" value="no" label="no
number"/> <radio id="random" value="random" label="random
number"/> <hbox> <radio id="specify" value="specify" label="specify
number:"/> <textbox id="specific
number"/> </hbox> </radiogroup> note that the radiogroup element does not draw a border around it.
panel - Archive of obsolete content
x, y for an anchored popup, the x and y arguments may be used to offset the popup from its anchored position by some
number, measured in css pixels.
param - Archive of obsolete content
type type: one of the values below the type of the parameter's value integer 32 bit integer int64 64 bit integer double double-precision floating-point
number string string literal, the default value properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , ...
row - Archive of obsolete content
the row with the most child elements determines the
number of columns in each row, which may be smaller or larger than the
number of column elements defined in the grid.
script - Archive of obsolete content
if you omit this attribute, the default (and older) javascript version is used (like you get when including a javascript file from web content without specifying a version
number).
scrollbar - Archive of obsolete content
increment type: integer the amount by which the curpos (for scroll bars) or value (for
number boxes and scale) attribute changes when the arrows are clicked(or scales are dragged).
vbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any
number of child elements.
window - Archive of obsolete content
the specified string should contain four
numbers, separated by commas, indicating the margin in pixels for the top, right, bottom, and left edges of the window, respectively.
XULRunner tips - Archive of obsolete content
ther application you can skip to the next step) follow the instructions above through "unzip the package." create a file in the extensions directory of your application with the same name as the dom inspector id (inspector@mozilla.org) containing one line of text -- the exact path to the root directory of dom inspector (where the install.rdf is) like this one: /home/username/.mozilla/firefox/
numbersandletters/extensions/inspector@mozilla.org/ now create a javascript file with the following code and include it in the main window of your application: function startdomi() { // load the window datasource so that browser windows opened subsequent to dom // inspector show up in the dom inspector's window list.
NPN_GetAuthenticationInfo - Archive of obsolete content
const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen); parameters this function has the following parameters: instance pointer to the current plug-in instance protocol protocol name (uri scheme) host host name port port
number scheme http authentication scheme name realm http authentication realm username out parameter.
NPN_RequestRead - Archive of obsolete content
if the plug-in requests multiple ranges (either through a list of npbyterange objects in a single call to npn_requestread(), or multiple calls to npn_requestread()), the browser can write individual ranges in any order, and with any
number of npp_writeready() and npp_write() calls.
NPVariant - Archive of obsolete content
type to npvarianttype enumeration mapping when using npvariants to access javascript objects in the browser, or vise versa, the mapping of javascript values to npvariants is as follows: javascript type npvarianttype undefined npvarianttype_void null npvarianttype_null boolean npvarianttype_bool
number npvarianttype_int32 or npvarianttype_double string npvarianttype_string all other types npvarianttype_object functions npn_releasevariantvalue() npn_getstringidentifier() npn_getstringidentifiers() npn_getintidentifier() npn_identifierisstring() npn_utf8fromidentifier() npn_intfromidentifier() macros plugin developers...
Encryption and Decryption - Archive of obsolete content
with most modern cryptography, the ability to keep encrypted information secret is based not on the cryptographic algorithm, which is widely known, but on a
number called a key that must be used with the algorithm to produce an encrypted result or to decrypt previously encrypted information.
Browser Feature Detection - Archive of obsolete content
this test takes that idea to the extreme and tests a large
number of properties and methods to determine the level of support a browser has for particular standards and reports a rating as the percentage of names the browser defines.
::-ms-clear - Archive of obsolete content
such inputs include: <input type="color"> <input type="date"> <input type="datetime"> <input type="datetime-local"> <input type="email"> <input type="month"> <input type="
number"> <input type="search"> <input type="tel"> <input type="time"> <input type="url"> <input type="week"> allowable properties only the following css properties can be used in a rule with ::-ms-clear in its selector.
E4X for templating - Archive of obsolete content
/* the first two arguments are optional: (h is a handler with an explicit argument v only, or beginning with k, v) lev is optional argument to note recursive depth (if part of recursion) */ function foreach (min, max, arr, 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; ...
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.6 - Archive of obsolete content
array.prototype.indexof() array.prototype.lastindexof() array.prototype.every() array.prototype.filter() array.prototype.foreach() array.prototype.map() array.prototype.some() array generics string generics for each...in changed functionality in javascript 1.6 a bug in which arguments[n] cannot be set if n is greater than the
number of formal or actual parameters has been fixed.
ECMAScript 2015 support in Mozilla - Archive of obsolete content
ll) (firefox 37) monkey-patched add() in constructor (firefox 37) new math functions math.imul() (firefox 20) math.clz32() (firefox 31) math.fround() (firefox 26) math.log10(), math.log2(), math.log1p(), math.expm1(), math.cosh(), math.sinh(), math.tanh(), math.acosh(), math.asinh(), math.atanh(), math.hypot(), math.trunc(), math.sign(), math.cbrt() (firefox 25) additions to the
number object
number.isnan() (firefox 16)
number.isfinite() (firefox 16)
number.isinteger() (firefox 16)
number.parseint() (firefox 25)
number.parsefloat() (firefox 25)
number.epsilon (firefox 25)
number.max_safe_integer,
number.min_safe_integer (firefox 31)
number.issafeinteger() (firefox 32) additions to the object object object.prototype.__proto__ has been standardized object.is() (fi...
Archived JavaScript Reference - Archive of obsolete content
to make the function a legacy generator, the function body should contain at least one yield expression.microsoft javascript extensionsmicrosoft browsers (internet explorer, and in a few cases, microsoft edge) support a
number of special microsoft extensions to the otherwise standard javascript apis.new in javascriptthis chapter contains information about javascript's version history and implementation status for mozilla/spidermonkey-based javascript applications, such as firefox.
number.tointeger()the
number.tointeger() method used to evaluate the passed value and convert it to an integer, but its implementation has be...
LiveConnect - Archive of obsolete content
the reimplementation also restores the ability to use try-catch exceptions within javascript, and is free of the increasing
number of other bugs introduced by the decline of the original liveconnect (e.g., java.lang.string and arrays not working properly).
ParallelArray - Archive of obsolete content
syntax new parallelarray() new parallelarray([element0, element1, ...]) new parallelarray(arraylength, elementalfunction) parallelarray instances properties length reflects the
number of elements in the parallelarray.
Building Mozilla XForms - Archive of obsolete content
$topsrcdir/browser/config/mozconfig mk_add_options moz_co_project=browser mk_add_options moz_objdir=@topsrcdir@/obj-@config_guess@ #mk_add_options autoconf=autoconf2.13 # possibly needed #mk_add_options moz_make_flags=-jn # (optional) replace n with the
number of parallel build processes (e.g.
Web Standards - Archive of obsolete content
web standards are carefully designed to deliver the greatest benefits to the greatest
number of web users while ensuring the long-term viability of any document published on the web.
Index - Game development
3 examples demos, example, games, web this page lists a
number of impressive web technology demos for you to get inspiration from, and generally have fun with.
Building up a basic demo with Babylon.js - Game development
torus let's try adding a torus — add the following lines below the previous code: var torus = babylon.mesh.createtorus("torus", 2, 0.5, 15, scene); torus.position.x = -5; torus.rotation.x = 1.5; this will create a torus and add it to the scene; the parameters are: name, diameter, thickness, tessellation (
number of segments) and the scene to add it to.
Desktop gamepad controls - Game development
next, we'll consider the gamepadbuttonpressedhandler() function: function gamepadbuttonpressedhandler(button) { var press = false; for(var i=0; i<buttonspressed.length; i++) { if(buttonspressed[i] == button) { press = true; } } return press; } the function takes a button as a parameter; in the loop it checks if the given button's
number is among the currently pressed buttons available in the buttonspressed array.
asm.js - Game development
it is a very small, strict subset of javascript that only allows things like `while`, `if`,
numbers, top-level named functions, and other simple constructs.
The score - Game development
updating the score when bricks are destroyed we will increase the
number of points every time the ball hits a brick and update the scoretext to display the current score.
Game development
note: creating games on the web draws on a
number of core web technologies such as html, css, and javascript.
Cryptographic hash function - MDN Web Docs Glossary: Definitions of Web-related terms
to be used for cryptography, a hash function must have these qualities: quick to compute (because they are generated frequently) not invertible (each digest could come from a very large
number of messages, and only brute-force can generate a message that leads to a given digest) tamper-resistant (any change to a message leads to a different digest) collision-resistant (it should be impossible to find two different messages that produce the same digest) cryptographic hash functions such as md5 and sha-1 are considered broken, as attacks have been found that significantly reduce thei...
Digest - MDN Web Docs Glossary: Definitions of Web-related terms
form several tasks: in non-cryptographic applications (e.g., the index of hash tables, or a fingerprint used to detect duplicate data or to uniquely identify files) verify message integrity (a tampered message will have a different hash) store passwords so that they can't be retrieved, but can still be checked (to do this securely, you also need to salt the password.) generate pseudo-random
numbers generate keys it is critical to choose the proper hash function for your use case to avoid collisions and predictability.
Distributed Denial of Service - MDN Web Docs Glossary: Definitions of Web-related terms
the united states computer emergency readiness team (us-cert) defines symptoms of denial-of-service attacks to include: unusually slow network performance (opening files or accessing websites) unavailability of a particular website inability to access any website dramatic increase in the
number of spam emails received—(this type of dos attack is considered an email bomb) disconnection of a wireless or wired internet connection longterm denial of access to the web or any internet services learn more general knowledge denial-of-service attack on wikipedia ...
Localization - MDN Web Docs Glossary: Definitions of Web-related terms
in europe, miles in u.s.) text direction (e.g., european languages are left-to-right, arabic right-to-left) capitalization in latin script (e.g., english uses capitals for weekdays, spanish uses lowercase) adaptation of idioms (e.g., "raining cats and dogs" makes no sense when translated literally) use of register (e.g., in japanese respectful speech differs exceptionally from casual speech)
number format (e.g., 10 000,00 in germany vs.
Session Hijacking - MDN Web Docs Glossary: Definitions of Web-related terms
protection against session hijacking create a secure communication channel with ssh (secure shell) pass authentication cookies over https connection implement logout functionality so the user can end the session generate the session id after successful login pass encrypted data between the users and the web server use a string or long random
number as a session key learn more general knowledge session hijacking on wikipedia ...
TTL - MDN Web Docs Glossary: Definitions of Web-related terms
ttl can refer either to : the lifetime of a packet in a network can do before being released the expiry time of cached data networking in networking, the ttl, embedded in the packet, is a usually defined as a
number of hops or as an expiration timestamp after which the packet is dropped.
Web standards - MDN Web Docs Glossary: Definitions of Web-related terms
this non-exhaustive list gives you an idea of which standards websites and network systems must conform to: ietf (internet engineering task force): internet standards (std), which among other things govern set-up and use of uris, http, and mime w3c: specifications for markup language (e.g., html), style definitions (i.e., css), dom, accessibility iana (internet assigned
numbers authority): name and
number registries ecma intl.: scripting standards, most prominently for javascript iso (international organization for standardization): standards governing a diverse array of aspects, including character encodings, website management, and user-interface design learn more general knowledge web standards on wikipedia ...
caret - MDN Web Docs Glossary: Definitions of Web-related terms
<input type="text"> <input type="password"> <input type="search"> <input type="date">, <input type="time">, <input type="datetime">, and <input type="datetime-local"> <input type="
number">, <input type="range"> <input type="email">, <input type="tel">, and <input type="url"> <textarea> any element with its contenteditable attribute set ...
Accessible multimedia - Learn web development
it works out the
number of minutes and seconds from the given currenttime value (which is in seconds), adds a leading 0 if either the minute or second value is less than 10, and then creates the display readout and adds it to the time label.
What is a URL? - Learn web development
you might think of a url like a regular postal mail address: the protocol represents the postal service you want to use, the domain name is the city or town, and the port is like the zip code; the path represents the building where your mail should be delivered; the parameters represent extra information such as the
number of the apartment in the building; and, finally, the anchor represents the actual person to whom you've addressed your mail.
Common questions - Learn web development
this set of articles shows you how to use the developer tools in firefox to debug and improve performance of your website, using the tools to check memory usage, the javascript call tree, the
number of dom nodes being rendered, and more.
Example - Learn web development
ame="password"> </p> </section> <section> <h2>payment information</h2> <p> <label for="card"> <span>card type:</span> </label> <select id="card" name="usercard"> <option value="visa">visa</option> <option value="mc">mastercard</option> <option value="amex">american express</option> </select> </p> <p> <label for="
number"> <span>card
number:</span> <strong><abbr title="required">*</abbr></strong> </label> <input type="tel" id="
number" name="card
number"> </p> <p> <label for="date"> <span>expiration date:</span> <strong><abbr title="required">*</abbr></strong> <em>formatted as mm/dd/yyyy</em> </label> <input type="date" id="date" name="ex...
Publishing your website - Learn web development
using a web-based ide such as codepen there are a
number of web apps that emulate a website development environment, allowing you to enter html, css and javascript, and then display the result of that code as a website — all in one browser tab.
Marking up a letter - Learn web development
the six sub/superscripts should be marked up appropriately — in the chemical formulae, and the
numbers 103 and 104 (they should be 10 to the power of 3 and 4, respectively).
From object to iframe — other embedding technologies - Learn web development
however, you are unlikely to use these elements very much — applets haven't been used for years, flash is no longer very popular, due to a
number of reasons (see the case against plugins, below), pdfs tend to be better linked to than embedded, and other content such as images and video have much better, easier elements to handle those.
Image gallery - Learn web development
you need to: put the section of code below the "looping through images" comment inside a loop that loops through all 5 images — you just need to loop through five
numbers, one representing each image.
Client-side web APIs - Learn web development
client-side storage modern web browsers feature a
number of different technologies that allow you to store data related to web sites and retrieve it when necessary allowing you to persist data long term, save sites offline, and more.
Inheritance in JavaScript - Learn web development
if you find yourself starting to create a
number of objects that have similar features, then creating a generic object type to contain all the shared functionality and inheriting those features in more specialized object types can be convenient and useful.
The business case for web performance - Learn web development
a performance budget is a set of limits that are set to specify limits, such as maximum
number of http requests allowed, the maximum total size of all the assets combined, the minimum allowable fps on a specific device, etc, that must be maintained.
Ember app structure and componentization - Learn web development
looking at the code next to the rendered todo app, there are a
number of ways we could decide how to break up the ui, but let's plan on splitting the html out into the following components: the component groupings are as follows: the main input / "new-todo" (red in the image) the containing body of the todo list + the mark-all-complete button (purple in the image) the mark-all-complete button, explicitly highlighted for reasons given below (yellow in t...
Getting started with React - Learn web development
if you have both package managers installed and explicitly want to use npm, you can add the flag --use-npm when you run create-react-app: npx create-react-app moz-todo-react --use-npm create-react-app will display a
number of messages in your terminal while it works; this is normal!
Getting started with Svelte - Learn web development
highly interactive pages or complex visualizations: if you are building data-visualizations that need to display a large
number of dom elements, the performance gains that come from a framework with no runtime overhead will ensure that user interactions are snappy and responsive.
Getting started with Vue - Learn web development
it is recommended that you specify a version
number when including vue on your site so that any framework updates do not break your live site without you knowing.) <script src="/static/external/29/29296ccacaa9ed35ed168fc51e36f54fd6f8db9c7786bbf38cc59a27229ba5c2.svg"></script> however, this approach has some limitations.
Implementing feature detection - Learn web development
if you look at the dom inspector of your browser's developer tools, you'll see that modernizr has updated your <html> class value like so: <html class="js no-htmlimports sizes flash transferables applicationcache blobconstructor blob-constructor cookies cors ...and loads more values!> it now contains a large
number of classes that indicate the support status of different technology features.
Git and GitHub - Learn web development
git is an example of a vcs, and github is a web site + infrastructure that provides a git server plus a
number of really useful tools for working with git repositories individually or in teams, such as reporting issues with the code, reviewing tools, project management features such as assigning tasks and task statuses, and more.
Tools and testing - Learn web development
note: we have referenced a
number of tools in this topic, not because we endorse them or think they are the best, but because we know they work and have good industry support.
Links and Resources
the accessibility report will contain errors and warnings for "automatic checkpoints" and "manual checkpoints"; detailed and useful information (line
numbers, instances/occurences, textual references to guidelines) will be included for web authors.
Accessibility and Mozilla
this page describes a
number of design-related aspects to look out for, in no particular order.accessibility/liveregiondevguidethis page is currently under construction.
Theme concepts
if you are uploading a packaged file, the version
number must be higher than the current version
number dynamic themes as an alternative to defining a static theme, you can use the theme api to control the theme used in firefox from within a browser extension.
Browser chrome tests
using a descriptive file name is strongly encouraged instead of just using a bug
number.
Creating a Language Pack
configure step you need to prepare the build directory, which is done with ./mach configure you only need to run this if the version
number of firefox changes.
Capturing a minidump
when the program is about to crash, windbg will spit out more data, and the prompt at the bottom will change from saying "*busy*" to having a
number in it.
Debugging Frame Reflow
it provides the following information for each frame at the start of its reflow reflow reason available width, available height computed width, computed height the previous and the next frame in flow and a count
number.
Debugging JavaScript
in extensions you can print the callstack using components.stack like this: function getstackdump() { var lines = []; for (var frame = components.stack; frame; frame = frame.caller) { lines.push(frame.filename + " (" + frame.line
number + ")"); } return lines.join("\n"); } see also debugging mozilla with gdb setting up an extension development environment (particularly development preferences and development extensions) original document information author(s): ben bucksch created date: september 12, 2005, last updated date: november 10, 2009 copyright information: portions of this content are © 1998–2007 by ...
Configuring Build Options
you will see (diminishing) returns up to a value approximately 1.5× to 2.0× the
number of cores on your system.
How Mozilla's build system works
makefile basics makefiles can be quite complicated, but mozilla provides a
number of built-in rules that should enable most makefiles to be simpler.
Old Thunderbird build
you should copy the header files to a windows sdk include directory so that the build process will find the files, for example to c:\program files (x86)\windows kits\8.1\include\shared and/or c:\program files (x86)\windows kits\10\include\10.0.nnnnn.0\shared respectively, where nnnnn is the highest
number present on the system.
Simple Thunderbird build
you should copy 17 of the 18 header files to a windows sdk include directory so that the build process will find the files, that is c:\program files (x86)\windows kits\10\include\10.0.nnnnn.0\shared, where nnnnn is the highest
number present on the system.
mach
mach is still relatively young ("born" in 2012) and there are a
number of bugs and numerous areas for improvement.
Index
10 firefox ui considerations for web developers activity stream, firefox, icons, mozilla, new tab, newtab, ui, web, web development, favicon there are a
number of places within the firefox user interface where web sites are listed for the user to choose a destination to visit or a site to manage in some way.
Cross Process Object Wrappers
rome script windowmm.addmessagelistener("my-e10s-extension-message", handlemessage); function handlemessage(message) { let wrapper = message.objects.clicked; console.log(wrapper.innerhtml); wrapper.innerhtml = "<h2>modified by chrome!</h2>" wrapper.setattribute("align", "center"); } auto-generated cpows add-ons that have not declared themselves multiprocess compatible are set up with a
number of compatibility shims.
Performance
all their overhead is thus not just incurred by active tabs but by the total
number of tabs in a session.
Site Identity Button
depending on the configuration of your website, this button may display a
number of different icons.
Firefox
the most useful is the url about:config, which displays preferences and settings that can be inspected and changed.firefox ui considerations for web developersthere are a
number of places within the firefox user interface where web sites are listed for the user to choose a destination to visit or a site to manage in some way.
MozBeforePaint
frame rate control mozbeforepaint won't fire more than a fixed
number of times per second, e.g.
PBackground
the root of the tree is known as the top-level actor, an instance of one of a small
number of top-level protocols.
IPDL Tutorial
parameters message declarations allow any
number of parameters.
JavaScript-DOM Prototypes in Mozilla
here are a few of the properties of obj's prototype: obj.__proto__ parentnode (getter function) src (getter and setter functions) getelementsbytagname (function) text_node (
number property, constant) ...
Addon
fulldescription read only string developercomments read only string eula read only string icon64url read only string supporturl read only string contributionurl read only string contributionamount read only string averagerating read only
number reviewcount read only integer reviewurl read only string totaldownloads read only integer weeklydownloads read only integer dailyusers read only integer repositorystatus read only integer callbacks datadirectorycallback() a callback which is passed a directory path, and, when ...
Dict.jsm
); boolean del(string akey); object get(string akey, [optional] object adefault); boolean has(string akey); array listitems(); array listkeys(); array listvalues(); void set(string akey, object avalue); string tojson(); string tostring(); properties attribute type description count
number the
number of items in the dictionary.
DownloadTarget
size read only
number the size of the target file, in bytes, or zero if the download has not yet been completed.
FxAccountsProfileClient.jsm
fxaccountsprofileclienterror attributes name string name of the error fxaccountsprofileclienterror code
number status code of the request errno
number error
number error string error description message string error message ...
Interfacing with the Add-on Repository
it receives a list of the matching addons, the
number of add-ons returned, and the total
number of add-ons that matched the query (in case the returned
number is smaller than the requested
number, for example).
Log.jsm
field name value all 0 config 30 debug 20 desc { 0: "all", 10: "trace", 20: "debug", 30: "config", 40: "info", 50: "warn", 60: "error", 70: "fatal" } error 30 fatal 70 info 40
numbers { "all": 0, "trace": 10, "debug": 20, "config": 30, "info": 40, "warn": 50, "error": 60, "fatal": 70 } trace 10 warn 50 repository loggerrepository logger methods void fatal(string text, [optional] object params); void error(string text, [optional] object params);...
OSFile.jsm
i/o efficiency is all about minimizing the
number of actual i/o calls.
PopupNotifications.jsm
any combination of the following properties may be provided: persistence an integer value indicating the
number of page loads for which the notification will persist; once this many page loads have occurred, the notification may dismiss automatically.
PromiseWorker.jsm
by convention, the last argument may be an object options with some of the following fields: outexecutionduration {
number|null} a parameter to be filled with the duration of the off main thread execution for this call.
Sqlite.jsm
this returns an integer count of the
number of cached statements that were discarded.
L10n Checks
this
number won't reach 100% in general; mid 80s should be the target, though.
Mozilla Content Localized in Your Language
ex: most asian countries start from big to small: [country] [postal code][state/province][city][district][street
number and name][building and suite
numbers][addressee] countries of european languages start from small to big: [addressee][street
number and name][building and suite
numbers][district][city][state/province][postal code][country] name convention what are the order of family name and given name in your language.
Localization notes
there are a
number of automated tools that parse these comments for easier access and use by localizers.
Localizing extension descriptions
if there is more than one locale with the same
number of matching parts, then use the most general one (e.g., en in preference to en-gb when searching for en-us).
Initial setup
local environment tools similar to accounts, there is a
number of environment tools that you should install on your personal computer.
Translation phase
if you are creating your own localization, there are a
number of mozilla websites that need to be localized before your efforts become an officially released localization.
Localization sign-off reviews
once they are fixed, push your fix to your repo, attach it to the corresponding bug using the same mercurial revision
number as before, and then request another review.
Localization technical reviews
once they are fixed, push your fix to your repo, attach it to the corresponding bug using the same mercurial revision
number as before, and then request another review.
MathML Demo: <mtable> - tables and matrices
d+p ( α β γ δ ) ...--- , but note that setting the baseline relative to a particular row is meaningless if the row doesn't have at least one cell with "rowalign=baseline" where to anchor the baseline (in which case mozilla will behave as if it was align="center#row
number").
Mozilla Quirks Mode Behavior
the css parser interprets unitless
numbers as px (except for line-height and any other properties where they have distinct meaning, and except in shorthands).
Mozilla Style System Documentation
while the style context tree is generally quite deep, since it corresponds roughly to the content tree, the rule tree is generally quite broad (but are there cases where it is quite deep??), since the depth of a node in the tree corresponds to the
number of rules matched.
Profiling with the Firefox Profiler
thgis requires the following command: $ xpcshell -m -i -n -e ' const ci = components.interfaces; const cc = components.classes; var profiler = cc["@mozilla.org/tools/profiler;1"].getservice(ci.nsiprofiler); profiler.startprofiler( 10000000 /* = profiler memory */, 1 /* = sample rate: 100µs with patch, 1ms without */, ["stackwalk", "js"], 2 /* = features, and
number of features.
TraceMalloc
tracemallocchangelogfd(logfd) - change the current log file to the one identified by logfd, returning the previous fd (so you can maintain a
number of open files; keep their fds in a js array!).
dtrace
dtrace will then print to the output file a
number of stack traces, along with a wakeup count for each one.
Performance
bloatview bloatview prints per-class statistics on allocations and refcounts, and provides gross
numbers on the amount of memory being leaked broken down by class.
Patches and pushes
use a commit message that mentions the bug
number, describes the change, and mentions the reviewer.
CERT_FindCertByDERCert
a match is found when the issuer and serial
number of the der-encoded certificate are found on a certificate in the certificate database.
Certificate functions
mxr 3.12 and later cert_encodepolicymappingextension mxr 3.12 and later cert_encodesubjectkeyid mxr 3.12 and later cert_encodeusernotice mxr 3.12 and later cert_extractpublickey mxr 3.2 and later cert_findcertbyname mxr 3.2 and later cert_findcrlentryreasonexten mxr 3.12 and later cert_findcrl
numberexten mxr 3.12 and later cert_findnameconstraintsexten mxr 3.12 and later cert_filtercertlistbycanames mxr 3.4 and later cert_filtercertlistbyusage mxr 3.4 and later cert_filtercertlistforusercerts mxr 3.6 and later cert_findcertbydercert mxr 3.2 and later cert_findcertbyissuerandsn mxr 3.2 and later ...
NSS FAQ
the integration effort depends on an
number of factors, such as developer skill set, application complexity, and the level of security required for your application.
HTTP delegation
in addition, during an application session with ocsp enabled, a large
number of ocsp requests might have to be sent.
HTTP delegation
in addition, during an application session with ocsp enabled, a large
number of ocsp requests might have to be sent.
JSS Provider Notes
securerandom supported algorithms notes pkcs11prng this invokes the nss internal pseudorandom
number generator.
Using JSS
freebl_* processor-specific optimized big-
number arithmetic library.
NSS_3.11.10_release_notes.html
424169: add geotrust primary certification authority root to nss bug 425469: add multiple new roots: geotrust bug 426568: add comodo certification authority certificate to nss bug 431381: add network solutions certificate authority root to nss bug 431621: add diginotar root ca root to nss bug 431772: add network solutions and diginotar root certs to nss bug 442912: fix nssckbi version
number on 3.11 branch bug 443045: fix pk11_generatekeypair for ecc keys on the 3.11 branch bug 444850: nss misbehaves badly in the presence of a disabled pkcs#11 slot bug 462948: lint warnings for source files that include keythi.h documentation for a list of the primary nss documentation pages on mozilla.org, see nss documentation.
NSS 3.12.4 release notes
bug 505858: nss_registershutdown can return without unlocking nssshutdownlist.lock bug 507041: invalid build options for vc6 bug 507228: coreconf.dep doesn't need to contain the nss version
number bug 507422: crash [[@ port_freearena - lg_mksecretkeyrep] when port_newarena fails bug 507482: nss 3.12.3 (and later) doesn't build on aix 5.1 bug 507937: pwdecrypt program problems bug 508259: pk11mode crashed on linux2.4 bug 508467: libpkix ocsp checker should use date argument to obtain the time for cert validity verification bug 510367: fix the utf8 characters in the nickname string for ac ra...
NSS 3.12.5 release_notes
bug 510435: remove unused make variable dso_ldflags bug 510436: add macros for build
numbers (4th component of version
number) to nssutil.h bug 511227: firefox 3.0.13 fails to compile on freebsd/powerpc bug 511312: nss fails to load softoken, looking for sqlite3.dll bug 511781: add new tls 1.2 cipher suites implemented in windows 7 to ssltap bug 516101: if pk11_importcert fails, it leaves the certificate undiscoverable by cert_pkixverifycert bug 518443: pk11_importandreturnprivatek...
NSS 3.12.6 release notes
t considers a certificate revoked if cert_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_findcertificatebyissuerandserial
number] bug 526910: maxresponselength (initialized to pkix_default_max_response_length) is too small for downloading some crls.
NSS 3.16.4 release notes
nss 3.16.4 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_16_4_rtm/src/ new in nss 3.16.4 this release consists primarily of ca certificate changes as listed below, and includes a small
number of bug fixes.
NSS 3.17.3 release notes
fication authority sha1 fingerprint: d1:cb:ca:5d:b2:d5:2a:7f:69:3b:67:4d:e5:f0:5a:1d:0c:95:7d:f0 cn = globalsign ecc root ca - r4 sha1 fingerprint: 69:69:56:2e:40:80:f4:24:a1:e7:19:9f:14:ba:f3:ee:58:ab:6a:bb cn = globalsign ecc root ca - r5 sha1 fingerprint: 1f:24:c6:30:cd:a4:18:ef:20:69:ff:ad:4f:dd:5f:46:3a:1b:69:aa the version
number of the updated root ca list has been set to 2.2 bugs fixed in nss 3.17.3 this bugzilla query returns all the bugs fixed in nss 3.17.3: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.17.3 compatibility nss 3.17.3 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.18 release notes
ion authority - g2 sha1 fingerprint: 8c:f4:27:fd:79:0c:3a:d1:66:06:8d:e8:1e:57:ef:bb:93:22:72:d4 cn = entrust root certification authority - ec1 sha1 fingerprint: 20:d8:06:40:df:9b:25:f5:12:25:3a:11:ea:f7:59:8a:eb:14:b5:47 cn = cfca ev root sha1 fingerprint: e2:b8:29:4b:55:84:ab:6b:58:c2:90:46:6c:ac:3f:b8:39:8f:84:83 the version
number of the updated root ca list has been set to 2.3 bugs fixed in nss 3.18 this bugzilla query returns all the bugs fixed in nss 3.18: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.18 compatibility nss 3.18 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.19.3 release notes
sha1 fingerprint: c4:18:f6:4d:46:d1:df:00:3d:27:30:13:72:43:a9:12:11:c6:75:fb cn = tÜrktrust elektronik sertifika hizmet sağlayıcısı h6 sha1 fingerprint: 8a:5c:8c:ee:a5:03:e6:05:56:ba:d8:1b:d4:f6:c9:b0:ed:e5:2f:e0 cn = certinomis - root ca sha1 fingerprint: 9d:70:bb:01:a5:a4:a0:18:11:2e:f7:1c:01:b9:32:c5:34:e7:88:a8 the version
number of the updated root ca list has been set to 2.5 bugs fixed in nss 3.19.3 this bugzilla query returns all the bugs fixed in nss 3.19.3: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.19.3 compatibility nss 3.19.3 shared libraries are backward compatible with all older nss 3.19 shared libraries.
NSS 3.23 release notes
clients that perform a version downgrade (which is a dangerous practice) call this with the highest version
number that they possibly support.
NSS 3.27 release notes
hard limits on the maximum
number of tls records encrypted with the same key are enforced.
NSS 3.28.1 release notes
lic primary certification authority - g4 sha-256 fingerprint: fe:86:3d:08:22:fe:7a:23:53:fa:48:4d:59:24:e8:75:65:6d:3d:c9:fb:58:77:1f:6f:61:6f:9d:57:1b:c5:92 cn = symantec class 2 public primary certification authority - g6 sha-256 fingerprint: cb:62:7d:18:b5:8a:d5:6d:de:33:1a:30:45:6b:c6:5c:60:1a:4e:9b:18:de:dc:ea:08:e7:da:aa:07:81:5f:f0 the version
number of the updated root ca list has been set to 2.11 a misleading assertion/alert has been removed, when nss tries to flush data to the peer but the connection was already reset.
NSS 3.28.2 release notes
nss 3.28.2 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_28_2_rtm/src/ incorrect version
number note the version
numbers embedded in the nss 3.28.2 are wrong (it reports itself as version 3.28.1).
NSS 3.28 release notes
this includes a
number of improvements to tls 1.3: the signed certificate timestamp, used in certificate transparency, is supported in tls 1.3 (bug 1252745).
NSS 3.30.2 release notes
:8a:d6:af:00:90:35:dd:94:57 trust flags: email cn = tubitak kamu sm ssl kok sertifikasi - surum 1 sha-256 fingerprint: 46:ed:c3:68:90:46:d5:3a:45:3f:b3:10:4a:b8:0d:ca:ec:65:8b:26:60:ea:16:29:dd:7e:86:79:90:64:87:16 trust flags: websites technically constrained to: gov.tr, k12.tr, pol.tr, mil.tr, tsk.tr, kep.tr, bel.tr, edu.tr, org.tr the version
number of the updated root ca list has been set to 2.14 (the version
numbers 2.12 and 2.13 for the root ca list have been skipped.) bugs fixed in nss 3.30.2 bug 1350859 - march 2017 batch of root ca changes bug 1349705 - implemented domain name constraints for ca: tubitak kamu sm ssl kok sertifikasi - surum 1 compatibility nss 3.30.2 shared libraries are backward compatible with all older nss...
NSS 3.39 release notes
notable changes in nss 3.39 the tls 1.3 implementation uses the final version
number from rfc 8446.
NSS 3.51 release notes
bug 1611209 - correct swapped pkcs11 values of ckm_aes_cmac and ckm_aes_cmac_general bug 1612259 - complete integration of wycheproof ecdh test cases bug 1614183 - check if ppc __has_include(<sys/auxv.h>) bug 1614786 - fix a compilation error for ‘getfipsenv’ "defined but not used" bug 1615208 - send dtls version
numbers in dtls 1.3 supported_versions extension to avoid an incompatibility.
NSS 3.54 release notes
6f616f9d571bc592 bug 1618402 - symantec class 1 public primary certification authority - g4 sha-256 fingerprint: 363f3c849eab03b0a2a0f636d7b86d04d3ac7fcfe26a0a9121ab9795f6e176df bug 1618402 - verisign class 3 public primary certification authority - g3 sha-256 fingerprint: eb04cf5eb1f39afa762f2bb120f296cba520c1b97db1589565b81cb9a17b7244 a
number of certificates had their email trust bit disabled.
NSS Sample Code Sample1
as an alternative to token symmetric keys as a way to store large
numbers of symmetric keys wrapping symmetric keys using an rsa key from another server unwrapping keys using your own rsa key pair the main part of the program shows a typical sequence of events for two servers that are trying to extablish a shared key pair.
NSS Sample Code Utilities_1
s generaterandom(unsigned char *rbuf, int rsize) { char meter[] = { "\r| |" }; int fd, count; int c; secstatus rv = secsuccess; cc_t orig_cc_min; cc_t orig_cc_time; tcflag_t orig_lflag; struct termios tio; fprintf(stderr, "to generate random
numbers, " "continue typing until the progress meter is full:\n\n"); fprintf(stderr, "%s", meter); fprintf(stderr, "\r|"); /* turn off echo on stdin & return on 1 char instead of nl */ fd = fileno(stdin); tcgetattr(fd, &tio); orig_lflag = tio.c_lflag; orig_cc_min = tio.c_cc[vmin]; orig_cc_time = tio.c_cc[vtime]; tio.c_lflag &= ~echo; tio.c_lflag &= ~...
nss tech note2
the
number of calls to each pkcs #11 function will be counted, and the time spent in each function as well.
NSS Tools certutil-tasks
(bugfix) certificate entries require a serial
number; one should be generated automatically if not provided.
NSS Tools modutil-tasks
nss security tools: modutil tasks newsgroup: mozilla.dev.tech.crypto task list the jar installation script is very fragile with respect to platform definitions (especially version
numbers).
Tutorial: Embedding Rhino
evaluation of the script looks up variables in scope, and errors will be reported with the filename <cmd> and line
number 1.
Rhino history
since its release to open source, rhino has found a variety of uses and an increasing
number of people have contributed to the code.
New in Rhino 1.7R4
update license to mpl 2.0 make string concatenation with + fast java class generation updates and fixes faster
number to string conversion several regexp fixes regexp performance improvements es5 compliance fixes improved interpreter performance improved commonjs module implementation javascript 1.8 generator expressions many parser and ast fixes use javascript 1.7 as default version in rhino shell javaadapter improvements fixes in js to java access include mozilla test suite a list of bugs that were fixed since the previous release.
Rhino overview
array constructor array(i) for a
number argument i constructs an array with a single element equal to i for version 1.2 only.
Rhino scopes and contexts
note that currently in order to use java classes (liveconnect) from a sealed shared scope you need to pre-load a
number of objects needed for liveconnect into the scope before it gets sealed.
SpiderMonkey compartments
such cross-origin objects are used together very infrequently, which reduces the
number of cache hits we get.
Garbage collection
the chunkinfo also contains some basic stats, such as the
number of free arenas.
Invariants
a general rule about the state of all threads at a given time: either exactly one thread is "in gc" and no threads are in requests; or no thread is doing gc, in which case any
number of threads may be in requests; or the gc lock is held.
Property cache
furthermore, y at t1 has the same
number of fixed slots that x had at t0, and either both have a slot array or neither does.
JIT Optimization Outcomes
the native callee function was called with an unsupported
number of arguments, or calling non-constructing functions with new.
INT_FITS_IN_JSVAL
in this case, the application can still convert i to a jsval using js_new
numbervalue.
INT_TO_JSVAL
to convert any
number to a jsval, regardless of whether it fits in an int jsval, use js_new
numbervalue instead.
JS::GetFirstArgumentAsTypeHint
if args.get(0) is one of the strings "string", "
number", or "default", set *result to jstype_string, jstype_
number, or jstype_void accordingly and return true.
JS::Int32Value
see also mxr id search for js::int32value js::value js::float32value js::doublevalue js::
numbervalue js_
numbervalue ...
JS::ToPrimitive
hint must be jstype_string or jstype_
number to pass the corresponding type as a hint, or jstype_void to pass no hint.
JSClass
it implements the object's [[defaultvalue]] hook, which is invoked by javascript when the object must be converted to a string,
number, or primitive value.
JSFastNative
argc unsigned int the
number of arguments supplied to the function by the caller (as opposed to, say, the
number of arguments the function is specified to take in its jsfunctionspec).
JSFunctionSpec
flags uint16_t the bitwise or of any
number of function flags.
JSGetObjectOps
in contrast, all native and host objects have a jsobjectmap at obj->map, which may be shared among a
number of objects, and which contains the jsobjectops *ops pointer used to dispatch object operations from api calls.
JSNative
argc unsigned the
number of arguments supplied to the function by the caller (as opposed to, say, the
number of arguments the function is specified to take in its jsfunctionspec).
JSObjectOps.newObjectMap
after a successful construction, some
number of js_holdobjectmap and js_dropobjectmap calls ensue.
JSProtoKey
nction function mxr search for jsproto_function jsproto_array array mxr search for jsproto_array jsproto_boolean boolean mxr search for jsproto_boolean jsproto_json json mxr search for jsproto_json jsproto_date date mxr search for jsproto_date jsproto_math math mxr search for jsproto_math jsproto_
number number mxr search for jsproto_
number jsproto_string string mxr search for jsproto_string jsproto_regexp regexp mxr search for jsproto_regexp jsproto_error error mxr search for jsproto_error jsproto_internalerror internalerror mxr search for jsproto_internalerror jsproto_evalerror evalerror mxr search for ...
JSRuntime
once created, a context can be used any
number of times for different scripts or jsapi queries.
JSVAL_IS_OBJECT
if v is a string,
number, boolean, or undefined, the result is false.
JSVAL_IS_PRIMITIVE
syntax jsval_is_primitive(v) description jsval_is_primitive(v) is true if v is undefined, null, a boolean, a
number, or a string.
JS_HasArrayLength
this function differs from js_getarraylength in the treatment of errors and unusual cases, like when an object's length is negative or not a
number.
JS_HasElement
description js_haselement examines a specified js object, obj, and its prototype chain, for an element or numeric property
numbered index.
JS_InitClass
nargs unsigned
number of arguments for the constructor.
JS_InitStandardClasses
these include all the standard ecmascript global properties defined in ecma 262-3 §15.1: array, boolean, date, decodeuri, decodeuricomponent, encodeuri, encodeuricomponent, error, eval, evalerror, function, infinity, isnan, isfinite, math, nan,
number, object, parseint, parsefloat, rangeerror, referenceerror, regexp, string, syntaxerror, typeerror, undefined, and urierror as well as a few spidermonkey-specific globals, depending on compile-time options: escape, unescape, uneval, internalerror, script, xml, namespace, qname, file, generator, iterator, and stopiteration, as of spidermonkey 1.7.
JS_LookupElement
description js_lookupelement examines a specified javascript object, obj, for a numeric property
numbered index.
JS_LooselyEqual
comparing jsvals directly in c++, as in v1 == v2, does not produce a meaningful result, since it is possible for two distinct jsstrings or jsdoubles to represent the same string or
number.
JS_New
added in spidermonkey 38 argc unsigned the
number of arguments to pass to the constructor.
JS_PSGS
flags uint16 the bitwise or of any
number of property attributes.
JS_ParseJSON
various json extensions like trailing commas, unquoted property names, more generous
number parsing, and so on are not supported.
JS_ReportError
for internationalization, use js_reporterror
number instead.
JS_SetDefaultLocale
description js_setdefaultlocale sets the default locale for the ecmascript internationalization api (intl.collator, intl.
numberformat, intl.datetimeformat).
JS_SetScriptStackQuota
description set the quota on the
number of bytes that stack-like data structures can use when the runtime compiles and executes scripts.
JS_StrictlyEqual
comparing jsvals directly in c++, as in v1 == v2, does not produce a meaningful result, since it is possible for two distinct jsstrings or jsdoubles to represent the same string or
number.
JS_SuspendRequest
the return value is the
number of nested requests that were suspended.
JS_ValueToFunction
if v is null, undefined, a boolean, a
number, or a string, a typeerror is reported and js_valuetofunction returns null.
JS_ValueToObject
if v is a boolean value, a
number, or a string, the result is a new wrapper object of type boolean,
number, or string.
SpiderMonkey 1.8
in javascript 1.7 and earlier, x = [].length = "7"; would store the
number 7 in x.
SpiderMonkey 31
obsolete apis js_convertarguments "j" type deleted apis js_newgrowablestring (can be replaced with js_newucstring) js_isconstructing (can be replaced with callargs::isconstructing or callreceiver::isconstructing) js_valuetoboolean (replaced by js::toboolean) js_valueto
number (can be replaced with js::to
number) js_valuetoint64 (replaced by js::toint64) js_valuetouint64 (replaced by js::touint64) js_valuetoecmauint32 (replaced by js::touint32) js_valuetoecmaint32 (replaced by js::toint32) js_valuetoint32 (can be replaced with js::toint32, which has a different behavior!) js_valuetouint16 (replaced by js::touint16) js_valuetostring (replaced by js::tostring) js_...
SpiderMonkey 38
39) js::removestringrootrt (bug 1107639) js::removevalueroot (bug 1107639) js::removevaluerootrt (bug 1107639) jsclass_new_enumerate (bug 1097267) jsclass_new_resolve (bug 993026) jsid_is_object (bug 915482) jsnewresolveop (bug 993026) jsval_is_boolean (bug 952650) jsval_is_double (bug 952650) jsval_is_gcthing (bug 952650) jsval_is_int (bug 952650) jsval_is_null (bug 952650) jsval_is_
number (bug 952650) jsval_is_primitive (bug 952650) jsval_is_string (bug 952650) jsval_is_void (bug 952650) jsval_to_boolean (bug 952650) jsval_to_double (bug 952650) jsval_to_gcthing (bug 952650) jsval_to_int (bug 952650) jsval_to_object (bug 952650) jsval_to_private (bug 952650) jsval_to_string (bug 952650) js_clearnonglobalobject (bug 1043281) js_clonefunctionobject (bug 1089026) js_comp...
compare-locales
this
number won't reach 100% in general, mid 80s should be the target, though.
Exploitable crashes
the last
number, in this case 0x00000000, is the memory address firefox was prevented from accessing.
Secure Development Guidelines
pl_strncat this function is confusing because the size argument is the maximum
number of bytes being appended, not the size of the buffer.
AT APIs Support
accessible web standards gecko exposes the
number of xml languages including html to at.
Mork
the keys are hexadecimal
numbers starting at 0x80, because the values less than 0x80 are theoretically their representative ascii values.
Manipulating bookmarks using Places
manipulating existing items there are a
number of convenient methods you can use to make changes to existing bookmarks and bookmark folders.
Places Developer Guide
however, firefox developers can take advantage of several helper apis that are browser-specific: fuel - a collection of wrapper apis for easing access to a
number of firefox utilities and services nsiplacestransactionsservice - a firefox service for modifying bookmarks in a transactional manner, providing facilities for undo/redo places utilities for javascript - accessors and helper functions for firefox and extensions creating bookmarks, folders and other items creating a bookmark // create an nsiuri for the url to be bookmarked.
Places utilities for JavaScript
for instance, normally in order to get access to the bookmarks service, you have to run something like: components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); with places utils all you need to write is: placesutils.bookmarks this should save on the
number of references to the service that are needed, and can help clean up interfaces that are already fairly cluttered.
The Publicity Stream API
count the maximum
number of events to return, with preference given to more recent events [make this preference its own parameter?].
extIApplication
version readonly attribute astring the version
number of the application.
extIExtension
version readonly attribute astring the version
number of the extension.
extIPreferenceBranch
an integer preference appears as a javascript
number, and a boolean appears as a javascript boolean.
Accessing the Windows Registry Using XPCOM
key_local_machine, "software\\microsoft", wrk.access_read); if (wrk.haschild("windows")) { var subkey = wrk.openchild("windows\\currentversion", wrk.access_read); var id; if (subkey.hasvalue("productid")) id = subkey.readstringvalue("productid"); subkey.close(); } wrk.close(); enumerating registry keys and values in some situations, you may want to enumerate a
number of keys or values whose names you do not know.
Generating GUIDs
there are a
number of tools that can be used to generate a guid in the canonical form.
Generic factory
background (this is based on my original news posting <beard-2402991733140001@h-198-93-95-151.mcom.com>.) we seem to be creating a huge
number of different factory implementations.
XPCOM array guide
this lets you delete multiple objects from the array at once by specifying the index to the first item to delete as well as the
number of items to delete.
XPCOM changes in Gecko 2.0
xpcom service getters a
number of commonly used xpcom services now have service getter functions available in the mozilla::services namespace; these make it much easier to get access to these services from c++ code.
Component Internals
this point of entry may fan out to any
number of factories, and from there, to any
number of xpcom objects.
Preface
each one of these steps has its own chapter, in which a
number of topics associated with the step are discussed.
Making cross-thread calls using runnables
for example, let's say we have a function, calculatepi(int digits), which will calculate π to an arbitrary
number of digits: void calculatepi(int digits, nscstring& result); // this is synchronous this can take a while, so we don't want to run this on the main thread.
XPCOM Stream Guide
from the nsistreamlistener interface, the .ondataavailable(request, context, inputstream, offset, count) method gives you the input stream and the
number of bytes available.
XPCOM guide
this document attempts to help them do so, first by explaining the underlying concepts, and second by describing a
number of common javascript patterns that cause leaks.creating xpcom componentsthis guide is about gecko, and about creating xpcom components for gecko-based applications.how to build an xpcom component in javascriptif you are looking for add-on sdk solution for xpcom javascript components then check out platform/xpcom module first.inheriting from implementation classesgiven that idl interfaces map to a...
Components.Constructor
the arguments used with the initialization method are the arguments passed to the components.constructor()-created function when called: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1", "nsibinaryinputstream", "setinputstream"); try { // throws, because
number of arguments isn't equal to the
number of // arguments nsibinaryinputstream.setinputstream takes var bis = new binaryinputstream(); } catch (e) { // someinputstream is an existing nsiinputstream bis = new binaryinputstream(someinputstream); // succeeds var bytes = bis.readbytearray(some
numberofbytes); // succeeds } compare instance creation from base principles with instance creation ...
Components.utils.evalInSandbox
onsole.log(result); // 17 console.log(mysandbox.x); // 7 operations on objects you insert into this sandbox global scope do not carry privileges into the sandbox: mysandbox.foo = components; // this will give a "permission denied" error components.utils.evalinsandbox("foo.classes", mysandbox); optional arguments you can optionally specify the js version, filename, and line
number of the code being evaluated.
nsIRegistry
try { st.first(); do { var data = st.currentitem(); if( data instanceof ci.nsiregistrynode ) print("nsiregistrynode: " + data.nameutf8 + " (" + data.key + ")"); st.next(); } while( components.lastresult == 0 ); } catch(e) {} now, the output is something like: profiles (344) profiles/default (530) profiles/foo (1046) profiles/bar (1518) the
number inside the parenthesis is the "key." you can use this key with the rest of the nsiregistry api (see mxr).
Profiling XPCShell
the line consists of: the compile count of the function; the call count of the function; the functions name; the starting line
number; the ending line
number; the function's size; the amount of time (in milliseconds) the fastest call took; the time of the slowest call; the average time spend; the total time; the time spend in the function itself is given (that is the total time excluding the time spend in functions called from this function).
nsDirectoryService
->getservicebycontractid("@mozilla.org/file/directory_service;1", ns_get_iid(nsiproperties), getter_addrefs(directory)); if (ns_failed(rv)) return rv; rv = directory->get(ns_os_temp_dir, ns_get_iid(nsifile), aresult); return rv; } note that ns_os_temp_dir is defined in nsdirectoryservicedefs.h along with a
number of other directory service keys.
Standard XPCOM components
there are a
number of components provided in the standard implementation of xpcom; these are as follows.
NS_InitXPCOM3
astaticmodulecount [in] the
number of elements in astaticmodules.
Core XPCOM functions
xpcom provides a
number of global functions which are used to initialize and shut down the xpcom library, as well as to allocate memory, get access to services, and to instantiate interfaces.
Folders
folders have a
number of interesting attributes: parent subfolder server uri flags and methods getdatabase ( how to get a database of the messages in the folder.) updatefolder (gets new messages for that folder, if applicable, e.g., pop3 inboxes, imap folders, news folders, rss folders) ...
mozIStorageBindingParamsArray
method overview void addparams(in mozistoragebindingparams aparameters); mozistoragebindingparams newbindingparams(); attributes attribute type description length unsigned long the
number of mozistoragebindingparams objects in the array.
mozIStorageRow
nsivariant getresultbyindex( in unsigned long aindex ); parameters aindex the zero-based index of the column
number whose value is to be returned.
mozIStorageValueArray
ndex); autf8string getutf8string(in unsigned long aindex); astring getstring(in unsigned long aindex); void getblob(in unsigned long aindex, out unsigned long adatasize, [array,size_is(adatasize)] out octet adata); boolean getisnull(in unsigned long aindex); attributes attribute type description numentries unsigned long the
number of entries in the array.
mozITXTToHTMLConv
return value the cite level of the quote; that is, the
number of text quote characters found at the beginning of the string.
nsIAbCard
pe description firstname astring lastname astring phoneticfirstname astring phoneticlastname astring displayname astring nickname astring primaryemail astring secondemail astring workphone astring homephone astring fax
number astring pager
number astring cellular
number astring workphonetype astring homephonetype astring fax
numbertype astring pager
numbertype astring cellular
numbertype astring homeaddress astring homeaddress2 astring homecity astring ...
nsIAccessNode
obsolete since gecko 2.0 numchildren long the
number of dom children for the dom node, which matches the
number of nsiaccessnode children for this nsiaccessnode.
ChildCount
« nsiaccessible page summary
number of accessible children.
DoAction
action
number 0 is the default action.
NumActions
« nsiaccessible page summary the
number of accessible actions associated with this accessible.
RelationsCount
« nsiaccessible page summary returns the
number of accessible relations for this object.
Value
« nsiaccessible page summary accessible value -- a
number or a secondary text equivalent for this node.
nsIAccessibleHyperLink
s last changed in gecko 1.9 (firefox 3) method overview nsiaccessible getanchor(in long index); note: renamed from getobject in gecko 1.9 nsiuri geturi(in long index); boolean isselected(); obsolete since gecko 1.9 boolean isvalid(); obsolete since gecko 1.9 attributes attribute type description anchorcount long the
number of anchors within this hyperlink.
nsIAccessibleHyperText
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview nsiaccessiblehyperlink getlink(in long linkindex); long getlinkindex(in long charindex); long getselectedlinkindex(); obsolete since gecko 1.9 attributes attribute type description linkcount long the
number of links contained within this hypertext object.
nsIAccessibleSelectable
om: nsisupports last changed in gecko 1.7 method overview void addchildtoselection(in long index); void clearselection(); nsiarray getselectedchildren(); boolean ischildselected(in long index); nsiaccessible refselection(in long index); void removechildfromselection(in long index); boolean selectallselection(); attributes attribute type description selectioncount long the
number of accessible children currently selected.
nsIAccessibleTableChangeEvent
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) attributes attribute type description numrowsorcols long return the
number of rows or cols.
nsIAppStartup
this can be used, for example, when doing performance testing of the startup process to discount
numbers for tests that were interrupted by a user prompt.
nsIAuthModule
aouttokenlength if getnexttoken succeeds, then aouttokenlength contains the length of the buffer (
number of bytes) pointed to by aouttoken.
nsIBlocklistPrompt
: name - the plugin or extension name version - the version of the extension or plugin icon - the plugin or extension icon disable - can be used by the nsiblocklistprompt to allows users to decide whether a soft-blocked add-on should be disabled blocked - true if the item is hard-blocked, false otherwise item - the nsiplugintag or addon object acount optional the
number of addons.
nsICacheEntryInfo
fetchcount long get the
number of times the cache entry has been opened.
nsICommandLine
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.
nsICommandLineRunner
void init( in long argc, in nscharptrarray argv, in nsifile workingdir, in unsigned long state ); parameters argc the
number of arguments being passed.
nsIContentPrefCallback2
void handleerror( in nsresult error ); parameters error a
number in components.results describing the error.
nsIContentViewManager
alength optional if specified, on return this parameter indicates the
number of nsicontentview objects returned in the aresult array.
nsICryptoHash
also note that when you call the updatefromstream() method, the second parameter is the
number of bytes to read.
nsIDNSRecord
prnetaddr getnextaddr( in pruint16 aport ); parameters aport a port
number to initialize the prnetaddr with.
nsIDOMFontFaceList
1.0 66 introduced gecko 7.0 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) method overview nsidomfontface item(in unsigned long index); attributes attribute type description length unsigned long the
number of items in the list.
nsIDOMGeoGeolocation
return value an id
number that can be used to reference the watcher in the future when calling clearwatch().
nsIDOMMozTouchEvent
this is a random
number that is guaranteed to remain the same for each finger during all moztouchmove events between the corresponding moztouchdown and moztouchup events.
nsIDOMStorage
method overview void clear(); domstring getitem(in domstring key); domstring key(in unsigned long index); void removeitem(in domstring key); void setitem(in domstring key, in domstring data); attributes attribute type description length unsigned long the
number of keys stored in the session store.
nsIDOMStorage2
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void clear(); domstring getitem(in domstring key); domstring key(in unsigned long index); void removeitem(in domstring key); void setitem(in domstring key, in domstring data); attributes attribute type description length unsigned long the
number of keys stored in local storage.
nsIDebug2
xpcom/base/nsidebug2.idlscriptable adds access to additional information in debug builds of mozilla code by expanding upon the features in nsidebug 1.0 66 introduced gecko 1.9.2 inherits from: nsidebug last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) attributes attribute type description assertioncount long the
number of assertions since process start.
nsIDownload
attributes attribute type description amounttransferred long long the
number of bytes downloaded so far.
nsIDownloadManager
e); void removelistener(in nsidownloadprogresslistener alistener); void resumedownload(in unsigned long aid); void retrydownload(in unsigned long aid); void savestate(); obsolete since gecko 1.8 void startbatchupdate(); obsolete since gecko 1.9.1 attributes attribute type description activedownloadcount long the
number of files currently being downloaded.
nsIDragSession
(see nsidragservice) numdropitems unsigned long get the
number of items that were dropped.
nsIDynamicContainer
a service with large
numbers of dynamically populated items might use this to do some cleanup so those items don't hang around.
nsIEditorSpellCheck
count on return, contains the
number of entries in the dictionarylist array.
nsIFeed
enclosurecount long indicates the
number of enclosures associated with a feed.
nsIFrameLoader
aclickcount the
number of clicks comprising the mouse button event, if any.
nsIHttpChannel
redirectionlimit unsigned long this attribute specifies the
number of redirects this channel is allowed to make.
nsIIOService
methods allowport() checks if a port
number is banned.
nsIIdleService
example example 1 var idleservice = components.classes["@mozilla.org/widget/idleservice;1"] .getservice(components.interfaces.nsiidleservice) settimeout(function() { alert(idleservice.idletime) }, 1000) // if you don't use the mouse or the keyboard after running this snippet, // you'll see a
number around 1000 alerted.
nsIJetpack
individual lines of the form //@line 1 "foo.js" can be used to specify filename and line
number information for debugging purposes.
nsILoadGroup
each time a
number of requests are added to a group, the defaultloadrequest may be set to indicate that all of the requests are related to a base request.
nsILocalFile
void reveal(); void setrelativedescriptor(in nsilocalfile fromfile, in acstring relativedesc); attributes attribute type description diskspaceavailable print64 the
number of bytes available to non-superuser on the disk volume containing the nsilocalfile.
nsILocale
intl/locale/idl/nsilocale.idlscriptable represents one locale, which can be used for things like sorting text strings and formatting
numbers, dates and times.
nsILoginMetaInfo
timesused unsigned long the
number of times the login was submitted in a form or used to begin an http auth session.
nsIMacDockSupport
this can be used, for example, to display the
number of unread messages in an email client.
nsIMsgCustomColumnHandler
getsortlongforrow() if the column displays a
number, this will return the
number that the column should be sorted by.
nsIMsgDBViewCommandUpdater
viewcommandupdater (for the standalone message window) nsmsgdbviewcommandupdater (for the threadpane message window) nsmsgsearchcommandupdater (for search dialogs) method overview void updatecommandstatus(); void displaymessagechanged(in nsimsgfolder afolder, in astring asubject, in acstring akeywords); void updatenextmessageafterdelete(); methods updatecommandstatus() called when the
number of selected items changes.
nsIMsgProtocolInfo
return value the default port
number for connections of this account type.
nsIScreenManager
nsiscreen screenforrect( in long left, in long top, in long width, in long height ); attributes attribute type description
numberofscreens unsigned long the
number of screens on the user's computer.
nsISelection
rangecount long returns the
number of ranges in the selection.
nsISelection2
resultcount returns the
number of ranges that overlap (or touch) the input range.
nsISelectionPrivate
resultcount returns the
number of ranges that overlap (or touch) the input range.
nsIStackFrame
line
number print32 valid line
numbers begin at '1'.
nsITaggingService
length optional on return, contains the
number of tags returned in atags.
nsITaskbarWindowPreview
constants constant value description num_toolbar_buttons 7 the maximum
number of toolbar buttons supported by the windows taskbar api.
nsIToolkitProfileService
thod overview nsitoolkitprofile createprofile(in nsilocalfile arootdir, in autf8string aname); void flush(); nsitoolkitprofile getprofilebyname(in autf8string aname); nsiprofilelock lockprofilepath(in nsilocalfile adirectory, in nsilocalfile atempdirectory); attributes attribute type description profilecount unsigned long the
number of user profiles currently in existence.
nsITransferable
contains
numbers identifying where in the context the fragment came from.
nsITreeColumns
index); nsitreecolumn getcolumnfor(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.
nsITreeView
ng row); void selectionchanged(); void setcelltext(in long row, in nsitreecolumn col, in astring value); void setcellvalue(in long row, in nsitreecolumn col, in astring value); void settree(in nsitreeboxobject tree); void toggleopenstate(in long index); attributes attribute type description rowcount long the total
number of rows in the tree (including the offscreen rows).
nsIURI
i) { var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); return ioservice.newuri(aurl, aorigincharset, abaseuri); } components of a uri prepath path scheme userpass host port ref ftp :// username@password @ hostname : port
number /pathname?query=value #ref method overview nsiuri clone(); nsiuri cloneignoringref(); boolean equals(in nsiuri other); boolean equalsexceptref(in nsiuri other); autf8string resolve(in autf8string relativepath); boolean schemeis(in string scheme); attributes attribute type description asciihost ...
nsIUpdateManager
updatecount long the
number of updates in the history list; the updates can be fetched by calling getupdateat().
nsIWebBrowserPersist
as of firefox 36, a new parameter areferrerpolicy was added as the fourth argument, changing the
number of parameters from 7 to 8 and shifting the order of the parameters in a backwards incompatible way.
nsIWindowsShellService
a rgb value, where (r << 24 | g << 16 | b) obsolete since gecko 1.8 unreadmailcount unsigned long the
number of unread mail messages for the current user.
NS_CStringGetData
example code // count the
number of times a particular character appears in a string.
nsIAbCard/Thunderbird3
same as home, but with `work' instead of `home' other contact: fax
number, fax
numbertype pager
number, pager
numbertype cellular
number, cellular
numbertype jobtitle, department, company _aimscreenname dates: anniversaryyear, anniversarymonth, anniversaryday birthyear, birthmonth, birthday webpage1 (work), webpage2 (home) custom1, custom2, custom3, custom4 notes integral properties: lastmodifieddate popularityindex preferm...
Warnings
sort operations this warning message will say something about the
number of sort operations that have occurred for a sql statement.
Getting Started Guide
that is, the interface keeps a count of the
number of clients holding references to it.
Using the clipboard
the clipboard mozilla provides a
number of interfaces for accessing the clipboard.
Working with Multiple Versions of Interfaces
unfortunately we compiled this in the latest sdk, and so this magic
number happens to be: "244e4c67-a1d3-44f2-9cab-cdaa31b68046" whereas, inside firefox 2, the iid it happens to know about is: "663ca4a8-d219-4000-925d-d8f66406b626".
pyxpidl
xpidl option description pyxpidl equivalent -a emit annotations to typelib n/a (feature removed) -w turn on warnings n/a (this is now the default and can't be turned off) -v verbose mode (nyi) n/a (feature removed) -t creates a typelib of a specific version
number n/a (feature removed, and probably never actually worked) -i add an entry to start of include path for #include "nsifoo.idl" -i (unchanged) -o specify the base name for output (-o /tmp/nsifoo for example) -o outputfile (this isn't just the base name, but needs to include the extension; for example -o /tmp/nsifoo.idl) -e specify an explicit output file ...
xpidl
for testing purposes, or one-off interface compilation, xpidl can be run from the command line: usage: ./xpidl -m mode [-w] [-v] [-t version
number] [-d filename.pp] [-i path] [-o basename | -e filename.ext] filename.idl -a emit annotations to typelib -w turn on warnings (recommended) -v verbose mode (nyi) -t create a typelib of a specific version
number -i add entry to start of include path for ``#include "nsithing.idl" -o use basename (e.g.
XUL Overlays
any
number of overlays can be loaded into a master document, and an overlay can also load other overlays.
The Valgrind Test Job
for example, we have a small
number of deliberate but inconsequential memory leaks in the codebase that have corresponding suppressions.
Creating a gloda message query
the max
number of messages which are returned is governed by a preference: "mailnews.database.global.search.msg.limit" although you can deal with the messages as they show up via the listener, the list of messages in the collection is available in collection.items.
Filelink Providers
other services may require the user to fill in a server string or port
number.
Mail composition back end
ns_imethod onstopsending( nsresult astatus, - the resulting status for the send operation const prunichar *amsg, - a status message pruint32 atotaltried, - the total messages that were attempted pruint32 asuccessful) = 0; - the
number of successful messages quoting quoting a mail message is made possible via the nsimsgquote interface.
DOM allocation example - Firefox Developer Tools
it just contains a script that creates a large
number of dom nodes: var toolbarbuttoncount = 20; var toolbarcount = 200; function getrandomint(min, max) { return math.floor(math.random() * (max - min + 1)) + min; } function createtoolbarbutton() { var toolbarbutton = document.createelement("span"); toolbarbutton.classlist.add("toolbarbutton"); // stop spidermonkey from sharing instances toolbarbutton[getrandomint(0,5000)] = "foo"; return toolbarbutton; } function createtoolbar() { var toolbar = document.createelement("div"); // stop spidermonkey from sharing insta...
Dominators view - Firefox Developer Tools
now the node's name will contain the name of the function that allocated it, and the file, line
number and character position of the exact spot where the function allocated it.
Memory - Firefox Developer Tools
it then provides a
number of views of the heap that can show you which objects account for memory usage and exactly where in your code you are allocating memory.
Throttling - Firefox Developer Tools
the characteristics emulated are: download speed upload speed minimum latency the table below lists the
numbers associated with each network type, but please do not rely on this feature for exact performance measurements; it's intended to give an approximate idea of the user experience in different conditions.
Examine Event Listeners - Firefox Developer Tools
click the icon, then you'll see a popup listing all the event listeners bound to this element: each line contains: a right-pointing arrowhead; click to expand the row and show the listener function source code a curved arrow pointing to a stack; click it to show the code for the handler in the debugger the name of the event for which a handler was attached to this element the name and line
number for the listener; you can also click here to expand the row and view the listener function source code a label indicating whether the event bubbles a label indicating the system that defines the event.
UI Tour - Firefox Developer Tools
statistically, the
number of samples taken in which we were executing a particular function corresponds to the amount of time the browser is spending executing it, so you can identify bottlenecks in your code.
Waterfall - Firefox Developer Tools
for example, suppose we adapt the code above to make a timestamp every 10 iterations of the loop, labeled with the iteration
number: var iterations = 70; var multiplier = 1000000000; function calculateprimes() { console.time("calculating..."); var primes = []; for (var i = 0; i < iterations; i++) { if (i % 10 == 0) { console.timestamp(i.tostring()); } var candidate = i * (multiplier * math.random()); var isprime = true; for (var c = 2; c <= math.sqrt(candidate); ++c) { if (candidate ...
Debugging Firefox Desktop - Firefox Developer Tools
to use a different port, pass the desired port
number: /path/to/firefox --start-debugger-server 1234 note: in windows, the start-debugger-server call will only have one dash: firefox.exe -start-debugger-server 1234 note: by default, and for security reasons, the devtools.debugger.force-local option is set.
Animation.playbackRate - Web APIs
syntax var currentplaybackrate = animation.playbackrate; animation.playbackrate = newrate; value takes a
number that can be 0, negative, or positive.
Animation.startTime - Web APIs
syntax var animationstartedwhen = animation.starttime; animation.starttime = newstarttime; value a floating-point
number representing the current time in milliseconds, or null if no time is set.
Animation.updatePlaybackRate() - Web APIs
this may be a positive
number (to speed up or slow down the animation), a negative
number (to make it play backwards), or zero (to effectively pause the animation).
Animation - Web APIs
automatically removing filling animations it is possible to trigger a large
number of animations on the same element.
AnimationTimeline.currentTime - Web APIs
syntax var currenttime = animationtimeline.currenttime; value a
number representing the timeline's current time in milliseconds, or null if the timeline is inactive.
Attr - Web APIs
="75" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">attr</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} warning: starting in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4), a
number of deprecated properties and methods output warning messages to the console.
AudioBufferSourceNode.loopStart - Web APIs
syntax audiobuffersourcenode.loopstart = startoffsetinseconds; startoffsetinseconds = audiobuffersourcenode.loopstart; value a floating-point
number indicating the offset, in seconds, into the audio buffer at which each loop should begin during playback.
AudioBufferSourceNode.start() - Web APIs
offset optional an offset, specified as the
number of seconds in the same time coordinate system as the audiocontext, to the time within the audio buffer that playback should begin.
AudioContext() - Web APIs
in particular, the specification doesn't indicate a maximum or minimum
number of audio contexts that must be able to be open at the same time, so this is left up to the browser implementations to decide.
AudioContext.baseLatency - Web APIs
the baselatency read-only property of the audiocontext interface returns a double that represents the
number of seconds of processing latency incurred by the audiocontext passing an audio buffer from the audiodestinationnode — i.e.
AudioContext - Web APIs
audiocontext.baselatency read only returns the
number of seconds of processing latency incurred by the audiocontext passing the audio from the audiodestinationnode to the audio subsystem.
AudioContextLatencyCategory - Web APIs
the audiocontextlatencycategory type is an enumerated set of strings which are used to select one of a
number of default values for acceptable maximum latency of an audio context.
AudioContextOptions - Web APIs
constants standard values for latencyhint the latencyhint property can be
number specifying a preferred maximum latency in seconds or a string from the audiocontextlatencycategory enumerated string, which selects a standard value for a given type of audio usage: value description "balanced" the user agent should balance audio output latency and power consumption when selecting a latency value.
AudioListener - Web APIs
these features had a
number of problems: only audiobuffersourcenodes were pitched up or down, not other source nodes.
AudioParam.maxValue - Web APIs
syntax var maxval = audioparam.maxvalue; value a floating-point
number indicating the maximum value permitted for the parameter's nominal range.
AudioParam.minValue - Web APIs
syntax var minval = audioparam.minvalue; value a floating-point
number indicating the minimum value permitted for the parameter's nominal range.
AudioParam.setValueAtTime() - Web APIs
syntax var audioparam = audioparam.setvalueattime(value, starttime) parameters value a floating point
number representing the value the audioparam will change to at the given time.
AudioParam - Web APIs
audioparam.setvaluecurveattime() schedules the values of the audioparam to follow a set of values, defined by an array of floating-point
numbers scaled to fit into the given interval, starting at a given start time and spanning a given duration of time.
AuthenticatorAssertionResponse.authenticatorData - Web APIs
this is a sequence of bytes with the following format: aaguid (16 bytes) - authenticator attestation globally unique identifier, a unique
number that identifies the model of the authenticator (not the specific instance of the authenticator) so that a relying party can understand the characteristics of the authenticator by looking up its metadata statement.
AuthenticatorAssertionResponse.userHandle - Web APIs
username, e-mail, phone
number, etc.) examples var options = { challenge: new uint8array(26), // will be another value, provided by the relying party server timeout: 60000 }; navigator.credentials.get({ publickey: options }) .then(function (assertionpkcred) { var userhandle = assertionpkcred.response.userhandle; // send response and client extensions to the server so that it can // go on with the authent...
BaseAudioContext.createChannelMerger() - Web APIs
syntax baseaudiocontext.createchannelmerger(
numberofinputs); parameters
numberofinputs the
number of channels in the input audio streams, which the output stream will contain; the default is 6 if this parameter is not specified.
BaseAudioContext.createChannelSplitter() - Web APIs
syntax baseaudiocontext.createchannelsplitter(
numberofoutputs); parameters
numberofoutputs the
number of channels in the input audio stream that you want to output separately; the default is 6 if this parameter is not specified.
BaseAudioContext.createDynamicsCompressor() - Web APIs
it is especially important in games and musical applications where large
numbers of individual sounds are played simultaneously, where you want to control the overall signal level and help avoid clipping (distorting) of the audio output.
BasicCardResponse.billingAddress - Web APIs
this has to conform to the structure defined by the basiccardresponse dictionary, and may look something like this: { "card
number' : '9999999999999999", "cardholdername' : 'mr.
BatteryManager.level - Web APIs
syntax var level = battery.level on return, level is a
number representing the system's battery charge level scaled to a value between 0.0 and 1.0.
BiquadFilterNode - Web APIs
number of inputs 1
number of outputs 1 channel count mode "max" channel count 2 (not used in the default count mode) channel interpretation "speakers" constructor biquadfilternode() creates a new instance of a biquadfilternode object.
Blob.size - Web APIs
syntax var sizeinbytes = blob.size value the
number of bytes of data contained within the blob (or blob-based object, such as a file).
Blob.type - Web APIs
example this example asks the user to select a
number of files, then checks each file to make sure it's one of a given set of image file types.
Blob - Web APIs
having converted the data into an object url, it can be used in a
number of ways, including as the value of the <img> element's src attribute (assuming the data contains an image, of course).
Body.json() - Web APIs
this object could be anything that can be represented by json — an object, an array, a string, a
number...
CSS - Web APIs
css factory functions can be used to return a new cssunitvalue with a value of the parameter
number of the units of the name of the factory function method used.
CSSKeyframesRule - Web APIs
the parameter is the index of the keyframe to be deleted, expressed as a domstring resolving as a
number between 0% and 100%.
CSSMathValue - Web APIs
.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[1].value ); // -20 the cssmathvalue.operator returns 'sum' because stylemap.get('width').values[1].value ); is -20: adding a negative
number.
ConstantSourceNode - Web APIs
number of inputs 0
number of outputs 1 constructor constantsourcenode() creates and returns a new constantsourcenode instance, optionally specifying an object which establishes initial values for the object's properties.
Constraint validation API - Web APIs
extensions to other interfaces the constraint validation api extends the interfaces for the form-associated elements listed below with a
number of new properties and methods (elements that can have a form attribute that indicates their form owner): htmlbuttonelement htmlfieldsetelement htmlinputelement htmlobjectelement htmloutputelement htmlselectelement htmltextareaelement properties validity a read-only property that returns a validitystate object, whose properties represent validation errors for the value of that eleme...
ConvolverNode() - Web APIs
exceptions exception explanation notsupportederror the referenced audiobuffer does not have the correct
number of channels, or it has a different sample rate to the associated audiocontext.
ConvolverNode - Web APIs
number of inputs 1
number of outputs 1 channel count mode "clamped-max" channel count 1, 2, or 4 channel interpretation "speakers" constructor convolvernode() creates a new convolvernode object instance.
CountQueuingStrategy.size() - Web APIs
the size() method of the countqueuingstrategy interface always returns 1, so that the total queue size is a count of the
number of chunks in the queue.
Crypto - Web APIs
it allows access to a cryptographically strong random
number generator and to cryptographic primitives.
CustomElementRegistry.define() - Web APIs
shadow.appendchild(style); shadow.appendchild(wrapper); wrapper.appendchild(icon); wrapper.appendchild(info); } } // define the new element customelements.define('popup-info', popupinfo); <popup-info img="img/alt.png" text="your card validation code (cvc) is an extra security feature — it is the last 3 or 4
numbers on the back of your card."> note: constructors for autonomous custom elements must extend htmlelement.
DOMMatrix() - Web APIs
syntax var dommatrix = new dommatrix([init]) parameters init optional a string containing a sequence of
numbers or an array of
numbers specifying the matrix you want to create, or a css transform string.
DOMMatrix - Web APIs
dommatrix.rotateself() modifies the matrix by rotating itself around each axis by the specified
number of degrees.
DOMMatrixReadOnly() - Web APIs
syntax var dommatrixreadonly = new dommatrixreadonly([init]) parameters init optional either a string containing a sequence of
numbers or an array of integers specifying the matrix you want to create.
Binary strings - Web APIs
the reason that brought to use utf-16 code units as placeholders for uint8
numbers is that as web applications become more and more powerful (adding features such as audio and video manipulation, access to raw data using websockets, and so forth) it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data.
DOMTimeStamp - Web APIs
the domtimestamp type represents an absolute or relative
number of milliseconds, depending on the specification in which it appears.
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.
DOMTokenList - Web APIs
properties domtokenlist.length read only is an integer representing the
number of objects stored in the object.
DelayNode - Web APIs
number of inputs 1
number of outputs 1 channel count mode "max" channel count 2 (not used in the default count mode) channel interpretation "speakers" constructor delaynode() creates a new instance of an delaynode object instance.
DeviceMotionEvent - Web APIs
devicemotionevent.intervalread only a
number representing the interval of time, in milliseconds, at which data is obtained from the device.
DeviceOrientationEvent.beta - Web APIs
returns the rotation of the device around the x axis; that is, the
number of degrees, ranged between -180 and 180, by which the device is tipped forward or backward.
DeviceOrientationEvent.gamma - Web APIs
returns the rotation of the device around the y axis; that is, the
number of degrees, ranged between -90 and 90, by which the device is tilted left or right.
DeviceProximityEvent.max - Web APIs
syntax var value = instanceofdeviceproximityevent.max; value a positive
number indicating the maximum distance, in centimeters (cm), that the device's proximity sensor is able to detect and report.
DeviceProximityEvent.min - Web APIs
syntax var value = instanceofdeviceproximityevent.min; value a positive
number indicating the minimum distance, in centimeters (cm), the device's proximity sensor can report.
DeviceProximityEvent.value - Web APIs
syntax var distance = instanceofdeviceproximityevent.value; value a positive
number representing a distance in centimeters (cm) between the device's proximity sensor and the detected object.
Document: animationiteration event - Web APIs
examples this code uses animationiteration to keep track of the
number of iterations an animation has completed: let iterationcount = 0; document.addeventlistener('animationiteration', () => { iterationcount++; console.log(`animation iteration count: ${iterationcount}`); }); the same, but using the onanimationiteration event handler property: let iterationcount = 0; document.onanimationiteration = () => { iterationcount++; console.log(`animation iterati...
Document.lastModified - Web APIs
let olastmodif = new date(document.lastmodified); transforming lastmodified into milliseconds this example transforms lastmodified into the
number of milliseconds since january 1, 1970, 00:00:00, local time.
Document.querySelector() - Web APIs
note: the matching is done using depth-first pre-order traversal of the document's nodes starting with the first element in the document's markup and iterating through sequential nodes by order of the
number of child nodes.
Document.xmlVersion - Web APIs
returns the version
number as specified in the xml declaration (e.g., <?xml version="1.0"?>) or "1.0" if the declaration is absent.
DocumentTimeline.DocumentTimeline() - Web APIs
currently the only supported option is the origintime member which specifies the zero time for the documenttimeline as a real
number of milliseconds relative to the navigationstart moment of the active document for the current browsing context.
Example - Web APIs
<html> <head> <title>my document</title> <script type="text/javascript"> function change() { // document.getelementsbytagname("h1") returns a nodelist of the h1 // elements in the document, and the first is
number 0: var header = document.getelementsbytagname("h1").item(0); // the firstchild of the header is a text node: header.firstchild.data = "a dynamic document"; // now the header is "a dynamic document".
Using the W3C DOM Level 1 Core - Web APIs
the following script would do the job: html content <body> <input type="button" value="change this document." onclick="change()"> <h2>header</h2> <p>paragraph</p> </body> javascript content function change() { // document.getelementsbytagname("h2") returns a nodelist of the <h2> // elements in the document, and the first is
number 0: var header = document.getelementsbytagname("h2").item(0); // the firstchild of the header is a text node: header.firstchild.data = "a dynamic document"; // now the header is "a dynamic document".
DynamicsCompressorNode - Web APIs
number of inputs 1
number of outputs 1 channel count mode "clamped-max" channel count 2 channel interpretation "speakers" constructor dynamicscompressornode() creates a new instance of an dynamicscompressornode object.
EffectTiming.fill - Web APIs
when used to persist the effect of an animation indefinitely, however, they have a
number of drawbacks: the forwards fill of an animation (or backwards fill if the animation is playing in reverse) will continue to override any changes to specified style indefinitely which can lead to confusing behavior.
Element: auxclick event - Web APIs
javascript let button = document.queryselector('button'); let html = document.queryselector('html'); function random(
number) { return math.floor(math.random() *
number); } function randomcolor() { return `rgb(${random(255)}, ${random(255)}, ${random(255)})`; } button.onclick = function() { button.style.backgroundcolor = randomcolor(); }; button.onauxclick = function(e) { e.preventdefault(); button.style.color = randomcolor(); } button.oncontextmenu = function(e) { e.preventdefault(); } notice that ...
Element.getClientRects() - Web APIs
<h3>a list</h3> <p>note that the border box doesn't include the
number, so neither do the client rects.</p> <div> <strong>original</strong> <ol> <li>item 1</li> <li>item 2</li> </ol> </div> <div> <strong>ol's rect</strong> <ol class="withclientrectsoverlay"> <li>item 1</li> <li>item 2</li> </ol> </div> <div> <strong>each li's rect</strong> <ol> <li class="withclientrectsoverlay">item 1</li> <li class="withclientrectsoverl...
Element.innerHTML - Web APIs
we add a second method that logs information about mouseevent based events (such as mousedown, click, and mouseenter): function logevent(event) { var msg = "event <strong>" + event.type + "</strong> at <em>" + event.clientx + ", " + event.clienty + "</em>"; log(msg); } then we use this as the event handler for a
number of mouse events on the box that contains our log: var boxelem = document.queryselector(".box"); boxelem.addeventlistener("mousedown", logevent); boxelem.addeventlistener("mouseup", logevent); boxelem.addeventlistener("click", logevent); boxelem.addeventlistener("mouseenter", logevent); boxelem.addeventlistener("mouseleave", logevent); html the html is quite simple for our example.
Element.requestFullscreen() - Web APIs
usage notes compatible elements an element that you wish to place into full-screen mode has to meet a small
number of simple requirements: it must be one of the standard html elements or <svg> or <math>.
Element.scrollLeftMax - Web APIs
the element.scrollleftmax read-only property returns a
number representing the maximum left scroll offset possible for the element.
Element.scrollTopMax - Web APIs
the element.scrolltopmax read-only property returns a
number representing the maximum top scroll offset possible for the element.
Event.timeStamp - Web APIs
syntax time = event.timestamp; value this value is the
number of milliseconds elapsed from the beginning of the current document's lifetime till the event was created.
Using Fetch - Web APIs
supplying request options the fetch() method can optionally accept a second parameter, an init object that allows you to control a
number of different settings: see fetch() for the full options available, and more details.
Fetch API - Web APIs
once a response is retrieved, there are a
number of methods available to define what the body content is and how it should be handled (see body).
File.File() - Web APIs
lastmodified: a
number representing the
number of milliseconds between the unix time epoch and when the file was last modified.
File.size - Web APIs
syntax var size = instanceoffile.size value a
number specification not part of any specification.
FileList - Web APIs
he html includes the following file input: <input id="fileitem" type="file"> the following line of code fetches the first file in the node's file list as a file object: var file = document.getelementbyid('fileitem').files[0]; method overview file item(index); properties attribute type description length integer a read-only value indicating the
number of files in the list.
FileReader.readyState - Web APIs
example var reader = new filereader(); console.log('empty', reader.readystate); // readystate will be 0 reader.readastext(blob); console.log('loading', reader.readystate); // readystate will be 1 reader.onloadend = function () { console.log('done', reader.readystate); // readystate will be 2 }; value a
number which is one of the three possible state constants define for the filereader api.
FormData() - Web APIs
s using formdata.append: formdata.append('username', 'chris'); or you can specify the optional form argument when creating the formdata object, to prepopulate it with values from the specified form: <form id="myform" name="myform"> <div> <label for="username">enter name:</label> <input type="text" id="username" name="username"> </div> <div> <label for="useracc">enter account
number:</label> <input type="text" id="useracc" name="useracc"> </div> <div> <label for="userfile">upload file:</label> <input type="file" id="userfile" name="userfile"> </div> <input type="submit" value="submit!"> </form> note: only successful form controls are included in a formdata object, i.e.
Gamepad.index - Web APIs
syntax readonly attribute long index; example window.addeventlistener("gamepadconnected", function() { var gp = navigator.getgamepads()[0]; gamepadinfo.innerhtml = "gamepad connected at index " + gp.index + ": " + gp.id + "."; }); value a
number.
Geolocation.clearWatch() - Web APIs
syntax navigator.geolocation.clearwatch(id); parameters id the id
number returned by the geolocation.watchposition() method when installing the handler you wish to remove.
GlobalEventHandlers.onanimationcancel - Web APIs
@keyframes slidebox { from { left:0; top:0; } to { left:calc(100% - var(--boxwidth)); top:calc(100% - var(--boxwidth)) } } since the animation is described as taking place an infinite
number of times, alternating direction each time, the box will glide back and forth between the two corners until stopped or the page is closed.
GlobalEventHandlers.onanimationiteration - Web APIs
result assembled together, you get this: each time the box reaches the opposing corner, it stops, with the button reflecting which iteration
number is up next, until you click the button to run the next iteration.
GlobalEventHandlers.onauxclick - Web APIs
var button = document.queryselector('button'); var html = document.queryselector('html'); function random(
number) { return math.floor(math.random() *
number); } button.onclick = function() { var rndcol = 'rgb(' + random(255) + ',' + random(255) + ',' + random(255) + ')'; button.style.backgroundcolor = rndcol; }; button.onauxclick = function() { var rndcol = 'rgb(' + random(255) + ',' + random(255) + ',' + random(255) + ')'; button.style.color = rndcol; } note: if you are using a three-button m...
GlobalEventHandlers.onerror - Web APIs
source: url of the script where the error was raised (string) lineno: line
number where error was raised (
number) colno: column
number for the line where the error occurred (
number) error: error object (object) when the function returns true, this prevents the firing of the default event handler.
GlobalEventHandlers.onkeypress - Web APIs
html <label>enter
numbers only: <input> </label> javascript function
numbersonly(event) { return event.charcode === 0 || /\d/.test(string.fromcharcode(event.charcode)); } const input = document.queryselector('input'); input.onkeypress =
numbersonly; // prevent pasting (since pasted content might include non-
number characters) input.onpaste = event => false; result capture the typing of a hidden word the foll...
HTMLCanvasElement.toDataURL() - Web APIs
encoderoptions optional a
number between 0 and 1 indicating the image quality to use for image formats that use lossy compression such as image/jpeg and image/webp.
HTMLElement: animationiteration event - Web APIs
bubbles yes cancelable no interface animationevent event handler property onanimationiteration examples this code uses animationiteration to keep track of the
number of iterations an animation has completed: const animated = document.queryselector('.animated'); let iterationcount = 0; animated.addeventlistener('animationiteration', () => { iterationcount++; console.log(`animation iteration count: ${iterationcount}`); }); the same, but using the onanimationiteration event handler property: const animated = document.queryselector('.animated'); let ite...
HTMLElement.offsetLeft - Web APIs
the htmlelement.offsetleft read-only property returns the
number of pixels that the upper left corner of the current element is offset to the left within the htmlelement.offsetparent node.
HTMLElement.offsetTop - Web APIs
syntax toppos = element.offsettop; parameters toppos is the
number of pixels from the top of the closest relatively positioned parent element.
HTMLElement - Web APIs
htmlorforeignelement.nonce returns the cryptographic
number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.
HTMLFontElement - Web APIs
htmlfontelement.size is a domstring that reflects the size html attribute, containing either a font size
number ranging from 1 to 7 or a relative size to the size attribute of the <basefont> element, for example -2 or +1.
HTMLHyperlinkElementUtils.host - Web APIs
syntax string = object.host; object.host = string; examples var anchor = document.createelement("a"); anchor.href = "https://developer.mozilla.org/htmlhyperlinkelementutils.host" anchor.host == "developer.mozilla.org" anchor.href = "https://developer.mozilla.org:443/htmlhyperlinkelementutils.host" anchor.host == "developer.mozilla.org" // the port
number is not included because 443 is the scheme's default port anchor.href = "https://developer.mozilla.org:4097/htmlhyperlinkelementutils.host" anchor.host == "developer.mozilla.org:4097" specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.host' in that specification.
HTMLHyperlinkElementUtils.search - Web APIs
ect.search; object.search = string; examples // let an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils.search?q=123"> element be in the document var anchor = document.getelementbyid("myanchor"); var querystring = anchor.search; // returns:'?q=123' // further parsing: let params = new urlsearchparams(querystring); let q = parseint(params.get("q")); // is the
number 123 specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.search' in that specification.
HTMLImageElement.hspace - Web APIs
the obsolete hspace property of the htmlimageelement interface specifies the
number of pixels of empty space to leave empty on the left and right sides of the <img> element when laying out the page.
HTMLImageElement.lowSrc - Web APIs
there are a
number of ways to achieve this; primary among them: higher compression levels (for example, a primary image saved as a jpeg using 85% quality might have a lowsrc version saved at 15%.
HTMLImageElement.naturalWidth - Web APIs
this is the width the image is if drawn with nothing constraining its width; if you neither specify a width for the image nor place the image inside a container that limits or expressly specifies the image width, this is the
number of css pixels wide the image will be.
HTMLImageElement.srcset - Web APIs
otherwise, the condition descriptor may take one of two forms: to indicate that the image resource specified by the image candidate string should be used when the image is being rendered with a particular width in pixels, provide a width descriptor comprised the
number giving that width in pixels followed by the lower case letter "w".
HTMLImageElement.vspace - Web APIs
the obsolete vspace property of the htmlimageelement interface specifies the
number of pixels of empty space to leave empty on the top and bottom of the <img> element when laying out the page.
HTMLInputElement: invalid event - Web APIs
html <form action="#"> <ul> <li><label>enter an integer between 1 and 10: <input type="
number" min="1" max="10" required></label></li> <li><input type="submit" value="submit"></li> </ul> </form><p id="log"></p> javascript const input = document.queryselector('input') const log = document.getelementbyid('log') input.addeventlistener('invalid', logvalue) function logvalue(e) { log.textcontent += e.target.value } result specifications specification status comm...
HTMLMediaElement.textTracks - Web APIs
var tracks = document.queryselector('video').texttracks; for (var i = 0, l = tracks.length; i < l; i++) { /* tracks.length == 10 */ if (tracks[i].language == 'en') { console.dir(tracks[i]); } } properties & methods properties length returns the
number of text tracks in texttracklist object.
HTMLObjectElement.setCustomValidity - Web APIs
function validate(inputid) { var input = document.getelementbyid(inputid); var validitystate_object = input.validity; if (validitystate_object.valuemissing) { input.setcustomvalidity('you gotta fill this out, yo!'); input.reportvalidity(); } else if (input.rangeunderflow) { input.setcustomvalidity('we need a higher
number!'); input.reportvalidity(); } else if (input.rangeoverflow) { input.setcustomvalidity('thats too high!'); input.reportvalidity(); } else { input.setcustomvalidity(''); input.reportvalidity(); } } it's vital to set the message to an empty string if there are no errors.
HTMLOrForeignElement.dataset - Web APIs
it must contain only letters,
numbers, and the following characters: dash (-), dot (.), colon (:), underscore (_)—but not any ascii capital letters (a to z).
HTMLOrForeignElement.nonce - Web APIs
the nonce property of the htmlorforeignelement interface returns the cryptographic
number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.
HTMLOrForeignElement - Web APIs
propertiesdataset read only the dataset read-only property of the htmlorforeignelement interface provides read/write access to all the custom data attributes (data-*) set on the element.nonce the nonce property of the htmlorforeignelement interface returns the cryptographic
number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.tabindexthe tabindex property of the htmlorforeignelement interface represents the tab order of the current element.methodsblur()the htmlelement.blur() method removes keyboard focus from the current element.focus()the htmlelement.focus() method sets focus on the specified element, if it...
HTMLProgressElement - Web APIs
htmlprogresselement.max is a double value reflecting the content attribute of the same name, limited to
numbers greater than zero.
HTMLTableColElement - Web APIs
htmltablecolelement.span is an unsigned long that reflects the span html attribute, indicating the
number of columns to apply this object's attributes to.
HTMLTableElement.cellSpacing - Web APIs
syntax htmltableelement.cellspacing = spacing; var spacing = htmltableelement.cellspacing; value a domstring which is either a
number of pixels (such as "10") or a percentage value (like "10%").
HTMLTableElement.deleteRow() - Web APIs
return value no return value errors thrown if the
number of the row to delete, specified by the parameter, is greater or equal to the
number of available rows, or if it is negative and not equal to the special index -1, representing the last row of the table, the exception index_size_err is thrown.
HTMLTableElement.width - Web APIs
syntax htmltableelement.width = width; var width = htmltableelement.width; where width is a string representing the width in
number of pixels or as a percentage value.
HTMLTableElement - Web APIs
if the index is smaller than -1 or greater than the
number of rows in the collection, a domexception with the value indexsizeerror is raised.
HTMLVideoElement - Web APIs
this information includes things like the
number of dropped or corrupted frames, as well as the total
number of frames.
Drag Operations - Web APIs
(note also that links starting with a
number sign (#) are skipped, as these are comments.) for simple cases, you can use the special type url just to retrieve the first valid url in the list.
HTML Drag and Drop API - Web APIs
t the element by id const element = document.getelementbyid("p1"); // add the ondragstart event listener element.addeventlistener("dragstart", dragstart_handler); }); </script> <p id="p1" draggable="true">this element is draggable.</p> for more information, see: draggable attribute reference drag operations guide define the drag's data the application is free to include any
number of data items in a drag operation.
History.length - Web APIs
the history.length read-only property returns an integer representing the
number of elements in the session history, including the currently loaded page.
History - Web APIs
length read only returns an integer representing the
number of elements in the session history, including the currently loaded page.
History API - Web APIs
another use for the go() method is to refresh the current page by either passing 0, or by invoking it without an argument: // the following statements // both have the effect of // refreshing the page window.history.go(0) window.history.go() you can determine the
number of pages in the history stack by looking at the value of the length property: let
numberofentries = window.history.length interfaces history allows manipulation of the browser session history (that is, the pages visited in the tab or frame that the current page is loaded in).
IDBDatabase.createObjectStore() - Web APIs
example // let us open our database var request = window.indexeddb.open("todolist", 4); // this handler is called when a new version of the database // is created, either when one has not been created before // or when a new version
number is submitted by calling // window.indexeddb.open().
IDBDatabase - Web APIs
this is used a lot later on db = dbopenrequest.result; // run the displaydata() function to populate the task // list with all the to-do list data already in the idb displaydata(); }; // this event handles the event whereby a new version of // the database needs to be created either one has not // been created before, or a new version
number has been // submitted via the window.indexeddb.open line above dbopenrequest.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database using // idbdatabase.createobjectstore var objectstore = db.createobjectstore("todolist", { keypath: "tas...
IDBIndex - Web APIs
methods inherits from: eventtarget idbindex.count() returns an idbrequest object, and in a separate thread, returns the
number of records within a key range.
IDBObjectStore.createIndex() - Web APIs
has been deleted or removed.) in firefox previous to version 41, an invalidstateerror was raised in this case as well, which was misleading; this has now been fixed (see bug 1176165.) example in the following example you can see the idbopendbrequest.onupgradeneeded handler being used to update the database structure if a database with a higher version
number is loaded.
IDBOpenDBRequest.onblocked - Web APIs
either one has not been created // before, or a new version
number has been submitted via the // window.indexeddb.open line above //it is only implemented in recent browsers request.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitl...
IdleDeadline - Web APIs
methods idledeadline.timeremaining() returns a domhighrestimestamp, which is a floating-point value providing an estimate of the
number of milliseconds remaining in the current idle period.
IndexedDB API - Web APIs
storage limits and eviction criteria there are a
number of web technologies that store data of one kind or another on the client side (i.e.
getVersion - Web APIs
getversion returns an object representing the version
number from the client version registry for the specified component.
InstallTrigger - Web APIs
getversion returns an object representing the version
number from the client version registry for the specified component.
IntersectionObserver.rootMargin - Web APIs
this lets you, for example, adjust the bounds outward so that the target element is considered 100% visible even if a certain
number of pixels worth of width or height is clipped away, or treat the target as partially hidden if an edge is too close to the edge of the root's bounding box.
IntersectionObserverEntry.intersectionRatio - Web APIs
syntax var intersectionratio = intersectionobserverentry.intersectionratio; value a
number between 0.0 and 1.0 which indicates how much of the target element is actually visible within the root's intersection rectangle.
KeyboardEvent.code - Web APIs
moverate and turnrate are the
number of pixels forward and backward each keystroke moves the ship and how many degrees of rotation the left and right steering controls apply per keystroke.
Location: host - Web APIs
syntax string = object.host; object.host = string; examples var anchor = document.createelement("a"); anchor.href = "https://developer.mozilla.org/location.host" anchor.host == "developer.mozilla.org" anchor.href = "https://developer.mozilla.org:443/location.host" anchor.host == "developer.mozilla.org" // the port
number is not included because 443 is the scheme's default port anchor.href = "https://developer.mozilla.org:4097/location.host" anchor.host == "developer.mozilla.org:4097" specifications specification status comment html living standardthe definition of 'host' in that specification.
Location: search - Web APIs
tax string = object.search; object.search = string; examples // let an <a id="myanchor" href="https://developer.mozilla.org/docs/location.search?q=123"> element be in the document var anchor = document.getelementbyid("myanchor"); var querystring = anchor.search; // returns:'?q=123' // further parsing: let params = new urlsearchparams(querystring); let q = parseint(params.get("q")); // is the
number 123 specifications specification status comment html living standardthe definition of 'search' in that specification.
LockedFile.getMetadata() - Web APIs
they have the following format: size : a
number lastmodified : a date object specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.readAsText() - Web APIs
syntax var request = instanceoflockedfile.readastext(size[, encoding]); parameters size a
number representing the
number of bytes to read in the file.
LockedFile.truncate() - Web APIs
syntax var request = instanceoflockedfile.truncate(start); parameters start optional a
number representing the index where to start the operation.
LockedFile.write() - Web APIs
the write starts at the position set in lockedfile.location and moves that position by the
number of written bytes.
MSSiteModeEvent - Web APIs
example interface mssitemodeevent extends event { buttonid:
number; actionurl: string; } declare var mssitemodeevent: { prototype: mssitemodeevent; new(): mssitemodeevent; } see also microsoft api extensions ...
MediaCapabilities.decodingInfo() - Web APIs
example //create media configuration to be tested const mediaconfig = { type : 'file', // or 'media-source' audio : { contenttype : "audio/ogg", // valid content type channels : 2, // audio channels used by the track bitrate : 132700, //
number of bits used to encode 1s of audio samplerate : 5200 //
number of audio samples making up that 1s.
MediaCapabilities.encodingInfo() - Web APIs
example //create media configuration to be tested const mediaconfig = { type : 'record', // or 'transmission' video : { contenttype : "video/webm;codecs=vp8.0", // valid content type width : 1920, // width of the video height : 1080, // height of the video bitrate : 120000, //
number of bits used to encode 1s of video framerate : 48 //
number of frames making up that 1s.
MediaDecodingConfiguration - Web APIs
examples //create media configuration to be tested const mediaconfig = { type : 'file', // or 'media-source' video : { contenttype : "video/webm;codecs=vp8", // valid content type width : 800, // width of the video height : 600, // height of the video bitrate : 10000, //
number of bits used to encode 1s of video framerate : 30 //
number of frames making up that 1s.
MediaEncodingConfiguration - Web APIs
examples //create media configuration to be tested const mediaconfig = { type : 'record', // or 'transmission' video : { contenttype : "video/webm;codecs=vp8", // valid content type width : 800, // width of the video height : 600, // height of the video bitrate : 10000, //
number of bits used to encode 1s of video framerate : 30 //
number of frames making up that 1s.
MediaError - Web APIs
mediaerror.code a
number which represents the general type of error that occurred, as follows: name value description media_err_aborted 1 the fetching of the associated resource was aborted by the user's request.
MediaList - Web APIs
medialist.length read only returns the
number of media queries in the medialist.
MediaPositionState - Web APIs
this should always be a positive
number, with positive infinity (infinity) indicating media without a defined end, such as a live stream.
MediaRecorder() - Web APIs
if bits per second values are not specified for video and/or audio, the default adopted for video is 2.5mbps, while the audio default is adaptive, depending upon the sample rate and the
number of channels.
MediaRecorderErrorEvent() - Web APIs
some user agents add to the error object other properties that provide information such as stack dumps, the name of the javascript file and the line
number where the error occurred, and other debugging aids, but you should not rely on this information in a production environment.
MediaSessionActionDetails.seekOffset - Web APIs
the mediasessionactiondetails dictionary's seekoffset property is an optional value passed into the action handler callback to provide the
number of seconds the seekforward and seekbackward actions should move the playback time by.
MediaSessionActionDetails - Web APIs
seekoffset optional if the action is either seekforward or seekbackward and this property is present, it is a floating point value which indicates the
number of seconds to move the play position forward or backward.
MediaStreamTrack - Web APIs
methods mediastreamtrack.applyconstraints() lets the application specify the ideal and/or ranges of acceptable values for any
number of the available constrainable properties of the mediastreamtrack.
MediaStreamTrackAudioSourceNode - Web APIs
number of inputs 0
number of outputs 1 channel count defined by the first audio mediastreamtrack passed to the audiocontext.createmediastreamtracksource() method that created it.
MediaTrackConstraints.aspectRatio - Web APIs
if this value is a
number, the user agent will attempt to obtain media whose aspect ratio is as close as possible to this
number given the capabilities of the hardware and the other constraints specified.
MediaTrackConstraints.channelCount - Web APIs
syntax var constraintsobject = { channelcount: constraint }; constraintsobject.channelcount = constraint; value if this value is a
number, the user agent will attempt to obtain media whose channel count is as close as possible to this
number given the capabilities of the hardware and the other constraints specified.
MediaTrackConstraints.frameRate - Web APIs
if this value is a
number, the user agent will attempt to obtain media whose frame rate is as close as possible to this
number given the capabilities of the hardware and the other constraints specified.
MediaTrackConstraints.height - Web APIs
syntax var constraintsobject = { height: constraint }; constraintsobject.height = constraint; value if this value is a
number, the user agent will attempt to obtain media whose height is as close as possible to this
number given the capabilities of the hardware and the other constraints specified.
MediaTrackConstraints.latency - Web APIs
if this property's value is a
number, the user agent will attempt to obtain media whose latency tends to be as close as possible to this
number given the capabilities of the hardware and the other constraints specified.
MediaTrackConstraints.sampleRate - Web APIs
syntax var constraintsobject = { samplerate: constraint }; constraintsobject.samplerate = constraint; value if this value is a
number, the user agent will attempt to obtain media whose sample rate is as close as possible to this
number given the capabilities of the hardware and the other constraints specified.
MediaTrackConstraints.sampleSize - Web APIs
syntax var constraintsobject = { samplesize: constraint }; constraintsobject.samplesize = constraint; value if this value is a
number, the user agent will attempt to obtain media whose sample size (in bits per linear sample) is as close as possible to this
number given the capabilities of the hardware and the other constraints specified.
MediaTrackControls.volume - Web APIs
if this value is a
number, the user agent will attempt to obtain media whose volume is as close as possible to this
number given the capabilities of the hardware and the other constraints specified.
MediaTrackConstraints.width - Web APIs
syntax var constraintsobject = { width: constraint }; constraintsobject.width = constraint; value if this value is a
number, the user agent will attempt to obtain media whose width is as close as possible to this
number given the capabilities of the hardware and the other constraints specified.
MediaTrackSettings.height - Web APIs
the mediatracksettings dictionary's height property is an integer indicating the
number of pixels tall mediastreamtrack is currently configured to be.
MediaTrackSettings.width - Web APIs
the mediatracksettings dictionary's width property is an integer indicating the
number of pixels wide mediastreamtrack is currently configured to be.
MediaTrackSettings - Web APIs
channelcount a long integer value indicating the current value of the channelcount property, specifying the
number of audio channels present on the track (therefore indicating how many audio samples exist in each audio frame).
Media Source API - Web APIs
videoplaybackquality contains information about the quality of video being played by a <video> element, such as
number of dropped or corrupted frames.
Microsoft API extensions - Web APIs
microsoft browsers (internet explorer, and in a few cases, microsoft edge) support a
number of special microsoft extensions to the otherwise standard dom apis.
MouseEvent() - Web APIs
in some implementations, passing anything other than a
number for the screen and client fields will throw a typeerror.
MouseEvent.button - Web APIs
syntax var buttonpressed = instanceofmouseevent.button return value a
number representing a given button: 0: main button pressed, usually the left button or the un-initialized state 1: auxiliary button pressed, usually the wheel button or the middle button (if present) 2: secondary button pressed, usually the right button 3: fourth button, typically the browser back button 4: fifth button, typically the browser forward button as noted above, buttons may be config...
MouseEvent.movementX - Web APIs
syntax var xshift = instanceofmouseevent.movementx; return value a
number example this example logs the amount of mouse movement using movementx and movementy.
MouseEvent.movementY - Web APIs
syntax var yshift = instanceofmouseevent.movementy; return value a
number example this example logs the amount of mouse movement using movementx and movementy.
MouseEvent.which - Web APIs
syntax var buttonpressed = instanceofmouseevent.which return value a
number representing a given button: 0: no button 1: left button 2: middle button (if present) 3: right button for a mouse configured for left-handed use, the button actions are reversed.
MouseEvent - Web APIs
mouseevent.button read only the button
number that was pressed (if applicable) when the mouse event was fired.
msFirstPaint - Web APIs
the numerical value reported represents the
number of milliseconds between the recorded time and midnight january 1, 1970 (utc).
NDEFReadingEvent - Web APIs
ndefreadingevent.serial
number read only represents the serial
number of the device used for anti-collision and identification, or empty string in case none is available.
NamedNodeMap - Web APIs
namednodemap.item() returns the attr at the given index, or null if the index is higher or equal to the
number of nodes.
Navigator.maxTouchPoints - Web APIs
the maxtouchpoints read-only property of the navigator interface returns the maximum
number of simultaneous touch contact points are supported by the current device.
NavigatorID.appVersion - Web APIs
example alert('your browser version is reported as ' + navigator.appversion); notes the window.navigator.useragent property may also contain the version
number (for example "mozilla/5.0 (windows; u; win98; en-us; rv:0.9.2) gecko/20010725 netscape 6/6.1"), but you should be aware of how easy it is to change the user agent string and "spoof" other browsers, platforms, or user agents, and also how cavalier the browser vendor themselves are with these properties.
NavigatorID.userAgent - Web APIs
gecko-based browsers comply with the following general structure: useragent = appcodename/appversion
number (platform; security; os-or-cpu; localization; rv: revision-version-
number) product/productsub application-name application-name-version example alert(window.navigator.useragent) // alerts "mozilla/5.0 (windows; u; win98; en-us; rv:0.9.2) gecko/20010725 netscape6/6.1" specifications specification status comment html living standardthe definition of 'navigatorid...
Node.isEqualNode() - Web APIs
two nodes are equal when they have the same type, defining characteristics (for elements, this would be their id,
number of children, and so forth), its attributes match, and so on.
Notification.actions - Web APIs
note: device and user agent might be able to display only a limited
number of actions (due to, e.g., limited screen space).
Notification.tag - Web APIs
one notification can then be programmatically replaced with another to avoid the users' screen being filled up with a huge
number of similar notifications.
Notifications API - Web APIs
in addition, the notifications api spec specifies a
number of additions to the serviceworker api, to allow service workers to fire notifications.
OfflineAudioContext.suspend() - Web APIs
invalidstateerror if the quantized frame
number is one of the following: a negative
number is less than or equal to the current time is greater than or equal to the total render duration is scheduled by another suspend for the same time specifications specification status comment web audio apithe definition of 'suspend()' in that specification.
OffscreenCanvas - Web APIs
a single offscreencanvas may transfer frames into an arbitrary
number of other imagebitmaprenderingcontext objects.
Page Visibility API - Web APIs
policies in place to aid background page performance separately from the page visibility api, user agents typically have a
number of policies in place to mitigate the performance impact of background or hidden tabs.
PannerNode.refDistance - Web APIs
syntax var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.refdistance = 1; value a non-negative
number.
PannerNode.rolloffFactor - Web APIs
syntax var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.rollofffactor = 1; value a
number whose range depends on the distancemodel of the panner as follows (negative values are not allowed): "linear" the range is 0 to 1.
ParentNode - Web APIs
properties parentnode.childelementcount read only returns the
number of children of this parentnode which are elements.
PayerErrors.email - Web APIs
let payererrors = {}; // check payer details if (!validemail(response.payeremail)) { payererrors.email = "please make sure you enter a valid email address." } if (!validname(response.payername)) { payererrors.email = "please enter a valid name, using only <appropriate characters>." } if (!validphone(response.payerphone)) { payererrors.phone = "please enter a valid phone
number in the form ###-###-####." } // check everything else too...
PayerErrors.name - Web APIs
let payererrors = {}; // check payer details if (!validemail(response.payeremail)) { payererrors.email = "please make sure you enter a valid email address." } if (!validname(response.payername)) { payererrors.email = "please enter a valid name, using only <appropriate characters>." } if (!validphone(response.payerphone)) { payererrors.phone = "please enter a valid phone
number in the form ###-###-####." } // check everything else too...
PaymentAddress.postalCode - Web APIs
the postalcode read-only property of the paymentaddress interface returns a string containing a code used by a jurisdiction for mail routing, for example, the zip code in the united states or the postal index
number (pin code) in india.
PaymentCurrencyAmount - Web APIs
the paymentcurrencyamount dictionary describes an amount of money in terms of both a
number of units and the currency (us dollars, euro, yen, etc.), and is part of the payment request api.
Pbkdf2Params - Web APIs
iterations a
number representing the
number of times the hash function will be executed in derivekey().
Performance.navigation - Web APIs
the legacy performance.navigation read-only property returns a performancenavigation object representing the type of navigation that occurs in the given browsing context, such as the
number of redirections needed to fetch the resource.
PerformanceNavigation - Web APIs
performancenavigation.redirectcount read only an unsigned short representing the
number of redirects done before reaching the page.
PerformanceNavigationTiming - Web APIs
performancenavigationtiming.redirectcount read only a
number representing the
number of redirects since the last non-redirect navigation under the current browsing context.
Performance API - Web APIs
the interfaces support a
number of use cases including calculating frame-rates (potentially important in animations) and benchmarking (such as the time to load a resource).
Pinch zoom gestures - Web APIs
function pointerup_handler(ev) { log(ev.type, ev); // remove this pointer from the cache and reset the target's // background and border remove_event(ev); ev.target.style.background = "white"; ev.target.style.border = "1px solid black"; // if the
number of pointers down is less than two then reset diff tracker if (evcache.length < 2) { prevdiff = -1; } } application ui the application uses a <div> element for the touch area and provides buttons to enable logging and to clear the log.
Pointer events - Web APIs
navigator extension the navigator.maxtouchpoints property is used to determine the maximum
number of simultaneous touch points that are supported at any single point in time.
ProgressEvent() - Web APIs
syntax progressevent = new progressevent(type, {lengthcomputable: abooleanvalue, loaded: a
number, total: a
number}); arguments the progressevent() constructor also inherits arguments from event().
PromiseRejectionEvent() - Web APIs
the reason could just as easily be a
number, or even an object with detailed information including the home address, how serious the fire is, and the phone
number of an emergency contact who should be notified.
RTCConfiguration.iceTransportPolicy - Web APIs
the agent—or the browser itself—may still perform some form of ip filtering on the incoming candidates for reasons including privacy and security, as well as to simply limit the
number of candidates.
RTCDTMFSender.toneBuffer - Web APIs
in this example, we would send "*" to request access to the vm system, then, after a pause, send a "1" to start playback of voicemail messages, then after a pause, dial "5555" as a pin
number to open the messages.
RTCDataChannel.maxPacketLifeTime - Web APIs
syntax var lifetime = adatachannel.maxpacketlifetime; value the
number of milliseconds over which the browser may continue to attempt to transmit the message until it either succeeds or gives up.
RTCDataChannel.stream - Web APIs
the deprecated (and never part of the official specification) read-only rtcdatachannel property stream returns an id
number (between 0 and 65,535) which uniquely identifies the rtcdatachannel.
RTCErrorEvent - Web APIs
properties in addition to the standard properties available on the event interface, rtcerrorevent also includes the following: error read only an rtcerror object specifying the error which occurred; this object includes the type of error that occurred, information about where the error occurred (such as which line
number in the sdp or what sctp cause code was at issue).
RTCIceCandidate.candidate - Web APIs
the complete list of attributes for this example candidate is: foundation = 4234997325 component = "rtp" (the
number 1 is encoded to this string; 2 becomes "rtcp") protocol = "udp" priority = 2043278322 ip = "192.168.0.56" port = 44323 type = "host" example in this example, we see a function which receives as input an sdp string containing an ice candidate received from the remote peer during the signaling process.
RTCIceCandidate.priority - Web APIs
usage notes consider this sdp attribute line (a-line) which describes an ice candidate: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host the priority is the
number after the protocol, so it's the fourth field in the candidate string.
RTCIceCandidate.sdpMLineIndex - Web APIs
syntax var sdpmlineindex = rtcicecandidate.sdpmlineindex; value a
number containing a 0-based index into the set of m-lines providing media descriptions, indicating which media source is associated with the candidate, or null if no such association is available.
RTCIceCandidate.usernameFragment - Web APIs
example although the webrtc infrastructure will filter out obsolete candidates for you after an ice restart, you can do it yourself if you're trying to absolutely minimize the
number of messages going back and forth.
RTCIceCandidateInit.candidate - Web APIs
the complete list of attributes for this example candidate is: foundation = 4234997325 component = "rtp" (the
number 1 is encoded to this string; 2 becomes "rtcp") protocol = "udp" priority = 2043278322 ip = "192.168.0.56" port = 44323 type = "host" example when a new ice candidate is received by your signaling code from the remote peer, you need to construct the rtcicecandidate object that encapsulates it.
RTCIceCandidateInit.sdpMLineIndex - Web APIs
value a
number containing a 0-based index into the set of m-lines providing media descriptions, indicating which media source is associated with the candidate, or null if no such association is available.
RTCIceCandidatePairStats.currentRoundTripTime - Web APIs
the rtcicecandidatepairstats property currentroundtriptime is a floating-point value indicating the
number of seconds it takes for data to be sent by this peer to the remote peer and back over the connection described by this pair of ice candidates.
RTCIceCandidatePairStats.totalRoundTripTime - Web APIs
syntax totalrtt = rtcicecandidatepairstats.totalroundtriptime; value this floating-point value indicates the total
number of seconds which have elapsed between sending out stun connectivity and consent check requests and receiving their responses, for all such requests made so far on the connection described by this candidate pair.
RTCIceServer - Web APIs
avoid specifying an unnecessarily large
number of urls in the urls property; the startup time for your connection will go up substantially.
RTCInboundRtpStreamStats.fecPacketsReceived - Web APIs
syntax var fecpacketsreceived = rtcinboundrtpstreamstats.fecpacketsreceived; value an unsigned integer value which indicates the total
number of fec packets which have been recieved from the remote peer during this rtp session.
RTCInboundRtpStreamStats.packetsFailedDecryption - Web APIs
the packetsfaileddecryption property of the rtcinboundrtpstreamstats dictionary indicates the total
number of rtp packets which failed to be decrypted successfully after being received by the local end of the connection during this session.
RTCOutboundRtpStreamStats.nackCount - Web APIs
the nackcount property of the rtcoutboundrtpstreamstats dictionary is a numeric value indicating the
number of times the rtcrtpsender described by this object received a nack packet from the remote receiver.
RTCPeerConnection: icecandidate event - Web APIs
the end-of-candidates indication is described in section 9.3 of the trickle ice draft specification (note that the section
number is subject to change as the specification goes through repeated drafts).
RTCRtpCodecCapability - Web APIs
properties channels optional an unsigned integer value indicating the maximum
number of channels supported by the codec; for example, a codec that supports only mono sound would have a value of 1; stereo codecs would have a 2, etc.
RTCRtpContributingSource.audioLevel - Web APIs
syntax var audiolevel = rtcrtpcontributingsource.audiolevel value a double-precision floating-point
number which indicates the volume level of the audio in the most recently received rtp packet from the source described by the rtcrtpcontributingsource.
RTCRtpEncodingParameters.scaleResolutionDownBy - Web APIs
syntax rtpencodingparameters.scaleresolutiondownby = scalingfactor; rtpencodingparameters = { scaleresolutiondownby: scalingfactor }; value a double-precison floating-point
number specifying the amount by which to reduce the size of the video during encoding.
RTCRtpReceiver.getStats() - Web APIs
example this simple example obtains the statistics for an rtcrtpreceiver and updates an element's innertext to display the
number of packets lost.
RTCRtpStreamStats.firCount - Web APIs
the fircount property of the rtcrtpstreamstats dictionary indicates the
number of full intra request (fir) packets have been sent by the receiver to the sender.
RTCRtpStreamStats.nackCount - Web APIs
the nackcount property of the rtcrtpstreamstats dictionary is a numeric value indicating the
number of times the receiver sent a nack packet to the sender.
RTCRtpStreamStats.sliCount - Web APIs
syntax var slicount = rtcrtpstreamstats.slicount; value an unsigned long integer indicating the
number of sli packets the sender received from the receiver due to lost runs of macroblocks.
RTCRtpStreamStats.ssrc - Web APIs
while not part of the standard, exactly, it is a good mechanism that may be used by some browsers; others may use other methods, such as random
number generators.
RTCSctpTransport - Web APIs
properties also inherits properties from: eventtarget rtcsctptransport.maxchannelsread only an integer value indicating the maximum
number of rtcdatachannels that can be open simultaneously.
Range.compareBoundaryPoints() - Web APIs
syntax compare = range.compareboundarypoints(how, sourcerange); return value compare a
number, -1, 0, or 1, indicating whether the corresponding boundary-point of the range is respectively before, equal to, or after the corresponding boundary-point of sourcerange.
ReadableStream.ReadableStream() - Web APIs
this takes two parameters: highwatermark a non-negative integer — this defines the total
number of chunks that can be contained in the internal queue before backpressure is applied.
Report - Web APIs
reports can be accessed in a
number of ways: via the reportingobserver.takerecords() method — this returns all reports in an observer's report queue, and then empties the queue.
Reporting API - Web APIs
concepts and usage there are a
number of different features and problems on the web platform that generate information useful to web developers when they are trying to fix bugs or improve their websites in other ways.
Resource Timing API - Web APIs
the setresourcetimingbuffersize() method sets the resource performance entry buffer size to the specified
number of resource performance entries.
SVGAnimatedTransformList - Web APIs
svg animated transform list interface the svganimatedtransformlist interface is used for attributes which take a list of
numbers and which can be animated.
SVGAnimationElement: beginEvent event - Web APIs
otion'); let list = document.queryselector('ul'); animateelem.addeventlistener('beginevent', () => { let listitem = document.createelement('li'); listitem.textcontent = 'beginevent fired'; list.appendchild(listitem); }) animateelem.addeventlistener('repeatevent', (e) => { let listitem = document.createelement('li'); let msg = 'repeatevent fired'; if(e.detail) { msg += '; repeat
number: ' + e.detail; } listitem.textcontent = msg; list.appendchild(listitem); }) event handler property equivalent note that you can also create an event listener for the begin event using the onbegin event handler property: animateelem.onbegin = () => { console.log('beginevent fired'); } specifications specification status comment scalable vector graphics (svg)...
SVGAnimationElement: endEvent event - Web APIs
= 'beginevent fired'; list.appendchild(listitem); }) animateelem.addeventlistener('endevent', () => { let listitem = document.createelement('li'); listitem.textcontent = 'endevent fired'; list.appendchild(listitem); }) animateelem.addeventlistener('repeatevent', (e) => { let listitem = document.createelement('li'); let msg = 'repeatevent fired'; if(e.detail) { msg += '; repeat
number: ' + e.detail; } listitem.textcontent = msg; list.appendchild(listitem); }) btn.addeventlistener('click', () => { btn.disabled = true; animateelem.setattribute('repeatcount', '1'); }) event handler property equivalent note that you can also create an event listener for the end event using the onend event handler property: animateelem.onend = () => { console.log('endevent fired')...
SVGAnimationElement: repeatEvent event - Web APIs
motion'); let list = document.queryselector('ul'); animateelem.addeventlistener('beginevent', () => { let listitem = document.createelement('li'); listitem.textcontent = 'beginevent fired'; list.appendchild(listitem); }) animateelem.addeventlistener('repeatevent', (e) => { let listitem = document.createelement('li'); let msg = 'repeatevent fired'; if(e.detail) { msg += '; repeat
number: ' + e.detail; } listitem.textcontent = msg; list.appendchild(listitem); }) event handler property equivalent note that you can also create an event listener for the repeat event using the onrepeat event handler property: animateelem.onrepeat = () => { console.log('repeatevent fired'); } specifications specification status comment scalable vector graphics (...
SVGAnimationElement - Web APIs
svganimationelement.getsimpleduration() returns a float representing the
number of seconds for the simple duration for this animation.
SVGPathElement - Web APIs
svgpathelement.pathlength an svganimated
number corresponding to the pathlength attribute of the given <path> element.
SVGStopElement - Web APIs
svgstopelement.offset read only an svganimated
number corresponding to the offset of the given element.
SVGTextContentElement - Web APIs
svgtextcontentelement.get
numberofchars() returns a long representing the total
number of addressable characters available for rendering within the current element, regardless of whether they will be rendered.
Screen Wake Lock API - Web APIs
a request may be rejected for a
number of reasons, including system settings (such as power save mode or low battery level) or if the document is not active or visible.
ScriptProcessorNode: audioprocess event - Web APIs
process', function(audioprocessingevent) { // the input buffer is a song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var 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 outputdat...
ScriptProcessorNode.bufferSize - Web APIs
ocess = function(audioprocessingevent) { // the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var 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 outputdat...
ScriptProcessorNode.onaudioprocess - Web APIs
ocess = function(audioprocessingevent) { // the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var 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 outputdat...
ScrollToOptions.behavior - Web APIs
examples in our scrolltooptions example (see it live) we include a form that allows the user to enter three values — two
numbers representing the left and top properties (i.e.
ServiceWorkerGlobalScope: install event - Web APIs
bubbles no cancelable no interface extendableevent event handler property serviceworkerglobalscope.oninstall examples the following snippet shows how an install event handler can be used to populate a cache with a
number of responses, which the service worker can then use to serve assets offline: this.addeventlistener('install', function(event) { event.waituntil( caches.open('v1').then(function(cache) { return cache.add( '/sw-test/', '/sw-test/index.html', '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg'...
ServiceWorkerGlobalScope.oninstall - Web APIs
}; examples the following snippet shows how an install event handler can be used to populate a cache with a
number of responses, which the service worker can then use to serve assets offline: this.addeventlistener('install', function(event) { event.waituntil( caches.open('v1').then(function(cache) { return cache.add( '/sw-test/', '/sw-test/index.html', '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg', '/sw-test/gallery/...
Using Service Workers - Web APIs
you’ll want to update your install event listener in the new service worker to something like this (notice the new version
number): self.addeventlistener('install', (event) => { event.waituntil( caches.open('v2').then((cache) => { return cache.addall([ './sw-test/', './sw-test/index.html', './sw-test/style.css', './sw-test/app.js', './sw-test/image-list.js', … // include other new resources for the new version...
Service Worker API - Web APIs
in the future, service workers will be able to do a
number of other useful things for the web platform that will bring it closer towards native app viability.
SourceBufferList - Web APIs
"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
properties speechgrammarlist.length read only returns the
number of speechgrammar objects contained in the speechgrammarlist.
SpeechRecognition - Web APIs
the speechrecognitionresult.isfinal property is false.) speechrecognition.maxalternatives sets the maximum
number of speechrecognitionalternatives provided per result.
SpeechRecognitionResult - Web APIs
speechrecognitionresult.length read only returns the length of the "array" — the
number of speechrecognitionalternative objects contained in the result (also referred to as "n-best alternatives".) methods speechrecognitionresult.item a standard getter that allows speechrecognitionalternative objects within the result to be accessed via array syntax.
StaticRange.endOffset - Web APIs
syntax var endoffset = staticrange.endoffset value an integer value indicating the
number of characters into the node indicated by endcontainer at which the final character of the range is located.
StaticRange.startOffset - Web APIs
syntax var startoffset = staticrange.startoffset value an integer value indicating the
number of characters into the node indicated by startcontainer at which the first character of the range is located.
StereoPannerNode - Web APIs
number of inputs 1
number of outputs 1 channel count mode "clamped-max" channel count 2 channel interpretation "speakers" constructor stereopannernode() creates a new instance of a stereopannernode object.
StorageManager - Web APIs
methods storagemanager.estimate() secure context returns a promise that resolves to a storageestimate object containing usage and quota
numbers for your origin.
Storage API - Web APIs
for example: navigator.storage.estimate().then(estimate => { // estimate.quota is the estimated quota // estimate.usage is the estimated
number of bytes used }); specifications specification status comment storage living standard initial definition.
Using readable streams - Web APIs
it has a
number of advantages, and what is really nice about it is that browsers have recently added the ability to consume a fetch response as a readable stream.
Text.splitText() - Web APIs
exceptions thrown a domexception with a value of index_size_err is thrown if the specified offset is negative or is greater than the
number of 16-bit units in the node's text; a domexception with a value of no_modification_allowed_err is thrown if the node is read-only.
Touch() - Web APIs
syntax touch = new touch(touchinit); arguments touchinit is a touchinit dictionary, having the following fields: "identifier", required, of type long, that is the identification
number for the touch point.
Touch.rotationAngle - Web APIs
syntax var angle = touchitem.rotationangle; return value angle the
number of degrees of rotation to apply to the described ellipse to align with the contact area between the user and the touch surface.
TouchList - Web APIs
properties touchlist.length read only the
number of touch objects in the touchlist.
Multi-touch interaction - Web APIs
function update_background(ev) { // change background color based on the
number simultaneous touches // in the event's targettouches list: // yellow - one tap (or hold) // pink - two taps // lightblue - more than two taps switch (ev.targettouches.length) { case 1: // single tap` ev.target.style.background = "yellow"; break; case 2: // two simultaneous touches ev.target.style.background = "pink"; break; default: // more t...
Using Touch Events - Web APIs
the touch point's rotation angle - the
number of degrees of rotation to apply to the described ellipse to align with the contact area - is also be standardized as is the amount of pressure applied to a touch point.
Touch events - Web APIs
this identifier is an opaque
number, but we can at least rely on it differing between the currently-active touches.
TransformStream - Web APIs
roller) { chunk = await chunk switch (typeof chunk) { case 'object': // just say the stream is done i guess if (chunk === null) controller.terminate() else if (arraybuffer.isview(chunk)) controller.enqueue(new uint8array(chunk.buffer, chunk.byteoffset, chunk.bytelength)) else if (array.isarray(chunk) && chunk.every(value => typeof value === '
number')) controller.enqueue(new uint8array(chunk)) else if ('function' === typeof chunk.valueof && chunk.valueof() !== chunk) this.transform(chunk.valueof(), controller) // hack else if ('tojson' in chunk) this.transform(json.stringify(chunk), controller) break case 'symbol': controller.error("cannot send a symbol as a chunk part") break...
UIEvent.pageX - Web APIs
this property was never part of any standard, and was only implemented across a subset of browsers, and only for a limited
number of versions.
URL.host - Web APIs
examples let url = new url('/docs/web/api/url/host'); console.log(url.host); // "developer.mozilla.org" url = new url('https://developer.mozilla.org:443/docs/web/api/url/host'); console.log(url.host); // "developer.mozilla.org" // the port
number is not included because 443 is the scheme's default port url = new url('https://developer.mozilla.org:4097/docs/web/api/url/host'); console.log(url.host); // "developer.mozilla.org:4097" specifications specification status comment urlthe definition of 'url.host' in that specification.
URL.searchParams - Web APIs
let age = parseint(params.get('age')); // is the
number 18 specifications specification status comment urlthe definition of 'searchparams' in that specification.
URL - Web APIs
port a usvstring containing the port
number of the url.
URLSearchParams.get() - Web APIs
examples if the url of your page is https://example.com/?name=jonathan&age=18 you could parse out the 'name' and 'age' parameters using: let params = new urlsearchparams(document.location.search.substring(1)); let name = params.get("name"); // is the string "jonathan" let age = parseint(params.get("age"), 10); // is the
number 18 requesting a parameter that isn't present in the query string will return null: let address = params.get("address"); // null specifications specification status comment urlthe definition of 'get()' in that specification.
USBDevice.claimInterface() - Web APIs
syntax var promise = usbdevice.claiminterface(interface
number) parameters interface
number the index of one of the interfaces supported by the device.
Getting started with WebGL - Web APIs
it's worth noting here that this series of articles introduces webgl itself; however, there are a
number of frameworks available that encapsulate webgl's capabilities, making it easier to build 3d applications and games, such as three.js and babylon.js.
Using textures in WebGL - Web APIs
in our case, we'll be using a single texture, mapped onto all six sides of our rotating cube, but the same technique can be used for any
number of textures.
Using DTMF with WebRTC - Web APIs
this event is sent when one of a
number of changes occurs to the state of the ice connection process, including the successful establishment of a connection.
WebRTC API - Web APIs
media streams can consist of any
number of tracks of media information; tracks, which are represented by objects based on the mediastreamtrack interface, may contain one of a
number of types of media data, including audio, video, and text (such as subtitles or even chapter names).
WebSocket.bufferedAmount - Web APIs
the websocket.bufferedamount read-only property returns the
number of bytes of data that have been queued using calls to send() but not yet transmitted to the network.
Using bounded reference spaces - Web APIs
as this suggests, the safe area is not required to be convex, but may have any
number of indentations or extrusions, as long as it's a contiguous shape, note that the coordinates of the origin here, (0, 0), are indicative of the fact that the boundaries are defined at floor level and are essentially a 2d shape on the floor, like an invisible fence used to keep pets from getting away from home.
Example and tutorial: Simple synth keyboard - Web APIs
0%; position: absolute; left: 0; display: table-cell; vertical-align: middle; } .left span, .left input { vertical-align: middle; } .right { width: 50%; position: absolute; right: 0; display: table-cell; vertical-align: middle; } .right span { vertical-align: middle; } .right input { vertical-align: baseline; } javascript the javascript code begins by initializing a
number of variables.
Using IIR filters - Web APIs
it includes some different coefficient values for different lowpass frequencies — you can change the value of the filter
number constant to a value between 0 and 3 to check out the different available effects.
Web Speech API - Web APIs
generally you'll use the interface's constructor to create a new speechrecognition object, which has a
number of event handlers available for detecting when speech is input through the device's microphone.
Using the Web Storage API - Web APIs
as you can see above, the event object associated with this event has a
number of properties containing useful information — the key of the data that changed, the old value before the change, the new value after that change, the url of the document that changed the storage, and the storage object itself (which we've stringified so you can see its content).
Web Workers API - Web APIs
but you can use a large
number of items available under window, including websockets, and data storage mechanisms like indexeddb.
Window: animationiteration event - Web APIs
examples this code uses animationiteration to keep track of the
number of iterations an animation has completed: let iterationcount = 0; window.addeventlistener('animationiteration', () => { iterationcount++; console.log(`animation iteration count: ${iterationcount}`); }); the same, but using the onanimationiteration event handler property: let iterationcount = 0; window.onanimationiteration = () => { iterationcount++; console.log(`animation iteration c...
Window.devicePixelRatio - Web APIs
the media query, which begins as (resolution: 1dppx) (for standard displays) or (resolution: 2dppx) (for retina/hidpi displays), checks to see if the current display resolution matches a specific
number of device dots per px.
window.location - Web APIs
cras sodales eleifend interdum.</p> </body> </html> …the same thing but with an animated page scroll: var showbookmark = (function () { var _usehash, _scrollx, _scrolly, _nodex, _nodey, _itframe, _scrollid = -1, _bookmark, /* * nduration: the duration in milliseconds of each frame * nframes:
number of frames for each scroll */ nduration = 200, nframes = 10; function _next () { if (_itframe > nframes) { clearinterval(_scrollid); _scrollid = -1; return; } _isbot = true; document.documentelement.scrolltop = math.round(_scrolly + (_nodey - _scrolly) * _itframe / nframes); document.documentelement.scrollleft = math.round(_scrollx + (_nodex - _scrollx) * _itframe / nframes); if...
Window.mozInnerScreenX - Web APIs
that means it can be affected by the zoom level; to compute the actual
number of physical screen pixels, you should use the nsidomwindowutils.screenpixelspercsspixel property.
Window.mozInnerScreenY - Web APIs
that means it can be affected by the zoom level; to compute the actual
number of physical screen pixels, you should use the nsidomwindowutils.screenpixelspercsspixel property.
Window.screenLeft - Web APIs
syntax leftwindowpos = window.screenleft returns a
number equal to the
number of css pixels from the left edge of the browser viewport to the left edge of the screen.
Window.screenTop - Web APIs
syntax topwindowpos = window.screentop returns a
number equal to the
number of css pixels from the top edge of the browser viewport to the top edge of the screen.
Window.screenX - Web APIs
syntax leftwindowpos = window.screenx returns a
number equal to the
number of css pixels from the left edge of the browser viewport to the left edge of the screen.
Window.screenY - Web APIs
syntax topwindowpos = window.screeny returns a
number equal to the
number of css pixels from the top edge of the browser viewport to the top edge of the screen.
WindowOrWorkerGlobalScope.clearTimeout() - Web APIs
var alarm = { remind: function(amessage) { alert(amessage); this.timeoutid = undefined; }, setup: function() { if (typeof this.timeoutid === '
number') { this.cancel(); } this.timeoutid = window.settimeout(function(msg) { this.remind(msg); }.bind(this), 1000, 'wake up!'); }, cancel: function() { window.cleartimeout(this.timeoutid); } }; window.onclick = function() { alarm.setup(); }; notes passing an invalid id to cleartimeout() silently does nothing; no exception is thrown.
Worker - Web APIs
example the following code snippet creates a worker object using the worker() constructor, then uses the worker object: var myworker = new worker('/worker.js'); var first = document.queryselector('input#
number1'); var second = document.queryselector('input#
number2'); first.onchange = function() { myworker.postmessage([first.value, second.value]); console.log('message posted to worker'); } for a full example, see ourbasic dedicated worker example (run dedicated worker).
WorkerGlobalScope - Web APIs
windoworworkerglobalscope.setinterval() schedules a function to execute every time a given
number of milliseconds elapses.
WorkerLocation - Web APIs
urlutilsreadonly.port read only is a domstring containing the port
number of the url of the script executed in the worker.
WorkerNavigator - Web APIs
navigatorconcurrenthardware.hardwareconcurrencyread only returns the
number of logical processor cores available.
WritableStream.WritableStream() - Web APIs
this takes two parameters: highwatermark a non-negative integer — this defines the total
number of chunks that can be contained in the internal queue before backpressure is applied.
XMLHttpRequest.timeout - Web APIs
the xmlhttprequest.timeout property is an unsigned long representing the
number of milliseconds a request can take before automatically being terminated.
XPathEvaluator.createExpression() - Web APIs
html <div>xpath example</div> <div>
number of <div>s: <output></output></div> javascript var xpath = "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression("//div"); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment ...
XPathEvaluator.evaluate() - Web APIs
html <div>xpath example</div> <div>
number of <div>s: <output></output></div> javascript var evaluator = new xpathevaluator(); var result = evaluator.evaluate("//div", document, null, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationth...
XPathEvaluator - Web APIs
html <div>xpath example</div> <div>
number of <div>s: <output></output></div> javascript var xpath = "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression("//div"); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment ...
XPathExpression.evaluate() - Web APIs
html <div>xpath example</div> <div>
number of <div>s: <output></output></div> javascript var xpath = "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression("//div"); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment ...
XPathExpression - Web APIs
html <div>xpath example</div> <div>
number of <div>s: <output></output></div> javascript var xpath = "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression(xpath); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment ...
XRInputSourceArray.keys() - Web APIs
the values returned by the iterator are the indexes of each entry in the list; that is, the
numbers 0, 1, 2, and so forth through the index of the last item in the list.
XRWebGLLayer() - Web APIs
exceptions invalidstateerror the new xrwebgllayer could not be created due to one of a
number of possible state errors: the xrsession specified by session has already been stopped.
Using the aria-invalid attribute - Accessibility
the aria-invalid attribute is used to indicate that the value entered into an input field does not conform to the format expected by the application.this may include formats such as email addresses or telephone
numbers.
Using the aria-valuemax attribute - Accessibility
value string representation of a
number possible effects on user agents and assistive technology if the aria-valuemax is indeterminate, or if aria-valuemin is not less than or equal to the value of aria-valuemax, this creates an error condition that will be handled by the assistive technology.
Using the aria-valuemin attribute - Accessibility
value string representation of a
number possible effects on user agents and assistive technology if aria-valuemin is not less than or equal to the value of aria-valuemax, this creates an error condition that will be handled by the assistive technology.
Using the slider role - Accessibility
="1" aria-valuemax="100" aria-valuenow="50" oninput="outputupdate(value)"> <output for="fader" id="volume">50</output> the following code snippet allows you to return the output as it is updated by user input: function outputupdate(vol) { document.queryselector('#volume').value = vol; } example 2: text values sometimes, a slider is used to choose a value that is not, semantically, a
number.
ARIA: timer role - Accessibility
<div id="clock" role="timer" aria-live="off">20</div> <button onclick="starttimer('clock')">start</button> /* basic javascript to update a timer */ function starttimer(timername) { // get the
number of seconds let timer = document.getelementbyid(timername), seconds = parseint(timer.innertext); // remove a second // updated the content of timer timer.innertext = --seconds // if timer != 0, settimeout if (seconds) { settimeout( function() { starttimer(timername); }, 1000); } } the first time the function executes, the entirety of the string that is added...
ARIA: dialog role - Accessibility
in addition to the needed control, dialogs can contain any
number of focusable elements, even entire forms or other container widgets like tabs.
Accessibility and Spacial Patterns - Accessibility
an do to browse more safely web accessibiltity for seizures and physical reactions web accessibility: understanding colors and luminance braille part 3: a step-by-step guide to typesetting ada braille correctly in adobe illustrator spatial math in brailleblaster (4 of 5) government literature nasa: designing with blue math spatial reasoning: why math talk is about more than
numbers scientific literature colour constancy in context: roles for local adaptation and levels of reference gamma oscillations and photosensitive epilepsy characterizing the patterned images that precipitate seizures and optimizing guidelines to prevent them arnold wilkins, john emmett, and graham harding contributers: heartfelt thanks to jim allan of the diagram center for his discussions ...
Cognitive accessibility - Accessibility
cognitive skills include: attention memory processing speed time management letters and language
numbers symbols and math understanding and making choices a solid approach to providing accessible solutions for people with cognitive impairments includes: delivering content in more than one way, such as by text-to-speech or by video; providing easily-understood content, such as text written using plain-language standards; focusing attention on important content; minimizing distractions, such...
Accessibility documentation index - Accessibility
20 using the aria-invalid attribute aria, accessibility, attribute, codingscripting, html, javascript, needscontent, role(2), agent, alert, user, useragent the aria-invalid attribute is used to indicate that the value entered into an input field does not conform to the format expected by the application.this may include formats such as email addresses or telephone
numbers.
Accessibility Information for Web Authors - Accessibility
two panes are added at the bottom of the view source code window: the left pane contains the errors and warnings (with their correspondent line
number) and the right pane identifies the checkpoint along with an example and a clickable link to the reference/guideline.
Web accessibility for seizures and physical reactions - Accessibility
"a pattern with the potential for provoking seizures contains clearly discernible stripes,
numbering more than five light-dark pairs of stripes in any orientation" in addition to stripes, checkered patterns have also been known to cause photosensitive seizures, according to cedars-sinai.
:in-range - CSS: Cascading Style Sheets
<li> <input id="value1" name="value1" type="
number" placeholder="1 to 10" min="1" max="10" value="12"> <label for="value1">your value is </label> </li> </ul> </form> css li { list-style: none; margin-bottom: 1em; } input { border: 1px solid black; } input:in-range { background-color: rgba(0, 255, 0, 0.25); } input:out-of-range { background-color: rgba(255, 0, 0, 0.25); border: 2px solid red; } input:in-range + label:...
:not() - CSS: Cascading Style Sheets
/* selects any element that is not a paragraph */ :not(p) { color: blue; } the :not() pseudo-class has a
number of quirks, tricks, and unexpected results that you should be aware of before using it.
:nth-child() - CSS: Cascading Style Sheets
functional notation <an+b> represents elements in a list whose indices match those found in a custom pattern of
numbers, defined by an+b, where: a is an integer step size, b is an integer offset, n is all positive integers, starting from 0.
:out-of-range - CSS: Cascading Style Sheets
in the absence of such a limitation, the element can neither be "in-range" nor "out-of-range." syntax :out-of-range examples html <form action="" id="form1"> <p>values between 1 and 10 are valid.</p> <ul> <li> <input id="value1" name="value1" type="
number" placeholder="1 to 10" min="1" max="10" value="12"> <label for="value1">your value is </label> </li> </ul> </form> css li { list-style: none; margin-bottom: 1em; } input { border: 1px solid black; } input:in-range { background-color: rgba(0, 255, 0, 0.25); } input:out-of-range { background-color: rgba(255, 0, 0, 0.25); border: 2px solid red; } input:in-range + label:...
@counter-style - CSS: Cascading Style Sheets
for example, the value of the marker symbol can be read out as
numbers or alphabets for ordered lists or as audio cues for unordered lists, based on the value of this descriptor.
@import - CSS: Cascading Style Sheets
<mf-value>where <mf-name> = <ident><mf-value> = <
number> | <dimension> | <ident> | <ratio> examples importing css rules @import 'custom.css'; @import url("chrome://communicator/skin/"); importing css rules conditionally @import url("fineprint.css") print; @import url("bluish.css") speech; @import "common.css" screen; @import url('landscape.css') screen and (orientation:landscape); specifications specification status comment ...
Using URL values for the cursor property - CSS: Cascading Style Sheets
an example of the css3 syntax is: .foo { cursor: auto; cursor: url(cursor1.png) 4 12, auto; } .bar { cursor: pointer; cursor: url(cursor2.png) 2 2, pointer; } /* falls back onto 'auto' and 'pointer' in ie, but must be set separately */ the first
number is the x-coordinate, and the second
number is the y-coordinate.
CSS Multi-column Layout - CSS: Cascading Style Sheets
support is included for establishing the
number of columns in a layout, as well as how content should flow from column to column, gap sizes between columns, and column dividing lines (known as column rules) along with their appearance.
CSS Counter Styles - CSS: Cascading Style Sheets
reference properties counter-increment counter-reset at-rules @counter-style system additive-symbols negative prefix suffix range pad speak-as fallback guides using css counters describes how to use counters to
number any html element or to perform complex counting.
Implementing image sprites in CSS - CSS: Cascading Style Sheets
rather than include each image as a separate image file, it is much more memory- and bandwidth-friendly to send them as a single image; using background position as a way to distinguish between individual images in the same image file, so the
number of http requests is reduced.
The stacking context - CSS: Cascading Style Sheets
an easy way to figure out the rendering order of stacked elements along the z axis is to think of it as a "version
number" of sorts, where child elements are minor version
numbers underneath their parent's major version
numbers.
CSS Shapes - CSS: Cascading Style Sheets
the specification defines a
number of different ways 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.
CSS data types - CSS: Cascading Style Sheets
<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 editor's draft css va...
Child combinator - CSS: Cascading Style Sheets
this is stricter than the descendant combinator, which matches all elements matched by the second selector for which there exists an ancestor element matched by the first selector, regardless of the
number of "hops" up the dom.
CSS reference - CSS: Cascading Style Sheets
epeatmask-sizemask-typematrix()matrix3d()max()max-block-sizemax-heightmax-height (@viewport)max-inline-sizemax-widthmax-width (@viewport)max-zoom (@viewport)@mediamin()min-block-sizemin-heightmin-height (@viewport)min-inline-sizemin-widthmin-width (@viewport)min-zoom (@viewport)minmax()mix-blend-modemmmsn@namespacenegative (@counter-style):not:nth-child:nth-last-child:nth-last-of-type:nth-of-type<
number>oobject-fitobject-positionoffsetoffset-anchoroffset-distanceoffset-pathoffset-rotate:only-child:only-of-typeopacityopacity():optionalorderorientation (@viewport)@ornamentsornaments()orphans:out-of-rangeoutlineoutline-coloroutline-offsetoutline-styleoutline-widthoverflowoverflow-anchoroverflow-blockoverflow-inlineoverflow-wrapoverflow-xoverflow-yoverscroll-behavioroverscroll-behavior-blockoverscro...
background-position - CSS: Cascading Style Sheets
14safari ios full support 7samsung internet android full support 1.5legend full support full support quantum css notes gecko has a bug meaning that background-position can't be transitioned between two values containing different
numbers of <position> values, for example background-position: 10px 10px; and background-position: 20px 20px, 30px 30px; (see bug 1390446).
box-ordinal-group - CSS: Cascading Style Sheets
when the computed box-direction is normal, a box will display its elements starting from the lowest
numbered ordinal group and ensure that those elements appear to the left (for horizontal boxes) or at the top (for vertical boxes) of the container.
color-adjust - CSS: Cascading Style Sheets
usage notes there are a
number of reasons a browser might wish to deviate from the specified appearance, such as: the content uses text and background colors that will be too similar on the output device for legibility purposes.
contain - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | strict | content | [ size | layout | style | paint ] examples simple layout the markup below consists of a
number of articles, each with content: <h1>my blog</h1> <article> <h2>heading of a nice article</h2> <p>content here.</p> </article> <article> <h2>another heading of another article</h2> <img src="graphic.jpg" alt="photo"> <p>more content here.</p> </article> each <article> and <img> is given a border, and the images are floated: img { float: left; border: 3px solid black; } article { ...
<custom-ident> - CSS: Cascading Style Sheets
examples valid identifiers nono79 a mix of alphanumeric characters and
numbers ground-level a mix of alphanumeric characters and a dash -test a dash followed by alphanumeric characters _internal an underscore followed by alphanumeric characters \22 toto a unicode character followed by a sequence of alphanumeric characters bili\.bob a correctly escaped period invalid identifiers 34rem it must not start with a decimal ...
font-size - CSS: Cascading Style Sheets
this is an os-independent and cross-browser way of literally telling the browsers to render the letters at exactly the
number of pixels in height that you specified.
font - CSS: Cascading Style Sheets
s 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 [ [ <'font-style'> | <font-variant-css21> | <'font-weight'> | <'font-stretch'> ]?
grid-template-columns - CSS: Cascading Style Sheets
repeat( [ <positive-integer> | auto-fill | auto-fit ] , <track-list> ) represents a repeated fragment of the track list, allowing a large
number of columns that exhibit a recurring pattern to be written in a more compact form.
grid-template-rows - CSS: Cascading Style Sheets
repeat( [ <positive-integer> | auto-fill | auto-fit ] , <track-list> ) represents a repeated fragment of the track list, allowing a large
number of rows that exhibit a recurring pattern to be written in a more compact form.
ident - CSS: Cascading Style Sheets
examples valid identifiers nono79 a mix of alphanumeric characters and
numbers ground-level a mix of alphanumeric characters and a dash -test a dash followed by alphanumeric characters --toto a custom-property like identifier _internal an underscore followed by alphanumeric characters \22 toto a unicode character followed by a sequence of alphanumeric characters bili\.bob a correctly escaped period invalid identifiers 34rem it must not start wi...
<shape> - CSS: Cascading Style Sheets
interpolation when animated, values of the <shape> data type are interpolated over their top, right, bottom, and left components, each treated as a real, floating-point
number.
scaleY() - CSS: Cascading Style Sheets
transform: rotatex(180deg); === transform: scaley(-1); syntax scaley(s) values s is a <
number> representing the scaling factor to apply on the ordinate of each point of the element.
exsl:object-type() - EXSLT
returns the object's type, which will be one of the following: string
number boolean node-set rtf external specifications exslt - exsl:object-type ...
math:highest() - EXSLT
a node has this maximum value if converting its string value to a
number equals the maximum value.
math:lowest() - EXSLT
a node has this minimum value if converting its string value to a
number equals the minimum value.
EXSLT
there are a
number of modules; those that are supported by firefox are listed below: common (exsl)the exslt common package provides basic functions that expand upon the capabilities of xslt.math (math)the exslt math package provides functions for working with numeric values and comparing nodes.regular expressions (regexp)the exslt regular expressions package provides functions that allow testing, matching, and replacing text using javascript style regular expressions.sets (set)the exslt sets package offers functions that let you perform set manipulation.strings (str)the exslt strings package provides functions that allow the manipulation of strings.
Getting Started - Developer guides
you can also add an always-different get parameter, like a timestamp or random
number (see bypassing the cache) note 3: if the httprequest variable is used globally, competing functions calling makerequest() can overwrite each other, causing a race condition.
Ajax - Developer guides
asynchronous javascript and xml, while not a technology in itself, is a term coined in 2005 by jesse james garrett, that describes a "new" approach to using a
number of existing technologies together, including html or xhtml, css, javascript, dom, xml, xslt, and most importantly the xmlhttprequest object.
Event developer guide - Developer guides
events refers both to a design pattern used for the asynchronous handling of various incidents which occur in the lifetime of a web page and to the naming, characterization, and use of a large
number of incidents of different types.
Rich-Text Editing in Mozilla - Developer guides
ick="formatdoc('justifycenter');" src="data:image/gif;base64,r0lgodlhfgawaid/amdawaaaach5baeaaaaalaaaaaawabyaqaifhi+py+0po5y02ouz3jl4d4jogi7kaz5bqn4sycvbaqa7" /> <img class="intlink" title="right align" onclick="formatdoc('justifyright');" src="data:image/gif;base64,r0lgodlhfgawaid/amdawaaaach5baeaaaaalaaaaaawabyaqaighi+py+0po5y02ouz3jl4d4jqgdlkgyxouqzl43jyvgaaow==" /> <img class="intlink" title="
numbered list" onclick="formatdoc('insertorderedlist');" src="data:image/gif;base64,r0lgodlhfgawamigaaaaadljwlie35gjuaezxtha7p///////yh5baeaaacalaaaaaawabyaaam2elrc/jdksespwjorfvggcbubotfbeq6qiaysqnrhaeozyaz07lu9lubnc0ugqu1k52s6n5oeads=" /> <img class="intlink" title="dotted list" onclick="formatdoc('insertunorderedlist');" src="data:image/gif;base64,r0lgodlhfgawamigaaaaab1chf9vj1ie33morqezxv///////yh5b...
Making content editable - Developer guides
ick="formatdoc('justifycenter');" src="data:image/gif;base64,r0lgodlhfgawaid/amdawaaaach5baeaaaaalaaaaaawabyaqaifhi+py+0po5y02ouz3jl4d4jogi7kaz5bqn4sycvbaqa7" /> <img class="intlink" title="right align" onclick="formatdoc('justifyright');" src="data:image/gif;base64,r0lgodlhfgawaid/amdawaaaach5baeaaaaalaaaaaawabyaqaighi+py+0po5y02ouz3jl4d4jqgdlkgyxouqzl43jyvgaaow==" /> <img class="intlink" title="
numbered list" onclick="formatdoc('insertorderedlist');" src="data:image/gif;base64,r0lgodlhfgawamigaaaaadljwlie35gjuaezxtha7p///////yh5baeaaacalaaaaaawabyaaam2elrc/jdksespwjorfvggcbubotfbeq6qiaysqnrhaeozyaz07lu9lubnc0ugqu1k52s6n5oeads=" /> <img class="intlink" title="dotted list" onclick="formatdoc('insertunorderedlist');" src="data:image/gif;base64,r0lgodlhfgawamigaaaaab1chf9vj1ie33morqezxv///////yh5b...
HTML5 - Developer guides
new semantic elements beside sections, media and forms elements, there are numerous new elements, like <mark>, <figure>, <figcaption>, <data>, <time>, <output>, <progress>, or <meter> and <main>, increasing the
number of valid html5 elements.
Printing - Developer guides
there are a
number of possible scenarios: you wish to adjust layout to take advantage of the size and shape of the paper.
Writing forward-compatible websites - Developer guides
for example, if you have tested that your default code path runs properly in firefox aurora but firefox beta and the latest release have a bug that make your default code path fail, it is ok to treat the firefox version
number that is in aurora at the moment of testing as "current", and consider the beta version as a "past" version even though it hasn't been released to the general public yet.
Developer guides
events developer guide events refer to two things: a design pattern used for the asynchronous handling of various incidents which occur in the lifetime of a web page; and the naming, characterization, and use of a large
number of incidents of different types.
HTML attribute: accept - HTML: Hypertext Markup Language
for instance, there are a
number of ways microsoft word files can be identified, so a site that accepts word files might use an <input> like this: <input type="file" id="docpicker" accept=".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"> whereas if you're accepting a media file, you may want to be include any format of that media type: <input type="file" id="soundfile" ...
disabled - HTML: Hypertext Markup Language
ion>option 2.3</option> </optgroup> <optgroup label="group 3" disabled> <option>disabled 3.1</option> <option>disabled 3.2</option> <option>disabled 3.3</option> </optgroup> </select> </label> </p> <fieldset disabled> <legend>disabled fieldset</legend> <p> <label>name: <input type="name" name="radio" value="regular"> regular </label> </p> <p> <label>
number: <input type="
number"></label> </p> </fieldset> specifications specification status comment html living standardthe definition of 'disabled attribute' in that specification.
HTML attribute: readonly - HTML: Hypertext Markup Language
the readonly attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local, and
number<input> types and the <textarea> form control elements.
HTML attribute: required - HTML: Hypertext Markup Language
the required attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local,
number, checkbox, radio, file, <input> types along with the <select> and <textarea> form control elements.
<address>: The Contact Address element - HTML: Hypertext Markup Language
the contact information provided by an <address> element's contents can take whatever form is appropriate for the context, and may include any type of contact information that is needed, such as a physical address, url, email address, phone
number, social media handle, geographic coordinates, and so forth.
<keygen> - HTML: Hypertext Markup Language
(note: choice of the
number of key strengths, default values for each strength, and the ui by which the user is offered a choice, are outside of the scope of this specification.) the <keygen> element is only valid within an html form.
accesskey - HTML: Hypertext Markup Language
accesskey values that rely on
numbers may be confusing to individuals experiencing cognitive concerns, where the
number doesn't have a logical association with the functionality it triggers.
itemprop - HTML: Hypertext Markup Language
temprop="name">neil</span>.</p> <p>my band is called <span itemprop="band">four parts water</span>.</p> <p>i am <span itemprop="nationality">british</span>.</p> </div> one property, "image", whose value is a url <div itemscope> <img itemprop="image" src="google-logo.png" alt="google"> </div> when a string value can't be easily read and understood by a person (e.g., a long string of
numbers and letters), it can be displayed using the value attribute of the data element, with the more easily-understood-by-a human-version given in the element's contents (which is not part of the structured data - see example below).
lang - HTML: Hypertext Markup Language
this subtag defines a dialect of the base language from a particular location, and is either 2 letters in allcaps matching a country code, or 3
numbers matching a non-country area.
Microformats - HTML: Hypertext Markup Language
u-email email address u-photo a photo of the person or organization u-url home page or other url representing the person or organization u-uid universally unique identifier, preferably canonical url p-street-address street
number + name p-locality city/town/village p-country-name country name nested h-card example <div class="h-card"> <a class="p-name u-url" href="http://blog.lizardwrangler.com/" >mitchell baker</a> (<a class="p-org h-card" href="http://mozilla.org/" >mozilla foundation</a>) </div> parsed json: { "items": [{ "type": ["h-card"], "properties": { ...
Evolution of HTTP - HTTP
http/0.9 – the one-line protocol the initial version of http had no version
number; it has been later called 0.9 to differentiate it from the later versions.
Access-Control-Max-Age - HTTP
header type response header forbidden header name no syntax access-control-max-age: <delta-seconds> directives <delta-seconds> maximum
number of seconds the results can be cached.
Cache-Control - HTTP
min-fresh=<seconds> indicates the client wants a response that will still be fresh for at least the specified
number of seconds.
Content-Length - HTTP
header type entity header forbidden header name yes syntax content-length: <length> directives <length> the length in decimal
number of octets.
Content-Location - HTTP
<input type="
number" name="amount"> </label> </p> <button type="submit">send money</button> </form> when the form is submitted, the site generates a receipt for the transaction.
Device-Memory - HTTP
device-memory: <
number> examples server first needs to opt in to receive device-memory header by sending the response headers accept-ch containing device-memory and accept-ch-lifetime.
ETag - HTTP
often, a hash of the content, a hash of the last modification timestamp, or just a revision
number is used.
Expect-CT - HTTP
header type response header forbidden header name yes syntax expect-ct: report-uri="<uri>", enforce, max-age=<age> directives max-age the
number of seconds after reception of the expect-ct header field during which the user agent should regard the host of the received message as a known expect-ct host.
Keep-Alive - HTTP
max: indicating the maximum
number of requests that can be sent on this connection before closing it.
Origin - HTTP
<port> optional tcp port
number on which the server is listening.
Range - HTTP
<suffix-length> an integer in the given unit indicating the
number of units at the end of the file to return.
Set-Cookie2 - HTTP
me>=<cookie-value>; comment=<value> set-cookie2: <cookie-name>=<cookie-value>; commenturl=<http-url> set-cookie2: <cookie-name>=<cookie-value>; discard set-cookie2: <cookie-name>=<cookie-value>; domain=<domain-value> set-cookie2: <cookie-name>=<cookie-value>; max-age=<non-zero-digit> set-cookie2: <cookie-name>=<cookie-value>; path=<path-value> set-cookie2: <cookie-name>=<cookie-value>; port=<port-
number> set-cookie2: <cookie-name>=<cookie-value>; secure set-cookie2: <cookie-name>=<cookie-value>; version=<version-
number> // multiple directives are also possible, for example: set-cookie2: <cookie-name>=<cookie-value>; domain=<domain-value>; secure // multiple cookies are seperated by a comma set-cookie2: <cookie-name>=<cookie-value>, <cookie-name>=<cookie-value>, ...
Warning - HTTP
header type general header forbidden header name no syntax warning: <warn-code> <warn-agent> <warn-text> [<warn-date>] directives <warn-code> a three-digit warning
number.
PATCH - HTTP
the word "idempotent" means that any
number of repeated, identical requests will leave the resource in the same state.
Redirections in HTTP - HTTP
<head> <meta http-equiv="refresh" content="0; url=https://example.com/"> </head> the content attribute should start with a
number indicating how many seconds the browser should wait before redirecting to the given url.
HTTP resources and specifications - HTTP
thentication proposed standard rfc 6265 http state management mechanism defines cookies proposed standard draft spec cookie prefixes ietf draft draft spec same-site cookies ietf draft draft spec deprecate modification of 'secure' cookies from non-secure origins ietf draft rfc 2145 use and interpretation of http version
numbers informational rfc 6585 additional http status codes proposed standard rfc 7538 the hypertext transfer protocol status code 308 (permanent redirect) proposed standard rfc 7725 an http status code to report legal obstacles on the standard track rfc 2397 the "data" url scheme proposed standard rfc 3986 uniform resource ident...
About JavaScript - JavaScript
the basic syntax is intentionally similar to both java and c++ to reduce the
number of new concepts required to learn the language.
Introduction - JavaScript
in contrast to java's compile-time system of classes built by declarations, javascript supports a runtime system based on a small
number of data types representing numeric, boolean, and string values.
Keyed collections - JavaScript
use maps if there is a need to store primitive values as keys because object treats each key as a string whether it's a
number value, boolean value or any other primitive value.
Meta programming - JavaScript
here, an object that is proxied will not return undefined when getting undefined properties, but will instead return the
number 42.
Using Promises - JavaScript
array of asynchronous functions down to a promise chain equivalent to: promise.resolve().then(func1).then(func2).then(func3); this can be made into a reusable compose function, which is common in functional programming: const applyasync = (acc,val) => acc.then(val); const composeasync = (...funcs) => x => funcs.reduce(applyasync, promise.resolve(x)); the composeasync() function will accept any
number of functions as arguments, and will return a new function that accepts an initial value to be passed through the composition pipeline: const transformdata = composeasync(func1, func2, func3); const result3 = transformdata(data); in ecmascript 2017, sequential composition can be done more simply with async/await: let result; for (const f of [func1, func2, func3]) { result = await f(result); ...
JavaScript Guide - JavaScript
ch/throw error objects loops and iteration for while do...while break/continue for..in for..of functions defining functions calling functions function scope closures arguments & parameters arrow functions expressions and operators assignment & comparisons arithmetic operators bitwise & logical operators conditional (ternary) operator
numbers and dates
number literals
number object math object date object text formatting string literals string object template literals internationalization regular expressions indexed collections arrays typed arrays keyed collections map weakmap set weakset working with objects objects and properties creating objects defining methods gett...
Memory Management - JavaScript
var n = 123; // allocates memory for a
number var s = 'azerty'; // allocates memory for a string var o = { a: 1, b: null }; // allocates memory for an object and contained values // (like object) allocates memory for the array and // contained values var a = [1, null, 'abra']; function f(a) { return a + 2; } // allocates a function (which is a callable object) // function expressions also allocate an object someelement.addeventlist...
SyntaxError: "0"-prefixed octal literals and octal escape seq. are deprecated - JavaScript
examples "0"-prefixed octal literals "use strict"; 03; // syntaxerror: "0"-prefixed octal literals and octal escape sequences // are deprecated octal escape sequences "use strict"; "\251"; // syntaxerror: "0"-prefixed octal literals and octal escape sequences // are deprecated valid octal
numbers use a leading zero followed by the letter "o" or "o": 0o3; for octal escape sequences, you can use hexadecimal escape sequences instead: '\xa9'; ...
TypeError: "x" is not a non-null object - JavaScript
providing no object (like just a
number), will throw an error: object.defineproperty({}, 'key', 1); // typeerror: 1 is not a non-null object object.defineproperty({}, 'key', null); // typeerror: null is not a non-null object a valid property descriptor object might look like this: object.defineproperty({}, 'key', { value: 'foo', writable: false }); weakmap and weakset objects require object keys weakmap and weakset objects stor...
TypeError: "x" is not a function - JavaScript
let obj = {a: 13, b: 37, c: 42}; obj.map(function(num) { return num * 2; }); // typeerror: obj.map is not a function use an array instead: let
numbers = [1, 4, 9];
numbers.map(function(num) { return num * 2; }); // array [2, 8, 18] function shares a name with a pre-existing property sometimes when making a class, you may have a property and a function with the same name.
TypeError: Reduce of empty array with no initial value - JavaScript
similarly, the same issue can happen if there is a typo in a selector, or an unexpected
number of elements in a list: var names = document.getelementsbyclassname("names"); var name_list = array.prototype.reduce.call(names, (acc, name) => acc + ", " + name); valid cases these problems can be solved in two different ways.
getter - JavaScript
note the following when working with the get syntax: it can have an identifier which is either a
number or a string; it must have exactly zero parameters (see incompatible es5 change: literal getter and setter functions must now have exactly zero or one arguments for more information); it must not appear in an object literal with another get or with a data entry for the same property ({ get x() { }, get x() { } } and { x: ..., get x() { } } are forbidden).
setter - JavaScript
note the following when working with the set syntax: it can have an identifier which is either a
number or a string; it must have exactly one parameter (see incompatible es5 change: literal getter and setter functions must now have exactly zero or one arguments for more information); it must not appear in an object literal with another set or with a data entry for the same property.
Array.prototype.reduce() - JavaScript
const
numbers = [-5, 6, 2, 0,]; const doubledpositive
numbers =
numbers.reduce((accumulator, currentvalue) => { if (currentvalue > 0) { const doubled = currentvalue * 2; accumulator.push(doubled); } return accumulator; }, []); console.log(doubledpositive
numbers); // [12, 4] running promises in sequence /** * runs promises from array of functions that can return promises * in chained manner ...
Array.prototype.reduceRight() - JavaScript
* * h(x) = f(g(x)) * * function execution happens right to left * * https://en.wikipedia.org/wiki/function_composition */ const compose = (...args) => (value) => args.reduceright((acc, fn) => fn(acc), value) // increment passed
number const inc = (n) => n + 1 // doubles the passed value const double = (n) => n * 2 // using composition function console.log(compose(double, inc)(2)); // 6 // using composition function console.log(compose(inc, double)(2)); // 5 specifications specification ecmascript (ecma-262)the definition of 'array.prototype.reduceright' in that specification.
Array.prototype.find() - JavaScript
'cherries'; } console.log(inventory.find(ischerries)); // { name: 'cherries', quantity: 5 } using arrow function and destructuring const inventory = [ {name: 'apples', quantity: 2}, {name: 'bananas', quantity: 0}, {name: 'cherries', quantity: 5} ]; const result = inventory.find( ({ name }) => name === 'cherries' ); console.log(result) // { name: 'cherries', quantity: 5 } find a prime
number in an array the following example finds an element in the array that is a prime
number (or returns undefined if there is no prime
number): function isprime(element, index, array) { let start = 2; while (start <= math.sqrt(element)) { if (element % start++ < 1) { return false; } } return element > 1; } console.log([4, 6, 8, 12].find(isprime)); // undefined, not found conso...
Array.prototype.findIndex() - JavaScript
examples find the index of a prime
number in an array the following example returns the index of the first element in the array that is a prime
number, or -1 if there is no prime
number.
Array.prototype.includes() - JavaScript
the first element to be searched is found at fromindex for positive values of fromindex, or at arr.length + fromindex for negative values of fromindex (using the absolute value of fromindex as the
number of elements from the end of the array at which to start the search).
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.
Date.prototype.getDate() - JavaScript
syntax dateobj.getdate() return value an integer
number, between 1 and 31, representing the day of the month for the given date according to local time.
Date.prototype.getDay() - JavaScript
syntax dateobj.getday() return value an integer
number, between 0 and 6, corresponding to the day of the week for the given date, according to local time: 0 for sunday, 1 for monday, 2 for tuesday, and so on.
Date.prototype.getUTCDay() - JavaScript
syntax dateobj.getutcday() return value an integer
number corresponding to the day of the week for the given date, according to universal time: 0 for sunday, 1 for monday, 2 for tuesday, and so on.
Date.prototype.toISOString() - JavaScript
engines which have not been updated to support this method can work around the absence of this method using the following shim: if (!date.prototype.toisostring) { (function() { function pad(
number) { if (
number < 10) { return '0' +
number; } return
number; } date.prototype.toisostring = function() { return this.getutcfullyear() + '-' + pad(this.getutcmonth() + 1) + '-' + pad(this.getutcdate()) + 't' + pad(this.getutchours()) + ':' + pad(this.getutcminutes()) + ':' + pad(this.getutcseconds()) + '.' + (t...
Float32Array() constructor - JavaScript
the float32array() typed array constructor creates a new float32array object, which is, an array of 32-bit floating point
numbers (corresponding to the c float data type) in the platform byte order.
Float64Array() constructor - JavaScript
the float64array() typed array constructor creates a new float64array object, which is, an array of 64-bit floating point
numbers (corresponding to the c double data type) in the platform byte order.
Intl.Collator.prototype.compare() - JavaScript
description the compare getter function returns a
number indicating how string1 and string2 compare to each other according to the sort order of this collator object: a negative value if string1 comes before string2; a positive value if string1 comes after string2; 0 if they are considered equal.
Intl.DateTimeFormat - JavaScript
" // to specify options but use the browser's default locale, use 'default' console.log(new intl.datetimeformat('default', options).format(date)); // → "12/19/2012, 19:00:00" // sometimes it's helpful to include the period of the day options = {hour: "numeric", dayperiod: "short"}; console.log(new intl.datetimeformat('en-us', options).format(date)); // → 10 at night the used calendar and
numbering formats can also be set independently via options arguments: var options = {calendar: 'chinese',
numberingsystem: 'arab'}; var dateformat = new intl.datetimeformat('default', options); var usedoptions = dateformat.resolvedoptions(); console.log(usedoptions.calendar); // → "chinese" console.log(usedoptions.
numberingsystem); // → "arab" console.log(usedoptions.timezone); // → "america/...
Object.prototype.__proto__ - JavaScript
for objects created using new fun, where fun is one of the built-in constructor functions provided by javascript (array, boolean, date,
number, object, string, and so on — including new constructors added as javascript evolves), this value is always fun.prototype.
String.prototype.indexOf() - JavaScript
const mystring = 'brie, pepper jack, cheddar' const mycapstring = 'brie, pepper jack, cheddar' console.log('mystring.indexof("cheddar") is ' + mystring.indexof('cheddar')) // logs 19 console.log('mycapstring.indexof("cheddar") is ' + mycapstring.indexof('cheddar')) // logs -1 using indexof() to count occurrences of a letter in a string the following example sets count to the
number of occurrences of the letter e in the string str: const str = 'to be, or not to be, that is the question.' let count = 0 let position = str.indexof('e') while (position !== -1) { count++ position = str.indexof('e', position + 1) } console.log(count) // displays 4 specifications specification ecmascript (ecma-262)the definition of 'string.prototype.indexof' in that...
String.prototype.padStart() - JavaScript
examples basic examples 'abc'.padstart(10); // " abc" 'abc'.padstart(10, "foo"); // "foofoofabc" 'abc'.padstart(6,"123465"); // "123abc" 'abc'.padstart(8, "0"); // "00000abc" 'abc'.padstart(1); // "abc" fixed width string
number conversion // javascript version of: (unsigned) // printf "%0*d" width num function leftfillnum(num, targetlength) { return num.tostring().padstart(targetlength, 0); } const num = 123; console.log(leftfillnum(num, 5)); // expected output: "00123" specifications specification ecmascript (ecma-262)the definition of 'string.prototype.padstart' in that specification.
Symbol() constructor - JavaScript
'foo') // false new symbol(...) the following syntax with the new operator will throw a typeerror: let sym = new symbol() // typeerror this prevents authors from creating an explicit symbol wrapper object instead of a new symbol value and might be surprising as creating explicit wrapper objects around primitive data types is generally possible (for example, new boolean, new string and new
number).
Symbol.isConcatSpreadable - JavaScript
symbol.isconcatspreadable needs to be set to true in order to get a flattened array: let x = [1, 2, 3] let fakearray = { [symbol.isconcatspreadable]: true, length: 2, 0: 'hello', 1: 'world' } x.concat(fakearray) // [1, 2, 3, "hello", "world"] note: the length property is used to control the
number of object properties to be added.
Symbol.matchAll - JavaScript
property attributes of symbol.matchall writable no enumerable no configurable no examples using symbol.matchall let re = /[0-9]+/g; let str = '2016-01-02|2019-03-07'; const
numbers = { *[symbol.matchall] (str) { for (const n of str.matchall(/[0-9]+/g)) yield n[0]; } }; console.log(array.from(str.matchall(
numbers))); // array ["2016", "01", "02", "2019", "03", "07"] see string.prototype.matchall() and regexp.prototype[@@matchall]() for more examples.
Symbol.toStringTag - JavaScript
property attributes of symbol.tostringtag writable no enumerable no configurable no examples default tags object.prototype.tostring.call('foo'); // "[object string]" object.prototype.tostring.call([1, 2]); // "[object array]" object.prototype.tostring.call(3); // "[object
number]" object.prototype.tostring.call(true); // "[object boolean]" object.prototype.tostring.call(undefined); // "[object undefined]" object.prototype.tostring.call(null); // "[object null]" // ...
TypedArray.prototype.find() - JavaScript
examples find a prime
number in a typed array the following example finds an element in the typed array that is a prime
number (or returns undefined if there is no prime
number).
TypedArray.prototype.findIndex() - JavaScript
{ // optimize for thisarg for (i in this) { if (evaluator(this[i], i, this)) { return i; } } return -1; } for (i in this) { if (evaluator.call(thisarg, this[i], i, this)) { return i; } } return -1; }; examples find the index of a prime
number in a typed array the following example finds the index of an element in the typed array that is a prime
number (or returns -1 if there is no prime
number).
TypedArray.from() - JavaScript
})(); } examples from an iterable object (set) const s = new set([1, 2, 3]); uint8array.from(s); // uint8array [ 1, 2, 3 ] from a string int16array.from('123'); // int16array [ 1, 2, 3 ] use with arrow function and map using an arrow function as the map function to manipulate the elements float32array.from([1, 2, 3], x => x + x); // float32array [ 2, 4, 6 ] generate a sequence of
numbers uint8array.from({length: 5}, (v, k) => k); // uint8array [ 0, 1, 2, 3, 4 ] specifications specification ecmascript (ecma-262)the definition of '%typedarray%.from' in that specification.
WeakMap - JavaScript
such an implementation would have two main inconveniences: the first one is an o(n) set and search (n being the
number of keys in the map) since both operations must iterate through the list of keys to find a matching value.
WeakSet - JavaScript
the
number of objects or their traversal order is immaterial, so a weakset is more suitable (and performant) than a set for tracking object references, especially if a very large
number of objects is involved.
WebAssembly.Memory - JavaScript
instance methods memory.prototype.grow() increases the size of the memory instance by a specified
number of webassembly pages (each one is 64kb in size).
encodeURIComponent() - JavaScript
~ * ' ( ) encodeuricomponent() differs from encodeuri as follows: var set1 = ";,/?:@&=+$"; // reserved characters var set2 = "-_.!~*'()"; // unescaped characters var set3 = "#"; //
number sign var set4 = "abc abc 123"; // alphanumeric characters + space console.log(encodeuri(set1)); // ;,/?:@&=+$ console.log(encodeuri(set2)); // -_.!~*'() console.log(encodeuri(set3)); // # console.log(encodeuri(set4)); // abc%20abc%20123 (the space gets encoded as %20) console.log(encodeuricomponent(set1)); // %3b%2c%2f%3f%3a%40%26%3d%2b%24 console.log(encodeuricomponent(set2)); // -_.!~*'() con...
Addition (+) - JavaScript
syntax operator: x + y examples numeric addition //
number +
number -> addition 1 + 2 // 3 // boolean +
number -> addition true + 1 // 2 // boolean + boolean -> addition false + false // 0 string concatenation // string + string -> concatenation 'foo' + 'bar' // "foobar" //
number + string -> concatenation 5 + 'foo' // "5foo" // string + boolean -> concatenation 'foo' + false // "foofalse" specifications specification ecmascript (ecma-262)the definiti...
Addition assignment (+=) - JavaScript
syntax operator: x += y meaning: x = x + y examples using addition assignment // assuming the following variables // foo = 'foo' // bar = 5 // baz = true //
number +
number -> addition bar += 2 // 7 // boolean +
number -> addition baz += 1 // 2 // boolean + boolean -> addition baz += false // 1 //
number + string -> concatenation bar += 'foo' // "5foo" // string + boolean -> concatenation foo += false // "foofalse" // string + string -> concatenation foo += 'bar' // "foobar" specifications specification ecmascript (ecma-262)the defi...
Greater than or equal (>=) - JavaScript
examples string to string comparison console.log("a" >= "b"); // false console.log("a" >= "a"); // true console.log("a" >= "3"); // true string to
number comparison console.log("5" >= 3); // true console.log("3" >= 3); // true console.log("3" >= 5); // false console.log("hello" >= 5); // false console.log(5 >= "hello"); // false
number to
number comparison console.log(5 >= 3); // true console.log(3 >= 3); // true console.log(3 >= 5); // false
number to bigint comparison console.log(5n >= 3); ...
Inequality (!=) - JavaScript
// false "hello" != "hello"; // false comparison with type conversion "1" != 1; // false 1 != "1"; // false 0 != false; // false 0 != null; // true 0 != undefined; // true 0 != !!null; // false, look at logical not operator 0 != !!undefined; // false, look at logical not operator null != undefined; // false const
number1 = new
number(3); const
number2 = new
number(3);
number1 != 3; // false
number1 !=
number2; // true comparison of objects const object1 = {"key": "value"} const object2 = {"key": "value"}; object1 != object2 // true object2 != object2 // false specifications specification ecmascript (ecma-262)the definition of 'equality operators' in that specification.
Less than or equal (<=) - JavaScript
examples string to string comparison console.log("a" <= "b"); // true console.log("a" <= "a"); // true console.log("a" <= "3"); // false string to
number comparison console.log("5" <= 3); // false console.log("3" <= 3); // true console.log("3" <= 5); // true console.log("hello" <= 5); // false console.log(5 <= "hello"); // false
number to
number comparison console.log(5 <= 3); // false console.log(3 <= 3); // true console.log(3 <= 5); // true
number to bigint comparison console.log(5n <= 3); ...
Multiplication (*) - JavaScript
syntax operator: x * y examples multiplication using
numbers 2 * 2 // 4 -2 * 2 // -4 multiplication with infinity infinity * 0 // nan infinity * infinity // infinity multiplication with non-
numbers 'foo' * 2 // nan specifications specification ecmascript (ecma-262)the definition of 'multiplication operator' in that specification.
Subtraction (-) - JavaScript
syntax operator: x - y examples subtraction with
numbers 5 - 3 // 2 3 - 5 // -2 subtraction with non-
numbers 'foo' - 3 // nan specifications specification ecmascript (ecma-262)the definition of 'subtraction operator' in that specification.
Unary negation (-) - JavaScript
syntax operator: -x examples negating
numbers const x = 3; const y = -x; // y = -3 // x = 3 negating non-
numbers the unary negation operator can convert a non-
number into a
number.
in operator - JavaScript
// arrays let trees = ['redwood', 'bay', 'cedar', 'oak', 'maple'] 0 in trees // returns true 3 in trees // returns true 6 in trees // returns false 'bay' in trees // returns false (you must specify the index
number, not the value at that index) 'length' in trees // returns true (length is an array property) symbol.iterator in trees // returns true (arrays are iterable, works only in es2015+) // predefined objects '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 speci...
label - JavaScript
tinue loop1; } console.log('i = ' + i + ', j = ' + j); } } // output is: // "i = 0, j = 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.
return - JavaScript
for example, the following function returns the square of its argument, x, where x is a
number.
switch - JavaScript
var foo = 1; var output = 'output: '; switch (foo) { case 0: output += 'so '; case 1: output += 'what '; output += 'is '; case 2: output += 'your '; case 3: output += 'name'; case 4: output += '?'; console.log(output); break; case 5: output += '!'; console.log(output); break; default: console.log('please pick a
number from 0 to 5!'); } the output from this example: value log text foo is nan or not 1, 2, 3, 4, 5, or 0 please pick a
number from 0 to 5!
throw - JavaScript
function userexception(message) { this.message = message; this.name = 'userexception'; } function getmonthname(mo) { mo = mo - 1; // adjust month
number for array index (1 = jan, 12 = dec) var months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']; if (months[mo] !== undefined) { return months[mo]; } else { throw new userexception('invalidmonthno'); } } try { // statements to try var mymonth = 15; // 15 is out of bound to raise the exception var monthname = getmonthnam...
Template literals (Template strings) - JavaScript
function template(strings, ...keys) { return (function(...values) { let dict = values[values.length - 1] || {}; let result = [strings[0]]; keys.foreach(function(key, i) { let value =
number.isinteger(key) ?
<math> - MathML
in addition you must not nest a second <math> element in another, but you can have an arbitrary
number of other child elements in it.
<mn> - MathML
mathvariant this attribute specifies the logical class of the
number which varies in typography.
MathML element reference - MathML
lignmark> (alignment points) e <menclose> (enclosed contents) <merror> (enclosed syntax error messages) f <mfenced> (parentheses) <mfrac> (fraction) g <mglyph> (displaying non-standard symbols) i <mi> (identifier) l <mlabeledtr> (labeled row in a table or a matrix) <mlongdiv> (long division notation) m <mmultiscripts> (prescripts and tensor indices) n <mn> (
number) o <mo> (operator) <mover> (overscript) p <mpadded> (space around content) <mphantom> (invisible content with reserved space) r <mroot> (radical with specified index) <mrow> (grouped sub-expressions) s <ms> (string literal) <mscarries> (annotations such as carries) <mscarry> (single carry, child element of <mscarries>) <msgroup> (grouped rows of <mstack> and <mlongdiv> e...
Web media technologies
today, there are a large
number of apis available, as well as html elements, dom interfaces, and other features that make it possible to not only perform these tasks, but use media in tandem with other technologies to do truly remarkable things.
Web Performance
by minimizing the
number of dom nodes, making sure the best order and attributes are used for including content such as styles, scripts, media, and third-party scripts, you can drastically improve the user experience.
Privacy, permissions, and information security
personally identification can include information like usernames, real names, passwords, phone
numbers or addresses (or even portions of them), information about medical history, social security
numbers, driver licenses, or any other form of id or id
number, credit card information, and so forth.
Web technology reference
the open web is based on a
number of technologies which, together, can be used to create everything from simple sites to powerful web applications.
accent-height - SVG: Scalable Vector Graphics
value <
number> default value value of ascent animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'accent-height' in that specification.
alphabetic - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value 0 animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'alphabetic' in that specification.
amplitude - SVG: Scalable Vector Graphics
four elements are using this attribute: <fefunca>, <fefuncb>, <fefuncg>, and <fefuncr> usage notes value <
number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'amplitude' in that specification.
ascent - SVG: Scalable Vector Graphics
value <
number> default value difference between units-per-em and vert-origin-y animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'ascent' in that specification.
azimuth - SVG: Scalable Vector Graphics
h="0" /> </fediffuselighting> </filter> <filter id="distantlight2"> <fediffuselighting> <fedistantlight azimuth="240" /> </fediffuselighting> </filter> <circle cx="100" cy="100" r="80" style="filter: url(#distantlight1);" /> <circle cx="100" cy="100" r="80" style="filter: url(#distantlight2); transform: translatex(240px);" /> </svg> usage notes value <
number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'azimuth' in that specification.
bbox - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <string> default value none animatable no <string> a comma-separated list of exactly four
numbers specifying, in order, the lower left x, lower left y, upper right x, and upper right y of the bounding box for the complete font.
begin - SVG: Scalable Vector Graphics
a valid repeat value consists of an element id followed by a dot and the function repeat() with an integer value specifying the
number of repetitions as parameter.
cap-height - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'cap-height' in that specification.
descent - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value value of vert-origin-y animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'descent' in that specification.
elevation - SVG: Scalable Vector Graphics
="0" /> </fediffuselighting> </filter> <filter id="distantlight2"> <fediffuselighting> <fedistantlight elevation="45" /> </fediffuselighting> </filter> <circle cx="100" cy="100" r="80" style="filter: url(#distantlight1);" /> <circle cx="100" cy="100" r="80" style="filter: url(#distantlight2); transform: translatex(240px);" /> </svg> usage notes value <
number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'elevation' in that specification.
enable-background - SVG: Scalable Vector Graphics
the optional <x>, <y>, <width>, and <height> parameters are <
number> values that indicate the subregion of the container elementʼs user space where access to the background image is allowed to happen.
end - SVG: Scalable Vector Graphics
a valid repeat value consists of an element id followed by a dot and the function repeat() with an integer value specifying the
number of repetitions as parameter.
exponent - SVG: Scalable Vector Graphics
t="5"/> <fefuncb type="gamma" exponent="5"/> </fecomponenttransfer> </filter> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer1);" /> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer2); transform: translatex(220px);" /> </svg> usage notes value <
number> default value 1 animatable yes <
number> if the type attribute of the component element is set to gamma, this value specifies the exponent of the gamma function specifications specification status comment filter effects module level 1the definition of 'exponent' in that specification.
fill-opacity - SVG: Scalable Vector Graphics
e, it can be applied to any element but it has effect only on the following eleven elements: <altglyph>, <circle>, <ellipse>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 400 100" xmlns="http://www.w3.org/2000/svg"> <!-- default fill opacity: 1 --> <circle cx="50" cy="50" r="40" /> <!-- fill opacity as a
number --> <circle cx="150" cy="50" r="40" fill-opacity="0.7" /> <!-- fill opacity as a percentage --> <circle cx="250" cy="50" r="40" fill-opacity="50%" /> <!-- fill opacity as a css property --> <circle cx="350" cy="50" r="40" style="fill-opacity: .25;" /> </svg> usage notes value [0-1] | <percentage> default value 1 anima...
filterRes - SVG: Scalable Vector Graphics
only one element is using this attribute: <filter> usage notes value <
number-optional-
number> default value none animatable yes <
number-optional-
number> this value takes one or two values, the first one outlining the resolution in horizontal direction, the second one in vertical direction.
glyph-name - SVG: Scalable Vector Graphics
the glyph names can be used in situations where unicode character
numbers do not provide sufficient information to access the correct glyph, such as when there are multiple glyphs per unicode character.
hanging - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value none animatable no <
number> this value indicates the alignment coordinate for the glyphs.
horiz-origin-x - SVG: Scalable Vector Graphics
only one element is using this attribute: <font> usage notes value <
number> default value 0 animatable no <
number> this value indicates the x-coordinate of the origin of a glyph for horizontally oriented text.
horiz-origin-y - SVG: Scalable Vector Graphics
only one element is using this attribute: <font> usage notes value <
number> default value 0 animatable no <
number> this value indicates the x-coordinate of the origin of a glyph for horizontally oriented text.
ideographic - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value none animatable no <
number> this value indicates the alignment coordinate for the glyphs.
intercept - SVG: Scalable Vector Graphics
"/> <fefuncb type="linear" intercept="0.8"/> </fecomponenttransfer> </filter> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer1);" /> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer2); transform: translatex(220px);" /> </svg> usage notes value <
number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'intercept' in that specification.
k - SVG: Scalable Vector Graphics
two elements are using this attribute: <hkern> and <vkern> context notes value <
number> default value none animatable no <
number> this value indicates the amount for decreasing the spacing between the two glyphs in the kerning pair.
k1 - SVG: Scalable Vector Graphics
k2="0" k3="0" k4="0" /> </filter> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <
number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k1' in that specification.
k2 - SVG: Scalable Vector Graphics
2="10" k3="0" k4="0" /> </filter> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <
number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k2' in that specification.
k3 - SVG: Scalable Vector Graphics
2="0" k3="10" k4="0" /> </filter> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <
number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k3' in that specification.
k4 - SVG: Scalable Vector Graphics
="0" k3="0" k4="0.3" /> </filter> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <
number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k4' in that specification.
keyTimes - SVG: Scalable Vector Graphics
.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate attributename="cx" dur="4s" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> <animate attributename="cy" dur="4s" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> usage notes value <
number> [ ; <
number> ]* ;?
limitingConeAngle - SVG: Scalable Vector Graphics
hting diffuseconstant="2"> <fespotlight x="10" y="10" z="50" pointsatx="100" pointsaty="100" limitingconeangle="40" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#spotlight1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#spotlight2); transform: translatex(220px);" /> </svg> usage notes value <
number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'limitingconeangle' in that specification.
mathematical - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value none animatable no <
number> this value indicates the alignment coordinate for the glyphs.
opacity - SVG: Scalable Vector Graphics
/defs> <rect x="0" y="0" width="100%" height="100%" fill="url(#gradient)" /> <circle cx="50" cy="50" r="40" fill="black" /> <circle cx="150" cy="50" r="40" fill="black" opacity="0.3" /> </svg> usage notes default value 1 value <alpha-value> animatable yes <alpha-value> the uniform opacity setting to be applied across an entire object, as a <
number>.
pointsAtX - SVG: Scalable Vector Graphics
<fediffuselighting in="sourcegraphic"> <fespotlight x="60" y="60" z="50" pointsatx="400" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting2); transform: translatex(220px);" /> </svg> usage notes default value 0 value <
number> animatable yes specifications specification status comment filter effects module level 1the definition of 'pointsatx' in that specification.
pointsAtY - SVG: Scalable Vector Graphics
<fediffuselighting in="sourcegraphic"> <fespotlight x="60" y="60" z="50" pointsaty="400" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting2); transform: translatex(220px);" /> </svg> usage notes default value 0 value <
number> animatable yes specifications specification status comment filter effects module level 1the definition of 'pointsaty' in that specification.
pointsAtZ - SVG: Scalable Vector Graphics
<fediffuselighting in="sourcegraphic"> <fespotlight x="100" y="100" z="50" pointsatz="80" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting2); transform: translatex(220px);" /> </svg> usage notes default value 0 value <
number> animatable yes specifications specification status comment filter effects module level 1the definition of 'pointsatz' in that specification.
scale - SVG: Scalable Vector Graphics
ence type="turbulence" basefrequency="0.05" numoctaves="2" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50"/> </filter> <circle cx="100" cy="100" r="80" style="filter: url(#displacementfilter);""/> <circle cx="100" cy="100" r="80" style="filter: url(#displacementfilter2); transform: translatex(240px);""/> </svg> usage notes value <
number> default value none animatable yes <
number> this value defines the scale factor for the displacement.
slope - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value 0 animatable no <
number> this value indicates the vertical stroke angle of the font.
specularConstant - SVG: Scalable Vector Graphics
specularlighting in="sourcegraphic" specularconstant="0.8"> <fepointlight x="60" y="60" z="20" /> </fespecularlighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#specularlighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#specularlighting2); transform: translatex(220px);" /> </svg> usage notes value <
number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'specularconstant' in that specification.
stemh - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value none animatable no <
number> this value indicates the horizontal stem width of the font.
stemv - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value none animatable no <
number> this value indicates the vertical stem width of the font.
stitchTiles - SVG: Scalable Vector Graphics
stitch this value indicates that the user agent will automatically adjust the x and y values of the base frequency such that the <feturbulence> node’s width and height (i.e., the width and height of the current subregion) contain an integral
number of the tile width and height for the first octave.
stop-opacity - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following element: <stop> usage notes value <opacity-value> default value 1 animatable yes <opacity-value> this value is either a <
number> between 0 and 1 or a <percentage> value specifying the opacity of the color gradient stop.
stroke-opacity - SVG: Scalable Vector Graphics
o any element but it has effect only on the following twelve elements: <altglyph>, <circle>, <ellipse>, <path>, <line>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 40 10" xmlns="http://www.w3.org/2000/svg"> <!-- default stroke opacity: 1 --> <circle cx="5" cy="5" r="4" stroke="green" /> <!-- stroke opacity as a
number --> <circle cx="15" cy="5" r="4" stroke="green" stroke-opacity="0.7" /> <!-- stroke opacity as a percentage --> <circle cx="25" cy="5" r="4" stroke="green" stroke-opacity="50%" /> <!-- stroke opacity as a css property --> <circle cx="35" cy="5" r="4" stroke="green" style="stroke-opacity: .3;" /> </svg> usage notes value [0-1] | <percentag...
stroke-width - SVG: Scalable Vector Graphics
ent but it only has effect on shapes and text context elements, including: <altglyph>, <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 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 norm...
v-alphabetic - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-alphabetic' in that specification.
v-hanging - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value none animatable no <
number> this value indicates the alignment coordinate for the glyphs to achieve hanging baseline alignment.
v-ideographic - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value none animatable no <
number> this value indicates the alignment coordinate for the glyphs.
v-mathematical - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value none animatable no <
number> this value indicates the alignment coordinate for the glyphs.
vert-origin-x - SVG: Scalable Vector Graphics
only one element is using this attribute: <font> usage notes value <
number> default value half of horiz-adv-x value animatable no <
number> this value indicates the x-coordinate of the origin of a glyph for vertically oriented text.
vert-origin-y - SVG: Scalable Vector Graphics
only one element is using this attribute: <font> usage notes value <
number> default value ascent value animatable no <
number> this value indicates the y-coordinate of the origin of a glyph for vertically oriented text.
widths - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value none animatable no <
number> this value is a comma-separated list of ucs range values as defined in iso 10646, each followed by one or more glyph widths.
x-height - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <
number> default value none animatable no <
number> this value indicates the height of lowercase glyphs.
<a> - SVG: Scalable Vector Graphics
odal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable...
<altGlyph> - SVG: Scalable Vector Graphics
value type: <list-of-
numbers> ; default value: none; animatable: yes (non-additive) glyphref the glyph identifier, the format of which is dependent on the format defined by the format attribute of the given font.
<animateColor> - SVG: Scalable Vector Graphics
usage context categoriesbasic shape element, graphics element, shape elementpermitted contentany
number of the following elements, in any order:descriptive elements attributes global attributes conditional processing attributes core attributes animation event attributes xlink attributes animation attribute target attributes animation timing attributes animation value attributes animation addition attributes externalresourcesrequired specific attributes by from to dom interface...
<animateTransform> - SVG: Scalable Vector Graphics
usage context categoriesanimation elementpermitted contentany
number of the following elements, in any order:descriptive elements example <svg width="120" height="120" viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <polygon points="60,30 90,90 30,90"> <animatetransform attributename="transform" attributetype="xml" type="rotate" from="0 60 70" to="360 60 70" dur="10s" repeatcount="indefinite"/> </polygon> </svg> live sample attrib...
<clipPath> - SVG: Scalable Vector Graphics
: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, display, fill, fill-opacity, fill-rule, filter, mask, opacity, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriesnonepermitted contentany
number of the following elements, in any order:animation elementsdescriptive elementsshape elements<text>, <use> specifications specification status comment css masking module level 1the definition of '<clippath>' in that specification.
<color-profile> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany
number of the following elements, in any order:descriptive elements attributes global attributes core attributes » xlink attributes » specific attributes local name rendering-intent xlink:href dom interface this element implements the svgcolorprofileelement interface.
<cursor> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany
number of the following elements, in any order:descriptive elements attributes global attributes conditional processing attributes core attributes xlink attributes externalresourcesrequired specific attributes x y xlink:href dom interface this element implements the svgcursorelement interface.
<defs> - SVG: Scalable Vector Graphics
le, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriescontainer element, structural elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable...
<discard> - SVG: Scalable Vector Graphics
usage context categoriesanimation elementpermitted contentany
number of the following elements, in any order:descriptive elements<script> attributes global attributes conditional processing attributes core attributes aria attributes specific attributes begin href (but note that <discard> has never supported xlink:href) specifications specification status comment svg animations level 2the definition of '<discard>' in that...
<feBlend> - SVG: Scalable Vector Graphics
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 in2 mode dom interface this element implements the svgfeblendelement interface.
<feComponentTransfer> - SVG: Scalable Vector Graphics
usage context categoriesfilter primitive elementpermitted contentany
number of the following elements, in any order:<fefunca>, <fefuncr>, <fefuncb>, <fefuncg> attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes in dom interface this element implements the svgfecomponenttransferelement interface.
<feComposite> - SVG: Scalable Vector Graphics
etic operation is chosen, each result pixel is computed using the following formula: result = k1*i1*i2 + k2*i1 + k3*i2 + k4 where: i1 and i2 indicate the corresponding pixel channel values of the input image, which map to in and in2 respectively k1, k2, k3 and k4 indicate the values of the attributes with the same name 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 in2 operator k1 k2 k3 k4 dom interface this element implements the svgfecompositeelement interface.
<feConvolveMatrix> - SVG: Scalable Vector Graphics
ing the simplest case (where the input image's pixel grid aligns perfectly with the kernel's pixel grid) and assuming default values for attributes ‘divisor’, ‘targetx’ and ‘targety’, then resulting color value will be: (9* 0 + 8* 20 + 7* 40 + 6*100 + 5*120 + 4*140 + 3*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.
<feDisplacementMap> - SVG: Scalable Vector Graphics
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 in2 scale xchannelselector ychannelselector dom interface this element implements the svgfedisplacementmapelement interface.
<feDistantLight> - SVG: Scalable Vector Graphics
usage context categorieslight source elementpermitted contentany
number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes specific attributes azimuth elevation dom interface this element implements the svgfedistantlightelement interface.
<feFlood> - SVG: Scalable Vector Graphics
usage context categoriesfilter primitive elementpermitted contentany
number of the following elements, in any order:<animate>, <animatecolor>, <set> attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes flood-color flood-opacity dom interface this element implements the svgfefloodelement interface.
<feFuncA> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany
number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes transfer function attributes specific attributes none dom interface this element implements the svgfefuncaelement interface.
<feFuncB> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany
number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes transfer function attributes specific attributes none dom interface this element implements the svgfefuncbelement interface.
<feFuncG> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany
number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes transfer function attributes specific attributes none dom interface this element implements the svgfefuncgelement interface.
<feFuncR> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany
number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes transfer function attributes specific attributes none dom interface this element implements the svgfefuncrelement interface.
<feGaussianBlur> - SVG: Scalable Vector Graphics
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 stddeviation edgemode dom interface this element implements the svgfegaussianblurelement interface.
<feImage> - SVG: Scalable Vector Graphics
the <feimage> svg filter primitive fetches image data from an external source and provides the pixel data as output (meaning if the external source is an svg image, it is rasterized.) usage context categoriesfilter primitive elementpermitted contentany
number of the following elements, in any order:<animate>, <animatetransform>, <set> attributes global attributes core attributes presentation attributes filter primitive attributes xlink attributes class style externalresourcesrequired specific attributes preserveaspectratio xlink:href dom interface this element implements the svgfeimageelement interface.
<feMerge> - SVG: Scalable Vector Graphics
usage context categoriesfilter primitive elementpermitted contentany
number of the following elements, in any order:<femergenode> example svg <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <filter id="feoffset" x="-40" y="-20" width="100" height="200"> <feoffset in="sourcegraphic" dx="60" dy="60" /> <fegaussianblur stddeviation="5" result="blur2" /> <femerge> <femergenode in="blur2" /> <femergenode in="sourcegraphic" /> </femerge> </filter> <rect x="40" y="40" width="100" height="100" style="stroke: #00000...
<feMergeNode> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany
number of the following elements, in any order:<animate>, <set> example <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <filter id="feoffset" x="-40" y="-20" width="100" height="200"> <feoffset in="sourcegraphic" dx="60" dy="60" /> <fegaussianblur in="sourcegraphic" stddeviation="5" result="blur2" /> <femerge> <femergenode in="blur2" /> <femergenode in="sourcegraphic" /> </femerge> </filter> <rect x="40" y="40" width="100" height="100" style="stroke: #000000; fill: green; filter: url(#feoffset);" /> <re...
<feMorphology> - SVG: Scalable Vector Graphics
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 operator radius dom interface this element implements the svgfemorphologyelement interface.
<feOffset> - SVG: Scalable Vector Graphics
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 dx dy dom interface this element implements the svgfeoffsetelement interface.
<fePointLight> - SVG: Scalable Vector Graphics
usage context categorieslight source elementpermitted contentany
number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes specific attributes x y z dom interface this element implements the svgfepointlightelement interface.
<feSpotLight> - SVG: Scalable Vector Graphics
usage context categorieslight source elementpermitted contentany
number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes specific attributes x y z pointsatx pointsaty pointsatz specularexponent limitingconeangle dom interface this element implements the svgfespotlightelement interface.
<feTile> - SVG: Scalable Vector Graphics
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 dom interface this element implements the svgfetileelement interface.
<feTurbulence> - SVG: Scalable Vector Graphics
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 basefrequency numoctaves seed stitchtiles type dom interface this element implements the svgfeturbulenceelement interface.
<filter> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany
number of the following elements, in any order:descriptive elementsfilter primitive elements<animate>, <set> attributes global attributes core attributes presentation attributes xlink attributes class style externalresourcesrequired specific attributes x y width height filterres filterunits primitiveunits xlink:href dom interface this element implements the svgfilterelement interface.
<font-face-uri> - SVG: Scalable Vector Graphics
usage context categoriesfont elementpermitted contentany
number of the following elements, in any order:<font-face-format> attributes global attributes core attributes xlink attributes specific attributes xlink:href dom interface this element implements the svgfontfaceurielement interface.
<font> - SVG: Scalable Vector Graphics
usage context categoriesfont elementpermitted contentany
number of the following elements, in any order:descriptive elements<font-face>, <glyph>, <hkern>, <missing-glyph>, <vkern> attributes global attributes core attributes presentation attributes class style externalresourcesrequired specific attributes horiz-origin-x horiz-origin-y horiz-adv-x vert-origin-x vert-origin-y vert-adv-y dom interface this element implements the svgfontelement interface.
<g> - SVG: Scalable Vector Graphics
, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable...
<glyph> - SVG: Scalable Vector Graphics
usage context categoriestext content elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> attributes global attributes core attributes presentation attributes class style specific attributes d horiz-adv-x vert-origin-x vert-origin-y vert-adv-y unicode glyph-name orientation arabic-form lang dom interface this element implements the svgglyphelement interface.
<hatch> - SVG: Scalable Vector Graphics
usage context categoriesnever-rendered element, paint server elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elements<hatchpath>, <script>, <style> attributes global attributes core attributes global event attributes presentation attributes style attributes specific attributes x y pitch rotate hatchunits hatchcontentunits transform href dom interface this element implements the svghatchelement interface.
<hatchpath> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany
number of the following elements, in any order:animation elementsdescriptive elements<script>, <style> attributes global attributes core attributes global event attributes presentation attributes style attributes specific attributes d offset dom interface this element implements the svghatchpathelement interface.
<image> - SVG: Scalable Vector Graphics
usage context categoriesgraphics element, graphics referencing elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elements attributes global attributes conditional processing attributes core attributes graphical event attributes presentation attributes xlink attributes class style externalresourcesrequired transform specific attributes x: positions the image horizontally from the origin.
<linearGradient> - SVG: Scalable Vector Graphics
polation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesgradient elementpermitted contentany
number of the following elements, in any order:descriptive elements<animate>, <animatetransform>, <set>, <stop> specifications specification status comment scalable vector graphics (svg) 2the definition of '<lineargradient>' in that specification.
<mask> - SVG: Scalable Vector Graphics
ensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, display, fill, fill-opacity, fill-rule, filter, mask, opacity, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriescontainer elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment css mask...
<missing-glyph> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany
number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> attributes global attributes core attributes presentation attributes class style specific attributes d horiz-adv-x vert-origin-x vert-origin-y vert-adv-y dom interface this element implements the svgmissingglyphelement interface.
<mpath> - SVG: Scalable Vector Graphics
usage context categoriesanimation elementpermitted contentany
number of the following elements, in any order:descriptive elements attributes global attributes core attributes » xlink attributes » externalresourcesrequired specific attributes xlink:href dom interface this element implements the svgmpathelement interface.
<radialGradient> - SVG: Scalable Vector Graphics
polation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesgradient elementpermitted contentany
number of the following elements, in any order:descriptive elements<animate>, <animatetransform>, <set>, <stop> specifications specification status comment scalable vector graphics (svg) 2the definition of '<radialgradient>' in that specification.
<set> - SVG: Scalable Vector Graphics
max, restart, repeatcount, repeatdur, fill other animation attributes most notably: attributename animation event attributes most notably: onbegin, onend, onrepeat global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesanimation elementpermitted contentany
number of the following elements, in any order:descriptive elements specifications specification status comment svg animations level 2the definition of '<set>' in that specification.
<switch> - SVG: Scalable Vector Graphics
usage context categoriescontainer elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elementsshape elements<a>, <foreignobject>, <g>, <image>, <svg>, <switch>, <text>, <use> attributes global attributes conditional processing attributes core attributes graphical event attributes presentation attributes class style externalresourcesrequired transform dom interface this element implements the svgsw...
<tref> - SVG: Scalable Vector Graphics
usage context categoriestext content element, text content child elementpermitted contentany
number of the following elements, in any order:descriptive elements<animate>, <animatecolor>, <set> attributes global attributes conditional processing attributes core attributes graphical event attributes presentation attributes xlink attributes class style externalresourcesrequired specific attributes xlink:href dom interface this element implements the svgtrefelement interface.
<use> - SVG: Scalable Vector Graphics
ia-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:href, xlink:title usage notes categoriesgraphics element, graphics referencing element, structural elementpermitted contentany
number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<use>' in that specification.
<view> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany
number of the following elements, in any order:descriptive elements attributes global attributes aria attributes » core attributes » global event attributes » externalresourcesrequired specific attributes viewbox preserveaspectratio zoomandpan viewtarget example svg <svg width="600" height="200" viewbox="0 0 600 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <radialgradient id="gradient"> <stop offset="0%" stop-color="#8cffa0" /> <stop offset="100%" stop-color="#8ca0ff" /> </radialgradient> </defs> <circle r="50" cx="180" cy="50" style="fill:url(#gradient)"/> <vie...
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
ex 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 svggraphicselement.gettra...
Patterns - SVG: Scalable Vector Graphics
=".125" fill="url(#gradient2)"/> <circle cx=".125" cy=".125" r=".1" fill="url(#gradient1)" fill-opacity="0.5"/> </pattern> now, because the pattern content is in the same unit system as the pattern, we don't have to offset the box so that the pattern starts in the correct place, and if the object size was changed to a larger one, the pattern would automatically scale so that it had the same
number of objects and repeats inside it.
Positions - SVG: Scalable Vector Graphics
much like absolute and relative font sizes in css, svg defines absolute units (ones with a dimensional identifier like "pt" or "cm") and so-called user units, that lack that identifier and are plain
numbers.
Tutorials
after that, we discuss some key javascript features in detail, such as variables, strings,
numbers and arrays.
Using custom elements - Web Components
over in our html, we use it like so: <popup-info img="img/alt.png" data-text="your card validation code (cvc) is an extra security feature — it is the last 3 or 4
numbers on the back of your card."></popup-info> note: you can see the full javascript source code here.
Using shadow DOM - Web Components
defined, using the element is as simple as defining it, and putting it on the page, as explained in using custom elements: // define the new element customelements.define('popup-info', popupinfo); <popup-info img="img/alt.png" data-text="your card validation code (cvc) is an extra security feature — it is the last 3 or 4
numbers on the back of your card."> internal versus external styles in the above example we apply style to the shadow dom using a <style> element, but it is perfectly possible to do it by referencing an external stylesheet from a <link> element instead.
Web Components
examples we are building up a
number of examples in our web-components-examples github repo.
last - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the last function returns a
number equal to the context size from the expression evaluation context.
position - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the position function returns a
number equal to the context position from the expression evaluation context.
system-property - XPath
notes xsl:version, a
number giving the version of xslt implemented by the processor; for xslt processors implementing the version of xslt specified by this document, this is the
number 1.0 xsl:vendor, a string identifying the vendor of the xslt processor xsl:vendor-url, a string containing a url identifying the vendor of the xslt processor; typically this is the host page (home page) of the vendor's web site.
Functions - XPath
boolean() ceiling() choose() concat() contains() count() current() xslt-specific document() xslt-specific element-available() false() floor() format-
number() xslt-specific function-available() generate-id() xslt-specific id() (partially supported) key() xslt-specific lang() last() local-name() name() namespace-uri() normalize-space() not()
number() position() round() starts-with() string() string-length() substring() substring-after() substring-before() sum() system-property() xslt-specific translate() true() unparsed-entity...
<xsl:stylesheet> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:stylesheet version="
number" xmlns:xsl="http://www.w3.org/1999/xsl/transform" id="name" extension-element-prefixes="list-of-names" exclude-result-prefixes="list-of-names"> entire stylesheet </xsl:stylesheet> required attributes version specifies the version of xslt required by this stylesheet.