Search completed in 0.98 seconds.
7362 results for "Syntax":
Your results are loading. Please wait...
Simple Query Syntax - Archive of obsolete content
« previousnext » when iterating over the children of an rdf container, there is a simpler query syntax which may used.
...simple rdf graph navigation such as this is common, so the simpler syntax is usually used in this situation since it avoids extra tags, although the simple syntax is not more or less efficient, at least when a single query is involved.
...at its simplest, the simple query syntax is equivalent to the following: <query> <content uri="?start"/> <member container="?start" child="?photo"/> </query> the template builder uses the simple query syntax whenever a template does not have a <query> element.
...And 14 more matches
Spread syntax (...) - JavaScript
spread syntax (...) allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected.
... syntax for function calls: myfunction(...iterableobj); for array literals or strings: [...iterableobj, '4', 'five', 6]; for object literals (new in ecmascript 2018): let objclone = { ...obj }; rest syntax (parameters) rest syntax looks exactly like spread syntax.
... in a way, rest syntax is the opposite of spread syntax.
...And 13 more matches
SyntaxError - JavaScript
the syntaxerror object represents an error when trying to interpret syntactically invalid code.
... it is thrown when the javascript engine encounters tokens or token order that does not conform to the syntax of the language when parsing code.
... constructor syntaxerror() creates a new syntaxerror object.
...And 9 more matches
Syntax - MDN Web Docs Glossary: Definitions of Web-related terms
syntax specifies the required combination and sequence of characters making up correctly structured code.
... syntax generally includes grammar and the rules that apply to writing it, such as indentation requirements in python.
... syntax varies from language to language (e.g., syntax is different in html and javascript).
...And 8 more matches
SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead - JavaScript
use //# instead" occurs when there is a deprecated source map syntax in a javascript source.
... message warning: syntaxerror: using //@ to indicate sourceurl pragmas is deprecated.
... use //# instead warning: syntaxerror: using //@ to indicate sourcemappingurl pragmas is deprecated.
...And 5 more matches
Value definition syntax - CSS: Cascading Style Sheets
css value definition syntax, a formal grammar, is used for defining the set of valid values for a css property or function.
... in addition to this syntax, the set of valid values can be further restricted by semantic constraints (for example, for a number to be strictly positive).
... the definition syntax describes which values are allowed and the interactions between them.
...And 4 more matches
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
firefox 70 implemented the two-value syntax for the display property, which is part of the css display module level 3.
... this guide explains the change to the syntax, including the reasoning behind this change.
... the two-value syntax as you can see from the above explanation, the display property has gained considerable new powers.
...And 4 more matches
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 end of data syntaxerror: json.parse: unexpected keyword syntaxerror: json.parse: unexpected character syntaxerror: json.parse: end of data while reading object contents syntaxerror: json.parse: expected property name or '}' syntaxerror: json.parse: end of data when ',' or ']' was expected syntaxerror: json.parse: expected ',' or ']' after array element syntaxerror: json.parse: end of data when property name was expected syntaxerror: json.parse: expected double-quoted property name syntaxerror: json.parse: end of data after property name when ':' was expected syntaxerror: json.parse: expected ':' after property name in object syntaxerror: json.parse: end of data after property value in object syntaxerror: json.parse: expected ',' or '}' after property ...
...value in object syntaxerror: json.parse: expected ',' or '}' after property-value pair in object literal syntaxerror: json.parse: property names must be double-quoted strings syntaxerror: json.parse: expected property name or '}' syntaxerror: json.parse: unexpected character syntaxerror: json.parse: unexpected non-whitespace character after json data syntaxerror: json.parse error: invalid character at position {0} (edge) error type syntaxerror what went wrong?
...And 4 more matches
SyntaxError: missing : after property id - JavaScript
the javascript exception "missing : after property id" occurs when objects are created using the object initializer syntax.
... message syntaxerror: expected ':' (edge) syntaxerror: missing : after property id (firefox) error type syntaxerror what went wrong?
... when creating objects with the object initializer syntax, a colon (:) separates keys and values for the object's properties.
...And 4 more matches
SyntaxError: function statement requires a name - JavaScript
message syntax error: expected identifier (edge) syntaxerror: function statement requires a name [firefox] syntaxerror: unexpected token ( [chrome] error type syntaxerror what went wrong?
... examples statements vs expressions a function statement (or function declaration) requires a name, this won't work: function () { return 'hello world'; } // syntaxerror: function statement requires a name you can use a function expression (assignment) instead: var greet = function() { return 'hello world'; }; or, you function is maybe intended to be an iife (immediately invoked function expression), which is a function that runs as soon as it is defined.
...this doesn't work: function greeter() { german: function () { return "moin"; } } // syntaxerror: function statement requires a name this would work, for example: function greeter() { german: function g() { return "moin"; } } object methods if you intended to create a method of an object, you will need to create an object.
...And 3 more matches
Syntax error - MDN Web Docs Glossary: Definitions of Web-related terms
an exception caused by the incorrect use of a pre-defined syntax.
... syntax errors are detected while compiling or parsing source code.
... for example, if you leave off a closing brace (}) when defining a javascript function, you trigger a syntax error.
...And 2 more matches
SyntaxError: illegal character - JavaScript
message syntaxerror: invalid character (edge) syntaxerror: illegal character (firefox) syntaxerror: invalid or unexpected token (chrome) error type syntaxerror what went wrong?
...use an editor that supports syntax highlighting and carefully check your code against mismatches like a minus sign ( - ) versus a dash ( – ) or simple quotes ( " ) vs non-standard quotation marks ( “ ).
... “this looks like a string”; // syntaxerror: illegal character // “ and ” are not " but look like this 42 – 13; // syntaxerror: illegal character // – is not - but looks like this var foo = 'bar'; // syntaxerror: illegal character // <37e> is not ; but looks like this this should work: "this is actually a string"; 42 - 13; var foo = 'bar'; some editors and ides will notify you or at least use a slightly different highlighting for it, but n...
...And 2 more matches
SyntaxError: missing name after . operator - JavaScript
message syntaxerror: missing name after .
... operator error type syntaxerror what went wrong?
... var obj = { foo: { bar: "baz", bar2: "baz2" } }; var i = 2; obj.[foo].[bar] // syntaxerror: missing name after .
...And 2 more matches
SyntaxError: missing variable name - JavaScript
message syntaxerror: missing variable name (firefox) syntaxerror: unexpected token = (chrome) error type syntaxerror what went wrong?
...this is likely due to a syntax error in your code.
...sorry :( var debugger = "whoop"; // syntaxerror: missing variable name declaring multiple variables pay special attention to commas when declaring multiple variables.
...And 2 more matches
XPIDL Syntax
MozillaTechXPIDLSyntax
it is more focused on xpidl syntax and grammar.
...simplifications, conventions and notation the syntax is specified according to abnf as defined by rfc 5234, although a few productions use prose for clarity of understanding.
... xpidl syntax (abnf) the root production here is idl_file.
... 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] ["rea...
SyntaxError: invalid regular expression flag "x" - JavaScript
message syntaxerror: syntax error in regular expression (edge) syntaxerror: invalid regular expression flag "x" (firefox) syntaxerror: invalid regular expression flags (chrome) error type syntaxerror what went wrong?
... to include a flag with the regular expression, use this syntax: var re = /pattern/flags; or var re = new regexp('pattern', 'flags'); regular expression flags flag description g global search.
... /foo/bar; // syntaxerror: invalid regular expression flag "b" did you intend to create a regular expression?
... let obj = { url: /docs/web }; // syntaxerror: invalid regular expression flag "w" or did you mean to create a string instead?
SyntaxError: "0"-prefixed octal literals and octal escape seq. are deprecated - JavaScript
message syntaxerror: octal numeric literals and escape characters not allowed in strict mode (edge) syntaxerror: "0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead error type syntaxerror in strict mode only.
... octal literals and octal escape sequences are deprecated and will throw a syntaxerror in strict mode.
... with ecmascript 2015 and later, the standardized syntax uses a leading zero followed by a lowercase or uppercase latin letter "o" (0o or 0o).
... 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'; ...
SyntaxError: for-in loop head declarations may not have initializers - JavaScript
message syntaxerror: for-in loop head declarations cannot have an initializer (edge) syntaxerror: for-in loop head declarations may not have initializers (firefox) syntaxerror: for-in loop variable declaration may not have an initializer.
... (chrome) error type syntaxerror in strict mode only.
...in strict mode, however, a syntaxerror is thrown.
... examples this example throws a syntaxerror: "use strict"; var obj = {a: 1, b: 2, c: 3 }; for (var i = 0 in obj) { console.log(obj[i]); } // syntaxerror: for-in loop head declarations may not have initializers valid for-in loop you can remove the initializer (i = 0) in the head of the for-in loop.
SyntaxError: missing ; before statement - JavaScript
message syntaxerror: expected ';' (edge) syntaxerror: missing ; before statement (firefox) error type syntaxerror.
...carefully check the syntax when this error is thrown.
...for example: var foo = 'tom's bar'; // syntaxerror: missing ; before statement you can use double quotes, or escape the apostrophe: var foo = "tom's bar"; var foo = 'tom\'s bar'; declaring properties with var you cannot declare properties of an object or array with a var declaration.
... var obj = {}; var obj.foo = 'hi'; // syntaxerror missing ; before statement var array = []; var array[0] = 'there'; // syntaxerror missing ; before statement instead, omit the var keyword: var obj = {}; obj.foo = 'hi'; var array = []; array[0] = 'there'; bad keywords if you come from another programming language, it is also common to use keywords that don't mean the same or have no meaning at all in javascript: def print(info){ console.log(info); }; // syntaxerror missing ; before statement instead, use function instead of def: function print(info){ console.log(info); }; ...
SyntaxError: "x" is a reserved identifier - JavaScript
message syntaxerror: the use of a future reserved word for an identifier is invalid (edge) syntaxerror: "x" is a reserved identifier (firefox) syntaxerror: unexpected reserved word (chrome) error type syntaxerror what went wrong?
... var enum = { red: 0, green: 1, blue: 2 }; // syntaxerror: enum is a reserved identifier in strict mode code, more identifiers are reserved.
... "use strict"; var package = ["potatoes", "rice", "fries"]; // syntaxerror: package is a reserved identifier you'll need to rename these variables.
... "use strict"; class docarchiver {} // syntaxerror: class is a reserved identifier // (throws in older browsers only, e.g.
view_source.syntax_highlight
the preference view_source.syntax_highlight controls whether markup in the view source view is syntax highlighted.
... type:boolean default value: true exists by default: yes application support:firefox 1.0 status: active introduction: bugs: bug 52154 values true (default) syntax hightlighting is enabled.
... false syntax hightlighting is disabled.
SyntaxError: applying the 'delete' operator to an unqualified name is deprecated - JavaScript
message syntaxerror: calling delete on expression not allowed in strict mode (edge) syntaxerror: applying the 'delete' operator to an unqualified name is deprecated (firefox) syntaxerror: delete of an unqualified identifier in strict mode.
... (chrome) error type syntaxerror in strict mode only.
... delete x; // syntaxerror: applying the 'delete' operator to an unqualified name // is deprecated to free the contents of a variable, you can set it to null: 'use strict'; var x; // ...
SyntaxError: a declaration in the head of a for-of loop can't have an initializer - JavaScript
message syntaxerror: for-of loop head declarations cannot have an initializer (edge) syntaxerror: a declaration in the head of a for-of loop can't have an initializer (firefox) syntaxerror: for-of loop variable declaration may not have an initializer.
... (chrome) error type syntaxerror what went wrong?
... examples invalid for-of loop let iterable = [10, 20, 30]; for (let value = 50 of iterable) { console.log(value); } // syntaxerror: a declaration in the head of a for-of loop can't // have an initializer valid for-of loop you need to remove the initializer (value = 50) in the head of the for-of loop.
SyntaxError: missing ] after element list - JavaScript
the javascript exception "missing ] after element list" occurs when there is an error with the array initializer syntax somewhere.
... message syntaxerror: missing ] after element list error type syntaxerror.
... there is an error with the array initializer syntax somewhere.
SyntaxError: missing } after function body - JavaScript
the javascript exception "missing } after function body" occurs when there is a syntax mistake when creating a function somewhere.
... message syntaxerror: expected '}' (edge) syntaxerror: missing } after function body (firefox) error type syntaxerror what went wrong?
... there is a syntax mistake when creating a function somewhere.
SyntaxError: missing } after property list - JavaScript
the javascript exception "missing } after property list" occurs when there is a mistake in the object initializer syntax somewhere.
... message syntaxerror: expected '}' (edge) syntaxerror: missing } after property list (firefox) error type syntaxerror what went wrong?
... there is a mistake in the object initializer syntax somewhere.
SyntaxError: missing ) after condition - JavaScript
message syntaxerror: expected ')' (edge) syntaxerror: missing ) after condition (firefox) error type syntaxerror what went wrong?
... if (3 > math.pi { console.log("wait what?"); } // syntaxerror: missing ) after condition to fix this code, you would need to add a parenthesis that closes the condition.
... if (done is true) { console.log("we are done!"); } // syntaxerror: missing ) after condition instead you need to use a correct comparison operator.
SyntaxError: "use strict" not allowed in function with non-simple parameters - JavaScript
message edge: cannot apply strict mode on functions with non-simple parameter list firefox: syntaxerror: "use strict" not allowed in function with default parameter syntaxerror: "use strict" not allowed in function with rest parameter syntaxerror: "use strict" not allowed in function with destructuring parameter chrome: syntaxerror: illegal 'use strict' directive in function with non-simple parameter list error type syntaxerror.
... examples function statement in this case, the function sum has default parameters a=1 and b=2: function sum(a = 1, b = 2) { // syntaxerror: "use strict" not allowed in function with default parameter 'use strict'; return a + b; } if the function should be in strict mode, and the entire script or enclosing function is also okay to be in strict mode, you can move the "use strict" directive outside of the function: 'use strict'; function sum(a = 1, b = 2) { return a + b; } function expression a function expression can ...
...use yet another workaround: var sum = function sum([a, b]) { // syntaxerror: "use strict" not allowed in function with destructuring parameter 'use strict'; return a + b; }; this can be converted to the following expression: var sum = (function() { 'use strict'; return function sum([a, b]) { return a + b; }; })(); arrow function if an arrow function needs to access the this variable, you can use the arrow function as the enclosing function: var callback = (...args) => { // syntaxerror: "use strict" not allowed in function with rest parameter 'use strict'; return this.run(args); }; this can be converted to the following expression: var callback = (() => { 'use strict'; return (...args) => { return this.run(args); }; })(); ...
SyntaxError: Unexpected token - JavaScript
message syntaxerror: expected expression, got "x" syntaxerror: expected property name, got "x" syntaxerror: expected target, got "x" syntaxerror: expected rest argument name, got "x" syntaxerror: expected closing parenthesis, got "x" syntaxerror: expected '=>' after argument list, got "x" error type syntaxerror what went wrong?
... 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 upperboun...
...d; } } // syntaxerror: expected expression, got '||' the brackets may look correct at first, but note how the || is outside the brackets.
SyntaxError() constructor - JavaScript
the syntaxerror constructor creates a new error object that represents an error when trying to interpret syntactically invalid code.
... syntax new syntaxerror([message[, filename[, linenumber]]]) parameters message optional human-readable description of the error filename optional the name of the file containing the code that caused the exception linenumber 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.linenumber); console.error(e.columnnumber); 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.e...
...rror(e.name); // syntaxerror console.error(e.filename); // somefile.js console.error(e.linenumber); // 10 console.error(e.columnnumber); // 0 console.error(e.stack); // @debugger eval code:3:9 } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
Syntax - CSS: Cascading Style Sheets
WebCSSSyntax
the css syntax reflects this goal and its basic building blocks are: the property which is an identifier, that is a human-readable name, that defines which feature is considered.
...each type of at-rules, defined by the identifier, may have its own internal syntax, and semantics of course.
SyntaxError: return not in function - JavaScript
message syntaxerror: 'return' statement outside of function (edge) syntaxerror: return not in function (firefox) syntaxerror: yield not in function (firefox) error type syntaxerror.
... examples missing curly brackets var cheer = function(score) { if (score === 147) return 'maximum!'; }; if (score > 100) { return 'century!'; } } // syntaxerror: return not in function the curly brackets look correct at a first glance, but this code snippet is missing a { after the first if statement.
SyntaxError: test for equality (==) mistyped as assignment (=)? - JavaScript
message warning: syntaxerror: test for equality (==) mistyped as assignment (=)?
... error type (firefox only) syntaxerror warning which is reported only if javascript.options.strict preference is set to true.
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?
...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.
SyntaxError: Malformed formal parameter - JavaScript
message syntaxerror: expected {x} (edge) syntaxerror: malformed formal parameter (firefox) error type syntaxerror what went wrong?
... 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
message syntaxerror: missing formal parameter (firefox) error type syntaxerror what went wrong?
...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 greeting; }; function log(a...
SyntaxError: missing = in const declaration - JavaScript
message syntaxerror: const must be initalized (edge) syntaxerror: missing = in const declaration (firefox) syntaxerror: missing initializer in const declaration (chrome) error type syntaxerror what went wrong?
...this throws: const columns; // syntaxerror: missing = in const declaration fixing the error there are multiple options to fix this error.
SyntaxError: missing ) after argument list - JavaScript
message syntaxerror: expected ')' (edge) syntaxerror: missing ) after argument list (firefox) error type syntaxerror.
... console.log('pi: ' math.pi); // syntaxerror: missing ) after argument list you can correct the log call by adding the "+" operator: console.log('pi: ' + math.pi); // "pi: 3.141592653589793" unterminated strings console.log('"java" + "script" = \"' + 'java' + 'script\"); // syntaxerror: missing ) after argument list here javascript thinks that you meant to have ); inside the string and ignores it, and it ends up not knowing that you meant th...
SyntaxError: redeclaration of formal parameter "x" - JavaScript
message syntaxerror: let/const redeclaration (edge) syntaxerror: redeclaration of formal parameter "x" (firefox) syntaxerror: identifier "x" has already been declared (chrome) error type syntaxerror what went wrong?
... function f(arg) { let arg = 'foo'; } // syntaxerror: redeclaration of formal parameter "arg" if you want to change the value of "arg" in the function body, you can do so, but you do not need to declare the same variable again.
SyntaxError: unterminated string literal - JavaScript
message syntaxerror: unterminated string constant (edge) syntaxerror: unterminated string literal (firefox) error type syntaxerror what went wrong?
... examples multiple lines you can't split a string across multiple lines like this in javascript: var longstring = 'this is a very long string which needs to wrap across multiple lines because otherwise my code is unreadable.'; // syntaxerror: unterminated string literal instead, use the + operator, a backslash, or template literals.
Regular expression syntax cheatsheet - JavaScript
this page provides an overall cheat sheet of all the capabilities of regexp syntax by aggregating the content of the articles in the regexp guide.
sslfnc.html
syntax #include "nss.h" secstatus nss_init(char *configdir); parameter this function has the following parameter: configdir a pointer to a string containing the pathname of the directory where the certificate, key, and security module databases reside.
... syntax #include "nss.h" secstatus nss_initreadwrite(char *configdir); parameter this function has the following parameter: configdir a pointer to a string containing the pathname of the directory where the certificate, key, and security module databases reside.
... syntax #include "nss.h" secstatus nss_nodb_init(char *reserved); parameter this function has the following parameter: reserved should be null..
...And 44 more matches
Strict mode - JavaScript
prohibits some syntax likely to be defined in future versions of ecmascript.
... // whole-script strict mode syntax 'use strict'; var v = "hi!
... i'm a strict mode script!"; this syntax has a trap that has already bitten a major site: it isn't possible to blindly concatenate conflicting scripts.
...And 20 more matches
Index - Archive of obsolete content
syntax highliting support for .htaccess files less.
...e4x marries xml and javascript syntax, and extends javascript to include namespaces, qualified names, and xml elements and lists.
...it doesn't have any containers, but we may want to iterate over the relateditem predicate using the simple query syntax.
...And 18 more matches
StringView - Archive of obsolete content
constructor syntax new stringview(input[, encoding[, startoffset[, length]]]) description create a new string-like object based upon an arraybuffer.
... examples var mystringview1 = new stringview("hello world!"); // utf-8 alert(mystringview1) // "hello world!" var mystringview2 = new stringview(mystringview1, "utf-16"); alert(mystringview1.buffer.bytelength); // 12 alert(mystringview2.buffer.bytelength); // 24 stringview constructor's methods makefrombase64() syntax stringview.makefrombase64(base64string[, encoding][, byteoffset][, length]) description returns a new instance of stringview constructed decoding a given base64-encoded string.
... stringview instances' methods makeindex() syntax stringview.makeindex([characterslength[, startfrom]]) description if the characterslength argument is a number it will be taken as codepoints length and makeindex() will return the index in elements of that position starting from 0.
...And 15 more matches
What went wrong? Troubleshooting JavaScript - Learn web development
types of error generally speaking, when you do something wrong in code, there are two main types of error that you'll come across: syntax errors: these are spelling errors in your code that actually cause the program not to run at all, or stop working part way through — you will usually be provided with some error messages too.
... logic errors: these are errors where the syntax is actually correct but the code is not what you intended it to be, meaning that program runs successfully but gives incorrect results.
... these are often harder to fix than syntax errors, as there usually isn't an error message to direct you to the source of the error.
...And 14 more matches
Proxy Auto-Configuration (PAC) file - HTTP
} syntax function findproxyforurl(url, host) parameters url the url being accessed.
...there is no additional syntax needed to save it into a file and use it.
...sed conditions shexpmatch() time based conditions weekdayrange() daterange() timerange() logging utility alert() there was one associative array (object) already defined, because at the time javascript code was unable to define it by itself: proxyconfig.bindings note: pactester (part of the pacparser package) was used to test the following syntax examples.
...And 13 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
58 css preprocessor css, glossary a css preprocessor is a program that lets you generate css from the preprocessor's own unique syntax.
...it is defined by the formal syntax of the property and normally refers to the order in which longhand values should be specified as part of a single shorthand value.
...in javascript syntax errors are a very common source of exceptions.
...And 12 more matches
NSS PKCS11 Functions
syntax #include "secmod.h" extern secmodmodule *secmod_loadusermodule(char *modulespec, secmodmodule *parent, prbool recurse); parameters this function has the following parameters: modulespec is a pkcs #11 modulespec.
...syntax #include "secmod.h" extern secstatus secmod_unloadusermodule(secmodmodule *module); parameters this function has the following parameters: module is the module to be unloaded.
...syntax #include <pk11pub.h> secstatus secmod_closeuserdb(pk11slotinfo *slot) parameters this function has the following parameter: slot a pointer to a slot info structure.
...And 9 more matches
sslcrt.html
syntax #include <cert.h> secstatus cert_verifycertnow( certcertdbhandle *handle, certcertificate *cert, prbool checksig, seccertusage certusage, void *wincx); parameters this function has the following parameters: handle a pointer to the certificate database handle.
... syntax #include <cert.h> secstatus cert_verifycertname( certcertificate *cert, char *hostname); parameters this function has the following parameters: cert a pointer to the certificate against which to check the hostname referenced by hostname.
... syntax #include <cert.h> #include <certt.h> seccerttimevalidity cert_checkcertvalidtimes( certcertificate *cert, int64 t); parameters this function has the following parameters: cert a pointer to the certificate whose validity period you want to check against.
...And 9 more matches
Grammar and types - JavaScript
basics javascript borrows most of its syntax from java, c, and c++, but it has also been influenced by awk, perl, and python.
...(spaces, tabs, and newline characters are considered whitespace.) comments the syntax of comments is the same as in c++ and in many other languages: // a one line comment /* this is a longer, * multi-line comment */ /* you can't, however, /* nest comments */ syntaxerror */ comments behave like whitespace, and are discarded during script execution.
... note: you might also see a third type of comment syntax at the start of some javascript files, which looks something like this: #!/usr/bin/env node.
...And 9 more matches
Authoring MathML - MathML
mathbird is a convenient add-on for thunderbird to insert such mathml expressions using the asciimath input syntax.
... conversion from a simple syntax there are many simple notations (e.g.
... wiki or markdown syntaxes) to generate html pages.
...And 9 more matches
CSS3 - Archive of obsolete content
experimental parts are vendor-prefixed and should either be avoided in production environments, or used with extreme caution as both their syntax and semantics can change in the future.
... css namespaces module recommendation since september 29th, 2011 adds the support for the xml namespaces by defining the notion of css qualified name, using the ' | ' syntax and adding the @namespace css at-rule.
... css style attributes recommendation since november 7th, 2013 formally defines the syntax of the content of the html style global attribute.
...And 8 more matches
Index - Learn web development
here we teach object theory and syntax in detail, then look at how to create your own objects.
... 66 inheritance in javascript article, beginner, codingscripting, constructor, function, getter, inheritance, javascript, learn, oojs, oop, object, object member, prototype, extends, l10n:priority, setter this article has covered the remainder of the core oojs theory and syntax that we think you should know now.
... 67 javascript object basics api, article, beginner, codingscripting, javascript, learn, object, syntax, bracket notation, dot notation, instance, l10n:priority, object literal, theory, this congratulations, you've reached the end of our first js objects article — you should now have a good idea of how to work with objects in javascript — including creating your own simple objects.
...And 8 more matches
CSS selectors - CSS: Cascading Style Sheets
syntax: * ns|* *|* example: * will match all the elements of the document.
... syntax: elementname example: input will match any <input> element.
... syntax: .classname example: .index will match any element that has a class of "index".
...And 8 more matches
display - CSS: Cascading Style Sheets
WebCSSdisplay
syntax the css display property is specified using keyword values.
... note: browsers that support the two value syntax, on finding the outer value only, such as when display: block or display: inline is specified, will set the inner value to flow.
... note: browsers that support the two value syntax, on finding the inner value only, such as when display: flex or display: grid is specified, will set their outer value to block.
...And 8 more matches
Lexical grammar - JavaScript
hashbang comments a specialized third comment syntax, the hashbang comment, is in the process of being standardized in ecmascript (see the hashbang grammar proposal).
... exponential literal is specified by the following format: ben; where b is a base number (integer or floating), followed by e char (which serves as separator or exponent indicator) and n, which is exponent or power number – a signed integer (as per 2019 ecma-262 specs): 0e-5 // => 0 0e+5 // => 0 5e1 // => 50 175e-2 // => 1.75 1e3 // => 1000 1e-3 // => 0.001 binary binary number syntax uses a leading zero followed by a lowercase or uppercase latin letter "b" (0b or 0b).
... because this syntax is new in ecmascript 2015, see the browser compatibility table, below.
...And 8 more matches
<color> - CSS: Cascading Style Sheets
syntax the <color> data type is specified using one of the options listed below.
... syntax rgb colors can be expressed through both hexadecimal (prefixed with #) and functional (rgb(), rgba()) notations.
... syntax hsl colors are expressed through the functional hsl() and hsla() notations.
...And 7 more matches
cross-fade() - CSS: Cascading Style Sheets
syntax important: the specification and current implementations have different syntaxes.
... the specification syntax is explained first.
... specification syntax the cross-fade() function takes a list of images with a percentage defining how much of each image is retained in terms of opacity when it is blended with the other images.
...And 7 more matches
Method definitions - JavaScript
starting with ecmascript 2015, a shorter syntax for method definitions on objects initializers is introduced.
... syntax const obj = { get property() {}, set property(value) {}, property( parameters… ) {}, *generator( parameters… ) {}, async property( parameters… ) {}, async* generator( parameters… ) {}, // with computed keys get [property]() {}, set [property](value) {}, [property]( parameters… ) {}, *[generator]( parameters… ) {}, async [property]( parameters… ) {}, async* [generator]( parameters… ) {}, }; description the shorthand syntax is similar to the getter and set...
...ter syntax introduced in ecmascript 2015.
...And 7 more matches
Object initializer - JavaScript
syntax let o = {} let o = {a: 'foo', b: 42, c: {}} let a = 'foo', b = 42, c = {} let o = {a: a, b: b, c: c} let o = { property: function (parameters) {}, get property() {}, set property(value) {} }; new notations in ecmascript 2015 please see the compatibility table for support for these notations.
... in non-supporting environments, these notations will lead to syntax errors.
...although they look similar, there are differences between them: json permits only property definition using "property": value syntax.
...And 7 more matches
The "codecs" parameter in common media types - Web media technologies
this guide briefly examines the syntax of the media type codecs parameter and how it's used with the mime type string to provide details about the contents of audio or video media beyond simply indicating the container type.
... general syntax a basic mime media type is expressed by stating the type of media (audio, video, etc), then a slash character (/), then the container format used to contain the media: audio/mpeg an audio file using the mpeg file type, such as an mp3.
...the list may also contain codecs not present in the file.= codec options by container the containers below support extended codec options in their codecs parameters: 3gp av1 iso bmff mpeg-4 quicktime webm several of the links above go to the same section; that's because those media types are all based on iso base media file format (iso bmff), so they share the same syntax.
...And 7 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
it doesn't have any containers, but we may want to iterate over the relateditem predicate using the simple query syntax.
...the type affects how the datasource is used as well as the syntax for specifying queries.
... 935 rdf query syntax xul, xul_template_guide let's look at a simple query with two statements.
...And 6 more matches
Advanced Rules - Archive of obsolete content
« previousnext » this section describes the more advanced rule syntax.
... the full rule syntax the rule syntax described so far is useful for some datasources but sometimes you will need to display data in more complicated ways.
... the simple rule syntax is really just a shortcut for the full rule syntax which is described below.
...And 6 more matches
Getting started with Vue - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
...most of the time, vue components are written using a special html template syntax.
... when you need more control than the html syntax allows, you can write jsx or plain javascript functions to define your components.
...And 6 more matches
Variable fonts guide - CSS: Cascading Style Sheets
where possible, both the standard and lower-level syntax are included.
... the lower-level syntax (font-variation-settings) was the first mechanism implemented in order to test the early implementations of variable font support, and is necessary to utilize new or custom axes beyond the five registered ones.
... however, the w3c’s intent was for this syntax not to be used when other attributes are available.
...And 6 more matches
border-radius - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-bottom-left-radius border-bottom-right-radius border-top-left-radius border-top-right-radius syntax /* the syntax of the first radius allows one to four values */ /* radius is set for all 4 sides */ border-radius: 10px; /* top-left-and-bottom-right | top-right-and-bottom-left */ border-radius: 10px 5%; /* top-left | top-right-and-bottom-left | bottom-right */ border-radius: 2px 4px 2px; /* top-left | top-right | bottom-right | bottom-left */ border-radius: 1px 0 3px 4px; /* the syntax of t...
...it is used only in the one-value syntax.
...it is used only in the two-value syntax.
...And 6 more matches
JavaScript modules - JavaScript
« previous this guide gives you all you need to get started with javascript module syntax.
... however, we've written the path a bit differently — we are using the dot (.) syntax to mean "the current location", followed by the path beyond that to the file we are trying to find.
...if you omit it, firefox for example gives you an error of "syntaxerror: import declarations may only appear at top level of a module".
...And 6 more matches
Working with Svelte stores - Learn web development
svelte also provides a very intuitive way to integrate stores into its reactivity system using the reactive $store syntax.
... making stores reactive with the reactive $store syntax this works, but you'll have to copy and paste all this code every time you want to subscribe to a store: <script> import mystore from './stores.js' import { ondestroy } from 'svelte' let mystorecontent = '' const unsubscribe = mystore.subscribe(value => mystorecontent = value) ondestroy(unsubscribe) </script> {mystorecontent} that's too much boilerplate for svelte!
...in this case svelte provides the reactive $store syntax, also known as auto-subscription.
...And 5 more matches
pkfnc.html
syntax #include <pk11func.h> #include <certt.h> certcertificate *pk11_findcertfromnickname( char *nickname, void *wincx); parameters this function has the following parameters: nickname a pointer to the nickname in the certificate database or to the nickname in the token.
... syntax #include <pk11func.h> #include <certt.h> #include <keyt.h> seckeyprivatekey *pk11_findkeybyanycert( certcertificate *cert, void *wincx); parameters this function has the following parameters: cert a pointer to a certificate structure in the certificate database.
... syntax #include <pk11func.h> char *pk11_getslotname(pk11slotinfo *slot); parameters this function has the following parameter: slot a pointer to a slot info structure.
...And 5 more matches
ssltyp.html
syntax #include <certt.h> typedef struct certcertdbhandlestr certcertdbhandle; certcertificate an opaque x.509 certificate object.
... syntax #include <certt.h> typedef struct certcertificatestr certcertificate; description certificate structures are shared objects.
... syntax #include <pk11expt.h> typedef struct pk11slotinfostr pk11slotinfo; secitem a structure that points to other structures.
...And 5 more matches
Index - Web APIs
WebAPIIndex
this string uses the same syntax as the css font specifier.
... 809 datatransferitemlist.datatransferitem() api, datatransferitemlist, getter, html dom, html drag and drop api, method, reference, drag and drop the datatransferitem() getter method implements support for accessing items in the datatransferitemlist using array-style syntax (that is datatransferitem[index]).
... 1405 loaded api, css font loading api, fontface, fonts, property, reference, loaded the loaded read-only property of the fontface interface returns a promise that resolves with the current fontface object when the font specified in the object's constructor is done loading or rejects with a syntaxerror.
...And 5 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
syntax var intervalid = scope.setinterval(func, [delay, arg1, arg2, ...]); var intervalid = scope.setinterval(function[, delay]); var intervalid = scope.setinterval(code, [delay]); parameters func a function to be executed every delay milliseconds.
... code an optional syntax allows you to include a string instead of a function, which is compiled and executed every delay milliseconds.
... this syntax is not recommended for the same reasons that make using eval() a security risk.
...And 5 more matches
background-position - CSS: Cascading Style Sheets
syntax /* keyword values */ background-position: top; background-position: bottom; background-position: left; background-position: right; background-position: center; /* <percentage> values */ background-position: 25% 75%; /* <length> values */ background-position: 0 0; background-position: 1cm 2cm; background-position: 10ch 8em; /* multiple images */ background-position: 0 0, center; /* edge offsets value...
... 1-value syntax: the value may be: the keyword value center, which centers the image.
... 2-value syntax: one value defines x and the other defines y.
...And 5 more matches
Numbers and dates - JavaScript
binary numbers binary number syntax uses a leading zero followed by a lowercase or uppercase latin letter "b" (0b or 0b).
... if the digits after the 0b are not 0 or 1, the following syntaxerror is thrown: "missing binary digits after 0b".
... var flt_signbit = 0b10000000000000000000000000000000; // 2147483648 var flt_exponent = 0b01111111100000000000000000000000; // 2139095040 var flt_mantissa = 0b00000000011111111111111111111111; // 8388607 octal numbers octal number syntax uses a leading zero.
...And 5 more matches
Functions - JavaScript
defining functions there are several ways to define functions: the function declaration (function statement) there is a special syntax for declaring functions (see function statement for details): function name([param[, param[, ...
... the function expression (function expression) a function expression is similar to and has the same syntax as a function declaration (see function expression for details).
... the generator function declaration (function* statement) there is a special syntax for generator function declarations (see function* statement for details): function* name([param[, param[, ...
...And 5 more matches
Content type - SVG: Scalable Vector Graphics
this article lists these types along with their syntax and descriptions of what they're used for.
... clock-value <clock-value> clock values have the same syntax as in smil animation specification.
... svg supports all of the syntax alternatives for <color> defined in css2 syntax and basic data types, and (depend on the implementation) in the future css color module level 3.
...And 5 more matches
Creating a Help Content Pack - Archive of obsolete content
if you understand the basics of html or (preferably) xml, you'll understand the very basics of the syntax - elements, attributes, and element contents.
... understanding the syntax is important because small syntax errors can mean that a whole file won't be loaded correctly.
...later, when we get to actually writing content, you'll need to know xhtml, but for now knowledge of the syntax should be enough.
...And 4 more matches
URIs and URLs - Archive of obsolete content
in the case of uri, the object is a sequence of characters with a restricted syntax.
...the uri scheme defines the namespace of the uri, and thus may further restrict the syntax and semantics of identifiers using that scheme.
...together these segments form the url spec with the following syntax: scheme://username:password@host:port/directory/filebasename.fileextension;param?query#ref for performance reasons the complete spec is stored in escaped form in the nsstandardurl object with pointers (position and length) to each basic segment and for the more global segments like path and prehost for example.
...And 4 more matches
Building Trees - Archive of obsolete content
apart from the flags attribute, the template syntax for the tree builder and the content builder are identical.
...this template uses the simple rule syntax.
... the extended syntax could also be used.
...And 4 more matches
Processing XML with E4X - Archive of obsolete content
first introduced in javascript 1.6, e4x introduces a native xml object to the javascript language, and adds syntax for embedding literal xml documents in javascript code.
...nstructor: var languages = new xml('<languages type="dynamic"><lang>javascript</lang><lang>python</lang></languages>'); the second is to embed the xml directly in your script, as an xml literal: var languages = <languages type="dynamic"> <lang>javascript</lang> <lang>python</lang> </languages>; in both cases, the resulting object will be an e4x xml object, which provides convenient syntax for both accessing and updating the encapsulated data.
...e4x introduces new syntax that only works with e4x xml objects.
...And 4 more matches
Debugging HTML - Learn web development
and html's element syntax is arguably a lot easier to understand than a "real programming language" like rust, javascript, or python.
...well, generally when you do something wrong in code, there are two main types of error that you'll come across: syntax errors: these are spelling errors in your code that actually cause the program not to run, like the rust error shown above.
... these are usually easy to fix as long as you are familiar with the language's syntax and know what the error messages mean.
...And 4 more matches
Handling common HTML and CSS problems - Learn web development
basically, it is a matter of checking whether your html and css code is well formed and doesn't contain any syntax errors.
... ie conditional comments ie conditional comments are a modified proprietary html comment syntax, which can be used to selectively apply html code to different versions of ie.
...the syntax looks like this: <!--[if lte ie 8]> <script src="ie-fix.js"></script> <link href="ie-fix.css" rel="stylesheet" type="text/css"> <![endif]--> this block will apply the ie-specific css and javascript only if the browser viewing the page is ie 8 or older.
...And 4 more matches
source-editor.jsm
editor mode constants these constants are used to set the syntax highlighting mode for the editor by calling its setmode() method, or in the configuration object when first initializing the editor using its init() method.
... theme constants these constants are used to identify the available themes that can be used by the syntax highlighter.
... constant value description sourceeditor.themes.mozilla "mozilla" the default mozilla syntax highlighter theme.
...And 4 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
its syntax is based on the java and c languages — many structures from those languages apply to javascript as well.
... there are two basic ways to create an empty object: var obj = new object(); and: var obj = {}; these are semantically equivalent; the second is called object literal syntax and is more convenient.
... this syntax is also the core of json format and should be preferred at all times.
...And 4 more matches
Arrow function expressions - JavaScript
syntax basic syntax (param1, param2, …, paramn) => { statements } (param1, param2, …, paramn) => expression // equivalent to: => { return expression; } // parentheses are optional when there's only one parameter name: (singleparam) => { statements } singleparam => { statements } // the parameter list for a function with no parameters should be written with a pair of parentheses.
... () => { statements } advanced syntax // parenthesize the body of a function to return an object literal expression: params => ({foo: bar}) // rest parameters and default parameters are supported (param1, param2, ...rest) => { statements } (param1 = defaultvalue1, param2, …, paramn = defaultvaluen) => { statements } // destructuring within the parameter list is also supported var f = ([a, b] = [1, 2], {x: c} = {x: a + b}) => a + b + c; f(); // 6 description see also "es6 in depth: arrow functions" on hacks.mozilla.org.
... var func = x => x * x; // concise body syntax, implied "return" var func = (x, y) => { return x + y; }; // with block body, explicit "return" needed returning object literals keep in mind that returning object literals using the concise body syntax params => {object:literal} will not work as expected.
...And 4 more matches
delete operator - JavaScript
syntax delete expression where expression should evaluate to a property reference, e.g.: delete object.property delete object['property'] parameters object the name of an object, or an expression evaluating to an object.
...non-strict mode when in strict mode, if delete is used on a direct reference to a variable, a function argument or a function name, it will throw a syntaxerror.
... therefore, to avoid syntax errors in strict mode, you must use the delete operator in the form of delete object.property or delete object['property'].
...And 4 more matches
Introduction to XUL - Archive of obsolete content
having said that, the details of a particular application of xml; say, the syntax for specifying a toolbar, are left to separate documents describing those particular applications.
...the task of writing a xul window description is basically the same as the task of writing an html content description, with these exceptions: the syntax is xml (not that different from html 4), and there are some elements unique to xul.
...(for standards purposes, we will probably need to change the the mime type to something like "text/x-xul".) these files are processed using the same parser as "text/xml" files (and therefore subject to xml syntax rules, as they should be).
...And 3 more matches
Multiple Queries - Archive of obsolete content
multiple queries using the rdf simple syntax you can also use multiple queries with rdf datasources using the simple query syntax.
... here is the previous example rewritten using the simple syntax: <hbox id="photoslist" datasources="template-guide-photos3.rdf" ref="http://www.xulplanet.com/rdf/myphotos" xmlns:dc="http://purl.org/dc/elements/1.1/"> <template> <rule dc:title="canal"> <button uri="rdf:*" image="rdf:*" label="view" orient="vertical"/> </rule> <rule> <image uri="rdf:*" src="rdf:*"/> </rule> </template> </hbox> the result to the user in this example is the same as the previous example.
...however, if you are going to be using a number of queries, the template builder is more efficient when using multiple queries using the simple query syntax.
...And 3 more matches
Inheritance in JavaScript - Learn web development
in addition, we present some advice on when and where you might use oojs, and look at how classes are dealt with in modern ecmascript syntax.
... ecmascript 2015 classes ecmascript 2015 introduces class syntax to javascript as a way to write reusable classes using easier, cleaner syntax, which is more similar to classes in c++ or java.
... note: this modern way of writing classes is supported in all modern browsers, but it is still worth knowing about the underlying prototypal inheritance in case you work on a project that requires supporting a browser that doesn't support this syntax (most notably internet explorer).
...And 3 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
this is how svelte 'extends' javascript by taking valid syntax and giving it a new purpose.
...this is not some special svelte syntax — here we are just using regular javascript arrow functions.
... note: svelte uses the $: javascript label statement syntax to mark reactive statements.
...And 3 more matches
Adding a new todo form: Vue events, methods, and models - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
...much like how vue uses the v-bind syntax for binding attributes, vue has a special directive for event handling: v-on.
... the v-on directive works via the v-on:event="method" syntax.
...And 3 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).
...javascript is not as permissive as html and css however — if the javascript engine encounters mistakes or unrecognized syntax, more often than not it will throw errors.
... arrow functions provide a shorter, more convenient syntax for writing anonymous functions, which also has other advantages (see arrow functions).
...And 3 more matches
Index
when dealing with certificates (x.509), file formats such as pkcs#12 (certificates and keys), pkcs#7 (signed data), and message formats as cms, we should mention asn.1, which is a syntax for storing structured data in a very efficient (small sized) presentation.
... 201 nss tools certutil-tasks newsgroup: mozilla.dev.tech.crypto 202 nss tools cmsutil the cmsutil command-line utility uses the s/mime toolkit to perform basic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
... 212 nss tools : cmsutil name cmsutil — performs basic cryptograpic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
...And 3 more matches
Introduction to XPCOM for the DOM
pure virtual methods are declared with the following syntax: virtual nsresult functionfoo() = 0; an interface is thus simply a c++ class where all the member functions are declared as pure virtual functions.
... an instance of a class (called an object) can be allocated dynamically (on the heap, or free store), using the syntax nsfoo *fooptr = new nsfoo; that object can then be manipulated only through fooptr.
... nscomptr<nsifoo> ifooptr; getinterfaceifoo(getter_addrefs(ifooptr)); ifooptr->functionofnsifoo(); the peculiar syntax, getter_addrefs(pointer), is the nscomptr counterpart to the usual "&" (address-of) c operator.
...And 3 more matches
nsIXULTemplateQueryProcessor
the actual syntax is opaque to the template builder and defined by a query processor.
...some queries may not need the reference variable if the syntax or the form of the data implies the value.
...for example, a query might have the following syntax: (?id, ?name, ?url) from bookmarks where parentfolder = ?start this query might generate a result for each bookmark within a given folder.
...And 3 more matches
Using Objective-C from js-ctypes
objective-c has its own syntax, it cannot be written directly with js-ctypes.
... $ clang -framework appkit test.m && ./a.out class, message, and selector our task at hand is to convert objective-c syntax to c syntax.
... let's look at the following codelet: [nsspeechsynthesizer alloc] it passes an alloc message to the nsspeechsynthesizer class, in objective-c syntax.
...And 3 more matches
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
syntax var timeoutid = scope.settimeout(function[, delay, arg1, arg2, ...]); var timeoutid = scope.settimeout(function[, delay]); var timeoutid = scope.settimeout(code[, delay]); parameters function a function to be executed after the timer expires.
... code an alternative syntax that allows you to include a string instead of a function, which is compiled and executed when the timer expires.
... this syntax is not recommended for the same reasons that make using eval() a security risk.
...And 3 more matches
@media - CSS: Cascading Style Sheets
WebCSS@media
syntax the @media at-rule may be placed at the top level of your code or nested inside any other conditional group at-rule.
... /* at the top level of your code */ @media screen and (min-width: 900px) { article { padding: 1rem 3rem; } } /* nested within another conditional at-rule */ @supports (display: flex) { @media screen and (min-width: 900px) { article { display: flex; } } } for a discussion of media query syntax, please see using media queries.
... formal syntax @media <media-query-list> { <group-rule-body> }where <media-query-list> = <media-query>#where <media-query> = <media-condition> | [ not | only ]?
...And 3 more matches
Layout using named grid lines - CSS: Cascading Style Sheets
line naming is incredibly useful, but some of the more baffling looking grid syntax comes from this combination of names and track sizes.
... multiple lines with the same name with repeat() if you want to give all of the lines in your grid a unique name then you will need to write out the track definition long-hand rather than using the repeat syntax, as you need to add the name in square brackets while defining the tracks.
... if you do use the repeat syntax you will end up with multiple lines that have the same name, however this can be very useful too.
...And 3 more matches
CSS reference - CSS: Cascading Style Sheets
WebCSSReference
basic rule syntax style rule syntax style-rule ::= selectors-list { properties-list } ...
...the syntax for each specified value depends on the data type defined for each specified property.
... style rule examples strong { color: red; } div.menu-bar li:hover > ul { display: block; } for a beginner-level introduction to the syntax of selectors, see our guide on css selectors.
...And 3 more matches
Shorthand properties - CSS: Cascading Style Sheets
handling of these cases are grouped in several categories: shorthands handling properties related to edges of a box, like border-style, margin or padding, always use a consistent 1-to-4-value syntax representing those edges: the 1-value syntax: border-width: 1em — the unique value represents all edges the 2-value syntax: border-width: 1em 2em — the first value represents the vertical, that is top and bottom, edges, the second the horizontal ones, that is the left and right ones.
... the 3-value syntax: border-width: 1em 2em 3em — the first value represents the top edge, the second, the horizontal, that is left and right, ones, and the third value the bottom edge the 4-value syntax: border-width: 1em 2em 3em 4em — the four values represent the top, right, bottom and left edges respectively, always in that order, that is clock-wise starting at the top (the initial letter of top-right-bottom-left matches the order of the consonant of the word trouble: trbl) (you can also remember it as the order that the hands would rotate on a clock: 1em starts in the 12 o'clock position, then 2em in the 3 o'clock position, then 3em in the 6 o'clock position, and 4em in the 9 o'clock position).
... similarly, shorthands handling properties related to corners of a box, like border-radius, always use a consistent 1-to-4-value syntax representing those corners: the 1-value syntax: border-radius: 1em — the unique value represents all corners the 2-value syntax: border-radius: 1em 2em — the first value represents the top left and bottom right corner, the second the top right and bottom left ones.
...And 3 more matches
Classes - JavaScript
classes in js are built on prototypes but also have some syntax and semantics that are not shared with es5 classalike semantics.
... defining classes classes are in fact "special functions", and just as you can define function expressions and function declarations, the class syntax has two components: class expressions and class declarations.
... strict mode the body of a class is executed in strict mode, i.e., code written here is subject to stricter syntax for increased performance, some otherwise silent errors will be thrown, and certain keywords are reserved for future versions of ecmascript.
...And 3 more matches
Warning: expression closures are deprecated - JavaScript
the javascript warning "expression closures are deprecated" occurs when the non-standard expression closure syntax (shorthand function syntax) is used.
... the non-standard expression closure syntax (shorthand function syntax) is deprecated and shouldn't be used anymore.
... this syntax will be removed entirely in bug 1083458 and scripts using it will throw a syntaxerror then.
...And 3 more matches
JSON.parse() - JavaScript
syntax json.parse(text[, reviver]) parameters text the string to parse as json.
... see the json object for a description of json syntax.
... exceptions throws a syntaxerror exception if the string to parse is not valid json.
...And 3 more matches
JSON - JavaScript
description javascript and json differences json is a syntax for serializing objects, arrays, numbers, strings, booleans, and null.
... it is based upon javascript syntax but is distinct from it: some javascript is not json.
...in engines that haven't implemented the proposal, u+2028 line separator and u+2029 paragraph separator are allowed in string literals and property keys in json; but their use in these features in javascript string literals is a syntaxerror.
...And 3 more matches
Destructuring assignment - JavaScript
the destructuring assignment syntax is a javascript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.
... syntax let a, b, rest; [a, b] = [10, 20]; console.log(a); // 10 console.log(b); // 20 [a, b, ...rest] = [10, 20, 30, 40, 50]; console.log(a); // 10 console.log(b); // 20 console.log(rest); // [30, 40, 50] ({ a, b } = { a: 10, b: 20 }); console.log(a); // 10 console.log(b); // 20 // stage 4(finished) proposal ({a, b, ...rest} = {a: 10, b: 20, c: 30, d: 40}); console.log(a); // 10 console.log(b); // 20 console.log(rest); // {c: 30, d: 40} description the object and array literal expressions provide an easy way to create ad hoc packages of data.
... const x = [1, 2, 3, 4, 5]; the destructuring assignment uses similar syntax, but on the left-hand side of the assignment to define what values to unpack from the sourced variable.
...And 3 more matches
let - JavaScript
syntax let var1 [= value1] [, var2 [= value2]] [, ..., varn [= valuen]; parameters var1, var2, …, varn the names of the variable or variables to declare.
... redeclarations redeclaring the same variable within the same function or block scope raises a syntaxerror.
... if (x) { let foo; let foo; // syntaxerror thrown.
...And 3 more matches
Containment Properties - Archive of obsolete content
« previousnext » so far, we've seen how the simple query syntax can generate results from the children of an rdf container.
... however, the simple query syntax may also iterate over a single predicate pointing out of a resource, rather than use the children.
...it doesn't have any containers, but we may want to iterate over the relateditem predicate using the simple query syntax.
...And 2 more matches
Filtering - Archive of obsolete content
the syntax is the same regardless of what type of content is being created.
...an rdf type can be assigned to a node by using the predicate 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' set to a resource for that type.
... in rdf/xml, a syntax shortcut may be used which involves replacing the description tag with the type.
...And 2 more matches
Adding Properties to XBL-defined Elements - Archive of obsolete content
the general syntax is as follows: <binding id="element-name"> <content> -- content goes here -- </content> <implementation> <field name="field-name-1"/> <field name="field-name-2"/> <field name="field-name-3"/> <property name="property-name-1"/> <property name="property-name-2"/> <property name="property-name-3"/> .
...the syntax is very similar to getting and setting the properties of html elements.
...its syntax is similar but has additional features.
...And 2 more matches
Creating a Window - Archive of obsolete content
first, however, we should look at the basic syntax of a xul file.
...this is the syntax that xml files use to import style sheets.
...you can also import other style sheets using a similar syntax.
...And 2 more matches
XML - Archive of obsolete content
xul syntax & rules xul is a standards-based interface definition language.
...you must be very careful about your syntax, and in particular about these four cardinal rules of xul: all events and attributes must be written in lowercase.
...xul is based upon xml, so it inherits a lot of the rules and syntax described above from this "meta-language," as you will see.
...And 2 more matches
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.
...any illegal characters must be escaped via the url escaping syntax defined by rfc 1738.
...And 2 more matches
Array comprehensions - Archive of obsolete content
the array comprehensions syntax is non-standard and removed starting with firefox 58.
... for future-facing usages, consider using array.prototype.map, array.prototype.filter, arrow functions, and spread syntax.
... the array comprehension syntax was a javascript expression which allowed you to quickly assemble a new array based on an existing one.
...And 2 more matches
Generator comprehensions - Archive of obsolete content
the generator comprehensions syntax is non-standard and removed starting with firefox 58.
... the generator comprehension syntax was a javascript expression which allowed you to quickly assemble a new generator function based on an existing iterable object.
... syntax (for (x of iterable) x) (for (x of iterable) if (condition) x) (for (x of iterable) for (y of iterable) x + y) description inside generator comprehensions, these two kinds of components are allowed: for...of and if the for-of iteration is always the first component.
...And 2 more matches
Making decisions in your code — conditionals - Learn web development
else syntax basic if...else syntax looks like the following in pseudocode: if (condition) { code to run if condition is true } else { run some other code instead } here we've got: the keyword if followed by some parentheses.
... a real example to understand this syntax better, let's consider a real example.
...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 2 more matches
Server-side web frameworks - Learn web development
web frameworks allow you to write simplified syntax that will generate server-side code to work with these requests and responses.
... for example, the django template system allows you to specify variables using a "double-handlebars" syntax (e.g.
...the template system also provides support for expressions (with syntax: {% expression %}), which allow templates to perform simple operations like iterating list values passed into the template.
...And 2 more matches
Getting started with React - Learn web development
react uses an html-in-javascript syntax called jsx (javascript and xml).
...its biggest departure from javascript comes with the use of jsx syntax.
... jsx extends javascript's syntax so that html-like code can live alongside it.
...And 2 more matches
Creating our first Vue component - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
... {{}} is a special template syntax in vue, which lets us print the result of javascript expressions defined in our class, inside our template, including values and methods.
...in a similar fashion to how vue uses {{}} expressions to display javascript expressions inside templates, vue has a special syntax to bind javascript expressions to html elements and components: v-bind.
...And 2 more matches
Command line options
syntax rules but first, let's describe the syntax rules that apply for all options.
... each message option follows the syntax field=value, for example: to=foo@nowhere.net subject=cool page attachment=www.mozilla.org attachment='file:///c:/test.txt' body=check this page or also in thunderbird 52 and newer: body=c:\path\to\file.txt separate multiple message options by comma (,), for example: "to=foo@nowhere.net,subject=cool page" .
...in general, the syntax is as follows: application -option -option "argument" -option argument examples the following examples show the use of the "-profilemanager" command, which will open the profile manager prior to starting firefox or thunderbird: windows select run from windows start menu.
...And 2 more matches
PromiseWorker.jsm
post syntax promise = myworker.post(afunctionname, aargs, aclosure, atransferlist); parameters afunctionname the name of the function to be called as it appears in the worker file.
...the command outline below this shows how to do the same with meta syntax.
...also unlike sending/transferring from the main thread, when sending/transferring from worker there are no alternative syntaxes, it must be wrapped in a meta object.
...And 2 more matches
Parser API
this makes it easier to write tools in javascript that manipulate javascript source programs, such as syntax highlighters, static analyses, translators, compilers, obfuscators, etc.
...by default, the parsing returns a program object (see below) representing the parsed abstract syntax tree (ast).
... if parsing fails due to a syntax error, an instance of syntaxerror is thrown.
...And 2 more matches
Using the CSS properties and values API - Web APIs
css.registerproperty the following will register a css custom properties, --my-prop, using css.registerproperty, as a color, give it a default value, and have it not inherit its value: window.css.registerproperty({ name: '--my-prop', syntax: '<color>', inherits: false, initialvalue: '#c0ffee', }); @property the same registration can take place in css.
... the following will register a css custom properties, --my-prop, using @property, as a color, give it a default value, and have it not inherit its value: @property --my-prop { syntax: '<color>'; inherits: false; initial-value: #c0ffee; } using registered custom properties one of the advantages of registering a property is that the browser now knows how it should handle your custom property through things like transitions!
...when a property has a registered syntax, though, the browser can optimize around that syntax, including being able to animate it!
...And 2 more matches
Document.querySelector() - Web APIs
syntax element = document.queryselector(selectors); parameters selectors a domstring containing one or more selectors to match.
... this string must be a valid css selector string; if it isn't, a syntax_err exception is thrown.
... note: characters that are not part of standard css syntax must be escaped using a backslash character.
...And 2 more matches
PaymentRequest.show() - Web APIs
syntax paymentpromise = paymentrequest.show(detailspromise); parameters detailspromise optional an optional promise that you can provide if your architecture requires that the payment request's details need to be updated between instantiating the payment interface and the user beginning to interact with it.
... usage notes the most common patterns for using show() involve either the async/await syntax or the use of show().then().catch() to handle the response and any possible rejection.
... those look like this: async/await syntax using await to wait for a promise to be resolved makes it possible to write the code to handle payments particularly cleanly: async function processpayment() { try { const payrequest = new paymentrequest(methoddata, details, options); payrequest.onshippingaddresschange = ev => ev.updatewith(checkaddress(payrequest)); payrequest.onshippingoptionchange = ev => ev.updatewith(checkshipping(payrequest)); const repsonse = await payrequest.show(); await validateresponse(response); } catch(err) { /* handle the error; aborterror usually means a user cancellation */ } } in this code, the methods checkaddress() and checkshipping(), respectively, check the shipping address and the shipping option changes and supply in response ei...
...And 2 more matches
RTCPeerConnection.setRemoteDescription() - Web APIs
syntax apromise = rtcpeerconnection.setremotedescription(sessiondescription); parameters sessiondescription an rtcsessiondescriptioninit or rtcsessiondescription which specifies the remote peer's current offer or answer.
...this lets you simplify code such as the following: mypeerconnection.setremotedescription(new rtcsessiondescription(description)) .then(function () { return createmystream(); }) to simply be: mypeerconnection.setremotedescription(description) .then(function () { return createmystream(); }) using async/await syntax, you can further simplify this to: await mypeerconnection.setremotedescription(description); createmystream(); since it's unnecessary, the rtcsessiondescription() constructor is deprecated.
... rtcerror an rtcerror with the errordetail set to sdp-syntax-error is reported if the sdp specified by rtcsessiondescription.sdp.
...And 2 more matches
@supports - CSS: Cascading Style Sheets
WebCSS@supports
syntax the @supports at-rule associates a block of statements with a supports condition.
... declaration syntax the most basic supports condition is a simple declaration (a property name followed by a value, separated by a colon).
...the following example returns true if the browser's transform-origin property considers 5% 5% valid: @supports (transform-origin: 5% 5%) {} function syntax the second basic supports condition is a supports function, the syntax for these is supported by all browsers, but the functions themselves are still being standardized.
...And 2 more matches
flex - CSS: Cascading Style Sheets
WebCSSflex
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 value...
... 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 2 more matches
font-stretch - CSS: Cascading Style Sheets
sed; font-stretch: extra-condensed; font-stretch: condensed; font-stretch: semi-condensed; font-stretch: normal; font-stretch: semi-expanded; font-stretch: expanded; font-stretch: extra-expanded; font-stretch: ultra-expanded; /* percentage values */ font-stretch: 50%; font-stretch: 100%; font-stretch: 200%; /* global values */ font-stretch: inherit; font-stretch: initial; font-stretch: unset; syntax this property may be specified as a single keyword value or a single <percentage> value.
...css fonts level 4 extends the syntax to accept a <percentage> value as well.
... however, note that the <percentage> syntax is not yet supported by all browsers: check the browser compatibility table for details.
...And 2 more matches
transform-origin - CSS: Cascading Style Sheets
syntax /* one-value syntax */ transform-origin: 2px; transform-origin: bottom; /* x-offset | y-offset */ transform-origin: 3cm 2px; /* x-offset-keyword | y-offset */ transform-origin: left 2px; /* x-offset-keyword | y-offset-keyword */ transform-origin: right top; /* y-offset-keyword | x-offset-keyword */ transform-origin: top right; /* x-offset | y-offset | z-offset */ transform-origin: 2px 30% 1...
... one-value syntax: the value must be a <length>, a <percentage>, or one of the keywords left, center, right, top, and bottom.
... two-value syntax: one value must be a <length>, a <percentage>, or one of the keywords left, center, and right.
...And 2 more matches
Expressions and operators - JavaScript
destructuring for more complex assignments, the destructuring assignment syntax is a javascript expression that makes it possible to extract data from arrays or objects using a syntax that mirrors the construction of array and object literals.
...the syntax is: condition ?
...the syntax is: delete object.property; delete object[propertykey]; delete property; // legal only within a with statement where object is the name of an object, property is an existing property, and propertykey is a string or symbol referring to an existing property.
...And 2 more matches
Loops and iteration - JavaScript
this expression usually initializes one or more loop counters, but the syntax allows an expression of any degree of complexity.
... the syntax of the labeled statement looks like the following: label : statement the value of label may be any javascript identifier that is not a reserved word.
... the syntax of the break statement looks like this: break; break [label]; the first form of the syntax terminates the innermost enclosing loop or switch.
...And 2 more matches
Warning: JavaScript 1.6's for-each-in loops are deprecated - JavaScript
deprecated syntax var object = { a: 10, b: 20 }; for each (var x in object) { console.log(x); // 10 // 20 } alternative standard syntax you can now use the standard for...in loop to iterate over specified object keys, and get each value inside the loop: var object = { a: 10, b: 20 }; for (var key in object) { var x = object[key]; console.log(x); // 10 ...
... deprecated syntax var array = [10, 20, 30]; for each (var x in array) { console.log(x); // 10 // 20 // 30 } alternative standard syntax this is now possible with for...of (es2015) loops as well.
... deprecated syntax function func(array) { for each (var x in array) { console.log(x); } } func([10, 20]); // 10 // 20 func(null); // prints nothing func(undefined); // prints nothing alternative standard syntax to rewrite for each...in statements so that values can be null or undefined with for...of as well, you need to guard around for...of.
...And 2 more matches
Property accessors - JavaScript
syntax object.property object['property'] description one can think of an object as an associative array (a.k.a.
... dot notation in the object.property syntax, the property must be a valid javascript identifier.
... const variable = object.property_name; object.property_name = value; const object = {}; object.$1 = 'foo'; console.log(object.$1); // 'foo' object.1 = 'bar'; // syntaxerror console.log(object.1); // syntaxerror here, the method named createelement is retrieved from document and is called.
...And 2 more matches
Expressions and operators - JavaScript
[] array initializer/literal syntax.
... {} object initializer/literal syntax.
... /ab+c/i regular expression literal syntax.
...And 2 more matches
class - JavaScript
but unlike a class expression, a class declaration doesn't allow an existing class to be declared again and will throw a syntaxerror if attempted.
... syntax class name [extends othername] { // class body } description the class body of a class declaration is executed in strict mode.
... class polygon { constructor(height, width) { this.name = 'polygon'; this.height = height; this.width = width; } } class square extends polygon { constructor(length) { super(length, length); this.name = 'square'; } } attempting to declare a class twice re-declaring a class using the class declaration throws a syntaxerror.
...And 2 more matches
import - JavaScript
syntax import defaultexport from "module-name"; import * as name from "module-name"; import { export1 } from "module-name"; import { export1 as alias1 } from "module-name"; import { export1 , export2 } from "module-name"; import { foo , bar } from "module-name/path/to/specific/un-exported/file"; import { export1 , export2 as alias2 , [...] } from "module-name"; import defaultexport, { export1 [ , [...]...
...the export parameters specify individual named exports, while the import * as name syntax imports all of them.
... below are examples to clarify the syntax.
...And 2 more matches
Template literals (Template strings) - JavaScript
syntax `string text` `string text line 1 string text line 2` `string text ${expression} string text` tag`string text ${expression} string text` description template literals are enclosed by the backtick (` `) (grave accent) character instead of double or single quotes.
... using normal strings, you would have to use the following syntax in order to get multi-line strings: console.log('string text line 1\n' + 'string text line 2'); // "string text line 1 // string text line 2" using template literals, you can do the same like this: console.log(`string text line 1 string text line 2`); // "string text line 1 // string text line 2" expression interpolation in order to embed expressions within normal strings, you would use the ...
...following syntax: let a = 5; let b = 10; console.log('fifteen is ' + (a + b) + ' and\nnot ' + (2 * a + b) + '.'); // "fifteen is 15 and // not 20." now, with template literals, you are able to make use of the syntactic sugar, making substitutions like this more readable: let a = 5; let b = 10; console.log(`fifteen is ${a + b} and not ${2 * a + b}.`); // "fifteen is 15 and // not 20." nesting templates in certain cases, nesting a template is the easiest (and perhaps more readable) way to have configurable strings.
...And 2 more matches
Trailing commas - JavaScript
syntax , examples trailing commas in literals arrays javascript ignores trailing commas in arrays: var arr = [ 1, 2, 3, ]; arr; // [1, 2, 3] arr.length; // 3 if more than one trailing comma is used, an elision (or hole) is produced.
... f(p); f(p,); math.max(10, 20); math.max(10, 20,); illegal trailing commas function parameter definitions or function invocations only containing a comma will throw a syntaxerror.
... furthermore, when using a rest parameters, trailing commas are not allowed: function f(,) {} // syntaxerror: missing formal parameter (,) => {}; // syntaxerror: expected expression, got ',' f(,) // syntaxerror: expected expression, got ',' function f(...p,) {} // syntaxerror: parameter after rest parameter (...p,) => {} // syntaxerror: expected closing parenthesis, got ',' trailing commas in destructuring a trailing comma is also allowed on the left-hand side when using destructuring assignment: // array destructuring with trailing comma [a, b,] = [1, 2]; // object destructuring with trailing comma var o = { p: 42, q: true, }; var {p, q,} = o; again, when using a rest element, a syntaxerror will be thrown: var [a, ...b,] = [1, 2, 3]; // syntaxerror: rest e...
...And 2 more matches
page-mod - Archive of obsolete content
exclude has the same syntax as include, but specifies the urls to which content scripts should not be attached, even if they match include: so it's a way of excluding a subset of the urls that include specifies.
.../page-mod"); pagemod.pagemod({ include: /.*developer.*/, contentscript: 'window.alert("matched!");' }); to specify multiple patterns, pass an array of match patterns: var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: ["*.foo.org", "*.bar.com"], contentscript: 'window.alert("matched!");' }); see the match-pattern module for a detailed description of match pattern syntax.
...this takes the same syntax as the include option: a match-pattern string or regular expression, or an array of match pattern strings or regular expressions.
...see the documentation of the include option above for details of include syntax.
JavaScript Daemons Management - Archive of obsolete content
* *******************************/ /******************************* * polyfills * *******************************/ /*\ |*| |*| ie-specific polyfill which enables the passage of arbitrary arguments to the |*| callback functions of javascript timers (html5 standard syntax).
... |*| |*| https://developer.mozilla.org/docs/dom/window.setinterval |*| |*| syntax: |*| var timeoutid = window.settimeout(func, delay, [param1, param2, ...]); |*| var timeoutid = window.settimeout(code, delay); |*| var intervalid = window.setinterval(func, delay[, param1, param2, ...]); |*| var intervalid = window.setinterval(code, delay); |*| \*/ /* if (document.all && !window.settimeout.ispolyfill) { var __nativest__ = window.settimeout; window.settimeout = function (vcallback, ndelay) { var aargs = array.prototype.slice.call(arguments, 2); return __nativest__(vcallback instanceof function ?
...date.parse(vdate) : vdate; if (isfinite(ntime) && ntime > date.now()) { this.length = math.floor((ntime - date.now()) / this.rate) + this.index; this.pause(); this.start(); } return this.length; }; manual the constructor syntax var mydaemon = new daemon(thisobject, callback[, rate[, length[, init[, onstart]]]]); description constructs a javascript object containing all information needed by an animation (like the this object, the callback function, the length, the frame rate, the number of cycles, and the init and onstart functions).
... daemon.safe() [optional module daemon-safe.js] syntax var mydaemon = new daemon.safe(thisobject, callback[, rate[, length[, init[, onstart]]]]); description daemon.safe is a clone of the daemon constructor based on recursive invocations of settimeout rather than on a single invocation of setinterval.
Special Condition Tests - Archive of obsolete content
here is a previous example, rewritten to use the parent matching syntax: <vbox datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="*"/> <rule parent="vbox"> <action> <groupbox uri="?"> <caption label="?name"/> </groupbox> </action> </rule> <rule> <action> <label uri="?" value="?name"/> </action> </rule> </template> </vbox> previously, an assign element was used to...
...here is the same example using the extended template syntax: <vbox datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood"> <template> <query> <content uri="?start"/> <member container="?start" child="?item"/> </query> <rule parent="vbox"> <binding subject="?item" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> <action> <groupbox uri="?item"> ...
... <caption label="?title"/> </groupbox> </action> </rule> <rule> <binding subject="?item" predicate="http://www.xulplanet.com/rdf/address" object="?address"/> <action> <label uri="?item" value="?address"/> </action> </rule> </template> </vbox> containment tests for rdf sources, the simple rule syntax supports two special conditional tests that are commonly used with multiple rules.
...note that both the iscontainer and isempty attributes are only available for rdf datasources and for rules that use the simple syntax.
Manifest Files - Archive of obsolete content
the basic syntax of the lines in the manifest file for content packages is: 'content <packagename> <filepath>' the first field 'content' indicates a content package.
...for a jar file located in the chrome directory, the syntax is fairly simple: jar:<filename.jar>!/<path_in_archive> for the browser package, the archive is browser.jar, located alongside the manifest file in the chrome directory.
...themes and locales the themes and locales, the syntax is similar as for content packages, but you also need to specify the content package you are providing a theme or locale for.
...<?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#"> <rdf:seq about="urn:mozilla:package:root"> <rdf:li resource="urn:mozilla:package:myapplication"/> </rdf:seq> <rdf:description about="urn:mozilla:package:myapplication" chrome:displayname="application title" chrome:author="author name" chrome:name="myapplication" chrome:extension="t...
Styling a Tree - Archive of obsolete content
you can think of the properties as functioning much like style classes, although they require a somewhat more complex syntax to use in a style sheet.
...the following is the syntax that needs to be used: treechildren::-moz-tree-row(makeitblue) { background-color: blue; } this style which has a complex selector is used to style the background color of rows that have the 'makeitblue' property.
... this special syntax is needed because the cells themselves are not separate elements.
... setting properties for the rdf-built trees for rdf-built trees, you can use the same syntax.
Expression closures - Archive of obsolete content
the expression closure syntax is a deprecated firefox-specific feature and has been removed starting with firefox 60.
... expression closures are a shorthand function syntax for writing simple functions.
... syntax function [name]([param1[, param2[, ..., paramn]]]) expression parameters name the function name.
... javascript 1.7 and older: function(x) { return x * x; } javascript 1.8: function(x) x * x this syntax allows you to leave off the braces and 'return' statement - making them implicit.
Archived open Web documentation - Archive of obsolete content
the goal is to provide an alternative, simpler syntax for accessing xml documents than via dom interfaces.
... e4x tutorial this tutorial walks you through the basic syntax of e4x (ecmascript for xml).
... with e4x, programmers can manipulate an xml document with a syntax more familiar to javascript programming.
... sharp variables in javascript a sharp variable is a syntax in object initializers that allows serialization of objects that have cyclic references or multiple references to the same object.
Windows Media in Netscape - Archive of obsolete content
accessing properties and controls from the document object works well with ie also, and thus, in order to deploy cross-platform code, avoiding syntax that makes use of global namespace is important.
...a good illustration of the use of this non-standard script element syntax is in creating closed captioning of media content.
...use of html behaviors in conjunction with windows media player the only ie emulation that netscape 7.1 does in terms of html usage is with respect to the object element usage with clsid and script for="" event="" syntax.
... when scripting the player, ensure that you use the syntax document.playerelementname.property as opposed to playerelementname.property.
Quality values - MDN Web Docs Glossary: Definitions of Web-related terms
it is a special syntax allowed in some http headers and in html.
... examples the following syntax text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 indicates the order of priority: value priority text/html and application/xhtml+xml 1.0 application/xml 0.9 */* 0.8 if there is no priority defined for the first two values, the order in the list is irrelevant.
... nevertheless, with the same quality, more specific values have priority over less specific ones: text/html;q=0.8,text/*;q=0.8,*/*;q=0.8 value priority text/html 0.8 (but totally specified) text/* 0.8 (partially specified) */* 0.8 (not specified) some syntax, like the one of accept, allow additional specifiers like text/html;level=1.
... more information http headers using q-values in their syntax: accept, accept-charset, accept-language, accept-encoding, te.
Loop - MDN Web Docs Glossary: Definitions of Web-related terms
examples for loop syntax: for (statement 1; statement 2; statement 3){ execute code block } statement 1 is executed once before the code block is run.
... 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).
... while loop syntax: while (condition){ execute code block } the code block will continue to loop as long as the condition is true.
... 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.
Web fonts - Learn web development
the syntax required looks something like this: first of all, you have a @font-face block at the start of the css, which specifies the font file(s) to download: @font-face { font-family: "myfont"; src: url("myfont.woff"); } below this you can then use the font family name specified inside @font-face to apply your custom font to anything you like, as normal: html { font-family: "myfont", "bitstream ...
...vera serif", serif; } the syntax does get a bit more complex than this; we'll go into more detail below.
... @font-face in more detail let's explore that @font-face syntax generated for you by fontsquirrel.
...t.eot?#iefix') format('embedded-opentype'), url('fonts/cicle_fina-webfont.woff2') format('woff2'), url('fonts/cicle_fina-webfont.woff') format('woff'), url('fonts/cicle_fina-webfont.ttf') format('truetype'), url('fonts/cicle_fina-webfont.svg#ciclefina') format('svg'); font-weight: normal; font-style: normal; } this is referred to as "bulletproof @font-face syntax", after a post by paul irish from early on when @font-face started to get popular (bulletproof @font-face syntax).
JavaScript object basics - Learn web development
overview: objects next in this article, we'll look at fundamental javascript object syntax, and revisit some javascript features that we've already seen earlier in the course, reiterating the fact that many of the features you've already dealt with are objects.
...we'll use this as a basis for exploring basic object syntax.
...i\'m ' + this.name[0] + '.'); } }; after saving and refreshing, try entering some of the following into the javascript console on your browser devtools: person.name person.name[0] person.age person.interests[1] person.bio() person.greeting() you have now got some data and functionality inside your object, and are now able to access them with some nice simple syntax!
...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.
Introducing JavaScript objects - Learn web development
here we teach object theory and syntax in detail, then look at how to create your own objects.
... guides object basics in the first article looking at javascript objects, we'll look at fundamental javascript object syntax, and revisit some javascript features we've already looked at earlier on in the course, reiterating the fact that many of the features you've already dealt with are in fact objects.
... working with json data javascript object notation (json) is a standard text-based format for representing structured data based on javascript object syntax, which is commonly used for representing and transmitting data on web sites (i.e.
... object building practice in previous articles we looked at all the essential javascript object theory and syntax details, giving you a solid base to start from.
Aprender y obtener ayuda - Learn web development
some of the articles will be tutorials, to teach you a certain technique or important concept (such as "learn how to create a video player" or "learn the css box model"), and some of the articles will be reference material, to allow you to look up details you may have forgotten (such as "what is the syntax of the css background property"?) mdn web docs is very good for both types — the area you are currently in is great for learning techniques and concepts, and we also have several giant reference sections allowing you to look up any syntax you can't remember.
...as you'll discover, learning web development is more about problem-solving and learning patterns than it is about learning lots of syntaxes.
...if you are a professional web developer you'll probably remember the last time you solved a similar problem, and only have to look up a few bits of the syntax that you forgot since then.
... using mdn the site you are already on has a wealth of information available to you — both reference material for looking up code syntax, and guides/tutorials for learning techniques.
Framework main features - Learn web development
jsx jsx, which stands for javascript and xml, is an extension of javascript that brings html-like syntax to a javascript environment.
...react components can be written with jsx, ember components with handlebars, and angular and vue components with a templating syntax that lightly extends html.
...frameworks each provide their own syntax for listening to browser events, which reference the names of the equivalent native browser events.
...components tend to import components into other components using the standard javascript module syntax, or at least something similar.
TypeScript support in Svelte - Learn web development
from that version onward you have to use export/import type syntax to import types and interfaces.
...value)) // save also to local storage as a string return set(value) }, update } } now if we try to create a localstore with something that cannot be converted to json via json.stringify(), for example an object with a function as a property, vs code/validate will complain about it: and best of all, it will even work with the $store auto-subscription syntax.
... if we try to save an invalid value to our todos store using the $store syntax, like this: <!-- app.svelte --> <script lang="ts"> import todos from './components/todos.svelte' import alert from './components/alert.svelte' import { todos } from './stores' // this is invalid, the content cannot be converted to json using json.stringify $todos = { handler: () => {} } </script> the validate script will report the following error: > npm run validate getting svelte diagnostics...
...generic types are passed as parameters using a special syntax: they are specified between angle-brackets, and by convention are denoted with an upper-cased single char letter.
Rendering a list of Vue components - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
...in case of v-for, you use a special syntax similar to a for...in loop in javascript — v-for="item in items" — where items is the array you want to iterate over, and item is a reference to the current element in the array.
... key attribute before we do that, there's one other piece of syntax to know about that is used with v-for, the key attribute.
...this means we can pass the fields of our item objects to our todoitem component — just remember to use the v-bind syntax.
Introducing a complete toolchain - Learn web development
tools used in our toolchain in this article we're going to use the following tools and features: jsx, a react-related set of syntax extensions that allow you to do things like defining component structures inside javascript.
... however, in the project's source files we are using react jsx syntax (for your real projects you might use react or vue or any other framework, or no framework at all!).
... putting jsx syntax in the middle of our javascript is going to cause eslint to complain pretty quickly with the current configuration, so we'll need to add a little more configuration to the eslint settings to get it to accept jsx features.
... you could also try using eslint and prettier too — try deliberately removing a load of the whitespace from one of your files and try put prettier on it to clean it up, or introduce a syntax error into one of your javascript files and see what errors eslint gives you when you try to use parcel to build it again.
Adding a new CSS property
parsing to start implementing the parsing, first read the syntax line in the property's specification (whose syntax is in turn defined in the css values and units specification) and any prose in the specification that adds additional restrictions to that syntax.
... given the syntax for the property, you can determine which one to use.
... some common mistakes to watch out for when writing custom parsing code (which might go away if we redesign the parser along the lines described in css3-syntax): make sure to call skipuntil() to look for the matching close parentheses, braces, or brackets whenever you hit an error inside of them.
... this line describes the conceptual representation (but not syntax) of the computed value of the property.
Scripting Java
we can use that syntax here in combination with a function expression to define a javascript object with a run method: js> obj = { run: function () { print("\nrunning"); } } [object object] js> obj.run() running now we can create an object implementing the runnable interface by constructing a runnable: js> r = new java.lang.runnable(obj); [object javaobject] in java it is not possible to use the new operator on ...
... the syntax of the javaadapter constructor is: new javaadapter(javaintforclass, [javaintf, ..., javaintf,] javascriptobject) here javaintforclass is an interface to implement or a class to extend and javaintf are aditional interfaces to implement.
...most of the time the previous syntaxes using the new operator will be sufficient.
... creating java arrays rhino provides no special syntax for creating java arrays.
Bytecode Descriptions
used to implement spread-call syntax: f(...args).
...this is checked by the jsop::checkglobalorevaldecl bytecode instruction that must appear before jsop::def{var,let,const,fun}.) throw a syntaxerror if the current variableenvironment is the global environment and a binding with the same name exists on the global lexical environment.
...throw a syntaxerror if a binding with the same name already exists on that environment, or if a var binding with the same name exists on the global.
...implements: delete identifier, which is a syntaxerror in strict mode code.
Style Editor - Firefox Developer Tools
the editor provides line numbers and syntax highlighting to help make it easier to read your css.
...these tools generate css files from a richer and more expressive syntax.
... if you do this, being able to see and edit the generated css is not so useful, because the code you maintain is the preprocessor syntax, not the generated css.
... source maps enable the tools to map back from the generated css to the original syntax, so they can display, and allow you to edit, files in the original syntax.
BaseAudioContext.decodeAudioData() - Web APIs
syntax older callback syntax: baseaudiocontext.decodeaudiodata(arraybuffer, successcallback, errorcallback); newer promise-based syntax: promise<decodeddata> baseaudiocontext.decodeaudiodata(arraybuffer); parameters arraybuffer an arraybuffer containing the audio data to be decoded, usually grabbed from xmlhttprequest, windoworworkerglobalscope.fetch() or filereader.
... example in this section we will first cover the older callback-based system and then the newer promise-based syntax.
... older callback syntax in this example, the getdata() function uses xhr to load an audio track, setting the responsetype of the request to arraybuffer so that it returns an array buffer as its response that we then store in the audiodata variable .
...og("error with decoding audio data" + e.err); }); } request.send(); } // wire up buttons to stop and play audio play.onclick = function() { getdata(); source.start(0); play.setattribute('disabled', 'disabled'); } stop.onclick = function() { source.stop(0); play.removeattribute('disabled'); } // dump script to pre element pre.innerhtml = myscript.innerhtml; new promise-based syntax ctx.decodeaudiodata(audiodata).then(function(decodeddata) { // use the decoded data here }); specifications specification status comment web audio apithe definition of 'decodeaudiodata()' in that specification.
CSS.registerProperty() - Web APIs
syntax css.registerproperty(propertydefinition); parameters a propertydefinition dictionary object, which can contain the following members: name a domstring indicating the name of the property being defined.
... syntax optional a domstring representing the expected syntax of the defined property.
... syntaxerror the given name isn't a valid custom property name (starts with two dashes, e.g.
... examples the following will register a custom property, --my-color, using registerproperty(), as a color, give it a default value, and have it not inherit its value: window.css.registerproperty({ name: '--my-color', syntax: '<color>', inherits: false, initialvalue: '#c0ffee', }); in this example, the custom property --my-color has been registered using the syntax <color> .
Document.querySelectorAll() - Web APIs
syntax elementlist = parentnode.queryselectorall(selectors); parameters selectors a domstring containing one or more selectors to match against.
... this string must be a valid css selector string; if it's not, a syntaxerror exception is thrown.
... note: characters which are not part of standard css syntax must be escaped using a backslash character.
... exceptions syntaxerror the syntax of the specified selectors string is not valid.
DocumentFragment.querySelector() - Web APIs
if the selectors specified in parameter are invalid a domexception with a syntax_err value is raised.
... syntax element = documentfragment.queryselector(selectors); parameters selectors is a domstring containing one or more css selectors separated by commas.
... examples basic example in this basic example, the first element in the documentfragment with the class "myclass" is returned: var el = documentfragment.queryselector(".myclass"); css syntax and the method's argument the string argument pass to queryselector must follow the css syntax.
... to match id or selectors that do not follow the css syntax (by using semicolon or space inappropriately for example), it's mandatory to escape the wrong character with a double back slash: <div id="foo\bar"></div> <div id="foo:bar"></div> <script> document.queryselector('#foo\bar') // does not match anything document.queryselector('#foo\\\\bar') // match the first div document.queryselector('#foo:bar') // does not match anything document.queryselector('#foo\\:bar') // match the second div </script> specifications specification status comment selectors api level 2the definition of 'documentfragment.queryselector' in that specification.
Element.querySelectorAll() - Web APIs
syntax elementlist = parentnode.queryselectorall(selectors); parameters selectors a domstring containing one or more selectors to match against.
... this string must be a valid css selector string; if it's not, a syntaxerror exception is thrown.
... note: characters which are not part of standard css syntax must be escaped using a backslash character.
... exceptions syntaxerror the syntax of the specified selectors string is not valid.
ParentNode.querySelector() - Web APIs
syntax element = parentnode.queryselector(selectors); parameters selectors a domstring containing one or more selectors to match against.
... this string must be a valid compound selector list supported by the browser; if it's not, a syntaxerror exception is thrown.
... note: characters which are not part of standard css syntax must be escaped using a backslash character.
... exceptions syntaxerror the syntax of the specified selectors string is not valid.
ParentNode.querySelectorAll() - Web APIs
note: this method is implemented as element.queryselectorall(), document.queryselectorall(), and documentfragment.queryselectorall() syntax elementlist = parentnode.queryselectorall(selectors); parameters selectors a domstring containing one or more selectors to match against.
... this string must be a valid css selector string; if it's not, a syntaxerror exception is thrown.
... note: characters which are not part of standard css syntax must be escaped using a backslash character.
... exceptions syntaxerror the syntax of the specified selectors string is not valid.
RTCErrorEvent.error - Web APIs
syntax let errorinfo = rtcerrorevent.error; value an rtcerror object whose properties provide details about the error which has occurred in the context of a webrtc operation.
... sdplinenumber 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.
... null if the error isn't an sdp syntax error.
... datachannel.addeventlistener("error", (event) => { let error = event.error; if (error.errordetail === "sdp-syntax-error") { let errline = error.sdplinenumber; 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...
@import - CSS: Cascading Style Sheets
WebCSS@import
syntax @import url; @import url list-of-media-queries; @import url supports( supports-query ); @import url supports( supports-query ) list-of-media-queries; where: url is a <string> or a <url> representing the location of the resource to import.
... formal syntax @import [ <string> | <url> ] [ <media-query-list> ]?;where <media-query-list> = <media-query>#where <media-query> = <media-condition> | [ not | only ]?
... candidate recommendation extended the syntax to support the @supports syntax.
... recommendation extended the syntax to support any media query and not only simple media types.
OpenType font features guide - CSS: Cascading Style Sheets
note: the examples below show the properties and some example combinations, along with the lower-level syntax equivalents.
... font variant shorthand (font-variant) this is the shorthand syntax for defining all of the above.
...(meaning that if kerning is on by default, it will still be on even with a value of none being supplied here.) font feature settings font-feature-settings is the 'low level syntax' that allows explicit access to every named available opentype feature.
... the general syntax looks like this: .small-caps { font-feature-settings: "smcp", "c2sc"; } according to the specification you can either supply just the 4-character feature code or supply a 1 following the code (for enabling that feature) or a 0 (zero) to disable it.
Comments - CSS: Cascading Style Sheets
WebCSSComments
syntax comments can be placed wherever white space is allowed within a style sheet.
... /* comment */ examples /* a one-line comment */ /* a comment which stretches over several lines */ /* the comment below is used to disable specific styling */ /* span { color: blue; font-size: 1.5em; } */ notes the /* */ comment syntax is used for both single and multiline comments.
...as with most programming languages that use the /* */ comment syntax, comments cannot be nested.
... specifications css 2.1 syntax and basic data types #comments ...
Using media queries - CSS: Cascading Style Sheets
note: the examples on this page use css's @media for illustrative purposes, but the basic syntax remains the same for all types of media queries.
... syntax a media query is composed of an optional media type and any number of media feature expressions.
...} syntax improvements in level 4 the media queries level 4 specification includes some syntax improvements to make media queries using features that have a "range" type, for example width or height, less verbose.
...} this would convert to the level 4 syntax as: @media (30em <= width <= 50em ) { ...
background-repeat - CSS: Cascading Style Sheets
syntax /* keyword values */ background-repeat: repeat-x; background-repeat: repeat-y; background-repeat: repeat; background-repeat: space; background-repeat: round; background-repeat: no-repeat; /* two-value syntax: horizontal | vertical */ background-repeat: repeat space; background-repeat: repeat repeat; background-repeat: round space; background-repeat: no-repeat round; /* global values */ backgro...
...und-repeat: inherit; background-repeat: initial; background-repeat: unset; values <repeat-style> the one-value syntax is a shorthand for the full two-value syntax: single value two-value equivalent repeat-x repeat no-repeat repeat-y no-repeat repeat repeat repeat repeat space space space round round round no-repeat no-repeat no-repeat in the two-value syntax, the first value represents the horizontal repetition behavior and the second value represents the vertical behavior.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valuea list, each item consisting of two keywords, one per dimensionanimation typediscrete formal syntax <repeat-style>#where <repeat-style> = repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2} examples setting background-repeat html <ol> <li>no-repeat <div class="one"></div> </li> <li>repeat <div class="two"></div> </li> <li>repeat-x <div class="three"></div> </li> <li>repeat-y <div class="four"></div> </li> <li>space <div class="five"></div...
... candidate recommendation adds support for multiple background images, the two-value syntax allowing distinct repetition behavior for the horizontal and vertical directions, the space and round keywords, and for backgrounds on inline-level elements by precisely defining the background painting area.
<basic-shape> - CSS: Cascading Style Sheets
syntax the <basic-shape> data type is defined with one of the basic shape functions listed below.
...all <basic-shape> values use functional notation and are defined here using the value definition syntax.
...these arguments follow the syntax of the margin shorthand, that let you set all four insets with one, two or four values.
... the optional <border-radius> argument(s) define rounded corners for the inset rectangle using the border-radius shorthand syntax.
conic-gradient() - CSS: Cascading Style Sheets
syntax /* a conic gradient rotated 45 degrees, starting blue and finishing red */ conic-gradient(from 45deg, blue, red); /* a a bluish purple box: the gradient goes from blue to red, but as only the bottom right quadrant is visible, as the center of the conic gradient is in at the top left corner */ conic-gradient(from 90deg at 0 0, blue, red); /* colorwheel */ background: conic-gradient( ...
... composition of a conic gradient the conic-gradient syntax is similar to the radial-gradient syntax, but the color-stops are placed around a gradient arc, the circumference of a circle, rather than on the gradient line emerging from the center of the gradient.
... similar to radial gradients, the conic gradient syntax provides for positioning the center of the gradient anywhere within, or even outside, the image.
... the values for the position are similar to the syntax for 2-value background-position.
font-weight - CSS: Cascading Style Sheets
syntax /* keyword values */ font-weight: normal; font-weight: bold; /* keyword values relative to the parent */ font-weight: lighter; font-weight: bolder; /* numeric keyword values */ font-weight: 100; font-weight: 200; font-weight: 300; font-weight: 400;// normal font-weight: 500; font-weight: 600; font-weight: 700;// bold font-weight: 800; font-weight: 900; /* global values */ font-weight: inherit; font-weight: initial; font...
... 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.
... for the example below to work, you'll need a browser that supports the css fonts level 4 syntax in which font-weight can be any number between 1 and 1000.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valuethe keyword or the numerical value as specified, with bolder and lighter transformed to the real valueanimation typea font weight formal syntax <font-weight-absolute> | bolder | lighterwhere <font-weight-absolute> = normal | bold | <number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[1,1000]> examples setting font weights html <p> alice was beginning to get very tired of sitting by her sister on the bank, and...
hanging-punctuation - CSS: Cascading Style Sheets
ging-punctuation: first force-end; hanging-punctuation: first allow-end; hanging-punctuation: first last; hanging-punctuation: last force-end; hanging-punctuation: last allow-end; /* three keywords */ hanging-punctuation: first force-end last; hanging-punctuation: first allow-end last; /* global values */ hanging-punctuation: inherit; hanging-punctuation: initial; hanging-punctuation: unset; syntax the hanging-punctuation property may be specified with one, two, or three values.
... one-value syntax uses any one of the keyword values in the list below.
... two-value syntax uses one of the following: first together with any one of last, allow-end, or force-end last together with any one of first, allow-end, or force-end three-value syntax uses one of the following: first, allow-end, and last first, force-end, and last values none no character hangs.
... formal definition initial valuenoneapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | [ first | [ force-end | allow-end ] | last ] examples setting opening and closing quotes to hang html <p>“lorem ipsum dolor sit amet, consectetur adipiscing elit.
image() - CSS: Cascading Style Sheets
syntax image( <image-tags>?
...the syntax looks like so: background-image: image('myimage.webp#xywh=0,20,40,60'); the background image of the element will be the portion of the image myimage.webp that starts at the coordinate 0px, 20px (the top left hand corner) and is 40px wide and 60px tall.
... the #xywh=#,#,#,# media fragment syntax takes four comma separated numeric values.
...the #xywh=#,#,#,# media fragment syntax is 'backwards compatible' in that a media fragment will be ignored if not understood, and won't break the source call when used with url().
list-style-type - CSS: Cascading Style Sheets
syntax /* partial list of types */ list-style-type: disc; list-style-type: circle; list-style-type: square; list-style-type: decimal; list-style-type: georgian; list-style-type: trad-chinese-informal; list-style-type: kannada; /* <string> value */ list-style-type: '-'; /* identifier matching an @counter-style rule */ list-style-type: custom-counter-style; /* keyword value */ list-style-type: none; ...
... ul { list-style: none; } ul li::before { content: "\200b"; } voiceover and list-style-type: none – unfettered thoughts mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.1 | w3c understanding wcag 2.0 formal definition initial valuediscapplies tolist itemsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax <counter-style> | <string> | nonewhere <counter-style> = <counter-style-name> | symbols()where <counter-style-name> = <custom-ident> examples setting list item markers html list 1 <ol class="normal"> <li>hello</li> <li>world</li> <li>what's up?</li> </ol> list 2 <ol class="shortcut"> <li>looks</li> <li>like</li> <li>the</li> <li>same</li> </ol> css ol.normal { list-style-t...
... extends the syntax to support @counter-style rules.
... working draft modify syntax to support for identifiers used in @counter-style rules to keywords.
mask-repeat - CSS: Cascading Style Sheets
/* one-value syntax */ mask-repeat: repeat-x; mask-repeat: repeat-y; mask-repeat: repeat; mask-repeat: space; mask-repeat: round; mask-repeat: no-repeat; /* two-value syntax: horizontal | vertical */ mask-repeat: repeat space; mask-repeat: repeat repeat; mask-repeat: round space; mask-repeat: no-repeat round; /* multiple values */ mask-repeat: space round, no-repeat; mask-repeat: round repeat, space, repeat-x; /* global values */ mask-repeat: inherit; mask-repeat: initial; mask-repeat: unset; by default, the repeated images are clipped to the size of the element, but they can be scaled to fit (using round) or evenly d...
... syntax one or more <repeat-style> values, separated by commas.
... values <repeat-style> the one-value syntax is a shorthand for the full two-value syntax: single value two-value equivalent repeat-x repeat no-repeat repeat-y no-repeat repeat repeat repeat repeat space space space round round round no-repeat no-repeat no-repeat in the two-value syntax, the first value represents the horizontal repetition behavior and the second value represents the vertical behavior.
... formal definition initial valueno-repeatapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueconsists of two keywords, one per dimensionanimation typediscrete formal syntax <repeat-style>#where <repeat-style> = repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2} examples setting repeat for a single mask css #masked { width: 250px; height: 250px; background: blue linear-gradient(red, blue); mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); mask-repeat: repeat; /* can be changed in the live sample */ margin-bottom: 10px;...
<position> - CSS: Cascading Style Sheets
syntax the <position> data type is specified with one or two keywords, with optional offsets.
... /* 1-value syntax */ keyword /* either the horizontal or vertical position; the other axis defaults to center */ value /* the position on the x-axis; the y-axis defaults to 50% */ /* 2-value syntax */ keyword keyword /* a keyword for each direction (the order is irrelevant) */ keyword value /* a keyword for horizontal position, value for vertical position */...
... value keyword /* a value for horizontal position, keyword for vertical position */ value value /* a value for each direction (horizontal then vertical) */ /* 4-value syntax */ keyword value keyword value /* each value is an offset from the keyword that preceeds it */ formal syntax [ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length> | <percentage> ] [ top | center | bottom | <length> | <percentage> ]?
... | [ [ left | right ] [ <length> | <percentage> ] ] && [ [ top | bottom ] [ <length> | <percentage> ] ] ] note: the background-position property also accepts a three-value syntax.
repeating-conic-gradient() - CSS: Cascading Style Sheets
syntax /* starburst: a a blue on blue starburst: the gradient is a starburst of lighter and darker blue, centered in the upper left quandrant, offset by 3degrees so there is no up/down straight line */ background: repeating-conic-gradient( from 3deg at 25% 25%, hsl(200, 100%, 50%) 0deg 15deg, hsl(200, 100%, 60%) 10deg 30deg); ); values <angle> preceded by the from keyterm, and...
... understanding repeating conic gradients the repeating-conic-gradient syntax is similar to the conic-gradient() and repeating-radial-gradient() syntax.
... radial and conic gradient syntax provides for positioning the center of the gradient anywhere within, or even outside, the image.
... the values for the position are similar to the syntax for 2-value background-position.
HTTP Index - HTTP
WebHTTPIndex
8 identifying resources on the web domain, http, path, scheme, syntax, uri, url, url syntax, web, fragment, port, query, resources the target of an http request is called a "resource", whose nature isn't defined further; it can be a document, a photo, or anything else.
... 165 link draft, http, http header, link, needscompattable, needscontent, needssyntax, reference the http link entity-header field provides a means for serialising one or more links in http headers.
... 235 400 bad request client error, http, http status code, reference, status code the hypertext transfer protocol (http) 400 bad request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
... 254 422 unprocessable entity client error, http, http status code, reference, status code, webdav the hypertext transfer protocol (http) 422 unprocessable entity response status code indicates that the server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
Introduction - JavaScript
javascript follows most java expression syntax, naming conventions and basic control-flow constructs which was the reason why it was renamed from livescript to javascript.
...these scripting languages offer programming tools to a much wider audience because of their easier syntax, specialized built-in functionality, and minimal requirements for object creation.
... the ecmascript specification uses terminology and syntax that may be unfamiliar to a javascript programmer.
... in the following pages, this guide introduces you to the javascript syntax and language features, so that you will be able to write more complex applications.
Warning: 08/09 is not a legal ECMA-262 octal constant - JavaScript
message warning: syntaxerror: 08 is not a legal ecma-262 octal constant.
... warning: syntaxerror: 09 is not a legal ecma-262 octal constant.
...with ecmascript 6 and later, the syntax uses a leading zero followed by a lowercase or uppercase latin letter "o" (0o or 0o).
... 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; ...
JavaScript error reference - JavaScript
r: repeat count must be less than infinityrangeerror: repeat count must be non-negativereferenceerror: "x" is not definedreferenceerror: assignment to undeclared variable "x"referenceerror: can't access lexical declaration "x" before initializationreferenceerror: deprecated caller or arguments usagereferenceerror: invalid assignment left-hand sidereferenceerror: reference to undefined property "x"syntaxerror: "0"-prefixed octal literals and octal escape seq.
... are deprecatedsyntaxerror: "use strict" not allowed in function with non-simple parameterssyntaxerror: "x" is a reserved identifiersyntaxerror: json.parse: bad parsingsyntaxerror: malformed formal parametersyntaxerror: unexpected tokensyntaxerror: using //@ to indicate sourceurl pragmas is deprecated.
... use //# insteadsyntaxerror: a declaration in the head of a for-of loop can't have an initializersyntaxerror: applying the "delete" operator to an unqualified name is deprecatedsyntaxerror: for-in loop head declarations may not have initializerssyntaxerror: function statement requires a namesyntaxerror: identifier starts immediately after numeric literalsyntaxerror: illegal charactersyntaxerror: invalid regular expression flag "x"syntaxerror: missing ) after argument listsyntaxerror: missing ) after conditionsyntaxerror: missing : after property idsyntaxerror: missing ; before statementsyntaxerror: missing = in const declarationsyntaxerror: missing ] after element listsyntaxerror: missing formal parametersyntaxerror: missing name after .
... operatorsyntaxerror: missing variable namesyntaxerror: missing } after function bodysyntaxerror: missing } after property listsyntaxerror: redeclaration of formal parameter "x"syntaxerror: return not in functionsyntaxerror: test for equality (==) mistyped as assignment (=)?syntaxerror: unterminated string literaltypeerror: "x" has no propertiestypeerror: "x" is (not) "y"typeerror: "x" is not a constructortypeerror: "x" is not a functiontypeerror: "x" is not a non-null objecttypeerror: "x" is read-onlytypeerror: 'x' is not iterabletypeerror: more arguments neededtypeerror: reduce of empty array with no initial valuetypeerror: x.prototype.y called on incompatible typetypeerror: can't access dead objecttypeerror: can't access property "x" of "y"typeerror: can't assign to property "x" on "y": not a...
Function.name - JavaScript
function dosomething() {} dosomething.name; // "dosomething" function constructor name functions created with the syntax new function(...) or just function(...) create function objects and their name is "anonymous".
... let o = { get foo(){}, set foo(x){} }; var descriptor = object.getownpropertydescriptor(o, "foo"); descriptor.get.name; // "get foo" descriptor.set.name; // "set foo"; function names in classes you can use obj.constructor.name to check the "class" of an object (but be sure to read the warnings below): function foo() {} // es2015 syntax: class foo {} var fooinstance = new foo(); console.log(fooinstance.constructor.name); // logs "foo" warning: the script interpreter will set the built-in function.name property only if a function does not have an own property called name (see section 9.2.11 of the ecmascript2015 language specification).
...above class definition in es2015 syntax will behave in chrome or firefox similar to the following snippet in es5 syntax: function foo() {} object.defineproperty(foo, 'name', { writable: true }); foo.name = function() {}; trying to obtain the class of fooinstance via fooinstance.constructor.name won't give us the class name at all but a reference to the static class method.
... example: let fooinstance = new foo(); console.log(fooinstance.constructor.name); // logs function name() you may also see from the es5 syntax example that in chrome or firefox our static definition of foo.name becomes writable.
Symbol - JavaScript
the symbol() function returns a value of type symbol, has static properties that expose several members of built-in objects, has static methods that expose the global symbol registry, and resembles a built-in object class, but is incomplete as a constructor because it does not support the syntax "new symbol()".
...it creates a new symbol each time: symbol('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).
... if you really want to create a symbol wrapper object, you can use the object() function: let sym = symbol('foo') typeof sym // "symbol" let symobj = object(sym) typeof symobj // "object" shared symbols in the global symbol registry the above syntax using the symbol() function will not create a global symbol that is available in your whole codebase.
...it is incomplete as a constructor because it does not support the syntax "new symbol()".
Iteration protocols - JavaScript
as a couple of additions to ecmascript 2015, iteration protocols aren't new built-ins or syntax, but protocols.
... doing so allows an iterator to be consumed by the various syntaxes expecting iterables.
...ault iterator returns the string's code points one by one: let iterator = somestring[symbol.iterator](); console.log(iterator + ''); // "[object string iterator]" console.log(iterator.next()); // { value: "h", done: false } console.log(iterator.next()); // { value: "i", done: false } console.log(iterator.next()); // { value: undefined, done: true } some built-in constructs—such as the spread syntax—use the same iteration protocol under the hood: console.log([...somestring]); // ["h", "i"] you can redefine the iteration behavior by supplying our own @@iterator: // need to construct a string object explicitly to avoid auto-boxing let somestring = new string('hi'); somestring[symbol.iterator] = function () { return { // this is the iterator object, returning a single element (the s...
... [3, 'c']]).get(2); // "b" let myobj = {}; new weakmap([ [{}, 'a'], [myobj, 'b'], [{}, 'c'] ]).get(myobj); // "b" new set([1, 2, 3]).has(3); // true new set('123').has('2'); // true new weakset(function* () { yield {} yield myobj yield {} }()).has(myobj); // true see also promise.all(iterable) promise.race(iterable) array.from(iterable) syntaxes expecting iterables some statements and expressions expect iterables, for example the for...of loops, the spread operator), yield*, and destructuring assignment: for (let value of ['a', 'b', 'c']) { console.log(value); } // "a" // "b" // "c" console.log([...'abc']); // ["a", "b", "c"] function* gen() { yield* ['a', 'b', 'c']; } console.log(gen().next()); // { value: "a", done: fals...
Nullish coalescing operator (??) - JavaScript
syntax leftexpr ??
...a syntaxerror will be thrown in such cases.
..."foo"; // raises a syntaxerror true || undefined ??
... "foo"; // raises a syntaxerror however, providing parenthesis to explicitly indicate precedence is correct: (null || undefined) ??
break - JavaScript
syntax break [label]; label optional identifier associated with the label of the statement.
... outer_block: { inner_block: { console.log('1'); break outer_block; // breaks out of both inner_block and outer_block console.log(':-('); // skipped } console.log('2'); // skipped } break in labeled blocks that throw the following code also uses break statements with labeled blocks, but generates a syntaxerror because its break statement is within block_1 but references block_2.
... block_1: { console.log('1'); break block_2; // syntaxerror: label not found } block_2: { console.log('2'); } break within functions syntaxerrors are also generated in the following code examples which use break statements within functions that are nested within a loop, or labeled block that the break statements are intended to break out of.
... function testbreak(x) { var i = 0; while (i < 6) { if (i == 3) { (function() { break; })(); } i += 1; } return i * x; } testbreak(1); // syntaxerror: illegal break statement block_1: { console.log('1'); ( function() { break block_1; // syntaxerror: undefined label 'block_1' })(); } specifications specification ecmascript (ecma-262)the definition of 'break statement' in that specification.
MathML documentation index - MathML
WebMathMLIndex
use the following syntax: <mover> base overscript </mover> 23 <mpadded> mathml, mathml reference, mathml:element, mathml:general layout schemata the mathml <mpadded> element is used to add extra padding and to set the general adjustment of position and size of enclosed contents.
...two arguments are accepted, which leads to the syntax: <mroot> base index </mroot>.
...the square root accepts only one argument, which leads to the following syntax: <msqrt> base </msqrt>.
...it uses the following syntax: <munder> base underscript </munder> 39 <munderover> mathml, mathml reference, mathml:element, mathml:script and limit schemata the mathml <munderover> element is used to attach accents or limits both under and over an expression.
transform-origin - SVG: Scalable Vector Graphics
note: as a presentation attribute in svg, transform-origin corresponds in syntax and behavior to the transform-origin property in css, and can be used as css property to style svg.
... one-value syntax: the value must be a <length>, a <percentage>, or one of the keywords left, center, right, top, and bottom.
... two-value syntax: one value must be a <length>, a <percentage>, or one of the keywords left, center, and right.
... three-value syntax: the first two values are the same as for the two-value syntax.
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
this article lists these types along with their syntax and descriptions of what they're used for.
... 11 svg 1.1 support in firefox firefox, svg you can find some basic examples of svg syntax and usage in the w3c svg test suite.
...it has the same syntax and semantics as the baseline descriptor within an @font-face.
... 379 scripting graphics, svg, scripting, default, eventlisteners, preventing, setproperty one can override default browser behaviors with the evt.preventdefault( ) method, add eventlisteners to objects with the syntax element.addeventlistener(event, function, usecapture), and set element properties with syntax svgelement.style.setproperty("fill-opacity", "0.0", "").
Tutorials
html tutorials introductory level introduction to html this module sets the stage, getting you used to important concepts and syntax, looking at applying html to text, how to create hyperlinks, and how to use html to structure a webpage.
...this module provides a gentle beginning to your path towards css mastery with the basics of how it works, what the syntax looks like, and how you can start using it to add styling to html.
... css building blocks this module carries on where css first steps left off — now you've gained familiarity with the language and its syntax, and got some basic experience with using it, its time to dive a bit deeper.
...here we teach object theory and syntax in detail, look at how to create your own objects, and explain what json data is and how to work with it.
Multiple item extension packaging - Archive of obsolete content
<rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:nc="http://home.netscape.com/nc-rdf#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <description about="urn:mozilla:install-manifest"> <!-- nsiupdateitem type for a multiple item package --> <em:type nc:parsetype="integer">32</em:type> ...
... for the firefox and thunderbird 2.0 extension manager you can use the above syntax or <em:type>32</em:type> as shown below.
...<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"> <!-- nsiupdateitem type for a multiple item package --> <em:type>32</em:type> ...
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
xml coding css coding basic javascript syntax xml: a text-based structural language extensible markup language (xml) is a meta-language for expressing various kinds of data.
... listing 1: xml syntax <elementname someattribute="somevalue"> content </elementname> as shown in listing 1, xml uses elements, which consist of an opening tag, a closing tag, and content.
...as shown in listing 1, it has an extremely simple syntax.
JXON - Archive of obsolete content
alert((new xmlserializer()).serializetostring(newdoc)); }; var oreq = new xmlhttprequest(); oreq.onload = reqlistener; oreq.open("get", "example.xml", true); oreq.send(); jxon.build syntax jxon.build(document[, verbosity[, freeze[, nesteattributes]]]) jxon.build description returns a javascript object based on the given xml document.
... jxon.unbuild syntax jxon.unbuild(objtree[, namespaceuri[, qualifiednamestr[, documenttype]]]) jxon.unbuild description returns an xml document based on the given javascript object.
...one conversion method which is lossless for element order, as it relies on arrays (but, with a less human-readable, javascript-friendly syntax), is jsonml.
New Security Model for Web Services - Archive of obsolete content
web scripts access statements the syntax of statements of the access file are as follows.
... any syntax error in the document will result in the rest of the file to be ignored.
...an entry is created if and only if the declaration file is considered valid (validation based on the syntax described above); an invalid document will result in access denial.
Binding Implementations - Archive of obsolete content
properties also support a shorthand syntax for defining getters and setters that forward requests or assignments to an anonymous content element.
... note: the following paragraphs suggest a syntax for how javascript might enable access to base class methods and properties.
... for example, given a binding with an implementation colorpickergrid that derives from an implementation colorpicker where the two implementations both specify the setcolor method, a caller could invoke colorpicker's method with the following syntax: ...
A XUL Bestiary - Archive of obsolete content
the syntax for these elements is based for the most part on xml.
... the differences here are significant: xul is the universe of elements, attributes, syntax, rules, and relationships, while xptoolkit is really the finite set of interface-specific elements created in xul.
... xul parts people sometimes get confused about the syntax for describing the parts of a widget.
Rule Compilation - Archive of obsolete content
the exact syntax is dependent on the type of datasource used in the template.
...an attribute substitution syntax, explained later, is used to modify the attributes of elements generated from the template, to correspond with the data for each result.
...template syntax outline here is the outline of the template syntax so far.
Sorting Results - Archive of obsolete content
this method of sorting a seq works best for the simple query syntax since it is obvious how the starting ref relates to the end member results (they are just the children), or for extended syntax queries that follow a similar pattern.
...here is a sample of how to specify this in the rdf/xml datasource: <rdf:rdf xmlns="http://www.w3.org/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 al...
...if you are using the simple rdf query syntax, there are no variables, so you need to specify the full predicate including the rdf: prefix in the sort attribute.
Adding Event Handlers - Archive of obsolete content
by setting this value to true, non-standard, poorly written, or syntax prone to cause logic errors are logged to the javascript console.
... you might notice that the attribute syntax is similar to that used for events in html documents.
...the syntax is as follows: example 3 : source view <button id="okbutton" label="ok"/> <script> function buttonpressed(event){ alert('button was pressed!'); } var button = document.getelementbyid("okbutton"); button.addeventlistener('command', buttonpressed, true); </script> the getelementbyid() function returns the element with a given id, in this case the button.
Adding Labels and Images - Archive of obsolete content
this syntax is the most common of labels.
...it is more common to use the attribute syntax for labels, and the text content syntax for descriptions.
...the example below shows this: <image src="images/banner.jpg"/> although you can use this syntax, it would be better in order to support different themes to use a style sheet to set the image url.
Document Object Model - Archive of obsolete content
properties are available in javascript using the dot syntax.
...for example, to get the hidden property for an element, you can use the syntax element.hidden where 'element' is a reference to the element.
...you can also use the prefix syntax with a colon to use a specific namespace .
Introduction to XBL - Archive of obsolete content
like xul, xbl is an xml language, so it has similar syntax rules.
...this declares that we are using xbl syntax.
...the '#binding1' syntax is used to point to a specific binding, much like how you would point to an anchor in an html file.
Localization - Archive of obsolete content
xml has a syntax which allows you to declare custom entities.
...files of this type are normally used to declare the syntax and semantics of a particular xml file, but they also let you declare entities.
... you also need to add the locale to the chrome.manifest file, for example: locale findfile en-us locale/ declaring entities the entities are declared using a simple syntax as shown below: <!entity findlabel "find"> this example creates an entity with the name findlabel and the value "find".
XUL Template Primer - Bindings - Archive of obsolete content
overview this document expands on the xul template primer by introducing the <bindings> element in the extended xul template syntax.
... <?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:nc="http://home.netscape.com/nc-rdf#"> <rdf:description about="urn:root"> <nc:friends> <rdf:seq> <rdf:li> <rdf:description nc:name="alison appel"> <nc:address resource="#home"/> </rdf:description> </rdf:li> <rdf:li> <rdf:description nc:name="jack"> <nc:address resource="#doghouse"/> </rd...
... xul template reference describes the simple xul template syntax in detail.
The Implementation of the Application Object Model - Archive of obsolete content
because rdf can express arbitrary relationships between nodes, the serialized form of rdf in xml has to contain extra syntax.
...the resultant file, although still relatively easy to manipulate, is bloated needlessly with extra syntax that is not strictly necessary.
...in the xul, you could use a syntax like <toolbar localdata="mailbox:blah"/> which would specify a uri that pointed to a specific mailbox node.
E4X - Archive of obsolete content
ArchiveWebE4X
the goal is to provide an alternative, simpler syntax for accessing xml documents than via dom interfaces.
...the difference between the two modes is that without the "e4x=1" mime type, any statement-level xml/html comment literals (<!--...-->) are ignored for backwards compatibility with the comment hiding trick, and cdata sections (<![cdata[...]]>) are not parsed as cdata literals (which leads to a js syntax error in html since html's <script> element produces an implicit cdata section, and therefore cannot contain explicit cdata sections).
...you may get syntaxerror "xml is a reserved identifier" (despite the xml being in a string).
GetObject - Archive of obsolete content
syntax getobject([pathname] [, class]) parameters pathname full path and name of the file containing the object to retrieve.
... the class argument uses the syntax appname.objectype and has these parts: appname name of the application providing the object.
...with a single-instance object, getobject always returns the same instance when called with the zero-length string ("") syntax, and it causes an error if the pathname argument is omitted.
Archived JavaScript Reference - Archive of obsolete content
this property has been removed and no longer works.array comprehensionsthe array comprehension syntax was a javascript expression which allowed you to quickly assemble a new array based on an existing one.
...see also the newer version of date.prototype.tolocaledatestring().ecmascript 2016 to es.next support in mozillaexpression closuresexpression closures are a shorthand function syntax for writing simple functions.for each...inthe for each...in statement iterates a specified variable over all values of object's properties.
...it has been removed from firefox starting with version 58.generator comprehensionsthe generator comprehension syntax was a javascript expression which allowed you to quickly assemble a new generator function based on an existing iterable object.
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
ar b = new java.io.bufferedreader( s ); var l, str = ""; while( ( l = b.readline() ) != null ) { // skip if( l != "" ) { str = str + l + "\n"; } } // define the namespaces, first the default, // then additional namespaces default xml namespace = "http://purl.org/rss/1.0/"; var dc = new namespace( "http://purl.org/dc/elements/1.1/" ); var rdf = new namespace( "http://www.w3.org/1999/02/22-rdf-syntax-ns#" ); // use e4x to process the feed var x = new xml( str ); for each( var i in x..item ) { print( "title: " + i.title + "\n" ); print( "about: " + i.@rdf::about + "\n" ); print( "link: " + i.link + "\n" ); print( "date: " + i.dc::date + "\n" ); } the first half of this script is standard java code used to retrieve the feed data.
...the syntax for accessing e4x objects is actually quite natural and certainly easier than most methods.
...the comment nodes are looped over with data output using the simplified e4x syntax.
RDF in Fifty Words or Less - Archive of obsolete content
second, rdf is a serialization syntax.
... this syntax allows the graph-like model to be communicated between "agents".
...the cgi script actually generatesserialized rdf, which is basically just a way of formatting a graph into xml: <rdf:rdf xmlns:rdf="http://www.w3.org/tr/wd-rdf-syntax#" xmlns:sm="http://www.mozilla.org/smart-mail/schema#"> <rdf:description about="http://www.mozilla.org/smart-mail/get-mail.cgi?user=waterson&folder=inbox"> <sm:message id="4025293"> <sm:recipient> chris waterson "waterson@netscape.com" </sm:recipient> <sm:sender> aunt helga "helga@netcenter.net" </sm:sender> <sm:receive...
Canonical order - MDN Web Docs Glossary: Definitions of Web-related terms
it is defined by the formal syntax of the property and normally refers to the order in which longhand values should be specified as part of a single shorthand value.
...the canonical order of those longhand values is defined as background-image background-position background-size background-repeat background-attachment background-origin background-clip background-color furthermore, its syntax defines, that if a value for the background-size is given, it must be specified after the value for the background-position, separated by a slash.
... the description of the formal syntax used for css values on mdn ...
What text editors are available? - Learn web development
in particular (if possible in your editor), try to: change syntax highlighting settings and colors play with indentation width, setting it to an appropriate setting for your needs check autosave and session saving settings configure any available plugins and investigate how to get new ones change color schemes adjust view settings and see how you can change the layout of the views check what programming languages/technologies your editor supports while ...
...many text editors help you out with features like: syntax highlighting.
... most text editors now support syntax highlighting, but not necessarily the other two features.
CSS basics - Learn web development
(for example, there are many color values in addition to red.) note the other important parts of the syntax: apart from the selector, each ruleset must be wrapped in curly braces.
...you can also use one, three, or four values, as documented in margin syntax.
...as with margin, you can use one, two, three, or four values, as documented in padding syntax.
Graceful asynchronous programming with Promises - Learn web development
you could even do this, since the functions just pass their arguments directly, so there isn't any need for that extra layer of functions: choosetoppings().then(placeorder).then(collectorder).then(eatpizza).catch(failurecallback); this is not quite as easy to read, however, and this syntax might not be usable if your blocks are more complex than what we've shown here.
... note: you can make further improvements with async/await syntax, which we'll dig into in the next article.
... explaining basic promise syntax: a real example promises are important to understand because most modern web apis use them for functions that perform potentially lengthy tasks.
A first splash into JavaScript - Learn web development
the code syntax looks different, but the concepts are still largely the same.
... thinking like a programmer one of the hardest things to learn in programming is not the syntax you need to learn, but how to apply it to solve real world problems.
... this requires a mixture of hard work, experience with the programming syntax, and practice — plus a bit of creativity.
Basic math in JavaScript — numbers and operators - Learn web development
it's all numbers to me let's quickly play with some numbers to reacquaint ourselves with the basic syntax we need.
... we probably don't need to teach you how to do basic math, but we would like to test your understanding of the syntax involved.
... try entering the examples below into your developer tools javascript console to familiarize yourself with the syntax.
Storing the information you need — Variables - Learn web development
you may not fully understand the syntax we are using (yet!), but you should be able to get the idea — if we didn't have variables available, we'd have to implement a giant code block that checked what the entered name was, and then display the appropriate message for any name.
... one last point: you also need to avoid using javascript reserved words as your variable names — by this, we mean the words that make up the actual syntax of javascript!
... try entering the following line into your console: let dog = { name : 'spot', breed : 'dalmatian' }; to retrieve the information stored in the object, you can use the following syntax: dog.name we won't be looking at objects any more for now — you can learn more about those in a future module.
Working with JSON - Learn web development
previous overview: objects next javascript object notation (json) is a standard text-based format for representing structured data based on javascript object syntax.
... json is a text-based data format following javascript object syntax, which was popularized by douglas crockford.
... even though it closely resembles javascript object literal syntax, it can be used independently from javascript, and many programming environments feature the ability to read (parse) and generate json.
Ember interactivity: Events, classes and state - Learn web development
add the new line shown below to your header.hbs file: <input class='new-todo' aria-label='what needs to be done?' placeholder='what needs to be done?' autofocus {{on 'keydown' this.onkeydown}} > this new attribute is inside double curly braces, which tells you it is part of ember's dynamic templating syntax.
...ponent { @action onkeydown({ target, key }) { let text = target.value.trim(); let hasvalue = boolean(text); if (key === 'enter' && hasvalue) { alert(text); target.value = '' } } } the @action decorator is the only ember-specific code here (aside from extending from the component superclass, and the ember-specific items we are importing using javascript module syntax) — the rest of the file is vanilla javascript, and would work in any application.
...this function's contents are fairly easy to understand — when the function is invoked, a new todo object instance is created with a text value of text, and the todos property value is updated to all of the current items inside the array (accessed conveniently using spread syntax), plus the new todo.
Getting started with Svelte - Learn web development
extensions to the javascript language are minimal and carefully picked in order to not break javascript syntax nor alienate developers.
...this is one example of svelte extending javascript syntax to make it more useful, while keeping it familiar.
...that's svelte's syntax for listening to dom events.
Client-side tooling overview - Learn web development
eslint is the industry standard javascript linter — a highly configurable tool for catching potential syntax errors and encouraging "best practices" throughout your code.
... frameworks such as react, ember, and vue: frameworks provide a lot of functionality for free and allow you to use it via custom syntax built on top of vanilla javascript.
... in the background, the framework’s javascript code works hard to interpret this custom syntax and render it as a final web app.
IPDL Tutorial
struct namevaluepair { nscstring name; nscstring value; }; in implementation code, these structs can be created and used like so: namevaluepair entry(astring, anotherstring); foo(entry.name(), entry.value()); // named accessor functions return references to the members arrays ipdl has simple syntax for arrays: invokemethod(nscstring[] args); in c++ this is translated into a nstarray reference: virtual bool recvinvokemethod(nstarray<nscstring>& args); ipdl's generated data structures can be used in several protocols if they are defined in a separate .ipdlh file.
... these files must be added to the ipdl.mk makefile like regular .ipdl files, and they use the same syntax (except they cannot declare protocols).
... these messages have syntax similar to c++ constructors, but the behavior is different.
L20n
l20n syntax cheatsheet for developers a simple cheatsheet to help developers as they add l20n to their localization infrastructure.
... learn the l20n syntax how to naturally localize applications using l20n.
... l20n syntax cheatsheet for localizers a simple cheatsheet to help localizers as they localize projects with l20n.
Self-hosted builtins in SpiderMonkey
most importantly, it's possible to invoke any function within the scope of any object using the syntax callfunction(fun, receiver, ...args) (or callcontentfunction, see below), which causes fun to be called within the scope of receiver with ...args as its arguments.
... in contrast to function.prototype.call, this syntax makes it impossible for other code to interfere and gets compiled to bytecode that doesn't have any overhead compared to a normal function invocation.
... throwtypeerror, throwrangeerror, throwsyntaxerror, which self-hosted code should use instead of throw so that the error message is specified in js.msg and can be localized.
JS::CompileOptions
this allows an attack by which a malicious website loads a sensitive file (say, a bank statement) cross-origin (using the user's cookies), and sniffs the generated syntax errors (via a window.onerror handler) for juicy morsels of its contents.
... canlazilyparse bool true if the source code can be parsed lazily (check only syntax for first time, and fully parse when it's really needed).
... the following are used in js shell: "js shell file" "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.
nsIJSON
this method accepts slightly more than the exact json syntax; details of extra accepted syntax are deliberately not described.
...this method accepts slightly more than the exact json syntax; details of extra accepted syntax are deliberately not described.
...this method accepts slightly more than the exact json syntax; details of extra accepted syntax are deliberately not described.
nsIZipReader
set this parameter to null (javascript) or emptycstring() (c++) to get all entries; otherwise, use the following syntax: * matches anything.
...neither of the patterns foo or bar may use the 'pat~pat2' syntax described immediately above.
... an apattern not conforming to this syntax has undefined behavior.
DOMMatrixReadOnly - Web APIs
dommatrixreadonly.tostring() creates and returns a domstring object which contains a string representation of the matrix in css matrix syntax, using the appropriate css matrix notation.
... see the matrix() css function for details on this syntax.
...see the css matrix3d() function for details on the 3d notation's syntax.
IntersectionObserver.IntersectionObserver() - Web APIs
syntax var observer = new intersectionobserver(callback[, options]); parameters callback a function which is called when the percentage of the target element is visible crosses a threshold.
...the syntax is approximately the same as that for the css margin property; see the root element and root margin in intersection observer api for more information on how the margin works and the syntax.
... exceptions syntaxerror the specified rootmargin is invalid.
Node.removeChild() - Web APIs
WebAPINoderemoveChild
syntax var oldchild = node.removechild(child); or node.removechild(child); child is the child node to be removed from the dom.
...with the first syntax form shown, you may reuse the removed node later in your code, via the oldchild object reference.
... in the second syntax form, however, there is no oldchild reference kept, so assuming your code has not kept any other reference to the node elsewhere, it will immediately become unusable and irretrievable, and will usually be automatically deleted from memory after a short time.
Notification.requestPermission() - Web APIs
note: this feature is not available in sharedworker note: safari still uses the callback syntax to get the permission.
... syntax the latest spec has updated this method to a promise-based syntax that works like this: notification.requestpermission().then(function(permission) { ...
... }); previously, the syntax was based on a simple callback; this version is now deprecated: notification.requestpermission(callback); parameters callback optional deprecated since gecko 46 an optional callback function that is called with the permission value.
RTCError - Web APIs
WebAPIRTCError
sdplinenumber 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.
... null if the error isn't an sdp syntax error.
... datachannel.addeventlistener("error", (event) => { let error = event.error; if (error.errordetail === "sdp-syntax-error") { let errline = error.sdplinenumber; 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...
SharedWorker() - Web APIs
syntax var myworker = new sharedworker(aurl, name); var myworker = new sharedworker(aurl, options); parameters aurl a domstring representing the url of the script the worker will execute.
... exceptions a securityerror is raised if the document is not allowed to start workers, for example if the url has an invalid syntax or if the same-origin policy is violated.
... a syntaxerror is raised if aurl cannot be parsed.
Using writable streams - Web APIs
constructing a writable stream to create a writable stream, we use the writablestream() constructor; the syntax looks complex at first, but actually isn’t too bad.
... the syntax skeleton looks like this: const stream = new writablestream({ start(controller) { }, write(chunk,controller) { }, close(controller) { }, abort(reason) { } }, { highwatermark, size() }); the constructor takes two objects as parameters.
... controllers as you'll have noticed when studying the writablestream() syntax skeleton, the start(), write(), and close() methods can optionally have a controller parameter passed to them.
SubtleCrypto.generateKey() - Web APIs
syntax const result = crypto.subtle.generatekey(algorithm, extractable, keyusages); parameters algorithm is a dictionary object defining the type of key to generate and providing extra algorithm-specific parameters.
... exceptions the promise is rejected when the following exception is encountered: syntaxerror raised when the result is a cryptokey of type secret or private but keyusages is empty.
... syntaxerror raised when the result is a cryptokeypair and its privatekey.usages attribute is empty.
Worker() - Web APIs
WebAPIWorkerWorker
syntax var myworker = new worker(aurl, options); parameters aurl a usvstring representing the url of the script the worker will execute.
...if the url has an invalid syntax or if the same-origin policy is violated.
... a syntaxerror is raised if aurl cannot be parsed.
-moz-image-region - CSS: Cascading Style Sheets
/* keyword value */ -moz-image-region: auto; /* <shape> value */ -moz-image-region: rect(0, 8px, 4px, 4px); /* global values */ -moz-image-region: inherit; -moz-image-region: initial; -moz-image-region: unset; the syntax is similar to the clip property.
... syntax values auto automatically defines the region of the image to use.
...it will not work with xul <image src="url" />.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax <shape> | autowhere <shape> = rect(<top>, <right>, <bottom>, <left>) examples clipping an image #example-button { /* display only the 4x4 area from the top left of this image */ list-style-image: url("chrome://example/skin/example.png"); -moz-image-region: rect(0px, 4px, 4px, 0px); } #example-button:hover { /* use the 4x4 area to the right of the first for the hovered button */ -moz...
::after (:after) - CSS: Cascading Style Sheets
WebCSS::after
syntax /* css3 syntax */ ::after /* css2 syntax */ :after note: css3 introduced the ::after notation (with two colons) to distinguish pseudo-classes from pseudo-elements.
... recommendation introduces the two-colon syntax.
... recommendation initial definition, using the one-colon syntax.
::before (:before) - CSS: Cascading Style Sheets
WebCSS::before
syntax /* css3 syntax */ ::before /* css2 syntax */ :before note: css3 introduced the ::before notation (with two colons) to distinguish pseudo-classes from pseudo-elements.
... recommendation introduces the two-colon syntax.
... recommendation initial definition, using the one-colon syntax ...
::first-letter (:first-letter) - CSS: Cascading Style Sheets
the shorthands border, border-style, border-color, border-width, border-radius, border-image, and the longhands properties the color property the text-decoration, text-shadow, text-transform, letter-spacing, word-spacing (when appropriate), line-height, text-decoration-color, text-decoration-line, text-decoration-style, box-shadow, float, vertical-align (only if float is none) css properties syntax /* css3 syntax */ ::first-letter /* css2 syntax */ :first-letter examples simple drop cap in this example we will use the ::first-letter pseudo-element to create a simple drop cap effect on the first letter of the paragraph coming right after the <h2>.
... recommendation introduction of the two-colon syntax.
... recommendation initial definition, using the one-colon syntax.
::first-line (:first-line) - CSS: Cascading Style Sheets
syntax /* css3 syntax */ ::first-line /* css2 syntax */ :first-line examples html <p>styles will only be applied to the first line of this paragraph.
... recommendation introduction of the two-colon syntax.
... recommendation initial definition, using the one-colon syntax.
:nth-child() - CSS: Cascading Style Sheets
/* selects the second <li> element in a list */ li:nth-child(2) { color: lime; } /* selects every fourth element among any group of siblings */ :nth-child(4n) { color: lime; } syntax the nth-child pseudo-class is specified with a single argument that describes a pattern for matching element indices in a list of siblings.
... formal syntax :nth-child( <nth> [ of <complex-selector-list> ]?
... working draft adds of <selector> syntax and specifies that matching elements are not required to have a parent.
:nth-last-of-type() - CSS: Cascading Style Sheets
syntax the nth-last-of-type pseudo-class is specified with a single argument, which represents the pattern for matching elements, counting from the end.
... see :nth-last-child for a more detailed explanation of its syntax.
... formal syntax :nth-last-of-type( <nth> )where <nth> = <an-plus-b> | even | odd examples html <div> <span>this is a span.</span> <span>this is another span.</span> <em>this is emphasized.</em> <span>wow, this span gets limed!!!</span> <strike>this is struck through.</strike> <span>here is one last span.</span> </div> css span:nth-last-of-type(2) { background-color: lime; } result specifications specification status comment selectors level 4the definition of ':nth-last-of-type' in that specification.
:nth-of-type() - CSS: Cascading Style Sheets
/* selects every fourth <p> element among any group of siblings */ p:nth-of-type(4n) { color: lime; } syntax the nth-of-type pseudo-class is specified with a single argument, which represents the pattern for matching elements.
... see :nth-child for a more detailed explanation of its syntax.
... formal syntax :nth-of-type( <nth> )where <nth> = <an-plus-b> | even | odd examples basic example html <div> <div>this element isn't counted.</div> <p>1st paragraph.</p> <p>2nd paragraph.</p> <div>this element isn't counted.</div> <p>3rd paragraph.</p> <p class="fancy">4th paragraph.</p> </div> css /* odd paragraphs */ p:nth-of-type(2n+1) { color: red; } /* even paragraphs */ p:nth-of-type(2n) { color: blue; } /* first paragraph */ p:nth-of-type(1) { font-weight: bold; } /* this has no effect, as the .fancy class is only on the 4th p element, not the 1st */ p.fancy:nth-of-type(1) { text-decoration: underline; } result specifications specification status comment selectors level 4the definition of ':nth-of-type' in that specificatio...
@charset - CSS: Cascading Style Sheets
WebCSS@charset
assume that the document is utf-8 syntax @charset "utf-8"; @charset "iso-8859-15"; where: charset is a <string> denoting the character encoding to be used.
... formal syntax @charset "<charset>"; examples valid and invalid charset declarations @charset "utf-8"; /* set the encoding of the style sheet to unicode utf-8 */ @charset 'iso-8859-15'; /* invalid, wrong quoting style used */ @charset "utf-8"; /* invalid, more than one space */ @charset "utf-8"; /* invalid, there is a character (a space) before the at-rule */ @charset utf-8; /* invalid, without ' or ", the charset is not a css <string> */ specifications s...
...rome for androidfirefox for androidopera for androidsafari on iossamsung internet@charsetchrome full support 2edge full support 12firefox full support 1.5notes full support 1.5notes notes firefox 1 supported an invalid syntax where the character encoding is not between single or double quotes.ie full support 5.5notes full support 5.5notes notes from internet explorer 5.5 to ie 7 (inclusive), internet explorer supported an invalid syntax where the character encoding is not between single or double quotes.opera ful...
font-stretch - CSS: Cascading Style Sheets
syntax /* single values */ font-stretch: ultra-condensed; font-stretch: extra-condensed; font-stretch: condensed; font-stretch: semi-condensed; font-stretch: normal; font-stretch: semi-expanded; font-stretch: expanded; font-stretch: extra-expanded; font-stretch: ultra-expanded; font-stretch: 50%; font-stretch: 100%; font-stretch: 200%; /* multiple values */ font-stretch: 75% 125%; font-stretch: conden...
...css fonts level 4 extends the syntax to accept a <percentage> value as well.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.8 | w3c understanding wcag 2.0 formal definition related at-rule@font-faceinitial valuenormalcomputed valueas specified formal syntax <font-stretch-absolute>{1,2}where <font-stretch-absolute> = normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | <percentage> examples setting a percentage range for font-stretch the following find a local open sans font or import it, and allow using the font for normal, semi-condensed and semi-expanded states.
font-weight - CSS: Cascading Style Sheets
syntax /* single values */ font-weight: normal; font-weight: bold; font-weight: 400; /* multiple values */ font-weight: normal bold; font-weight: 300 500; the font-weight property is described using any one of the values listed below.
... 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.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.8 | w3c understanding wcag 2.0 formal definition related at-rule@font-faceinitial valuenormalcomputed valueas specified formal syntax <font-weight-absolute>{1,2}where <font-weight-absolute> = normal | bold | <number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[1,1000]> examples setting normal font weight in a @font-face rule the following finds a local open sans font or import it, and allows using the fo...
@keyframes - CSS: Cascading Style Sheets
syntax @keyframes slidein { from { transform: translatex(0%); } to { transform: translatex(100%); } } values <custom-ident> a name identifying the keyframe list.
... this must match the identifier production in css syntax.
... @keyframes important1 { from { margin-top: 50px; } 50% { margin-top: 150px !important; } /* ignored */ to { margin-top: 100px; } } @keyframes important2 { from { margin-top: 50px; margin-bottom: 100px; } to { margin-top: 150px !important; /* ignored */ margin-bottom: 50px; } } formal syntax @keyframes <keyframes-name> { <keyframe-block-list> }where <keyframes-name> = <custom-ident> | <string><keyframe-block-list> = <keyframe-block>+where <keyframe-block> = <keyframe-selector># { <declaration-list> }where <keyframe-selector> = from | to | <percentage> examples css animation examples see using css animations for examples.
At-rules - CSS: Cascading Style Sheets
WebCSSAt-rule
/* general structure */ @identifier (rule); /* example: tells browser to use utf-8 character set */ @charset "utf-8"; there are several at-rules, designated by their identifiers, each with a different syntax: @charset — defines the character set used by the style sheet.
...(at the candidate recommendation stage, but only implemented in gecko as of writing) conditional group rules much like the values of properties, each at-rule has a different syntax.
...these statements share a common syntax and each of them can include nested statements—either rulesets or nested at-rules.
Using URL values for the cursor property - CSS: Cascading Style Sheets
syntax the basic (css 2.1) syntax for this property is: cursor: [ <url> , ]* <keyword> this means that zero or more urls may be specified (comma-separated), which must be followed by one of the keywords defined in the css specification, such as auto or pointer.
... support for the css 3 syntax for cursor values got added in gecko 1.8 (firefox 1.5): cursor: [ <uri> [ <x> <y> ]?
...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 values and units - CSS: Cascading Style Sheets
when viewing css property value syntax in a css specification or the mdn property page, allowable keywords will be listed in the following form.
...the syntax starts with the name of the function immediately followed by a left parenthesis ( followed by the argument(s) to the notation followed by a right parenthesis ).
... adds the min(), max() and clamp() functional notation adds toggle() css values and units module level 3 candidate recommendation adds calc(), ch, rem, vw, vw, vmin, vmax, q css color module level 4 working draft adds commaless syntaxes for the rgb(), rgba(), hsl(), and hsla() functions.
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
note: the syntax of the fallback, like that of custom properties, allows commas.
...if you had written color: 16px without any variable substitutes, then it was a syntax error.
... note: while a syntax error in a css property / value pair will lead to the line being ignored, using a cascaded value, invalid substitution -- using a custom property value that is invalid -- is not ignored, leading to the value to be inherited.
align-items - CSS: Cascading Style Sheets
syntax /* basic keywords */ align-items: normal; align-items: stretch; /* positional alignment */ /* align-items does not take left and right values */ align-items: center; /* pack items around the center */ align-items: start; /* pack items from the start */ align-items: end; /* pack items from the end */ align-items: flex-start; /* pack flex items from the start */ align-items: flex-end; /* pack fle...
... formal definition initial valuenormalapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | stretch | <baseline-position> | [ <overflow-position>?
... working draft update to latest syntax definitions.
align-self - CSS: Cascading Style Sheets
syntax /* keyword values */ align-self: auto; align-self: normal; /* positional alignment */ /* align-self does not take left and right values */ align-self: center; /* put the item around the center */ align-self: start; /* put the item at the start */ align-self: end; /* put the item at the end */ align-self: self-start; /* align the item flush at the start */ align-self: self-end; /* align the item...
...otherwise the specified value.animation typediscrete formal syntax auto | normal | stretch | <baseline-position> | <overflow-position>?
... working draft update to latest syntax definitions.
animation-timing-function - CSS: Cascading Style Sheets
syntax /* keyword values */ animation-timing-function: ease; animation-timing-function: ease-in; animation-timing-function: ease-out; animation-timing-function: ease-in-out; animation-timing-function: linear; animation-timing-function: step-start; animation-timing-function: step-end; /* function values */ animation-timing-function: cubic-bezier(0.1, 0.7, 1.0, 0.1); animation-timing-function: steps(4, ...
... 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>, <num...
...ber <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 cubic-bezier examples <div class="parent"> <div class="ease">ease</div> <div class="easein">ease-in</div> <div class="easeout">ease-out</div> <div class="easeinout">ease-in-out</div> <div class="linear">linear</div> <div class="cb">cubic-bezier(0.2,-2,0.8,2)</div> </div> .parent > div[class] { animation-name: changeme; animation-duration: 10s; animation-iteration-count: infinite; margin-bottom: 4px; } @k...
animation - CSS: Cascading Style Sheets
WebCSSanimation
constituent properties this property is a shorthand for the following css properties: animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function syntax the animation property is specified as one or more single animations, separated by commas.
...before and ::after pseudo-elementsinheritednocomputed valueas each of the properties of the shorthand:animation-name: as specifiedanimation-duration: as specifiedanimation-timing-function: as specifiedanimation-delay: as specifiedanimation-direction: as specifiedanimation-iteration-count: as specifiedanimation-fill-mode: as specifiedanimation-play-state: as specifiedanimation typediscrete 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-an...
...imation-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="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> = step-start | step-end | steps(<integer>[, <step-position>]?)where <step-positi...
background-position-x - CSS: Cascading Style Sheets
syntax /* keyword values */ background-position-x: left; background-position-x: center; background-position-x: right; /* <percentage> values */ background-position-x: 25%; /* <length> values */ background-position-x: 0px; background-position-x: 1cm; background-position-x: 8em; /* side-relative values */ background-position-x: right 3px; background-position-x: left 25%; /* multiple values */ backgro...
... formal definition initial valueleftapplies toall elementsinheritednopercentagesrefer to width of background positioning area minus height of background imagecomputed valuea list, each item consisting of: an offset given as a combination of an absolute length and a percentage, plus an origin keywordanimation typediscrete formal syntax [ center | [ [ left | right | x-start | x-end ]?
... ≤37chrome android full support 18firefox android full support 49opera android full support 18safari ios full support 1samsung internet android full support 1.0two-value syntax (support for offsets from any edge)chrome no support noedge no support 12 — 79firefox full support 49ie full support 9opera no support nosafari no support ...
background-position-y - CSS: Cascading Style Sheets
syntax /* keyword values */ background-position-y: top; background-position-y: center; background-position-y: bottom; /* <percentage> values */ background-position-y: 25%; /* <length> values */ background-position-y: 0px; background-position-y: 1cm; background-position-y: 8em; /* side-relative values */ background-position-y: bottom 3px; background-position-y: bottom 10%; /* multiple values */ back...
... formal definition initial valuetopapplies toall elementsinheritednopercentagesrefer to height of background positioning area minus height of background imagecomputed valuea list, each item consisting of: an offset given as a combination of an absolute length and a percentage, plus an origin keywordanimation typediscrete formal syntax [ center | [ [ top | bottom | y-start | y-end ]?
... ≤37chrome android full support 18firefox android full support 49opera android full support 14safari ios full support 1samsung internet android full support 1.0two-value syntax (support for offsets from any edge)chrome no support noedge no support 12 — 79firefox full support 49ie full support 9opera no support nosafari no support ...
background - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: background-attachment background-clip background-color background-image background-origin background-position background-repeat background-size syntax /* using a <background-color> */ background: green; /* using a <bg-image> and <repeat-style> */ background: url("test.jpg") repeat-y; /* using a <box> and <background-color> */ background: border-box red; /* a single image, centered and scaled */ background: no-repeat center/80% url("../img/image.png"); the background property is specified as one or more background layers, separated by comm...
... the syntax of each layer is as follows: each layer may include zero or one occurrences of any of the following values: <attachment> <bg-image> <position> <bg-size> <repeat-style> the <bg-size> value may only be included immediately after <position>, separated with the '/' character, like this: "center/80%".
...pecifiedbackground-color: computed coloranimation typeas each of the properties of the shorthand:background-color: a colorbackground-image: discretebackground-clip: discretebackground-position: repeatable list of simple list of length, percentage, or calcbackground-size: repeatable list of simple list of length, percentage, or calcbackground-repeat: discretebackground-attachment: discrete formal syntax [ <bg-layer> , ]* <final-bg-layer>where <bg-layer> = <bg-image> | <bg-position> [ / <bg-size> ]?
block-size - CSS: Cascading Style Sheets
syntax /* <length> values */ block-size: 300px; block-size: 25em; /* <percentage> values */ block-size: 75%; /* keyword values */ block-size: max-content; block-size: min-content; block-size: fit-content(20em); block-size: auto; /* global values */ block-size: inherit; block-size: initial; block-size: unset; if the writing mode is vertically oriented, the value of block-size relates to the width o...
... initial valueautoapplies tosame as width and heightinheritednopercentagesblock-size of containing blockcomputed valuesame as width and heightanimation typea length, percentage or calc(); syntax values the block-size property takes the same values as the width and height properties.
... formal definition initial valueautoapplies tosame as width and heightinheritednopercentagesblock-size of containing blockcomputed valuesame as width and heightanimation typea length, percentage or calc(); formal syntax <'width'> examples block size with vertical text html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; block-size: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'block-size' in that specification.
calc() - CSS: Cascading Style Sheets
WebCSScalc
syntax /* property: calc(expression) */ width: calc(100% - 80px); the calc() function takes a single expression as its parameter, with the expression's result used as the value.
... the operands in the expression may be any <length> syntax value.
... 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-si...
clamp() - CSS: Cascading Style Sheets
WebCSSclamp
syntax the clamp() function takes three comma separated expressions as its parameter, in the order of minimum value, preferred value, maximum value.
...the operands in the expression may be any <length> syntax value.
... 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.
color - CSS: Cascading Style Sheets
WebCSScolor
syntax /* keyword values */ color: currentcolor; /* <named-color> values */ color: red; color: orange; color: tan; color: rebeccapurple; /* <hex-color> values */ color: #090; color: #009900; color: #090a; color: #009900aa; /* <rgb()> values */ color: rgb(34, 12, 64, 0.6); color: rgba(34, 12, 64, 0.6); color: rgb(34 12 64 / 0.6); color: rgba(34 12 64 / 0.3); color: rgb(34.0 12 64 / 60%); color: rgba(...
...the transparent keyword maps to rgba(0,0,0,0).animation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... working draft adds commaless syntaxes for the rgb(), rgba(), hsl(), and hsla() functions.
cursor - CSS: Cascading Style Sheets
WebCSScursor
syntax /* keyword value */ cursor: pointer; cursor: auto; /* url, with a keyword fallback */ cursor: url(hand.cur), pointer; /* url and coordinates, with a keyword fallback */ cursor: url(cursor1.png) 4 12, auto; cursor: url(cursor2.png) 2 2, pointer; /* global values */ cursor: inherit; cursor: initial; cursor: unset; the cursor property is specified as zero or more <url> values, separated by commas, followed by a single mandatory keyword value.
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specified, but with <url> values made absoluteanimation typediscrete formal syntax [ [ <url> [ <x> <y> ]?
... recommendation addition of several keywords and the positioning syntax for url().
<display-legacy> - CSS: Cascading Style Sheets
css 2 used a single-keyword syntax for the display property, requiring separate keywords for block-level and inline-level variants of the same layout mode.
... syntax valid <display-legacy> values: inline-block the element generates a block element box that will be flowed with surrounding content as if it were a single inline box (behaving much like a replaced element would).
... html <div class="container"> <div>flex item</div> <div>flex item</div> </div> not a flex item css .container { display: inline-flex; } result in the new syntax the inline flex container would be created using two values, inline for the outer display type, and flex for the inner display type.
<easing-function> - CSS: Cascading Style Sheets
syntax there are three types of easing function: linear, cubic bézier curves, and staircase functions.
... 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.
env() - CSS: Cascading Style Sheets
WebCSSenv
syntax /* using the four safe area inset values with no fallback values */ env(safe-area-inset-top); env(safe-area-inset-right); env(safe-area-inset-bottom); env(safe-area-inset-left); /* using them with fallback values */ env(safe-area-inset-top, 20px); env(safe-area-inset-right, 1em); env(safe-area-inset-bottom, 0.5vh); env(safe-area-inset-left, 1.4rem); values safe-area-inset-top, safe-area-in...
... formal syntax env( <custom-ident> , <declaration-value>?
...x); /* zero for all rectangular user agents */ padding: env(safe-area-inset-bottom, 50px); /* 50px because ua properties are case sensitive */ padding: env(x, 50px 20px); /* as if padding: '50px 20px' were set because x is not a valid environment variable */ padding: env(x, 50px, 20px); /* ignored because '50px, 20px' is not a valid padding value and x is not a valid environment variable */ the syntax of the fallback, like that of custom properties, allows commas.
font-style - CSS: Cascading Style Sheets
syntax font-style: normal; font-style: italic; font-style: oblique; font-style: oblique 10deg; /* global values */ font-style: inherit; font-style: initial; font-style: unset; the font-style property is specified as a single keyword chosen from the list of values below, which can optionally include an angle if the keyword is oblique.
... for the example below to work, you'll need a browser that supports the css fonts level 4 syntax in which font-style: oblique can accept an <angle>.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | italic | oblique <angle>?
grid-template - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: grid-template-areas grid-template-columns grid-template-rows syntax /* keyword value */ grid-template: none; /* grid-template-rows / grid-template-columns values */ grid-template: 100px 1fr / 50px 1fr; grid-template: auto 1fr / auto 1fr auto; grid-template: [linename] 100px / [columnname1] 30% [columnname2] 70%; grid-template: fit-content(100px) / fit-content(40%); /* grid-template-areas grid-template-rows / grid-template-column values */ grid-template: "a a a...
... note: the grid shorthand accepts the same syntax, but also resets the implicit grid properties to their initial values.
...on of the content areagrid-template-rows: refer to corresponding dimension of the content areacomputed valueas each of the properties of the shorthand:grid-template-columns: as specified, but with relative lengths converted into absolute lengthsgrid-template-rows: as specified, but with relative lengths converted into absolute lengthsgrid-template-areas: as specifiedanimation typediscrete formal syntax none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>?
inset - CSS: Cascading Style Sheets
WebCSSinset
it has the same multi-value syntax of the margin shorthand.
...* value applied to all edges */ inset: 4px 8px; /* top/bottom left/right */ inset: 5px 15px 10px; /* top left/right bottom */ inset: 2.4em 3em 3em 3em; /* top right bottom left */ /* <percentage>s of the width (left/right) or height (top/bottom) of the containing block */ inset: 10% 5% 5% 5%; /* keyword value */ inset: auto; /* global values */ inset: inherit; inset: initial; inset: unset; syntax values the inset property takes the same values as the left property.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-height of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'>{1,4} examples setting offsets for an element html <div> <span class="exampletext">example text</span> </div> css div { background-color: yellow; width: 150px; height: 120px; position: relative; } .exampletext { writing-mode: sideways-rl; position: absolute; inset: 20px 40px 30px 10px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset' in that specifica...
mask-size - CSS: Cascading Style Sheets
WebCSSmask-size
/* keywords syntax */ mask-size: cover; mask-size: contain; /* one-value syntax */ /* the width of the image (height set to 'auto') */ mask-size: 50%; mask-size: 3em; mask-size: 12px; mask-size: auto; /* two-value syntax */ /* first value: width of the image, second value: height */ mask-size: 50% auto; mask-size: 3em 25%; mask-size: auto 6px; mask-size: auto auto; /* multiple values */ /* do not confuse this with mask-size: auto auto */ mask-size: auto, auto; mask-size: 50%, 25%, 25%; mask-size: 6px, auto, contain; /* global values */ mask-size: inherit; mask-size: initial; mask-size: unset; note: if the value of this pr...
... syntax one or more <bg-size> values, separated by commas.
... formal definition initial valueautoapplies 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 typerepeatable list of simple list of length, percentage, or calc formal syntax <bg-size>#where <bg-size> = [ <length-percentage> | auto ]{1,2} | cover | containwhere <length-percentage> = <length> | <percentage> examples setting mask size as a percentage css #masked { width: 200px; height: 200px; background: blue linear-gradient(red, blue); -webkit-mask-image: url(https://mdn.mozillademos.org/files/12668/mdn.svg); mask-image: url(https://mdn.mozillademos.org/f...
mask - CSS: Cascading Style Sheets
WebCSSmask
constituent properties this property is a shorthand for the following css properties: mask-clip mask-composite mask-image mask-mode mask-origin mask-position mask-repeat mask-size syntax /* keyword values */ mask: none; /* image values */ mask: url(mask.png); /* pixel image used as mask */ mask: url(masks.svg#star); /* element within svg graphic used as mask */ /* combined values */ mask: url(masks.svg#star) luminance; /* element within svg graphic used as luminance mask */ mask: url(masks.svg#star) 40px 20px; /* element within...
...lengthsmask-composite: as specifiedanimation typeas each of the properties of the shorthand:mask-image: discretemask-mode: discretemask-repeat: discretemask-position: repeatable list of simple list of length, percentage, or calcmask-clip: discretemask-origin: discretemask-size: repeatable list of simple list of length, percentage, or calcmask-composite: discretecreates stacking contextyes formal syntax <mask-layer>#where <mask-layer> = <mask-reference> | <position> [ / <bg-size> ]?
... extends its syntax by making it a shorthand for the new mask-* properties defined in that specification.
max() - CSS: Cascading Style Sheets
WebCSSmax
syntax the max() function takes one or more comma-separated expressions as its parameter, with the largest (most positive) expression value used as the value of the property to which it is assigned.
...the operands in the expression may be any <length> syntax value.
... 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
WebCSSmin
syntax the min() function takes one or more comma-separated expressions as its parameter, with the smallest (most negative) expression value result used as the value.
...the operands in the expression may be any <length> syntax value.
... 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).
object-position - CSS: Cascading Style Sheets
syntax /* <position> values */ object-position: center top; object-position: 100px 50px; /* global values */ object-position: inherit; object-position: initial; object-position: unset; values <position> from one to four values that define the 2d position of the element.
... formal definition initial value50% 50%applies toreplaced elementsinheritedyespercentagesrefer to width and height of element itselfcomputed valueas specifiedanimation typerepeatable list of simple list of length, percentage, or calc formal syntax <position>where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
... support 19 full support 19 full support 12prefixed prefixed implemented with the vendor prefix: -o-safari ios full support 10samsung internet android full support 2.0support for three-value syntax of positionchrome no support 31 — 68edge no support 16 — 79firefox no support 36 — 70ie no support noopera no support 19 — 55 no support 19 — 55 full support 11.6prefixe...
offset-anchor - CSS: Cascading Style Sheets
syntax /* keyword values */ offset-anchor: top; offset-anchor: bottom; offset-anchor: left; offset-anchor: right; offset-anchor: center; offset-anchor: auto; /* <percentage> values */ offset-anchor: 25% 75%; /* <length> values */ offset-anchor: 0 0; offset-anchor: 1cm 2cm; offset-anchor: 10ch 8em; /* edge offsets values */ offset-anchor: bottom 10px right 20px; offset-anchor: right 3em bottom 10px; /* global values */ offset-anchor: inherit; offset-anchor: initial; offset-anchor: unset; values auto offset-anchor is given the same value as the element's transform-origin, unless offset-path is none, in which case it takes its value fr...
...note that the 3-value position syntax does not work for any usage of <position>, except for in background(-position).
... formal definition initial valueautoapplies totransformable elementsinheritednopercentagesrelativetowidthandheightcomputed valuefor <length> the absolute value, otherwise a percentageanimation typea position formal syntax auto | <position>where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
offset-path - CSS: Cascading Style Sheets
syntax /* default */ offset-path: none; /* function values */ offset-path: ray(45deg closest-side contain); /* url */ offset-path: url(#path); /* shapes */ offset-path: circle(50% at 25% 25%); offset-path: inset(50% 50% 50% 50%); offset-path: polygon(30% 0%, 70% 0%, 100% 50%, 30% 100%, 0% 70%, 0% 30%); offset-path: path('m 0,200 q 200,200 260,80 q 290,20 400,0 q 300,100 400,200'); /* geometry boxes */ offset-path: margin-box; offset-path: stroke-box; /* global values */ offset-path: inherit; offset-path: initial; offset-path: unset; values ray() taking up to three values, defines a path that is a line segment sta...
... path() a path string defined with svg coordinate syntax.
... formal definition initial valuenoneapplies totransformable elementsinheritednocomputed valueas specifiedanimation typeas <angle>, <basic-shape> or <path()>creates stacking contextyes formal syntax none | ray( [ <angle> && <size>?
overflow - CSS: Cascading Style Sheets
WebCSSoverflow
constituent properties this property is a shorthand for the following css properties: overflow-x overflow-y syntax /* keyword values */ overflow: visible; overflow: hidden; overflow: clip; overflow: scroll; overflow: auto; overflow: hidden visible; /* global values */ overflow: inherit; overflow: initial; overflow: unset; the overflow property is specified as one or two keywords chosen from the list of values below.
...nheritednocomputed valueas each of the properties of the shorthand:overflow-x: as specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipoverflow-y: as specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipanimation typediscrete formal syntax [ visible | hidden | clip | scroll | auto ]{1,2} examples setting different overflow values for text p { width: 12em; height: 6em; border: dotted; overflow: visible; /* content is not clipped */ } visible (default) sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
... working draft changed syntax to allow one or two keywords instead of only one css level 2 (revision 1)the definition of 'overflow' in that specification.
repeating-radial-gradient() - CSS: Cascading Style Sheets
syntax /* a gradient at the center of its container, starting red, changing to blue, and finishing green, with the colors repeating every 30px */ repeating-radial-gradient(circle at center, red 0, blue, green 30px); /* an elliptical gradient near the top left of its container, starting red, changing to green and back again, repeating five times between the center and the bottom right corne...
... formal syntax repeating-radial-gradient( [[ circle || <length> ] [at <position>]?
...browsers not supporting the syntax yet will see a gradient that goes from red to black and then from blue to green.
scroll-snap-align - CSS: Cascading Style Sheets
syntax /* keyword values */ scroll-snap-align: none; scroll-snap-align: start end; /* when two values set first is block, second inline */ scroll-snap-align: center; /* global values */ scroll-snap-align: inherit; scroll-snap-align: initial; scroll-snap-align: unset; values none the box does not define a snap position in that axis.
... safari currently has the two value syntax in the wrong order, the first value being inline the second block.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ none | start | end | center ]{1,2} specifications specification status comment css scroll snap module level 1the definition of 'scroll-snap-align' in that specification.
text-shadow - CSS: Cascading Style Sheets
syntax /* offset-x | offset-y | blur-radius | color */ text-shadow: 1px 1px 2px black; /* color | offset-x | offset-y | blur-radius */ text-shadow: #fc0 1px 0 10px; /* offset-x | offset-y | color */ text-shadow: 5px 5px #558abb; /* color | offset-x | offset-y */ text-shadow: white 2px 5px; /* offset-x | offset-y /* use defaults for color and blur-radius */ text-shadow: 5px 10px; /* global values *...
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valuea color plus three absolute lengthsanimation typea shadow list formal syntax none | <shadow-t>#where <shadow-t> = [ <length>{2,3} && <color>?
...the css text module level 3 spec refined the syntax.
transition-timing-function - CSS: Cascading Style Sheets
syntax /* keyword values */ transition-timing-function: ease; transition-timing-function: ease-in; transition-timing-function: ease-out; transition-timing-function: ease-in-out; transition-timing-function: linear; transition-timing-function: step-start; transition-timing-function: step-end; /* function values */ transition-timing-function: steps(4, jump-end); transition-timing-function: cubic-bezier(0...
... 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>, <num...
...ber <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 cubic-bezier examples <div class="parent"> <div class="ease">ease</div> <div class="easein">ease-in</div> <div class="easeout">ease-out</div> <div class="easeinout">ease-in-out</div> <div class="linear">linear</div> <div class="cb">cubic-bezier(0.2,-2,0.8,2)</div> </div> .parent {} .parent > div[class] { width: 12em; min-width: 12em; margin-bottom: 4px; background-color: black; border: 1px solid red; ...
transition - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: transition-delay transition-duration transition-property transition-timing-function syntax /* apply to 1 property */ /* property name | duration */ transition: margin-right 4s; /* property name | duration | delay */ transition: margin-right 4s 1s; /* property name | duration | timing function */ transition: margin-right 4s ease-in-out; /* property name | duration | timing function | delay */ transition: margin-right 4s ease-in-out 1s; /* apply to 2 properties */ transition: margin...
...thand:transition-delay: 0stransition-duration: 0stransition-property: alltransition-timing-function: easeapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas each of the properties of the shorthand:transition-delay: as specifiedtransition-duration: as specifiedtransition-property: as specifiedtransition-timing-function: as specifiedanimation 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_defin...
...ition_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> = step-start | step-end | steps(<integer>[, <step-position>]?)where <step-position> = jump-start | jump-end | jump-none | jump-both | start | end examples there are several more examples of css transitions included in the using css transitions article.
CSS: Cascading Style Sheets
WebCSS
this module provides a gentle beginning to your path towards css mastery with the basics of how it works, what the syntax looks like, and how you can start using it to add styling to html.
... css building blocks this module carries on where css first steps left off — now you've gained familiarity with the language and its syntax, and got some basic experience with using it, its time to dive a bit deeper.
... css key concepts: the syntax and forms of the language specificity, inheritance and the cascade css units and values box model and margin collapse the containing block stacking and block-formatting contexts initial, computed, used, and actual values css shorthand properties css flexible box layout css grid layout media queries animation cookbook the css layout cookbook aims to bring t...
HTML attribute: min - HTML: Hypertext Markup Language
WebHTMLAttributesmin
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.
...for 4.2 to be valid, step would have had to be set to any, 0.1, 0.2, or any the min value would have had to be a number ending in .2, such as <input type="number" min="-5.2"> syntax for min values by input type input type example example date yyyy-mm-dd <input type="date" min="2019-12-25" step="1"> month yyyy-mm <input type="month" min="2019-12" step="12"> week yyyy-w## <input type="week" min="2019-w23" step=""> time hh:mm <input type="time" min="09:00" step="900"> datetime-local yyyy-m...
... syntax for min values for other elements input type syntax example <meter> <number> <meter id="fuel" min="0" max="100" low="33" high="66" optimum="80" value="40"> at 40/100</meter> impact on step the value of min and step define what are valid values, even if the step attribute is not included, as step defaults to 0.
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
value the <input> element's value attribute contains a domstring which is automatically validated as conforming to url syntax.
... the syntax of a url is fairly intricate.
... recommendation initial definition urlthe definition of 'url syntax' in that specification.
Data URLs - HTTP
syntax data urls are composed of four parts: a prefix (data:), a mime type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[<mediatype>][;base64],<data> the mediatype is a mime type string, such as 'image/jpeg' for a jpeg image file.
... data:text/html,lots of text...<p><a name%3d"bottom">bottom</a>?arg=val this represents an html resource whose contents are: lots of text...<p><a name="bottom">bottom</a>?arg=val syntax the format for data urls is very simple, but it's easy to forget to put a comma before the "data" segment, or to incorrectly encode the data into base64 format.
... the data portion of a data url is opaque, so an attempt to use a query string (page-specific parameters, with the syntax <url>?parameter-data) with a data url will just include the query string in the data the url represents.
Identifying resources on the Web - HTTP
urn:isbn:9780141036144 urn:ietf:rfc:7230 the two urns correspond to the book nineteen eighty-four by george orwell, the ietf specification 7230, hypertext transfer protocol (http/1.1): message syntax and routing.
... syntax of uniform resource identifiers (uris) scheme or protocol http:// is the protocol.
... examples https://developer.mozilla.org/docs/learn tel:+1-816-555-1212 git@github.com:mdn/browser-compat-data.git ftp://example.org/resource.txt urn:isbn:9780141036144 mailto:help@supercyberhelpdesk.info specifications specification title rfc 7230, section 2.7: uniform resource identifiers hypertext transfer protocol (http/1.1): message syntax and routing ...
Browser detection using the user agent - HTTP
it will cause a syntax error in // browsers that do not support look-behind expressions // because all browsers parse the entire script, including // sections of the code that are never executed.
... problems like these can be avoided by testing for support of the feature itself instead: var islookbehindsupported = false; try { new regexp("(?<=)"); islookbehindsupported = true; } catch (err) { // if the agent doesn't support lookbehinds, the attempted // creation of a regexp object using that syntax throws and // islookbehindsupported remains false.
... also, pay attention not to use a simple regular expression on the browsername, user agents also contain strings outside the keyword/value syntax.
TE - HTTP
WebHTTPHeadersTE
header type request header forbidden header name yes syntax te: compress te: deflate te: gzip te: trailers // multiple directives, weighted with the quality value syntax: te: trailers, deflate;q=0.5 directives compress a format using the lempel-ziv-welch (lzw) algorithm is accepted as a transfer coding name.
... q when multiple transfer codings are acceptable, the q parameter of the quality value syntax can rank codings by preference.
... specifications specification title rfc 7230, section 4.3: te hypertext transfer protocol (http/1.1): message syntax and routing ...
HTTP resources and specifications - HTTP
specification title status rfc 7230 hypertext transfer protocol (http/1.1): message syntax and routing proposed standard rfc 7231 hypertext transfer protocol (http/1.1): semantics and content proposed standard rfc 7232 hypertext transfer protocol (http/1.1): conditional requests proposed standard rfc 7233 hypertext transfer protocol (http/1.1): range requests proposed standard rfc 7234 hypertext transfer protocol (http/1.1): c...
... 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 identifier (uri): generic syntax internet standard rfc 5988 web linking defines the link header proposed standard experimental spec hypertext transfer protocol (http) keep-alive header informational (expired) draft spec http client hints ietf draft rfc 7578 returning values from forms: multipart/form-data proposed standard rfc 6266 use of the content-...
...disposition header field in the hypertext transfer protocol (http) proposed standard rfc 2183 communicating presentation information in internet messages: the content-disposition header field only a subset of syntax of the content-disposition header can be used in the context of http messages.
Functions - JavaScript
note: this works only when defining the function using the above syntax (i.e.
... rest parameters the rest parameter syntax allows us to represent an indefinite number of arguments as an array.
... function multiply(multiplier, ...theargs) { return theargs.map(x => multiplier * x); } var arr = multiply(2, 1, 2, 3); console.log(arr); // [2, 4, 6] arrow functions an arrow function expression (previously, and now incorrectly known as fat arrow function) has a shorter syntax compared to function expressions and does not have its own this, arguments, super, or new.target.
Working with objects - JavaScript
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 o...
... the syntax for an object using an object initializer is: var obj = { property_1: value_1, // property_# may be an identifier...
... properties are: o.a — a number o.b — a getter that returns o.a plus 1 o.c — a setter that sets the value of o.a to half of the value o.c is being set to please note that function names of getters and setters defined in an object literal using "[gs]et property()" (as opposed to __define[gs]etter__ ) are not the names of the getters themselves, even though the [gs]et propertyname(){ } syntax may mislead you to think otherwise.
Private class fields - JavaScript
syntax class classwithprivatefield { #privatefield } class classwithprivatemethod { #privatemethod() { return 'hello world' } } class classwithprivatestaticfield { static #private_static_field } examples private static fields private fields are accessible on the class constructor from inside the class declaration itself.
...it is a syntax error to refer to # names from out of scope.
... class classwithprivatefield { #privatefield constructor() { this.#privatefield = 42 this.#randomfield = 666 // syntax error } } const instance = new classwithprivatefield() instance.#privatefield === 42 // syntax error private methods private static methods like their public equivalent, private static methods are called on the class itself, not instances of the class.
Warning: Date.prototype.toLocaleFormat is deprecated - JavaScript
examples deprecated syntax the date.prototype.tolocaleformat method is deprecated and will be removed (no cross-browser support, available in firefox only).
...märz 2017" alternative standard syntax using the ecmascript intl api the ecma-402 (ecmascript intl api) standard specifies standard objects and methods that enable language sensitive date and time formatting (available in chrome 24+, firefox 29+, ie11+, safari10+).
...mai 2014" alternative standard syntax using date methods the date object offers several methods to build a custom date string.
getter - JavaScript
the get syntax binds an object property to a function that will be called when that property is looked up.
... syntax {get prop() { ...
... 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() { } } a...
setter - JavaScript
the set syntax binds an object property to a function to be called when there is an attempt to set that property.
... syntax {set prop(val) { .
... 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.
Function.prototype.apply() - JavaScript
syntax func.apply(thisarg, [ argsarray]) parameters thisarg the value of this provided for the call to func.
... description note: while the syntax of this function is almost identical to that of call(), the fundamental difference is that call() accepts an argument list, while apply() accepts a single array of arguments.
... note: when the first argument is undefined or null a similar outcome can be achieved using the array spread syntax.
Symbol() constructor - JavaScript
the symbol() constructor returns a value of type symbol, but is incomplete as a constructor because it does not support the syntax "new symbol()" and it is not intended to be subclassed.
... syntax symbol([description]) parameters description optional a string.
...it creates a new symbol each time: symbol('foo') === symbol('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).
TypedArray - JavaScript
these objects all have a common syntax for their constructors: new typedarray(); new typedarray(length); new typedarray(typedarray); new typedarray(object); new typedarray(buffer [, byteoffset [, length]]); where typedarray is a constructor for one of the concrete types.
... var dv = int8array([1, 2, 3]); // typeerror: calling a builtin int8array constructor // without new is forbidden var dv = new int8array([1, 2, 3]); property access you can reference elements in the array using standard array index syntax (that is, using bracket notation).
... // setting and getting using standard array syntax var int16 = new int16array(2); int16[0] = 42; console.log(int16[0]); // 42 // indexed properties on prototypes are not consulted (fx 25) int8array.prototype[20] = 'foo'; (new int8array(32))[20]; // 0 // even when out of bound int8array.prototype[20] = 'foo'; (new int8array(8))[20]; // undefined // or with negative integers int8array.prototype[-1] = 'foo'; (new int8array(8))[-1]; // undefined // named properties are allowed, though (...
eval() - JavaScript
syntax eval(string) parameters string a string representing a javascript expression, statement, or sequence of statements.
... parsing json (converting strings to javascript objects) if the string you're calling eval() on contains data (for example, an array: "[1, 2, 3]"), as opposed to code, you should consider switching to json, which allows the string to use a subset of javascript syntax to represent data.
... note that since json syntax is limited compared to javascript syntax, many valid javascript literals will not parse as json.
class expression - JavaScript
syntax const myclass = class [classname] [extends otherclassname] { // class body }; description a class expression has a similar syntax to a class declaration (statement).
... class expressions allow you to redefine (re-declare) classes without throwing a syntaxerror.
... 'use strict'; let foo = class {}; // constructor property is optional foo = class {}; // re-declaration is allowed typeof foo; // returns "function" typeof class {}; // returns "function" foo instanceof object; // true foo instanceof function; // true class foo {} // throws syntaxerror (class declarations do not allow re-declaration) examples a simple class expression this is just a simple anonymous class expression which you can refer to using the variable foo.
void operator - JavaScript
syntax void expression description this operator allows evaluating expressions that produce a value into places where an expression that evaluates to undefined is desired.
... void function iife() { console.log("executed!"); }(); // output: "executed!" executing the above function without the void keyword will result in an uncaught syntaxerror.
... non-leaking arrow functions arrow functions introduce a short-hand braceless syntax that returns an expression.
async function - JavaScript
syntax async function name([param[, param[, ...param]]]) { statements } parameters name the function’s name.
...if you use it outside of an async function's body, you will get a syntaxerror.
... the purpose of async/await is to simplify the syntax necessary to consume promise-based apis.
block - JavaScript
syntax block statement { statementlist } labelled block statement labelidentifier: { statementlist } statementlist statements grouped within the block statement.
... the same is true of const: const c = 1; { const c = 2; } console.log(c); // logs 1 and does not throw syntaxerror...
... note that the block-scoped const c = 2 does not throw a syntaxerror: identifier 'c' has already been declared because it can be declared uniquely within the block.
const - JavaScript
syntax const name1 = value1 [, name2 = value2 [, ...
...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.
...able // (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.
export - JavaScript
syntax there are two types of exports: named exports (zero or more exports per module) default exports (one per module) // exporting individual features export let name1, name2, …, namen; // also var, const export let name1 = …, name2 = …, …, namen; // also var, const export function functionname(){...} export class classname {...} // export list export { name1, name2, …, namen }; // ...
...each type corresponds to one of the above syntax: named exports: // export features declared earlier export { myfunction, myvariable }; // export individual features (can export var, let, // const, function, class) export let myvariable = math.sqrt(2); export function myfunction() { ...
... this can be achieved with the "export from" syntax: export { default as function1, function2 } from 'bar.js'; which is comparable to a combination of import and export: import { default as function1, function2 } from 'bar.js'; export { function1, function2 }; but where function1 and function2 do not become available inside the current module.
label - JavaScript
syntax label : statement label any javascript identifier that is not a reserved word.
...it will throw a syntaxerror (let is a reserved identifier).
... l: function f() {} in strict mode code, however, this will throw a syntaxerror: 'use strict'; l: function f() {} // syntaxerror: functions cannot be labelled generator functions can neither be labeled in strict code, nor in non-strict code: l: function* f() {} // syntaxerror: generator functions cannot be labelled specifications specification ecmascript (ecma-262)the definition of 'labelled statement' in that specification.
var - JavaScript
syntax var varname1 [= value1] [, varname2 [= value2] ...
...delete x; // syntaxerror in strict mode.
... note that the implication of the above, is that, contrary to popular misinformation, javascript does not have implicit or undeclared variables, it merely has a syntax that looks like it does.
<maction> - MathML
the syntax is: <maction actiontype="statusline"> expression message </maction>.
... the syntax is: <maction actiontype="toggle" selection="positive-integer" > expression1 expression2 expressionn </maction>.
... the syntax is: <maction actiontype="tooltip"> expression message </maction>.
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
parsing of any attribute must not fail due to the presence of an unrecognized attribute as long as that attribute follows the syntax in xml-stylesheet.
...no syntax checking is done on the attribute, however if it is not a valid ncname it will never match any parameter in the stylesheet.
...no syntax checking is done on the attribute.
Understanding WebAssembly text format - WebAssembly
this article explains how that text format works, in terms of the raw syntax, and how it is related to the underlying bytecode it represents — and the wrapper objects representing wasm in javascript.
... unlike the abstract syntax tree of a programming language, though, webassembly’s tree is pretty flat, mostly consisting of lists of instructions.
... our final wasm module looks like this: (module (import "console" "log" (func $log (param i32 i32))) (import "js" "mem" (memory 1)) (data (i32.const 0) "hi") (func (export "writehi") i32.const 0 ;; pass offset 0 to log i32.const 2 ;; pass length 2 to log call $log)) note: above, note the double semi-colon syntax (;;) for allowing comments in webassembly files.
Extension Versioning, Update and Compatibility - Archive of obsolete content
<?xml version="1.0" encoding="utf-8"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <!-- this description resource includes all the update and compatibility information for a single add-on with the id foobar@developer.mozilla.org.
... jrgzow1fitkzi7w0//c8ekdmlatguegfns2iltd5p/0kh/hf1rpc1wuqeqkcd4+l bcvq13ad</em:signature> </rdf:description> </rdf:rdf> some people prefer this alternate format (note that much of the information has been trimmed from this example for brevity in order to show the basic structure): <?xml version="1.0" encoding="utf-8"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <!-- this description resource includes all the update and compatibility information for a single add-on with the id foobar@developer.mozilla.org.
Inline options - Archive of obsolete content
firefox 7 supports a new syntax for defining extensions' preferences for both bootstrapped and traditional extensions.
... the user interface for the preferences defined with this new syntax appears in the extension's detail view in the add-on manager.
Install Manifests - Archive of obsolete content
layout the basic layout of an install manifest is like so: <?xml version="1.0" encoding="utf-8"?> <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"> <!-- properties --> </description> </rdf> some properties are required, some are optional.
... <em:requires> has a similar syntax to the <em:targetapplication> tag (i.e.
XPCOM Objects - Archive of obsolete content
this section is a quick guide on how to read xpcom documentation, which basically amounts to understanding the syntax of xpidl, the language used to specify xpcom interfaces.
... there are more details about xpidl in the xpdil syntax definition.
Add-ons - Archive of obsolete content
inline options firefox 7 supports a new syntax for defining extensions' preferences for both bootstrapped and traditional extensions.
... the user interface for the preferences defined with this new syntax appears in the extension's detail view in the add-on manager.
loadResources - Archive of obsolete content
method of install object syntax object loadresources( string xpipath ); parameters the sole input parameter for loadresources is a string representing the path to the properties file in the xpi in which the key/value pairs are defined.
... the following lines retrieve the properties as a javascript object and make the values accessible with the familiar "dot property" syntax: reseg2obj = loadresources("bin/res_eg_2.properties"); dump( reseg2obj.title ) ...
XUL Events - Archive of obsolete content
this is not a real event instead it is just a function call and must use the attribute syntax.
...this is not a real event instead it is just a function call and must use the attribute syntax.
Additional Navigation - Archive of obsolete content
the syntax for the triple is the same except that the known variable should be placed in the triple's object attribute and the unknown variable should be placed in the triple's subject variable.
... <?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:r="http://www.xulplanet.com/rdf/"> <rdf:seq rdf:about="http://www.xulplanet.com/rdf/myphotos"> <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images/t/palace.jpg"/> <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images/t/canal.jpg"/> <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images...
Additional Template Attributes - Archive of obsolete content
one possible advantage is when using the simple rdf query syntax where you don't specify variables; instead you use the special 'rdf:*' syntax for the member variable and the container is implied.
...if you are using the simple syntax and want to use the container variable in the content, you must use the container attribute since there is no other way to refer to it.
Building Menus With Templates - Archive of obsolete content
here is an rdf example: <button label="houses in my neighbourhood" type="menu" datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <template> <rule rdf:type="http://www.xulplanet.com/rdf/house"> <menupopup> <menuitem uri="rdf:*" label="rdf:http://www.xulplanet.com/rdf/address"/> </menupopup> </rule> <rule> <menupopup> <menu uri="rdf:*" label="rdf:http://purl.org/dc/elements/1.1/title"/> </menupopup> </rule> </template> </button> this example uses the simple r...
...df query syntax.
Introduction - Archive of obsolete content
the template syntax allows for different rules to generate different content based on particular criteria as well as set attribute values from returned results.
...the type affects how the datasource is used as well as the syntax for specifying queries.
Static Content - Archive of obsolete content
<menulist datasources="template-guide-photos4.rdf" ref="http://www.daml.org/2001/09/countries/country-ont#country" oncommand="applyfilter(event.target.value);"> <menupopup> <menuitem label="all"/> </menupopup> <template> <query> <content uri="?start"/> <triple subject="?country" predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" object="?start"/> <triple subject="?country" predicate="http://purl.org/dc/elements/1.1/title" object="?countrytitle"/> </query> <action> <menupopup> <menuitem uri="?country" label="?countrytitle" value="?country"/> </menupopup> </action> </template> </menulist> the only difference between the previous exa...
... <radiogroup datasources="template-guide-photos4.rdf" ref="http://www.daml.org/2001/09/countries/country-ont#country" onselect="applyfilter(event.target.value);"> <radio label="all" selected="true"/> <template> <query> <content uri="?start"/> <triple subject="?country" predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" object="?start"/> <triple subject="?country" predicate="http://purl.org/dc/elements/1.1/title" object="?countrytitle"/> </query> <action> <radio uri="?country" label="?countrytitle" value="?country"/> </action> </template> </radiogroup> this example doesn't have any other content to generate outside the radio element wi...
Template Logging - Archive of obsolete content
template errors the second type of template error is a syntax error is the template rules, for example, a missing attribute or a tag out of place.
...expected <content> to be first for an rdf template, when using the full query syntax, the <content> element must always appear before any other elements.
XML Assignments - Archive of obsolete content
xpath provides syntax to retrieve this using the built-in string-length method.
...in this case, we use an expression that returns the nodes as in earlier examples, and use some additional syntax of the query to get the length of the names.
XML Templates - Archive of obsolete content
this indicates to the template builder that an xml source is being used as that the queries use syntax that is specific to xml.
... for this and the following examples, we are going to use the following xml document containing a list of people: <people> <person name="napoleon bonaparte" gender="male"/> <person name="cleopatra" gender="female"/> <person name="julius caesar" gender="male"/> <person name="ferdinand magellan" gender="male"/> <person name="laura secord" gender="female"/> </people> xml query syntax the query syntax is fairly simple for xml datasources.
Template Guide - Archive of obsolete content
basics of xul templates introduction rule compilation rdf template syntax result generation rdf query syntax actions recursive generation simple example bindings additional navigation filtering static content simple query syntax containment properties xml template syntax xml templates xml assignments sql template syntax sqlite templates common template syntax attribute substitution multiple rules using recursive templates building menus with templates special condition tests multiple queries using multiple queries to generate more results building trees with templates building trees building hierarchical trees template modifications template builder interface template and tree listeners rdf modifications additional topics sorting...
... results additional template attributes template logging xml namespaces alternative approaches javascript templates xuljsdatasource: a component for extensions, which bring a "javascript template syntax".
textbox (Toolkit autocomplete) - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
Textbox (XPFE autocomplete) - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
paste it into the new file: <?xml version="1.0" encoding="utf-8"?> <!doctype rdf:rdf> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#"> <rdf:seq rdf:about="urn:mozilla:package:root"> <rdf:li rdf:resource="urn:mozilla:package:custombutton"/> </rdf:seq> <rdf:description rdf:about="urn:mozilla:package:custombutton" chrome:displayname="custom button" chrome:description="my custom toolbar button" chrome:author="my name" chrome:name="custom...
...now open a new text document in the same folder, pasting the following text within: <?xml version="1.0" encoding="utf-8"?> <!doctype rdf:rdf> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#"> <rdf:seq rdf:about="urn:mozilla:package:root"> <rdf:li rdf:resource="urn:mozilla:package:myapp"/> </rdf:seq> <rdf:description rdf:about="urn:mozilla:package:myapp" chrome:displayname="myapp" chrome:description="my first xul app" chrome:author="yours truly" chrome:name="myapp"...
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
the general handler syntax is as follows: <binding id="binding-name"> <handlers> <handler event="event-name" action="script"/> </handlers> </binding> place all of your handlers within the handlers element.
...the following alternate syntax can be used when the code in a handler is more complex: <binding id="binding-name"> <handlers> <handler event="event-name"> -- handler code goes here -- </handler> </handlers> </binding> handlers example the following example adds some key handlers to create a very primitive local clipboard: example 1 : source <binding id="clipbox"> <content> <xul:textbox/> </content> ...
Introduction to RDF - Archive of obsolete content
<?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> ...
...<rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:animals="http://www.some-fictitious-zoo.com/rdf#"> <rdf:seq about="http://www.some-fictitious-zoo.com/all-animals"> <rdf:li> <rdf:description about="http://www.some-fictitious-zoo.com/mammals/lion"> <animals:name>lion</animals:name> <animals:species>panthera leo</animals:species> <animals:class>mammal</animals:class> </rdf:descri...
Manipulating Lists - Archive of obsolete content
the syntax is as follows: list.insertitemat(3, "thursday", "thu"); list.removeitemat(3); the insertitemat() function takes an additional argument, the position to insert the new item.
...for example, to add a new item to a menulist, you can use the same syntax as for a listbox.
Scroll Bars - Archive of obsolete content
the syntax of a scroll bar is as follows: <scrollbar id="identifier" orient="horizontal" curpos="20" maxpos="100" increment="1" pageincrement="10"/> the attributes are as follows: id the unique identifer of the scroll bar orient this specifies the direction of the scroll bar.
... the example given in the syntax above will create a scroll bar that can range from a value of 0 to 100.
Skinning XUL Files by Hand - Archive of obsolete content
stylesheet syntax to familiarize yourself with the global skin, open up the text file called global.css in the chrome/classic.jar!/skin/classic/global directory of the mozilla application.
... the syntax for creating all this information with text -- added to the distributed nature and the sheer volume of text required to define a single chrome -- can sometimes make the progress seem slow.
Tabboxes - Archive of obsolete content
shown below is the general syntax of a tabbox: <tabbox id="tablist"> <tabs> <!-- tab elements go here --> </tabs> <tabpanels> <!-- tabpanel elements go here --> </tabpanels> </tabbox> the tab elements are placed inside a tabs element, which is much like a regular box.
...there is no special syntax to do this.
Templates - Archive of obsolete content
more about resource syntax (xulplanet).
... rule example the following example demonstrates the earlier example with two rules: example 4 : source <window id="example-window" title="bookmarks list" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <vbox datasources="rdf:bookmarks" ref="nc:bookmarksroot" flex="1"> <template> <rule rdf:type="http://home.netscape.com/nc-rdf#bookmarkseparator"> <spacer uri="rdf:*" height="16"/> </rule> <rule> <button uri="rdf:*" label="rdf:http://home.netscape.com/nc-rdf#name"/> </rule> </template...
description - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
listbox - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
listitem - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
menu - Archive of obsolete content
ArchiveMozillaXULmenu
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
menuitem - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
menulist - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
menuseparator - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
notification - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
radio - Archive of obsolete content
ArchiveMozillaXULradio
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
radiogroup - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
richlistbox - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
richlistitem - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
rule - Archive of obsolete content
ArchiveMozillaXULrule
when no query element is used in a template, a default query is used and the simple query syntax may be used for rdf datasources.
... for more information about this, see the simple query syntax.
scale - Archive of obsolete content
ArchiveMozillaXULscale
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
NPClass - Archive of obsolete content
syntax struct npclass { uint32_t structversion; npallocatefunctionptr allocate; npdeallocatefunctionptr deallocate; npinvalidatefunctionptr invalidate; nphasmethodfunctionptr hasmethod; npinvokefunctionptr invoke; npinvokedefaultfunctionptr invokedefault; nphaspropertyfunctionptr hasproperty; npgetpropertyfunctionptr getproperty; npsetpropertyfunctionptr setproperty; npremovepropertyfunctionptr removeproperty; npenumerationfunctionptr enumerate; npconstructfunctionptr construct; }; warning: don't call these routines directly.
... function pointer syntax typedef npobject *(*npallocatefunctionptr)(npp npp, npclass *aclass); typedef void (*npdeallocatefunctionptr)(npobject *npobj); typedef void (*npinvalidatefunctionptr)(npobject *npobj); typedef bool (*nphasmethodfunctionptr)(npobject *npobj, npidentifier name); typedef bool (*npinvokefunctionptr)(npobject *npobj, npidentifier name, const npvariant *args, uint3...
-moz-binding - Archive of obsolete content
syntax /* <url> value */ -moz-binding: url(http://www.example.org/xbl/htmlbindings.xml#checkbox); /* global values */ -moz-binding: inherited; -moz-binding: initial; -moz-binding: unset; values <url> the url for the xbl binding (including the fragment identifier).
... formal definition initial valuenoneapplies toall elements except generated content or pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <url> | none examples .exampleone { -moz-binding: url(http://www.example.org/xbl/htmlbindings.xml#radiobutton); } specifications not part of any standard.
-moz-border-bottom-colors - Archive of obsolete content
syntax values accepts a white-space separated list of color values.
... formal syntax <color>+ | nonewhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-moz-border-left-colors - Archive of obsolete content
syntax values accepts a white-space separated list of color values.
... formal syntax <color>+ | nonewhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-moz-border-right-colors - Archive of obsolete content
syntax values accepts a white-space separated list of color values.
... formal syntax <color>+ | nonewhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-moz-border-top-colors - Archive of obsolete content
syntax values accepts a white-space separated list of color values.
... formal syntax <color>+ | nonewhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-moz-stack-sizing - Archive of obsolete content
(the problem does not affect children moved above or to the left of the stack.) initial valuestretch-to-fitapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values stretch-to-fit the child will influence the stack's size.
... formal syntax ignore | stretch-to-fit examples .mainsheet { -moz-stack-sizing: ignore; } ...
-moz-text-blink - Archive of obsolete content
initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values none produces no blinking.
... formal syntax none | blink example .example { -moz-text-blink: blink; } specifications this property was defined in an old draft of the css 3 text specification.
-moz-window-shadow - Archive of obsolete content
<window>, <panel>inheritednocomputed valueas specifiedanimation typediscrete syntax the -moz-window-shadow property is specified as one of the keyword values listed below.
... formal syntax default | menu | tooltip | sheet | none example .kui-panel { -moz-window-shadow: none; } ...
-ms-accelerator - Archive of obsolete content
initial valuefalseapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete syntax /* the object is not a keyboard shortcut (the default) */ -ms-accelerator: false /* the object is a keyboard shortcut */ -ms-accelerator: true values false the object is not a keyboard shortcut.
... formal syntax false | true examples this example uses the -ms-accelerator attribute in a <u> element to specify that the "n" in the <label> element is a keyboard shortcut.
-ms-block-progression - Archive of obsolete content
initial valuetbapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values tb default.
... formal syntax tb | rl | bt | lr specifications not part of any specification.
-ms-content-zoom-chaining - Archive of obsolete content
initial valuenoneapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values none the initial value.
... formal syntax none | chained specifications not part of any specification.
-ms-content-zoom-limit-max - Archive of obsolete content
smaller values zoom out.computed valueas specifiedanimation typediscrete syntax values <percentage> the maximum zoom factor.
... formal syntax <percentage> specifications not part of any specification.
-ms-content-zoom-limit-min - Archive of obsolete content
smaller values zoom out.computed valueas specifiedanimation typediscrete syntax values <percentage> the minimum zoom factor.
... formal syntax <percentage> specifications not part of any specification.
-ms-content-zoom-limit - Archive of obsolete content
smaller values zoom out.computed valueas each of the properties of the shorthand:-ms-content-zoom-limit-max: as specified-ms-content-zoom-limit-min: as specifiedanimation typediscrete syntax the -ms-content-zoom-limit shorthand property is specified as one or both of the following content zoom limit values, in order, separated by spaces.
... formal syntax <'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'> specifications not part of any specification.
-ms-content-zoom-snap-points - Archive of obsolete content
initial valuesnapinterval(0%, 100%)applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values snapinterval( <percentage>, <percentage> ) specifies where the snap-points will be placed.
... formal syntax snapinterval( <percentage>, <percentage> ) | snaplist( <percentage># ) examples this example demonstrates both types of values for the -ms-content-zoom-snap-points property.
-ms-content-zoom-snap-type - Archive of obsolete content
initial valuenoneapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values none initial value.
... formal syntax none | proximity | mandatory specifications not part of any specification.
-ms-content-zoom-snap - Archive of obsolete content
initial valueas each of the properties of the shorthand:-ms-content-zoom-snap-type: none-ms-content-zoom-snap-points: snapinterval(0%, 100%)applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas each of the properties of the shorthand:-ms-content-zoom-snap-type: as specified-ms-content-zoom-snap-points: as specifiedanimation typediscrete syntax the -ms-content-zoom-snap shorthand property is specified as one or both of the following content zoom snap values, in order, separated by spaces.
... formal syntax <'-ms-content-zoom-snap-type'> | <'-ms-content-zoom-snap-points'> specifications not part of any specification.
-ms-content-zooming - Archive of obsolete content
initial valuezoom for the top level element, none for all other elementsapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values none the initial value of all elements except the top-level element.
... formal syntax none | zoom specifications not part of any specification.
-ms-flow-from - Archive of obsolete content
initial valuenoneapplies tonon-replaced elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values none default.
... formal syntax [ none | <custom-ident> ]# specifications not part of any specification.
-ms-flow-into - Archive of obsolete content
initial valuenoneapplies toiframe elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values none default.
... formal syntax [ none | <custom-ident> ]# specifications not part of any specification.
-ms-high-contrast-adjust - Archive of obsolete content
initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values auto indicates the applicable css properties will be adjusted as expected when the system is in high contrast mode.
... formal syntax auto | none specifications not part of any specification.
-ms-hyphenate-limit-chars - Archive of obsolete content
initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values auto corresponds to a value of 5 2 2, indicating a 5-character word limit, 2 characters required before a hyphenation break, and 2 characters required following a hyphenation break.
... formal syntax auto | <integer>{1,3} specifications not part of any specification.
-ms-hyphenate-limit-lines - Archive of obsolete content
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.
... formal syntax no-limit | <integer> specifications not part of any specification.
-ms-hyphenate-limit-zone - Archive of obsolete content
initial value0applies toblock container elementsinheritedyespercentagescalculated with respect to the width of the line boxcomputed valueas specifiedanimation typediscrete syntax values <percentage> an integer followed by a percent sign (%), which specifies the width of the hyphenation zone, calculated with respect to the line box.
... formal syntax <percentage> | <length> specifications not part of any specification.
-ms-ime-align - Archive of obsolete content
initial valueautoapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete syntax /* keyword values */ -ms-ime-align: auto; -ms-ime-align: after; values auto initial value.
... formal syntax auto | after specifications not part of any specification.
-ms-overflow-style - Archive of obsolete content
initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values auto the initial value.
... formal syntax auto | none | scrollbar | -ms-autohiding-scrollbar specifications not part of any specification.
-ms-scroll-chaining - Archive of obsolete content
initial valuechainedapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values chained initial value.
... formal syntax chained | none examples the following example illustrates the -ms-scroll-chaining property in use.
-ms-scroll-limit-x-max - Archive of obsolete content
initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values auto the maximum value for the scrollleft property is equal to element.scrollwidth.
... formal syntax auto | <length> specifications not part of any specification.
-ms-scroll-limit-x-min - Archive of obsolete content
initial value0applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values <length> the minimum value for the scrollleft property.
... formal syntax <length> specifications not part of any specification.
-ms-scroll-limit-y-max - Archive of obsolete content
initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values auto the maximum value for the scrolltop property is equal to element.scrollheight.
... formal syntax auto | <length> specifications not part of any specification.
-ms-scroll-limit-y-min - Archive of obsolete content
initial value0applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values <length> the minimum value for the scrolltop property.
... formal syntax <length> specifications not part of any specification.
-ms-scroll-limit - Archive of obsolete content
0-ms-scroll-limit-y-min: 0-ms-scroll-limit-x-max: auto-ms-scroll-limit-y-max: autoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas each of the properties of the shorthand:-ms-scroll-limit-x-min: as specified-ms-scroll-limit-y-min: as specified-ms-scroll-limit-x-max: as specified-ms-scroll-limit-y-max: as specifiedanimation typediscrete syntax the -ms-scroll-limit property is specified as one or more of the following scroll limit values, in the order listed, separated by spaces.
... formal syntax <'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'> specifications not part of any specification.
-ms-scroll-rails - Archive of obsolete content
initial valuerailedapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values none the content moves exactly with the user's finger.
... formal syntax none | railed specifications not part of any specification.
-ms-scroll-snap-points-x - Archive of obsolete content
initial valuesnapinterval(0px, 100%)applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values note: a <length-percentage> is a value that can be either a <length> or a <percentaqe>.
... formal syntax snapinterval( <length-percentage>, <length-percentage> ) | snaplist( <length-percentage># )where <length-percentage> = <length> | <percentage> examples this example demonstrates both types of values for the -ms-scroll-snap-points-x property.
-ms-scroll-snap-points-y - Archive of obsolete content
initial valuesnapinterval(0px, 100%)applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values note: a <length-percentage> is a value that can be either a <length> or a <percentaqe>.
... formal syntax snapinterval( <length-percentage>, <length-percentage> ) | snaplist( <length-percentage># )where <length-percentage> = <length> | <percentage> examples this example demonstrates both types of values for the -ms-scroll-snap-points-y property.
-ms-scroll-snap-x - Archive of obsolete content
initial valueas each of the properties of the shorthand:-ms-scroll-snap-type: none-ms-scroll-snap-points-x: snapinterval(0px, 100%)applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas each of the properties of the shorthand:-ms-scroll-snap-type: as specified-ms-scroll-snap-points-x: as specifiedanimation typediscrete syntax values the -ms-scroll-snap-x shorthand property is specified as one or both of the following values, in order and separated by spaces.
... formal syntax <'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'> examples the -ms-scroll-snap-x property is a shorthand property.
-ms-scroll-snap-y - Archive of obsolete content
initial valueas each of the properties of the shorthand:-ms-scroll-snap-type: none-ms-scroll-snap-points-y: snapinterval(0px, 100%)applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas each of the properties of the shorthand:-ms-scroll-snap-type: as specified-ms-scroll-snap-points-y: as specifiedanimation typediscrete syntax values the -ms-scroll-snap-y shorthand property is specified as one or both of the following values, in order and separated by spaces.
... formal syntax <'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'> examples the -ms-scroll-snap-y property is a shorthand property.
-ms-scroll-translation - Archive of obsolete content
initial valuenoneapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values vertical-to-horizontal vertical to horizontal translation, as described in remarks, will take place when appropriate.
... formal syntax none | vertical-to-horizontal specifications not part of any specification.
-ms-scrollbar-3dlight-color - Archive of obsolete content
initial valuedepends on user agentapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the top and left edges of the scroll box and scroll arrows of the scroll bar.
... formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-arrow-color - Archive of obsolete content
initial valuebuttontextapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the scroll arrows of the scroll bar.
... formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-base-color - Archive of obsolete content
initial valuedepends on user agentapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the base color of the main elements of a scroll bar.
... formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-darkshadow-color - Archive of obsolete content
initial valuethreeddarkshadowapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the scroll bar's gutter.
... formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-face-color - Archive of obsolete content
initial valuethreedfaceapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the scroll box and scroll arrows.
... formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-highlight-color - Archive of obsolete content
initial valuethreedhighlightapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the slider tray, the top and left edges of the scroll box, and the scroll arrows of a scroll bar.
... formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-shadow-color - Archive of obsolete content
initial valuethreeddarkshadowapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.
... formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-scrollbar-track-color - Archive of obsolete content
initial valuescrollbarapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the track element.
... formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-ms-text-autospace - Archive of obsolete content
initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values none no effect takes place; that is, no extra space is added.
... formal syntax none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space specifications not part of any specification.
-ms-touch-select - Archive of obsolete content
initial valuegrippersapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values grippers the grippers are always on.
... formal syntax grippers | none specifications not part of any specification.
-ms-wrap-flow - Archive of obsolete content
initial valueautoapplies toblock-level elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values auto for floated elements, an exclusion is created; for all other elements, an exclusion is not created.
... formal syntax auto | both | start | end | maximum | clear specifications not part of any specification.
-ms-wrap-margin - Archive of obsolete content
initial value0applies toexclusion elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values <length> the margin size, a non-negative value.
... formal syntax <length> specifications not part of any specification.
-ms-wrap-through - Archive of obsolete content
initial valuewrapapplies toblock-level elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values wrap the exclusion element inherits its parent node's wrapping context.
... formal syntax wrap | none specifications not part of any specification.
:-moz-system-metric() - Archive of obsolete content
syntax values -moz-windows-compositormedia: media/visual accepts min/max prefixes: no:-moz-system-metric(images-in-menus)the :-moz-system-metric(images-in-menus) css pseudo-class matches an element if the computer's user interface supports images in menus.:-moz-system-metric(mac-graphite-theme):-moz-system-metric(mac-graphite-theme) will match an element if the user has chosen the "graphite" appearance in the "appearance" prefpane of the mac os x system preferences.:-moz-system-metric(scrollbar-end-backward)the :-moz-system-metric(s...
... formal syntax syntax not found in db!
display-inside - Archive of obsolete content
syntax one of the keyword values listed below.
... formal syntax syntax not found in db!
display-outside - Archive of obsolete content
syntax one of the keyword values listed below.
... formal syntax syntax not found in db!
Introduction - Archive of obsolete content
« previousnext » basic syntax with e4x enabled, basic xml elements are valid syntax for variables.
...with special syntax, we can assign the value of a javascript variable to be the value of an e4x element.
E4X Tutorial - Archive of obsolete content
this tutorial walks you through the basic syntax of e4x (ecmascript for xml).
... with e4x, programmers can manipulate an xml document with a syntax more familiar to javascript programming.
@cc_on - Archive of obsolete content
syntax @cc_on remarks the @cc_on statement activates conditional compilation within comments in a script.
... it is strongly recommended that you use the @cc_on statement in a comment, so that browsers that do not support conditional compilation will accept your script as valid syntax: an @if or @set statement outside of a comment also activates conditional compilation.
New in JavaScript 1.2 - Archive of obsolete content
--> new features in javascript 1.2 new objects you can create objects using literal notation (inspired by dictionary literal syntax from python 1.x).
... arrays can now be created using literal notation (inspired by list literal syntax from python 1.x).
handler.enumerate() - Archive of obsolete content
syntax var p = new proxy(target, { enumerate(target) { } }); parameters the following parameter is passed to the enumerate method.
... var p = new proxy({}, { enumerate(target) { return 1; } }); for (var x in p) {} // typeerror is thrown note: both examples make use of the shorthand syntax for method definitions.
Sharp variables in JavaScript - Archive of obsolete content
a sharp variable is a syntax in object initializers that allows serialization of objects that have cyclic references or multiple references to the same object.
... warning: sharp variables was a non-standard syntax for creating or serializing cyclic data graphs that used to be supported only by mozilla's spidermonkey js engine.
XForms Repeat Element - Archive of obsolete content
since html:table doesn't (and probably never will) allow xforms:repeat elements as children, another syntax is needed.
... 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.
Archive of obsolete content
syntax highliting support for .htaccess files less.
...it offers powerful and yet intuitive searching based on xpath, has sql-like syntax for the query portion, and has scripting features such as function and variable definitions, xml-inclusion, etc.
SVG - MDN Web Docs Glossary: Definitions of Web-related terms
scalable vector graphics (svg) is a 2d vector image format based on an xml syntax.
... based on an xml syntax, svg can be styled with css and made interactive using javascript.
WebIDL - MDN Web Docs Glossary: Definitions of Web-related terms
it uses a somewhat stylized syntax which is independent of any specific programming language, so that the underlying code which is used to build each api can be written in whatever language is most appropriate, while still being possible to map the api's components to javascript-compatible constructs.
... webidl is used in nearly every api specification for the web, and due to its standard format and syntax, the programmers who create web browsers can more easily ensure that their browsers are compatible with one another, regardless of how they choose to write the code to implement the api.
Backgrounds and borders - Learn web development
ckground-position: top center; } and lengths, and percentages: .box { background-image: url(star.png); background-repeat: no-repeat; background-position: 20px 10%; } you can also mix keyword values with lengths or percentages, for example: .box { background-image: url(star.png); background-repeat: no-repeat; background-position: top 20px; } finally, you can also use a 4-value syntax in order to indicate a distance from certain edges of the box — the length unit, in this case, is an offset from the value that precedes it.
...take a look at the property page for border-radius to see the available syntax options.
Pseudo-classes and pseudo-elements - Learn web development
::pseudo-element-name note: some early pseudo-elements used the single colon syntax, so you may sometimes see this in code or examples.
... modern browsers support the early pseudo-elements with single- or double-colon syntax for backwards compatibility.
CSS building blocks - Learn web development
this module carries on where css first steps left off — now you've gained familiarity with the language and its syntax, and got some basic experience with using it, its time to dive a bit deeper.
... fundamental css comprehension this assessment tests your understanding of basic syntax, selectors, specificity, box model, and more.
Beginner's guide to media queries - Learn web development
in this lesson you will first learn about the syntax used in media queries, and then move on to use them in a worked example showing how a simple design might be made responsive.
... media query basics the simplest media query syntax looks like this: @media media-type and (media-feature-rule) { /* css rules go here */ } it consists of: a media type, which tells the browser what kind of media this code is for (e.g.
How CSS is structured - Learn web development
objective: to learn css's fundamental syntax structures in detail.
...if any of the syntax above is not familiar, try searching mdn.
What is CSS? - Learn web development
this article explains what css is, with a simple syntax example, and also covers some key terms about the language.
... css syntax css is a rule-based language — you define rules specifying groups of styles that should be applied to particular elements or groups of elements on your web page.
CSS first steps - Learn web development
this module provides a gentle beginning to your path towards css mastery with the basics of how it works, what the syntax looks like, and how you can start using it to add styling to html.
...this article explains what css is, with a simple syntax example, and also covers some key terms about the language.
Learn to style HTML using CSS - Learn web development
this module provides a gentle beginning to your path towards css mastery with the basics of how it works, what the syntax looks like, and how you can start using it to add styling to html.
... css building blocks this module carries on where css first steps left off — now you've gained familiarity with the language and its syntax, and got some basic experience with using it, its time to dive a bit deeper.
Introduction to HTML - Learn web development
this module will introduce the first two of these and introduce fundamental concepts and syntax you need to know to understand html.
...this article shows the syntax required to make a link and discusses best practices for links.
Functions — reusable blocks of code - Learn web development
in this article we'll explore fundamental concepts behind functions such as basic syntax, how to invoke and define them, scope, and parameters.
...now is the time, however, for us to start talking about functions explicitly, and really exploring their syntax.
Looping code - Learn web development
the first, which you'll use most of the time, is the for loop — this has the following syntax: for (initializer; condition; final-expression) { // code to run } here we have: the keyword for, followed by some parentheses.
...this loop's syntax looks like so: initializer while (condition) { // code to run final-expression } this works in a very similar way to the for loop, except that the initializer variable is set before the loop, and the final-expression is included inside the loop after the code to run — rather than these two items being included inside the parentheses.
Client-side storage - Learn web development
new school: web storage and indexeddb the "easier" features we mentioned above are as follows: the web storage api provides a very simple syntax for storing and retrieving smaller, data items consisting of a name and a corresponding value.
... basic syntax let's show you how: first, go to our web storage blank template on github (open this in a new tab).
Handling text — strings in JavaScript - Learn web development
template literals another type of string syntax that you may come across is template literals (sometimes referred to as template strings).
... this is a newer syntax that provides more flexible, easier to read strings.
Introduction to client-side frameworks - Learn web development
react extends javascript with html-like syntax, known as jsx.
...if the curly braces and v- attributes here are unfamiliar to you, that's okay; you’ll learn about vue-specific syntax later on in the module.
React interactivity: Events and state - Learn web development
to do this, we can use spread syntax to copy the existing array, and add our object at the end.
... if the task’s id property matches the id provided to the function, we use object spread syntax to create a new object, and toggle the checked property of that object before returning it.
Componentizing our Svelte app - Learn web development
add the following, again to the bottom of the <script> section: function update(updatedtodo) { todo = { ...todo, ...updatedtodo } // applies modifications to todo dispatch('update', todo) // emit update event } here we are using the spread syntax to return the original todo with the modifications applied to it.
...in its <script> section, add this handler: function updatetodo(todo) { const i = todos.findindex(t => t.id === todo.id) todos[i] = { ...todos[i], ...todo } } we find the todo by id in our todos array, and update its content using spread syntax.
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
the function returns a copy of each todo using spread syntax and overwrites the property of the completed value accordingly.
... note: the { name } syntax is just a shorthand for { name: name }.
Introduction to automated testing - Learn web development
babel to transpile any new javascript syntax features to traditional syntax that works in older browsers (see gulp-babel).
... return gulp.src('src/main.js') .pipe(jshint()) .pipe(jshint.reporter('default')) .pipe(babel({ presets: ['@babel/env'] })) .pipe(gulp.dest('build')); cb(); } here we grab our main.js file, run jshint on it and output the results to the terminal using jshint.reporter; we then pass the file to babel, which converts it to old style syntax and outputs the result into the build directory.
Setting up your own test automation environment - Learn web development
let's move on, look at the basics of webdriver syntax, in a bit more detail.
... webdriver syntax crash course let's have a look at a few key features of the webdriver syntax.
The Firefox codebase: CSS Guidelines
omit units on 0 values do this: margin: 0; not this: margin: 0px; use expanded syntax it is often harder to understand what the shorthand is doing and the shorthand can also hide some unwanted default values.
... it is good to privilege expanded syntax to make your intentions explicit.
Error codes returned by Mozilla APIs
ns_error_dom_syntax_err (0x8053000c) an attribute value or property was set to an invalid value.
... ns_error_first_header_field_component_empty (0x804b0022) while parsing for the first component of a header field using syntax such as that for content-disposition or content-type, the first component was found to be empty.
-moz-window-dragging
<window>, <panel> inherited no media visual computed value as specified animation type discrete canonical order the unique non-ambiguous order defined by the formal grammar syntax the -moz-window-dragging property is specified as one of the keyword values listed below.
... no-drag the window is not draggable formal syntax drag | no-drag example toolbarpaletteitem { -moz-window-dragging: no-drag; } specifications this property is not part of any specification.
overflow-clip-box-block
syntax values padding-box this keyword makes the clipping be related to the padding box.
... formal syntax syntax not found in db!
overflow-clip-box-inline
syntax values padding-box this keyword makes the clipping be related to the padding box.
... formal syntax syntax not found in db!
overflow-clip-box
initial valuepadding-boxapplies toall elementsinheritednomediavisualcomputed valueas specifiedanimation typediscretecanonical orderthe unique non-ambiguous order defined by the formal grammar syntax values padding-box this keyword makes the clipping be related to the padding box.
... formal syntax padding-box | content-box examples padding-box html <div class="things"> <input value="abcdefghijklmnopqrstuvwxyzÅÄÖ" class="scroll padding-box"> <div class="scroll padding-box"><span>abcdefghijklmnopqrstuvwxyzÅÄÖ</span></div> </div> css .scroll { overflow: auto; padding: 0 30px; width: 6em; border: 1px solid black; background: lime content-box; } .padding-box { overflow-clip-box: padding-box; } js function scrollsomeelements() { var elms = document.queryselectorall('.scroll'); for (i=0; i < elms.length; ++i) { elms[i].scrollleft=80; } } var elt = document.queryelementsbytagname('body')[0]; elt.addeventlistener("load", scrollsomeelements, false); result s...
Extending a Protocol
the syntax should hopefully be fairly obvious though.
...it means the syntax is correct, and now we need to pwindowglobal.ipdl to manage our pecho protocol.
Examples
let lastpromise = newpromise.then(function onfulfill(){ }) .catch(function onreject(arejectreason) { console.warn('newpromise failed with reason: ', arejectreason); }); using a promise returned by a function (verbose) this example uses a verbose syntax, showing all the involved promises.
... using a promise returned by a function (compact) the same code as the previous example is usually written with a more compact syntax: components.utils.import("resource://gre/modules/osfile.jsm") let path = os.path.join(os.constants.path.tmpdir, "file.txt"); os.file.exists(path).then(exists => { console.log(exists ?
Localization formats
<h1><?php echo ___("getting started")?></h1> function ___($str) { return $array[$str]; } advantage to .lang simple work-flow allowing the web developer to place the file in svn and it can appear on the staging server .lang syntax is like simplified .po, which many localizers who are familiar with linux and other projects understand mozilla has a basic tool called main.lang checker, which can show any untranslated files to the localizer no need to compile to .mo file so a localizer can see his/her changes more quickly creating simple diffs .lang files will be cached which will reduce any slowness effect disadvantage ...
...to .lang no plural forms no context for localizers unless you provide good comments no styling by localizers if it is needed may be slower because file is not compiled into binaries not used as a standard by any other localization project no tools to validate syntax, so a localizer may cause accidental errors that can cause breakage (level of breakage depends on level of error) cannot use po editor, which most localizers know and love gettext (.po) gettext is a widely-used localization format that uses .po files.
NSPR LOG FILE
syntax filespec filespec is a filename.
... the exact syntax is platform specific.
PRInt32
syntax #include <prtypes.h> typedefdefinition print32; description may be defined as an int or a long, depending on the platform.
... for syntax details for each platform, see prtypes.h.
PRInt64
syntax #include <prtypes.h> typedef definition print64; description may be defined in several different ways, depending on the platform.
... for syntax details for each platform, see prtypes.h.
PRUint32
syntax #include <prtypes.h> typedefdefinition pruint32; description may be defined as an unsigned int or an unsigned long, depending on the platform.
... for syntax details for each platform, see prtypes.h.
PRUint64
syntax #include <prtypes.h> typedef definition pruint64; description may be defined in several different ways, depending on the platform.
... for syntax details for each platform, see prtypes.h.
PR_EXTERN
syntax #include <prtypes.h> pr_extern(type)prototype description pr_extern is used to define externally visible routines and globals.
... for syntax details for each platform, see prtypes.h.
PR_IMPLEMENT
syntax #include <prtypes.h> pr_implement(type)implementation description pr_implement is used to define implementations of externally visible routines and globals.
... for syntax details for each platform, see prtypes.h.
PR_SetLibraryPath
syntax #include <prlink.h> prstatus pr_setlibrarypath(const char *path); parameters the function has this parameter: path a pointer to a character array that contains the directory path that the application should use as a default.
... the syntax of the pathname is not defined, nor whether that pathname should be absolute or relative.
NSS Key Functions
syntax include <key.h> include <keyt.h> seckeykeydbhandle *seckey_getdefaultkeydb(void); returns the function returns a handle of type seckeykeydbhandle.
...syntax include <key.h> include <keyt.h> void seckey_destroyprivatekey(seckeyprivatekey *key); parameter this function has the following parameter: key a pointer to the private key structure to destroy.
NSS tools : cmsutil
name cmsutil — performs basic cryptograpic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
... synopsis cmsutil [options] arguments description the cmsutil command-line uses the s/mime toolkit to perform basic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
sslkey.html
syntax #include <key.h> #include <keyt.h> seckeykeydbhandle *seckey_getdefaultkeydb(void); returns the function returns a handle of type seckeykeydbhandle.
... syntax #include <key.h> #include <keyt.h> void seckey_destroyprivatekey(seckeyprivatekey *key); parameter this function has the following parameter: key a pointer to the private key structure to destroy.
NSS Tools cmsutil
using cmsutil newsgroup: mozilla.dev.tech.crypto the cmsutil command-line utility uses the s/mime toolkit to perform basic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
... syntax to run cmsutil, type the command cmsutil option [arguments] where option and arguments are combinations of the options and arguments listed in the following section.
NSS Tools crlutil
syntax to run the certificate revocation list management tool, type the command crlutil option [arguments] where options and arguments are combinations of the options and arguments listed in the following section.
... crl generation script syntax: crl generation script file has the following syntax: line with comments should have <bold>#</bold> as a first symbol of a line set "this update" or "next update" crl fields: update=yyyymmddhhmmssz nextupdate=yyyymmddhhmmssz field "next update" is optional.
NSS tools : cmsutil
MozillaProjectsNSStoolscmsutil
name cmsutil — performs basic cryptograpic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
... synopsis cmsutil [options] arguments description the cmsutil command-line uses the s/mime toolkit to perform basic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
Introduction to the JavaScript shell
this is a convenient way to quickly check for syntax errors in your program without actually running it.
...this may be useful for gaining access to syntax only available in certain versions of javascript (for example, see using javascript 1.7).
JS::SetLargeAllocationFailureCallback
syntax void js::setlargeallocationfailurecallback(jsruntime *rt, js::largeallocationfailurecallback afc, void *data); name type description rt jsruntime * the jsruntime for which to set the gc callback.
...added in spidermonkey 38 callback syntax typedef void (* js::largeallocationfailurecallback)(void *data); name type description data void * data parameter passed to js::setlargeallocationfailurecallback.
JS::SetOutOfMemoryCallback
syntax void js::setoutofmemorycallback(jsruntime *rt, js::outofmemorycallback cb, void *data); name type description rt jsruntime * the jsruntime for which to set the gc callback.
...added in spidermonkey 38 callback syntax typedef void (* outofmemorycallback)(jscontext *cx, void *data); name type description data void * data parameter passed to js::setoutofmemorycallback.
JSErrorReport
syntax jserrorreport(); properties name type description filename const char * indicates the source file or url that produced the error condition.
...this allows an attack by which a malicious website loads a sensitive file (say, a bank statement) cross-origin (using the user's cookies), and sniffs the generated syntax errors (via a window.onerror handler) for juicy morsels of its contents.
JSPropertyDescriptor
properties a descriptor is an object that can have the following key values field name description getter the get syntax binds an object property to a function that will be called when that property is looked up.
... setter the set syntax binds an object property to a function to be called when there is an attempt to set that property.
JSPropertyOp
syntax typedef bool (* jspropertyop)(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp); typedef bool (* jsstrictpropertyop)(jscontext *cx, js::handleobject obj, js::handleid id, bool strict, js::mutablehandlevalue vp); // added in spidermonkey 1.9.3 name type description cx jscontext * the context in which the property access is taking place.
...the getter callback is called each time javascript code accesses the property's value using the syntax obj.prop or obj[propname].
JS_AddArgumentFormatter
syntax jsbool js_addargumentformatter(jscontext *cx, const char *format, jsargumentformatter formatter); void js_removeargumentformatter(jscontext *cx, const char *format); name type description cx jscontext * the context in which to install the formatter.
...callback syntax jsbool (*jsargumentformatter)(jscontext *cx, const char *format, jsbool fromjs, jsval **vpp, va_list *app); name type description cx jscontext * the context in which the conversion is being performed.
JS_AddExternalStringFinalizer
syntax int js_addexternalstringfinalizer(jsstringfinalizeop finalizer); name type description finalizer jsstringfinalizeop pointer to a callback function, described below.
... callback syntax typedef void (*jsstringfinalizeop)(jscontext *cx, jsstring *str); name type description cx jscontext * pointer to a jscontext which the finalizer may use for certain very limited operations (not documented).
JS_AddFinalizeCallback
syntax bool js_addfinalizecallback(jsruntime *rt, jsfinalizecallback cb, void *data); // added in spidermonkey 38 (jsapi 32) void js_removefinalizecallback(jsruntime *rt, jsfinalizecallback cb); // added in spidermonkey 38 (jsapi 32) void js_setfinalizecallback(jsruntime *rt, jsfinalizecallback cb); // obsolete since jsapi 32 name type description rt jsruntime * the jsruntime for which to set the finalization callback.
... callback syntax typedef enum jsfinalizestatus { jsfinalize_group_start, jsfinalize_group_end, jsfinalize_collection_end } jsfinalizestatus; typedef void (* jsfinalizecallback)(jsfreeop *fop, jsfinalizestatus status, bool iscompartment, void *data); name type description fop jsfreeop * a pointer to an instance of jsfreeop.
JS_DumpNamedRoots
syntax void js_dumpnamedroots(jsruntime *rt, void (*dump)(const char *name, void *rp, void *data), void *data); name type description rt jsruntime * pointer to a jsruntime from which to dump named roots.
...in pseudocode: /* pseudocode explanation of what js_dumpnamedroots does */ void js_dumpnamedroots(jsruntime *rt, dumpfn dump, void *data) { for each (root in rt->namedroots) dump(root.name, root.address, data); } callback syntax dump is a pointer to a function provided by the application.
JS_EnumerateDiagnosticMemoryRegions
syntax void js_enumeratediagnosticmemoryregions(jsenumeratediagnosticmemorycallback callback); name type description callback jsenumeratediagnosticmemorycallback pointer to the new callback function to use.
... callback syntax typedef bool (* jsenumeratediagnosticmemorycallback)(void *ptr, size_t length); name type description ptr void * pointer to the allocated memory.
JS_InitClass
syntax jsobject * js_initclass(jscontext *cx, js::handleobject obj, js::handleobject parent_proto, const jsclass *clasp, jsnative constructor, unsigned nargs, const jspropertyspec *ps, const jsfunctionspec *fs, const jspropertyspec *static_ps, const jsfunctionspec *static_fs); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...they can also have methods and properties that are only present on the constructor; these are called "static methods" and "static properties" because they serve the same purpose and use the same syntax as static methods and fields in java.
JS_InitStandardClasses
syntax bool js_initstandardclasses(jscontext *cx, js::handle<jsobject*> obj); name type description cx jscontext * pointer to the executable script context for which to initialize js function and object classes.
...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_ParseJSON
this article covers features introduced in spidermonkey 1.8.6 parse a string using the json syntax described in ecmascript 5 and return the corresponding value.
... syntax jsbool js_parsejson(jscontext *cx, const jschar *chars, uint32 len, jsval *vp); jsbool js_parsejsonwithreviver(jscontext *cx, const jschar *chars, uint32 len, jsval reviver, jsval *vp); name type description cx jscontext * pointer to a js context.
JS_ReportErrorNumber
syntax void js_reporterrornumber(jscontext *cx, jserrorcallback errorcallback, void *userref, const unsigned errornumber, ...); void js_reporterrornumberuc(jscontext *cx, jserrorcallback errorcallback, void *userref, const unsigned errornumber, ...); bool js_reporterrorflagsandnumber(jscontext *cx, unsigned flags, jserrorcallback errorcallback, void *userref, const unsigned errornumber, ...); bool js_reporterrorflagsandnumberuc(jscontext *cx, unsigned flags, jserrorcallback errorcallback, void *userref, const unsigned errornumber, ...); void js_reporterrornumberuc...
... callback syntax typedef const jserrorformatstring * (* jserrorcallback)(void *userref, const unsigned errornumber); name type description userref void * the userref pointer that was passed to the reporterrornumber api.
JS_SET_TRACING_DETAILS
syntax js_set_tracing_details(trc, printer, arg, index) name type description trc jstracer * the tracer whose debugging hooks are to be set.
... callback syntax typedef void (*jstracenameprinter)(jstracer *trc, char *buf, size_t bufsize); name type description trc jstracer * the tracer.
JS_SetBranchCallback
syntax jsbranchcallback js_setbranchcallback(jscontext *cx, jsbranchcallback cb); name type description cx jscontext * the context to hook.
... callback syntax jsbool (*jsbranchcallback)(jscontext *cx, jsscript *script); name type description cx jscontext * pointer to a jscontext which the callback may use to call into jsapi functions.
JS_SetContextCallback
syntax void js_setcontextcallback(jsruntime *rt, jscontextcallback cxcallback, void *data); name type description rt jsruntime * pointer to a js runtime.
...added in spidermonkey 31 callback syntax typedef bool (* jscontextcallback)(jscontext *cx, unsigned contextop, void *data); name type description cx jscontext * pointer to a jscontext which the callback may use to call into jsapi functions.
JS_SetErrorReporter
syntax jserrorreporter js_geterrorreporter(jsruntime *rt); jserrorreporter js_seterrorreporter(jsruntime *rt, jserrorreporter er); name type description cx jsruntime * pointer to a js runtime whose errors should be reported via your function.
... callback syntax typedef void (* jserrorreporter)(jscontext *cx, const char *message, jserrorreport *report); name type description cx jscontext * the context in which the error happened.
JS_SetExtraGCRoots
syntax void js_setextragcroots(jsruntime *rt, jstracedataop traceop, void *data); argument meaning rt the runtime whose trace operation is to be set.
... callback syntax typedef void jstracedataop (jstracer *trc, void *data); argument meaning trc tracing data, to be passed through to js_calltracer.
JS_SetFunctionCallback
syntax void js_setfunctioncallback(jscontext *cx, jsfunctioncallback fcb); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... note that debuggers should probably use js_setcallhook in preference to this function, because it is invoked when the javascript stack is guaranteed to be in a consistent state (and therefore it is valid to inspect and modify local variables, generate stack traces, and set breakpoints.) callback syntax typedef void (* jsfunctioncallback)(const jsfunction *fun,const jsscript *scr, const jscontext *cx, int entering); name type description fun const jsfunction * the javascript function being invoked or exited.
JS_SetGCCallback
syntax void js_setgccallback(jsruntime *rt, jsgccallback cb, void *data); jsgccallback js_setgccallback(jscontext *cx, jsgccallback cb); // obsolete since jsapi 13 jsgccallback js_setgccallbackrt(jsruntime *rt, jsgccallback cb); // obsolete since jsapi 13 name type description cx jscontext * (for the old js_setgccallback) any jscontext.
... callback syntax typedef enum jsgcstatus { jsgc_begin, jsgc_end, jsgc_mark_end, // obsolete since jsapi 13 jsgc_finalize_end // obsolete since jsapi 13 } jsgcstatus; typedef void (* jsgccallback)(jsruntime *rt, jsgcstatus status, void *data); name type description cx jscontext * the context in which garbage collection is happening.
JS_SetInterruptCallback
syntax jsinterruptcallback js_setinterruptcallback(jsruntime *rt, jsinterruptcallback callback); jsinterruptcallback js_getinterruptcallback(jsruntime *rt); void js_requestinterruptcallback(jsruntime *rt); name type description rt jsruntime * the runtime.
... callback syntax bool (* jsinterruptcallback)(jscontext *cx); name type description cx jscontext * pointer to a jscontext in which this callback was installed.
JS_SetOperationCallback
syntax void js_setoperationcallback(jscontext *cx, jsoperationcallback callback); jsoperationcallback js_getoperationcallback(jscontext *cx); void js_triggeroperationcallback(jsruntime *rt); name type description cx jscontext * a context.
... callback syntax jsbool (*jsoperationcallback)(jscontext *cx); name type description cx jscontext * pointer to a jscontext in which this callback was installed.
JS_SetOptions
syntax uint32 js_setoptions(jscontext *cx, uint32 options); name type description cx jscontext * a context on which to set options.
... 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_TracerInit
syntax void js_tracerinit(jstracer *trc, jsruntime *rt, jstracecallback callback); name type description trc jstracer * the tracer to be initialized.
... callback syntax typedef void (*jstracecallback)(jstracer *trc, void *thing, uint32 kind); name type description trc jstracer * the tracer visiting obj.
An Overview of XPCOM
all of the public interfaces in xpcom are defined using the xpidl syntax.
...the section defining the weblock interface in xpidl describes the xpidl syntax in detail.
Starting WebLock
the xpidl syntax the xpidl syntax is a mix of c++ and java, and of course it's very much like the omg idl upon which it is closely based.
... interface nsisimpleenumerator; see the xpcom resources for more information about the xpidl syntax.
Index
MozillaTechXPCOMIndex
68 withjsmodulesandchrome moved to howto 69 xpcshell reference automated testing, developing mozilla, javascript, javascript:tools, tools, xpcom:language bindings, xpconnect the command-line syntax for xpcshell is: 70 xpcshell test manifest expressions qa, testing xpcshell unit tests are run by specifying them in a manifest file.
...the conditions accept a simple boolean expression syntax, described here.
Components.Constructor
syntax var func = [ new ] components.constructor(contractid [, interfacename [, initializer ] ]); parameters contractid a string containing the contract id of the component interfacename if given, nsisupports.queryinterface() will be called on each newly-created instance with the interface named by this string initializer if given, a string containing the name of a function which will be called on the newly-created instance, using the arguments provided to the created function when called description components.constructor() is a handy shortcut for creating instances of xpcom components.
...it also gives creation of xpcom objects more javascript-like syntax.
Components.utils.import
syntax components.utils.import(url [, scope]); // or, if you use a tool such as jslint which reports compiler errors for the above, components.utils["import"](url [, scope]); parameters url a string of the url of the script to be loaded.
... import throws if it encounters an error (like a syntax error) in the file it reads.
nsIExternalProtocolService
note: aprotocolscheme should not include a trailing colon, which is part of the uri syntax, not part of the scheme itself.
...note: aprotocolscheme should not include a trailing colon, which is part of the uri syntax, not part of the scheme itself (that is pass "mailto" not "mailto:").
nsIMessageListenerManager
see nsimessagelistener for details of the message syntax.
...see nsimessagelistener for details of the message syntax.
nsIWebPageDescriptor
constants display type constants constant value description display_as_source 0x0001 generates an optionally syntax-highlighted (for xml/html documents) source of the original page.
...note that if the descriptor is that of the source of another page, this keeps the source view, but uses the current syntax highlighting preference.
nsIXULTemplateBuilder
this allows the query processor to be specific to a particular kind of input data or query syntax, while the template builder remains independent of the kind of data being used.
...the condition syntax allows for common conditional handling; additional filtering may be applied by adding a custom filter to a rule with the builder's addrulefilter() method.
XPIDL
writing xpidl interface files xpidl closely resembles omg idl, with extended syntax to handle iids and additional types.
... xpidl:syntax (now up to date again) xpidl syntax (out of date) xpidl author's guide (not as out of date) explanation of idl semantics a full guide to the syntax can be found at xpidl:syntax, which is written in an abnf form.
Theme Packaging
install.rdf your install.rdf manifest will look something like this: <?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:type>4</em:type> more properties </description> </rdf> required install.rdf properties your install.rdf file must have the following properties.
... sample install.rdf file <?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>{18b64b56-d42f-428d-a88c-baa413bc413f}</em:id> <em:version>1.0</em:version> <em:type>4</em:type> <!-- target application this extension can install into, with minimum and maximum supported versions.
Add to iPhoto
so we start by calling corefoundation.cfarraycreatemutable() to create a mutable array with room for one item, specifying the address of the standard callback routines exported by core foundation using the syntax corefoundation.kcftypearraycallbacks.address().
...let's take a closer look at this syntax: var appparams = appservices.struct_lsapplicationparameters(0, 1, ref.address(), null, null, null, null); here you're calling a constructor, created for you by js-ctypes, that creates and fills out the structure, specifying the values of all of the parameters.
ArrayType
arraytype represents c arrays syntax returns a new ctype representing an array data type.
... method overview methods inherited from ctype ctype array([n]) string tosource() string tostring() arraytype cdata syntax cdata sized_arraytype(); cdata unsized_arraytype(length); sized_arraytype and unsized_arraytype are arraytype ctype.
Library
alternative syntax another use for ctypes.declare is to get non-function/non-methods from libraries.
... the syntax for this is seen in firefox codebase here: //github.com/realityripple/uxp/blob/master/js/src/ctypes/library.cpp?offset=0#271 this shows that we can also supply only two arguments to the declare function.
PointerType
syntax returns a new ctype object describing a new pointer data type.
... method overview methods inherited from ctype ctype array([n]) string tosource() string tostring() pointertype cdata syntax cdata pointertype(); pointertype is pointertype ctype.
StructType
syntax returns a ctype object describing a new structure data type.
... structtype cdata syntax cdata structtype(); structtype is structtype ctype.
Plug-in Basics - Plugins
understanding the plug-in api plug-ins and platform independence understanding the plug-in api a plug-in is a native code library whose source conforms to standard c syntax.
... the embed element has the following syntax and attributes: <embed src="location" type="mimetype" pluginspage="instrurl" pluginurl="pluginurl" align="left"|"right"|"top"|"bottom" border="borderwidth" frameborder="no" height="height" width="width" units="units" hidden="true|false" hspace="horizmargin" vspace="vertmargin" name="pluginname" palette="foreground"|"background" > ...
Streams - Plugins
the browser can create a stream for several different types of data: for the file specified in the data attribute of the object element or the src attribute of the embed element for a data file for a full-page instance the npp_newstream method has the following syntax: nperror npp_newstream(npp instance, npmimetype type, npstream *stream, npbool seekable, uint16* stype); the instance parameter refers to the plug-in instance receiving the stream; the type parameter represents the stream's mime type.
... the npn_requestread method has the following syntax: nperror npn_requestread(npstream *stream, npbyterange *rangelist); the stream parameter is the stream from which to read bytes; the rangelist parameter specifies the range of bytes in the form of a linked list of npbyterange objects, which the plug-in must allocate.
View Source - Firefox Developer Tools
syntax highlighting (toggle) applies syntax highlighting to the code.when syntax highlighting is on, view source also highlights parsing errors in red.
... xml syntax highlighting view source uses the html tokenizer when highlighting xml source.
The JavaScript input interpreter - Firefox Developer Tools
syntax highlighting the text you enter has syntax highlighting as soon as you have typed enough for the highlighter to parse it and infer the meanings of the "words".
... note: syntax highlighting is not visible in your browser if accessibility features have been enabled.
AddressErrors.languageCode - Web APIs
syntax var languageerror = addresserrors.languagecode; value if the value specified in the paymentaddress object's languagecode property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
... this validation might be as simple as ensuring the text of the string is compliant with the syntax defined in bcp-47, or as detailed as actually verifying that the specified string matches a value from a database.
CSS.supports() - Web APIs
WebAPICSSsupports
syntax css.supports(propertyname, value); css.supports(supportcondition); parameters there are two distinct sets of parameters.
... the second syntax takes one parameter matching the condition of @supports: supportcondition a domstring containing the condition to check.
CSSNumericValue.parse() - Web APIs
syntax var cssnumericvalue = cssnumericvalue.parse(csstext); parameters csstext a string containing numeric and unit parts.
... exceptions syntaxerror tbd examples the following returns a cssunitvalue object with a unit property equal to "px" and a value property equal to 42.
CSSNumericValue.to() - Web APIs
syntax var cssunitvalue = cssnumericvalue.to(unit); parameters unit the unit to which you want to convert.
... exceptions syntaxerror indicates that an invalid type was passed to the method.
CSSNumericValue.toSum() - Web APIs
syntax var cssmathsum = cssnumericvalue.tosum(units); parameters units the units to convert to.
... exceptions syntaxerror undefined typeerror indicates that an invalid type was passed to the method.
CSSStyleDeclaration.item() - Web APIs
syntax var propertyname = style.item(index); parameters index is the index of the node to be fetched.
... javascript has a special simpler syntax for obtaining an item from a nodelist by index: var propertyname = style[index]; example var style = document.getelementbyid('div1').style; var propertyname = style.item(1); // or simply style[1] - returns the second style listed specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.item()' in that specification.
CSSStyleDeclaration.setProperty() - Web APIs
syntax style.setproperty(propertyname, value, priority); parameters propertyname is a domstring representing the css property name (hyphen case) to be modified.
... if priority can be omitted, javascript has a special simpler syntax for setting a css property on a style declaration object: style.csspropertyname = 'value'; examples in this example we have three buttons, which can be pressed to dynamically alter our box paragraph's border, background color, and text color to random values (see the live example at the end of this section).
CSSStyleRule.selectorText - Web APIs
syntax string = cssrule.selectortext example // for cssrule: body { background-color: darkblue; } var stylesheet = document.stylesheets[0]; alert(stylesheet.cssrules[0].selectortext); // body notes the implementation may have stripped out insignificant whitespace while parsing the selector.
... if set to a selector string which cannot be parsed, a syntaxerror is thrown.
CSSStyleSheet.insertRule() - Web APIs
syntax stylesheet.insertrule(rule [, index]) parameters rule a domstring containing the rule to be inserted.
... if more than one rule is given in the rule parameter, the method aborts with a syntaxerror.
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.
...a syntax_err is raised if the value cannot be parsed as a css <color> value.
CanvasRenderingContext2D.font - Web APIs
this string uses the same syntax as the css font specifier.
... syntax ctx.font = value; options value a domstring parsed as css font value.
ConstantSourceNode.offset - Web APIs
so you can change the value of offset by setting the value of constantsourcenode.offset.value: myconstantsourcenode.offset.value = newvalue; syntax let offsetparameter = constantaudionode.offset; let offset = constantsourcenode.offset.value; constantsourcenode.offset.value = newvalue; value an audioparam object indicating the a-rate value returned for every sample by this node.
... to access the offset parameter's current value, access the parameter's value property, as shown in the syntax box above.
CustomElementRegistry.define() - Web APIs
syntax customelements.define(name, constructor, options); parameters name name for the new custom element.
... syntaxerror the provided name is not a valid custom element name.
CustomElementRegistry.whenDefined() - Web APIs
syntax promise<> customelements.whendefined(name); parameters name custom element name.
... exceptions exception description syntaxerror if the provided name is not a valid custom element name, the promise rejects with a syntaxerror.
DOMException - Web APIs
(legacy code value: 11 and legacy constant name: invalid_state_err) syntaxerror the string did not match the expected pattern.
... (legacy code value: 12 and legacy constant name: syntax_err) invalidmodificationerror the object cannot be modified in this way.
DataTransferItemList.DataTransferItem() - Web APIs
the datatransferitem() getter method implements support for accessing items in the datatransferitemlist using array-style syntax (that is datatransferitem[index]).
... syntax dataitem = datatransferitem[index]; parameters index the zero-based index of the item in the drag data list to return.
Document.cookie - Web APIs
WebAPIDocumentcookie
syntax read all cookies accessible from this location allcookies = document.cookie; in the code above allcookies is a string containing a semicolon-separated list of all cookies (i.e.
... the reason for the syntax of the document.cookie accessor property is due to the client-server nature of cookies, which differs from other client-client storage methods (like, for instance, localstorage): the server tells the client to store a cookie http/1.0 200 ok content-type: text/html set-cookie: cookie_name1=cookie_value1 set-cookie: cookie_name2=cookie_value2; expires=sun, 16 jul 3567 06:23:41 gmt [content of th...
DocumentFragment.querySelectorAll() - Web APIs
if the selectors specified in parameter are invalid a domexception with a syntax_err value is raised.
... syntax elementlist = documentfragment.queryselectorall(selectors); parameters selectors is a domstring containing one or more css selectors separated by commas.
Element.classList - Web APIs
WebAPIElementclassList
syntax const elementclasses = elementnodereference.classlist; returns a domtokenlist representing the contents of the element's class attribute.
... visible is set remove it, otherwise add it div.classlist.toggle("visible"); // add/remove visible, depending on test conditional, i less than 10 div.classlist.toggle("visible", i < 10 ); console.log(div.classlist.contains("foo")); // add or remove multiple classes div.classlist.add("foo", "bar", "baz"); div.classlist.remove("foo", "bar", "baz"); // add or remove multiple classes using spread syntax const cls = ["foo", "bar"]; div.classlist.add(...cls); div.classlist.remove(...cls); // replace class "foo" with class "bar" div.classlist.replace("foo", "bar"); versions of firefox before 26 do not implement the use of several arguments in the add/remove/toggle methods.
Element.closest() - Web APIs
WebAPIElementclosest
syntax var closestelement = targetelement.closest(selectors); parameters selectors is a domstring containing a selector list.
... exceptions syntaxerror is thrown if the selectors is not a valid selector list string.
Element.getElementsByClassName() - Web APIs
syntax var elements = element.getelementsbyclassname(names); parameters names a domstring containing one or more class names to match on, separated by whitespace.
... of test, which are also a descendant of the element that has the id of main: document.getelementbyid('main').getelementsbyclassname('test'); matching multiple classes to find elements whose class lists include both the red and test classes: element.getelementsbyclassname('red test'); examining the results you can use either the item() method on the returned htmlcollection or standard array syntax to examine individual elements in the collection.
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
syntax const content = element.innerhtml; element.innerhtml = htmlstring; value a domstring containing the html serialization of the element's descendants.
... exceptions syntaxerror an attempt was made to set the value of innerhtml using a string which is not properly-formed html.
Element.insertAdjacentElement() - Web APIs
syntax targetelement.insertadjacentelement(position, element); parameters position a domstring representing the position relative to the targetelement; must match (case-insensitively) one of the following strings: 'beforebegin': before the targetelement itself.
... exceptions exception explanation syntaxerror the position specified is not a recognised value.
Element.insertAdjacentText() - Web APIs
syntax element.insertadjacenttext(position, element); parameters position a domstring representing the position relative to the element; must be one of the following strings: 'beforebegin': before the element itself.
... exceptions exception explanation syntaxerror the position specified is not a recognised value.
Element.matches() - Web APIs
WebAPIElementmatches
syntax var result = element.matches(selectorstring); parameters selectorstring is a string representing the selector to test.
... exceptions syntax_err the specified selector string is invalid.
Element.outerHTML - Web APIs
WebAPIElementouterHTML
syntax var content = element.outerhtml; element.outerhtml = htmlstring; value reading the value of outerhtml returns a domstring containing an html serialization of the element and its descendants.
... exceptions syntaxerror an attempt was made to set outerhtml using an html string which is not valid.
Element.querySelector() - Web APIs
syntax element = baseelement.queryselector(selectors); parameters selectors a group of selectors to match the descendant elements of the element baseelement against; this must be valid css syntax, or a syntaxerror exception will occur.
... exceptions syntaxerror the specified selectors are invalid.
FontFace.loaded - Web APIs
WebAPIFontFaceloaded
the loaded read-only property of the fontface interface returns a promise that resolves with the current fontface object when the font specified in the object's constructor is done loading or rejects with a syntaxerror.
... syntax var apromise = fontface.loaded; value a promise that resolves with the current fontface object.
FontFaceSet.load() - Web APIs
WebAPIFontFaceSetload
syntax result = afontfaceset.load(font); result = afontfaceset.load(font, text); returns a promise of an array of fontface loaded.
... parameters font: a font specification using the css value syntax, e.g.
Gamepad.id - Web APIs
WebAPIGamepadid
the exact syntax is not strictly specified, but in firefox it will contain three pieces of information separated by dashes (-): two 4-digit hexadecimal strings containing the usb vendor and product id of the controller the name of the controller as provided by the driver.
... syntax readonly attribute domstring id; example window.addeventlistener("gamepadconnected", function() { var gp = navigator.getgamepads()[0]; gamepadinfo.innerhtml = "gamepad connected at index " + gp.index + ": " + gp.id + "."; }); value a string.
GlobalEventHandlers.onerror - Web APIs
error events are fired at various targets for different kinds of errors: when a javascript runtime error (including syntax errors and exceptions thrown within handlers) occurs, an error event using interface errorevent is fired at window and window.onerror() is invoked (as well as handlers attached by window.addeventlistener (not only capturing)).
... syntax for historical reasons, different arguments are passed to window.onerror and element.onerror handlers (as well as on error-type window.addeventlistener handlers).
HTMLFormControlsCollection.namedItem() - Web APIs
like that one, in javascript, using the array bracket syntax with a string, like collection["value"] is equivalent to collection.nameditem("value").
... syntax var item = collection.nameditem(str); var item = collection[str]; parameters str is a domstring return value item is a radionodelist , element, or null.
HTMLFormElement.elements - Web APIs
syntax nodelist = htmlformelement.elements value an htmlformcontrolscollection containing all non-image controls in the form.
... example quick syntax example in this example, we see how to obtain the list of form controls as well as how to access its members by index and by name or id.
HTMLImageElement.sizes - Web APIs
syntax let sizes = htmlimageelement.sizes; htmlimageelement.sizes = sizes; value a usvstring containing a comma-separated list of source size descriptors followed by an optional fallback size.
...see syntax in using media queries for details on how to construct a media condition.
HTMLOrForeignElement.dataset - Web APIs
accessing values attributes can be set and read by using the camelcase name (the key) like an object property of the dataset, as in element.dataset.keyname attributes can also be set and read using the bracket syntax, as in element.dataset[keyname] the in operator can be used to check whether a given attribute exists.
... syntax const dataattrmap = element.dataset value a domstringmap.
HTMLSelectElement.item() - Web APIs
in javascript, using the array bracket syntax with an unsigned long, like selectelt[index] is equivalent to selectelt.nameditem(index).
... syntax var item = collection.item(index); var item = collection[index]; parameters index is an unsigned long.
HTMLSelectElement.namedItem() - Web APIs
in javascript, using the array bracket syntax with a string, like selectelt["value"] is equivalent to selectelt.nameditem("value").
... syntax var item = collection.nameditem(str); var item = collection[str]; parameters str is a domstring.
HTMLTableElement.rows - Web APIs
syntax htmlcollectionobject = table.rows; value an htmlcollection providing a live-updating list of the htmltablerowelement objects representing all of the <tr> elements contained in the table.
... example myrows = mytable.rows; firstrow = mytable.rows[0]; lastrow = mytable.rows.item(mytable.rows.length-1); this demonstrates how you can use both array syntax (line 2) and the htmlcollection.item() method (line 3) to obtain individual rows in the table.
HTMLTimeElement.dateTime - Web APIs
the format of the string must follow one of the following html microsyntaxes: microsyntax description examples valid month string yyyy-mm 2011-11, 2013-05 valid date string yyyy-mm-dd 1887-12-01 valid yearless date string mm-dd 11-12 valid time string hh:mm hh:mm:ss hh:mm:ss.mmm 23:59 12:15:47 12:15:52.998 valid local date and time string yyyy-mm-dd hh:mm yyyy-mm-dd hh:mm:ss yyyy-mm-dd hh:mm:ss.mmm yyyy-mm-ddthh:mm yyyy-mm-ddthh:mm:ss yyyy-mm-ddthh:mm:ss.mmm 2013-12-25 11:12 1972-07-25 13:43:07 ...
...our or more ascii digits yyyy 2013, 0001 valid duration string pddthhmmss pddthhmms.xs pddthhmms.xxs pddthhmms.xxxs pthhmmss pthhmms.xs pthhmms.xxs pthhmms.xxxs ww dd hh mm ss p12dt7h12m13s p12dt7h12m13.3s p12dt7h12m13.45s p12dt7h12m13.455s pt7h12m13s pt7h12m13.2s pt7h12m13.56s pt7h12m13.999s 7d 5h 24m 13s syntax datetimestring = timeelt.datetime; timeelt.datetime = datetimestring example // assumes there is <time id="t"> element in the html var t = document.getelementbyid("t"); t.datetime = "6w 5h 34m 5s"; specifications specification status comment html living standardthe definition of 'htmltimeelement' in that specification.
IDBObjectStore.createIndex() - Web APIs
syntax var myidbindex = objectstore.createindex(indexname, keypath); var myidbindex = objectstore.createindex(indexname, keypath, objectparameters); parameters indexname the name of the index to create.
... syntaxerror occurs if the provided keypath is not a valid key path.
IntersectionObserver.rootMargin - Web APIs
the intersectionobserver interface's read-only rootmargin property is a string with syntax similar to that of the css margin property.
... syntax var marginstring = intersectionobserver.rootmargin; value a string, formatted similarly to the css margin property's value, which contains offsets for one or more sides of the root's bounding box.
Location: assign() - Web APIs
WebAPILocationassign
if the provided url is not valid, a domexception of the syntax_error type is thrown.
... syntax location.assign(url); parameters url is a domstring containing the url of the page to navigate to.
Location: replace() - Web APIs
WebAPILocationreplace
if the provided url is not valid, a domexception of the syntax_error type is thrown.
... syntax object.replace(url); parameters url is a domstring containing the url of the page to navigate to.
MediaDevices.getUserMedia() - Web APIs
syntax var promise = navigator.mediadevices.getusermedia(constraints); parameters constraints a mediastreamconstraints object specifying the types of media to request, along with any requirements for each type.
...note that this polyfill does not correct for legacy differences in constraints syntax, which means constraints won't work well across browsers.
Navigator.registerProtocolHandler() - Web APIs
syntax navigator.registerprotocolhandler(scheme, url, title); note: recently updated to navigator.registerprotocolhandler(scheme, url), but no browsers currently support this version.
... syntaxerror the %s placeholder is missing from the handler url.
NodeList.item() - Web APIs
WebAPINodeListitem
syntax nodeitem = nodelist.item(index) nodelist is a nodelist.
... alternate syntax javascript also offers an array-like bracketed syntax for obtaining an item from a nodelist by index: nodeitem = nodelist[index] example var tables = document.getelementsbytagname("table"); var firsttable = tables.item(1); // or simply tables[1] - returns the second table in the dom specifications specification status comment domthe definition of 'nodelist: item' in that specification.
performance.mark() - Web APIs
WebAPIPerformancemark
syntax performance.mark(name); arguments name a domstring representing the name of the mark.
... if the name given to this method already exists in the performancetiming interface, syntaxerror is thrown.
RTCDataChannel: error event - Web APIs
parameters", "no user data (sctp data chunk has no data)", "cookie received 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.sdplinenumber); break; case "idp-load-failure": console.error(" identity provider load failure: http error ", err.httprequeststatuscode); break; case "sctp-failure": if (err.sctpcausecode < sctpcausecodes.length) { console.error(" sctp failure: ", err.sctpcausecode); ...
...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.
RTCIceCandidate.candidate - Web APIs
syntax var candidate = rtcicecandidate.candidate; value a domstring describing the properties of the candidate, taken directly from the sdp attribute "candidate".
... the syntax of the candidate string is described in rfc 5245, section 15.1.
RTCPeerConnection.createDataChannel() - Web APIs
syntax datachannel = rtcpeerconnection.createdatachannel(label[, options]); parameters label a human-readable name for the channel.
... syntaxerror values were specified for both the maxpacketlifetime and maxretransmits options.
RTCPeerConnection.getStats() - Web APIs
syntax promise = rtcpeerconnection.getstats(selector) parameters selector optional a mediastreamtrack for which to gather statistics.
... obsolete syntax previously, getstats() used success and failure callbacks to report the results to you, instead of using a promise.
RTCPeerConnection.setConfiguration() - Web APIs
syntax rtcpeerconnection.setconfiguration(configuration); parameters configuration an rtcconfiguration object which provides the options to be set.
... syntaxerror one or more of the urls provided in the configuration.iceservers list is invalid.
SVGAnimatedPathData - Web APIs
animatedpathseglist svgpathseglist provides access to the current animated contents of the 'd' attribute in a form which matches one-for-one with svg's syntax.
... pathseglist svgpathseglist provides access to the base (i.e., static) contents of the 'd' attribute in a form which matches one-for-one with svg's syntax.
Using Service Workers - Web APIs
service worker syntax is more complex than that of appcache, but the trade off is that you can use javascript to control your appcache-implied behaviors with a fine degree of granularity, allowing you to handle this problem and many more.
... enter service workers note : we're using the es6 arrow functions syntax in the service worker implementation now let’s get on to service workers!
SpeechGrammarList.item() - Web APIs
the item getter of the speechgrammarlist interface is a standard getter — it allows individual speechgrammar objects to be retrieved from the speechgrammarlist using array syntax.
... syntax var myfirstgrammar = speechgrammarlistinstance[0]; returns a speechgrammar object.
SpeechRecognitionEvent.resultIndex - Web APIs
the speechrecognitionresultlist object is not an array, but it has a getter that allows it to be accessed by array syntax.
... syntax var myresultindex = event.resultindex; value a number.
SpeechRecognitionResult.item() - Web APIs
the item getter of the speechrecognitionresult interface is a standard getter that allows speechrecognitionalternative objects within the result to be accessed via array syntax.
... syntax var myalternative = speechrecognitionresultinstance[0]; returns a speechrecognitionalternative object.
SpeechRecognitionResultList.item() - Web APIs
the item getter of the speechrecognitionresultlist interface is a standard getter — it allows speechrecognitionresult objects in the list to be accessed via array syntax.
... syntax var myresult = speechrecognitionresultlistinstance[0]; returns a speechrecognitionresult object.
Using readable streams - Web APIs
the readablestream() constructor allows you to do this via a syntax that looks complex at first, but actually isn’t too bad.
... the generic syntax skeleton looks like this: const stream = new readablestream({ start(controller) { }, pull(controller) { }, cancel() { }, type, autoallocatechunksize }, { highwatermark, size() }); the constructor takes two objects as parameters.
SubtleCrypto.deriveKey() - Web APIs
syntax const result = crypto.subtle.derivekey( algorithm, basekey, derivedkeyalgorithm, extractable, keyusages ); parameters algorithm is an object defining the derivation algorithm to use.
... syntaxerror raised when keyusages is empty but the unwrapped key is of type secret or private.
SubtleCrypto.importKey() - Web APIs
syntax const result = crypto.subtle.importkey( format, keydata, algorithm, extractable, usages ); parameters format is a string describing the data format of the key to import.
... exceptions the promise is rejected when one of the following exceptions is encountered: syntaxerror raised when keyusages is empty but the unwrapped key is of type secret or private.
SubtleCrypto.unwrapKey() - Web APIs
syntax const result = crypto.subtle.unwrapkey( format, wrappedkey, unwrappingkey, unwrapalgo, unwrappedkeyalgo, extractable, keyusages ); parameters format is a string describing the data format of the key to unwrap.
... syntaxerror raised when keyusages is empty but the unwrapped key is of type secret or private.
WebGL2RenderingContext.uniform[1234][uif][v]() - Web APIs
see the syntax table below.
... syntax void gl.uniform1ui(location, v0); void gl.uniform2ui(location, v0, v1); void gl.uniform3ui(location, v0, v1, v2); void gl.uniform4ui(location, v0, v1, v2, v3); void gl.uniform1fv(location, data, optional srcoffset, optional srclength); void gl.uniform2fv(location, data, optional srcoffset, optional srclength); void gl.uniform3fv(location, data, optional srcoffset, optional srclength); void gl.uniform4fv(location, data, optional srcoffset, optional srclength); void gl.uniform1iv(location, data, optional srcoffset, optional srclength); void gl.uniform2iv(location, data, optional srcoffset, optional srclength); void gl.uniform3iv(location, data, optional srcoffset, optional srclength); void gl.uniform4iv(location, data, optional srcoffset, optiona...
WebGL2RenderingContext.uniformMatrix[234]x[234]fv() - Web APIs
see the syntax below.
... syntax void gl.uniformmatrix2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3x2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4x2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix2x3fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4x3fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix2x4fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3x4fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4fv(location, tran...
WebSocket() - Web APIs
syntax var awebsocket = new websocket(url [, protocols]); parameters url the url to which to connect; this should be the url to which the websocket server will respond.
... syntaxerror the url is invalid.
WebSocket.close() - Web APIs
WebAPIWebSocketclose
syntax websocket.close(); parameters code optional a numeric value indicating the status code explaining why the connection is being closed.
... syntax_err the reason string is too long or contains unpaired surrogates.
WebSocket.send() - Web APIs
WebAPIWebSocketsend
syntax websocket.send("hello server!"); parameters data the data to send to the server.
... syntax_err the data is a string that has unpaired surrogates.
Window.captureEvents() - Web APIs
syntax window.captureevents(eventtype) eventtype is a combination of the following values: event.abort, event.blur, event.click, event.change, event.dblclick, event.dragddrop, event.error, event.focus, event.keydown, event.keypress, event.keyup, event.load, event.mousedown, event.mousemove, event.mouseout, event.mouseover, event.mouseup, event.move, event.reset, event.resize, event.select, event.submit, event.unload.
... note that you can pass a list of events to this method using the following syntax: window.captureevents(event.keypress | event.keydown | event.keyup).
window.dump() - Web APIs
WebAPIWindowdump
syntax window.dump(message); dump(message); parameters message is the string message to log.
... to redirect the console output to a file, run firefox without the -console option and use the syntax to redirect stderr and stdout to a file, i.e.: firefox > console.txt 2>&1 if you would like the console messages to appear in the console you used to launch the application, you can use the gecko console redirector.
Window.localStorage - Web APIs
syntax mystorage = window.localstorage; value a storage object which can be used to access the current origin's local storage space.
... localstorage.setitem('mycat', 'tom'); the syntax for reading the localstorage item is as follows: const cat = localstorage.getitem('mycat'); the syntax for removing the localstorage item is as follows: localstorage.removeitem('mycat'); the syntax for removing all the localstorage items is as follows: localstorage.clear(); note: please refer to the using the web storage api article for a full example.
window.postMessage() - Web APIs
syntax targetwindow.postmessage(message, targetorigin, [transfer]); targetwindow a reference to the window that will receive the message.
...having verified identity, however, you still should always verify the syntax of the received message.
Window.releaseEvents() - Web APIs
syntax window.releaseevents(eventtype) eventtype is a combination of the following values: event.abort, event.blur, event.click, event.change, event.dblclick, event.dragddrop, event.error, event.focus, event.keydown, event.keypress, event.keyup, event.load, event.mousedown, event.mousemove, event.mouseout, event.mouseover, event.mouseup, event.move, event.reset, event.resize, event.select, event.submit, event.unload.
... example window.releaseevents(event.keypress) notes note that you can pass a list of events to this method using the following syntax: window.releaseevents(event.keypress | event.keydown | event.keyup).
Window.showModalDialog() - Web APIs
syntax returnval = window.showmodaldialog(uri[, arguments][, options]); returnval holds the returnvalue property as set by the document specified by uri.
... options is an optional string specifying window ornamentation for the dialog, using one or more semicolon delimited values: syntax description center: {on | off | yes | no | 1 | 0 } if on, yes, or 1, the dialog window is centered on the desktop; otherwise it's hidden.
Worklet.addModule() - Web APIs
WebAPIWorkletaddModule
syntax addpromise = worklet.addmodule(moduleurl); addpromise = worklet.addmodule(moduleurl, options); parameters moduleurl a string containing the url of a javascript file with the module to add.
... syntaxerror the specified moduleurl is invalid.
Using XMLHttpRequest - Web APIs
|*| https://www.gnu.org/licenses/gpl-3.0-standalone.html |*| |*| syntax: |*| |*| ajaxsubmit(htmlformelement); \*/ var ajaxsubmit = (function () { function ajaxsuccess () { /* console.log("ajaxsubmit - success!"); */ console.log(this.responsetext); /* you can get the serialized data through the "submitteddata" custom property: */ /* console.log(json.stringify(this.submitteddata)); */ } function submitdata (odata) { /* the ajax request...
...*/ echo ":: data received via get ::\n\n"; print_r($_get); echo "\n\n:: data received via post ::\n\n"; print_r($_post); echo "\n\n:: data received as \"raw\" (text/plain encoding) ::\n\n"; if (isset($http_raw_post_data)) { echo $http_raw_post_data; } echo "\n\n:: files received ::\n\n"; print_r($_files); the syntax to activate this script is simply: ajaxsubmit(myform); note: this framework uses the filereader api to transmit file uploads.
XMLHttpRequest() - Web APIs
syntax const request = new xmlhttprequest(); parameters none.
... non-standard firefox syntax firefox 16 added a non-standard parameter to the constructor that can enable anonymous mode (see bug 692677).
XMLSerializer.serializeToString() - Web APIs
syntax xmlstring = anxmlserializer.serializetostring(rootnode); parameters rootnode the node to use as the root of the dom tree or subtree for which to construct an xml representation.
... syntaxerror a serialization of html was requested but could not succeed due to the content not being well-formed.
Custom properties (--*): CSS variables - CSS: Cascading Style Sheets
WebCSS--*
initial valuesee proseapplies toall elementsinheritedyescomputed valueas specified with variables substitutedanimation typediscrete syntax --somekeyword: left; --somecolor: #0000ff; --somecomplexvalue: 3px 6px rgb(20, 32, 54); <declaration-value> this value matches any sequence of one or more tokens, so long as the sequence does not contain an unallowed token.
... formal syntax <declaration-value> example html <p id="firstparagraph">this paragraph should have a blue background and yellow text.</p> <p id="secondparagraph">this paragraph should have a yellow background and blue text.</p> <div id="container"> <p id="thirdparagraph">this paragraph should have a green background and yellow text.</p> </div> css :root { --first-color: #488cff; --second-color: #ffff8c; } #firstparagraph { background-color: var(--first-color); color: var(--second-color); } #secondparagraph { background-color: var(--second-color); color: var(--first-color);...
-moz-context-properties - CSS: Cascading Style Sheets
syntax /* keyword values */ -moz-context-properties: fill; -moz-context-properties: fill, stroke; /* global values */ -moz-context-properties: inherit; -moz-context-properties: initial; -moz-context-properties: unset; values fill expose the fill value set on the image to the embedded svg.
... formal definition initial valuenoneapplies toany element that can have an image applied to it, for example as a background-image, border-image, or list-style-image.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | [ fill | fill-opacity | stroke | stroke-opacity ]# examples exposing fill and stroke to an svg image in this example we have a simple svg embedded using an <img> element.
-moz-float-edge - CSS: Cascading Style Sheets
/* keyword values */ -moz-float-edge: border-box; -moz-float-edge: content-box; -moz-float-edge: margin-box; -moz-float-edge: padding-box; /* global values */ -moz-float-edge: inherit; -moz-float-edge: initial; -moz-float-edge: unset; syntax values border-box the height and width properties include the content, padding and border but not the margin.
... formal definition initial valuecontent-boxapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax border-box | content-box | margin-box | padding-box examples html <div class="box"> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> </div> css .box { display: block; height: 5px; margin: 0.5em auto 0.5em auto; color: gray; -moz-float-edge: margin-box; box-sizing: border-box; } result specifications not part of any standard.
-moz-force-broken-image-icon - CSS: Cascading Style Sheets
syntax values <integer> a value of 1 means that the broken image icon is shown even if the image has an alt attribute.
... formal definition initial value0applies toimagesinheritednocomputed valueas specifiedanimation typediscrete formal syntax <integer> examples html <img src='/broken/image/link.png' alt='broken image link'> css img { -moz-force-broken-image-icon: 1; height: 100px; width: 100px; } result screenshotlive sample note: unless the image has a specified height and width the broken image icon will not be displayed but the alt attribute will also be hidden if -moz-force-broken-image-icon is set to 1.
-moz-image-rect - CSS: Cascading Style Sheets
syntax -moz-image-rect(<uri>, top, right, bottom, left); values <url> the uri of the image from which to take the sub-image.
... the syntax for the rectangle is similar to the rect() function generating a <<shape>()> css type.
-moz-orient - CSS: Cascading Style Sheets
syntax the -moz-orient property is specified as one of the keyword values chosen from the list below.
... formal definition initial valueinlineapplies toany element; it has an effect on progress and meter, but not on <input type="range"> or other elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax inline | block | horizontal | vertical examples html <p> the following progress meter is horizontal (the default): </p> <progress max="100" value="75"></progress> <p> the following progress meter is vertical: </p> <progress class="vert" max="100" value="75"></progress> css .vert { -moz-orient: vertical; width: 16px; height: 150px; } result specifications not part of any st...
-moz-outline-radius-bottomleft - CSS: Cascading Style Sheets
syntax the value of -moz-outline-radius-bottomleft is either a css <length> or a percentage of the corresponding dimensions of the border box.
... formal definition initial value0applies toall elementsinheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valueas specifiedanimation typea length, percentage or calc(); formal syntax <outline-radius>where <outline-radius> = <length> | <percentage> examples rounding a outline since this is a firefox-only property, this example will not display the desired effect if you are viewing this in a browser other than firefox.
-moz-outline-radius-bottomright - CSS: Cascading Style Sheets
syntax the value of -moz-outline-radius-bottomright is either a css <length> or a percentage of the corresponding dimensions of the border box.
... formal definition initial value0applies toall elementsinheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valueas specifiedanimation typea length, percentage or calc(); formal syntax <outline-radius>where <outline-radius> = <length> | <percentage> examples html <p>look at this paragraph's bottom-right corner.</p> css p { margin: 5px; border: solid cyan; outline: dotted red; -moz-outline-radius-bottomright: 2em; } result the example above will not display the desired effect if you are viewing this in a browser other than firefox.
-moz-outline-radius-topleft - CSS: Cascading Style Sheets
syntax the value of -moz-outline-radius-topleft is either a css <length> or a percentage of the corresponding dimensions of the border box.
... formal definition initial value0applies toall elementsinheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valueas specifiedanimation typea length, percentage or calc(); formal syntax <outline-radius>where <outline-radius> = <length> | <percentage> examples the example below will not display the desired effect if you are viewing this in a browser other than firefox.
-moz-outline-radius-topright - CSS: Cascading Style Sheets
syntax the value of -moz-outline-radius-topright is either a css <length> or a percentage of the corresponding dimensions of the border box.
... formal definition initial value0applies toall elementsinheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valueas specifiedanimation typea length, percentage or calc(); formal syntax <outline-radius>where <outline-radius> = <length> | <percentage> examples html <p>look at this paragraph's top-right corner.</p> css p { margin: 5px; border: solid cyan; outline: dotted red; -moz-outline-radius-topright: 2em; } result the example above will not display the desired effect if you are viewing this in a browser other than firefox.
-moz-outline-radius - CSS: Cascading Style Sheets
: 25px 1em 12%; /* four values */ -moz-outline-radius: 25px 1em 12% 4mm; /* global values */ -moz-outline-radius: inherit; -moz-outline-radius: initial; -moz-outline-radius: unset; constituent properties this property is a shorthand for the following css properties: -moz-outline-radius-bottomleft -moz-outline-radius-bottomright -moz-outline-radius-topleft -moz-outline-radius-topright syntax values elliptical outlines and <percentage> values follow the syntax described in border-radius.
...z-outline-radius-bottomright: as specified-moz-outline-radius-bottomleft: as specifiedanimation typeas each of the properties of the shorthand:-moz-outline-radius-topleft: a length, percentage or calc();-moz-outline-radius-topright: a length, percentage or calc();-moz-outline-radius-bottomright: a length, percentage or calc();-moz-outline-radius-bottomleft: a length, percentage or calc(); formal syntax <outline-radius>{1,4} [ / <outline-radius>{1,4} ]?where <outline-radius> = <length> | <percentage> examples rounding an outline note: this example will not display the desired effect if you are viewing this in a browser other than firefox.
-moz-user-focus - CSS: Cascading Style Sheets
syntax values ignore the element does not accept the keyboard focus and will be skipped in the tab order.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax ignore | normal | select-after | select-before | select-menu | select-same | select-all | none examples html <input class="ignored" value="the user cannot focus on this element."> css .ignored { -moz-user-focus: ignore; } specifications not part of any standard.
-moz-user-input - CSS: Cascading Style Sheets
syntax values none the element does not respond to user input, and it does not become :active.
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | none | enabled | disabled examples disabling user input for an element input.example { /* the user will be able to select the text, but not change it.
-webkit-border-before - CSS: Cascading Style Sheets
syntax values one or more of the following, in any order: <'border-width'> see border-width <'border-style'> see border-style <'color'> see color formal definition initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: mediumborder-style: ...
...the transparent keyword maps to rgba(0,0,0,0).animation typediscrete formal syntax <'border-width'> | <'border-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-webkit-box-reflect - CSS: Cascading Style Sheets
syntax values above, below, right, left are keywords indicating in which direction the reflection is to happen.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ above | below | right | left ]?
-webkit-line-clamp - CSS: Cascading Style Sheets
syntax /* keyword value */ -webkit-line-clamp: none; /* <integer> values */ -webkit-line-clamp: 3; -webkit-line-clamp: 10; /* global values */ -webkit-line-clamp: inherit; -webkit-line-clamp: initial; -webkit-line-clamp: unset; none this value specifies that the content wonʼt be clamped.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax none | <integer> examples truncating a paragraph html <p> in this example the <code>-webkit-line-clamp</code> property is set to <code>3</code>, which means the text is clamped after three lines.
-webkit-mask-attachment - CSS: Cascading Style Sheets
/* keyword values */ -webkit-mask-attachment: scroll; -webkit-mask-attachment: fixed; -webkit-mask-attachment: local; /* multiple values */ -webkit-mask-attachment: scroll, local; -webkit-mask-attachment: fixed, local, scroll; /* global values */ -webkit-mask-attachment: inherit; -webkit-mask-attachment: initial; -webkit-mask-attachment: unset; syntax values scroll if scroll is specified, the mask image scrolls within the viewport along with the block that contains the mask image.
... formal definition initial valuescrollapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <attachment>#where <attachment> = scroll | fixed | local examples fixing a mask image to the viewport body { -webkit-mask-image: url('images/mask.png'); -webkit-mask-attachment: fixed; } specifications not part of any standard.
-webkit-mask-box-image - CSS: Cascading Style Sheets
initial value: none applies to: all elements inherited: no media: visual computed value: as specified syntax -webkit-mask-box-image: <mask-box-image> [<top> <right> <bottom> <left> <x-repeat> <y-repeat>] where: <mask-box-image> <uri> | <gradient> | none <top> <right> <bottom> <left> <length> | <percentage> <x-repeat> <y-repeat> repeat | stretch | round | space values <uri> the location of the image resource to be used as a mask image.
... formal syntax syntax not found in db!
-webkit-mask-composite - CSS: Cascading Style Sheets
syntax values clear overlapping pixels in the source mask image and the destination mask image are cleared.
... formal definition initial valuesource-overapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <composite-style>#where <composite-style> = clear | copy | source-over | source-in | source-out | source-atop | destination-over | destination-in | destination-out | destination-atop | xor examples compositing with xor .example { -webkit-mask-image: url(mask1.png), url('mask2.png'); -webkit-mask-composite: xor, source-over; } specifications not part of any standard.
-webkit-mask-position-x - CSS: Cascading Style Sheets
position-x: -1cm; /* multiple values values */ -webkit-mask-position-x: 50px, 25%, -3em; /* global values */ -webkit-mask-position-x: inherit; -webkit-mask-position-x: initial; -webkit-mask-position-x: unset; initial value0%applies toall elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete syntax values <length-percentage> a length indicating the position of the left edge of the image relative to the box's left padding edge.
... formal definition initial value0%applies toall elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete formal syntax [ <length-percentage> | left | center | right ]#where <length-percentage> = <length> | <percentage> examples horizontally positioning a mask image .exampleone { -webkit-mask-image: url(mask.png); -webkit-mask-position-x: right; } .exampletwo { -webkit-mask-image: url(mask.png); -webkit-mask-position-x: 25%; } specifications not part of any standard.
-webkit-mask-position-y - CSS: Cascading Style Sheets
position-y: -1cm; /* multiple values values */ -webkit-mask-position-y: 50px, 25%, -3em; /* global values */ -webkit-mask-position-y: inherit; -webkit-mask-position-y: initial; -webkit-mask-position-y: unset; initial value0%applies toall elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete syntax values <length-percentage> a length indicating the position of the top side of the image relative to the box's top padding edge.
... formal definition initial value0%applies toall elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete formal syntax [ <length-percentage> | top | center | bottom ]#where <length-percentage> = <length> | <percentage> examples vertically positioning a mask image .exampleone { -webkit-mask-image: url(mask.png); -webkit-mask-position-y: bottom; } .exampletwo { -webkit-mask-image: url(mask.png); -webkit-mask-position-y: 25%; } specifications not part of any standard.
-webkit-mask-repeat-x - CSS: Cascading Style Sheets
/* keyword values */ -webkit-mask-repeat-x: repeat; -webkit-mask-repeat-x: no-repeat; -webkit-mask-repeat-x: space; -webkit-mask-repeat-x: round; /* multiple values */ -webkit-mask-repeat-x: repeat, no-repeat, space; /* global values */ -webkit-mask-repeat-x: inherit; -webkit-mask-repeat-x: initial; -webkit-mask-repeat-x: unset; syntax values repeat the mask image is repeated both horizontally and vertically.
... formal definition initial valuerepeatapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax repeat | no-repeat | space | round examples using a repeating or non-repeating mask image .exampleone { -webkit-mask-image: url('mask.png'); -webkit-mask-repeat-x: repeat; } .exampletwo { -webkit-mask-image: url('mask.png'); -webkit-mask-repeat-x: no-repeat; } using multiple mask images you can specify a different <repeat-style> for each mask image, separated by commas: .examplet...
-webkit-mask-repeat-y - CSS: Cascading Style Sheets
/* keyword values */ -webkit-mask-repeat-y: repeat; -webkit-mask-repeat-y: no-repeat; -webkit-mask-repeat-y: space; -webkit-mask-repeat-y: round; /* multiple values */ -webkit-mask-repeat-y: repeat, no-repeat, space; /* global values */ -webkit-mask-repeat-y: inherit; -webkit-mask-repeat-y: initial; -webkit-mask-repeat-y: unset; syntax values repeat the mask image is repeated vertically.
... formal definition initial valuerepeatapplies toall elementsinheritednocomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete formal syntax repeat | no-repeat | space | round examples using a repeating or non-repeating mask image .exampleone { -webkit-mask-image: url('mask.png'); -webkit-mask-repeat-y: repeat; } .exampletwo { -webkit-mask-image: url('mask.png'); -webkit-mask-repeat-y: no-repeat; } using multiple mask images you can specify a different <repeat-style> for each mask image, separated by commas: .examplet...
-webkit-overflow-scrolling - CSS: Cascading Style Sheets
syntax values auto use "regular" scrolling, where the content immediately ceases to scroll when you remove your finger from the touchscreen.
... formal definition initial valueautoapplies toscrolling boxesinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | touch examples html <div class="scroll-touch"> <p> this paragraph has momentum scrolling </p> </div> <div class="scroll-auto"> <p> this paragraph does not.
-webkit-print-color-adjust - CSS: Cascading Style Sheets
/* keyword values */ -webkit-print-color-adjust: economy; -webkit-print-color-adjust: exact; /* global values */ -webkit-print-color-adjust: inherit; -webkit-print-color-adjust: initial; -webkit-print-color-adjust: unset; syntax the -webkit-print-color-adjust property is specified as one of the keyword values listed below.
... formal syntax syntax not found in db!
-webkit-tap-highlight-color - CSS: Cascading Style Sheets
-webkit-tap-highlight-color: red; -webkit-tap-highlight-color: transparent; /* for removing the highlight */ syntax values a <color value>.
... formal definition initial valueblackapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-webkit-text-fill-color - CSS: Cascading Style Sheets
/* <color> values */ -webkit-text-fill-color: red; -webkit-text-fill-color: #000000; -webkit-text-fill-color: rgb(100, 200, 0); /* global values */ -webkit-text-fill-color: inherit; -webkit-text-fill-color: initial; -webkit-text-fill-color: unset; syntax values <color> the foreground fill color of the element's text content.
... formal definition initial valuecurrentcolorapplies toall elementsinheritedyescomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-webkit-text-security - CSS: Cascading Style Sheets
syntax -webkit-text-security: circle; -webkit-text-security: disc; -webkit-text-security: square; -webkit-text-security: none; formal definition value not found in db!
... formal syntax syntax not found in db!
-webkit-text-stroke-color - CSS: Cascading Style Sheets
/* <color> values */ -webkit-text-stroke-color: red; -webkit-text-stroke-color: #e08ab4; -webkit-text-stroke-color: rgb(200, 100, 0); /* global values */ -webkit-text-stroke-color: inherit; -webkit-text-stroke-color: initial; -webkit-text-stroke-color: unset; syntax values <color> the color of the stroke.
... formal definition initial valuecurrentcolorapplies toall elementsinheritedyescomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-webkit-text-stroke-width - CSS: Cascading Style Sheets
syntax /* keyword values */ -webkit-text-stroke-width: thin; -webkit-text-stroke-width: medium; -webkit-text-stroke-width: thick; /* <length> values */ -webkit-text-stroke-width: 2px; -webkit-text-stroke-width: 0.1em; -webkit-text-stroke-width: 1mm; -webkit-text-stroke-width: 5pt; /* global values */ -webkit-text-stroke-width: inherit; -webkit-text-stroke-width: initial; -webkit-text-stroke-width: unset; values <line-width> the width of the stroke.
... formal definition initial value0applies toall elementsinheritedyescomputed valueabsolute <length>animation typediscrete formal syntax <length> examples varying stroke widths css p { margin: 0; font-size: 4em; -webkit-text-stroke-color: red; } #thin { -webkit-text-stroke-width: thin; } #medium { -webkit-text-stroke-width: 3px; } #thick { -webkit-text-stroke-width: 1.5mm; } html <p id="thin">thin stroke</p> <p id="medium">medium stroke</p> <p id="thick">thick stroke</p> results specifications specification status comment compatibility standardthe definition of '-webkit-text-stroke-width' in that specification.
-webkit-text-stroke - CSS: Cascading Style Sheets
/* width and color values */ -webkit-text-stroke: 4px navy; text-stroke: 4px navy; /* global values */ -webkit-text-stroke: inherit; -webkit-text-stroke: initial; -webkit-text-stroke: unset; text-stroke: inherit; text-stroke: initial; text-stroke: unset; constituent properties this property is a shorthand for the following css properties: -webkit-stroke-color -webkit-stroke-width syntax values <length> the width of the stroke.
...ties of the shorthand:-webkit-text-stroke-width: 0-webkit-text-stroke-color: currentcolorapplies toall elementsinheritedyescomputed valueas each of the properties of the shorthand:-webkit-text-stroke-width: absolute <length>-webkit-text-stroke-color: computed coloranimation typeas each of the properties of the shorthand:-webkit-text-stroke-width: discrete-webkit-text-stroke-color: a color formal syntax <length> | <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-webkit-touch-callout - CSS: Cascading Style Sheets
/* keyword values */ -webkit-touch-callout: default; -webkit-touch-callout: none; /* global values */ -webkit-touch-callout: initial; -webkit-touch-callout: inherit; -webkit-touch-callout: unset; syntax values default the default callout is displayed.
... formal definition initial valuedefaultapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax default | none examples turn off touch callout .example { -webkit-touch-callout: none; } specifications not part of any standard.
:dir() - CSS: Cascading Style Sheets
WebCSS:dir
syntax the :dir() pseudo-class requires one parameter, representing the text directionality you want to target.
... formal syntax :dir( ltr | rtl ) examples html <div dir="rtl"> <span>test1</span> <div dir="ltr">test2 <div dir="auto">עִבְרִית</div> </div> </div> css :dir(ltr) { background-color: yellow; } :dir(rtl) { background-color: powderblue; } result specifications specification status comment html living standardthe definition of ':dir(ltr)' in that specification.
:not() - CSS: Cascading Style Sheets
WebCSS:not
syntax the :not() pseudo-class requires a comma-separated list of one or more selectors as its argument.
... .fancy { text-shadow: 2px 2px 3px gold; } /* <p> elements that are not in the class `.fancy` */ p:not(.fancy) { color: green; } /* elements that are not <p> elements */ body :not(p) { text-decoration: underline; } /* elements that are not <div> and not <span> elements */ body :not(div):not(span) { font-weight: bold; } /* elements that are not `.crazy` or `.fancy` */ /* note that this syntax is not well supported yet.
:nth-last-child() - CSS: Cascading Style Sheets
syntax the nth-last-child pseudo-class is specified with a single argument, which represents the pattern for matching elements, counting from the end.
... formal syntax :nth-last-child( <nth> [ of <complex-selector-list> ]?
additive-symbols - CSS: Cascading Style Sheets
syntax additive-symbols: 3 "0"; additive-symbols: 3 "0", 2 "\2e\20"; additive-symbols: 3 "0", 2 url(symbol.png); when the system descriptor is cyclic, numeric, alphabetic, symbolic, or fixed, use the symbols descriptor instead of additive-symbols.
... formal definition related at-rule@counter-styleinitial valuen/acomputed valueas specified formal syntax [ <integer> && <symbol> ]#where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
fallback - CSS: Cascading Style Sheets
syntax /* keyword values */ fallback: lower-alpha; fallback: custom-gangnam-style; description if the specified fallback style is also unable to construct a representation, then its fallback style will be used.
... formal definition related at-rule@counter-styleinitial valuedecimalcomputed valueas specified formal syntax <counter-style-name>where <counter-style-name> = <custom-ident> examples specifying a fallback counter style html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style fallback-example { system: fixed; symbols: "\24b6" "\24b7" "\24b8"; fallback: upper-alpha; } .list { list-style: fallback-example; } result spe...
negative - CSS: Cascading Style Sheets
syntax /* <symbol> values */ negative: "-"; /* prepends '-' if value is negative */ negative: "(" ")"; /* surrounds value by '(' and ')' if it is negative */ values first <symbol> this symbol will be prepended to the representation when the counter is negative.
... formal definition related at-rule@counter-styleinitial value"-" hyphen-minuscomputed valueas specified formal syntax <symbol> <symbol>?where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
pad - CSS: Cascading Style Sheets
syntax pad: 3 "0"; values <integer> && <symbol> the <integer> specifies a minimum length that all counter representations must reach.
... formal definition related at-rule@counter-styleinitial value0 ""computed valueas specified formal syntax <integer> && <symbol>where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
prefix - CSS: Cascading Style Sheets
syntax /* <symbol> values */ prefix: "»"; prefix: "page "; prefix: url(bullet.png); values <symbol> specifies a <symbol> that is prepended to the marker representation.
... formal definition related at-rule@counter-styleinitial value"" (the empty string)computed valueas specified formal syntax <symbol>where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
range - CSS: Cascading Style Sheets
syntax /* keyword value */ range: auto; /* range values */ range: 2 5; range: infinite 10; range: 6 infinite; range: infinite infinite; /* multiple range values */ range: 2 5, 8 10; range: infinite 6, 10 infinite; values auto the range depends on the counter system: for cyclic, numeric, and fixed systems, the range is negative infinity to positive infinity.
... formal definition related at-rule@counter-styleinitial valueautocomputed valueas specified formal syntax [ [ <integer> | infinite ]{2} ]# | auto examples setting counter style over a range <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> <li>six</li> <li>seven</li> <li>eight</li> <li>nine</li> <li>ten</li> </ul> @counter-style range-multi-example { system: cyclic; symbols: "\25a0" "\25a1"; range: 2 4, 7 9; } .list { list-style: ...
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.
... let's talk about speech css | css tricks formal definition related at-rule@counter-styleinitial valueautocomputed valueas specified formal syntax auto | bullets | numbers | words | spell-out | <counter-style-name>where <counter-style-name> = <custom-ident> examples setting the spoken form for a counter html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style speak-as-example { system: fixed; symbols:     ; suffix: " "; speak-as: numbers; } ...
suffix - CSS: Cascading Style Sheets
syntax /* <symbol> values */ suffix: ""; suffix: ") "; suffix: url(bullet.png); values <symbol> specifies a <symbol> that is appended to the marker representation.
..." (full stop followed by a space)computed valueas specified formal syntax <symbol>where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
symbols - CSS: Cascading Style Sheets
syntax the symbols descriptor is specified as one or more <symbol>s.
... formal definition related at-rule@counter-styleinitial valuen/acomputed valueas specified formal syntax <symbol>+where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
system - CSS: Cascading Style Sheets
syntax /* keyword values */ system: cyclic; system: numeric; system: alphabetic; system: symbolic; system: additive; system: fixed; /* combined values */ system: fixed 3; system: extends decimal; this may take one of three forms: one of the keyword values cyclic, numeric, alphabetic, symbolic, additive, or fixed.
... formal definition related at-rule@counter-styleinitial valuesymboliccomputed valueas specified formal syntax cyclic | numeric | alphabetic | symbolic | additive | [ fixed <integer>?
@counter-style - CSS: Cascading Style Sheets
syntax descriptors each @counter-style is identified by a name and has a set of descriptors.
... formal syntax @counter-style <counter-style-name> { [ system: <counter-system>; ] | [ symbols: <counter-symbols>; ] | [ additive-symbols: <additive-symbols>; ] | [ negative: <negative-symbol>; ] | [ prefix: <prefix>; ] | [ suffix: <suffix>; ] | [ range: <range>; ] | [ pad: <padding>; ] | [ speak-as: <speak-as>; ] | [ fallback: <counter-style-name>; ] }where <counter-style-name> = <custom-i...
@document - CSS: Cascading Style Sheets
WebCSS@document
@document url("https://www.example.com/") { h1 { color: green; } } syntax an @document rule can specify one or more matching functions.
... formal syntax @document [ <url> | url-prefix(<string>) | domain(<string>) | media-document(<string>) | regexp(<string>) ]# { <group-rule-body> } examples specifying document for css rule @document url("http://www.w3.org/"), url-prefix("http://www.w3.org/style/"), domain("mozilla.org"), media-document("video"), regexp("https:.*") { /* css rules here apply to: ...
font-display - CSS: Cascading Style Sheets
syntax /* keyword values */ font-display: auto; font-display: block; font-display: swap; font-display: fallback; font-display: optional; values auto the font display strategy is defined by the user agent.
... formal definition related at-rule@font-faceinitial valueautocomputed valueas specified formal syntax [ auto | block | swap | fallback | optional ] examples specifying fallback font-display @font-face { font-family: examplefont; src: url(/path/to/fonts/examplefont.woff) format('woff'), url(/path/to/fonts/examplefont.eot) format('eot'); font-weight: 400; font-style: normal; font-display: fallback; } specifications specification status comment css f...
font-family - CSS: Cascading Style Sheets
syntax /* <string> values */ font-family: "font family"; font-family: 'another font family'; /* <custom-ident> value */ font-family: examplefont; values <family-name> specifies the name of the font family.
... formal definition related at-rule@font-faceinitial valuen/a (required)computed valueas specified formal syntax <family-name>where <family-name> = <string> | <custom-ident>+ examples setting the font family name @font-face { font-family: examplefont; src: url('examplefont.ttf'); } specifications specification status comment css fonts module level 3the definition of 'font-family' in that specification.
font-style - CSS: Cascading Style Sheets
syntax font-style: normal; font-style: italic; font-style: oblique; font-style: oblique 30deg; font-style: oblique 30deg 50deg; values normal selects the normal version of the font-family.
... formal definition related at-rule@font-faceinitial valuenormalcomputed valueas specified formal syntax normal | italic | oblique <angle>{0,2} examples specifying an italic font style as an example, consider the garamond font family, in its normal form, we get the following result: @font-face { font-family: garamond; src: url('garamond.ttf'); } the italicized version of this text uses the same glyphs present in the unstyled version, but they are artificially sloped by a few degrees.
font-variation-settings - CSS: Cascading Style Sheets
syntax /* use the default settings */ font-variation-settings: normal; /* set values for opentype axis names */ font-variation-settings: "xhgt" 0.7; values normal text is laid out using default settings.
... 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 defin...
src - CSS: Cascading Style Sheets
WebCSS@font-facesrc
syntax /* <url> values */ src: url(https://somewebsite.com/path/to/font.woff); /* absolute url */ src: url(path/to/font.woff); /* relative url */ src: url(path/to/font.woff) format("woff"); /* explicit format */ src: url('path/to/font.woff'); /* quoted url */ src: url(path/to/svgfont.svg#example); /* fragment identifying font */ /* <font-face-name> values */ src: local(font); /* unquoted name */ src: local(some font); /* name containing space */ src: local("font"); /* quoted name */ /* multiple items */ src: local(font), url(path/to/font.svg) format("svg"), url(path/to/...
... formal definition related at-rule@font-faceinitial valuen/a (required)computed valueas specified formal syntax [ <url> [ format( <string># ) ]?
unicode-range - CSS: Cascading Style Sheets
syntax /* <unicode-range> values */ unicode-range: u+26; /* single codepoint */ unicode-range: u+0-7f; unicode-range: u+0025-00ff; /* codepoint range */ unicode-range: u+4??; /* wildcard range */ unicode-range: u+0025-00ff, u+4??; /* multiple values */ values single codepoint a single unicode character code point, for example u+26.
... formal definition related at-rule@font-faceinitial valueu+0-10ffffcomputed valueas specified formal syntax <unicode-range># examples using a different font for a single character in this example we create a simple html containing a single <div> element, including an ampersand, that we want to style with a different font.
@font-face - CSS: Cascading Style Sheets
syntax @font-face { font-family: "open sans"; src: url("/fonts/opensans-regular-webfont.woff2") format("woff2"), url("/fonts/opensans-regular-webfont.woff") format("woff"); } descriptors font-display determines how a font face is displayed based on whether and when it is downloaded and ready to use.
...for example, the following will not work: .classname { @font-face { font-family: myhelvetica; src: local("helvetica neue bold"), local("helveticaneue-bold"), url(mgopenmodernabold.ttf); font-weight: bold; } } formal syntax @font-face { [ font-family: <family-name>; ] | [ src: <src>; ] | [ unicode-range: <unicode-range>; ] | [ font-variant: <font-variant>; ] | [ font-feature-settings: <font-feature-settings>; ] | [ font-variation-settings: <font-variation-settings>; ] | [ font-stretch: <font-stretch>; ] | [ font-weight: <font-weight>; ] | [ font-style: <font-style>; ] }where <family-name> = <strin...
@font-feature-values - CSS: Cascading Style Sheets
syntax feature value blocks @swash specifies a feature name that will work with the swash() functional notation of font-variant-alternates.
... formal syntax @font-feature-values <family-name># { <feature-value-block-list> }where <family-name> = <string> | <custom-ident>+<feature-value-block-list> = <feature-value-block>+where <feature-value-block> = <feature-type> '{' <feature-value-declaration-list> '}'where <feature-type> = @stylistic | @historical-forms | @styleset | @character-variant | @swash | @ornaments | @annotation<feature-value-declarati...
-ms-high-contrast - CSS: Cascading Style Sheets
syntax the -ms-high-contrast media feature is specified as one of the following values.
... formal syntax syntax not found in db!
@namespace - CSS: Cascading Style Sheets
syntax /* default namespace */ @namespace url(xml-namespace-url); @namespace "xml-namespace-url"; /* prefixed namespace */ @namespace prefix url(xml-namespace-url); @namespace prefix "xml-namespace-url"; description the defined namespaces can be used to restrict the universal, type, and attribute selectors to only select elements within that namespace.
... formal syntax @namespace <namespace-prefix>?
bleed - CSS: Cascading Style Sheets
WebCSS@pagebleed
syntax /* keyword values */ bleed: auto; /* <length> values */ bleed: 8pt; bleed: 1cm; values auto computes to 6pt if the value of marks is crop.
... formal definition related at-rule@pageinitial valueautocomputed valueas specified formal syntax auto | <length> examples setting a page bleed of 1cm @page { bleed: 1cm; } specifications specification status comment css paged media module level 3the definition of 'bleed' in that specification.
marks - CSS: Cascading Style Sheets
WebCSS@pagemarks
syntax /* keyword values */ marks: none; marks: crop; marks: cross; marks: crop cross; values crop crop marks will be displayed.
... formal definition related at-rule@pageinitial valuenonecomputed valueas specified formal syntax none | [ crop | cross ] examples adding crop and cross marks @page { marks: crop cross; } specifications specification status comment css paged media module level 3the definition of 'marks' in that specification.
size - CSS: Cascading Style Sheets
WebCSS@pagesize
syntax /* keyword values for scalable size */ size: auto; size: portrait; size: landscape; /* <length> values */ /* 1 value: height = width */ size: 6in; /* 2 values: width then height */ size: 4in 6in; /* keyword values for absolute size */ size: a4; size: b5; size: jis-b4; size: letter; /* mixing size and orientation */ size: a4 portrait; values auto the user agent decides the size of the page.
... formal definition related at-rule@pageinitial valueautocomputed valueas specified, but with relative lengths converted into absolute lengths formal syntax <length>{1,2} | auto | [ <page-size> | [ portrait | landscape ] ] examples specifying size and orientation @page { size: 4in 6in landscape; } nesting inside a @media rule @media print { @page { size: 50mm 150mm; } } specifications specification status comment css paged media module level 3the definition of 'size' in that specification.
@page - CSS: Cascading Style Sheets
WebCSS@page
syntax @page { margin: 1cm; } @page :first { margin: 2cm; } descriptors size specifies the target size and orientation of the page box’s containing block.
... formal syntax @page <page-selector-list> { <page-body> }where <page-selector-list> = [ <page-selector># ]?<page-body> = <declaration>?
height - CSS: Cascading Style Sheets
WebCSS@viewportheight
syntax /* one value */ height: auto; height: 320px; height: 15em; /* two values */ height: 320px 200px; values auto the used value is calculated from the other css descriptors' values.
...if the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the percentage value is treated as none.computed valueas each of the properties of the shorthand:min-height: the percentage as specified or the absolute lengthmax-height: the percentage as specified or the absolute length or none formal syntax <viewport-length>{1,2}where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting minimum and maximum height @viewport { height: 500px; } specifications specification status comment css device adaptationthe definition of '"height" descriptor' in that specification.
max-height - CSS: Cascading Style Sheets
syntax /* keyword value */ max-height: auto; /* <length> values */ max-height: 400px; max-height: 50em; max-height: 20cm; /* <percentage> value */ max-height: 75%; values auto the used value is calculated from the other css descriptors' values.
... formal definition related at-rule@viewportinitial valueautopercentagesrefer to the height of the initial viewportcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport max height in pixels @viewport { max-height: 600px; } specifications specification status comment css device adaptationthe definition of '"max-height" descriptor' in that specification.
max-width - CSS: Cascading Style Sheets
syntax /* keyword value */ max-width: auto; /* <length> values */ max-width: 600px; max-width: 80em; max-width: 15cm; /* <percentage> value */ max-width: 75%; values auto the used value is calculated from the other css descriptors' values.
... formal definition related at-rule@viewportinitial valueautopercentagesrefer to the width of the initial viewportcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport max width in pixels @viewport { max-width: 600px; } specifications specification status comment css device adaptationthe definition of '"max-width" descriptor' in that specification.
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.
... 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-height - CSS: Cascading Style Sheets
syntax /* keyword value */ min-height: auto; /* <length> values */ min-height: 120px; min-height: 20em; min-height: 10cm; /* <percentage> value */ min-height: 25%; values auto the used value is calculated from the other css descriptors' values.
... formal definition related at-rule@viewportinitial valueautopercentagesrefer to the height of the initial viewportcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport min height in pixels @viewport { min-height: 200px; } specifications specification status comment css device adaptationthe definition of '"min-height" descriptor' in that specification.
min-width - CSS: Cascading Style Sheets
syntax /* keyword value */ min-width: auto; /* <length> values */ min-width: 320px; min-width: 40em; min-width: 5cm; /* <percentage> value */ min-width: 25%; values auto the used value is calculated from the other css descriptors' values.
... formal definition related at-rule@viewportinitial valueautopercentagesrefer to the width of the initial viewportcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport min width in pixels @viewport { min-width: 200px; } specifications specification status comment css device adaptationthe definition of '"min-width" 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.
... 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.
orientation - CSS: Cascading Style Sheets
syntax values auto the user agent will set the document's orientation automatically, typically based on the device's orientation as determined by an accelerometer (if the device has such a hardware sensor), although there is often a user-controlled, os-level "lock orientation" setting that will trump the accelerometer reading.
... formal definition related at-rule@viewportinitial valueautopercentagesrefer to the size of bounding boxcomputed valueas specified formal syntax auto | portrait | landscape examples setting viewport orientation @viewport { orientation: landscape; } specifications specification status comment css device adaptationthe definition of '"orientation" descriptor' in that specification.
user-zoom - CSS: Cascading Style Sheets
/* keyword values */ user-zoom: zoom; user-zoom: fixed; syntax values zoom the user can zoom in or out.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | understanding wcag 2.0 formal definition related at-rule@viewportinitial valuezoompercentagesrefer to the size of bounding boxcomputed valueas specified formal syntax zoom | fixed examples disabling user zoom @viewport { user-zoom: fixed; } specifications specification status comment css device adaptationthe definition of '"user-zoom" descriptor' in that specification.
viewport-fit - CSS: Cascading Style Sheets
syntax /* keyword values */ viewport-fit: auto; viewport-fit: contain; viewport-fit: cover; values auto this value doesn’t affect the initial layout viewport, and the whole web page is viewable.
... formal definition related at-rule@viewportinitial valueautocomputed valueas specified formal syntax auto | contain | cover examples scaling viewport to fit device display @viewport { viewport-fit: cover; } specifications specification status comment css round display level 1the definition of '"viewport-fit" descriptor' in that specification.
width - CSS: Cascading Style Sheets
WebCSS@viewportwidth
syntax /* an example with one viewport value: */ @viewport { width: 320px; } /* an example with two viewport values: */ @viewport { width: 320px, 120px; } values auto the used value is calculated from the other css descriptors' values.
...the shorthand:min-width: automax-width: nonepercentagesas each of the properties of the shorthand:min-width: refer to the width of the containing blockmax-width: refer to the width of the containing blockcomputed valueas each of the properties of the shorthand:min-width: the percentage as specified or the absolute lengthmax-width: the percentage as specified or the absolute length or none formal syntax <viewport-length>{1,2}where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting minimum and maximum width @viewport { width: 500px; } specifications specification status comment css device adaptationthe definition of '"min-width" descriptor' in that specification.
zoom - CSS: Cascading Style Sheets
WebCSS@viewportzoom
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.
... 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.
@viewport - CSS: Cascading Style Sheets
WebCSS@viewport
@viewport { width: 100vw; /*sets the width of the actual viewport to the device width*/ } note: the use of <meta name="viewport"> tag overrides @viewport syntax the at-rule contains a set of nested descriptors in a css block that is delimited by curly braces.
... formal syntax @viewport { <group-rule-body> } examples setting viewport size, zoom, and orientation @viewport { min-width: 640px; max-width: 800px; } @viewport { zoom: 0.75; min-zoom: 0.5; max-zoom: 0.9; } @viewport { orientation: landscape; } specifications specification status comment css round display level 1the definition of '@viewport' in that specificatio...
Detecting CSS animation support - CSS: Cascading Style Sheets
animating using the correct syntax for different browsers now that you know if css animation is supported or not, we can animate.
...however, adding keyframes is trickier, since they're not defined using traditional css syntax (which makes them more flexible, but harder to define from script).
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
there was an update to the spec that updated the syntax to display: flexbox — this was again vendor-prefixed.
...the following feature query would include uc browser, which supports feature queries and old flexbox syntax, prefixed: @supports (display: flex) or (display: -webkit-box) { // code for supporting browsers } for more information about using feature queries see using feature queries in css on the mozilla hacks blog.
Cross-browser Flexbox mixins - CSS: Cascading Style Sheets
this set uses: fallbacks using 2009 'box' syntax (ff and older webkit) and prefixed syntaxes (ie10, webkit browsers without flex wrapping) final standards syntax (ff, safari, chrome, ie11+, edge, opera) this was inspired by: http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/ with help from: http://w3.org/tr/css3-flexbox/ http://the-echoplex.net/flexyboxes/ http://msdn.microsoft.com/en-us/library/ie/hh772069(v=vs.85).aspx http://css-tricks.com/using-flexbox/ a complete guide to flexbox | css-tricks visual guide to css3 flexbox: flexbox playground | note: mixins are not currently supported natively in browsers.
... note: space-* values not supported in older syntaxes.
Grid template areas - CSS: Cascading Style Sheets
you can use this syntax in the exact same way as the grid-template shorthand, just be aware than when doing so you will reset the other values set by the property.
...take some time to build some common layout patterns using grid, while there are lots of new terms to learn, the syntax is relatively straightforward.
Using CSS gradients - CSS: Cascading Style Sheets
the conic-gradient syntax is similar to the radial-gradient syntax, but the color-stops are placed around a gradient arc, the circumference of a circle, rather than on the gradient line emerging from the center of the gradient, and the color-stops are percentages or degrees: absolute lengths are not valid.
...the second background property declaration using the multiple position color stop syntax: <div class="plaid-gradient"></div> div { width: 200px; height: 200px; } .plaid-gradient { background: repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(255, 127, 0, 0.25) 50px, rgba(255, 127, 0, 0.25) 56px, transparent 56px, transparent 63px, rgba(255, 127, 0, 0.25) 63px, rgba(255, 127, 0, 0.25) 69px, transparent 69px, transpare...
Using Media Queries for Accessibility - CSS: Cascading Style Sheets
syntax no-preference indicates that the user has made no preference known to the system.
... syntax the -ms-high-contrast media feature is specified as one of the following values.
Pseudo-classes - CSS: Cascading Style Sheets
syntax selector:pseudo-class { property: value; } like regular classes, you can chain together as many pseudo-classes as you want in a selector.
... defined the syntax of :enabled, :disabled, :checked, and :indeterminate, but without the associated semantic meaning.
Pseudo-elements - CSS: Cascading Style Sheets
syntax selector::pseudo-element { property: value; } you can use only one pseudo-element in a selector.
...however, since this distinction was not present in older versions of the w3c spec, most browsers support both syntaxes for the original pseudo-elements.
WebKit CSS extensions - CSS: Cascading Style Sheets
ine -webkit-text-decoration-skip -webkit-text-decorations-in-effect -webkit-text-fill-color -webkit-text-security -webkit-text-stroke-color -webkit-text-stroke-width -webkit-text-stroke -webkit-text-zoom -webkit-transform-origin-x -webkit-transform-origin-y -webkit-transform-origin-z u -webkit-user-drag -webkit-user-modify * a few are on the standards, unprefixed track ** new syntax has been standardized.
...old prefixed syntax is still supported in some browsers.
align-content - CSS: Cascading Style Sheets
syntax /* basic positional alignment */ /* align-content does not take left and right values */ align-content: center; /* pack items around the center */ align-content: start; /* pack items from the start */ align-content: end; /* pack items from the end */ align-content: flex-start; /* pack flex items from the start */ align-content: flex-end; /* pack flex items from the end */ /* n...
... formal definition initial valuenormalapplies tomulti-line flex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | <baseline-position> | <content-distribution> | <overflow-position>?
all - CSS: Cascading Style Sheets
WebCSSall
syntax /* global values */ all: initial; all: inherit; all: unset; /* css cascading and inheritance level 4 */ all: revert; the all property is specified as one of the css global keyword values.
... formal definition initial valuethere is no practical initial value for it.applies toall elementsinheritednocomputed valueas the specified value applies to each property this is a shorthand for.animation typeas each of the properties of the shorthand (all properties but unicode-bidi and direction) formal syntax initial | inherit | unset | revert examples html <blockquote id="quote"> lorem ipsum dolor sit amet, consectetur adipiscing elit.
animation-delay - CSS: Cascading Style Sheets
syntax /* single animation */ animation-delay: 3s; animation-delay: 0s; animation-delay: -1500ms; /* multiple animations */ animation-delay: 2.1s, 480ms; values <time> the time offset, from the moment at which the animation is applied to the element, at which the animation should begin.
... formal definition initial value0sapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples see css animations for examples.
animation-direction - CSS: Cascading Style Sheets
syntax /* single animation */ animation-direction: normal; animation-direction: reverse; animation-direction: alternate; animation-direction: alternate-reverse; /* multiple animations */ animation-direction: normal, reverse; animation-direction: alternate, reverse, normal; /* global values */ animation-direction: inherit; animation-direction: initial; animation-direction: unset; values normal t...
... formal definition initial valuenormalapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <single-animation-direction>#where <single-animation-direction> = normal | reverse | alternate | alternate-reverse examples see css animations for examples.
animation-duration - CSS: Cascading Style Sheets
syntax /* single animation */ animation-duration: 6s; animation-duration: 120ms; /* multiple animations */ animation-duration: 1.64s, 15.22s; animation-duration: 10s, 35s, 230ms; values <time> the time that an animation takes to complete one cycle.
... formal definition initial value0sapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples see css animations for examples.
animation-fill-mode - CSS: Cascading Style Sheets
syntax /* single animation */ animation-fill-mode: none; animation-fill-mode: forwards; animation-fill-mode: backwards; animation-fill-mode: both; /* multiple animations */ animation-fill-mode: none, backwards; animation-fill-mode: both, forwards, none; values none the animation will not apply any styles to the target when it's not executing.
... formal definition initial valuenoneapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <single-animation-fill-mode>#where <single-animation-fill-mode> = none | forwards | backwards | both examples you can see the effect of animation-fill-mode in the following example.
animation-iteration-count - CSS: Cascading Style Sheets
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.
... 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.
animation-name - CSS: Cascading Style Sheets
syntax /* single animation */ animation-name: none; animation-name: test_05; animation-name: -specific; animation-name: sliding-vertically; /* multiple animations */ animation-name: test1, animation4; animation-name: none, -moz-specific, sliding; /* global values */ animation-name: initial animation-name: inherit animation-name: unset values none a special keyword denoting no keyframes.
... formal definition initial valuenoneapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ none | <keyframes-name> ]#where <keyframes-name> = <custom-ident> | <string> examples see css animations for examples.
animation-play-state - CSS: Cascading Style Sheets
syntax /* single animation */ animation-play-state: running; animation-play-state: paused; /* multiple animations */ animation-play-state: paused, running, running; /* global values */ animation-play-state: inherit; animation-play-state: initial; animation-play-state: unset; values running the animation is currently playing.
... formal definition initial valuerunningapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <single-animation-play-state>#where <single-animation-play-state> = running | paused examples see css animations for examples.
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
syntax /* css basic user interface module level 4 values */ appearance: none; appearance: auto; appearance: menulist-button; appearance: textfield; /* "compat-auto" values, which have the same effect as 'auto' */ appearance: button; appearance: searchfield; appearance: textarea; appearance: push-button; appearance: slider-horizontal; appearance: checkbox; appearance: radio; appearance: square-button; ...
... formal definition initial valueautoapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | auto | button | textfield | menulist-button | <compat-auto>where <compat-auto> = searchfield | textarea | push-button | slider-horizontal | checkbox | radio | square-button | menulist | listbox | meter | progress-bar examples the following would make an element look like a menulist button: .exampleone { appearance: menulist-button; } see also this jsfiddle for an example showing ho...
aspect-ratio - CSS: Cascading Style Sheets
syntax aspect-ratio: 1 / 1; /* global values */ aspect-ratio: inherit; aspect-ratio: initial; aspect-ratio: unset; values <auto> replaced elements with an intrinsic aspect ratio use that aspect ratio, otherwise the box has no preferred aspect ratio.
... formal definition initial valueautoapplies toall elements except inline boxes and internal ruby or table boxesinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | <ratio> examples mapping width and height to aspect-ratio firefox has added an internal aspect-ratio property (in version 69 onwards) that applies to replaced elements and other related elements that accept width and height attributes.
attr() - CSS: Cascading Style Sheets
WebCSSattr
/* 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.
... formal syntax attr( <attr-name> <type-or-unit>?
backdrop-filter - CSS: Cascading Style Sheets
x 4px 10px blue); backdrop-filter: grayscale(30%); backdrop-filter: hue-rotate(120deg); backdrop-filter: invert(70%); backdrop-filter: opacity(20%); backdrop-filter: sepia(90%); backdrop-filter: saturate(80%); /* multiple filters */ backdrop-filter: url(filters.svg#filter) blur(4px) saturate(150%); /* global values */ backdrop-filter: inherit; backdrop-filter: initial; backdrop-filter: unset; syntax values none no filter is applied to the backdrop.
... formal definition initial valuenoneapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typea filter function list formal syntax none | <filter-function-list>where <filter-function-list> = [ <filter-function> | <url> ]+where <filter-function> = <blur()> | <brightness()> | <contrast()> | <drop-shadow()> | <grayscale()> | <hue-rotate()> | <invert()> | <opacity()> | <saturate()> | <sepia()>where <blur()> = blur( <length> )<brightness()> = brightness( <number-percentage> )<contrast()> = contrast( [ <number-percentage> ] )<drop-shadow()> = drop-shadow( <length>{2...
backface-visibility - CSS: Cascading Style Sheets
(this property has no effect on 2d transforms, which have no perspective.) syntax /* keyword values */ backface-visibility: visible; backface-visibility: hidden; /* global values */ backface-visibility: inherit; backface-visibility: initial; backface-visibility: unset; the backface-visibility property is specified as one of the keywords listed below.
... formal definition initial valuevisibleapplies totransformable elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax visible | hidden examples cube with transparent and opaque faces this example shows a cube with transparent faces, and one with opaque faces.
background-attachment - CSS: Cascading Style Sheets
syntax /* keyword values */ background-attachment: scroll; background-attachment: fixed; background-attachment: local; /* global values */ background-attachment: inherit; background-attachment: initial; background-attachment: unset; the background-attachment property is specified as one of the keyword values from the list below.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <attachment>#where <attachment> = scroll | fixed | local examples simple example html <p> there were doors all round the hall, but they were all locked; and when alice had been all the way down one side and up the other, trying every door, she walked sadly down the middle, wondering how she was ever to get out again.
background-blend-mode - CSS: Cascading Style Sheets
syntax /* one value */ background-blend-mode: normal; /* two values, one per background */ background-blend-mode: darken, luminosity; /* global values */ background-blend-mode: initial; background-blend-mode: inherit; background-blend-mode: unset; values <blend-mode> the blending mode to be applied.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <blend-mode>#where <blend-mode> = normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity examples <div id="div"></div> <select id="select"> <option>normal</option> <option>multiply</option> <option selected>screen</option> <option>overlay</option> <option>darken</option> <option>lighten</option> <option>color-dodge</...
background-clip - CSS: Cascading Style Sheets
syntax /* keyword values */ background-clip: border-box; background-clip: padding-box; background-clip: content-box; background-clip: text; /* global values */ background-clip: inherit; background-clip: initial; background-clip: unset; values border-box the background extends to the outside edge of the border (but underneath the border in z-ordering).
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <box>#where <box> = border-box | padding-box | content-box examples html <p class="border-box">the background extends behind the border.</p> <p class="padding-box">the background extends to the inside edge of the border.</p> <p class="content-box">the background extends only to the edge of the content box.</p> <p class="text">the background is clipped to the foreground text.</p> css p { ...
background-color - CSS: Cascading Style Sheets
syntax /* keyword values */ background-color: red; background-color: indigo; /* hexadecimal value */ background-color: #bbff00; /* fully opaque */ background-color: #bf0; /* fully opaque shorthand */ background-color: #11ffee00; /* fully transparent */ background-color: #1fe0; /* fully transparent shorthand */ background-color: #11ffeeff; /* fully opaque */ background-color: #1fef; /* fully opaque shorthand */ /* rgb value */ background-color: rgb(255, 255, 128); /...
...it also applies to ::first-letter and ::first-line.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
background-image - CSS: Cascading Style Sheets
syntax each background image is specified either as the keyword none or as an <image> value.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specified, but with <url> values made absoluteanimation typediscrete formal syntax <bg-image>#where <bg-image> = none | <image>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
background-origin - CSS: Cascading Style Sheets
syntax /* keyword values */ background-origin: border-box; background-origin: padding-box; background-origin: content-box; /* global values */ background-origin: inherit; background-origin: initial; background-origin: unset; the background-origin property is specified as one of the keyword values listed below.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <box>#where <box> = border-box | padding-box | content-box examples setting background origins .example { border: 10px double; padding: 10px; background: url('image.jpg'); background-position: center left; background-origin: content-box; } #example2 { border: 4px solid black; padding: 10px; background: url('image.gif'); background-repeat: no-repeat; background-origin: bo...
background-size - CSS: Cascading Style Sheets
syntax /* keyword values */ background-size: cover; background-size: contain; /* one-value syntax */ /* the width of the image (height becomes 'auto') */ background-size: 50%; background-size: 3.2em; background-size: 12px; background-size: auto; /* two-value syntax */ /* first value: width of the image, second value: height */ background-size: 50% auto; background-size: 3em 25%; background-size: auto...
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrelative to the background positioning areacomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typerepeatable list of simple list of length, percentage, or calc formal syntax <bg-size>#where <bg-size> = [ <length-percentage> | auto ]{1,2} | cover | containwhere <length-percentage> = <length> | <percentage> examples please see scaling background images for examples.
border-block-color - CSS: Cascading Style Sheets
syntax values <'color'> the color of the border.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typediscrete formal syntax <'border-top-color'>{1,2} examples border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-block-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-color' in that specification.
border-block-end-color - CSS: Cascading Style Sheets
syntax border-block-end-color: yellow; border-block-end-color: #f5f6f7; related properties are border-block-start-color, border-inline-start-color, and border-inline-end-color, which define the other border colors of the element.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-block-end-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-end-color' in that specification.
border-block-end-style - CSS: Cascading Style Sheets
syntax /* <'border-style'> values */ border-block-end-style: dashed; border-block-end-style: dotted; border-block-end-style: groove; related properties are border-block-start-style, border-inline-start-style, and border-inline-end-style, which define the other border styles of the element.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples dashed border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-block-end-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-end-style' in that specification.
border-block-end-width - CSS: Cascading Style Sheets
syntax /* <'border-width'> values */ border-block-end-width: 5px; border-block-end-width: thick; related properties are border-block-start-width, border-inline-start-width, and border-inline-end-width, which define the other border widths of the element.
... formal definition initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length formal syntax <'border-top-width'> examples border width with veritcal text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-block-end-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-end-width' in that specification.
border-block-end - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-block-end-color border-block-end-style border-block-end-width syntax border-block-end: 1px; border-block-end: 2px dotted; border-block-end: medium dashed blue; border-block-end can be used to set the values for one or more of border-block-end-width, border-block-end-style, and border-block-end-color.
...ntcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typeas each of the properties of the shorthand:border-block-end-color: a colorborder-block-end-style: discreteborder-block-end-width: a length formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-block-start-color - CSS: Cascading Style Sheets
syntax border-block-start-color: blue; border-block-start-color: #4c5d21; related properties are border-block-end-color, border-inline-start-color, and border-inline-end-color, which define the other border colors of the element.
... values <'color'> see border-color formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-block-start-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-start-color' in that specification.
border-block-start-style - CSS: Cascading Style Sheets
syntax /* <'border-style'> values */ border-block-start-style: dashed; border-block-start-style: dotted; border-block-start-style: groove; related properties are border-block-end-style, border-inline-start-style, and border-inline-end-style, which define the other border styles of the element.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples dashed border wtih vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-block-start-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-start-style' in that specification.
border-block-start-width - CSS: Cascading Style Sheets
syntax /* <'border-width'> values */ border-block-start-width: 5px; border-block-start-width: thick; related properties are border-block-end-width, border-inline-start-width, and border-inline-end-width, which define the other border widths of the element.
... formal definition initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length formal syntax <'border-top-width'> examples border width with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-block-start-width: 5px; } results specifications specification status comment css l...
border-block-start - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-block-start-color border-block-start-style border-block-start-width syntax border-block-start: 1px; border-block-start: 2px dotted; border-block-start: medium dashed blue; border-block-start can be used to set the values for one or more of border-block-start-width, border-block-start-style, and border-block-start-color.
... or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style: as specifiedborder-right-style: as specifiedborder-top-style: as specifiedborder-block-start-color: computed coloranimation typeas each of the properties of the shorthand:border-block-start-color: a colorborder-block-start-style: discreteborder-block-start-width: a length formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-block-style - CSS: Cascading Style Sheets
syntax values <'border-style'> the line style of the border.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples dashed border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-block-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-style' in that specification.
border-block-width - CSS: Cascading Style Sheets
syntax values <'border-width'> the width of the border.
... formal definition initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typediscrete formal syntax <'border-top-width'> examples border width with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-block-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-width' in that specification.
border-block - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-block-color border-block-style border-block-width syntax values the border-block is specified with one or more of the following, in any order: <'border-width'> the width of the border.
...ion initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typediscrete formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-bottom-color - CSS: Cascading Style Sheets
syntax /* <color> values */ border-bottom-color: red; border-bottom-color: #ffbb00; border-bottom-color: rgb(255, 0, 0); border-bottom-color: hsla(100%, 50%, 25%, 0.75); border-bottom-color: currentcolor; border-bottom-color: transparent; /* global values */ border-bottom-color: inherit; border-bottom-color: initial; border-bottom-color: unset; the border-bottom-color property is specified as a single v...
...it also applies to ::first-letter.inheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples a simple div with a border html <div class="mybox"> <p>this is a box with a border around it.
border-bottom-left-radius - CSS: Cascading Style Sheets
syntax /* the corner is a circle */ /* border-bottom-left-radius: radius */ border-bottom-left-radius: 3px; /* percentage values */ /* circle if box is a square or ellipse if box is a rectangle */ border-bottom-left-radius: 20%; /* same as above: 20% of horizontal(width) and vertical(height) */ border-bottom-left-radius: 20% 20%; /* 20% of horizontal(width) and 10% of vertical(height) */ border-bot...
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples live example code .
border-bottom-right-radius - CSS: Cascading Style Sheets
syntax /* the corner is a circle */ /* border-bottom-right-radius: radius */ border-bottom-right-radius: 3px; /* percentage values */ border-bottom-right-radius: 20%; /* corner of a circle if box is a square or else corner of a rectangle */ border-bottom-right-radius: 20% 20%; /* same as above */ /* 20% of horizontal(width) and vertical(height) */ border-bottom-right-radius: 20% 10%; /* 20% of horizon...
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples live example code .
border-bottom-style - CSS: Cascading Style Sheets
syntax /* keyword values */ border-bottom-style: none; border-bottom-style: hidden; border-bottom-style: dotted; border-bottom-style: dashed; border-bottom-style: solid; border-bottom-style: double; border-bottom-style: groove; border-bottom-style: ridge; border-bottom-style: inset; border-bottom-style: outset; /* global values */ border-bottom-style: inherit; border-bottom-style: initial; border-bott...
...it also applies to ::first-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <line-style>where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset examples demonstrating all border styles html <table> <tr> <td class="b1">none</td> <td class="b2">hidden</td> <td class="b3">dotted</td> <td class="b4">dashed</td> </tr> <tr> <td class="b5">solid</td> <td class="b6">double</td> <td class="b7">groove</td> <td class="b8">ridge</td> </tr> <tr> <td class="b9">inset</td> <t...
border-bottom-width - CSS: Cascading Style Sheets
syntax /* keyword values */ border-bottom-width: thin; border-bottom-width: medium; border-bottom-width: thick; /* <length> values */ border-bottom-width: 10em; border-bottom-width: 3vmax; border-bottom-width: 6px; /* global keywords */ border-bottom-width: inherit; border-bottom-width: initial; border-bottom-width: unset; values <line-width> defines the width of the border, either as an explicit nonnegative <length> or a keyword.
...it also applies to ::first-letter.inheritednocomputed valuethe absolute length or 0 if border-bottom-style is none or hiddenanimation typea length formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples comparing bottom border widths html <div>element 1</div> <div>element 2</div> css div { border: 1px solid red; margin: 1em 0; } div:nth-child(1) { border-bottom-width: thick; } div:nth-child(2) { border-bottom-width: 2em; } result specifications specification status comment ...
border-bottom - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-bottom-color border-bottom-style border-bottom-width syntax border-bottom: 1px; border-bottom: 2px dotted; border-bottom: medium dashed blue; the three values of the shorthand property can be specified in any order, and one or two of them may be omitted.
...applies to ::first-letter.inheritednocomputed valueas each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-bottom-style: as specifiedborder-bottom-color: computed coloranimation typeas each of the properties of the shorthand:border-bottom-color: a colorborder-bottom-style: discreteborder-bottom-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-collapse - CSS: Cascading Style Sheets
syntax /* keyword values */ border-collapse: collapse; border-collapse: separate; /* global values */ border-collapse: inherit; border-collapse: initial; border-collapse: unset; the border-collapse property is specified as a single keyword, which may be chosen from the list below.
... formal definition initial valueseparateapplies totable and inline-table elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax collapse | separate examples a colorful table of browser engines html <table class="separate"> <caption><code>border-collapse: separate</code></caption> <tbody> <tr><th>browser</th> <th>layout engine</th></tr> <tr><td class="fx">firefox</td> <td class="gk">gecko</td></tr> <tr><td class="ed">edge</td> <td class="tr">edgehtml</td></tr> <tr><td class="sa">safari</td> <td class="wk">webkit</td></tr> <tr><td class="ch">chr...
border-color - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-bottom-color border-left-color border-right-color border-top-color syntax /* <color> values */ border-color: red; /* horizontal | vertical */ border-color: red #f015ca; /* top | vertical | bottom */ border-color: red rgb(240,30,50,.7) green; /* top | right | bottom | left */ border-color: red yellow green blue; /* global values */ border-color: inherit; border-color: initial; border-color: unset; the border-color property may be specified using one, two, three, ...
...applies to ::first-letter.inheritednocomputed valueas each of the properties of the shorthand:border-bottom-color: computed colorborder-left-color: computed colorborder-right-color: computed colorborder-top-color: computed coloranimation typeas each of the properties of the shorthand:border-bottom-color: a colorborder-left-color: a colorborder-right-color: a colorborder-top-color: a color formal syntax <color>{1,4}where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-end-end-radius - CSS: Cascading Style Sheets
syntax values <length-percentage> denotes the size of the circle radius or the semi-major and semi-minor axes of the ellipse.
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples border radius with vertical text html <div> <p class="exampletext">example</p> </div> css content div { background-color: rebeccapurple; width: 120px; height: 120px; border-end-end-radius: 10px; } .exampletext { writing-mode: vertical-rl; padding: 10px; background-color: #fff; border-en...
border-end-start-radius - CSS: Cascading Style Sheets
syntax values <length-percentage> denotes the size of the circle radius or the semi-major and semi-minor axes of the ellipse.
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples border radius with vertical text html <div> <p class="exampletext">example</p> </div> css div { background-color: rebeccapurple; width: 120px; height: 120px; border-end-start-radius: 10px; } .exampletext { writing-mode: vertical-rl; padding: 10px; background-color: #fff; border-end-star...
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: u...
...it also applies to ::first-letter.inheritednocomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typeby computed value type formal syntax [ <length> | <number> ]{1,4} examples outsetting a border image html <div id="outset">this element has an outset border image!</div> css #outset { width: 10rem; background: #cef; border: 1.4rem solid; border-image: radial-gradient(#ff2, #55f) 40; border-image-outset: 1.5; /* 1.5 × 1.4rem = 2.1rem */ margin: 2.1rem; } result specifications specification statu...
border-image-repeat - CSS: Cascading Style Sheets
syntax /* keyword value */ border-image-repeat: stretch; border-image-repeat: repeat; border-image-repeat: round; border-image-repeat: space; /* vertical | horizontal */ border-image-repeat: round stretch; /* global values */ border-image-repeat: inherit; border-image-repeat: initial; border-image-repeat: unset; the border-image-repeat property may be specified using one or two values chosen from the list of values belo...
...it also applies to ::first-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax [ stretch | repeat | round | space ]{1,2} examples repeating border images css #bordered { width: 12rem; margin-bottom: 1rem; padding: 1rem; border: 40px solid; border-image: url("https://mdn.mozillademos.org/files/4127/border.png") 27; border-image-repeat: stretch; /* can be changed in the live sample */ } html <div id="bordered">you can try out various border repetition ru...
border-image-slice - CSS: Cascading Style Sheets
syntax /* all sides */ border-image-slice: 30%; /* vertical | horizontal */ border-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: uns...
...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.
border-image-source - CSS: Cascading Style Sheets
syntax /* keyword value */ border-image-source: none; /* <image> values */ border-image-source: url(image.jpg); border-image-source: linear-gradient(to top, red, yellow); /* global values */ border-image-source: inherit; border-image-source: initial; border-image-source: unset; values none no border image is used.
...it also applies to ::first-letter.inheritednocomputed valuenone or the image with its uri made absoluteanimation typediscrete formal syntax none | <image>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
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 va...
...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.
border-image - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-image-outset border-image-repeat border-image-slice border-image-source border-image-width syntax /* source | slice */ border-image: linear-gradient(red, blue) 27; /* source | slice | repeat */ border-image: url("/images/border.png") 27 space; /* source | slice | width */ border-image: linear-gradient(red, blue) 27 / 35px; /* source | slice | width | outset | repeat */ border-image: url("/images/border.png") 27 23 / 50px 30px / 1rem round space; the border-image property may be specifie...
...ied, but with relative lengths converted into absolute lengthsborder-image-repeat: as specifiedborder-image-slice: one to four percentage(s) (as specified) or absolute length(s), plus the keyword fill if specifiedborder-image-source: none or the image with its uri made absoluteborder-image-width: as specified, but with relative lengths converted into absolute lengthsanimation typediscrete formal syntax <'border-image-source'> | <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>?
border-inline-color - CSS: Cascading Style Sheets
syntax values <'color'> the color of the border.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typediscrete formal syntax <'border-top-color'>{1,2} examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-inline-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-inline-color' in that specification.
border-inline-end-color - CSS: Cascading Style Sheets
syntax border-inline-end-color: rebeccapurple; border-inline-end-color: #663399; related properties are border-block-start-color, border-block-end-color, and border-inline-start-color, which define the other border colors of the element.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-inline-end-color: red; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-color' in that specification.
border-inline-end-style - CSS: Cascading Style Sheets
syntax /* <'border-style'> values */ border-inline-end-style: dashed; border-inline-end-style: dotted; border-inline-end-style: groove; related properties are border-block-start-style, border-block-end-style, and border-inline-start-style, which define the other border styles of the element.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-inline-end-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-style' in that specification.
border-inline-end-width - CSS: Cascading Style Sheets
syntax /* <'border-width'> values */ border-inline-end-width: 2px; border-inline-end-width: thick; related properties are border-block-start-width, border-block-end-width, and border-inline-start-width, which define the other border widths of the element.
... formal definition initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length formal syntax <'border-top-width'> examples applying a border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-inline-end-width: 5px; } results specifications specification status comment c...
border-inline-end - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-inline-end-color border-inline-end-style border-inline-end-width syntax border-inline-end: 1px; border-inline-end: 2px dashed; border-inline-end: medium dashed blue; the physical border to which border-inline-end maps depends on the element's writing mode, directionality, and text orientation.
...none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style: as specifiedborder-right-style: as specifiedborder-top-style: as specifiedborder-inline-end-color: computed coloranimation typeas each of the properties of the shorthand:border-inline-end-color: a colorborder-inline-end-style: discreteborder-inline-end-width: a length formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-inline-start-color - CSS: Cascading Style Sheets
syntax border-inline-start-color: red; border-inline-start-color: #ee4141; related properties are border-block-start-color, border-block-end-color, and border-inline-end-color, which define the other border colors of the element.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-inline-start-color: red; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-color' in that specification.
border-inline-start-style - CSS: Cascading Style Sheets
syntax /* <'border-style'> values */ border-inline-start-style: dashed; border-inline-start-style: dotted; border-inline-start-style: groove; related properties are border-block-start-style, border-block-end-style, and border-inline-end-style, which define the other border styles of the element.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-inline-start-style: dashed; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-style' in that specification.
border-inline-start-width - CSS: Cascading Style Sheets
syntax /* <'border-width'> values */ border-inline-start-width: 5px; border-inline-start-width: thick; related properties are border-block-start-width, border-block-end-width, and border-inline-end-width, which define the other border widths of the element.
... formal definition initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length formal syntax <'border-top-width'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-inline-start-width: 5px; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-width' in that specification.
border-inline-start - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-inline-start-color border-inline-start-style border-inline-start-width syntax border-inline-start: 1px; border-inline-start: 2px dotted; border-inline-start: medium dashed green; the physical border to which border-inline-start maps depends on the element's writing mode, directionality, and text orientation.
...hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style: as specifiedborder-right-style: as specifiedborder-top-style: as specifiedborder-inline-start-color: computed coloranimation typeas each of the properties of the shorthand:border-inline-start-color: a colorborder-inline-start-style: discreteborder-inline-start-width: a length formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-inline-style - CSS: Cascading Style Sheets
syntax values <'border-style'> the line style of the border.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples html content <div> <p class="exampletext">example text</p> </div> css content div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-inline-style: dashed; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-style' in that specification.
border-inline-width - CSS: Cascading Style Sheets
syntax values <'border-width'> the width of the border.
... formal definition initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typediscrete formal syntax <'border-top-width'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-inline-width: 5px 10px; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-width' in that specification.
border-inline - CSS: Cascading Style Sheets
all elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typediscrete constituent properties this property is a shorthand for the following css properties: border-inline-color border-inline-style border-inline-width syntax values the border-inline is specified with one or more of the following, in any order: <'border-width'> the width of the border.
...ion initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typediscrete formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-left-color - CSS: Cascading Style Sheets
syntax /* <color> values */ border-left-color: red; border-left-color: #ffbb00; border-left-color: rgb(255, 0, 0); border-left-color: hsla(100%, 50%, 25%, 0.75); border-left-color: currentcolor; border-left-color: transparent; /* global values */ border-left-color: inherit; border-left-color: initial; border-left-color: unset; the border-left-color property is specified as a single value.
...it also applies to ::first-letter.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-left-style - CSS: Cascading Style Sheets
syntax /* keyword values */ border-left-style: none; border-left-style: hidden; border-left-style: dotted; border-left-style: dashed; border-left-style: solid; border-left-style: double; border-left-style: groove; border-left-style: ridge; border-left-style: inset; border-left-style: outset; /* global values */ border-left-style: inherit; border-left-style: initial; border-left-style: unset; the bor...
...it also applies to ::first-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <line-style>where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset examples html <table> <tr> <td class="b1">none</td> <td class="b2">hidden</td> <td class="b3">dotted</td> <td class="b4">dashed</td> </tr> <tr> <td class="b5">solid</td> <td class="b6">double</td> <td class="b7">groove</td> <td class="b8">ridge</td> </tr> <tr> <td class="b9">inset</td> <td class="b10">outset</td> </tr> </table> css /* define lo...
border-left-width - CSS: Cascading Style Sheets
syntax /* keyword values */ border-left-width: thin; border-left-width: medium; border-left-width: thick; /* <length> values */ border-left-width: 10em; border-left-width: 3vmax; border-left-width: 6px; /* global keywords */ border-left-width: inherit; border-left-width: initial; border-left-width: unset; values <line-width> defines the width of the border, either as an explicit nonnegative <length> or a keyword.
...it also applies to ::first-letter.inheritednocomputed valuethe absolute length or 0 if border-left-style is none or hiddenanimation typea length formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples comparing border widths html <div>element 1</div> <div>element 2</div> css div { border: 1px solid red; margin: 1em 0; } div:nth-child(1) { border-left-width: thick; } div:nth-child(2) { border-left-width: 2em; } result specifications specification status comment css backgro...
border-left - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-left-color border-left-style border-left-width syntax border-left: 1px; border-left: 2px dotted; border-left: medium dashed green; the three values of the shorthand property can be specified in any order, and one or two of them may be omitted.
...it also applies to ::first-letter.inheritednocomputed valueas each of the properties of the shorthand:border-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-left-style: as specifiedborder-left-color: computed coloranimation typeas each of the properties of the shorthand:border-left-color: a colorborder-left-style: discreteborder-left-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-right-color - CSS: Cascading Style Sheets
syntax /* <color> values */ border-right-color: red; border-right-color: #ffbb00; border-right-color: rgb(255, 0, 0); border-right-color: hsla(100%, 50%, 25%, 0.75); border-right-color: currentcolor; border-right-color: transparent; /* global values */ border-right-color: inherit; border-right-color: initial; border-right-color: unset; the border-right-color property is specified as a single value.
...it also applies to ::first-letter.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-right-style - CSS: Cascading Style Sheets
syntax /* keyword values */ border-right-style: none; border-right-style: hidden; border-right-style: dotted; border-right-style: dashed; border-right-style: solid; border-right-style: double; border-right-style: groove; border-right-style: ridge; border-right-style: inset; border-right-style: outset; /* global values */ border-right-style: inherit; border-right-style: initial; border-right-style: uns...
...it also applies to ::first-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <line-style>where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset examples border styles html <table> <tr> <td class="b1">none</td> <td class="b2">hidden</td> <td class="b3">dotted</td> <td class="b4">dashed</td> </tr> <tr> <td class="b5">solid</td> <td class="b6">double</td> <td class="b7">groove</td> <td class="b8">ridge</td> </tr> <tr> <td class="b9">inset</td> <td class="b10">outset</td> </tr...
border-right-width - CSS: Cascading Style Sheets
syntax /* keyword values */ border-right-width: thin; border-right-width: medium; border-right-width: thick; /* <length> values */ border-right-width: 10em; border-right-width: 3vmax; border-right-width: 6px; /* global keywords */ border-right-width: inherit; border-right-width: initial; border-right-width: unset; values <line-width> defines the width of the border, either as an explicit nonnegative <length> or a keyword.
...it also applies to ::first-letter.inheritednocomputed valuethe absolute length or 0 if border-right-style is none or hiddenanimation typea length formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples comparing border widths html <div>element 1</div> <div>element 2</div> css div { border: 1px solid red; margin: 1em 0; } div:nth-child(1) { border-right-width: thick; } div:nth-child(2) { border-right-width: 2em; } result specifications specification status comment css backg...
border-right - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-right-color border-right-style border-right-width syntax border-right: 1px; border-right: 2px dotted; border-right: medium dashed green; the three values of the shorthand property can be specified in any order, and one or two of them may be omitted.
...t also applies to ::first-letter.inheritednocomputed valueas each of the properties of the shorthand:border-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-right-style: as specifiedborder-right-color: computed coloranimation typeas each of the properties of the shorthand:border-right-color: a colorborder-right-style: discreteborder-right-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-spacing - CSS: Cascading Style Sheets
syntax /* <length> */ border-spacing: 2px; /* horizontal <length> | vertical <length> */ border-spacing: 1cm 2em; /* global values */ border-spacing: inherit; border-spacing: initial; border-spacing: unset; the border-spacing property may be specified as either one or two values.
... formal definition initial value0applies totable and inline-table elementsinheritedyescomputed valuetwo absolute lengthsanimation typediscrete formal syntax <length> <length>?
border-start-end-radius - CSS: Cascading Style Sheets
syntax values <length-percentage> denotes the size of the circle radius or the semi-major and semi-minor axes of the ellipse.
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples border radius with vertical text html <div> <p class="exampletext">example</p> </div> css div { background-color: rebeccapurple; width: 120px; height: 120px; border-start-end-radius: 10px; } .exampletext { writing-mode: vertical-rl; padding: 10px; background-color: #fff; border-start-en...
border-start-start-radius - CSS: Cascading Style Sheets
syntax values <length-percentage> denotes the size of the circle radius or the semi-major and semi-minor axes of the ellipse.
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples border radius with vertical text html <div> <p class="exampletext">example</p> </div> css div { background-color: rebeccapurple; width: 120px; height: 120px; border-start-start-radius: 10px; } .exampletext { writing-mode: vertical-rl; padding: 10px; background-color: #fff; border-start-...
border-style - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-bottom-style border-left-style border-right-style border-top-style syntax /* keyword values */ border-style: none; border-style: hidden; border-style: dotted; border-style: dashed; border-style: solid; border-style: double; border-style: groove; border-style: ridge; border-style: inset; border-style: outset; /* vertical | horizontal */ border-style: dotted solid; /* top | horizontal | bottom */ border-style: hidden double dashed; /* top | right | bottom | left */ b...
...it also applies to ::first-letter.inheritednocomputed valueas each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style: as specifiedborder-right-style: as specifiedborder-top-style: as specifiedanimation typediscrete formal syntax <line-style>{1,4}where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset examples table with all property values here is an example of all the property values.
border-top-color - CSS: Cascading Style Sheets
syntax /* <color> values */ border-top-color: red; border-top-color: #ffbb00; border-top-color: rgb(255, 0, 0); border-top-color: hsla(100%, 50%, 25%, 0.75); border-top-color: currentcolor; border-top-color: transparent; /* global values */ border-top-color: inherit; border-top-color: initial; border-top-color: unset; the border-top-color property is specified as a single value.
...it also applies to ::first-letter.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-top-left-radius - CSS: Cascading Style Sheets
syntax /* the corner is a circle */ /* border-top-left-radius: radius */ border-top-left-radius: 3px; /* the corner is an ellipse */ /* border-top-left-radius: horizontal vertical */ border-top-left-radius: 0.5em 1em; border-top-left-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples live example code an arc of ellipse is used as the border div { border-top-left-radius: 40px 40px; } an arc of ellipse is used as the border div { border-top-left-radius: 40px 20px; } the box is a square: ...
border-top-right-radius - CSS: Cascading Style Sheets
syntax /* the corner is a circle */ /* border-top-right-radius: radius */ border-top-right-radius: 3px; /* the corner is an ellipse */ /* border-top-right-radius: horizontal vertical */ border-top-right-radius: 0.5em 1em; border-top-right-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples live example code an arc of circle is used as the border div { border-top-right-radius: 40px 40px; } an arc of ellipse is used as the border div { border-top-right-radius: 40px 20px; } the box is a square:...
border-top-style - CSS: Cascading Style Sheets
syntax /* keyword values */ border-top-style: none; border-top-style: hidden; border-top-style: dotted; border-top-style: dashed; border-top-style: solid; border-top-style: double; border-top-style: groove; border-top-style: ridge; border-top-style: inset; border-top-style: outset; /* global values */ border-top-style: inherit; border-top-style: initial; border-top-style: unset; the border-top-style...
...it also applies to ::first-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <line-style>where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset examples html <table> <tr> <td class="b1">none</td> <td class="b2">hidden</td> <td class="b3">dotted</td> <td class="b4">dashed</td> </tr> <tr> <td class="b5">solid</td> <td class="b6">double</td> <td class="b7">groove</td> <td class="b8">ridge</td> </tr> <tr> <td class="b9">inset</td> <td class="b10">outset</td> </tr> </table> css /* define look of the tabl...
border-top-width - CSS: Cascading Style Sheets
syntax /* keyword values */ border-top-width: thin; border-top-width: medium; border-top-width: thick; /* <length> values */ border-top-width: 10em; border-top-width: 3vmax; border-top-width: 6px; /* global keywords */ border-top-width: inherit; border-top-width: initial; border-top-width: unset; values <line-width> defines the width of the border, either as an explicit nonnegative <length> or a keyword.
...it also applies to ::first-letter.inheritednocomputed valuethe absolute length or 0 if border-top-style is none or hiddenanimation typea length formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples html <div>element 1</div> <div>element 2</div> css div { border: 1px solid red; margin: 1em 0; } div:nth-child(1) { border-top-width: thick; } div:nth-child(2) { border-top-width: 2em; } result specifications specification status comment css backgrounds and borders module lev...
border-top - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-top-color border-top-style border-top-width syntax border-top: 1px; border-top: 2px dotted; border-top: medium dashed green; the three values of the shorthand property can be specified in any order, and one or two of them may be omitted.
...it also applies to ::first-letter.inheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typeas each of the properties of the shorthand:border-top-color: a colorborder-top-style: discreteborder-top-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-width - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-bottom-width border-left-width border-right-width border-top-width syntax /* keyword values */ border-width: thin; border-width: medium; border-width: thick; /* <length> values */ border-width: 4px; border-width: 1.2rem; /* vertical | horizontal */ border-width: 2px 1.5em; /* top | horizontal | bottom */ border-width: 1px 2em 1.5cm; /* top | right | bottom | left */ border-width: 1px 2em 0 4rem; /* global keywords */ border-width: inherit; border-width: initial; ...
... absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenanimation typeas each of the properties of the shorthand:border-bottom-width: a lengthborder-left-width: a lengthborder-right-width: a lengthborder-top-width: a length formal syntax <line-width>{1,4}where <line-width> = <length> | thin | medium | thick examples a mix of values and lengths html <p id="sval"> one value: 6px wide border on all 4 sides</p> <p id="bival"> two different values: 2px wide top and bottom border, 10px wide right and left border</p> <p id="treval"> three different values: 0.3em top, 9px bottom, and zero width right and left</p> <p id="...
border - CSS: Cascading Style Sheets
WebCSSborder
constituent properties this property is a shorthand for the following css properties: border-color border-style border-width syntax /* style */ border: solid; /* width | style */ border: 2px dotted; /* style | color */ border: outset #f33; /* width | style | color */ border: medium dashed green; /* global values */ border: inherit; border: initial; border: unset; the border property may be specified using one, two, or three of the values listed below.
...ach of the properties of the shorthand:border-color: as each of the properties of the shorthand:border-bottom-color: a colorborder-left-color: a colorborder-right-color: a colorborder-top-color: a colorborder-style: discreteborder-width: as each of the properties of the shorthand:border-bottom-width: a lengthborder-left-width: a lengthborder-right-width: a lengthborder-top-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
bottom - CSS: Cascading Style Sheets
WebCSSbottom
syntax /* <length> values */ bottom: 3px; bottom: 2.4em; /* <percentage>s of the height of the containing block */ bottom: 10%; /* keyword value */ bottom: auto; /* global values */ bottom: inherit; bottom: initial; bottom: unset; values <length> a negative, null, or positive <length> that represents: for absolutely positioned elements, the distance to the bottom edge of the containing blo...
... formal definition initial valueautoapplies topositioned elementsinheritednopercentagesrefer to the height of the containing blockcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length, percentage or calc(); formal syntax <length> | <percentage> | auto examples absolute and fixed positioning this example demonstrates the difference in behavior of the bottom property, when position is absolute versus fixed.
box-align - CSS: Cascading Style Sheets
WebCSSbox-align
syntax the box-align property is specified as one of the keyword values listed below.
... formal definition initial valuestretchapplies toelements with a css display value of box or inline-boxinheritednocomputed valueas specifiedanimation typediscrete formal syntax start | center | end | baseline | stretch examples setting box alignment <!doctype html> <html> <head> <title>css box-align example</title> <style> div.example { display: box; /* as specified */ display: -moz-box; /* mozilla */ display: -webkit-box; /* webkit */ /* make this box taller than the children, so there is room for the box-pack...
box-decoration-break - CSS: Cascading Style Sheets
the specified value will impact the appearance of the following properties: background border border-image box-shadow clip-path margin padding syntax /* keyword values */ box-decoration-break: slice; box-decoration-break: clone; /* global values */ box-decoration-break: initial; box-decoration-break: inherit; box-decoration-break: unset; the box-decoration-break property is specified as one of the keyword values listed below.
... formal definition initial valuesliceapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax slice | clone examples inline box fragments an inline element that contains line breaks styled with: .example { background: linear-gradient(to bottom right, yellow, green); box-shadow: 8px 8px 10px 0px deeppink, -5px -5px 5px 0px blue, 5px 5px 15px 0px yellow; padding: 0em 1em; border-radius: 16px; border-style: solid; margin-left: 10px; font: 24px sans-serif; lin...
box-direction - CSS: Cascading Style Sheets
/* keyword values */ box-direction: normal; box-direction: reverse; /* global values */ box-direction: inherit; box-direction: initial; box-direction: unset; syntax the box-direction property is specified as one of the keyword values listed below.
... formal definition initial valuenormalapplies toelements with a css display value of box or inline-boxinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | reverse | inherit examples setting box direction .example { /* bottom-to-top layout */ -moz-box-direction: reverse; /* mozilla */ -webkit-box-direction: reverse; /* webkit */ box-direction: reverse; /* as specified */ } specifications not part of any standard.
box-flex-group - CSS: Cascading Style Sheets
syntax the box-flex-group property is specified as any positive <integer>.
... formal definition initial value1applies toin-flow children of box elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <integer> examples simple usage example in the original flexbox spec, box-flex-group could be used to assign flex children to different groups to distribute flexible space between: article:nth-child(1) { -webkit-box-flex-group: 1; } article:nth-child(2) { -webkit-box-flex-group: 2; } this was only ever supported in webkit-based browsers, with a prefix, and in subsequent versions of the spec this functionality does not have an equivalent.
box-flex - CSS: Cascading Style Sheets
WebCSSbox-flex
/* <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 */ ...
box-lines - CSS: Cascading Style Sheets
WebCSSbox-lines
syntax the box-lines property is specified as one of the keyword values listed below.
... formal definition initial valuesingleapplies tobox elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax single | multiple examples simple usage example in the original version of the spec, box-lines allowed you to specify that you wanted your flex container's children to wrap onto multiple lines.
box-ordinal-group - CSS: Cascading Style Sheets
syntax the box-ordinal-group property is specified as any positive <integer>.
... formal definition initial value1applies tochildren of box elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <integer> examples basic usage example in an older version of the spec, box-ordinal-group was included to allow you to change the display order of flex children inside a flex container: article:nth-child(1) { -webkit-box-ordinal-group: 2 -moz-box-ordinal-group: 2 box-ordinal-group: 2 } article:nth-child(2) { -webkit-box-ordinal-group: 1 -moz-box-ordinal-group: 1 box-ordinal-group: 1 } the modern flexbox equivalent is order.
box-orient - CSS: Cascading Style Sheets
/* keyword values */ box-orient: horizontal; box-orient: vertical; box-orient: inline-axis; box-orient: block-axis; /* global values */ box-orient: inherit; box-orient: initial; box-orient: unset; syntax the box-orient property is specified as one of the keyword values listed below.
... formal definition initial valueinline-axis (horizontal in xul)applies toelements with a css display value of box or inline-boxinheritednocomputed valueas specifiedanimation typediscrete formal syntax horizontal | vertical | inline-axis | block-axis | inherit examples setting horizontal box orientation here, he box-orient property will cause the two <p> sections in the example to display in the same line.
box-pack - CSS: Cascading Style Sheets
WebCSSbox-pack
syntax the box-pack property is specified as one of the keyword values listed below.
... formal definition initial valuestartapplies toelements with a css display value of -moz-box, -moz-inline-box, -webkit-box or -webkit-inline-boxinheritednocomputed valueas specifiedanimation typediscrete formal syntax start | center | end | justify examples div.example { border-style: solid; display: -moz-box; /* mozilla */ display: -webkit-box; /* webkit */ /* make this box taller than the children, so there is room for the box-pack */ height: 300px; /* make this box wide enough to show the contents are centered horizontally */ width: 300px; /* children should be oriented verti...
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,...
...it also applies to ::first-letter.inheritednocomputed valueany length made absolute; any specified color computed; otherwise as specifiedanimation typea shadow list formal syntax none | <shadow>#where <shadow> = inset?
box-sizing - CSS: Cascading Style Sheets
syntax the box-sizing property is specified as a single keyword chosen from the list of values below.
... formal definition initial valuecontent-boxapplies toall elements that accept width or heightinheritednocomputed valueas specifiedanimation typediscrete formal syntax content-box | border-box examples box sizes with content-box and border-box this example shows how different box-sizing values alter the rendered size of two otherwise identical elements.
break-after - CSS: Cascading Style Sheets
syntax the break-after property is specified as one of the keyword values from the list below.
... formal definition initial valueautoapplies toblock-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region examples breaking into neat columns in the following example we have a container that contains an <h1> spanning all columns (achieved using column-span: all) and a series of <h2>s and paragraphs laid out in multiple columns using column-width: 200px.
break-before - CSS: Cascading Style Sheets
syntax the break-before property is specified as one of the keyword values from the list below.
... formal definition initial valueautoapplies toblock-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region examples breaking into neat columns in the following example we have a container that contains an <h1> spanning all columns (achieved using column-span: all) and a series of <h2>s and paragraphs laid out in multiple columns using column-width: 200px.
break-inside - CSS: Cascading Style Sheets
syntax the break-inside property is specified as one of the keyword values from the list below.
...a subset of values should be aliased as follows: page-break-inside break-inside auto auto avoid avoid formal definition initial valueautoapplies toblock-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | avoid | avoid-page | avoid-column | avoid-region examples avoiding breaking inside a figure in the following example we have a container that contains an <h1> spanning all columns (achieved using column-span: all) and a series of paragraphs laid out in multiple columns using column-width: 200px.
caption-side - CSS: Cascading Style Sheets
syntax /* directional values */ caption-side: top; caption-side: bottom; /* warning: non-standard values */ caption-side: left; caption-side: right; caption-side: top-outside; caption-side: bottom-outside; /* global values */ caption-side: inherit; caption-side: initial; caption-side: unset; the caption-side property is specified as one of the keyword values listed below.
... formal definition initial valuetopapplies totable-caption elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax top | bottom | block-start | block-end | inline-start | inline-end examples setting captions above and below html <table class="top"> <caption>caption above the table</caption> <tr> <td>some data</td> <td>some more data</td> </tr> </table> <br> <table class="bottom"> <caption>caption below the table</caption> <tr> <td>some data</td> <td>some more data</td> </tr>...
caret-color - CSS: Cascading Style Sheets
syntax /* keyword values */ caret-color: auto; caret-color: transparent; caret-color: currentcolor; /* <color> values */ caret-color: red; caret-color: #5729e9; caret-color: rgb(0, 200, 0); caret-color: hsla(228, 4%, 24%, 0.8); values auto the user agent selects an appropriate color for the caret.
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueauto is computed as specified and <color> values are computed as defined for the color property.animation typea color formal syntax auto | <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
clear - CSS: Cascading Style Sheets
WebCSSclear
#container::after { content: ""; display: block; clear: both; } syntax /* keyword values */ clear: none; clear: left; clear: right; clear: both; clear: inline-start; clear: inline-end; /* global values */ clear: inherit; clear: initial; clear: unset; values none is a keyword indicating that the element is not moved down to clear past floating elements.
... formal definition initial valuenoneapplies toblock-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | left | right | both | inline-start | inline-end examples clear: left html <div class="wrapper"> <p class="black">lorem ipsum dolor sit amet, consectetuer adipiscing elit.
clip-path - CSS: Cascading Style Sheets
WebCSSclip-path
syntax /* keyword values */ clip-path: none; /* <clip-source> values */ clip-path: url(resources.svg#c1); /* <geometry-box> values */ clip-path: margin-box; clip-path: border-box; clip-path: padding-box; clip-path: content-box; clip-path: fill-box; clip-path: stroke-box; clip-path: view-box; /* <basic-shape> values */ clip-path: inset(100px 50px); clip-path: circle(50px at 0 100px); clip-path: polyg...
... formal definition initial valuenoneapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednopercentagesrefer to reference box when specified, otherwise border-boxcomputed valueas specified, but with <url> values made absoluteanimation typeyes, as specified for <basic-shape>, otherwise no formal syntax <clip-source> | [ <basic-shape> | <geometry-box> ] | nonewhere <clip-source> = <url><basic-shape> = <inset()> | <circle()> | <ellipse()> | <polygon()> | <path()><geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <inset()> = inset( <length-percentage>{1,4} [ round <'border-radius'> ]?
clip - CSS: Cascading Style Sheets
WebCSSclip
/* keyword value */ clip: auto; /* <shape> values */ clip: rect(1px 10em 3rem 2ch); clip: rect(1px, 10em, 3rem, 2ch); /* global values */ clip: inherit; clip: initial; clip: unset; syntax note: where possible, authors are encouraged to use the newer clip-path property instead.
... formal definition initial valueautoapplies toabsolutely positioned elementsinheritednocomputed valueauto if specified as auto, otherwise a rectangle with four values, each of which is auto if specified as auto or the computed length otherwiseanimation typea rectangle formal syntax <shape> | autowhere <shape> = rect(<top>, <right>, <bottom>, <left>) examples clipping an image css .dotted-border { border: dotted; position: relative; width: 536px; height: 350px; } #top-left, #middle, #bottom-right { position: absolute; top: 0; } #top-left { left: 360px; clip: rect(0 175px 113px 0); } #middle { left: 280px; clip: rect(119px 255px 229px 80px); } #b...
color-adjust - CSS: Cascading Style Sheets
syntax color-adjust: economy; color-adjust: exact; the color-adjust property's value must be one of the following keywords.
... formal definition initial valueeconomyapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax economy | exact examples preserving low contrast in this example, a box is shown which uses a background-image and a translucent linear-gradient() function atop a black background color to have a dark blue gradient behind medium red text.
column-count - CSS: Cascading Style Sheets
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.
... formal definition initial valueautoapplies toblock containers except table wrapper boxesinheritednocomputed valueas specifiedanimation typean integer formal syntax <integer> | auto examples splitting a paragraph across three columns html <p class="content-box"> this is a bunch of text split into three columns using the css `column-count` property.
column-fill - CSS: Cascading Style Sheets
syntax /* keyword values */ column-fill: auto; column-fill: balance; column-fill: balance-all; /* global values */ column-fill: inherit; column-fill: initial; column-fill: unset; the column-fill property is specified as one of the keyword values listed below.
... formal definition initial valuebalanceapplies tomulticol elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | balance | balance-all examples splitting text evenly across columns html <p class="content-box"> this is a bunch of text split into multiple columns.
column-gap (grid-column-gap) - CSS: Cascading Style Sheets
syntax /* keyword value */ column-gap: normal; /* <length> values */ column-gap: 3px; column-gap: 2.5em; /* <percentage> value */ column-gap: 3%; /* global values */ column-gap: inherit; column-gap: initial; column-gap: unset; the column-gap property is specified as one of the values listed below.
... formal definition initial valuenormalapplies tomulti-column elements, flex containers, grid containersinheritednopercentagesrefer to corresponding dimension of the content areacomputed valueas specified, with <length>s made absolute, and normal computing to zero except on multi-column elementsanimation typea length, percentage or calc(); formal syntax normal | <length-percentage>where <length-percentage> = <length> | <percentage> examples flex layout html <div id="flexbox"> <div></div> <div></div> <div></div> </div> css #flexbox { display: flex; height: 100px; column-gap: 20px; } #flexbox > div { border: 1px solid green; background-color: lime; flex: auto; } result grid layout html <div id="grid"> <div></div...
column-rule-color - CSS: Cascading Style Sheets
syntax /* <color> values */ column-rule-color: red; column-rule-color: rgb(192, 56, 78); column-rule-color: transparent; column-rule-color: hsla(0, 100%, 50%, 0.6); /* global values */ column-rule-color: inherit; column-rule-color: initial; column-rule-color: unset; the column-rule-color property is specified as a single <color> value.
... formal definition initial valuecurrentcolorapplies tomulticol elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
column-rule-style - CSS: Cascading Style Sheets
syntax /* <'border-style'> values */ column-rule-style: none; column-rule-style: hidden; column-rule-style: dotted; column-rule-style: dashed; column-rule-style: solid; column-rule-style: double; column-rule-style: groove; column-rule-style: ridge; column-rule-style: inset; column-rule-style: outset; /* global values */ column-rule-style: inherit; column-rule-style: initial; column-rule-style: unset; the column-rule-style property is specified as a single <'b...
... formal definition initial valuenoneapplies tomulticol elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-style'> examples setting a dashed column rule html <p>this is a bunch of text split into three columns.
column-rule-width - CSS: Cascading Style Sheets
syntax /* keyword values */ column-rule-width: thin; column-rule-width: medium; column-rule-width: thick; /* <length> values */ column-rule-width: 1px; column-rule-width: 2.5em; /* global values */ column-rule-width: inherit; column-rule-width: initial; column-rule-width: unset; the column-rule-width property is specified as a single <'border-width'> value.
... formal definition initial valuemediumapplies tomulticol elementsinheritednocomputed valuethe absolute length; 0 if the column-rule-style is none or hiddenanimation typea length formal syntax <'border-width'> examples setting a thick column rule html <p>this is a bunch of text split into three columns.
column-rule - CSS: Cascading Style Sheets
syntax column-rule: dotted; column-rule: solid 8px; column-rule: solid blue; column-rule: thick inset blue; /* global values */ column-rule: inherit; column-rule: initial; column-rule: unset; the column-rule property is specified as one, two, or three of the values listed below, in any order.
...urrentcolorapplies tomulticol elementsinheritednocomputed valueas each of the properties of the shorthand:column-rule-color: computed colorcolumn-rule-style: as specifiedcolumn-rule-width: the absolute length; 0 if the column-rule-style is none or hiddenanimation typeas each of the properties of the shorthand:column-rule-color: a colorcolumn-rule-style: discretecolumn-rule-width: a length formal syntax <'column-rule-width'> | <'column-rule-style'> | <'column-rule-color'> examples example 1 /* same as "medium dotted currentcolor" */ p.foo { column-rule: dotted; } /* same as "medium solid blue" */ p.bar { column-rule: solid blue; } /* same as "8px solid currentcolor" */ p.baz { column-rule: solid 8px; } p.abc { column-rule: thick inset blue; } example 2 html <p class="content-box"> t...
column-span - CSS: Cascading Style Sheets
syntax the column-span property is specified as one of the keyword values listed below.
... formal definition initial valuenoneapplies toin-flow block-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | all examples making a heading span columns in this example, the heading is made to span across all the columns of the article.
column-width - CSS: Cascading Style Sheets
syntax /* keyword value */ column-width: auto; /* <length> values */ column-width: 60px; column-width: 15.5em; column-width: 3.3vw; /* global values */ column-width: inherit; column-width: initial; column-width: unset; the column-width property is specified as one of the values listed below.
... formal definition initial valueautoapplies toblock containers except table wrapper boxesinheritednocomputed valuethe absolute length, zero or largeranimation typea length formal syntax <length> | auto examples setting column width in pixels html <p class="content-box"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
columns - CSS: Cascading Style Sheets
WebCSScolumns
constituent properties this property is a shorthand for the following css properties: column-count column-width syntax /* column width */ columns: 18em; /* column count */ columns: auto; columns: 2; /* both column width and count */ columns: 2 auto; columns: auto 12em; columns: auto auto; /* global values */ columns: inherit; columns: initial; columns: unset; the columns property may be specified as one or two of the values listed below, in any order.
...initial valueas each of the properties of the shorthand:column-width: autocolumn-count: autoapplies toblock containers except table wrapper boxesinheritednocomputed valueas each of the properties of the shorthand:column-width: the absolute length, zero or largercolumn-count: as specifiedanimation typeas each of the properties of the shorthand:column-width: a lengthcolumn-count: an integer formal syntax <'column-width'> | <'column-count'> examples setting three equal columns html <p class="content-box"> this is a bunch of text split into three columns using the css `columns` property.
contain - CSS: Cascading Style Sheets
WebCSScontain
syntax /* keyword values */ contain: none; contain: strict; contain: content; contain: size; contain: layout; contain: style; contain: paint; /* multiple keywords */ contain: size paint; contain: size layout paint; /* global values */ contain: inherit; contain: initial; contain: unset; the contain property is specified as either one of the following: using a single none, strict, or content keywor...
... 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 <art...
content - CSS: Cascading Style Sheets
WebCSScontent
ue linked to the html attribute value */ content: attr(value string); /* language- and position-dependent keywords */ content: open-quote; content: close-quote; content: no-open-quote; content: no-close-quote; /* except for normal and none, several values can be used simultaneously */ content: open-quote chapter_counter; /* global values */ content: inherit; content: initial; content: unset; syntax values none the pseudo-element is not generated.
...otherwise, for uri values, the absolute uri; for attr() values, the resulting string; for other keywords, as specified.animation typediscrete formal syntax normal | none | [ <content-replacement> | <content-list> ] [/ <string> ]?where <content-replacement> = <image><content-list> = [ <string> | contents | <image> | <quote> | <target> | <leader()> ]+where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient><quote> = open-quote | close-quote | no-open-quote | no-close-quote<target> = <target-counter()> |...
counter-increment - CSS: Cascading Style Sheets
syntax /* increment "my-counter" by 1 */ counter-increment: my-counter; /* decrement "my-counter" by 1 */ counter-increment: my-counter -1; /* increment "counter1" by 1, and decrement "counter2" by 4 */ counter-increment: counter1 counter2 -4; /* do not increment/decrement anything: used to override less specific rules */ counter-increment: none; /* global values */ counter-increment: inherit; coun...
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ <custom-ident> <integer>?
counter-reset - CSS: Cascading Style Sheets
syntax /* set "my-counter" to 0 */ counter-reset: my-counter; /* set "my-counter" to -1 */ counter-reset: my-counter -1; /* set "counter1" to 1, and "counter2" to 4 */ counter-reset: counter1 1 counter2 4; /* cancel any reset that could have been set in less specific rules */ counter-reset: none; /* global values */ counter-reset: inherit; counter-reset: initial; counter-reset: unset; the counter...
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ <custom-ident> <integer>?
counter-set - CSS: Cascading Style Sheets
syntax /* set "my-counter" to 0 */ counter-set: my-counter; /* set "my-counter" to -1 */ counter-set: my-counter -1; /* set "counter1" to 1, and "counter2" to 4 */ counter-set: counter1 1 counter2 4; /* cancel any counter that could have been set in less specific rules */ counter-set: none; /* global values */ counter-set: inherit; counter-set: initial; counter-set: unset; the counter-set property is specified as either one of the following: a <custom-ident> naming the c...
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ <custom-ident> <integer>?
counter() - CSS: Cascading Style Sheets
WebCSScounter
syntax values <custom-ident> a name identifying the counter, which is the same case-sensitive name used for the counter-reset and counter-increment.
...if omitted, the counter-style defaults to decimal formal syntax counter( <custom-ident>, <counter-style>?
counters() - CSS: Cascading Style Sheets
WebCSScounters
syntax values <custom-ident> a name identifying the counters, which is the same case-sensitive name used for the counter-reset and counter-increment.
... formal syntax counters( <custom-ident>, <string>, <counter-style>?
direction - CSS: Cascading Style Sheets
WebCSSdirection
syntax /* keyword values */ direction: ltr; direction: rtl; /* global values */ direction: inherit; direction: initial; direction: unset; values ltr text and other elements go from left to right.
... formal definition initial valueltrapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax ltr | rtl examples setting right-to-left direction blockquote { direction: rtl; } specifications specification status comment css writing modes module level 3the definition of 'direction' in that specification.
<display-inside> - CSS: Cascading Style Sheets
syntax valid <display-inside> values: flow the element lays out its contents using flow layout (block-and-inline layout).
... note: browsers that support the two value syntax, on finding the inner value only, such as when display: flex or display: grid is specified, will set their outer value to block.
<display-listitem> - CSS: Cascading Style Sheets
syntax a single value of list-item will cause the element to behave like a list item.
... note: in browsers that support the two-value syntax, if no inner value is specified it will default to flow.
<display-outside> - CSS: Cascading Style Sheets
syntax valid <display-outside> values: block the element generates a block element box, generating line breaks both before and after the element when in the normal flow.
... note: browsers that support the two value syntax, on finding the outer value only, such as when display: block or display: inline is specified, will set the inner value to flow.
empty-cells - CSS: Cascading Style Sheets
syntax /* keyword values */ empty-cells: show; empty-cells: hide; /* global values */ empty-cells: inherit; empty-cells: initial; empty-cells: unset; the empty-cells property is specified as one of the keyword values listed below.
... formal definition initial valueshowapplies totable-cell elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax show | hide example showing and hiding empty table cells html <table class="table_1"> <tr> <td>moe</td> <td>larry</td> </tr> <tr> <td>curly</td> <td></td> </tr> </table> <br> <table class="table_2"> <tr> <td>moe</td> <td>larry</td> </tr> <tr> <td>curly</td> <td></td> </tr> </table> css .table_1 { empty-cells: show; } .table_2 { empty-cells: hide; } td, th { border: 1px solid gray; padding: 0.5rem; } result specifications specification status comment ...
filter - CSS: Cascading Style Sheets
WebCSSfilter
syntax /* url to svg filter */ filter: url("filters.svg#filter-id"); /* <filter-function> values */ filter: blur(5px); filter: brightness(0.4); filter: contrast(200%); filter: drop-shadow(16px 16px 20px blue); filter: grayscale(50%); filter: hue-rotate(90deg); filter: invert(75%); filter: opacity(25%); filter: saturate(30%); filter: sepia(60%); /* multiple filters */ filter: contrast(175%) brightness...
... td { padding: 5px; border: 1px solid rgb(204, 204, 204); text-align: left; vertical-align: top; width:25%; height:auto; } #img3 { height:100%; } formal definition initial valuenoneapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typea filter function list formal syntax none | <filter-function-list>where <filter-function-list> = [ <filter-function> | <url> ]+where <filter-function> = <blur()> | <brightness()> | <contrast()> | <drop-shadow()> | <grayscale()> | <hue-rotate()> | <invert()> | <opacity()> | <saturate()> | <sepia()>where <blur()> = blur( <length> )<brightness()> = brightness( <number-percentage> )<contrast()> = contrast( [ <number-percentage> ] )<dro...
flex-basis - CSS: Cascading Style Sheets
syntax /* specify <'width'> */ flex-basis: 10em; flex-basis: 3px; flex-basis: auto; /* intrinsic sizing keywords */ flex-basis: fill; flex-basis: max-content; flex-basis: min-content; flex-basis: fit-content; /* automatically size based on the flex item’s content */ flex-basis: content; /* global values */ flex-basis: inherit; flex-basis: initial; flex-basis: unset; the flex-basis property is sp...
... formal definition initial valueautoapplies toflex items, including in-flow pseudo-elementsinheritednopercentagesrefer to the flex container's inner main sizecomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea length, percentage or calc(); formal syntax content | <'width'> examples setting flex item initial sizes html <ul class="container"> <li class="flex flex1">1: flex-basis test</li> <li class="flex flex2">2: flex-basis test</li> <li class="flex flex3">3: flex-basis test</li> <li class="flex flex4">4: flex-basis test</li> <li class="flex flex5">5: flex-basis test</li> </ul> <ul class="container"> <li class="flex flex6">6: fl...
flex-direction - CSS: Cascading Style Sheets
syntax /* the direction text is laid out in a line */ flex-direction: row; /* like <row>, but reversed */ flex-direction: row-reverse; /* the direction in which lines of text are stacked */ flex-direction: column; /* like <column>, but reversed */ flex-direction: column-reverse; /* global values */ flex-direction: inherit; flex-direction: initial; flex-direction: unset; values the following valu...
... flexbox & the keyboard navigation disconnect — tink source order matters | adrian roselli mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.2 | w3c understanding wcag 2.0 formal definition initial valuerowapplies toflex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax row | row-reverse | column | column-reverse examples reversing flex container columns and rows html <h4>this is a column-reverse</h4> <div id="content"> <div class="box" style="background-color:red;">a</div> <div class="box" style="background-color:lightblue;">b</div> <div class="box" style="background-color:yellow;">c</div> </div> <h4>this is a row-reverse</h4> <div id="content1"> <...
flex-flow - CSS: Cascading Style Sheets
WebCSSflex-flow
constituent properties this property is a shorthand for the following css properties: flex-direction flex-wrap syntax /* flex-flow: <'flex-direction'> */ flex-flow: row; flex-flow: row-reverse; flex-flow: column; flex-flow: column-reverse; /* flex-flow: <'flex-wrap'> */ flex-flow: nowrap; flex-flow: wrap; flex-flow: wrap-reverse; /* flex-flow: <'flex-direction'> and <'flex-wrap'> */ flex-flow: row nowrap; flex-flow: column wrap; flex-flow: column-reverse wrap-reverse; /* global values */ flex-flow: inherit; ...
... formal definition initial valueas each of the properties of the shorthand:flex-direction: rowflex-wrap: nowrapapplies toflex containersinheritednocomputed valueas each of the properties of the shorthand:flex-direction: as specifiedflex-wrap: as specifiedanimation typediscrete formal syntax <'flex-direction'> | <'flex-wrap'> examples setting column-reverse and wrap element { /* main-axis is the block direction with reversed main-start and main-end.
flex-grow - CSS: Cascading Style Sheets
WebCSSflex-grow
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>.
... 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>.
... 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.
flex-wrap - CSS: Cascading Style Sheets
WebCSSflex-wrap
syntax flex-wrap: nowrap; /* default value */ flex-wrap: wrap; flex-wrap: wrap-reverse; /* global values */ flex-wrap: inherit; flex-wrap: initial; flex-wrap: unset; the flex-wrap property is specified as a single keyword chosen from the list of values below.
... formal definition initial valuenowrapapplies toflex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax nowrap | wrap | wrap-reverse examples setting flex container wrap values html <h4>this is an example for flex-wrap:wrap </h4> <div class="content"> <div class="red">1</div> <div class="green">2</div> <div class="blue">3</div> </div> <h4>this is an example for flex-wrap:nowrap </h4> <div class="content1"> <div class="red">1</div> <div class="green">2</div> <div class="blue">3</di...
float - CSS: Cascading Style Sheets
WebCSSfloat
syntax /* keyword values */ float: left; float: right; float: none; float: inline-start; float: inline-end; /* global values */ float: inherit; float: initial; float: unset; the float property is specified as a single keyword, chosen from the list of values below.
... formal definition initial valuenoneapplies toall elements, but has no effect if the value of display is none.inheritednocomputed valueas specifiedanimation typediscrete formal syntax left | right | none | inline-start | inline-end examples how floated elements are positioned as mentioned above, when an element is floated, it is taken out of the normal flow of the document (though still remaining part of it).
font-family - CSS: Cascading Style Sheets
syntax /* a font family name and a generic family name */ font-family: gill sans extrabold, sans-serif; font-family: "goudy bookletter 1911", sans-serif; /* a generic family name only */ font-family: serif; font-family: sans-serif; font-family: monospace; font-family: cursive; font-family: fantasy; font-family: system-ui; font-family: ui-serif; font-family: ui-sans-serif; font-family: ui-monospace; fo...
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax [ <family-name> | <generic-family> ]#where <family-name> = <string> | <custom-ident>+<generic-family> = serif | sans-serif | cursive | fantasy | monospace examples some common font families .serif { font-family: times, times new roman, georgia, serif; } .sansserif { font-family: verdana, arial, helvetica, sans-serif; } .monospace { font-family: lucida console, courier, monospace; } .
font-feature-settings - CSS: Cascading Style Sheets
syntax /* use the default settings */ font-feature-settings: normal; /* set values for opentype feature tags */ font-feature-settings: "smcp"; font-feature-settings: "smcp" on; font-feature-settings: "swsh" 2; font-feature-settings: "smcp", "swsh" 2; /* global values */ font-feature-settings: inherit; font-feature-settings: initial; font-feature-settings: unset; whenever possible, web authors should instead use the font-variant shorthand property or an associated longhand...
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | <feature-tag-value>#where <feature-tag-value> = <string> [ <integer> | on | off ]?
font-kerning - CSS: Cascading Style Sheets
in the image below, for instance, the examples on the left do not use kerning, while the ones on the right do: syntax the font-kerning property is specified as one of the keyword values listed below.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | normal | none examples enabling and disabling kerning html <div id="kern"></div> <div id="nokern"></div> <textarea id="input">av t.
font-language-override - CSS: Cascading Style Sheets
syntax the font-language-override property is specified as the keyword normal or a <string>.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | <string> examples using danish glyphs html <p class="para1">default language setting.</p> <p class="para2">this is a string with the <code>font-language-override</code> set to danish.</p> css p.para1 { font-language-override: normal; } p.para2 { font-language-override: "dan"; } result specifications specification status comment css fonts modu...
font-optical-sizing - CSS: Cascading Style Sheets
syntax /* keyword values */ font-optical-sizing: none; font-optical-sizing: auto; /* default */ /* global values */ font-optical-sizing: inherit; font-optical-sizing: initial; font-optical-sizing: unset; values none the browser will not modify the shape of glyphs for optimal viewing.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | none examples disabling optical sizing <p class="optical-sizing">this paragraph is optically sized.
font-size-adjust - CSS: Cascading Style Sheets
syntax values none choose the size of the font based only on the font-size property.
...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 { f...
font-size - CSS: Cascading Style Sheets
WebCSSfont-size
syntax /* <absolute-size> values */ font-size: xx-small; font-size: x-small; font-size: small; font-size: medium; font-size: large; font-size: x-large; font-size: xx-large; font-size: xxx-large; /* <relative-size> values */ font-size: smaller; font-size: larger; /* <length> values */ font-size: 12px; font-size: 0.8em; /* <percentage> values */ font-size: 80%; /* global values */ font-size: inherit;...
...it also applies to ::first-letter and ::first-line.inheritedyespercentagesrefer to the parent element's font sizecomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea length formal syntax <absolute-size> | <relative-size> | <length-percentage>where <absolute-size> = xx-small | x-small | small | medium | large | x-large | xx-large | xxx-large<relative-size> = larger | smaller<length-percentage> = <length> | <percentage> examples setting font sizes css .small { font-size: xx-small; } .larger { font-size: larger; } .point { font-size: 24pt; } .percent { font-size: 200%; ...
font-smooth - CSS: Cascading Style Sheets
syntax /* keyword values */ font-smooth: auto; font-smooth: never; font-smooth: always; /* <length> value */ font-smooth: 2em; webkit implements a similar property, but with different values: -webkit-font-smoothing.
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | never | always | <absolute-size> | <length>where <absolute-size> = xx-small | x-small | small | medium | large | x-large | xx-large | xxx-large examples basic usage example the following example shows the safari/chromium and firefox equivalents that turn on font-smoothing on macos.
font-synthesis - CSS: Cascading Style Sheets
syntax this property can take any one of the following forms: the keyword value none.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | [ weight | style ] examples disabling font synthesis html <em class="syn">synthesize me!
font-variant-alternates - CSS: Cascading Style Sheets
syntax this property may take one of two forms: either the keyword normal or one or more of the other keywords and functions listed below, space-separated, in any order.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | [ stylistic( <feature-value-name> ) | historical-forms | styleset( <feature-value-name># ) | character-variant( <feature-value-name># ) | swash( <feature-value-name> ) | ornaments( <feature-value-name> ) | annotation( <feature-value-name> ) ]where <feature-value-name> = <custom-ident> examples html <p>firefox rocks!</p> <p class="variant">firefox rocks!</p> css @font-feature-value...
font-variant-caps - CSS: Cascading Style Sheets
syntax /* keyword values */ font-variant-caps: normal; font-variant-caps: small-caps; font-variant-caps: all-small-caps; font-variant-caps: petite-caps; font-variant-caps: all-petite-caps; font-variant-caps: unicase; font-variant-caps: titling-caps; /* global values */ font-variant-caps: inherit; font-variant-caps: initial; font-variant-caps: unset; the font-variant-caps property is specified using ...
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps examples setting the small-caps font variant html <p class="small-caps">firefox rocks, small caps!</p> <p class="normal">firefox rocks, normal caps!</p> css .small-caps { font-variant-caps: small-caps; font-style: italic; } .normal { font-variant-caps: normal; font-style: italic; } resu...
font-variant-east-asian - CSS: Cascading Style Sheets
-variant-east-asian: traditional; /* <east-asian-variant-values> */ font-variant-east-asian: full-width; /* <east-asian-width-values> */ font-variant-east-asian: proportional-width; /* <east-asian-width-values> */ font-variant-east-asian: ruby full-width jis83; /* global values */ font-variant-east-asian: inherit; font-variant-east-asian: initial; font-variant-east-asian: unset; syntax values normal this keyword leads to the deactivation of the use of such alternate glyphs.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]where <east-asian-variant-values> = [ jis78 | jis83 | jis90 | jis04 | simplified | traditional ]<east-asian-width-values> = [ full-width | proportional-width ] examples setting east asian glyph variants this example require font "yu gothic" installed in your os, other fonts may not support opentype features.
font-variant-ligatures - CSS: Cascading Style Sheets
syntax /* keyword values */ font-variant-ligatures: normal; font-variant-ligatures: none; font-variant-ligatures: common-ligatures; /* <common-lig-values> */ font-variant-ligatures: no-common-ligatures; /* <common-lig-values> */ font-variant-ligatures: discretionary-ligatures; /* <discretionary-lig-values> */ font-variant-ligatures: no-discretionary-ligatures; /* <discretionary-lig-...
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]where <common-lig-values> = [ common-ligatures | no-common-ligatures ]<discretionary-lig-values> = [ discretionary-ligatures | no-discretionary-ligatures ]<historical-lig-values> = [ historical-ligatures | no-historical-ligatures ]<contextual-alt-values> = [ contextual | no-...
font-variant-numeric - CSS: Cascading Style Sheets
syntax font-variant-numeric: normal; font-variant-numeric: ordinal; font-variant-numeric: slashed-zero; font-variant-numeric: lining-nums; /* <numeric-figure-values> */ font-variant-numeric: oldstyle-nums; /* <numeric-figure-values> */ font-variant-numeric: proportional-nums; /* <numeric-spacing-values> */ font-variant-numeric: tabular-nums; /* <numeric-spacing-values> */ font-variant-numeric: diagonal-fractions; /* <numeric-f...
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | [ <numeric-figure-values> | <numeric-spacing-values> | <numeric-fraction-values> | ordinal | slashed-zero ]where <numeric-figure-values> = [ lining-nums | oldstyle-nums ]<numeric-spacing-values> = [ proportional-nums | tabular-nums ]<numeric-fraction-values> = [ diagonal-fractions | stacked-fractions ] examples setting ordinal numeric forms html <p class="ordinal">1st, 2nd, 3rd, 4th...
font-variant-position - CSS: Cascading Style Sheets
syntax the font-variant-position property is specified as one of the keyword values listed below.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | sub | super examples setting superscript and subscript forms html <p class="normal">normal!</p> <p class="super">super!</p> <p class="sub">sub!</p> css p { display: inline; } .normal { font-variant-position: normal; } .super { font-variant-position: super; } .sub { font-variant-position: sub; } result specifications specification status comment ...
font-variant - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric syntax font-variant: small-caps; font-variant: common-ligatures small-caps; /* global values */ font-variant: inherit; font-variant: initial; font-variant: unset; values normal specifies a normal font face; each of the longhand properties has an initial value of normal.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | none | [ <common-lig-values> | <discretionary-lig-values> | <historical-lig-values> | <contextual-alt-values> | stylistic( <feature-value-name> ) | historical-forms | styleset( <feature-value-name># ) | character-variant( <feature-value-name># ) | swash( <feature-value-name> ) | ornaments( <feature-value-name> ) | annotation( <feature-value-name> ) | [ small-caps | all-small-caps | peti...
font-variation-settings - CSS: Cascading Style Sheets
syntax /* use the default settings */ font-variation-settings: normal; /* set values for variable font axis names */ font-variation-settings: "xhgt" 0.7; /* global values */ font-variation-settings: inherit; font-variation-settings: initial; font-variation-settings: unset; values this property's value can take one of two forms: normal text is laid out using default settings.
...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.
font - CSS: Cascading Style Sheets
WebCSSfont
constituent properties this property is a shorthand for the following css properties: font-family font-size font-stretch font-style font-variant font-weight line-height syntax the font property may be specified as either a single keyword, which will select a system font, or as a shorthand for various font-related properties.
...elative 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'> ]?
gap (grid-gap) - CSS: Cascading Style Sheets
WebCSSgap
syntax /* one <length> value */ gap: 20px; gap: 1em; gap: 3vmin; gap: 0.5cm; /* one <percentage> value */ gap: 16%; gap: 100%; /* two <length> values */ gap: 20px 10px; gap: 1em 0.5em; gap: 3vmin 2vmax; gap: 0.5cm 2mm; /* one or two <percentage> values */ gap: 16% 100%; gap: 21px 82%; /* calc() values */ gap: calc(10% + 20px); gap: calc(20px + 10%) calc(10% - 5px); /* global values */ gap: inherit...
...ties of the shorthand:row-gap: as specified, with <length>s made absolute, and normal computing to zero except on multi-column elementscolumn-gap: as specified, with <length>s made absolute, and normal computing to zero except on multi-column elementsanimation typeas each of the properties of the shorthand:row-gap: a length, percentage or calc();column-gap: a length, percentage or calc(); formal syntax <'row-gap'> <'column-gap'>?
grid-area - CSS: Cascading Style Sheets
WebCSSgrid-area
constituent properties this property is a shorthand for the following css properties: grid-column-end grid-column-start grid-row-end grid-row-start syntax /* keyword values */ grid-area: auto; grid-area: auto / auto; grid-area: auto / auto / auto; grid-area: auto / auto / auto / auto; /* <custom-ident> values */ grid-area: some-grid-area; grid-area: some-grid-area / another-grid-area; /* <integer> && <custom-ident>?
...shorthand:grid-row-start: autogrid-column-start: autogrid-row-end: autogrid-column-end: autoapplies togrid items and absolutely-positioned boxes whose containing block is a grid containerinheritednocomputed valueas each of the properties of the shorthand:grid-row-start: as specifiedgrid-column-start: as specifiedgrid-row-end: as specifiedgrid-column-end: as specifiedanimation typediscrete formal syntax <grid-line> [ / <grid-line> ]{0,3}where <grid-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
grid-auto-columns - CSS: Cascading Style Sheets
syntax /* keyword values */ grid-auto-columns: min-content; grid-auto-columns: max-content; grid-auto-columns: auto; /* <length> values */ grid-auto-columns: 100px; grid-auto-columns: 20cm; grid-auto-columns: 50vmax; /* <percentage> values */ grid-auto-columns: 10%; grid-auto-columns: 33.3%; /* <flex> values */ grid-auto-columns: 0.5fr; grid-auto-columns: 3fr; /* minmax() values */ grid-auto-column...
... formal definition initial valueautoapplies togrid containersinheritednopercentagesrefer to corresponding dimension of the content areacomputed valuethe percentage as specified or the absolute lengthanimation typediscrete formal syntax <track-size>+where <track-size> = <track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )where <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-breadth> = <length> | <percentage> | min-content | max-content | autowhere <length-percentage> = <length> | <percentage> examples setting grid column si...
grid-auto-flow - CSS: Cascading Style Sheets
syntax /* keyword values */ grid-auto-flow: row; grid-auto-flow: column; grid-auto-flow: dense; grid-auto-flow: row dense; grid-auto-flow: column dense; /* global values */ grid-auto-flow: inherit; grid-auto-flow: initial; grid-auto-flow: unset; this property may take one of two forms: a single keyword: one of row, column, or dense.
... formal definition initial valuerowapplies togrid containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ row | column ] | dense examples setting grid auto-placement html <div id="grid"> <div id="item1"></div> <div id="item2"></div> <div id="item3"></div> <div id="item4"></div> <div id="item5"></div> </div> <select id="direction" onchange="changegridautoflow()"> <option value="column">column</option> <option value="row">row</option> </select> <input id="dense" type="checkbox" onc...
grid-auto-rows - CSS: Cascading Style Sheets
syntax /* keyword values */ grid-auto-rows: min-content; grid-auto-rows: max-content; grid-auto-rows: auto; /* <length> values */ grid-auto-rows: 100px; grid-auto-rows: 20cm; grid-auto-rows: 50vmax; /* <percentage> values */ grid-auto-rows: 10%; grid-auto-rows: 33.3%; /* <flex> values */ grid-auto-rows: 0.5fr; grid-auto-rows: 3fr; /* minmax() values */ grid-auto-rows: minmax(100px, auto); grid-auto...
... formal definition initial valueautoapplies togrid containersinheritednopercentagesrefer to corresponding dimension of the content areacomputed valuethe percentage as specified or the absolute lengthanimation typediscrete formal syntax <track-size>+where <track-size> = <track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )where <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-breadth> = <length> | <percentage> | min-content | max-content | autowhere <length-percentage> = <length> | <percentage> examples setting grid row size ...
grid-column-end - CSS: Cascading Style Sheets
syntax /* keyword value */ grid-column-end: auto; /* <custom-ident> values */ grid-column-end: somegridarea; /* <integer> + <custom-ident> values */ grid-column-end: 2; grid-column-end: somegridarea 4; /* span + <integer> + <custom-ident> values */ grid-column-end: span 3; grid-column-end: span somegridarea; grid-column-end: 5 somegridarea span; /* global values */ grid-column-end: inherit; grid-co...
... formal definition initial valueautoapplies togrid items and absolutely-positioned boxes whose containing block is a grid containerinheritednocomputed valueas specifiedanimation typediscrete formal syntax <grid-line>where <grid-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
grid-column-start - CSS: Cascading Style Sheets
syntax /* keyword value */ grid-column-start: auto; /* <custom-ident> value */ grid-column-start: somegridarea; /* <integer> + <custom-ident> values */ grid-column-start: 2; grid-column-start: somegridarea 4; /* span + <integer> + <custom-ident> values */ grid-column-start: span 3; grid-column-start: span somegridarea; grid-column-start: span somegridarea 5; /* global values */ grid-column-start: i...
... formal definition initial valueautoapplies togrid items and absolutely-positioned boxes whose containing block is a grid containerinheritednocomputed valueas specifiedanimation typediscrete formal syntax <grid-line>where <grid-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
grid-column - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: grid-column-end grid-column-start syntax this property is specified as one or two <grid-line> values.
... formal definition initial valueas each of the properties of the shorthand:grid-column-start: autogrid-column-end: autoapplies togrid items and absolutely-positioned boxes whose containing block is a grid containerinheritednocomputed valueas each of the properties of the shorthand:grid-column-start: as specifiedgrid-column-end: as specifiedanimation typediscrete formal syntax <grid-line> [ / <grid-line> ]?where <grid-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
grid-row-end - CSS: Cascading Style Sheets
syntax /* keyword value */ grid-row-end: auto; /* <custom-ident> values */ grid-row-end: somegridarea; /* <integer> + <custom-ident> values */ grid-row-end: 2; grid-row-end: somegridarea 4; /* span + <integer> + <custom-ident> values */ grid-row-end: span 3; grid-row-end: span somegridarea; grid-row-end: 5 somegridarea span; /* global values */ grid-row-end: inherit; grid-row-end: initial; grid-row...
... formal definition initial valueautoapplies togrid items and absolutely-positioned boxes whose containing block is a grid containerinheritednocomputed valueas specifiedanimation typediscrete formal syntax <grid-line>where <grid-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
grid-row-start - CSS: Cascading Style Sheets
syntax /* keyword value */ grid-row-start: auto; /* <custom-ident> values */ grid-row-start: somegridarea; /* <integer> + <custom-ident> values */ grid-row-start: 2; grid-row-start: somegridarea 4; /* span + <integer> + <custom-ident> values */ grid-row-start: span 3; grid-row-start: span somegridarea; grid-row-start: 5 somegridarea span; /* global values */ grid-row-start: inherit; grid-row-start:...
... formal definition initial valueautoapplies togrid items and absolutely-positioned boxes whose containing block is a grid containerinheritednocomputed valueas specifiedanimation typediscrete formal syntax <grid-line>where <grid-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
grid-row - CSS: Cascading Style Sheets
WebCSSgrid-row
constituent properties this property is a shorthand for the following css properties: grid-row-end grid-row-start syntax /* keyword values */ grid-row: auto; grid-row: auto / auto; /* <custom-ident> values */ grid-row: somegridarea; grid-row: somegridarea / someothergridarea; /* <integer> + <custom-ident> values */ grid-row: somegridarea 4; grid-row: 4 somegridarea / 6; /* span + <integer> + <custom-ident> values */ grid-row: span 3; grid-row: span somegridarea; grid-row: 5 somegridarea span; grid-row: span 3 /...
... formal definition initial valueas each of the properties of the shorthand:grid-row-start: autogrid-row-end: autoapplies togrid items and absolutely-positioned boxes whose containing block is a grid containerinheritednocomputed valueas each of the properties of the shorthand:grid-row-start: as specifiedgrid-row-end: as specifiedanimation typediscrete formal syntax <grid-line> [ / <grid-line> ]?where <grid-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
grid-template-areas - CSS: Cascading Style Sheets
syntax /* keyword value */ grid-template-areas: none; /* <string> values */ grid-template-areas: "a b"; grid-template-areas: "a b b" "a c d"; /* global values */ grid-template-areas: inherit; grid-template-areas: initial; grid-template-areas: unset; values none the grid container doesn’t define any named grid areas.
... formal definition initial valuenoneapplies togrid containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | <string>+ examples specifying named grid areas html <section id="page"> <header>header</header> <nav>navigation</nav> <main>main area</main> <footer>footer</footer> </section> css #page { display: grid; width: 100%; height: 250px; grid-template-areas: "head head" "nav main" "nav foot"; grid-template-rows: 50px 1fr 30p...
grid-template-columns - CSS: Cascading Style Sheets
syntax /* keyword value */ grid-template-columns: none; /* <track-list> values */ grid-template-columns: 100px 1fr; grid-template-columns: [linename] 100px; grid-template-columns: [linename1] 100px [linename2 linename3]; grid-template-columns: minmax(100px, 1fr); grid-template-columns: fit-content(40%); grid-template-columns: repeat(3, 200px); grid-template-columns: subgrid; /* <auto-track-list> values */ grid-template-columns: 200px repeat(auto-fill, 1...
... formal definition initial valuenoneapplies togrid containersinheritednopercentagesrefer to corresponding dimension of the content areacomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typesimple list of length, percentage, or calc, provided the only differences are in the values of the length, percentage, or calc components in the list formal syntax none | <track-list> | <auto-track-list> | subgrid <line-name-list>?where <track-list> = [ <line-names>?
grid-template-rows - CSS: Cascading Style Sheets
syntax /* keyword value */ grid-template-rows: none; /* <track-list> values */ grid-template-rows: 100px 1fr; grid-template-rows: [linename] 100px; grid-template-rows: [linename1] 100px [linename2 linename3]; grid-template-rows: minmax(100px, 1fr); grid-template-rows: fit-content(40%); grid-template-rows: repeat(3, 200px); grid-template-rows: subgrid; /* <auto-track-list> values */ grid-template-rows: 200px repeat(auto-fill, 100px) 300px; grid-template-rows: ...
... formal definition initial valuenoneapplies togrid containersinheritednopercentagesrefer to corresponding dimension of the content areacomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typesimple list of length, percentage, or calc, provided the only differences are in the values of the length, percentage, or calc components in the list formal syntax none | <track-list> | <auto-track-list> | subgrid <line-name-list>?where <track-list> = [ <line-names>?
grid - CSS: Cascading Style Sheets
WebCSSgrid
constituent properties this property is a shorthand for the following css properties: grid-auto-columns grid-auto-flow grid-auto-rows grid-template-areas grid-template-columns grid-template-rows syntax /* <'grid-template'> values */ grid: none; grid: "a" 100px "b" 1fr; grid: [linename1] "a" 100px [linename2]; grid: "a" 200px "b" min-content; grid: "a" minmax(100px, max-content) "b" 20%; grid: 100px / 200px; grid: minmax(400px, min-content) / repeat(auto-fill, 50px); /* <'grid-template-rows'> / [ auto-flow && dense?
...specifiedgrid-column-gap: the percentage as specified or the absolute lengthgrid-row-gap: the percentage as specified or the absolute lengthcolumn-gap: as specified, with <length>s made absolute, and normal computing to zero except on multi-column elementsrow-gap: as specified, with <length>s made absolute, and normal computing to zero except on multi-column elementsanimation typediscrete formal syntax <'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense?
height - CSS: Cascading Style Sheets
WebCSSheight
syntax /* keyword value */ height: auto; /* <length> values */ height: 120px; height: 10em; /* <percentage> value */ height: 75%; /* global values */ height: inherit; height: initial; height: unset; values <length> defines the height as an absolute value.
...a percentage height on the root element is relative to the initial containing block.computed valuea percentage or auto or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting height using pixels and percentages html <div id="taller">i'm 50 pixels tall.</div> <div id="shorter">i'm 25 pixels tall.</div> <div id="parent"> <div id="child"> i'm half the height of my parent.
hyphens - CSS: Cascading Style Sheets
WebCSShyphens
syntax /* keyword values */ hyphens: none; hyphens: manual; hyphens: auto; /* global values */ hyphens: inherit; hyphens: initial; hyphens: unset; the hyphens property is specified as a single keyword value chosen from the list below.
... formal definition initial valuemanualapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | manual | auto examples specifying text hyphenation this example uses three classes, one for each possible configuration of the hyphens property.
image-orientation - CSS: Cascading Style Sheets
obsolete since gecko 63 */ image-orientation: 90deg; /* rotate 90deg */ image-orientation: 90deg flip; /* rotate 90deg, and flip it horizontally */ image-orientation: flip; /* no rotation, only applies a horizontal flip */ syntax values none default initial value.
... formal definition initial value0degapplies toall elementsinheritedyescomputed valuean <angle>, rounded to the next quarter turn from 0deg and normalized, that is moduloing the value by 1turnanimation typediscrete formal syntax from-image | <angle> | [ <angle>?
image-rendering - CSS: Cascading Style Sheets
syntax /* keyword values */ image-rendering: auto; image-rendering: crisp-edges; image-rendering: pixelated; /* global values */ image-rendering: inherit; image-rendering: initial; image-rendering: unset; values auto the scaling algorithm is ua dependent.
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | crisp-edges | pixelated examples setting image scaling algorithms in practical use, the pixelated and crisp-edges rules can be combined to provide some fallback for each other.
ime-mode - CSS: Cascading Style Sheets
WebCSSime-mode
syntax the ime-mode property is specified using one of the keyword values listed below.
... formal definition initial valueautoapplies totext fieldsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | normal | active | inactive | disabled examples disabling input method support this example disables input method support for a form field.
Inheritance - CSS: Cascading Style Sheets
see also css values for controlling inheritance: inherit, initial, unset, and revert introducing the css cascade cascade and inheritance css key concepts: css syntax, at-rule, comments, specificity and inheritance, the box, layout modes and visual formatting models, and margin collapsing, or the initial, computed, resolved, specified, used, and actual values.
... definitions of value syntax, shorthand properties and replaced elements.
initial-letter-align - CSS: Cascading Style Sheets
/* keyword values */ initial-letter-align: auto; initial-letter-align: alphabetic; initial-letter-align: hanging; initial-letter-align: ideographic; /* global values */ initial-letter-align: inherit; initial-letter-align: initial; initial-letter-align: unset; syntax one of the keyword values listed below.
... formal definition initial valueautoapplies to::first-letter pseudo-elements and inline-level first child of a block containerinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ auto | alphabetic | hanging | ideographic ] examples aligning initial letter html <p class="auto ">initial letter - auto</p> <p class="alphabetic">initial letter - alphabetic</p> <p class="hanging">initial letter - hanging</p> <p class="ideographic">initial letter - ideographic</p> css .auto { -webkit-initial-letter-align: auto; initial-letter-align: auto; } .alphabetic { -webkit...
initial-letter - CSS: Cascading Style Sheets
/* keyword values */ initial-letter: 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>.
... formal definition initial valuenormalapplies to::first-letter pseudo-elements and inline-level first child of a block containerinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | [ <number> <integer>?
inline-size - CSS: Cascading Style Sheets
syntax /* <length> values */ inline-size: 300px; inline-size: 25em; /* <percentage> values */ inline-size: 75%; /* keyword values */ inline-size: max-content; inline-size: min-content; inline-size: fit-content(20em); inline-size: auto; /* global values */ inline-size: inherit; inline-size: initial; inline-size: unset; if the writing mode is vertically oriented, the value of inline-size relates to ...
... formal definition initial valueautoapplies tosame as width and heightinheritednopercentagesinline-size of containing blockcomputed valuesame as width and heightanimation typea length, percentage or calc(); formal syntax <'width'> examples setting inline size in pixels html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; inline-size: 110px; } result specifications specification status comment css logical properties and values level 1the definition of 'inline-size' in that specification.
inset-block-end - CSS: Cascading Style Sheets
/* <length> values */ inset-block-end: 3px; inset-block-end: 2.4em; /* <percentage>s of the width or height of the containing block */ inset-block-end: 10%; /* keyword value */ inset-block-end: auto; /* global values */ inset-block-end: inherit; inset-block-end: initial; inset-block-end: unset; syntax values the inset-block-end property takes the same values as the left property.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-height of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'> examples setting block end offset html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; position: relative; inset-block-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-block-end' in that specification.
inset-block-start - CSS: Cascading Style Sheets
/* <length> values */ inset-block-start: 3px; inset-block-start: 2.4em; /* <percentage>s of the width or height of the containing block */ inset-block-start: 10%; /* keyword value */ inset-block-start: auto; /* global values */ inset-block-start: inherit; inset-block-start: initial; inset-block-start: unset; syntax values the inset-block-start property takes the same values as the left property.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-height of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'> examples setting block start offset html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; position: relative; inset-block-start: 20px; background-color: #c8c800; } specifications specification status comment css logical properties and values level 1the definition of 'inset-block-start' in that specification.
inset-block - CSS: Cascading Style Sheets
inset-block: 10px; /* value applied to start and end */ /* <percentage>s of the width or height of the containing block */ inset-block: 10% 5%; /* keyword value */ inset-block: auto; /* global values */ inset-block: inherit; inset-block: initial; inset-block: unset; constituent properties this property is a shorthand for the following css properties: inset-block-end inset-block-start syntax values the inset-block property takes the same values as the left property.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-height of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'>{1,2} examples setting block start and end offsets html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; position: relative; inset-block: 20px 50px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-block' in that specification.
inset-inline-end - CSS: Cascading Style Sheets
syntax values the inset-inline-end property takes the same values as the left property.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-width of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'> examples setting inline end offset html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; position: relative; inset-inline-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-inline-end' in that specification.
inset-inline-start - CSS: Cascading Style Sheets
syntax values the inset-inline-start property takes the same values as the left property.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-width of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'> examples setting inline start offset html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; position: relative; inset-inline-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-inline-start' in that specification.
inset-inline - CSS: Cascading Style Sheets
nline: 10px; /* value applied to start and end */ /* <percentage>s of the width or height of the containing block */ inset-inline: 10% 5%; /* keyword value */ inset-inline: auto; /* global values */ inset-inline: inherit; inset-inline: initial; inset-inline: unset; constituent properties this property is a shorthand for the following css properties: inset-inline-end inset-inline-start syntax values the inset-inline property takes the same values as the left property.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-width of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'>{1,2} examples setting inline start and end offsets html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; position: relative; inset-inline: 20px 50px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-inline' in that specification.
isolation - CSS: Cascading Style Sheets
WebCSSisolation
syntax /* keyword values */ isolation: auto; isolation: isolate; /* global values */ isolation: inherit; isolation: initial; isolation: unset; the isolation property is specified as one of the keyword values listed below.
...in svg, it applies to container elements, graphics elements, and graphics referencing elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | isolate examples forcing a new stacking context for an element html <div id="b" class="a"> <div id="d"> <div class="a c">auto</div> </div> <div id="e"> <div class="a c">isolate</div> </div> </div> css .a { background-color: rgb(0,255,0); } #b { width: 200px; height: 210px; } .c { width: 100px; height: 100px; border: 1px solid black; padding: 2px; mix-blend-...
justify-content - CSS: Cascading Style Sheets
syntax /* positional alignment */ justify-content: center; /* pack items around the center */ justify-content: start; /* pack items from the start */ justify-content: end; /* pack items from the end */ justify-content: flex-start; /* pack flex items from the start */ justify-content: flex-end; /* pack flex items from the end */ justify-content: left; /* pack items from the left ...
... formal definition initial valuenormalapplies toflex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | <content-distribution> | <overflow-position>?
justify-items - CSS: Cascading Style Sheets
in table cell layouts, this property is ignored (more about alignment in block, absolute positioned and table layout) in flexbox layouts, this property is ignored (more about alignment in flexbox) in grid layouts, it aligns the items inside their grid areas on the inline axis (more about alignment in grid layouts) syntax /* basic keywords */ justify-items: auto; justify-items: normal; justify-items: stretch; /* positional alignment */ justify-items: center; /* pack items around the center */ justify-items: start; /* pack items from the start */ justify-items: end; /* pack items from the end */ justify-items: flex-start; /* equivalent to 'start'.
... formal definition initial valuelegacyapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | stretch | <baseline-position> | <overflow-position>?
justify-self - CSS: Cascading Style Sheets
in table cell layouts, this property is ignored (more about alignment in block, absolute positioned and table layout) in flexbox layouts, this property is ignored (more about alignment in flexbox) in grid layouts, it aligns an item inside its grid area on the inline axis (more about alignment in grid layouts) syntax /* basic keywords */ justify-self: auto; justify-self: normal; justify-self: stretch; /* positional alignment */ justify-self: center; /* pack item around the center */ justify-self: start; /* pack item from the start */ justify-self: end; /* pack item from the end */ justify-self: flex-start; /* equivalent to 'start'.
... formal definition initial valueautoapplies toblock-level boxes, absolutely-positioned boxes, and grid itemsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | normal | stretch | <baseline-position> | <overflow-position>?
left - CSS: Cascading Style Sheets
WebCSSleft
syntax /* <length> values */ left: 3px; left: 2.4em; /* <percentage>s of the width of the containing block */ left: 10%; /* keyword value */ left: auto; /* global values */ left: inherit; left: initial; left: unset; values <length> a negative, null, or positive <length> that represents: for absolutely positioned elements, the distance to the left edge of the containing block.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentagesrefer to the width of the containing blockcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length, percentage or calc(); formal syntax <length> | <percentage> | auto examples positioning elements html <div id="wrap"> <div id="example_1"> <pre> position: absolute; left: 20px; top: 20px; </pre> <p>the only containing element for this div is the main window, so it positions itself in relation to it.</p> </div> <div id="example_2"> <pre> position: relative; top: 0; righ...
letter-spacing - CSS: Cascading Style Sheets
syntax /* keyword value */ letter-spacing: normal; /* <length> values */ letter-spacing: 0.3em; letter-spacing: 3px; letter-spacing: .3px; /* global values */ letter-spacing: inherit; letter-spacing: initial; letter-spacing: unset; values normal the normal letter spacing for the current font.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valuean optimum value consisting of either an absolute length or the keyword normalanimation typea length formal syntax normal | <length> examples setting letter spacing html <p class="normal">letter spacing</p> <p class="em-wide">letter spacing</p> <p class="em-wider">letter spacing</p> <p class="em-tight">letter spacing</p> <p class="px-wide">letter spacing</p> css .normal { letter-spacing: normal; } .em-wide { letter-spacing: 0.4em; } .em-wider { letter-spacing: 1em; } .em-tight { letter-spacing: -0.
line-break - CSS: Cascading Style Sheets
/* keyword values */ line-break: auto; line-break: loose; line-break: normal; line-break: strict; line-break: anywhere; /* global values */ line-break: inherit; line-break: initial; line-break: unset; syntax values auto break text using the default line break rule.
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | loose | normal | strict | anywhere examples setting text wrapping see whether the text is wrapped before "々", "ぁ" and "。".
line-height-step - CSS: Cascading Style Sheets
/* point values */ line-height-step: 18pt; syntax the line-height-step property is specified as any one of the following: a <length>.
... formal definition initial value0applies toblock containersinheritedyescomputed valueabsolute <length>animation typediscrete formal syntax <length> examples setting step unit for line box height in the following example, the height of line box in each paragraph is rounded up to the step unit.
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 <len...
...it also applies to ::first-letter and ::first-line.inheritedyespercentagesrefer to the font size of the element itselfcomputed valuefor percentage and length values, the absolute length, otherwise as specifiedanimation typeeither number or length formal syntax normal | <number> | <length> | <percentage> examples basic example /* all rules below have the same resultant line height */ div { line-height: 1.2; font-size: 10pt; } /* number/unitless */ div { line-height: 1.2em; font-size: 10pt; } /* length */ div { line-height: 120%; font-size: 10pt; } /* percentage */ div { font: 10pt/1.2 georgia,"bitstream charter",serif; } /* font shorthand...
list-style-image - CSS: Cascading Style Sheets
syntax /* keyword values */ list-style-image: none; /* <url> values */ list-style-image: url('starsolid.gif'); /* global values */ list-style-image: inherit; list-style-image: initial; list-style-image: unset; values <url> location of image to use as the marker.
... formal definition initial valuenoneapplies tolist itemsinheritedyescomputed valuenone or the image with its uri made absoluteanimation typediscrete formal syntax <url> | none examples setting list item images html <ul> <li>item 1</li> <li>item 2</li> </ul> css ul { list-style-image: url("https://mdn.mozillademos.org/files/11981/starsolid.gif"); } result specifications specification status comment css lists module level 3the definition of 'list-style-image' in that specification.
list-style-position - CSS: Cascading Style Sheets
syntax /* keyword values */ list-style-position: inside; list-style-position: outside; /* global values */ list-style-position: inherit; list-style-position: initial; list-style-position: unset; the list-style-position property is specified as one of the keyword values listed below.
... formal definition initial valueoutsideapplies tolist itemsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax inside | outside examples setting list item position html <ul class="inside">list 1 <li>list item 1-1</li> <li>list item 1-2</li> <li>list item 1-3</li> <li>list item 1-4</li> </ul> <ul class="outside">list 2 <li>list item 2-1</li> <li>list item 2-2</li> <li>list item 2-3</li> <li>list item 2-4</li> </ul> <ul class="inside-img">list 3 <li>list item 3-1</li> <li>list item 3-2</li> <li>list item 3-3</li> <li>list item 3-4</li> </ul> css .inside { list-style-position: inside; list-style-...
list-style - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: list-style-image list-style-position list-style-type syntax /* type */ list-style: square; /* image */ list-style: url('../img/shape.png'); /* position */ list-style: inside; /* type | position */ list-style: georgian inside; /* type | image | position */ list-style: lower-roman url('../img/shape.png') outside; /* keyword value */ list-style: none; /* global values */ list-style: inherit; list-style: initial; list-style: unset; the list-style pro...
...cag 2.0 formal definition initial valueas each of the properties of the shorthand:list-style-type: disclist-style-position: outsidelist-style-image: noneapplies tolist itemsinheritedyescomputed valueas each of the properties of the shorthand:list-style-image: none or the image with its uri made absolutelist-style-position: as specifiedlist-style-type: as specifiedanimation typediscrete formal syntax <'list-style-type'> | <'list-style-position'> | <'list-style-image'> examples setting list style type and position html list 1 <ul class="one"> <li>list item1</li> <li>list item2</li> <li>list item3</li> </ul> list 2 <ul class="two"> <li>list item a</li> <li>list item b</li> <li>list item c</li> </ul> css .one { list-style: circle; } .two { list-style: square inside; } r...
margin-block-end - CSS: Cascading Style Sheets
syntax /* <length> values */ margin-block-end: 10px; /* an absolute length */ margin-block-end: 1em; /* relative to the text size */ margin-block-end: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-block-end: auto; /* global values */ margin-block-end: inherit; margin-block-end: initial; margin-block-end: unset; it corresponds to the margin-top, margin-r...
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples setting block end margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-block-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties...
margin-block-start - CSS: Cascading Style Sheets
syntax /* <length> values */ margin-block-start: 10px; /* an absolute length */ margin-block-start: 1em; /* relative to the text size */ margin-block-start: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-block-start: auto; /* global values */ margin-block-start: inherit; margin-block-start: initial; margin-block-start: unset; it corresponds to the margin...
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples setting block start margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; margin-block-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical proper...
margin-block - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: margin-block-end margin-block-start syntax values the margin-block property takes the same values as the margin-left property.
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typediscrete formal syntax <'margin-left'>{1,2} examples setting block start and end margins html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-block: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-block' in that specification.
margin-bottom - CSS: Cascading Style Sheets
syntax /* <length> values */ margin-bottom: 10px; /* an absolute length */ margin-bottom: 1em; /* relative to the text size */ margin-bottom: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-bottom: auto; /* global values */ margin-bottom: inherit; margin-bottom: initial; margin-bottom: unset; the margin-bottom property is specified as the keyword auto, or...
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> | auto examples setting positive and negative bottom margins html <div class="container"> <div class="box0">box 0</div> <div class="box1">box 1</div> <div class="box2">box one's negative margin pulls me up</div> </div> css css for divs to set margin-bottom and height .box0 { margin-bottom:1em; height:3em; } .box1 { margin-bottom:-1.5em; height:4em; ...
margin-inline-end - CSS: Cascading Style Sheets
syntax /* <length> values */ margin-inline-end: 10px; /* an absolute length */ margin-inline-end: 1em; /* relative to the text size */ margin-inline-end: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-inline-end: auto; /* global values */ margin-inline-end: inherit; margin-inline-end: initial; margin-inline-end: unset; it relates to margin-block-start...
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples setting inline end margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; margin-inline-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properti...
margin-inline-start - CSS: Cascading Style Sheets
syntax /* <length> values */ margin-inline-start: 10px; /* an absolute length */ margin-inline-start: 1em; /* relative to the text size */ margin-inline-start: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-inline-start: auto; /* global values */ margin-inline-start: inherit; it relates to margin-block-start, margin-block-end, and margin-inline-end, whic...
...formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples setting inline start margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; margin-inline-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical prop...
margin-inline - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: margin-inline-end margin-inline-start syntax values the margin-inline property takes the same values as the margin-left property.
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typediscrete formal syntax <'margin-left'>{1,2} examples setting inline start and end margins html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-inline: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-inline' in that specification.
margin-left - CSS: Cascading Style Sheets
syntax /* <length> values */ margin-left: 10px; /* an absolute length */ margin-left: 1em; /* relative to the text size */ margin-left: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-left: auto; /* global values */ margin-left: inherit; margin-left: initial; margin-left: unset; the margin-left property is specified as the keyword auto, or a <length>, or ...
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> | auto examples setting left margin using pixels and percentages .content { margin-left: 5%; } .sidebox { margin-left: 10px; } .logo { margin-left: -5px; } specifications specification status comment css basic box modelthe definition of 'margin-left' in that specification.
margin-right - CSS: Cascading Style Sheets
syntax /* <length> values */ margin-right: 20px; /* an absolute length */ margin-right: 1em; /* relative to the text size */ margin-right: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-right: auto; /* global values */ margin-right: inherit; margin-right: initial; margin-right: unset; the margin-right property is specified as the keyword auto, or a <leng...
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> | auto examples setting right margin using pixels and percentages .content { margin-right: 5%; } .sidebox { margin-right: 10px; } .logo { margin-right: -5px; } specifications specification status comment css basic box modelthe definition of 'margin-right' in that specification.
margin-top - CSS: Cascading Style Sheets
syntax /* <length> values */ margin-top: 10px; /* an absolute length */ margin-top: 1em; /* relative to the text size */ margin-top: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-top: auto; /* global values */ margin-top: inherit; margin-top: initial; margin-top: unset; the margin-top property is specified as the keyword auto, or a <length>, or a <perce...
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> | auto examples setting positive and negative top margins .content { margin-top: 5%; } .sidebox { margin-top: 10px; } .logo { margin-top: -5px; } #footer { margin-top: 1em; } specifications specification status comment css basic box modelthe definition of 'margin-top' in that specification.
margin-trim - CSS: Cascading Style Sheets
syntax none margins are not trimmed by the container.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax none | in-flow | all examples basic usage once support is implemented for this property, it will probably work like so: when you've got a container with some inline children and you want to put a margin between each child but not have it interfere with the spacing at the end of the row, you might do something like this: article { background-color: red; margin: 20px; padding: 20px; d...
margin - CSS: Cascading Style Sheets
WebCSSmargin
syntax /* apply to all four sides */ margin: 1em; margin: -3px; /* vertical | horizontal */ margin: 5% auto; /* top | horizontal | bottom */ margin: 1em auto 2em; /* top | right | bottom | left */ margin: 2px 1em 0 auto; /* global values */ margin: inherit; margin: initial; margin: unset; the margin property may be specified using one, two, three, or four values.
... formal syntax [ <length> | <percentage> | auto ]{1,4} examples simple example html <div class="center">this element is centered.</div> <div class="outside">this element is positioned outside of its container.</div> css .center { margin: auto; background: lime; width: 66%; } .outside { margin: 3rem 0 0 -3rem; background: cyan; width: 66%; } more examples margin: 5%; /* a...
mask-border-mode - CSS: Cascading Style Sheets
syntax /* keyword values */ mask-border-mode: luminance; mask-border-mode: alpha; /* global values */ mask-border-mode: inherit; mask-border-mode: initial; mask-border-mode: unset; values luminance the luminance values of the mask border image are used as the mask values.
... formal definition initial valuealphaapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax luminance | alpha examples basic usage this property doesn't yet seem to have support anywhere.
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.
... 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-repeat - CSS: Cascading Style Sheets
syntax /* keyword value */ mask-border-repeat: stretch; mask-border-repeat: repeat; mask-border-repeat: round; mask-border-repeat: space; /* vertical | horizontal */ mask-border-repeat: round stretch; /* global values */ mask-border-repeat: inherit; mask-border-repeat: initial; mask-border-repeat: unset; the mask-border-repeat property may be specified using one or two values chosen from the list of values below.
... formal definition initial valuestretchapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ stretch | repeat | round | space ]{1,2} examples basic usage this property doesn't appear to be supported anywhere yet.
mask-border-slice - CSS: Cascading Style Sheets
syntax /* all sides */ mask-border-slice: 30%; /* vertical | horizontal */ 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.
... 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.
mask-border-source - CSS: Cascading Style Sheets
syntax /* keyword value */ mask-border-source: none; /* <image> values */ mask-border-source: url(image.jpg); mask-border-source: linear-gradient(to top, red, yellow); /* global values */ mask-border-source: inherit; mask-border-source: initial; mask-border-source: unset; values none no mask border is used.
... formal definition initial valuenoneapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specified, but with <url> values made absoluteanimation typediscrete formal syntax none | <image>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
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.
... 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.
mask-border - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: mask-border-mode mask-border-outset mask-border-repeat mask-border-slice mask-border-source mask-border-width syntax /* source | slice */ mask-border: url('border-mask.png') 25; /* source | slice | repeat */ mask-border: url('border-mask.png') 25 space; /* source | slice | width */ mask-border: url('border-mask.png') 25 / 35px; /* source | slice | width | outset | repeat | mode */ mask-border: url('border-mask.png') 25 / 35px / 12px space alpha; values <'mask-border-source'> the source image.
...ce: as specified, but with <url> values made absolutemask-border-width: as specified, but with relative lengths converted into absolute lengthsanimation typeas each of the properties of the shorthand:mask-border-mode: discretemask-border-outset: discretemask-border-repeat: discretemask-border-slice: discretemask-border-source: discretemask-border-width: discretecreates stacking contextyes formal syntax <'mask-border-source'> | <'mask-border-slice'> [ / <'mask-border-width'>?
mask-clip - CSS: Cascading Style Sheets
WebCSSmask-clip
stroke-box; mask-clip: view-box; /* keyword values */ mask-clip: no-clip; /* non-standard keyword values */ -webkit-mask-clip: border; -webkit-mask-clip: padding; -webkit-mask-clip: content; -webkit-mask-clip: text; /* multiple values */ mask-clip: padding-box, no-clip; mask-clip: view-box, fill-box, border-box; /* global values */ mask-clip: inherit; mask-clip: initial; mask-clip: unset; syntax one or more of the keyword values listed below, separated by commas.
... formal definition initial valueborder-boxapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ <geometry-box> | no-clip ]#where <geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <shape-box> = <box> | margin-boxwhere <box> = border-box | padding-box | content-box examples clipping a mask to the border box css #masked { width: 100px; height: 100px; background-color: #8cffa0; margin: 20px; border: 20px solid #8ca0ff; padding: 20px; mask-image: url(https:...
mask-composite - CSS: Cascading Style Sheets
/* keyword values */ mask-composite: add; mask-composite: subtract; mask-composite: intersect; mask-composite: exclude; /* global values */ mask-composite: inherit; mask-composite: initial; mask-composite: unset; syntax one or more of the keyword values listed below, separated by commas.
... formal definition initial valueaddapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <compositing-operator>#where <compositing-operator> = add | subtract | intersect | exclude examples compositing mask layers with addition css #masked { width: 100px; height: 100px; background-color: #8cffa0; mask-image: url(https://mdn.mozillademos.org/files/12668/mdn.svg), url(https://mdn.mozillademos.org/files/12676/star.svg); mask-size: 100% 100%; mask-composite:...
mask-image - CSS: Cascading Style Sheets
mage: none; /* <mask-source> value */ mask-image: url(masks.svg#mask1); /* <image> values */ mask-image: linear-gradient(rgba(0, 0, 0, 1.0), transparent); mask-image: image(url(mask.png), skyblue); /* multiple values */ mask-image: image(url(mask.png), skyblue), linear-gradient(rgba(0, 0, 0, 1.0), transparent); /* global values */ mask-image: inherit; mask-image: initial; mask-image: unset; syntax values none this keyword is interpreted as a transparent black image layer.
... formal definition initial valuenoneapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specified, but with <url> values made absoluteanimation typediscrete formal syntax <mask-reference>#where <mask-reference> = none | <image> | <mask-source>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient><mask-source> = <url>where <image()> = image( <image-tags>?
mask-mode - CSS: Cascading Style Sheets
WebCSSmask-mode
/* keyword values */ mask-mode: alpha; mask-mode: luminance; mask-mode: match-source; /* multiple values */ mask-mode: alpha, match-source; /* global values */ mask-mode: inherit; mask-mode: initial; mask-mode: unset; syntax the mask-mode property is specified as one or more of the keyword values listed below, separated by commas.
... formal definition initial valuematch-sourceapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <masking-mode>#where <masking-mode> = alpha | luminance | match-source examples using alpha mask mode css #masked { width: 227px; height: 200px; background: blue linear-gradient(red, blue); mask-image: url(https://mdn.mozillademos.org/files/12668/mdn.svg); mask-mode: alpha; /* can be changed in the live sample */ } html <div id="masked"> </div> <select id="maskmode"> <option v...
mask-origin - CSS: Cascading Style Sheets
syntax one or more of the keyword values listed below, separated by commas.
... formal definition initial valueborder-boxapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <geometry-box>#where <geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <shape-box> = <box> | margin-boxwhere <box> = border-box | padding-box | content-box examples setting mask origin to border-box css #masked { width: 100px; height: 100px; margin: 10px; border: 10px solid blue; background-color: #8cffa0; padding: 10px; mask-image: url(https://mdn.mozilladem...
mask-position - CSS: Cascading Style Sheets
eyword values */ mask-position: top; mask-position: bottom; mask-position: left; mask-position: right; mask-position: center; /* <position> values */ mask-position: 25% 75%; mask-position: 0px 0px; mask-position: 10% 8em; /* multiple values */ mask-position: top right; mask-position: 1rem 1rem, center; /* global values */ mask-position: inherit; mask-position: initial; mask-position: unset; syntax one or more <position> values, separated by commas.
...s elementsinheritednopercentagesrefer to size of mask painting area minus size of mask layer image (see the text for background-position)computed valueconsists of two keywords representing the origin and two offsets from that origin, each given as an absolute length (if given a <length>), otherwise as a percentage.animation typerepeatable list of simple list of length, percentage, or calc formal syntax <position>#where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
mask-type - CSS: Cascading Style Sheets
WebCSSmask-type
syntax the mask-type property is specified as one of the keyword values listed below.
... formal definition initial valueluminanceapplies to<mask> elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax luminance | alpha examples setting an alpha mask html <div class="redsquare"></div> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="0" height="0"> <defs> <mask id="m" maskcontentunits="objectboundingbox" style="mask-type:alpha"> <rect x=".1" y=".1" width=".8" height=".8" fill="red" fill-opacity="0.7"/> ...
max-block-size - CSS: Cascading Style Sheets
syntax /* <length> values */ max-block-size: 300px; max-block-size: 25em; /* <percentage> values */ max-block-size: 75%; /* keyword values */ max-block-size: auto; max-block-size: max-content; max-block-size: min-content; max-block-size: fit-content(20em); /* global values */ max-block-size: inherit; max-block-size: initial; max-block-size: unset; values the max-block-size property's value can be...
... formal definition initial value0applies tosame as width and heightinheritednopercentagesblock-size of containing blockcomputed valuesame as max-width and max-heightanimation typea length, percentage or calc(); formal syntax <'max-width'> examples setting max-block-size with horizontal and vertical text in this example, the same text (the opening sentences from herman melville's novel moby-dick) is presented in both the horizontal-tb and vertical-rl writing modes.
max-height - CSS: Cascading Style Sheets
syntax /* <length> value */ max-height: 3.5em; /* <percentage> value */ max-height: 75%; /* keyword values */ max-height: none; max-height: max-content; max-height: min-content; max-height: fit-content(20em); /* global values */ max-height: inherit; max-height: initial; max-height: unset; values <length> defines the max-height as an absolute value.
...if the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the percentage value is treated as none.computed valuethe percentage as specified or the absolute length or noneanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting max-height using percentage and keyword values table { max-height: 75%; } form { max-height: none; } specifications specification status comment css box sizing module level 4the definition of 'max-hei...
max-inline-size - CSS: Cascading Style Sheets
syntax /* <length> values */ max-inline-size: 300px; max-inline-size: 25em; /* <percentage> values */ max-inline-size: 75%; /* keyword values */ max-inline-size: auto; max-inline-size: max-content; max-inline-size: min-content; max-inline-size: fit-content(20em); /* global values */ max-inline-size: inherit; max-inline-size: initial; max-inline-size: unset; values the max-inline-size property tak...
... formal definition initial value0applies tosame as width and heightinheritednopercentagesinline-size of containing blockcomputed valuesame as max-width and max-heightanimation typea length, percentage or calc(); formal syntax <'max-width'> examples setting max inline size in pixels html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; block-size: 100%; max-inline-size: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'max-inline-size' in that specification.
max-width - CSS: Cascading Style Sheets
WebCSSmax-width
syntax /* <length> value */ max-width: 3.5em; /* <percentage> value */ max-width: 75%; /* keyword values */ max-width: none; max-width: max-content; max-width: min-content; max-width: fit-content(20em); /* global values */ max-width: inherit; max-width: initial; max-width: unset; values <length> defines the max-width as an absolute value.
...ine 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 formal definition initial valuenoneapplies toall elements but non-replaced inline elements, table rows, and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute length or noneanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting max width in pixels in this example, the "child" will be either 150 pixels wide or the width of the "parent," whichever is smaller.
min-block-size - CSS: Cascading Style Sheets
syntax /* <length> values */ min-block-size: 100px; min-block-size: 5em; /* <percentage> values */ min-block-size: 10%; /* keyword values */ min-block-size: max-content; min-block-size: min-content; min-block-size: fit-content(20em); /* global values */ min-block-size: inherit; min-block-size: initial; min-block-size: unset; if the writing mode is vertically oriented, the value of min-block-size r...
... formal definition initial value0applies tosame as width and heightinheritednopercentagesblock-size of containing blockcomputed valuesame as min-width and min-heightanimation typea length, percentage or calc(); formal syntax <'min-width'> examples setting minimum block size for vertical text html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; min-block-size: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'min-block-size' in that specifi...
min-height - CSS: Cascading Style Sheets
syntax /* <length> value */ min-height: 3.5em; /* <percentage> value */ min-height: 10%; /* keyword values */ min-height: max-content; min-height: min-content; min-height: fit-content(20em); /* global values */ min-height: inherit; min-height: initial; min-height: unset; values <length> defines the min-height as an absolute value.
...if the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the percentage value is treated as 0.computed valuethe percentage as specified or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting min-height table { min-height: 75%; } form { min-height: 0; } specifications specification status comment css box sizing module level 4the definition of 'min-height' in that specification.
min-inline-size - CSS: Cascading Style Sheets
syntax /* <length> values */ min-inline-size: 100px; min-inline-size: 5em; /* <percentage> values */ min-inline-size: 10%; /* keyword values */ min-inline-size: max-content; min-inline-size: min-content; min-inline-size: fit-content(20em); /* global values */ min-inline-size: inherit; min-inline-size: initial; min-inline-size: unset; if the writing mode is vertically oriented, the value of min-inl...
... formal definition initial value0applies tosame as width and heightinheritednopercentagesinline-size of containing blockcomputed valuesame as min-width and min-heightanimation typea length, percentage or calc(); formal syntax <'min-width'> examples setting minimum inline size for vertical text html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; block-size: 5%; min-inline-size: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'min-inline-...
min-width - CSS: Cascading Style Sheets
WebCSSmin-width
syntax /* <length> value */ min-width: 3.5em; /* <percentage> value */ min-width: 10%; /* keyword values */ min-width: max-content; min-width: min-content; min-width: fit-content(20em); /* global values */ min-width: inherit; min-width: initial; min-width: unset; values <length> defines the min-width as an absolute value.
... formal definition initial valueautoapplies toall elements but non-replaced inline elements, table rows, and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting minimum element width table { min-width: 75%; } form { min-width: 0; } specifications specification status comment css box sizing module level 4the definition of 'min-width' in that specification.
minmax() - CSS: Cascading Style Sheets
WebCSSminmax
syntax /* <inflexible-breadth>, <track-breadth> values */ minmax(200px, 1fr) minmax(400px, 50%) minmax(30%, 300px) minmax(100px, max-content) minmax(min-content, 400px) minmax(max-content, auto) minmax(auto, 300px) minmax(min-content, auto) /* <fixed-breadth>, <track-breadth> values */ minmax(200px, 1fr) minmax(30%, 300px) minmax(400px, 50%) minmax(50%, min-content) minmax(300px, max-content) minmax(200px, auto) /* <inflexible-br...
... formal syntax minmax( [ <length> | <percentage> | min-content | max-content | auto ] , [ <length> | <percentage> | <flex> | min-content | max-content | auto ] ) css properties minmax() function can be used within: grid-template-columns grid-template-rows grid-auto-columns grid-auto-rows examples css #container { display: grid; grid-template-columns: minmax(min-content, 300px) minmax(200px, 1f...
mix-blend-mode - CSS: Cascading Style Sheets
syntax /* keyword values */ mix-blend-mode: normal; mix-blend-mode: multiply; mix-blend-mode: screen; mix-blend-mode: overlay; mix-blend-mode: darken; mix-blend-mode: lighten; mix-blend-mode: color-dodge; mix-blend-mode: color-burn; mix-blend-mode: hard-light; mix-blend-mode: soft-light; mix-blend-mode: difference; mix-blend-mode: exclusion; mix-blend-mode: hue; mix-blend-mode: saturation; mix-blend-mode: color; mix-blend-mode...
... formal definition initial valuenormalapplies toall elementsinheritednocomputed valueas specifiedanimation typediscretecreates stacking contextyes formal syntax <blend-mode>where <blend-mode> = normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity examples effect of different mix-blend-mode values <div class="grid"> <div class="col"> <div class="note">blending in isolation (no blending with the background)</div> <div class="row isolate"> <div class="cell"> normal <div class...
object-fit - CSS: Cascading Style Sheets
syntax the object-fit property is specified as a single keyword chosen from the list of values below.
... formal definition initial valuefillapplies toreplaced elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax fill | contain | cover | none | scale-down examples setting object-fit for an image html <section> <h2>object-fit: fill</h2> <img class="fill" src="https://udn.realityripple.com/samples/ae/248a9938d9.png" alt="mdn logo"> <img class="fill narrow" src="https://udn.realityripple.com/samples/ae/248a9938d9.png" alt="mdn logo"> <h2>object-fit: contain</h2> <img class="contain" src="htt...
offset-distance - CSS: Cascading Style Sheets
syntax /* default value */ offset-distance: 0; /* the middle of the offset-path */ offset-distance: 50%; /* a fixed length positioned along the path */ offset-distance: 40px; <length-percentage> a length that specifies how far the element is along the path (defined with offset-path).
... formal definition initial value0applies totransformable elementsinheritednopercentagesrefer to the total path lengthcomputed valuefor <length> the absolute value, otherwise a percentageanimation typea length, percentage or calc(); formal syntax <length-percentage>where <length-percentage> = <length> | <percentage> examples using offset-distance in an animation the motion aspect in css motion path typically comes from animating the offset-distance property.
offset-position - CSS: Cascading Style Sheets
syntax /* keyword values */ offset-position: auto; offset-position: top; offset-position: bottom; offset-position: left; offset-position: right; offset-position: center; /* <percentage> values */ offset-position: 25% 75%; /* <length> values */ offset-position: 0 0; offset-position: 1cm 2cm; offset-position: 10ch 8em; /* edge offsets values */ offset-position: bottom 10px right 20px; offset-position: right 3em bottom 10px; offset-position: bottom 10px right; offset-position: top right 10px; /* global values */ offset-position: inherit; offset-position: initial; offset-position: unset; values auto the initial position is the position of the box specified by the position property.
... formal definition initial valueautoapplies totransformable elementsinheritednopercentagesrefertosizeofcontainingblockcomputed valuefor <length> the absolute value, otherwise a percentageanimation typea position formal syntax auto | <position>where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
offset-rotate - CSS: Cascading Style Sheets
syntax /* follow the path direction, with optional additional angle */ offset-rotate: auto; offset-rotate: auto 45deg; /* follow the path direction but facing the opposite direction of `auto` */ offset-rotate: reverse; /* keep a constant rotation regardless the position on the path */ offset-rotate: 90deg; offset-rotate: .5turn; auto the element is rotated by the angle of the direction of the offset-path, relative to the positive x-axis.
... formal definition initial valueautoapplies totransformable elementsinheritednocomputed valueas specifiedanimation typeas <angle>, <basic-shape> or <path()> formal syntax [ auto | reverse ] | <angle> examples setting element orientation along its offset path html <div></div> <div></div> <div></div> css div { width: 40px; height: 40px; background: #2bc4a2; margin: 20px; clip-path: polygon(0% 0%, 70% 0%, 100% 50%, 70% 100%, 0% 100%, 30% 50%); animation: move 5000ms infinite alternate ease-in-out; offset-path: path('m20,20 c20,50 180,-10 180,20'...
offset - CSS: Cascading Style Sheets
WebCSSoffset
constituent properties this property is a shorthand for the following css properties: offset-anchor offset-distance offset-path offset-position offset-rotate syntax /* offset position */ offset: auto; offset: 10px 30px; offset: none; /* offset path */ offset: ray(45deg closest-side); offset: path('m 100 100 l 300 100 l 200 300 z'); offset: url(arc.svg); /* offset path with distance and/or rotation */ offset: url(circle.svg) 100px; offset: url(circle.svg) 40%; offset: url(circle.svg) 30deg; offset: url(circle.svg) 50px 20deg; /* including offset anchor */ offset: ray(45deg closest-side) / 40px 20px; offse...
...rcentageoffset-anchor: for <length> the absolute value, otherwise a percentageoffset-rotate: as specifiedanimation typeas each of the properties of the shorthand:offset-position: a positionoffset-path: as <angle>, <basic-shape> or <path()>offset-distance: a length, percentage or calc();offset-anchor: a positionoffset-rotate: as <angle>, <basic-shape> or <path()>creates stacking contextyes formal syntax [ <'offset-position'>?
opacity - CSS: Cascading Style Sheets
WebCSSopacity
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).
... 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 { opacity: 0.5; /* se...
order - CSS: Cascading Style Sheets
WebCSSorder
syntax /* <integer> values */ order: 5; order: -5; /* global values */ order: inherit; order: initial; order: unset; since order is only meant to affect the visual order of elements and not their logical or tab order.
... flexbox & the keyboard navigation disconnect — tink source order matters | adrian roselli mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.2 | w3c understanding wcag 2.0 formal definition initial value0applies toflex items and absolutely-positioned flex container childreninheritednocomputed valueas specifiedanimation typean integer formal syntax <integer> examples ordering items in a flex container this example uses css to create a classic two-sidebar layout surrounding a content block.
orphans - CSS: Cascading Style Sheets
WebCSSorphans
(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.
... formal definition initial value2applies toblock container elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax <integer> examples setting a minimum orphan size of three lines html <div> <p>this is the first paragraph containing some text.</p> <p>this is the second paragraph containing some more text than the first one.
outline-color - CSS: Cascading Style Sheets
syntax /* <color> values */ outline-color: #f92525; outline-color: rgb(30,222,121); outline-color: blue; /* keyword value */ outline-color: invert; /* global values */ outline-color: inherit; outline-color: initial; outline-color: unset; the outline-color property is specified as any one of the values listed below.
...the transparent keyword maps to rgba(0,0,0,0).animation typea color formal syntax <color> | invertwhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
outline-offset - CSS: Cascading Style Sheets
syntax /* <length> values */ outline-offset: 3px; outline-offset: 0.2em; /* global values */ outline-offset: inherit; outline-offset: initial; outline-offset: unset; values <length> the width of the space between the element and its outline.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea length formal syntax <length> examples setting outline offset in pixels html <p>gallia est omnis divisa in partes tres.</p> css p { outline: 1px dashed red; outline-offset: 10px; background: yellow; border: 1px solid blue; margin: 15px; } result specifications specification status comment css basic user interface module level 3the definition of 'outline-offset' in th...
outline-style - CSS: Cascading Style Sheets
syntax /* keyword values */ outline-style: auto; outline-style: none; outline-style: dotted; outline-style: dashed; outline-style: solid; outline-style: double; outline-style: groove; outline-style: ridge; outline-style: inset; outline-style: outset; /* global values */ outline-style: inherit; outline-style: initial; outline-style: unset; the outline-style property is specified as any one of the val...
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | <'border-style'> examples setting outline style to auto the auto value indicates a custom outline style — typically a style [that] is either a user interface default for the platform, or perhaps a style that is richer than can be described in detail in css, e.g.
outline-width - CSS: Cascading Style Sheets
syntax /* keyword values */ outline-width: thin; outline-width: medium; outline-width: thick; /* <length> values */ outline-width: 1px; outline-width: 0.1em; /* global values */ outline-width: inherit; the outline-width property is specified as any one of the values listed below.
... formal definition initial valuemediumapplies toall elementsinheritednocomputed valuean absolute length; if the keyword none is specified, the computed value is 0animation typea length formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples setting an element's outline width html <span id="thin">thin</span> <span id="medium">medium</span> <span id="thick">thick</span> <span id="twopixels">2px</span> <span id="oneex">1ex</span> <span id="em">1.2em</span> css span { outline-style: solid; display: inline-block; margin: 20px; } #thin { outline-wi...
outline - CSS: Cascading Style Sheets
WebCSSoutline
constituent properties this property is a shorthand for the following css properties: outline-color outline-style outline-width syntax /* style */ outline: solid; /* color | style */ outline: #f66 dashed; /* style | width */ outline: inset thick; /* color | style | width */ outline: green solid 3px; /* global values */ outline: inherit; outline: initial; outline: unset; the outline property may be specified using one, two, or three of the values listed below.
...the transparent keyword maps to rgba(0,0,0,0).outline-width: an absolute length; if the keyword none is specified, the computed value is 0outline-style: as specifiedanimation typeas each of the properties of the shorthand:outline-color: a coloroutline-width: a lengthoutline-style: discrete formal syntax [ <'outline-color'> | <'outline-style'> | <'outline-width'> ] examples using outline to set a focus style html <a href="#">this link has a special focus style.</a> css a { border: 1px solid; border-radius: 3px; display: inline-block; margin: 10px; padding: 5px; } a:focus { outline: 4px dotted #e73; outline-offset: 4px; background: #ffa; } result specifications ...
overflow-anchor - CSS: Cascading Style Sheets
syntax /* keyword values */ overflow-anchor: auto; overflow-anchor: none; /* global values */ overflow-anchor: inherit; overflow-anchor: initial; overflow-anchor: unset; values auto the element becomes a potential anchor when adjusting scroll position.
... formal definition initial valueautoapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | none examples prevent scroll anchoring to prevent scroll anchoring in a document, use the overflow-anchor property.
overflow-block - CSS: Cascading Style Sheets
syntax /* keyword values */ overflow-block: visible; overflow-block: hidden; overflow-block: scroll; overflow-block: auto; /* global values */ overflow-block: inherit; overflow-block: initial; overflow-block: unset; the overflow-block property is specified as a single keyword chosen from the list of values below.
... formal definition initial valueautoapplies toblock-containers, flex containers, and grid containersinheritednocomputed valueas specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipanimation typediscrete formal syntax visible | hidden | clip | scroll | auto examples html <ul> <li><code>overflow-block:hidden</code> — hides the text outside the box <div id="div1"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
overflow-inline - CSS: Cascading Style Sheets
syntax /* keyword values */ overflow-inline: visible; overflow-inline: hidden; overflow-inline: scroll; overflow-inline: auto; /* global values */ overflow-inline: inherit; overflow-inline: initial; overflow-inline: unset; the overflow-inline property is specified as a single keyword chosen from the list of values below.
... formal definition initial valueautoapplies toblock-containers, flex containers, and grid containersinheritednocomputed valueas specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipanimation typediscrete formal syntax visible | hidden | clip | scroll | auto examples setting inline overflow behavior html <ul> <li><code>overflow-inline:hidden</code> — hides the text outside the box <div id="div1"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> <li><code>overflow-inline:scroll</code> — always adds a scrollbar <div id="div2"> abcdefghijklmopqrstuvwxyzabcdefg...
overflow-wrap - CSS: Cascading Style Sheets
syntax /* keyword values */ overflow-wrap: normal; overflow-wrap: break-word; overflow-wrap: anywhere; /* global values */ overflow-wrap: inherit; overflow-wrap: initial; overflow-wrap: unset; the overflow-wrap property is specified as a single keyword chosen from the list of values below.
... formal definition initial valuenormalapplies tonon-replaced inline elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | break-word | anywhere examples comparing overflow-wrap, word-break, and hyphens this example compares the results of overflow-wrap, word-break, and hyphens when breaking up a long word.
overflow-x - CSS: Cascading Style Sheets
syntax /* keyword values */ overflow-x: visible; overflow-x: hidden; overflow-x: clip; overflow-x: scroll; overflow-x: auto; /* global values */ overflow-x: inherit; overflow-x: initial; overflow-x: unset; the overflow-x property is specified as a single keyword chosen from the list of values below.
... formal definition initial valuevisibleapplies toblock-containers, flex containers, and grid containersinheritednocomputed valueas specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipanimation typediscrete formal syntax visible | hidden | clip | scroll | auto examples html <ul> <li><code>overflow-x:hidden</code> — hides the text outside the box <div id="div1"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> <li><code>overflow-x:scroll</code> — always adds a scrollbar <div id="div2"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> <li...
overflow-y - CSS: Cascading Style Sheets
syntax /* keyword values */ overflow-y: visible; overflow-y: hidden; overflow-y: clip; overflow-y: scroll; overflow-y: auto; /* global values */ overflow-y: inherit; overflow-y: initial; overflow-y: unset; the overflow-y property is specified as a single keyword chosen from the list of values below.
... formal definition initial valuevisibleapplies toblock-containers, flex containers, and grid containersinheritednocomputed valueas specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipanimation typediscrete formal syntax visible | hidden | clip | scroll | auto examples setting overflow-y behavior html <ul> <li><code>overflow-y:hidden</code> — hides the text outside the box <div id="div1"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
overscroll-behavior-block - CSS: Cascading Style Sheets
/* keyword values */ overscroll-behavior-block: auto; /* default */ overscroll-behavior-block: contain; overscroll-behavior-block: none; /* global values */ overscroll-behavior-block: inherit; overscroll-behavior-block: initial; overscroll-behavior-block: unset; syntax the overscroll-behavior-block property is specified as a keyword chosen from the list of values below.
... formal definition initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing block overscrolling in this demo we have two block-level boxes, one inside the other.
overscroll-behavior-inline - CSS: Cascading Style Sheets
/* keyword values */ overscroll-behavior-inline: auto; /* default */ overscroll-behavior-inline: contain; overscroll-behavior-inline: none; /* global values */ overscroll-behavior-inline: inherit; overscroll-behavior-inline: initial; overscroll-behavior-inline: unset; syntax the overscroll-behavior-inline property is specified as a keyword chosen from the list of values below.
... formal definition initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing inline overscrolling in this demo we have two block-level boxes, one inside the other.
overscroll-behavior-x - CSS: Cascading Style Sheets
/* keyword values */ overscroll-behavior-x: auto; /* default */ overscroll-behavior-x: contain; overscroll-behavior-x: none; /* global values */ overscroll-behavior-x: inherit; overscroll-behavior-x: initial; overscroll-behavior-x: unset; syntax the overscroll-behavior-x property is specified as a keyword chosen from the list of values below.
... formal definition initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing an underlying element from scrolling horizontally in our simple overscroll-behavior-x example (see source code also), we have two block-level boxes, one inside the other.
overscroll-behavior-y - CSS: Cascading Style Sheets
keyword values */ overscroll-behavior-y: auto; /* default */ overscroll-behavior-y: contain; overscroll-behavior-y: none; /* global values */ overscroll-behavior-y: inherit; overscroll-behavior-y: initial; overscroll-behavior-y: unset; initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax the overscroll-behavior-y property is specified as a keyword chosen from the list of values below.
... formal definition initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing an underlying element from scrolling vertically .messages { height: 220px; overflow: auto; overscroll-behavior-y: contain; } see overscroll-behavior for a full example and explanation.
overscroll-behavior - CSS: Cascading Style Sheets
syntax the overscroll-behavior property is specified as one or two keywords chosen from the list of values below.
... formal definition initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ contain | none | auto ]{1,2} examples preventing an underlying element from scrolling in our overscroll-behavior example (see the source code also), we present a full-page list of fake contacts, and a dialog box containing a chat window.
padding-block-end - CSS: Cascading Style Sheets
syntax /* <length> values */ padding-block-end: 10px; /* an absolute length */ padding-block-end: 1em; /* a length relative to the text size */ /* <percentage> value */ padding-block-end: 5%; /* a padding relative to the block container's width */ /* global values */ padding-block-end: inherit; padding-block-end: initial; padding-block-end: unset; values the padding-block-end pro...
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typea length formal syntax <'padding-left'> examples setting block end padding for vertical text html content <div> <p class="exampletext">example text</p> </div> css content div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; padding-block-end: 20px; background-color: #c8c800; } result specifications specification status comm...
padding-block-start - CSS: Cascading Style Sheets
syntax /* <length> values */ padding-block-start: 10px; /* an absolute length */ padding-block-start: 1em; /* a length relative to the text size */ /* <percentage> value */ padding-block-start: 5%; /* a padding relative to the block container's width */ /* global values */ padding-block-start: inherit; padding-block-start: initial; padding-block-start: unset; values the padding-b...
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typea length formal syntax <'padding-left'> examples setting block start padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; padding-block-start: 20px; background-color: #c8c800; } result specifications specification status comment ...
padding-block - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: padding-block-end padding-block-start syntax values the padding-block property takes the same values as the padding-left property.
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typediscrete formal syntax <'padding-left'>{1,2} examples setting block padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; padding-block: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'padding-block' in that specification.
padding-bottom - CSS: Cascading Style Sheets
syntax /* <length> values */ padding-bottom: 0.5em; padding-bottom: 0; padding-bottom: 2cm; /* <percentage> value */ padding-bottom: 10%; /* global values */ padding-bottom: inherit; padding-bottom: initial; padding-bottom: unset; the padding-bottom property is specified as a single value chosen from the list below.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples setting padding bottom with pixels and percentages .content { padding-bottom: 5%; } .sidebox { padding-bottom: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-bottom' in that specification.
padding-inline-end - CSS: Cascading Style Sheets
syntax /* <length> values */ padding-inline-end: 10px; /* an absolute length */ padding-inline-end: 1em; /* a length relative to the text size */ /* <percentage> value */ padding-inline-end: 5%; /* a padding relative to the block container's width */ /* global values */ padding-inline-end: inherit; padding-inline-end: initial; padding-inline-end: unset; values the padding-inline-end prope...
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typea length formal syntax <'padding-left'> examples setting inline end padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; padding-inline-end: 20px; background-color: #c8c800; } specifications specification status comment css log...
padding-inline-start - CSS: Cascading Style Sheets
syntax /* <length> values */ padding-inline-start: 10px; /* an absolute length */ padding-inline-start: 1em; /* a length relative to the text size */ /* <percentage> value */ padding-inline-start: 5%; /* a padding relative to the block container's width */ /* global values */ padding-inline-start: inherit; padding-inline-start: initial; padding-inline-start: unset; values the padding-inl...
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typea length formal syntax <'padding-left'> examples setting inline start padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; padding-inline-start: 20px; background-color: #c8c800; } specifications specification status comment css...
padding-inline - CSS: Cascading Style Sheets
size */ padding-inline: 10px; /* sets both start and end values */ /* <percentage> values */ padding-inline: 5% 2%; /* relative to the nearest block container's width */ /* global values */ padding-inline: inherit; padding-inline: initial; padding-inline: unset; constituent properties this property is a shorthand for the following css properties: padding-inline-end padding-inline-start syntax values the padding-inline property takes the same values as the padding-left property.
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typediscrete formal syntax <'padding-left'>{1,2} examples setting inline padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; padding-inline: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical p...
padding-left - CSS: Cascading Style Sheets
syntax /* <length> values */ padding-left: 0.5em; padding-left: 0; padding-left: 2cm; /* <percentage> value */ padding-left: 10%; /* global values */ padding-left: inherit; padding-left: initial; padding-left: unset; the padding-left property is specified as a single value chosen from the list below.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples setting left padding using pixels and percentages .content { padding-left: 5%; } .sidebox { padding-left: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-left' in that specification.
padding-right - CSS: Cascading Style Sheets
syntax /* <length> values */ padding-right: 0.5em; padding-right: 0; padding-right: 2cm; /* <percentage> value */ padding-right: 10%; /* global values */ padding-right: inherit; padding-right: initial; padding-right: unset; the padding-right property is specified as a single value chosen from the list below.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples setting right padding using pixels and percentages .content { padding-right: 5%; } .sidebox { padding-right: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-right' in that specification.
padding-top - CSS: Cascading Style Sheets
syntax /* <length> values */ padding-top: 0.5em; padding-top: 0; padding-top: 2cm; /* <percentage> value */ padding-top: 10%; /* global values */ padding-top: inherit; padding-top: initial; padding-top: unset; the padding-top property is specified as a single value chosen from the list below.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples setting top padding using pixels and percentages .content { padding-top: 5%; } .sidebox { padding-top: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-top' in that specification.
padding - CSS: Cascading Style Sheets
WebCSSpadding
constituent properties this property is a shorthand for the following css properties: padding-bottom padding-left padding-right padding-top syntax /* apply to all four sides */ padding: 1em; /* vertical | horizontal */ padding: 5% 10%; /* top | horizontal | bottom */ padding: 1em 2em 2em; /* top | right | bottom | left */ padding: 5px 1em 0 2em; /* global values */ padding: inherit; padding: initial; padding: unset; the padding property may be specified using one, two, three, or four values.
...opercentagesrefer to the width of the containing blockcomputed valueas each of the properties of the shorthand:padding-bottom: the percentage as specified or the absolute lengthpadding-left: the percentage as specified or the absolute lengthpadding-right: the percentage as specified or the absolute lengthpadding-top: the percentage as specified or the absolute lengthanimation typea length formal syntax [ <length> | <percentage> ]{1,4} examples setting padding with pixels html <h4>this element has moderate padding.</h4> <h3>the padding is huge in this element!</h3> css h4 { background-color: lime; padding: 20px 50px; } h3 { background-color: cyan; padding: 110px 50px 50px 110px; } result setting padding with pixels and percentages padding: 5%; /* all sides: ...
page-break-after - CSS: Cascading Style Sheets
syntax values auto initial value.
...user agents may also apply it to other elements like table-row elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | always | avoid | left | right | recto | verso examples setting a page break after footnotes /* move to a new page after footnotes */ div.footnotes { page-break-after: always; } specifications specification status comment css logical properties and values level 1the definition of 'recto and verso' in that specification.
page-break-before - CSS: Cascading Style Sheets
/* keyword values */ page-break-before: auto; page-break-before: always; page-break-before: avoid; page-break-before: left; page-break-before: right; page-break-before: recto; page-break-before: verso; /* global values */ page-break-before: inherit; page-break-before: initial; page-break-before: unset; syntax values auto initial value.
...user agents may also apply it to other elements like table-row elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | always | avoid | left | right | recto | verso examples avoid a page break before the dic /* avoid page break before the div */ div.note { page-break-before: avoid; } specifications specification status comment css logical properties and values level 1the definition of 'recto and verso' in that specification.
page-break-inside - CSS: Cascading Style Sheets
/* keyword values */ page-break-inside: auto; page-break-inside: avoid; /* global values */ page-break-inside: inherit; page-break-inside: initial; page-break-inside: unset; syntax values auto initial value.
...user agents may also apply it to other elements like table-row elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | avoid examples avoiding page breaks inside elements html <div class="page"> <p>this is the first paragraph.</p> <section class="list"> <span>a list</span> <ol> <li>one</li> <!-- <li>two</li> --> </ol> </section> <ul> <li>one</li> <!-- <li>two</li> --> </ul> <p>this is the second paragraph.</p> <p>this is the third paragraph, it contains mo...
paint-order - CSS: Cascading Style Sheets
syntax /* normal */ paint-order: normal; /* single values */ paint-order: stroke; /* draw the stroke first, then fill and markers */ paint-order: markers; /* draw the markers first, then fill and stroke */ /* multiple values */ paint-order: stroke fill; /* draw the stroke first, then the fill, then the markers */ paint-order: markers stroke fill; /* draw markers, then stroke, then fill */ if no value is specified, the default paint order is fill, stroke, markers.
... formal definition initial valuenormalapplies totext elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | [ fill | stroke | markers ] examples reversing the paint order of stroke and fill svg <svg xmlns="http://www.w3.org/2000/svg" width="400" height="200"> <text x="10" y="75">stroke in front</text> <text x="10" y="150" class="stroke-behind">stroke behind</text> </svg> css text { font-family: sans-serif; font-size: 50px; font-weight: bold; fill: black; stroke: red; str...
perspective-origin - CSS: Cascading Style Sheets
syntax /* one-value syntax */ perspective-origin: x-position; /* two-value syntax */ perspective-origin: x-position y-position; /* when both x-position and y-position are keywords, the following is also valid */ perspective-origin: y-position x-position; /* global values */ perspective-origin: inherit; perspective-origin: initial; perspective-origin: unset; values x-position indicates the p...
... formal definition initial value50% 50%applies totransformable elementsinheritednopercentagesrefer to the size of bounding boxcomputed valuefor <length> the absolute value, otherwise a percentageanimation typesimple list of length, percentage, or calc formal syntax <position>where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
perspective - CSS: Cascading Style Sheets
syntax /* keyword value */ perspective: none; /* <length> values */ perspective: 20px; perspective: 3.5em; /* global values */ perspective: inherit; perspective: initial; perspective: unset; values none indicates that no perspective transform is to be applied.
... formal definition initial valuenoneapplies totransformable elementsinheritednocomputed valuethe absolute length or noneanimation typea lengthcreates stacking contextyes formal syntax none | <length> examples setting perspective this example shows a cube with the perspective set at different positions.
place-content - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: align-content justify-content syntax /* positional alignment */ /* align-content does not take left and right values */ place-content: center start; place-content: start center; place-content: end left; place-content: flex-start center; place-content: flex-end center; /* baseline alignment */ /* justify-content does not take baseline values */ place-content: baseline center; place-content: first baseline space-evenly; place-conten...
...t container, any auto-sized items have their size increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size exactly fills the alignment container formal definition initial valuenormalapplies tomulti-line flex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'align-content'> <'justify-content'>?
place-items - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: align-items justify-items syntax /* keyword values */ place-items: auto center; place-items: normal start; /* positional alignment */ place-items: center normal; place-items: start auto; place-items: end normal; place-items: self-start auto; place-items: self-end normal; place-items: flex-start auto; place-items: flex-end normal; place-items: left auto; place-items: right normal; /* baseline alignment */ place-items: baseline...
... formal definition initial valueas each of the properties of the shorthand:align-items: normaljustify-items: legacyapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:align-items: as specifiedjustify-items: as specifiedanimation typediscrete formal syntax <'align-items'> <'justify-items'>?
place-self - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: align-self justify-self syntax /* keyword values */ place-self: auto center; place-self: normal start; /* positional alignment */ place-self: center normal; place-self: start auto; place-self: end normal; place-self: self-start auto; place-self: self-end normal; place-self: flex-start auto; place-self: flex-end normal; place-self: left auto; place-self: right normal; /* baseline alignment */ place-self: baseline normal; pla...
...otherwise the specified value.justify-self: as specifiedanimation typediscrete formal syntax <'align-self'> <'justify-self'>?
pointer-events - CSS: Cascading Style Sheets
syntax /* keyword values */ pointer-events: auto; pointer-events: none; pointer-events: visiblepainted; /* svg only */ pointer-events: visiblefill; /* svg only */ pointer-events: visiblestroke; /* svg only */ pointer-events: visible; /* svg only */ pointer-events: painted; /* svg only */ pointer-events: fill; /* svg only */ pointer-events: stroke; /* svg only */ pointer-events: all; /...
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | none | visiblepainted | visiblefill | visiblestroke | visible | painted | fill | stroke | all | inherit examples disabling pointer events on all images this example disables pointer events (clicking, dragging, hovering, etc.) on all images.
position - CSS: Cascading Style Sheets
WebCSSposition
syntax the position property is specified as a single keyword chosen from the list of values below.
... formal definition initial valuestaticapplies toall elementsinheritednocomputed valueas specifiedanimation typediscretecreates stacking contextyes formal syntax static | relative | absolute | sticky | fixed examples relative positioning relatively positioned elements are offset a given amount from their normal position within the document, but without the offset affecting other elements.
quotes - CSS: Cascading Style Sheets
WebCSSquotes
syntax /* keyword value */ quotes: none; quotes: auto; /* <string> values */ quotes: "«" "»"; /* set open-quote and close-quote to the french quotation marks */ quotes: "«" "»" "‹" "›"; /* set two levels of quotation marks */ /* global values */ quotes: inherit; quotes: initial; quotes: unset; values none the open-quote and close-quote values of the content property produce no quot...
... formal definition initial valuedepends on user agentapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | auto | [ <string> <string> ]+ examples basic quote marks html <q>to be or not to be.
repeating-linear-gradient() - CSS: Cascading Style Sheets
syntax /* a repeating gradient tilted 45 degrees, starting blue and finishing red, repeating 3 times */ repeating-linear-gradient(45deg, blue, red 33.3%); /* a repeating gradient going from the bottom right to the top left, starting blue and finishing red, repeating every 20px */ repeating-linear-gradient(to left top, blue, red 20px); /* a gradient going from the bottom to top, starting blue...
... formal syntax repeating-linear-gradient( [ <angle> | to <side-or-corner> ,]?
resize - CSS: Cascading Style Sheets
WebCSSresize
syntax /* keyword values */ resize: none; resize: both; resize: horizontal; resize: vertical; resize: block; resize: inline; /* global values */ resize: inherit; resize: initial; resize: unset; the resize property is specified as a single keyword value from the list below.
... resize does not apply to the following: inline elements block elements for which the overflow property is set to visible formal definition initial valuenoneapplies toelements with overflow other than visible, and optionally replaced elements representing images or videos, and iframesinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | both | horizontal | vertical | block | inline examples disabling resizability of textareas in many browsers, <textarea> elements are resizable by default.
right - CSS: Cascading Style Sheets
WebCSSright
syntax /* <length> values */ right: 3px; right: 2.4em; /* <percentage>s of the width of the containing block */ right: 10%; /* keyword value */ right: auto; /* global values */ right: inherit; right: initial; right: unset; values <length> a negative, null, or positive <length> that represents: for absolutely positioned elements, the distance to the right edge of the containing block.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentagesrefer to the width of the containing blockcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length, percentage or calc(); formal syntax <length> | <percentage> | auto examples absolute and relative positioning using right html <div id="relative">relatively positioned</div> <div id="absolute">absolutely positioned</div> css #relative { width: 100px; height: 100px; background-color: #ffc7e4; position: relative; top: 20px; left: 20px; } #absolute { width: 100px; height: 100px; background-color: #ffd7c2; ...
rotate - CSS: Cascading Style Sheets
WebCSSrotate
syntax /* keyword values */ rotate: none; /* angle value */ rotate: 90deg; rotate: 0.25turn; rotate: 1.57rad; /* x, y, or z axis name plus angle */ rotate: x 90deg; rotate: y 0.25turn; rotate: z 1.57rad; /* vector plus angle value */ rotate: 1 1 1 90deg; values angle value an <angle> specifying the angle to rotate the affected element through, around the z axis.
... 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: cente...
row-gap (grid-row-gap) - CSS: Cascading Style Sheets
WebCSSrow-gap
syntax /* <length> values */ row-gap: 20px; row-gap: 1em; row-gap: 3vmin; row-gap: 0.5cm; /* <percentage> value */ row-gap: 10%; /* global values */ row-gap: inherit; row-gap: initial; row-gap: unset; values <length-percentage> is the width of the gutter separating the rows.
... formal definition initial valuenormalapplies tomulti-column elements, flex containers, grid containersinheritednopercentagesrefer to corresponding dimension of the content areacomputed valueas specified, with <length>s made absolute, and normal computing to zero except on multi-column elementsanimation typea length, percentage or calc(); formal syntax normal | <length-percentage>where <length-percentage> = <length> | <percentage> examples flex layout html <div id="flexbox"> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> css #flexbox { display: flex; flex-wrap: wrap; width: 300px; row-gap: 20px; } #flexbox > div { border: 1px solid green; background-color: lime; flex: 1 1 aut...
ruby-align - CSS: Cascading Style Sheets
/* keyword values */ ruby-align: start; ruby-align: center; ruby-align: space-between; ruby-align: space-around; /* global values */ ruby-align: inherit; ruby-align: initial; ruby-align: unset; syntax values start is a keyword indicating that the ruby will be aligned with the start of the base text.
... formal definition initial valuespace-aroundapplies toruby bases, ruby annotations, ruby base containers, ruby annotation containersinheritedyescomputed valueas specifiedanimation typediscrete formal syntax start | center | space-between | space-around examples ruby aligned at the start of the base text html <ruby> <rb>this is a long text to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp> </ruby> css ruby { ruby-align: start; } result ruby aligned at the center of the base text html <ruby> <rb>this is a long text to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp...
ruby-position - CSS: Cascading Style Sheets
/* keyword values */ ruby-position: over; ruby-position: under; ruby-position: inter-character; /* global values */ ruby-position: inherit; ruby-position: initial; ruby-position: unset; syntax values over is a keyword indicating that the ruby has to be placed over the main text for horizontal scripts and right to it for vertical scripts.
... formal definition initial valueoverapplies toruby annotations containersinheritedyescomputed valueas specifiedanimation typediscrete formal syntax over | under | inter-character examples ruby positioned over the text html <ruby> <rb>超電磁砲</rb> <rp>(</rp><rt>レールガン</rt><rp>)</rp> </ruby> css ruby { ruby-position:over; } result ruby positioned under the text html <ruby> <rb>超電磁砲</rb> <rp>(</rp><rt>レールガン</rt><rp>)</rp> </ruby> css ruby { ruby-position:under; } result speci...
scale - CSS: Cascading Style Sheets
WebCSSscale
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.
... 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...
scroll-behavior - CSS: Cascading Style Sheets
syntax /* keyword values */ scroll-behavior: auto; scroll-behavior: smooth; /* global values */ scroll-behavior: inherit; scroll-behavior: initial; scroll-behavior: unset; the scroll-behavior property is specified as one of the keyword values listed below.
... formal definition initial valueautoapplies toscrolling boxesinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | smooth examples setting smooth scroll behavior html <nav> <a href="#page-1">1</a> <a href="#page-2">2</a> <a href="#page-3">3</a> </nav> <scroll-container> <scroll-page id="page-1">1</scroll-page> <scroll-page id="page-2">2</scroll-page> <scroll-page id="page-3">3</scroll-page> </scroll-container> css a { display: inline-block; width: 50px; text-decoration: none; } nav, scroll-conta...
scroll-margin-block-end - CSS: Cascading Style Sheets
syntax /* <length> values */ scroll-margin-block-end: 10px; scroll-margin-block-end: 1em; /* global values */ scroll-margin-block-end: inherit; scroll-margin-block-end: initial; scroll-margin-block-end: unset; values <length> an outset from the block end edge of the scroll container.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-block-end' in that specification.
scroll-margin-block-start - CSS: Cascading Style Sheets
syntax /* <length> values */ scroll-margin-block-start: 10px; scroll-margin-block-start: 1em; /* global values */ scroll-margin-block-start: inherit; scroll-margin-block-start: initial; scroll-margin-block-start: unset; values <length> an outset from the block start edge of the scroll container.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-block-start' in that specification.
scroll-margin-block - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: scroll-margin-block-end scroll-margin-block-start syntax /* <length> values */ scroll-margin-block: 10px; scroll-margin-block: 1em .5em ; /* global values */ scroll-margin-block: inherit; scroll-margin-block: initial; scroll-margin-block: unset; values <length> an outset from the corresponding edge of the scroll container.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length>{1,2} specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-block' in that specification.
scroll-margin-bottom - CSS: Cascading Style Sheets
syntax /* <length> values */ scroll-margin-bottom: 10px; scroll-margin-bottom: 1em; /* global values */ scroll-margin-bottom: inherit; scroll-margin-bottom: initial; scroll-margin-bottom: unset; values <length> an outset from the bottom edge of the scroll container.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-bottom' in that specification.
scroll-margin-inline-end - CSS: Cascading Style Sheets
syntax /* <length> values */ scroll-margin-inline-end: 10px; scroll-margin-inline-end: 1em; /* global values */ scroll-margin-inline-end: inherit; scroll-margin-inline-end: initial; scroll-margin-inline-end: unset; values <length> an outset from the inline end edge of the scroll container.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> examples simple demonstration this example implements something very similar to the interactive example above, except that here we'll explain to you how it's implemented.
scroll-margin-inline-start - CSS: Cascading Style Sheets
syntax /* <length> values */ scroll-margin-inline-start: 10px; scroll-margin-inline-start: 1em; /* global values */ scroll-margin-inline-start: inherit; scroll-margin-inline-start: initial; scroll-margin-inline-start: unset; values <length> an outset from the inline start edge of the scroll container.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> examples simple demonstration this example implements something very similar to the interactive example above, except that here we'll explain to you how it's implemented.
scroll-margin-inline - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: scroll-margin-inline-end scroll-margin-inline-start syntax /* <length> values */ scroll-margin-inline: 10px; scroll-margin-inline: 1em .5em ; /* global values */ scroll-margin-inline: inherit; scroll-margin-inline: initial; scroll-margin-inline: unset; values <length> an outset from the corresponding edge of the scroll container.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length>{1,2} examples simple demonstration this example implements something very similar to the interactive example above, except that here we'll explain to you how it's implemented.
scroll-margin-left - CSS: Cascading Style Sheets
syntax /* <length> values */ scroll-margin-left: 10px; scroll-margin-left: 1em; /* global values */ scroll-margin-left: inherit; scroll-margin-left: initial; scroll-margin-left: unset; values <length> an outset from the left edge of the scroll container.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-left' in that specification.
scroll-margin-right - CSS: Cascading Style Sheets
syntax /* <length> values */ scroll-margin-right: 10px; scroll-margin-right: 1em; /* global values */ scroll-margin-right: inherit; scroll-margin-right: initial; scroll-margin-right: unset; values <length> an outset from the right edge of the scroll container.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-right' in that specification.
scroll-margin-top - CSS: Cascading Style Sheets
syntax /* <length> values */ scroll-margin-top: 10px; scroll-margin-top: 1em; /* global values */ scroll-margin-top: inherit; scroll-margin-top: initial; scroll-margin-top: unset; values <length> an outset from the top edge of the scroll container.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-top' in that specification.
scroll-margin - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: scroll-margin-bottom scroll-margin-left scroll-margin-right scroll-margin-top syntax /* <length> values */ scroll-margin: 10px; scroll-margin: 1em .5em 1em 1em; /* global values */ scroll-margin: inherit; scroll-margin: initial; scroll-margin: unset; values <length> an outset from the corresponding edge of the scroll container.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length>{1,4} examples simple demonstration this example implements something very similar to the interactive example above, except that here we'll explain to you how it's implemented.
scroll-padding-block-end - CSS: Cascading Style Sheets
syntax /* keyword values */ scroll-padding-block-end: auto; /* <length> values */ scroll-padding-block-end: 10px; scroll-padding-block-end: 1em; scroll-padding-block-end: 10%; /* global values */ scroll-padding-block-end: inherit; scroll-padding-block-end: initial; scroll-padding-block-end: unset; values <length-percentage> an inwards offset from the block end edge of the scrollport, as a valid...
... formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-block-end' in that specification.
scroll-padding-block-start - CSS: Cascading Style Sheets
syntax /* keyword values */ scroll-padding-block-start: auto; /* <length> values */ scroll-padding-block-start: 10px; scroll-padding-block-start: 1em; scroll-padding-block-start: 10%; /* global values */ scroll-padding-block-start: inherit; scroll-padding-block-start: initial; scroll-padding-block-start: unset; values <length-percentage> an inwards offset from the block start edge of the scroll...
... formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-block-start' in that specification.
scroll-padding-block - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: scroll-padding-block-end scroll-padding-block-start syntax /* keyword values */ scroll-padding-block: auto; /* <length> values */ scroll-padding-block: 10px; scroll-padding-block: 1em .5em; scroll-padding-block: 10%; /* global values */ scroll-padding-block: inherit; scroll-padding-block: initial; scroll-padding-block: unset; values <length-percentage> an inwards offset from the corresponding edge of the scrollport, as a valid length or a percen...
... formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage> ]{1,2}where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-block' in that specification.
scroll-padding-bottom - CSS: Cascading Style Sheets
syntax /* keyword values */ scroll-padding-bottom: auto; /* <length> values */ scroll-padding-bottom: 10px; scroll-padding-bottom: 1em; scroll-padding-bottom: 10%; /* global values */ scroll-padding-bottom: inherit; scroll-padding-bottom: initial; scroll-padding-bottom: unset; values <length-percentage> an inwards offset from the bottom edge of the scrollport, as a valid length or a percentage.
... formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-bottom' in that specification.
scroll-padding-inline-end - CSS: Cascading Style Sheets
syntax /* keyword values */ scroll-padding-inline-end: auto; /* <length> values */ scroll-padding-inline-end: 10px; scroll-padding-inline-end: 1em; scroll-padding-inline-end: 10%; /* global values */ scroll-padding-inline-end: inherit; scroll-padding-inline-end: initial; scroll-padding-inline-end: unset; values <length-percentage> an inwards offset from the inline end edge of the scrollport, as...
... formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-inline-end' in that specification.
scroll-padding-inline-start - CSS: Cascading Style Sheets
syntax /* keyword values */ scroll-padding-inline-start: auto; /* <length> values */ scroll-padding-inline-start: 10px; scroll-padding-inline-start: 1em; scroll-padding-inline-start: 10%; /* global values */ scroll-padding-inline-start: inherit; scroll-padding-inline-start: initial; scroll-padding-inline-start: unset; values <length-percentage> an inwards offset from the inline start edge of th...
... formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-inline-start' in that specification.
scroll-padding-inline - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: scroll-padding-inline-end scroll-padding-inline-start syntax /* keyword values */ scroll-padding-inline: auto; /* <length> values */ scroll-padding-inline: 10px; scroll-padding-inline: 1em .5em; scroll-padding-inline: 10%; /* global values */ scroll-padding-inline: inherit; scroll-padding-inline: initial; scroll-padding-inline: unset; values <length-percentage> an inwards offset from the corresponding edge of the scrollport, as a valid length or a...
... formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage> ]{1,2}where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-inline' in that specification.
scroll-padding-left - CSS: Cascading Style Sheets
syntax /* keyword values */ scroll-padding-left: auto; /* <length> values */ scroll-padding-left: 10px; scroll-padding-left: 1em; scroll-padding-left: 10%; /* global values */ scroll-padding-left: inherit; scroll-padding-left: initial; scroll-padding-left: unset; values <length-percentage> an inwards offset from the left edge of the scrollport, as a valid length or a percentage.
... formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-left' in that specification.
scroll-padding-right - CSS: Cascading Style Sheets
syntax /* keyword values */ scroll-padding-right: auto; /* <length> values */ scroll-padding-right: 10px; scroll-padding-right: 1em; scroll-padding-right: 10%; /* global values */ scroll-padding-right: inherit; scroll-padding-right: initial; scroll-padding-right: unset; values <length-percentage> an inwards offset from the top edge of the scrollport, as a valid length or a percentage.
... formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-right' in that specification.
scroll-padding-top - CSS: Cascading Style Sheets
syntax /* keyword values */ scroll-padding-top: auto; /* <length> values */ scroll-padding-top: 10px; scroll-padding-top: 1em; scroll-padding-top: 10%; /* global values */ scroll-padding-top: inherit; scroll-padding-top: initial; scroll-padding-top: unset; values <length-percentage> an inwards offset from the top edge of the scrollport, as a valid length or a percentage.
... formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-top' in that specification.
scroll-padding - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: scroll-padding-bottom scroll-padding-left scroll-padding-right scroll-padding-top syntax /* keyword values */ scroll-padding: auto; /* <length> values */ scroll-padding: 10px; scroll-padding: 1em .5em 1em 1em; scroll-padding: 10%; /* global values */ scroll-padding: inherit; scroll-padding: initial; scroll-padding: unset; values <length-percentage> an inwards offset from the corresponding edge of the scrollport, as a valid <length> or a <percentage>.
... formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage> ]{1,4}where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding' in that specification.
scroll-snap-coordinate - CSS: Cascading Style Sheets
syntax values none specifies that the element does not contribute to a snap point.
... formal definition initial valuenoneapplies toall elementsinheritednopercentagesrefer to the element’s border boxcomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea position formal syntax none | <position>#where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
scroll-snap-destination - CSS: Cascading Style Sheets
/* <position> value */ scroll-snap-destination: 400px 600px; /* global values */ scroll-snap-destination: inherit; scroll-snap-destination: initial; scroll-snap-destination: unset; syntax values <position> specifies the offset of the snap destination from the start edge of the scroll container’s visual viewport.
... formal definition initial value0px 0pxapplies toscroll containersinheritednopercentagesrelative to same axis of the padding-box of the scroll containercomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea position formal syntax <position>where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
scroll-snap-points-x - CSS: Cascading Style Sheets
/* keyword value */ scroll-snap-points-x: none; /* repeating snap points */ scroll-snap-points-x: repeat(400px); /* global values */ scroll-snap-points-x: inherit; scroll-snap-points-x: initial; scroll-snap-points-x: unset; syntax values none the scroll container does not define any snap points.
... formal definition initial valuenoneapplies toscroll containersinheritednopercentagesrelative to same axis of the padding-box of the scroll containercomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typediscrete formal syntax none | repeat( <length-percentage> )where <length-percentage> = <length> | <percentage> examples setting horizontal scroll snap points html <div id="container"> <div>1</div> <div>2</div> <div>3</div> </div> css #container { width: 200px; overflow: auto; white-space: nowrap; scroll-snap-points-x: repeat(100%); scroll-snap-type: mandatory; font-size: 0; } #container > div ...
scroll-snap-points-y - CSS: Cascading Style Sheets
/* keyword value */ scroll-snap-points-y: none; /* repeated snap points */ scroll-snap-points-y: repeat(400px); /* global values */ scroll-snap-points-y: inherit; scroll-snap-points-y: initial; scroll-snap-points-y: unset; syntax values none the scroll container does not define any snap points.
... formal definition initial valuenoneapplies toscroll containersinheritednopercentagesrelative to same axis of the padding-box of the scroll containercomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typediscrete formal syntax none | repeat( <length-percentage> )where <length-percentage> = <length> | <percentage> examples setting vertical scroll snap points html <div id="container"> <div>1</div> <div>2</div> <div>3</div> </div> css #container { height: 200px; width: 220px; overflow-x: hidden; overflow-y: auto; scroll-snap-points-y: repeat(200px); scroll-snap-type: mandatory; font-size: 0; } ...
scroll-snap-stop - CSS: Cascading Style Sheets
/* keyword values */ scroll-snap-stop: normal; scroll-snap-stop: always; /* global values */ scroll-snap-type: inherit; scroll-snap-type: initial; scroll-snap-type: unset; syntax values normal when the visual viewport of this element's scroll container is scrolled, it may "pass over" possible snap positions.
... formal definition initial valuenormalapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | always examples snapping in different axes this example is duplicated from scroll-snap-type with minor variances.
scroll-snap-type-x - CSS: Cascading Style Sheets
/* keyword values */ scroll-snap-type-x: none; scroll-snap-type-x: mandatory; scroll-snap-type-x: proximity; /* global values */ scroll-snap-type-x: inherit; scroll-snap-type-x: initial; scroll-snap-type-x: unset; syntax values none when the visual viewport of this scroll container is scrolled horizontally, it must ignore snap points.
... formal definition initial valuenoneapplies toscroll containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | mandatory | proximity specifications not part of any standard.
scroll-snap-type-y - CSS: Cascading Style Sheets
/* keyword values */ scroll-snap-type-y: none; scroll-snap-type-y: mandatory; scroll-snap-type-y: proximity; /* global values */ scroll-snap-type-y: inherit; scroll-snap-type-y: initial; scroll-snap-type-y: unset; syntax values none when the visual viewport of this scroll container is scrolled vertically, it must ignore snap points.
... formal definition initial valuenoneapplies toscroll containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | mandatory | proximity specifications not part of any standard.
scroll-snap-type - CSS: Cascading Style Sheets
rd values */ scroll-snap-type: none; scroll-snap-type: x; scroll-snap-type: y; scroll-snap-type: block; scroll-snap-type: inline; scroll-snap-type: both; /* optional mandatory | proximity*/ scroll-snap-type: x mandatory; scroll-snap-type: y proximity; scroll-snap-type: both mandatory; /* etc */ /* global values */ scroll-snap-type: inherit; scroll-snap-type: initial; scroll-snap-type: unset; syntax values none when the visual viewport of this scroll container is scrolled, it must ignore snap points.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | [ x | y | block | inline | both ] [ mandatory | proximity ]?
scrollbar-color - CSS: Cascading Style Sheets
syntax /* keyword values */ scrollbar-color: auto; scrollbar-color: dark; scrollbar-color: light; /* <color> values */ scrollbar-color: rebeccapurple green; /* two valid colors.
... formal definition initial valueautoapplies toscrolling boxesinheritedyescomputed valueas specifiedanimation typea color formal syntax auto | dark | light | <color>{2}where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
scrollbar-width - CSS: Cascading Style Sheets
initial valueautoapplies toscrolling boxesinheritednocomputed valueas specifiedanimation typediscrete syntax /* keyword values */ scrollbar-width: auto; scrollbar-width: thin; scrollbar-width: none; /* global values */ scrollbar-width: inherit; scrollbar-width: initial; scrollbar-width: unset; values <scrollbar-width> defines the width of the scrollbar as a keyword.
... mdn understanding wcag, guideline 2.1 explanations mdn understanding wcag, guideline 2.5 explanations understanding success criterion 2.1.1 | w3c understanding wcag 2.1 understanding success criterion 2.5.5 | w3c understanding wcag 2.1 formal definition initial valueautoapplies toscrolling boxesinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | thin | none examples sizing overflow scrollbars css .scroller { width: 300px; height: 100px; overflow-y: scroll; scrollbar-width: thin; } html <div class="scroller">veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic.
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.
shape-margin - CSS: Cascading Style Sheets
syntax /* <length> values */ shape-margin: 10px; shape-margin: 20mm; /* <percentage> value */ shape-margin: 60%; /* global values */ shape-margin: inherit; shape-margin: initial; shape-margin: unset; values <length-percentage> sets the margin of the shape to a <length> value or to a <percentage> of the width of the element's containing block.
... formal definition initial value0applies tofloatsinheritednopercentagesrefer to the width of the containing blockcomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea length, percentage or calc(); formal syntax <length-percentage>where <length-percentage> = <length> | <percentage> examples adding a margin to a polygon html <section> <div class="shape"></div> we are not quite sure of any one thing in biology; our knowledge of geology is relatively very slight, and the economic laws of society are uncertain to every one except some individual who attempts to set them forth; but before the world was fashioned the square on the hypotenuse was equal to the sum of the squares on the other two sides of a right triangle, and it will be so after thi...
shape-outside - CSS: Cascading Style Sheets
syntax /* keyword values */ shape-outside: none; shape-outside: margin-box; shape-outside: content-box; shape-outside: border-box; shape-outside: padding-box; /* function values */ shape-outside: circle(); shape-outside: ellipse(); shape-outside: inset(10px 10px 10px 10px); shape-outside: polygon(10px 10px, 20px 20px, 30px 30px); shape-outside: path('m0.5,1 c0.5,1,0,0.7,0,0.3 a0.25,0.25,1,1,1,0.5,0.3 ...
... formal definition initial valuenoneapplies tofloatsinheritednocomputed valueas defined for <basic-shape> (with <shape-box> following, if supplied), the <image> with its uri made absolute, otherwise as specified.animation typeyes, as specified for <basic-shape>, otherwise no formal syntax none | <shape-box> | <basic-shape> | <image>where <shape-box> = <box> | margin-box<basic-shape> = <inset()> | <circle()> | <ellipse()> | <polygon()> | <path()><image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <box> = border-box | padding-box | content-box<inset()> = inset( <length-percentage>{1,4} [ round <'border-radius'> ]?
<shape> - CSS: Cascading Style Sheets
WebCSSshape
syntax the <shape> data type is specified using the rect() function, which produces a region in the form of a rectangle.
...for internet explorer 8 and later versions, only the standard comma-separated syntax is supported.opera full support 9.5safari full support 1.3webview android full support 37chrome android full support 18firefox android full support 4opera android ...
tab-size - CSS: Cascading Style Sheets
WebCSStab-size
syntax /* <integer> values */ tab-size: 4; tab-size: 0; /* <length> values */ tab-size: 10px; tab-size: 2em; /* global values */ tab-size: inherit; tab-size: initial; tab-size: unset; values <integer> a multiple of the advance width of the space character (u+0020) to be used as the width of tabs.
... formal definition initial value8applies toblock containersinheritedyescomputed valuethe specified integer or an absolute lengthanimation typea length formal syntax <integer> | <length> examples expanding by character count pre { tab-size: 4; /* set tab size to 4 characters wide */ } collapse tabs pre { tab-size: 0; /* remove indentation */ } comparing to the default size this example compares a default tab size with a custom tab size.
table-layout - CSS: Cascading Style Sheets
syntax /* keyword values */ table-layout: auto; table-layout: fixed; /* global values */ table-layout: inherit; table-layout: initial; table-layout: unset; values auto by default, most browsers use an automatic table layout algorithm.
... formal definition initial valueautoapplies totable and inline-table elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | fixed examples fixed-width tables with text-overflow this example uses a fixed table layout, combined with the width property, to restrict the table's width.
text-align-last - CSS: Cascading Style Sheets
syntax /* keyword values */ text-align-last: auto; text-align-last: start; text-align-last: end; text-align-last: left; text-align-last: right; text-align-last: center; text-align-last: justify; /* global values */ text-align-last: inherit; text-align-last: initial; text-align-last: unset; values auto the affected line is aligned per the value of text-align, unless text-align is justify, in which case the effect is the same as setting text-a...
... formal definition initial valueautoapplies toblock containersinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | start | end | left | right | center | justify examples justifying the last line <p>integer elementum massa at nulla placerat varius.
text-align - CSS: Cascading Style Sheets
syntax /* keyword values */ text-align: left; text-align: right; text-align: center; text-align: justify; text-align: justify-all; text-align: start; text-align: end; text-align: match-parent; /* character-based alignment in a table column */ text-align: "."; text-align: "." center; /* block alignment values (non-standard syntax) */ text-align: -moz-center; text-align: -webkit-center; /* global values...
...efinition initial valuestart, or a nameless value that acts as left if direction is ltr, right if direction is rtl if start is not supported by the browser.applies toblock containersinheritedyescomputed valueas specified, except for the match-parent value which is calculated against its parent's direction value and results in a computed value of either left or rightanimation typediscrete formal syntax start | end | left | right | center | justify | match-parent examples left alignment html <p class="example"> integer elementum massa at nulla placerat varius.
text-combine-upright - CSS: Cascading Style Sheets
*/ text-combine-upright: none; text-combine-upright: all; /* digits values */ text-combine-upright: digits; /* fits 2 consecutive digits horizontally inside vertical text */ text-combine-upright: digits 4; /* fits up to 4 consecutive digits horizontally inside vertical text */ /* global values */ text-combine-upright: inherit; text-combine-upright: initial; text-combine-upright: unset; syntax values none there is no special processing.
... formal definition initial valuenoneapplies tonon-replaced inline elementsinheritedyescomputed valuespecified keyword, plus integer if 'digits'animation typediscrete formal syntax none | all | [ digits <integer>?
text-decoration-color - CSS: Cascading Style Sheets
syntax /* <color> values */ text-decoration-color: currentcolor; text-decoration-color: red; text-decoration-color: #00ff00; text-decoration-color: rgba(255, 128, 128, 0.5); text-decoration-color: transparent; /* global values */ text-decoration-color: inherit; text-decoration-color: initial; text-decoration-color: unset; values <color> the color of the line decoration.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
text-decoration-line - CSS: Cascading Style Sheets
syntax /* single keyword */ text-decoration-line: none; text-decoration-line: underline; text-decoration-line: overline; text-decoration-line: line-through; text-decoration-line: blink; /* multiple keywords */ text-decoration-line: underline overline; /* two decoration lines */ text-decoration-line: overline underline line-through; /* multiple decoration lines */ /* global values */ te...
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax none | [ underline | overline | line-through | blink ] | spelling-error | grammar-error examples <p class="wavy">here's some text with wavy red underline!</p> <p class="both">this text has lines both above and below it.</p> .wavy { text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: red; } .both { text-decoration-line: underline overline; } specifi...
text-decoration-skip-ink - CSS: Cascading Style Sheets
syntax /* single keyword */ text-decoration-skip-ink: none; text-decoration-skip-ink: auto; text-decoration-skip-ink: all; /* global keywords */ text-decoration-skip: inherit; text-decoration-skip: initial; text-decoration-skip: unset; values none underlines and overlines are drawn across the full length of the text content, including parts that cross over glyph descenders and ascenders.
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | all | none examples html <p>you should go on a quest for a cup of coffee.</p> <p class="no-skip-ink">or maybe you'd prefer some tea?</p> <p>この文は、 text-decoration-skip-ink: auto の使用例を示しています。</p> <p class="skip-ink-all">この文は、 text-decoration-skip-ink: all の使用例を示しています。</p> css p { font-size: 1.5em; text-decoration:...
text-decoration-skip - CSS: Cascading Style Sheets
tion-skip: objects; text-decoration-skip: spaces; text-decoration-skip: edges; text-decoration-skip: box-decoration; /* multiple keywords */ text-decoration-skip: objects spaces; text-decoration-skip: leading-spaces trailing-spaces; text-decoration-skip: objects edges box-decoration; /* global values */ text-decoration-skip: inherit; text-decoration-skip: initial; text-decoration-skip: unset; syntax values none nothing is skipped.
... formal definition initial valueobjectsapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | [ objects | [ spaces | [ leading-spaces | trailing-spaces ] ] | edges | box-decoration ] examples skipping edges html <p>hey, grab a cup of <em>coffee!</em></p> css p { margin: 0; font-size: 3em; text-decoration: underline; text-decoration-skip: edges; } result specifications specification status comment css text decoration module level 4the ...
text-decoration-style - CSS: Cascading Style Sheets
syntax /* keyword values */ text-decoration-style: solid; text-decoration-style: double; text-decoration-style: dotted; text-decoration-style: dashed; text-decoration-style: wavy; /* global values */ text-decoration-style: inherit; text-decoration-style: initial; text-decoration-style: unset; values solid draws a single line.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax solid | double | dotted | dashed | wavy examples setting a wavy underline .example { -moz-text-decoration-line: underline; -moz-text-decoration-style: wavy; -moz-text-decoration-color: red; -webkit-text-decoration-line: underline; -webkit-text-decoration-style: wavy; -webkit-text-decoration-color: red; } css .wavy { text-decoration-line: underline; text-decoration-style: wavy; text-de...
text-decoration-thickness - CSS: Cascading Style Sheets
syntax /* single keyword */ text-decoration-thickness: auto; text-decoration-thickness: from-font; /* length */ text-decoration-thickness: 0.1em; text-decoration-thickness: 3px; /* percentage */ text-decoration-thickness: 10%; /* global values */ text-decoration-thickness: inherit; text-decoration-thickness: initial; text-decoration-thickness: unset; values auto the browser chooses an appropriate width for the text decoration line.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the font size of the element itselfcomputed valueas specifiedanimation typeby computed value type formal syntax auto | from-font | <length> | <percentage> examples varying thickness html <p class="thin">here's some text with a 1px red underline.</p> <p class="thick">this one has a 5px red underline.</p> <p class="shorthand">this uses the equivalent shorthand.</p> css .thin { text-decoration-line: underline; text-decoration-style: solid; text-decoration-color: red; text-decoration-thickness: ...
text-decoration - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: text-decoration-color text-decoration-line text-decoration-style text-decoration-thickness syntax the text-decoration property is specified as one or more space-separated values representing the various longhand text-decoration properties.
... valueas each of the properties of the shorthand:text-decoration-line: as specifiedtext-decoration-style: as specifiedtext-decoration-color: computed colortext-decoration-thickness: as specifiedanimation typeas each of the properties of the shorthand:text-decoration-color: a colortext-decoration-style: discretetext-decoration-line: discretetext-decoration-thickness: by computed value type formal syntax <'text-decoration-line'> | <'text-decoration-style'> | <'text-decoration-color'> | <'text-decoration-thickness'> examples .under { text-decoration: underline red; } .over { text-decoration: wavy overline lime; } .line { text-decoration: line-through; } .plain { text-decoration: none; } .underover { text-decoration: dashed underline overline; } .thick { text-decoration: solid u...
text-emphasis-color - CSS: Cascading Style Sheets
/* initial value */ text-emphasis-color: currentcolor; /* <color> */ text-emphasis-color: #555; text-emphasis-color: blue; text-emphasis-color: rgba(90, 200, 160, 0.8); text-emphasis-color: transparent; /* global values */ text-emphasis-color: inherit; text-emphasis-color: initial; text-emphasis-color: unset; syntax values <color> defines the color of the emphasis marks.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
text-emphasis-position - CSS: Cascading Style Sheets
*/ text-emphasis-position: over right; /* keywords value */ text-emphasis-position: over left; text-emphasis-position: under right; text-emphasis-position: under left; text-emphasis-position: left over; text-emphasis-position: right under; text-emphasis-position: left under; /* global values */ text-emphasis-position: inherit; text-emphasis-position: initial; text-emphasis-position: unset; syntax values over draw marks over the text in horizontal writing mode.
... formal definition initial valueover rightapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ over | under ] && [ right | left ] examples preferring ruby over emphasis marks some editors prefer to hide emphasis marks when they conflict with ruby.
text-emphasis-style - CSS: Cascading Style Sheets
red as 'f' only */ /* keyword values */ text-emphasis-style: filled; text-emphasis-style: open; text-emphasis-style: dot; text-emphasis-style: circle; text-emphasis-style: double-circle; text-emphasis-style: triangle; text-emphasis-style: filled sesame; text-emphasis-style: open sesame; /* global values */ text-emphasis-style: inherit; text-emphasis-style: initial; text-emphasis-style: unset; syntax values none no emphasis marks.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | [ [ filled | open ] | [ dot | circle | double-circle | triangle | sesame ] ] | <string> examples h2 { text-emphasis-style: sesame; } specifications specification status comment css text decoration module level 3the definition of 'text-emphasis' in that specification.
text-emphasis - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: text-emphasis-color text-emphasis-style syntax /* initial value */ text-emphasis: none; /* no emphasis marks */ /* <string> value */ text-emphasis: 'x'; text-emphasis: '点'; text-emphasis: '\25b2'; text-emphasis: '*' #555; text-emphasis: 'foo'; /* should not use.
...ion initial valueas each of the properties of the shorthand:text-emphasis-style: nonetext-emphasis-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:text-emphasis-style: as specifiedtext-emphasis-color: computed coloranimation typeas each of the properties of the shorthand:text-emphasis-color: a colortext-emphasis-style: discrete formal syntax <'text-emphasis-style'> | <'text-emphasis-color'> examples a heading with emphasis shape and color this example draws a heading with triangles used to emphasize each character.
text-indent - CSS: Cascading Style Sheets
syntax /* <length> values */ text-indent: 3mm; text-indent: 40px; /* <percentage> value relative to the containing block width */ text-indent: 15%; /* keyword values */ text-indent: 5em each-line; text-indent: 5em hanging; text-indent: 5em hanging each-line; /* global values */ text-indent: inherit; text-indent: initial; text-indent: unset; values <length> indentation is specified as an abs...
... formal definition initial value0applies toblock containersinheritedyespercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute length, plus any keywords as specifiedanimation typea length, percentage or calc(); formal syntax <length-percentage> && hanging?
text-justify - CSS: Cascading Style Sheets
text-justify: none; text-justify: auto; text-justify: inter-word; text-justify: inter-character; text-justify: distribute; /* deprecated value */ syntax the text-justify property is specified as a single keyword chosen from the list of values below.
... formal definition initial valueautoapplies toinline-level and table-cell elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | inter-character | inter-word | none examples <p class="none"><code>text-justify: none</code> —<br>lorem ipsum dolor sit amet, consectetur adipiscing elit.
text-orientation - CSS: Cascading Style Sheets
syntax /* keyword values */ text-orientation: mixed; text-orientation: upright; text-orientation: sideways-right; text-orientation: sideways; text-orientation: use-glyph-orientation; /* global values */ text-orientation: inherit; text-orientation: initial; text-orientation: unset; the text-orientation property is specified as a single keyword from the list below.
... formal definition initial valuemixedapplies toall elements, except table row groups, rows, column groups, and columnsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax mixed | upright | sideways examples html <p>lorem ipsum dolet semper quisquam.</p> css p { writing-mode: vertical-rl; text-orientation: upright; } result specifications specification status comment css writing modes module level 3the definition of 'text-orientation' in that specification.
text-overflow - CSS: Cascading Style Sheets
syntax the text-overflow property may be specified using one or two values.
... formal definition initial valueclipapplies toblock container elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ clip | ellipsis | <string> ]{1,2} examples css p { width: 200px; border: 1px solid; padding: 2px 5px; /* both of the following are required for text-overflow */ white-space: nowrap; overflow: hidden; } .overflow-visible { white-space: initial; } .overflow-clip { text-overflow: clip; } .overflow-ellipsis { text-overflow: ellipsis; } .overflow-string { /* not support...
text-rendering - CSS: Cascading Style Sheets
syntax values auto the browser makes educated guesses about when to optimize for speed, legibility, and geometric precision while drawing text.
... formal definition initial valueautoapplies totext elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | optimizespeed | optimizelegibility | geometricprecision examples automatic application of optimizelegibility this demonstrates how optimizelegibility is used by browsers automatically when the font-size is smaller than 20px.
text-size-adjust - CSS: Cascading Style Sheets
syntax the text-size-adjust property is specified as none, auto, or a <percentage>.
... formal definition initial valueauto for smartphone browsers supporting inflation, none in other cases (and then not modifiable).applies toall elementsinheritedyespercentagesyes, refer to the corresponding size of the text fontcomputed valueas specifiedanimation typediscrete formal syntax none | auto | <percentage> examples basic disabling usage as hinted at above, on a properly designed responsive site the text-size-adjust behavior is not needed, so developers can elect to turn it off by specifying a vlaue of none: p { -webkit-text-size-adjust: none; text-size-adjust: none; } specifications specification status comment css mobile text size a...
text-transform - CSS: Cascading Style Sheets
syntax /* keyword values */ text-transform: none; text-transform: capitalize; text-transform: uppercase; text-transform: lowercase; text-transform: full-width; text-transform: full-size-kana; /* global values */ text-transform: inherit; text-transform: initial; text-transform: unset; capitalize is a keyword that converts the first letter of each word to uppercase.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | capitalize | uppercase | lowercase | full-width | full-size-kana examples none <p>initial string <strong>lorem ipsum dolor sit amet, consectetur adipisicing elit, ...</strong> </p> <p>text-transform: none <strong><span>lorem ipsum dolor sit amet, consectetur adipisicing elit, ...</span></strong> </p> span { text-transform: none; } strong { float: right; } this demonstrates no ...
text-underline-offset - CSS: Cascading Style Sheets
syntax /* single keyword */ text-underline-offset: auto; /* length */ text-underline-offset: 0.1em; text-underline-offset: 3px; /* percentage */ text-underline-offset: 20%; /* global values */ text-underline-offset: inherit; text-underline-offset: initial; text-underline-offset: unset; the text-underline-offset property is specified as a single value from the list below.
...it also applies to ::first-letter and ::first-line.inheritedyespercentagesrefer to the font size of the element itselfcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length> | <percentage> examples <p class="oneline">here's some text with an offset wavy red underline!</p> <br> <p class="twolines">this text has lines both above and below it.
text-underline-position - CSS: Cascading Style Sheets
syntax /* single keyword */ text-underline-position: auto; text-underline-position: under; text-underline-position: left; text-underline-position: right; /* multiple keywords */ text-underline-position: under left; text-underline-position: right under; /* global values */ text-underline-position: inherit; text-underline-position: initial; text-underline-position: unset; syntax values auto the user agent uses its own...
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | from-font | [ under | [ left | right ] ] examples a simple example let's take a couple of simple example paragraphs: <p class="horizontal">lorem ipsum dolor sit amet, consectetur adipiscing elit.
top - CSS: Cascading Style Sheets
WebCSStop
syntax /* <length> values */ top: 3px; top: 2.4em; /* <percentage>s of the height of the containing block */ top: 10%; /* keyword value */ top: auto; /* global values */ top: inherit; top: initial; top: unset; values <length> a negative, null, or positive <length> that represents: for absolutely positioned elements, the distance to the top edge of the containing block.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentagesrefer to the height of the containing blockcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length, percentage or calc(); formal syntax <length> | <percentage> | auto examples body { background: beige; } div { position: absolute; top: 10%; right: 40%; bottom: 20%; left: 15%; background: gold; border: 1px solid blue; } <div>the size of this content is determined by the position of its edges.</div> specifications specification status comment css positioned layout module level 3th...
touch-action - CSS: Cascading Style Sheets
syntax the touch-action property may be specified as either: one of the keywords auto, none, manipulation, or one of the keywords pan-x, pan-left, pan-right, and/or one of the keywords pan-y, pan-up, pan-down, plus optionally the keyword pinch-zoom.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | understanding wcag 2.0 formal definition initial valueautoapplies toall elements except: non-replaced inline elements, table rows, row groups, table columns, and column groupsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | none | [ [ pan-x | pan-left | pan-right ] | [ pan-y | pan-up | pan-down ] | pinch-zoom ] | manipulation examples disabling all gestures the most common usage is to disable all gestures on an element (and its non-scrollable descendants) that provides its own dragging and zooming behavior – such as a map or game surface.
transform-box - CSS: Cascading Style Sheets
/* keyword values */ transform-box: content-box; transform-box: border-box; transform-box: fill-box; transform-box: stroke-box; transform-box: view-box; /* global values */ transform-box: inherit; transform-box: initial; transform-box: unset; syntax the transform-box property is specified as one of the keyword values listed below.
... formal definition initial valueview-boxapplies totransformable elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax content-box | border-box | fill-box | stroke-box | view-box examples svg transform-origin scoping in this example we have an svg: <svg id="svg" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 50 50"> <g> <circle id="center" fill="red" r="1" transform="translate(25 25)" /> <circle id="boxcenter" fill="blue" r=".5" transform="translate(15 15)" /> <rect id="box" x="10" y="10" widt...
translate() - CSS: Cascading Style Sheets
syntax /* single <length-percentage> values */ transform: translate(200px); transform: translate(50%); /* double <length-percentage> values */ transform: translate(100px, 200px); transform: translate(100px, 50%); transform: translate(30%, 200px); transform: translate(30%, 50%); values single <length-percentage> values this value is a <length> or <percentage> representing the abscissa (horizontal, x-coordinate) of the translating vector.
... 10tx01ty001 10tx01ty001 100tx010ty00100001 [1 0 0 1 tx ty] formal syntax translate(<length-percentage> , <length-percentage>?) examples using a single-axis translation html <div>static</div> <div class="moved">moved</div> <div>static</div> css div { width: 60px; height: 60px; background-color: skyblue; } .moved { transform: translate(10px); /* equal to: translatex(10px) or translate(10px, 0) */ background-color: pink; } result combining y-axis ...
translateX() - CSS: Cascading Style Sheets
syntax /* <length-percentage> values */ transform: translatex(200px); transform: translatex(50%); values <length-percentage> is a <length> or <percentage> representing the abscissa of the translating vector.
... 10t010001 10t010001 100t010000100001 [1 0 0 1 t 0] formal syntax translatex(<length-percentage>) examples html <div>static</div> <div class="moved">moved</div> <div>static</div> css div { width: 60px; height: 60px; background-color: skyblue; } .moved { transform: translatex(10px); /* equal to translate(10px) */ background-color: pink; } result specifications specification status comment css transforms level 1...
translateY() - CSS: Cascading Style Sheets
syntax /* <length-percentage> values */ transform: translatey(200px); transform: translatey(50%); values <length-percentage> the value is a <length> or <percentage> representing the ordinate of the translating vector.
... 10001t001 10001t001 1000010t00100001 [1 0 0 1 0 t] formal syntax translatey(<length-percentage>) examples html <div>static</div> <div class="moved">moved</div> <div>static</div> css div { width: 60px; height: 60px; background-color: skyblue; } .moved { transform: translatey(10px); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'translatey()...
transform-style - CSS: Cascading Style Sheets
syntax /* keyword values */ transform-style: flat; transform-style: preserve-3d; /* global values */ transform-style: inherit; transform-style: initial; transform-style: unset; values flat indicates that the children of the element are lying in the plane of the element itself.
... formal definition initial valueflatapplies totransformable elementsinheritednocomputed valueas specifiedanimation typediscretecreates stacking contextyes formal syntax flat | preserve-3d examples transform style demonstration in this example we have a 3d cube created using transforms.
transform - CSS: Cascading Style Sheets
WebCSStransform
syntax /* keyword values */ transform: none; /* function values */ transform: matrix(1.0, 2.0, 3.0, 4.0, 5.0, 6.0); transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: perspective(17px); transform: rotate(0.5turn); transform: rotate3d(1, 2.0, 3.0, 10deg); transform: rotatex(10deg); transform: rotatey(10deg); transform: rotatez(10deg); transform: translate(12px, 50%); transf...
... more: mdn understanding wcag, guideline 2.3 explanations understanding success criterion 2.3.3 | w3c understanding wcag 2.1 formal definition initial valuenoneapplies totransformable elementsinheritednopercentagesrefer to the size of bounding boxcomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea transformcreates stacking contextyes formal syntax none | <transform-list>where <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()>wh...
transition-delay - CSS: Cascading Style Sheets
syntax /* <time> values */ transition-delay: 3s; transition-delay: 2s, 4ms; /* global values */ transition-delay: inherit; transition-delay: initial; transition-delay: unset; values <time> denotes the amount of time to wait between a property's value changing and the start of the transition effect.
... formal definition initial value0sapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples transition-delay: 0.5s <div class="parent"> <div class="box">lorem</div> </div> .parent { width: 250px; height:125px;} .box { width: 100px; height: 100px; background-color: red; font-size: 20px; left: 0px; top: 0px; position:absolute; -webkit-transition-property: width height background-color font-size left top color; -webkit-transition-duration:2s; -webkit-transition-delay:0.5s; -webkit-transition-timing-function: linear; transition-property: width height background-color font-size left top color; transition-duration:2s; transition-delay:0.
transition-duration - CSS: Cascading Style Sheets
syntax /* <time> values */ transition-duration: 6s; transition-duration: 120ms; transition-duration: 1s, 15s; transition-duration: 10s, 30s, 230ms; /* global values */ transition-duration: inherit; transition-duration: initial; transition-duration: unset; values <time> is a <time> denoting the amount of time the transition from the old value of a property to the new value should take.
... formal definition initial value0sapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples transition-duration: 0.5s <div class="parent"> <div class="box">lorem</div> </div> .parent { width: 250px; height:125px;} .box { width: 100px; height: 100px; background-color: red; font-size: 20px; left: 0px; top: 0px; position:absolute; -webkit-transition-property: width height background-color font-size left top transform -webkit-transform color; -webkit-transition-duration:0.5s;...
transition-property - CSS: Cascading Style Sheets
syntax /* keyword values */ transition-property: none; transition-property: all; /* <custom-ident> values */ transition-property: test_05; transition-property: -specific; transition-property: sliding-vertically; /* multiple values */ transition-property: test1, animation4; transition-property: all, height, color; transition-property: all, -moz-specific, sliding; /* global values */ transition-proper...
... formal definition initial valueallapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | <single-transition-property>#where <single-transition-property> = all | <custom-ident> examples there are several examples of css transitions included in the main css transitions article.
translate - CSS: Cascading Style Sheets
WebCSStranslate
syntax /* keyword values */ translate: none; /* single values */ translate: 100px; translate: 50%; /* two values */ translate: 100px 200px; translate: 50% 105px; /* three values */ translate: 50% 105px 5rem; values single <length-percentage> value a <length> or <percentage> that specifies a 2d translation, with the same translation along both the x and y axes.
... formal definition initial valuenoneapplies totransformable elementsinheritednopercentagesrefer to the size of bounding boxcomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea transformcreates stacking contextyes formal syntax none | <length-percentage> [ <length-percentage> <length>?
unicode-bidi - CSS: Cascading Style Sheets
/* keyword values */ unicode-bidi: normal; unicode-bidi: embed; unicode-bidi: isolate; unicode-bidi: bidi-override; unicode-bidi: isolate-override; unicode-bidi: plaintext; /* global values */ unicode-bidi: inherit; unicode-bidi: initial; unicode-bidi: unset; syntax values normal the element does not offer an additional level of embedding with respect to the bidirectional algorithm.
... formal definition initial valuenormalapplies toall elements, though some values have no effect on non-inline elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | embed | isolate | bidi-override | isolate-override | plaintext examples css .bible-quote { direction: rtl; unicode-bidi: embed; } html <div class="bible-quote"> a line of text </div> <div> another line of text </div> result specifications specification status comment css writing modes module level 3the definition of 'unicode-bidi' in that ...
url() - CSS: Cascading Style Sheets
WebCSSurl()
syntax values <string> <url> a url, which is a relative or absolute address, or pointer, to the web resource to be included, or a data uri, optionally in single or double quotes.
... formal syntax url( <string> <url-modifier>* ) examples content property html <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> </ul> css li::after { content: ' - ' url(https://mdn.mozillademos.org/files/16761/star.gif); } result data-uri html <div class="background"></div> css .background { height: 100vh; } .background { background: yellow; background: url("data:image/svg+xm...
user-modify - CSS: Cascading Style Sheets
syntax the -moz-user-modify property is specified as one of the keyword values from the list below.
... formal syntax syntax not found in db!
user-select - CSS: Cascading Style Sheets
syntax none the text of the element and its sub-elements is not selectable.
... formal definition initial valueautoapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | text | none | contain | all examples html <p>you should be able to select this text.</p> <p class="unselectable">hey, you can't select this text!</p> <p class="all">clicking once will select all of this text.</p> css .unselectable { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .all { -moz-user-select: all; -webkit-user-s...
var() - CSS: Cascading Style Sheets
WebCSSvar
(doing so usually produces invalid syntax, or else a value whose meaning has no connection to the variable.) syntax the first argument to the function is the name of the custom property to be substituted.
...) note: the syntax of the fallback, like that of custom properties, allows commas.
vertical-align - CSS: Cascading Style Sheets
syntax /* keyword values */ vertical-align: baseline; vertical-align: sub; vertical-align: super; vertical-align: text-top; vertical-align: text-bottom; vertical-align: middle; vertical-align: top; vertical-align: bottom; /* <length> values */ vertical-align: 10em; vertical-align: 4px; /* <percentage> values */ vertical-align: 20%; /* global values */ vertical-align: inherit; vertical-align: initial...
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the line-height of the element itselfcomputed valuefor percentage and length values, the absolute length, otherwise the keyword as specifiedanimation typea length formal syntax baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length> examples basic example html <div>an <img src="https://udn.realityripple.com/samples/b4/e1f0faff5b.svg" alt="link" width="32" height="32" /> image with a default alignment.</div> <div>an <img class="top" src="https://udn.realityripple.com/samples/b4/e1f0faff5b.svg" alt="link" width="32" height="3...
visibility - CSS: Cascading Style Sheets
syntax /* keyword values */ visibility: visible; visibility: hidden; visibility: collapse; /* global values */ visibility: inherit; visibility: initial; visibility: unset; the visibility property is specified as one of the keyword values listed below.
... formal definition initial valuevisibleapplies toall elementsinheritedyescomputed valueas specifiedanimation typea visibility formal syntax visible | hidden | collapse examples basic example html <p class="visible">the first paragraph is visible.</p> <p class="not-visible">the second paragraph is not visible.</p> <p class="visible">the third paragraph is visible.
white-space - CSS: Cascading Style Sheets
syntax /* keyword values */ white-space: normal; white-space: nowrap; white-space: pre; white-space: pre-wrap; white-space: pre-line; white-space: break-spaces; /* global values */ white-space: inherit; white-space: initial; white-space: unset; the white-space property is specified as a single keyword chosen from the list of values below.
...se no wrap remove pre preserve preserve no wrap preserve pre-wrap preserve preserve wrap hang pre-line preserve collapse wrap remove break-spaces preserve preserve wrap wrap formal definition initial valuenormalapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | pre | nowrap | pre-wrap | pre-line | break-spaces examples basic example code { white-space: pre; } line breaks inside <pre> elements pre { word-wrap: break-word; /* ie 5.5-7 */ white-space: pre-wrap; /* modern browsers */ } in action html <div id="css-code" class="box"> p { white-space: <select> <option>normal</option> <option>nowrap</option> <o...
widows - CSS: Cascading Style Sheets
WebCSSwidows
(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.
... formal definition initial value2applies toblock container elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax <integer> examples controlling column widows html <div> <p>this is the first paragraph containing some text.</p> <p>this is the second paragraph containing some more text than the first one.
width - CSS: Cascading Style Sheets
WebCSSwidth
syntax /* <length> values */ width: 300px; width: 25em; /* <percentage> value */ width: 75%; /* keyword values */ width: max-content; width: min-content; width: fit-content(20em); width: auto; /* global values */ width: inherit; width: initial; width: unset; the width property is specified as either: one of the following keyword values: min-content, max-content, fit-content, auto.
...nding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | understanding wcag 2.0 formal definition initial valueautoapplies toall elements but non-replaced inline elements, table rows, and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuea percentage or auto or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples default width p.goldie { background: gold; } <p class="goldie">the mozilla community produces a lot of great software.</p> pixels and ems .px_length { width: 200px; background-color: red; color: white; border: 1px solid black;...
will-change - CSS: Cascading Style Sheets
syntax values auto this keyword expresses no particular intent; the user agent should apply whatever heuristics and optimizations it normally does.
... .slide { will-change: transform; } formal definition initial valueautoapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | <animateable-feature>#where <animateable-feature> = scroll-position | contents | <custom-ident> examples via script this is an example showing how to apply the will-change property through scripting, which is probably what you should be doing in most cases.
word-break - CSS: Cascading Style Sheets
syntax /* keyword values */ word-break: normal; word-break: break-all; word-break: keep-all; word-break: break-word; /* deprecated */ /* global values */ word-break: inherit; word-break: initial; word-break: unset; the word-break property is specified as a single keyword chosen from the list of values below.
... formal definition initial valuenormalapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | break-all | keep-all | break-word examples html <p>1.
word-spacing - CSS: Cascading Style Sheets
syntax /* keyword value */ word-spacing: normal; /* <length> values */ word-spacing: 3px; word-spacing: 0.3em; /* <percentage> values */ word-spacing: 50%; word-spacing: 200%; /* global values */ word-spacing: inherit; word-spacing: initial; word-spacing: unset; values normal the normal inter-word spacing, as defined by the current font and/or the browser.
...it also applies to ::first-letter and ::first-line.inheritedyespercentagesrefer to the width of the affected glyphcomputed valuean optimum, minimum, and maximum value, each consisting of either an absolute length, a percentage, or the keyword normalanimation typea length formal syntax normal | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css text module level 3the definition of 'word-spacing' in that specification.
writing-mode - CSS: Cascading Style Sheets
syntax /* keyword values */ writing-mode: horizontal-tb; writing-mode: vertical-rl; writing-mode: vertical-lr; /* global values */ writing-mode: inherit; writing-mode: initial; writing-mode: unset; the writing-mode property is specified as one of the values listed below.
... formal definition initial valuehorizontal-tbapplies toall elements except table row groups, table column groups, table rows, and table columnsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr examples using multiple writing modes this example demonstrates all of the writing modes, showing each with text in various languages.
z-index - CSS: Cascading Style Sheets
WebCSSz-index
syntax /* keyword value */ z-index: auto; /* <integer> values */ z-index: 0; z-index: 3; z-index: 289; z-index: -1; /* negative values to lower the priority */ /* global values */ z-index: inherit; z-index: initial; z-index: unset; the z-index property is specified as either the keyword auto or an <integer>.
... formal definition initial valueautoapplies topositioned elementsinheritednocomputed valueas specifiedanimation typean integercreates stacking contextyes formal syntax auto | <integer> examples visually layering elements html <div class="dashed-box">dashed box <span class="gold-box">gold box</span> <span class="green-box">green box</span> </div> css .dashed-box { position: relative; z-index: 1; border: dashed; height: 8em; margin-bottom: 1em; margin-top: 2em; } .gold-box { position: absolute; z-index: 3; /* put .gold-box above .green...
zoom - CSS: Cascading Style Sheets
WebCSSzoom
/* 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.
... 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> <di...
Block formatting context - Developer guides
see also float, clear css key concepts: css syntax, at-rule, comments, specificity and inheritance, the box, layout modes and visual formatting models, and margin collapsing, or the initial, computed, resolved, specified, used, and actual values.
... definitions of value syntax, shorthand properties and replaced elements.
HTML5 Parser - Developer guides
WebGuideHTMLHTML5HTML5 Parser
the new parser introduces these major improvements: you can now use svg and mathml inline in html5 pages, without xml namespace syntax.
... the syntax <foo/> opens and immediately closes the foo element if it is a mathml or svg element (i.e.
XHTML - Developer guides
WebGuideHTMLXHTML
xhtml is a term that was historically used to describe html documents written to conform with xml syntax rules.
...instead, even though the documents are written to conform to xml syntax rules, they are served with a content-type: text/html header — so browsers parse those documents using html parsers rather than xml parsers, which can cause a variety of sometimes-very-surprising problems.
HTML attribute: max - HTML: Hypertext Markup Language
WebHTMLAttributesmax
syntax syntax for max values by input type input type syntax example 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 ...
... 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> ...
HTML attribute: pattern - HTML: Hypertext Markup Language
some of the input types supporting the pattern attribute, notably the email and url input types, have expected value syntaxes that must be matched.
... if the pattern attribute isn't present, and the value doesn't match the expected syntax for that value type, the validitystate object's read-only typemismatch property will be true.
Microformats - HTML: Hypertext Markup Language
microformats2 is an update to microformats that provides a simpler way of annotating html structured syntax & vocabularies than previous approaches of using rdfa and microdata which require learning new attributes.
...prefixes are syntax independent from vocabularies, which are developed separately.
Content-Disposition - HTTP
header type response header (for the main body) general header (for a subpart of a multipart body) forbidden header name no syntax as a response header for the main body the first parameter in the http context is either inline (default value, indicating it can be displayed inside the web page, or as the web page) or attachment (indicating it should be downloaded; most browsers presenting a 'save as' dialog, prefilled with the value of the filename parameters if present).
...additional parameters are case-insensitive and have arguments that use quoted-string syntax after the '=' sign.
Content-Length - HTTP
header type entity header forbidden header name yes syntax content-length: <length> directives <length> the length in decimal number of octets.
... specifications specification title rfc 7230, section 3.3.2: content-length hypertext transfer protocol (http/1.1): message syntax and routing ...
Content-Security-Policy-Report-Only - HTTP
syntax content-security-policy-report-only: <policy-directive>; <policy-directive> directives the directives of the content-security-policy header can also be applied to content-security-policy-report-only.
... content-security-policy: default-src https:; report-uri /csp-violation-report-endpoint/ violation report syntax the report json object contains the following data: blocked-uri the uri of the resource that was blocked from loading by the content security policy.
Feature-Policy: payment - HTTP
when this policy is disabled, the paymentrequest() constructor will throw a syntaxerror.
... syntax feature-policy: payment <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Host - HTTP
WebHTTPHeadersHost
header type request header forbidden header name yes syntax host: <host>:<port> directives <host> the domain name of the server (for virtual hosting).
... examples host: developer.cdn.mozilla.net specifications specification title rfc 7230, section 5.4: host hypertext transfer protocol (http/1.1): message syntax and routing ...
Keep-Alive - HTTP
header type general header forbidden header name yes syntax keep-alive: parameters directives parameters a comma-separated list of parameters, each consisting of an identifier and a value separated by the equal sign ('=').
...content-type: text/html; charset=utf-8 date: thu, 11 aug 2016 15:23:13 gmt keep-alive: timeout=5, max=1000 last-modified: mon, 25 jul 2016 04:32:39 gmt server: apache (body) specifications specification title http keep-alive header keep-alive header (ietf internet draft) rfc 7230, appendix a.1.2: keep-alive hypertext transfer protocol (http/1.1): message syntax and routing ...
Trailer - HTTP
WebHTTPHeadersTrailer
header type response header forbidden header name yes syntax trailer: header-names directives header-names http header fields which will be present in the trailer part of chunked messages.
... http/1.1 200 ok content-type: text/plain transfer-encoding: chunked trailer: expires 7\r\n mozilla\r\n 9\r\n developer\r\n 7\r\n network\r\n 0\r\n expires: wed, 21 oct 2015 07:28:00 gmt\r\n \r\n specifications specification title rfc 7230, section 4.4: trailer hypertext transfer protocol (http/1.1): message syntax and routing rfc 7230, section 4.1.2: chunked trailer part hypertext transfer protocol (http/1.1): message syntax and routing ...
Transfer-Encoding - HTTP
header type response header forbidden header name yes syntax transfer-encoding: chunked transfer-encoding: compress transfer-encoding: deflate transfer-encoding: gzip transfer-encoding: identity // several values can be listed, separated by a comma transfer-encoding: gzip, chunked directives chunked data is sent in a series of chunks.
...a chunked response looks like this: http/1.1 200 ok content-type: text/plain transfer-encoding: chunked 7\r\n mozilla\r\n 9\r\n developer\r\n 7\r\n network\r\n 0\r\n \r\n specifications specification title rfc 7230, section 3.3.1: transfer-encoding hypertext transfer protocol (http/1.1): message syntax and routing ...
Upgrade - HTTP
WebHTTPHeadersUpgrade
syntax connection: upgrade upgrade: protocol_name[/protocol_version] notes: the connection header with type upgrade must always be sent with the upgrade header (as shown above).
... examples connection: upgrade upgrade: http/2.0, shttp/1.3, irc/6.9, rta/x11 connection: upgrade upgrade: websocket specifications specification hypertext transfer protocol (http/1.1): message syntax and routing (http/1.1)# header.upgrade hypertext transfer protocol (http/1.1): semantics and content (http/1.1)# status.426 hypertext transfer protocol version 2 (http/2) (http/2)# informational-responses ...
Via - HTTP
WebHTTPHeadersVia
header type general header forbidden header name yes syntax via: [ <protocol-name> "/" ] <protocol-version> <host> [ ":" <port> ] or via: [ <protocol-name> "/" ] <protocol-version> <pseudonym> directives <protocol-name> optional.
... examples via: 1.1 vegur via: http/1.1 gwa via: 1.0 fred, 1.1 p.example.net specifications specification title rfc 7230, section 5.7.1: via hypertext transfer protocol (http/1.1): message syntax and routing ...
POST - HTTP
WebHTTPMethodsPOST
request has body yes successful response has body yes safe no idempotent no cacheable only if freshness information is included allowed in html forms yes syntax post /test example a simple form using the default application/x-www-form-urlencoded content type: post /test http/1.1 host: foo.example content-type: application/x-www-form-urlencoded content-length: 27 field1=value1&field2=value2 a form using the multipart/form-data content type: post /test http/1.1 host: foo.example content-type: multipart/form-data;boundary="boundary" --boundary cont...
...ent-disposition: form-data; name="field1" value1 --boundary content-disposition: form-data; name="field2"; filename="example.txt" value2 --boundary-- specifications specification title rfc 7231, section 4.3.3: post hypertext transfer protocol (http/1.1): semantics and content rfc 2046, section 5.1.1: common syntax multipurpose internet mail extensions (mime) part two: media types ...
Indexed collections - JavaScript
the bracket syntax is called an "array literal" or "array initializer." it's shorter than other forms of array creation, and so is generally preferred.
...obj.prop = [element0, element1, ..., elementn] // or let obj = {prop: [element0, element1, ...., elementn]} if you wish to initialize an array with a single element, and the element happens to be a number, you must use the bracket syntax.
Iterators and generators - JavaScript
generator functions are written using the function* syntax.
... syntaxes expecting iterables some statements and expressions expect iterables.
Text formatting - JavaScript
using normal strings, you would have to use the following syntax in order to get multi-line strings: console.log('string text line 1\n\ string text line 2'); // "string text line 1 // string text line 2" to get the same effect with multi-line strings, you can now write: console.log(`string text line 1 string text line 2`); // "string text line 1 // string text line 2" embedded expressions in order to embed expressions within normal strings, you would use ...
...the following syntax: const five = 5; const ten = 10; console.log('fifteen is ' + (five + ten) + ' and not ' + (2 * five + ten) + '.'); // "fifteen is 15 and not 20." now, with template literals, you are able to make use of the syntactic sugar making substitutions like this more readable: const five = 5; const ten = 10; console.log(`fifteen is ${five + ten} and not ${2 * five + ten}.`); // "fifteen is 15 and not 20." for more information, read about template literals in the javascript reference.
Using Promises - JavaScript
you can read more about the syntax here.
... using async/await addresses most, if not all of these problems—the tradeoff being that the most common mistake with that syntax is forgetting the await keyword.
Public class fields - JavaScript
syntax class classwithinstancefield { instancefield = 'instance field' } class classwithstaticfield { static staticfield = 'static field' } class classwithpublicinstancemethod { publicmethod() { return 'hello world' } } examples public static fields public static fields are useful when you want a field to exist only once per class, not on every class instance you create.
...use the get and set syntax to declare a public instance getter or setter.
constructor - JavaScript
syntax constructor([arguments]) { ...
...having more than one occurrence of a constructor method in a class will throw a syntaxerror error.
The arguments object - JavaScript
however, it can be converted to a real array: var args = array.prototype.slice.call(arguments); // using an array literal is shorter than above but allocates an empty array var args = [].slice.call(arguments); as you can do with any array-like object, you can use es2015's array.from() method or spread syntax to convert arguments to a real array: let args = array.from(arguments); // or let args = [...arguments]; the arguments object is useful for functions called with more arguments than they are formally declared to accept.
...doing so will throw a syntax error.
Rest parameters - JavaScript
the rest parameter syntax allows us to represent an indefinite number of arguments as an array.
... syntax function f(a, b, ...theargs) { // ...
Array.prototype[@@iterator]() - JavaScript
syntax arr[symbol.iterator]() return value the initial value given by the values() iterator.
...letterresult.innerhtml += "<li>" + letter + "</li>"; } result alternative iteration var arr = ['a', 'b', 'c', 'd', 'e']; var earr = arr[symbol.iterator](); console.log(earr.next().value); // a console.log(earr.next().value); // b console.log(earr.next().value); // c console.log(earr.next().value); // d console.log(earr.next().value); // e use case for brace notation the use case for this syntax over using the dot notation (array.prototype.values()) is in a case where you don't know what object is going to be ahead of time.
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).
... note that this special case only applies to javascript arrays created with the array constructor, not array literals created with the bracket syntax.
Array.prototype.every() - JavaScript
syntax arr.every(callback(element[, index[, array]])[, thisarg]) parameters callback a function to test for each element, taking three arguments: element the current element being processed in the array.
... function isbigenough(element, index, array) { return element >= 10; } [12, 5, 8, 130, 44].every(isbigenough); // false [12, 54, 18, 130, 44].every(isbigenough); // true using arrow functions arrow functions provide a shorter syntax for the same test.
Array.prototype.flat() - JavaScript
syntax var newarray = arr.flat([depth]); parameters depth optional the depth level specifying how deep a nested array structure should be flattened.
... alternatives reduce and concat const arr = [1, 2, [3, 4]]; // to flat single level array arr.flat(); // is equivalent to arr.reduce((acc, val) => acc.concat(val), []); // [1, 2, 3, 4] // or with decomposition syntax const flattened = arr => [].concat(...arr); reduce + concat + isarray + recursivity const arr = [1, 2, [3, 4, [5, 6]]]; // to enable deep level flatten use recursion with reduce and concat function flatdeep(arr, d = 1) { return d > 0 ?
Array.from() - JavaScript
syntax array.from(arraylike [, mapfn [, thisarg]]) parameters arraylike an array-like or iterable object to convert to an array.
... in es2015, the class syntax allows sub-classing of both built-in and user-defined classes.
Array.prototype.map() - JavaScript
syntax let new_array = arr.map(function callback( currentvalue[, index[, array]]) { // return element for new_array }[, thisarg]) parameters callback function that is called for every element of arr.
... function returnint(element) { return parseint(element, 10) } ['1', '2', '3'].map(returnint); // [1, 2, 3] // actual result is an array of numbers (as expected) // same as above, but using the concise arrow function syntax ['1', '2', '3'].map( str => parseint(str) ) // a simpler way to achieve the above, while avoiding the "gotcha": ['1', '2', '3'].map(number) // [1, 2, 3] // but unlike parseint(), number() will also return a float or (resolved) exponential notation: ['1.1', '2.2e2', '3e300'].map(number) // [1.1, 220, 3e+300] // for comparison, if we use parseint() on the array above: ['1.1', '2.2e2', '3e300']...
Array.prototype.pop() - JavaScript
syntax arrname.pop() return value the removed element from the array; undefined if the array is empty.
... var myfish = {0:'angel', 1:'clown', 2:'mandarin', 3:'sturgeon', length: 4}; var popped = array.prototype.pop.call(myfish); //same syntax for using apply( ) console.log(myfish); // {0:'angel', 1:'clown', 2:'mandarin', length: 3} console.log(popped); // 'sturgeon' specifications specification ecmascript (ecma-262)the definition of 'array.prototype.pop' in that specification.
Array.prototype.reverse() - JavaScript
syntax a.reverse() return value the reversed array.
... const a = {0: 1, 1: 2, 2: 3, length: 3}; console.log(a); // {0: 1, 1: 2, 2: 3, length: 3} array.prototype.reverse.call(a); //same syntax for using apply() console.log(a); // {0: 3, 1: 2, 2: 1, length: 3} specifications specification ecmascript (ecma-262)the definition of 'array.prototype.reverse' in that specification.
Array.prototype.some() - JavaScript
syntax arr.some(callback(element[, index[, array]])[, thisarg]) parameters callback a function to test for each element, taking three arguments: element the current element being processed in the array.
... function isbiggerthan10(element, index, array) { return element > 10; } [2, 5, 8, 1, 4].some(isbiggerthan10); // false [12, 5, 8, 1, 4].some(isbiggerthan10); // true testing array elements using arrow functions arrow functions provide a shorter syntax for the same test.
Array.prototype.sort() - JavaScript
syntax arr.sort([comparefunction]) parameters comparefunction optional specifies a function that defines the sort order.
...g function will sort the array in ascending order (if it doesn't contain infinity and nan): function comparenumbers(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.
Array - JavaScript
nevertheless, trying to access an element of an array as follows throws a syntax error because the property name is not valid: console.log(arr.0) // a syntax error there is nothing special about javascript arrays and the properties that cause this.
... let years = [1950, 1960, 1970, 1980, 1990, 2000, 2010] console.log(years.0) // a syntax error console.log(years[0]) // works properly renderer.3d.settexture(model, 'character.png') // a syntax error renderer['3d'].settexture(model, 'character.png') // works properly in the 3d example, '3d' had to be quoted (because it begins with a digit).
BigInt64Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).
... syntax new bigint64array(); new bigint64array(length); new bigint64array(typedarray); new bigint64array(object); new bigint64array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
BigUint64Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).
... syntax new biguint64array(); new biguint64array(length); new biguint64array(typedarray); new biguint64array(object); new biguint64array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
Float32Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new float32array(); // new in es2017 new float32array(length); new float32array(typedarray); new float32array(object); new float32array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
Float64Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new float64array(); // new in es2017 new float64array(length); new float64array(typedarray); new float64array(object); new float64array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
Function.prototype.call() - JavaScript
syntax func.call([thisarg[, arg1, arg2, ...argn]]) parameters thisarg optional the value to use as this when calling func.
... note: while the syntax of this function is almost identical to that of apply(), the fundamental difference is that call() accepts an argument list, while apply() accepts a single array of arguments.
Int16Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new int16array(); // new in es2017 new int16array(length); new int16array(typedarray); new int16array(object); new int16array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
Int32Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new int32array(); // new in es2017 new int32array(length); new int32array(typedarray); new int32array(object); new int32array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
Int8Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new int8array(); // new in es2017 new int8array(length); new int8array(typedarray); new int8array(object); new int8array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
JSON.stringify() - JavaScript
syntax json.stringify(value[, replacer[, space]]) parameters value the value to convert to a json string.
... replace(/\u2029/g, '\\u2029'); } var s = { a: string.fromcharcode(0x2028), b: string.fromcharcode(0x2029) }; try { eval('(' + json.stringify(s) + ')'); } catch (e) { console.log(e); // "syntaxerror: unterminated string literal" } // no need for a catch eval('(' + jsfriendlyjsonstringify(s) + ')'); // console.log in firefox unescapes the unicode if // logged to console, so we use alert alert(jsfriendlyjsonstringify(s)); // {"a":"\u2028","b":"\u2029"} note: properties of non-array objects are not guaranteed to be stringified in any particular order.
Map.prototype.forEach() - JavaScript
syntax mymap.foreach(callback([value][,key][,map])[, thisarg]) parameters callback function to execute for each entry of mymap.
... map optional the map being iterated (mymap in the above syntax box).
Object.prototype.__defineGetter__() - JavaScript
this feature is deprecated in favor of defining getters using the object initializer syntax or the object.defineproperty() api.
... syntax obj.__definegetter__(prop, func) parameters prop a string containing the name of the property to bind to the given function.
Object.prototype.__defineSetter__() - JavaScript
this feature is deprecated in favor of defining setters using the object initializer syntax or the object.defineproperty() api.
... syntax obj.__definesetter__(prop, fun) parameters prop a string containing the name of the property to be bound to the given function.
Object.defineProperty() - JavaScript
syntax object.defineproperty(obj, prop, descriptor) parameters obj the object on which to define the property.
...object.defineproperty(obj, 'key', withvalue('static')); // if freeze is available, prevents adding or // removing the object prototype properties // (value, get, set, enumerable, writable, configurable) (object.freeze || object)(object.prototype); examples if you want to see how to use the object.defineproperty method with a binary-flags-like syntax, see additional examples.
Object - JavaScript
objects can be created using the object() constructor or the object initializer / literal syntax.
... see also the object initializer / literal syntax.
Promise.prototype.then() - JavaScript
syntax p.then(onfulfilled[, onrejected]); p.then(value => { // fulfillment }, reason => { // rejection }); parameters onfulfilled optional a function called if the promise is fulfilled.
... promise.reject() .then(() => 99, () => 42) // onrejected returns 42 which is wrapped in a resolving promise .then(solution => console.log('resolved with ' + solution)); // resolved with 42 in practice, it is often desirable to catch rejected promises rather than use then's two case syntax, as demonstrated below.
Reflect.construct() - JavaScript
syntax reflect.construct(target, argumentslist[, newtarget]) parameters target the target function to call.
...(this would also be possible by using the spread syntax combined with the new operator.) let obj = new foo(...args) let obj = reflect.construct(foo, args) reflect.construct() vs object.create() prior to the introduction of reflect, objects could be constructed using an arbitrary combination of constructor and prototype by using object.create().
Reflect.get() - JavaScript
syntax reflect.get(target, propertykey[, receiver]) parameters target the target object on which to get the property.
...it is like the property accessor syntax as a function.
Reflect.set() - JavaScript
syntax reflect.set(target, propertykey, value[, receiver]) parameters target the target object on which to set the property.
...it does property assignment and is like the property accessor syntax as a function.
RegExp.prototype[@@split]() - JavaScript
syntax regexp[symbol.split](str[, limit]) parameters str the target of the split operation.
...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.
String.raw() - JavaScript
syntax string.raw(callsite, ...substitutions) string.raw`templatestring` parameters callsite well-formed template call site object, like { raw: ['foo', 'bar', 'baz'] }.
...the first syntax mentioned above is only rarely used, because the javascript engine will call this with proper arguments for you, (just like with other tag functions).
TypedArray.prototype.every() - JavaScript
syntax typedarray.every(callback[, thisarg]) parameters callback function to test for each element, taking three arguments: currentvalue the current element being processed in the typed array.
... function isbigenough(element, index, array) { return element >= 10; } new uint8array([12, 5, 8, 130, 44]).every(isbigenough); // false new uint8array([12, 54, 18, 130, 44]).every(isbigenough); // true testing typed array elements using arrow functions arrow functions provide a shorter syntax for the same test.
TypedArray.prototype.filter() - JavaScript
syntax typedarray.filter(callback[, thisarg]) parameters callback function to test each element of the typed array.
... function isbigenough(element, index, array) { return element >= 10; } new uint8array([12, 5, 8, 130, 44]).filter(isbigenough); // uint8array [ 12, 130, 44 ] filtering typed array elements using arrow functions arrow functions provide a shorter syntax for the same test.
TypedArray.prototype.some() - JavaScript
syntax typedarray.some(callback[, thisarg]) parameters callback function to test for each element, taking three arguments: currentvalue the current element being processed in the typed array.
... function isbiggerthan10(element, index, array) { return element > 10; } new uint8array([2, 5, 8, 1, 4]).some(isbiggerthan10); // false new uint8array([12, 5, 8, 1, 4]).some(isbiggerthan10); // true testing typed array elements using arrow functions arrow functions provide a shorter syntax for the same test.
Uint16Array() constructor - JavaScript
syntax new uint16array(); // new in es2017 new uint16array(length); new uint16array(typedarray); new uint16array(object); new uint16array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
...once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Uint32Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new uint32array(); // new in es2017 new uint32array(length); new uint32array(typedarray); new uint32array(object); new uint32array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
Uint8Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new uint8array(); // new in es2017 new uint8array(length); new uint8array(typedarray); new uint8array(object); new uint8array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
Uint8ClampedArray() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new uint8clampedarray(); // new in es2017 new uint8clampedarray(length); new uint8clampedarray(typedarray); new uint8clampedarray(object); new uint8clampedarray(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
WebAssembly.Module.customSections() - JavaScript
syntax webassembly.module.customsections(module, sectionname); parameters module the webassembly.module object whose custom sections are being considered.
... note that the webassembly text format currently doesn't have a syntax specified for adding new custom sections; you can however add a name section to your wasm during conversion from text format over to .wasm.
parseFloat() - JavaScript
syntax parsefloat(string) parameters string the value to parse.
... parsefloat converts bigint syntax to numbers, losing precision.
Exponentiation (**) - JavaScript
syntax operator: var1 ** var2 description the exponentiation operator is right-associative: a ** b ** c is equal to a ** (b ** c).
...that is, you cannot put a unary operator (+/-/~/!/delete/void/typeof) immediately before the base number; doing so will cause a syntaxerror.
Optional chaining (?.) - JavaScript
syntax obj?.prop obj?.[expr] arr?.[index] func?.(args) description the optional chaining operator provides a way to simplify accessing values through connected objects when it's possible that a reference or function may be undefined or null.
...sage); // no exception if onerror is undefined } } optional chaining with expressions you can also use the optional chaining operator when accessing properties with an expression using the bracket notation of the property accessor: let nestedprop = obj?.['prop' + 'name']; optional chaining not valid on the left-hand side of an assignment let object = {}; object?.property = 1; // uncaught syntaxerror: invalid left-hand side in assignment array item access with optional chaining let arrayitem = arr?.[42]; examples basic example this example looks for the value of the name property for the member bar in a map when there is no such member.
async function expression - JavaScript
syntax async function [name]([param1[, param2[, ..., paramn]]]) { statements } as of es2015, you can also use arrow functions.
... description an async function expression is very similar to, and has almost the same syntax as, an async function statement.
function* expression - JavaScript
syntax function* [name]([param1[, param2[, ..., paramn]]]) { statements } parameters name optional the function name.
... description a function* expression is very similar to and has almost the same syntax as a function* statement.
Function expression - JavaScript
syntax the expression is not allowed at the start of a statement.
... description a function expression is very similar to and has almost the same syntax as a function declaration (see function statement for details).
typeof - JavaScript
syntax the typeof operator is followed by its operand: typeof operand typeof(operand) parameters operand an expression representing the object or primitive whose type is to be returned.
... using new operator // all constructor functions, with the exception of the function constructor, will always be typeof 'object' let str = new string('string'); let num = new number(100); typeof str; // it will return 'object' typeof num; // it will return 'object' let func = new function(); typeof func; // it will return 'function' need for parentheses in syntax // parentheses can be used for determining the data type of expressions.
yield - JavaScript
syntax [rv] = yield [expression] expression optional defines the value to return from the generator function via the iterator protocol.
...'step' evaluates as a return value in this syntax [rv] = yield [expression] function* counter(value) { let step; while (true) { step = yield ++value; if (step) { value += step; } } } const generatorfunc = counter(0); console.log(generatorfunc.next().value); // 1 console.log(generatorfunc.next().value); // 2 console.log(generatorfunc.next().value); // 3 console.log(generatorfunc.next(10).value); // 14 console.log(genera...
empty - JavaScript
an empty statement is used to provide no statement, although the javascript syntax would expect one.
... syntax ; description the empty statement is a semicolon (;) indicating that no statement will be executed, even if javascript syntax requires one.
function* - JavaScript
you can also define generator functions using the generatorfunction constructor, or the function expression syntax.
... syntax function* name([param[, param[, ...
if...else - JavaScript
syntax if (condition) statement1 [else statement2] condition an expression that is considered to be either truthy or falsy.
...for example: var b = new boolean(false); if (b) // this condition is truthy examples using if...else if (cipher_char === from_char) { result = result + to_char; x++; } else { result = result + clear_char; } using else if note that there is no elseif syntax in javascript.
switch - JavaScript
syntax switch (expression) { case value1: //statements executed when the //result of expression matches value1 [break;] case value2: //statements executed when the //result of expression matches value2 [break;] ...
... take a look at this example: const action = 'say_hello'; switch (action) { case 'say_hello': let message = 'hello'; console.log(message); break; case 'say_hi': let message = 'hi'; console.log(message); break; default: console.log('empty action received.'); break; } this example will output the error uncaught syntaxerror: identifier 'message' has already been declared which you were not probably expecting.
Statements and declarations - JavaScript
javascript applications consist of statements with an appropriate syntax.
... empty an empty statement is used to provide no statement, although the javascript syntax would expect one.
Performance fundamentals - Web Performance
transitions and animations are particularly important to applications: developers can use css to declare complicated behaviour with a simple, high-level syntax.
...another benefit is that you can define these effects in css along with the rest of your app's look-and-feel, using a standardized syntax.
Populating the page: how browsers work - Web Performance
the scripts are parsed into abstract syntax trees.
... some browser engines take the abstract syntax tree and pass it into an interpreter, outputting bytecode which is executed on the main thread.
lang - SVG: Scalable Vector Graphics
WebSVGAttributelang
the syntax of this value is defined in the bcp 47 specification.
... the most common syntax is a value formed by a lowercase two-character part for the language and an uppercase two-character part for the region or country, separated by a minus sign, e.g.
transform - SVG: Scalable Vector Graphics
however, be aware that there are some difference in syntax between the css property and the attribute.
... see the documentation for the css property transform for the specific syntax to use in that case.
xml:lang - SVG: Scalable Vector Graphics
the syntax of this value is defined in the bcp 47 specification.
... the most common syntax is a value formed by a lowercase two-character part for the language and an uppercase two-character part for the region or country, separated by a minus sign, e.g.
Scripting - SVG: Scalable Vector Graphics
WebSVGScripting
one can override default browser behaviors with the evt.preventdefault( ) method, add eventlisteners to objects with the syntax element.addeventlistener(event, function, usecapture), and set element properties with syntax svgelement.style.setproperty("fill-opacity", "0.0", "").
... setproperty has three parameters the function svgelement.style.setproperty("fill-opacity", "0.0") throws a domexception - syntax err in mozilla.
Same-origin policy - Web security
error details for syntax errors are only available for same-origin scripts.
...due to the relaxed syntax rules of css, cross-origin css requires a correct content-type header.
XML introduction - XML: Extensible Markup Language
most importantly, since the fundamental format of xml is standardized, if you share or transmit xml across systems or platforms, either locally or over the internet, the recipient can still parse the data due to the standardized xml syntax.
... document must conform to all xml syntax rules.
current - XPath
syntax current() returns a node-set containing only the current node.
...or self syntax).
XPath
it uses a non-xml syntax to provide a flexible way of addressing (pointing to) different parts of an xml document.
...it uses a non-xml syntax so that it can be used in uris and xml attribute values.
XSLT: Extensible Stylesheet Language Transformations
WebXSLT
then, the new document may be serialized (output) by the processor in standard xml syntax or in another format, such as html or plain text.
... xslt & xpath tutorial the topxml xslt tutorial introduces you to the basics of xslt concepts, syntax, and programming.
l10n - Archive of obsolete content
for compatibility with tools that expect this syntax, you can assign this function to "_": var _ = require("sdk/l10n").get; given a .properties file for the current locale containing an entry like: hello_string= hello!
page-worker - Archive of obsolete content
see the match-pattern module for a detailed description of match pattern syntax.
Modifying Web Pages Based on URL - Archive of obsolete content
specifying the match pattern match pattern uses match-pattern syntax.
Preferences - Archive of obsolete content
re the default values are read from all mozilla-based applications read (application directory)/defaults/preferences/*.js in addition to that, recent versions of toolkit applications (firefox 1.0, thunderbird 1.0, and the like but not the mozilla suite) read extension defaults -- usually located in (profile folder)/extensions/(id)/defaults/preferences/ these files use simple javascript-like syntax.
Rosetta - Archive of obsolete content
|*| http://www.gnu.org/licenses/gpl-3.0.html |*| |*| syntax: |*| |*| rosetta.appendcompiler([ "text/x-csrc", "text/x-c" ], yourcompiler); |*| \*/ var rosetta = new (function () { function createscript (oscript, oxhr200) { var smimetype = oscript.getattribute("type").tolowercase(), obaton = document.createcomment(" the previous code has been automatically translated from \"" + smimetype + "\" to \"text/ecmascript\".
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
this file should be located in the main extension directory and look something like this: <?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>myextension@mycompany.com</em:id> <em:version>0.1</em:version> <em:targetapplication> <!-- firefox --> <description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minversion>1.0+</em:minversion> <em:maxversion>1.0+</em:m...
Deploying a Plugin as an Extension - Archive of obsolete content
here's what a basic install.rdf file looks like: <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>rhapsodyplayerengine@rhapsody.com</em:id> <em:name>rhapsody player engine</em:name> <em:version>1.0.0.487</em:version> <em:targetapplication> <description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minversion>1.5</em:minversio...
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
listing 1: content for install.rdf <?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"> <!-- unique id for extension.
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
alternative: using bracket-access to object properties object properties can always accessed using the bracket syntax: obj["property"] === obj.property hence the following will work just fine without having to resort to eval.
Connecting to Remote Content - Archive of obsolete content
there are a couple of tools you can use to process these documents more efficiently: using xpath xpath stands for xml path language, it uses a non-xml syntax that provides a flexible way of addressing (pointing to) different parts of an xml document.
Custom XUL Elements with XBL - Archive of obsolete content
javascript code is enclosed in cdata sections to prevent js and xml syntax conflicts.
Local Storage - Archive of obsolete content
if you're unfamiliar with sql or if you're interested in knowing the restrictions in the syntax used by sqlite, you can read more at the sqlite site.
The Box Model - Archive of obsolete content
one possibility is to use special markup in a locale property so that the link can be easily recognized: xulschoolhello.linkedtext.label = go to <a>our site</a> for more information the syntax is similar to html because it's easier to read this way, but string bundles won't do anything special with it.
The Essentials of an Extension - Archive of obsolete content
if you're unfamiliar with javascript or this particular syntax, initializing an object as {} is the equivalent of initializing it to new object().
bookmarks.export() - Archive of obsolete content
syntax browser.bookmarks.export( function() {...} // optional function ) parameters callbackoptional function.
bookmarks.import() - Archive of obsolete content
syntax browser.bookmarks.import( function() {...} // optional function ) parameters callbackoptional function.
Creating a status bar extension - Archive of obsolete content
<?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>status-bar-sample-1@example.com</em:id> <em:version>1.0</em:version> <em:type>2</em:type> <!-- front end metadata --> <em:name>status bar sample 1</em:name> <em:description>sample static status bar panel</em:description> <em:creator>my name</em:creator> ...
cert_override.txt - Archive of obsolete content
the syntax is described on this web site.
Source code directories overview - Archive of obsolete content
this code reads and writes data from and to the local file system, databases, the internet or any other source using a url-like syntax.
Locked config settings - Archive of obsolete content
if you suspect syntax errors in your config file, you can display the exact error message by enclosing your code in a try-catch block: try { ...
Creating a Firefox sidebar extension - Archive of obsolete content
install.rdf <?xml version="1.0" encoding="utf-8"?> <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>emptysidebar@yourdomain.com</em:id> <em:name>emptysidebar extension</em:name> <em:version>1.0</em:version> <em:creator>your name</em:creator> <em:description>example extension for creation and registration of a sidebar.</em:description> <em:targetapplication> ...
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
contents.rdf goes in the content sub-subdirectory: <?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#"> <rdf:seq about="urn:mozilla:package:root"> <rdf:li resource="urn:mozilla:package:tinderstatus"/> </rdf:seq> <rdf:description about="urn:mozilla:package:tinderstatus" chrome:displayname="mozilla tinderstatus extension" chrome:author="myk melez" chrome:name="tinderstatus" chrome:extension="true" chro...
install.rdf - Archive of obsolete content
copy the following text and paste it into a text file, then save that file as "install.rdf": <?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>author@oftheme.com</em:id> <em:version>2.0b1</em:version> <!-- seamonkey --> <em:targetapplication> <description> <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id> <em:minversion>2.0b1pre</em:minversion> <em:maxversion>2.0b2pre</em:maxversion> </description> </em:targetapplication> <!-- front end metadata --> <em:name>my_theme</em:name> <em:description>my first theme</em:description> <!-- front end integration hooks (used by the...
contents.rdf - Archive of obsolete content
copy the following text and paste it into a text file, then save that file as "contents.rdf": <?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#"> <!-- list all the skins being supplied by this theme --> <rdf:seq about="urn:mozilla:skin:root"> <rdf:li resource="urn:mozilla:skin:myskin/1.0" /> </rdf:seq> <rdf:description about="urn:mozilla:skin:myskin/1.0" chrome:displayname="my skin" chrome:accesskey="m" chrome:author="me" chrome:description="this is my custom skin for mozilla" chrome:name="myskin/1.0" chrome:image="preview.png"> <chrome:packages> <rdf:seq about="urn:mozilla:skin:myskin/1.0:packages"> <rdf:li resource="ur...
Drag and Drop JavaScript Wrapper - Archive of obsolete content
(in javascript, properties can be declared with the syntax name : value).
Error Console - Archive of obsolete content
types of errors error usually a syntax error that prevents the program from compiling.
Helper Apps (and a bit of Save As) - Archive of obsolete content
better support for mailcap syntax.
statusBar - Archive of obsolete content
syntax jetpack.statusbar.append(options); possible options are: url width (string/length) the width of the panel-item html (string) the html code which will be used inside the item onload (event) this event fires when the item was appended.
Makefile.mozextension.2 - Archive of obsolete content
b0e-13a3a9e97384} #thunderbird {3550f703-e582-4d05-9a08-453d09bdfdc6} #nvu {136c295a-4a5a-41cf-bf24-5cee526720d5} #mozilla suite {86c18b42-e466-45a9-ae7a-9b95ba6f5640} #seamonkey {92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} #sunbird {718e30fb-e89b-41dd-9da7-e25a45638b28} #netscape browser {3db10fab-e461-4c80-8b97-957ad5f8ea47} ###### define install_rdf <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"> <id>$(project_id)</id> <name>$(project_name)</name> <version>$(project_version)</version> <description>$(project_desc)</description> <creator>$(project_author)</creator> <contributor>here is a place for you who helped me</contributor> <homepageurl>http://$(project).mozdev.org/</homepageurl>...
Microsummary XML grammar reference - Archive of obsolete content
see the reference core_javascript_1.5_reference:global_objects:regexp for the details of the regular expression syntax valid for generators and the tutorial creating regular expressions for a microsummary generator for step by step instructions to writing regular expressions that match urls.
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
to evaluate the entered javascript syntax, type in 1+1 into the input field and press evaluate, as figure 2 shows.
NSC_SetPIN - Archive of obsolete content
syntax ck_rv nsc_setpin( ck_session_handle hsession, ck_char_ptr poldpin, ck_ulong uloldlen, ck_char_ptr pnewpin, ck_ulong ulnewlen ); parameters nsc_setpin takes five parameters: hsession [input] poldpin [input] .
Configuration - Archive of obsolete content
syntax is the same as for include.
RDF Datasource How-To - Archive of obsolete content
the following xul fragment illustrates how to instantiate a tree control whose body is "rooted" to a resource (http://foo.bar.com/) that your datasource describes: <window xmlns:html="http://www.w3.org/1999/xhtml" xmlns:rdf="http://www.w3.org/tr/wd-rdf-syntax#" xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul"> <tree datasources="rdf:my-datasource" ref="http://foo.bar.com/"> <template> <treechildren> <treeitem uri="..."> <treerow> <treecell> <text value="rdf:http://home.netscape.com/nc-rdf#name" /> </treecell> <treecell> <text value="rdf:http:/...
open - Archive of obsolete content
syntax open(mode,type) parameters mode a comma-delimited list describing the method to use to open the file, described in detail here.
Elements - Archive of obsolete content
for example, mutation events define several new fields such as relatedtarget that could be supported in the filtering syntax.] key - the key attribute has the same meaning as charcode.
Creating XPI Installer Modules - Archive of obsolete content
in the following listing, the items in red are particular to the barley package and can be edited for your own distribution: <?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#"> <!-- list all the packages being supplied --> <rdf:seq about="urn:mozilla:package:root"> <rdf:li resource="urn:mozilla:package:barley"/> </rdf:seq> <!-- package information --> <rdf:description about="urn:mozilla:package:barley" chrome:displayname="barley grain" chrome:author="ian oeschger" chrome:name="barley"> </rdf:de...
Mac stub installer - Archive of obsolete content
read the top of the packages-mac file for it's simple syntax and semantics.
Unix stub installer - Archive of obsolete content
read the top of the packages-unix file for it's simple syntax and semantics.
Windows stub installer - Archive of obsolete content
read the top of the packages-win file for it's simple syntax and semantics.
copy - Archive of obsolete content
method of file object syntax int copy( filespecobject source, filespecobject dest ) parameters the copy method has the following parameters: source a filespecobject object reprsenting the file to be copied.
dirCreate - Archive of obsolete content
method of file object syntax int dircreate( filespecobject dirtocreate ); parameters the dircreate method has the following parameters: dirtocreate a filespecobject representing the pathname of the directory to create.
dirGetParent - Archive of obsolete content
method of file object syntax filespecobject dirgetparent( filespecobject fileordir ); parameters the dirgetparent method has the following parameters: fileordir a filespecobject representing the pathname of the file or directory whose parent is being requested.
dirRemove - Archive of obsolete content
method of file object syntax int dirremove( filespecobject dirtoremove [, boolean recursive] ); parameters the dirremove method has the following parameters: dirtoremove a filespecobject representing the directory to be removed.
dirRename - Archive of obsolete content
method of file object syntax int dirrename( filespecobject directory, string newname ); parameters the dirrename method has the following parameters: directory a filespecobject representing the directory to be renamed.
diskSpaceAvailable - Archive of obsolete content
method of file object syntax double diskspaceavailable ( string nativefolderpath ); parameters the diskspaceavailable method has the following parameters: nativefolderpath a string representing the pathname of the partition, a file, or a directory on the partition whose space is being queried.
execute - Archive of obsolete content
method of file object syntax int execute ( filespecobject executablefile, [string aparameters] ); parameters the execute method has the following parameters: executablefile a filespecobject representing the local file already on disk to be executed.
exists - Archive of obsolete content
method of file object syntax boolean exists( filespecobject target ) parameters the exists method has the following parameters: target a filespecobject representing the file or directory being tested for existence.
isDirectory - Archive of obsolete content
method of file object syntax boolean isdirectory ( filespecobject nativefolderpath ); parameters the isdirectory method has the following parameters: nativefolderpath a filespecobject representing the queried directory.
isFile - Archive of obsolete content
method of file object syntax boolean isfile (filespecobject nativefolderpath); parameters the isfile method has the following parameter: nativefolderpath a filespecobject representing the queried file object.
macAlias - Archive of obsolete content
method of file object syntax int macalias( filespecobject destdir, string filename, filespecobject aliasdir, string aliasname ); parameters the macalias method has the following parameters: destdir a filespecobject that represents the directory into which the program file will be installed.
modDate - Archive of obsolete content
method of file object syntax double moddate ( filespecobject nativefolderpath ); parameters the moddate method has the following parameters: nativefolderpath a filespecobject representing the queried file.
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.
move - Archive of obsolete content
method of file object syntax int move( filespecobject source, filespecobject dest ); parameters the move method has the following parameters: source a filespecobject representing the source file.
remove - Archive of obsolete content
method of file object syntax int remove( filespecobject file ) parameters the remove method has the following parameters: file a filespecobject representing the file to be removed.
rename - Archive of obsolete content
method of file object syntax int rename( filespecobject file, string newname ) parameters the rename method has the following parameters: file a filespecobject representing the file to be renamed.
size - Archive of obsolete content
method of file object syntax int size (string nativefolderpath); parameters the size method has the following parameters: nativefolderpath the full pathname to the file.
windowsGetShortName - Archive of obsolete content
method of file object syntax string windowsgetshortname( object localdirspec ) parameters the windowsregisterserver method has the following parameter: localdirspec a filespecobject representing a directory obtained by getcomponentfolder or getfolder.
windowsRegisterServer - Archive of obsolete content
method of file object syntax int windowsregisterserver( object localdirspec ) parameters the windowsregisterserver method has the following parameters: localdirspec a filespecobject representing a directory obtained by getcomponentfolder or getfolder.
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.
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.
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.
toString - Archive of obsolete content
method of installversion object syntax string version = installversion.tostring ( initobj ); parameters the tostring method has the following parameter: initobj initobj is an installversion object whose init method has been called.
addDirectory - Archive of obsolete content
method of install object syntax public int adddirectory ( string xpisourcepath); public int adddirectory ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); public int adddirectory ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath); public int adddirectory ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); public int adddirectory ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); parameters t...
addFile - Archive of obsolete content
method of install object syntax public int addfile ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); public int addfile ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); public int addfile ( string xpisourcepath); public int addfile ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); public int addfile ( string registryname, string version, string...
alert - Archive of obsolete content
method of install object syntax void alert ( string message ); parameters the message parameter is displayed as a string in the dialog box.
cancelInstall - Archive of obsolete content
method of install object syntax void cancelinstall() void cancelinstall( int errorcode ) parameters none.
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.
deleteRegisteredFile - Archive of obsolete content
method of install object syntax int deleteregisteredfile (string registryname); parameters the deleteregisteredfile method has the following parameter: registryname the pathname in the client version registry for the file that is to be deleted.
execute - Archive of obsolete content
method of install object syntax int execute ( string xpisourcepath [, boolean blocking]); int execute ( string xpisourcepath, string args [, boolean blocking]); parameters the execute method has the following parameters: xpisourcepath the pathname of the file to extract and execute.
gestalt - Archive of obsolete content
method of install object syntax int gestalt ( string selector ); parameters the gestalt method takes the following parameters: selector the selector code for the information you want.
getComponentFolder - Archive of obsolete content
method of install object syntax object getcomponentfolder (string registryname); object getcomponentfolder ( string registryname, string subdirectory); parameters the getcomponentfolder method has these parameters: registryname the pathname in the client version registry for the component whose installation directory is to be obtained.
getFolder - Archive of obsolete content
method of install object syntax filespecobject getfolder ( string foldername); filespecobject getfolder ( string foldername, string subdirectory); filespecobject getfolder ( object localdirspec, string subdirectory); parameters the getfolder method has the following parameters: foldername a string representing one of netscape's standard directories.
getLastError - Archive of obsolete content
method of install object syntax int getlasterror (); parameters none.
getWinProfile - Archive of obsolete content
method of install object syntax winprofile getwinprofile ( object folder, string file); parameters the getwinprofile method has the following parameters: folder an object representing a directory.
getWinRegistry - Archive of obsolete content
method of install syntax winreg getwinregistry(); parameters none.
initInstall - Archive of obsolete content
method of install object syntax int initinstall ( string displayname, string package, installversion version, int flags); int initinstall ( string displayname, string package, string version, int flags); int initinstall ( string displayname, string package, string version); int initinstall ( string displayname, string package, installversion version); parameters the initinstall method has the following parameters: displayname a string that contains the name of the software being installed.
logComment - Archive of obsolete content
method of install object syntax int logcomment( string acomment ); parameters the sole input parameter is a string whose value will be written to the log during the installation process.
patch - Archive of obsolete content
method of install object syntax int patch ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); int patch ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath); int patch ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath); parameters the patch method has the following parameters: registryname the pathname in the client version registry for the component that is to be patched.this parameter can be an absolute pathname, such as /royalairways/royalsw/executable or a relative pathname, such as executable.
performInstall - Archive of obsolete content
method of install syntax int performinstall(); parameters none.
refreshPlugins - Archive of obsolete content
method of install object syntax int refreshplugins( [ areloadpages ] ); parameters the refreshplugins method has the following parameter: areloadpages areloadpages is an optional boolean value indicating whether you want to reload the open web pages after you have refreshed the plug-in list.
registerChrome - Archive of obsolete content
method of install object syntax int registerchrome( switch, srcdir, xpipath); parameters the registerchrome method has the following parameters: switch switch is the chrome switch indicating what type of file is being registered.
resetError - Archive of obsolete content
method of install object syntax void reseterror (); parameters none.
setPackageFolder - Archive of obsolete content
method of install object syntax void setpackagefolder ( object folder); parameters the setpackagefolder method has the following parameter: folder an object representing a directory.
getString - Archive of obsolete content
method of winprofile object syntax string getstring ( string section, string key); parameters the method has the following parameters: section section in the file, such as "boot" or "drivers".
writeString - Archive of obsolete content
method of winprofile object syntax boolean writestring ( string section, string key, string value); parameters the method has the following parameters: section section in the file, such as "boot" or "drivers".
createKey - Archive of obsolete content
method of winreg object syntax int createkey ( string subkey, string classname); 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".
deleteKey - Archive of obsolete content
method of winreg object syntax int deletekey ( string subkey); 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".
deleteValue - Archive of obsolete content
method of winreg object syntax int deletevalue ( string subkey, string valname); parameters the deletevalue method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
enumKeys - Archive of obsolete content
method of winreg object syntax string enumkeys ( string key, int subkeyindex ); parameters the enumkeys method has the following parameters: key the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
enumValueNames - Archive of obsolete content
method of winreg object syntax string enumvaluenames ( string key, int subkeyindex ); parameters the enumvaluenames method has the following parameters: key the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
getValue - Archive of obsolete content
method of winreg object syntax winregvalue getvalue ( string subkey, string valname); parameters the getvalue method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
getValueNumber - Archive of obsolete content
method of winreg object syntax number getvaluenumber ( 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".
getValueString - Archive of obsolete content
method of winreg object syntax string getvaluestring ( 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".
isKeyWritable - Archive of obsolete content
method of winreg object syntax boolean iskeywritable( string key); parameters the method has the following parameter: key a string representing the path to the key returns a boolean value: true if the key is writable; false if not.
keyExists - Archive of obsolete content
method of winreg object syntax boolean keyexists ( string key); parameters the method has the following parameter: key a string representing the path to the key returns boolean value description if the user does not have read access to the given key, this will also return false.
setRootKey - Archive of obsolete content
method of winreg object syntax void setrootkey ( int key ); parameters the method has the following parameter: key an integer representing a root key in the registry.
setValue - Archive of obsolete content
method of winreg object syntax string setvalue ( string subkey, string valname, winregvalue value); parameters the setvalue method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
setValueNumber - Archive of obsolete content
method of winreg object syntax int setvaluenumber ( 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".
setValueString - Archive of obsolete content
method of winreg object syntax int setvaluestring ( string subkey, string valname, string 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".
valueExists - Archive of obsolete content
method of winreg object syntax boolean valueexists ( string key, string value ); parameters the method has the following parameters: key a string representing the path to the key.
WinRegValue - Archive of obsolete content
syntax winregvalue ( int datatype, byte[] regdata); parameters the winregvalue constructor takes the following parameter: datatype an integer indicating the type of the data encapsulated by this object.
Learn XPI Installer Scripting by Example - Archive of obsolete content
overview of the install script xpi install scripts are written in javascript using xpinstall engine syntax defined in the xpinstall api reference.
XPInstall - Archive of obsolete content
<?xml version="1.0" encoding="utf-8"?> <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"> <!-- properties --> </description> </rdf> cross-platform install (xpinstall) is a technology used by mozilla application suite, mozilla firefox, mozilla thunderbird and other xul-based applications for installing extensions.
Mozilla E4X - Archive of obsolete content
e4x marries xml and javascript syntax, and extends javascript to include namespaces, qualified names, and xml elements and lists.
XTech 2005 Presentations - Archive of obsolete content
e4x marries xml and javascript syntax, and extends javascript to include namespaces, qualified names, and xml elements and lists.
popupalign - Archive of obsolete content
noneno aligntopleftalign to the top left cornertoprightalign to the top right cornerbottomleftalign to the bottom left cornerbottomrightalign to the bottom right cornersyntax<element popupalign="none | topleft | topright | bottomleft | bottomright"/> example<element id="edit-context" popup="editor-popup" popupanchor="topleft" popupalign="bottomright"/> notesthe popupalign attribute can be used to specify which corner of the popup content is tied to the originating point.
popupanchor - Archive of obsolete content
« xul reference homepopupanchortype: one of the values belowpopupanchor is an optional attribute for specifying where popup content should be anchored on the element.noneno anchortopleftanchor to the top left cornertoprightanchor to the top right cornerbottomleftanchor to the bottom left cornerbottomrightanchor to the bottom right cornersyntax<element popupanchor="none | topleft | topright | bottomleft | bottomright" /> example<element id="edit-context" popup="editor-popup" popupanchor="topleft" popupalign="bottomright" /> notesthe popupanchor attribute can be used to specify that the popup content should come up anchored to one of the four corners of the content object (e.g., the button popping up the content).
style - Archive of obsolete content
syntax is as in the html style attribute.
value - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
Menus - Archive of obsolete content
the syntax for this menupopup is the same as the outer menupopup.
value - Archive of obsolete content
ArchiveMozillaXULPropertyvalue
for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
Bindings - Archive of obsolete content
the syntax is as follows: <template> <query> ...
Building Hierarchical Trees - Archive of obsolete content
here is an example for the streets datasource: <tree flex="1" datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood" flags="dont-build-content" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <treecols> <treecol id="address" primary="true" label="address" flex="1"/> <treecol id="floors" label="floors" flex="1"/> </treecols> <template> <rule rdf:type="http://www.xulplanet.com/rdf/house"> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://www.xulplanet.com/rdf/address"/> <treecell label="rdf...
Multiple Rules - Archive of obsolete content
note that the full query syntax must be used to use conditions within rules.
Result Generation - Archive of obsolete content
<?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rel="http://www.xulplanet.com/rdf/"> <rdf:description rdf:about="http://www.xulplanet.com/rdf/a"> <rel:relateditem rdf:resource="http://www.xulplanet.com/rdf/b"/> <rel:relateditem rdf:resource="http://www.xulplanet.com/rdf/c"/> <rel:relateditem rdf:resource="http://www.xulplanet.com/rdf/d"/> </rdf:description> <rdf:description rdf:about="http://www.xulplanet.com/r...
SQLite Templates - Archive of obsolete content
the syntax with the question mark is similar as with the other query types.
Simple Example - Archive of obsolete content
<?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <rdf:seq rdf:about="http://www.xulplanet.com/rdf/myphotos"> <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images/t/palace.jpg"/> <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images/t/canal.jpg"/> <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images/t/obelisk.jpg"/> </rdf:seq> <rdf:description rdf:about="http://www.xulplanet.com/ndeakin/images/t/palace.jpg" dc:title="palace from above"/> <...
Template Builder Interface - Archive of obsolete content
this syntax is necessary as otherwise you wouldn't be able to specify a value for the datasources attribute, and a template builder would not be attached to the element.
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
the code looks like this: <?xml version="1.0"?> <rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#"> <seq about="urn:mozilla:skin:root"> <li resource="urn:mozilla:skin:classic/1.0"/> </seq> <description about="urn:mozilla:skin:classic/1.0"> <chrome:packages> <seq about="urn:mozilla:skin:classic/1.0:packages"> <li resource="urn:mozilla:skin:classic/1.0:myextension"/> </seq> </chrome:packages> </description> <seq about="urn:mozilla:stylesheet...
Custom toolbar button - Archive of obsolete content
paste it into the new file: <?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:name="custom button" em:description="my custom toolbar button" em:creator="my name" em:id="custom-toolbar-button@example.com" em:version="1.0" em:homepageurl="http://developer.mozilla.org/en/docs/custom_toolbar_button" em:iconurl="chrome://custombutt...
Tree Widget Changes - Archive of obsolete content
to get a column in javascript: tree.columns.getcolumnfor(treecolelement); tree.columns.getnamedcolumn(treecolid); tree.columns.getcolumnat(index); you can also just use array syntax to get a column: tree.columns["lastname"]; tree.columns[5]; once you have a column, you can get various properties of it: column.index - the index of the column in displayed order column.id - the id attribute of the column column.element - the treecol element column.x - the x position in the tree of the left edge of the column column.width - the width of the column in c++ code, you ca...
Adding Buttons - Archive of obsolete content
syntax of buttons the button tag has the following syntax: <button id="identifier" class="dialog" label="ok" image="images/image.jpg" disabled="true" accesskey="t"/> the attributes are as follows, all of which are optional: id a unique identifier so that you can identify the button with.
Adding Methods to XBL-defined Elements - Archive of obsolete content
the general syntax of methods is as follows: <implementation> <method name="method-name"> <parameter name="parameter-name1"/> <parameter name="parameter-name2"/> .
Adding Style Sheets - Archive of obsolete content
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.
Install Scripts - Archive of obsolete content
the syntax of this function is as follows: initinstall( ''packagename'' , ''regpackage'' , ''version'' ); an example initinstall("find files","/xulplanet/find files","0.5.0.0"); the first argument is the name of the package in user-readable form.
Introduction - Archive of obsolete content
due to various changes in xul syntax over time, you will want to get the latest version for the examples to work properly.
List Controls - Archive of obsolete content
its syntax is best described with the example below: example 5 : source view <menulist label="bus"> <menupopup> <menuitem label="car" /> <menuitem label="taxi" /> <menuitem label="bus" selected="true" /> <menuitem label="train" /> </menupopup> </menulist> this menulist will contain four choices, one for each menuitem element.
Modifying a XUL Interface - Archive of obsolete content
the syntax of these functions is as follows: parent.appendchild(child); parent.insertbefore(child, referencechild); parent.replacechild(newchild, oldchild); parent.removechild(child); it should be fairly straightforward from the function names what these functions do.
Popup Menus - Archive of obsolete content
you could also associate the same popup with multiple elements, which is one advantage of using this popup syntax.
Progress Meters - Archive of obsolete content
determinate progress meter: indeterminate progress meter: the progress meter has the following syntax: <html:progress id="identifier" mode="determined" value="50" max="100"/> the attributes are as follows: id the unique identifer of the progress meter mode the type of the progress meter.
Property Files - Archive of obsolete content
properties in the file are declared with the syntax name=value.
RDF Datasources - Archive of obsolete content
next, we'll look at the full rule syntax.
Splitters - Archive of obsolete content
the syntax of a splitter is as follows: <splitter id="identifier" state="open" collapse="before" resizebefore="closest" resizeafter="closest"> the attributes are as follows: id the unique identifier of the splitter.
The Box Model - Archive of obsolete content
box elements the basic syntax of a box is as follows: <hbox> <!-- horizontal elements --> </hbox> <vbox> <!-- vertical elements --> </vbox> the hbox element is used to create a horizontally oriented box.
The Chrome URL - Archive of obsolete content
the basic syntax of a chrome url is as follows: chrome://<package name>/<part>/<file.xul> the text <package name> is the package name, such as messenger or editor.
Tree Selection - Archive of obsolete content
the syntax of the onselect() event handler is shown below.
Trees - Archive of obsolete content
ArchiveMozillaXULTutorialTrees
a special css syntax is used which styles components of the tree body with those keywords.
Trees and Templates - Archive of obsolete content
using a template with a tree uses very much the same syntax as with other elements.
Using Spacers - Archive of obsolete content
in this syntax above, the spacer has one attribute, called flex.
XBL Attribute Inheritance - Archive of obsolete content
the syntax <inner attribute>=<outer attribute> is used to map one attribute to another.
XPCOM Interfaces - Archive of obsolete content
the syntax of a contract id is: @<internetdomain>/module[/submodule[...]];<version>[?<name>=<value>[&<name>=<value>[...]]] other components can be referred to in a similar way.
XUL Structure - Archive of obsolete content
we'll look more at the syntax of a chrome url in the next section.
Using Remote XUL - Archive of obsolete content
knowledge of xml and its syntax is useful but not required.
Using Visual Studio as your XUL IDE - Archive of obsolete content
compared to a simple text-editor, visual studio gives you some special features when writing xul: intellisense / autocompletion for elements and attributes validation syntax coloring (okay, more sophisticated editors like notepad++ provide this as well) before you can use all of this, you have to adjust visual studio a little.
XUL Parser in Python/source - Archive of obsolete content
def strip(snip): t = re.sub('http://.*?\s', '', snip) return t class xulparser(xmllib.xmlparser): def unknown_starttag(self, t, a): name = strip(t) if name not in el_list: el_list[name] = {} for attr,val in a.items(): el_list[name][strip(attr)] = strip(val) def syntax_error(self, message): pass p = xulparser() cmd = 'dir /s /b *.xul' chrome_dir = 'c:\program files\netscape\netscape 6\chrome' os.chdir(chrome_dir) files = os.popen(cmd).readlines() for file in files: file = file.strip() print '** ' + file + ' **' data = open(file).read() p.feed(data) w.write('<html><h3>periodic table of xul elements</h3>') w.write('<table><style>.head {font-weight: bold;...
XUL Questions and Answers - Archive of obsolete content
is there an editor widget in xul that supports syntax highlighting?
XUL element attributes - Archive of obsolete content
syntax is as in the html style attribute.
Accessibility/XUL Accessibility Reference - Archive of obsolete content
label <label control="controlid" value="<!--label text-->" /> <label control="controlid"><!--label text--></label> either syntax is fine.
XUL Event Propagation - Archive of obsolete content
the syntax for this in xul is as follows: element = document.getelementbyid("id of the element"); element.addeventlistener(event name, event handler function, whether to register a capturing listener); the event handler code argument can be in-line code or a function.
binding - Archive of obsolete content
like the triple element in syntax, it can be used to bind a particular property of a matched node to a particular variable name.
label - Archive of obsolete content
ArchiveMozillaXULlabel
for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
progressmeter - Archive of obsolete content
for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
tab - Archive of obsolete content
ArchiveMozillaXULtab
for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
tabs - Archive of obsolete content
ArchiveMozillaXULtabs
for textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the textbox.value and menulist.value syntax.
treecell - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are read and set using the menulist.value syntax.
NPAnyCallbackStruct - Archive of obsolete content
syntax typedef struct { int32 type; } npanycallbackstruct; fields the data structure has the following field: type always contains np_print.
NPByteRange - Archive of obsolete content
syntax typedef struct _npbyterange { int32 offset; /* negative offset = from the end */ uint32 length; struct _npbyterange* next; } npbyterange; fields the data structure has the following fields: offset offset in bytes to the start of the requested range.
NPEmbedPrint - Archive of obsolete content
syntax typedef struct _npembedprint { npwindow window; void* platformprint; /* platform-specific */ } npembedprint; fields the data structure has the following fields: window the npwindow the plug-in should use for printing.
NPEvent - Archive of obsolete content
syntax microsoft windows typedef struct _npevent { uint16 event; uint32 wparam; uint32 lparam; } npevent; mac os typedef eventrecord npevent; type eventrecord = record { what: integer; message: longint; when: longint; where: point; modifiers: integer; end; xwindows typedef xevent npevent; fields npevent on microsoft windows the data structure has the following fields: event one of the following event types: wm_paint wm_lbuttondown wm_lbuttonup wm_lbuttondblclk wm_rbuttondown wm_rbuttonup wm_rbuttondblclk wm_mbuttondown wm_mbuttonup wm_mbuttondblclk wm_mousemove w...
NPFullPrint - Archive of obsolete content
syntax typedef struct _npfullprint { npbool pluginprinted; /* true: print fullscreen */ npbool printone; /* true: print one copy */ /* to default printer */ void* platformprint; /* platform-specific */ } npfullprint; fields the data structure has the following fields: pluginprinted determines whether the plug-in prints in full-page mode.
NPIdentifier - Archive of obsolete content
syntax typedef void *npidentifier; ...
NPN_CreateObject - Archive of obsolete content
syntax #include <npruntime.h> npobject *npn_createobject(npp npp, npclass *aclass); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin wants to instantiate the object.
NPN_DestroyStream - Archive of obsolete content
syntax #include <npapi.h> nperror npn_destroystream(npp instance, npstream* stream, nperror reason); parameters the function has the following parameters: instance pointer to current plug-in instance.
NPN_Enumerate - Archive of obsolete content
syntax #include <npruntime.h> bool npn_enumerate(npp npp, npobject *npobj, npidentifier **identifiers, uint32_t *identifiercount); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
NPN_Evaluate - Archive of obsolete content
syntax #include <npruntime.h> bool npn_evaluate(npp npp, npobject *npobj, npstring *script, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin instance's window to evaluate the script in.
NPN_ForceRedraw - Archive of obsolete content
syntax #include <npapi.h> void npn_forceredraw(npp instance); parameters the function has the following parameters: instance plug-in instance for which the function forces redrawing.
NPN_GetAuthenticationInfo - Archive of obsolete content
syntax #include <npapi.h> nperror npn_getauthenticationinfo(npp instance, const char *protocol, const char *host, int32_t port, const char *scheme, const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen); parameters this function has the following parameters: instance pointer to the current plug-in instance ...
NPN_GetIntIdentifier - Archive of obsolete content
syntax #include <npruntime.h> npidentifier npn_getintidentifier(int32_t intid); parameters the function has the following parameter: <tt>intid</tt> the integer for which an opaque identifier should be returned.
NPN_GetProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_getproperty(npp npp, npobject *npobj, npidentifier propertyname, npvariant *result); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance's is making the request.
NPN_GetStringIdentifier - Archive of obsolete content
syntax #include <npruntime.h> npidentifier npn_getstringidentifier(const nputf8 *name); parameters the function has the following parameters: <tt>name</tt> the string for which an opaque identifier should be returned.
NPN_GetStringIdentifiers - Archive of obsolete content
syntax #include <npruntime.h> void npn_getstringidentifiers(const nputf8 **names, int32_t namecount, npidentifier *identifiers); parameters the function has the following parameters: names an array of strings for which opaque identifiers should be returned.
NPN_GetURL - Archive of obsolete content
syntax #include <npapi.h> nperror npn_geturl(npp instance, const char* url, const char* target); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPN_GetURLNotify - Archive of obsolete content
syntax #include <npapi.h> nperror npn_geturlnotify(npp instance, const char* url, const char* target, void* notifydata); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPN_GetValue - Archive of obsolete content
syntax #include <npapi.h> nperror npn_getvalue(npp instance, npnvariable variable, void *value); parameters this function has the following parameters: instance pointer to the current plug-in instance.
NPN_GetValueForURL - Archive of obsolete content
syntax #include <npapi.h> typedef enum { npnurlvcookie = 501, npnurlvproxy } npnurlvariable; nperror npn_getvalueforurl(npp instance, npnurlvariable variable, const char *url, char **value, uint32_t *len); parameters this function has the following parameters: instance pointer to the current plug-in instance.
NPN_HasMethod - Archive of obsolete content
syntax #include <npruntime.h> bool npn_hasmethod(npp npp, npobject *npobj, npidentifier methodname); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
NPN_HasProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_hasproperty(npp npp, npobject *npobj, npidentifier propertyname); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance is making the request.
NPN_IdentifierIsString - Archive of obsolete content
syntax #include <npruntime.h> bool npn_identifierisstring(npidentifier identifier); parameters the function has the following parameter: <tt>identifier</tt> the identifier whose type is to be examined.
NPN_IntFromIdentifier - Archive of obsolete content
syntax #include <npruntime.h> int32_t npn_intfromidentifier(npidentifier identifier); parameters the function has the following parameter: <tt>identifier</tt> the integer identifier whose corresponding integer value should be returned.
NPN_InvalidateRect - Archive of obsolete content
syntax #include <npapi.h> void npn_invalidaterect(npp instance, nprect *invalidrect); parameters the function has the following parameters: instance pointer to the plug-in instance to invalidate a portion of.
NPN_InvalidateRegion - Archive of obsolete content
syntax #include <npapi.h> void npn_invalidateregion(npp instance, npregion invalidregion); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPN_Invoke - Archive of obsolete content
syntax #include <npruntime.h> bool npn_invoke(npp npp, npobject *npobj, npidentifier methodname, const npvariant *args, uint32_t argcount, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin wants to call the method on the object.
NPN_InvokeDefault - Archive of obsolete content
syntax #include <npruntime.h> bool npn_invokedefault(npp npp, npobject *npobj, const npvariant *args, uint32_t argcount, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin wants to call the default method on the object.
NPN_MemAlloc - Archive of obsolete content
syntax #include <npapi.h> void *npn_memalloc (uint32 size); parameters the function has the following parameters: size size of memory, in bytes, to allocate in the browser's memory space.
NPN_MemFlush - Archive of obsolete content
syntax #include <npapi.h> uint32 npn_memflush(uint32 size); parameters the function has the following parameters: size size of memory, in bytes, to free in the browser's memory space.
NPN_MemFree - Archive of obsolete content
syntax #include <npapi.h> void npn_memfree (void* ptr); parameters the function has the following parameters: ptr block of memory previously allocated using npn_memalloc.
NPN NewStream - Archive of obsolete content
syntax #include <npapi.h> nperror npn_newstream(npp instance, npmimetype type, const char* target, npstream** stream); parameters the function has the following parameters: instance pointer to current plug-in instance.
NPN_PluginThreadAsyncCall - Archive of obsolete content
syntax #include <npapi.h> void npn_pluginthreadasynccall(npp plugin, void (*func)(void *), void *userdata); parameters the function has the following parameters: plugin pointer to the current plug-in instance.
NPN_PostURL - Archive of obsolete content
syntax #include <npapi.h> nperror npn_posturl(npp instance, const char *url, const char *target, uint32 len, const char *buf, npbool file); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPN_PostURLNotify - Archive of obsolete content
syntax #include <npapi.h> nperror npn_posturlnotify(npp instance, const char* url, const char* target, uint32 len, const char* buf, npbool file, void* notifydata); parameters the function has the following parameters: instance current plug-in instance, specified by the plug-in.
NPN_ReleaseObject - Archive of obsolete content
syntax #include <npruntime.h> void npn_releaseobject(npobject *npobj); parameters the function has the following parameter: <tt>npobj</tt> the npobject whose reference count should be decremented.
NPN_ReleaseVariantValue - Archive of obsolete content
syntax #include <npruntime.h> void npn_releasevariantvalue(npvariant *variant); parameters the function has the following parameters: <tt>variant</tt> the variant whose value is to be released.
NPN_ReloadPlugins - Archive of obsolete content
syntax #include <npapi.h> void npn_reloadplugins(npbool reloadpages);code parameters the function has the following parameter: reloadpages whether to reload pages.
NPN_RemoveProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_removeproperty(npp npp, npobject *npobj, npidentifier propertyname); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
NPN_RequestRead - Archive of obsolete content
syntax #include <npapi.h> nperror npn_requestread(npstream* stream, npbyterange* rangelist); parameters the function has the following parameters: stream stream of type np_seek from which to read bytes.
NPN_RetainObject - Archive of obsolete content
syntax #include <npruntime.h> npobject *npn_retainobject(npobject *npobj); parameters the function has the following parameter: npobj the npobject to retain.
NPN_SetException - Archive of obsolete content
syntax #include <npruntime.h> void npn_setexception(npobject *npobj, const nputf8 *message); parameters the function has the following parameters: <tt>npobj</tt> the object on which the exception occurred.
NPN_SetProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_setproperty(npp npp, npobject *npobj, npidentifier propertyname, const npvariant *value); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance's is making the request.
NPN_SetValue - Archive of obsolete content
syntax #include <npapi.h> nperror npn_setvalue(npp instance, nppvariable variable, void *value); parameters the function has the following parameters: instance pointer to the plugin instance setting the variable.
NPN_SetValueForURL - Archive of obsolete content
(while the api theoretically allows the preferred proxy for a given url to be changed, doing so does not have much meaning given how proxies are configured, and is not supported.) syntax #include <npapi.h> typedef enum { npnurlvcookie = 501, npnurlvproxy } npnurlvariable; nperror npn_setvalueforurl(npp instance, npnurlvariable variable, const char *url, const char *value, uint32_t len); parameters this function has the following parameters: instance pointer to the current plug-in instance.
NPN_Status - Archive of obsolete content
syntax #include <npapi.h> void npn_status(npp instance, const char* message); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPN_UTF8FromIdentifier - Archive of obsolete content
syntax #include <npruntime.h> nputf8 *npn_utf8fromidentifier(npidentifier identifier); parameters the function has the following parameter: <tt>identifier</tt> the string identifier whose corresponding string should be returned.
NPN_UserAgent - Archive of obsolete content
syntax #include <npapi.h> const char* npn_useragent(npp instance); parameters the function has the following parameter: instance pointer to the current plug-in instance.
NPN_Version - Archive of obsolete content
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.
NPN_Write - Archive of obsolete content
syntax #include <npapi.h> int32 npn_write(npp instance, npstream* stream, int32 len, void* buf); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPObject - Archive of obsolete content
syntax struct npobject { npclass *_class; uint32_t referencecount; /* * additional space may be allocated here by types of npobjects */ }; fields _class a pointer to the npclass of which the object is a member.
NPP - Archive of obsolete content
syntax typedef struct _npp { void* pdata; /* plug-in private data */ void* ndata; /* mozilla private data */ } npp_t; typedef npp_t* npp; fields the data structure has the following fields: pdata a value, whose definition is up to the plug-in, that the plug-in can use to store a pointer to an internal data structure associated with the instance; this field isn't modified by the browser.
NPP_Destroy - Archive of obsolete content
syntax #include <npapi.h> nperror npp_destroy(npp instance, npsaveddata **save); parameters the function has the following parameters: instance pointer to the plug-in instance to delete.
NPP_DestroyStream - Archive of obsolete content
syntax #include <npapi.h> nperror npp_destroystream(npp instance, npstream* stream, npreason reason); parameters the function has the following parameters: instance pointer to current plug-in instance.
NPP_GetValue - Archive of obsolete content
syntax #include <npapi.h> nperror npp_getvalue(void *instance, nppvariable variable, void *value); parameters the function has the following parameters: instance pointer to the plugin instance from which the value should come.
NPP_HandleEvent - Archive of obsolete content
syntax #include <npapi.h> int16 npp_handleevent(npp instance, void* event); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPP_New - Archive of obsolete content
syntax #include <npapi.h> nperror npp_new(npmimetype plugintype, npp instance, uint16 mode, int16 argc, char *argn[], char *argv[], npsaveddata *saved); parameters the function has the following parameters: plugintype pointer to the mime type for new plug-in instance.
NPP_NewStream - Archive of obsolete content
syntax #include <npapi.h> nperror npp_newstream(npp instance, npmimetype type, npstream* stream, npbool seekable, uint16* stype); parameters the function has the following parameters: instance pointer to current plug-in instance.
NPP_Print - Archive of obsolete content
syntax #include <npapi.h> void npp_print(npp instance, npprint* printinfo); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPP_SetValue - Archive of obsolete content
syntax #include <npapi.h> nperror npp_setvalue(void *instance, npnvariable variable, void *value); parameters the function has the following parameters: instance pointer to plugin instance on which to set the variable.
NPP_SetWindow - Archive of obsolete content
syntax #include <npapi.h> nperror npp_setwindow(npp instance, npwindow *window); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPP_StreamAsFile - Archive of obsolete content
syntax #include <npapi.h> void npp_streamasfile(npp instance, npstream* stream, const char* fname); parameters the function has the following parameters: instance pointer to current plug-in instance.
NPP_URLNotify - Archive of obsolete content
syntax #include <npapi.h> void npp_urlnotify(npp instance, const char* url, npreason reason, void* notifydata); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPP_Write - Archive of obsolete content
(remark: hence the name "npp_write" is misleading - just think of:"data_arrived") syntax #include <npapi.h> int32 npp_write(npp instance, npstream* stream, int32 offset, int32 len, void* buf); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPP_WriteReady - Archive of obsolete content
syntax #include <npapi.h> int32 npp_writeready(npp instance, npstream* stream); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPPrint - Archive of obsolete content
syntax typedef struct _npprint { uint16 mode; /* np_full or np_embed */ union { npfullprint fullprint; /* if mode is np_full */ npembedprint embedprint; /* if mode is np_embed */ } print; } npprint; fields the data structure has the following fields: mode determines whether plug-in prints in full-page or embedded mode.
NPPrintCallbackStruct - Archive of obsolete content
syntax typedef struct { int32 type; file* fp; } npprintcallbackstruct; fields the data structure has the following fields: type always contains np_print.
NPRect - Archive of obsolete content
syntax typedef struct _nprect { uint16 top; uint16 left; uint16 bottom; uint16 right; } nprect; fields the data structure has the following fields: top, left, bottom, right the top, left, bottom, and right sides of the rectangle.
NPRegion - Archive of obsolete content
syntax windows: typedef hrgn npregion; mac os x: typedef rgnhandle npregion; note: this may need to be updated for the cocoa event model.
NPSavedData - Archive of obsolete content
syntax typedef struct _npsaveddata { int32 len; void* buf; } npsaveddata; fields the data structure has the following fields: len length in bytes of the buffer pointed to by buf; set by the plug-in.
NPSetWindowCallbackStruct - Archive of obsolete content
syntax typedef struct { int32 type; display* display; visual* visual; colormap colormap; unsigned int depth; } npsetwindowcallbackstruct; fields the data structure has the following fields: type always contains np_setwindow.
NPStream - Archive of obsolete content
syntax typedef struct _npstream { void* pdata; /* plug-in private data */ void* ndata; /* netscape private data */ const char* url; uint32 end; uint32 lastmodified; void* notifydata; const char *headers; } npstream; fields the data structure has the following fields: plug-in-private value that the plug-in can use to store a pointer to private data associated with the instance; not modified by the browser.
NPString - Archive of obsolete content
syntax typedef struct _npstring { const nputf8 *utf8characters; uint32_t utf8length; } npstring; fields the data structure has the following fields: utf8characters an array of the utf-8 characters comprising the string.
NPUTF8 - Archive of obsolete content
syntax typedef char nputf8; description the nputf8 type is used in constructing utf-8 strings for use by the plugin scripting api extension.
NPVariant - Archive of obsolete content
syntax typedef struct _npvariant { npvarianttype type; union { bool boolvalue; int32_t intvalue; double_t doublevalue; npstring stringvalue; npobject *objectvalue; } value; } npvariant; fields the data structure has the following fields: type a member of the npvarianttype enumeration specifying the data type contained in the npvariant.
NPVariantType - Archive of obsolete content
syntax typedef enum { npvarianttype_void, npvarianttype_null, npvarianttype_bool, npvarianttype_int32, npvarianttype_double, npvarianttype_string, npvarianttype_object } npvarianttype; description each type is self-explanatory.
NPWindow - Archive of obsolete content
syntax typedef struct _npwindow { void* window; /* platform specific handle */ uint32_t x; /* coordinates of top left corner */ uint32_t y; /* relative to a netscape page */ uint32_t width; /* maximum window size */ uint32_t height; nprect cliprect; /* clipping rectangle coordinates */ #ifdef xp_unix void * ws_info; /* platform-dependent additional data */ #endif /* xp_unix */ npwindowtype type; /* window or drawable target */ } npwindow; fields the data structure has the following fields: window platform-specific handle to a native window element in the netsc...
NP_GetValue - Archive of obsolete content
syntax #include <npapi.h> nperror np_getvalue(void *instance, nppvariable variable, void *value); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NP_Initialize - Archive of obsolete content
syntax windows #include <npapi.h> nperror winapi np_initialize(npnetscapefuncs *anpnfuncs) unix #include <npapi.h> nperror np_initialize(npnetscapefuncs *anpnfuncs, nppluginfuncs *anppfuncs) returns if successful, the function returns nperr_no_error.
NP_Port - Archive of obsolete content
syntax typedef struct np_port { cgrafptr port; /* grafport */ int32 portx; /* position inside the topmost window */ int32 porty; } np_port; fields the data structure has the following fields: port standard mac os port into which the plug-in should draw.
NP_Shutdown - Archive of obsolete content
syntax #include <npapi.h> void np_shutdown(void); windows #include <npapi.h> void winapi np_shutdown(void); description the browser calls this function once after the last instance of your plug-in is destroyed, before unloading the plug-in library itself.
Shipping a plugin as a Toolkit bundle - Archive of obsolete content
for a plugin the manifest only needs to be very simple: <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>mypluginid@myplugin.com</em:id> <em:name>my plugin</em:name> <em:version>1.0</em:version> <em:targetapplication> <description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minversion>1.5</em:minversion> <em:maxversion>4.0.*</em...
Why RSS Content Module is Popular - Including HTML Contents - Archive of obsolete content
the rss 2.0 specification clearly states that “entity-encoded html is allowed“ and even provides examples showing exactly the syntax above (using cdata and unencoded html).
0.90 - Archive of obsolete content
ArchiveRSSVersion0.90
examples rss 0.90 looked something like this: <?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/" > <channel> <title>mozilla dot org</title> <link>http://www.mozilla.org</link> <description>the mozilla organization web site</description> </channel> <image> <title>mozilla</title> <url>http://www.mozilla.org/images/moz.gif</url> <link>h...
.htaccess ( hypertext access ) - Archive of obsolete content
syntax highliting support for .htaccess files less.
Sunbird Theme Tutorial - Archive of obsolete content
copy and paste the content from here, making sure that you scroll to get all of it: <?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="just-testing@example.com" em:name="just testing" em:creator="rod whiteley" em:description="a test theme for sunbird" em:homepageurl="http://developer.mozilla.org/" em:version="0.1" em:internalname="testing" em:type="4" > <em:targetapplication><!
Building a Theme - Archive of obsolete content
create the install manifest open the file called install.rdf that you created at the top of your extension's folder hierarchy and put this inside: <?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>sample@example.net</em:id> <em:version>1.0</em:version> <em:type>4</em:type> <!-- target application this theme can install into, with minimum and maximum supported versions.
contents.rdf - Archive of obsolete content
copy the following text and paste it into a text file, then save that file as "contents.rdf": <?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#"> <!-- list all the skins being supplied by this theme --> <rdf:seq about="urn:mozilla:skin:root"> <rdf:li resource="urn:mozilla:skin:my_theme"/> </rdf:seq> <rdf:description about="urn:mozilla:skin:my_theme" chrome:displayname="my theme" chrome:accesskey="n" chrome:author="" chrome:authorurl="" chrome:description="" chrome:name="my_theme" chrome:image="preview.png"> <chrome:packages> <rdf:seq about="urn:mozilla:skin:my_theme:packages"> <rdf:li resource="urn:mozilla:skin:my_the...
install.rdf - Archive of obsolete content
copy the following text and paste it into a text file, then save that file as "install.rdf": <?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>{themes_uuid}</em:id> <em:version>themes_version</em:version> <!-- target application this extension can install into, with minimum and maximum supported versions.
Scratchpad - Archive of obsolete content
for example, if you type document.addeventlistener, then press ctrl + shift + space, you'll see a popup that shows a summary of the function's syntax and a short description: the "[docs]" link takes you to the mdn documentation for the symbol.
-ms-filter - Archive of obsolete content
syntax the -ms-filter property is specified as a string that contains a list of one or more items, separated by spaces, of the following types: filters transitions procedural surfaces formal syntax filter: <-ms-filter-function>+ -ms-filter: [ "'" <-ms-filter-function># "'" ] | [ '"' <-ms-filter-function># '"' ] where <-ms-filter-function> = <-ms-filter-function-progid> | <-ms-filter-function-...
-moz-windows-compositor - Archive of obsolete content
syntax <integer> if the user is using windows with the dwm compositor, this is 1.
::-ms-browse - Archive of obsolete content
radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-browse example html <label>select image: <input type="file"></label> css input[type="file"]::-ms-browse { color: red; background-color: yellow; } result output example specifications not part of any specification.
::-ms-check - Archive of obsolete content
radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-check example html <form> <label for="redbutton">red</label> <input type="radio" id="redbutton"><br> <label for="greencheckbox">green</label> <input type="checkbox" id="greencheckbox"> </form> css input, label { display: inline; } input[type=radio]::-ms-check { border-color: red; /* this will make the border red when the button is checked.
::-ms-clear - Archive of obsolete content
radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-clear example html <form> <label for="firstname">first name:</label> <input type="text" id="firstname" name="firstname" placeholder="first name"> <br> <label for="lastname">last name:</label> <input type="text" id="lastname" name="lastname" placeholder="second name"> </form> css input, label { display: block; } input[type=text]::-ms-clear { color: red; /* this sets the...
::-ms-expand - Archive of obsolete content
radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-clear specifications not part of any specification.
::-ms-fill-upper - Archive of obsolete content
sor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-fill-upper specifications not part of any specification.
::-ms-fill - Archive of obsolete content
r, background-image, background-origin, background-repeat, and background-size border border-radius box-shadow box-sizing color cursor display (values block, inline-block, none) font height margin -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color, outline-style, and outline-width padding transform and transform-origin visibility syntax ::-ms-fill example html <progress value="10" max="50"></progress> css progress::-ms-fill { background-color: orange; } result a progress bar using this style might look something like this: ...
::-ms-reveal - Archive of obsolete content
sor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-reveal specifications not part of any specification.
::-ms-thumb - Archive of obsolete content
sor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-thumb specifications not part of any specification.
::-ms-ticks-after - Archive of obsolete content
sor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-ticks-after ...
::-ms-ticks-before - Archive of obsolete content
sor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-ticks-before ...
::-ms-tooltip - Archive of obsolete content
display visibility syntax ::-ms-tooltip ...
::-ms-track - Archive of obsolete content
sor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-track see also ::-ms-thumb ::-ms-fill-upper ::-ms-fill-lower ::-webkit-slider-runnable-track ::-moz-range-track css-tricks: styling cross-browser compatible range inputs with css quirksmode: styling and scripting sliders ...
::-ms-value - Archive of obsolete content
sor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-value example input::-ms-value { color: lime; font-style: italic; } to disable the default styling: select::-ms-value { background-color: transparent; color: inherit; } specifications not part of any specification.
-moz-mac-graphite-theme - Archive of obsolete content
syntax <integer> if the user has configured their device to use the "graphite" appearance on mac os x, this is 1.
-moz-maemo-classic - Archive of obsolete content
syntax <integer> if the user agent is using maemo with the original theme, this is 1.
-moz-os-version - Archive of obsolete content
syntax values windows-win7 the user is on the windows 7 operating system.
-moz-scrollbar-end-backward - Archive of obsolete content
syntax <integer> if the device's user interface displays a backward arrow button at the end of scrollbars, this is 1.
-moz-scrollbar-end-forward - Archive of obsolete content
syntax <integer> if the device's user interface displays a forward arrow button at the end of scrollbars, this is 1.
-moz-scrollbar-start-backward - Archive of obsolete content
syntax <integer> if the device's user interface displays a backward arrow button at the beginning of scrollbars, this is 1.
-moz-scrollbar-start-forward - Archive of obsolete content
syntax <integer> if the device's user interface displays a forward arrow button at the beginning of scrollbars, this is 1.
-moz-scrollbar-thumb-proportional - Archive of obsolete content
syntax <integer> if the device's user interface displays the thumb of scrollbars proportionally (that is, sized based on the percentage of the document that is visible), this is 1.
-moz-touch-enabled - Archive of obsolete content
syntax <integer> if the device supports touch events (for a touch screen), this is 1.
-moz-windows-accent-color-in-titlebar - Archive of obsolete content
syntax <integer> in recent windows versions (e.g., 10), if accent colors are enabled in window titlebars, this is 1.
-moz-windows-classic - Archive of obsolete content
syntax <integer> if the user is using windows unthemed (in classic mode instead of using uxtheme), this is 1.
-moz-windows-default-theme - Archive of obsolete content
syntax <integer> if the user is using one of the default windows themes—luna, royale, zune, or aero (including vista basic, vista advanced, and aero glass)—this is 1.
-moz-windows-glass - Archive of obsolete content
syntax <integer> if the user is using windows glass theme, this is 1; otherwise it's 0.
-moz-windows-theme - Archive of obsolete content
syntax the -moz-windows-theme feature is specified as a keyword value that indicates which windows theme is currently being used.
azimuth - Archive of obsolete content
ArchiveWebCSSazimuth
initial valuecenterapplies toall elementsinheritedyescomputed valuenormalized angleanimation typediscrete syntax <angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] | behind ] | leftwards | rightwards values angle audible source position is described as an angle within the range -360deg to 360deg.
Iterator - Archive of obsolete content
syntax iterator(object, [keyonly]) parameters object object to iterate over properties.
Array.observe() - Archive of obsolete content
syntax array.observe(arr, callback) parameters arr the array to be observed.
Array.unobserve() - Archive of obsolete content
syntax array.unobserve(arr, callback) parameters arr the array to stop observing.
ArrayBuffer.transfer() - Archive of obsolete content
syntax arraybuffer.transfer(oldbuffer [, newbytelength]); parameters oldbuffer an arraybuffer object from which to transfer.
Date.prototype.toLocaleFormat() - Archive of obsolete content
syntax dateobj.tolocaleformat(formatstring) parameters formatstring a format string in the same format expected by the strftime() function in c.
Function.prototype.isGenerator() - Archive of obsolete content
syntax fun.isgenerator() return value a boolean indicating whether or not the given function is a generator.
Legacy generator function expression - Archive of obsolete content
syntax function [name]([param1[, param2[, ..., paramn]]]) { statements } parameters name the function name.
Legacy generator function - Archive of obsolete content
syntax function name([param,[, param,[..., param]]]) { [statements] } name the function name.
ActiveXObject - Archive of obsolete content
syntax let newobj = new activexobject(servername.typename[, location]) parameters servername the name of the application providing the object.
Date.getVarDate() - Archive of obsolete content
syntax dateobj.getvardate() parameters the required dateobj reference is a date object.
Debug.debuggerEnabled - Archive of obsolete content
syntax var dbgenabled = debug.debuggerenabled; requirements supported in the following document modes: internet explorer 10 standards and internet explorer 11 standards.
Debug.msTraceAsyncCallbackStarting - Archive of obsolete content
syntax debug.mstraceasynccallbackstarting(asyncoperationid) parameters asyncoperationid the id associated with the asynchronous operation.
Debug.msTraceAsyncCallbackCompleted - Archive of obsolete content
syntax debug.mstraceasynccallbackcompleted() parameters asyncoperationid the id associated with the asynchronous operation.
Debug.msUpdateAsyncCallbackRelation - Archive of obsolete content
syntax debug.msupdateasynccallbackrelation(relatedasyncoperationid, relationtype) parameters relatedasyncoperationid the id associated with the asynchronous operation.
Debug.setNonUserCodeExceptions - Archive of obsolete content
syntax debug.setnonusercodeexceptions [= bool]; remarks if this property is set to true within a given scope, the debugger can then choose whether to take some specified action on exceptions thrown inside that scope: for instance, if the developer wishes to break on user-unhandled exceptions.
Debug.write - Archive of obsolete content
syntax debug.write([str1 [, str2 [, ...
Debug.writeln - Archive of obsolete content
syntax debug.writeln([str1 [, str2 [, ...
Debug - Archive of obsolete content
syntax you do not instantiate the debug object.
Enumerator.atEnd - Archive of obsolete content
syntax myenum.atend() remarks the required myenum reference is any enumerator object.
Enumerator.item - Archive of obsolete content
syntax enumobj.item() remarks the required enumobj reference is any enumerator object.
Enumerator.moveFirst - Archive of obsolete content
syntax enumobj.movefirst( ) remarks the required enumobj reference is any enumerator object.
Enumerator.moveNext - Archive of obsolete content
syntax enumobj.movenext( ) remarks the required enumobj reference is any enumerator object.
Enumerator - Archive of obsolete content
syntax enumobj = new enumerator([collection]) parameters enumobj the variable name to which the enumerator object is assigned.
Error.description - Archive of obsolete content
syntax object .description [= stringexpression] parameters object required.
Error.number - Archive of obsolete content
syntax object .number [= errornumber] parameters object any instance of the error object.
Error.stackTraceLimit - Archive of obsolete content
syntax error.stacktracelimit remarks you can set the stacktracelimit property to any positive value between 0 and infinity.
ScriptEngine() - Archive of obsolete content
syntax scriptengine() remarks the scriptengine function returns "jscript", which indicates that javascript is the current scripting engine.
ScriptEngineBuildVersion - Archive of obsolete content
syntax scriptenginebuildversion() remarks the return value corresponds directly to the version information contained in the dynamic-link library (dll) for the scripting language in use.
ScriptEngineMajorVersion - Archive of obsolete content
syntax scriptenginemajorversion() remarks the return value corresponds directly to the version information contained in the dynamic-link library (dll) for the scripting language in use.
ScriptEngineMinorVersion - Archive of obsolete content
syntax scriptengineminorversion() remarks the return value corresponds directly to the version information contained in the dynamic-link library (dll) for the scripting language in use.
VBArray.dimensions - Archive of obsolete content
syntax array.dimensions( ) remarks the required array is a vbarray object.
VBArray.getItem - Archive of obsolete content
syntax safearray.getitem(dimension1[, dimension2, ...], dimensionn) parameters safearray a vbarray object.
VBArray.lbound - Archive of obsolete content
syntax safearray.lbound(dimension) remarks if the vbarray is empty, the lbound method returns undefined.
VBArray.toArray - Archive of obsolete content
syntax safearray.toarray( ) remarks the required safearray reference is a vbarray object.
VBArray.ubound - Archive of obsolete content
syntax safearray.ubound(dimension) parameters safearray a vbarray object.
VBArray - Archive of obsolete content
syntax varname = new vbarray(safearray) parameters varname the variable name to which the vbarray is assigned.
@if - Archive of obsolete content
syntax @if ( condition1 ) text1 [@elif ( condition2 ) text2] [@else text3] @end parameters text1 optional text to be parsed if condition1 is true.
@set - Archive of obsolete content
syntax @set @varname = term parameters varname valid javascript variable name.
New in JavaScript 1.8.5 - Archive of obsolete content
other standardization work various non-standard syntaxes for defining getters and setters have been removed; ecmascript 5 defined syntax has not been changed.
New in JavaScript 1.8 - Archive of obsolete content
typically you would have to create a custom function which would have a yield in it, but this addition allows you to use array comprehension-like syntax to create an identical generator statement.
Number.toInteger() - Archive of obsolete content
syntax number.tointeger(number) parameters number the value to be converted to an integer.
Object.prototype.__count__ - Archive of obsolete content
syntax obj.__count__ examples { 1: 1 }.__count__ // 1 [].__count__ // 0 [1].__count__ // 1 [1, /* hole */, 2, 3].__count__ // 3 specifications not part of any standard.
Object.prototype.eval() - Archive of obsolete content
syntax obj.eval(string) parameters string any string representing a javascript expression, statement, or sequence of statements.
Object.getNotifier() - Archive of obsolete content
syntax object.getnotifier(obj) parameters obj the object to retrieve the notifier of.
Object.prototype.__noSuchMethod__ - Archive of obsolete content
syntax obj.__nosuchmethod__ = fun parameters fun a function that takes the form function (id, args) { .
Object.observe() - Archive of obsolete content
syntax object.observe(obj, callback[, acceptlist]) parameters obj the object to be observed.
Object.prototype.__parent__ - Archive of obsolete content
syntax obj.__parent__ description for top-level objects, this is the e.g.
Object.unobserve() - Archive of obsolete content
syntax object.unobserve(obj, callback) parameters obj the object to stop observing.
Object.prototype.unwatch() - Archive of obsolete content
syntax obj.unwatch(prop) parameters prop the name of a property of the object to stop watching.
Object.prototype.watch() - Archive of obsolete content
syntax obj.watch(prop, handler) parameters prop the name of a property of the object on which you wish to monitor changes.
Reflect.enumerate() - Archive of obsolete content
syntax reflect.enumerate(target) parameters target the target object on which to get the property.
String.prototype.quote() - Archive of obsolete content
syntax str.quote() return value a new string representing the original string wrapped in double-quotes, with any special characters escaped.
for each...in - Archive of obsolete content
syntax for each (variable in object) { statement } variable variable to iterate over property values, optionally declared with the var keyword.
LiveConnect Overview - Archive of obsolete content
java arrays are converted to a javascript pseudo-array object; this object behaves just like a javascript array object: you can access it with the syntax arrayname[index] (where index is an integer), and determine its length with arrayname.length.
LiveConnect - Archive of obsolete content
liveconnect use by applets is enabled via the use of the "mayscript" attribute in applet tags on an html page, following which the applet may refer to classes in the netscape.javascript package to access javascript objects, and scripts may directly call applet methods (using the syntax document.applets.name.methodname()).
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.
StopIteration - Archive of obsolete content
syntax stopiteration description stopiteration is a part of legacy iterator protocol, and it will be removed at the same time as legacy iterator and legacy generator.
Window.importDialog() - Archive of obsolete content
syntax newdialog = importdialog(aparent, asrc, aarguments) newdialog the opened window aparent the dialog's parent; can be null.
Issues Arising From Arbitrary-Element hover - Archive of obsolete content
in order to avoid this problem, authors should use the combined pseudo-class syntax described by css2: a:link:hover {color: red;} a:visited:hover {color: maroon;} note that, with this syntax, it is possible to style visited and unvisited links differently when they are hovered.
XQuery - Archive of obsolete content
it offers powerful and yet intuitive searching based on xpath, has sql-like syntax for the query portion, and has scripting features such as function and variable definitions, xml-inclusion, etc.
Index - Game development
23 glsl shaders beginner, glsl, opengl, shader, texture shader, three.js, vertex shader shaders use glsl (opengl shading language), a special opengl shading language with syntax similar to c.
GLSL Shaders - Game development
shaders use glsl (opengl shading language), a special opengl shading language with syntax similar to c.
3D games on the Web - Game development
shaders use glsl, a special opengl shading language, with syntax similar to c, that is executed directly by the graphics pipeline.
Animations and tweens - Game development
that's the expanded version of the tween definition, but we can also use the shorthand syntax: game.add.tween(brick.scale).to({x:2,y:2}, 500, phaser.easing.elastic.out, true, 100); this tween will double the brick's scale in half a second using elastic easing, will start automatically, and have a delay of 100 miliseconds.
Scaling - Game development
the stage object has a backgroundcolor property for this purpose, which we can set using css color definition syntax.
CSS preprocessor - MDN Web Docs Glossary: Definitions of Web-related terms
a css preprocessor is a program that lets you generate css from the preprocessor's own unique syntax.
Constructor - MDN Web Docs Glossary: Definitions of Web-related terms
syntax // this is a generic default constructor class default function default() { } // this is an overloaded constructor class overloaded // with parameter arguments function overloaded(arg1, arg2, ...,argn){ } to call the constructor of the class in javascript, use a new operator to assign a new object reference to a variable.
Exception - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript syntax errors are a very common source of exceptions.
HTML - MDN Web Docs Glossary: Definitions of Web-related terms
concept and syntax an html document is a plaintext document structured with elements.
JSON - MDN Web Docs Glossary: Definitions of Web-related terms
although not a strict subset, json closely resembles a subset of javascript syntax.
Java - MDN Web Docs Glossary: Definitions of Web-related terms
java is statically typed and features a similar syntax to c.
JavaScript - MDN Web Docs Glossary: Definitions of Web-related terms
and other countries, the two programming languages are significantly different in their syntax, semantics, and use cases.
Method - MDN Web Docs Glossary: Definitions of Web-related terms
learn more learn about it method (computer programming) in wikipedia defining a method in javascript (comparison of the traditional syntax and the new shorthand) technical reference list of javascript built-in methods ...
Operator - MDN Web Docs Glossary: Definitions of Web-related terms
reserved syntax consisting of punctuation or alphanumeric characters that carries out built-in functionality.
PHP - MDN Web Docs Glossary: Definitions of Web-related terms
examples basic syntax // start of php code <?php // php code goes here ?> // end of php code printing data on screen <?php echo "hello world!"; ?> php variables ​​​​​​​​​​​​​​<?php // variables $nome='danilo'; $sobrenome='santos'; $pais='brasil'; $email='danilocarsan@gmailcom'; ​​​​​​​ // printing the variables echo $nome; echo $sobrenome; echo $pais; echo $email; ?> ...
Pseudocode - MDN Web Docs Glossary: Definitions of Web-related terms
pseudocode refers to code-like syntax that is generally used to indicate to humans how some code syntax works, or illustrate the design of an item of code architecture.
Quaternion - MDN Web Docs Glossary: Definitions of Web-related terms
while mathematical quaternions are more involved than this, the unit quaternions (or rotational quaternions) used to represent rotation while using webgl or webxr, for example, are represented using the same syntax as a 3d point.
Sloppy mode - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge "strict mode" in chapter 7 ("javascript syntax") in the book speaking javascript.
Tag - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge html element on wikipedia html elements syntax on whatwg technical reference introduction to html ...
URL - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge url on wikipedia learn about it understanding urls and their structure specification the syntax of urls is defined in the url living standard.
Validator - MDN Web Docs Glossary: Definitions of Web-related terms
a validator is a program that checks for syntax errors in code.
XHTML - MDN Web Docs Glossary: Definitions of Web-related terms
xhtml is a term that was historically used to describe html documents written to conform with xml syntax rules.
MDN Web Docs Glossary: Definitions of Web-related terms
lative parsing speed index sql sql injection sri stacking context state machine statement static method static typing strict mode string stun style origin stylesheet svg svn symbol symmetric-key cryptography synchronous syntax syntax error synthetic monitoring t tag tcp tcp handshake tcp slow start telnet texel thread three js time to first byte time to interactive tld tofu transmission control protocol (tcp) transport layer security (tls) tree shaking ...
Fundamental CSS comprehension - Learn web development
objective: to test comprehension of fundamental css theory, syntax and mechanics.
Organizing your CSS - Learn web development
it is likely that you will come across examples, even in tutorials, that use bem syntax, without mentioning why the css is structured in such a way.
Supporting older browsers - Learn web development
edge does still understand the old syntax, however, so take care that everything is safely overwritten in your modern grid css.
CSS layout - Learn web development
in this lesson you will first learn about the syntax used in media queries, and then move on to use them in a worked example showing how a simple design might be made responsive.
Getting started with CSS - Learn web development
sometimes you will see rules with a selector that lists the html element selector along with the class: li.special { color: orange; font-weight: bold; } this syntax means "target any li element that has a class of special".
CSS FAQ - Learn web development
LearnCSSHowtoCSS FAQ
use of a shorthand property using shorthand properties for defining style rules is good because it uses a very compact syntax.
Styling lists - Learn web development
the syntax is pretty simple: ul { list-style-image: url(star.svg); } however, this property is a bit limited in terms of controlling the position, size, etc.
How much does it cost to do something on the Web? - Learn web development
you'll have an easier time writing code if you choose an editor that color-codes, checks your syntax, and assists you with code structure.
What software do I need to build a website? - Learn web development
third-party editors often come with extra features, including syntax coloring, auto-completion, collapsible sections, and code search.
Client-side form validation - Learn web development
typemismatch: returns true if the value is not in the required syntax (when type is email or url), or false if the syntax is correct.
Your first form - Learn web development
last but not least, note the syntax of <input> vs.
Installing basic software - Learn web development
a framework tend to take this idea further, offering a complete system with some custom syntaxes for you to write a web app on top of.
JavaScript basics - Learn web development
!, !== for "not", the basic expression is true, but the comparison returns false because we negate it: let myvariable = 3; !(myvariable === 3); "does-not-equal" gives basically the same result with different syntax.
The web and web standards - Learn web development
"sure thing web browser — here you go" [downloads files and renders web page] the actual syntax for http messages (called requests and responses) is not that human-readable, but this gives you the basic idea.
Using data attributes - Learn web development
html syntax the syntax is simple.
Creating hyperlinks - Learn web development
this article shows the syntax required to make a link, and discusses link best practices.
Getting started with HTML - Learn web development
they are parts of the html syntax itself.
Adding vector graphics to the Web - Learn web development
<img src="equilateral.svg" alt="triangle with all three sides equal" height="87" width="100" /> pros quick, familiar image syntax with built-in text equivalent available in the alt attribute.
Responsive images - Learn web development
resolution switching: same size, different resolutions if you're supporting multiple display resolutions, but everyone sees your image at the same real-world size on the screen, you can allow the browser to choose an appropriate resolution image by using srcset with x-descriptors and without sizes — a somewhat easier syntax!
Structuring the web with HTML - Learn web development
introduction to html this module sets the stage, getting you used to important concepts and syntax, looking at applying html to text, how to create hyperlinks, and how to use html to structure a webpage.
Making asynchronous programming easier with async and await - Learn web development
here is a trivial example: async function hello() { return greeting = await promise.resolve("hello"); }; hello().then(alert); of course, the above example is not very useful, although it does serve to illustrate the syntax.
Choosing the right approach - Learn web development
full support full support no support no support further information running code in response to multiple promises fulfilling promise.all() reference async/await syntactic sugar built on top of promises that allows you to run asynchronous operations using syntax that's more like writing synchronous callback code.
Introduction to events - Learn web development
this functions in a similar way to the event handler properties, but the syntax is obviously different.
Function return values - Learn web development
conclusion so there we have it — functions are fun, very useful, and although there's a lot to talk about in regards to their syntax and functionality, they are fairly understandable.
JavaScript building blocks - Learn web development
in this article we'll explore fundamental concepts behind functions such as basic syntax, how to invoke and define functions, scope, and parameters.
Drawing graphics - Learn web development
it takes as its value the same syntax as the css font property.
Introduction to web APIs - Learn web development
they abstract more complex code away from you, providing some easier syntax to use in its place.
What is JavaScript? - Learn web development
javascript is case sensitive, and very fussy, so you need to enter the syntax exactly as shown, otherwise it may not work.
Solve common problems in your JavaScript code - Learn web development
object notation versus normal assignment when you assign something normally in javascript, you use a single equals sign, e.g.: const mynumber = 0; with objects, however, you need to take care to use the correct syntax.
Object building practice - Learn web development
previous overview: objects next in previous articles we looked at all the essential javascript object theory and syntax details, giving you a solid base to start from.
Object prototypes - Learn web development
in the next article, we talk about the modern way of doing things, which provides easier syntax to achieve the same things — see ecmascript 2015 classes.
Test your skills: Object-oriented JavaScript - Learn web development
oojs 2 next up we want you to take the shape class you saw in task #1 (including the calcperimeter() method) and recreate it using es class syntax instead.
JavaScript — Dynamic client-side scripting - Learn web development
here we teach object theory and syntax in detail, look at how to create your own objects, and explain what json data is and how to work with it.
Client-Server Overview - Learn web development
if we have a model named team with a field of "team_type" then we can use a simple query syntax to get back all teams that have a particular type.
Getting started with Ember - Learn web development
ember makes use of two main syntaxes: javascript (or optionally, typescript) ember's own templating language, which is loosely based on handlebars.
Using Vue computed properties - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
Vue conditional rendering: editing existing todos - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
Focus management with Vue refs - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
Vue resources - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
Styling Vue components with CSS - Learn web development
vue components are written as a combination of javascript objects that manage the app's data and an html-based template syntax that maps to the underlying dom structure.
Implementing feature detection - Learn web development
flexboxtweener for 2011 in between syntax supported by ie10.
Introduction to cross browser testing - Learn web development
if you need to support older browsers, you might have to not use those, or convert your code to old fashioned syntax using some kind of cross-compiler where needed.
Accessibility API cross-reference
aria is a standard developed as part of the web accessibility initiative, which uses markup syntax quite familiar to users of html, xml, sgml and others.
Chrome registration
style style overlays (custom css which will be applied to a chrome page) are registered with the following syntax: style chrome://uri-to-style chrome://stylesheet-uri [flags] note: only stylesheets at chrome uris can be applied in this way.
Creating a spell check dictionary add-on
<?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:cre...
Debugging JavaScript
strict code checking if you set the pref javascript.options.strict to true, the javascript engine gives you more types of warnings on the error console, most of which hint at code bugs that are easy to oversee or even bad syntax.
How Mozilla's build system works
variables are defined by the syntax variable = value, and the value of a variable is referenced by writing $(variable).
Eclipse CDT
introduction eclipse cdt (c/c++ development tools) is an open-source ide for c and c++ development with advanced code assistance (inheritance/call graph explorer, jump to definition, refactoring, autocomplete, syntax highlighting, and so on).
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
note that promise versions of browser api dom request methods also exist, so you can use async promise style syntax if you so wish.
HTMLIFrameElement.addNextPaintListener()
syntax instanceofhtmliframeelement.addnextpaintlistener(listener); returns void.
HTMLIFrameElement.clearMatch()
syntax instanceofhtmliframeelement.clearmatch(); returns void.
HTMLIFrameElement.download()
syntax var instanceofdomrequest = instanceofhtmliframeelement.download(url, options); returns a domrequest for handling the download request.
HTMLIFrameElement.executeScript()
syntax var mydomrequest = instanceofhtmliframeelement.executescript(script, options); return value a domrequest object that returns an onsuccess handler if the script is successfully executed against the loaded content, or an onerror handler if not.
HTMLIFrameElement.findAll()
syntax instanceofhtmliframeelement.findall(searchstring, casesensitivity); returns void.
HTMLIFrameElement.findNext()
syntax instanceofhtmliframeelement.findnext(direction); return value void.
HTMLIFrameElement.getActive()
syntax var amiactive = instanceofhtmliframeelement.getactive(); returns a boolean indicating whether the current browser <iframe> is the currently active frame (true) or not (false.) parameters none.
HTMLIFrameElement.getCanGoBack()
syntax instanceofhtmliframeelement.getcangoback() .then(function(result) { ...
HTMLIFrameElement.getCanGoForward()
syntax instanceofhtmliframeelement.getcangoforward() .then(function(result) { ...
HTMLIFrameElement.getContentDimensions()
syntax var instanceofdomrequest = instanceofhtmliframeelement.getcontentdimensions(); returns a domrequest for handling the dimensions request.
HTMLIFrameElement.getManifest()
syntax instanceofhtmliframeelement.getmanifest().then(function(json) { ...
HTMLIFrameElement.getMuted()
syntax there are two versions of this method, a callback version: var request = instanceofhtmliframeelement.getmuted(); and a promise version: instanceofhtmliframeelement.getmuted().then(function(muted) { ...
HTMLIFrameElement.getScreenshot()
syntax var instanceofdomrequest = instanceofhtmliframeelement.getscreenshot(maxwidth, maxheight, mimetype); returns a domrequest for handling the screenshot request.
HTMLIFrameElement.getStructuredData()
syntax var instanceofdomrequest = instanceofhtmliframeelement.getstructureddata(); returns a domrequest to handle the getstructureddata() request's success and error cases.
HTMLIFrameElement.getVisible()
syntax instanceofdomrequest = instanceofhtmliframeelement.getvisible(); returns a domrequest object to handle the getvisible() request's success and error cases.
HTMLIFrameElement.getVolume()
syntax there are two versions of this method, a callback version: var request = instanceofhtmliframeelement.getvolume(); and a promise version: instanceofhtmliframeelement.getvolume().then(function(volume) { ...
HTMLIFrameElement.goBack()
syntax instanceofhtmliframeelement.goback(); returns void.
HTMLIFrameElement.goForward()
syntax instanceofhtmliframeelement.goforward(); returns void.
HTMLIFrameElement.mute()
MozillaGeckoChromeAPIBrowser APImute
syntax instanceofhtmliframeelement.mute(); returns void.
HTMLIFrameElement.purgeHistory()
syntax there is a domrequest version and a promise version: var mydomrequest = instanceofhtmliframeelement.purgehistory(); instanceofhtmliframeelement.purgehistory().then(function() { ...
HTMLIFrameElement.reload()
syntax instanceofhtmliframeelement.reload(hardreload); returns void.
HTMLIframeElement.removeNextPaintListener()
syntax instanceofhtmliframeelement.removenextpaintlistener(listener); returns void.
HTMLIFrameElement.sendMouseEvent()
syntax instanceofhtmliframeelement.sendmouseevent(type, x, y, button, clickcount, modifiers); returns void.
HTMLIFrameElement.sendTouchEvent()
syntax instanceofhtmliframeelement.sendtouchevent(type, x, y, rx, ry, rotationangles, forces, count, modifiers); returns void.
HTMLIFrameElement.setActive()
syntax instanceofhtmliframeelement.setactive(boolean); returns void.
HTMLIFrameElement.setVisible()
syntax instanceofhtmliframeelement.setvisible(visible); returns void.
HTMLIFrameElement.setVolume()
syntax instanceofhtmliframeelement.setvolume(number); returns void.
HTMLIFrameElement.stop()
MozillaGeckoChromeAPIBrowser APIstop
syntax instanceofhtmliframeelement.stop(); returns void.
HTMLIFrameElement.unmute()
syntax instanceofhtmliframeelement.unmute(); returns void.
HTMLIFrameElement.zoom()
MozillaGeckoChromeAPIBrowser APIzoom
syntax var instanceofdomrequest = instanceofhtmliframeelement.zoom(zoomfactor); returns void.
CSS -moz-bool-pref() @supports function
syntax -moz-bool-pref( <string> ) parameters <string> the preference name returns evaluates to true if the preference is enabled, false otherwise.
::-moz-tree-row
associated elements treerow syntax treechildren::-moz-tree-row { style properties } style properties background border margin outline padding display -moz-appearance examples treechildren::-moz-tree-row( foo bar ) { margin: 2%; } ...where...
CSS <display-xul> component
firefox supports the following -moz- prefixed xul display values: syntax -moz-box obsolete since gecko 64 xul box, mostly equivalent to flex -moz-inline-box obsolete since gecko 64 xul inline box, mostly equivalent to inline-flex -moz-grid obsolete since gecko 62 xul grid -moz-inline-grid obsolete since gecko 62 xul inline grid -moz-grid-group obsolete since gecko 62 xul grid group -moz-grid-line obsolete since gecko 62 xul grid line -moz-stack obsolete since gecko 62 xul stack -moz-inline-stack obsolete since gecko 62 xul inline stack -moz-deck obsolete since gecko 62 xul deck -moz-popup obsolete since gecko 62 xul popup all xul display values, with the exception of -moz-box and -moz-inline-box, have been removed in bug 1288572.
Infallible memory allocation
if you want to allocate them fallibly, use the syntax new (fallible) foo().
JNI.jsm
functions are declared similar to js-ctypes but in a very different syntax.
Task.jsm
this reduces the syntax overhead of calling task.spawn() explicitly when you want to recurse into other task functions.
Using JavaScript code modules
the basic syntax of a resource url is as follows: resource://<alias>/<relative-path>/<file.js|jsm> the <alias> is an alias to a location, usually a physical location relative to the application or xul runtime.
WebRequest.jsm
chpattern.jsm"); let pattern = new matchpattern("https:/developer.mozilla.org/*"); cu.import("resource://gre/modules/matchpattern.jsm"); let pattern = new matchpattern(["https://mozorg.cdn.mozilla.net/*", "https://mdn.mozillademos.org/*", "https://developer.cdn.mozilla.net/*"]); see the match patterns article for details on the syntax of the strings you supply.
Localizing extension descriptions
the following example demonstrates this (most normal manifest properties have been removed for brevity): <?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>tabsidebar@blueprintit.co.uk</em:id> <em:localized> <description> <em:locale>de-de</em:locale> <em:name>tab sidebar</em:name> <em:description>zeigt in einer sidebar vorschaubilder der inhalte aller offenen tabs an.</em:description> </des...
Localizing with Koala
notice that the .properties files have a different syntax than the dtd files.
Mozilla Web Developer FAQ
does the css style sheet pass the syntax check?
Mozilla Web Services Security Model
any errors in xml syntax, as well as many failures to follow the format, will cause the document to be ignored.
Preference reference
in which the background of a text selection in the user interface or in content will be styled.ui.textselectforegroundui.textselectforeground saves the color in which the text of a text selection in the user interface or the content will be styled.ui.tooltipdelayui.tooltipdelay stores the delay in milliseconds between the mouse stopping over an element and the appearing of its tooltip.view_source.syntax_highlightthe preference view_source.syntax_highlight controls whether markup in the view source view is syntax highlighted.
L20n HTML Bindings
see l20n by example to learn more about l20n's syntax.
L20n Javascript API
context.translationerror, when the translation is present but broken in one of supported locales; the context instance will try to retrieve a fallback translation from the next locale in the fallback chain, parser.error, when l20n is unable to parse the syntax of a resource; this might result in entities being broken which in turn can lead to above error being emitted.
NSPR LOG MODULES
syntax modulename:level[, modulename:level]* modulename is the name specified in a pr_newlogmodule call or one of the handy magic names listed below.
Named Shared Memory
all names provided to pr_opensharedmemory should be valid filename syntax or name syntax for shared memory for the target platform.
PLHashAllocOps
syntax #include <plhash.h> typedef struct plhashallocops { void *(pr_callback *alloctable)(void *pool, prsize size); void (pr_callback *freetable)(void *pool, void *item); plhashentry *(pr_callback *allocentry)(void *pool, const void *key); void (pr_callback *freeentry)(void *pool, plhashentry *he, pruintn flag); } plhashallocops; #define ht_free_value 0 /* just free the entry's value */ #define ht_free_entry 1 /* free value and entire entry */ description users of the hash table functions can provide their own memory allocation functions.
PLHashComparator
syntax #include <plhash.h> typedef printn (pr_callback *plhashcomparator)( const void *v1, const void *v2); description plhashcomparator is a function type that compares two values of an unspecified type.
PLHashEntry
syntax #include <plhash.h> typedef struct plhashentry plhashentry; description plhashentry is a structure that represents an entry in the hash table.
PLHashEnumerator
syntax #include <plhash.h> typedef printn (pr_callback *plhashenumerator)(plhashentry *he, printn index, void *arg); /* return value */ #define ht_enumerate_next 0 /* continue enumerating entries */ #define ht_enumerate_stop 1 /* stop enumerating entries */ #define ht_enumerate_remove 2 /* remove and free the current entry */ #define ht_enumerate_unhash 4 /* just unhash the current entry */ description plhashenumerator is a function type used in the enumerating a hash table.
PLHashFunction
syntax #include <plhash.h> typedef plhashnumber (pr_callback *plhashfunction)(const void *key); description plhashnumber is a function type that maps the key of a hash table entry to a hash number.
PLHashNumber
syntax #include <plhash.h> typedef pruint32 plhashnumber; #define pl_hash_bits 32 description plhashnumber is an unsigned 32-bit integer.
PLHashTable
syntax #include <plhash.h> typedef struct plhashtable plhashtable; description the opaque plhashtable structure represents a hash table.
PL_CompareStrings
syntax #include <plhash.h> printn pl_comparestrings( const void *v1, const void *v2); description pl_comparestrings compares v1 and v2 as character strings using strcmp.
PL_CompareValues
syntax #include <plhash.h> printn pl_comparevalues(const void *v1, const void *v2); description pl_comparevalues compares the two void * values v1 and v2 numerically, i.e., it returns the value of the expression v1 == v2.
PL_HashString
syntax #include <plhash.h> plhashnumber pl_hashstring(const void *key); parameter the function has the following parameter: key a pointer to a character string.
PL_HashTableAdd
syntax #include <plhash.h> plhashentry *pl_hashtableadd( plhashtable *ht, const void *key, void *value); parameters the function has the following parameters: ht a pointer to the the hash table to which to add the entry.
PL_HashTableDestroy
syntax #include <plhash.h> void pl_hashtabledestroy(plhashtable *ht); parameter the function has the following parameter: ht a pointer to the hash table to be destroyed.
PL_HashTableEnumerateEntries
syntax #include <plhash.h> printn pl_hashtableenumerateentries( plhashtable *ht, plhashenumerator f, void *arg); parameters the function has the following parameters: ht a pointer to the hash table whose entries are to be enumerated.
PL_HashTableLookup
syntax #include <plhash.h> void *pl_hashtablelookup( plhashtable *ht, const void *key); parameters the function has the following parameters: ht a pointer to the hash table in which to look up the entry specified by key.
PL_HashTableRemove
syntax #include <plhash.h> prbool pl_hashtableremove( plhashtable *ht, const void *key); parameters the function has the following parameters: ht a pointer to the hash table from which to remove the entry.
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.
PL_strcpy
syntax char * pl_strcpy(char *dest, const char *src); parameters the function has these parameters: dest pointer to a buffer.
PL_strdup
syntax #include <plstr.h> char *pl_strdup(const char *s); parameter the function has a single parameter: s the string to copy, may be null.
PL_strfree
syntax void pl_strfree(char *s); parameter the function has these parameter: s pointer to the string to be freed.
PL_strlen
returns the length of a specified string (not including the trailing '\0') syntax pruint32 pl_strlen(const char *str); parameter the function has these parameter: str size in bytes of item to be allocated.
PRBool
syntax #include <prtypes.h> typedef enum { pr_false = 0, pr_true = 1 } prbool; description wherever possible, do not use prbool in mozilla c++ code.
PRCList
syntax #include <prclist.h> typedef struct prcliststr prclist; typedef struct prcliststr { prclist *next; prclist *previous; }; description prclist defines a node in a circular linked list.
PRCallOnceFN
syntax #include <prinit.h> typedef prstatus (pr_callback *prcalloncefn)(void); description the function is called to perform the initialization desired.
PRCallOnceType
syntax #include <prinit.h> typedef struct prcalloncetype { printn initialized; print32 inprogress; prstatus status; } prcalloncetype; fields the structure has these fields: initialized if not zero, the initialization process has been completed.
PRCondVar
syntax #include <prcvar.h> typedef struct prcondvar prcondvar; description an nspr condition variable is an opaque object identified by a pointer.
PRDescIdentity
syntax #include <prio.h> typedef pruintn prdescidentity; description file descriptors may be layered.
PRDir
syntax #include <prio.h> typedef struct prdir prdir; description the opaque structure prdir represents an open directory in the file system.
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.
PRExplodedTime
syntax #include <prtime.h> typedef struct prexplodedtime { print32 tm_usec; print32 tm_sec; print32 tm_min; print32 tm_hour; print32 tm_mday; print32 tm_month; print16 tm_year; print8 tm_wday; print16 tm_yday; prtimeparameters tm_params; } prexplodedtime; description the prexplodedtime structure represents clock/calendar time.
PRFileDesc
syntax #include <prio.h> struct prfiledesc { priomethods *methods; prfileprivate *secret; prfiledesc *lower, *higher; void (*dtor)(prfiledesc *fd); prdescidentity identity; }; typedef struct prfiledesc prfiledesc; parameters methods the i/o methods table.
PRFileInfo
syntax #include <prio.h> struct prfileinfo { prfiletype type; pruint32 size; prtime creationtime; prtime modifytime; }; typedef struct prfileinfo prfileinfo; fields the structure has the following fields: type type of file.
PRFileInfo64
syntax #include <prio.h> struct prfileinfo64 { prfiletype type; pruint64 size; prtime creationtime; prtime modifytime; }; typedef struct prfileinfo64 prfileinfo64; fields the structure has the following fields: type type of file.
PRFileMap
syntax #include <prio.h> typedef struct prfilemap prfilemap; description the opaque structure prfilemap represents a memory-mapped file object.
PRFilePrivate
syntax #include <prio.h> typedef struct prfileprivate prfileprivate; description a layer implementor should collect all the private data of the layer in the prfileprivate structure.
PRFileType
syntax #include <prio.h> typedef enum prfiletype{ pr_file_file = 1, pr_file_directory = 2, pr_file_other = 3 } prfiletype; enumerators the enumeration has the following enumerators: pr_file_file the information in the structure describes a file.
PRFloat64
syntax #include <prtypes.h> typedef double prfloat64; ...
PRHostEnt
syntax #include <prnetdb.h> typedef struct prhostent { char *h_name; char **h_aliases; #if defined(_win32) print16 h_addrtype; print16 h_length; #else print32 h_addrtype; print32 h_length; #endif char **h_addr_list; } prhostent; fields the structure has the following fields: h_name pointer to the official name of host.
PRIOMethods
syntax #include <prio.h> struct priomethods { prdesctype file_type; prclosefn close; prreadfn read; prwritefn write; pravailablefn available; pravailable64fn available64; prfsyncfn fsync; prseekfn seek; prseek64fn seek64; prfileinfofn fileinfo; prfileinfo64fn fileinfo64; prwritevfn writev; prconnectfn connect; pracceptfn accept; prbindfn bind; prlistenfn listen; prshutdownfn shutdown; prrecvfn recv; prsendfn send; prrecvfromfn recvfrom; prsendtofn sendto; prpollfn poll; pracceptreadfn acceptread; prtransmitfilefn transmitfile; prgetsocknamefn getsockname; prgetpeernamefn getpeername; prgetsockoptfn getsockopt; prsetsockoptfn setsockopt; }; typedef struct priomethods priomethods; par...
PRIPv6Addr
syntax #include <prio.h> #if defined(_pr_inet6) typedef struct in6_addr pripv6addr; #endif /* defined(_pr_inet6) */ description pripv6addr represents a 128-bit ipv6 address.
PRInt16
syntax #include <prtypes.h> typedefdefinition print16; ...
PRInt8
syntax #include <prtypes.h> typedef definition print8; ...
PRIntervalTime
syntax #include <prinrval.h> typedef pruint32 printervaltime; #define pr_interval_min 1000ul #define pr_interval_max 100000ul #define pr_interval_no_wait 0ul #define pr_interval_no_timeout 0xfffffffful description the units of printervaltime are platform-dependent.
PRIntn
syntax #include <prtypes.h> typedef int printn; ...
PRJob
syntax #include <prtpool.h> ...
PRJobFn
syntax #include <prtpool.h> typedef void (pr_callback *prjobfn)(void *arg); ...
PRJobIoDesc
syntax #include <prtpool.h> typedef struct prjobiodesc { prfiledesc *socket; prerrorcode error; printervaltime timeout; } prjobiodesc; ...
PRLibrary
syntax #include <prlink.h> typedef struct prlibrary prlibrary; description a prlibrary is an opaque structure.
PRLinger
syntax #include <prio.h> typedef struct prlinger { prbool polarity; printervaltime linger; } prlinger; fields the structure has the following fields: polarity polarity of the option's setting: pr_false means the option is off, in which case the value of linger is ignored.
PRLock
syntax #include <prlock.h> typedef struct prlock prlock; description nspr represents a lock as an opaque entity to clients of the functions described in "locks".
PRLogModuleInfo
syntax #include <prlog.h> typedef struct prlogmoduleinfo { const char *name; prlogmodulelevel level; struct prlogmoduleinfo *next; } prlogmoduleinfo; ...
PRLogModuleLevel
syntax #include <prlog.h> typedef enum prlogmodulelevel { pr_log_none = 0, pr_log_always = 1, pr_log_error = 2, pr_log_warning = 3, pr_log_debug = 4, pr_log_notice = pr_log_debug, pr_log_warn = pr_log_warning, pr_log_min = pr_log_debug, pr_log_max = pr_log_debug } prlogmodulelevel; ...
PRMcastRequest
syntax #include <prio.h> struct prmcastrequest { prnetaddr mcaddr; prnetaddr ifaddr; }; typedef struct prmcastrequest prmcastrequest; fields the structure has the following fields: mcaddr ip multicast address of group.
PRMonitor
syntax #include <prmon.h> typedef struct prmonitor prmonitor; ...
PRNetAddr
syntax #include <prio.h> union prnetaddr { struct { pruint16 family; char data[14]; } raw; struct { pruint16 family; pruint16 port; pruint32 ip; char pad[8]; } inet; #if defined(_pr_inet6) struct { pruint16 family; pruint16 port; pruint32 flowinfo; pripv6addr ip; } ipv6; #endif /* defined(_pr_inet6) */ }; typedef union prnetaddr prnetaddr; fields the structure has the following fields: family address family: pr_af_inet|pr_af_inet6 for raw.family, pr_af_inet for inet.family, pr_af_inet6 for ipv6.family.
PRPackedBool
syntax #include <prtypes.h> typedef pruint8 prpackedbool; description use prpackedbool within structures.
PR_Initialize
the type for the root function used by pr_initialize is specified as follows: syntax typedef printn (pr_callback *prprimordialfn)(printn argc, char **argv); see also pr_initialize ...
PRProcess
syntax #include <prproces.h> typedef struct prprocess prprocess; description a pointer to the opaque prprocess structure identifies a process.
PRProcessAttr
syntax #include <prproces.h> typedef struct prprocessattr prprocessattr; description this opaque structure describes the attributes of a process to be created.
PRProtoEnt
syntax #include <prnetdb.h> typedef struct prprotoent { char *p_name; char **p_aliases; #if defined(_win32) print16 p_num; #else print32 p_num; #endif } prprotoent; fields the structure has the following fields: p_name pointer to official protocol name.
PRPtrdiff
syntax #include <prtypes.h> typedef ptrdiff_t prptrdiff; ...
PRSeekWhence
syntax #include <prio.h> typedef prseekwhence { pr_seek_set = 0, pr_seek_cur = 1, pr_seek_end = 2 } prseekwhence; enumerators the enumeration has the following enumerators: pr_seek_set sets the file pointer to the value of the offset parameter.
PRSize
syntax #include <prtypes.h> typedef size_t prsize; ...
PRSockOption
syntax #include <prio.h> typedef enum prsockoption { pr_sockopt_nonblocking, pr_sockopt_linger, pr_sockopt_reuseaddr, pr_sockopt_keepalive, pr_sockopt_recvbuffersize, pr_sockopt_sendbuffersize, pr_sockopt_iptimetolive, pr_sockopt_iptypeofservice, pr_sockopt_addmember, pr_sockopt_dropmember, pr_sockopt_mcastinterface, pr_sockopt_mcasttimetolive, pr_sockopt_mcastloopback, pr_sockopt_nodelay, pr_sockopt_maxsegment, pr_sockopt_last } prsockoption; enumerators the enumeration has the following enumerators: pr_sockopt_nonblocking nonblocking i/o.
PRSocketOptionData
syntax #include <prio.h> typedef struct prsocketoptiondata { prsockoption option; union { pruintn ip_ttl; pruintn mcast_ttl; pruintn tos; prbool non_blocking; prbool reuse_addr; prbool keep_alive; prbool mcast_loopback; prbool no_delay; prsize max_segment; prsize recv_buffer_size; prsize send_buffer_size; prlinger linger; prmcastrequest add_member; prmcastrequest drop_member; prnetaddr mcast_if; } value; } prsocketoptiondata; fields the structure has the following fields: ip_ttl ip time-to-live.
PRStaticLinkTable
syntax #include <prlink.h> typedef struct prstaticlinktable { const char *name; void (*fp)(); } prstaticlinktable; ...
PRStatus
syntax #include <prtypes.h> typedef enum { pr_failure = -1, pr_success = 0 } prstatus; ...
PRThread
syntax #include <prthread.h> typedef struct prthread prthread; description in nspr, a thread is represented by a pointer to an opaque structure of type prthread.
PRThreadPool
syntax #include <prtpool.h> ...
PRThreadPriority
syntax #include <prthread.h> typedef enum prthreadpriority { pr_priority_first = 0, pr_priority_low = 0, pr_priority_normal = 1, pr_priority_high = 2, pr_priority_urgent = 3, pr_priority_last = 3 } prthreadpriority; enumerators pr_priority_first placeholder.
PRThreadPrivateDTOR
syntax #include <prthread.h> typedef void (pr_callback *prthreadprivatedtor)(void *priv); description until the data associated with an index is actually set with a call to pr_setthreadprivate, the value of the data is null.
PRThreadScope
syntax #include <prthread.h> typedef enum prthreadscope { pr_local_thread, pr_global_thread pr_global_bound_thread } prthreadscope; enumerators pr_local_thread a local thread, scheduled locally by nspr within the process.
PR_AttachThread
syntax #include <prthread.h> typedef struct prthreadstack prthreadstack; ...
PRThreadState
syntax #include <prthread.h> typedef enum prthreadstate { pr_joinable_thread, pr_unjoinable_thread } prthreadstate; enumerators pr_unjoinable_thread thread termination happens implicitly when the thread returns from the root function.
PRThreadType
syntax #include <prthread.h> typedef enum prthreadtype { pr_user_thread, pr_system_thread } prthreadtype; enumerators pr_user_thread pr_cleanup blocks until the last thread of type pr_user_thread terminates.
PRTime
syntax #include <prtime.h> typedef print64 prtime; description this type is a 64-bit integer representing the number of microseconds since the nspr epoch, midnight (00:00:00) 1 january 1970 coordinated universal time (utc).
PRTimeParamFn
syntax #include <prtime.h> typedef prtimeparameters (pr_callback_decl *prtimeparamfn) (const prexplodedtime *gmt); description the type prtimeparamfn represents a callback function that, when given a time instant in gmt, returns the time zone information (offset from gmt and dst offset) at that time instant.
PRTimeParameters
syntax #include <prtime.h> typedef struct prtimeparameters { print32 tp_gmt_offset; print32 tp_dst_offset; } prtimeparameters; description each geographic location has a standard time zone, and if daylight saving time (dst) is practiced, a daylight time zone.
PRUint16
syntax #include <prtypes.h> typedefdefinition pruint16; ...
PRUint8
syntax #include <prtypes.h> typedefdefinition pruint8; ...
PRUintn
syntax #include <prtypes.h> typedef unsigned int pruintn; ...
PRUnichar
syntax #if defined(ns_win32) typedef wchar_t prunichar; #else typedef pruint16 prunichar; #endif ...
PRUptrdiff
syntax #include <prtypes.h> typedef unsigned long pruptrdiff; ...
PR_APPEND_LINK
syntax #include <prclist.h> pr_append_link ( prclist *elemp, prclist *listp); parameters elemp a pointer to the element to be inserted.
PR_ASSERT
syntax #include <prlog.h> void pr_assert ( expression ); parameters the macro has this parameter: expression any valid c language expression that evaluates to true or false.
PR_Abort
syntax #include <prinit.h> void pr_abort(void); description pr_abort results in a core file and a call to the debugger or equivalent, in addition to causing the entire process to stop.
PR_Accept
syntax #include <prio.h> prfiledesc* pr_accept( prfiledesc *fd, prnetaddr *addr, printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing the rendezvous socket on which the caller is willing to accept new connections.
PR_AcceptRead
syntax #include <prio.h> print32 pr_acceptread( prfiledesc *listensock, prfiledesc **acceptedsock, prnetaddr **peeraddr, void *buf, print32 amount, printervaltime timeout); parameters the function has the following parameters: listensock a pointer to a prfiledesc object representing a socket descriptor that has been called with the pr_listen function, also known as the rendezvous socket.
PR_Access
syntax #include <prio.h> prstatus pr_access( const char *name, praccesshow how); parameters the function has the following parameters: name the pathname of the file whose accessibility is to be determined.
PR_Assert
syntax #include <prlog.h> void pr_assert ( const char *s, const char *file, printn ln); parameters the function has these parameters: s a string to be displayed in the log.
PR_AtomicAdd
syntax #include <pratom.h> print32 pr_atomicadd( print32 *ptr, print32 val); parameter the function has the following parameters: ptr a pointer to the value to increment.
PR_AtomicDecrement
syntax #include <pratom.h> print32 pr_atomicdecrement(print32 *val); parameter the function has the following parameter: val a pointer to the value to decrement.
PR_AtomicIncrement
syntax #include <pratom.h> print32 pr_atomicincrement(print32 *val); parameter the function has the following parameter: val a pointer to the value to increment.
PR_AtomicSet
syntax #include <pratom.h> print32 pr_atomicset( print32 *val, print32 newval); parameters the function has the following parameter: val a pointer to the value to be set.
PR_AttachSharedMemory
syntax #include <prshm.h> nspr_api( void * ) pr_attachsharedmemory( prsharedmemory *shm, printn flags ); /* define values for pr_attachsharedmemory(...,flags) */ #define pr_shm_readonly 0x01 parameters the function has these parameters: shm the handle returned from pr_opensharedmemory.
PR_AttachThread
syntax #include <pprthread.h> prthread* pr_attachthread( prthreadtype type, prthreadpriority priority, prthreadstack *stack); parameters pr_attachthread has the following parameters: type specifies that the thread is either a user thread (pr_user_thread) or a system thread (pr_system_thread).
PR_Available
syntax #include <prio.h> print32 pr_available(prfiledesc *fd); parameter the function has the following parameter: fd pointer to a prfiledesc object representing a file or socket.
PR_Available64
syntax #include <prio.h> print64 pr_available64(prfiledesc *fd); parameter the function has the following parameter: fd pointer to a prfiledesc object representing a file or socket.
PR_Bind
syntax #include <prio.h> prstatus pr_bind( prfiledesc *fd, const prnetaddr *addr); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket.
PR_BlockClockInterrupts
syntax #include <prinit.h> void pr_blockclockinterrupts(void); ...
PR_CALLBACK
syntax #include <prtypes.h>type pr_callbackimplementation description functions that are implemented in an application (or shared library) that are intended to be called from another shared library (such as nspr) must be declared with the pr_callback attribute.
PR_Calloc
syntax #include <prmem.h> void *pr_calloc ( pruint32 nelem, pruint32 elsize); parameters nelem the number of elements of size elsize to be allocated.
PR_CEnterMonitor
syntax #include <prcmon.h> prmonitor* pr_centermonitor(void *address); parameter the function has the following parameter: address a reference to the data that is to be protected by the monitor.
PR_CExitMonitor
syntax #include <prcmon.h> prstatus pr_cexitmonitor(void *address); parameters the function has the following parameters: address the address of the protected object--the same address previously passed to pr_centermonitor.
PR_CLIST_IS_EMPTY
syntax #include <prclist.h> printn pr_clist_is_empty (prclist *listp); parameter listp a pointer to the linked list.
PR_CNotify
syntax #include <prcmon.h> prstatus pr_cnotify(void *address); parameter the function has the following parameter: address the address of the monitored object.
PR_CNotifyAll
syntax #include <prcmon.h> prstatus pr_cnotifyall(void *address); parameter the function has the following parameter: address the address of the monitored object.
PR_CWait
syntax #include <prcmon.h> prstatus pr_cwait( void *address, printervaltime timeout); parameters the function has the following parameters: address the address of the protected object--the same address previously passed to pr_centermonitor.
PR_CallOnce
syntax prstatus pr_callonce( prcalloncetype *once, prcalloncefn func); parameters pr_callonce has these parameters: once a pointer to an object of type prcalloncetype.
PR_CancelJob
syntax #include <prtpool.h> nspr_api(prstatus) pr_canceljob(prjob *job); parameter the function has the following parameter: job a pointer to a prjob structure returned by a pr_queuejob function representing the job to be cancelled.
PR_Cleanup
syntax #include <prinit.h> prstatus pr_cleanup(void); returns the function returns one of the following values: if nspr has been shut down successfully, pr_success.
PR_ClearInterrupt
syntax #include <prthread.h> void pr_clearinterrupt(void); description interrupting is a cooperative process, so it's possible that the thread passed to pr_interrupt may never respond to the interrupt request.
PR_Close
syntax #include <prio.h> prstatus pr_close(prfiledesc *fd); parameters the function has the following parameters: fd a pointer to a prfiledesc object.
PR_CloseDir
syntax #include <prio.h> prstatus pr_closedir(prdir *dir); parameter the function has the following parameter: dir a pointer to a prdir structure representing the directory to be closed.
PR_CloseFileMap
syntax #include <prio.h> prstatus pr_closefilemap(prfilemap *fmap); parameter the function has the following parameter: fmap the file mapping to be closed.
PR_CloseSemaphore
syntax #include <pripcsem.h> nspr_api(prstatus) pr_closesemaphore(prsem *sem); parameter the function has the following parameter: sem a pointer to a prsem structure returned from a call to pr_opensemaphore.
PR_CloseSharedMemory
syntax #include <prshm.h> nspr_api( prstatus ) pr_closesharedmemory( prsharedmemory *shm ); parameter the function has these parameter: shm the handle returned from pr_opensharedmemory.
PR_Connect
syntax #include <prio.h> prstatus pr_connect( prfiledesc *fd, const prnetaddr *addr, printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket.
PR_ConnectContinue
syntax #include <prio.h> prstatus pr_connectcontinue( prfiledesc *fd, print16 out_flags); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket.
PR ConvertIPv4AddrToIPv6
syntax #include <prnetdb.h> void pr_convertipv4addrtoipv6( pruint32 v4addr, pripv6addr *v6addr ); parameters the function has the following parameters: v4addr the ipv4 address to convert into an ipv4-mapped ipv6 address.
PR_CreateFileMap
syntax #include <prio.h> prfilemap* pr_createfilemap( prfiledesc *fd, print64 size, prfilemapprotect prot); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing the file that is to be mapped to memory.
PR_CreateIOLayerStub
syntax #include <prio.h> prfiledesc* pr_createiolayerstub( prdescidentity ident priomethods const *methods); parameters the function has the following parameters: ident the identity to be associated with the new layer.
PR_CreatePipe
syntax #include <prio.h> prstatus pr_createpipe( prfiledesc **readpipe, prfiledesc **writepipe); parameters the function has the following parameters: readpipe a pointer to a prfiledesc pointer.
PR_CreateThread
syntax #include <prthread.h> prthread* pr_createthread( prthreadtype type, void (*start)(void *arg), void *arg, prthreadpriority priority, prthreadscope scope, prthreadstate state, pruint32 stacksize); parameters pr_createthread has the following parameters: type specifies that the thread is either a user thread (pr_user_thread) or a system thread (pr_system_thread).
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.
PR_DELETE
syntax #include <prmem.h> void pr_delete(_ptr); parameter _ptr the address of memory to be returned to the heap.
PR_Delete
syntax #include <prio.h> prstatus pr_delete(const char *name); parameters the function has the following parameter: name the pathname of the file to be deleted.
PR_DeleteSemaphore
syntax #include <pripcsem.h> nspr_api(prstatus) pr_deletesemaphore(const char *name); parameter the function has the following parameter: name the name of a semaphore that was previously created via a call to pr_opensemaphore.
PR_DeleteSharedMemory
syntax #include <prshm.h> nspr_api( prstatus ) pr_deletesharedmemory( const char *name ); parameter the function has these parameter: shm the handle returned from pr_opensharedmemory.
PR_DestroyCondVar
syntax #include <prcvar.h> void pr_destroycondvar(prcondvar *cvar); parameter pr_destroycondvar has one parameter: cvar a pointer to the condition variable object to be destroyed.
PR_DestroyLock
syntax #include <prlock.h> void pr_destroylock(prlock *lock); parameter pr_destroylock has one parameter: lock a pointer to a lock object.
PR_DestroyMonitor
syntax #include <prmon.h> void pr_destroymonitor(prmonitor *mon); parameter the function has the following parameter: mon a reference to an existing structure of type prmonitor.
PR_DestroyPollableEvent
syntax nspr_api(prstatus) pr_destroypollableevent(prfiledesc *event); parameter the function has the following parameter: event pointer to a prfiledesc structure previously created via a call to pr_newpollableevent.
PR_DetachSharedMemory
syntax #include <prshm.h> nspr_api( prstatus ) pr_detachsharedmemory( prsharedmemory *shm, void *addr ); parameters the function has these parameters: shm the handle returned from pr_opensharedmemory.
PR_DetachThread
syntax #include <pprthread.h> void pr_detachthread(void); parameters pr_detachthread has no parameters.
PR_DisableClockInterrupts
syntax #include <prinit.h> void pr_disableclockinterrupts(void); ...
PR_EnterMonitor
syntax #include <prmon.h> void pr_entermonitor(prmonitor *mon); parameter the function has the following parameter: mon a reference to an existing structure of type prmonitor.
PR EnumerateAddrInfo
syntax #include <prnetdb.h> void *pr_enumerateaddrinfo( void *enumptr, const praddrinfo *addrinfo, pruint16 port, prnetaddr *result); parameters the function has the following parameters: enumptr the index pointer of the enumeration.
PR_EnumerateHostEnt
syntax #include <prnetdb.h> printn pr_enumeratehostent( printn enumindex, const prhostent *hostent, pruint16 port, prnetaddr *address); parameters the function has the following parameters: enumindex the index of the enumeration.
PR_ExitMonitor
syntax #include <prmon.h> prstatus pr_exitmonitor(prmonitor *mon); parameter the function has the following parameter: mon a reference to an existing structure of type prmonitor.
PR_ExplodeTime
syntax #include <prtime.h> void pr_explodetime( prtime usecs, prtimeparamfn params, prexplodedtime *exploded); parameters the function has these parameters: usecs an absolute time in the prtime format.
PR_ExportFileMapAsString
syntax #include <prshma.h> nspr_api( prstatus ) pr_exportfilemapasstring( prfilemap *fm, prsize bufsize, char *buf ); define pr_filemap_string_bufsize 128 parameters the function has the following parameters: fm a pointer to the prfilemap to be represented as a string.
PR_FREEIF
syntax #include <prmem.h> void pr_freeif(_ptr); parameter _ptr the address of memory to be returned to the heap.
PR_FamilyInet
syntax #include <prnetdb.h> pruint16 pr_familyinet(void); returns the value of the address family for internet protocol.
PR_FindSymbol
syntax #include <prlink.h> void* pr_findsymbol ( prlibrary *lib, const char *name); parameters the function has these parameters: lib a valid reference to a loaded library, as returned by pr_loadlibrary, or null.
PR_FindSymbolAndLibrary
syntax #include <prlink.h> void* pr_findsymbolandlibrary ( const char *name, prlibrary **lib); parameters the function has these parameters: name the textual representation of the symbol to locate.
PR_Free
syntax #include <prmem.h> void pr_free(void *ptr); parameter ptr a pointer to the memory to be freed.
PR FreeAddrInfo
syntax #include <prnetdb.h> void pr_enumerateaddrinfo(praddrinfo *addrinfo); parameters the function has the following parameters: addrinfo a pointer to a praddrinfo structure returned by a successful call to pr_getaddrinfobyname.
PR_FreeLibraryName
syntax #include <prlink.h> void pr_freelibraryname(char *mem); parameters the function has this parameter: mem a reference to a character array that was previously allocated by the dynamic library runtime.
PR_GMTParameters
syntax #include <prtime.h> prtimeparameters pr_gmtparameters ( const prexplodedtime *gmt); parameter gmt a pointer to the clock/calendar time whose offsets are to be determined.
PR GetAddrInfoByName
syntax #include <prnetdb.h> praddrinfo *pr getaddrinfobyname( const char *hostname, pruint16 af, printn flags); parameters the function has the following parameters: hostname the character string defining the host name of interest.
PR GetCanonNameFromAddrInfo
syntax #include <prnetdb.h> const char *pr_getcanonnamefromaddrinfo(const praddrinfo *addrinfo); parameters the function has the following parameters: addrinfo a pointer to a praddrinfo structure returned by a successful call to pr_getaddrinfobyname.
PR_GetConnectStatus
syntax prstatus pr_getconnectstatus(const prpolldesc *pd); parameter the function has the following parameter: pd a pointer to a prpolldesc satructure whose fd field is the socket and whose in_flags field must contain pr_poll_write and pr_poll_except.
PR_GetCurrentThread
syntax #include <prthread.h> prthread* pr_getcurrentthread(void); returns always returns a valid reference to the calling thread--a self-identity.
PR_GetDefaultIOMethods
syntax #include <prio.h> const priomethods* pr_getdefaultiomethods(void); returns if successful, the function returns a pointer to a priomethods structure.
PR_GetDescType
syntax #include <prio.h> prdesctype pr_getdesctype(prfiledesc *file); parameter the function has the following parameter: file a pointer to a prfiledesc object whose descriptor type is to be returned.
PR_GetError
syntax #include <prerror.h> prerrorcode pr_geterror(void) returns the value returned is a 32-bit number.
PR_GetErrorText
syntax #include <prerror.h> print32 pr_geterrortext(char *text); parameters the function has one parameter: text on output, the array pointed to contains the thread's current error text.
PR_GetErrorTextLength
syntax #include <prerror.h> print32 pr_geterrortextlength(void) returns if a zero is returned, no error text is currently set.
PR_GetFileInfo
syntax #include <prio.h> prstatus pr_getfileinfo( const char *fn, prfileinfo *info); parameters the function has the following parameters: fn the pathname of the file to get information about.
PR_GetFileInfo64
syntax #include <prio.h> prstatus pr_getfileinfo64( const char *fn, prfileinfo64 *info); parameters the function has the following parameters: fn the pathname of the file to get information about.
PR_GetHostByAddr
syntax #include <prnetdb.h> prstatus pr_gethostbyaddr( const prnetaddr *hostaddr, char *buf, printn bufsize, prhostent *hostentry); parameters the function has the following parameters: hostaddr a pointer to the ip address of host in question.
PR_GetHostByName
syntax #include <prnetdb.h> prstatus pr_gethostbyname( const char *hostname, char *buf, printn bufsize, prhostent *hostentry); parameters the function has the following parameters: hostname the character string defining the host name of interest.
PR_GetIdentitiesLayer
syntax #include <prio.h> prfiledesc* pr_getidentitieslayer( prfiledesc* stack, prdescidentity id); parameters the function has the following parameters: stack a pointer to a prfiledesc object that is a layer in a stack of layers.
PR_GetInheritedFileMap
syntax #include <prshma.h> nspr_api( prfilemap *) pr_getinheritedfilemap( const char *shmname ); parameter the function has the following parameter: shmname the name provided to pr_processattrsetinheritablefilemap.
PR_GetLayersIdentity
syntax #include <prio.h> prdescidentity pr_getlayersidentity(prfiledesc* fd); parameter the function has the following parameter: fd a pointer to a file descriptor.
PR_GetLibraryName
syntax #include <prlink.h> char* pr_getlibraryname ( const char *dir, const char *lib); parameters the function has these parameters: dir a null-terminated string representing the path name of the library, as returned by pr_getlibrarypath.
PR_GetLibraryPath
syntax #include <prlink.h> char* pr_getlibrarypath(void); parameters the function has no parameters.
PR_GetNameForIdentity
syntax #include <prio.h> const char* pr_getnameforidentity(prdescidentity ident); parameter the function has the following parameter: ident a layer's identity.
PR_GetOSError
syntax #include <prerror.h> print32 pr_getoserror(void) returns the value returned is a 32-bit signed number.
PR_GetOpenFileInfo
syntax #include <prio.h> prstatus pr_getopenfileinfo( prfiledesc *fd, prfileinfo *info); parameters the function has the following parameters: fd a pointer to a prfiledesc object for an open file.
PR_GetOpenFileInfo64
syntax #include <prio.h> prstatus pr_getopenfileinfo64( prfiledesc *fd, prfileinfo *info); parameters the function has the following parameters: fd a pointer to a prfiledesc object for an open file.
PR_GetPeerName
syntax #include <prio.h> prstatus pr_getpeername( prfiledesc *fd, prnetaddr *addr); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket.
PR_GetProtoByName
syntax #include <prnetdb.h> prstatus pr_getprotobyname( const char* protocolname, char* buffer, print32 bufsize, prprotoent* result); parameters the function has the following parameters: protocolname a pointer to the character string of the protocol's name.
PR_GetProtoByNumber
syntax #include <prnetdb.h> prstatus pr_getprotobynumber( print32 protocolnumber, char* buffer, print32 bufsize, prprotoent* result); parameters the function has the following parameters: protocolnumber the number assigned to the protocol.
PR_GetRandomNoise
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.
PR_GetSockName
syntax #include <prio.h> prstatus pr_getsockname( prfiledesc *fd, prnetaddr *addr); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing the socket.
PR_GetSocketOption
syntax #include <prio.h> prstatus pr_getsocketoption( prfiledesc *fd, prsocketoptiondata *data); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing the socket whose options are to be retrieved.
PR_GetSpecialFD
syntax #include <prio.h> prfiledesc* pr_getspecialfd(prspecialfd id); parameter the function has the following parameter: id a pointer to an enumerator of type prspecialfd, indicating the type of i/o stream desired: pr_standardinput, pr_standardoutput, or pr_standarderror.
PR_GetThreadPriority
syntax #include <prthread.h> prthreadpriority pr_getthreadpriority(prthread *thread); parameter pr_getthreadpriority has the following parameter: thread a valid identifier for the thread whose priority you want to know.
PR_GetThreadPrivate
syntax #include <prthread.h> void* pr_getthreadprivate(pruintn index); parameter pr_getthreadprivate has the following parameters: index the index into the per-thread private data table.
PR_GetThreadScope
syntax #include <prthread.h> prthreadscope pr_getthreadscope(void); returns a value of type prthreadscope indicating whether the thread is local or global.
PR_GetUniqueIdentity
syntax #include <prio.h> prdescidentity pr_getuniqueidentity(const char *layer_name); parameter the function has the following parameter: layer_name the string associated with the creation of a layer's identity.
PR INIT CLIST
syntax #include <prclist.h> pr_init_clist (prclist *listp); parameter listp a pointer to the anchor of the linked list.
PR_INIT_STATIC_CLIST
syntax #include <prclist.h> pr_init_static_clist (prclist *listp); parameter listp a pointer to the anchor of the linked list.
PR_INSERT_AFTER
syntax #include <prclist.h> pr_insert_after ( prclist *elemp1 prclist *elemp2); parameters elemp1 a pointer to the element to be inserted.
PR_INSERT_BEFORE
syntax #include <prclist.h> pr_insert_before ( prclist *elemp1 prclist *elemp2); parameters elemp1 a pointer to the element to be inserted.
PR_INSERT_LINK
syntax #include <prclist.h> pr_insert_link ( prclist *elemp, prclist *listp); parameters elemp a pointer to the element to be inserted.
PR_ImplodeTime
syntax #include <prtime.h> prtime pr_implodetime(const prexplodedtime *exploded); parameters the function has these parameters: exploded a pointer to the clock/calendar time to be converted.
PR_ImportFileMapFromString
syntax #include <prshma.h> nspr_api( prfilemap * ) pr_importfilemapfromstring( const char *fmstring ); parameter the function has the following parameter: fmstring a pointer to string created by pr_exportfilemapasstring.
PR ImportTCPSocket
syntax #include "private/pprio.h" prfiledesc* pr_importtcpsocket(prosfd osfd); parameters the function has the following parameters: osfd the native file descriptor for the tcp socket to import.
PR_Init
syntax #include <prinit.h> void pr_init( prthreadtype type, prthreadpriority priority, pruintn maxptds); parameters pr_init has the following parameters: type this parameter is ignored.
PR_Initialize
syntax #include <prinit.h> printn pr_initialize( prprimordialfn prmain, printn argc, char **argv, pruintn maxptds); parameters pr_initialize has the following parameters: prmain the function that becomes the primordial thread's root function.
PR_InitializeNetAddr
syntax #include <prnetdb.h> prstatus pr_initializenetaddr( prnetaddrvalue val, pruint16 port, prnetaddr *addr); parameters the function has the following parameters: val the value to be assigned to the ip address portion of the network address.
PR_Initialized
syntax #include <prinit.h> prbool pr_initialized(void); returns the function returns one of the following values: if pr_init has already been called, pr_true.
PR_Interrupt
syntax #include <prthread.h> prstatus pr_interrupt(prthread *thread); parameter pr_interrupt has the following parameter: thread the thread whose interrupt request you want to set.
PR_IntervalNow
syntax #include <prinrval.h> printervaltime pr_intervalnow(void); returns a printervaltime object.
PR_IntervalToMicroseconds
syntax #include <prinrval.h> pruint32 pr_intervaltomicroseconds(printervaltime ticks); parameter ticks the number of platform-dependent intervals to convert.
PR_IntervalToMilliseconds
syntax #include <prinrval.h> pruint32 pr_intervaltomilliseconds(printervaltime ticks); parameter ticks the number of platform-dependent intervals to convert.
PR_IntervalToSeconds
syntax #include <prinrval.h> pruint32 pr_intervaltoseconds(printervaltime ticks); parameter ticks the number of platform-dependent intervals to convert.
PR_JoinJob
syntax #include <prtpool.h> nspr_api(prstatus) pr_joinjob(prjob *job); parameter the function has the following parameter: job a pointer to a prjob structure returned by a pr_queuejob function representing the job to be cancelled.
PR_JoinThread
syntax #include <prthread.h> prstatus pr_jointhread(prthread *thread); parameter pr_jointhread has the following parameter: thread a valid identifier for the thread that is to be joined.
PR_JoinThreadPool
syntax #include <prtpool.h> nspr_api(prstatus) pr_jointhreadpool( prthreadpool *tpool ); parameter the function has the following parameter: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_LIST_HEAD
syntax #include <prclist.h> prclist *pr_list_head (prclist *listp); parameter listp a pointer to the linked list.
PR_LIST_TAIL
syntax #include <prclist.h> prclist *pr_list_tail (prclist *listp); parameter listp a pointer to the linked list.
PR_LOG
syntax #include <prlog.h> void pr_log ( prlogmoduleinfo *_module, prlogmodulelevel _level ...
PR_LOG_TEST
syntax #include <prlog.h> prbool pr_log_test ( prlogmoduleinfo *_module, prlogmodulelevel _level); parameters the macro has these parameters: _module a pointer to a log module structure.
PR_Listen
syntax #include <prio.h> prstatus pr_listen( prfiledesc *fd, printn backlog); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket that will be used to listen for new connections.
PR_LoadLibrary
syntax #include <prlink.h> prlibrary* pr_loadlibrary(const char *name); parameters the function has this parameter: name a platform-dependent character array that names the library to be loaded, as returned by pr_getlibraryname.
PR_LocalTimeParameters
syntax #include <prtime.h> prtimeparameters pr_localtimeparameters ( const prexplodedtime *gmt); parameter gmt a pointer to the clock/calendar time whose offsets are to be determined.
PR_Lock
syntax #include <prlock.h> void pr_lock(prlock *lock); parameter pr_lock has one parameter: lock a pointer to a lock object to be locked.
PR_LogFlush
syntax #include <prlog.h> void pr_logflush(void); parameters the function has no parameters.
PR_LogPrint
syntax #include <prlog.h> void pr_logprint(const char *fmt, ...); parameters the function has this parameter: fmt the string that is used as the formatting specification.
PR_MALLOC
syntax #include <prmem.h> void * pr_malloc(_bytes); parameter _bytes size of the requested memory block.
PR_MSEC_PER_SEC
syntax #include <prtime.h> #define pr_msec_per_sec 1000ul ...
PR_MemMap
syntax #include <prio.h> void* pr_memmap( prfilemap *fmap, print64 offset, pruint32 len); parameters the function has the following parameters: fmap a pointer to the file-mapping object representing the file to be memory-mapped.
PR_MicrosecondsToInterval
syntax #include <prinrval.h> printervaltime pr_microsecondstointerval(pruint32 milli); parameter the function has the following parameter: micro the number of microseconds to convert to interval form.
PR_MillisecondsToInterval
syntax #include <prinrval.h> printervaltime pr_millisecondstointerval(pruint32 milli); parameter the function has the following parameter: milli the number of milliseconds to convert to interval form.
PR_MkDir
syntax #include <prio.h> prstatus pr_mkdir( const char *name, printn mode); parameters the function has the following parameters: name the name of the directory to be created.
PR_NAME
syntax #include <prinit.h> #define pr_name "nspr" description nspr name.
PR_NETDB_BUF_SIZE
syntax #include <prnetdb.h> #if defined(aix) || defined(osf1) #define pr_netdb_buf_size sizeof(struct protoent_data) #else #define pr_netdb_buf_size 1024 #endif ...
PR_NEW
syntax #include <prmem.h> _type * pr_new(_struct); parameter _struct the name of a type.
PR_NEWZAP
syntax #include <prmem.h> _type * pr_newzap(_struct); parameter _struct the name of a type.
PR_NEXT_LINK
syntax #include <prclist.h> prclist *pr_next_link (prclist *elemp); parameter elemp a pointer to the element.
PR_NOT_REACHED
syntax #include <prlog.h> void pr_not_reached(const char *_reasonstr); parameters the macro has this parameter: reasonstr a string that describes why you should not have reached this statement.
PR_NSEC_PER_MSEC
syntax #include <prtime.h> #define pr_nsec_per_msec 1000000ul ...
PR_NSEC_PER_SEC
syntax #include <prtime.h> #define pr_nsec_per_sec 1000000000ul ...
PR_NetAddrToString
syntax #include <prnetdb.h> prstatus pr_netaddrtostring( const prnetaddr *addr, char *string, pruint32 size); parameters the function has the following parameters: addr a pointer to the network address to be converted.
PR_NewCondVar
syntax #include <prcvar.h> prcondvar* pr_newcondvar(prlock *lock); parameter pr_newcondvar has one parameter: lock the identity of the mutex that protects the monitored data, including this condition variable.
PR_NewLock
syntax #include <prlock.h> prlock* pr_newlock(void); returns the function returns one of the following values: if successful, a pointer to the new lock object.
PR_NewLogModule
syntax #include <prlog.h> prlogmoduleinfo* pr_newlogmodule(const char *name); parameters the function has this parameter: name the name to be assigned to the prlogmoduleinfo structure.
PR_NewMonitor
syntax #include <prmon.h> prmonitor* pr_newmonitor(void); returns the function returns one of the following values: if successful, a pointer to a prmonitor object.
PR_NewPollableEvent
syntax nspr_api(prfiledesc *) pr_newpollableevent( void); parameter none.
PR NewProcessAttr
syntax #include <prlink.h> prprocessattr *pr_newprocessattr(void); parameters the function has no parameters.
PR_NewTCPSocket
syntax #include <prio.h> prfiledesc* pr_newtcpsocket(void); returns the function returns one of the following values: upon successful completion, a pointer to the prfiledesc object created for the newly opened ipv4 tcp socket.
PR_NewThreadPrivateIndex
syntax #include <prthread.h> prstatus pr_newthreadprivateindex( pruintn *newindex, prthreadprivatedtor destructor); parameters pr_newthreadprivateindex has the following parameters: newindex on output, an index that is valid for all threads in the process.
PR_NewUDPSocket
syntax #include <prio.h> prfiledesc* pr_newudpsocket(void); returns the function returns one of the following values: upon successful completion, a pointer to the prfiledesc object created for the newly opened udp socket.
PR_NormalizeTime
syntax #include <prtime.h> void pr_normalizetime ( prexplodedtime *time, prtimeparamfn params); parameters the function has these parameters: time a pointer to a clock/calendar time in the prexplodedtime format.
PR_Notify
syntax #include <prmon.h> prstatus pr_notify(prmonitor *mon); parameters the function has the following parameter: mon a reference to an existing structure of type prmonitor.
PR_NotifyAll
syntax #include <prmon.h> prstatus pr_notifyall(prmonitor *mon); parameters the function has the following parameter: mon a reference to an existing structure of type prmonitor.
PR_NotifyAllCondVar
syntax #include <prcvar.h> prstatus pr_notifyallcondvar(prcondvar *cvar); returns the function returns one of the following values: if successful, pr_success.
PR_NotifyCondVar
syntax #include <prcvar.h> prstatus pr_notifycondvar(prcondvar *cvar); parameter pr_notifycondvar has one parameter: cvar the condition variable to notify.
PR_Now
syntax #include <prtime.h> prtime pr_now(void); parameters none.
PR_Open
syntax #include <prio.h> prfiledesc* pr_open( const char *name, printn flags, printn mode); parameters the function has the following parameters: name the pathname of the file to be opened.
PR_OpenAnonFileMap
creates or opens a named semaphore with the specified name syntax #include <prshma.h> nspr_api( prfilemap *) pr_openanonfilemap( const char *dirname, prsize size, prfilemapprotect prot ); parameters the function has the following parameters: dirname a pointer to a directory name that will contain the anonymous file.
PR_OpenDir
syntax #include <prio.h> prdir* pr_opendir(const char *name); parameter the function has the following parameter: name the pathname of the directory to be opened.
PR_OpenSemaphore
syntax #include <pripcsem.h> #define pr_sem_create 0x1 /* create if not exist */ #define pr_sem_excl 0x2 /* fail if already exists */ nspr_api(prsem *) pr_opensemaphore( const char *name, printn flags, printn mode, pruintn value ); parameters the function has the following parameters: name the name to be given the semaphore.
PR_OpenSharedMemory
syntax #include <prshm.h> nspr_api( prsharedmemory * ) pr_opensharedmemory( const char *name, prsize size, printn flags, printn mode ); /* define values for pr_opensharememory(...,create) */ #define pr_shm_create 0x1 /* create if not exist */ #define pr_shm_excl 0x2 /* fail if already exists */ parameters the function has the following parameters: name the name of the shared memory segment.
PR_OpenTCPSocket
syntax #include <prio.h> prfiledesc* pr_opentcpsocket(printn af); parameters the function has the following parameters: af the address family of the new tcp socket.
PR OpenUDPSocket
syntax #include <prio.h> prfiledesc* pr_openudpsocket(printn af); parameters the function has the following parameters: af the address family of the new udp socket.
PR_PREV_LINK
syntax #include <prclist.h> prclist *pr_prev_link (prclist *elemp); parameter elemp a pointer to the element.
PR_Poll
syntax #include <prio.h> print32 pr_poll( prpolldesc *pds, printn npds, printervaltime timeout); parameters the function has the following parameters: pds a pointer to the first element of an array of prpolldesc structures.
PR_PopIOLayer
syntax #include <prio.h> prfiledesc *pr_popiolayer( prfiledesc *stack, prdescidentity id); parameters the function has the following parameters: stack a pointer to a prfiledesc object representing the stack from which the specified layer is to be removed.
PR_PostSemaphore
syntax #include <pripcsem.h> nspr_api(prstatus) pr_postsemaphore(prsem *sem); parameter the function has the following parameter: sem a pointer to a prsem structure returned from a call to pr_opensemaphore.
PR_ProcessAttrSetInheritableFileMap
syntax #include <prshma.h> nspr_api(prstatus) pr_processattrsetinheritablefilemap( prprocessattr *attr, prfilemap *fm, const char *shmname ); parameters the function has the following parameters: attr pointer to a prprocessattr structure used to pass data to pr_createprocess.
PR_ProcessExit
syntax #include <prinit.h> void pr_processexit(printn status); parameter pr_processexit has one parameter: status the exit status code of the process.
PR_PushIOLayer
syntax #include <prio.h> prstatus pr_pushiolayer( prfiledesc *stack, prdescidentity id, prfiledesc *layer); parameters the function has the following parameters: stack a pointer to a prfiledesc object representing the stack.
PR_QueueJob
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob( prthreadpool *tpool, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Accept
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_accept( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Connect
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_connect( prthreadpool *tpool, prjobiodesc *iod, const prnetaddr *addr, prjobfn fn, void * arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Read
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_read( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Timer
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_timer( prthreadpool *tpool, printervaltime timeout, prjobfn fn, void * arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Write
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_write( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_Realloc
syntax #include <prmem.h> void *pr_realloc ( void *ptr, pruint32 size); parameters ptr a pointer to the existing memory block being resized.
PR_REMOVE_AND_INIT_LINK
syntax #include <prclist.h> pr_remove_and_init_link (prclist *elemp); parameter elemp a pointer to the element.
PR_REMOVE_LINK
syntax #include <prclist.h> pr_remove_link (prclist *elemp); parameter elemp a pointer to the element.
PR_Read
syntax #include <prio.h> print32 pr_read(prfiledesc *fd, void *buf, print32 amount); parameters the function has the following parameters: fd a pointer to a prfiledesc object for the file or socket.
PR_ReadDir
syntax #include <prio.h> prdirentry* pr_readdir( prdir *dir, prdirflags flags); parameters the function has the following parameters: dir a pointer to a prdir object that designates an open directory.
PR_Recv
syntax #include <prio.h> print32 pr_recv( prfiledesc *fd, void *buf, print32 amount, printn flags, printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket.
PR_RecvFrom
syntax #include <prio.h> print32 pr_recvfrom( prfiledesc *fd, void *buf, print32 amount, printn flags, prnetaddr *addr, printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket.
PR_Rename
syntax #include <prio.h> prstatus pr_rename( const char *from, const char *to); parameters the function has the following parameters: from the old name of the file to be renamed.
PR_RmDir
syntax #include <prio.h> prstatus pr_rmdir(const char *name); parameter the function has the following parameter: name the name of the directory to be removed.
PR_STATIC_ASSERT
syntax #include <prlog.h> pr_static_assert ( expression ); parameters the macro has this parameter: expression any valid expression which evaluates at compile-time to true or false.
PR_SecondsToInterval
syntax #include <prinrval.h> printervaltime pr_secondstointerval(pruint32 seconds); parameter the function has the following parameter: seconds the number of seconds to convert to interval form.
PR_Seek
syntax #include <prio.h> print32 pr_seek( prfiledesc *fd, print32 offset, prseekwhence whence); parameters the function has the following parameters: fd a pointer to a prfiledesc object.
PR_Seek64
syntax #include <prio.h> print64 pr_seek64( prfiledesc *fd, print64 offset, prseekwhence whence); parameters the function has the following parameters: fd a pointer to a prfiledesc object.
PR_Send
syntax #include <prio.h> print32 pr_send( prfiledesc *fd, const void *buf, print32 amount, printn flags, printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket.
PR_SendTo
syntax #include <prio.h> print32 pr_sendto( prfiledesc *fd, const void *buf, print32 amount, printn flags, const prnetaddr *addr, printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket.
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.
PR_SetError
syntax #include <prerror.h> void pr_seterror(prerrorcode errorcode, print32 oserr) parameters the function has these parameters: errorcode the nspr (platform-independent) translation of the error.
PR_SetErrorText
syntax #include <prerror.h> void pr_seterrortext(printn textlength, const char *text) parameters the function has these parameters: textlength the length of the text in the text.
PR_SetLogBuffering
syntax #include <prlog.h> void pr_setlogbuffering(printn buffer_size); parameters the function has this parameter: buffer_size the size of the buffer to be used for logging.
PR_SetLogFile
syntax #include <prlog.h> prbool pr_setlogfile(const char *name); parameters the function has this parameter: name the name of the log file.
PR_SetPollableEvent
syntax nspr_api(prstatus) pr_setpollableevent(prfiledesc *event); parameter the function has the following parameter: event pointer to a prfiledesc structure previously created via a call to pr_newpollableevent.
PR_SetSocketOption
syntax #include <prio.h> prstatus pr_setsocketoption( prfiledesc *fd, prsocketoptiondata *data); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing the socket whose options are to be set.
PR_SetThreadPriority
syntax #include <prthread.h> void pr_setthreadpriority( prthread *thread, prthreadpriority priority); parameters pr_setthreadpriority has the following parameters: thread a valid identifier for the thread whose priority you want to set.
PR_SetThreadPrivate
syntax #include <prthread.h> prstatus pr_setthreadprivate(pruintn index, void *priv); parameters pr_setthreadprivate has the following parameters: index an index into the per-thread private data table.
PR_Shutdown
syntax #include <prio.h> prstatus pr_shutdown( prfiledesc *fd, prshutdownhow how); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a connected socket.
PR_ShutdownThreadPool
syntax #include <prtpool.h> nspr_api(prstatus) pr_shutdownthreadpool( prthreadpool *tpool ); parameter the function has the following parameter: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_Sleep
syntax #include <prthread.h> prstatus pr_sleep(printervaltime ticks); parameter pr_sleep has the following parameter: ticks the number of ticks you want the thread to sleep for (see printervaltime).
PR_StringToNetAddr
syntax #include <prnetdb.h> prstatus pr_stringtonetaddr( const char *string, prnetaddr *addr); parameters the function has the following parameters: string the string to be converted.
PR_Sync
syntax #include <prio.h> prstatus pr_sync(prfiledesc *fd); parameter the function has the following parameter: fd pointer to a prfiledesc object representing a file.
PR_TicksPerSecond
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_TransmitFile
syntax #include <prio.h> print32 pr_transmitfile( prfiledesc *networksocket, prfiledesc *sourcefile, const void *headers, print32 hlen, prtransmitfileflags flags, printervaltime timeout); parameters the function has the following parameters: networksocket a pointer to a prfiledesc object representing the connected socket to send data over.
PR_USEC_PER_MSEC
syntax #include <prtime.h> #define pr_usec_per_msec 1000ul ...
PR_USEC_PER_SEC
syntax #include <prtime.h> #define pr_usec_per_sec 1000000ul ...
PR_UnblockClockInterrupts
syntax #include <prinit.h> void pr_unblockclockinterrupts(void); ...
PR_UnloadLibrary
syntax #include <prlink.h> prstatus pr_unloadlibrary(prlibrary *lib); parameters the function has this parameter: lib a reference previously returned from pr_loadlibrary.
PR_Unlock
syntax #include <prlock.h> prstatus pr_unlock(prlock *lock); parameter pr_unlock has one parameter: lock a pointer to a lock object to be released.
PR_Unmap
syntax #include <prio.h> prstatus pr_memunmap( void *addr, pruint32 len); parameters the function has the following parameters: addr the starting address of the memory region to be unmapped.
PR_VERSION
syntax #include <prinit.h> #define pr_version "2.1 yyyymmdd" description the format of the version string ismajorversion.minorversion builddate.
PR_VersionCheck
syntax #include <prinit.h> prbool pr_versioncheck(const char *importedversion); parameter pr_versioncheck has one parameter: importedversion the version of the shared library being imported.
PR_Wait
syntax #include <prmon.h> prstatus pr_wait( prmonitor *mon, printervaltime ticks); parameters the function has the following parameter: mon a reference to an existing structure of type prmonitor.
PR_WaitCondVar
syntax #include <prcvar.h> prstatus pr_waitcondvar( prcondvar *cvar, printervaltime timeout); parameters pr_waitcondvar has the following parameters: cvar the condition variable on which to wait.
PR_WaitForPollableEvent
syntax nspr_api(prstatus) pr_waitforpollableevent(prfiledesc *event); parameter the function has the following parameter: event pointer to a prfiledesc structure previously created via a call to pr_newpollableevent.
PR_WaitSemaphore
syntax #include <pripcsem.h> nspr_api(prstatus) pr_waitsemaphore(prsem *sem); parameter the function has the following parameter: sem a pointer to a prsem structure returned from a call to pr_opensemaphore.
PR_Write
syntax #include <prio.h> print32 pr_write( prfiledesc *fd, const void *buf, print32 amount); parameters the function has the following parameters: fd a pointer to the prfiledesc object for a file or socket.
PR_Writev
syntax #include <prio.h> print32 pr_writev( prfiledesc *fd, priovec *iov, print32 size, printervaltime timeout); #define pr_max_iovector_size 16 parameters the function has the following parameters: fd a pointer to a prfiledesc object for a socket.
PR_cnvtf
syntax #include <prdtoa.h> void pr_cnvtf ( char *buf, printn bufsz, printn prcsn, prfloat64 fval); parameters the function has these parameters: buf the address of the buffer in which to store the result.
PR_dtoa
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.
PR_htonl
syntax #include <prnetdb.h> pruint32 pr_htonl(pruint32 conversion); parameter the function has the following parameter: conversion the 32-bit unsigned integer, in host byte order, to be converted.
PR_htons
syntax #include <prnetdb.h> pruint16 pr_htons(pruint16 conversion); parameter the function has the following parameter: conversion the 16-bit unsigned integer, in host byte order, to be converted.
PR_ntohl
syntax #include <prnetdb.h> pruint32 pr_ntohl(pruint32 conversion); parameter the function has the following parameter: conversion the 32-bit unsigned integer, in network byte order, to be converted.
PR_ntohs
syntax #include <prnetdb.h> pruint16 pr_ntohs(pruint16 conversion); parameter the function has the following parameter: conversion the 16-bit unsigned integer, in network byte order, to be converted.
PR_strtod
syntax #include <prdtoa.h> prfloat64 pr_strtod(const char *s00, char **se); parameters the function has these parameters: s00 the input string to be scanned.
An overview of NSS Internals
when dealing with certificates (x.509), file formats such as pkcs#12 (certificates and keys), pkcs#7 (signed data), and message formats as cms, we should mention asn.1, which is a syntax for storing structured data in a very efficient (small sized) presentation.
Function_Name
syntax #include <headers.h> returntype function_name( paramtype paramname, paramtype paramname, ); parameters paramname sample: in pointer to a certcertdbhandle representing the certificate database to look in paramname sample: in pointer to an secitem whose type must be sidercertbuffer and whose data contains a der-encoded certificate description long description of this function, what it does, and why you would use it.
CERT_FindCertByDERCert
syntax #include <cert.h> certcertificate *cert_findcertbydercert( certcertdbhandle *handle, secitem *dercert ); parameters handle in pointer to a certcertdbhandle representing the certificate database to look in dercert in pointer to an secitem whose type must be sidercertbuffer and whose data contains a der-encoded certificate description this function looks in the ?nsscryptocontext?
CERT_FindCertByIssuerAndSN
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.
NSS 3.12.4 release notes
cert_decodecrlissuingdistributionpoint cert_findcrlissuingdistpointexten the old documentation of the expression matching syntax rules was incorrect, and the new corrected documentation is as follows for public nssutil functions (see portreq.h): port_regexpvalid port_regexpsearch port_regexpcasesearch these functions will match a string with a shell expression.
nss tech note1
the syntax of these templates is identical for both decoders, except where noted.
Overview of NSS
rsa standard that governs the syntax for certificate requests.
Python binding for NSS
and py3 when built for py2: text will be a unicode object binary data will be a str object ints will be python long object when built for py3: text will be a str object binary data will be a bytes object ints will be a python int object all pure python tests and examples have been ported to py3 syntax but should continue to run under py2.
FC_CancelFunction
name fc_cancelfunction - cancel a function running in parallel syntax ck_rv fc_cancelfunction( ck_session_handle hsession ); parameters hsession [in] session handle.
FC_CloseAllSessions
syntax ck_rv fc_closeallsessions( ck_slot_id slotid ); parameters slotid [in] the id of the token's slot.
FC_CloseSession
syntax ck_rv fc_closesession( ck_session_handle hsession ); parameters hsession [in] the session handle to be closed.
FC_CopyObject
syntax ck_rv fc_copyobject( ck_session_handle hsession, ck_object_handle hobject, ck_attribute_ptr ptemplate, ck_ulong uscount, ck_object_handle_ptr phnewobject ); parameters hsession [in] session handle.
FC_CreateObject
syntax ck_rv fc_createobject( ck_session_handle hsession, ck_attribute_ptr ptemplate, ck_ulong ulcount, ck_object_handle_ptr phobject ); parameters hsession [in] session handle.
FC_Decrypt
syntax ck_rv fc_decrypt( ck_session_handle hsession, ck_byte_ptr pencrypteddata, ck_ulong usencrypteddatalen, ck_byte_ptr pdata, ck_ulong_ptr pusdatalen ); parameters hsession [in] session handle.
FC_DecryptDigestUpdate
name fc_decryptdigestupdate - continue a multi-part decrypt and digest operation syntax ck_rv fc_decryptdigestupdate( ck_session_handle hsession, ck_byte_ptr pencryptedpart, ck_ulong ulencryptedpartlen, ck_byte_ptr ppart, ck_ulong_ptr pulpartlen ); parameters hsession [in] session handle.
FC_DecryptFinal
syntax ck_rv fc_decryptfinal( ck_session_handle hsession, ck_byte_ptr plastpart, ck_ulong_ptr puslastpartlen ); parameters hsession [in] session handle.
FC_DecryptInit
syntax ck_rv fc_decryptinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
FC_DecryptUpdate
syntax ck_rv fc_decryptupdate( ck_session_handle hsession, ck_byte_ptr pencryptedpart, ck_ulong usencryptedpartlen, ck_byte_ptr ppart, ck_ulong_ptr puspartlen ); parameters hsession [in] session handle.
FC_DecryptVerifyUpdate
name fc_decryptverifyupdate - continue a multi-part decrypt and verify operation syntax ck_rv fc_decryptverifyupdate( ck_session_handle hsession, ck_byte_ptr pencrypteddata, ck_ulong ulencrypteddatalen, ck_byte_ptr pdata, ck_ulong_ptr puldatalen ); parameters hsession [in] session handle.
FC_DeriveKey
name fc_derivekey - derive a key from a base key syntax ck_rv fc_derivekey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hbasekey, ck_attribute_ptr ptemplate, ck_ulong usattributecount, ck_object_handle_ptr phkey ); parameters hsession [in] session handle.
FC_DestroyObject
syntax ck_rv fc_destroyobject( ck_session_handle hsession, ck_object_handle hobject ); parameters hsession [in] session handle.
FC_Digest
syntax ck_rv fc_digest( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr pdigest, ck_ulong_ptr pusdigestlen ); parameters hsession [in] session handle.
FC_DigestEncryptUpdate
name fc_digestencryptupdate - continue a multi-part digest and encryption operation syntax ck_rv fc_digestencryptupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong ulpartlen, ck_byte_ptr pencryptedpart, ck_ulong_ptr pulencryptedpartlen ); parameters hsession [in] session handle.
FC_DigestFinal
syntax ck_rv fc_digestfinal( ck_session_handle hsession, ck_byte_ptr pdigest, ck_ulong_ptr puldigestlen ); parameters hsession [in] session handle.
FC_DigestInit
syntax ck_rv fc_digestinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism ); parameters hsession [in] session handle.
FC_DigestKey
syntax ck_rv fc_digestkey( ck_session_handle hsession, ck_object_handle hkey ); parameters hsession [in] session handle.
FC_DigestUpdate
syntax ck_rv fc_digestupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong uspartlen ); parameters hsession [in] session handle.
FC_Encrypt
syntax ck_rv fc_encrypt( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr pencrypteddata, ck_ulong_ptr pusencrypteddatalen ); parameters hsession [in] session handle.
FC_EncryptFinal
syntax ck_rv fc_encryptfinal( ck_session_handle hsession, ck_byte_ptr plastencryptedpart, ck_ulong_ptr puslastencryptedpartlen ); parameters hsession [in] session handle.
FC_EncryptInit
syntax ck_rv fc_encryptinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession[in] handle to the session.
FC_EncryptUpdate
syntax ck_rv fc_encryptupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong uspartlen, ck_byte_ptr pencryptedpart, ck_ulong_ptr pusencryptedpartlen ); parameters hsession [in] session handle.
FC_Finalize
syntax ck_rv fc_finalize (ck_void_ptr preserved); parameters fc_finalize has one parameter: preserved must be null description fc_finalize shuts down the nss cryptographic module in the fips mode of operation.
FC_FindObjects
name fc_findobjects - search for one or more objects syntax ck_rv fc_findobjects( ck_session_handle hsession, ck_object_handle_ptr phobject, ck_ulong usmaxobjectcount, ck_ulong_ptr pusobjectcount ); parameters hsession [in] session handle.
FC_FindObjectsFinal
syntax ck_rv fc_findobjectsfinal( ck_session_handle hsession, ); parameters hsession [in] session handle.
FC_FindObjectsInit
syntax ck_rv fc_findobjectsinit( ck_session_handle hsession, ck_attribute_ptr ptemplate, ck_ulong uscount ); parameters hsession [in] session handle.
FC_GenerateKey
name fc_generatekey - generate a new key syntax ck_rv fc_generatekey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_attribute_ptr ptemplate, ck_ulong ulcount, ck_object_handle_ptr phkey ); parameters hsession [in] session handle.
FC_GenerateKeyPair
name fc_generatekeypair - generate a new public/private key pair syntax ck_rv fc_generatekeypair( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_attribute_ptr ppublickeytemplate, ck_ulong uspublickeyattributecount, ck_attribute_ptr pprivatekeytemplate, ck_ulong usprivatekeyattributecount, ck_object_handle_ptr phpublickey, ck_object_handle_ptr phprivatekey ); parameters hsession [in] session handle.
FC_GenerateRandom
syntax ck_rv fc_generaterandom( ck_session_handle hsession, ck_byte_ptr prandomdata, ck_ulong ulrandomlen ); parameters hsession [in] session handle.
FC_GetAttributeValue
syntax ck_rv fc_getattributevalue( ck_session_handle hsession, ck_object_handle hobject, ck_attribute_ptr ptemplate, ck_ulong uscount ); parameters hsession [in] session handle.
FC_GetFunctionList
syntax ck_rv fc_getfunctionlist(ck_function_list_ptr *ppfunctionlist); parameters fc_getfunctionlist has one parameter: ppfunctionlist [output] the address of a variable that will receive a pointer to the list of function pointers.
FC_GetFunctionStatus
name fc_getfunctionstatus - get the status of a function running in parallel syntax ck_rv fc_getfunctionstatus( ck_session_handle hsession ); parameters hsession [in] session handle.
FC_GetInfo
syntax ck_rv fc_getinfo(ck_info_ptr pinfo); parameters fc_getinfo has one parameter: pinfo points to a ck_info structure description fc_getinfo returns general information about the pkcs #11 library.
FC_GetMechanismInfo
syntax ck_rv fc_getmechanisminfo( ck_slot_id slotid, ck_mechanism_type type, ck_mechanism_info_ptr pinfo ); parameters fc_getmechanisminfo takes three parameters: slotid [input] type [input] .
FC_GetMechanismList
syntax ck_rv fc_getmechanismlist( ck_slot_id slotid, ck_mechanism_type_ptr pmechanismlist, ck_ulong_ptr puscount ); parameters fc_getmechanismlist takes three parameters: slotid [input] pinfo [output] the address of a variable that will receive a pointer to the list of function pointers.
FC_GetObjectSize
syntax ck_rv fc_getobjectsize( ck_session_handle hsession, ck_object_handle hobject, ck_ulong_ptr pussize ); parameters hsession [in] session handle.
FC_GetOperationState
syntax ck_rv fc_getoperationstate( ck_session_handle hsession, ck_byte_ptr poperationstate, ck_ulong_ptr puloperationstatelen ); parameters hsession [in] handle of the open session.
FC_GetSessionInfo
syntax ck_rv fc_getsessioninfo( ck_session_handle hsession, ck_session_info_ptr pinfo ); parameters hsession [in] the open session handle.
FC_GetSlotInfo
syntax ck_rv fc_getslotinfo( ck_slot_id slotid, ck_slot_info_ptr pinfo ); parameters fc_getslotinfo takes two parameters: slotid [in] pinfo [out] the address of a ck_slot_info structure.
FC_GetSlotList
syntax ck_rv fc_getslotlist( ck_bbool tokenpresent, ck_slot_id_ptr pslotlist, ck_ulong_ptr pulcount ); parameters tokenpresent [in] if true only slots with a token present are included in the list, otherwise all slots are included.
FC_GetTokenInfo
syntax ck_rv fc_gettokeninfo(ck_slot_id slotid, ck_token_info_ptr pinfo); parameters fc_gettokeninfo has two parameters: slotid the id of the token's slot pinfo points to a ck_token_info structure description fc_gettokeninfo returns information about the token in the specified slot.
FC_InitPIN
syntax ck_rv fc_initpin( ck_session_handle hsession, ck_char_ptr ppin, ck_ulong ulpinlen ); parameters fc_initpin() takes three parameters: hsession[input] session handle.
FC_InitToken
syntax ck_rv fc_inittoken( ck_slot_id slotid, ck_char_ptr ppin, ck_ulong ulpinlen, ck_char_ptr plabel ); parameters fc_inittoken() has the following parameters: slotid the id of the token's slot ppin the password of the security officer (so) ulpinlen the length in bytes of the so password plabel points to the label of the token, which must be padded with spaces to 32 bytes and not be null-terminated description fc_inittoken() initializes a brand new token or re-initializes a token that was initialized before.
FC_Initialize
syntax ck_rv fc_initialize(ck_void_ptr pinitargs); parameters pinitargs points to a ck_c_initialize_args structure.
FC_Login
syntax ck_rv fc_login( ck_session_handle hsession, ck_user_type usertype, ck_char_ptr ppin, ck_ulong ulpinlen ); parameters fc_login() takes four parameters: hsession [in] a session handle usertype [in] the user type (cku_so or cku_user) ppin [in] a pointer that points to the user's pin ulpinlen [in] the length of the pin description fc_login() logs a user into a token.
FC_Logout
syntax ck_rv fc_logout( ck_session_handle hsession ); parameters hsession [in] session handle.
FC_OpenSession
syntax ck_rv fc_opensession( ck_slot_id slotid, ck_flags flags, ck_void_ptr papplication, ck_notify notify, ck_session_handle_ptr phsession ); parameters fc_opensession has the following parameters: slotid [in] the id of the token's slot.
FC_SeedRandom
syntax ck_rv fc_seedrandom( ck_session_handle hsession, ck_byte_ptr pseed, ck_ulong usseedlen ); parameters hsession [in] session handle.
FC_SetAttributeValue
syntax ck_rv fc_setattributevalue( ck_session_handle hsession, ck_object_handle hobject, ck_attribute_ptr ptemplate, ck_ulong uscount ); parameters hsession [in] session handle.
FC_SetOperationState
syntax ck_rv fc_setoperationstate( ck_session_handle hsession, ck_byte_ptr poperationstate, ck_ulong uloperationstatelen, ck_object_handle hencryptionkey, ck_object_handle hauthenticationkey ); parameters hsession [in] handle of the open session.
FC_SetPIN
syntax ck_rv fc_setpin( ck_session_handle hsession, ck_char_ptr poldpin, ck_ulong uloldlen, ck_char_ptr pnewpin, ck_ulong ulnewlen ); parameters fc_setpin takes five parameters: hsession [input] the session's handle poldpin [input] points to the old pin.
FC_Sign
syntax ck_rv fc_sign( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr psignature, ck_ulong_ptr pussignaturelen ); parameters hsession [in] session handle.
FC_SignEncryptUpdate
name fc_signencryptupdate - continue a multi-part signing and encryption operation syntax ck_rv fc_signencryptupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong ulpartlen, ck_byte_ptr pencryptedpart, ck_ulong_ptr pulencryptedpartlen ); parameters hsession [in] session handle.
FC_SignFinal
syntax ck_rv fc_signfinal( ck_session_handle hsession, ck_byte_ptr psignature, ck_ulong_ptr pussignaturelen ); parameters hsession [in] session handle.
FC_SignInit
syntax ck_rv fc_signinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
FC_SignRecover
syntax ck_rv fc_signrecover( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr psignature, ck_ulong_ptr pussignaturelen ); parameters hsession [in] session handle.
FC_SignRecoverInit
syntax ck_rv fc_signrecoverinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
FC_SignUpdate
syntax ck_rv fc_signupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong uspartlen ); parameters hsession [in] session handle.
FC_UnwrapKey
name fc_unwrapkey - unwrap a key syntax ck_rv fc_unwrapkey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hunwrappingkey, ck_byte_ptr pwrappedkey, ck_ulong uswrappedkeylen, ck_attribute_ptr ptemplate, ck_ulong usattributecount, ck_object_handle_ptr phkey ); parameters hsession [in] session handle.
FC_Verify
syntax ck_rv fc_verify( ck_session_handle hsession, ck_byte_ptr pdata, ck_ulong usdatalen, ck_byte_ptr psignature, ck_ulong ussignaturelen ); parameters hsession [in] session handle.
FC_VerifyFinal
syntax ck_rv fc_verifyfinal( ck_session_handle hsession, ck_byte_ptr psignature, ck_ulong ussignaturelen ); parameters hsession [in] session handle.
FC_VerifyInit
syntax ck_rv fc_verifyinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
FC_VerifyRecover
syntax ck_rv fc_verifyrecover( ck_session_handle hsession, ck_byte_ptr psignature, ck_ulong ussignaturelen, ck_byte_ptr pdata, ck_ulong_ptr pusdatalen ); parameters hsession [in] session handle.
FC_VerifyRecoverInit
syntax ck_rv fc_verifyrecoverinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
FC_VerifyUpdate
syntax ck_rv fc_verifyupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong uspartlen ); parameters hsession [in] session handle.
FC_WaitForSlotEvent
syntax ck_rv fc_waitforslotevent(ck_flags flags, ck_slot_id_ptr pslot ck_void_ptr preserved); parameters fc_waitforslotevent takes three parameters: [input] flags [input] pslot.
FC_WrapKey
name fc_wrapkey - wrap a key syntax ck_rv fc_wrapkey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hwrappingkey, ck_object_handle hkey, ck_byte_ptr pwrappedkey, ck_ulong_ptr puswrappedkeylen ); parameters hsession [in] session handle.
NSC_InitToken
syntax ck_rv nsc_inittoken( ck_slot_id slotid, ck_char_ptr ppin, ck_ulong ulpinlen, ck_char_ptr plabel ); parameters nsc_inittoken() has the following parameters: slotid the id of the token's slot ppin the password of the security officer (so) ulpinlen the length in bytes of the so password plabel points to the label of the token, which must be padded with spaces to 32 bytes and not be null-terminated description nsc_inittoken() initializes a brand new token or re-initializes a token that was initialized before.
NSC_Login
syntax ck_rv nsc_login( ck_session_handle hsession, ck_user_type usertype, ck_char_ptr ppin, ck_ulong ulpinlen ); parameters nsc_login() takes four parameters: hsession [in] a session handle usertype [in] the user type (cku_so or cku_user) ppin [in] a pointer that points to the user's pin ulpinlen [in] the length of the pin description nsc_login() logs a user into a token.
NSS_Initialize
syntax secstatus nss_initialize(const char *configdir, const char *certprefix, const char *keyprefix, const char *secmodname, pruint32 flags); parameters nss_initialize has five parameters: configdir [in] the directory where the certificate, key, and module databases live.
NSS tools : crlutil
crl generation script syntax crl generation script file has the following syntax: * line with comments should have # as a first symbol of a line * set "this update" or "next update" crl fields: update=yyyymmddhhmmssz nextupdate=yyyymmddhhmmssz field "next update" is optional.
NSS Tools certutil
syntax to run the certificate database tool, type the command certutil option [arguments ] where options and arguments are combinations of the options and arguments listed in the following section.
NSS Tools modutil
syntax to run the security module database tool, type the command modutil option [arguments] where option and arguments are combinations of the options and arguments listed in the following section.
NSS Tools pk12util
k12util -i p12file [-h tokenname] [-v] [common-options] or pk12util -o p12file -n certname [-c keycipher] [-c certcipher] [-m | --key_len keylen] [-n | --cert_key_len certkeylen] [common-options] or pk12util -l p12file [-h tokenname] [-r] [common-options] where [common-options] = [-d dir] [-p dbprefix] [-k slotpasswordfile | -k slotpassword] [-w p12filepasswordfile | -w p12filepassword] syntax to run the pkcs #12 tool, type ther command pk12util option [arguments] where option and arguments are combinations of the options and arguments listed in the following section.
NSS Tools ssltap
syntax to run the ssl debugging tool, type this command in a command shell: ssltap [-vhfsxl] [-p port] hostname:port options the command does not require any options other than hostname:port, but you normally use them to control the connection interception and output.
NSS tools : crlutil
MozillaProjectsNSStoolscrlutil
crl generation script syntax crl generation script file has the following syntax: * line with comments should have # as a first symbol of a line * set "this update" or "next update" crl fields: update=yyyymmddhhmmssz nextupdate=yyyymmddhhmmssz field "next update" is optional.
NSS tools : signtool
for more information about the syntax used with this file, see "tips and techniques".
Index
424 js_parsejson parse a string using the json syntax described in ecmascript 5 and return the corresponding value.
Exact Stack Rooting
therefore, we are forced to force you to initialize with constructor syntax.
JSAPI Cookbook
// javascript throw new error("failed to grow " + varietal + ": too many greenflies."); /* jsapi */ js_reporterror(cx, "failed to grow %s: too many greenflies.", varietal); return false; to internationalize your error messages, and to throw other error types, such as syntaxerror or typeerror, use js_reporterrornumber instead.
JSAPI User Guide
there might be a syntax error in a script.
BOOLEAN_TO_JSVAL
syntax jsval boolean_to_jsval(bool b); name type description b bool c integer value to be converted to a boolean jsval.
DOUBLE_TO_JSVAL
syntax jsval double_to_jsval(double d); name type description d double c double to convert to a jsval.
INT_FITS_IN_JSVAL
syntax #define int_fits_in_jsval(i) /* ...
INT_TO_JSVAL
syntax jsval int_to_jsval(int32_t i); name type description i any integer type c integer to convert to a jsval.
JS::Add*Root
syntax bool js::addvalueroot(jscontext *cx, js::heap<js::value> *vp); bool js::addstringroot(jscontext *cx, js::heap<jsstring *> *rp); bool js::addobjectroot(jscontext *cx, js::heap<jsobject *> *rp); bool js::addnamedvalueroot(jscontext *cx, js::heap<js::value> *vp, const char *name); bool js::addnamedvaluerootrt(jsruntime *rt, js::heap<js::value> *vp, ...
JS::AutoIdArray
syntax autoidarray(jscontext *cx, jsidarray *ida); name type description cx jscontext * the context in which to add the root.
JS::AutoSaveExceptionState
syntax js::autosaveexceptionstate(jscontext *cx); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS::AutoValueArray
syntax js::autovaluearray<n> vp(cx); name type description cx jscontext * the context in which to add the root.
JS::AutoVectorRooter
syntax js::autovectorrooter(jscontext* cx); methods method description size_t length() const returns the length of the array.
JS::BooleanValue
syntax js::value js::booleanvalue(bool boo) name type description boo bool c bool to convert.
JS::Call
syntax bool js::call(jscontext *cx, js::handleobject thisobj, js::handlefunction fun, const js::handlevaluearray &args, js::mutablehandlevalue rval); bool js::call(jscontext *cx, js::handleobject thisobj, const char *name, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js::call(jscontext *cx, js::handleobject thisobj, js::handlevalue fun, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js::call(jscontext *cx, js::handlevalue thisv, js::handlevalue fun, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js::call(jscontext *cx, js::handlevalue thisv, js::handleobject funobj, const js::handl...
JS::CallArgs
syntax js::callargs js::callargsfromvp(unsigned argc, js::value *vp); name type description args unsigned number of argument.
JS::CloneFunctionObject
syntax jsobject * js::clonefunctionobject(jscontext *cx, js::handleobject funobj); jsobject * js::clonefunctionobject(jscontext *cx, js::handleobject funobj, js::autoobjectvector &scopechain); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS::Compile
syntax // added in spidermonkey 45 bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, file *file, js::mutablehandlescript script); bool js::compile(js...
JS::CompileFunction
syntax bool js::compilefunction(jscontext *cx, js::autoobjectvector &scopechain, const js::readonlycompileoptions &options, const char *name, unsigned nargs, const char *const *argnames, const char16_t *chars, size_t length, js::mutablehandlefunction fun); bool js::compilefunction(jscontext *cx, js::autoobjectvector &scopechain, const js::readonlycompileoptions &options, const char *name, unsigned nargs, const char *const *argnames, js::sourcebufferholder &srcbuf, js::mutablehandlefunction fun); bool js::compilefunction(jscontext *cx, js::autoobjectvector &s...
JS::CompileOffThread
syntax bool js::cancompileoffthread(jscontext *cx, const js::readonlycompileoptions &options, size_t length); bool js::compileoffthread(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::offthreadcompilecallback callback, void *callbackdata); jsscript * js::finishoffthreadscript(jscontext *maybecx, jsruntime *rt, void *token); typedef void (*js::offthreadcompilecallback)(void *token, void *callbackdata); name type description cx / maybe jscontext * pointer to a js context from which to derive runtime information.
JS::Construct
syntax bool js::construct(jscontext *cx, js::handlevalue fun, const js::handlevaluearray& args, js::mutablehandlevalue rval); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS::CreateError
syntax // added in spidermonkey 45 bool js::createerror(jscontext *cx, jsexntype type, handleobject stack, handlestring filename, uint32_t linenumber, uint32_t columnnumber, jserrorreport *report, handlestring message, mutablehandlevalue rval); // obsolete since jsapi 39 bool js::createerror(jscontext *cx, jsexntype type, handlestring stack, handlestring filename, uint32_t linenumber, uint32_t columnnumber, jserrorreport *report, handlestring message, mutablehandlevalue rval); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS::CurrentGlobalOrNull
syntax jsobject * js::currentglobalornull(jscontext *cx); name type description cx jscontext * the context for which to return the global object.
JS::DeflateStringToUTF8Buffer
syntax // new in jsapi 52 void deflatestringtoutf8buffer(jsflatstring* src, mozilla::rangedptr<char> dst, size_t* dstlenp = nullptr, size_t* numcharsp = nullptr); // obsolete in spidermonkey 49 void deflatestringtoutf8buffer(jsflatstring* src, mozilla::rangedptr<char> dst); name type description src jsflatstring * the pointer to the string to deflate.
JS::DoubleNaNValue
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::DoubleValue
syntax js::value js::doublevalue(double dbl) name type description dbl double c double to convert.
JS::Evaluate
syntax // added in spidermonkey 45 bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, const char *filename, js::mutablehandlevalue rval); bo...
JS::FalseValue
syntax js::value js::falsevalue() description js::falsevalue creates a js::value that represents the javascript value false.
JS::Float32Value
syntax js::value js::float32value(float f) name type description f float c float to convert.
JS::GetDeflatedUTF8StringLength
syntax size_t getdeflatedutf8stringlength(jsflatstring* s); name type description s jsflatstring * the pointer to the string to calculate the length.
JS::GetFirstArgumentAsTypeHint
syntax bool js::getfirstargumentastypehint(jscontext* cx, callargs args, jstype *result); name type description cx jscontext * the context in which to define functions.
JS::GetSelfHostedFunction
syntax jsfunction* js::getselfhostedfunction(jscontext* cx, const char* selfhostedname, js::handle<jsid> id, unsigned nargs); name type description cx jscontext* the context from which to get the function.
JS::Handle
syntax bool somefunction(jscontext *cx, js::handle<t> var) { ...
JS::HandleValueArray
syntax js::handlevaluearray(const js::rootedvalue& value); js::handlevaluearray(const js::autovaluevector& values); js::handlevaluearray(const js::autovaluearray<n>& values); js::handlevaluearray(const js::callargs& args); js::handlevaluearray::frommarkedlocation(size_t len, const js::value *elements); js::handlevaluearray::subarray(const js::handlevaluearray& values, size_t startindex, size_t len); js::handlevaluearray::empty(); name type description value js::rootedvalue &amp; an element of newly created 1-length array.
JS::IdentifyStandardInstance
syntax jsprotokey js::identifystandardinstance(jsobject *obj); jsprotokey js::identifystandardprototype(jsobject *obj); jsprotokey js::identifystandardinstanceorprototype(jsobject *obj); jsprotokey js::identifystandardconstructor(jsobject *obj); // added in spidermonkey 38 name type description obj jsobject * pointer to the instance/prototype/constructor object to determine.
JS::Int32Value
syntax js::value js::int32value(int32_t i32) name type description i32 int32_t c integer to convert.
JS::IsCallable
syntax bool js::iscallable(jsobject *obj); bool js::isconstructor(jsobject *obj); name type description obj jsobject * pointer to the function.
JS::MutableHandle
syntax bool somefunction(jscontext *cx, js::mutablehandle<t> outparam) { ...
JS::NewFunctionFromSpec
syntax jsfunction* js::newfunctionfromspec(jscontext* cx, const jsfunctionspec* fs, handleid id); name type description cx jscontext * the context in which to define functions.
JS::NullHandleValue
syntax const js::handlevalue js::nullhandlevalue; description js::nullhandlevalue is a js::handlevalue constant that represents the javascript value null.
JS::NullValue
syntax js::value js::nullvalue(); description js::nullvalue creates a js::value that represents the javascript value null.
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.
JS::ObjectOrNullValue
syntax js::value js::objectornullvalue(jsobject* obj) name type description str jsobject* a pointer to a jsobject or null to convert.
JS::ObjectValue
syntax js::value js::objectvalue(jsobject& obj) name type description str jsobject&amp; a reference to a jsobject to convert.
JS::OrdinaryToPrimitive
syntax bool js::ordinarytoprimitive(jscontext *cx, js::handleobject obj, jstype type, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to perform the conversion.
JS::PersistentRooted
syntax js::persistentrooted<t> var; // added in spidermonkey 38 js::persistentrooted<t> var(cx); js::persistentrooted<t> var(cx, initial); js::persistentrooted<t> var(rt); js::persistentrooted<t> var(rt, initial); name type description cx jscontext * the context to get the runtime in which to add the root rt jsruntime * the runtime in which to add the root.
JS::PropertySpecNameEqualsId
syntax bool js::propertyspecnameequalsid(const char *name, js::handleid id); name type description name const char * jspropertyspec::name or jsfunctionspec::name.
JS::PropertySpecNameIsSymbol
syntax bool js::propertyspecnameissymbol(const char *name); name type description name const char * the pointer of the name, actually the uintptr_t type, and not a pointer to any string.
JS::PropertySpecNameToPermanentId
syntax bool js::propertyspecnametopermanentid(jscontext *cx, const char *name, jsid *idp); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS::ProtoKeyToId
syntax void js::protokeytoid(jscontext *cx, jsprotokey key, js::mutablehandleid idp); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS::Remove*Root
syntax void removevalueroot(jscontext *cx, js::heap<js::value> *vp); void removestringroot(jscontext *cx, js::heap<jsstring *> *rp); void removeobjectroot(jscontext *cx, js::heap<jsobject *> *rp); void removescriptroot(jscontext *cx, js::heap<jsscript *> *rp); void removevaluerootrt(jsruntime *rt, js::heap<js::value> *vp); void removestringrootrt(jsruntime *rt, js::heap<jsstring *> *rp); void rem...
JS::Rooted
syntax js::rooted<t> var(cx); js::rooted<t> var(cx, initial); js::rooted<t> var(rt); js::rooted<t> var(rt, initial); name type description cx jscontext * the context in which to add the root.
JS::StringValue
syntax js::value js::stringvalue(jsstring* str) name type description str jsstring* a pointer to a jsstring to convert.
JS::SymbolValue
syntax js::value js::symbolvalue(js::symbol* sym) name type description sym js::symbol* a pointer to a js::symbol to convert.
JS::ToBoolean
syntax bool js::toboolean(js::handlevalue v) name type description v js::handlevalue the value to convert.
JS::ToInt32
syntax bool js::toint32(jscontext *cx, js::handlevalue v, int32_t *out); name type description cx jscontext * the context in which to perform the conversion.
JS::ToInt64
syntax bool js::toint64(jscontext *cx, js::handlevalue v, int64_t *out); name type description cx jscontext * the context in which to perform the conversion.
JS::ToNumber
syntax bool js::tonumber(jscontext *cx, js::handlevalue v, double *out); name type description cx jscontext * the context in which to perform the conversion.
JS::ToPrimitive
syntax bool js::toprimitive(jscontext *cx, js::handleobject obj, jstype hint, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to perform the conversion.
JS::ToString
syntax #include "js/conversions.h" // as of spidermonkey 38; previously in jsapi.h jsstring* js::tostring(jscontext *cx, js::handlevalue v) name type description cx jscontext * the context in which to perform the conversion.
JS::ToUint16
syntax bool js::touint16(jscontext *cx, js::handlevalue v, uint16_t *out); name type description cx jscontext * the context in which to perform the conversion.
JS::ToUint32
syntax bool js::touint32(jscontext *cx, js::handlevalue v, int32_t *out); name type description cx jscontext * the context in which to perform the conversion.
JS::ToUint64
syntax bool js::touint64(jscontext *cx, js::handlevalue v, uint64_t *out); name type description cx jscontext * the context in which to perform the conversion.
JS::TrueHandleValue
syntax const js::handlevalue js::truehandlevalue; const js::handlevalue js::falsehandlevalue; description js::truehandlevalue and js::falsehandlevalue are js::handlevalue constants that represent the javascript values true and false.
JS::TrueValue
syntax js::value js::truevalue() description js::truevalue creates a js::value that represents the javascript value true.
JS::UndefinedHandleValue
syntax const js::handlevalue js::undefinedhandlevalue; description js::undefinedhandlevalue is a js::handlevalue constant that represents the javascript value undefined.
JS::UndefinedValue
syntax js::value js::undefinedvalue(); description js::undefinedvalue creates a js::value that represents the javascript value undefined.
JSAutoByteString
syntax jsautobytestring str; jsautobytestring(jscontext *cx, jsstring *str); name type description cx jscontext * the context in which to add the root.
JSAutoCompartment
syntax jsautocompartment(jscontext *cx, jsobject *target); jsautocompartment(jscontext *cx, jsscript *target); name type description cx jscontext * the context on which a cross-compartment call is needed.
JSCheckAccessOp
(it is also the type of the callback set by js_setcheckobjectaccesscallback.) syntax typedef jsbool (* jscheckaccessop)(jscontext *cx, jsobject *obj, jsval id, jsaccessmode mode, jsval *vp); name type description cx jscontext * the js context in which the property access attempt is occurring.
JSClass
syntax struct jsclass { const char *name; uint32_t flags; /* optional since spidermonkey 37 */ jspropertyop addproperty; jsdeletepropertyop delproperty; jspropertyop getproperty; jsstrictpropertyop setproperty; jsenumerateop enumerate; jsresolveop resolve; jsconvertop convert; /* obsolete since spidermonkey 44 */ /* optional since spidermonkey 25 */ jsfinalizeop finalize; /* optional */ jsclassinternal reserved0; /* obsolete since spidermonkey 13 */ ...
JSConstDoubleSpec
syntax template<typename t> struct jsconstscalarspec { const char *name; t val; /* uint8_t flags; // obsolete from jsapi 35 uint8_t spare[3]; // obsolete from jsapi 35 */ }; typedef jsconstscalarspec<double> jsconstdoublespec; typedef jsconstscalarspec<int32_t> jsconstintegerspec; // added in spidermonkey 38 name type description val double or int32_t value for the double or integer.
JSConvertOp
syntax typedef bool (* jsconvertop)(jscontext *cx, js::handleobject obj, jstype type, js::mutablehandlevalue vp); name type description cx jscontext * the context in which the convert is taking place.
JSDeletePropertyOp
syntax typedef bool (* jsdeletepropertyop)(jscontext *cx, js::handleobject obj, js::handleid id, bool *succeeded); name type description cx jscontext * the context in which the property access is taking place.
JSEnumerateOp
syntax typedef bool (* jsenumerateop)(jscontext *cx, js::handleobject obj); name type description cx jscontext * pointer to the js context in which the enumeration is taking place.
JSErrorFormatString
syntax typedef struct jserrorformatstring { const char *format; uint16_t argcount; int16_t exntype; } jserrorformatstring; name type description format const char * the error format string in ascii.
JSExceptionState
syntax struct jsexceptionstate; description a jsexceptionstate object is returned by the js_saveexceptionstate function, and is passed to functions js_restoreexceptionstate and js_dropexceptionstate.
JSExnType
(lower bound) jsexn_err error jsexn_internalerr internalerror jsexn_evalerr evalerror jsexn_rangeerr rangeerror jsexn_referenceerr referenceerror jsexn_syntaxerr syntaxerror jsexn_typeerr typeerror jsexn_urierr urierror jsexn_limit (upper bound) description these types are part of a jserrorformatstring structure.
JSExtendedClass.outerObject
callback syntax typedef jsobject * (*jsobjectop)(jscontext *cx, jsobject *obj); name type description cx jscontext * a context.
JSExtendedClass
syntax struct jsextendedclass { jsclass base; jsequalityop equality; jsobjectop outerobject; jsobjectop innerobject; jsiteratorop iteratorobject;// added in spidermonkey 1.8 jsobjectop wrappedobject; // added in spidermonkey 1.8 ...and additional reserved fields.
JSExtendedClass.wrappedObject
syntax typedef jsobject * (*jsobjectop)(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which the object is being unwrapped.
JSFUN_BOUND_METHOD
syntax jsfun_bound_method description this macro exists only for backward compatibility with existing applications.
JSFUN_GLOBAL_PARENT
syntax jsfun_global_parent see also jsfun_bound_method ...
JSFastNative
syntax typedef jsbool (*jsfastnative)(jscontext *cx, unsigned int argc, jsval *vp); name type description cx jscontext * the context in which the fast native is being called.
JSFinalizeOp
syntax typedef void (* jsfinalizeop)(jsfreeop *fop, jsobject *obj); name type description cx jscontext * the js context in which garbage collection is taking place.
JSFreeOp
syntax jsfreeop(jsruntime *rt); name type description rt jsruntime * a runtime to store in this structure.
JSFunctionSpec
syntax struct jsfunctionspec { const char *name; jsnativewrapper call; uint16_t nargs; uint16_t flags; const char *selfhostedname; }; typedef struct jsnativewrapper { jsnative op; const jsjitinfo *info; } jsnativewrapper; name type description name const char * the function's name.
JSGetObjectOps
jsgetobjectops is the type for jsclass.getobjectops callback syntax typedef jsobjectops * (* jsgetobjectops)(jscontext *cx, jsclass *clasp); name type description cx jscontext * the js context in which the new object is being created.
JSHasInstanceOp
syntax typedef bool (* jshasinstanceop)(jscontext *cx, js::handleobject obj, js::mutablehandlevalue vp, bool *bp); name type description cx jscontext * the js context in which the type check is occurring.
JSID_EMPTY
syntax const jsid jsid_empty; const js::handleid jsid_emptyhandle; // added in spidermonkey 31 description jsid_empty is an internal jsid value which is used in type inference code.
JSID_IS_EMPTY
syntax bool jsid_is_empty(jsid id); name type description id jsid the property identifier to test.
JSID_IS_GCTHING
syntax bool jsid_is_gcthing(jsid id); js::gccellptr jsid_to_gcthing(jsid id); name type description id jsid the property identifier to test or convert.
JSID_IS_INT
syntax bool jsid_is_int(jsid id); int32_t jsid_to_int(jsid id); bool int_fits_in_jsid(int32_t i); jsid int_to_jsid(int32_t i); name type description id jsid the property identifier to test or convert.
JSID_IS_STRING
syntax bool jsid_is_string(jsid id); jsstring * jsid_to_string(jsid id); jsid interned_string_to_jsid(jscontext *cx, jsstring *str); // added in spidermonkey 38 jsflatstring * jsid_to_flat_string(jsid id); // added in spidermonkey 17 name type description cx jscontext * pointer to a js context from which to derive runtime information.
JSID_IS_SYMBOL
syntax bool jsid_is_symbol(jsid id); js::symbol * jsid_to_symbol(jsid id); jsid symbol_to_jsid(js::symbol *sym); name type description id jsid the property identifier to test or convert.
JSID_IS_VOID
syntax bool jsid_is_void(jsid id); name type description id jsid the property identifier to test.
JSID_IS_ZERO
syntax bool jsid_is_zero(jsid id); name type description id jsid the property identifier to test.
JSID_VOID
syntax const jsid jsid_void; const js::handleid jsid_voidhandle; // added in spidermonkey 31 description jsid_void does not occur in js scripts but may be used to indicate the absence of a valid jsid.
JSIteratorOp
syntax typedef jsobject * (*jsiteratorop)(jscontext *cx, jsobject *obj, jsbool keysonly); name type description cx jscontext * pointer to the js context in which the iterator creation should take place.
JSMarkOp
syntax typedef uint32 (* jsmarkop)(jscontext *cx, jsobject *obj, void *arg); name type description cx jscontext * the js context in which the mark phase of garbage collection is occurring.
JSNative
syntax typedef bool (* jsnative)(jscontext *cx, unsigned argc, js::value *vp); name type description cx jscontext * the context in which the native function is being called.
JSNewEnumerateOp
syntax typedef bool (* jsnewenumerateop)(jscontext *cx, js::handleobject obj, js::autoidvector &properties); // added in spidermonkeysidebar 38 typedef bool (* jsnewenumerateop)(jscontext *cx, js::handleobject obj, jsiterateop enum_op, js::mutablehandlevalue statep, js::mutablehandleid idp); // obsolete since jsapi 37 name type description cx jscontext * the context in which the enumeration is taking place.
JSNewResolveOp
syntax typedef bool (* jsnewresolveop)(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandleobject objp); name type description cx jscontext * pointer to the js context in which the property access is taking place.
JSObjectOps.defaultValue
syntax typedef jsbool (*jsconvertop)(jscontext *cx, jsobject *obj, jstype type, jsval *vp); name type description cx jscontext * pointer to the js context in which the conversion is needed.
JSObjectOps.defineProperty
syntax jsbool (*jsdefinepropop)(jscontext *cx, jsobject *obj, jsid id, jsval value, jspropertyop getter, jspropertyop setter, unsigned int attrs); name type description cx jscontext * pointer to the js context in which the property is being defined.
JSObjectOps.destroyObjectMap
syntax typedef void (*jsobjectmapop)(jscontext *cx, jsobjectmap *map); name type description cx jscontext * pointer to the js context in which garbage collection is happening.
JSObjectOps.dropProperty
syntax typedef void (*jspropertyrefop)(jscontext *cx, jsobject *obj, jsproperty *prop); name type description cx jscontext * a context that was the cx argument to an earlier call to jsobjectops.lookupproperty that found a property.
JSObjectOps.getAttributes
syntax typedef jsbool (*jsattributesop)(jscontext *cx, jsobject *obj, jsid id, jsproperty *prop, unsigned int *attrsp); name type description cx jscontext * pointer to the js context in which the property access is happening.
JSObjectOps.getProperty
syntax typedef jsbool (*jspropertyidop)( jscontext *cx, jsobject *obj, jsid id, jsval *vp); name type description cx jscontext * pointer to the js context in which the property access is happening.
JSObjectOps.getRequiredSlot
syntax typedef jsval (*jsgetrequiredslotop)(jscontext *cx, jsobject *obj, uint32 slot); typedef jsbool (*jssetrequiredslotop)(jscontext *cx, jsobject *obj, uint32 slot, jsval v); name type description cx jscontext * the js context in which we access the slot.
JSObjectOps.lookupProperty
syntax typedef jsbool (*jslookuppropop)(jscontext *cx, jsobject *obj, jsid id, jsobject **objp, jsproperty **propp); name type description cx jscontext * pointer to the js context in which the property lookup is happening.
JSObjectOps.newObjectMap
syntax typedef jsobjectmap * (*jsnewobjectmapop)(jscontext *cx, jsrefcount nrefs, jsobjectops *ops, jsclass *clasp, jsobject *obj); name type description cx jscontext * pointer to the js context in which the new object is being created.
JSObjectOps.setProto
syntax typedef jsbool (*jssetobjectslotop)(jscontext *cx, jsobject *obj, uint32 slot, jsobject *pobj); name type description cx jscontext * pointer to the js context in which the object's prototype or parent is being modified.
JSObjectPrincipalsFinder
callback syntax typedef jsprincipals * (* jsobjectprincipalsfinder)(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to find principals.
JSPRINCIPALS_HOLD
syntax jsprincipals_hold(cx, principals) jsprincipals_drop(cx, principals) name type description cx jscontext * a context.
JSPrincipalsTranscoder
callback syntax typedef jsbool (*jsprincipalstranscoder)(jsxdrstate *xdr, jsprincipals **principalsp); name type description xdr jsxdrstate * the xdr reader/writer.
JSProperty
syntax struct jsproperty { jsid id; }; description jsproperty is the abstract base class of all object properties.
JSPropertySpec
syntax struct jspropertyspec { struct selfhostedwrapper { void *unused; const char *funname; }; const char *name; int8 tinyid; // obsolete since jsapi 31 uint8_t flags; union { jsnativewrapper native; selfhostedwrapper selfhosted; } getter; union { jsnativewrapper native; selfhostedwrapper selfhosted; } setter; /* obsolete since jsapi 29 */ /* added in jsapi 28 */ const char *selfhostedgetter; const char *selfhostedsetter; }; name type description name const char * name to assign the propert...
JSProtoKey
error mxr search for jsproto_error jsproto_internalerror internalerror mxr search for jsproto_internalerror jsproto_evalerror evalerror mxr search for jsproto_evalerror jsproto_rangeerror rangeerror mxr search for jsproto_rangeerror jsproto_referenceerror referenceerror mxr search for jsproto_referenceerror jsproto_syntaxerror syntaxerror mxr search for jsproto_syntaxerror jsproto_typeerror typeerror mxr search for jsproto_typeerror jsproto_urierror urierror mxr search for jsproto_urierror jsproto_iterator iterator mxr search for jsproto_iterator jsproto_stopiteration stopiteration mxr search for jsproto_stopiteration jsproto_arra...
JSReserveSlotsOp
syntax typedef uint32 (* jsreserveslotsop)(jscontext *cx, jsobject *obj); name type description cx jscontext * the js context in which the new object is being created.
JSResolveOp
syntax typedef bool (* jsresolveop)(jscontext *cx, js::handleobject obj, js::handleid id, bool *resolvedp); // added in jsapi 36 typedef bool (* jsresolveop)(jscontext *cx, js::handleobject obj, js::handleid id); // obsolete since jsapi 36 name type description cx jscontext * pointer to the js context in which the property access is taking place.
JSSecurityCallbacks.contentSecurityPolicyAllows
(it is also the type of the callback set by js_setcheckobjectaccesscallback.) syntax typedef jsbool (*jscspevalchecker)(jscontext *cx); name type description cx jscontext * the js context in which the property access attempt is occurring.
JSStringFinalizer
syntax struct jsstringfinalizer { void (*finalize)(const jsstringfinalizer *fin, char16_t *chars); }; name type description fin jsstringfinalizer the finalizer itself.
JSTraceOp
syntax typedef void (* jstraceop)(jstracer *trc, jsobject *obj); name type description trc jstracer * the tracer visiting obj.
JSVAL_IS_BOOLEAN
syntax jsval_is_boolean(v) description jsval_is_boolean(v) is true if the given javascript value, v, is a boolean value (that is, it is either jsval_true or jsval_false).
JSVAL_IS_DOUBLE
syntax jsval_is_double(v) description jsval_is_double(v) is true if v is a number represented in memory as a jsdouble.
JSVAL_IS_GCTHING
syntax jsval_is_gcthing(v) description jsval_is_gcthing(v) is true if the jsval v is either jsval_null or a reference to a value that is subject to garbage collection.
JSVAL_IS_INT
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.
JSVAL_IS_NULL
syntax jsval_is_null(v) description jsval_is_null(v) is true if v is jsval_null, which is the javascript null value.
JSVAL_IS_NUMBER
syntax jsval_is_number(v) description jsval_is_number(v) is true if v is a javascript number.
JSVAL_IS_OBJECT
syntax jsbool jsval_is_object(jsval v); description jsval_is_object(v) returns true if v is either an object or jsval_null.
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.
JSVAL_IS_STRING
syntax jsval_is_string(v) description jsval_is_string(v) is true if v is a string.
JSVAL_IS_VOID
syntax jsval_is_void(v) description jsval_is_void(v) is true if v is jsval_void, which represents the javascript value undefined.
JSVAL_LOCK
syntax jsval_lock(cx,v) description jsval_lock is a deprecated feature that is supported only for backward compatibility with existing applications.
JSVAL_NULL
syntax jsval_null description jsval_null is a jsval constant that represents the javascript value null.
JSVAL_ONE
syntax jsval_one description jsval_one is equivalent to int_to_jsval(1).
JSVAL_TO_BOOLEAN
syntax jsbool jsval_to_boolean(jsval v); description jsval_to_boolean casts the value v to a c integer, either 0 or 1.
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.
JSVAL_TO_GCTHING
syntax jsval_to_gcthing(v) description jsval_to_gcthing casts a jsval, v, to a raw pointer.
JSVAL_TO_INT
syntax jsval_to_int(v) description jsval_to_int converts a specified integer jsval, v, to the corresponding c integer value.
JSVAL_TO_OBJECT
syntax jsobject * jsval_to_object(jsval v); description jsval_to_object casts the argument, v, to type jsobject *.
JSVAL_TO_STRING
syntax jsstring * jsval_to_string(jsval v); description jsval_to_string casts the argument, v, to type jsstring *.
JSVAL_TRUE
syntax jsval_true jsval_false description jsval_true and jsval_false are jsval constants that represent the javascript boolean values, true and false.
JSVAL_UNLOCK
syntax jsval_unlock(cx,v) description jsval_unlock is a deprecated feature that is supported only for backward compatibility with existing applications.
JSVAL_VOID
syntax jsval_void description jsval_void is a jsval constant that represents the javascript value undefined.
JSVAL_ZERO
syntax jsval_zero description jsval_zero is equivalent to int_to_jsval(0).
JSXDRObjectOp
syntax typedef jsbool (* jsxdrobjectop)(jsxdrstate *xdr, jsobject **objp); name type description xdr jsxdrstate * the xdr reader or writer.
JS_ASSERT_STRING_IS_FLAT
syntax static moz_always_inline jsflatstring * js_assert_string_is_flat(jsstring *str) { moz_assert(js_stringisflat(str)); return (jsflatstring *)str; } name type description str jsstring * string to examine.
JS_Add*Root
syntax jsbool js_addvalueroot(jscontext *cx, jsval *vp); jsbool js_addstringroot(jscontext *cx, jsstring **spp); jsbool js_addobjectroot(jscontext *cx, jsobject **opp); jsbool js_addgcthingroot(jscontext *cx, void **rp); jsbool js_addnamedvalueroot(jscontext *cx, jsval *vp, const char *name); jsbool js_addnamedstringroot(jscontext *cx, jsstring **spp, const char *name); jsbool js_addnamedobjectroot(jscontext *cx, js...
JS_AliasElement
syntax jsbool js_aliaselement(jscontext *cx, jsobject *obj, const char *name, jsint alias); name type description cx jscontext * the context in which to create the alias.
JS_AliasProperty
syntax jsbool js_aliasproperty(jscontext *cx, jsobject *obj, const char *name, const char *alias); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_AlreadyHasOwnProperty
syntax boo js_alreadyhasownproperty(jscontext *cx, js::handleobject obj, const char *name, bool *foundp); boo js_alreadyhasownucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, bool *foundp); boo js_alreadyhasownpropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, bool *foundp); // added in spidermonkey 1.8.1 boo js_alreadyhasownelement(jscontext *cx, js::handleobject obj, uint32_t index, bool *foundp); name type description cx jscontext * pointer to a js context.
JS_BeginRequest
syntax void js_beginrequest(jscontext *cx); void js_endrequest(jscontext *cx); name type description cx jscontext * the context in which the calling thread intends to call jsapi functions.
JS_BindCallable
syntax jsobject* js_bindcallable(jscontext *cx, js::handle<jsobject*> callable, js::handle<jsobject*> newthis); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_BufferIsCompilableUnit
syntax bool js_bufferiscompilableunit(jscontext *cx, js::handle<jsobject*> obj, const char *utf8, size_t length); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_CStringsAreUTF8
syntax jsbool js_cstringsareutf8(void); void js_setcstringsareutf8(void); // added in spidermonkey 1.8 description by default, all c/c++ strings passed into the jsapi are treated as iso/iec 8859-1, also known as iso-latin-1.
JS_CallFunction
syntax /* added in spidermonkey 31 */ bool js_callfunction(jscontext *cx, js::handleobject obj, js::handlefunction fun, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js_callfunctionname(jscontext *cx, js::handleobject obj, const char *name, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js_callfunctionvalue(jscontext *cx, js::handleobject obj, js::handlevalue fval, const js::handlevaluearray& args, js::mutablehandlevalue rval); /* obsolete since jsapi 30 */ bool js_callfunction(jscontext *cx, jsobject *obj, jsfunction *fun, unsigned argc, jsval *argv, jsval *rval); bool js_callfunctionname(jscontext *cx, jsobject *obj, const ...
JS_CheckAccess
syntax jsbool js_checkaccess(jscontext *cx, jsobject *obj, jsid id, jsaccessmode mode, jsval *vp, unsigned int *attrsp); name type description cx jscontext * the context in which to perform the access check.
JS_CheckForInterrupt
syntax bool js_checkforinterrupt(jscontext* cx); name type description cx </code>jscontext *<code> the context.
JS_ClearContextThread
syntax jsword js_clearcontextthread(jscontext *cx); jsword js_setcontextthread(jscontext *cx); name type description cx jscontext * the context to transfer from one thread to another.
JS_ClearDateCaches
syntax void js_cleardatecaches(jscontext *cx); name type description cx jscontext * pointer to a javascript context from which to derive runtime information.
JS_ClearNewbornRoots
syntax void js_clearnewbornroots(jscontext *cx); name type description cx jscontext * the context to clear.
JS_ClearNonGlobalObject
syntax void js_clearnonglobalobject(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to clear the object.
JS_ClearPendingException
syntax void js_clearpendingexception(jscontext *cx); name type description cx jscontext * the context in which the exception was thrown.
JS_ClearRegExpStatics
syntax bool js_clearregexpstatics(jscontext *cx, handleobject obj); name type description cx jscontext * the context.
JS_ClearScope
syntax void js_clearscope(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to clear the object.
JS_CloneFunctionObject
syntax jsobject * js_clonefunctionobject(jscontext *cx, jsobject *funobj, jsobject *parent); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_CompareStrings
syntax bool js_comparestrings(jscontext *cx, jsstring *str1, jsstring *str2, int32_t *result); name type description cx jscontext * the context to which both strings must belong.
JS_CompileFileHandleForPrincipals
syntax jsobject * js_compilefilehandleforprincipals(jscontext *cx, jsobject *obj, const char *filename, file *fh, jsprincipals *principals); name type description cx jscontext * the context.
JS_CompileFileHandleForPrincipalsVersion
syntax jsobject * js_compilefilehandleforprincipalsversion(jscontext *cx, jsobject *obj, const char *filename, file *fh, jsprincipals *principals, jsversion version); name type description cx jscontext * the context.
JS_CompileFunction
syntax jsfunction * js_compilefunction(jscontext *cx, jsobject *obj, const char *name, unsigned int nargs, const char **argnames, const char *body, size_t length, const char *filename, unsigned int lineno); jsfunction * js_compileucfunction(jscontext *cx, jsobject *obj, const char *name, unsigned int nargs, const char **argnames, const jschar *body, size_t length, const char *filename, unsigned int lineno); name type description cx jscontext * the context in which to compile the function.
JS_CompileFunctionForPrincipals
syntax jsfunction * js_compilefunctionforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *name, unsigned int nargs, const char **argnames, const char *body, size_t length, const char *filename, unsigned int lineno); jsfunction * js_compileucfunctionforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *name, unsigned int nargs, const char **argnames, const jschar *body, size_t length, const char *filename, unsigned int lineno); name type description ...
JS_CompileScript
syntax // added in spidermonkey 45 bool js_compilescript(jscontext *cx, const char *ascii, size_t length, const js::compileoptions &options, js::mutablehandlescript script); bool js_compileucscript(jscontext *cx, const char16_t *chars, size_t length, const js::compileoptions &options, js::mutablehandlescript script); // obsolete since jsapi 39 bool js_compilescript(jscontext *cx, js::handleobject obj, const char *ascii, size_t length, const js::compileoptions &options, js::mutablehandlescript script); bool js_compileucscript(jscontext *cx, js::handleobject obj, const char16_t *c...
JS_CompileScriptForPrincipals
syntax jsscript * js_compilescriptforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *src, size_t length, const char *filename, unsigned int lineno); jsscript * js_compileucscriptforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const jschar *src, size_t length, const char *filename, unsigned int lineno); jsobject * js_compilescriptforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *src, size_t length, const char *filename, unsigned int lineno, jsversio...
JS_CompileUCFunctionForPrincipalsVersion
syntax jsfunction * js_compileucfunctionforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *name, unsigned int nargs, const char **argnames, const jschar *chars, size_t length, const char *filename, unsigned int lineno, jsversion version); name type description cx jscontext * the context.
JS_CompileUTF8File
syntax jsobject * js_compileutf8file(jscontext *cx, jsobject *obj, const char *filename); name type description cx jscontext * the context in which to compile the script.
JS_CompileUTF8FileHandle
syntax jsobject * js_compileutf8filehandle(jscontext *cx, jsobject *obj, const char *filename, file *file); jsobject * js_compileutf8filehandleforprincipals( jscontext *cx, jsobject *obj, const char *filename, file *file, jsprincipals *principals); name type description cx jscontext * the context in which to compile the script.
JS_ConcatStrings
syntax jsstring * js_concatstrings(jscontext *cx, js::handlestring left, js::handlestring right); name type description cx jscontext * the context in which both the strings have been created.
JS_ConstructObject
syntax jsobject * js_constructobject(jscontext *cx, jsclass *clasp, jsobject *proto, jsobject *parent); jsobject * js_constructobjectwitharguments(jscontext *cx, jsclass *clasp, jsobject *proto, jsobject *parent, unsigned int argc, jsval *argv); name type description cx jscontext * the context in which to create the new object.
JS_ContextIterator
syntax jscontext * js_contextiterator(jsruntime *rt, jscontext **iterp); name type description rt jsruntime * the runtime to walk.
JS_ConvertArguments
syntax bool js_convertarguments(jscontext *cx, const js::callargs &args, const char *format, ...); // added in spidermonkey 31 bool js_convertarguments(jscontext *cx, unsigned argc, jsval *argv, const char *format, ...); // obsolete since jsapi 30 name type description cx jscontext * the context in which to perform any necessary conversions.
JS_ConvertArgumentsVA
syntax bool js_convertargumentsva(jscontext *cx, const js::callargs &args, const char *format, va_list ap); bool js_convertargumentsva(jscontext *cx, unsigned argc, jsval *argv, const char *format, va_list ap); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_ConvertValue
syntax bool js_convertvalue(jscontext *cx, js::handlevalue v, jstype type, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to perform the conversion.
JS_DecompileFunction
syntax jsstring * js_decompilefunction(jscontext *cx, js::handle<jsfunction*> fun); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_DecompileFunctionBody
syntax jsstring * js_decompilefunctionbody(jscontext *cx, js::handle<jsfunction*> fun, unsigned indent); name type description cx jscontext * the context in which to decompile the function.
JS_DecompileScript
syntax jsstring * js_decompilescript(jscontext *cx, js::handle<jsscript*> script); name type description cx jscontext * the context to use to decompile the script.
JS_DecompileScriptObject
syntax jsstring * js_decompilescriptobject(jscontext *cx, jsobject *scriptobj, const char *name, unsigned int indent); name type description cx jscontext * the context.
JS_DeepFreezeObject
syntax bool js_deepfreezeobject(jscontext *cx, js::handle<jsobject*> obj); name type description cx jsruntime * the context.
JS_DefaultValue
syntax bool js_defaultvalue(jscontext *cx, js::handle<jsobject*> obj, jstype hint, js::mutablehandle<js::value> vp); name type description cx jscontext * the context in which to perform the conversion.
JS_DefineConstDoubles
syntax bool js_defineconstdoubles(jscontext *cx, js::handleobject obj, const jsconstdoublespec *cds); bool js_defineconstintegers(jscontext *cx, js::handleobject obj, const jsconstintegerspec *cis); // added in spidermonkey 38 name type description cx jscontext * the context in which to define the new properties.
JS_DefineElement
syntax /* added in spidermonkey 38 (jsapi 32) */ bool js_defineelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handlevalue value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handleobject value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handlestring value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineelement(jscont...
JS_DefineFunction
syntax jsfunction * js_definefunction(jscontext *cx, js::handle<jsobject*> obj, const char *name, jsnative call, unsigned nargs, unsigned attrs); jsfunction * js_defineucfunction(jscontext *cx, js::handle<jsobject*> obj, const char16_t *name, size_t namelen, jsnative call, unsigned nargs, unsigned attrs); jsfunction * js_definefunctionbyid(jscontext *cx, js::handle<jsobject*> obj, js::handle<jsid> id, jsnative call, unsigned nargs, unsigned attrs); // added in spidermonkey 17 name type description cx jscontext * the context in which to define the functio...
JS_DefineFunctions
syntax bool js_definefunctions(jscontext *cx, js::handle<jsobject*> obj, const jsfunctionspec *fs, propertydefinitionbehavior behavior = defineallproperties); in spidermonkey versions prior to spidermonkey 24, fs was not const.
JS_DefineObject
syntax jsobject * js_defineobject(jscontext *cx, js::handleobject obj, const char *name, const jsclass *clasp = nullptr, unsigned attrs = 0); name type description cx jscontext * the context in which to create the new object.
JS_DefineOwnProperty
syntax bool js_defineownproperty(jscontext *cx, js::handleobject obj, js::handleid id, js::handlevalue descriptor, bool *bp); name type description cx jscontext * the context.
JS_DefineProperties
syntax bool js_defineproperties(jscontext *cx, js::handleobject obj, const jspropertyspec *ps); name type description cx jscontext * the context in which to define the properties.
JS_DefineProperty
syntax bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, js::handlevalue value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, js::handleobject value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, js::handlestring value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, int32_t value, unsigned attrs, ...
JS_DefinePropertyWithTinyId
syntax jsbool js_definepropertywithtinyid( jscontext *cx, jsobject *obj, const char *name, int8 tinyid, jsval value, jspropertyop getter, jspropertyop setter, unsigned int attrs); jsbool js_defineucpropertywithtinyid( jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, int8 tinyid, jsval value, jspropertyop getter, jspropertyop setter, unsigned int attrs); name type description cx jscontext * the context in which to define the property.
JS_DeleteElement
syntax bool js_deleteelement(jscontext *cx, js::handleobject obj, uint32_t index); // added in spidermonkey 45 bool js_deleteelement(jscontext *cx, js::handleobject obj, uint32_t index, js::objectopresult &result); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_DeleteElement2
renamed to js_deleteelement in jsapi 39 syntax bool js_deleteelement2(jscontext *cx, js::handleobject obj, uint32_t index, bool *succeeded); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_DeleteProperty
syntax bool js_deleteproperty(jscontext *cx, js::handleobject obj, const char *name); bool js_deletepropertybyid(jscontext *cx, js::handleobject obj, jsid id); // added in spidermonkey 1.8.1 // added in spidermonkey 45 bool js_deleteproperty(jscontext *cx, js::handleobject obj, const char *name, js::objectopresult &result); bool js_deletepropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::objectopresult &result); bool js_deleteucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::objectopresult &result); name type description cx jscontext * pointer to a js context from which to derive runtime inf...
JS_DeleteProperty2
syntax bool js_deleteproperty2(jscontext *cx, js::handleobject obj, const char *name, bool *succeeded); bool js_deleteucproperty2(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, bool *succeeded); bool js_deletepropertybyid2(jscontext *cx, js::handleobject obj, js::handleid id, bool *succeeded); // added in spidermonkey 1.8.1 name type description cx jscontext * pointer to a js context from which t...
JS_DestroyContext
syntax void js_destroycontext(jscontext *cx); void js_destroycontextnogc(jscontext *cx); void js_destroycontextmaybegc(jscontext *cx); // obsolete since jsapi 14 name type description cx jscontext * the context to destroy.
JS_DestroyIdArray
syntax void js_destroyidarray(jscontext *cx, jsidarray *ida); name type description cx jscontext * a context.
JS_DestroyRuntime
syntax void js_destroyruntime(jsruntime *rt); name type description rt jsruntime * the runtime to destroy.
JS_DestroyScript
syntax void js_destroyscript(jscontext *cx, jsscript *script); name type description cx jscontext * the context in which to destroy the script.
JS_DoubleIsInt32
syntax bool js_doubleisint32(double d, int32_t *ip); name type description d double a double value to compare ip int32_t * a pointer to int32_t value to compare description js_doubleisint32 returns true if d i sequal to *ip.
JS_DoubleToInt32
syntax int32_t js_doubletoint32(double d); uint32_t js_doubletouint32(double d); name type description d double the numeric value to convert.
JS_DropExceptionState
syntax void js_dropexceptionstate(jscontext *cx, jsexceptionstate *state); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_DumpHeap
syntax bool js_dumpheap(jsruntime *rt, file *fp, void* startthing, jsgctracekind kind, void *thingtofind, size_t maxdepth, void *thingtoignore); name type description cx jscontext * pointer to a js context.
JS_EncodeCharacters
syntax jsbool js_encodecharacters(jscontext *cx, const jschar *src, size_t srclen, char *dst, size_t *dstlen); name type description cx jscontext * a context.
JS_EncodeString
syntax char * js_encodestring(jscontext *cx, jsstring *str); char * js_encodestringtoutf8(jscontext *cx, js::handlestring str); // added in spidermonkey 24 name type description cx jscontext * a context.
JS_EncodeStringToBuffer
syntax size_t js_encodestringtobuffer(jscontext *cx, jsstring *str, char *buffer, size_t length); name type description cx jscontext * a context.
JS_EnterCompartment
syntax jscompartment * js_entercompartment(jscontext *cx, jsobject *target); name type description cx jscontext * the context on which a cross-compartment call is needed.
JS_EnterCrossCompartmentCall
syntax jscrosscompartmentcall * js_entercrosscompartmentcall(jscontext *cx, jsobject *target); name type description cx jscontext * the context on which a cross-compartment call is needed.
JS_EnterLocalRootScope
syntax jsbool js_enterlocalrootscope(jscontext *cx); name type description cx jscontext * pointer to the context.
JS_Enumerate
syntax jsidarray * js_enumerate(jscontext *cx, js::handleobject obj); name type description cx jscontext * the context in which to enumerate object properties.
JS_EnumerateResolvedStandardClasses
syntax jsidarray * js_enumerateresolvedstandardclasses(jscontext *cx, jsobject *obj, jsidarray *ida); name type description description js_enumerateresolvedstandardclasses enumerates any already-resolved standard class ids into ida, or into a new jsidarray if ida is null.
JS_EnumerateStandardClasses
syntax bool js_enumeratestandardclasses(jscontext *cx, js::handleobject obj); name type description cx jscontext * pointer to the executable script context for which to initialize js function and object classes.
JS_ErrorFromException
syntax jserrorreport * js_errorfromexception(jscontext *cx, js::handleobject obj); name type description cx jscontext * pointer to a js context whose errors should be reported via your function.
JS_EvaluateScript
syntax jsbool js_evaluatescript(jscontext *cx, jsobject *obj, const char *src, unsigned int length, const char *filename, unsigned int lineno, jsval *rval); jsbool js_evaluateucscript(jscontext *cx, jsobject *obj, const jschar *src, unsigned int length, const char *filename, unsigned int lineno, jsval *rval); name type description cx jscontext * the context in which to run the script.
JS_EvaluateScriptForPrincipals
syntax jsbool js_evaluatescriptforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *src, unsigned int length, const char *filename, unsigned int lineno, jsval *rval); jsbool js_evaluatescriptucforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const jschar *src, unsigned int length, const char *filename, unsigned int lineno, jsval *rval); jsbool js_evaluatescriptforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *bytes, unsigned int length, const c...
JS_ExecuteRegExp
syntax bool js_executeregexp(jscontext *cx, js::handleobject obj, js::handleobject reobj, char16_t *chars, size_t length, size_t *indexp, bool test, js::mutablehandlevalue rval); bool js_executeregexpnostatics(jscontext *cx, js::handleobject reobj, char16_t *chars, size_t length, size_t *indexp, bool test, js::mutablehandlevalue rval); name type description cx jscontext * the context.
JS_ExecuteScript
syntax bool js_executescript(jscontext *cx, js::handlescript script, js::mutablehandlevalue rval); // added in spidermonkey 45 bool js_executescript(jscontext *cx, js::handlescript script); // added in spidermonkey 45 bool js_executescript(jscontext *cx, js::autoobjectvector &scopechain, js::handlescript script, js::mutablehandlevalue rval); // added in spidermonkey 36 bool js_executescript(jscontext *cx, js::autoobjectvector &scopechain, js::handlescript script); // added in spidermonkey 36 bool js_executescript(jscontext *cx, js::handleobject obj, js::handlescript script, js::mutablehandlevalue rval); // obsolete since jsapi 39 bool js_executescript(jscontext *cx, js::handleobject obj, js::...
JS_ExecuteScriptPart
syntax typedef enum jsexecpart { jsexec_prolog, jsexec_main } jsexecpart; jsbool js_executescriptpart( jscontext *cx, jsobject *obj, jsscript *script, jsexecpart part, jsval *rval); name type description cx jscontext * the context in which to execute the script.
JS_ExecuteScriptVersion
syntax jsbool js_executescriptversion(jscontext *cx, jsobject *obj, jsobject *scriptobj, jsval *rval, jsversion version); name type description cx jscontext * the context in which to execute the script.
JS_FORGET_STRING_FLATNESS
syntax static moz_always_inline jsstring * js_forget_string_flatness(jsflatstring *fstr) { return (jsstring *)fstr; } name type description fstr jsflatstring * a string to convert description js_forget_string_flatness converts jsflatstring * to jsstring *.
JS_FS
syntax #define js_fs(name,call,nargs,flags) ...
JS_FileEscapedString
syntax bool js_fileescapedstring(file *fp, jsstring *str, char quote); name type description fp file * a file pointer to write into.
JS_Finish
syntax void js_finish(jsruntime *rt); name type description rt jsruntime * pointer to a js runtime to destroy.
JS_FlattenString
syntax jsflatstring * js_flattenstring(jscontext *cx, jsstring *str); name type description cx jscontext * the context.
JS_FlushCaches
syntax void js_flushcaches(jscontext *cx); name type description cx jscontext * the context.
JS_ForgetLocalRoot
syntax void js_forgetlocalroot(jscontext *cx, void *thing); name type description cx jscontext * pointer to the context in which the caller is running.
JS_ForwardGetPropertyTo
syntax bool js_forwardgetpropertyto(jscontext *cx, js::handleobject obj, js::handleid id, js::handleobject onbehalfof, js::mutablehandlevalue vp); bool js_forwardgetelementto(jscontext *cx, js::handleobject obj, uint32_t index, js::handleobject onbehalfof, js::mutablehandlevalue vp); name type description cx jscontext * a context.
JS_FreezeObject
syntax bool js_freezeobject(jscontext *cx, js::handle<jsobject*> obj); name type description cx jscontext * the context.
JS_GC
syntax void js_gc(jscontext *cx); // added in spidermonkey 52 void js_gc(jsruntime *rt); // obsolete since jsapi 50 void js_gc(jscontext *cx); // obsolete since jsapi 14 name type description cx jscontext * the context to for which to perform garbage collection.
JS_GET_CLASS
syntax #ifdef js_threadsafe #define js_get_class(cx,obj) js_getclass(cx, obj) #else #define js_get_class(cx,obj) js_getclass(obj) #endif parameter type description cx jscontext * any context associated with the runtime in which obj exists.
JS_GetArrayLength
syntax bool js_getarraylength(jscontext *cx, js::handle<jsobject*> obj, uint32_t *lengthp); name type description cx jscontext * the context in which to look up the array's length.
JS_GetArrayPrototype
syntax jsobject * js_getarrayprototype(jscontext *cx, js::handleobject forobj); name type description cx jscontext * pointer to a javascript context from which to derive runtime information.
JS_GetClass
syntax const jsclass * js_getclass(jsobject *obj); name type description cx jscontext * any context associated with the runtime in which obj exists.
JS_GetClassObject
syntax bool js_getclassobject(jscontext *cx, jsprotokey key, js::mutablehandle<jsobject*> objp); name type description cx jscontext * a context.
JS_GetClassPrototype
syntax bool js_getclassprototype(jscontext *cx, jsprotokey key, js::mutablehandle<jsobject*> objp); name type description cx jscontext * a context.
JS_GetCompartmentPrivate
syntax void js_setcompartmentprivate(jscompartment *compartment, void *data); void * js_getcompartmentprivate(jscompartment *compartment); name type description compartment jscompartment * any compartment data void * (in js_setcompartmentprivate) pointer to application-defined data to be associated with the compartment.
JS_GetConstructor
syntax jsobject * js_getconstructor(jscontext *cx, js::handle<jsobject*> proto); name type description cx jscontext * a context.
JS_GetContextPrivate
syntax void * js_getcontextprivate(jscontext *cx); void js_setcontextprivate(jscontext *cx, void *data); void * js_getsecondcontextprivate(jscontext *cx); // added in spidermonkey 17 void js_setsecondcontextprivate(jscontext *cx, void *data); // added in spidermonkey 17 name type description cx jscontext * any context.
JS_GetContextThread
syntax int js_getcontextthread(jscontext *cx); name type description cx jscontext * the context to examine.
JS_GetDefaultFreeOp
syntax jsfreeop * js_getdefaultfreeop(jsruntime *rt); name type description rt jsruntime * a pointer to the runtime.
JS_GetElement
syntax bool js_getelement(jscontext *cx, js::handleobject obj, uint32_t index, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to perform the property lookup.
JS_GetEmptyString
syntax jsstring * js_getemptystring(jsruntime *rt); name type description rt jsruntime * the runtime for which to return the empty string.
JS_GetEmptyStringValue
syntax // added in spidermonkey 42 js::value js_getemptystringvalue(jscontext *cx); // obsolete since spidermonkey 42 jsval js_getemptystringvalue(jscontext *cx); name type description cx jscontext * a context.
JS_GetErrorPrototype
syntax jsobject * js_geterrorprototype(jscontext *cx); name type description cx jscontext * pointer to a js context whose errors should be reported via your function.
JS_GetExternalStringClosure
syntax void * js_getexternalstringclosure(jscontext *cx, jsstring *str); name type description cx jscontext * the context from which to retrieve the closure for a string.
JS_GetExternalStringFinalizer
syntax const jsstringfinalizer * js_getexternalstringfinalizer(jsstring *str); name type description str jsstring * a string to get finalizer.
JS_GetFlatStringChars
syntax const jschar * js_getflatstringchars(jsflatstring *str); name type description str jsflatstring * the flattended string returned by js_flattenstring.
JS_GetFunctionArity
syntax uint16_t js_getfunctionarity(jsfunction *fun); name type description fun jsfunction * a javascript function.
JS_GetFunctionCallback
syntax jsfunctioncallback js_getfunctioncallback(jscontext *cx); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_GetFunctionFlags
syntax unsigned int js_getfunctionflags(jsfunction *fun); name type description fun jsfunction * the function to examine.
JS_GetFunctionId
syntax jsstring * js_getfunctionid(jsfunction *fun); jsstring * js_getfunctiondisplayid(jsfunction *fun); // added in spidermonkey 17 name type description fun jsfunction * a javascript function.
JS_GetFunctionName
syntax const char * js_getfunctionname(jsfunction *fun); name type description fun jsfunction * a pointer to a javascript function.
JS_GetFunctionObject
syntax jsobject * js_getfunctionobject(jsfunction *fun); name type description fun jsfunction * pointer to a js function.
JS_GetFunctionPrototype
syntax jsobject * js_getfunctionprototype(jscontext *cx, js::handleobject forobj); name type description cx jscontext * pointer to a javascript context from which to derive runtime information.
JS_GetFunctionScript
syntax jsscript * js_getfunctionscript(jscontext *cx, js::handlefunction fun); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_GetGCParameter
syntax uint32_t js_getgcparameter(jsruntime *rt, jsgcparamkey key); void js_setgcparameter(jsruntime *rt, jsgcparamkey key, uint32_t value); uint32_t js_getgcparameterforthread(jscontext *cx, jsgcparamkey key); // added in spidermonkeysidebar 17 void js_setgcparameterforthread(jscontext *cx, jsgcparamkey key, uint32_t value); // added in spidermonkeysidebar 17 name type description rt jsruntime * the runtime to configure.
JS_GetGlobalForCompartmentOrNull
syntax jsobject * js_getglobalforcompartmentornull(jscontext *cx, jscompartment *c); name type description cx jscontext * the context for which to return the global object.
JS_GetGlobalForObject
syntax jsobject * js_getglobalforobject(jscontext *cx, jsobject *obj); name type description cx jscontext * a context.
JS_GetGlobalForScopeChain
syntax jsobject * js_getglobalforscopechain(jscontext *cx); name type description cx jscontext * the context for which to return the global object.
JS_GetGlobalObject
(in javascript, global variables are stored as properties of the global object.) syntax jsobject * js_getglobalobject(jscontext *cx); name type description cx jscontext * the context from which to retrieve the global object.
JS_GetImplementationVersion
syntax const char * js_getimplementationversion(void); description js_getimplementationversion returns a hard-coded, english language string that specifies the version number of the js engine currently in use, and its release date.
JS_GetInstancePrivate
syntax void * js_getinstanceprivate(jscontext *cx, js::handle<jsobject*> obj, const jsclass *clasp, js::callargs *args); // added in jsapi 32 void * js_getinstanceprivate(jscontext *cx, js::handle<jsobject*> obj, const jsclass *clasp, jsval *argv); // obsolete since jsapi 32 name type description cx jscontext * a context.
JS_GetInternedStringChars
syntax const jschar * js_getinternedstringchars(jsstring *str); const jschar * js_getinternedstringcharsandlength(jsstring *str, size_t *length); name type description str jsstring * the interned string.
JS_GetLatin1FlatStringChars
syntax const js::latin1char * js_getlatin1flatstringchars(const js::autocheckcannotgc &nogc, jsflatstring *str); const char16_t * js_gettwobyteflatstringchars(const js::autocheckcannotgc &nogc, jsflatstring *str); name type description cx jscontext * a context.
JS_GetLatin1InternedStringChars
syntax const js::latin1char * js_getlatin1internedstringchars(const js::autocheckcannotgc &nogc, jsstring *str); const char16_t * js_gettwobyteinternedstringchars(const js::autocheckcannotgc &nogc, jsstring *str); name type description cx jscontext * a context.
JS_GetLatin1StringCharsAndLength
syntax const js::latin1char * js_getlatin1stringcharsandlength(jscontext *cx, const js::autocheckcannotgc &nogc, jsstring *str, size_t *length); const char16_t * js_gettwobytestringcharsandlength(jscontext *cx, const js::autocheckcannotgc &nogc, jsstring *str, size_t *length); name type description cx jscontext * a context.
JS_GetLocaleCallbacks
syntax jslocalecallbacks * js_getlocalecallbacks(jsruntime *rt); void js_setlocalecallbacks(jsruntime *rt, jslocalecallbacks *callbacks); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_GetNaNValue
syntax // added in spidermonkey 42 js::value js_getnanvalue(jscontext *cx); // obsolete since spidermonkey 42 jsval js_getnanvalue(jscontext *cx); name type description cx jscontext * a context.
JS_GetObjectPrototype
syntax jsobject * js_getobjectprototype(jscontext *cx, js::handleobject forobj); name type description cx jscontext * pointer to a javascript context from which to derive runtime information.
JS_GetObjectRuntime
syntax jsruntime * js_getobjectruntime(jsobject *obj); name type description obj jsobject * the object to query.
JS_GetOptions
syntax uint32 js_getoptions(jscontext *cx); name type description cx jscontext * the context from which to read options.
JS_GetOwnPropertyDescriptor
syntax bool js_getownpropertydescriptor(jscontext *cx, js::handleobject obj, const char *name, js::mutablehandle<jspropertydescriptor> desc); bool js_getownpropertydescriptorbyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandle<jspropertydescriptor> desc); bool js_getownucpropertydescriptor(jscontext *cx, js::handleobject obj, const char16_t *name, js::mutablehandle desc); // added in spidermonkey 45 name type description cx jscontext * a context.
JS_GetParent
syntax jsobject * js_getparent(jsobject *obj); name type description obj jsobject * object for which to retrieve the parent.
JS_GetParentRuntime
syntax jsruntime * js_getparentruntime(jscontext *cx); name type description cx jscontext * the context to query.
JS_GetPendingException
syntax bool js_getpendingexception(jscontext *cx, js::mutablehandlevalue vp); name type description cx jscontext * pointer to the js context in which the exception was thrown.
JS_GetPositiveInfinityValue
syntax // added in spidermonkey 42 js::value js_getpositiveinfinityvalue(jscontext *cx); js::value js_getnegativeinfinityvalue(jscontext *cx); // obsolete since spidermonkey 42 jsval js_getpositiveinfinityvalue(jscontext *cx); jsval js_getnegativeinfinityvalue(jscontext *cx); name type description cx jscontext * a context.
JS_GetPrivate
syntax void * js_getprivate(jsobject *obj); name type description obj jsobject * an object whose jsclass has the jsclass_has_private flag.
JS_GetProperty
syntax bool js_getproperty(jscontext *cx, js::handleobject obj, const char *name, js::mutablehandlevalue vp); bool js_getucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::mutablehandlevalue vp); bool js_getpropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp); // added in spidermonkey 1.8.1 name type description cx jscontext * a context.
JS_GetPropertyAttributes
syntax jsbool js_getpropertyattributes(jscontext *cx, jsobject *obj, const char *name, unsigned int *attrsp, jsbool *foundp); jsbool js_getucpropertyattributes(jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, unsigned int *attrsp, jsbool *foundp); name type description cx jscontext * the context in which to look up property attributes.
JS_GetPropertyAttrsGetterAndSetter
syntax jsbool js_getpropertyattrsgetterandsetter(jscontext *cx, jsobject *obj, const char *name, unsigned int *attrsp, jsbool *foundp, jspropertyop *getterp, jspropertyop *setterp); jsbool js_getucpropertyattrsgetterandsetter(jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, unsigned int *attrsp, jsbool *foundp, jspropertyop *getterp, jspropertyop *setterp); jsbool js_getpropertyattrsgetterandsetterbyid(jscontext *cx, jsobject *obj, jsid id, unsigned int *attrsp, jsbool *foundp, jspropertyop *getter...
JS_GetPropertyDefault
syntax bool js_getpropertydefault(jscontext *cx, jsobject *obj, const char *name, jsval def, js::mutablehandle<js::value> vp); bool js_getpropertybyiddefault(jscontext *cx, jsobject *obj, jsid id, jsval def, js::mutablehandle<js::value> vp); name type description cx jscontext * a context.
JS_GetPropertyDescriptor
syntax bool js_getpropertydescriptor(jscontext *cx, js::handleobject obj, const char *name, js::mutablehandle<jspropertydescriptor> desc); // added in spidermonkey 31 bool js_getpropertydescriptorbyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandle<jspropertydescriptor> desc); name type description cx jscontext * a context.
JS_GetPrototype
syntax bool js_getprototype(jscontext *cx, js::handleobject obj, js::mutablehandleobject protop); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_GetRegExpFlags
syntax unsigned js_getregexpflags(jscontext *cx, handleobject obj) name type description cx jscontext * a context.
JS_GetRegExpSource
syntax jsstring * js_getregexpsource(jscontext *cx, js::handleobject obj); name type description cx jscontext * a context.
JS_GetReservedSlot
syntax // added in spidermonkey 42 js::value js_getreservedslot(jsobject *obj, uint32_t index); void js_setreservedslot(jsobject *obj, uint32_t index, js::value v); // obsolete since spidermonkey 42 jsval js_getreservedslot(jsobject *obj, uint32_t index); void js_setreservedslot(jsobject *obj, uint32_t index, jsval v); name type description obj jsobject * an object that has reserved slots.
JS_GetRuntime
syntax jsruntime * js_getruntime(jscontext *cx); name type description cx jscontext * the context to query.
JS_GetRuntimePrivate
syntax void * js_getruntimeprivate(jsruntime *rt); void js_setruntimeprivate(jsruntime *rt, void *data); name type description rt jsruntime * any js runtime.
JS_GetScopeChain
syntax jsobject * js_getscopechain(jscontext *cx); name type description cx jscontext * the context to query.
JS_GetSecurityCallbacks
syntax /* added in spidermonkey 17 */ void js_setsecuritycallbacks(jsruntime *rt, const jssecuritycallbacks *callbacks); const jssecuritycallbacks * js_getsecuritycallbacks(jsruntime *rt); /* obsolete since jsapi 13 */ jssecuritycallbacks * js_setcontextsecuritycallbacks(jscontext *cx, jssecuritycallbacks *callbacks); jssecuritycallbacks * js_getruntimesecuritycallbacks(jsruntime *rt); jssecuritycallbacks * js_setruntimesecuritycallbacks(jsruntime *rt, jssecuritycallbacks *callbacks); name type description rt jsruntime * a runtime to get/set the security callbacks.
JS_GetStringBytes
syntax char * js_getstringbytes(jsstring *str); const char * js_getstringbytesz(jscontext *cx, jsstring *str); // added in jsapi 1.8.2 name type description cx jscontext * (js_getstringbytesz and js_encodestring only) a context.
JS_GetStringCharAt
syntax bool js_getstringcharat(jscontext *cx, jsstring *str, size_t index, char16_t *res); char16_t js_getflatstringcharat(jsflatstring *str, size_t index); name type description cx jscontext * the context in which to create the new string.
JS_GetStringChars
syntax jschar * js_getstringchars(jsstring *str); // obsolete since jsapi 1.8.5 const jschar * js_getstringcharsz(jscontext *cx, jsstring *str); // added in spidermonkey 1.8.2, obsolete since jsapi 33 name type description cx jscontext * (in js_getstringcharsz only) a context.
JS_GetStringCharsAndLength
syntax const jschar * js_getstringcharsandlength(jscontext *cx, jsstring *str, size_t *length); name type description cx jscontext * the context.
JS_GetStringEncodingLength
syntax size_t js_getstringencodinglength(jscontext *cx, jsstring *str); name type description cx jscontext * a context.
JS_GetStringLength
syntax size_t js_getstringlength(jsstring *str); name type description str jsstring * the string to examine.
JS_GetTwoByteExternalStringChars
syntax const char16_t * js_gettwobyteexternalstringchars(jsstring *str); name type description str jsstring * a string to get characters.
JS_GetTypeName
syntax const char * js_gettypename(jscontext *cx, jstype type); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_GetVersion
syntax jsversion js_getversion(jscontext *cx); name type description cx jscontext * the context to query.
JS_HasArrayLength
syntax jsbool js_hasarraylength(jscontext *cx, jsobject *obj, jsuint *lengthp); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_HasElement
syntax bool js_haselement(jscontext *cx, js::handleobject obj, uint32_t index, bool *foundp); name type description cx jscontext * the context in which to perform the property lookup.
JS_HasInstance
syntax bool js_hasinstance(jscontext *cx, js::handle<jsobject*> obj, js::handle<js::value> v, bool *bp); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_HasOwnProperty
syntax bool js_hasownproperty(jscontext* cx, handleobject obj, const char* name, bool* foundp) bool js_hasownpropertybyid(jscontext* cx, handleobject obj, handleid id, bool* foundp) name type description cx jscontext * a context.
JS_HasProperty
syntax bool js_hasproperty(jscontext *cx, js::handleobject obj, const char *name, bool *foundp); bool js_hasucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, bool *vp); bool js_haspropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, bool *foundp); // added in spidermonkey 1.8.1 name type description cx jscontext * a context.
JS_IdArrayGet
syntax jsid js_idarrayget(jscontext *cx, jsidarray *ida, unsigned index) name type description cx jscontext * a context.
JS_IdArrayLength
syntax int js_idarraylength(jscontext *cx, jsidarray *ida); name type description cx jscontext * a context.
JS_IdToProtoKey
syntax jsprotokey js_idtoprotokey(jscontext *cx, js::handleid id); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_IdToValue
syntax bool js_idtovalue(jscontext *cx, jsid id, js::mutablehandle<js::value> vp); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_Init
syntax #include "js/initialization.h" // previously "jsapi.h" bool js_init(void); description initialize spidermonkey, returning true only if initialization succeeded.
JS_InitCTypesClass
syntax jsbool js_initctypesclass(jscontext *cx, jsobject *global); name type description cx jscontext * the context.
JS_InstanceOf
syntax bool js_instanceof(jscontext *cx, js::handle<jsobject*> obj, const jsclass *clasp, js::callargs *args); // added in spidermonkey 38 bool js_instanceof(jscontext *cx, js::handle<jsobject*> obj, const jsclass *clasp, jsval *argv); // obsolete since jsapi 32 name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_InternJSString
syntax jsstring * js_internjsstring(jscontext *cx, js::handlestring str); name type description cx jscontext * the context.
JS_InternString
syntax jsstring * js_internstring(jscontext *cx, const char *s); jsstring * js_internstringn(jscontext *cx, const char *s, size_t length); jsstring * js_internucstring(jscontext *cx, const char16_t *s); jsstring * js_internucstringn(jscontext *cx, const char16_t *s, size_t length); name type description cx jscontext * a context.
JS_IsArrayObject
syntax bool js_isarrayobject(jscontext *cx, js::handlevalue value, bool *isarray); bool js_isarrayobject(jscontext *cx, js::handleobject obj, bool *isarray); // obsolete since jsapi 44 bool js_isarrayobject(jscontext *cx, js::handlevalue value); bool js_isarrayobject(jscontext *cx, js::handleobject obj); name type description cx jscontext * a context.
JS_IsAssigning
syntax jsbool js_isassigning(jscontext *cx); name type description description js_isassigning returns true if a script is executing and its current bytecode is a set (assignment) operation, even if there are native (no script) stack frames between the script and the caller to js_isassigning.
JS_IsBuiltinEvalFunction
syntax bool js_isbuiltinevalfunction(jsfunction *fun); name type description obj jsfunction * pointer to the function to test.
JS_IsBuiltinFunctionConstructor
syntax bool js_isbuiltinfunctionconstructor(jsfunction *fun); name type description obj jsfunction * pointer to the function to test.
JS_IsConstructing
syntax jsbool js_isconstructing(jscontext *cx, jsval *vp); name type description cx jscontext * the cx parameter passed to the jsnative.
JS_IsConstructing_PossiblyWithGivenThisObject
syntax static jsbool js_isconstructing_possiblywithgiventhisobject(jscontext *cx, const jsval *vp, jsobject **maybethis); name type description cx jscontext * the context.
JS_IsConstructor
syntax bool js_isconstructor(jsfunction *fun); name type description fun jsfunction * the function to examine.
JS_IsExceptionPending
syntax bool js_isexceptionpending(jscontext *cx); name type description cx jscontext * pointer to a js context to check for pending exceptions.
JS_IsExtensible
syntax bool js_isextensible(jscontext *cx, js::handleobject obj, bool *extensible); name type description cx jscontext * the context.
JS_IsExternalString
syntax bool js_isexternalstring(jsstring *str); name type description str jsstring * the string to check.
JS_IsGlobalObject
syntax bool js_isglobalobject(jsobject *obj); name type description obj jsobject * the object to examine.
JS_IsIdentifier
syntax bool js_isidentifier(jscontext *cx, js::handlestring str, bool *isidentifier); bool js_isidentifier(const char16_t *chars, size_t length); // added in spidermonkey 38 name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_IsNative
syntax bool js_isnative(jsobject *obj); name type description str jsobject * the object to check.
JS_IsNativeFunction
syntax bool js_isnativefunction(jsobject *funobj, jsnative call); name type description funobj jsobject * the function object to examine.
JS_IsRunning
syntax bool js_isrunning(jscontext *cx); name type description cx jscontext * the context to query.
JS_IsStopIteration
syntax // added in spidermonkey 42 bool js_isstopiteration(js::value v); // obsolete since spidermonkey 42 bool js_isstopiteration(jsval v); name type description v js::value the value to check.
JS_IterateCompartments
syntax void js_iteratecompartments(jsruntime *rt, void *data, jsiteratecompartmentcallback compartmentcallback); name type description cx jsruntime * the runtime of the compartments to iterate over.
JS_LeaveCompartment
syntax void js_leavecompartment(jscontext *cx, jscompartment *oldcompartment); name type description cx jscontext * the context in which to leave the compartment.
JS_LeaveCrossCompartmentCall
syntax void js_leavecrosscompartmentcall(jscrosscompartmentcall *call); name type description call jscrosscompartmentcall * value returned by previous call to js_entercrosscompartmentcall.
JS_LeaveLocalRootScope
syntax void js_leavelocalrootscope(jscontext *cx); name type description cx jscontext * pointer to the context.
JS_LeaveLocalRootScopeWithResult
syntax void js_leavelocalrootscopewithresult(jscontext *cx, jsval rval); name type description cx jscontext * pointer to the context.
JS_LinkConstructorAndPrototype
syntax bool js_linkconstructorandprototype(jscontext *cx, js::handle<jsobject*> ctor, js::handle<jsobject*> proto); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_Lock
syntax void js_lock(jsruntime *rt); name type description rt jsruntime * pointer to the runtime to lock.
JS_LockGCThing
syntax jsbool js_lockgcthing(jscontext *cx, void *thing); // obsolete since jsapi 21 jsbool js_unlockgcthing(jscontext *cx, void *thing); // obsolete since jsapi 21 jsbool js_lockgcthingrt(jsruntime *rt, void *thing); jsbool js_unlockgcthingrt(jsruntime *rt, void *thing); name type description cx jscontext * a context.
JS_LookupElement
syntax bool js_lookupelement(jscontext *cx, js::handleobject obj, uint32_t index, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to look up the property.
JS_LookupProperty
syntax bool js_lookupproperty(jscontext *cx, js::handleobject obj, const char *name, js::mutablehandlevalue vp); bool js_lookupucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::mutablehandlevalue vp); bool js_lookuppropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp); // added in spidermonkey 1.8.1 bool js_lookupelement(jscontext *cx, js::handleobject obj, uint32_t index, js::mutablehandlevalue v...
JS_LooselyEqual
syntax bool js_looselyequal(jscontext *cx, js::handle<js::value> v1, js::handle<js::value> v2, bool *equal); name type description cx jscontext * the context in which to perform the conversion.
JS_MakeStringImmutable
syntax jsbool js_makestringimmutable(jscontext *cx, jsstring *str); name type description cx jscontext * a context.
JS_MapGCRoots
syntax uint32 js_mapgcroots(jsruntime *rt, jsgcrootmapfun map, void *data); callback syntax #define js_map_gcroot_next 0 /* continue mapping entries */ #define js_map_gcroot_stop 1 /* stop mapping entries */ #define js_map_gcroot_remove 2 /* remove and free the current entry */ typedef int (*jsgcrootmapfun)(void *rp, const char *name, void *data); description call js_mapgcroots to map the gc's roots table using map(rp, name, data).
JS_MaybeGC
syntax void js_maybegc(jscontext *cx); name type description cx jscontext * the context in which to perform garbage collection, if needed.
JS_New
syntax jsobject * js_new(jscontext *cx, js::handleobject ctor, const js::handlevaluearray& args); // added in jsapi 32 jsobject * js_new(jscontext *cx, jsobject *ctor, unsigned argc, jsval *argv); // obsolete since jsapi 32 name type description cx jscontext * the context in which to create the new object.
JS_NewArrayObject
syntax jsobject * js_newarrayobject(jscontext *cx, const js::handlevaluearray& contents); // added in spidermonkey 31 jsobject * js_newarrayobject(jscontext *cx, size_t length); // added in spidermonkey 31 jsobject * js_newarrayobject(jscontext *cx, int length, jsval *vector); // obsolete since jsapi 30 name type description cx jscontext * the context in which to create the new array.
JS_NewCompartmentAndGlobalObject
syntax jsobject * js_newcompartmentandglobalobject(jscontext *cx, jsclass *clasp, jsprincipals *principals); name type description cx jscontext * the context in which to create the new global object.
JS_NewContext
syntax jscontext * js_newcontext(jsruntime *rt, size_t stackchunksize); name type description rt jsruntime * parent runtime for the new context.
JS_NewDateObject
syntax jsobject * js_newdateobject(jscontext *cx, int year, int mon, int mday, int hour, int min, int sec); name type description cx jscontext * the context in which to create the new date object.
JS_NewDateObjectMsec
syntax jsobject * js_newdateobjectmsec(jscontext *cx, double msec); name type description cx jscontext * the context.
JS_NewDependentString
syntax jsstring * js_newdependentstring(jscontext *cx, js::handlestring str, size_t start, size_t length); name type description cx jscontext * the context in which to create the new string.
JS_NewDouble
syntax jsdouble * js_newdouble(jscontext *cx, jsdouble d); name type description cx jscontext * the context in which to create the new number.
JS_NewDoubleValue
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.
JS_NewExternalString
syntax jsstring * js_newexternalstring(jscontext *cx, const char16_t *chars, size_t length, const jsstringfinalizer *fin); jsstring * js_newexternalstringwithclosure(jscontext *cx, jschar *chars, size_t length, int type, void *closure); // obsolete since jsapi 13 name type description cx jscontext * the context in which to create the new string.
JS_NewFunction
syntax // added in spidermonkey 45 jsfunction * js_newfunction(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, const char *name); // obsolete since jsapi 44 jsfunction * js_newfunctionbyid(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, js::handle<jsid> id); // obsolete since jsapi 39 jsfunction * js_newfunction(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, js::handle<jsobject*> parent, const char *name); jsfunction * js_newfunctionbyid(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, js::handle<jsobject*> parent, js::handle<jsid> id); // added in spidermonkey 17 name type...
JS_NewGlobalObject
syntax jsobject * js_newglobalobject(jscontext *cx, const jsclass *clasp, jsprincipals *principals, js::onnewglobalhookoption hookoption, const js::compartmentoptions &options = js::compartmentoptions()); name type description cx jscontext * the context in which to create the new global object.
JS_NewNumberValue
syntax jsbool js_newnumbervalue(jscontext *cx, jsdouble d, jsval *rval); name type description cx jscontext * the context in which to create the new number.
JS_NewObject
syntax // added in spidermonkey 45 jsobject * js_newobject(jscontext *cx, const jsclass *clasp); bool js_newobjectwithgivenproto(jscontext *cx, const jsclass *clasp, js::handle<jsobject*> proto); // obsolete since spidermonkey 38 jsobject * js_newobject(jscontext *cx, const jsclass *clasp, js::handle<jsobject*> proto, js::handle<jsobject*> parent); jsobject * js_newobjectwithgivenproto(jscontext *cx, const jsclass *clasp, js::handle<jsobject*> proto, js::handle<jsobject*> parent); // added in spidermonkey 1.8 name type description cx jscontext * the context in which to create the new object.
JS_NewObjectForConstructor
syntax jsobject * js_newobjectforconstructor(jscontext *cx, const jsclass *clasp, const js::callargs& args); // added in jsapi 32 jsobject * js_newobjectforconstructor(jscontext *cx, jsclass *clasp, const jsval *vp); // added in jsapi 14, obsolete since jsapi 32 jsobject * js_newobjectforconstructor(jscontext *cx, const jsval *vp); // obsolete since jsapi 14 name type description cx jscontext * the context in which to create the new object.
JS_NewPlainObject
syntax jsobject * js_newplainobject(jscontext *cx); name type description cx jscontext * the context in which to create the new object.
JS_NewPropertyIterator
syntax jsobject * js_newpropertyiterator(jscontext *cx, js::handle<jsobject*> obj); name type description cx jscontext * the js context in which to enumerate properties.
JS_NewRegExpObject
syntax jsobject * js_newregexpobject(jscontext *cx, js::handleobject obj, const char *bytes, size_t length, unsigned flags); jsobject * js_newucregexpobject(jscontext *cx, js::handleobject obj, const char16_t *chars, size_t length, unsigned flags); jsobject * js_newregexpobjectnostatics(jscontext *cx, char *bytes, size_t length, unsigned flags); jsobject * js_newucregexpobjectnostatics(jscontext *cx, char16_t *chars, size_t length, unsigned flags); name type description cx jscontext * the context in which to create the new object.
JS_NewRuntime
syntax jsruntime * 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.
JS_NewScriptObject
syntax jsobject * js_newscriptobject(jscontext *cx, jsscript *script); name type description cx jscontext * the context in which to create the new script object.
JS_NewUCString
syntax jsstring * js_newucstring(jscontext *cx, char16_t *chars, size_t length); jsstring * js_newstring(jscontext *cx, char *buf, size_t length); // obsolete since jsapi 1.8.5 name type description cx jscontext * the context in which to create the new string.
JS_NewStringCopyN
syntax jsstring * js_newstringcopyn(jscontext *cx, const char *s, size_t n); jsstring * js_newucstringcopyn(jscontext *cx, const char16_t *s, size_t n); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_NewStringCopyZ
syntax jsstring * js_newstringcopyz(jscontext *cx, const char *s); jsstring * js_newucstringcopyz(jscontext *cx, const char16_t *s); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_NextProperty
syntax bool js_nextproperty(jscontext *cx, js::handleobject iterobj, js::mutablehandleid idp); name type description cx jscontext * the js context in which to enumerate properties.
JS_Now
syntax int64_t js_now(void); description js_now returns microseconds since the epoch, midnight, january 1, 1970 utc.
JS_NumberValue
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.
JS_ObjectIsDate
syntax bool js_objectisdate(jscontext *cx, js::handleobject obj); name type description cx jscontext * pointer to a javascript context from which to derive runtime information.
JS_ObjectIsFunction
syntax bool js_objectisfunction(jscontext *cx, jsobject *obj); name type description cx jscontext * a context.
JS_ObjectIsRegExp
syntax bool js_objectisregexp(jscontext *cx, js::handleobject obj); name type description cx jscontext * a context.
JS_PSGS
syntax #define js_psg(name, getter, flags) ...
JS_PopArguments
syntax void js_poparguments(jscontext *cx, void *mark); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_PreventExtensions
syntax // added in spidermonkey 45 bool js_preventextensions(jscontext *cx, js::handleobject obj, js::objectopresult &result); // obsolete since jsapi 39 bool js_preventextensions(jscontext *cx, js::handleobject obj, bool *succeeded); name type description cx jscontext * the context.
JS_PropertyStub
syntax bool js_propertystub(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp); bool js_strictpropertystub(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp, js::objectopresult &result); // added in spidermonkey 45 bool js_strictpropertystub(jscontext *cx, js::handleobject obj, js::handleid id, bool strict, js::mutablehandlevalue vp); // obsolete since jsapi 39 bool js_resolvestub(jscontext *cx, js::handleobject obj, js::handleid id, bool *resolvedp); // obsolete since jsapi 37 bool js_deletepropertystub(jscontext *cx, js::handleobject obj, js::handleid id, bool *succeede...
JS_PushArguments
syntax jsval * js_pusharguments(jscontext *cx, void **markp, const char *format, ...); jsval * js_pushargumentsva(jscontext *cx, void **markp, const char *format, va_list ap); name type description cx jscontext * the context in which to perform any necessary conversions.
JS_PutEscapedString
syntax size_t js_putescapedstring(jscontext *cx, char *buffer, size_t size, jsstring *str, char quote); size_t js_putescapedflatstring(char *buffer, size_t size, jsflatstring *str, char quote); name type description cx jscontext * a context.
JS_RemoveExternalStringFinalizer
syntax int js_removeexternalstringfinalizer(jsstringfinalizeop finalizer); name type description finalizer jsstringfinalizeop the finalizer to remove.
JS_Remove*Root
syntax jsbool js_removevalueroot(jscontext *cx, jsval *vp); jsbool js_removestringroot(jscontext *cx, jsstring **spp); jsbool js_removeobjectroot(jscontext *cx, jsobject **opp); jsbool js_removegcthingroot(jscontext *cx, void **rp); name type description cx jscontext * a context.
JS_RemoveRootRT
syntax jsbool js_removerootrt(jsruntime *rt, void *rp); name type description rt jsruntime * pointer to the runtime with which the root was registered.
JS_ReportError
syntax void js_reporterror(jscontext *cx, const char *format, ...); bool js_reportwarning(jscontext *cx, const char *format, ...); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_ReportOutOfMemory
syntax void js_reportoutofmemory(jscontext *cx); void js_reportallocationoverflow(jscontext *cx); // added in spidermonkey 1.8 name type description cx jscontext * the context in which to report the error.
JS_ReportPendingException
syntax bool js_reportpendingexception(jscontext *cx); name type description cx jscontext * the context in which the exception was thrown.
JS_ResolveStandardClass
syntax bool js_resolvestandardclass(jscontext *cx, js::handleobject obj, js::handleid id, bool *resolved); name type description cx jscontext * pointer to the executable script context for which to initialize js function and object classes.
JS_RestoreExceptionState
syntax void js_restoreexceptionstate(jscontext *cx, jsexceptionstate *state); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_SameValue
the samevalue algorithm is equivalent to the following javascript: function samevalue(v1, v2) { if (v1 === 0 && v2 === 0) return 1 / v1 === 1 / v2; if (v1 !== v1 && v2 !== v2) return true; return v1 === v2; } syntax // added in spidermonkey 45 bool js_samevalue(jscontext *cx, js::handle<js::value> v1, js::handle<js::value> v2, bool *same); // obsolete since jsapi 39 bool js_samevalue(jscontext *cx, jsval v1, jsval v2, bool *same); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_SaveExceptionState
syntax jsexceptionstate * js_saveexceptionstate(jscontext *cx); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_SaveFrameChain
syntax bool js_saveframechain(jscontext *cx); void js_restoreframechain(jscontext *cx); name type description cx jscontext * the context to query.
JS_ScheduleGC
syntax void js_schedulegc(jscontext *cx, uint32_t count); name type description cx jscontext * a context.
JS_SealObject
syntax jsbool js_sealobject(jscontext *cx, jsobject *obj, jsbool deep); name type description cx jscontext * a context.
JS_SetAllNonReservedSlotsToUndefined
syntax void js_setallnonreservedslotstoundefined(jscontext *cx, jsobject *objarg); name type description cx jscontext * the context in which to clear the object.
JS_SetArrayLength
syntax bool js_setarraylength(jscontext *cx, js::handle<jsobject*> obj, uint32_t length); name type description cx jscontext * the context in which to change the length of the array.
JS_SetCallReturnValue2
syntax void js_setcallreturnvalue2(jscontext *cx, jsval v); name type description cx jscontext * the context in which the native function is running.
JS_SetCheckObjectAccessCallback
syntax jscheckaccessop js_setcheckobjectaccesscallback( jsruntime *rt, jscheckaccessop acb); name type description rt jsruntime * the runtime to configure.
JS_SetCompartmentNameCallback
syntax void js_setcompartmentnamecallback(jsruntime *rt, jscompartmentnamecallback callback); name type description cx jsruntime * the runtime to set the callback function.
JS_SetDefaultLocale
syntax bool js_setdefaultlocale(jsruntime *rt, const char *locale); void js_resetdefaultlocale(jsruntime *rt); name type description rt jsruntime * pointer to a js runtime locale const char * string represents locale.
JS_SetDestroyCompartmentCallback
syntax void js_setdestroycompartmentcallback(jsruntime *rt, jsdestroycompartmentcallback callback); name type description cx jsruntime * the runtime to set the callback function.
JS_SetElement
syntax /* added in spidermonkey 31 */ bool js_setelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handlevalue v); bool js_setelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handleobject v); bool js_setelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handlestring v); bool js_setelement(jscontext *cx, js::handleobject obj, uint32_t index, int32_t v); bool js_setelement(jscontext *cx, js::handleobject obj, uint32_t index, uint32_t v); bool js_setelement(jscontext *cx, js::handleobject obj, uint32_t index, double v); /* obsolete since jsapi 29 */ bool js_setelement(jscontext *cx, js::handleobject o...
JS_SetGCParametersBasedOnAvailableMemory
syntax void js_setgcparametersbasedonavailablememory(jsruntime *rt, uint32_t availmem); name type description rt jsruntime * the runtime to configure.
JS_SetGCZeal
syntax void js_setgczeal(jscontext *cx, uint8_t zeal, uint32_t frequency); name type description cx jscontext * a context.
JS_SetGlobalObject
syntax void js_setglobalobject(jscontext *cx, jsobject *obj); name type description cx jscontext * the context to configure.
JS_SetICUMemoryFunctions
syntax bool js_seticumemoryfunctions(js_icuallocfn allocfn, js_icureallocfn reallocfn, js_icufreefn freefn); type description allocfn js_icuallocfn an allocation function.
JS_SetNativeStackQuota
syntax void js_setnativestackquota(jsruntime *cx, size_t systemcodestacksize, size_t trustedscriptstacksize = 0, size_t untrustedscriptstacksize = 0); name type description rt jsruntime * the runtime.
JS_SetObjectPrincipalsFinder
syntax jsobjectprincipalsfinder js_setobjectprincipalsfinder(jsruntime *rt, jsobjectprincipalsfinder fop); name type description rt jsruntime * the runtime to configure.
JS_SetParent
syntax bool js_setparent(jscontext *cx, js::handleobject obj, js::handleobject parent); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_SetPendingException
syntax void js_setpendingexception(jscontext *cx, js::handlevalue v); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_SetPrincipalsTranscoder
syntax jsprincipalstranscoder js_setprincipalstranscoder(jsruntime *rt, jsprincipalstranscoder px); name type description rt jsruntime * the runtime to configure.
JS_SetPrivate
syntax void js_setprivate(jsobject *obj, void *data); name type description obj jsobject * object for which to set private data.
JS_SetProperty
syntax bool js_setproperty(jscontext *cx, js::handleobject obj, const char *name, js::handlevalue v); bool js_setucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::handlevalue v); bool js_setpropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::handlevalue v); // added in spidermonkey 1.8.1 name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_SetPropertyAttributes
syntax jsbool js_setpropertyattributes(jscontext *cx, jsobject *obj, const char *name, unsigned int attrs, jsbool *foundp); jsbool js_setucpropertyattributes(jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, unsigned int attrs, jsbool *foundp); name type description cx jscontext * the context in which to set the property attributes.
JS_SetPrototype
syntax bool js_setprototype(jscontext *cx, js::handleobject obj, js::handleobject proto); name type description cx jscontext * the context in which to set the object's prototype.
JS_SetRegExpInput
syntax bool js_setregexpinput(jscontext *cx, js::handleobject obj, js::handlestring input, bool multiline); name type description cx jscontext * the context.
JS_SetScriptStackQuota
syntax void js_setscriptstackquota(jscontext *cx, size_t quota); name type description cx jscontext * the context to configure.
JS_SetThreadStackLimit
syntax void js_setthreadstacklimit(jscontext *cx, jsuword limitaddr) name type description cx jscontext * the context to configure.
JS_SetVersion
syntax jsversion js_setversion(jscontext *cx, jsversion version); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_SetVersionForCompartment
syntax void js_setversionforcompartment(jscompartment *compartment, jsversion version); name type description compartment jscompartment * pointer to a js compartment.
JS_ShutDown
syntax void js_shutdown(void); description destroys all free-standing resources allocated by spidermonkey, not associated with any jsruntime, jscontext, or other structure.
JS_StrictlyEqual
syntax // added in spidermonkey 45 bool js_strictlyequal(jscontext *cx, js::handle<js::value> v1, js::handle<js::value> v2, bool *equal); // obsolete since jsapi 39 bool js_strictlyequal(jscontext *cx, jsval v1, jsval v2, bool *equal); name type description cx jscontext * the context in which to perform the conversion.
JS_StringEqualsAscii
syntax bool js_stringequalsascii(jscontext *cx, jsstring *str, const char *asciibytes, bool *match); bool js_flatstringequalsascii(jsflatstring *str, const char *asciibytes); name type description cx jscontext * a context.
JS_StringHasBeenInterned
syntax bool js_stringhasbeeninterned(jscontext *cx, jsstring *str); name type description str jsstring * a string to examine.
JS_StringHasLatin1Chars
syntax bool js_stringhaslatin1chars(jsstring *str); name type description str jsstring * string to examine.
JS_StringIsFlat
syntax bool js_stringisflat(jsstring *str); name type description str jsstring * string to examine.
JS_StringToVersion
syntax jsversion js_stringtoversion(const char *string); name type description string const char * version string to convert.
JS_SuspendRequest
syntax jsrefcount js_suspendrequest(jscontext *cx); void js_resumerequest(jscontext *cx, jsrefcount savedepth); name type description cx jscontext * the context whose current request is to be suspended or resumed.
JS_ThrowStopIteration
syntax bool js_throwstopiteration(jscontext *cx); name type description cx jscontext * the context in which to throw the stopiteration object.
JS_ToggleOptions
syntax uint32 js_toggleoptions(jscontext *cx, uint32 options); name type description cx jscontext * a context on which to modify options.
JS_TypeOfValue
syntax jstype js_typeofvalue(jscontext *cx, js::handle<js::value> v); name type description cx jscontext * the context in which to perform the type check.
JS_Unlock
syntax void js_unlock(jsruntime *rt); name type description rt jsruntime * pointer to the runtime to unlock.
JS_ValueToBoolean
syntax jsbool js_valuetoboolean(jscontext *cx, jsval v, jsbool *bp); name type description cx jscontext * the context in which to perform the conversion.
JS_ValueToECMAInt32
syntax jsbool js_valuetoecmaint32(jscontext *cx, jsval v, int32 *ip); jsbool js_valuetoecmauint32(jscontext *cx, jsval v, uint32 *ip); jsbool js_valuetouint16(jscontext *cx, jsval v, uint16 *ip); name type description cx jscontext * the context in which to perform the conversion.
JS_ValueToFunction
syntax jsfunction * js_valuetofunction(jscontext *cx, js::handlevalue v); jsfunction * js_valuetoconstructor(jscontext *cx, js::handlevalue v); name type description cx jscontext * the context in which to perform the conversion.
JS_ValueToId
syntax bool js_valuetoid(jscontext *cx, js::handlevalue v, js::mutablehandleid idp); bool js_stringtoid(jscontext *cx, js::handlestring s, js::mutablehandleid idp); // added in spidermonkey 38 bool js_indextoid(jscontext *cx, uint32_t index, js::mutablehandleid idp); // added in spidermonkey 17 bool js_charstoid(jscontext* cx, js::twobytechars chars, js::mutablehandleid idp); // added in spidermonkey 24 void js::protokeytoid(jscontext *cx, jsprotokey key, js::mutablehandleid idp); // added in spidermonkey 38 name type description cx jscontext * a context.
JS_ValueToInt32
syntax jsbool js_valuetoint32(jscontext *cx, jsval v, int32 *ip); name type description cx jscontext * the context in which to perform the conversion.
JS_ValueToNumber
syntax jsbool js_valuetonumber(jscontext *cx, jsval v, jsdouble *dp); name type description cx jscontext * the context in which to perform the conversion.
JS_ValueToObject
syntax bool js_valuetoobject(jscontext *cx, js::handlevalue v, js::mutablehandleobject objp); name type description cx jscontext * the context in which to convert the value.
JS_ValueToSource
syntax jsstring * js_valuetosource(jscontext *cx, js::handle<js::value> v); name type description cx jscontext * the context in which to perform the conversion.
JS_ValueToString
syntax jsstring * js_valuetostring(jscontext *cx, jsval v); name type description cx jscontext * the context in which to perform the conversion.
JS_VersionToString
syntax const char * js_versiontostring(jsversion version); name type description version jsversion version value to convert.
JS_YieldRequest
syntax void js_yieldrequest(jscontext *cx); name type description cx jscontext * the jscontext that is currently in a request on the calling thread.
JS_freeop
syntax void js_freeop(jsfreeop *fop, void *p); name type description fop jsfreeop * a pointer to jsfreeop structure to be used to get the implementation of free.
JS_malloc
syntax void * js_malloc(jscontext *cx, size_t nbytes); void * js_realloc(jscontext *cx, void *p, size_t oldbytes, size_t newbytes); char * js_strdup(jscontext *cx, const char *s); void js_free(jscontext *cx, void *p); name type description cx jscontext * pointer to a js context.
JS_updateMallocCounter
syntax void js_updatemalloccounter(jscontext *cx, size_t nbytes); name type description cx jscontext * pointer to a js context to decrement the malloc counter.
OBJECT_TO_JSVAL
syntax jsval object_to_jsval(jsobject *obj); name type description obj jsobject * a pointer to a javascript object to convert to a jsval.
PRIVATE_TO_JSVAL
syntax jsval private_to_jsval(void *ptr); void * jsval_to_private(jsval v); // obsoleted since jsapi 32 description with private_to_jsval(), an application can store a private data pointer, p, as a jsval.
STRING_TO_JSVAL
syntax jsval string_to_jsval(jsstring *str) name type description obj jsstring * a pointer to a js string to convert to a jsval.
jsint
syntax typedef ...
SpiderMonkey 1.8
when javascript 1.8 support is enabled, the parser accepts some incorrect programs by inserting a semicolon where it should instead throw a syntaxerror (bug 384758).
Shell global objects
syntaxparse(code) check the syntax of a string, returning success value offthreadcompilescript(code[, options]) compile code on a helper thread.
TPS Tests
troubleshooting and debugging tips for writing and running tps tests tps evaluates the whole file in every phase, so any syntax error(s) in the file will get reported in phase 1, even though the error may not be in phase 1 itself.
The Rust programming language
it prevents segmentation faults and guarantees thread safety, all with an easy-to-learn syntax.
Task graph
these tasks include build and test tasks, along with lots of other kinds of tasks to build docker images, build toolchains, perform analyses, check syntax, and so on.
The Publicity Stream API
possible error codes include: denied - if the user refuses to publicize the activity permissiondenied - if the publicizing site is not allowed to post to the publicity stream networkerror - if the publicity server is unreachable activityparseerror - if the activity contains syntax errors (not proper json) invalidactivity - if the activity contains semantic errors (i.e.
Using XPCOM Utilities to Make Things Easier
} the style or syntax may be unfamilar, but smart pointers are worth learning and using because they simplify the task of managing references.
Creating XPCOM components
macros declaration macros weblock2.cpp string classes in xpcom using strings nsembedstring and nsembedcstring smart pointers starting weblock getting called at startup registering for notifications getting access to the category manager providing access to weblock creating the weblock programming interface defining the weblock interface in xpidl the xpidl syntax scriptable interfaces subclassing nsisupports the web locking interface implementing weblock declaration macros representing return values in xpcom xpidl code generation getting the weblock service from a client implementing the iweblock interface the directory service modifying paths with nsifile manipulating files with nsifile using nsilocalfile for reading data ...
Mozilla internal string guide
the syntax is: prbool findinreadable(const nsastring& pattern, nsastring::const_iterator start, nsastring::const_iterator end, nsstringcomparator& acomparator = nsdefaultstringcomparator()); to use this, start and end should point to the beginning and end of a string that you would like to search.
Components.Exception
syntax var exception = [ new ] components.exception([ message [, result [, stack [, data ] ] ] ]); parameters message a string which can be displayed in the error console when your exception is thrown or in other developer-facing locations, defaulting to 'exception' result the nsresult value of the exception, which defaults to components.results.ns_error_failure stack an xpcom stack to be set on the exception (defaulting to the current stack chain) ...
Components.ID
syntax var interfaceid = [ new ] components.id(iid); parameters iid a string of the format '{00000000-0000-0000-0000-000000000000}' giving the interface id of the interface description components.id creates interface ids for use in implementing methods like queryinterface, getinterfaces, and other methods that take interface ids as parameters.
Components.isSuccessCode
syntax var succeeded = components.issuccesscode(returncode); parameters returncode the return code (of type nsresult) to be checked.
Components.utils.cloneInto
syntax components.utils.cloneinto(obj, targetscope[, options]); parameters obj : object the object to clone.
Components.utils.createObjectIn
syntax var newobject = components.utils.createobjectin(obj, options); parameters obj an object indicating the compartment in which the new object should be created; the new object will be created in the scope of this object's compartment.
Components.utils.evalInWindow
syntax var result = components.utils.evalinwindow(script, window); parameters script : string the script to evaluate in the other window.
Components.utils.exportFunction
syntax components.utils.exportfunction(func, targetscope[, options]); parameters func : function the function to export.
Components.utils.getGlobalForObject
syntax var global = components.utils.getglobalforobject(obj); parameters obj an object whose corresponding global object is to be retrieved; non-optional, must be object-valued example var obj = {}; function foo() { } var global = this; var g1 = components.utils.getglobalforobject(foo); var g2 = components.utils.getglobalforobject(obj); // g1 === global, g2 === global, g1 === g2 // in a script in another window var global2 = this; function bar() { } var obj2 = {}; // then, assuming bar refers to the function defined in that other window: var o1 ...
Components.utils.getWeakReference
syntax weakref = components.utils.getweakreference(obj); parameters obj the object for which to obtain a weak reference.
Components.utils.importGlobalProperties
syntax void components.utils.importglobalproperties([string1, string2, ...]); parameters [string1, string2, ...] an array of strings.
Components.utils.isXrayWrapper
syntax boolean components.utils.isxraywrapper(obj); parameters obj the object to check.
Components.utils.makeObjectPropsNormal
syntax void components.utils.makeobjectpropsnormal(obj); parameters obj the object for which to ensure all methods are in its scope.
Components.utils.setGCZeal
this method calls through to that thusly: js_setgczeal(<current context>, zeal, js_default_zeal_freq, false); syntax components.utils.setgczeal(zeal); where zeal is the zeal value you wish to use.
Components.utils.unload
syntax components.utils.unload( url ); parameters url the "resource://" url of the script to unload.
Components.utils.unwaiveXrays
syntax xray = components.utils.unwaivexrays(obj); parameters obj the object for which we wish to restore xrays.
Components.utils.waiveXrays
syntax waived = components.utils.waivexrays(obj); parameters obj the object for which we wish to waive xrays.
XPCShell Reference
the command line the command-line syntax for xpcshell is: xpcshell [-s] [-w] [-w] [-v version] [-f scriptfile] [scriptfile] [scriptarg...] -c this option turns on the "compile-only" mode.
XPCshell Test Manifest Expressions
the conditions accept a simple boolean expression syntax, described here.
NS_POSTCONDITION
syntax ns_postcondition(expressiontotest, "error text"); see also ns_precondition ns_assertion ...
NS_PRECONDITION
syntax ns_precondition(expressiontotest, "error text"); see also ns_assertion ns_postcondition ...
mozIStorageConnection
this should be specified using the same syntax the create table statement uses.
nsIHttpServer
if it doesn't * match the field-value production in rfc 2616 * @note * no syntax checking is done of the given type, beyond ensuring that it is * a valid header field value.
nsIMsgDBHdr
the value here will effectively be the unparsed header content, so it will contain full mime-encoded syntax.
nsIParserUtils
at present, sanitizing css syntax in svg presentational attributes is not supported, so this option flattens out svg.
nsITraceableChannel
this example uses promise syntax that is available in firefox 30 and onwards.
nsIURI
inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) see the following rfcs for details: rfc3490: internationalizing domain names in applications (idna) rfc3986: uniform resource identifier (uri): generic syntax rfc3987: internationalized resource identifiers subclasses of nsiuri, such as nsiurl, impose further structure on the uri.
nsIURIFixup
createfixupuri() converts the specified string into a uri, first attempting to correct any errors in the syntax or other vagaries.
nsIWebContentHandlerRegistrar
otherwise ns_error_dom_syntax_err will be thrown.
nsIXULTemplateResult
this property identifies only the default handling and may be overridden by syntax used in the template.
NS_ADDREF
syntax ns_addref(foo); see also ns_if_addref ns_release ...
NS_ASSERTION
syntax ns_assertion(expressiontotest, "error text"); see also ns_abort_if_false ns_precondition ns_postcondition disabling assertion dialog box on windows ...
NS_ENSURE_ARG_POINTER
syntax ns_ensure_arg_pointer(apointer); ...
NS ENSURE SUCCESS
syntax ns_ensure_success(nsresult, return-value); usage nsresult mozmyclass::mozstringmucking() { nsresult rv = ns_cstringcopy(mdeststring, msrcstring); ns_ensure_success(rv, rv); // this is the same as doing: nsresult rv = ns_cstringcopy(mdeststring, msrcstring); if (ns_failed(rv)) return rv; return ns_ok; } ...
NS ENSURE TRUE
syntax ns_ensure_true( expr, return-value ); usage nsresult mozmyclass::mozstringmucking() { char *foo = new char[123]; ns_ensure_true(foo, ns_error_out_of_memory); // this is equivalent to doing: if (!foo) return ns_error_out_of_memory; // thou shalt not return ns_error_failure..
NS_ERROR
syntax ns_error("error text"); ...
NS_IF_ADDREF
ns_if_addref(foo) is equal to if (foo) foo->addref(); syntax ns_if_addref(foo); see also ns_addref ...
NS_IF_RELEASE
ns_if_release is exactly equivalent to the following function: inline void ns_if_release(nsisupports* foo) { if (foo) foo->release(); foo = 0; } syntax ns_if_release(foo); see also ns_addref, ns_release ...
NS_RELEASE
ns_release(foo) is equal to foo->release(); foo = 0; syntax ns_release(foo); see also ns_addref, ns_if_release ...
NS_WARNING
syntax ns_warning("warning text"); ...
Storage
sqlite syntax query language understood by sqlite sqlite database browser is a capable free tool available for many platforms.
XUL Overlays
MozillaTechXULOverlays
<overlay id="main-overlay" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <menu id="file_menu"> <menuitem name="example one"/> <menuitem name="example two"/> <menuitem name="example three"/> <menuitem name="example four" position="1"/> </menu> </overlay> the node with the position attribute orders itself to the top of the menu.
Address Book examples
formulate a boolean search string (see nsiabcard for built-in property names): var searchquery = "(or(primaryemail,bw,@v)(nickname,bw,@v)(and(ismaillist,=,true)(notes,bw,@v)))"; searchquery = searchquery.replace(/@v/g, encodeuricomponent("mystr") the search queries use lisp syntax with operators enumerated in nsabquerystringtoexpression.cpp.
Building a Thunderbird extension 1: introduction
these provide features like syntax highlighting and code coloration, indentation, auto-complete, etc.
Building a Thunderbird extension 3: install manifest
open the file called install.rdf that you created at the top of your extension's directory hierarchy and paste the following text into the file: <?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>myfirstext@jen.zed</em:id> <em:name>my first extension</em:name> <em:version>1.0</em:version> <em:creator>jenzed</em:creator> <em:targetapplication> <description> <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id> <em:minversion>1.5</...
customDBHeaders Preference
me/content/superfluous.js \ chrome/content/superfluous_overlay.xul \ install.rdf superfluous.xpi: ${deps} zip $@ ${deps} chrome.manifest: content superfluous chrome/content/ overlay chrome://messenger/content/messenger.xul chrome://superfluous/content/superfluous_overlay.xul install.rdf: <?xml version='1.0' encoding='utf-8'?> <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>superfluous@yoursite.com</em:id> <em:version>0.1.1</em:version> <em:type>2</em:type> <!-- 2 is type 'extension' --> <em:targetapplication> <description> <!-- this next line identifies tbird as target --> <em:id>{3550f703-e582-4d05...
Using COM from js-ctypes
converted c code now we can translate whole code into c syntax.
Declaring and Calling Functions
once declared, functions can be called using standard function syntax.
Standard OS Libraries
syntax and variable types are found on the documentation pages linked from this page.
Working with data
creating uninitialized cdata objects there are three forms of the syntax for creating cdata objects without immediately assigning them a value: var mycdataobj = new type; var mycdataobj = new type(); var mycdataobj = type(); these all do the same thing: they return a new cdata object of the specified type, whose data buffer has been populated entirely with zeroes.
FunctionType
syntax returns a new ctype object describing a c function.
Int64
syntax creates and returns a new 64-bit signed integer.
UInt64
syntax creates and returns a new 64-bit unsigned integer.
Mozilla
it prevents segmentation faults and guarantees thread safety, all with an easy-to-learn syntax.
Memory - Plugins
the npn_memalloc method has the following syntax: void *npn_memalloc (uint32 size); the size parameter is an unsigned long integer that represents the amount of memory, in bytes, to allocate in the browser's memory space.
URLs - Plugins
for more information, see rfc 3986, "uniform resource identifier (uri): generic syntax", and the iana uri scheme registry.
Use a source map - Firefox Developer Tools
the comment's syntax is like this: //# sourcemappingurl=http://example.com/path/to/your/sourcemap.map in the video above we load https://mdn.github.io/devtools-examples/sourcemaps-in-console/index.html.
Source map errors - Firefox Developer Tools
typical error messages here are: syntaxerror: json.parse: unexpected character at line 1 column 1 of the json data error: "version" is a required argument original source missing an original source may be missing.
Debugger.Source - Firefox Developer Tools
currently, the text is an s-expression based syntax.
Index - Firefox Developer Tools
if you open a json file in the browser, or view a remote url with the content-type set to application/json, it is parsed and given syntax highlighting.
JSON viewer - Firefox Developer Tools
if you open a json file in the browser, or view a remote url with the content-type set to application/json, it is parsed and given syntax highlighting.
Edit fonts - Firefox Developer Tools
the descriptor is expandable — when opened it shows its full syntax as defined in the stylesheet.
Shader Editor - Firefox Developer Tools
for example, you can modify the colors: the editor highlights syntax errors in your code: if you hover over the cross shown next to a line containing an error, you'll see more details about the problem: ...
Console messages - Firefox Developer Tools
please use the content-security-policy and content-security-report-only headers with csp spec compliant syntax instead.
ANGLE_instanced_arrays.drawArraysInstancedANGLE() - Web APIs
syntax void ext.drawarraysinstancedangle(mode, first, count, primcount); parameters mode a glenum specifying the type primitive to render.
ANGLE_instanced_arrays.drawElementsInstancedANGLE() - Web APIs
syntax void ext.drawelementsinstancedangle(mode, count, type, offset, primcount); parameters mode a glenum specifying the type primitive to render.
ANGLE_instanced_arrays.vertexAttribDivisorANGLE() - Web APIs
syntax void ext.vertexattribdivisorangle(index, divisor); parameters index a gluint specifying the index of the generic vertex attributes.
AbortController.AbortController() - Web APIs
syntax var controller = new abortcontroller(); parameters none.
AbortController.abort() - Web APIs
syntax controller.abort(); parameters none.
AbortController.signal - Web APIs
syntax var signal = abortcontroller.signal; value an abortsignal object instance.
AbortSignal.aborted - Web APIs
syntax var isaborted = abortsignal.aborted; value a boolean examples in the following snippet, we create a new abortcontroller object, and get its abortsignal (available in the signal property).
AbortSignal.onabort - Web APIs
syntax abortsignal.onabort = function() { ...
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.
AbstractRange.collapsed - Web APIs
syntax var iscollpased = range.collapsed value a boolean value which is true if the range is collapsed.
AbstractRange.endContainer - Web APIs
syntax var endnode = range.endcontainer value the dom node which contains the final character of the range.
AbstractRange.endOffset - Web APIs
syntax var endoffset = range.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.
AbstractRange.startContainer - Web APIs
syntax var startnode = range.startcontainer value the dom node inside which the start position of the range is found.
AbstractRange.startOffset - Web APIs
syntax var startoffset = range.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.
AbstractWorker.onerror - Web APIs
syntax myworker.onerror = function() { ...
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.
Accelerometer.x - Web APIs
WebAPIAccelerometerx
syntax var xacceleration = accelerometer.x value a number.
Accelerometer.y - Web APIs
WebAPIAccelerometery
syntax var yacceleration = accelerometer.y value a number.
Accelerometer.z - Web APIs
WebAPIAccelerometerz
syntax var zacceleration = accelerometer.z value a number.
AddressErrors.addressLine - Web APIs
syntax var addresslineerror = addresserrors.addressline; value if an error occurred during validation of the address due to one of the strings in the addressline array having an invalid value, this property is set to a domstring providing a human-readable error message explaining the validation error.
AddressErrors.city - Web APIs
syntax var cityerror = addresserrors.city; value if the value specified in the paymentaddress object's city property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.country - Web APIs
syntax var countryerror = addresserrors.country; value if an error occurred during validation of the address due to the country property having an invalid value, this property is set to a domstring providing a human-readable error message explaining the validation error.
AddressErrors.dependentLocality - Web APIs
syntax var localityerror = addresserrors.dependentlocality; value if the value specified in the paymentaddress object's dependentlocality property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.organization - Web APIs
syntax var organizationerror = addresserrors.organization; value if the value specified in the paymentaddress object's organization property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.phone - Web APIs
syntax var phoneerror = addresserrors.phone; value if the value specified in the paymentaddress object's phone property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.postalCode - Web APIs
syntax var postcodeerror = addresserrors.postcode; value if the value specified in the paymentaddress object's postalcode property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.recipient - Web APIs
syntax var recipienterror = addresserrors.recipient; value if the value specified in the paymentaddress object's recipient property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.region - Web APIs
syntax var regionerror = addresserrors.region; value if the value specified in the paymentaddress object's region property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.regionCode - Web APIs
syntax var regioncodeerror = addresserrors.regioncode; value if the value specified in the paymentaddress object's regioncode property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.sortingCode - Web APIs
syntax var sortingcodeerror = addresserrors.sortingcode; value if the value specified in the paymentaddress object's sortingcode property could not be validated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it.
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.
AmbientLightSensor.illuminance - Web APIs
syntax var level = ambientlightsensor.illuminance value a number indicating the current light level in lux.
AnalyserNode.AnalyserNode() - Web APIs
syntax var analysernode = new analysernode(context, ?options); parameters inherits parameters from the audionodeoptions dictionary.
AnalyserNode.fftSize - Web APIs
syntax var curvalue = analysernode.fftsize; analysernode.fftsize = newvalue; value an unsigned integer, representing the window size of the fft, given in number of samples.
AnalyserNode.frequencyBinCount - Web APIs
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.getByteFrequencyData() - Web APIs
syntax var audioctx = new audiocontext(); var analyser = audioctx.createanalyser(); var dataarray = new uint8array(analyser.frequencybincount); // uint8array should be the same length as the frequencybincount void analyser.getbytefrequencydata(dataarray); // fill the uint8array with data returned from getbytefrequencydata() parameters array the uint8array that the frequency domain data will be...
AnalyserNode.getByteTimeDomainData() - Web APIs
syntax const audioctx = new audiocontext(); const analyser = audioctx.createanalyser(); const dataarray = new uint8array(analyser.fftsize); // uint8array should be the same length as the fftsize analyser.getbytetimedomaindata(dataarray); // fill the uint8array with data returned from getbytetimedomaindata() parameters array the uint8array that the time domain data will be copied to.
AnalyserNode.getFloatFrequencyData() - Web APIs
syntax var audioctx = new audiocontext(); var analyser = audioctx.createanalyser(); var dataarray = new float32array(analyser.frequencybincount); // float32array should be the same length as the frequencybincount void analyser.getfloatfrequencydata(dataarray); // fill the float32array with data returned from getfloatfrequencydata() parameters array the float32array that the frequency domain data...
AnalyserNode.getFloatTimeDomainData() - Web APIs
syntax var audioctx = new audiocontext(); var analyser = audioctx.createanalyser(); var dataarray = new float32array(analyser.fftsize); // float32array needs to be the same length as the fftsize analyser.getfloattimedomaindata(dataarray); // fill the float32array with data returned from getfloattimedomaindata() parameters array the float32array that the time domain data will be copied to.
AnalyserNode.maxDecibels - Web APIs
syntax var curvalue = analysernode.maxdecibels; analysernode.maxdecibels = newvalue; value a double, representing the maximum decibel value for scaling the fft analysis data, where 0 db is the loudest possible sound, -10 db is a 10th of that, etc.
AnalyserNode.minDecibels - Web APIs
syntax var curvalue = analysernode.mindecibels; analysernode.mindecibels = newvalue; value a double, representing the minimum decibel value for scaling the fft analysis data, where 0 db is the loudest possible sound, -10 db is a 10th of that, etc.
AnalyserNode.smoothingTimeConstant - Web APIs
syntax var smoothvalue = analysernode.smoothingtimeconstant; analysernode.smoothingtimeconstant = newvalue; value a double within the range 0 to 1 (0 meaning no time averaging).
Animation() - Web APIs
syntax var animation = new animation([effect][, timeline]); parameters effect optional the target effect, as an object based on the animationeffectreadonly interface, to assign to the animation.
Animation.cancel() - Web APIs
WebAPIAnimationcancel
syntax animation.cancel(); parameters none.
Animation.commitStyles() - Web APIs
syntax animation.commitstyles(); parameters none.
Animation.currentTime - Web APIs
syntax var currenttime = animation.currenttime; animation.currenttime = newtime; value a number representing the current time in milliseconds, or null to deactivate the animation.
Animation.effect - Web APIs
WebAPIAnimationeffect
syntax var effect = animation.effect; animation.effect = animationeffectreadonly value a animationeffectreadonly object describing the target animation effect for the animation, or null to indicate no active effect.
Animation.finish() - Web APIs
WebAPIAnimationfinish
syntax animation.finish(); parameters none.
Animation.finished - Web APIs
syntax var animationspromise = animation.finished; value a promise object which will resolve once the animation has finished running.
Animation.id - Web APIs
WebAPIAnimationid
syntax var animationsid = animation.id; animation.id = newidstring; value a domstring which can be used to identify the animation, or null if the animation has no id.
Animation.oncancel - Web APIs
syntax var cancelhandler = animation.oncancel; animation.oncancel = cancelhandler; value a function to be executed when the animation is cancelled, or null if there is no cancel event handler.
Animation.onfinish - Web APIs
syntax var finishhandler = animation.onfinish; animation.onfinish = finishhandler; value a function to be called to handle the finish event, or null if no finish event handler is set.
Animation.onremove - Web APIs
syntax var removehandler = animation.onremove; animation.onremove = removehandler; value a function to be called to handle the remove event, or null if no remove event handler is set.
Animation.pause() - Web APIs
WebAPIAnimationpause
syntax animation.pause(); parameters none.
Animation.pending - Web APIs
WebAPIAnimationpending
syntax var pending = animation.pending; value true if the animation is pending, false otherwise.
Animation.persist() - Web APIs
WebAPIAnimationpersist
syntax animation.persist(); parameters none.
Animation.play() - Web APIs
WebAPIAnimationplay
syntax animation.play(); parameters none.
Animation.playState - Web APIs
syntax var currentplaystate = animation.playstate; animation.playstate = newstate; value idle the current time of the animation is unresolved and there are no pending tasks.
Animation.playbackRate - Web APIs
syntax var currentplaybackrate = animation.playbackrate; animation.playbackrate = newrate; value takes a number that can be 0, negative, or positive.
Animation.ready - Web APIs
WebAPIAnimationready
syntax var readypromise = animation.ready; value a promise which resolves when the animation is ready to be played.
Animation.replaceState - Web APIs
syntax let myreplacestate = animation.replacestate; value a string that represents the replace state of the anmation.
Animation.reverse() - Web APIs
WebAPIAnimationreverse
syntax animation.reverse(); parameters none.
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.timeline - Web APIs
syntax var animationstimeline = animation.timeline; animation.timeline = newtimeline; value a timeline object to use as the timing source for the animation, or null to use the default, which is the document's timeline.
Animation.updatePlaybackRate() - Web APIs
syntax animation.updateplaybackrate(2); parameters playbackrate the new speed to set.
AnimationEffect.getComputedTiming() - Web APIs
syntax var currenttimevalues = animation.getcomputedtiming(); parameters none.
AnimationEffect.getTiming() - Web APIs
syntax animationtiming = animation.gettiming(); returns an effecttiming object.
AnimationEffect.updateTiming() - Web APIs
syntax animation.updatetiming(timing); parameters timing an optionaleffecttiming object containing the timing properties to update.
AnimationEvent() - Web APIs
syntax animationevent = new animationevent(type, {animationname: apropertyname, elapsedtime : afloat, pseudoelement: apseudoelementname}); parameters the animationevent() constructor also inherits arguments from event().
AnimationEvent.animationName - Web APIs
syntax name = animationevent.animationname specifications specification status comment css animationsthe definition of 'animationevent.animationname' in that specification.
AnimationEvent.elapsedTime - Web APIs
syntax time = animationevent.elapsedtime specifications specification status comment css animationsthe definition of 'animationevent.elapsedtime' in that specification.
AnimationEvent.initAnimationEvent() - Web APIs
syntax animationevent.initanimationevent(typearg, canbubblearg, cancelablearg, animationnamearg, elapsedtimearg); parameters typearg a domstring identifying the specific type of animation event that occurred.
AnimationEvent.pseudoElement - Web APIs
syntax name = animationevent.pseudoelement specifications specification status comment css animationsthe definition of 'animationevent.pseudoelement' in that specification.
AnimationPlaybackEvent.AnimationPlaybackEvent() - Web APIs
syntax var animationplaybackevent = new animationplaybackevent(type, eventinitdict); parameters type a domstring representing the name of the event.
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.localName - Web APIs
WebAPIAttrlocalName
syntax name = attribute.localname return value a domstring representing the local part of the attribute's qualified name.
Attr.namespaceURI - Web APIs
WebAPIAttrnamespaceURI
syntax namespace = attribute.namespaceuri example in this snippet, an attribute is being examined for its localname and its namespaceuri.
Attr.prefix - Web APIs
WebAPIAttrprefix
syntax string = attribute.prefix examples the following logs "x" to the console.
AudioBuffer() - Web APIs
syntax var audiobuffer = new audiobuffer(options); parameters inherits parameters from the audionodeoptions dictionary.
AudioBuffer.copyFromChannel() - Web APIs
syntax myarraybuffer.copyfromchannel(destination, channelnumber, startinchannel); parameters destination a float32array to copy the channel's samples to.
AudioBuffer.copyToChannel() - Web APIs
syntax myarraybuffer.copytochannel(source, channelnumber, startinchannel); parameters source a float32array that the channel data will be copied from.
AudioBuffer.duration - Web APIs
syntax var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); myarraybuffer.duration; value a double.
AudioBuffer.getChannelData() - Web APIs
syntax var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); var nowbuffering = myarraybuffer.getchanneldata(channel); parameters channel the channel property is an index representing the particular channel to get data for.
AudioBuffer.length - Web APIs
syntax var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); myarraybuffer.length; value an integer.
AudioBuffer.numberOfChannels - Web APIs
syntax var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); myarraybuffer.numberofchannels; value an integer.
AudioBuffer.sampleRate - Web APIs
syntax var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); myarraybuffer.samplerate; value a floating-point value indicating the current sample rate of the buffers data, in samples per second.
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
syntax var audiobuffersourcenode = new audiobuffersourcenode(context, options) parameters inherits parameters from the audionodeoptions dictionary.
AudioBufferSourceNode.buffer - Web APIs
syntax audiobuffersourcenode.buffer = soundbuffer; value an audiobuffer which contains the data representing the sound which the node will play.
AudioBufferSourceNode.detune - Web APIs
syntax var source = audioctx.createbuffersource(); source.detune.value = 100; // value in cents note: though the audioparam returned is read-only, the value it represents is not.
AudioBufferSourceNode.loop - Web APIs
syntax var loopingenabled = audiobuffersourcenode.loop; audiobuffersourcenode.loop = true | false; value a boolean which is true if looping is enabled; otherwise, the value is false.
AudioBufferSourceNode.loopEnd - Web APIs
syntax audiobuffersourcenode.loopend = endoffsetinseconds; var endoffsetinseconds = audiobuffersourcenode.loopend; value a floating-point number indicating the offset, in seconds, into the audio buffer at which each loop will loop return to the beginning of the loop (that is, the current play time gets reset to audiobuffersourcenode.loopstart).
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.playbackRate - Web APIs
syntax audiobuffersourcenode.playbackrate.value = playbackrateproportion; value an audioparam whose value is a floating-point value indicating the playback rate of the audio as a decimal proportion of the original sampling rate.
AudioBufferSourceNode.start() - Web APIs
syntax audiobuffersourcenode.start([when][, offset][, duration]); parameters when optional the time, in seconds, at which the sound should begin to play, in the same time coordinate system used by the audiocontext.
AudioContext() - Web APIs
syntax var audioctx = new audiocontext(); var audioctx = new audiocontext(options); parameters options optional an object based on the audiocontextoptions dictionary that contains zero or more optional properties to configure the new context.
AudioContext.baseLatency - Web APIs
syntax var baselatency = audioctx.baselatency; value a double representing the base latency in seconds.
AudioContext.close() - Web APIs
syntax var audioctx = new audiocontext(); audioctx.close().then(function() { ...
AudioContext.createJavaScriptNode() - Web APIs
syntax var jsnode = audioctx.createjavascriptnode(buffersize, numinputchannels, numoutputchannels); parameters buffersize the buffer size must be in units of sample frames, i.e., one of: 256, 512, 1024, 2048, 4096, 8192, or 16384.
AudioContext.createMediaElementSource() - Web APIs
syntax var audioctx = new audiocontext(); var source = audioctx.createmediaelementsource(mymediaelement); parameters mymediaelement an htmlmediaelement object that you want to feed into an audio processing graph to manipulate.
AudioContext.createMediaStreamDestination() - Web APIs
syntax var audioctx = new audiocontext(); var destination = audioctx.createmediastreamdestination(); returns a mediastreamaudiodestinationnode.
AudioContext.createMediaStreamSource() - Web APIs
syntax audiosourcenode = audiocontext.createmediastreamsource(stream); parameters stream a mediastream to serve as an audio source to be fed into an audio processing graph for use and manipulation.
AudioContext.createMediaStreamTrackSource() - Web APIs
syntax var audioctx = new audiocontext(); var track = audioctx.createmediastreamtracksource(track); parameters track the mediastreamtrack to use as the source of all audio data for the new node.
AudioContext.getOutputTimestamp() - Web APIs
syntax var timestamp = audiocontext.getoutputtimestamp() parameters none.
AudioContext.outputLatency - Web APIs
syntax var outputlatency = audioctx.outputlatency; value a double representing the output latency in seconds.
AudioContext.resume() - Web APIs
syntax completepromise = audiocontext.resume(); parameters none.
AudioContext.suspend() - Web APIs
syntax var audioctx = new audiocontext(); audioctx.suspend().then(function() { ...
AudioContextOptions.latencyHint - Web APIs
syntax audiocontextoptions.latencyhint = "interactive"; audiocontextoptions.latencyhint = 0.2; var latencyhint = audiocontextoptions.latencyhint; value the preferred maximum latency for the audiocontext.
AudioContextOptions.sampleRate - Web APIs
syntax audiocontextoptions.samplerate = 44100; var samplerate = audiocontextoptions.samplerate; value the desired sample rate for the audiocontext, specified in samples per second.
AudioDestinationNode.maxChannelCount - Web APIs
syntax var audioctx = new audiocontext(); var mydestination = audioctx.destination; mydestination.maxchannelcount = 2; value an unsigned long.
AudioListener.dopplerFactor - Web APIs
syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.dopplerfactor = 1; value a double indicating the doppler effect's pitch shift value.
AudioListener.forwardX - Web APIs
syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.forwardx.value = 0; value an audioparam.
AudioListener.forwardY - Web APIs
syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.forwardy.value = 0; value an audioparam.
AudioListener.forwardZ - Web APIs
syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.forwardz.value = 0; value an audioparam.
AudioListener.positionX - Web APIs
syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.positionx.value = 1; value an audioparam.
AudioListener.positionY - Web APIs
syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.positiony.value = 1; value an audioparam.
AudioListener.positionZ - Web APIs
syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.positionz.value = 1; value an audioparam.
AudioListener.setOrientation() - Web APIs
syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.setorientation(0,0,-1,0,1,0); returns void.
AudioListener.setPosition() - Web APIs
syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.setposition(1,1,1); returns void.
AudioListener.speedOfSound - Web APIs
syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.speedofsound = 343.3; value a double.
AudioListener.upX - Web APIs
WebAPIAudioListenerupX
syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.upx.value = 0; value an audioparam.
AudioListener.upY - Web APIs
WebAPIAudioListenerupY
syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.upy.value = 0; value an audioparam.
AudioListener.upZ - Web APIs
WebAPIAudioListenerupZ
syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.upz.value = 0; value an audioparam.
AudioListener - Web APIs
properties the position, forward, and up value are set and retrieved using different syntaxes.
AudioNode.channelCount - Web APIs
syntax var oscillator = audioctx.createoscillator(); var channels = oscillator.channelcount; value an integer.
AudioNode.channelCountMode - Web APIs
syntax var oscillator = audioctx.createoscillator(); oscillator.channelcountmode = 'explicit'; value a enumerated value representing a channelcountmode.
AudioNode.channelInterpretation - Web APIs
syntax var oscillator = audioctx.createoscillator(); oscillator.channelinterpretation = 'discrete'; value an enumerated value representing a channelinterpretation.
AudioNode.connect() - Web APIs
WebAPIAudioNodeconnect
syntax var destinationnode = audionode.connect(destination, outputindex, inputindex); audionode.connect(destination, outputindex); parameters destination the audionode or audioparam to which to connect.
AudioNode.context - Web APIs
WebAPIAudioNodecontext
syntax var acontext = anaudionode.context; value the audiocontext or offlineaudiocontext object that was used to construct this audionode.
AudioNode.disconnect() - Web APIs
syntax audionode.disconnect(); audionode.disconnect(output); audionode.disconnect(destination); audionode.disconnect(destination, output); audionode.disconnect(destination, output, input); return value undefined parameters there are several versions of the disconnect() method, which accept different combinations of parameters to control which nodes to disconnect from.
AudioNode.numberOfInputs - Web APIs
syntax var numinputs = audionode.numberofinputs; value an integer ≥ 0.
AudioNode.numberOfOutputs - Web APIs
syntax var numoutputs = audionode.numberofoutputs; value an integer ≥ 0.
AudioNodeOptions - Web APIs
syntax var audionodeoptions = { "channelcount" : 2, "channelcountmode" : "max", "channelinterpretation" : "discrete" } properties channelcount optional represents an integer used to determine how many channels are used when up-mixing and down-mixing connections to any inputs to the node.
AudioParam.cancelAndHoldAtTime() - Web APIs
syntax var audioparam = audioparam.cancelandholdattime(canceltime) parameters canceltime a double representing the time (in seconds) after the audiocontext was first created after which all scheduled changes will be cancelled.
AudioParam.cancelScheduledValues() - Web APIs
syntax var audioparam = audioparam.cancelscheduledvalues(starttime) parameters starttime a double representing the time (in seconds) after the audiocontext was first created after which all scheduled changes will be cancelled.
AudioParam.defaultValue - Web APIs
syntax var defaultval = audioparam.defaultvalue; value a floating-point number.
AudioParam.exponentialRampToValueAtTime() - Web APIs
syntax var audioparam = audioparam.exponentialramptovalueattime(value, endtime) parameters value a floating point number representing the value the audioparam will ramp to by the given time.
AudioParam.linearRampToValueAtTime() - Web APIs
syntax var audioparam = audioparam.linearramptovalueattime(value, endtime) parameters value a floating point number representing the value the audioparam will ramp to by the given time.
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.setTargetAtTime() - Web APIs
syntax var paramref = param.settargetattime(target, starttime, timeconstant); parameters target the value the parameter will start to transition towards at the given start time.
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.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.
AudioParam.value - Web APIs
WebAPIAudioParamvalue
syntax var curvalue = audioparam.value; audioparam.value = newvalue; value a floating-point number indicating the parameter's value as of the current time.
AudioScheduledSourceNode.onended - Web APIs
syntax audioscheduledsourcenode.onended = eventhandler; value a function which is called by the browser when the ended event occurs on the audioscheduledsourcenode.
AudioScheduledSourceNode.start() - Web APIs
syntax audioscheduledsourcenode.start([when [, offset [, duration]]]); parameters when optional the time, in seconds, at which the sound should begin to play.
AudioScheduledSourceNode.stop() - Web APIs
syntax audioscheduledsourcenode.stop([when]); parameters when optional the time, in seconds, at which the sound should stop playing.
AudioTrack.enabled - Web APIs
syntax isaudioenabled = audiotrack.enabled; audiotrack.enabled = true | false; value the enabled property is a boolean whose value is true if the track is enabled; enabled tracks produce audio while the media is playing.
AudioTrack.id - Web APIs
WebAPIAudioTrackid
syntax var trackid = audiotrack.id; value a domstring which identifies the track, suitable for use when calling gettrackbyid() on an audiotracklist such as the one specified by a media element's audiotracks property.
AudioTrack.kind - Web APIs
WebAPIAudioTrackkind
syntax var trackkind = audiotrack.kind; value a domstring specifying the type of content the media represents.
AudioTrack.label - Web APIs
WebAPIAudioTracklabel
syntax var audiotracklabel = audiotrack.label; value a domstring specifying the track's human-readable label, if one is available in the track metadata.
AudioTrack.language - Web APIs
syntax var audiotracklanguage = audiotrack.language; value a domstring specifying the bcp 47 (rfc 5646) format language tag of the primary language used in the audio track, or an empty string ("") if the language is not specified or known, or if the track doesn't contain speech.
AudioTrack.sourceBuffer - Web APIs
syntax var sourcebuffer = audiotrack.sourcebuffer; value a sourcebuffer or null.
AudioTrack - Web APIs
usage notes to get an audiotrack for a given media element, use the element's audiotracks property, which returns an audiotracklist object from which you can get the individual tracks contained in the media: var el = document.queryselector("video"); var tracks = el.audiotracks; you can then access the media's individual tracks using either array syntax or functions such as foreach().
AudioTrackList.getTrackById() - Web APIs
syntax var thetrack = audiotracklist.gettrackbyid(id); paramters id a domstring indicating the id of the track to locate within the track list.
AudioTrackList.length - Web APIs
syntax var trackcount = audiotracklist.length; value a number indicating how many audio tracks are included in the audiotracklist.
AudioTrackList.onaddtrack - Web APIs
syntax audiotracklist.onaddtrack = eventhandler; value set onaddtrack to a function that accepts as input a trackevent object which indicates in its track property which audio track has been added to the media.
AudioTrackList.onchange - Web APIs
syntax audiotracklist.onchange = eventhandler; value set onchange to a function that should be called whenever tracks are enabled or disabled on the media element.
AudioTrackList.onremovetrack - Web APIs
syntax audiotracklist.onremovetrack = eventhandler; value set onremovetrack to a function that accepts as input a trackevent object which indicates in its track property which audio track has been removed from the media element.
AudioTrackList - Web APIs
the individual tracks can be accessed using array syntax.
AudioWorkletGlobalScope.registerProcessor - Web APIs
syntax audioworkletglobalscope.registerprocessor(name, processorctor); parameters name a string representing the name under which the processor will be registered.
AudioWorkletNode() - Web APIs
syntax var node = new audioworkletnode(context, name); var node = new audioworkletnode(context, name, options); parameters context the baseaudiocontext instance this node will be associated with.
AudioWorkletNode.onprocessorerror - Web APIs
syntax audioworkletnode.onprocessorerror = function() { ...
AudioWorkletNode.parameters - Web APIs
syntax audioworkletnodeinstance.parameters value the audioparammap object containing audioparam instances.
AudioWorkletNode.port - Web APIs
syntax audioworkletnodeinstance.port; value the messageport object that is connecting the audioworkletnode and its associated audioworkletprocessor.
AudioWorkletProcessor() - Web APIs
syntax the audioworkletprocessor and classes that derive from it cannot be instantiated directly from a user-supplied code.
AudioWorkletProcessor.parameterDescriptors (static getter) - Web APIs
syntax audioworkletprocessorsubclass.parameterdescriptors; value an iterable of audioparamdescriptor-based objects.
AudioWorkletProcessor.port - Web APIs
syntax audioworkletprocessorinstance.port; value the messageport object that is connecting the audioworkletprocessor and the associated audioworkletnode.
AudioWorkletProcessor.process - Web APIs
syntax var isactivelyprocessing = audioworkletprocessor.process(inputs, outputs, parameters); parameters inputs an array of inputs connected to the node, each item of which is, in turn, an array of channels.
AuthenticatorAssertionResponse.authenticatorData - Web APIs
syntax var authnrdata = authenticatorassertionresponse.authenticatordata; value an arraybuffer that has a arraybuffer.bytelength of at least 37 bytes, containing the following fields: rpidhash (32 bytes) - a sha256 hash of the relying party id that was seen by the browser.
AuthenticatorAssertionResponse.signature - Web APIs
syntax signature = authenticatorassertionresponse.signature value an arraybuffer object which the signature of the authenticator (using its private key) for both authenticatorassertionresponse.authenticatordata and a sha-256 hash given by the client for its data (the challenge, the origin, etc.
AuthenticatorAssertionResponse.userHandle - Web APIs
syntax userhandle = authenticatorassertionresponse.userhandle value an arraybuffer object which is an opaque identifier for the current user.
AuthenticatorAttestationResponse.attestationObject - Web APIs
syntax attestobj = authenticatorattestationresponse.attestationobject properties after decoding the cbor encoded arraybuffer, the resulting javascript object will contain the following properties: authdata the same as authenticatorassertionresponse.authenticatordata.
AuthenticatorAttestationResponse.getTransports() - Web APIs
syntaxe arrtransports = authenticatorattestationresponse.gettransports() parameters none.
AuthenticatorResponse.clientDataJSON - Web APIs
syntax var arraybuffer = authenticatorattestationresponse.clientdatajson; var arraybuffer = authenticatorassertionresponse.clientdatajson; value an arraybuffer.
BaseAudioContext.audioWorklet - Web APIs
syntax baseaudiocontextinstance.audioworklet; value an audioworklet instance.
BaseAudioContext.createAnalyser() - Web APIs
syntax var analysernode = baseaudiocontext.createanalyser(); returns an analysernode.
BaseAudioContext.createBiquadFilter() - Web APIs
syntax baseaudiocontext.createbiquadfilter(); returns a biquadfilternode.
BaseAudioContext.createBuffer() - Web APIs
syntax var buffer = baseaudiocontext.createbuffer(numofchannels, length, samplerate); parameters note: for an in-depth explanation of how audio buffers work, and what these parameters mean, read audio buffers: frames, samples and channels from our basic concepts guide.
BaseAudioContext.createBufferSource() - Web APIs
syntax var source = baseaudiocontext.createbuffersource(); returns an audiobuffersourcenode.
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.createConstantSource() - Web APIs
syntax var constantsourcenode = audiocontext.createconstantsource() parameters none.
BaseAudioContext.createConvolver() - Web APIs
syntax baseaudiocontext.createconvolver(); returns a convolvernode.
BaseAudioContext.createDelay() - Web APIs
syntax var delaynode = audioctx.createdelay(maxdelaytime); parameters maxdelaytime optional the maximum amount of time, in seconds, that the audio signal can be delayed by.
BaseAudioContext.createDynamicsCompressor() - Web APIs
syntax baseaudioctx.createdynamicscompressor(); returns a dynamicscompressornode.
BaseAudioContext.createGain() - Web APIs
syntax var gainnode = audiocontext.creategain(); return value a gainnode which takes as input one or more audio sources and outputs audio whose volume has been adjusted in gain (volume) to a level specified by the node's gainnode.gain a-rate parameter.
BaseAudioContext.createIIRFilter() - Web APIs
syntax var iirfilter = audiocontext.createiirfilter(feedforward, feedback); parameters feedforward an array of floating-point values specifying the feedforward (numerator) coefficients for the transfer function of the iir filter.
BaseAudioContext.createOscillator() - Web APIs
syntax var oscillatornode = audioctx.createoscillator(); returns an oscillatornode.
BaseAudioContext.createPanner() - Web APIs
syntax baseaudioctx.createpanner(); returns a pannernode.
BaseAudioContext.createPeriodicWave() - Web APIs
syntax var wave = audiocontext.createperiodicwave(real, imag[, constraints]); returns a periodicwave.
BaseAudioContext.createScriptProcessor() - Web APIs
syntax var scriptprocessor = audioctx.createscriptprocessor(buffersize, numberofinputchannels, numberofoutputchannels); parameters buffersize the buffer size in units of sample-frames.
BaseAudioContext.createStereoPanner() - Web APIs
syntax baseaudiocontext.createstereopanner(); returns a stereopannernode.
BaseAudioContext.createWaveShaper() - Web APIs
syntax baseaudioctx.createwaveshaper(); returns a waveshapernode.
BaseAudioContext.currentTime - Web APIs
syntax var curtime = baseaudiocontext.currenttime; example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); // older webkit/blink browsers require a prefix ...
BaseAudioContext.destination - Web APIs
syntax baseaudiocontext.destination; value an audiodestinationnode.
BaseAudioContext.listener - Web APIs
syntax baseaudiocontext.listener; value an audiolistener object.
BaseAudioContext.onstatechange - Web APIs
syntax baseaudiocontext.onstatechange = function() { ...
BaseAudioContext.sampleRate - Web APIs
syntax baseaudiocontext.samplerate; value a floating point number indicating the audio context's sample rate, in samples per second.
BaseAudioContext.state - Web APIs
syntax baseaudiocontext.state; value a domstring.
BasicCardRequest.supportedNetworks - Web APIs
syntax supportednetworks : [value [, ...
BasicCardRequest.supportedTypes - Web APIs
syntax basiccardrequest.supportedtypes = [cardtype1...cardtypen]; value an array containing one or more domstrings, which describe the card types the retailer supports.
BasicCardResponse.billingAddress - Web APIs
syntax "billingaddress" : paymentaddress value a paymentaddress object representing the billing address of the card.
BasicCardResponse.cardNumber - Web APIs
syntax "cardnumber" : "number" value a domstring representing the credit card number.
BasicCardResponse.cardSecurityCode - Web APIs
syntax "cardsecuritycode" : "number" value a domstring representing the card security code.
BasicCardResponse.cardholderName - Web APIs
syntax name = basiccardresponse.cardholdername; value a domstring indicating the name of the cardholder.
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.
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.
BatteryManager.charging - Web APIs
syntax var charging = battery.charging on return, charging indicates whether or not the battery, which is a batterymanager object, is currently being charged; if the battery is charging, this value is true.
BatteryManager.chargingTime - Web APIs
syntax var time = battery.chargingtime on return, time is the remaining time in seconds until the battery, which is a batterymanager object, is fully charged, or 0 if the battery is already fully charged.
BatteryManager.dischargingTime - Web APIs
syntax var time = battery.dischargingtime on return, time is the remaining time in seconds until the battery, which is a batterymanager object, is fully discharged and the system will suspend.
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.
BatteryManager.onchargingchange - Web APIs
syntax battery.onchargingchange = funcref where battery is a batterymanager object, and funcref is a function to be called when the chargingchange event occurs.
BatteryManager.onchargingtimechange - Web APIs
syntax battery.onchargingtimechange = funcref where battery is a batterymanager object, and funcref is a function to be called when the chargingtimechange event occurs.
BatteryManager.ondischargingtimechange - Web APIs
syntax battery.ondischargingtimechange = funcref where battery is a batterymanager object, and funcref is a function to be called when the dischargingtimechange event occurs.
BatteryManager.onlevelchange - Web APIs
syntax navigator.battery.onlevelchange = funcref where battery is a batterymanager object, and funcref is a function to be called when the levelchange event occurs.
BeforeInstallPromptEvent.prompt() - Web APIs
syntax beforeinstallpromptevent.prompt() parameters none.
BiquadFilterNode() - Web APIs
syntax var biquadfilternode = new biquadfilternode(context, options) parameters inherits parameters from the audionodeoptions dictionary.
BiquadFilterNode.Q - Web APIs
syntax var audioctx = new audiocontext(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.q.value = 100; note: though the audioparam returned is read-only, the value it represents is not.
BiquadFilterNode.detune - Web APIs
syntax var audioctx = new audiocontext(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.detune.value = 100; note: though the audioparam returned is read-only, the value it represents is not.
BiquadFilterNode.frequency - Web APIs
syntax var audioctx = new audiocontext(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.frequency.value = 3000; note: though the audioparam returned is read-only, the value it represents is not.
BiquadFilterNode.gain - Web APIs
syntax var audioctx = new audiocontext(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.gain.value = 25; note: though the audioparam returned is read-only, the value it represents is not.
BiquadFilterNode.getFrequencyResponse() - Web APIs
syntax biquadfilternode.getfrequencyresponse(frequencyarray, magresponseoutput, phaseresponseoutput); parameters frequencyarray a float32array containing an array of frequencies, specified in hertz, which you want to filter.
BiquadFilterNode.type - Web APIs
syntax var audioctx = new audiocontext(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.type = 'lowpass'; value a string (enum) representing a biquadfiltertype.
Blob() - Web APIs
WebAPIBlobBlob
syntax var newblob = new blob(array, options); parameters array an array of arraybuffer, arraybufferview, blob, usvstring objects, or a mix of any of such objects, that will be put inside the blob.
Blob.arrayBuffer() - Web APIs
WebAPIBlobarrayBuffer
syntax var bufferpromise = blob.arraybuffer(); blob.arraybuffer().then(buffer => /* process the arraybuffer */); var buffer = await blob.arraybuffer(); parameters none.
Blob.size - Web APIs
WebAPIBlobsize
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.slice() - Web APIs
WebAPIBlobslice
syntax var newblob = blob.slice(start, end, contenttype); parameters start optional an index into the blob indicating the first byte to include in the new blob.
Blob.stream() - Web APIs
WebAPIBlobstream
syntax var stream = blob.stream(); parameters none.
Blob.text() - Web APIs
WebAPIBlobtext
syntax var textpromise = blob.text(); blob.text().then(text => /* do something with the text */); var text = await blob.text(); parameters none.
Blob.type - Web APIs
WebAPIBlobtype
syntax var mimetype = blob.type value a domstring containing the file's mime type, or an empty string if the type could not be determined.
BlobEvent.BlobEvent() - Web APIs
syntax blobevent = new blobevent({data: aspecificblob}[, timecode]); arguments the blobevent() constructor also inherits arguments from event().
BlobEvent.data - Web APIs
WebAPIBlobEventdata
syntax associatedblob = blobevent.data specifications specification status comment mediastream recordingthe definition of 'blobevent.data' in that specification.
BlobEvent.timecode - Web APIs
syntax var timecode = blobevent.timecode value a domhighrestimestamp.
Bluetooth.getAvailability() - Web APIs
syntax var readerpromise = bluetooth.getavailability(); parameters none.
Bluetooth.getDevices() - Web APIs
syntax var readerpromise = bluetooth.getdevices(); parameters none.
Bluetooth.onavailabilitychanged - Web APIs
syntax bluetooth.onavailabilitychanged = functionref; value functionref is the handler function to be called when the bluetooth availabilitychanged event fires.
Bluetooth.referringDevice - Web APIs
syntax bluetooth.referringdevice value a bluetoothdevice, if the document was opened in response to an instruction sent by this device and null otherwise.
Bluetooth.requestDevice() - Web APIs
syntax bluetooth.requestdevice([options]) .then(function(bluetoothdevice) { ...
BluetoothAdvertisingData.appearance - Web APIs
syntax var appearance = bluetoothadvertisingdata.appearance; ...
manufacturerData - Web APIs
syntax varmanufacturerdata = bluetoothadvertisingdata.manufacturerdata; ...
rssi - Web APIs
syntax var rssi = bluetoothadvertisingdata.rssi; ...
serviceData - Web APIs
syntax var servicedata = bluetoothadvertisingdata.servicedata; ...
txPower - Web APIs
syntax var power = bluetoothadvertisingdata.txpower; ...
BluetoothCharacteristicProperties.authenticatedSignedWrites - Web APIs
syntax var aboolean = bluetoothcharacteristicproperties.authenticatedsignedwrites; value a boolean.
BluetoothCharacteristicProperties.broadcast - Web APIs
syntax var aboolean = bluetoothcharacteristicproperties.broadcast; value a boolean.
BluetoothCharacteristicProperties.indicate - Web APIs
syntax var aboolean = bluetoothcharacteristicproperties.indicate; value a boolean.
BluetoothCharacteristicProperties.notify - Web APIs
syntax var aboolean = bluetoothcharacteristicproperties.notify; value a boolean.
BluetoothCharacteristicProperties.read - Web APIs
syntax var aboolean = bluetoothcharacteristicproperties.read; value a boolean.
BluetoothCharacteristicProperties.reliableWrite - Web APIs
syntax var aboolean = bluetoothcharacteristicproperties.reliablewrite; value a boolean specifications specification status comment web bluetooththe definition of 'reliablewrite' in that specification.
BluetoothCharacteristicProperties.writableAuxiliaries - Web APIs
syntax var aboolean = bluetoothcharacteristicproperties.writableauxiliaries; value a boolean.
BluetoothCharacteristicProperties.write - Web APIs
syntax var aboolean = bluetoothcharacteristicproperties.write; value a boolean.
BluetoothCharacteristicProperties.writeWithoutResponse - Web APIs
syntax var aboolean = bluetoothcharacteristicproperties.writewithoutresponse; value a boolean.
adData - Web APIs
syntax var instanceofbluetoothaddata = instanceofbluetoothdevice.addata returns an instance of bluetoothadvertisingdata.
connectGATT() - Web APIs
syntax instanceofbluetoothdevice.connectgatt().then(function(bluetoothgattremoteserver) { ...
deviceClass - Web APIs
syntax var deviceclass = instanceofbluetoothdevice.deviceclass returns a number.
BluetoothDevice.gatt - Web APIs
syntax var gattserver = instanceofbluetoothdevice.gatt returns a reference to the device's bluetoothremotegattserver.
gattServer - Web APIs
syntax var gattserver = instanceofbluetoothdevice.gattserver returns a reference to the device's gatt server or null if the device is disconnected.
id - Web APIs
syntax var id = instanceofbluetoothdevice.id returns a domstring.
BluetoothDevice.name - Web APIs
syntax var name = instanceofbluetoothdevice.name returns a domstring.
BluetoothDevice.paired - Web APIs
syntax var paired = instanceofbluetoothdevice.paired returns a boolean.
productID - Web APIs
syntax var productid = instanceofbluetoothdevice.productid returns the 16-bit product id field.
productVersion - Web APIs
syntax var productversion = instanceofbluetoothdevice.productversion returns the 16-bit product version field.
BluetoothDevice.uuids - Web APIs
syntax var uuids[] =​ instanceofbluetoothdevice.uuids returns an array.
vendorID - Web APIs
syntax var vendorid = instanceofbluetoothdevice.vendorid returns the the 16-bit vendor id field.
vendorIDSource - Web APIs
syntax var vendoridsource = instanceofbluetoothdevice.vendoridsource returns the vendor id source field.
BluetoothRemoteGATTCharacteristic.getDescriptor() - Web APIs
syntax bluetoothremotegattcharacteristic.getdescriptor(bluetoothdescriptoruuid).then(function(bluetoothgattdescriptor) { ...
BluetoothRemoteGATTCharacteristic.getDescriptors() - Web APIs
syntax bluetoothremotegattcharacteristic.getdescriptors(bluetoothdescriptoruuid).then(function(bluetoothgattdescriptors[]) { ...
BluetoothRemoteGATTCharacteristic.properties - Web APIs
syntax var properties = bluetoothremotegattcharacteristic.properties returns the properties of this characteristic.
BluetoothRemoteGATTCharacteristic.readValue() - Web APIs
syntax bluetoothremotegattcharacteristic.readvalue().then(function(dataview) { ...
BluetoothRemoteGATTCharacteristic.service - Web APIs
syntax var bluetoothremotegattserviceinstance = bluetoothremotegattcharacteristic.service returns an instance bluetoothgattservice.
BluetoothRemoteGATTCharacteristic.startNotifications() - Web APIs
syntax bluetoothremotegattcharacteristic.startnotifications().then(function(bluetoothremotegattcharacteristic) { ...
BluetoothRemoteGATTCharacteristic.stopNotifications() - Web APIs
syntax bluetoothremotegattcharacteristic.stopnotifications().then(function(bluetoothremotegattcharacteristic) { ...
BluetoothRemoteGATTCharacteristic.uuid - Web APIs
syntax var uuid = bluetoothremotegattcharacteristic.uuid returns a domstring.
BluetoothRemoteGATTCharacteristic.value - Web APIs
syntax var value = bluetoothremotegattcharacteristic.value returns the currently cached characteristic value.
BluetoothRemoteGATTCharacteristic.writeValue() - Web APIs
syntax bluetoothremotegattcharacteristic.writevalue(value).then(function() { ...
characteristic - Web APIs
syntax var characteristic = bluetoothremotegattcharacteristic.characteristic returns an instance of bluetoothremotegattcharacteristic.
readValue() - Web APIs
syntax bluetoothremotegattdescriptor.readvalue().then(function(value[]) { ...
uuid - Web APIs
syntax var uuid = bluetoothremotegattdescriptor.uuid returns a uuid.
value - Web APIs
syntax var characteristic = bluetoothremotegattdescriptor.characteristic returns an arraybuffer.
writeValue() - Web APIs
syntax bluetoothremotegattdescriptor.writevalue(array[]).then(function() { ...
BluetoothRemoteGATTServer.connect() - Web APIs
syntax bluetoothremotegattserver.connect() .then(function(bluetoothremotegattserver) { ...
BluetoothRemoteGATTServer.connected - Web APIs
syntax var connected = bluetoothremotegattserver.connected specifications specification status comment web bluetooththe definition of 'connected' in that specification.
BluetoothRemoteGATTServer.device - Web APIs
syntax var device = bluetoothremotegattserver.device specifications specification status comment web bluetooththe definition of 'device' in that specification.
BluetoothRemoteGATTServer.disconnect() - Web APIs
syntax bluetoothremotegattserver.disconnect() returns none.
BluetoothRemoteGATTServer.getPrimaryService() - Web APIs
syntax bluetoothremotegattserver.getprimaryservice(bluetoothserviceuuid).then(function(bluetoothgattservice) { ...
BluetoothRemoteGATTServer.getPrimaryServices() - Web APIs
syntax bluetoothremotegattserver.getprimaryservices(bluetoothserviceuuid).then(function(bluetoothgattservices) { ...
device - Web APIs
syntax var bluetoothdeviceinstance = bluetoothgattservice.device returns an instance of bluetoothdevice.
getCharacteristic() - Web APIs
syntax bluetoothgattserviceinstance.getcharacteristic(characteristic).then(function(bluetoothgattcharacteristic) { ...
getCharacteristics() - Web APIs
syntax bluetoothgattserviceinstance.getcharacteristics(characteristics).then(function(bluetoothgattcharacteristic[]) { ...
getIncludedService() - Web APIs
syntax bluetoothgattserviceinstance.getincludedservice(service).then(function(bluetoothgattservice) { ...
getIncludedServices() - Web APIs
syntax bluetoothgattserviceinstance.getincludedservice(service).then(function(bluetoothgattservice) { ...
isPrimary - Web APIs
syntax var isprimary = bluetoothgattservice.isprimary returns a boolean.
uuid - Web APIs
syntax var uuid = bluetoothgattservice.uuid returns a domstring.
Body.arrayBuffer() - Web APIs
WebAPIBodyarrayBuffer
syntax response.arraybuffer().then(function(buffer) { // do something with buffer }); parameters none.
Body.blob() - Web APIs
WebAPIBodyblob
syntax response.blob().then(function(myblob) { // do something with myblob }); parameters none.
Body.body - Web APIs
WebAPIBodybody
syntax var stream = response.body; value a readablestream.
Body.bodyUsed - Web APIs
WebAPIBodybodyUsed
syntax var mybodyused = response.bodyused; value a boolean.
Body.formData() - Web APIs
WebAPIBodyformData
syntax response.formdata() .then(function(formdata) { // do something with your formdata }); parameters none.
Body.json() - Web APIs
WebAPIBodyjson
syntax response.json().then(data => { // do something with your data }); parameters none.
Body.text() - Web APIs
WebAPIBodytext
syntax response.text().then(function (text) { // do something with the text response }); parameters none.
BroadcastChannel() - Web APIs
syntax channel = new broadcastchannel(channel); values channel is a domstring representing the name of the channel; there is one single channel with this name for all browsing contexts with the same origin.
BroadcastChannel.close() - Web APIs
syntax var str = channel.close(); example // connect to a channel var bc = new broadcastchannel('test_channel'); // more operations (like postmessage, …) // when done, disconnect from the channel bc.close(); specifications specification status comment html living standardthe definition of 'broadcastchannel.close()' in that specification.
BroadcastChannel.name - Web APIs
syntax var str = channel.name; examples // connect to a channel var bc = new broadcastchannel('test_channel'); // more operations (like postmessage, …) // log the channel name to the console console.log(bc.name); // "test_channel" // when done, disconnect from the channel bc.close(); specifications specification status comment html living standardthe definition of 'broadcastchannel.name' in that specification.
BroadcastChannel.onmessage - Web APIs
syntax channel.onmessage = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
BroadcastChannel.onmessageerror - Web APIs
syntax bc.onmessageerror = function() { ...
BroadcastChannel.postMessage() - Web APIs
syntax var str = channel.postmessage(object); specifications specification status comment html living standardthe definition of 'broadcastchannel.postmessage()' in that specification.
BudgetService.getBudget() - Web APIs
syntax var apromise = budgetservice.getbudget(); apromise.then(function(budgetstate[]){ ...
BudgetService.getCost() - Web APIs
syntax var apromise = budgetservice.getcost(operation); apromise.then(function(somedouble){ ...
BudgetService.reserve() - Web APIs
syntax var apromise = budgetservice.reserve(operation); apromise.then(function(boolean){ ...
BudgetState.budgetAt - Web APIs
syntax var budget = budgetstate.budgetat value a double.
BudgetState.time - Web APIs
WebAPIBudgetStatetime
syntax var time = budgetstate.time value a timestamp.
ByteLengthQueuingStrategy.ByteLengthQueuingStrategy() - Web APIs
syntax var bytelengthqueuingstrategy = new bytelengthqueuingstrategy({highwatermark}); parameters {highwatermark} an object containing a highwatermark property.
ByteLengthQueuingStrategy.size() - Web APIs
syntax var size = bytelengthqueuingstrategy.size(chunk); parameters chunk a chunk of data being passed through the stream.
CSS.escape() - Web APIs
WebAPICSSescape
syntax escapedstr = css.escape(str); parameters str the cssomstring to be escaped.
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...
CSS.paintWorklet (Static property) - Web APIs
WebAPICSSpaintWorklet
syntax var worklet = css.paintworklet; value the paintworklet object.
CSSConditionRule - Web APIs
syntax the syntax is described using the webidl format.
CSSGroupingRule - Web APIs
csspagerule syntax the syntax is described using the webidl format.
CSSKeyframesRule - Web APIs
if it contains more than one keyframe rule, a domexception with a syntax_err is thrown.
CSSKeywordValue.CSSKeywordValue() - Web APIs
syntax var csskeywordvalue = new csskeywordvalue(val) parameters value sets or returns the value of the new csskeywordvalue.
CSSKeywordValue.value - Web APIs
syntax var val = csskeywordvalue.value csskeywordvalue.value = val value a usvstring.
CSSMathProduct.CSSMathProduct() - Web APIs
the cssmathproduct() constructor creates a new cssmathproduct object which creates a new cssmathproduct object which syntax var cssmathproduct = new cssmathproduct() parameters arg a value for the cssmathproduct object to be constructed either a double integer or a cssnumericvalue.
CSSMathProduct.values - Web APIs
syntax var cssnumericarray = cssmathproduct.values; value a cssnumericarray.
CSSMathSum.CSSMathSum() - Web APIs
syntax var cssmathsum = new cssmathsum() parameters values one or more double integers or cssnumericvalue objects.
CSSMathSum.values - Web APIs
WebAPICSSMathSumvalues
syntax var cssnumericarray = cssmathsum.values; value a cssnumericarray.
CSSMathValue.operator - Web APIs
syntax var astring = cssmathvalue.operator; value a string.
CSSMediaRule - Web APIs
syntax the syntax is described using the webidl format.
CSSNamespaceRule.namespaceURI - Web APIs
syntax var namespaceuri = cssnamespacerule.namespaceuri returns a domstring containing a uri.
CSSNamespaceRule.prefix - Web APIs
syntax var prefix = cssnamespacerule.prefix returns a domstring containing the prefix associated to this namespace.
CSSNamespaceRule - Web APIs
syntax the syntax is described using the webidl format.
CSSNumericValue.add() - Web APIs
syntax var cssmathsum = cssnumericvalue.add(double | cssnumericvalue); parameters number either a number or a cssnumericvalue.
CSSNumericValue.div() - Web APIs
syntax var cssnumericvalue = cssnumericvalue.div(number); parameters number either a number or a cssnumericvalue.
CSSNumericValue.equals() - Web APIs
syntax var boolean = cssnumericvalue.equals(number); parameters number either a number or a cssnumericvalue.
CSSNumericValue.max() - Web APIs
syntax var cssunitvalue = cssnumericvalue.man(number1 ...
CSSNumericValue.min() - Web APIs
syntax var cssunitvalue = cssnumericvalue.min(number1 ...
CSSNumericValue.mul() - Web APIs
syntax var cssmathproduct = cssnumericvalue.mul(number); parameters number either a number or a cssnumericvalue.
CSSNumericValue.sub() - Web APIs
syntax var cssmathsum = cssnumericvalue.sub(number); parameters number either a number or a cssmathsum.
CSSNumericValue.sum() - Web APIs
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.type - Web APIs
syntax var cssnumerictype = cssnumericvalue.type(); parameters none.
CSSPageRule - Web APIs
syntax the syntax is described using the webidl format.
CSSPositionValue.CSSPositionValue() - Web APIs
syntax cvar csspositionvalue = new csspositionvalue(x, y) parameters x a position along the web page's horizontal axis.
CSSPositionValue.x - Web APIs
syntax var x = csspositionvalue.x value a cssnumericvalue.
CSSPositionValue.y - Web APIs
syntax var y = csspositionvalue.y value a cssnumericvalue.
CSSPrimitiveValue.getCounterValue() - Web APIs
syntax var countervalue = cssprimitivevalue.getcountervalue(); return value a counter object representing the counter value.
CSSPrimitiveValue.getFloatValue() - Web APIs
syntax var floatvalue = cssprimitivevalue.getfloatvalue(unit); parameters unittype an unsigned short representing the code for the unit type, in which the value should be returned.
CSSPrimitiveValue.getRGBColorValue() - Web APIs
syntax var rgbcolorvalue = cssprimitivevalue.getrgbcolorvalue(); return value an rgbcolor object representing the color value.
CSSPrimitiveValue.getRectValue() - Web APIs
syntax var rectvalue = cssprimitivevalue.getrectvalue(); return value a rect object representing the rect value.
CSSPrimitiveValue.getStringValue() - Web APIs
syntax var stringvalue = cssprimitivevalue.getstringvalue(); return value a string value.
CSSPrimitiveValue.primitiveType - Web APIs
syntax type = cssprimitivevalue.primitivetype; value an unsigned short representing the type of the value.
CSSPrimitiveValue.setFloatValue() - Web APIs
syntax cssprimitivevalue.setfloatvalue(unittype, floatvalue); parameters unittype an unsigned short representing the code for the unit type, in which the value should be returned.
CSSPrimitiveValue.setStringValue() - Web APIs
syntax cssprimitivevalue.setstringvalue(stringtype, stringvalue); parameters stringtype an unsigned short representing the type of the value.
CSSPseudoElement.element - Web APIs
syntax var originatingelement = csspseudoelement.element; value an element representing the pseudo-element's originating element.
CSSPseudoElement.type - Web APIs
syntax var typeofpseudoelement = csspseudoelement.type; value a cssomstring containing one of the following values: "::before" "::after" "::marker" examples the example below demonstrates the relationship between csspseudoelement.type and element.pseudo(): const myelement = document.queryselector('q'); const myselector = '::after'; const csspseudoelement = myelement.pseudo(myselector); const typeofpseudoelement = csspseudoelement.type; console.log(myselector === typeofpseudoelement); // outputs true specifications specification status comment css pseudo-elements level 4the definition of 'type' in ...
CSSRule.cssText - Web APIs
WebAPICSSRulecssText
syntax string = cssrule.csstext example <style> body { background-color: darkblue; } </style> <script> var stylesheet = document.stylesheets[0]; alert(stylesheet.cssrules[0].csstext); // body { background-color: darkblue; } </script> specifications specification status comment css object model (cssom)the definition of 'cssrule: csstext' in that specificati...
CSSRule.parentStyleSheet - Web APIs
syntax var stylesheet = cssrule.parentstylesheet parameters stylesheet is a stylesheet object.
CSSStyleDeclaration.getPropertyCSSValue() - Web APIs
syntax var value = style.getpropertycssvalue(property); parameters property is a domstring representing the property name to be retrieved.
CSSStyleDeclaration.getPropertyPriority() - Web APIs
syntax var priority = style.getpropertypriority(property); parameters property is a domstring representing the property name to be checked.
CSSStyleDeclaration.getPropertyValue() - Web APIs
syntax var value = style.getpropertyvalue(property); parameters property is a domstring representing the property name to be checked.
CSSStyleDeclaration.length - Web APIs
syntax var num = styles.length; value an integer that provides the number of styles explictly set on the parent of the instance.
CSSStyleDeclaration.parentRule - Web APIs
syntax var rule = styles.parentrule; value the css rule that contains this declaration block or null if this cssstyledeclaration is not attached to a cssrule.
CSSStyleDeclaration.removeProperty() - Web APIs
syntax var oldvalue = style.removeproperty(property); parameters property is a domstring representing the property name to be removed.
CSSStyleRule.style - Web APIs
syntax styleobj = cssrule.style example function stilo() { alert(document.stylesheets[0].cssrules[0].style.csstext); } // displays "background-color: gray;" notes the declaration block is that part of the style rule that appears within the braces and that actually provides the style definitions (for the selector, the part that comes before the braces).
CSSStyleRule.styleMap - Web APIs
syntax var stylepropertymap = cssstylerule.stylemap; value a stylepropertymap object.
CSSStyleSheet.addRule() - Web APIs
syntax var result = cssstylesheet.addrule(selector, styleblock, index); parameters selector a domstring specifying the selector portion of the css rule.
CSSStyleSheet.cssRules - Web APIs
syntax var rules = cssstylesheet.cssrules; value a live-updating cssrulelist containing each of the css rules making up the stylesheet.
CSSStyleSheet.deleteRule() - Web APIs
syntax cssstylesheet.deleterule(index) parameters index the index into the stylesheet's cssrulelist indicating the rule to be removed.
CSSStyleSheet.ownerRule - Web APIs
syntax var ownerrule = cssstylesheet.ownerrule; value a cssimportrule corresponding to the @import rule which imported the stylesheet into the document.
CSSStyleSheet.removeRule() - Web APIs
syntax cssstylesheet.removerule(index) parameters index the index into the stylesheet's cssrulelist indicating the rule to be removed.
CSSStyleSheet.rules - Web APIs
syntax var rules = cssstylesheet.rules; value a live-updating cssrulelist containing each of the css rules making up the stylesheet.
CSSStyleValue.parse() - Web APIs
syntax cssstylevalue.parse(property, csstext) parameters property a css property to set.
CSSStyleValue.parseAll() - Web APIs
syntax cssstylevalue.parseall(property, value) parameters property a css property to set.
CSSSupportsRule - Web APIs
syntax the syntax is described using the webidl format.
CSSUnitValue.CSSUnitValue() - Web APIs
syntax var cssunitvalue = new cssunitvalue() parameters value returns a double indicating the number of units.
CSSUnitValue.unit - Web APIs
WebAPICSSUnitValueunit
syntax var astring = cssunitvalue.unit; value a usvstring.
CSSUnitValue.value - Web APIs
syntax var cssunitvalue = cssunitvalue.value; cssunitvalue.value = cssunitvalue; value a double.
CSSUnparsedValue.CSSUnparsedValue() - Web APIs
syntax var cssunparsedvalue = new cssunparsedvalue(members) parameters members an array whose values must be either a usvstring or a cssvariablereferencevalue.
CSSUnparsedValue.entries() - Web APIs
syntax cssunparsedvalue.entries(obj) parameters obj the cssunparsedvalue whose enumerable own property [key, value] pairs are to be returned.
CSSUnparsedValue.forEach() - Web APIs
syntax cssunparsedvalue.foreach(function callback(currentvalue[, index[, array]]) { // your iterator }[, thisarg]); parameters callback the function to execute for each element, taking three arguments: currentvalue the value of the current element being processed.
CSSUnparsedValue.keys() - Web APIs
syntax cssunparsedvalue.keys() parameters none.
CSSUnparsedValue.length - Web APIs
syntax var length = cssunparsedvalue.length; value an integer.
CSSUnparsedValue.values() - Web APIs
syntax cssunparsedvalue.values() parameters none.
CSSValue.cssText - Web APIs
WebAPICSSValuecssText
syntax csstext = cssvalue.csstext; value a domstring representing the current css property value.
CSSValue.cssValueType - Web APIs
syntax cssvaluetype = cssvalue.cssvaluetype; value an unsigned short representing a code defining the type of the value.
CSSValueList.item() - Web APIs
WebAPICSSValueListitem
syntax var cssvalue = cssvaluelist.item(index); parameters index an unsigned long representing the index of the css value within the collection.
CSSValueList.length - Web APIs
syntax var length = cssvaluelist.length; value an unsigned long representing the number of cssvalues.
CSSValueList - Web APIs
some properties allow an empty list in their syntax.
CSSVariableReferenceValue() - Web APIs
syntax new cssvariablereferencevalue(variable[, fallback]]) parameters variable a custom property name.
CSSVariableReferenceValue.fallback - Web APIs
syntax var fallback = cssvariablereferencevalue.fallback; value a cssunparsedvalue.
CSSVariableReferenceValue.variable - Web APIs
syntax var variable = cssvariablereferencevalue.variable; value a usvstring beginning with -- (that is, a custom property name).
Using dynamic styling information - Web APIs
to modify styles to a document using css syntax, one can insert rules or insert <style> tags whose innerhtml property is set to the desired css.
CSS Properties and Values API - Web APIs
examples the following uses css.registerproperty in javascript to type a css custom properties, --my-color, as a color, give it a default value, and not allow it to inherit its value: window.css.registerproperty({ name: '--my-color', syntax: '<color>', inherits: false, initialvalue: '#c0ffee', }); the same registration can take place in css using the following @property: @property --my-color { syntax: '<color>'; inherits: false; initial-value: #c0ffee; } specifications specification status comment css properties and values api level 1 working draft initial definition.
Cache.add() - Web APIs
WebAPICacheadd
syntax cache.add(request).then(function() { // request has been added to the cache }); parameters request the request you want to add to the cache.
Cache.addAll() - Web APIs
WebAPICacheaddAll
syntax cache.addall(requests[]).then(function() { // requests have been added to the cache }); parameters requests an array of string urls that you want to be fetched and added to the cache.
Cache.delete() - Web APIs
WebAPICachedelete
syntax cache.delete(request, {options}).then(function(found) { // your cache entry has been deleted if found }); parameters request the request you are looking to delete.
Cache.keys() - Web APIs
WebAPICachekeys
syntax cache.keys(request, {options}).then(function(keys) { // do something with your array of requests }); parameters request optional the request want to return, if a specific key is desired.
Cache.match() - Web APIs
WebAPICachematch
syntax cache.match(request, {options}).then(function(response) { // do something with the response }); parameters request the request for which you are attempting to find responses in the cache.
Cache.matchAll() - Web APIs
WebAPICachematchAll
syntax cache.matchall(request, {options}).then(function(response) { // do something with the response array }); parameters request optional the request for which you are attempting to find responses in the cache.
Cache.put() - Web APIs
WebAPICacheput
syntax cache.put(request, response).then(function() { // request/response pair has been added to the cache }); parameters request the request object or url that you want to add to the cache.
CacheStorage.delete() - Web APIs
syntax caches.delete(cachename).then(function(boolean) { // your cache is now deleted }); parameters cachename the name of the cache you want to delete.
CacheStorage.has() - Web APIs
WebAPICacheStoragehas
syntax caches.has(cachename).then(function(boolean) { // true: your cache exists!
CacheStorage.keys() - Web APIs
WebAPICacheStoragekeys
syntax caches.keys().then(function(keylist) { //do something with your keylist }); parameters none.
CacheStorage.match() - Web APIs
syntax caches.match(request, options).then(function(response) { // do something with the response }); parameters request the request you want to match.
CacheStorage.open() - Web APIs
WebAPICacheStorageopen
syntax caches.open(cachename).then(function(cache) { // do something with your cache }); parameters cachename the name of the cache you want to open.
CanvasCaptureMediaStreamTrack.canvas - Web APIs
syntax var elt = stream.canvas; value an htmlcanvaselement indicating the canvas which is the source of the frames being captured.
CanvasCaptureMediaStreamTrack.requestFrame() - Web APIs
syntax stream.requestframe(); return value undefined usage notes there is currently an issue flagged in the specification pointing out that at this time, no exceptions are being thrown if the canvas isn't origin-clean.
CanvasGradient - Web APIs
if the offset is not between 0 and 1, inclusive, an index_size_err is raised; if the color can't be parsed as a css <color>, a syntax_err is raised.
CanvasPattern.setTransform() - Web APIs
syntax void pattern.settransform(matrix); parameters matrix an svgmatrix or dommatrix to use as the pattern's transformation matrix.
CanvasRenderingContext2D.addHitRegion() - Web APIs
syntax void ctx.addhitregion(options); options the options argument is optional.
CanvasRenderingContext2D.arc() - Web APIs
syntax void ctx.arc(x, y, radius, startangle, endangle [, anticlockwise]); the arc() method creates a circular arc centered at (x, y) with a radius of radius.
CanvasRenderingContext2D.arcTo() - Web APIs
syntax void ctx.arcto(x1, y1, x2, y2, radius); parameters x1 the x-axis coordinate of the first control point.
CanvasRenderingContext2D.beginPath() - Web APIs
syntax void ctx.beginpath(); examples creating distinct paths this example creates two paths, each of which contains a single line.
CanvasRenderingContext2D.bezierCurveTo() - Web APIs
syntax void ctx.beziercurveto(cp1x, cp1y, cp2x, cp2y, x, y); parameters cp1x the x-axis coordinate of the first control point.
CanvasRenderingContext2D.canvas - Web APIs
syntax ctx.canvas; examples given this <canvas> element: <canvas id="canvas"></canvas> ...
CanvasRenderingContext2D.clearHitRegions() - Web APIs
syntax void ctx.clearhitregions(); examples using the clearhitregions method this example demonstrates the clearhitregions() method.
CanvasRenderingContext2D.clearRect() - Web APIs
syntax void ctx.clearrect(x, y, width, height); the clearrect() method sets the pixels in a rectangular area to transparent black (rgba(0,0,0,0)).
CanvasRenderingContext2D.clip() - Web APIs
syntax void ctx.clip([fillrule]); void ctx.clip(path [, fillrule]); parameters fillrule the algorithm by which to determine if a point is inside or outside the clipping region.
CanvasRenderingContext2D.closePath() - Web APIs
syntax void ctx.closepath(); examples closing a triangle this example creates the first two (diagonal) sides of a triangle using the lineto() method.
CanvasRenderingContext2D.createImageData() - Web APIs
syntax imagedata ctx.createimagedata(width, height); imagedata ctx.createimagedata(imagedata); parameters width the width to give the new imagedata object.
CanvasRenderingContext2D.createLinearGradient() - Web APIs
syntax canvasgradient ctx.createlineargradient(x0, y0, x1, y1); the createlineargradient() method is specified by four parameters defining the start and end points of the gradient line.
CanvasRenderingContext2D.createPattern() - Web APIs
syntax canvaspattern ctx.createpattern(image, repetition); parameters image a canvasimagesource to be used as the pattern's image.
CanvasRenderingContext2D.createRadialGradient() - Web APIs
syntax canvasgradient ctx.createradialgradient(x0, y0, r0, x1, y1, r1); the createradialgradient() method is specified by six parameters, three defining the gradient's start circle, and three defining the end circle.
CanvasRenderingContext2D.currentTransform - Web APIs
syntax ctx.currenttransform [= value]; value a dommatrix or svgmatrix object to use as the current transformation matrix.
CanvasRenderingContext2D.direction - Web APIs
syntax ctx.direction = "ltr" || "rtl" || "inherit"; options possible values: "ltr" the text direction is left-to-right.
CanvasRenderingContext2D.drawFocusIfNeeded() - Web APIs
syntax void ctx.drawfocusifneeded(element); void ctx.drawfocusifneeded(path, element); parameters element the element to check whether it is focused or not.
CanvasRenderingContext2D.drawImage() - Web APIs
syntax void ctx.drawimage(image, dx, dy); void ctx.drawimage(image, dx, dy, dwidth, dheight); void ctx.drawimage(image, sx, sy, swidth, sheight, dx, dy, dwidth, dheight); parameters image an element to draw into the context.
CanvasRenderingContext2D.drawWidgetAsOnScreen() - Web APIs
syntax void ctx.drawwidgetasonscreen(window); parameters window the window to render.
CanvasRenderingContext2D.drawWindow() - Web APIs
syntax void ctx.drawwindow(window, x, y, w, h, bgcolor [, flags]); parameters window the window to render.
CanvasRenderingContext2D.ellipse() - Web APIs
syntax void ctx.ellipse(x, y, radiusx, radiusy, rotation, startangle, endangle [, anticlockwise]); the ellipse() method creates an elliptical arc centered at (x, y) with the radii radiusx and radiusy.
CanvasRenderingContext2D.fill() - Web APIs
syntax void ctx.fill([fillrule]); void ctx.fill(path [, fillrule]); parameters fillrule the algorithm by which to determine if a point is inside or outside the filling region.
CanvasRenderingContext2D.fillRect() - Web APIs
syntax void ctx.fillrect(x, y, width, height); the fillrect() method draws a filled rectangle whose starting point is at (x, y) and whose size is specified by width and height.
CanvasRenderingContext2D.fillStyle - Web APIs
syntax ctx.fillstyle = color; ctx.fillstyle = gradient; ctx.fillstyle = pattern; options color a domstring parsed as css <color> value.
CanvasRenderingContext2D.fillText() - Web APIs
syntax canvasrenderingcontext2d.filltext(text, x, y [, maxwidth]); parameters text a domstring specifying the text string to render into the context.
CanvasRenderingContext2D.filter - Web APIs
syntax ctx.filter = "<filter-function1> [<filter-function2>] [<filter-functionn>]"; ctx.filter = "none"; values the filter property accepts a value of "none" or one or more of the following filter functions in a domstring.
CanvasRenderingContext2D.getImageData() - Web APIs
syntax ctx.getimagedata(sx, sy, sw, sh); parameters sx the x-axis coordinate of the top-left corner of the rectangle from which the imagedata will be extracted.
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).
CanvasRenderingContext2D.getTransform() - Web APIs
syntax let storedtransform = ctx.gettransform(); parameters none.
CanvasRenderingContext2D.globalAlpha - Web APIs
syntax ctx.globalalpha = value; options value a number between 0.0 (fully transparent) and 1.0 (fully opaque), inclusive.
CanvasRenderingContext2D.globalCompositeOperation - Web APIs
syntax ctx.globalcompositeoperation = type; type is a string identifying which of the compositing or blending mode operations to use.
CanvasRenderingContext2D.imageSmoothingEnabled - Web APIs
syntax ctx.imagesmoothingenabled = value; options value a boolean indicating whether to smooth scaled images or not.
CanvasRenderingContext2D.imageSmoothingQuality - Web APIs
syntax ctx.imagesmoothingquality = "low" || "medium" || "high" options possible values: "low" low quality.
CanvasRenderingContext2D.isPointInPath() - Web APIs
syntax ctx.ispointinpath(x, y [, fillrule]); ctx.ispointinpath(path, x, y [, fillrule]); parameters x the x-axis coordinate of the point to check, unaffected by the current transformation of the context.
CanvasRenderingContext2D.isPointInStroke() - Web APIs
syntax ctx.ispointinstroke(x, y); ctx.ispointinstroke(path, x, y); parameters x the x-axis coordinate of the point to check.
CanvasRenderingContext2D.lineCap - Web APIs
syntax ctx.linecap = "butt" || "round" || "square"; options "butt" the ends of lines are squared off at the endpoints.
CanvasRenderingContext2D.lineDashOffset - Web APIs
syntax ctx.linedashoffset = value; value a float specifying the amount of the line dash offset.
CanvasRenderingContext2D.lineJoin - Web APIs
syntax ctx.linejoin = "bevel" || "round" || "miter"; options there are three possible values for this property: "round", "bevel", and "miter".
CanvasRenderingContext2D.lineTo() - Web APIs
syntax ctx.lineto(x, y); parameters x the x-axis coordinate of the line's end point.
CanvasRenderingContext2D.lineWidth - Web APIs
syntax ctx.linewidth = value; options value a number specifying the line width, in coordinate space units.
CanvasRenderingContext2D.measureText() - Web APIs
syntax ctx.measuretext(text); parameters text the text string to measure.
CanvasRenderingContext2D.miterLimit - Web APIs
syntax ctx.miterlimit = value; options value a number specifying the miter limit ratio, in coordinate space units.
CanvasRenderingContext2D.moveTo() - Web APIs
syntax void ctx.moveto(x, y); parameters x the x-axis (horizontal) coordinate of the point.
CanvasRenderingContext2D.putImageData() - Web APIs
syntax void ctx.putimagedata(imagedata, dx, dy); void ctx.putimagedata(imagedata, dx, dy, dirtyx, dirtyy, dirtywidth, dirtyheight); parameters imagedata an imagedata object containing the array of pixel values.
CanvasRenderingContext2D.quadraticCurveTo() - Web APIs
syntax void ctx.quadraticcurveto(cpx, cpy, x, y); parameters cpx the x-axis coordinate of the control point.
CanvasRenderingContext2D.rect() - Web APIs
syntax void ctx.rect(x, y, width, height); the rect() method creates a rectangular path whose starting point is at (x, y) and whose size is specified by width and height.
CanvasRenderingContext2D.removeHitRegion() - Web APIs
syntax void ctx.removehitregion(id); parameters id a domstring representing the id of the region that is to be removed.
CanvasRenderingContext2D.resetTransform() - Web APIs
syntax void ctx.resettransform(); examples resetting the matrix this example draws a rotated rectangle after modifying the matrix, and then resets the matrix using the resettransform() method.
CanvasRenderingContext2D.restore() - Web APIs
syntax void ctx.restore(); examples restoring a saved state this example uses the save() method to save the default state and restore() to restore it later, so that you are able to draw a rect with the default state later.
CanvasRenderingContext2D.rotate() - Web APIs
syntax void ctx.rotate(angle); parameters angle the rotation angle, clockwise in radians.
CanvasRenderingContext2D.save() - Web APIs
syntax void ctx.save(); examples saving the drawing state this example uses the save() method to save the default state and restore() to restore it later, so that you are able to draw a rect with the default state later.
CanvasRenderingContext2D.scale() - Web APIs
syntax void ctx.scale(x, y); parameters x scaling factor in the horizontal direction.
CanvasRenderingContext2D.scrollPathIntoView() - Web APIs
syntax void ctx.scrollpathintoview(); void ctx.scrollpathintoview(path); parameters path a path2d path to use.
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).
CanvasRenderingContext2D.setTransform() - Web APIs
syntax ctx.settransform(a, b, c, d, e, f); ctx.settransform(matrix); the transformation matrix is described by: [acebdf001]\left[ \begin{array}{ccc} a & c & e \\ b & d & f \\ 0 & 0 & 1 \end{array} \right] parameters settransform() has two types of parameter that it can accept.
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.
CanvasRenderingContext2D.shadowColor - Web APIs
syntax ctx.shadowcolor = color; color a domstring parsed as a css <color> value.
CanvasRenderingContext2D.shadowOffsetX - Web APIs
syntax ctx.shadowoffsetx = offset; offset a float specifying the distance that shadows will be offset horizontally.
CanvasRenderingContext2D.shadowOffsetY - Web APIs
syntax ctx.shadowoffsety = offset; offset a float specifying the distance that shadows will be offset vertically.
CanvasRenderingContext2D.stroke() - Web APIs
syntax void ctx.stroke(); void ctx.stroke(path); parameters path a path2d path to stroke.
CanvasRenderingContext2D.strokeRect() - Web APIs
syntax void ctx.strokerect(x, y, width, height); the strokerect() method draws a stroked rectangle whose starting point is at (x, y) and whose size is specified by width and height.
CanvasRenderingContext2D.strokeStyle - Web APIs
syntax ctx.strokestyle = color; ctx.strokestyle = gradient; ctx.strokestyle = pattern; options color a domstring parsed as css <color> value.
CanvasRenderingContext2D.strokeText() - Web APIs
syntax canvasrenderingcontext2d.stroketext(text, x, y [, maxwidth]); parameters text a domstring specifying the text string to render into the context.
CanvasRenderingContext2D.textAlign - Web APIs
syntax ctx.textalign = "left" || "right" || "center" || "start" || "end"; options possible values: "left" the text is left-aligned.
CanvasRenderingContext2D.textBaseline - Web APIs
syntax ctx.textbaseline = "top" || "hanging" || "middle" || "alphabetic" || "ideographic" || "bottom"; options possible values: "top" the text baseline is the top of the em square.
CanvasRenderingContext2D.transform() - Web APIs
syntax void ctx.transform(a, b, c, d, e, f); the transformation matrix is described by: [acebdf001]\left[ \begin{array}{ccc} a & c & e \\ b & d & f \\ 0 & 0 & 1 \end{array} \right] parameters a (m11) horizontal scaling.
CanvasRenderingContext2D.translate() - Web APIs
syntax void ctx.translate(x, y); the translate() method adds a translation transformation to the current matrix by moving the canvas and its origin x units horizontally and y units vertically on the grid.
Drawing text - Web APIs
this string uses the same syntax as the css font property.
ChannelMergerNode() - Web APIs
syntax var mynode = new channelmergernode(context, options); parameters context a baseaudiocontext representing the audio context you want the node to be associated with.
ChannelSplitterNode.ChannelSplitterNode() - Web APIs
syntax var splitter = new channelspitternode(context, options); parameters inherits parameters from the audionodeoptions dictionary.
ChildNode.after() - Web APIs
WebAPIChildNodeafter
syntax [throws, unscopable] void childnode.after((node or domstring)...
ChildNode.before() - Web APIs
WebAPIChildNodebefore
syntax [throws, unscopable] void childnode.before((node or domstring)...
ChildNode.remove() - Web APIs
WebAPIChildNoderemove
syntax node.remove(); example using remove() <div id="div-01">here is div-01</div> <div id="div-02">here is div-02</div> <div id="div-03">here is div-03</div> var el = document.getelementbyid('div-02'); el.remove(); // removes the div with the 'div-02' id childnode.remove() is unscopable the remove() method is not scoped into the with statement.
ChildNode.replaceWith() - Web APIs
syntax [throws, unscopable] void childnode.replacewith((node or domstring)...
Client.frameType - Web APIs
WebAPIClientframeType
syntax var myframetype = client.frametype; example tbd specifications specification status comment service workersthe definition of 'frametype' in that specification.
Client.id - Web APIs
WebAPIClientid
syntax var clientid = client.id; example tbd specifications specification status comment service workersthe definition of 'id' in that specification.
Client.postMessage() - Web APIs
syntax client.postmessage(message[, transfer]); client.postmessage(message[, { transfer }]); parameters message the message to send to the client.
Client.type - Web APIs
WebAPIClienttype
syntax var myclienttype = client.type; value a string, representing the client type.
Client.url - Web APIs
WebAPIClienturl
syntax var clienturl = client.url; value a usvstring.
Clients.claim() - Web APIs
WebAPIClientsclaim
syntax await clients.claim(); parameters none.
Clients.get() - Web APIs
WebAPIClientsget
syntax self.clients.get(id).then(function(client) { // do something with your returned client }); parameters id a domstring representing the id of the client you want to get.
Clients.matchAll() - Web APIs
WebAPIClientsmatchAll
syntax self.clients.matchall(options).then(function(clients) { // do something with your clients list }); parameters options optional an options object allowing you to set options for the matching operation.
Clients.openWindow() - Web APIs
syntax self.clients.openwindow(url).then(function(windowclient) { // do something with your windowclient }); parameters url a usvstring representing the url of the client you want to open in the window.
Clipboard.read() - Web APIs
WebAPIClipboardread
syntax var promise = navigator.clipboard.read(); parameters none.
Clipboard.readText() - Web APIs
syntax var promise = navigator.clipboard.readtext() parameters none.
Clipboard.write() - Web APIs
WebAPIClipboardwrite
syntax var promise = navigator.clipboard.write(data) parameters data an array of clipboarditem objects containing data to be written to the clipboard.
Clipboard.writeText() - Web APIs
syntax var promise = navigator.clipboard.writetext(newcliptext) parameters newcliptext the domstring to be written to the clipboard.
ClipboardEvent() - Web APIs
syntax var clipboardevent = new clipboardevent(type[, options]); parameters the clipboardevent() constructor also inherits arguments from event().
ClipboardEvent.clipboardData - Web APIs
syntax data = clipboardevent.clipboarddata specifications specification status comment clipboard api and eventsthe definition of 'clipboardevent.clipboarddata' in that specification.
ClipboardItem() - Web APIs
syntax var clipboarditem = new clipboarditem(clipboarditemdata); parameters clipboarditemdata an object with the mime type as the key and blob as the value.
ClipboardItem.getType() - Web APIs
syntax var blob = clipboarditem.gettype(type); parameters type a valid mime type.
ClipboardItem.types - Web APIs
the read-only types property of the clipboarditem interface returns an array of mime types available within the clipboarditem syntax var types = clipboarditem.types; value an array of available mime types.
CloseEvent() - Web APIs
syntax var event = new closeevent(typearg, closeeventinit); values typearg is a domstring representing the name of the event.
CloseEvent.initCloseEvent() - Web APIs
syntax event.initmouseevent(type, canbubble, cancelable, wasclean, reasoncode, reason); parameters type the string to set the event's type to.
Comment() - Web APIs
WebAPICommentComment
syntax comment1 = new comment(); // create an empty comment comment2 = new comment("this is a comment"); example var comment = new comment("test"); specifications specification status comment domthe definition of 'comment: comment' in that specification.
CompositionEvent.CompositionEvent() - Web APIs
syntax const myevent = new compositionevent(typearg [, compositioneventinit]) values typearg is a domstring representing the name of the event.
CompositionEvent.data - Web APIs
syntax mydata = compositionevent.data value a domstring representing the event data: for compositionstart events, this is the currently selected text that will be replaced by the string being composed.
CompositionEvent.initCompositionEvent() - Web APIs
syntax compositioneventinstance.initcompositionevent(typearg, canbubblearg, cancelablearg, viewarg, dataarg, localearg) parameters typearg a domstring representing the type of composition event; this will be one of compositionstart, compositionupdate, or compositionend.
CompositionEvent.locale - Web APIs
syntax mylocale = compositionevent.locale value a domstring representing the locale of current input method.
console.assert() - Web APIs
WebAPIConsoleassert
syntax console.assert(assertion, obj1 [, obj2, ..., objn]); console.assert(assertion, msg [, subst1, ..., substn]); // c-like message formatting parameters assertion any boolean expression.
console.clear() - Web APIs
WebAPIConsoleclear
syntax console.clear(); specifications specification status comment console apithe definition of 'console.clear()' in that specification.
console.count() - Web APIs
WebAPIConsolecount
syntax console.count([label]); parameters label optional a string.
Console.countReset() - Web APIs
syntax console.countreset([label]); parameters label optional a string.
console.debug() - Web APIs
WebAPIConsoledebug
syntax console.debug(obj1 [, obj2, ..., objn]); console.debug(msg [, subst1, ..., substn]); parameters obj1 ...
Console.dir() - Web APIs
WebAPIConsoledir
syntax console.dir(object); parameters object a javascript object whose properties should be output.
Console.dirxml() - Web APIs
WebAPIConsoledirxml
syntax console.dirxml(object); parameters object a javascript object whose properties should be output.
Console.error() - Web APIs
WebAPIConsoleerror
syntax console.error(obj1 [, obj2, ..., objn]); console.error(msg [, subst1, ..., substn]); console.exception(obj1 [, obj2, ..., objn]); console.exception(msg [, subst1, ..., substn]); note: console.exception() is an alias for console.error(); they are functionally identical.
Console.group() - Web APIs
WebAPIConsolegroup
syntax console.group([label]); parameters label label for the group.
Console.groupCollapsed() - Web APIs
syntax console.groupcollapsed([label]); parameters label label for the group.
Console.groupEnd() - Web APIs
WebAPIConsolegroupEnd
syntax console.groupend(); parameters none.
Console.info() - Web APIs
WebAPIConsoleinfo
syntax console.info(obj1 [, obj2, ..., objn]); console.info(msg [, subst1, ..., substn]); parameters obj1 ...
console.log() - Web APIs
WebAPIConsolelog
syntax console.log(obj1 [, obj2, ..., objn]); console.log(msg [, subst1, ..., substn]); parameters obj1 ...
Console.profile() - Web APIs
WebAPIConsoleprofile
syntax console.profile(profilename); parameters profilename the name to give the profile.
Console.profileEnd() - Web APIs
syntax console.profileend(profilename); parameters profilename the name to give the profile.
Console.table() - Web APIs
WebAPIConsoletable
syntax console.table(data [, columns]); parameters data the data to display.
Console.time() - Web APIs
WebAPIConsoletime
syntax console.time(label); parameters label the name to give the new timer.
Console.timeEnd() - Web APIs
WebAPIConsoletimeEnd
syntax console.timeend(label); parameters label the name of the timer to stop.
Console.timeLog() - Web APIs
WebAPIConsoletimeLog
syntax console.timelog(label); parameters label the name of the timer to log to the console.
Console.timeStamp() - Web APIs
WebAPIConsoletimeStamp
syntax console.timestamp(label); parameters label label for the timestamp.
console.trace() - Web APIs
WebAPIConsoletrace
syntax console.trace( [...any, ...data ]); parameters ...any, ...data optional zero or more objects to be output to console along with the trace.
Console.warn() - Web APIs
WebAPIConsolewarn
syntax console.warn(obj1 [, obj2, ..., objn]); console.warn(msg [, subst1, ..., substn]); parameters obj1 ...
console - Web APIs
WebAPIConsole
the properties usable along with the %c syntax are as follows (at least, in firefox — they may differ in other browsers): background and its longhand equivalents.
ConstantSourceNode() - Web APIs
syntax var constantsourcenode = new constantsourcenode(context, options); parameters context an audiocontext representing the audio context you want the node to be associated with.
ConstrainBoolean - Web APIs
however, for the sake of documentation clarity, the intermediate type (present only because of quirks in webidl syntax) is ignored here.
ConstrainDOMString - Web APIs
however, for the sake of documentation clarity, the intermediate type (present only because of quirks in webidl syntax) is ignored here.
ConstrainDouble - Web APIs
however, for the sake of documentation clarity, the intermediate type (present only because of quirks in webidl syntax) is ignored here.
ConstrainULong - Web APIs
however, for the sake of documentation clarity, the intermediate type (present only because of quirks in webidl syntax) is ignored here.
ContentIndex.add() - Web APIs
WebAPIContentIndexadd
syntax contentindex.add(contentdescription).then(...); parameters contentdescription the item registered is an object containing the following data: id: a unique string identifier.
ContentIndex.delete() - Web APIs
syntax contentindex.delete(id).then(...); parameters this method receives no parameters.
ContentIndex.getAll() - Web APIs
syntax var indexedcontent = contentindex.getall(); parameters this method receives no parameters.
ContentIndexEvent() - Web APIs
syntax var contentindexevent = new contentindexevent(type, contentindexeventinit); parameters type a domstring indicating the event which occurred.
ContentIndexEvent.id - Web APIs
syntax var id = contentindexevent.id; value a string representation of the deleted content index id.
ConvolverNode() - Web APIs
syntax var convolvernode = new convolvernode(context, options) parameters inherits parameters from the audionodeoptions dictionary.
ConvolverNode.buffer - Web APIs
syntax var audioctx = new audiocontext(); var convolver = audioctx.createconvolver(); convolver.buffer = myaudiobuffer; value an audiobuffer.
ConvolverNode.normalize - Web APIs
syntax var audioctx = new audiocontext(); var convolver = audioctx.createconvolver(); convolver.normalize = false; value a boolean.
CountQueuingStrategy.CountQueuingStrategy() - Web APIs
syntax var countqueuingstrategy = new countqueuingstrategy({highwatermark}); parameters {highwatermark} an object containing a highwatermark property.
CountQueuingStrategy.size() - Web APIs
syntax var size = countqueuingstrategy.size(); parameters none.
Credential.id - Web APIs
WebAPICredentialid
syntax var id = credential.id; value a a domstring containing the credential's identifier.
Credential.name - Web APIs
WebAPICredentialname
syntax var credname = credential.name; value a domstring containing the credential's given name.
Credential.type - Web APIs
WebAPICredentialtype
syntax var credtype = credential.type; value a domstring contains a credential's given name.
CredentialsContainer.create() - Web APIs
syntax var promise = credentialscontainer.create([options]) parameters options an object of type credentialcreationoptions that contains options for the requested new credentials object.
CredentialsContainer.get() - Web APIs
syntax var promise = credentialscontainer.get([options]) parameters options optional an object of type credentialrequestoptions that contains options for the request.
CredentialsContainer.preventSilentAccess() - Web APIs
syntax var promise = credentialscontainer.preventsilentaccess() parameters none.
CredentialsContainer.store() - Web APIs
syntax credentialscontainer.store(credential).then(function(credential) { ...
Crypto.getRandomValues() - Web APIs
syntax typedarray = cryptoobj.getrandomvalues(typedarray); parameters typedarray an integer-based typedarray, that is an int8array, a uint8array, an int16array, a uint16array, an int32array, or a uint32array.
Crypto.subtle - Web APIs
WebAPICryptosubtle
syntax var crypto = crypto.subtle; value a subtlecrypto object you can use to interact with the web crypto api's low-level cryptography features.
CustomElementRegistry.get() - Web APIs
syntax constructor = customelements.get(name); parameters name the name of the custom element whose constructor you want to return a reference to.
CustomElementRegistry.upgrade() - Web APIs
syntax customelements.upgrade(root); parameters root a node instance with shadow-containing descendant elements that are to be upgraded.
CustomEvent() - Web APIs
syntax event = new customevent(typearg, customeventinit); parameters typearg a domstring representing the name of the event.
CustomEvent.detail - Web APIs
syntax let mydetail = customeventinstance.detail; return value whatever data the event was initialized with.
CustomEvent.initCustomEvent() - Web APIs
syntax event.initcustomevent(type, canbubble, cancelable, detail); parameters type is a domstring containing the name of the event.
DOMError - Web APIs
WebAPIDOMError
syntaxerror the string did not match the expected pattern.
DOMException() - Web APIs
syntax var domexception = new domexception(); var domexception = new domexception(message); var domexception = new domexception(message, name); parameters message optional a description of the exception.
DOMException.code - Web APIs
WebAPIDOMExceptioncode
syntax var domexceptioncode = domexceptioninstance.code; value a short number.
DOMException.message - Web APIs
syntax var domexceptionmessage = domexceptioninstance.message; value a domstring.
DOMException.name - Web APIs
WebAPIDOMExceptionname
syntax var domexceptionname = domexceptioninstance.name; value a domstring.
DOMImplementation.createDocument() - Web APIs
syntax var doc = document.implementation.createdocument(namespaceuri, qualifiednamestr, documenttype); parameters namespaceuri is a domstring containing the namespace uri of the document to be created, or null if the document doesn't belong to one.
DOMImplementation.createDocumentType() - Web APIs
syntax var doctype = document.implementation.createdocumenttype(qualifiednamestr, publicid, systemid); parameters qualifiednamestr is a domstring containing the qualified name, like svg:svg.
DOMImplementation.createHTMLDocument() - Web APIs
syntax const newdoc = document.implementation.createhtmldocument(title) parameters title optional (except in ie) a domstring containing the title to give the new html document.
DOMImplementation.hasFeature() - Web APIs
syntax const flag = document.implementation.hasfeature(feature, version); parameters feature a domstring representing the feature name.
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.
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.
DOMMatrixReadOnly.flipX() - Web APIs
syntax dommatrix.flipx() return value returns a dommatrix containing a new matrix being the result of the original matrix flipped about the x-axis, which is equivalent to multiplying the matrix by dommatrix(-1, 0, 0, 1, 0, 0).
DOMMatrixReadOnly.scale() - Web APIs
syntax the scale() method is specified with either one or six values.
DOMMatrixReadOnly.translate() - Web APIs
syntax the translate() method accepts two or three values.
DOMParser() - Web APIs
syntax var parser = new domparser(); parameters none.
DOMParser - Web APIs
WebAPIDOMParser
syntax let domparser = new domparser()​​ methods domparser.parsefromstring() syntax let doc = domparser.parsefromstring(string, mimetype) return either document or xmldocument depending on the mimetype argument.
DOMPoint.fromPoint() - Web APIs
syntax var point = dompoint.frompoint(sourcepoint); properties sourcepoint a dompointinit-compliant object, which includes both dompoint and dompointreadonly, from which to take the values of the new point's properties.
DOMPoint.DOMPoint() - Web APIs
WebAPIDOMPointDOMPoint
syntax point = new dompoint(x, y, z, w); parameters x optional the x coordinate for the new dompoint.
DOMPoint.w - Web APIs
WebAPIDOMPointw
syntax var perspective = dompoint.w; value a double-precision floating-point value indicating the w perspective value for the point.
DOMPoint.x - Web APIs
WebAPIDOMPointx
syntax var xpos = dompoint.x; value a double-precision floating-point value indicating the x coordinate's value for the point.
DOMPoint.y - Web APIs
WebAPIDOMPointy
syntax var ypos = dompoint.y; value a double-precision floating-point value indicating the y coordinate's value for the point.
DOMPoint.z - Web APIs
WebAPIDOMPointz
syntax var zpos = dompoint.z; value a double-precision floating-point value indicating the z coordinate's value for the point.
DOMPointInit.w - Web APIs
WebAPIDOMPointInitw
syntax var dompointinit = { w: wperspective }; dompointinit.w = wperspective; var wperspective = dompointinit.w; value a double-precision floating-point value indicating the point's w perspective value.
DOMPointInit.x - Web APIs
WebAPIDOMPointInitx
syntax var dompointinit = { x: xpos }; dompointinit.x = xpos; var xpos = dompointinit.x; value a double-precision floating-point value indicating the point's x coordinate.
DOMPointInit.y - Web APIs
WebAPIDOMPointInity
syntax var dompointinit = { y: ypos }; dompointinit.y = ypos; var ypos = dompointinit.y; value a double-precision floating-point value indicating the point's y-coordinate.
DOMPointInit.z - Web APIs
WebAPIDOMPointInitz
syntax var dompointinit = { z: zpos }; dompointinit.z = zpos; var zpos = dompointinit.z; value a double-precision floating-point value indicating the point's z-coordinate.
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.
DOMPointReadOnly.fromPoint() - Web APIs
syntax const point = dompointreadonly.frompoint(sourcepoint) properties sourcepoint a dompointinit-compliant object, which includes both dompoint and dompointreadonly, from which to take the values of the new point's properties.
DOMPointReadOnly.toJSON() - Web APIs
syntax pointjson = dompointreadonly.tojson(); parameters none.
DOMPointReadOnly.w - Web APIs
syntax const perspective = somedompointreadonly.w value a double-precision floating-point value indicating the w perspective value for the point.
DOMPointReadOnly.x - Web APIs
syntax const xpos = somedompointreadonly.x; value a double-precision floating-point value indicating the x coordinate's value for the point.
DOMPointReadOnly.y - Web APIs
syntax const ypos = somedompointreadonly.y; value a double-precision floating-point value indicating the y coordinate's value for the point.
DOMPointReadOnly.z - Web APIs
syntax const zpos = somedompointreadonly.z; value a double-precision floating-point value indicating the z coordinate's value for the point.
DOMRect.DOMRect() - Web APIs
WebAPIDOMRectDOMRect
syntax var mydomrect = new domrect(x, y, width, height); parameters x the x coordinate of the domrect's origin.
DOMRectReadOnly() - Web APIs
syntax const mydomrectreadonly = new domrectreadonly(x, y, width, height) parameters x the x coordinate of the domrectreadonly's origin.
DOMRectReadOnly.bottom - Web APIs
(has the same value as y + height, or y if height is negative.) syntax var recbottom = domrect.bottom; value a double.
DOMRectReadOnly.fromRect() - Web APIs
syntax var domrect = domrectreadonly.fromrect(rectangle) parameters rectangle optional an object specifying the location and dimensions of a rectangle.
DOMRectReadOnly.height - Web APIs
syntax var recheight = domrect.height; value a double.
DOMRectReadOnly.left - Web APIs
(has the same value as x, or x + width if width is negative.) syntax var recleft = domrect.left; value a double.
DOMRectReadOnly.right - Web APIs
(has the same value as x + width, or x if width is negative.) syntax var recright = domrect.right; value a double.
DOMRectReadOnly.top - Web APIs
(has the same value as y, or y + height if height is negative.) syntax var rectop = domrect.top; value a double.
DOMRectReadOnly.width - Web APIs
syntax var recwidth = domrect.width; value a double.
DOMRectReadOnly.x - Web APIs
WebAPIDOMRectReadOnlyx
syntax var recx = domrect.x; value a double.
DOMRectReadOnly.y - Web APIs
WebAPIDOMRectReadOnlyy
syntax var recy = domrect.y; value a double.
DOMTokenList.add() - Web APIs
WebAPIDOMTokenListadd
syntax tokenlist.add(token1[, token2[, ...tokenn]]); parameters tokenn a domstring representing the token (or tokens) to add to the tokenlist.
DOMTokenList.contains() - Web APIs
syntax tokenlist.contains(token); parameters token a domstring representing the token you want to check for the existance of in the list.
DOMTokenList.entries() - Web APIs
syntax tokenlist.entries(); return value returns an iterator.
DOMTokenList.forEach() - Web APIs
syntax tokenlist.foreach(callback [, thisarg]); parameters callback function to execute for each element, eventually taking three arguments: currentvalue the current element being processed in the array.
DOMTokenList.item() - Web APIs
WebAPIDOMTokenListitem
syntax tokenlist.item(index) parameters index a domstring representing the index of the item you want to return.
DOMTokenList.keys() - Web APIs
WebAPIDOMTokenListkeys
syntax tokenlist.keys(); parameters none.
DOMTokenList.length - Web APIs
syntax tokenlist.length; value an integer.
DOMTokenList.remove() - Web APIs
syntax tokenlist.remove(token1[, token2[, ...tokenn]]); parameters tokenn a domstring representing the token you want to remove from the list.
DOMTokenList.replace() - Web APIs
syntax tokenlist.replace(oldtoken, newtoken); parameters oldtoken a domstring representing the token you want to replace.
DOMTokenList.supports() - Web APIs
syntax let trueorfalse = element.supports(token) parameters token a domstring containing the token to query for.
DOMTokenList.toggle() - Web APIs
syntax tokenlist.toggle(token [, force]); parameters token a domstring representing the token you want to toggle.
DOMTokenList.value - Web APIs
syntax tokenlist.value; value a domstring examples in the following example we retrieve the list of classes set on a <span> element as a domtokenlist using element.classlist, then write the value of the list to the <span>'s node.textcontent.
DOMTokenList.values() - Web APIs
syntax tokenlist.values(); parameters none.
DataTransfer() - Web APIs
syntax var datatrans = new datatransfer() parameters none.
DataTransfer.addElement() - Web APIs
syntax void datatransfer.addelement(el); arguments el the element to set as the drag source.
DataTransfer.clearData() - Web APIs
syntax datatransfer.cleardata([format]); parameters format optional a string which specifies the type of data to remove.
DataTransfer.dropEffect - Web APIs
syntax datatransfer.dropeffect; values a domstring representing the drag operation effect.
DataTransfer.effectAllowed - Web APIs
syntax datatransfer.effectallowed; values a domstring representing the drag operation that is allowed.
DataTransfer.files - Web APIs
syntax datatransfer.files; return value a list of the files in a drag operation, one list item for each file in the operation.
DataTransfer.getData() - Web APIs
syntax datatransfer.getdata(format); arguments format a domstring representing the type of data to retrieve.
DataTransfer.items - Web APIs
syntax itemlist = datatransfer.items; return value a datatransferitemlist object containing datatransferitem objects representing the items being dragged in a drag operation, one list item for each object being dragged.
DataTransfer.mozClearDataAt() - Web APIs
syntax void datatransfer.mozcleardataat([type], index); arguments type a string representing the type of the drag data to remove from the drag data object.
DataTransfer.mozCursor - Web APIs
syntax datatransfer.mozcursor; return value a domstring representing one of the values listed above.
DataTransfer.mozGetDataAt() - Web APIs
syntax nsivariant datatransfer.mozgetdataat([type], index); arguments type a string representing the type of the drag data to retrieve from the drag data object.
DataTransfer.mozItemCount - Web APIs
syntax datatransfer.mozitemcount; return value a number representing the number of items being dragged.
DataTransfer.mozSetDataAt() - Web APIs
syntax void datatransfer.mozsetdataat([type], data, index); arguments type a string representing the type of the drag data to add to the drag data object.
DataTransfer.mozSourceNode - Web APIs
syntax datatransfer.mozsourcenode; return value a node representing node where the drag originated.
DataTransfer.mozTypesAt() - Web APIs
syntax nsivariant datatransfer.moztypesat(index); arguments index a unsigned long that is the index of the data for which to retrieve the types.
DataTransfer.mozUserCancelled - Web APIs
syntax datatransfer.mozusercancelled; return value a boolean representing true if the user canceled the drag event and returns false otherwise.
DataTransfer.setData() - Web APIs
syntax void datatransfer.setdata(format, data); arguments format a domstring representing the type of the drag data to add to the drag object.
DataTransfer.setDragImage() - Web APIs
syntax void datatransfer.setdragimage(img | element, xoffset, yoffset); arguments img | element an image element element to use for the drag feedback image.
DataTransfer.types - Web APIs
syntax datatransfer.types; return value an array of the data formats used in the drag operation.
DataTransferItem.getAsFile() - Web APIs
syntax file = datatransferitem.getasfile(); parameters none.
DataTransferItem.getAsString() - Web APIs
syntax datatransferitem.getasstring(callback); parameters callback a callback function that has access to the data transfer item's string data.
DataTransferItem.kind - Web APIs
syntax var itemkind = datatransferitem.kind; return value a domstring representing the drag data item's kind.
DataTransferItem.type - Web APIs
syntax dataitem.type; return value a domstring representing the drag data item's type.
DataTransferItem.webkitGetAsEntry() - Web APIs
syntax datatransferitem.webkitgetasentry(); parameters none.
DataTransferItemList.add() - Web APIs
syntax datatransferitem = datatransferitemlist.add(data, type); datatransferitem = datatransferitemlist.add(file); parameters data a string representing the drag item's data.
DataTransferItemList.clear() - Web APIs
syntax datatransferitemlist.clear(); parameters none.
DataTransferItemList.length - Web APIs
syntax length = datatransferitemlist.length; value the number of drag data items in the list, or 0 if the list is empty or disabled.
DataTransferItemList.remove() - Web APIs
syntax datatransferitemlist.remove(index); parameters index the zero-based index number of the item in the drag data list to remove.
DedicatedWorkerGlobalScope.close() - Web APIs
syntax self.close(); example if you want to close your worker instance from inside the worker itself, you can call the following: close(); close() and self.close() are effectively equivalent — both represent close() being called from inside the worker's inner scope.
DedicatedWorkerGlobalScope.name - Web APIs
syntax var nameobj = self.name; value a domstring.
DedicatedWorkerGlobalScope.onmessage - Web APIs
syntax self.onmessage = function() { ...
DedicatedWorkerGlobalScope.onmessageerror - Web APIs
syntax onmessageerror = function() { ...
DedicatedWorkerGlobalScope.postMessage() - Web APIs
syntax postmessage(amessage, transferlist); parameters amessage the object to deliver to the main thread; this will be in the data field in the event delivered to the worker.onmessage handler.
DelayNode() - Web APIs
syntax var delaynode = new delaynode(context); var delaynode = new delaynode(context, options); parameters inherits parameters from the audionodeoptions dictionary.
DelayNode.delayTime - Web APIs
syntax var audioctx = new audiocontext(); var mydelay = audioctx.createdelay(5.0); mydelay.delaytime.value = 3.0; note: though the audioparam returned is read-only, the value it represents is not.
DeviceLightEvent.value - Web APIs
syntax var light = instanceofdevicelightevent.value; value a positive number representing a light intensity expressed in lux.
DeviceMotionEvent.DeviceMotionEvent() - Web APIs
syntax var devicemotionevent = new devicemotionevent(type[, options]) parameters type must be "devicemotion".
DeviceMotionEvent.acceleration - Web APIs
syntax var acceleration = devicemotionevent.acceleration; value the acceleration property is an object providing information about acceleration on three axis.
DeviceMotionEvent.accelerationIncludingGravity - Web APIs
syntax var acceleration = devicemotionevent.accelerationincludinggravity; value the accelerationincludinggravity property is an object providing information about acceleration on three axis.
DeviceMotionEvent.interval - Web APIs
syntax var interval = devicemotionevent.interval; specifications specification status comment deviceorientation event specification editor's draft initial definition.
DeviceMotionEvent.rotationRate - Web APIs
syntax var rotationrate = devicemotionevent.rotationrate; value the rotationrate property is a read only object describing the rotation rates of the device around each of its axes: alpha the rate at which the device is rotating about its z axis; that is, being twisted about a line perpendicular to the screen.
DeviceMotionEventAcceleration: x - Web APIs
syntax var xaccel = devicemotioneventacceleration.x; return value x a double indicating the amount of acceleration along the x axis.
DeviceMotionEventAcceleration: y - Web APIs
syntax var yaccel = devicemotioneventacceleration.y; return value y a double indicating the amount of acceleration along the y axis.
DeviceMotionEventAcceleration: z - Web APIs
syntax var zaccel = devicemotioneventacceleration.z; return value z a double indicating the amount of acceleration along the z axis.
DeviceMotionEventRotationRate: alpha - Web APIs
syntax var alpha = devicerotationrate.alpha; this property is read-only.
DeviceMotionEventRotationRate: beta - Web APIs
syntax var beta = devicerotationrate.beta; this property is read-only.
DeviceMotionEventRotationRate: gamma - Web APIs
syntax var gamma = devicerotationrate.gamma; this property is read-only.
DeviceOrientationEvent.DeviceOrientationEvent() - Web APIs
syntax var deviceorientationevent = new deviceorientationevent(type[, options]) parameters type either "deviceorientation" or "deviceorientationabsolute".
DeviceOrientationEvent.absolute - Web APIs
syntax var absolute = instanceofdeviceorientationevent.absolute; on return, absolute is true if the orientation data in instanceofdeviceorientationevent is provided as the difference between the earth's coordinate frame and the device's coordinate frame, or false if the orientation data is being provided in reference to some arbitrary, device-determined coordinate frame.
DeviceOrientationEvent.alpha - Web APIs
syntax var alpha = instanceofdeviceorientationevent.alpha; specifications specification status comment deviceorientation event specification editor's draft initial specification.
DeviceOrientationEvent.beta - Web APIs
syntax var beta = instanceofdeviceorientationevent.beta; specifications specification status comment deviceorientation event specification editor's draft initial specification.
DeviceOrientationEvent.gamma - Web APIs
syntax var gamma = orientationevent.gamma; specifications specification status comment deviceorientation event specification editor's draft initial specification.
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.
DisplayMediaStreamConstraints.audio - Web APIs
syntax displaymediastreamconstraints.audio = allowaudioflag; displaymediastreamconstraints.audio = mediatrackconstraints; displaymediastreamconstraints = { audio: allowaudioflag|mediatrackconstraints; } value the value may be either a boolean or a mediatrackconstraints object.
DisplayMediaStreamConstraints.video - Web APIs
syntax displaymediastreamconstraints.video = allowvideoflag; displaymediastreamconstraints.video = mediatrackconstraints; displaymediastreamconstraints = { video: allowvideoflag | mediatrackconstraints; } value the value may be either a boolean or a mediatrackconstraints object.
Document() - Web APIs
WebAPIDocumentDocument
syntax new document(); specifications specification status comment domthe definition of 'document' in that specification.
Document.URL - Web APIs
WebAPIDocumentURL
syntax const url = document.url example javascript document.getelementbyid("url").textcontent = document.url; html <p id="urltext"> url:<br/> <span id="url">url goes here</span> </p> result specifications specification status comment domthe definition of 'document.url' in that specification.
Document.adoptNode() - Web APIs
syntax const importednode = document.adoptnode(externalnode); parameters externalnode the node from another document to be adopted.
Document.alinkColor - Web APIs
syntax var color = document.alinkcolor; document.alinkcolor = color; color is a string containing the name of the color (e.g., blue, darkblue, etc.) or the hexadecimal value of the color (e.g., #0000ff) notes the default value for this property in mozilla firefox is red (#ee0000 in hexadecimal).
Document.all - Web APIs
WebAPIDocumentall
syntax var htmlallcollection = document.all; value an htmlallcollection which contains every element in the document.
Document.anchors - Web APIs
WebAPIDocumentanchors
syntax nodelist = document.anchors; value an htmlcollection.
Document.applets - Web APIs
WebAPIDocumentapplets
syntax var nodelist = document.applets; value an htmlcollection.
Document.bgColor - Web APIs
WebAPIDocumentbgColor
syntax color = document.bgcolor document.bgcolor =color parameters color is a string representing the color as a word (e.g., "red") or hexadecimal value (e.g., "#ff0000").
Document.body - Web APIs
WebAPIDocumentbody
syntax const objref = document.body document.body = objref example // given this html: <body id="oldbodyelement"></body> alert(document.body.id); // "oldbodyelement" const anewbodyelement = document.createelement("body"); anewbodyelement.id = "newbodyelement"; document.body = anewbodyelement; alert(document.body.id); // "newbodyelement" notes document.body is the element that contains the content for the document.
Document.caretRangeFromPoint() - Web APIs
syntax var range = document.caretrangefrompoint(float x, float y); parameters x a horizontal position within the current viewport.
Document.characterSet - Web APIs
syntax var string = document.characterset; examples <button onclick="console.log(document.characterset);"> log character encoding </button> <!-- displays document's character encoding in the dev console, such as "iso-8859-1" or "utf-8" --> specifications specification status comment domthe definition of 'characterset' in that specification.
Document.clear() - Web APIs
WebAPIDocumentclear
syntax document.clear(); specification html5 ...
Document.close() - Web APIs
WebAPIDocumentclose
syntax document.close(); example // open a document to write to it document.open(); // write the content of the document document.write("<p>the one and only content.</p>"); // close the document document.close(); specifications specification status comment html living standardthe definition of 'document.close()' in that specification.
Document.compatMode - Web APIs
syntax const mode = document.compatmode value an enumerated value that can be: "backcompat" if the document is in quirks mode.
Document.contentType - Web APIs
syntax contenttype = document.contenttype; value contenttype is a read-only property.
Document.createAttribute() - Web APIs
syntax attribute = document.createattribute(name) parameters name is a string containing the name of the attribute.
Document.createCDATASection() - Web APIs
syntax var cdatasectionnode = document.createcdatasection(data); cdatasectionnode is a cdata section node.
Document.createComment() - Web APIs
syntax commentnode = document.createcomment(data); parameters data a string containing the data to be added to the comment.
Document.createDocumentFragment() - Web APIs
syntax var fragment = document.createdocumentfragment(); value a newly created, empty, documentfragment object, which is ready to have nodes inserted into it.
Document.createElement() - Web APIs
syntax let element = document.createelement(tagname[, options]); parameters tagname a string that specifies the type of element to be created.
Document.createElementNS() - Web APIs
syntax var element = document.createelementns(namespaceuri, qualifiedname[, options]); parameters namespaceuri a string that specifies the namespace uri to associate with the element.
Document.createEvent() - Web APIs
syntax var event = document.createevent(type); event is the created event object.
Document.createExpression() - Web APIs
syntax xpathexpr = document.createexpression(xpathtext, namespaceurlmapper); parameters xpathtext is a string which is the xpath expression to be compiled.
Document.createNSResolver() - Web APIs
syntax nsresolver = document.creatensresolver(node); parameters node is the node to be used as a context for namespace resolution.
Document.createNodeIterator() - Web APIs
syntax const nodeiterator = document.createnodeiterator(root[, whattoshow[, filter]]); values root the root node at which to begin the nodeiterator's traversal.
Document.createProcessingInstruction() - Web APIs
syntax pinode = document.createprocessinginstruction(target, data) parameters pinode is the resulting processinginstruction node.
Document.createRange() - Web APIs
syntax range = document.createrange(); range is the created range object.
Document.createTextNode() - Web APIs
syntax var text = document.createtextnode(data); text is a text node.
Document.createTouch() - Web APIs
syntax var touch = documenttouch.createtouch(view, target, identifier, pagex, pagey, screenx, screeny); parameters note: all parameters are optional.
Document.createTouchList() - Web APIs
syntax var list = documenttouch.createtouchlist([touch1 [, touch2 [, ...]]]); parameters touches zero or more touch objects.
Document.createTreeWalker() - Web APIs
syntax document.createtreewalker(root, whattoshow[, filter[, entityreferenceexpansion]]); parameters root a root node of this treewalker traversal.
Document.currentScript - Web APIs
syntax var curscriptelement = document.currentscript; example this example checks to see if the script is being executed asynchronously: if (document.currentscript.async) { console.log("executing asynchronously"); } else { console.log("executing synchronously"); } view live examples specifications specification status comment html living standardthe definition of ...
Document.defaultView - Web APIs
syntax var win = document.defaultview; this property is read-only.
Document.designMode - Web APIs
syntax var mode = document.designmode; document.designmode = value; value a string indicating whether designmode is (or should be) set to on or off.
Document.dir - Web APIs
WebAPIDocumentdir
syntax dirstr = document.dir document.dir = dirstr specifications specification status comment html living standardthe definition of 'document.dir' in that specification.
Document.doctype - Web APIs
WebAPIDocumentdoctype
syntax doctype = document.doctype; doctype is a read-only property.
Document.documentElement - Web APIs
syntax const element = document.documentelement example const rootelement = document.documentelement; const firsttier = rootelement.childnodes; // firsttier is a nodelist of the direct children of the root element // such as <head> and <body> for (const child of firsttier) { // do something with each direct child of the root element } notes for any non-empty html document, documentelement will always be an <html> element.
Document.documentURI - Web APIs
syntax const uri = document.documenturi example javascript document.getelementbyid("url").textcontent = document.documenturi; html <p id="urltext"> url:<br/> <span id="url">url goes here</span> </p> result specifications specification status comment domthe definition of 'documenturi' in that specification.
Document.documentURIObject - Web APIs
syntax var uri = document.documenturiobject; example // check that the uri scheme of the current tab in firefox is 'http', // assuming this code runs in context of browser.xul let uriobj = content.document.documenturiobject; let uriport = uriobj.port; if (uriobj.schemeis('http')) { ...
Document.domain - Web APIs
WebAPIDocumentdomain
syntax const domainstring = document.domain document.domain = domainstring value the domain portion of the current document's origin.
Document.embeds - Web APIs
WebAPIDocumentembeds
syntax nodelist = document.embeds value an htmlcollection.
Document.enableStyleSheetsForSet() - Web APIs
syntax document.enablestylesheetsforset(name); parameters name the name of the style sheets to enable.
Document.evaluate() - Web APIs
WebAPIDocumentevaluate
syntax var xpathresult = document.evaluate( xpathexpression, contextnode, namespaceresolver, resulttype, result ); xpathexpression is a string representing the xpath to be evaluated.
Document.execCommand() - Web APIs
syntax document.execcommand(acommandname, ashowdefaultui, avalueargument) return value a boolean that is false if the command is unsupported or disabled.
Document.exitFullscreen() - Web APIs
syntax exitpromise = document.exitfullscreen(); parameters none.
Document.exitPointerLock() - Web APIs
syntax document.exitpointerlock(); specifications specification status comment pointer lockthe definition of 'document' in that specification.
Document.featurePolicy - Web APIs
syntax var policy = iframeelement.featurepolicy value a featurepolicy object that can be used to inspect the feature policy settings applied to the document.
Document.fgColor - Web APIs
WebAPIDocumentfgColor
syntax var color = document.fgcolor; document.fgcolor = color; parameters color is a string representing the color as a word (e.g., "red") or hexadecimal value (e.g., "#ff0000").
Document.fonts - Web APIs
WebAPIDocumentfonts
syntax let fontfaceset = document.fonts; value the returned value is the fontfaceset interface of the document.
Document.forms - Web APIs
WebAPIDocumentforms
syntax collection = document.forms; value an htmlcollection object listing all of the document's forms.
Document.fullscreen - Web APIs
syntax var isfullscreen = document.fullscreen; value a boolean value which is true if the document is currently displaying an element in full-screen mode; otherwise, the value is false.
Document.fullscreenEnabled - Web APIs
syntax var isfullscreenavailable = document.fullscreenenabled; value a boolean value which is true if the document and the elements within can be placed into full-screen mode by calling element.requestfullscreen().
Document.getAnimations() - Web APIs
syntax var allanimations = document.getanimations(); parameters none.
Document.getBoxObjectFor() - Web APIs
syntax boxobject = document.getboxobjectfor(element); boxobject is an nsiboxobject.
Document.getElementById() - Web APIs
syntax var element = document.getelementbyid(id); parameters id the id of the element to locate.
Document.getElementsByClassName() - Web APIs
syntax var elements = document.getelementsbyclassname(names); // or: var elements = rootelement.getelementsbyclassname(names); elements is a live htmlcollection of found elements.
Document.getElementsByName() - Web APIs
syntax var elements = document.getelementsbyname(name); elements is a live nodelist collection, meaning it automatically updates as new elements with the same name are added to/removed from the document.
Document.getElementsByTagName() - Web APIs
syntax var elements = document.getelementsbytagname(name); elements is a live htmlcollection (but see the note below) of found elements in the order they appear in the tree.
Document.getElementsByTagNameNS() - Web APIs
syntax elements = document.getelementsbytagnamens(namespace, name) elements is a live nodelist (but see the note below) of found elements in the order they appear in the tree.
Document.hasFocus() - Web APIs
WebAPIDocumenthasFocus
syntax var focused = document.hasfocus(); return value false if the active element in the document has no focus; true if the active element in the document has focus.
Document.hasStorageAccess() - Web APIs
syntax var promise = document.hasstorageaccess(); parameters none.
Document.head - Web APIs
WebAPIDocumenthead
syntax var objref = document.head; value an htmlheadelement.
Document.height - Web APIs
WebAPIDocumentheight
syntax pixels = document.height example // alert document height alert(document.height); alternatives document.body.clientheight document.documentelement.clientheight document.documentelement.scrollheight specification html5 ...
Document.hidden - Web APIs
WebAPIDocumenthidden
syntax var boolean = document.hidden examples document.addeventlistener("visibilitychange", function() { console.log( document.hidden ); // modify behavior...
Document.images - Web APIs
WebAPIDocumentimages
syntax var imagecollection = document.images; value an htmlcollection providing a live list of all of the images contained in the current document.
Document.implementation - Web APIs
syntax domimpobj = document.implementation; example var modname = "html"; var modver = "2.0"; var conformtest = document.implementation.hasfeature( modname, modver ); alert( "dom " + modname + " " + modver + " supported?: " + conformtest ); // alerts with: "dom html 2.0 supported?: true" if dom level 2 html module is supported.
Document.importNode() - Web APIs
syntax const importednode = document.importnode(externalnode [, deep]); parameters externalnode the external node or documentfragment to import into the current document.
Document.lastModified - Web APIs
syntax var string = document.lastmodified; examples simple usage this example alerts the value of lastmodified.
Document.lastStyleSheetSet - Web APIs
syntax var laststylesheetset = document.laststylesheetset on return, laststylesheetset indicates the style sheet set that was most recently set.
Document.linkColor - Web APIs
syntax color = document.linkcolor document.linkcolor = color parameters color is a string representing the color as a word (e.g., red) or hexadecimal value (e.g., #ff0000).
Document.links - Web APIs
WebAPIDocumentlinks
syntax nodelist = document.links value an htmlcollection.
Document.location - Web APIs
WebAPIDocumentlocation
syntax locationobj = document.location document.location = 'http://www.mozilla.org' // equivalent to document.location.href = 'http://www.mozilla.org' examples console.log(document.location); // prints a location object to the console specifications specification status comment html living standardthe definition of 'document.location' in that specification.
Document.mozSetImageElement() - Web APIs
syntax document.mozsetimageelement(imageelementid, imageelement); parameters imageelementid is a string indicating the name of an element that has been specified as a background image using the -moz-element css function.
Document.mozSyntheticDocument - Web APIs
syntax var issynthetic = document.mozsyntheticdocument; on return, issynthetic is true if the document is a synthetic one; otherwise it's false.
Document.onafterscriptexecute - Web APIs
syntax document.onafterscriptexecute = funcref; funcref is a function reference, called when the event is fired.
Document.onbeforescriptexecute - Web APIs
syntax document.onbeforescriptexecute = funcref; funcref is a function reference, called when the event is fired.
Document.onfullscreenchange - Web APIs
syntax targetdocument.onfullscreenchange = fullscreenchangehandler; value an event handler which is invoked whenever the document receives a fullscreenchange event, indicating that the document is transitioning into or out of full-screen mode.
Document.onfullscreenerror - Web APIs
syntax targetdocument.onfullscreenerror = fullscreenerrorhandler; value an event handler for the fullscreenerror event.
Document.onvisibilitychange - Web APIs
syntax obj.onvisibilitychange = function; function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration.
Document.open() - Web APIs
WebAPIDocumentopen
syntax document.open(); parameters none.
Document.origin - Web APIs
WebAPIDocumentorigin
syntax var origin = document.origin; examples var origin = document.origin; // on this page, returns:'https://developer.mozilla.org' var origin = document.origin; // on "about:blank", returns:'null' var origin = document.origin; // on "data:text/html,<b>foo</b>", returns:'null' ...
Document.plugins - Web APIs
WebAPIDocumentplugins
syntax embedarrayobj = document.plugins value an htmlcollection, or null if there are no embeds in the document.
Document.popupNode - Web APIs
syntax var node = document.popupnode; example <menupopup id="toolbarcontextmenu"> ...
Document.preferredStyleSheetSet - Web APIs
syntax preferredstylesheetset = document.preferredstylesheetset on return, preferredstylesheetset indicates the author's preferred style sheet set.
Document.queryCommandEnabled() - Web APIs
syntax isenabled = document.querycommandenabled(command); parameters command the command for which to determine support.
Document.queryCommandState() - Web APIs
syntax querycommandstate(string command) parameters command is a command from document.execcommand() return value querycommandstate() can return a boolean value or null if the state is unknown.
Document.queryCommandSupported() - Web APIs
syntax issupported = document.querycommandsupported(command); parameters command the command for which to determine support.
Document.readyState - Web APIs
syntax var string = document.readystate; values the readystate of a document can be one of following: loading the document is still loading.
Document.referrer - Web APIs
WebAPIDocumentreferrer
syntax var referrer = document.referrer; value the value is an empty string if the user navigated to the page directly (not through a link, but, for example, by using a bookmark).
Document.registerElement() - Web APIs
syntax var constructor = document.registerelement(tag-name, options); parameters tag-name the name of the custom element.
Document.releaseCapture() - Web APIs
syntax document.releasecapture(); once mouse capture is released, mouse events will no longer all be directed to the element on which capture is enabled.
Document.requestStorageAccess() - Web APIs
syntax var promise = document.requeststorageaccess(); parameters none.
Document.rootElement - Web APIs
syntax const element = document.rootelement notes if the document is a non-empty svg document, then the rootelement will be an svgsvgelement, identical to the documentelement.
Document.scripts - Web APIs
WebAPIDocumentscripts
syntax var scriptlist = document.scripts; value an htmlcollection.
Document.scrollingElement - Web APIs
syntax var element = document.scrollingelement; example var scrollelm = document.scrollingelement; scrollelm.scrolltop = 0; specifications specification status comment css object model (cssom) view modulethe definition of 'scrollingelement' in that specification.
Document.selectedStyleSheetSet - Web APIs
syntax currentstylesheetset = document.selectedstylesheetset; document.selectedstylesheet = newstylesheetset; on return, currentstylesheetset indicates the name of the style sheet set currently in use.
Document.styleSheetSets - Web APIs
syntax var sets = document.stylesheetsets; on return, sets is a list of style sheet sets that are available.
Document.timeline - Web APIs
WebAPIDocumenttimeline
syntax var pagetimeline = document.timeline; var thismoment = pagetimeline.currenttime; value a documenttimeline object.
Document.title - Web APIs
WebAPIDocumenttitle
syntax var doctitle = document.title; doctitle is a string containing the document's title.
Document.tooltipNode - Web APIs
syntax document.tooltipnode; specification xul-specific method.
Document.visibilityState - Web APIs
syntax var string = document.visibilitystate examples document.addeventlistener("visibilitychange", function() { console.log( document.visibilitystate ); // modify behavior...
Document.vlinkColor - Web APIs
syntax color = document.vlinkcolor document.vlinkcolor = color parameters color is a string representing the color as a word (e.g., "red") or hexadecimal value (e.g., "#ff0000").
Document.width - Web APIs
WebAPIDocumentwidth
syntax pixels = document.width; example function init() { alert("the width of the document is " + document.width + " pixels."); } alternatives document.body.clientwidth /* width of <body> */ document.documentelement.clientwidth /* width of <html> */ window.innerwidth /* window's width */ specification html5 ...
Document.write() - Web APIs
WebAPIDocumentwrite
syntax document.write(markup); parameters markup a string containing the text to be written to the document.
Document.writeln() - Web APIs
WebAPIDocumentwriteln
syntax document.writeln(line); parameters line is string containing a line of text.
DocumentFragment() - Web APIs
syntax fragment = new documentfragment() example let fragment = new documentfragment(); specification specification status comment domthe definition of 'documentfragment()' in that specification.
DocumentOrShadowRoot.activeElement - Web APIs
syntax element = documentorshadowroot.activeelement value the element which currently has focus, <body> or null if there is no focused element.
DocumentOrShadowRoot.caretPositionFromPoint() - Web APIs
syntax var caretposition = document.caretpositionfrompoint(float x, float y); parameters x the horizontal coordinate of a point.
DocumentOrShadowRoot.elementFromPoint() - Web APIs
syntax const element = document.elementfrompoint(x, y) parameters x the horizontal coordinate of a point, relative to the left edge of the current viewport.
DocumentOrShadowRoot.elementsFromPoint() - Web APIs
syntax const elements = document.elementsfrompoint(x, y); parameters x the horizontal coordinate of a point.
DocumentOrShadowRoot.fullscreenElement - Web APIs
syntax var element = document.fullscreenelement; return value the element object that's currently in full-screen mode; if full-screen mode isn't currently in use by the document>, the returned value is null.
DocumentOrShadowRoot.getSelection() - Web APIs
syntax var selection = documentorshadowrootinstance.getselection() parameters none.
DocumentOrShadowRoot.msElementsFromRect() - Web APIs
syntax object.mselementsfromrect(left, top, width, height, retval) parameters left [in] type: floating-point top[in] type: floating-point width[in] type: floating-point height [in] type: floating-point retval [out, reval] type: nodelist example to find all of the elements under a given point, use mselementsfrompoint(x, y).
DocumentOrShadowRoot.nodeFromPoint() - Web APIs
syntax var node = document.nodefrompoint(x, y); parameters x a double representing the horizontal coordinate of a point.
DocumentOrShadowRoot.nodesFromPoint() - Web APIs
syntax var nodes = document.nodesfrompoint(x, y); parameters x the horizontal coordinate of a point.
DocumentOrShadowRoot.pointerLockElement - Web APIs
syntax var element = document.pointerlockelement; return value an element or null.
DocumentTimeline.DocumentTimeline() - Web APIs
syntax var sharedtimeline = new documenttimeline(options); parameters options an object specifying options for the new timeline.
Introduction to the DOM - Web APIs
the latter uses the typical array syntax to fetch the second item in the list.
DragEvent() - Web APIs
syntax event = new dragevent(type, drageventinit); arguments type is a domstring representing the name of the event (see dragevent event types).
DragEvent.dataTransfer - Web APIs
syntax let data = dragevent.datatransfer; return value data a datatransfer object which contains the drag event's data.
DynamicsCompressorNode() - Web APIs
syntax var dynamicscompressornode = new dynamicscompressornode(context, options) parameters context a reference to an audiocontext.
DynamicsCompressorNode.attack - Web APIs
syntax var audioctx = new audiocontext(); var compressor = audioctx.createdynamicscompressor(); compressor.attack.value = 0; value an audioparam.
DynamicsCompressorNode.knee - Web APIs
syntax var audioctx = new audiocontext(); var compressor = audioctx.createdynamicscompressor(); compressor.knee.value = 40; value an audioparam.
DynamicsCompressorNode.ratio - Web APIs
syntax var audioctx = new audiocontext(); var compressor = audioctx.createdynamicscompressor(); compressor.ratio.value = 12; value an audioparam.
DynamicsCompressorNode.reduction - Web APIs
syntax var myreduction = compressornodeinstance.reduction; value a float.
DynamicsCompressorNode.release - Web APIs
syntax var audioctx = new audiocontext(); var compressor = audioctx.createdynamicscompressor(); compressor.release.value = 0.25; value an audioparam.
DynamicsCompressorNode.threshold - Web APIs
syntax var audioctx = new audiocontext(); var compressor = audioctx.createdynamicscompressor(); compressor.threshold.value = -50; value an audioparam.
EXT_disjoint_timer_query.beginQueryEXT() - Web APIs
syntax void ext.beginqueryext(target, query); parameters target a glenum specifying the target of the time query.
EXT_disjoint_timer_query.createQueryEXT() - Web APIs
syntax webgltimerqueryext ext.createqueryext(); parameters none.
EXT_disjoint_timer_query.deleteQueryEXT() - Web APIs
syntax void ext.deletequeryext(query); parameters query a webglquery object to delete.
EXT_disjoint_timer_query.endQueryEXT() - Web APIs
syntax void ext.endqueryext(target); parameters target a glenum specifying the target of the time query.
EXT_disjoint_timer_query.getQueryEXT() - Web APIs
syntax any ext.getqueryext(target, pname); parameters target a glenum specifying the target of the time query.
EXT_disjoint_timer_query.getQueryObjectEXT() - Web APIs
syntax any ext.getqueryobjectext(query, pname); parameters query a webglquery object from which to return information.
EXT_disjoint_timer_query.isQueryEXT() - Web APIs
syntax glboolean ext.isqueryext(query); parameters query a webglquery object to test.
EXT_disjoint_timer_query.queryCounterEXT() - Web APIs
syntax void ext.querycounterext(query, target); parameters query a webglquery object for which to record the current time.
EffectTiming.delay - Web APIs
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.direction - Web APIs
syntax var timingproperties = { direction: "normal" | "reverse" | "alternate" | "alternate-reverse" }; timingproperties.direction = "normal" | "reverse" | "alternate" | "alternate-reverse"; value a domstring which specifies the direction in which the animation should play as well as what to do when the playback reaches the end of the animation sequence in the current direction.
EffectTiming.duration - Web APIs
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.
EffectTiming.easing - Web APIs
syntax var timingproperties = { easing: single-transition-timing-function } timingproperties.easing = single-transition-timing-function value a string defining the timing function to use for easing transitions during the animation process.
EffectTiming.endDelay - Web APIs
syntax var timingproperties = { enddelay: delayinmilliseconds } timingproperties.enddelay = delayinmilliseconds; value a number representing the end delay, specified in milliseconds.
EffectTiming.fill - Web APIs
WebAPIEffectTimingfill
syntax var timingproperties = { fill: "none" | "forwards" | "backwards" | "both" | "auto" } value a domstring indicating the fill type to use in order to properly render an affected element when outside the animation's active interval (that is, when it's not actively animating).
EffectTiming.iterationStart - Web APIs
syntax var timingproperties = { iterationstart = iterationnumber }; timingproperties.iterationstart = iterationnumber; 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.
EffectTiming.iterations - Web APIs
syntax var timingproperties = { iterations: numberofiterations }; timingproperties.iterations = numberofiterations; value a floating-point value specifying the number of times the animation sequence will play through.
Element.animate() - Web APIs
WebAPIElementanimate
syntax var animation = element.animate(keyframes, options); parameters keyframes either an array of keyframe objects, or a keyframe object whose property are arrays of values to iterate over.
Element.attachShadow() - Web APIs
the following is a list of elements you can attach a shadow root to: any autonomous custom element with a valid name <article> <aside> <blockquote> <body> <div> <footer> <h1> <h2> <h3> <h4> <h5> <h6> <header> <main> <nav> <p> <section> <span> syntax var shadowroot = element.attachshadow(shadowrootinit); parameters shadowrootinit a shadowrootinit dictionary, which can contain the following fields: mode a string specifying the encapsulation mode for the shadow dom tree.
Element.attributes - Web APIs
syntax var attr = element.attributes; example basic examples // get the first <p> element in the document var para = document.getelementsbytagname("p")[0]; var atts = para.attributes; enumerating elements attributes numerical indexing is useful for going through all of an element's attributes.
Element.className - Web APIs
WebAPIElementclassName
syntax var cname = elementnodereference.classname; elementnodereference.classname = cname; cname is a string variable representing the class or space-separated classes of the current element.
Element.clientHeight - Web APIs
syntax var intelemclientheight = element.clientheight; intelemclientheight is an integer corresponding to the clientheight of element in pixels.
Element.clientLeft - Web APIs
syntax var left = element.clientleft; example padding-top lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Element.clientTop - Web APIs
WebAPIElementclientTop
syntax var top = element.clienttop; example in the following illustration, the client area is show in white.
Element.clientWidth - Web APIs
syntax var intelemclientwidth = element.clientwidth; intelemclientwidth is an integer corresponding to the clientwidth of element in pixels.
Element.computedStyleMap() - Web APIs
syntax var stylepropertymapreadonly = element.computedstylemap() parameters none.
Element.createShadowRoot() - Web APIs
syntax var shadowroot = element.createshadowroot(); parameters no parameters.
Element.getAnimations() - Web APIs
syntax const animations = element.getanimations(options); parameters options optional an options object containing the following property: subtree a boolean value which, if true, causes animations that target descendants of element to be returned as well.
Element.getAttribute() - Web APIs
syntax let attribute = element.getattribute(attributename); where attribute is a string containing the value of attributename.
Element.getAttributeNS() - Web APIs
syntax attrval = element.getattributens(namespace, name) parameters namespace the namespace in which to look for the specified attribute.
Element.getAttributeNames() - Web APIs
syntax let attributenames = element.getattributenames(); example // iterate over element's attributes for (let name of element.getattributenames()) { let value = element.getattribute(name); console.log(name, value); } polyfill if (element.prototype.getattributenames == undefined) { element.prototype.getattributenames = function () { var attributes = this.attributes; var length = attributes.length; var result = new array(length); for (var i = 0; i < len...
Element.getAttributeNode() - Web APIs
syntax var attrnode = element.getattributenode(attrname); attrnode is an attr node for the attribute.
Element.getAttributeNodeNS() - Web APIs
syntax attributenode = element.getattributenodens(namespace, nodename) attributenode is the node for specified attribute.
Element.getBoundingClientRect() - Web APIs
syntax domrect = element.getboundingclientrect(); value the returned value is a domrect object which is the union of the rectangles returned by getclientrects() for the element, i.e., the css border-boxes associated with the element.
Element.getClientRects() - Web APIs
syntax let rectcollection = object.getclientrects(); return value the returned value is a collection of domrect objects, one for each css border box associated with the element.
Element.getElementsByTagName() - Web APIs
syntax elements = element.getelementsbytagname(tagname) elements is a live htmlcollection of elements with a matching tag name, in the order they appear.
Element.getElementsByTagNameNS() - Web APIs
syntax elements = element.getelementsbytagnamens(namespaceuri, localname) elements is a live htmlcollection of found elements in the order they appear in the tree.
Element.hasAttribute() - Web APIs
syntax var result = element.hasattribute(name); result holds the return value true or false.
Element.hasAttributeNS() - Web APIs
syntax result = element.hasattributens(namespace,localname) result is the boolean value true or false.
Element.hasAttributes() - Web APIs
syntax var result = element.hasattributes(); return value result holds the return value true or false.
Element.hasPointerCapture() - Web APIs
syntax targetelement.haspointercapture(pointerid); parameters pointerid the pointerid of a pointerevent object.
Element.id - Web APIs
WebAPIElementid
syntax var idstr = element.id; // get the id element.id = idstr; // set the id idstr is the identifier of the element.
Element.insertAdjacentHTML() - Web APIs
syntax element.insertadjacenthtml(position, text); parameters position a domstring representing the position relative to the element; must be one of the following strings: 'beforebegin': before the element itself.
Element.localName - Web APIs
WebAPIElementlocalName
syntax name = element.localname return value a domstring representing the local part of the element's qualified name.
Element.msZoomTo() - Web APIs
WebAPIElementmsZoomTo
syntax element.mszoomto(arguments); parameters args[in] type: mszoomtooptions contentx[in]: the x-coordinate of the content that is the target of the scroll/zoom.
Element.name - Web APIs
WebAPIElementname
syntax htmlelement.name = string let elname = htmlelement.name let fcontrol = htmlformelement.elementname let controlcollection = htmlformelement.elements.elementname example <form action="" name="forma"> <input type="text" value="foo"> </form> <script type="text/javascript"> // get a reference to the first element in the form let formelement = document.forms['forma'].elements[0] // give...
Element.namespaceURI - Web APIs
syntax namespace = element.namespaceuri example in this snippet, an element is being examined for its localname and its namespaceuri.
Element.onfullscreenchange - Web APIs
syntax targetdocument.onfullscreenchange = fullscreenchangehandler; value an event handler for the fullscreenchange event, indicating that the element has changed in or out of full-screen mode.
Element.onfullscreenerror - Web APIs
syntax targetelement.onfullscreenerror = fullscreenerrorhandler; value an error handler for the fullscreenerror event.
Element.openOrClosedShadowRoot - Web APIs
syntax var shadowroot = element.shadowroot; value a shadowroot object instance, regardless if its mode is set to open or closed, or null if no shadow root is present.
Element.part - Web APIs
WebAPIElementpart
syntax let elementpartlist = element.part examples the following excerpt is from our shadow-part example.
Element.prefix - Web APIs
WebAPIElementprefix
syntax string = element.prefix examples the following logs "x" to the console.
Element.releasePointerCapture() - Web APIs
syntax targetelement.releasepointercapture(pointerid); parameters pointerid the pointerid of a pointerevent object.
Element.removeAttribute() - Web APIs
syntax element.removeattribute(attrname); parameters attrname a domstring specifying the name of the attribute to remove from the element.
Element.removeAttributeNS() - Web APIs
syntax element.removeattributens(namespace, attrname); parameters namespace is a string that contains the namespace of the attribute.
Element.removeAttributeNode() - Web APIs
syntax removedattr = element.removeattributenode(attributenode) attributenode is the attr node that needs to be removed.
Element.requestFullscreen() - Web APIs
syntax var promise = element.requestfullscreen(options); parameters options optional a fullscreenoptions object providing options that control the behavior of the transition to full-screen mode.
Element.requestPointerLock() - Web APIs
syntax instanceofelement.requestpointerlock(); specifications specification status comment pointer lockthe definition of 'requestpointerlock()' in that specification.
Element.scroll() - Web APIs
WebAPIElementscroll
syntax element.scroll(x-coord, y-coord) element.scroll(options) parameters calling with coordinates x-coord the pixel along the horizontal axis of the element that you want displayed in the upper left.
Element.scrollBy() - Web APIs
WebAPIElementscrollBy
syntax element.scrollby(x-coord, y-coord); element.scrollby(options) parameters x-coord is the horizontal pixel value that you want to scroll by.
Element.scrollHeight - Web APIs
syntax elemscrollheight = element.scrollheight; value an integer corresponding to the scrollheight pixel value of the element.
Element.scrollIntoView() - Web APIs
the element interface's scrollintoview() method scrolls the element's parent container such that the element on which scrollintoview() is called is visible to the user syntax element.scrollintoview(); element.scrollintoview(aligntotop); // boolean parameter element.scrollintoview(scrollintoviewoptions); // object parameter parameters aligntotop optional is a boolean value: if true, the top of the element will be aligned to the top of the visible area of the scrollable ancestor.
Element.scrollIntoViewIfNeeded() - Web APIs
syntax todo parameters opt_center is an optional boolean value with a default value of true: if true, the element will be aligned so it is centered within the visible area of the scrollable ancestor.
Element.scrollLeft - Web APIs
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.
Element.scrollLeftMax - Web APIs
syntax var pxl = element.scrollleftmax; specifications this property is not part of any specification.
Element.scrollTo() - Web APIs
WebAPIElementscrollTo
syntax element.scrollto(x-coord, y-coord) element.scrollto(options) parameters x-coord is the pixel along the horizontal axis of the element that you want displayed in the upper left.
Element.scrollTop - Web APIs
WebAPIElementscrollTop
syntax // get the number of pixels scrolled.
Element.scrollTopMax - Web APIs
syntax var pxl = elt.scrolltopmax; specifications this property is not part of any specification.
Element.scrollWidth - Web APIs
syntax var xscrollwidth = element.scrollwidth; xscrollwidth is the width of the content of element in pixels.
Element.setAttribute() - Web APIs
syntax element.setattribute(name, value); parameters name a domstring specifying the name of the attribute whose value is to be set.
Element.setAttributeNS() - Web APIs
syntax element.setattributens(namespace, name, value) namespace is a string specifying the namespace of the attribute.
Element.setAttributeNode() - Web APIs
syntax var replacedattr = element.setattributenode(attribute); attribute is the attr node to set on the element.
Element.setAttributeNodeNS() - Web APIs
syntax replacedattr = element.setattributenodens(attributenode) replacedattr is the replaced attribute node, if any, returned by this function.
Element.setCapture() - Web APIs
syntax element.setcapture(retargettoelement); retargettoelement if true, all events are targeted directly to this element; if false, events can also fire at descendants of this element.
Element.setPointerCapture() - Web APIs
syntax targetelement.setpointercapture(pointerid); parameters pointerid the pointerid of a pointerevent object.
Element.shadowRoot - Web APIs
syntax var shadowroot = element.shadowroot; value a shadowroot object instance, or null if the associated shadow root was attached with its mode set to closed.
Element.slot - Web APIs
WebAPIElementslot
syntax var astring = element.slot element.slot = astring value a domstring.
Element.tabStop - Web APIs
WebAPIElementtabStop
syntax var istabstop = element.tabstop; element.tabstop = (true|false); example // tbd ...
Element.tagName - Web APIs
WebAPIElementtagName
syntax elementname = element.tagname; value a string indicating the element's tag name.
Element.toggleAttribute() - Web APIs
syntax element.toggleattribute(name [, force]); parameters name a domstring specifying the name of the attribute to be toggled.
Event() - Web APIs
WebAPIEventEvent
syntax new event(typearg[, eventinit]); values typearg this is a domstring representing the name of the event.
Event.bubbles - Web APIs
WebAPIEventbubbles
syntax var doesitbubble = event.bubbles; value a boolean, which is true if the event bubbles up through the dom.
Event.cancelBubble - Web APIs
syntax event.cancelbubble = bool; var bool = event.cancelbubble; value a boolean.
Event.cancelable - Web APIs
WebAPIEventcancelable
syntax bool = event.cancelable; value the result is a boolean, which is true if the event can be canceled.
Event.composed - Web APIs
WebAPIEventcomposed
syntax const iscomposed = event.composed; value a boolean which is true if the event will cross from the shadow dom into the standard dom after reaching the shadow root.
Event.composedPath() - Web APIs
syntax var composed = event.composedpath(); parameters none.
Event.currentTarget - Web APIs
syntax var currenteventtarget = event.currenttarget; value eventtarget examples event.currenttarget is interesting to use when attaching the same event handler to several elements.
Event.defaultPrevented - Web APIs
syntax var defaultwasprevented = event.defaultprevented; value a boolean, where true indicates that the default user agent action was prevented, and false indicates that it was not.
Event.eventPhase - Web APIs
WebAPIEventeventPhase
syntax let phase = event.eventphase; value returns an integer value which specifies the current evaluation phase of the event flow.
Event.initEvent() - Web APIs
WebAPIEventinitEvent
syntax event.initevent(type, bubbles, cancelable); type is a domstring defining the type of event.
Event.isTrusted - Web APIs
WebAPIEventisTrusted
syntax var eventistrusted = event.istrusted; value boolean example if (e.istrusted) { /* the event is trusted */ } else { /* the event is not trusted */ } specification specification status comment domthe definition of 'event.istrusted' in that specification.
Event.msConvertURL() - Web APIs
syntax var retval = dragevent.msconverturl(file, targettype, targeturl); parameters file [in] type: file the file object to be converted.
Event.preventDefault() - Web APIs
syntax event.preventdefault(); examples blocking default click handling toggling a checkbox is the default action of clicking on a checkbox.
Event.returnValue - Web APIs
WebAPIEventreturnValue
syntax event.returnvalue = bool; var bool = event.returnvalue; value a boolean value which is true if the event has not been canceled; otherwise, if the event has been canceled or the default has been prevented, the value is false.
Event.stopImmediatePropagation() - Web APIs
syntax event.stopimmediatepropagation(); specifications specification status comment domthe definition of 'event.stopimmediatepropagation()' in that specification.
Event.stopPropagation() - Web APIs
syntax event.stoppropagation(); parameters none.
Event.target - Web APIs
WebAPIEventtarget
syntax const thetarget = someevent.target; value eventtarget example the event.target property can be used in order to implement event delegation.
Event.timeStamp - Web APIs
WebAPIEventtimeStamp
syntax time = event.timestamp; value this value is the number of milliseconds elapsed from the beginning of the current document's lifetime till the event was created.
Event.type - Web APIs
WebAPIEventtype
syntax let eventtype = event.type; value a domstring containing the type of event.
EventListener.handleEvent() - Web APIs
syntax eventlistener.handleevent(event); parameters event an event object describing the event that has been fired and needs to be processed.
EventSource() - Web APIs
syntax eventsource = new eventsource(url, configuration); parameters url a usvstring that represents the location of the remote resource serving the events/messages.
EventSource.close() - Web APIs
WebAPIEventSourceclose
syntax eventsource.close(); parameters none.
EventSource.onerror - Web APIs
syntax eventsource.onerror = function examples evtsource.onerror = function() { console.log("eventsource failed."); }; note: you can find a full example on github — see simple sse demo using php.
EventSource.onmessage - Web APIs
syntax eventsource.onmessage = function examples evtsource.onmessage = function(e) { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); } note: you can find a full example on github — see simple sse demo using php.
EventSource.onopen - Web APIs
syntax eventsource.onopen = function examples evtsource.onopen = function() { console.log("connection to server opened."); }; note: you can find a full example on github — see simple sse demo using php.
EventSource.readyState - Web APIs
syntax var myreadystate = eventsource.readystate; value a number representing the state of the connection.
EventSource.url - Web APIs
WebAPIEventSourceurl
syntax var myurl = eventsource.url; value a domstring representing the url of the source.
EventSource.withCredentials - Web APIs
syntax var mywithcredentials = eventsource.withcredentials; value a boolean indicating whether the eventsource object was instantiated with cors credentials set (true), or not (false, the default).
EventTarget() - Web APIs
syntax var myeventtarget = new eventtarget(); parameters none.
EventTarget.addEventListener() - Web APIs
syntax target.addeventlistener(type, listener [, options]); target.addeventlistener(type, listener [, usecapture]); target.addeventlistener(type, listener [, usecapture, wantsuntrusted ]); // gecko/mozilla only parameters type a case-sensitive string representing the event type to listen for.
EventTarget.dispatchEvent() - Web APIs
syntax cancelled = !target.dispatchevent(event) parameter event is the event object to be dispatched.
EventTarget.removeEventListener() - Web APIs
the event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see matching event listeners for removal syntax target.removeeventlistener(type, listener[, options]); target.removeeventlistener(type, listener[, usecapture]); parameters type a string which specifies the type of event for which to remove an event listener.
ExtendableEvent() - Web APIs
syntax var extendableevent = new extendableevent(type, init); parameters type the type of the extendableevent, for example install, activate.
ExtendableEvent.waitUntil() - Web APIs
syntax extendableevent.waituntil(promise); parameters a promise.
ExtendableMessageEvent() - Web APIs
syntax var extendablemessageevent = new extendablemessageevent(type, init); parameters type a domstring that defines the type of the message event being created.
ExtendableMessageEvent.data - Web APIs
syntax var mydata = extendablemessageevent.data; value any data type.
ExtendableMessageEvent.lastEventId - Web APIs
syntax var mylasteventid = extendablemessageevent.lasteventid; value a domstring.
ExtendableMessageEvent.origin - Web APIs
syntax var myorigin = extendablemessageevent.origin; value a usvstring.
ExtendableMessageEvent.ports - Web APIs
the ports read-only property of the extendablemessageevent interface returns the array containing the messageport objects representing the ports of the associated message channel (the channel the message is being sent through.) syntax var myports = extendablemessageevent.ports; value an array of messageport objects.
ExtendableMessageEvent.source - Web APIs
syntax var mysource = extendablemessageevent.source; value a client, serviceworker or messageport object.
FeaturePolicy.allowedFeatures() - Web APIs
syntax const allowed = featurepolicy.allowedfeatures() parameters none.
FeaturePolicy.allowsFeature() - Web APIs
syntax const allowed = featurepolicy.allowsfeature(<feature>) or const allowed = featurepolicy.allowsfeature(<feature>, <origin>) parameters feature name a specific feature name must be specified.
FeaturePolicy.features() - Web APIs
syntax const supportedfeatures = featurepolicy.features() parameters none.
FeaturePolicy.getAllowlistForFeature() - Web APIs
syntax const allowlist = featurepolicy.getallowlistforfeature(<feature>) parameter feature name a specific feature name must be specified.
FederatedCredential - Web APIs
syntax var mycredential = new federatedcredential(init) parameters init options are: provider: a usvstring; identifying the credential provider.
FederatedCredential.protocol - Web APIs
syntax var protocol = federatedcredential.protocol value a domstring containing a credential's federated identity protocol (e.g.
FederatedCredential.provider - Web APIs
syntax var provider = federatedcredential.provider value a usvstring containing a credential's federated identity provider.
FetchEvent() - Web APIs
syntax var fetchevent = new fetchevent(type, init); parameters type a domstring object specifying which event the object represents.
FetchEvent.preloadResponse - Web APIs
syntax var expectedresponse = fetchevent.preloadresponse; value a promise that resolves to a response or otherwise to undefined.
FetchEvent.client - Web APIs
WebAPIFetchEventclient
syntax var myclient = fetchevent.client; value a client object.
FetchEvent.clientId - Web APIs
syntax var myclientid = fetchevent.clientid; value a domstring that represents the client id.
FetchEvent.isReload - Web APIs
syntax var reloaded = fetchevent.isreload value a boolean.
FetchEvent.navigationPreload - Web APIs
syntax var promise = fetchevent.navigationpreload value a promise that resolves to the instance of navigationpreloadmanager.
FetchEvent.replacesClientId - Web APIs
syntax var myreplacedclientid = fetchevent.replacesclientid; value a domstring.
FetchEvent.request - Web APIs
this property is non-nullable (since version 46, in the case of firefox.) if a request is not provided by some other means, the constructor init object must contain a request (see fetchevent.fetchevent().) syntax var recentrequest = fetchevent.request; value a request object.
FetchEvent.respondWith() - Web APIs
syntax fetchevent.respondwith( // promise that resolves to a response.
FetchEvent.resultingClientId - Web APIs
syntax var myresultingclientid = fetchevent.resultingclientid; value a domstring.
File.File() - Web APIs
WebAPIFileFile
syntax new file(bits, name[, options]); parameters bits an array of arraybuffer, arraybufferview, blob, usvstring objects, or a mix of any of such objects, that will be put inside the file.
File.fileName - Web APIs
WebAPIFilefileName
syntax var name = instanceoffile.filename; value a string specification not part of any specification.
File.fileSize - Web APIs
WebAPIFilefileSize
syntax var size = instanceoffile.filesize; value a number.
File.getAsBinary() - Web APIs
WebAPIFilegetAsBinary
syntax var binary = instanceoffile.getasbinary(); returns a string.
File.getAsDataURL() - Web APIs
WebAPIFilegetAsDataURL
syntax var url = instanceoffile.getasdataurl(); returns a string representing a data: url example // fileinput is a htmlinputelement: <input type="file" id="myfileinput" multiple> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (similar to nodelist) var files = fileinput.files; // array with acceptable file types var accept = ["image/png"]; // img is a htmlimgelement: <img id="myimg"> var img = document.getelementbyid("myimg"); // if we accept the first selected file type if (accept.indexof(files[0].mediatype) > -1) { // display the image // sa...
File.getAsText() - Web APIs
WebAPIFilegetAsText
syntax var str = instanceoffile.getastext(encoding); parameters encoding a string indicating the encoding to use for the returned data.
File.lastModified - Web APIs
WebAPIFilelastModified
syntax const time = instanceoffile.lastmodified; value a number that represents the number of milliseconds since the unix epoch.
File.lastModifiedDate - Web APIs
syntax var time = instanceoffile.lastmodifieddate value a date object indicating the date and time at which the file was last modified.
File.name - Web APIs
WebAPIFilename
syntax var name = file.name; value a string, containing the name of the file without path, such as "my resume.rtf".
File.size - Web APIs
WebAPIFilesize
syntax var size = instanceoffile.size value a number specification not part of any specification.
File.type - Web APIs
WebAPIFiletype
syntax var name = file.type; value a string, containing the media type(mime) indicating the type of the file, for example "image/png" for png images example <input type="file" multiple onchange="showtype(this)"> function showtype(fileinput) { var files = fileinput.files; for (var i = 0; i < files.length; i++) { var name = files[i].name; var type = files[i].type; alert("filename: " + name + " , type: " + type); } } note: based on the current implementation, browsers won't actually read the bytestream of a file to determine its media type.
File.webkitRelativePath - Web APIs
syntax relativepath = file.webkitrelativepath value a usvstring containing the path of the file relative to the ancestor directory the user selected.
FileReader() - Web APIs
syntax var reader = new filereader(); parameters none.
FileReader.abort() - Web APIs
WebAPIFileReaderabort
syntax instanceoffilereader.abort(); exceptions dom_file_abort_err thrown when abort is called while no read operation is in progress (that is, the state isn't loading).
FileReader.error - Web APIs
WebAPIFileReadererror
syntax var error = instanceoffilereader.error value a domerror containing the relevant error.
FileReader.onabort - Web APIs
syntax reader.onabort = function() { ...
FileReader.readAsArrayBuffer() - Web APIs
syntax instanceoffilereader.readasarraybuffer(blob); parameters blob the blob or file from which to read.
FileReader.readAsBinaryString() - Web APIs
syntax instanceoffilereader.readasbinarystring(blob); parameters blob the blob or file from which to read.
FileReader.readAsDataURL() - Web APIs
syntax instanceoffilereader.readasdataurl(blob); parameters blob the blob or file from which to read.
FileReader.readAsText() - Web APIs
syntax instanceoffilereader.readastext(blob[, encoding]); parameters blob the blob or file from which to read.
FileReader.result - Web APIs
WebAPIFileReaderresult
syntax var file = instanceoffilereader.result value an appropiate string or arraybuffer based on which of the reading methods was used to initiate the read operation.
FileReaderSync.readAsArrayBuffer() - Web APIs
syntax arraybuffer readasarraybuffer( in blob blob ); parameters blob the dom file or blob to read into the file or arraybuffer.
FileReaderSync.readAsBinaryString() - Web APIs
syntax readasbinarystring(file); readasbinarystring(blob); parameters blob the dom file or blob to read.
FileReaderSync.readAsDataURL() - Web APIs
syntax readasdataurl(file); readasdataurl(blob); parameters blob the dom file or blob to read.
FileReaderSync.readAsText() - Web APIs
syntax readastext(file); readastext(blob); readastext(file, encoding); readastext(blob, encoding); parameters blob the dom file or blob to read.
FileRequest.lockedFile - Web APIs
syntax var lockedfile = instanceoffilerequest.lockedfile value a lockedfile object.
FileRequest.onprogress - Web APIs
syntax instanceoffilerequest.onprogress = function; where instanceoffilerequest is a filerequest object and function is the javascript function to execute.
FileSystem.name - Web APIs
WebAPIFileSystemname
syntax var fsname = filesystem.name; value a usvstring representing the file system's name.
FileSystem.root - Web APIs
WebAPIFileSystemroot
syntax var rootdirent = filesystem.root; value a filesystemdirectoryentry representing the file system's root directory.
FileSystemDirectoryEntry.createReader() - Web APIs
syntax directoryreader = filesystemdirectoryentry.createreader(); parameters none.
FileSystemDirectoryEntry.getDirectory() - Web APIs
syntax filesystemdirectoryentry.getdirectory([path][, options][, successcallback][, errorcallback]); parameters path optional a usvstring representing an absolute path or a path relative to the directory on which the method is called, describing which directory entry to return.
FileSystemDirectoryEntry.getFile() - Web APIs
syntax filesystemdirectoryentry.getfile([path][, options][, successcallback][, errorcallback]); parameters path optional a usvstring specifying the path, relative to the directory on which the method is called, describing which file's entry to return.
FileSystemDirectoryEntry.removeRecursively() - Web APIs
syntax filesystemdirectoryentry.removerecursively(successcallback[, errorcallback]); parameters successcallback a function to call once the directory removal process has completed.
FileSystemDirectoryReader.readEntries() - Web APIs
syntax readentries(successcallback[, errorcallback]); parameters successcallback a function which is called when the directory's contents have been retrieved.
FileSystemEntry.copyTo() - Web APIs
syntax filesystementry.copyto(newparent[, newname][, successcallback][, errorcallback]); parameters newparent a filesystemdirectoryentry object specifying the destination directory for the copy operation.
FileSystemEntry.filesystem - Web APIs
syntax var filesystem = filesystementry.filesystem; value a filesystem representing the file system on which the file or directory described by the filesystementry is located..
FileSystemEntry.fullPath - Web APIs
syntax var fullpath = filesystementry.fullpath; value a usvstring indicating the entry's full path.
FileSystemEntry.getMetadata() - Web APIs
syntax filesystementry.getmetadata(successcallback[, errorcallback]); parameters successcallback a function which is called when the copy operation is succesfully completed.
FileSystemEntry.getParent() - Web APIs
syntax filesystementry.getparent(successcallback[, errorcallback]); parameters successcallback a function which is called when the parent directory entry has been retrieved.
FileSystemEntry.isDirectory - Web APIs
syntax var isdirectory = filesystementry.isdirectory; value a boolean indicating whether or not the filesystementry is a directory.
FileSystemEntry.isFile - Web APIs
syntax var isfile = filesystementry.isfile; value a boolean indicating whether or not the filesystementry is a file.
FileSystemEntry.moveTo() - Web APIs
syntax filesystementry.moveto(newparent[, newname][, successcallback][, errorcallback]); parameters newparent a filesystemdirectoryentry object specifying the destination directory for the move operation.
FileSystemEntry.name - Web APIs
syntax var name = filesystementry.name; value a usvstring indicating the entry's name.
FileSystemEntry.remove() - Web APIs
syntax filesystementry.remove(successcallback[, errorcallback]); parameters successcallback a function which is called once the file has been successfully removed.
FileSystemEntry.toURL() - Web APIs
syntax filesystementry.tourl([mimetype]); parameters mimetype optional an optional string specifying the mime type to use when interpreting the file.
FileSystemFileEntry.createWriter() - Web APIs
syntax filesystemfileentry.createwriter(successcallback[, errorcallback]); parameters successcallback a callback function which is called when the filewriter has been created successfully; the filewriter is passed into the callback as the only parameter.
FileSystemFileEntry.file() - Web APIs
syntax filesystemfileentry.file(successcallback[, errorcallback]); parameters successcallback a callback function which is called when the file has been created successfully; the file is passed into the callback as the only parameter.
FileSystemFlags.create - Web APIs
syntax filesystemflags.create = booleanvalue values the table below describes the result of each possible combination of these flags depending on whether or not the target file or directory path already exists.
FileSystemFlags.exclusive - Web APIs
syntax filesystemflags.exclusive = booleanvalue values the table below describes the result of each possible combination of these flags depending on whether or not the target file or directory path already exists.
FocusEvent() - Web APIs
syntax var focusevent = new focusevent(typearg[, focuseventinit]); properties the focusevent() constructor also inherits arguments from uievent() and from event().
FocusEvent.relatedTarget - Web APIs
syntax secondtarget = focusevent.relatedtarget specifications specification status comment ui eventsthe definition of 'focusevent.relatedtarget' in that specification.
FontFace.FontFace() - Web APIs
WebAPIFontFaceFontFace
syntax var fontface = new fontface(family, source, descriptors); parameters family specifies a name that will be used as the font face value for font properties.
FontFace.display - Web APIs
WebAPIFontFacedisplay
syntax var display = fontface.display fontface.display = display value a cssomstring with one of the following values.
FontFace.family - Web APIs
WebAPIFontFacefamily
syntax instanceoffontface.family = 'font family name'; var fontface = instanceoffontface.family; // "font family name" value a domstring.
FontFace.featureSettings - Web APIs
syntax var featuresettingdescriptor = fontface.featuresettings; fontface.featuresettings = featuresettingdescriptor; value a cssomstring containing a descriptor.
FontFace.load - Web APIs
WebAPIFontFaceload
syntax var promise = fontface.load(); parameters none.
FontFace.status - Web APIs
WebAPIFontFacestatus
syntax var status = fontface.status; value one of "unloaded", "loading", "loaded", or "error".
FontFace.stretch - Web APIs
WebAPIFontFacestretch
syntax var stretchdescriptor = fontface.stretch; fontface.stretch = stretchdescriptor; value a cssomstring containing a descriptor as it would be defined in a style sheet's @font-face rule.
FontFace.style - Web APIs
WebAPIFontFacestyle
syntax var style = fontface.style; fontface.style = value; value a cssomstring containing the descriptors defined in the style sheet's @font-face rule.
FontFace.unicodeRange - Web APIs
syntax var unicoderangedescriptor = fontface.unicoderange; fontface.unicoderange = unicoderangedescriptor; value a cssomstring containing a descriptor as it would appear in a style sheet's @font-face rule.
FontFace.variant - Web APIs
WebAPIFontFacevariant
syntax var variantsubproperty = fontface.variant; fontface.variant = variantsubproperty; value a cssomstring containing a descriptor as it would be defined in a style sheet's @font-face rule.
FontFace.weight - Web APIs
WebAPIFontFaceweight
syntax var weightdescriptor = fontface.weight; fontface.weight = weightdescriptor; value a cssomstring containing a descriptor as it would be defined in a style sheet's @font-face rule.
FontFace - Web APIs
WebAPIFontFace
fontface.loaded read only returns a promise that resolves with the current fontface object when the font specified in the object's constructor is done loading or rejects with a syntaxerror.
FontFaceSet.check() - Web APIs
WebAPIFontFaceSetcheck
syntax bool = afontfaceset.check(font); bool = afontfaceset.check(font, text); returns a boolean that is true if the font list is available parameters font: a font specification using the css value syntax, e.g.
FontFaceSet.ready - Web APIs
WebAPIFontFaceSetready
syntax fontfaceset.ready.then(function(fontfaceset) { // ...
FontFaceSetLoadEvent.FontFaceSetLoadEvent() - Web APIs
syntax var fontfacesetloadevent = new fontfacesetloadevent(type[, options]) parameters type the literal value 'type' (quotation marks included).
FontFaceSetLoadEvent.fontfaces - Web APIs
syntax var fontface[] = fontfacesetloadevent.fontfaces value an array of fontface instance.
FormData() - Web APIs
WebAPIFormDataFormData
syntax var formdata = new formdata(form) parameters form optional an html <form> element — when specified, the formdata object will be populated with the form's current keys/values using the name property of each element for the keys and their submitted value for the values.
FormData.append() - Web APIs
WebAPIFormDataappend
syntax there are two versions of this method: a two and a three parameter version: formdata.append(name, value); formdata.append(name, value, filename); parameters name the name of the field whose data is contained in value.
FormData.delete() - Web APIs
WebAPIFormDatadelete
syntax formdata.delete(name); parameters name the name of the key you want to delete.
FormData.entries() - Web APIs
WebAPIFormDataentries
syntax formdata.entries(); return value returns an iterator.
FormData.get() - Web APIs
WebAPIFormDataget
syntax formdata.get(name); parameters name a usvstring representing the name of the key you want to retrieve.
FormData.getAll() - Web APIs
WebAPIFormDatagetAll
syntax formdata.getall(name); parameters name a usvstring representing the name of the key you want to retrieve.
FormData.has() - Web APIs
WebAPIFormDatahas
syntax formdata.has(name); parameters name a usvstring representing the name of the key you want to test for.
FormData.keys() - Web APIs
WebAPIFormDatakeys
syntax formdata.keys(); return value returns an iterator.
FormData.set() - Web APIs
WebAPIFormDataset
syntax there are two versions of this method: a two and a three parameter version: formdata.set(name, value); formdata.set(name, value, filename); parameters name the name of the field whose data is contained in value.
FormData.values() - Web APIs
WebAPIFormDatavalues
syntax formdata.values(); return value returns an iterator.
FormDataEvent() - Web APIs
syntax new formdataevent(type[, formeventinit]); values type a domstring representing the name of the event.
FormDataEvent.formData - Web APIs
syntax formdata = formdataevent.formdata returns a formdata object.
Using the Frame Timing API - Web APIs
in the following example, two observers for the "frame" performance entry type are created and the first observer constructor uses inline function syntax.
FullscreenOptions.navigationUI - Web APIs
syntax let fullscreenoptions = { navigationui: value }; value the value of the navigationui property must be one of the following strings.
GainNode() - Web APIs
WebAPIGainNodeGainNode
syntax var gainnode = new gainnode(context, options) parameters inherits parameters from the audionodeoptions dictionary.
GainNode.gain - Web APIs
WebAPIGainNodegain
syntax var audioctx = new audiocontext(); var gainnode = audioctx.creategain(); gainnode.gain.value = 0.5; value an audioparam.
Gamepad.axes - Web APIs
WebAPIGamepadaxes
syntax readonly attribute double[] axes; example function gameloop() { if(navigator.webkitgetgamepads) { var gp = navigator.webkitgetgamepads()[0]; } else { var gp = navigator.getgamepads()[0]; } if(gp.axes[0] != 0) { b -= gp.axes[0]; } else if(gp.axes[1] != 0) { a += gp.axes[1]; } else if(gp.axes[2] != 0) { b += gp.axes[2]; } else if(gp.axes[3] != 0) { a -= gp.axes[3]; } ball.style.left = a*2 + "px"; ball.style.top ...
Gamepad.buttons - Web APIs
WebAPIGamepadbuttons
syntax readonly attribute gamepadbutton[] buttons; example the following code is taken from my gamepad api button demo (you can view the demo live, and find the source code on github.) note the code fork — in chrome navigator.getgamepads needs a webkit prefix and the button values are stores as an array of double values, whereas in firefox navigator.getgamepads doesn't need a prefix, and the...
Gamepad.connected - Web APIs
WebAPIGamepadconnected
syntax readonly attribute boolean connected; example var gp = navigator.getgamepads()[0]; console.log(gp.connected); value a boolean.
Gamepad.hand - Web APIs
WebAPIGamepadhand
syntax var myhand = gamepadinstance.hand; value a gamepadhand enum; possible values are: left — the left hand.
Gamepad.hapticActuators - Web APIs
syntax var myhapticactuators = gamepadinstance.hapticactuators; value an array containing gamepadhapticactuator objects.
Gamepad.index - Web APIs
WebAPIGamepadindex
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.
Gamepad.mapping - Web APIs
WebAPIGamepadmapping
syntax readonly attribute domstring mapping; example var gp = navigator.getgamepads()[0]; console.log(gp.mapping); value a string.
Gamepad.timestamp - Web APIs
WebAPIGamepadtimestamp
syntax readonly attribute domhighrestimestamp timestamp; example var gp = navigator.getgamepads()[0]; console.log(gp.timestamp); value a domhighrestimestamp.
GamepadButton.pressed - Web APIs
syntax var ispressed = navigator.getgamepads()[0].pressed; example var gp = navigator.getgamepads()[0]; // get the first gamepad object if(gp.buttons[0].pressed == true) { // respond to button being pressed } value a boolean.
GamepadButton.value - Web APIs
syntax readonly attribute double value; example var gp = navigator.getgamepads()[0]; if(gp.buttons[0].value > 0) { // respond to analog button being pressed in } value a double.
GamepadEvent() - Web APIs
syntax var gamepadevent = new gamepadevent(typearg, options) parameters typearg a domstring that must be one of gamepadconnected or gamepaddisconnected.
GamepadEvent.gamepad - Web APIs
syntax readonly attribute gamepad gamepad; example the gamepad property being called on a fired window.gamepadconnected event.
GamepadHapticActuator.pulse() - Web APIs
syntax gamepadhapticactuatorinstance.pulse(value, duration).then(function(result) { ...
GamepadHapticActuator.type - Web APIs
syntax var myactuatortype = gamepadhapticactuatorinstance.type; value an enum of type gamepadhapticactuatortype; currently available types are: vibration — vibration hardware, which creates a rumbling effect.
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.
Geolocation.getCurrentPosition() - Web APIs
syntax navigator.geolocation.getcurrentposition(success[, error[, [options]]) parameters success a callback function that takes a geolocationposition object as its sole input parameter.
Geolocation.watchPosition() - Web APIs
syntax navigator.geolocation.watchposition(success[, error[, options]]) parameters success a callback function that takes a geolocationposition object as an input parameter.
GeolocationCoordinates.accuracy - Web APIs
syntax let acc = geolocationcoordinatesinstance.accuracy value a positive double representing the accuracy, with a 95% confidence level, of the geolocationcoordinates.latitude and geolocationcoordinates.longitude properties expressed in meters.
GeolocationCoordinates.altitude - Web APIs
syntax let alt = geolocationcoordinatesinstance.altitude value a double representing the altitude of the position in meters, relative to sea level.
GeolocationCoordinates.altitudeAccuracy - Web APIs
syntax let altacc = geolocationcoordinatesinstance.altitudeaccuracy value a positive double representing the accuracy, with a 95% confidence level, of the altitude expressed in meters.
GeolocationCoordinates.heading - Web APIs
syntax let heading = geolocationcoordinatesinstance.heading value a double representing the direction in which the device is traveling.
GeolocationCoordinates.latitude - Web APIs
syntax let lat = geolocationcoordinatesinstance.latitude value a double representing the latitude of the position in decimal degrees.
GeolocationCoordinates.longitude - Web APIs
syntax let longitude = geolocationcoordinatesinstance.longitude value the value in longitude is the geographical longitude of the location on earth described by the coordinates object, in decimal degrees.
GeolocationCoordinates.speed - Web APIs
syntax let speed = geolocationcoordinatesinstance.speed value a double representing the velocity of the device in meters per second.
GeolocationPosition.coords - Web APIs
syntax let coord = geolocationpositioninstance.coords value a geolocationcoordinates object instance.
GeolocationPosition.timestamp - Web APIs
syntax var timestamp = geolocationpositioninstance.timestamp value a domtimestamp object instance.
GeolocationPositionError.code - Web APIs
syntax let typeerr = geolocationpositionerrorinstance.code value an unsigned short representing the error code.
GeolocationPositionError.message - Web APIs
syntax let msg = geolocationpositionerrorinstance.message value a human-readable domstring describing the details of the error.
GlobalEventHandlers.onloadstart - Web APIs
syntax element.onloadstart = handlerfunction; var handlerfunction = element.onloadstart; handlerfunction should be either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.onabort - Web APIs
syntax window.onabort = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onanimationcancel - Web APIs
syntax var animcancelhandler = target.onanimationcancel; target.onanimationcancel = function value a function to be called when an animationcancel event occurs indicating that a css animation has begun on the target, where the target object is an html element (htmlelement), document (document), or window (window).
GlobalEventHandlers.onanimationend - Web APIs
syntax var animendhandler = target.onanimationend; target.onanimationend = function value a function to be called when an animationend event occurs indicating that a css animation has begun on the target, where the target object is an html element (htmlelement), document (document), or window (window).
GlobalEventHandlers.onanimationiteration - Web APIs
syntax var animiterationhandler = target.onanimationiteration; target.onanimationiteration = function value a function to be called when an animationiteration event occurs indicating that a css animation has reached the end of an iteration while running on the target, where the target object is an html element (htmlelement), document (document), or window (window).
GlobalEventHandlers.onanimationstart - Web APIs
syntax var animstarthandler = target.onanimationstart; target.onanimationstart = function value a function to be called when an animationstart event occurs indicating that a css animation has begun on the target, where the target object is an html element (htmlelement), document (document), or window (window).
GlobalEventHandlers.onauxclick - Web APIs
syntax target.onauxclick = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onblur - Web APIs
syntax target.onblur = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.oncancel - Web APIs
syntax target.oncancel = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.oncanplay - Web APIs
syntax element.oncanplay = handlerfunction; var handlerfunction = element.oncanplay; handlerfunction is either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.oncanplaythrough - Web APIs
syntax element.oncanplaythrough = handlerfunction; var handlerfunction = element.oncanplaythrough; handlerfunction is either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.onchange - Web APIs
syntax target.onchange = functionref; functionref is a function name or a function expression.
GlobalEventHandlers.onclick - Web APIs
syntax target.onclick = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onclose - Web APIs
syntax target.onclose = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.oncontextmenu - Web APIs
syntax target.oncontextmenu = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.oncuechange - Web APIs
syntax element.oncuechange = handlerfunction; var handlerfunction = element.oncuechange; handlerfunction is either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.ondblclick - Web APIs
syntax target.ondblclick = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.ondrag - Web APIs
syntax var draghandler = targetelement.ondrag; return value draghandler the drag event handler for element targetelement.
GlobalEventHandlers.ondragend - Web APIs
syntax var dragendhandler = targetelement.ondragend; return value dragendhandler the dragend event handler for element targetelement.
GlobalEventHandlers.ondragenter - Web APIs
syntax var dragenterhandler = targetelement.ondragenter; return value dragenterhandler the dragenter event handler for element targetelement.
GlobalEventHandlers.ondragexit - Web APIs
syntax var dragexithandler = targetelement.ondragexit; return value dragexithandler the dragexit event handler for element targetelement.
GlobalEventHandlers.ondragleave - Web APIs
syntax var dragleavehandler = targetelement.ondragleave; return value dragleavehandler the dragleave event handler for element targetelement.
GlobalEventHandlers.ondragover - Web APIs
syntax var dragoverhandler = targetelement.ondragover; return value dragoverhandler the dragover event handler for element targetelement.
GlobalEventHandlers.ondragstart - Web APIs
syntax var dragstarthandler = targetelement.ondragstart; return value dragstarthandler the dragstart event handler for element targetelement.
GlobalEventHandlers.ondrop - Web APIs
syntax var drophandler = targetelement.ondrop; return value drophandler the drop event handler for element targetelement.
GlobalEventHandlers.ondurationchange - Web APIs
syntax element.ondurationchange = handlerfunction; var handlerfunction = element.ondurationchange; handlerfunction is either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.onemptied - Web APIs
syntax element.onemptied = handlerfunction; var handlerfunction = element.onemptied; handlerfunction should be either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.onended - Web APIs
syntax element.onended = handlerfunction; var handlerfunction = element.onended; handlerfunction is either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.onfocus - Web APIs
syntax target.onfocus = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onformdata - Web APIs
syntax target.onformdata = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.ongotpointercapture - Web APIs
syntax target.ongotpointercapture = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.oninput - Web APIs
syntax target.oninput = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.oninvalid - Web APIs
syntax target.oninvalid = functionref; var functionref = target.oninvalid; value functionref is a function name or a function expression.
GlobalEventHandlers.onkeydown - Web APIs
syntax target.onkeydown = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onkeypress - Web APIs
syntax target.onkeypress = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onkeyup - Web APIs
syntax target.onkeyup = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onload - Web APIs
syntax target.onload = functionref; value functionref is the handler function to be called when the window’s load event fires.
GlobalEventHandlers.onloadeddata - Web APIs
syntax element.onloadeddata = handlerfunction; var handlerfunction = element.onloadeddata; handlerfunction is either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.onloadedmetadata - Web APIs
syntax element.onloadedmetadata = handlerfunction; var handlerfunction = element.onloadedmetadata; handlerfunction should be either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.onloadend - Web APIs
the onloadend property of the globaleventhandlers mixin is an eventhandler representing the code to be called when the loadend event is raised (when progress has stopped on the loading of a resource.) syntax img.onloadend = funcref; value funcref is the handler function to be called when the resource's loadend event fires.
GlobalEventHandlers.onloadstart - Web APIs
the onloadstart property of the globaleventhandlers mixin is an eventhandler representing the code to be called when the loadstart event is raised (when progress has begun on the loading of a resource.) syntax img.onloadstart = funcref; value funcref is the handler function to be called when the resource's loadstart event fires.
GlobalEventHandlers.onlostpointercapture - Web APIs
syntax target.onlostpointercapture = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onmousedown - Web APIs
syntax target.onmousedown = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onmouseenter - Web APIs
syntax element.onmouseenter = handlerfunction; var handlerfunction = element.onmouseenter; handlerfunction is either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.onmouseleave - Web APIs
syntax element.onmouseleave = handlerfunction; var handlerfunction = element.onmouseleave; handlerfunction is either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.onmousemove - Web APIs
syntax target.onmousemove = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onmouseout - Web APIs
syntax element.onmouseout = function; example this example adds an onmouseout and an onmouseover event to a paragraph.
GlobalEventHandlers.onmouseover - Web APIs
syntax element.onmouseover = function; example this example adds an onmouseover and an onmouseout event to a paragraph.
GlobalEventHandlers.onmouseup - Web APIs
syntax target.onmouseup = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onmousewheel - Web APIs
syntax element.onmousewheel = handlerfunction; var handlerfunction = element.onmousewheel; handlerfunction should be either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.onpause - Web APIs
syntax element.onpause = handlerfunction; var handlerfunction = element.onpause; handlerfunction should be either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.onplay - Web APIs
syntax element.onplay = handlerfunction; var handlerfunction = element.onplay; handlerfunction should be either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.onplaying - Web APIs
syntax element.onplaying = handlerfunction; var handlerfunction = element.onplaying; handlerfunction is either null or a javascript function specifying the handler for the event.
GlobalEventHandlers.onpointercancel - Web APIs
syntax targetelement.onpointercancel = cancelhandler; var cancelhandler = targetelement.onpointercancel; value cancelhandler the pointercancel event handler for element targetelement.
GlobalEventHandlers.onpointerdown - Web APIs
syntax target.onpointerdown = downhandler; var downhandler = target.onpointerdown; value a function to handle the pointerdown event for the target element, document, or window.
GlobalEventHandlers.onpointerenter - Web APIs
syntax targetelement.onpointerenter = enterhandler; var enterhandler = targetelement.onpointerenter; value enterhandler the pointerenter event handler for element targetelement.
GlobalEventHandlers.onpointerleave - Web APIs
syntax eventtarget.onpointerleave = leavehandler; var leavehandler = eventtarget.onpointerleave; value leavehandler the eventlistener which will be invoked to handle pointerleave events sent to the target.
GlobalEventHandlers.onpointermove - Web APIs
syntax targetelement.onpointermove = movehandler; var movehandler = targetelement.onpointermove; value movehandler the pointermove event handler for element targetelement.
GlobalEventHandlers.onpointerout - Web APIs
syntax targetelement.onpointerout = outhandler; var outhandler = targetelement.onpointerout; value outhandler the pointerout event handler for element targetelement.
GlobalEventHandlers.onpointerover - Web APIs
syntax targetelement.onpointerover = overhandler; var overhandler = targetelement.onpointerover; value overhandler the pointerover event handler for element targetelement.
GlobalEventHandlers.onpointerup - Web APIs
syntax targetelement.onpointerup = uphandler; var uphandler = targetelement.onpointerup; value uphandler the pointerup event handler for element targetelement.
GlobalEventHandlers.onreset - Web APIs
syntax target.onreset = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onresize - Web APIs
syntax window.onresize = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onscroll - Web APIs
syntax target.onscroll = functionref value functionref a function name, or a function expression.
GlobalEventHandlers.onselect - Web APIs
syntax target.onselect = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onselectionchange - Web APIs
syntax object.onselectionchange = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onselectstart - Web APIs
syntax object.onselectstart = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.onsubmit - Web APIs
syntax target.onsubmit = functionref; value functionref is a function name or a function expression.
GlobalEventHandlers.ontouchcancel - Web APIs
syntax var cancelhandler = someelement.ontouchcancel; return value cancelhandler the touchcancel event handler for element someelement.
GlobalEventHandlers.ontouchend - Web APIs
syntax var endhandler = targetelement.ontouchend; return value endhandler the touchend event handler for element targetelement.
GlobalEventHandlers.ontouchmove - Web APIs
syntax var movehandler = someelement.ontouchmove; return value movehandler the touchmove event handler for element someelement.
GlobalEventHandlers.ontouchstart - Web APIs
syntax var starthandler = someelement.ontouchstart; return value starthandler the touchstart event handler for element someelement.
GlobalEventHandlers.ontransitioncancel - Web APIs
syntax var transitioncancelhandler = target.ontransitioncancel; target.ontransitioncancel = function value a function to be called when a transitioncancel event occurs indicating that a css transition has been cancelled on the target, where the target object is an html element (htmlelement), document (document), or window (window).
GlobalEventHandlers.ontransitionend - Web APIs
syntax var transitionendhandler = target.ontransitionend; target.ontransitionend = function value a function to be called when a transitionend event occurs indicating that a css transition has completed on the target, where the target object is an html element (htmlelement), document (document), or window (window).
GlobalEventHandlers.onwheel - Web APIs
syntax target.onwheel = functionref; value functionref is a function name or a function expression.
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.
Gyroscope.x - Web APIs
WebAPIGyroscopex
syntax var x = gyroscope.x value a number.
Gyroscope.y - Web APIs
WebAPIGyroscopey
syntax var y = gyroscope.y value a number.
Gyroscope.z - Web APIs
WebAPIGyroscopez
syntax var z = gyroscope.z value a number.
HTMLAnchorElement.download - Web APIs
syntax var dnload = anchorelt.download; anchorelt.download = dnload; specifications specification status comment html living standardthe definition of 'download' in that specification.
HTMLAnchorElement.referrerPolicy - Web APIs
syntax refstr = anchorelt.referrerpolicy; anchorelt.referrerpolicy = refstr; values "no-referrer" meaning that the referer: http header will not be sent.
HTMLAnchorElement.rel - Web APIs
syntax var relstr = anchorelt.rel; anchorelt.rel = relstr; example var anchors = document.getelementsbytagname("a"); var length = anchors.length; for (var i = 0; i < length; i++) { alert("rel: " + anchors[i].rel); } specifications specification status comment html living standardthe definition of 'rel' in that specification.
HTMLAnchorElement.relList - Web APIs
syntax var relstr = anchorelt.rellist; example var anchors = document.getelementsbytagname("a"); var length = anchors.length; for (var i = 0; i < length; i++) { var list = anchors[i].rellist; var listlength = list.length; console.log("new anchor node found with", listlength, "link types in rellist."); for (var j = 0; j < listlength; j++) { console.log(list[j]); } } specifications specificati...
HTMLAreaElement.referrerPolicy - Web APIs
syntax refstr = areaelt.referrerpolicy; areaelt.referrerpolicy = refstr; values "no-referrer" meaning that the referer: http header will not be sent.
HTMLAreaElement.rel - Web APIs
syntax var relstr = areaelt.rel; areaelt.rel = relstr; example var areas = document.getelementsbytagname("area"); var length = areas.length; for (var i = 0; i < length; i++) { alert("rel: " + areas[i].rel); } specifications specification status comment html living standardthe definition of 'rel' in that specification.
HTMLAreaElement.relList - Web APIs
syntax var relstr = areaelt.rellist; example var areas = document.getelementsbytagname("area"); var length = areas.length; for (var i = 0; i < length; i++) { var list = areas[i].rellist; var listlength = list.length; console.log("new area found."); for (var j = 0; j < listlength; j++) { console.log(list[j]); } } specifications specification status comment htm...
Audio() - Web APIs
syntax audioobj = new audio(url); parameters url optional an optional domstring containing the url of an audio file to be associated with the new audio element.
msAudioCategory - Web APIs
syntax <audio controls="controls" msaudiocategory="backgroundcapablemedia"> </audio> the msaudiocategory property offers a variety of values that can enhance the behavior of your audio-aware app.
msAudioDeviceType - Web APIs
syntax <audio src="sound.mp3" msaudiodevicetype="communications" /> by default, audio on your system will output to your default speakers and be considered a foreground element, meaning that the audio will play only when the element is active in the app.
HTMLButtonElement.labels - Web APIs
syntax var labelelements = button.labels; return value a nodelist containing the <label> elements associated with the <button> element.
HTMLCanvasElement.captureStream() - Web APIs
syntax mediastream = canvas.capturestream(framerate); parameters framerate optional a double-precision floating-point value that indicates the rate of capture of each frame.
HTMLCanvasElement.getContext() - Web APIs
syntax var ctx = canvas.getcontext(contexttype); var ctx = canvas.getcontext(contexttype, contextattributes); parameters contexttype is a domstring containing the context identifier defining the drawing context associated to the canvas.
HTMLCanvasElement.height - Web APIs
syntax var pxl = canvas.height; canvas.height = pxl; examples given this <canvas> element: <canvas id="canvas" width="300" height="300"></canvas> you can get the height of the canvas with the following code: var canvas = document.getelementbyid('canvas'); console.log(canvas.height); // 300 specifications specification status comment html living standardthe definition o...
HTMLCanvasElement.mozFetchAsStream() - Web APIs
syntax void canvas.mozfetchasstream(callback, type); parameters callback an nsiinputstreamcallback.
HTMLCanvasElement.mozGetAsFile() - Web APIs
syntax canvas.mozgetasfile(name, type); parameters name a domstring indicating the file name to give the file representing the image file in memory.
HTMLCanvasElement.mozOpaque - Web APIs
syntax var opaque = canvas.mozopaque; canvas.mozopaque = true; examples given this <canvas> element: <canvas id="canvas" width="300" height="300" moz-opaque></canvas> you can get or set the mozopaque property.
HTMLCanvasElement.toBlob() - Web APIs
syntax canvas.toblob(callback, mimetype, qualityargument); parameters callback a callback function with the resulting blob object as a single argument.
HTMLCanvasElement.toDataURL() - Web APIs
syntax canvas.todataurl(type, encoderoptions); parameters type optional a domstring indicating the image format.
HTMLCanvasElement.transferControlToOffscreen() - Web APIs
syntax offscreencanvas htmlcanvaselement.transfercontroltooffscreen() return value an offscreencanvas object.
HTMLCanvasElement.width - Web APIs
syntax var pxl = canvas.width; canvas.width = pxl; examples given this <canvas> element: <canvas id="canvas" width="300" height="300"></canvas> you can get the width of the canvas with the following code: var canvas = document.getelementbyid('canvas'); console.log(canvas.width); // 300 specifications specification status comment html living standardthe definition of 'h...
HTMLCollection.item - Web APIs
syntax var element = htmlcollection.item(index) parameters index the position of the node to be returned.
HTMLContentElement.getDistributedNodes() - Web APIs
syntax var nodelist = object.getdistributednodes() example // get the distributed nodes var nodes = mycontentobject.getdistributednodes(); specifications this feature is no longer defined by any specifications.
HTMLContentElement.select - Web APIs
syntax object.select = "cssselector cssselector ..."; example // select <h1> elements and elements with class="error" mycontentobject.select = "h1 .error"; specifications this feature is no longer defined by any standards.
HTMLDataElement.value - Web APIs
syntax var avalue = htmldataelement.value htmldataelement.value = avalue value a domstring.
HTMLDialogElement.close() - Web APIs
syntax dialoginstance.close(returnvalue); parameters returnvalue optional a domstring representing an updated value for the htmldialogelement.returnvalue of the dialog.
HTMLDialogElement.open - Web APIs
syntax dialoginstance.open = true; var myopenvalue = dialoginstance.open; value a boolean representing the state of the open html attribute.
HTMLDialogElement.returnValue - Web APIs
syntax dialoginstance.returnvalue = 'myreturnvalue'; var myreturnvalue = dialoginstance.returnvalue; value a domstring representing the returnvalue of the dialog.
HTMLDialogElement.show() - Web APIs
syntax dialoginstance.show(); parameters none.
HTMLDialogElement.showModal() - Web APIs
syntax dialoginstance.showmodal(); parameters none.
accessKeyLabel - Web APIs
syntax label = element.accesskeylabel example javascript var node = document.getelementbyid('btn1'); if (node.accesskeylabel) { node.title += ' [' + node.accesskeylabel + ']'; } else { node.title += ' [' + node.accesskey + ']'; } node.onclick = function () { var p = document.createelement('p'); p.textcontent = 'clicked!'; node.parentnode.appendchild(p); }; html <button accesskey="h" title="caption" id="btn1">hover me</button> result specifications specification status comment html living standardthe definition of 'htmlelement.accesskeylabel' in that specification.
HTMLElement.click() - Web APIs
WebAPIHTMLElementclick
syntax element.click() example simulate a mouse-click when moving the mouse pointer over a checkbox: html <form> <input type="checkbox" id="mycheck" onmouseover="myfunction()" onclick="alert('click event occured')"> </form> javascript // on mouse-over, execute myfunction function myfunction() { document.getelementbyid("mycheck").click(); } specification specification status comment html living standard living standard document object model (do...
HTMLElement.contentEditable - Web APIs
syntax editable = element.contenteditable element.contenteditable = 'true' specifications specification status comment html living standardthe definition of 'contenteditable' in that specification.
HTMLElement.contextMenu - Web APIs
syntax var elementcontextmenu = element.contextmenu; example var contextmenu = document.getelementbyid("element").contextmenu; // change the label of the first menu entry contextmenu.firstelementchild.label = "new label"; ...
HTMLElement.dir - Web APIs
WebAPIHTMLElementdir
syntax var currentwritingdirection = elementnodereference.dir; elementnodereference.dir = newwritingdirection; currentwritingdirection is a string variable representing the text writing direction of the current element.
HTMLElement.forceSpellCheck() - Web APIs
syntax element.forcespellcheck() ...
HTMLElement.hidden - Web APIs
syntax ishidden = htmlelement.hidden; htmlelement.hidden = true | false; value a boolean which is true if the element is hidden from view; otherwise, the value is false.
HTMLElement.innerText - Web APIs
syntax const renderedtext = htmlelement.innertext htmlelement.innertext = string value a domstring representing the rendered text content of an element.
HTMLElement.isContentEditable - Web APIs
syntax editable = element.iscontenteditable example html <p id="mytext1">uneditable paragraph</p> <p id="mytext2" contenteditable="true">editable paragraph</p> <p id="infotext1">can edit the first paragraph?
HTMLElement.lang - Web APIs
WebAPIHTMLElementlang
syntax var languageused = elementnodereference.lang; // get the value of lang elementnodereference.lang = newlanguage; // set new value for lang languageused is a string variable that gets the language in which the text of the current element is written.
HTMLElement.offsetHeight - Web APIs
syntax var intelemoffsetheight = element.offsetheight; intelemoffsetheight is a variable storing an integer corresponding to the offsetheight pixel value of the element.
HTMLElement.offsetLeft - Web APIs
syntax left = element.offsetleft; left is an integer representing the offset to the left in pixels from the closest relatively positioned parent element.
HTMLElement.offsetParent - Web APIs
syntax parentobj = element.offsetparent; parentobj is an object reference to the element in which the current element is offset.
HTMLElement.offsetTop - Web APIs
syntax toppos = element.offsettop; parameters toppos is the number of pixels from the top of the closest relatively positioned parent element.
HTMLElement.offsetWidth - Web APIs
syntax var intelemoffsetwidth = element.offsetwidth; intelemoffsetwidth is a variable storing an integer corresponding to the offsetwidth pixel value of the element.
HTMLElement.oncopy - Web APIs
syntax target.oncopy = functionref; value functionref is a function name or a function expression.
HTMLElement.oncut - Web APIs
WebAPIHTMLElementoncut
syntax target.oncut = functionref; value functionref is a function name or a function expression.
HTMLElement.onpaste - Web APIs
syntax target.onpaste = functionref; value functionref is a function name or a function expression.
HTMLElement.title - Web APIs
WebAPIHTMLElementtitle
syntax var str = element.title; element.title = str; example const link = document.createelement('a'); link.innertext = 'grapes'; link.href = 'https://en.wikipedia.org/wiki/grape'; link.title = 'wikipedia page on grapes'; specifications specification status comment html living standardthe definition of 'title' in that specification.
HTMLFontElement.color - Web APIs
the format of the string must follow one of the following html microsyntaxes: microsyntax description examples valid name color string nameofcolor (case insensitive) green green green valid hex color string in rgb format: #rrggbb #008000 rgb using decimal values rgb(x,x,x) (x in 0-255 range) rgb(0,128,0) syntax colorstring = fontobj.color; fontobj.color = colorstring; examples // assumes there is <font id="f"> element in the html var f = document.getelementbyid("f"); f.color = "green"; specifications the <font> t...
HTMLFontElement.face - Web APIs
the format of the string must follow one of the following html microsyntax: microsyntax description examples list of one or more valid font family names a list of font names, that have to be present on the local system courier,verdana syntax facestring = fontobj.face; fontobj.face = facestring; examples // assumes there is <font id="f"> element in the html var f = document.getelementbyid("f"); f.face = "arial"; specificat...
HTMLFontElement.size - Web APIs
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...
HTMLFormControlsCollection - Web APIs
like that one, in javascript, using the array bracket syntax with a string, like collection["value"] is equivalent to collection.nameditem("value").
HTMLFormElement.acceptCharset - Web APIs
syntax var string = form.acceptcharset; form.acceptcharset = string; example inputs = document.forms['myform'].acceptcharset; specifications specification status comment html living standardthe definition of 'htmlformelement: acceptcharset' in that specification.
HTMLFormElement.action - Web APIs
syntax var string = form.action; form.action = string; example form.action = '/cgi-bin/publish'; specifications specification status comment html living standardthe definition of 'htmlformelement: action' in that specification.
HTMLFormElement.enctype - Web APIs
syntax var string = form.enctype; form.enctype = string; example form.enctype = 'application/x-www-form-urlencoded'; specifications specification status comment html living standardthe definition of 'htmlformelement: enctype' in that specification.
HTMLFormElement.length - Web APIs
syntax numcontrols = form.length; value numcontrols is the number of form controls within the <form>.
HTMLFormElement.method - Web APIs
syntax var string = form.method; form.method = string; example document.forms['myform'].method = 'post'; const formelement = document.createelement("form"); // create a form document.body.appendchild(formelement); console.log(formelement.method); // 'get' specifications specification status comment html living standardthe definition of 'htmlformelement: method' in that specification.
HTMLFormElement.name - Web APIs
syntax var string = form.name; form.name = string; example var form1name = document.getelementbyid('form1').name; if (form1name != document.form.form1) { // browser doesn't support this form of reference } specifications specification status comment html living standardthe definition of 'htmlformelement: name' in that specification.
HTMLFormElement.reportValidity() - Web APIs
syntax htmlformelement.reportvalidity() return value boolean example document.forms['myform'].addeventlistener('submit', function() { document.forms['myform'].reportvalidity(); }, false); specifications specification status comment html living standardthe definition of 'htmlformelement.reportvalidity()' in that specification.
HTMLFormElement.requestSubmit() - Web APIs
syntax htmlformelement.requestsubmit(submitter); parameters submitter optional the submit button whose attributes describe the method by which the form is to be submitted.
HTMLFormElement.reset() - Web APIs
syntax htmlformelement.reset() example document.getelementbyid('myform').reset(); specifications specification status comment html living standardthe definition of 'htmlformelement: reset' in that specification.
HTMLFormElement.submit() - Web APIs
syntax htmlformelement.submit() example document.forms["myform"].submit(); specifications specification status comment html living standardthe definition of 'htmlformelement: submit' in that specification.
HTMLFormElement.target - Web APIs
syntax string = htmlformelement.target htmlformelement.target = string example myform.target = document.frames[1].name; specifications specification status comment html living standardthe definition of 'htmlformelement: target' in that specification.
HTMLFormElement - Web APIs
you can then use any of the following syntaxes to get an individual form: document.forms[index] returns the form at the specified index into the array of forms.
HTMLHyperlinkElementUtils.hash - Web APIs
syntax string = object.hash; object.hash = string; examples <a id="myanchor" href="/docs/htmlhyperlinkelementutils.href#examples">examples</a> <script> var anchor = document.getelementbyid("myanchor"); console.log(anchor.hash); // returns '#examples' </script> specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.hash' in that specification.
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 l...
HTMLHyperlinkElementUtils.hostname - Web APIs
syntax string = object.hostname; object.hostname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils.hostname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.hostname; // returns:'developer.mozilla.org' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.hostname' in that specification.
HTMLHyperlinkElementUtils.href - Web APIs
syntax string = object.href; object.href = string; examples // lets imagine an <a id="myanchor" href="https://developer.mozilla.org/htmlhyperlinkelementutils/href"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.href; // returns: 'https://developer.mozilla.org/htmlhyperlinkelementutils/href' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.href' in that specification.
HTMLHyperlinkElementUtils.origin - Web APIs
syntax string = object.origin; examples // on this page, returns the origin var result = window.location.origin; // returns:'https://developer.mozilla.org' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.origin' in that specification.
HTMLHyperlinkElementUtils.password - Web APIs
syntax string = object.password; object.password = string; examples // let's <a id="myanchor" href="https://anonymous:flabada@developer.mozilla.org/docs/htmlhyperlinkelementutils.username"> be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.password; // returns:'flabada' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.password' in that specification.
HTMLHyperlinkElementUtils.pathname - Web APIs
syntax string = object.pathname; object.pathname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils.pathname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.pathname; // returns:'/docs/htmlhyperlinkelementutils.pathname' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.pathname' in that specification.
HTMLHyperlinkElementUtils.port - Web APIs
syntax string = object.port; object.port = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org:443/docs/htmlhyperlinkelementutils.port"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.port; // returns:'443' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.port' in that specification.
HTMLHyperlinkElementUtils.protocol - Web APIs
syntax string = object.protocol; object.protocol = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/htmlhyperlinkelementutils.protocol"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.protocol; // returns:'https:' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.protocol' in that specification.
HTMLHyperlinkElementUtils.search - Web APIs
syntax string = object.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 l...
HTMLHyperlinkElementUtils.toString() - Web APIs
syntax string = object.tostring(); examples // let's imagine an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils/tostring"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.tostring(); // returns: 'https://developer.mozilla.org/docs/htmlhyperlinkelementutils/tostring' specifications specification status comment html living standard living standard ...
HTMLHyperlinkElementUtils.username - Web APIs
syntax string = object.username; object.username = string; examples // let's <a id="myanchor" href="https://anonymous:flabada@developer.mozilla.org/docs/htmlhyperlinkelementutils.username"> be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.username; // returns:'anonymous' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.username' in that specification.
HTMLIFrameElement.allowPaymentRequest - Web APIs
syntax var allow = htmliframeelement.allowpaymentrequest value a boolean.
HTMLIFrameElement.csp - Web APIs
syntax var csp = htmliframeelement.csp htmliframeelement.csp = csp value a content security policy.
HTMLIFrameElement.featurePolicy - Web APIs
syntax var policy = htmliframeelement.featurepolicy value a featurepolicy object that can be used to inspect the feature policy settings applied to the frame.
HTMLIFrameElement.referrerPolicy - Web APIs
syntax refstr = iframeelt.referrerpolicy; iframeelt.referrerpolicy = refstr; values no-referrer the referer header will be omitted entirely.
HTMLIFrameElement.setNfcFocus() - Web APIs
syntax myiframe.setnfcfocus(true); returns void.
HTMLIFrameElement.src - Web APIs
syntax refstr = iframeelt.src; iframeelt.src= refstr; example var iframe = document.createelement("iframe"); iframe.src = "/"; var body = document.getelementsbytagname("body")[0]; body.appendchild(iframe); // fetch the image using the complete url as the referrer specifications specification status comment html living standardthe definition of 'htmliframeelement: src' in that specification.
Image() - Web APIs
syntax var htmlimageelement = new image(width, height); parameters width the width of the image (i.e., the value for the width attribute).
HTMLImageElement.align - Web APIs
syntax htmlimageelement.align = alignmode; alignmode = htmlimageelement.align; value a domstring specifying one of the following strings which set the alignment mode for the image.
HTMLImageElement.alt - Web APIs
syntax htmlimageelement.alt = alttext; let alttext = htmlimageelement.alt; value a domstring which contains the alternate text to display when the image is not loaded or for use by assistive devices.
HTMLImageElement.border - Web APIs
syntax htmlimageelement.border = thickness; let thickness = htmlimageelement.border; value a domstring containing an integer value specifying the thickness of the border that should surround the image, in css pixels.
HTMLImageElement.complete - Web APIs
syntax let doneloading = htmlimageelement.complete; value a boolean value which is true if the image has completely loaded; otherwise, the value is false.
HTMLImageElement.crossOrigin - Web APIs
syntax htmlimageelement.crossorigin = crossoriginmode; let crossoriginmode = htmlimageelement.crossorigin; value a domstring of a keyword specifying the cors mode to use when fetching the image resource.
HTMLImageElement.currentSrc - Web APIs
syntax let currentsource = htmlimageelement.currentsrc; value a usvstring indicating the full url of the image currently visible in the <img> element represented by the htmlimageelement.
HTMLImageElement.decode() - Web APIs
syntax var promise = htmlimageelement.decode(); parameters none.
HTMLImageElement.decoding - Web APIs
syntax refstr = imgelem.decoding; imgelem.decoding = refstr; values a domstring representing the decoding hint.
HTMLImageElement.height - Web APIs
syntax htmlimageelement.height = newheight; let height = htmlimageelement.height; value an integer value indicating the height of the image.
HTMLImageElement.hspace - Web APIs
syntax htmlimageelement.hspace = marginwidth; marginwidth = htmlimageelement.hspace; value an integer value specifying the width, in pixels, of the horizontal margin to apply to the left and right sides of the image.
HTMLImageElement.isMap - Web APIs
syntax htmlimageelement.ismap = true|false; let ismap = htmlimageelement.ismap; value a boolean value which is true if the image is being used for a server-side image map; otherwise, the value is false.
HTMLImageElement.loading - Web APIs
syntax let imageloadscheduling = htmlimageelement.loading; htmlimageelement.loading = eagerorlazy; value a domstring providing a hint to the user agent as to how to best schedule the loading of the image to optimize page performance.
HTMLImageElement.longDesc - Web APIs
syntax descurl = htmlimageelement.longdesc; htmlimageelement.longdesc = descurl; value a domstring which may be either an empty string (indicating that no long description is available) or the url of a file containing a long form description of the image's contents.
HTMLImageElement.lowSrc - Web APIs
syntax htmlimageelement.lowsrc = imageurl; imageurl = htmlimageelement.lowsrc; value a domstring specifying the url of a version of the image specified by src which has been modified in some fashion so that it loads significantly more quickly than the primary image.
HTMLImageElement.name - Web APIs
syntax htmlimageelement.name = namestring; namestring = htmlimageelement.name; value a domstring providing a name by which the image can be referenced.
HTMLImageElement.naturalHeight - Web APIs
syntax let naturalheight = htmlimageelement.naturalheight; value an integer value indicating the intrinsic height, in css pixels, of the image.
HTMLImageElement.naturalWidth - Web APIs
syntax let naturalwidth = htmlimageelement.naturalwidth; value an integer value indicating the intrinsic width of the image, in css pixels.
HTMLImageElement.referrerPolicy - Web APIs
syntax refstr = imgelt.referrerpolicy; imgelt.referrerpolicy = refstr; values a domstring representing the referrer policy.
HTMLImageElement.src - Web APIs
syntax htmlimageelement.src = newsource; let src = htmlimageelement.src; value when providing only a single image, rather than a set of images from which the browser selects the best match for the viewport size and display pixel density, the src attribute is a usvstring specifying the url of the desired image.
HTMLImageElement.srcset - Web APIs
syntax htmlimageelement.srcset = imagecandidatestrings; let srcset = htmlimageelement.srcset; value a usvstring containing a comma-separated list of one or more image candidate strings to be used when determining which image resource to present inside the <img> element represented by the htmlimageelement.
HTMLImageElement.useMap - Web APIs
syntax htmlimageelement.usemap = imagemapanchor; let imagemapanchor = htmlimageelement.usemap; value a usvstring providing the page-local url (that is, a url that begins with the hash or pound symbol, "#") of the <map> element which defines the image map to apply to the image.
HTMLImageElement.vspace - Web APIs
syntax htmlimageelement.vspace = marginheight; marginheight = htmlimageelement.vspace; value an integer value specifying the height, in pixels, of the vertical margin to apply to the top and bottom sides of the image.
HTMLImageElement.width - Web APIs
syntax htmlimageelement.width = newwidth; let width = htmlimageelement.width; value an integer value indicating the width of the image.
HTMLImageElement.x - Web APIs
syntax let imagex = htmlimageelement.x; value an integer value indicating the distance in pixels from the left edge of the element's nearest root element and the left edge of the <img> element's border box.
HTMLImageElement.y - Web APIs
syntax let imagey = htmlimageelement.y; value an integer value indicating the distance in pixels from the top edge of the element's nearest root element to the top edge of the <img> element's border box.
HTMLInputElement.labels - Web APIs
syntax var labelelements = input.labels; return value a nodelist containing the <label> elements associated with the <input> element.
HTMLInputElement.mozGetFileNameArray() - Web APIs
syntax inputelement.mozgetfilenamearray(alength, afilenames); parameters alength if specified, will receive the number of file names in the returned array.
HTMLInputElement.mozSetFileNameArray() - Web APIs
syntax inputelement.mozsetfilenamearray(afilenames, alength); parameters afilenames is the array of file names to apply to the element.
HTMLInputElement.select() - Web APIs
syntax element.select(); example click the button in this example to select all the text in the <input> element.
HTMLInputElement.setRangeText() - Web APIs
syntax element.setrangetext(replacement); element.setrangetext(replacement, start, end [, selectmode]); parameters replacement the string to insert.
HTMLInputElement.setSelectionRange() - Web APIs
syntax element.setselectionrange(selectionstart, selectionend [, selectiondirection]); parameters if selectionend is less than selectionstart, then both are treated as the value of selectionend.
HTMLInputElement.stepDown() - Web APIs
syntax element.stepdown( [ stepdecrement ] ); parameters stepdecrement the optional stepdecrement paremeter is a numeric value.
HTMLInputElement.stepUp() - Web APIs
syntax element.stepup( [ stepincrement ] ); parameters stepincrement the optional stepincrement paremeter is a numeric value.
HTMLInputElement.webkitEntries - Web APIs
syntax var entries = htmlinputelement.webkitentries; value an array of objects based on filesystementry, each representing one file which is selected in the <input> element.
HTMLInputElement.webkitdirectory - Web APIs
syntax htmlinputelement.webkitdirectory = boolvalue value a boolean; true if the <input> element should allow picking only directories or false if only files should be selectable.
HTMLLabelElement.control - Web APIs
syntax control = htmllabelelement.control value an htmlelement derived object representing the control with which the <label> is associated, or null if the label stands alone.
HTMLLabelElement.form - Web APIs
syntax form = htmllabelelement.form value an htmlformelement which represents the form with which the label's control is associated.
HTMLLabelElement.htmlFor - Web APIs
syntax controlid = htmllabelelement.htmlfor htmllabelelement.htmlfor = newid value a domstring which contains the id string of the element which is associated with the control.
HTMLLinkElement.as - Web APIs
syntax var as = htmllinkelement.as htmllinkelement.as = as value a domstring.
HTMLLinkElement.referrerPolicy - Web APIs
syntax domstring htmllinkelement.referrerpolicy example var links = document.getelementsbytagname("link"); links[0].referrerpolicy; // "no-referrer" specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
HTMLLinkElement.rel - Web APIs
syntax var relstr = linkelt.rel; linkelt.rel = relstr; example var links = document.getelementsbytagname('link'); var length = links.length; for (var i = 0; i < length; i++) { alert(links[i]); } specifications specification status comment html living standardthe definition of 'rel' in that specification.
HTMLLinkElement.relList - Web APIs
syntax var relstr = linkelt.rellist; example var links = document.getelementsbytagname("link"); var length = links.length; for (var i = 0; i < length; i++) { var list = links[i].rellist; var listlength = list.length; console.log("new link found."); for (var j = 0; j < listlength; j++) { console.log(list[j]); } } specifications specification status comment html l...
HTMLMediaElement.audioTracks - Web APIs
syntax var audiotracks = mediaelement.audiotracks; value a audiotracklist object representing the list of audio tracks included in the media element.
HTMLMediaElement.autoplay - Web APIs
syntax htmlmediaelement.autoplay = true | false; var autoplay = htmlmediaelement.autoplay; value a boolean whose value is true if the media element will begin playback as soon as enough content has loaded to allow it to do so without interruption.
HTMLMediaElement.buffered - Web APIs
syntax var timerange = audioobject.buffered value a timeranges object.
HTMLMediaElement.canPlayType() - Web APIs
syntax canplayresponse = audioorvideo.canplaytype(mediatype); parameters mediatype a domstring containing the mime type of the media.
HTMLMediaElement.captureStream() - Web APIs
syntax var mediastream = mediaelement.capturestream() parameters none.
HTMLMediaElement.controller - Web APIs
syntax ...
HTMLMediaElement.controls - Web APIs
syntax var ctrls = video.controls; audio.controls = true; value a boolean.
HTMLMediaElement.controlsList - Web APIs
syntax var domtokenlist = htmlmediaelement.controlslist; value a domtokenlist.
HTMLMediaElement.currentSrc - Web APIs
syntax var mediaurl = audioobject.currentsrc; value a domstring object containing the absolute url of the chosen media source; this may be an empty string if networkstate is empty; otherwise, it will be one of the resources listed by the htmlsourceelement contained within the media element, or the value or src if no <source> element is provided.
HTMLMediaElement.currentTime - Web APIs
syntax var currenttime = htmlmediaelement.currenttime; htmlmediaelement.currenttime = 35; value a double-precision floating-point value indicating the current playback time in seconds.
HTMLMediaElement.defaultMuted - Web APIs
syntax var dmuted = video.defaultmuted; audio.defaultmuted = true; value a boolean.
HTMLMediaElement.defaultPlaybackRate - Web APIs
syntax var dspeed = video.defaultplaybackrate; audio.defaultplaybackrate = 1.0; value a double.
HTMLMediaElement.disableRemotePlayback - Web APIs
syntax var remoteplaybackdisabled ​= element.disableremoteplayback; value a boolean indicating whether the media element may have a remote playback ui.
HTMLMediaElement.duration - Web APIs
syntax myduration = htmlmediaelement.duration value a double-precision floating-point value indicating the duration of the media in seconds.
HTMLMediaElement.ended - Web APIs
syntax var isended = htmlmediaelement.ended value a boolean which is true if the media contained in the element has finished playing.
HTMLMediaElement.error - Web APIs
syntax var myerror = htmlmediaelement.error; value a mediaerror object describing the most recent error to occur on the media element or null if no errors have occurred.
HTMLMediaElement.fastSeek() - Web APIs
syntax htmlmediaelement.fastseek(time); parameters time a double.
HTMLMediaElement.initialTime - Web APIs
syntax ...
HTMLMediaElement.load() - Web APIs
syntax mediaelement.load(); parameters none.
HTMLMediaElement.loop - Web APIs
syntax var loop = video.loop; audio.loop = true; value a boolean.
HTMLMediaElement.mediaGroup - Web APIs
syntax ...
msClearEffects - Web APIs
syntax htmlmediaelement.mscleareffects(); parameters this method has no parameters.
HTMLMediaElement.msInsertAudioEffect() - Web APIs
syntax htmlmediaelement.msinsertaudioeffect(activatableclassid: domstring, effectrequired: boolean, config); parameters activatableclassid a domstring defining the audio effects class.
HTMLMediaElement.muted - Web APIs
syntax var ismuted = audioorvideo.muted audio.muted = true; value a boolean.
HTMLMediaElement.networkState - Web APIs
syntax var networkstate = audioorvideo.networkstate; value an unsigned short.
HTMLMediaElement.onencrypted - Web APIs
docs/web/api/htmlmediaelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlmediaelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} syntax htmlmediaelement.onencrypted = function(encrypted) { ...
HTMLMediaElement.onerror - Web APIs
syntax htmlmediaelement.onerror = eventlistener; value a function which serves as the event handler for the error event.
HTMLMediaElement.onwaitingforkey - Web APIs
docs/web/api/htmlmediaelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlmediaelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} syntax htmlmediaelement.onwaitingforkey = function(waitingforkey) { ...
HTMLMediaElement.pause() - Web APIs
syntax htmlmediaelement.pause() parameters none.
HTMLMediaElement.paused - Web APIs
syntax var ispaused = audioorvideo.paused value a boolean.
HTMLMediaElement.play() - Web APIs
syntax var promise = htmlmediaelement.play(); parameters none.
HTMLMediaElement.playbackRate - Web APIs
syntax // video video.playbackrate = 1.5; // audio audio.playbackrate = 1.0; value a double.
HTMLMediaElement.readyState - Web APIs
syntax var readystate = audioorvideo.readystate; value an unsigned short.
HTMLMediaElement.seekToNextFrame() - Web APIs
syntax var seekcompletepromise = htmlmediaelement.seektonextframe(); htmlmediaelement.seektonextframe(); return value a promise which is fulfilled once the seek operation has completed.
HTMLMediaElement.seekable - Web APIs
syntax var seekable = audioorvideo.seekable; value a timeranges object.
HTMLMediaElement.setMediaKeys() - Web APIs
syntax var promise = htmlmediaelement.setmediakeys(mediakeys); parameters mediakeys a reference to a mediakeys object that the htmlmediaelement can use for decryption of media data during playback.
HTMLMediaElement.setSinkId() - Web APIs
syntax htmlmediaelement.setsinkid(sinkid).then(function() { ...
HTMLMediaElement.sinkId - Web APIs
syntax var sinkid = htmlmediaelement.sinkid specifications specification status comment audio output devices apithe definition of 'sinkid' in that specification.
HTMLMediaElement.src - Web APIs
syntax var mediaurl = htmlmediaelement.src; value a usvstring object containing the url of a media resource to use in the element; this property reflects the value of the html element's src attribute.
HTMLMediaElement.srcObject - Web APIs
syntax var sourceobject = htmlmediaelement.srcobject; htmlmediaelement.srcobject = sourceobject; value a mediastream, mediasource, blob, or file object (though see the compatibility table for what is actually supported).
HTMLMedia​Element​.textTracks - Web APIs
syntax var texttracks = mediaelement.texttracks; value a texttracklist object representing the list of text tracks included in the media element.
HTMLMediaElement.videoTracks - Web APIs
syntax var videotracks = mediaelement.videotracks; value a videotracklist object representing the list of video tracks included in the media element.
HTMLMediaElement.volume - Web APIs
syntax var volume ​= video.volume; //1 value a double values must fall between 0 and 1, where 0 is effectively muted and 1 is the loudest possible value.
HTMLMeterElement.labels - Web APIs
syntax var labelelements = meter.labels; return value a nodelist containing the <label> elements associated with the <meter> element.
HTMLObjectElement.checkValidity - Web APIs
syntax const valid = htmlobjectelement.checkvalidity(); parameters none.
HTMLObjectElement.contentDocument - Web APIs
syntax var document = htmlobjectelement.contentdocument; value a document.
HTMLObjectElement.contentWindow - Web APIs
syntax var windowproxy = htmlobjectelement.contentwindow; value a windowproxy.
HTMLObjectElement.data - Web APIs
syntax var data = htmlobjectelement.data; htmlobjectelement.data; value a domstring.
HTMLObjectElement.form - Web APIs
syntax var htmlformelement = htmlobjectelement.form; value a htmlformelement.
HTMLObjectElement.height - Web APIs
syntax var string = htmlobjectelement.height; htmlobjectelement.height = string; value a domstring.
HTMLObjectElement.name - Web APIs
syntax var string = htmlobjectelement.name; htmlobjectelement.name = string; value a domstring.
HTMLObjectElement.setCustomValidity - Web APIs
syntax htmlobjectelement.setcustomvalidity(message); parameters error the message to use for validity errors.
HTMLObjectElement.type - Web APIs
syntax var string = htmlobjectelement.type htmlobjectelement.type = string; value a domstring.
HTMLObjectElement.typeMustMatch - Web APIs
syntax var mustmatch = obj.typemustmatch; obj.typemustmatch = mustmatch; example html <object id="obj" data="move.swf" type="application/x-shockwave-flash" typemustmatch></object> javascript let obj = document.getelementbyid('obj'); console.log(obj.typemustmatch); specifications specification status comment html5the definition of 'htmlobjectelement' in that specification.
HTMLObjectElement.useMap - Web APIs
syntax var string = htmlobjectelement.usemap; htmlobjectelement.usemap = string; value a domstring.
HTMLObjectElement.validationMessage - Web APIs
syntax var string = htmlobjectelement.validationmessage; value a domstring.
HTMLObjectElement.validity - Web APIs
syntax var validitystate = htmlobjectelement.validity; value a validitystate object.
HTMLObjectElement.width - Web APIs
syntax var string = htmlobjectelement.width; htmlobjectelement.width = string; value a domstring.
HTMLObjectElement.willValidate - Web APIs
syntax var boolean = htmlobjectelement.willvalidate; value a boolean.
Option() - Web APIs
syntax var optionelementreference = new option(text, value, defaultselected, selected); parameters text optional a domstring representing the content of the element, i.e.
HTMLElement.blur() - Web APIs
syntax element.blur(); examples remove focus from a text input html <input type="text" id="mytext" value="sample text"> <br><br> <button type="button" onclick="focusinput()">click me to gain focus</button> <button type="button" onclick="blurinput()">click me to lose focus</button> javascript function focusinput() { document.getelementbyid('mytext').focus(); } function blurinput() { document.getelementbyid('mytext').blur(); } result specification specification status comment html living standardthe definition of 'blur' in that specification.
HTMLElement.focus() - Web APIs
syntax element.focus(options); // object parameter parameters options optional an optional object providing options to control aspects of the focusing process.
HTMLOrForeignElement.tabIndex - Web APIs
syntax element.tabindex = index; var index = element.tabindex; value index is an integer example const b1 = document.getelementbyid('button1'); b1.tabindex = 1; specifications specification status comment html living standardthe definition of 'tabindex' in that specification.
HTMLOutputElement.labels - Web APIs
syntax var labelelements = output.labels; return value a nodelist containing the <label> elements associated with the <output> element.
HTMLProgressElement.labels - Web APIs
syntax var labelelements = progress.labels; return value a nodelist containing the <label> elements associated with the <progress> element.
HTMLScriptElement.referrerPolicy - Web APIs
syntax refstr = scriptelem.referrerpolicy; scriptelem.referrerpolicy = refstr; value a domstring; one of the following: no-referrer the referer header will be omitted entirely.
HTMLSelectElement.add() - Web APIs
syntax collection.add(item[, before]); parameters item is an htmloptionelement or htmloptgroupelement before is optional and an element of the collection, or an index of type long, representing the item item should be inserted before.
HTMLSelectElement.autofocus - Web APIs
syntaxedit abool = aselectelement.autofocus; // get the value of autofocus aselectelement.autofocus = abool; // set the value of autofocus example html <select id="myselect" autofocus> <option>option 1</option> <option>option 2</option> </select> javascript // check if the autofocus attribute on the <select> var hasautofocus = document.getelementbyid('myselect').autofocus; specifications ...
HTMLSelectElement.checkValidity() - Web APIs
syntax var result = selectelt.checkvalidity(); specifications specification status comment html living standardthe definition of 'htmlselectelement.checkvalidity()' in that specification.
HTMLSelectElement.disabled - Web APIs
syntax edit aselectelement.disabled = abool; example html <label> allow drinks?
HTMLSelectElement.form - Web APIs
syntax edit aform = aselectelement.form.selectname; example html <form action="http://www.google.com/search" method="get"> <label>google: <input type="search" name="q"></label> <input type="submit" value="search..."> </form> javascript a property available on all form elements, "type" returns the type of the calling form element.
HTMLSelectElement.labels - Web APIs
syntax var labelelements = select.labels; return value a nodelist containing the <label> elements associated with the <select> element.
HTMLSelectElement.options - Web APIs
syntax var options = select.options; return value a htmloptionscollection containing the <option> elements contained by the <select> element.
HTMLSelectElement.remove() - Web APIs
syntax collection.remove(index); parameters index is a long for the index of the htmloptionelement to remove from the collection.
HTMLSelectElement.selectedIndex - Web APIs
syntax var index = selectelem.selectedindex; selectelem.selectedindex = index; example html <p id="p">selectedindex: 0</p> <select id="select"> <option selected>option a</option> <option>option b</option> <option>option c</option> <option>option d</option> <option>option e</option> </select> javascript var selectelem = document.getelementbyid('select') var pelem = document.getelementbyid('p') // when a new <option> is selected selectelem.addeventlistener('change', function() { var index = selectelem.selectedindex; // add that data to the <p> pelem.innerhtml = 'selec...
HTMLSelectElement.selectedOptions - Web APIs
syntax var selectedcollection = htmlselectelement.selectedoptions; value an htmlcollection which lists every currently selected htmloptionelement which is either a child of the htmlselectelement or of an htmloptgroupelement within the <select> element.
HTMLSelectElement.setCustomValidity() - Web APIs
syntax selectelt.setcustomvalidity(string); parameters string is the domstring containing the error message.
HTMLSelectElement.type - Web APIs
syntax var str = selectelt.type; the possible values are: "select-multiple" if multiple values can be selected.
HTMLShadowElement.getDistributedNodes() - Web APIs
syntax var nodelist = object.getdistributednodes() example // get the distributed nodes var nodes = myshadowobject.getdistributednodes(); specifications this feature is no longer defined by any specifications.
HTMLSlotElement.assignedElements() - Web APIs
syntax var assignedelements = htmlslotelement.assignedelements(options) parameters options optional an object that sets options for the nodes to be returned.
HTMLSlotElement.assignedNodes() - Web APIs
syntax var assignednodes = htmlslotelement.assignednodes(options) parameters options optional an object that sets options for the nodes to be returned.
HTMLSlotElement.name - Web APIs
syntax var name = htmlslotelement.name htmlslotelement.name = name value a domstring.
HTMLStyleElement.media - Web APIs
syntax medium = style.media style.media = medium parameters medium is a string describing a single medium or a comma-separated list.
HTMLStyleElement.scoped - Web APIs
syntax value = style.scoped; style.scoped = true; ...
HTMLStyleElement.type - Web APIs
for gecko, the type is most often given as "text/css." from the w3c spec on css: "the expectation is that binding-specific casting methods can be used to cast down from an instance of the cssrule interface to the specific derived interface implied by the type." syntax string = style.type; example if (newstyle.type != "text/css"){ // not supported!
HTMLTableElement.align - Web APIs
syntax htmltableelement.align = alignment; var alignment = htmltableelement.align; parameters alignment domstring with one of the following values: left center right example // set the alignmnet of a table var t = document.getelementbyid('tablea'); t.align = 'center'; specification w3c dom 2 html specification htmltableelement .align.
HTMLTableElement.bgColor - Web APIs
syntax color = table.bgcolor table.bgcolor = color parameters color is a string representing a color value.
HTMLTableElement.border - Web APIs
syntax htmltableelement.border = border; var border = htmltableelement.border; border is a string representing the width of the border in pixels.
HTMLTableElement.caption - Web APIs
syntax var string = tableelement.caption; example if (table.caption) { // do something with the caption } specifications specification status comment html living standardthe definition of 'htmltableelement.caption' in that specification.
HTMLTableElement.cellPadding - Web APIs
syntax htmltableelement.cellpadding = padding; var padding = htmltableelement.cellpadding; padding is either a number of pixels (e.g.
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.createCaption() - Web APIs
syntax htmltableelement = table.createcaption(); return value htmltablecaptionelement example this example uses javascript to add a caption to a table that initially lacks one.
HTMLTableElement.createTFoot() - Web APIs
syntax htmltablesectionelement = table.createtfoot(); return value htmltablesectionelement example let myfoot = mytable.createtfoot(); // now this should be true: myfoot == mytable.tfoot specifications specification status comment html living standardthe definition of 'htmltableelement: createtfoot' in that specification.
HTMLTableElement.createTHead() - Web APIs
syntax htmltablesectionelement = table.createthead(); return value htmltablesectionelement example let myhead = mytable.createthead(); // now this should be true: myhead == mytable.thead specifications specification status comment html living standardthe definition of 'htmltableelement: createthead' in that specification.
HTMLTableElement.deleteCaption() - Web APIs
syntax htmltableelement.deletecaption() example this example uses javascript to delete a table's caption.
HTMLTableElement.deleteRow() - Web APIs
syntax htmltableelement.deleterow(index) parameters index index is an integer representing the row that should be deleted.
HTMLTableElement.deleteTFoot() - Web APIs
syntax htmltableelement.deletetfoot(); example this example uses javascript to delete a table's footer.
HTMLTableElement.deleteTHead() - Web APIs
syntax htmltableelement.deletethead(); example this example uses javascript to delete a table's header.
HTMLTableElement.frame - Web APIs
syntax htmltableelement.frame = framesides; var framesides = htmltableelement.frame; parameters framesides is a string whose value is one of the following values: void no sides.
HTMLTableElement.insertRow() - Web APIs
syntax var newrow = htmltableelement.insertrow(index); htmltableelement is a reference to an html <table> element.
HTMLTableElement.rules - Web APIs
syntax htmltableelement.rules = rules; var rules = htmltableelement.rules; parameters rules is a string with one of the following values: none no rules groups lines between groups only rows lines between rows cols lines between cols all lines between all cells example // turn on all the internal borders of a table var t = document.getelementbyid("tableid"); t.rules = "all"; specification w3c dom 2 html specification ...
HTMLTableElement.summary - Web APIs
syntax htmltableelement.summary = string; varstring = htmltableelement.summary; example htmltableelement.summary = "usage statistics"; specification w3c dom 2 html specification ...
HTMLTableElement.tBodies - Web APIs
syntax htmlcollectionobject = table.tbodies example this snippet gets the number of bodies in a table.
HTMLTableElement.tFoot - Web APIs
syntax htmltablesectionelementobject = table.tfoot table.tfoot = htmltablesectionelementobject example if (table.tfoot == my_foot) { // ...
HTMLTableElement.tHead - Web APIs
syntax thead_element = table.thead; table.thead = thead_element; parameters thead_element is a htmltablesectionelement.
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.
HTMLTableRowElement.insertCell() - Web APIs
syntax var newcell = htmltablerowelement.insertcell(index); htmltablerowelement is a reference to an html <tr> element.
HTMLTableRowElement.rowIndex - Web APIs
syntax var index = htmltablerowelement.rowindex value returns the index of the row, or -1 if the row is not part of a table.
HTMLTemplateElement.content - Web APIs
syntax var documentfragment = templateelement.content example var templateelement = document.queryselector("#foo"); var documentfragment = templateelement.content.clonenode(true); specifications specification status comment html living standardthe definition of 'htmltemplateelement interface' in that specification.
HTMLTextAreaElement.labels - Web APIs
syntax var labelelements = textarea.labels; return value a nodelist containing the <label> elements associated with the <textarea> element.
HTMLTrackElement.src - Web APIs
syntax var texttrackurl = htmltrackelement.src; value a domstring object containing the url of the text track data.
HTMLVideoElement.getVideoPlaybackQuality() - Web APIs
syntax videopq = videoelement.getvideoplaybackquality(); return value a videoplaybackquality object providing information about the video element's current playback quality.
HTMLVideoElement.msFrameStep() - Web APIs
syntax htmlvideoelement.msframestep(forward); parameters forward a boolean which if set to true steps the video forward by one frame, if false steps the video backwards by one frame.
HTMLVideoElement.msHorizontalMirror - Web APIs
syntax htmlvideoelement.mshorizontalmirror: boolean; value boolean value set to true flips the video playback horizontally.
HTMLVideoElement.msInsertVideoEffect() - Web APIs
syntax str = htmlmediaelement.msinsertvideoeffect(activatableclassid: domstring, effectrequired: boolean, config); parameters activatableclassid a domstring defining the video effects class.
HTMLVideoElement.msIsLayoutOptimalForPlayback - Web APIs
syntax htmlvideoelement.msislayoutoptimalforplayback: domstring; value boolean value set to true indicates that video is being rendered optimally (better performance and using less battery power).
HTMLVideoElement.msIsStereo3D - Web APIs
syntax htmlvideoelement.msisstereo3d: boolean; value boolean value set to true indicates that the video source is stereo 3d.
msSetVideoRectangle - Web APIs
syntax htmlvideoelement.mssetvideorectangle(); parameters left a number representing left-side position.
msStereo3DPackingMode - Web APIs
syntax htmlvideoelement.msstereo3dpackingmode(topbottom, sidebyside, none); value the following values return, or set, the stereo 3-d content packing as "topbottom", "sidebyside", or "none" for regular 2-d video.
msStereo3DRenderMode - Web APIs
syntax htmlvideoelement.msstereo3drendermode(mono, stereo); value the following values set the stereo display to mono or stereo.
HTMLVideoElement.msZoom - Web APIs
syntax htmlvideoelement.mszoom; value boolean value set to true trims the video frame to the display space.
onMSVideoFormatChanged - Web APIs
syntax value description event property object.onmsvideoformatchanged = handler; attachevent method object.attachevent("onmsvideoformatchanged", handler) addeventlistener method object.addeventlistener("", handler, usecapture) event handler parameters val[in], type=function see also htmlvideoelement microsoft api extensions ...
onMSVideoFrameStepCompleted - Web APIs
syntax value description event property object.onmsvideoframestepcompleted = handler; attachevent method object.attachevent("onmsvideoframestepcompleted", handler) addeventlistener method object.addeventlistener("", handler, usecapture) event handler parameters val[in], type=function see also htmlvideoelement microsoft api extensions ...
onMSVideoOptimalLayoutChanged - Web APIs
syntax value description event property object.onmsvideooptimallayoutchanged = handler; attachevent method object.attachevent("onmsvideooptimallayoutchanged", handler) addeventlistener method object.addeventlistener("", handler, usecapture) synchronous no bubbles no cancelable no see also msislayout...
HTMLVideoElement.videoHeight - Web APIs
syntax height = htmlvideoelement.videoheight; value an integer value specifying the intrinsic height of the video in css pixels.
HTMLVideoElement.videoWidth - Web APIs
syntax width = htmlvideoelement.videowidth; value an integer value specifying the intrinsic width of the video in css pixels.
HashChangeEvent.newURL - Web APIs
syntax let neweventurl = event.newurl; value a domstring.
HashChangeEvent.oldURL - Web APIs
syntax let oldeventurl = event.oldurl; value a domstring.
HashChangeEvent - Web APIs
examples syntax options for a hash change you can listen for the hashchange event using any of the following options: window.onhashchange = funcref; or <body onhashchange="funcref();"> or window.addeventlistener("hashchange", funcref, false); basic example function locationhashchanged() { if (location.hash === '#somecoolfeature') { somecoolfeature(); } } window.addeventlistener('hashchange', ...
Headers() - Web APIs
WebAPIHeadersHeaders
syntax var myheaders = new headers(init); parameters init optional an object containing any http headers that you want to pre-populate your headers object with.
Headers.append() - Web APIs
WebAPIHeadersappend
syntax myheaders.append(name, value); parameters name the name of the http header you want to add to the headers object.
Headers.delete() - Web APIs
WebAPIHeadersdelete
syntax myheaders.delete(name); parameters name the name of the http header you want to delete from the headers object.
Headers.entries() - Web APIs
WebAPIHeadersentries
syntax headers.entries(); return value returns an iterator.
Headers.get() - Web APIs
WebAPIHeadersget
syntax myheaders.get(name); parameters name the name of the http header whose values you want to retrieve from the headers object.
Headers.getAll() - Web APIs
WebAPIHeadersgetAll
syntax myheaders.getall(name); parameters name the name of the http header whose values you want to retrieve from the headers object.
Headers.has() - Web APIs
WebAPIHeadershas
syntax myheaders.has(name); parameters name the name of the http header you want to test for.
Headers.keys() - Web APIs
WebAPIHeaderskeys
syntax headers.keys(); return value returns an iterator.
Headers.set() - Web APIs
WebAPIHeadersset
syntax myheaders.set(name, value); parameters name the name of the http header you want to set to a new value.
Headers.values() - Web APIs
WebAPIHeadersvalues
syntax headers.values(); return value returns an iterator.
History.back() - Web APIs
WebAPIHistoryback
syntax history.back() examples the following short example causes a button on the page to navigate back one entry in the session history.
History.forward() - Web APIs
WebAPIHistoryforward
syntax history.forward() examples the following examples create a button that moves forward one step in the session history.
History.go() - Web APIs
WebAPIHistorygo
syntax history.go([delta]) parameters delta optional the position in the history to which you want to move, relative to the current page.
History.length - Web APIs
WebAPIHistorylength
syntax const length = history.length specifications specification status comment html living standardthe definition of 'history.length' in that specification.
History.pushState() - Web APIs
WebAPIHistorypushState
syntax history.pushstate(state, title[, url]) parameters state the state object is a javascript object which is associated with the new history entry created by pushstate().
History.replaceState() - Web APIs
syntax history.replacestate(stateobj, title, [url]) parameters stateobj the state object is a javascript object which is associated with the history entry passed to the replacestate method.
History.scrollRestoration - Web APIs
syntax const scrollrestore = history.scrollrestoration values auto the location on the page to which the user has scrolled will be restored.
History.state - Web APIs
WebAPIHistorystate
syntax const currentstate = history.state value the state at the top of the history stack.
IDBCursor.advance() - Web APIs
WebAPIIDBCursoradvance
syntax cursor.advance(count); parameters count the number of times to move the cursor forward.
IDBCursor.continue() - Web APIs
syntax cursor.continue(key); parameters key optional the key to position the cursor at.
IDBCursor.continuePrimaryKey() - Web APIs
syntax cursor.continueprimarykey(key, primarykey); parameters key the key to position the cursor at.
IDBCursor.delete() - Web APIs
WebAPIIDBCursordelete
syntax myidbcursor.delete(); returns an idbrequest object on which subsequent events related to this operation are fired.
IDBCursor.direction - Web APIs
syntax var direction = cursor.direction; value a string (defined by the idbcursordirection enum) indicating the direction in which the cursor is traversing the data.
IDBCursor.key - Web APIs
WebAPIIDBCursorkey
syntax var key = cursor.key; value a value of any type.
IDBCursor.primaryKey - Web APIs
syntax var value = cursor.primarykey; value a value of any data type.
IDBCursor.request - Web APIs
WebAPIIDBCursorrequest
syntax var request = cursor.request; value an idbrequest object instance.
IDBCursor.source - Web APIs
WebAPIIDBCursorsource
syntax var source = cursor.source; value the idbobjectstore or idbindex that the cursor is iterating over.
IDBCursor.update() - Web APIs
WebAPIIDBCursorupdate
syntax var anidbrequest = myidbcursor.update(value); parameters value the new value to be stored at the current position.
IDBCursorWithValue.value - Web APIs
syntax var value = myidbcursorwithvalue.value; value the value of the current cursor.
IDBDatabase.close() - Web APIs
WebAPIIDBDatabaseclose
syntax idbdatabase.close(); example // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // opening a database.
IDBDatabase.createObjectStore() - Web APIs
syntax idbdatabase.createobjectstore(name); idbdatabase.createobjectstore(name, options); parameters name the name of the new object store to be created.
IDBDatabase.deleteObjectStore() - Web APIs
syntax dbinstance.deleteobjectstore(name); parameters name the name of the object store you want to delete.
IDBDatabase.name - Web APIs
WebAPIIDBDatabasename
syntax var dbname = idbdatabase.name; value a domstring containing the name of the connected database.
IDBDatabase.objectStoreNames - Web APIs
syntax var list[] = idbdatabase.objectstorenames; value a domstringlist containing a list of the names of the object stores currently in the connected database.
IDBDatabase.onabort - Web APIs
syntax idbdatabase.onabort = function(event) { ...
IDBDatabase.onclose - Web APIs
syntax idbdatabase.onclose = function(event) { ...
IDBDatabase.onerror - Web APIs
syntax idbdatabase.onerror = function(event) { ...
IDBDatabase.onversionchange - Web APIs
syntax idbdatabase.onversionchange = function(event) { ...
IDBDatabase.transaction() - Web APIs
syntax idbdatabase.transaction(storenames); idbdatabase.transaction(storenames, mode); parameters "durability" -- the durability constrints for the transction.
IDBDatabase.version - Web APIs
syntax var myinteger = idbdatabase.version; value an integer containing the version of the connected database.
IDBFactory.cmp() - Web APIs
WebAPIIDBFactorycmp
syntax var result = indexeddb.cmp(first, second); parameters first the first key to compare.
databases - Web APIs
syntax const promise = indexeddb.databases() parameters the method does not take in any parameters.
IDBFactory.deleteDatabase() - Web APIs
syntax for the current standard: var request = indexeddb.deletedatabase(name); for the experimental version with options (see below): var request = indexeddb.deletedatabase(name, options); parameters name the name of the database you want to delete.
IDBFactory.open() - Web APIs
WebAPIIDBFactoryopen
syntax for the current standard: var idbopendbrequest = indexeddb.open(name); var idbopendbrequest = indexeddb.open(name, version); parameters name the name of the database.
IDBIndex.count() - Web APIs
WebAPIIDBIndexcount
syntax var request = myindex.count(); var request = myindex.count(key); parameters key optional the key or key range that identifies the record to be counted.
IDBIndex.get() - Web APIs
WebAPIIDBIndexget
syntax var request = myindex.get(key); parameters key optional a key or idbkeyrange that identifies the record to be retrieved.
IDBIndex.getAll() - Web APIs
WebAPIIDBIndexgetAll
syntax var getallkeysrequest = idbindex.getall(); var getallkeysrequest = idbindex.getall(query); var getallkeysrequest = idbindex.getall(query, count); parameters query optional a key or an idbkeyrange identifying the records to retrieve.
IDBIndex.getAllKeys() - Web APIs
syntax var allkeysrequest = idbindex.getallkeys(); var allkeysrequest = idbindex.getallkeys(query); var allkeysrequest = idbindex.getallkeys(query, count); parameters query optional a key or an idbkeyrange identifying the keys to retrieve.
IDBIndex.getKey() - Web APIs
WebAPIIDBIndexgetKey
syntax var request = myindex.getkey(key); parameters key optional a key or idbkeyrange that identifies a record to be retrieved.
IDBIndex.isAutoLocale - Web APIs
the isautolocale read-only property of the idbindex interface returns a boolean indicating whether the index had a locale value of auto specified upon its creation (see createindex()'s optionalparameters.) syntax var myindex = objectstore.index('index'); console.log(myindex.isautolocale); value a boolean.
IDBIndex.keyPath - Web APIs
WebAPIIDBIndexkeyPath
syntax var mykeypath = myindex.keypath; value any data type that can be used as a key path.
IDBIndex.locale - Web APIs
WebAPIIDBIndexlocale
syntax var myindex = objectstore.index('index'); console.log(myindex.locale); value a domstring.
IDBIndex.multiEntry - Web APIs
syntax var ismultientry = myindex.multientry; value a boolean: value effect true there is one record in the index for each item in an array of keys.
IDBIndex.name - Web APIs
WebAPIIDBIndexname
syntax var indexname = idbindex.name; idbindex.name = indexname; value a domstring specifying a name for the index.
IDBIndex.objectStore - Web APIs
syntax var myidbobjectstore = myindex.objectstore; value an idbobjectstore.
IDBIndex.openCursor() - Web APIs
syntax var request = myindex.opencursor(); var request = myindex.opencursor(range); var request = myindex.opencursor(range, direction); parameters range optional a key or idbkeyrange to use as the cursor's range.
IDBIndex.openKeyCursor() - Web APIs
syntax var request = myindex.openkeycursor(); var request = myindex.openkeycursor(range); var request = myindex.openkeycursor(range, direction); parameters range optional a key or idbkeyrange to use as the cursor's range.
IDBIndex.unique - Web APIs
WebAPIIDBIndexunique
syntax var isunique = idbindex.unique; value a boolean: value effect true the current index does not allow duplicate values for a key.
IDBKeyRange.bound() - Web APIs
WebAPIIDBKeyRangebound
syntax var myidbkeyrange = idbkeyrange.bound(lower, upper); var myidbkeyrange = idbkeyrange.bound(lower, upper, loweropen); var myidbkeyrange = idbkeyrange.bound(lower, upper, loweropen, upperopen); parameters lower specifies the lower bound of the new key range.
IDBKeyRange.includes() - Web APIs
syntax var isincluded = mykeyrange.includes(key) parameters key the key you want to check for in your key range.
IDBKeyRange.lower - Web APIs
WebAPIIDBKeyRangelower
syntax var lower = mykeyrange.lower value the lower bound of the key range (can be any type.) example the following example illustrates how you'd use a key range.
IDBKeyRange.lowerBound() - Web APIs
syntax var myidbkeyrange = idbkeyrange.lowerbound(lower); var myidbkeyrange = idbkeyrange.lowerbound(lower, open); parameters lower specifies the lower bound of the new key range.
IDBKeyRange.lowerOpen - Web APIs
syntax var loweropen = mykeyrange.loweropen value a boolean: value indication true the lower-bound value is not included in the key range.
IDBKeyRange.only() - Web APIs
WebAPIIDBKeyRangeonly
syntax var myidbkeyrange = idbkeyrange.only(value); parameters value is the value for the new key range.
IDBKeyRange.upper - Web APIs
WebAPIIDBKeyRangeupper
syntax var upper = mykeyrange.upper value the upper bound of the key range (can be any type.) example the following example illustrates how you'd use a key range.
IDBKeyRange.upperBound() - Web APIs
syntax var myidbkeyrange = idbkeyrange.upperbound(upper[, open=false]) parameters bound specifies the upper bound of the new key range.
IDBKeyRange.upperOpen - Web APIs
syntax var upperopen = mykeyrange.upperopen value a boolean: value indication true the upper-bound value is not included in the key range.
FileHandle.getFile() - Web APIs
syntax var request = instanceoffilehandle.getfile(); return a domrequest object.
FileHandle.name - Web APIs
syntax var name = instanceoffilehandle.name value a string.
FileHandle.onabort - Web APIs
syntax instanceoffilehandle.onabort = funcref; where funcref is a function to be called when the abort event occurs.
FileHandle.onerror - Web APIs
syntax instanceoffilehandle.onerror = funcref; where funcref is a function to be called when the error event occurs.
FileHandle.open() - Web APIs
syntax var myfile = instanceoffilehandle.open(mode); parameters mode a string that specifies the writing mode for the file.
FileHandle.type - Web APIs
syntax var type = instanceoffilehandle.type value a string.
IDBObjectStore.add() - Web APIs
syntax var request = objectstore.add(value); var request = objectstore.add(value, key); parameters value the value to be stored.
IDBObjectStore.autoIncrement - Web APIs
syntax var myautoincrement = objectstore.autoincrement; value a boolean: value meaning true the object store auto increments.
IDBObjectStore.clear() - Web APIs
syntax var request = objectstore.clear(); returns an idbrequest object on which subsequent events related to this operation are fired.
IDBObjectStore.count() - Web APIs
syntax var request = objectstore.count(); var request = objectstore.count(query); parameters query optional a key or idbkeyrange object that specifies a range of records you want to count.
IDBObjectStore.delete() - Web APIs
syntax var request = objectstore.delete(key); var request = objectstore.delete(keyrange); parameters key the key of the record to be deleted, or an idbkeyrange to delete all records with keys in range.
IDBObjectStore.deleteIndex() - Web APIs
syntax objectstore.deleteindex(indexname); parameters indexname the name of the existing index to remove.
IDBObjectStore.get() - Web APIs
syntax var request = objectstore.get(key); parameters key the key or key range that identifies the record to be retrieved.
IDBObjectStore.getAll() - Web APIs
syntax var request = objectstore.getall(); var request = objectstore.getall(query); var request = objectstore.getall(query, count); parameters query optional a key or idbkeyrange to be queried.
IDBObjectStore.getAllKeys() - Web APIs
syntax var request = objectstore.getallkeys(); var request = objectstore.getallkeys(query); var request = objectstore.getallkeys(query, count); parameters query optional a value that is or resolves to an idbkeyrange.
IDBObjectStore.getKey() - Web APIs
syntax var request = objectstore.getkey(key); parameters key the key or key range that identifies the record to be retrieved.
IDBObjectStore.index() - Web APIs
syntax var index = objectstore.index(name); parameters name the name of the index to open.
IDBObjectStore.indexNames - Web APIs
syntax var myindexnames = objectstore.indexnames; value a domstringlist.
IDBObjectStore.keyPath - Web APIs
syntax var mykeypath = objectstore.keypath; value any value type.
IDBObjectStore.name - Web APIs
syntax idbobjectstore.name = mynewname; var myobjectstorename = idbobjectstore.name; value a domstring containing the object store's name.
IDBObjectStore.openCursor() - Web APIs
syntax var request = objectstore.opencursor(); var request = objectstore.opencursor(query); var request = objectstore.opencursor(query, direction); parameters query optional a key or idbkeyrange to be queried.
IDBObjectStore.openKeyCursor() - Web APIs
syntax var request = objectstore.openkeycursor(); var request = objectstore.openkeycursor(query); var request = objectstore.openkeycursor(query, direction); parameters query optional the key range to be queried.
IDBObjectStore.put() - Web APIs
syntax let request = objectstore.put(item); let request = objectstore.put(item, key); parameters item the item you wish to update (or insert).
IDBObjectStore.transaction - Web APIs
syntax var mytransaction = objectstore.transaction; value an idbtransaction object.
IDBOpenDBRequest.onblocked - Web APIs
syntax idbopendbrequest.onblocked = function(event) { ...
IDBOpenDBRequest.onupgradeneeded - Web APIs
syntax idbopendbrequest.onupgradeneeded = function(event) { ...
IDBRequest.error - Web APIs
WebAPIIDBRequesterror
syntax var myerror = request.error; value a domerror containing the relevant error.
IDBRequest.onerror - Web APIs
syntax request.onerror = function(event) { ...
IDBRequest.onsuccess - Web APIs
syntax request.onsuccess = function(event) { ...
IDBRequest.readyState - Web APIs
syntax var currentreadystate = request.readystate; value the idbrequestreadystate of the request, which takes one of the following two values: value meaning pending the request is pending.
IDBRequest.result - Web APIs
WebAPIIDBRequestresult
syntax var myresult = request.result; value any example the following example requests a given record title, onsuccess gets the associated record from the idbobjectstore (made available as objectstoretitlerequest.result), updates one property of the record, and then puts the updated record back into the object store.
IDBRequest.source - Web APIs
WebAPIIDBRequestsource
syntax var idbindex = request.source; var idbcursor = request.source; var idbobjectstore = request.source; value an object representing the source of the request, such as an idbindex, idbobjectstore or idbcursor.
IDBRequest.transaction - Web APIs
syntax var mytransaction = request.transaction; value an idbtransaction.
IDBTransaction.objectStoreNames - Web APIs
syntax var mydatabase = transactionobj.objectstorenames; returns a domstringlist of names of idbobjectstore objects.
IDBTransaction.abort() - Web APIs
syntax transaction.abort(); exceptions this method may raise a domexception of the following type: exception description invalidstateerror the transaction has already been committed or aborted.
IDBTransaction.commit() - Web APIs
syntax transaction.commit(); parameters none.
IDBTransaction.db - Web APIs
WebAPIIDBTransactiondb
syntax var mydatabase = transaction.db; value an idbdatabase object.
IDBTransaction.error - Web APIs
syntax var myerror = transaction.error; value a domerror containing the relevant error.
IDBTransaction.mode - Web APIs
syntax var mycurrentmode = idbtransaction.mode; value an idbtransactionmode object defining the mode for isolating access to data in the current object stores: value explanation readonly allows data to be read but not changed.
IDBTransaction.objectStore() - Web APIs
syntax idbtransaction.objectstore(name); parameters name the name of the requested object store.
IDBTransaction.onabort - Web APIs
syntax transaction.onabort = function(event) { ...
IDBTransaction.oncomplete - Web APIs
syntax transaction.oncomplete = function(event) { ...
IDBTransaction.onerror - Web APIs
syntax transaction.onerror = function(event) { ...
IDBVersionChangeEvent.newVersion - Web APIs
syntax var newversion = idbversionchangeevent.newversion value a 64-bit integer.
IDBVersionChangeEvent.oldVersion - Web APIs
syntax var oldversion = idbversionchangeevent.oldversion value a 64-bit integer.
IDBVersionChangeEvent.version - Web APIs
syntax readonly attribute unsigned long long?
IDBVersionChangeRequest.setVersion() - Web APIs
syntax idbversionchangerequest setversion ([treatnullas=emptystring] in domstring version); example tbd parameters version the version to store in the database.
IIRFilterNode() - Web APIs
syntax var iirfilternode = new iirfilternode(context, options) parameters inherits parameters from the audionodeoptions dictionary.
IIRFilterNode.getFrequencyResponse() - Web APIs
syntax iirfilternode.getfrequencyresponse(frequencyarray, magresponseoutput, phaseresponseoutput); parameters frequencyarray a float32array containing an array of frequencies, specified in hertz, which you want to filter.
IdleDeadline.didTimeout - Web APIs
syntax var timedout = idledeadline.didtimeout; value a boolean which is true if the callback is running due to the callback's timeout period elapsing or false if the callback is running because the user agent is idle and is offering time to the callback.
IdleDeadline.timeRemaining() - Web APIs
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.
ImageBitmap.close() - Web APIs
WebAPIImageBitmapclose
syntax void imagebitmap.close() examples var offscreen = new offscreencanvas(256, 256); var gl = offscreen.getcontext('webgl'); // ...
ImageBitmapRenderingContext.transferFromImageBitmap() - Web APIs
syntax void imagebitmaprenderingcontext.transferfromimagebitmap(bitmap) parameters bitmap an imagebitmap object to transfer.
ImageCapture() constructor - Web APIs
syntax const imagecapture = new imagecapture(videotrack) parameters videotrack a mediastreamtrack from which the still images will be taken.
ImageCapture.getPhotoCapabilities() - Web APIs
syntax const capabilitiespromise = imagecaptureobj.getphotocapabilities() return value a promise that resolves with a photocapabilities object.
ImageCapture.getPhotoSettings() - Web APIs
syntax const settingspromise = imagecapture.getphotosettings() return value a promise that resolves with a photosettings object containing the following properties: filllightmode: the flash setting of the capture device, one of "auto", "off", or "on".
ImageCapture.grabFrame() - Web APIs
syntax const bitmappromise = imagecapture.grabframe() return value a promise that resolves to an imagebitmap object.
ImageCapture.takePhoto() - Web APIs
syntax const blobpromise = imagecaptureobj.takephoto([photosettings]) parameters photosettings optional an object that sets options for the photo to be taken.
ImageCapture.track - Web APIs
syntax const mediastreamtrack = imagecaptureobj.track value a mediastreamtrack object.
ImageData() - Web APIs
syntax new imagedata(array, width [, height]); new imagedata(width, height); parameters array optional a uint8clampedarray containing the underlying pixel representation of the image.
ImageData.data - Web APIs
WebAPIImageDatadata
syntax imagedata.data examples getting an imagedata object's pixel data this example creates an imagedata object that is 100 pixels wide and 100 pixels tall, making 10,000 pixels in all.
ImageData.height - Web APIs
WebAPIImageDataheight
syntax imagedata.height example this example creates an imagedata object that is 200 pixels wide and 100 pixels tall.
ImageData.width - Web APIs
WebAPIImageDatawidth
syntax imagedata.width example this example creates an imagedata object that is 200 pixels wide and 100 pixels tall.
InputDeviceCapabilities - Web APIs
syntax var inputdevicecapabilities = new inputdevicecapabilities([inputdevicecapabilitiesinit]) returns an instance of the inputdevicecapabilities interface.
firesTouchEvents - Web APIs
syntax var boolean = inputdevicecapabilities.firestouchevents returns a boolean example mybutton.addeventlistener('mousedown', function(e) { if (!e.sourcecapabilities.firestouchevents) mybutton.classlist.add("pressed"); }); specifications specification status comment inputdevicecapabilitiesthe definition of 'firetouchevents' in that specification.
InputEvent() - Web APIs
syntax event = new inputevent(typearg, inputeventinit); values typearg is a domstring representing the name of the event.
InputEvent.data - Web APIs
WebAPIInputEventdata
syntax var astring = inputevent.data; value a domstring.
InputEvent.dataTransfer - Web APIs
syntax var datatransfer = inputevent.datatransfer value a datatransfer object.
InputEvent.getTargetRanges() - Web APIs
syntax var staticranges[] = inputevent.gettargetranges() parameters none.
InputEvent.inputType - Web APIs
syntax var astring = inputevent.inputtype; value a domstring containing the type of input that was made.
InputEvent.isComposing - Web APIs
syntax var bool = event.iscomposing; example var inputevent = new inputevent('syntheticinput', false); console.log(inputevent.iscomposing); // return false specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'inputevent.iscomposing' in that specification.
InstallEvent.InstallEvent() - Web APIs
syntax var myinstallevent = new installevent(type, init); parameters type the type of the event.
InstallEvent.activeWorker - Web APIs
syntax var myactiveworker = event.activeworker value a serviceworker object.
compareVersion - Web APIs
method of installtrigger object syntax int compareversion ( string registryname, installversion version); int compareversion ( string registryname, string version); int compareversion ( string registryname, int major, int minor, int release, int build); parameters the compareversion method has the following parameters: registryname the pathname in the client version registry for the component whose...
enabled - Web APIs
method of installtrigger object syntax boolean enabled (); parameters none returns true if software installation is enabled for this client machine; otherwise, false.
getVersion - Web APIs
method of installtrigger object syntax installversion getversion ( string component ); parameters the getversion method has one parameter: component the name of a component in the client version registry.
install - Web APIs
method of installtrigger object syntax int install(array xpilist [, function callbackfunc ] ) parameters the install method has the following parameters: xpilist an array of files to be installed (see example below).
installChrome - Web APIs
method of installtrigger object syntax int installchrome( type, url, name ) parameters the installchrome method has the following parameters: type type can be installtrigger.skin or installtrigger.locale.
startSoftwareUpdate - Web APIs
method of installtrigger object syntax boolean startsoftwareupdate ( string url); parameters the startsoftwareupdate method has the following parameter: url a uniform resource locator specifying the location of the xpi file containing the software.
IntersectionObserver.disconnect() - Web APIs
syntax intersectionobserver.disconnect(); parameters none.
IntersectionObserver.observe() - Web APIs
syntax intersectionobserver.observe(targetelement); parameters targetelement an element whose visibility within the root is to be monitored.
IntersectionObserver.root - Web APIs
syntax var root = intersectionobserver.root; value a element or document object whose bounding box is used as the bounds of the viewport for the purposes of determining how much of the target element is visible.
IntersectionObserver.takeRecords() - Web APIs
syntax intersectionobserverentries = intersectionobserver.takerecords(); parameters none.
IntersectionObserver.thresholds - Web APIs
syntax var thresholds = intersectionobserver.thresholds; value an array of intersection thresholds, originally specified using the threshold property when instantiating the observer.
IntersectionObserver.unobserve() - Web APIs
syntax intersectionobserver.unobserve(target); parameters target the element to cease observing.
IntersectionObserverEntry.boundingClientRect - Web APIs
syntax var boundsrect = intersectionobserverentry.boundingclientrect; value a domrectreadonly which describes the smallest rectangle that contains every part of the target element whose intersection change is being described.
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.
IntersectionObserverEntry.intersectionRect - Web APIs
syntax var intersectionrect = intersectionobserverentry.intersectionrect; value a domrectreadonly which describes the part of the target element that's currently visible within the root's intersection rectangle.
IntersectionObserverEntry.isIntersecting - Web APIs
syntax var isintersecting = intersectionobserverentry.isintersecting; value a boolean value which indicates whether the target element has transitioned into a state of intersection (true) or out of a state of intersection (false).
IntersectionObserverEntry.rootBounds - Web APIs
syntax var rootbounds = intersectionobserverentry.rootbounds; value a domrectreadonly which describes the root intersection rectangle.
IntersectionObserverEntry.target - Web APIs
syntax var target = intersectionobserverentry.target; value the intersectionobserverentry's target property specifies which element previously targeted by calling intersectionobserver.observe() experienced a change in intersection with the root.
IntersectionObserverEntry.time - Web APIs
syntax var time = intersectionobserverentry.time; value a domhighrestimestamp which indicates the time at which the target element experienced the intersection change described by the intersectionobserverentry.
Keyboard.getLayoutMap() - Web APIs
syntax var promise = keyboard.getlayoutmap() parameters none.
Keyboard.lock() - Web APIs
WebAPIKeyboardlock
syntax var promise = keyboard.lock([keycodes[]]) parameters keycodes optional an array of one or more key codes to lock.
Keyboard.unlock() - Web APIs
WebAPIKeyboardunlock
syntax keyboard.unlock() parameters none.
KeyboardEvent() - Web APIs
syntax event = new keyboardevent(typearg, keyboardeventinit); values typearg is a domstring representing the name of the event.
KeyboardEvent.altKey - Web APIs
syntax var altkeypressed = instanceofkeyboardevent.altkey return value boolean examples <html> <head> <title>altkey example</title> <script type="text/javascript"> function showchar(e){ alert( "key keydown: " + string.fromcharcode(e.charcode) + "\n" + "charcode: " + e.charcode + "\n" + "alt key keydown: " + e.altkey + "\n" ); } </script> </head> <body onkeydown="showchar(event);"> <p> press any character key, with or without holding down the alt key.<br /> you can also use the shift key together with the alt key.
KeyboardEvent.charCode - Web APIs
syntax var code = event.charcode; return value a number that represents the unicode value of the character key that was pressed.
KeyboardEvent.ctrlKey - Web APIs
syntax var ctrlkeypressed = instanceofkeyboardevent.ctrlkey return value a boolean example <html> <head> <title>ctrlkey example</title> <script type="text/javascript"> function showchar(e){ alert( "key pressed: " + e.key + "\n" + "ctrl key pressed: " + e.ctrlkey + "\n" ); } </script> </head> <body onkeypress="showchar(event);"> <p>press any character key, with or without holding down the ctrl key.<br /> you can also use the shift key together with the ctrl key.</p> </body> </html> specifications specification status comment document object model (dom) level 3 events specificationthe definition...
KeyboardEvent.getModifierState() - Web APIs
syntax var active = event.getmodifierstate(keyarg); returns a boolean parameters keyarg a modifier key value.
KeyboardEvent.initKeyEvent() - Web APIs
syntax event.initkeyevent (type, bubbles, cancelable, viewarg, ctrlkeyarg, altkeyarg, shiftkeyarg, metakeyarg, keycodearg, charcodearg) parameters type is a domstring representing the type of event.
KeyboardEvent.initKeyboardEvent() - Web APIs
syntax kbdevent.initkeyboardevent(typearg, canbubblearg, cancelablearg, viewarg, chararg, keyarg, locationarg, modifierslistarg, repeat) parameters typearg the type of keyboard event; this will be one of keydown, keypress, or keyup.
KeyboardEvent.isComposing - Web APIs
syntax var bool = event.iscomposing; example var kbdevent = new keyboardevent("synthetickey", false); console.log(kbdevent.iscomposing); // return false specifications specification status comment ui eventsthe definition of 'keyboardevent.prototype.iscomposing' in that specification.
KeyboardEvent.location - Web APIs
syntax var location = event.location; example function keyevent(event) { console.log("location of key pressed: " + event.location); } specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.location' in that specification.
KeyboardEvent.metaKey - Web APIs
syntax var metakeypressed = instanceofkeyboardevent.metakey return value a boolean example function ismetakey(e) { alert("metakey = " + e.metakey); } <button onclick="ismetakey(event)">click me with the meta key</button> specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.metakey' in t...
KeyboardEvent.repeat - Web APIs
syntax var repeat = event.repeat; return value boolean specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.repeat' in that specification.
KeyboardEvent.shiftKey - Web APIs
syntax var shiftkeypressed = instanceofkeyboardevent.shiftkey return value a boolean example <html> <head> <title>shiftkey example</title> <script type="text/javascript"> function showchar(e){ alert( "key pressed: " + string.fromcharcode(e.charcode) + "\n" + "charcode: " + e.charcode + "\n" + "shift key pressed: " + e.shiftkey + "\n" + "alt key pressed: " + e.altkey + "\n" ); } </script> </head> <body onkeypress="showchar(event);"> <p>press any character key, with or without holding down the shift key.<br /> you can also use the shift key together with the alt key.</p> </body> </html> specifications spec...
KeyboardEvent.which - Web APIs
syntax var keyresult = event.which; return value keyresult contains the numeric code for a particular key pressed, depending on whether an alphanumeric or non-alphanumeric key was pressed.
KeyboardLayoutMap.entries - Web APIs
syntax keyboardlayoutmap.entries() value an array of the given keyboardlayoutmap object's own enumerable property [key, value] pairs.
KeyboardLayoutMap.forEach() - Web APIs
syntax keyboardlayoutmap.foreach(function callback(currentvalue[, index[, array]]) { //your iterator }[, thisarg]); parameters callback the function to execute for each element, taking three arguments: currentvalue the value of the current element being processed.
KeyboardLayoutMap.get() - Web APIs
syntax var value = keyboardlayoutmap.get(key) parameters key the key of the item to return from the map.
KeyboardLayoutMap.has() - Web APIs
syntax var aboolean = keyboardlayoutmap.has(key) parameters key the key of an element to search for in the map.
KeyboardLayoutMap.keys - Web APIs
syntax iterator = keyboardlayoutmap.keys value an iterator.
KeyboardLayoutMap.size - Web APIs
syntax var size = keyboardlayoutmap.size() value a number.
KeyboardLayoutMap.values - Web APIs
syntax var iterator = keyboardlayoutmap.values value an iterator.
KeyframeEffect.KeyframeEffect() - Web APIs
syntax var keyframes = new keyframeeffect(element, keyframeset, keyframeoptions); var keyframes = new keyframeeffect(sourcekeyframes); parameters the first type of constructor (see above) creates a completely new keyframeeffect object instance.
KeyframeEffect.composite - Web APIs
syntax // getting var compositeenumeration = keyframeeffect.composite; // setting keyframeeffect.composite = 'accumulate'; value to understand these values, take the example of a keyframeeffect value of blur(2) working on an underlying property value of blur(3).
KeyframeEffect.getKeyframes() - Web APIs
syntax var keyframes = keyframeeffect.getkeyframes(); parameters none.
KeyframeEffect.iterationComposite - Web APIs
syntax // getting var iterationcompositeenumeration = keyframeeffect.iterationcomposite; // setting keyframeeffect.iterationcomposite = 'replace'; values replace the keyframeeffect value produced is independent of the current iteration.
KeyframeEffect.setKeyframes() - Web APIs
syntax existingkeyframeeffect.setkeyframes(keyframes); parameters keyframes a keyframe object or null.
KeyframeEffect.target - Web APIs
syntax var targetelement = document.getelementbyid("elementtoanimate"); var keyframes = new keyframeeffect( targetelement, keyframeblock, timingoptions ); // returns #elementtoanimate keyframes.target; // assigns keyframes a new target keyframes.target = newtargetelement; value an element, csspseudoelement, 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.
LinearAccelerationSensor.x - Web APIs
syntax var xlinearaccelerationsensor = linearaccelerationsensor.x value a number.
LinearAccelerationSensor.y - Web APIs
syntax var yacceleration = accelerometer.y value a number.
LinearAccelerationSensor.z - Web APIs
syntax var zacceleration = accelerometer.z value a number.
LocalFileSystem - Web APIs
returns void exceptions this method can raise an fileerror with the following code: exception description encoding_err the syntax of the url was invalid.
LocalFileSystemSync - Web APIs
exceptions this method can raise a fileexception with the following codes: exception description encoding_err the syntax of the url was invalid.
Location: ancestorOrigins - Web APIs
syntax const ancestors = location.ancestororigins; specifications specification status comment html living standardthe definition of 'ancestororigins ' in that specification.
Location: hash - Web APIs
WebAPILocationhash
syntax string = object.hash; object.hash = string; examples <a id="myanchor" href="/docs/location.href#examples">examples</a> <script> var anchor = document.getelementbyid("myanchor"); console.log(anchor.hash); // returns '#examples' </script> specifications specification status comment html living standardthe definition of 'hash' in that specification.
Location: host - Web APIs
WebAPILocationhost
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 spec...
Location: hostname - Web APIs
WebAPILocationhostname
syntax string = object.hostname; object.hostname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/location.hostname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.hostname; // returns:'developer.mozilla.org' specifications specification status comment html living standardthe definition of 'hostname' in that specification.
Location: href - Web APIs
WebAPILocationhref
syntax string = object.href; object.href = string; examples // lets imagine an <a id="myanchor" href="https://developer.mozilla.org/location/href"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.href; // returns: 'https://developer.mozilla.org/location/href' specifications specification status comment html living standardthe definition of 'href' in that specification.
Location: origin - Web APIs
WebAPILocationorigin
syntax string = object.origin; examples // on this page, returns the origin var result = window.location.origin; // returns:'https://developer.mozilla.org' specifications specification status comment html living standardthe definition of 'origin' in that specification.
Location: password - Web APIs
WebAPILocationpassword
syntax string = object.password; object.password = string; examples // let's <a id="myanchor" href="https://anonymous:flabada@developer.mozilla.org/docs/location.username"> be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.password; // returns:'flabada' ...
Location: pathname - Web APIs
WebAPILocationpathname
syntax string = object.pathname; object.pathname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/location.pathname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.pathname; // returns:'/docs/location.pathname' specifications specification status comment html living standardthe definition of 'pathname' in that specification.
Location: port - Web APIs
WebAPILocationport
syntax string = object.port; object.port = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org:443/docs/location.port"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.port; // returns:'443' specifications specification status comment html living standardthe definition of 'location.port' in that specification.
Location: protocol - Web APIs
WebAPILocationprotocol
syntax string = object.protocol; object.protocol = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/location.protocol"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.protocol; // returns:'https:' specifications specification status comment html living standardthe definition of 'protocol' in that specification.
Location: reload() - Web APIs
WebAPILocationreload
syntax location.reload(); specifications specification status comment html living standardthe definition of 'location.reload()' in that specification.
Location: search - Web APIs
WebAPILocationsearch
syntax 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 standard...
Location: toString() - Web APIs
WebAPILocationtoString
syntax string = object.tostring(); examples // let's imagine an <a id="myanchor" href="https://developer.mozilla.org/docs/location/tostring"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.tostring(); // returns: 'https://developer.mozilla.org/docs/location/tostring' specifications specification status comment html living standard living standard ...
Location: username - Web APIs
WebAPILocationusername
syntax string = object.username; object.username = string; examples // let's <a id="myanchor" href="https://anonymous:flabada@developer.mozilla.org/docs/location.username"> be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.username; // returns:'anonymous' ...
Locks.mode - Web APIs
WebAPILockmode
syntax var mode = lock.mode value one of "exclusive" or "shared".
Locks.name - Web APIs
WebAPILockname
syntax var name = lock.name value a domstring.
LockManager.query() - Web APIs
WebAPILockManagerquery
syntax var promise<lockmanagersnapshot> = lockmanager.query() parameters none.
LockManager.request() - Web APIs
syntax lockmanager.request(var promise = name[, {options}], callback) parameters name an identifier for the lock you want to request.
LockedFile.abort() - Web APIs
WebAPILockedFileabort
syntax var request = instanceoflockedfile.abort(); return a filerequest object to handle the success or failure of the operation.
LockedFile.active - Web APIs
WebAPILockedFileactive
syntax var state = instanceoflockedfile.active value a boolean.
LockedFile.append() - Web APIs
WebAPILockedFileappend
syntax var request = instanceoflockedfile.append(data); parameters data the data to write into the file.
LockedFile.fileHandle - Web APIs
syntax var handler = instanceoflockedfile.filehandle value a filehandle object.
LockedFile.flush() - Web APIs
WebAPILockedFileflush
syntax var request = instanceoflockedfile.flush(); return a filerequest object to handle the success or failure of the operation.
LockedFile.getMetadata() - Web APIs
syntax var request = instanceoflockedfile.getmetadata(param); parameters param optional an object used to request specific metadata.
LockedFile.location - Web APIs
syntax var location = instanceoflockedfile.location value a number.
LockedFile.mode - Web APIs
WebAPILockedFilemode
syntax var mode = instanceoflockedfile.mode value a string, one of readonly or readwrite.
LockedFile.onabort - Web APIs
syntax instanceoflockedfile.onabort = funcref; where funcref is a function to be called when the abort event occurs.
LockedFile.oncomplete - Web APIs
syntax instanceoflockedfile.oncomplete = funcref; where funcref is a function to be called when the complete event occurs.
LockedFile.onerror - Web APIs
syntax instanceoflockedfile.onerror = funcref; where funcref is a function to be called when the error event occurs.
LockedFile.readAsArrayBuffer() - Web APIs
syntax var request = instanceoflockedfile.readasarraybuffer(size); parameters size a number representing the number of bytes to read in the file.
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
WebAPILockedFilewrite
syntax var request = instanceoflockedfile.write(data); parameters data the data to write into the file.
MSCandidateWindowHide - Web APIs
syntax event property object.oncandidatewindowhide = handler; addeventlistener method object.addeventlistener("mscandidatewindowhide", handler, usecapture) nbsp; parameters pevtobj [in] type: ihtmleventobj pointer to an ihtmleventobj interface for the current event.
MSCandidateWindowShow - Web APIs
syntax event property object.oncandidatewindowshow = handler; addeventlistener method object.addeventlistener("mscandidatewindowshow", handler, usecapture) parameters pevtobj [in] type: ihtmleventobj pointer to an ihtmleventobj interface for the current event.
MSCandidateWindowUpdate - Web APIs
syntax event property object.oncandidatewindowupdate = handler; addeventlistener method object.addeventlistener("mscandidatewindowupdate", handler, usecapture) parameters pevtobj [in] type: ihtmleventobj pointer to an ihtmleventobj interface for the current event.
MSGraphicsTrust - Web APIs
syntax var trustobject = media.msgraphicstruststatus; parameters constrictionactive a read-only property which returns true when protected media is forced to play in a lower resolution.
MSManipulationEvent.initMSManipulationEvent() - Web APIs
syntax msmanipulationevent.initmsmanipulationevent(typearg, canbubblearg, cancelablearg, viewarg, detailarg, laststate, currentstate); parameters typearg [in] type: domstring the type of the event being created.
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.
Magnetometer.x - Web APIs
WebAPIMagnetometerx
syntax var magnetometerx = magnetometer.x value a number.
Magnetometer.y - Web APIs
WebAPIMagnetometery
syntax var magnetometery = magnetometer.x value a number.
Magnetometer.z - Web APIs
WebAPIMagnetometerz
syntax var magnetometerz = magnetometer.z value a number.
MediaCapabilities.decodingInfo() - Web APIs
syntax mediacapabilities.decodinginfo(mediadecodingconfiguration) parameters mediadecodingconfiguration a valid mediadecodingconfiguration dictionary containing a valid media decoding type of file or media-source and a valid media configuration: either an audioconfiguration or a videoconfiguration.
MediaCapabilities.encodingInfo() - Web APIs
syntax mediacapabilities.encodinginfo(mediaencodingconfiguration) parameters mediaencodingconfiguration a valid mediaencodingconfiguration dictionary containing a valid media encoding type of record or transmission and a valid media configuration: either an audioconfiguration or videoconfiguration dictionary.
MediaDeviceInfo.deviceId - Web APIs
syntax var deviceid = mediadeviceinfo.deviceid value a domstring.
MediaDeviceInfo.groupId - Web APIs
syntax var groupid = mediadeviceinfo.groupid; value a domstring which uniquely identifies the group of related devices to which this device belongs.
MediaDeviceInfo.kind - Web APIs
syntax var kind = mediadeviceinfo.kind value a domstring.
MediaDeviceInfo.label - Web APIs
syntax var label = mediadeviceinfo.label; value a domstring which describes the media device.
MediaDevices.enumerateDevices() - Web APIs
syntax var enumeratorpromise = navigator.mediadevices.enumeratedevices(); return value a promise that receives an array of mediadeviceinfo objects when the promise is fulfilled.
MediaDevices.getDisplayMedia() - Web APIs
syntax var promise = navigator.mediadevices.getdisplaymedia(constraints); parameters constraints optional an optional mediastreamconstraints object specifying requirements for the returned mediastream.
MediaDevices.getSupportedConstraints() - Web APIs
syntax var supportedconstraints = navigator.mediadevices.getsupportedconstraints(); parameters none.
MediaDevices.ondevicechange - Web APIs
syntax mediadevices.ondevicechange = eventhandler; value a function you provide which accepts as input a event object describing the devicechange event that occurred.
MediaElementAudioSourceNode() - Web APIs
syntax var myaudiosource = new mediaelementaudiosourcenode(context, options); parameters inherits parameters from the audionodeoptions dictionary.
MediaElementAudioSourceNode.mediaElement - Web APIs
syntax audiosourceelement = mediaelementaudiosourcenode.mediaelement; value an htmlmediaelement representing the element which contains the source of audio for the node.
MediaError.code - Web APIs
WebAPIMediaErrorcode
syntax var myerror = mediaerror.code; value a numeric value indicating the general type of error which occurred.
MediaError.message - Web APIs
syntax var errormessage = mediaerror.message; value a domstring providing a detailed, specific explanation of what went wrong and possibly how it might be fixed.
MediaKeyMessageEvent() - Web APIs
syntax var mediakeymessageevent = new mediakeymessageevent(typearg, options) parameters typearg a domstring containing one of may be one of license-request, license-renewal, license-renewal, or individualization-request.
message - Web APIs
syntax var messagetype = mediakeymessageevent.messagetype; specifications specification status comment encrypted media extensionsthe definition of 'message' in that specification.
MediaKeyMessageEvent.messageType - Web APIs
syntax var messagetype = mediakeymessageevent.messagetype; specifications specification status comment encrypted media extensionsthe definition of 'messagetype' in that specification.
close() - Web APIs
syntax mediakeysession.close().then(function() { ...
MediaKeySession.closed - Web APIs
syntax var promise = mediakeysessionobj.closed; value a promise.
expiration - Web APIs
syntax ​var expirationtime = mediakeysessionobj.expiration; specifications specification status comment encrypted media extensionsthe definition of 'expiration' in that specification.
generateRequest() - Web APIs
syntax mediakeysession.generaterequest().then(function) { ...
keyStatuses - Web APIs
syntax var mediakeystatusmapobj = mediakeysessionobj.keystatuses; specifications specification status comment encrypted media extensionsthe definition of 'keystatuses' in that specification.
load() - Web APIs
syntax mediakeysession.load(sessionid).then(function(booleanvalue) { ...
MediaKeySession.onkeystatuseschange - Web APIs
="/docs/web/api/mediakeysession" target="_top"><rect x="151" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="226" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">mediakeysession</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} syntax mediakeysession.onkeystatuseschange = function(keystatuschange) { ...
MediaKeySession.onmessage - Web APIs
="/docs/web/api/mediakeysession" target="_top"><rect x="151" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="226" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">mediakeysession</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} syntax mediakeysession.onmessage = function(mediakeymessageevent) { ...
sessionId - Web APIs
syntax ​var sessionid = mediakeysessionobj.sessionid; specifications specification status comment encrypted media extensionsthe definition of 'sessionid' in that specification.
update() - Web APIs
syntax mediakeysession.update(response).then(function() { ...
MediaKeyStatusMap.entries() - Web APIs
syntax // tbd parameters none.
MediaKeyStatusMap.forEach() - Web APIs
syntax mediakeystatusmap.foreach(callback[, thisarg]) parameters callback function to execute for each element, taking three arguments: currentvalue the current element being processed in the array.
MediaKeyStatusMap.get() - Web APIs
syntax var value = mediakeystatusmap.get(key); parameters key the key whose value you want returned.
MediaKeyStatusMap.has() - Web APIs
syntax var boolean = mediakeystatusmap(key) parameters key the key whose value you want returned returns a boolean.
MediaKeyStatusMap.keys() - Web APIs
syntax var iterator = mediakeystatusmap.keys() parameters none.
MediaKeyStatusMap.size - Web APIs
syntax var size = mediakeystatusmap.size; value a long integer.
MediaKeyStatusMap.values() - Web APIs
syntax var iterator = mediakeystatusmap.values() parameters none.
createMediaKeys() - Web APIs
syntax var mediakeys = await mediakeysystemaccess.createmediakeys(); specifications specification status comment encrypted media extensionsthe definition of 'createmediakeys()' in that specification.
getConfiguration() - Web APIs
syntax var mediakeysystemconfiguration = mediakeysystemaccess.getconfiguration(); specifications specification status comment encrypted media extensionsthe definition of 'getconfiguration()' in that specification.
keySystem - Web APIs
syntax var keysystem = mediakeysystemaccess.keysystem; specifications specification status comment encrypted media extensionsthe definition of 'keysystem' in that specification.
audioCapabilities - Web APIs
syntax var audiocapabilities[ {contenttype: 'contenttype', robustness:'robustness'}] = mediasystemconfiguration.audiocapabilities; specifications specification status comment encrypted media extensionsthe definition of 'audiocapabilities' in that specification.
distinctiveIdentifier - Web APIs
syntax var distinctiveidentifier = mediasystemconfiguration.distinctiveidentifier; specifications specification status comment encrypted media extensionsthe definition of 'distinctiveidentifier' in that specification.
initDataTypes - Web APIs
syntax var datatypes[] = mediasystemconfiguration.initdatatypes; specifications specification status comment encrypted media extensionsthe definition of 'initdatatypes' in that specification.
persistentState - Web APIs
syntax var persistentstate = mediasystemconfiguration.persistentstate; specifications specification status comment encrypted media extensionsthe definition of 'persistentstate' in that specification.
videoCapabilities - Web APIs
syntax var videocapabilities[{contenttype: 'contenttype', robustness:'robustness'}] = mediasystemconfiguration.videocapabilities; specifications specification status comment encrypted media extensionsthe definition of 'videocapabilities' in that specification.
createSession() - Web APIs
syntax ​var mediakeysessionobject = mediakeys.createsession([mediakeysessiontype]); specifications specification status comment encrypted media extensionsthe definition of 'createsession()' in that specification.
setServerCertificate() - Web APIs
syntax mediakeys.setservercertificate([mediakeysessiontype]).then(function() { ...
MediaList.mediaText - Web APIs
syntax medialistinstance.mediatext; medialistinstance.mediatext = string; value a domstring representing the media queries of a stylesheet.
MediaMetadata.MediaMetadata() - Web APIs
syntax var mediametadata = new mediametadata([metadata]) parameters metadata optional the metadata parameters are as follows: title: the title of the media to be played.
MediaMetadata.album - Web APIs
syntax var album = mediametadata.album mediametadata.album = album value a string containing the name of the album.
MediaMetadata.artist - Web APIs
syntax var artist = mediametadata.artist mediametadata.artist = artist value a string containing the name of the artist.
MediaMetadata.artwork - Web APIs
syntax var artwork[] = mediametadata.artwork mediametadata.artwork = artwork[] value an array of mediaimage objects.
MediaMetadata.title - Web APIs
syntax var title = mediametadata.title mediametadata.title = title value a string containing the title of the media.
MediaPositionState.duration - Web APIs
syntax let positionstate = { duration: durationinseconds }; let durationinseconds = positionstate.duration; value a floating-point value indicating the overall duration, in seconds, of the media being performed.
MediaPositionState.playbackRate - Web APIs
syntax let positionstate = { playbackrate: rate }; let playbackrate = positionstate.playbackrate; value a floating-point value specifying a multiplier corresponding to the current relative rate at which the media being performed is playing.
MediaPositionState.position - Web APIs
syntax let positionstate = { position: timeinseconds }; let duration = positionstate.duration; value a floating-point value indicating the current playback position within the media currently being performed, in seconds.
MediaQueryList.addListener() - Web APIs
syntax mediaquerylist.addlistener(func) parameters func a function or function reference representing the callback function you want to run when the media query status changes.
MediaQueryList.matches - Web APIs
syntax var matches = <varm>mediaquerylist.matches; value a boolean which is true if the document currently matches the media query list; otherwise, it's false.
MediaQueryList.media - Web APIs
syntax var media = mediaquerylist.media; value a domstring representing a serialized media query.
MediaQueryList.onchange - Web APIs
syntax mediaquerylist.onchange = function() { ...
MediaQueryList.removeListener() - Web APIs
syntax mediaquerylist.removelistener(func) parameters func a function or function reference representing the callback function you want to remove.
MediaQueryListEvent.MediaQueryListEvent() - Web APIs
syntax var mymqlevent = new mediaquerylistevent(init); parameters init an init object that defines features of the new object instance.
MediaQueryListEvent.matches - Web APIs
syntax var matches = mediaquerylistevent.matches; value a boolean; returns true if the document currently matches the media query list, false if not.
MediaQueryListEvent.media - Web APIs
syntax var media = mediaquerylistevent.media; value a domstring representing a serialized media query.
MediaQueryListListener - Web APIs
syntax function( mediaquerylist ) { ...
MediaRecorder() - Web APIs
syntax var mediarecorder = new mediarecorder(stream[, options]); parameters stream the mediastream that will be recorded.
MediaRecorder.audioBitsPerSecond - Web APIs
syntax var audiobitspersecond = mediarecorder.audiobitspersecond value a number (unsigned long).
MediaRecorder.ignoreMutedMedia - Web APIs
syntax var boolean = mediarecorder.ignoremutedmedia mediarecorder.ignoremutedmedia = boolean value a boolean.
MediaRecorder.isTypeSupported - Web APIs
syntax var canrecord = mediarecorder.istypesupported(mimetype) parameters mimetype the mime media type to check.
MediaRecorder.mimeType - Web APIs
syntax var mimetype = mediarecorder.mimetype value the mime media type which describes the format of the recorded media, as a domstring.
MediaRecorder.ondataavailable - Web APIs
syntax mediarecorder.ondataavailable = function(event) { ...
MediaRecorder.onerror - Web APIs
syntax mediarecorder.onerror = errorhandlerfunction; value a function to be called whenever an error occurs during the recorder's lifetime.
MediaRecorder.onpause - Web APIs
syntax mediarecorder.onpause = function(event) { ...
MediaRecorder.onresume - Web APIs
syntax mediarecorder.onresume = function(event) { ...
MediaRecorder.onstart - Web APIs
syntax mediarecorder.onstart = function(event) { ...
MediaRecorder.onstop - Web APIs
syntax mediarecorder.onstop = function(event) { ...
MediaRecorder.onwarning - Web APIs
syntax mediarecorder.onwarning = function(event) { ...
MediaRecorder.pause() - Web APIs
syntax mediarecorder.pause() return value undefined.
MediaRecorder.requestData() - Web APIs
syntax mediarecorder.requestdata() errors an invalidstate error is raised if the requestdata() method is called while the mediarecorder object’s mediarecorder.state is not "recording" — the media cannot be captured if recording is not occurring.
MediaRecorder.resume() - Web APIs
syntax mediarecorder.resume() errors an invalidstate error is raised if the resume() method is called while the mediarecorder object’s mediarecorder.state is "inactive" — the recording cannot be resumed if it is not already paused; if mediarecorder.state is already "recording", resume() has no effect.
MediaRecorder.start() - Web APIs
syntax mediarecorder.start(timeslice) parameters timeslice optional the number of milliseconds to record into each blob.
MediaRecorder.state - Web APIs
syntax var state = mediarecorder.state values a animationplaystate object containing one of the following values: enumeration description inactive recording is not occuring — it has either not been started yet, or it has been started and then stopped.
MediaRecorder.stop() - Web APIs
syntax mediarecorder.stop() errors an invalidstate error is raised if the stop() method is called while the mediarecorder object’s mediarecorder.state is "inactive" — it makes no sense to stop media capture if it is already stopped.
MediaRecorder.stream - Web APIs
syntax var stream = mediarecorder.stream values the mediastream passed into the mediarecorder() constructor when the mediarecorder was originally created.
MediaRecorder.videoBitsPerSecond - Web APIs
syntax var videobitspersecond = mediarecorder.videobitspersecond value a number (unsigned long).
MediaRecorderErrorEvent() - Web APIs
syntax var errorevent = new mediarecordererrorevent(errorinfo) parameters errorinfo an object describing the error object to be created.
MediaRecorderErrorEvent.error - Web APIs
syntax error = mediarecordererrorevent.error; value a domexception describing the error represented by the event.
MediaSession.metadata - Web APIs
syntax var mediametadata = navigator.mediasession.metadata; navigator.mediasession.metadata = mediametadata; value an instance of mediametadata containing information about the media currently being played.
MediaSession.playbackState - Web APIs
syntax let playbackstate = mediasession.playbackstate; mediasession.playbackstate = playbackstate; value a domstring indicating the current playback state of the media session.
MediaSession.setActionHandler() - Web APIs
syntax navigator.mediasession.setactionhandler(type, callback) parameters type a domstring representing an action type to listen for.
MediaSession.setPositionState() - Web APIs
syntax navigator.mediasession.setpositionstate(statedict); parameters statedict optional an object conforming to the mediapositionstate dictionary, providing updated information about the playback position and speed of the document's ongoing media.
Media Session action types - Web APIs
syntax a media session action's type is specified using a string from the mediasessionaction enumerated type.
MediaSessionActionDetails.action - Web APIs
syntax let mediasessionactiondetails = { action: actiontype }; let actiontype = mediasessionactiondetails.action; value a domstring specifying which of the action types the callback is being invoked for: nexttrack advances playback to the next track.
MediaSessionActionDetails.fastSeek - Web APIs
syntax let mediasessionactiondetails = { fastseek: shouldfastseek }; let shouldfastseek = mediasessionactiondetails.fastseek; value a boolean which is true if the action is part of an ongoing series of seek actions which should be treated as part of an overall seek operation.
MediaSessionActionDetails.seekOffset - Web APIs
syntax let mediasessionactiondetails = { seekoffset: deltatimeinseconds }; let deltatime = mediasessionactiondetails.seekoffset; value a floating-point value indicating the time delta in seconds by which to move the playback position relative to its current timestamp.
MediaSessionActionDetails.seekTime - Web APIs
syntax let mediasessionactiondetails = { seektime: abstimeinseconds }; let abstime = mediasessionactiondetails.seektime; value a floating-point value indicating the absolute time in seconds into the media to which to move the current play position.
MediaSettingsRange.max - Web APIs
syntax var max = mediasettingsrange.max value a double integer.
MediaSettingsRange.min - Web APIs
syntax var min = mediasettingsrange.min value a double integer.
MediaSettingsRange.step - Web APIs
syntax var step = mediasettingsrange.step value a double integer.
MediaSource.MediaSource() - Web APIs
syntax var mediasource = new mediasource(); parameters none.
MediaSource.activeSourceBuffers - Web APIs
syntax var myactivesourcebuffers = mediasource.activesourcebuffers; value a sourcebufferlist containing the sourcebuffer objects for each of the active tracks.
MediaSource.addSourceBuffer() - Web APIs
syntax var sourcebuffer = mediasource.addsourcebuffer(mimetype); parameters mimetype a domstring specifying the mime type of the sourcebuffer to create and add to the mediasource.
MediaSource.clearLiveSeekableRange() - Web APIs
syntax mediasource.clearliveseekablerange() parameters none.
MediaSource.duration - Web APIs
syntax mediasource.duration = 5.5; // 5.5 seconds var myduration = mediasource.duration; value a double.
MediaSource.endOfStream() - Web APIs
syntax mediasource.endofstream(endofstreamerror); parameters endofstreamerror optional a domstring representing an error to throw when the end of the stream is reached.
MediaSource.isTypeSupported() - Web APIs
syntax var isitsupported = mediasource.istypesupported(mimetype); parameters mimetype the mime media type that you want to test support for in the current browser.
MediaSource.readyState - Web APIs
syntax var myreadystate = mediasource.readystate; value a domstring.
MediaSource.removeSourceBuffer() - Web APIs
syntax mediasource.removesourcebuffer(sourcebuffer); parameters sourcebuffer the sourcebuffer object to be removed.
MediaSource.setLiveSeekableRange() - Web APIs
syntax mediasource.setliveseekablerange(start, end) parameters start the start of the seekable range to set in seconds measured from the beginning of the source.
MediaSource.sourceBuffers - Web APIs
syntax var mysourcebuffers = mediasource.sourcebuffers; value a sourcebufferlist.
MediaStream() - Web APIs
syntax newstream = new mediastream(); newstream = new mediastream(stream); newstream = new mediastream(tracks[]); parameters stream a different mediastream object whose tracks are added to the newly-created stream automatically.
active - Web APIs
syntax var isactive = mediastream.active; value a boolean value which is true if the stream is currently active; otherwise, the value is false.
MediaStream.addTrack() - Web APIs
syntax stream.addtrack(track); parameters track a mediastreamtrack to add to the stream.
MediaStream.clone() - Web APIs
WebAPIMediaStreamclone
syntax var stream = mediastream.clone(); parameters none.
MediaStream.ended - Web APIs
WebAPIMediaStreamended
syntax var hasended = mediastream.ended; value a boolean value that returns true if the end of the stream has been reached.
MediaStream.getAudioTracks() - Web APIs
syntax var mediastreamtracks = mediastream.getaudiotracks() parameters none.
MediaStream.getTrackById() - Web APIs
syntax var track = mediastream.gettrackbyid(id); parameters id a domstring which identifies the track to be returned.
MediaStream.getTracks() - Web APIs
syntax var mediastreamtracks = mediastream.gettracks() parameters none.
MediaStream.getVideoTracks() - Web APIs
syntax var mediastreamtracks[] = mediastream.getvideotracks(); parameters none.
MediaStream.id - Web APIs
WebAPIMediaStreamid
syntax var id = mediastream.id; example var p = navigator.mediadevices.getusermedia({ audio: true, video: true }); p.then(function(stream) { console.log(stream.id); }) specifications specification status comment media capture and streamsthe definition of 'mediastream.id' in that specification.
MediaStream.onaddtrack - Web APIs
syntax mediastream.onaddtrack = eventhandler; value this should be set to a function which you provide that accepts as input a mediastreamtrackevent object representing the addtrack event which has occurred.
MediaStream.onremovetrack - Web APIs
syntax mediastream.onremovetrack = eventhandler; value this should be set to a function which you provide that accepts as input a mediastreamtrackevent object representing the removetrack event which has occurred.
MediaStreamAudioDestinationNode.MediaStreamAudioDestinationNode() - Web APIs
syntax var myaudiodest = new mediastreamaudiodestinationnode(context, options); parameters inherits parameters from the audionodeoptions dictionary.
MediaStreamAudioDestinationNode.stream - Web APIs
syntax var audioctx = new audiocontext(); var destination = audioctx.createmediastreamdestination(); var mystream = destination.stream; value a mediastream.
MediaStreamAudioSourceNode() - Web APIs
syntax audiosourcenode = new mediastreamaudiosourcenode(context, options); parameters context an audiocontext representing the audio context you want the node to be associated with.
MediaStreamAudioSourceNode.mediaStream - Web APIs
syntax audiosourcestream = mediastreamaudiosourcenode.mediastream; value a mediastream representing the stream which contains the mediastreamtrack serving as the source of audio for the node.
MediaStreamAudioSourceOptions.mediaStream - Web APIs
syntax mediastreamaudiosourceoptions = { mediastream: audiosourcestream; } mediastreamaudiosourceoptions.mediastream = audiosourcestream; value a mediastream representing the stream from which to use a mediastreamtrack as the source of audio for the node.
MediaStreamConstraints.audio - Web APIs
syntax var audioconstraints = true | false | mediatrackconstraints; value the value of the audio property can be specified as either of two types: boolean if a boolean value is specified, it simply indicates whether or not an audio track should be included in the returned stream; if it's true, an audio track is included; if no audio source is available or if permission is not given to use the audio source, the call to getusermedia() will fail.
MediaStreamConstraints.video - Web APIs
syntax var videoconstraints = true | false | mediatrackconstraints; value the value of the video property can be specified as either of two types: boolean if a boolean value is specified, it simply indicates whether or not a video track should be included in the returned stream; if it's true, a video track is included; if no video source is available or if permission is not given to use the video source, the call to getusermedia() will fail.
MediaStreamEvent() - Web APIs
syntax var event = new mediastreamevent(type, mediastreameventinit); values type is a domstring containing the name of the event, like addstream or removestream.
MediaStreamEvent.stream - Web APIs
syntax var stream = event.stream; example pc.onaddstream = function( ev ) { alert("a stream (id: '" + ev.stream.id + "') has been added to this connection."); }; ...
MediaStreamTrack.applyConstraints() - Web APIs
syntax const appliedpromise = track.applyconstraints([constraints]) parameters constraints optional a mediatrackconstraints object listing the constraints to apply to the track's constrainable properties; any existing constraints are replaced with the new values specified, and any constrainable properties not included are restored to their default constraints.
MediaStreamTrack.clone() - Web APIs
syntax const newtrack = track.clone() return value a new mediastreamtrack instance which is identical to the one clone() was called, except for its new unique id.
MediaStreamTrack.enabled - Web APIs
syntax const enabledflag = track.enabled track.enabled = [true | false] value when true, enabled indicates that the track is permitted to render its actual media to the output.
MediaStreamTrack.getCapabilities() - Web APIs
syntax const capabilities = track.getcapabilities() return value a mediatrackcapabilities object which specifies the value or range of values which are supported for each of the user agent's supported constrainable properties.
MediaStreamTrack.getConstraints() - Web APIs
syntax const constraints = track.getconstraints() return value a mediatrackconstraints object which indicates the constrainable properties the web site or app most recently set using applyconstraints().
MediaStreamTrack.getSettings() - Web APIs
syntax const settings = track.getsettings() returns a mediatracksettings object describing the current configuration of the track's constrainable properties.
MediaStreamTrack.id - Web APIs
syntax const id = track.id specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.id' in that specification.
MediaStreamTrack.kind - Web APIs
syntax const type = track.kind value the possible values are a domstring with on of the following values: "audio": the track is an audio track.
MediaStreamTrack.label - Web APIs
syntax const label = track.label specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.label' in that specification.
MediaStreamTrack.muted - Web APIs
syntax const mutedflag = track.muted value a boolean which is true if the track is currently muted, or false if the track is currently unmuted.
MediaStreamTrack.onended - Web APIs
syntax mediastreamtrack.onended = function; value a function to serve as an eventhandler for the ended event.
MediaStreamTrack.onmute - Web APIs
syntax track.onmute = mutehandler; value a function to serve as an eventhandler for the mute event.
MediaStreamTrack.onoverconstrained - Web APIs
syntax track.onoverconstrained = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
MediaStreamTrack.onunmute - Web APIs
syntax track.onunmute = unmutehandler; value unmutehandler is a function which is called when the mediastreamtrack receives the unmute event.
MediaStreamTrack.readyState - Web APIs
syntax const state = track.readystate value it takes one of the following values: "live" which indicates that an input is connected and does its best-effort in providing real-time data.
MediaStreamTrack.remote - Web APIs
syntax var bool ​= track.remote; ...
MediaStreamTrack.stop() - Web APIs
syntax track.stop() description calling stop() tells the user agent that the track's source—whatever that source may be, including files, network streams, or a local camera or microphone—is no longer needed by the mediastreamtrack.
MediaStreamTrackAudioSourceNode() - Web APIs
syntax audiotracknode = new mediastreamtrackaudiosourcenode(context, options); parameters context an audiocontext representing the audio context you want the node to be associated with.
MediaStreamTrackAudioSourceOptions.mediaStreamTrack - Web APIs
syntax mediastreamtrackaudiosourceoptions = { mediastreamtrack: audiosourcetrack; } mediastreamtrackaudiosourceoptions.mediastreamtrack = audiosourcetrack; value a mediastreamtrack from which the audio output of the new mediastreamtrackaudiosourcenode will be taken.
MediaStreamTrackEvent() - Web APIs
syntax var trackevent = new mediastreamtrackevent(type, {track: amediastreamtrack}); parameters the mediastreamtrackevent() constructor also inherits arguments from event().
Recording a media element - Web APIs
that lets us use promise syntax when using timeouts, which can be very handy when chaining promises, as we'll see later.
MediaTrackConstraints.aspectRatio - Web APIs
syntax var constraintsobject = { aspectratio: constraint }; constraintsobject.aspectratio = constraint; value a constraindouble describing the acceptable or required value(s) for a video track's aspect ratio.
MediaTrackConstraints.autoGainControl - Web APIs
syntax var constraintsobject = { autogaincontrol: constraint }; constraintsobject.autogaincontrol = constraint; value if this value is a simple true or false, the user agent will attempt to obtain media with automatic gain control enabled or disabled as specified, if possible, but will not fail if this can't be done.
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.cursor - Web APIs
syntax var constraintsobject = { cursor: constraint }; constraintsobject.cursor = constraint; value a constraindomstring which specifies whether or not the mouse cursor should be rendered into the video track in the mediastream returned by the call to getdisplaymedia().
MediaTrackConstraints.deviceId - Web APIs
syntax var constraintsobject = { deviceid: constraint }; constraintsobject.deviceid = constraint; value an object based on constraindomstring specifying one or more acceptable, ideal, and/or exact (mandatory) device ids which are acceptable as the source of media content.
MediaTrackConstraints.displaySurface - Web APIs
syntax var constraintsobject = { displaysurface: constraint }; constraintsobject.displaysurface = constraint; value a constraindomstring which specifies the type of display surface that's being captured.
MediaTrackConstraints.echoCancellation - Web APIs
syntax var constraintsobject = { echocancellation: constraint }; constraintsobject.echocancellation = constraint; value if this value is a simple true or false, the user agent will attempt to obtain media with echo cancellation enabled or disabled as specified, if possible, but will not fail if this can't be done.
MediaTrackConstraints.facingMode - Web APIs
syntax var constraintsobject = { facingmode: constraint }; constraintsobject.facingmode = constraint; value an object based on constraindomstring specifying one or more acceptable, ideal, and/or exact (mandatory) facing modes are acceptable for a video track.
MediaTrackConstraints.frameRate - Web APIs
syntax var constraintsobject = { framerate: constraint }; constraintsobject.framerate = constraint; value a constraindouble describing the acceptable or required value(s) for a video track's frame rate, in frames per second.
MediaTrackConstraints.groupId - Web APIs
syntax var constraintsobject = { groupid: constraint }; constraintsobject.groupid = constraint; value an object based on constraindomstring specifying one or more acceptable, ideal, and/or exact (mandatory) group ids which are acceptable as the source of media content.
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
syntax var constraintsobject = { latency: constraint }; constraintsobject.latency = constraint; value a constraindouble describing the acceptable or required value(s) for an audio track's latency, with values specified in seconds.
MediaTrackConstraints.logicalSurface - Web APIs
syntax var constraintsobject = { logicalsurface: constraint }; constraintsobject.logicalsurface = constraint; value a constrainboolean which is true if logical surfaces should be permitted among the selections available to the user.
MediaTrackConstraints.noiseSuppression - Web APIs
syntax var constraintsobject = { noisesuppression: constraint }; constraintsobject.noisesuppression = constraint; value if this value is a simple true or false, the user agent will attempt to obtain media with noise suppression enabled or disabled as specified, if possible, but will not fail if this can't be done.
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
syntax var constraintsobject = { volume: constraint }; constraintsobject.volume = constraint; value a constraindouble describing the acceptable or required value(s) for an audio track's volume, on a linear scale where 0.0 means silence and 1.0 is the highest supported volume.
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.aspectRatio - Web APIs
syntax var aspectratio = mediatracksettings.aspectratio; value a double-precision floating-point number indicating the current configuration of the track's aspect ratio.
MediaTrackSettings.autoGainControl - Web APIs
syntax var autogaincontrol = mediatracksettings.autogaincontrol; value a boolean value which is true if the track has automatic gain control enabled or false if agc is disabled.
MediaTrackSettings.channelCount - Web APIs
syntax var channelcount = mediatracksettings.channelcount; value an integer value indicating the number of audio channels on the track.
MediaTrackSettings.cursor - Web APIs
syntax cursorsetting = mediatracksettings.cursor; value the value of cursor comes from the cursorcaptureconstraint enumerated string type, and may have one of the following values: always the mouse should always be visible in the video content of the {domxref("mediastream"), unless the mouse has moved outside the area of the content.
MediaTrackSettings.deviceId - Web APIs
syntax var deviceid = mediatracksettings.deviceid; value a domstring whose value is an origin-unique identifier for the track's source.
MediaTrackSettings.displaySurface - Web APIs
syntax displaysurface = mediatracksettings.displaysurface; value the value of displaysurface is a string that comes from the displaycapturesurfacetype enumerated type, and is one of the following: application the stream's video track contains all of the windows belonging to the application chosen by the user.
MediaTrackSettings.echoCancellation - Web APIs
syntax var echocancellation = mediatracksettings.echocancellation; value a boolean value which is true if the track has echo cancellation functionality enabled or false if echo cancellation is disabled.
MediaTrackSettings.facingMode - Web APIs
syntax var facingmode = mediatracksettings.facingmode; value a domstring whose value is one of the strings in videofacingmodeenum.
MediaTrackSettings.frameRate - Web APIs
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.groupId - Web APIs
syntax var groupid = mediatracksettings.groupid; value a domstring whose value is a browsing-session unique identifier for a group of devices which includes the source of the track's contents.
MediaTrackSettings.height - Web APIs
syntax var height = mediatracksettings.height; value an integer value indicating the height, in pixels, of the video track as currently configured.
MediaTrackSettings.latency - Web APIs
syntax var latency = mediatracksettings.latency; value a double-precision floating-point number indicating the estimated latency, in seconds, of the audio track as currently configured.
MediaTrackSettings.logicalSurface - Web APIs
syntax islogicalsurface = mediatracksettings.logicalsurface; value a boolean value which is true if the video track in the stream of captured video is taken from a logical display surface.
MediaTrackSettings.noiseSuppression - Web APIs
syntax var noisesuppression = mediatracksettings.noisesuppression; value a boolean value which is true if the input track has noise suppression enabled or false if agc is disabled.
MediaTrackSettings.sampleRate - Web APIs
syntax var samplerate = mediatracksettings.samplerate; value an integer value indicating how many samples each second of audio data includes.
MediaTrackSettings.sampleSize - Web APIs
syntax var samplesize = mediatracksettings.samplesize; value an integer value indicating how many bits each audio sample is represented by.
MediaTrackSettings.volume - Web APIs
syntax var volume = mediatracksettings.volume; value a double-precision floating-point number indicating the volume, from 0.0 to 1.0, of the audio track as currently configured.
MediaTrackSettings.width - Web APIs
syntax var width = mediatracksettings.width; value an integer value indicating the width, in pixels, of the video track as currently configured.
MediaTrackSupportedConstraints.aspectRatio - Web APIs
syntax aspectconstraintsupported = supportedconstraintsdictionary.aspectratio; value this property is present in the dictionary (and its value is always true) if the user agent supports the aspectratio constraint.
MediaTrackSupportedConstraints.autoGainControl - Web APIs
syntax autogainsupported = supportedconstraintsdictionary.autogaincontrol; value this property is present in the dictionary (and its value is always true) if the user agent supports the autogaincontrol constraint.
MediaTrackSupportedConstraints.channelCount - Web APIs
syntax channelcountconstraintsupported = supportedconstraintsdictionary.channelcount; value this property is present in the dictionary (and its value is always true) if the user agent supports the channelcount constraint.
MediaTrackSupportedConstraints.cursor - Web APIs
syntax iscursorsupported = supportedconstraints.cursor; value a boolean value which is true if the cursor constraint is supported by the device and user agent.
MediaTrackSupportedConstraints.deviceId - Web APIs
syntax deviceidconstraintsupported = supportedconstraintsdictionary.deviceid; value this property is present in the dictionary (and its value is always true) if the user agent supports the deviceid constraint.
MediaTrackSupportedConstraints.displaySurface - Web APIs
syntax isdisplaysurfacesupported = supportedconstraints.displaysurface; value a boolean value which is true if the displaysurface constraint is supported by the device and user agent.
MediaTrackSupportedConstraints.echoCancellation - Web APIs
syntax echocancellationconstraintsupported = supportedconstraintsdictionary.echocancellation; value this property is present in the dictionary (and its value is always true) if the user agent supports the echocancellation constraint.
MediaTrackSupportedConstraints.facingMode - Web APIs
syntax facingmodeconstraintsupported = supportedconstraintsdictionary.facingmode; value this property is present in the dictionary (and its value is always true) if the user agent supports the facingmode constraint.
MediaTrackSupportedConstraints.frameRate - Web APIs
syntax framerateconstraintsupported = supportedconstraintsdictionary.framerate; value this property is present in the dictionary if the user agent supports the framerate constraint.
MediaTrackSupportedConstraints.groupId - Web APIs
syntax groupidconstraintsupported = supportedconstraintsdictionary.groupid; value this property is present in the dictionary (and its value is always true) if the user agent supports the groupid constraint.
MediaTrackSupportedConstraints.height - Web APIs
syntax heightconstraintsupported = supportedconstraintsdictionary.height; value this property is present in the dictionary (and its value is always true) if the user agent supports the height constraint.
MediaTrackSupportedConstraints.latency - Web APIs
syntax latencyconstraintsupported = supportedconstraintsdictionary.latency; value this property is present in the dictionary (and its value is always true) if the user agent supports the latency constraint.
MediaTrackSupportedConstraints.logicalSurface - Web APIs
syntax islogicalsurfacesupported = supportedconstraints.logicalsurface; value a boolean value which is true if the logicalsurface constraint is supported by the device and user agent.
MediaTrackSupportedConstraints.noiseSuppression - Web APIs
syntax noisesuppressionsupported = supportedconstraintsdictionary.noisesuppression; value this property is present in the dictionary (and its value is always true) if the user agent supports the noisesuppression constraint (and therefore supports noise suppression on audio tracks).
MediaTrackSupportedConstraints.sampleRate - Web APIs
syntax samplerateconstraintsupported = supportedconstraintsdictionary.samplerate; value this property is present in the dictionary (and its value is always true) if the user agent supports the samplerate constraint.
MediaTrackSupportedConstraints.sampleSize - Web APIs
syntax samplesizeconstraintsupported = supportedconstraintsdictionary.samplesize; value this property is present in the dictionary (and its value is always true) if the user agent supports the samplesize constraint.
MediaTrackSupportedConstraints.volume - Web APIs
syntax volumeconstraintsupported = supportedconstraintsdictionary.volume; value this property is present in the dictionary (and its value is always true) if the user agent supports the volume constraint.
MediaTrackSupportedConstraints.width - Web APIs
syntax widthconstraintsupported = supportedconstraintsdictionary.width; value this property is present in the dictionary (and its value is always true) if the user agent supports the width constraint.
MerchantValidationEvent() - Web APIs
syntax merchantvalidationevent = new merchantvalidationevent(type, options); parameters type a domstring which must be merchantvalidation, the only type of event which uses the merchantvalidationevent interface.
MerchantValidationEvent.complete() - Web APIs
syntax merchantvalidationevent.complete(validationdata); merchantvalidationevent.complete(merchantsessionpromise); parameters validationdata or merchantsessionpromise an object containing the data needed to complete the merchant validation process, or a promise which resolves to the validation data.
MerchantValidationEvent.methodName - Web APIs
syntax methodid = merchantvalidationevent.methodname; value a read-only domstring which uniquely identifies the payment handler which is requesting merchant validation.
MerchantValidationEvent.validationURL - Web APIs
syntax validationurl = merchantvalidationevent.validationurl; value a read-only usvstring giving the url from which to load payment handler specific data needed to complete the merchant verification process.
MessageChannel() - Web APIs
syntax var channel = new messagechannel(); returns a newly created messagechannel object.
MessageChannel.port1 - Web APIs
syntax channel.port1; value a messageport object, the first port of the channel, that is the port attached to the context that originated the channel.
MessageChannel.port2 - Web APIs
syntax channel.port2; value a messageport object representing the second port of the channel, the port attached to the context at the other end of the channel.
MessageEvent.MessageEvent() - Web APIs
syntax var messageevent = new messageevent(type, init); parameters type the type of messageevent that will be created.
MessageEvent.data - Web APIs
WebAPIMessageEventdata
syntax var data = messageevent.data; value the data sent by the message emitter; this can be any data type.
MessageEvent.lastEventId - Web APIs
syntax var myid = messageevent.lasteventid; value a domstring representing the id.
MessageEvent.origin - Web APIs
syntax var origin = messageevent.origin; value a usvstring representing the origin.
MessageEvent.ports - Web APIs
syntax var myports = messageevent.ports; value an array of messageport objects.
MessageEvent.source - Web APIs
syntax let mysource = messageevent.source; value a messageeventsource (which can be a windowproxy, messageport, or serviceworker object) representing the message emitter.
MessagePort.close() - Web APIs
WebAPIMessagePortclose
syntax port.close() returns void.
MessagePort.onmessage - Web APIs
syntax channel.onmessage = function() { ...
MessagePort.onmessageerror - Web APIs
syntax port.onmessageerror = function() { ...
MessagePort.postMessage() - Web APIs
syntax port.postmessage(message, transferlist); returns void.
MessagePort.start() - Web APIs
WebAPIMessagePortstart
syntax port.start() returns void.
Metadata.modificationTime - Web APIs
syntax var modificationtime = metadata.modificationtime; value a date timestamp indicating when the file system entry was last changed.
Metadata.size - Web APIs
WebAPIMetadatasize
syntax var size = metadata.size; value a number indicating the size of the file in bytes.
MouseEvent() - Web APIs
syntax event = new mouseevent(typearg, mouseeventinit); values typearg is a domstring representing the name of the event.
MouseEvent.altKey - Web APIs
WebAPIMouseEventaltKey
syntax var altkeypressed = instanceofmouseevent.altkey return value a boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed.
MouseEvent.button - Web APIs
WebAPIMouseEventbutton
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, ty...
MouseEvent.buttons - Web APIs
syntax var buttonspressed = instanceofmouseevent.buttons return value a number representing one or more buttons.
MouseEvent.clientX - Web APIs
syntax var x = instanceofmouseevent.clientx return value a double floating point value, as redefined by the cssom view module.
MouseEvent.clientY - Web APIs
syntax var y = instanceofmouseevent.clienty return value a double floating point value, as redefined by the cssom view module.
MouseEvent.ctrlKey - Web APIs
syntax var ctrlkeypressed = instanceofmouseevent.ctrlkey return value a boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed.
MouseEvent.getModifierState() - Web APIs
syntax var active =​ event.getmodifierstate(keyarg); returns a boolean parameters keyarg a modifier key value.
MouseEvent.initMouseEvent() - Web APIs
syntax event.initmouseevent(type, canbubble, cancelable, view, detail, screenx, screeny, clientx, clienty, ctrlkey, altkey, shiftkey, metakey, button, relatedtarget); parameters type the string to set the event's type to.
MouseEvent.metaKey - Web APIs
syntax var metakeypressed = instanceofmouseevent.metakey return value a boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed.
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.mozInputSource - Web APIs
syntax var source = instanceofmouseevent.mozinputsource; return value the following values are possible.
MouseEvent.offsetX - Web APIs
syntax var xoffset = instanceofmouseevent.offsetx; return value a double floating point value.
MouseEvent.offsetY - Web APIs
syntax var yoffset = instanceofmouseevent.offsety; return value a double floating point value.
MouseEvent.pageX - Web APIs
WebAPIMouseEventpageX
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.
MouseEvent.pageY - Web APIs
WebAPIMouseEventpageY
syntax var pos = event.pagey; originally, this property was defined as a long integer.
MouseEvent.region - Web APIs
WebAPIMouseEventregion
syntax var hitregion = instanceofmouseevent.region return value a domstring representing the id of the hit region.
MouseEvent.relatedTarget - Web APIs
syntax var target = instanceofmouseevent.relatedtarget return value an eventtarget object or null.
MouseEvent.screenX - Web APIs
syntax var x = instanceofmouseevent.screenx return value a double floating point value.
MouseEvent.screenY - Web APIs
syntax var y = instanceofmouseevent.screeny return value a double floating point value.
MouseEvent.shiftKey - Web APIs
syntax var shiftkeypressed = instanceofmouseevent.shiftkey return value a boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed.
MouseEvent.which - Web APIs
WebAPIMouseEventwhich
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.
msFirstPaint - Web APIs
syntax p = object.msfirstpaint; value an integer value that represents the time when the document began to be displayed or 0 if the document could not be loaded.
msGraphicsTrustStatus - Web APIs
syntax status = object.msgraphicstruststatus; example //specifies the output device id that the audio will be sent to.
msIsBoxed - Web APIs
WebAPIMsIsBoxed
syntax isboxed = object.msisboxed value boolean value set to true activates boxed mode for the video player.
msPlayToDisabled - Web APIs
syntax ptr = object.msplaytodisabled; value boolean value set to true indicates that the playto device is disabled.
msPlayToPreferredSourceUri - Web APIs
syntax ptr = object.msplaytopreferredsourceuri; value msplaytopreferredsourceuri enables a playto reference (a uri or url) for streaming content on the playto target device from a different location, such as a cloud media server.
msPlayToPrimary - Web APIs
syntax ptr = object.msplaytoprimary; value boolean value set to true indicates that the device is the primary dlna playto device, otherwise false.
msPlayToSource - Web APIs
syntax ptr = object.msplaytosource; value playto is a means through which an app can connect local playback/display for audio, video, and img elements to a remote device.
msRealTime - Web APIs
syntax ptr = object.msrealtime; value boolean value set to true indicates that low-latency playback will be enabled on the media element.
msSetMediaProtectionManager - Web APIs
syntax htmlmediaelement.mssetmediaprotectionmanager(mediaprotectionmanager); parameters the windows.media.protection namespace provides classes to manage digital rights management (drm) media contents.
MutationObserver.MutationObserver() - Web APIs
syntax const observer = new mutationobserver(callback) parameters callback a function which will be called on each dom change that qualifies given the observed node or subtree and options.
MutationObserver.disconnect() - Web APIs
syntax mutationobserver.disconnect() parameters none.
MutationObserver.observe() - Web APIs
syntax mutationobserver.observe(target, options) parameters target a dom node (which may be an element) within the dom tree to watch for changes, or to be the root of a subtree of nodes to be watched.
MutationObserver.takeRecords() - Web APIs
syntax const mutationrecords = mutationobserver.takerecords() parameters none.
MutationObserverInit.attributeFilter - Web APIs
syntax var options = { attributefilter: [ "list", "of", "attribute", "names" ] } value an array of domstring objects, each specifying the name of one attribute whose value is to be monitored for changes.
MutationObserverInit.attributeOldValue - Web APIs
syntax var options = { attributeoldvalue: true | false } value a boolean value indicating whether or not the prior value of a changed attribute should be included in the mutationobserver.oldvalue property when reporting attribute value changes.
MutationObserverInit.attributes - Web APIs
syntax var options = { attributes: true | false } value a boolean value indicating whether or not to report through the callback any changes to the values of attributes on the node or nodes being monitored.
MutationObserverInit.characterData - Web APIs
syntax var options = { characterdata: true | false } value a boolean value indicating whether or not to call the observer's callback function when textual nodes' values change.
MutationObserverInit.characterDataOldValue - Web APIs
syntax var options = { characterdataoldvalue: true | false } value a boolean value indicating whether or not to set the mutationrecord's oldvalue property to be a string containing the value of the character node's contents prior to the change represented by the mutation record.
MutationObserverInit.childList - Web APIs
syntax var options = { childlist: true | false } value a boolean value indicating whether or not to invoke the callback function when new nodes are added to or removed from the section of the dom being monitored..
MutationObserverInit.subtree - Web APIs
syntax var options = { subtree: true | false } value a boolean value.
NDEFMessage.records - Web APIs
syntax var recordlist = ndefmessage.records; value a list of ndefrecord object that represent data recorded in the message.
NDEFReader() - Web APIs
syntax writer = new ndefreader(); parameters none.
NDEFReader.scan() - Web APIs
WebAPINDEFReaderscan
syntax var readerpromise = ndefreader.scan(options); parameters options optional id -- the match pattern for matching each ndefrecord.id.
NDEFRecord() - Web APIs
syntax writer = new ndefrecord(ndefrecordinit); parameters ndefrecordinit read only ndefrecordinit with initialization data.
NDEFRecord.data - Web APIs
WebAPINDEFRecorddata
syntax ndefrecord.data value a dataview that contains encoded payload data of the record.
NDEFRecord.encoding - Web APIs
syntax ndefrecord.encoding value a usvstring which can be one of the following: "utf-8", "utf-16", "utf-16le" or "utf-16be".
NDEFRecord.id - Web APIs
WebAPINDEFRecordid
syntax ndefrecord.id value a usvstring.
NDEFRecord.lang - Web APIs
WebAPINDEFRecordlang
syntax ndefrecord.lang value a usvstring.
NDEFRecord.mediaType - Web APIs
syntax ndefrecord.mediatype value a usvstring, corresponding to a mime type of the record payload.
NDEFRecord.recordType - Web APIs
syntax ndefrecord.recordtype value a usvstring which can be one of the following: "empty" represents a empty ndef record.
NDEFRecord.toRecords() - Web APIs
syntax ndefrecord.torecords() parameters none.
NDEFWriter() - Web APIs
syntax writer = new ndefwriter(); parameters none.
NDEFWriter.write() - Web APIs
WebAPINDEFWriterwrite
syntax var sessionpromise = ndefwriter.write(message, options); parameters message the message to be written, either domstring or buffersource or ndefmessageinit.
NamedNodeMap.getNamedItem() - Web APIs
syntax myattr = attrs.getnameditem(name) parameters name is the name of the desired attribute ...
Navigator.battery - Web APIs
WebAPINavigatorbattery
syntax var battery = navigator.battery; ...
Navigator.buildID - Web APIs
WebAPINavigatorbuildID
syntax buildid = navigator.buildid; value a string representing the build identifier of the application.
Navigator.canShare() - Web APIs
syntax var canshare = navigator.canshare(data); parameters data optional an object containing data to share that matches what you would pass to navigator.share().
Navigator.clipboard - Web APIs
syntax theclipboard = navigator.clipboard; value the clipboard object used to access the system clipboard.
Navigator.connection - Web APIs
syntax networkinformation = navigator.connection value a networkinformation object.
Navigator.cookieEnabled - Web APIs
syntax var cookieenabled = navigator.cookieenabled; cookieenabled is a boolean: true or false.
Navigator.credentials - Web APIs
syntax var credentialscontainer = navigator.credentials value the credentialscontainer interface.
Navigator.deviceMemory - Web APIs
syntax memoryamount = navigator.devicememory value a floating point number; one of 0.25, 0.5, 1, 2, 4, 8.
Navigator.geolocation - Web APIs
syntax geo = navigator.geolocation specifications specification status comment geolocation apithe definition of 'navigator.geolocation' in that specification.
Navigator.getBattery() - Web APIs
syntax var batterypromise = navigator.getbattery(); return value a promise which, when resolved, calls its fulfillment handler with a single parameter: a batterymanager object which you can use to get information about the battery's state.
Navigator.getGamepads() - Web APIs
syntax var gamepads = navigator.getgamepads(); example window.addeventlistener("gamepadconnected", function(e) { var gp = navigator.getgamepads()[e.gamepad.index]; console.log( "gamepad connected at index %d: %s.
Navigator.getUserMedia() - Web APIs
syntax navigator.getusermedia(constraints, successcallback, errorcallback); parameters constraints a mediastreamconstraints object specifying the types of media to request, along with any requirements for each type.
Navigator.keyboard - Web APIs
syntax var keyboard = navigator.keyboard value a keyboard object.
Navigator.locks - Web APIs
WebAPINavigatorlocks
syntax var lockmanager = navigator.locks value a lockmanager object.
Navigator.maxTouchPoints - Web APIs
syntax touchpoints = navigator.maxtouchpoints; example if (navigator.maxtouchpoints > 1) { // browser supports multi-touch } specifications specification status comment pointer events – level 2the definition of 'maxtouchpoints' in that specification.
Navigator.mediaCapabilities - Web APIs
syntax mediacapabilitiesobj = globalobj.navigator.mediacapabilities value a mediacapabilities object.
Navigator.mediaDevices - Web APIs
syntax var mediadevices = navigator.mediadevices; return value the mediadevices singleton object.
Navigator.mediaSession - Web APIs
syntax let mediasession = navigator.mediasession; value a mediasession object the current document can use to share information about media it's playing and its current playback status.
Navigator.mozIsLocallyAvailable() - Web APIs
syntax navigator.mozislocallyavailable(uri, ifoffline); parameters uri the uri of the resource whose availability is to be checked, as a string.
Navigator.msLaunchUri() - Web APIs
syntax navigator.mslaunchuri(uri, successcallback, nohandlercallback); parameters uri a domstring specifying the url containing including the protocol of the document or resource to be displayed.
msSaveBlob - Web APIs
syntax navigator.mssaveblob(blob, defaultname); parameters blob a blob to be saved.
msSaveOrOpenBlob - Web APIs
syntax navigator.mssaveoropenblob(blob, defaultname); parameters blob a blob to be saved.
Navigator.oscpu - Web APIs
WebAPINavigatoroscpu
syntax oscpuinfo = navigator.oscpu value a domstring providing a string which identifies the operating system on which the browser is running.
Navigator.permissions - Web APIs
syntax permissionsobj = globalobj.navigator.permissions value a permissions object.
Navigator.productSub - Web APIs
syntax prodsub = window.navigator.productsub prodsub is a string.
Navigator.registerContentHandler() - Web APIs
syntax navigator.registercontenthandler(mimetype, uri, title); mimetype is the desired mime type as a string.
Navigator.requestMediaKeySystemAccess() - Web APIs
syntax ​promise = navigator.requestmediakeysystemaccess(keysystem, supportedconfigurations); parameters keysystem a domstring identifying the key system.
Navigator.sendBeacon() - Web APIs
syntax navigator.sendbeacon(url, data); parameters url the url that will receive the data.
Navigator.serviceWorker - Web APIs
syntax var workercontainerinstance = navigator.serviceworker; value serviceworkercontainer examples this code checks if the browser supports service workers.
Navigator.share() - Web APIs
WebAPINavigatorshare
syntax var sharepromise = navigator.share(data); parameters data an object containing data to share.
Navigator.vendor - Web APIs
WebAPINavigatorvendor
syntax venstring = window.navigator.vendor value either "google inc.", "apple computer, inc.", or (in firefox) the empty string.
Navigator.vendorSub - Web APIs
syntax vensub = window.navigator.vendorsub value the empty string specifications specification status comment html living standardthe definition of 'navigatorid: vendorsub' in that specification.
Navigator.vibrate() - Web APIs
WebAPINavigatorvibrate
syntax var successbool = window.navigator.vibrate(pattern); pattern provides a pattern of vibration and pause intervals.
Navigator.wakeLock - Web APIs
syntax const wakelock = navigator.wakelock; specifications specification status comment screen wake lock api editor's draft initial definition ...
Navigator.xr - Web APIs
WebAPINavigatorxr
syntax const xr = navigator.xr value the xr object used to interface with the webxr device api in the current context.
navigator.hardwareConcurrency - Web APIs
syntax logicalprocessors = window.navigator.hardwareconcurrency value a number indicating the number of logical processor cores.
NavigatorID.appCodeName - Web APIs
syntax codename = navigator.appcodename value the string "mozilla".
NavigatorID.appName - Web APIs
syntax appname = navigator.appname value the string "netscape".
NavigatorID.appVersion - Web APIs
syntax window.navigator.appversion value either "4.0" or a string representing version information about the browser.
NavigatorID.platform - Web APIs
syntax platform = navigator.platform value a domstring identifying the platform on which the browser is running, or an empty string if the browser declines to (or is unable to) identify the platform.
NavigatorID.product - Web APIs
syntax productname = navigator.product value the string "gecko".
NavigatorID.taintEnabled() - Web APIs
syntax result = window.navigator.taintenabled() specifications specification status comment html living standardthe definition of 'navigatorid.taintenabled' in that specification.
NavigatorID.userAgent - Web APIs
syntax var ua = navigator.useragent; value a domstring specifying the complete user agent string the browser provides both in http headers and in response to this and other related methods on the navigator object.
NavigatorLanguage.language - Web APIs
syntax const lang = navigator.language value a domstring.
NavigatorLanguage.languages - Web APIs
syntax preferredlanguages = globalobj.navigator.languages examples navigator.language //"en-us" navigator.languages //["en-us", "zh-cn", "ja-jp"] specifications specification status comment html living standardthe definition of 'navigatorlanguage: languages' in that specification.
Navigator.onLine - Web APIs
syntax online = window.navigator.online; value online is a boolean true or false.
NavigatorPlugins.javaEnabled() - Web APIs
syntax result = window.navigator.javaenabled() example if (window.navigator.javaenabled()) { // browser has java } notes the return value for this method indicates whether the preference that controls java is on or off - not whether the browser offers java support in general.
NavigatorPlugins.mimeTypes - Web APIs
syntax var mimetypes[] = navigator.mimetypes; mimetypes is a mimetypearray object which has a length property as well as item(index) and nameditem(name) methods.
NavigatorPlugins.plugins - Web APIs
syntax var plugins = navigator.plugins; plugins is pluginarray object used to access plugin objects either by name or as a list of items.
NavigatorStorage.storage - Web APIs
syntax var storagemanager = navigator.storage; value a storagemanager object you can use to maintain persistence for stored data, as well as to determine roughly how much room there is for data to be stored.
NetworkInformation.downlink - Web APIs
syntax var downlink = networkinformation.downlink value a double.
NetworkInformation.downlinkMax - Web APIs
syntax var max = networkinformation.downlinkmax return value an unrestricted double representing the maximum downlink speed, in megabits per second (mb/s), for the underlying connection technology.
NetworkInformation.effectiveType - Web APIs
syntax var effectivetype = networkinformation.effectivetype value a string containing one of 'slow-2g', '2g', '3g', or '4g'.
NetworkInformation.onchange - Web APIs
syntax netinfo.onchange = function() { ...
NetworkInformation.rtt - Web APIs
syntax rtt = networkinformation.rtt return value a number.
NetworkInformation.saveData - Web APIs
syntax var savedata = networkinformation.savedata; value a boolean.
NetworkInformation.type - Web APIs
syntax var type = netinfo.type return value an enumerated value that is one of the following values: "bluetooth" "cellular" "ethernet" "none" "wifi" "wimax" "other" "unknown" specifications specification status comment network information apithe definition of 'type' in that specification.
Node.appendChild() - Web APIs
WebAPINodeappendChild
syntax element.appendchild(achild) parameters achild the node to append to the given parent node (commonly an element).
Node.baseURI - Web APIs
WebAPINodebaseURI
syntax var nodebaseuri = node.baseuri; value a domstring representing the base url of the specified node.
Node.baseURIObject - Web APIs
syntax uriobj = node.baseuriobject value an nsiuri.
Node.childNodes - Web APIs
WebAPINodechildNodes
syntax let nodelist = elementnodereference.childnodes; examples simple usage // parg is an object reference to a <p> element // first check that the element has child nodes if (parg.haschildnodes()) { let children = parg.childnodes; for (let i = 0; i < children.length; i++) { // do something with each child as children[i] // note: list is live!
Node.cloneNode() - Web APIs
WebAPINodecloneNode
syntax let newclone = node.clonenode([deep]) node the node to be cloned.
Node.compareDocumentPosition() - Web APIs
the return value is a bitmask of the following values: name value document_position_disconnected 1 document_position_preceding 2 document_position_following 4 document_position_contains 8 document_position_contained_by 16 document_position_implementation_specific 32 syntax comparemask = node.comparedocumentposition(othernode) parameters othernode the other node with which to compare the first node’s document position.
Node.contains() - Web APIs
WebAPINodecontains
syntax node.contains( othernode ) example this function checks to see if an element is in the page's body.
Node.firstChild - Web APIs
WebAPINodefirstChild
syntax var childnode = node.firstchild; example this example demonstrates the use of firstchild and how whitespace nodes might interfere with using this property.
Node.getRootNode() - Web APIs
WebAPINodegetRootNode
syntax var root = node.getrootnode(options); parameters options optional an object that sets options for getting the root node.
Node.getUserData() - Web APIs
WebAPINodegetUserData
syntax userdata = somenode.getuserdata(userkey); parameters userkey is the key to choose the specific data sought for the given node.
Node.hasChildNodes() - Web APIs
syntax bool = node.haschildnodes(); return value a boolean that is true if the node has child nodes, and false otherwise.
Node.insertBefore() - Web APIs
WebAPINodeinsertBefore
syntax let insertednode = parentnode.insertbefore(newnode, referencenode) insertednode the node being inserted (the same as newnode) parentnode the parent of the newly inserted node.
Node.isConnected - Web APIs
WebAPINodeisConnected
syntax var isitconnected = nodeobjectinstance.isconnected return value a boolean that is true if the node is connected to its relevant context object, and false if not.
Node.isDefaultNamespace() - Web APIs
syntax result = node.isdefaultnamespace(namespaceuri); parameters namespaceuri is a string representing the namespace against which the element will be checked.
Node.isEqualNode() - Web APIs
WebAPINodeisEqualNode
syntax var isequalnode = node.isequalnode(othernode); othernode: the node to compare equality with.
Node.isSameNode() - Web APIs
WebAPINodeisSameNode
syntax const issamenode = node.issamenode(othernode) parameters othernode the node to test against.
Node.isSupported() - Web APIs
WebAPINodeisSupported
syntax boolvalue = element.issupported(feature, version) parameters feature is a domstring containing the name of the feature to test.
Node.lastChild - Web APIs
WebAPINodelastChild
syntax var childnode = node.lastchild; example var tr = document.getelementbyid("row1"); var corner_td = tr.lastchild; specifications specification status comment domthe definition of 'node.lastchild' in that specification.
Node.localName - Web APIs
WebAPINodelocalName
syntax name = element.localname name is the local name as a string (see notes below for details) example (must be served with xml content type, such as text/xml or application/xhtml+xml.) <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <head> <script type="application/javascript"><![cdata[ function test() { var text = document.getelementbyid('text'); var circle = document.getelementbyid('circle'); text.value = "<svg:circle> has:\n" + "localname = '" + circle.localname + "'\n" + "namespaceuri = '" + circle.namespa...
Node.lookupNamespaceURI() - Web APIs
syntax var namespace = node.lookupnamespaceuri(prefix); parameters prefix the prefix to look for.
Node.namespaceURI - Web APIs
WebAPINodenamespaceURI
syntax namespace = node.namespaceuri example in this snippet, a node is being examined for its node.localname and its namespaceuri.
Node.nextSibling - Web APIs
WebAPINodenextSibling
syntax nextnode = node.nextsibling notes gecko-based browsers insert text nodes into a document to represent whitespace in the source markup.
Node.nodeName - Web APIs
WebAPINodenodeName
syntax var str = node.nodename; value a domstring.
Node.nodePrincipal - Web APIs
syntax principalobj = node.nodeprincipal value an nsiprincipal object representing the node's security context.
Node.nodeType - Web APIs
WebAPINodenodeType
syntax var type = node.nodetype; returns an integer which specifies the type of the node.
Node.nodeValue - Web APIs
WebAPINodenodeValue
syntax str = node.nodevalue; node.nodevalue = str; value str is a string containing the value of the current node, if any.
Node.normalize() - Web APIs
WebAPINodenormalize
syntax element.normalize(); example let wrapper = document.createelement("div"); wrapper.appendchild( document.createtextnode("part 1 ") ); wrapper.appendchild( document.createtextnode("part 2 ") ); // at this point, wrapper.childnodes.length === 2 // wrapper.childnodes[0].textcontent === "part 1 " // wrapper.childnodes[1].textcontent === "part 2 " wrapper.normalize(); // now, wrapper.childnodes.length === 1 // wrapper.childnodes[0].textcontent === "part 1 part 2 " specifications specification status comment domthe definition of 'node: normalize' in that...
Node.ownerDocument - Web APIs
syntax var document = element.ownerdocument; value document is the top-level document object in which all the child nodes are created.
Node.parentElement - Web APIs
syntax parentelement = node.parentelement parentelement is the parent element of the current node.
Node.parentNode - Web APIs
WebAPINodeparentNode
syntax parentnode = node.parentnode parentnode is the parent of the current node.
Node.prefix - Web APIs
WebAPINodeprefix
syntax string = node.prefix examples the following logs "x" to the console.
Node.previousSibling - Web APIs
syntax previousnode = node.previoussibling; example <img id="b0"> <img id="b1"> <img id="b2"> console.log(document.getelementbyid("b1").previoussibling); // <img id="b0"> console.log(document.getelementbyid("b2").previoussibling.id); // "b1" notes gecko-based browsers insert text nodes into a document to represent whitespace in the source markup.
Node.replaceChild() - Web APIs
WebAPINodereplaceChild
syntax parentnode.replacechild(newchild, oldchild); parameters newchild the new node to replace oldchild.
Node.rootNode - Web APIs
WebAPINoderootNode
syntax rootnode = node.rootnode; value a node object representing the topmost node in the tree.
Node.setUserData() - Web APIs
WebAPINodesetUserData
syntax var prevuserdata = somenode.setuserdata(userkey, userdata, handler); parameters userkey is used as the key by which one may subsequently obtain the stored data.
Node.textContent - Web APIs
WebAPINodetextContent
syntax let text = somenode.textcontent someothernode.textcontent = string value a string or null description the value of textcontent depends on the situation: if the node is a document or a doctype, textcontent returns null.
Node - Web APIs
WebAPINode
callback) { if (!callback) { const nodes = [] eachnode(rootnode, function(node) { nodes.push(node) }) return nodes } if (false === callback(rootnode)) { return false } if (rootnode.haschildnodes()) { const nodes = rootnode.childnodes for (let i = 0, l = nodes.length; i < l; ++i) { if (false === eachnode(nodes[i], callback)) { return } } } } syntax eachnode(rootnode, callback) description recursively calls a function for each descendant node of rootnode (including the root itself).
NodeFilter.acceptNode() - Web APIs
syntax result = nodefilter.acceptnode(node) parameters node is a node being the object to check against the filter.
NodeIterator.detach() - Web APIs
syntax nodeiterator.detach(); example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); nodeiterator.detach(); // detaches the iterator nodeiterator.nextnode(); // throws an invalid_state_err exception specifications specification status comment domthe definition of 'node...
NodeIterator.expandEntityReferences - Web APIs
syntax expand = nodeiterator.expandentityreferences; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); expand = nodeiterator.expandentityreferences; specifications specification status comment document object model (dom) level 2 travers...
NodeIterator.filter - Web APIs
syntax nodefilter = nodeiterator.filter; example const nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); nodefilter = nodeiterator.filter; specifications specification status comment domthe definition of 'nodeiterator.filter' in that specificat...
NodeIterator.nextNode() - Web APIs
syntax node = nodeiterator.nextnode(); example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false // this optional argument is not used any more ); currentnode = nodeiterator.nextnode(); // returns the next node specifications specification status comment ...
NodeIterator.pointerBeforeReferenceNode - Web APIs
syntax flag = nodeiterator.pointerbeforereferencenode; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); flag = nodeiterator.pointerbeforereferencenode; specifications specification status comment domthe definition of 'nodeiterator.pointerbeforereferencenode' in that specification.
NodeIterator.previousNode() - Web APIs
syntax node = nodeiterator.previousnode(); example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false // this optional argument is not used any more ); currentnode = nodeiterator.nextnode(); // returns the next node previousnode = nodeiterator.previousnode(); // same result...
NodeIterator.referenceNode - Web APIs
syntax node = nodeiterator.referencenode; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); node = nodeiterator.referencenode; specifications specification status comment domthe definition of 'nodeiterator.referencenode' in that specification.
NodeIterator.root - Web APIs
WebAPINodeIteratorroot
syntax root = nodeiterator.root; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); root = nodeiterator.root; // document.body in this case specifications specification status comment domthe definition of 'nodeiterator.root' in that specification.
NodeIterator.whatToShow - Web APIs
syntax var nodetypes = nodeiterator.whattoshow; the values that can be combined to form the bitmask are: constant numerical value description nodefilter.show_all -1 (that is the max value of unsigned long) shows all nodes.
NodeIterator - Web APIs
syntax a nodeiterator can be created using the document.createnodeiterator() method, as follows: const nodeiterator = document.createnodeiterator(root, whattoshow, filter); properties this interface doesn't inherit any property.
NodeList.entries() - Web APIs
WebAPINodeListentries
syntax list.entries(); return value returns an iterator.
NodeList.prototype.forEach() - Web APIs
WebAPINodeListforEach
syntax somenodelist.foreach(callback[, thisarg]); parameters callback a function to execute on each element of somenodelist.
NodeList.keys() - Web APIs
WebAPINodeListkeys
syntax nodelist.keys(); return value returns an iterator.
NodeList.length - Web APIs
WebAPINodeListlength
syntax numitems = nodelist.length numitems is an integer value representing the number of items in a nodelist.
NodeList.values() - Web APIs
WebAPINodeListvalues
syntax nodelist.values(); return value returns an iterator.
NonDocumentTypeChildNode.nextElementSibling - Web APIs
syntax var nextnode = elementnodereference.nextelementsibling; example <div id="div-01">here is div-01</div> <div id="div-02">here is div-02</div> <script type="text/javascript"> var el = document.getelementbyid('div-01').nextelementsibling; console.log('siblings of div-01:'); while (el) { console.log(el.nodename); el = el.nextelementsibling; } </script> this example outputs the following into the console when it loads: siblings of div-01: div script polyfill for internet explorer 8 this property is unsupported prior to ie9, so the following snippet ca...
NonDocumentTypeChildNode.previousElementSibling - Web APIs
syntax prevnode = elementnodereference.previouselementsibling; example <div id="div-01">here is div-01</div> <div id="div-02">here is div-02</div> <li>this is a list item</li> <li>this is another list item</li> <div id="div-03">here is div-03</div> <script> let el = document.getelementbyid('div-03').previouselementsibling; document.write('<p>siblings of div-03</p><ol>'); while (el) { document.write('<li>' + el.nodename + '</li>'); el = el.previouselementsibling; } document.write('</ol>'); </script> this example outputs the following into the page wh...
Notification.Notification() - Web APIs
syntax var mynotification = new notification(title, options); parameters title defines a title for the notification, which is shown at the top of the notification window.
Notification.actions - Web APIs
syntax var actions[] = notification.actions; value a read-only array of notificationaction objects, each describing a single action the user can choose within a notification.
Notification.badge - Web APIs
syntax var url = notification.badge value a usvstring containing a url.
Notification.body - Web APIs
WebAPINotificationbody
syntax var body = notification.body; value a domstring.
Notification.close() - Web APIs
syntax notification.close(); parameters none.
Notification.data - Web APIs
WebAPINotificationdata
syntax var data = notification.data; value a structured clone.
Notification.dir - Web APIs
WebAPINotificationdir
syntax var direction = notification.dir; value a domstring specifying the text direction.
Notification.icon - Web APIs
WebAPINotificationicon
syntax var icon = notification.icon; value a usvstring.
Notification.image - Web APIs
syntax var image = notification.image; value a usvstring.
Notification.lang - Web APIs
WebAPINotificationlang
syntax var language = notification.lang; value a domstring specifying the language tag.
Notification.maxActions - Web APIs
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.
Notification.onclick - Web APIs
syntax notification.onclick = function(event) { ...
Notification.onclose - Web APIs
syntax notification.onclose = function() { ...
Notification.onerror - Web APIs
these events occur when something goes wrong with a notification (in many cases an error preventing the notification from being displayed.) syntax notification.onerror = function() { ...
Notification.onshow - Web APIs
syntax notification.onshow = function() { ...
Notification.permission - Web APIs
syntax var permission = notification.permission; value a domstring representing the current permission.
Notification.renotify - Web APIs
syntax var renotify = notification.renotify; value a boolean.
Notification.requireInteraction - Web APIs
syntax function spawnnotification(thetitle,thebody,shouldrequireinteraction) { var options = { body: thebody, requireinteraction: shouldrequireinteraction } var n = new notification(thetitle,options); } value a boolean.
Notification.silent - Web APIs
syntax var silent = notification.silent; value a boolean.
Notification.tag - Web APIs
WebAPINotificationtag
syntax var tag = notification.tag; value a domstring.
Notification.timestamp - Web APIs
syntax var timestamp = notification.timestamp; value a domtimestamp.
Notification.title - Web APIs
syntax var title = notification.title; value a domstring.
Notification.vibrate - Web APIs
syntax var vibrate = notification.vibrate; value a vibration pattern, as specified in the vibration api spec.
NotificationEvent.NotificationEvent() - Web APIs
syntax var mynotificationevent = new notificationevent(type, notificationeventinit); parameters type tbd notificationeventinit optional a dictionary object containing a notification object to be used as the notification the event is dispatched on.
OES_vertex_array_object.bindVertexArrayOES() - Web APIs
syntax void ext.bindvertexarrayoes(arrayobject); parameters arrayobject a webglvertexarrayobject (vao) object to bind.
OES_vertex_array_object.createVertexArrayOES() - Web APIs
syntax webglvertexarrayobjectoes ext.createvertexarrayoes(); parameters none.
OES_vertex_array_object.deleteVertexArrayOES() - Web APIs
syntax void ext.deletevertexarrayoes(arrayobject); parameters arrayobject a webglvertexarrayobject (vao) object to delete.
OES_vertex_array_object.isVertexArrayOES() - Web APIs
syntax glboolean ext.isvertexarrayoes(arrayobject); parameters arrayobject a webglvertexarrayobject (vao) object to test.
OVR_multiview2.framebufferTextureMultiviewOVR() - Web APIs
syntax void ext.framebuffertexturemultiviewovr(target, attachment, texture, level, baseviewindex, numviews); parameters target a glenum specifying the binding point (target).
OfflineAudioCompletionEvent.OfflineAudioCompletionEvent() - Web APIs
syntax var offlineaudiocompletionevent = new offlineaudiocompletionevent(type, init) parameters type optional a domstring representing the type of object to create.
OfflineAudioCompletionEvent.renderedBuffer - Web APIs
syntax var buffer = offlineaudiocompletioneventinstance.renderedbuffer; value an audiobuffer.
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.
OfflineAudioContext.length - Web APIs
syntax var length = offlineaudiocontext.length; value an integer representing the size of the buffer in sample-frames.
OfflineAudioContext.oncomplete - Web APIs
syntax var offlineaudioctx = new offlineaudiocontext(); offlineaudioctx.oncomplete = function() { ...
OfflineAudioContext.resume() - Web APIs
syntax offlineaudiocontext.resume().then(function() { ...
OfflineAudioContext.startRendering() - Web APIs
syntax event-based version: offlineaudioctx.startrendering(); offlineaudioctx.oncomplete = function(e) { // e.renderedbuffer contains the output buffer } promise-based version: offlineaudioctx.startrendering().then(function(buffer) { // buffer contains the output buffer }); parameters none.
OfflineAudioContext.suspend() - Web APIs
syntax offlineaudiocontext.suspend(suspendtime).then(function() { ...
OffscreenCanvas.convertToBlob() - Web APIs
syntax promise<blob> offscreencanvas.converttoblob(options); parameters optionsoptional you can specify several options when converting your offscreencanvas object into a blob object, for example: const blob = offscreencanvas.converttoblob({ type: "image/jpeg", quality: 0.95 }); options: type: a domstring indicating the image format.
OffscreenCanvas() - Web APIs
syntax new offscreencanvas(width, height); parameters width the width of the offscreen canvas.
OffscreenCanvas.convertToBlob() - Web APIs
syntax promise<blob> offscreencanvas.converttoblob(options); parameters optionsoptional you can specify several options when converting your offscreencanvas object into a blob object, for example: const blob = offscreencanvas.converttoblob({ type: "image/jpeg", quality: 0.95 }); options: type: a domstring indicating the image format.
OffscreenCanvas.getContext() - Web APIs
syntax offscreen.getcontext(contexttype, contextattributes); parameters contexttype is a domstring containing the context identifier defining the drawing context associated to the canvas.
OffscreenCanvas.height - Web APIs
syntax var pxl = offscreen.height; offscreen.height = pxl; examples creating a new offscreen canvas and returning or setting the height of the offscreen canvas: var offscreen = new offscreencanvas(256, 256); offscreen.height; // 256 offscreen.height = 512; specifications specification status comment html living standardthe definition of 'offscreencanvas.height' in that specification.
OffscreenCanvas.convertToBlob() - Web APIs
syntax promise<blob> offscreencanvas.converttoblob(options); parameters options optional you can specify several options when converting your offscreencanvas object into a blob object, for example: const blob = offscreencanvas.converttoblob({ type: "image/jpeg", quality: 0.95 }); options: type: a domstring indicating the image format.
OffscreenCanvas.transferToImageBitmap() - Web APIs
syntax imagebitmap offscreencanvas.transfertoimagebitmap() return value an imagebitmap.
OffscreenCanvas.width - Web APIs
syntax var pxl = offscreen.width; offscreen.width = pxl; examples creating a new offscreen canvas and returning or setting the width of the offscreen canvas: var offscreen = new offscreencanvas(256, 256); offscreen.width; // 256 offscreen.width = 512; specifications specification status comment html living standardthe definition of 'offscreencanvas.width' in that specification.
OrientationSensor.populateMatrix() - Web APIs
syntax orientationinstance.populatematrix(targetmatrix) because orientationsensor is a base class, populatematrix may only be read from one of its derived classes.
OrientationSensor.quaternion - Web APIs
syntax var quaternion = orientationinstance.quaternion because orientationsensor is a base class, quaternion may only be read from one of its derived classes.
OscillatorNode.OscillatorNode() - Web APIs
syntax var oscillatornode = new oscillatornode(context, options) parameters inherits parameters from the audionodeoptions dictionary.
OscillatorNode.detune - Web APIs
syntax var oscillator = audioctx.createoscillator(); oscillator.detune.setvalueattime(100, audioctx.currenttime); // value in cents note: though the audioparam returned is read-only, the value it represents is not.
OscillatorNode.frequency - Web APIs
syntax var oscillator = audioctx.createoscillator(); oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz note: though the audioparam returned is read-only, the value it represents is not.
OscillatorNode.onended - Web APIs
syntax var oscillator = audioctx.createoscillator(); oscillator.onended = function() { ...
OscillatorNode.setPeriodicWave() - Web APIs
syntax oscillatornode.setperiodicwave(wave); parameters wave a periodicwave object representing the waveform to use as the shape of the oscillator's output.
OscillatorNode.start() - Web APIs
syntax oscillator.start(when); // start playing oscillator at the point in time specified by when parameters when optional an optional double representing the time (in seconds) when the oscillator should start, in the same coordinate system as audiocontext's currenttime attribute.
OscillatorNode.stop() - Web APIs
syntax oscillator.stop(when); // stop playing oscillator at when parameters when optional an optional double representing the audio context time when the oscillator should stop.
OscillatorNode.type - Web APIs
syntax oscillatornode.type = type; value a domstring specifying the shape of oscillator wave.
OverconstrainedError.OverconstrainedError() - Web APIs
syntax var overconstrainederror = new overconstrainederror() parameters constraint the constraint that was not satified.
OverconstrainedError.constraint - Web APIs
syntax var constraint = overconstrainederror.constraint; value a string specifications specification status comment media capture and streamsthe definition of 'constraint' in that specification.
OverconstrainedError.message - Web APIs
syntax var message = overconstrainederror.message; value a domstring.
OverconstrainedError.name - Web APIs
syntax var name = overconstrainederror.name; value a domstring.
PageTransitionEvent.persisted - Web APIs
syntax window.addeventlistener('pageshow', function(event) { if (event.persisted) { console.log('page was loaded from cache.'); } }); value a boolean.
Paint​Worklet​.device​Pixel​Ratio - Web APIs
syntax var devicepixelratio = paintworklet.devicepixelratio; value a double-precision integer.
PaintWorklet.devicePixelRatio - Web APIs
syntax var devicepixelratio = paintworklet.devicepixelratio; value a double-precision integer.
PaintWorklet.devicePixelRatio - Web APIs
syntax var devicepixelratio = paintworklet.devicepixelratio; value a double-precision integer.
PaintWorklet.registerPaint - Web APIs
syntax registerpaint(name, class); parameters name the name of the worklet class to register.
PannerNode.PannerNode() - Web APIs
syntax var mypanner = new pannernode(context, options); parameters inherits parameters from the audionodeoptions dictionary.
PannerNode.coneInnerAngle - Web APIs
syntax var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.coneinnerangle = 360; value a double.
PannerNode.coneOuterAngle - Web APIs
syntax var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.coneouterangle = 0; value a double.
PannerNode.coneOuterGain - Web APIs
syntax var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.coneoutergain = 0; value a double.
PannerNode.distanceModel - Web APIs
syntax var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.distancemodel = 'inverse'; value a enum — see distancemodeltype.
PannerNode.maxDistance - Web APIs
syntax var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.maxdistance = 10000; value a double.
PannerNode.orientationX - Web APIs
syntax var orientationx = pannernode.orientationx; pannernode.orientationx.value = neworientationx; value an audioparam whose value is the x component of the direction in which the audio source is facing, in 3d cartesian coordinate space.
PannerNode.orientationY - Web APIs
syntax var orientationy = pannernode.orientationy; pannernode.orientationy.value = neworientationy; value an audioparam whose value is the y component of the direction the audio source is facing, in 3d cartesian coordinate space.
PannerNode.orientationZ - Web APIs
syntax var orientationz = pannernode.orientationz; pannernode.orientationz.value = neworientationz; value an audioparam whose value is the z component of the direction the audio source is facing, in 3d cartesian coordinate space.
PannerNode.panningModel - Web APIs
syntax var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.panningmodel = 'hrtf'; value a enum — see panningmodeltype.
PannerNode.positionX - Web APIs
syntax var positionx = pannernode.positionx; pannernode.positionx.value = newpositionx; value an audioparam whose value is the x coordinate of the audio source's position, in 3d cartesian coordinates.
PannerNode.positionY - Web APIs
syntax var positiony = pannernode.positiony; pannernode.positiony.value = newpositiony; value an audioparam whose value is the y coordinate of the audio source's position, in 3d cartesian coordinates.
PannerNode.positionZ - Web APIs
syntax var positionz = pannernode.positionz; pannernode.positionz.value = newpositionz; value an audioparam whose value is the z coordinate of the audio source's position, in 3d cartesian coordinates.
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.
PannerNode.setOrientation() - Web APIs
syntax var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.setorientation(1,0,0); returns void.
PannerNode.setPosition() - Web APIs
syntax var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.setposition(0,0,0); returns void.
PannerNode.setVelocity() - Web APIs
syntax var audioctx = new audiocontext(); var panner = audioctx.createpanner(); panner.setvelocity(0,0,17); returns void.
PannerNode - Web APIs
the orientation and position value are set and retrieved using different syntaxes, since they're stored as audioparam values.
ParentNode.append() - Web APIs
WebAPIParentNodeappend
syntax // [throws, unscopable] parentnode.append(...nodesordomstrings) // returns undefined parameters nodes a set of node or domstring objects to insert.
ParentNode.childElementCount - Web APIs
syntax var count = node.childelementcount; count the return value, which is an unsigned long (simply an integer) type.
ParentNode.children - Web APIs
syntax let children = node.children; value an htmlcollection which is a live, ordered collection of the dom elements which are children of node.
ParentNode.firstElementChild - Web APIs
syntax var element = node.firstelementchild; example <ul id="foo"> <li>first (1)</li> <li>second (2)</li> <li>third (3)</li> </ul> <script> var foo = document.getelementbyid('foo'); // yields: first (1) console.log(foo.firstelementchild.textcontent); </script> polyfill for ie8, ie9 and safari // overwrites native 'firstelementchild' prototype.
ParentNode.lastElementChild - Web APIs
syntax const element = node.lastelementchild example <ul id="foo"> <li>first (1)</li> <li>second (2)</li> <li>third (3)</li> </ul> <script> const foo = document.getelementbyid('foo'); console.log(foo.lastelementchild.textcontent); // logs: third (3) </script> polyfill the code below adds support of lastelementchild() to document and documentfragment in internet explorer and safari.
ParentNode.prepend() - Web APIs
syntax parentnode.prepend(...nodestoprepend); parameters nodestoprepend one or more nodes to insert before the first child node currently in the parentnode.
ParentNode.replaceChildren() - Web APIs
syntax // [throws, unscopable] parentnode.replacechildren(...nodesordomstrings) // returns undefined parameters nodesordomstrings a set of node or domstring objects to replace the parentnode's existing children with.
PasswordCredential - Web APIs
syntax var mycredential = new passwordcredential(passwordcredentialdata) var mycredential = new passwordcredential(htmlformelement) parameters either of the following: passwordcredentialdata a passwordcredentialdata dictionary containing the following fields: iconurl: (optional) the url of a user's avatar image.
PasswordCredential.additionalData - Web APIs
syntax passwordcredential.additionaldata = formdata formdata = passwordcredential.additionaldata passwordcredential.additionaldata = urlsearchparams ulrsearchparams = passwordcredential.additionaldata value one of a formdata instance, a urlsearchparams instance, or null.
PasswordCredential.iconURL - Web APIs
syntax url =passwordcredential.iconurl value a usvstring containing a url.
PasswordCredential.idName - Web APIs
syntax var idname = passwordcredential.idname passwordcredential.idname = "userid" value a usvstring represents the name used for the id field, when submitting the current object to a remote endpoint via fetch.
PasswordCredential.name - Web APIs
syntax name =passwordcredential.name value a usvstring containing a name.
PasswordCredential.password - Web APIs
syntax password =passwordcredential.password value a usvstring containing a password.
PasswordCredential.passwordName - Web APIs
syntax var passwordname = passwordcredential.passwordname passwordcredential.passwordname = "passcode" value a usvstring representing the password field name, used when submitting the current object to a remote endpoint via fetch.
Path2D() - Web APIs
WebAPIPath2DPath2D
syntax new path2d(); new path2d(path); new path2d(d); parameters path optional when invoked with another path2d object, a copy of the path argument is created.
Path2D.addPath() - Web APIs
WebAPIPath2DaddPath
syntax void path.addpath(path [, transform]); parameters path a path2d path to add.
PayerErrors.email - Web APIs
WebAPIPayerErrorsemail
syntax payeremail = payererrors.email; value if validation of the payer's email address (paymentresponse.payeremail) found problems, this property should be set to a domstring that explains the validation problem and how to correct it.
PayerErrors.name - Web APIs
WebAPIPayerErrorsname
syntax payername = payererrors.name; value if this property is present in the payererrors object, the payer's name couldn't be successfully validated, and the name property's value is a domstring explaining the error.
PayerErrors.phone - Web APIs
WebAPIPayerErrorsphone
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.
PaymentAddress.addressLine - Web APIs
syntax var paymentaddresslines = paymentaddress.addressline; value an array of domstring objects, each containing one line of the address.
PaymentAddress.city - Web APIs
syntax var paymentcity = paymentaddress.city; value a domstring indicating the city or town portion of the address described by the paymentaddress object.
PaymentAddress.country - Web APIs
syntax var paymentcountry = paymentaddress.country; value a domstring which contains the iso3166-1 alpha-2 code identifying the country in which the address is located, or an empty string if no country is available, which frequently can be assumed to mean "same country as the site owner." usage notes if the payment handler validates the address and determines that the value of country is invalid, a call to paymentrequestupdateevent.updatewith() will be made with a details object containing a shippingaddresserrors field.
PaymentAddress.dependentLocality - Web APIs
syntax var paymentdependentlocality = paymentaddress.dependentlocality; value a domstring indicating the sublocality portion of the address.
PaymentAddress.languageCode - Web APIs
syntax var paymentlanguagecode = paymentaddress.languagecode; value a domstring providing the bcp-47 format language code indicating the language the address was written in, such as "en-us", "pt-br", or "ja-jp".
PaymentAddress.organization - Web APIs
syntax var paymentorganization = paymentaddress.organization; value a domstring whose value is the name of the organization or company located at the address described by the paymentaddress object.
PaymentAddress.phone - Web APIs
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.
PaymentAddress.postalCode - Web APIs
syntax var paymentpostalcode = paymentaddress.postalcode; value a domstring which contains the postal code portion of the address.
PaymentAddress.recipient - Web APIs
syntax var paymentrecipient = paymentaddress.recipient; value a domstring giving the name of the person receiving or paying for the purchase, or the name of a contact person in other contexts.
PaymentAddress.region - Web APIs
syntax var paymentregion = paymentaddress.region; value a domstring specifying the top-level administrative subdivision within the country in which the address is located.
PaymentAddress.regionCode - Web APIs
syntax var regioncode = paymentaddress.regioncode; value a domstring indicating the one to three character alphanumeric code representing the region portion of the address.
PaymentAddress.sortingCode - Web APIs
syntax var sortingcode = paymentaddress.sortingcode; value a domstring containing the sorting code portion of the address.
PaymentAddress.toJSON() - Web APIs
syntax var json = paymentaddress.tojson() parameters none.
PaymentCurrencyAmount.currency - Web APIs
syntax currency = paymentcurrencyamount.currency; value a domstring specifying the canonical, three-character currency identification code defined by the iso 4217 standard.
PaymentCurrencyAmount.currencySystem - Web APIs
syntax currencysystem = paymentcurrencyamount.currencysystem; value a domstring which specifies the currency standard used to specify the currency in which the payment value is represented.
PaymentCurrencyAmount.value - Web APIs
syntax value = paymentcurrencyamount.value; value a domstring indicating the numeric value of the payment.
PaymentDetailsUpdate.error - Web APIs
syntax errorstring = paymentdetailsupdate.error; paymentdetailsupdate.error = errorstring; value a domstring specifying the string to display to the user if the information specified in the paymentdetailsupdate doesn't provide any valid shipping options.
PaymentDetailsUpdate.shippingAddressErrors - Web APIs
syntax var addresserrors = paymentdetailsupdate.shippingaddresserrors; value an addresserrors object, which contains domstrings describing errors in the properties of a paymentaddress.
PaymentMethodChangeEvent - Web APIs
syntax paymentmethodchangeevent = new paymentmethodchangeevent(type, options); parameters type a domstring which must contain the string paymentmethodchange, the name of the only type of event which uses the paymentmethodchangeevent interface.
PaymentMethodChangeEvent.methodDetails - Web APIs
syntax details = paymentmethodchangeevent.methodname; value an object containing any data needed to describe the changes made to the payment method.
PaymentMethodChangeEvent.methodName - Web APIs
syntax var methodname = paymentmethodchangeevent.methodname; value a domstring which uniquely identifies the currently-selected payment handler.
PaymentRequest.PaymentRequest() - Web APIs
syntax var paymentrequest = new paymentrequest(methoddata, details, [options]); parameters methoddata contains an array of identifiers for the payment methods the merchant web site accepts and any associated payment method specific data.
PaymentRequest.abort() - Web APIs
syntax paymentrequest.abort(); returns void.
PaymentRequest.canMakePayment() - Web APIs
syntax paymentrequest.canmakepayment() .then( canpay => { ...
PaymentRequest.prototype.id - Web APIs
WebAPIPaymentRequestid
const response = await request.show(); console.log(response.requestid === request.id); // and in serialized form too const json = response.tojson(); console.log(json.requestid,response.requestid, request.id); syntax var id = paymentrequest.id value a domstring.
PaymentRequest.onmerchantvalidation - Web APIs
syntax paymentrequest.onmerchantvalidation = eventhandlerfunction; value an event handler function which is to be called whenever the merchantvalidation event is fired at the paymentrequest, indicating that the payment handler requires the merchant to validate themselves as allowed to use this payment handler.
PaymentRequest.onpaymentmethodchange - Web APIs
syntax paymentrequest.addeventlistener('paymentmethodchange', paymentmethodchangeevent => { ...
PaymentRequest.onshippingaddresschange - Web APIs
syntax paymentrequest.addeventlistener('shippingaddresschange', shippingaddresschangeevent => { ...
PaymentRequest.onshippingoptionchange - Web APIs
syntax paymentrequest.addeventlistener('shippingoptionchange', shippingoptionchangeevent => { ...
PaymentRequest.shippingAddress - Web APIs
syntax var paymentaddress = paymentrequest.shippingaddress; example generally, the user agent will fill the shippingaddress property value.
PaymentRequest.shippingOption - Web APIs
syntax // returns the id of the selected paymentshippingoption var shippingoption = request.shippingoption; example in the example below, the paymentrequest.onshippingoptionchange and the paymentrequest.onshippingaoptionchange events are dispatched.
PaymentRequest.shippingType - Web APIs
syntax var shippingtype = paymentrequest.shippingtype value one of "shipping", "delivery", "pickup", or null.
PaymentRequestEvent() - Web APIs
syntax var paymentrequestevent = new paymentrequesteventy(type, options) parameters type must always be 'paymentrequest'.
PaymentRequestEvent.instrumentKey - Web APIs
syntax var instrumentkey = paymentrequestevent.instrumentkey value a paymentinstrument object.
PaymentRequestEvent.methodData - Web APIs
syntax var methoddata[] = paymentrequestevent.methoddata value an array of paymentmethoddata objects.
PaymentRequestEvent.modifiers - Web APIs
syntax var modifiers[] = paymentdetailsevent.modifiers value an array of modifier objects.
PaymentRequestEvent.openWindow() - Web APIs
syntax var apromise = paymentrequestevent.openwindow(url) parameters url the url to open in the new window.
paymentRequestId - Web APIs
syntax var id = paymentrequestevent.paymentrequestid value a domstring contains the id.
PaymentRequestEvent.paymentRequestOrigin - Web APIs
syntax var ausvstring = paymentrequestevent.paymentrequestorigin value a usvstring.
PaymentRequestEvent.respondWith() - Web APIs
syntax paymentrequestevent.respondwith( // promise that resolves with a paymentresponse.
PaymentRequestEvent.topOrigin - Web APIs
syntax var ausvstring = paymentrequestevent.toporigin value a usvstring specifications specification status comment payment handler apithe definition of 'toporigin' in that specification.
PaymentRequestEvent.total - Web APIs
syntax var paymentcurrencyamount = paymentrequestevent.total value a paymentcurrencyamount object.
PaymentRequestUpdateEvent.PaymentRequestUpdateEvent() - Web APIs
syntax var paymentrequestupdateevent = new paymentrequestupdateevent() parameters none.
PaymentRequestUpdateEvent.updateWith() - Web APIs
syntax paymentrequestupdateevent.updatewith(details); parameters details a paymentdetailsupdate object specifying the changes applied to the payment request: displayitems optional an array of paymentitem objects, each describing one line item for the payment request.
PaymentResponse.complete() - Web APIs
syntax completepromise = paymentrequest.complete(result); parameters result optional a domstring indicating the state of the payment operation upon completion.
PaymentResponse.details - Web APIs
syntax var detailsobject = paymentresponse.details; example the following example extracts the details from the paymentresponse object to the promise returned from paymentrequest.show().
PaymentResponse.methodName - Web APIs
syntax var methodname = paymentresponse.methodname; value a domstring uniquely identifying the payment handler being used to process the payment.
PaymentResponse.onpayerdetailchange - Web APIs
syntax paymentresponse.onpayerdetailchange = eventhandlerfunction; value an event handler function which is called to handle the payerdetailchange event when the user makes changes to their personal information while editing a payment request form.
PaymentResponse.payerEmail - Web APIs
syntax var payeremail = paymentresponse.payeremail; specifications specification status comment payment request api candidate recommendation initial definition.
PaymentRequest.payerName - Web APIs
syntax var payername = paymentresponse.payername; value a string containing the payer name.
PayerResponse.payerPhone - Web APIs
syntax var payerphone = paymentresponse.payerphone; specifications specification status comment payment request api candidate recommendation initial definition.
PaymentResponse.requestId - Web APIs
syntax var id = paymentrequest.id value a domstring.
PaymentResponse.retry() - Web APIs
syntax retrypromise = paymentrequest.retry(errorfields); parameters errorfields a paymentvalidationerrors object, with the following properties: error optional a general description of a payment error from which the user may attempt to recover by retrying the payment, possibly after correcting mistakes in the payment information.
PaymentResponse.shippingAddress - Web APIs
syntax var shippingaddress = paymentrequest.shippingaddress; value a paymentaddress object providing details comprising the shipping address provided by the user.
PaymentResponse.shippingOption - Web APIs
syntax var shippingoption = paymentrequest.shippingoption; example in the example below, the paymentrequest.onshippingaoptionchange event is called.
performance.clearMarks() - Web APIs
syntax performance.clearmarks(); performance.clearmarks(name); arguments name optional a domstring representing the name of the timestamp.
performance.clearMeasures() - Web APIs
syntax performance.clearmeasures(); performance.clearmeasures(name); arguments name optional a domstring representing the name of the timestamp.
performance.clearResourceTimings() - Web APIs
syntax performance.clearresourcetimings(); arguments void return value none this method has no return value.
performance.getEntries() - Web APIs
syntax general syntax: entries = window.performance.getentries(); return value entries an array of performanceentry objects.
performance.getEntriesByName() - Web APIs
syntax entries = window.performance.getentriesbyname(name, type); arguments name the name of the entry to retrieve.
performance.getEntriesByType() - Web APIs
syntax entries = window.performance.getentriesbytype(type); arguments type the type of entry to retrieve such as "mark".
performance.measure() - Web APIs
syntax performance.measure(name); performance.measure(name, startmark); performance.measure(name, startmark, endmark); performance.measure(name, undefined, endmark); arguments name a domstring representing the name of the measure.
Performance.memory - Web APIs
syntax timinginfo = performance.memory attributes jsheapsizelimit the maximum size of the heap, in bytes, that is available to the context.
Performance.navigation - Web APIs
syntax navobject = performance.navigation; specifications specification status comment navigation timingthe definition of 'performance.navigation' in that specification.
performance.now() - Web APIs
WebAPIPerformancenow
syntax t = performance.now(); example const t0 = performance.now(); dosomething(); const t1 = performance.now(); console.log(`call to dosomething took ${t1 - t0} milliseconds.`); unlike other timing data available to javascript (for example date.now), the timestamps returned by performance.now() are not limited to one-millisecond resolution.
Performance.onresourcetimingbufferfull - Web APIs
syntax callback = performance.onresourcetimingbufferfull = buffer_full_cb; return value callback an eventhandler that is invoked when the resourcetimingbufferfull event is fired.
performance.setResourceTimingBufferSize() - Web APIs
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.timeOrigin - Web APIs
syntax var timeorigin = performance.timeorigin value a high resolution timestamp.
Performance.timing - Web APIs
syntax timinginfo = performance.timing; specifications specification status comment navigation timing level 2 working draft initial definition.
performance.toJSON() - Web APIs
syntax myperf = performance.tojson() arguments none return value myperf a json object that is the serialization of the performance object.
PerformanceEntry.duration - Web APIs
syntax entry.duration; return value a domhighrestimestamp representing the duration of the performance entry.
PerformanceEntry.entryType - Web APIs
syntax var type = entry.entrytype; return value the return value depends on the subtype of the performanceentry object and affects the value of the performanceentry.name property as shown by the table below.
PerformanceEntry.name - Web APIs
syntax var name = entry.name; return value the return value depends on the subtype of the performanceentry object and the value of performanceentry.entrytype, as shown by the table below.
PerformanceEntry.startTime - Web APIs
syntax entry.starttime; return value a domhighrestimestamp representing the first timestamp when the performance entry was created.
PerformanceEntry.toJSON() - Web APIs
syntax json = perfentry.tojson(); arguments none return value json a json object that is the serialization of the performanceentry object.
PerformanceLongTaskTiming.attribution - Web APIs
syntax var taskattributetiming = performancelongtasktiming.attribution; value a sequence of taskattributiontiming instances.
PerformanceNavigation.redirectCount - Web APIs
syntax amount = performancenavigation.redirectcount; specifications specification status comment navigation timingthe definition of 'performancenavigation.redirectcount' in that specification.
PerformanceNavigation.type - Web APIs
syntax type = performancenavigation.type; specifications specification status comment navigation timingthe definition of 'performancenavigation.type' in that specification.
PerformanceNavigationTiming.domComplete - Web APIs
syntax perfentry.domcomplete; return value a timestamp representing a time value equal to the time immediately before the user agent sets the current document readiness of the current document to complete.
PerformanceNavigationTiming.domContentLoadedEventEnd - Web APIs
syntax perfentry.domcontentloadedeventend; return value a timestamp representing the time value equal to the time immediately after the current document's domcontentloaded event completes.
PerformanceNavigationTiming.domContentLoadedEventStart - Web APIs
syntax perfentry.domcontentloadedeventstart; return value a timestamp representing the time value equal to the time immediately before the user agent fires the domcontentloaded event at the current document.
PerformanceNavigationTiming.domInteractive - Web APIs
syntax perfentry.dominteractive; return value a timestamp representing the time value equal to the time immediately before the user agent sets the current document readiness of the current document to interactive.
PerformanceNavigationTiming.loadEventEnd - Web APIs
syntax perfentry.loadeventend; return value a timestamp representing the time when the load event of the current document is completed.
PerformanceNavigationTiming.loadEventStart - Web APIs
syntax perfentry.loadeventstart; return value a timestamp representing a time value equal to the time immediately before the load event of the current document is fired.
PerformanceNavigationTiming.redirectCount - Web APIs
syntax perfentry.redirectcount; return value a number representing the number of redirects since the last non-redirect navigation under the current browsing context.
PerformanceNavigationTiming.toJSON() - Web APIs
syntax json = resourceperfentry.tojson(); arguments none return value json a json object that is the serialization of the performancenavigationtiming object as a map with entries from the closest inherited interface and with entries for each of the serializable attributes.
PerformanceNavigationTiming.type - Web APIs
syntax perfentry.type; return value a string which is one of the values listed above.
PerformanceNavigationTiming.unloadEventEnd - Web APIs
syntax perfentry.unloadeventend; return value a timestamp representing a time value equal to the time immediately after the user agent finishes the unload event of the previous document.
PerformanceNavigationTiming.unloadEventStart - Web APIs
syntax perfentry.unloadeventstart; return value a timestamp representing the time value equal to the time immediately before the user agent starts the unload event of the previous document.
PerformanceObserver() - Web APIs
syntax var observer = new performanceobserver(callback); parameters callback a performanceobservercallback callback that will be invoked when observed performance events are recorded.
PeformanceObserver.disconnect() - Web APIs
syntax performanceobserver.disconnect(); example var observer = new performanceobserver(function(list, obj) { var entries = list.getentries(); for (var i=0; i < entries.length; i++) { // process "mark" and "frame" events } }); observer.observe({entrytypes: ["mark", "frame"]}); function perf_observer(list, observer) { // process the "measure" event // ...
PerformanceObserver.observe() - Web APIs
syntax observer.observe(options); parameters options a performanceobserverinit dictionary with the following possible members: entrytypes: an array of domstring objects, each specifying one performance entry type to observe.
PerformanceObserver.takeRecords() - Web APIs
syntax var performanceentry[] = performanceobserver.takerecords(); parameters none.
PerformanceObserverEntryList.getEntries() - Web APIs
syntax general syntax: entries = list.getentries(); entries = list.getentries(performanceentryfilteroptions); specific usage: entries = list.getentries({name: "entry_name", entrytype: "mark"}); parameters performanceentryfilteroptionsoptional is a performanceentryfilteroptions dictionary, having the following fields: "name", the name of a performance entry.
PerformanceObserverEntryList.getEntriesByName() - Web APIs
syntax entries = list.getentriesbyname(name, type); parameters name a domstring representing the name of the entry to retrieve.
PerformanceObserverEntryList.getEntriesByType() - Web APIs
syntax entries = list.getentriesbytype(type); parameters type the type of entry to retrieve such as "frame".
PerformanceResourceTiming.connectEnd - Web APIs
syntax resource.connectend; return value a domhighrestimestamp representing the time after a connection is established.
PerformanceResourceTiming.connectStart - Web APIs
syntax resource.connectstart; return value a domhighrestimestamp immediately before the browser starts to establish the connection to the server to retrieve the resource.
PerformanceResourceTiming.decodedBodySize - Web APIs
syntax resource.decodedbodysize; return value the size (in octets) received from the fetch (http or cache) of the message body, after removing any applied content-codings.
PerformanceResourceTiming.domainLookupEnd - Web APIs
syntax resource.domainlookupend; return value a domhighrestimestamp representing the time immediately after the browser finishes the domain name lookup for the resource.
PerformanceResourceTiming.domainLookupStart - Web APIs
syntax resource.domainlookupstart; return value a domhighrestimestamp immediately before the browser starts the domain name lookup for the resource.
PerformanceResourceTiming.encodedBodySize - Web APIs
syntax resource.encodedbodysize; return value 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.fetchStart - Web APIs
syntax resource.fetchstart; return value a domhighrestimestamp immediately before the browser starts to fetch the resource.
PerformanceResourceTiming.initiatorType - Web APIs
syntax resource.initiatortype; return value a string representing the type of resource that initiated the performance event, as specified above.
PerformanceResourceTiming.nextHopProtocol - Web APIs
syntax resource.nexthopprotocol; return value a string representing the network protocol used to fetch the resource, as identified by the alpn protocol id (rfc7301).
PerformanceResourceTiming.redirectEnd - Web APIs
syntax resource.redirectend; return value a timestamp immediately after receiving the last byte of the response of the last redirect.
PerformanceResourceTiming.redirectStart - Web APIs
syntax resource.redirectstart; return value a timestamp representing the start time of the fetch which initiates the redirect.
PerformanceResourceTiming.requestStart - Web APIs
syntax resource.requeststart; return value a domhighrestimestamp representing the time immediately before the browser starts requesting the resource from the server example in the following example, the value of the *start and *end properties of all "resource" type events are logged.
PerformanceResourceTiming.responseEnd - Web APIs
syntax resource.responseend; return value a domhighrestimestamp immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.
PerformanceResourceTiming.responseStart - Web APIs
syntax resource.responsestart; return value a domhighrestimestamp immediately after the browser receives the first byte of the response from the server.
PerformanceResourceTiming.secureConnectionStart - Web APIs
syntax resource.secureconnectionstart; return value if the resource is fetched over a secure connection, a domhighrestimestamp immediately before the browser starts the handshake process to secure the current connection.
PerformanceResourceTiming.serverTiming - Web APIs
syntax resource.servertiming; specifications specification status comment server timingthe definition of 'servertiming' in that specification.
PerformanceResourceTiming.toJSON() - Web APIs
syntax json = resourceperfentry.tojson(); arguments none return value json a json object that is the serialization of the performanceresourcetiming object as a map with entries from the closest inherited interface and with entries for each of the serializable attributes.
PerformanceResourceTiming.transferSize - Web APIs
syntax resource.transfersize; return value a number representing the size (in octets) of the fetched resource.
PerformanceResourceTiming.workerStart - Web APIs
syntax resource.workerstart; value a domhighrestimestamp.
PerformanceServerTiming.description - Web APIs
syntax servertiming.description; specifications specification status comment server timingthe definition of 'description' in that specification.
PerformanceServerTiming.duration - Web APIs
syntax servertiming.duration; specifications specification status comment server timingthe definition of 'duration' in that specification.
PerformanceServerTiming.name - Web APIs
syntax servertiming.name; specifications specification status comment server timingthe definition of 'name' in that specification.
PerformanceServerTiming.toJSON - Web APIs
syntax var json = performanceservertiming.tojson() parameters none.
PerformanceTiming.connectEnd - Web APIs
syntax time = performancetiming.connectend; specifications specification status comment navigation timingthe definition of 'performancetiming.connectend' in that specification.
PerformanceTiming.connectStart - Web APIs
syntax time = performancetiming.connectstart; specifications specification status comment navigation timingthe definition of 'performancetiming.connectstart' in that specification.
PerformanceTiming.domComplete - Web APIs
syntax time = performancetiming.domcomplete; specifications specification status comment navigation timingthe definition of 'performancetiming.domcomplete' in that specification.
PerformanceTiming.domContentLoadedEventEnd - Web APIs
syntax time = performancetiming.domcontentloadedeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.domcontentloadedeventend' in that specification.
PerformanceTiming.domContentLoadedEventStart - Web APIs
syntax time = performancetiming.domcontentloadedeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.domcontentloadedeventstart' in that specification.
PerformanceTiming.domInteractive - Web APIs
syntax time = performancetiming.dominteractive; specifications specification status comment navigation timingthe definition of 'performancetiming.dominteractive' in that specification.
PerformanceTiming.domLoading - Web APIs
syntax time = performancetiming.domloading; specifications specification status comment navigation timingthe definition of 'performancetiming.domloading' in that specification.
PerformanceTiming.domainLookupEnd - Web APIs
syntax time = performancetiming.domainlookupend; specifications specification status comment navigation timingthe definition of 'performancetiming.domainlookupend' in that specification.
PerformanceTiming.domainLookupStart - Web APIs
syntax time = performancetiming.domainlookupstart; specifications specification status comment navigation timingthe definition of 'performancetiming.domainlookupstart' in that specification.
PerformanceTiming.fetchStart - Web APIs
syntax time = performance.timing.fetchstart; specifications specification status comment navigation timingthe definition of 'performancetiming.fetchstart' in that specification.
PerformanceTiming.loadEventEnd - Web APIs
syntax time = performancetiming.loadeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.loadeventend' in that specification.
PerformanceTiming.loadEventStart - Web APIs
syntax time = performancetiming.loadeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.loadeventstart' in that specification.
PerformanceTiming.navigationStart - Web APIs
syntax time = performancetiming.navigationstart; specifications specification status comment navigation timingthe definition of 'performancetiming.navigationstart' in that specification.
PerformanceTiming.redirectEnd - Web APIs
syntax time = performancetiming.redirectend; specifications specification status comment navigation timingthe definition of 'performancetiming.redirectend' in that specification.
PerformanceTiming.redirectStart - Web APIs
syntax time = performancetiming.redirectstart; specifications specification status comment navigation timingthe definition of 'performancetiming.redirectstart' in that specification.
PerformanceTiming.requestStart - Web APIs
syntax time = performancetiming.requeststart; specifications specification status comment navigation timingthe definition of 'performancetiming.requeststart' in that specification.
PerformanceTiming.responseEnd - Web APIs
syntax time = performancetiming.responseend; specifications specification status comment navigation timingthe definition of 'performancetiming.responseend' in that specification.
PerformanceTiming.responseStart - Web APIs
syntax time = performancetiming.responsestart; specifications specification status comment navigation timingthe definition of 'performancetiming.responsestart' in that specification.
PerformanceTiming.secureConnectionStart - Web APIs
syntax time = performancetiming.secureconnectionstart; specifications specification status comment navigation timingthe definition of 'performancetiming.secureconnectionstart' in that specification.
PerformanceTiming.unloadEventEnd - Web APIs
syntax time = performancetiming.unloadeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.unloadeventend' in that specification.
PerformanceTiming.unloadEventStart - Web APIs
syntax time = performancetiming.unloadeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.unloadeventstart' in that specification.
PeriodicWave.PeriodicWave() - Web APIs
syntax var mywave = new periodicwave(context, options); parameters inherits parameters from the audionodeoptions dictionary.
PermissionStatus.onchange - Web APIs
syntax permissionstatus.onchange = function() { ...
PermissionStatus.state - Web APIs
syntax var permission = permissionstatus.state; example navigator.permissions.query({name:'geolocation'}).then(function(permissionstatus) { console.log('geolocation permission state is ', permissionstatus.state); permissionstatus.onchange = function() { console.log('geolocation permission status has changed to ', this.state); }; }); specification specification status comment permissionsthe definition of 'state' in that specification.
Permissions.query() - Web APIs
WebAPIPermissionsquery
syntax navigator.permissions.query(permissiondescriptor).then(function(permissionstatus) { ...
Permissions.revoke() - Web APIs
syntax this method is called on the global permissions object navigator.permissions.
PhotoCapabilities.fillLightMode - Web APIs
syntax const lightmodes = photocapabilities.filllightmode value an array of available fill light modes.
PhotoCapabilities.imageHeight - Web APIs
syntax var mediasettingsrange = photocapabilities.imageheight value a mediasettingsrange object.
imageWidth - Web APIs
syntax var mediasettingsrange = photocapabilities.imagewidth value a mediasettingsrange is an object.
PhotoCapabilities.redEyeReduction - Web APIs
syntax const redeyereduction = photocapabilities.redeyereduction value one of "never", "always", or "controllable".
PointerEvent.PointerEvent() - Web APIs
syntax event = new pointerevent(type, pointereventinit); arguments type is a domstring representing the name of the event (see pointerevent event types).
PointerEvent.getCoalescedEvents() - Web APIs
syntax var pointerevents[] = pointerevent.getcoalescedevents() parameters none.
PointerEvent.height - Web APIs
syntax var contactheight = pointerevent.height; return value contactheight the height of the event's contact area (in css pixels).
PointerEvent.isPrimary - Web APIs
syntax var isprimary = pointerevent.isprimary; return value isprimary returns true if the pointer for this event is the primary pointer and returns false otherwise.
PointerEvent.pointerId - Web APIs
syntax var id = pointerevent.pointerid; return value id the pointer event's unique identifier number.
PointerEvent.pointerType - Web APIs
syntax var ptype = pointerevent.pointertype; return value ptype the event's pointer type.
PointerEvent.pressure - Web APIs
syntax var pressure = pointerevent.pressure; return value pressure the normalized pressure of the pointer input in the range of 0 to 1, inclusive, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.
PointerEvent.tangentialPressure - Web APIs
syntax var tanpressure = pointerevent.tangentialpressure; return value a float representing the normalized tangential pressure of the pointer input in the range -1 to 1, inclusive, where 0 is the neutral position of the control.
PointerEvent.tiltX - Web APIs
syntax var tiltx = pointerevent.tiltx; return value tiltx the angle in degrees between the y-z plane of the pointer (stylus) and the screen.
PointerEvent.tiltY - Web APIs
syntax var tilty = pointerevent.tilty; return value tilty the angle in degrees between the x-z plane of the pointer (stylus) and the screen.
PointerEvent.twist - Web APIs
syntax var twist = pointerevent.twist; return value a long value representing the amount of twist, in degrees, applied to the transducer (pointer).
PointerEvent.width - Web APIs
syntax var contactwidth = pointerevent.width; return value contactwidth the width of the event's contact area (in css pixels).
PopStateEvent - Web APIs
syntax window.onpopstate = funcref; funcref is a handler function.
PositionOptions.enableHighAccuracy - Web APIs
syntax positionoptions.enablehighaccuracy = booleanvalue specifications specification status comment geolocation apithe definition of 'positionoptions.enablehighaccuracy' in that specification.
PositionOptions.maximumAge - Web APIs
syntax positionoptions.maximumage = timelength specifications specification status comment geolocation apithe definition of 'positionoptions.maximumage' in that specification.
PositionOptions.timeout - Web APIs
syntax positionoptions.timeout = timelength specifications specification status comment geolocation apithe definition of 'positionoptions.timeout' in that specification.
ProgressEvent() - Web APIs
syntax progressevent = new progressevent(type, {lengthcomputable: abooleanvalue, loaded: anumber, total: anumber}); arguments the progressevent() constructor also inherits arguments from event().
ProgressEvent.initProgressEvent() - Web APIs
do not use it anymore, use the standard constructor, progressevent(), to create a synthetic progressevent syntax progress.initprogressevent(typearg, canbubblearg, cancelablearg, lengthcomputable, loaded, total); parameters typearg is a domstring identifying the specific type of animation event that occurred.
ProgressEvent.lengthComputable - Web APIs
syntax flag = progressevent.lengthcomputable specifications specification status comment xmlhttprequestthe definition of 'progressevent.lengthcomputable' in that specification.
ProgressEvent.loaded - Web APIs
syntax value = progressevent.loaded specifications specification status comment xmlhttprequestthe definition of 'progressevent.loaded' in that specification.
ProgressEvent.total - Web APIs
syntax value = progressevent.total specifications specification status comment xmlhttprequestthe definition of 'progressevent.lengthcomputable' in that specification.
PromiseRejectionEvent() - Web APIs
syntax promiserejectionevent = promiserejectionevent(type, options); parameters the promiserejectionevent() constructor also inherits parameters from event().
PromiseRejectionEvent.promise - Web APIs
syntax promise = promiserejectionevent.promise value the javascript promise which was rejected, and whose rejection went unhandled.
PromiseRejectionEvent.reason - Web APIs
syntax reason = promiserejectionevent.reason value a value or object which provides information you can use to understand why the promise was rejected.
PublicKeyCredential.getClientExtensionResults() - Web APIs
syntax maparraybuffer = publickeycredential.getclientextensionresults() parameters none.
PublicKeyCredential.id - Web APIs
syntax id = publickeycredential.id value a domstring being the base64url encoded version of publickeycredential.rawid.
PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() - Web APIs
syntax publickeycredential.isuserverifyingplatformauthenticatoravailable() parameters none.
PublicKeyCredential.rawId - Web APIs
syntax rawid = publickeycredential.rawid value a arraybuffer containing the identifier of the credentials.
PublicKeyCredential.response - Web APIs
syntax response = publickeycredential.response value an authenticatorresponse object containing the data a relying party's script will receive and which should be sent to the relying party's server in order to validate the demand for creation or fetching.
PublicKeyCredentialCreationOptions.attestation - Web APIs
syntax attestation = publickeycredentialcreationoptions.attestation value a string which may be "none": the relying party is not interested in this attestation.
PublicKeyCredentialCreationOptions.authenticatorSelection - Web APIs
syntax authenticatorselection = publickeycredentialcreationoptions.authenticatorselection value an object with the following properties: authenticatorattachmentoptional a string which is either "platform" or "cross-platform".
PublicKeyCredentialCreationOptions.challenge - Web APIs
syntax challenge = publickeycredentialcreationoptions.challenge value a buffersource which is at least 16 bytes long.
PublicKeyCredentialCreationOptions.excludeCredentials - Web APIs
syntax excludecredentials = publickeycredentialcreationoptions.excludecredentials value an array whose elements are objects with the following properties: type a string describing type of public-key credential to be created.
PublicKeyCredentialCreationOptions.extensions - Web APIs
syntax extensions = publickeycredentialcreationoptions.extensions value an object with various keys and values.
PublicKeyCredentialCreationOptions.pubKeyCredParams - Web APIs
syntax pubkeycredparams = publickeycredentialcreationoptions.pubkeycredparams value an array whose elements are objects with the following properties: type a string describing type of public-key credential to be created.
PublicKeyCredentialCreationOptions.rp - Web APIs
syntax relyingpartyobj = publickeycredentialcreationoptions.rp properties icon optional an url as a usvstring value which points to an image resource which can be the logo/icon of the relying party.
PublicKeyCredentialCreationOptions.timeout - Web APIs
syntax timeout = publickeycredentialcreationoptions.timeout value a numerical hint, expressed in milliseconds, giving the time to wait for the creation operation to complete.
PublicKeyCredentialCreationOptions.user - Web APIs
syntax useraccount = publickeycredentialcreationoptions.user properties displayname a domstring which is human readable and intended for display.
PublicKeyCredentialRequestOptions.allowCredentials - Web APIs
syntax allowcredentials = publickeycredentialrequestoptions.allowcredentials value an array whose elements are objects with the following properties: type a string describing type of public-key credential to be created.
PublicKeyCredentialRequestOptions.challenge - Web APIs
syntax challenge = publickeycredentialrequestoptions.challenge value a buffersource which is at least 16 bytes long.
PublicKeyCredentialRequestOptions.extensions - Web APIs
syntax extensions = publickeycredentialrequestoptions.extensions value an object with various keys and values.
PublicKeyCredentialRequestOptions.rpId - Web APIs
syntax rpid = publickeycredentialrequestoptions.rpid value a usvstring for the identifier of the relying party.
PublicKeyCredentialRequestOptions.timeout - Web APIs
syntax timeout = publickeycredentialrequestoptions.timeout value a numerical hint, expressed in milliseconds, giving the time to wait for the creation operation to complete.
PublicKeyCredentialRequestOptions.userVerification - Web APIs
syntax userverification = publickeycredentialrequestoptions.userverification value a string qualifying how the user verification should be part of the authentication process.
PushEvent.PushEvent() - Web APIs
syntax var mypushevent = new pushevent(type, eventinitdict); parameters type a domstring defining the type of pushevent.
PushEvent.data - Web APIs
WebAPIPushEventdata
syntax var mypushdata = pushevent.data; value a pushmessagedata object.
PushManager.getSubscription() - Web APIs
syntax ​pushmanager.getsubscription().then(function(pushsubscription) { ...
PushManager.hasPermission() - Web APIs
syntax ​pushmanager.haspermission().then(function(pushpermissionstatus) { ...
PushManager.permissionState() - Web APIs
syntax pushmanager.permissionstate(options).then(function(pushmessagingstate) { ...
PushManager.register() - Web APIs
syntax var request = navigator.push.register(); return a domrequest object to handle the success or failure of the method call.
PushManager.registrations() - Web APIs
syntax var request = navigator.push.registrations(); return a domrequest object to handle the success or failure of the method call.
PushManager.subscribe() - Web APIs
syntax ​pushmanager.subscribe(options).then(function(pushsubscription) { ...
PushManager.supportedContentEncodings - Web APIs
syntax var encodings[] = pushmanager.supportedcontentencodings value an array of strings.
PushManager.unregister() - Web APIs
syntax var request = navigator.push.unregister(pushendpoint); properties pushendpoint a pushendpoint to be unregistered.
PushMessageData.arrayBuffer() - Web APIs
syntax var myarraybuffer = pushevent.data.arraybuffer(); parameters none.
PushMessageData.blob() - Web APIs
syntax var myblob = pushevent.data.blob(); parameters none.
PushMessageData.json() - Web APIs
syntax var mydata = pushevent.data.json(); parameters none.
PushMessageData.text() - Web APIs
syntax var mytext = pushevent.data.text(); parameters none.
PushSubscription.endpoint - Web APIs
syntax var myend = pushsubscription.endpoint; value a usvstring.
PushSubscription.expirationTime - Web APIs
syntax var expirationtime = pushsubscription.expirationtime value a domhighrestimestamp.
PushSubscription.getKey() - Web APIs
syntax ​var key = subscription.getkey(name); parameters name a domstring representing the encryption method used to generate a client key.
PushSubscription.options - Web APIs
syntax var options = pushsubscription.options value an read-only options object containing the following values: uservisibleonly: a boolean, indicating that the returned push subscription will only be used for messages whose effect is made visible to the user.
PushSubscription.subscriptionId - Web APIs
syntax var subid = pushsubscription.subscriptionid; specifications specification status comment push api working draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
PushSubscription.toJSON() - Web APIs
syntax ​mysubscription = subscription.tojson() parameters none.
PushSubscription.unsubscribe() - Web APIs
syntax ​pushsubscription.unsubscribe().then(function(boolean) { ...
RTCConfiguration.bundlePolicy - Web APIs
syntax let rtcconfiguration = { bundlepolicy: policy }; rtcconfiguration.bundlepolicy = policy; value a domstring identifying the sdp bundling policy to use for the rtp streams used by the rtcpeerconnection.
RTCConfiguration.certificates - Web APIs
syntax let rtcconfiguration = { certificates: certificatelist }; let rtcconfiguration.certificates = [ cert1...
RTCConfiguration.iceServers - Web APIs
syntax let rtcconfiguration = { iceservers: [ iceserver1...
RTCConfiguration.iceTransportPolicy - Web APIs
syntax let rtcconfiguration = { icetransportpolicy: policy }; rtcconfiguration.icetransportpolicy = policy; let policy = rtcconfiguration.icetransportpolicy; value a domstring which indicates what ice candidate policy the ice agent should use during the negotiation process, per the jsep standard.
RTCDTMFSender.insertDTMF() - Web APIs
syntax rtcdtmfsender.insertdtmf(tones[, duration[, intertonegap]]); parameters tones a domstring containing the dtmf codes to be transmitted to the recipient.
RTCDTMFSender.ontonechange - Web APIs
syntax rtcdtmfsender.ontonechange = tonechangehandlerfunction; value a function which is called when a tonechange event is sent to the rtcdtmfsender, indicating that a dtmf tone has either started playing, or if all tones have finished playing.
RTCDTMFSender.toneBuffer - Web APIs
syntax var tonebuffer = rtcdtmfsender.tonebuffer; value a domstring listing the tones to be played.
RTCDTMFToneChangeEvent.RTCDTMFToneChangeEvent() - Web APIs
syntax var event = new rtcdtmftonechangeevent(type, options); parameters type a domstring containing the name of the event.
RTCDTMFToneChangeEvent.tone - Web APIs
syntax var tone = dtmftonechangeevent.tone; example this example establishes a handler for the tonechange event which updates an element to display the currently playing tone in its content, or, if all tones have played, the string "<none>".
RTCDataChannel.binaryType - Web APIs
syntax var type = adatachannel.binarytype; adatachannel.binarytype = type; value a domstring that can have one of these values: "blob" received binary messages' contents will be contained in blob objects.
RTCDataChannel.bufferedAmount - Web APIs
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.
RTCDataChannel.bufferedAmountLowThreshold - Web APIs
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.onbufferedamountlo...
RTCDataChannel.close() - Web APIs
syntax rtcdatachannel.close(); parameters none.
RTCDataChannel.id - Web APIs
WebAPIRTCDataChannelid
syntax var id = adatachannel.id; value an unsigned short value (that is, an integer between 0 and 65,535) which uniquely identifies the data channel.
RTCDataChannel.label - Web APIs
syntax var name = adatachannel.label; value a string identifier assigned by the web site or app when the data channel was created, as specified when rtcpeerconnection.createdatachannel() was called to create the channel.
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.maxRetransmits - Web APIs
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.
RTCDataChannel.negotiated - Web APIs
syntax var negotiated = adatachannel.negotiated; value true if the rtcdatachannel's connection was negotiated by the web app itself; false if the negotiation was handled by the webrtc layer.
RTCDataChannel.onbufferedamountlow - Web APIs
syntax rtcdatachannel.onbufferedamountlow = function; value a function which the browser will call to handle the bufferedamountlow event.
RTCDataChannel.onclose - Web APIs
syntax rtcdatachannel.onclose = function; value a function which the browser will call to handle the close event.
RTCDataChannel.onclosing - Web APIs
syntax rtcdatachannel.onclosing = function; value a function which the browser will call to handle the closing event.
RTCDataChannel.onerror - Web APIs
syntax rtcdatachannel.onerror = function; value a function which the browser will call to handle the error event when it occurs on the data channel.
RTCDataChannel.onmessage - Web APIs
syntax rtcdatachannel.onmessage = function; value a function which the browser will call to handle the message event.
RTCDataChannel.onopen - Web APIs
syntax rtcdatachannel.onopen = function; value a function which the browser will call to handle the open event.
RTCDataChannel.ordered - Web APIs
syntax var ordered = adatachannel.ordered; a boolean value which is true if in-order delivery is guaranteed and is otherwise false.
RTCDataChannel.protocol - Web APIs
syntax var subprotocol = adatachannel.protocol; value a string identifying the app-defined subprotocol being used for exchanging data on the channel.
RTCDataChannel.readyState - Web APIs
syntax var state = adatachannel.readystate; values a string which is one of the values in the rtcdatachannelstate enum, indicating the current state of the underlying data transport.
RTCDataChannel.reliable - Web APIs
syntax var reliable = adatachannel.reliable; value true if the rtcdatachannel's connection is reliable; false if it isn't.
RTCDataChannel.send() - Web APIs
syntax rtcdatachannel.send(data); parameters data the data to transmit across the connection.
RTCDataChannel.stream - Web APIs
syntax var stream = adatachannel.stream; value an unsigned short value (that is, an integer between 0 and 65,535) which uniquely identifies the data channel.
RTCDataChannelEvent() - Web APIs
syntax var event = new rtcdatachannelevent(type, rtcdatachanneleventinit); parameters type a domstring which specifies the name of the event.
RTCDataChannelEvent.channel - Web APIs
syntax var channel = rtcdatachannelevent.channel; value a rtcdatachannel object representing the data channel linking the receiving rtcpeerconnection to its remote peer.
RTCDtlsTransport.iceTransport - Web APIs
syntax var icetransport = rtcdtlstransport.icetransport; value the underlying rtcicetransport instance.
RTCDtlsTransport.state - Web APIs
syntax let mystate = dtlstransport.state; value a string whose value is taken from the rtcdtlstransportstate enumerated type.
RTCIceCandidate.RTCIceCandidate() - Web APIs
syntax candidate = new rtcicecandidate([candidateinfo]); parameters candidateinfo optional an optional rtcicecandidateinit object providing information about the candidate; if this is provided, the candidate is initialized configured to represent the described candidate.
RTCIceCandidate.address - Web APIs
syntax var address = rtcicecandidate.address; value a domstring providing the ip address from which the candidate comes.
RTCIceCandidate.component - Web APIs
syntax var component = rtcicecandidate.component; value a domstring which is "rtp" for rtp (or rtp and rtcp multiplexed together) candidates or "rtcp" for rtcp candidates.
RTCIceCandidate.foundation - Web APIs
as such, the foundation can be used to correlate candidates that are present on multiple rtcicetransport objects syntax var foundation = rtcicecandidate.foundation; value a domstring which uniquely identifies the candidate across all rtcicetransports on which it is available.
RTCIceCandidate.port - Web APIs
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.
RTCIceCandidate.priority - Web APIs
syntax var priority = rtcicecandidate.priority; value a long, unsigned integer value indicating the priority of the candidate according to the remote peer.
RTCIceCandidate.protocol - Web APIs
syntax var protocol = rtcicecandidate.protocol; value a domstring which indicates what network protocol the candidate uses, udp or tcp.
RTCIceCandidate.relatedAddress - Web APIs
syntax var reladdress = rtcicecandidate.relatedaddress; value a domstring which contains the candidate's related address.
RTCIceCandidate.relatedPort - Web APIs
syntax var relport = rtcicecandidate.relatedport; value an unsigned 16-bit value containing the candidate's related port number, if any.
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.sdpMid - Web APIs
syntax var sdpmid = rtcicecandidate.sdpmid; value a domstring which uniquely identifies the source media component from which the candidate draws data, or null if no such association exists for the candidate.
RTCIceCandidate.tcpType - Web APIs
syntax var tcptype = rtcicecandidate.tcptype; value a domstring whose value is one of those defined by the rtcicetcpcandidatetype enumerated type.
RTCIceCandidate. toJSON() - Web APIs
syntax json = rtcicecandidate.tojson(); return value an object conforming to the rtcicecandidateinit dictionary, whose members' values are set to the corresponding values in the rtcicecandidate object.
RTCIceCandidate.type - Web APIs
syntax var type = rtcicecandidate.type; value a domstring whose value is one of those defined by the rtcicecandidatetype enumerated type.
RTCIceCandidate.usernameFragment - Web APIs
syntax var ufrag = rtcicecandidate.usernamefragment; value a domstring containing the username fragment (usually referred to in shorthand as "ufrag" or "ice-ufrag") that, along with the ice password ("ice-pwd"), uniquely identifies a single ongoing ice interaction, including for any communication with the stun server.
RTCIceCandidateInit.candidate - Web APIs
the syntax of the candidate string is described in rfc 5245, section 15.1.
RTCIceCandidatePair.local - Web APIs
syntax localcandidate = rtcicecandidatepair.local; value an rtcicecandidate which describes the configuration of the local end of a viable pair of ice candidates.
RTCIceCandidatePair.remote - Web APIs
syntax remotecandidate = rtcicecandidatepair.remote; value an rtcicecandidate which describes the configuration of the remote end of a viable pair of ice candidates.
RTCIceCandidatePairStats.availableIncomingBitrate - Web APIs
syntax availableincomingbitrate = rtcicecandidatepairstats.availableincomingbitrate; value a floating-point value which approximates the amount of available bandwidth for incoming data on the network connection described by the rtcicecandidatepair.
RTCIceCandidatePairStats.availableOutgoingBitrate - Web APIs
syntax availableoutgoingbitrate = rtcicecandidatepairstats.availableoutgoingbitrate; value a floating-point value which approximates the amount of available bandwidth for outgoing data on the network connection described by the rtcicecandidatepair.
RTCIceCandidatePairStats.bytesReceived - Web APIs
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
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.circuitBreakerTriggerCount - Web APIs
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.
RTCIceCandidatePairStats.consentExpiredTimestamp - Web APIs
syntax consentexpiration = rtcicecandidatepairstats.consentexpiredtimestamp; value a domhighrestimestamp object that indicates the time at which the stun binding that allows the two peers described by this rtcicecandidatepair to communicate will expire (or the time at which the binding did expire, if the time has passed).
RTCIceCandidatePairStats.consentRequestsSent - Web APIs
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.currentRoundTripTime - Web APIs
syntax rtt = rtcicecandidatepairstats.currentroundtriptime; value a floating-point value indicating the round-trip time, in seconds for the connection described by the pair of candidates for which this rtcicecandidatepairstats object offers statistics.
RTCIceCandidatePairStats.firstRequestTimestamp - Web APIs
syntax firstrequesttimestamp = rtcicecandidatepairstats.firstrequesttimestamp; value a domhighrestimestamp object indicating the timestamp at which the first stun request was sent on the connection described by the described pair of candidates.
RTCIceCandidatePairStats.lastPacketReceivedTimestamp - Web APIs
syntax lastpacketreceivedtimestamp = rtcicecandidatepairstats.lastpacketreceivedtimestamp; value a domhighrestimestamp object indicating the timestamp at which the connection described by pair of candidates last received a packet, stun packets excluded.
RTCIceCandidateStats.lastPacketSentTimestamp - Web APIs
syntax lastpacketsenttimestamp = rtcicecandidatepairstats.lastpacketsenttimestamp; value a domhighrestimestamp object indicating the timestamp at which the connection described by pair of candidates last sent a packet, stun packets excluded.
RTCIceCandidatePairStats.lastRequestTimestamp - Web APIs
syntax lastrequesttimestamp = rtcicecandidatepairstats.lastrequesttimestamp; value a domhighrestimestamp object indicating the timestamp at which the last (most recent) stun request was sent on the connection indicated by the described pair of candidates.
RTCIceCandidateStats.lastResponseTimestamp - Web APIs
syntax lastresponsetimestamp = rtcicecandidatepairstats.lastresponsetimestamp; value a domhighrestimestamp object indicating the timestamp at which the most recent stun response was received on the connection defined by the described pair of candidates.
RTCIceCandidateStats.localCandidateId - Web APIs
syntax localcandidateid = rtcicecandidatepairstats.localcandidateid; value a domstring giving a unique identifier for the local rtcicecandidate for the connection described by this rtcicecandidatepairstats object.
RTCIceCandidatePairStats.nominated - Web APIs
syntax nominated = rtcicecandidatepairstats.nominated; value a boolean value which is set to true by the ice layer if the controlling user agent has indicated that the candidate pair should be used to configure the webrtc connection between the two peers.
RTCIceCandidatePairStats.packetsReceived - Web APIs
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
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.priority - Web APIs
syntax pairpriority = rtcicecandidatepairstats.priority; value an integer value indicating the priority of this pair of candidates as compared to other pairs on the same peer connection.
RTCIceCandidatePairStats.readable - Web APIs
syntax isreadable = rtcicecandidatepairstats.readable; value a boolean value which is true if the connection described by this candidate pair has received at least one valid ice request, and is therefore ready to be read from.
RTCIceCandidatePairStats.remoteCandidateId - Web APIs
syntax remotecandidateid = rtcicecandidatepairstats.remotecandidateid; value a domstring uniquely identifies the remote ice candidate—that is, the candidate describing a configuration for the remote peer—which is represented by the remote end of these statistics.
RTCIceCandidatePairStats.requestsReceived - Web APIs
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.
RTCIceCandidatePairStats.requestsSent - Web APIs
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.
RTCIceCandidatePairStats.responsesReceived - Web APIs
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
syntax responsessent = rtcicecandidatepairstats.responsessent; value an integer value indicating the number of times a repsonse has been sent to a stun connectivity check request.
RTCIceCandidatePairStats.retransmissionsReceived - Web APIs
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
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.
RTCIceCandidatePairStats.selected - Web APIs
syntax isselected = icpstats.selected; value a firefox-specific boolean value which is true if the candidate pair described by this object is the one currently in use.
RTCIceCandidatePairStats.state - Web APIs
syntax state = rtcicecandidatepairstats.state; value a domstring whose value is one of those found in the rtcstatsicecandidatepairstate enumerated type.
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.
RTCIceCandidatePairStats.transportId - Web APIs
syntax transportid = rtcicecandidatepairstats.transportid; value a domstring which uniquely identifies the rtcicetransport object from which the transport-related data was obtained for the statistics contained in this rtcicecandidatepairstats object.
RTCIceCandidatePairStats.writable - Web APIs
syntax iswritable = rtcicecandidatepairstats.writable; value a boolean value which is true if the connection described by this candidate pair has received acknowledgement of receipt (ack) for at least one ice request and that stun consent hasn't expired.
RTCIceCandidateStats.address - Web APIs
syntax candidateaddress = rtcicecandidatestats.address; value either an ipv4 or ipv6 address or a fully-qualified domain name, which corresponds to the candidate.
RTCIceCandidateStats.candidateType - Web APIs
syntax candidatetype = rtcicecandidatestats.candidatetype; value a domstring whose value is one of the strings found in the rtcicecandidatetype enumerated type:host the candidate is a host candidate, whose ip address as specified in the rtcicecandidate.ip property is in fact the true address of the remote peer.
RTCIceCandidateStats.deleted - Web APIs
syntax isdeleted = rtcicecandidatestats.deleted; value a boolean value indicating whether or not the candidate has been deleted or released.
RTCIceCandidateStats.mozLocalTransport - Web APIs
syntax instead of using mozlocaltransport, you should use code like this: localtransport = rtcicecandidatestats.relayprotocol; specifications not part of any specification.
RTCIceCandidateStats.networkType - Web APIs
syntax networktype = rtcicecandidatestats.networktype; value a domstring whose value is taken from the rtcnetworktype enumerated type.
RTCIceCandidateStats.port - Web APIs
syntax candidateport = rtcicecandidatestats.port; value an integer value indicating the network port used by the rtcicecandidate described by the rtcicecandidatestats object.
RTCIceCandidateStats.priority - Web APIs
syntax priority = rtcicecandidatestats.priority; value a positive integer indicating the priority of the rtcicecandidate described by the rtcicecandidatestats object.
RTCIceCandidateStats.protocol - Web APIs
syntax protocol = rtcicecandidatestats.protocol; value the value is one of the members of the rtciceprotocol enumerated string type: tcp the candidate, if selected, would use tcp as the transport protocol for its data.
RTCIceCandidateStats.relayProtocol - Web APIs
syntax relayprotocol = rtcicecandidatestats.relayprotocol; value a domstring identifying the protocol being used by the endpoint to communicate with the turn server.
RTCIceCandidateStats.transportId - Web APIs
syntax transportid = rtcicecandidatestats.transportid; value a domstring whose value uniquely identifies the transport from which any transport-related information accumulated in the rtcicecandidatestats was taken.
RTCIceCandidateStats.url - Web APIs
syntax url = rtcicecandidatestats.url; value a domstring specifying the url of the ice server from which the candidate described by the rtcicecandidatestats was obtained.
RTCIceParameters.password - Web APIs
syntax password = rtciceparameters.password; value a domstring containing the password that corresponds to the transport's usernamefragment string specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceparameters.password' in that specification.
RTCIceParameters.usernameFragment - Web APIs
syntax ufrag = rtciceparameters.usernamefragment; value a domstring containing the username fragment that, in tandem with the password, uniquely identify the ice session being used by the transport.
RTCIceServer.credential - Web APIs
syntax var iceserver = { ...
RTCIceServer.credentialType - Web APIs
syntax var iceserver = { ...
RTCIceServer.url - Web APIs
WebAPIRTCIceServerurl
syntax var iceserver = { ...
RTCIceServers.urls - Web APIs
WebAPIRTCIceServerurls
syntax var iceserver = { urls = iceserverurl | [ url1, ..., urln ], username: "webrtc", // optional credential: "turnpassword" // optional }; iceservers.push(iceserver); the value of this property may be specified as a single url or as an array of multiple urls.
RTCIceServer.username - Web APIs
syntax var iceserver = { ...
RTCIceTransport.component - Web APIs
syntax icecomponent = rtcicetransport.component; value a domstring whose value comes from the enumerated type rtcicecomponent: "rtp" identifies an ice transport which is being used for the real-time transport protocol (rtp), or for rtp multiplexed with the rtp control protocol (rtcp).
RTCIceTransport.gatheringState - Web APIs
syntax gatherstate = rtcicetransport.gatheringstate; value a string from the rtcicegathererstate enumerated type whose value indicates the current state of the ice agent's candidate gathering process: "new" the rtcicetransport is newly created and has not yet started to gather ice candidates.
RTCIceTransport.getLocalCandidates() - Web APIs
syntax localcandidates = rtcicetransport.getlocalcandidates(); parameters none.
RTCIceTransport.getLocalParameters() - Web APIs
syntax parameters = rtcicetransport.getlocalparameters(); parameters none.
RTCIceTransport.getRemoteCandidates() - Web APIs
syntax remotecandidates = rtcicetransport.getremotecandidates(); parameters none.
RTCIceTransport.getRemoteParameters() - Web APIs
syntax parameters = rtcicetransport.getremoteparameters(); parameters none.
RTCIceTransport.getSelectedCandidatePair() - Web APIs
syntax candidatepair = rtcicetransport.getselectedcandidatepair(); parameters none.
RTCIceTransport.ongatheringstatechange - Web APIs
syntax rtcicetransport.ongatheringstatechange = statechangehandler; value a function to be called when the rtcicetransport object's gathering state changes.
RTCIceTransport.onselectedcandidatepairchange - Web APIs
syntax rtcicetransport.onselectedcandidatepairchange = candidatepairhandler; value this propoerty should be set to reference an event handler function to be called by the ice agent when it discovers a new candidate pair that the rtcicetransport will be using for communication with the remote peer.
RTCIceTransport.onstatechange - Web APIs
syntax rtcicetransport.onstatechange = statechangehandler; value set this property to reference a function you provide that is called by the webrtc layer when the rtcicetransport object's state changes.
RTCIceTransport.role - Web APIs
syntax icerole = rtcicetransport.role; value a domstring specifying whether the rtcicetransport represents the controlling agent or the controlled agent.
RTCIceTransport.state - Web APIs
syntax icestate = icetransport.state; value a domstring, whose value is one of those found in the enumerated type rtcicetransportstate, which indicates the stage of ice gathering that's currently underway.
RTCIdentityErrorEvent.idp - Web APIs
syntax var idp = event.idp; event.idp = "developer.mozilla.org"; example pc.onidpassertionerror = function( ev ) { alert("the idp named '" + ev.idp + "' encountered an error " + "while generating an assertion."); } ...
RTCIdentityErrorEvent.loginUrl - Web APIs
syntax var loginurl = event.loginurl; event.loginurl = "https://developer.mozilla.org/fakeurl"; example pc.onidpassertionerror = function( ev ) { alert("the idp requested an authentication" + " to be performed at th3 url '" + ev.url + "'."); } ...
RTCIdentityErrorEvent.protocol - Web APIs
syntax var protocol = event.protocol; event.protocol = "idp.html"; example pc.onidpassertionerror = function( ev ) { alert("the idp uses the following protocol '" + ev.protocol + "."); } ...
RTCIdentityEvent.assertion - Web APIs
syntax var blob = event.assertion; example pc.onidentityresult = function( ev ) { alert("a new identity assertion (blob: '" + ev.assertion + "') has been generated."); } ...
RTCInboundRtpStreamStats.averageRtcpInterval - Web APIs
syntax var averagertcpinterval = rtcinboundrtpstreamstats.averagertcpinterval; value a floating-point value indicating the average interval, in seconds, between transmissions of rtcp packets.
RTCInboundRtpStreamStats.bytesReceived - Web APIs
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.fecPacketsDiscarded - Web APIs
syntax var fecpacketsdiscarded = rtcinboundrtpstreamstats.fecpacketsdiscarded; value an unsigned integer value indicating how many fec packets have been received whose error correction payload has been discarded.
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.firCount - Web APIs
syntax var fircount = rtcinboundrtpstreamstats.fircount; value an integer value indicating how many fir packets have been received by the sender during the current connection.
RTCInboundRtpStreamStats.framesDecoded - Web APIs
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.
RTCInboundRtpStreamStats.lastPacketReceivedTimestamp - Web APIs
syntax var lastpackettimestamp = rtcinboundrtpstreamstats.lastpacketreceivedtimestamp; value a domhighrestimestamp which specifies the time at which the most recently received packet arrived on this rtp stream.
RTCInboundRtpStreamStats.nackCount - Web APIs
syntax var nackcount = rtcinboundrtpstreamstats.nackcount; value an integer value indicating how many times the receiver sent a nack packet to the sender after detecting that one or more packets were lost during transport.
RTCInboundRtpStreamStats.packetsDuplicated - Web APIs
syntax var packetsduplicated = rtcinboundrtpstreamstats.packetsduplicated; value an integer value which specifies how many duplcate packets have been received by the local end of this rtp stream so far.
RTCInboundRtpStreamStats.packetsFailedDecryption - Web APIs
syntax var packetsfaileddecryption = rtcinboundrtpstreamstats.packetsfaileddecryption; value an integer value which indicates how many packets the local end of the rtp connection could not be successfully decrypted.
RTCInboundRtpStreamStats.perDscpPacketsReceived - Web APIs
syntax var perdscppacketsreceived = rtcinboundrtpstreamstats.perdscppacketsreceived; value a record comprised of string/value pairs.
RTCInboundRtpStreamStats.pliCount - Web APIs
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.qpSum - Web APIs
syntax var qpsum = rtcinboundrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent or received so far on the track described by the rtcinboundrtpstreamstats object.
RTCInboundRtpStreamStats.receiverId - Web APIs
syntax var receiverstatsid = rtcinboundrtpstreamstats.receiverid; value a domstring which contains the id of the rtcaudioreceiverstats or rtcvideoreceiverstats object which provides information about the rtcrtpreceiver which is receiving the streamed media.
RTCInboundRtpStreamStats.remoteId - Web APIs
syntax var remotestatsid = rtcinboundrtpstreamstats.remoteid; value a domstring containing the id of the rtcremoteoutboundrtpstreamstats object that represents the remote peer's rtcrtpsender for the synchronization source represented by this stats object.
RTCInboundRtpStreamStats.sliCount - Web APIs
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.
RTCInboundRtpStreamStats.trackId - Web APIs
syntax var trackstatsid = rtcinboundrtpstreamstats.trackid; value a domstring containing the id of the rtcreceiveraudiotrackattachmentstats or rtcreceivervideotrackattachmentstats object representing the track which is receiving the media from this rtp session.
RTCOfferAnswerOptions.voiceActivityDetection - Web APIs
syntax var options = { voiceactivitydetection: trueorfalse }; value a boolean value indicating whether or not the connection should use voice detection once running.
RTCOfferOptions.iceRestart - Web APIs
syntax var options = { icerestart: trueorfalse }; value a boolean value indicating whether or not the rtcpeerconnection should generate new values for the connection's ice-ufrag and ice-pwd values, which will trigger ice renegotiation on the next message sent to the remote peer.
RTCOutboundRtpStreamStats.averageRtcpInterval - Web APIs
syntax var averagertcpinterval = rtcoutboundrtpstreamstats.averagertcpinterval; value a floating-point value indicating the average interval, in seconds, between transmissions of rtcp packets.
RTCOutboundRtpStreamStats.firCount - Web APIs
syntax var fircount = rtcoutboundrtpstreamstats.fircount; value an integer value indicating how many fir packets have been received by the sender during the current connection.
RTCOutboundRtpStreamStats.framesEncoded - Web APIs
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.lastPacketSentTimestamp - Web APIs
syntax var lastpackettimestamp = rtcoutboundrtpstreamstats.lastpacketsenttimestamp; value a domhighrestimestamp which specifies the time at which the most recently received packet arrived on this rtp stream.
RTCOutboundRtpStreamStats.nackCount - Web APIs
syntax var nackcount = rtcoutboundrtpstreamstats.nackcount; value an integer value indicating how many times the sender received a nack packet from the receiver, indicating the loss of one or more packets.
RTCOutboundRtpStreamStats.perDscpPacketsSent - Web APIs
syntax var perdscppacketssent = rtcoutboundrtpstreamstats.perdscppacketssent; value a record comprised of string/value pairs.
RTCOutboundRtpStreamStats.pliCount - Web APIs
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.qpSum - Web APIs
syntax var qpsum = rtcoutboundrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent so far on the track described by the rtcoutboundrtpstreamstats object.
RTCOutboundRtpStreamStats.qualityLimitationReason - Web APIs
syntax var qualitylimitationreason = rtcoutboundrtpstreamstats.qualitylimitationreason; value a map whose keys are domstrings whose values come from the rtcqualitylimitationreason enumerated type, and whose values are the duration of the media, in seconds, whose quality was reduced for that reason.
RTCOutboundRtpStreamStats.remoteId - Web APIs
syntax var remotestatsid = rtcoutboundrtpstreamstats.remoteid; value a domstring containing the id of the rtcremoteinboundrtpstreamstats object that represents the remote peer's rtcrtpreceiver for the synchronization source represented by this stats object.
RTCOutboundRtpStreamStats.sliCount - Web APIs
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.
RTCOutboundRtpStreamStats.trackId - Web APIs
syntax var trackstatsid = rtcoutboundrtpstreamstats.trackid; value a domstring containing the id of the rtcsenderaudiotrackattachmentstats or rtcsendervideotrackattachmentstats object representing the track which is the source of the media being sent on this stream.
RTCPeerConnection() - Web APIs
syntax pc = new rtcpeerconnection([configuration]); parameters configuration optional an rtcconfiguration dictionary providing options to configure the new connection.
RTCPeerConnection.addIceCandidate() - Web APIs
syntax apromise = pc.addicecandidate(candidate); addicecandidate(candidate, successcallback, failurecallback); parameters candidate optional an object conforming to the rtcicecandidateinit dictionary, or an rtcicecandidate object; the contents of the object should be constructed from a message received over the signaling channel, describing a newly received ice candidate that's ready to be d...
RTCPeerConnection.addStream() - Web APIs
syntax rtcpeerconnection.addstream(mediastream); parameters mediastream a mediastream object indicating the stream to add to the webrtc peer connection.
RTCPeerConnection.addTrack() - Web APIs
syntax rtpsender = rtcpeerconnection.addtrack(track, stream...); parameters track a mediastreamtrack object representing the media track to add to the peer connection.
RTCPeerConnection.addTransceiver() - Web APIs
syntax rtptransceiver = rtcpeerconnection.addtransceiver(trackorkind, init); parameters trackorkind a mediastreamtrack to associate with the transceiver, or a domstring which is used as the kind of the receiver's track, and by extension of the rtcrtpreceiver itself.
RTCPeerConnection.canTrickleIceCandidates - Web APIs
syntax var cantrickle = rtcpeerconnection.cantrickleicecandidates; value a boolean that is true if the remote peer can accept trickled ice candidates and false if it cannot.
RTCPeerConnection.close() - Web APIs
syntax peerconnection.close(); this method has no parameters, and returns nothing.
RTCPeerConnection.connectionState - Web APIs
syntax var connectionstate = rtcpeerconnection.connectionstate; value the current state of the connection, as a value from the enum rtcpeerconnectionstate.
RTCPeerConnection.createAnswer() - Web APIs
syntax apromise = rtcpeerconnection.createanswer([options]); rtcpeerconnection.createanswer(successcallback, failurecallback[, options]); parameters options optional an object which contains options which customize the answer; this is based on the rtcansweroptions dictionary.
RTCPeerConnection.createOffer() - Web APIs
syntax apromise = mypeerconnection.createoffer([options]); mypeerconnection.createoffer(successcallback, failurecallback, [options]) parameters options optional an rtcofferoptions dictionary providing options requested for the offer.
RTCPeerConnection.currentLocalDescription - Web APIs
syntax sessiondescription = rtcpeerconnection.currentlocaldescription; return value the current description of the local end of the connection, if one has been set.
RTCPeerConnection.currentRemoteDescription - Web APIs
syntax sessiondescription = rtcpeerconnection.currentremotedescription; return value the current description of the remote end of the connection, if one has been set.
RTCPeerConnection.generateCertificate() - Web APIs
syntax var cert = rtcpeerconnection.generatecertificate(keygenalgorithm) parameters keygenalgorithm a domstring identifying the algorithm to use in creating the key.
RTCPeerConnection.getConfiguration() - Web APIs
syntax var configuration = rtcpeerconnection.getconfiguration(); parameters this method takes no input parameters.
RTCPeerConnection.getDefaultIceServers() - Web APIs
syntax var defaulticeservers = rtcpeerconnection.getdefaulticeservers(); return value an array of ice servers, specified as objects based on rtciceserver, which the browser will use if none are specified in the configuration of the rtcpeerconnection.
RTCPeerConnection.getIdentityAssertion() - Web APIs
syntax pc.getidentityassertion(); there is neither parameter nor return value for this method.
RTCPeerConnection.getReceivers() - Web APIs
each rtp receiver manages the reception and decoding of data for a mediastreamtrack on an rtcpeerconnection syntax var receivers = rtcpeerconnection.getreceivers(); return value an array of rtcrtpreceiver objects, one for each track on the connection.
RTCPeerConnection.getSenders() - Web APIs
syntax var senders = rtcpeerconnection.getsenders(); return value an array of rtcrtpsender objects, one for each track on the connection.
RTCPeerConnection.getStreamById() - Web APIs
syntax var mediastream = pc.getstream(id); parameters id is a domstring corresponding to the stream to return.
RTCPeerConnection.getTransceivers() - Web APIs
syntax transceiverlist = rtcpeerconnection.gettransceivers(); parameters none.
RTCPeerConnection.iceConnectionState - Web APIs
syntax var state = rtcpeerconnection.iceconnectionstate; value the current state of the ice agent and its connection.
RTCPeerConnection.iceGatheringState - Web APIs
syntax var state = rtcpeerconnection.icegatheringstate; value the possible values are those of an enum of type rtcicegatheringstate.
RTCPeerConnection.localDescription - Web APIs
syntax var sessiondescription = peerconnection.localdescription; on a more fundamental level, the returned value is the value of rtcpeerconnection.pendinglocaldescription if that property isn't null; otherwise, the value of rtcpeerconnection.currentlocaldescription is returned.
RTCPeerConnection.onaddstream - Web APIs
syntax rtcpeerconnection.onaddstream = eventhandler; value a function which handles addstream events.
RTCPeerConnection.onconnectionstatechange - Web APIs
syntax rtcpeerconnection.onconnectionstatechange = eventhandler; value a function which is called by the browser when the connectionstatechange event occurs on the rtcpeerconnection.
RTCPeerConnection.ondatachannel - Web APIs
syntax rtcpeerconnection.ondatachannel = function; value set this property to be a function you provide which receives as input a single parameter: an rtcdatachannelevent which provides in its channel property the rtcdatachannel which has been created.
RTCPeerConnection.onicecandidate - Web APIs
syntax rtcpeerconnection.onicecandidate = eventhandler; value this should be set to a function which you provide that accepts as input an rtcpeerconnectioniceevent object representing the icecandidate event.
RTCPeerConnection.onicecandidateerror - Web APIs
syntax rtcpeerconnection.onicecandidateerror = eventhandler; value this should be set to a function you provide which is passed a single parameter: an rtcpeerconnectioniceerrorevent object describing the icecandidateerror event.
RTCPeerConnection.oniceconnectionstatechange - Web APIs
syntax rtcpeerconnection.oniceconnectionstatechange = eventhandler; value this event handler can be set to function which is passed a single input parameter: an event object describing the iceconnectionstatechange event which occurred.
RTCPeerConnection.onicegatheringstatechange - Web APIs
syntax rtcpeerconnection.onicegatheringstatechange = eventhandler; value a function you provide which is passed a single parameter: an event object containing the icegatheringstatechange event.
RTCPeerConnection.onidentityresult - Web APIs
syntax peerconnection.onidentityresult = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
RTCPeerConnection.onidpassertionerror - Web APIs
syntax peerconnection.onidpassertionerror = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
RTCPeerConnection.onidpvalidationerror - Web APIs
syntax peerconnection.onidpvalidationerror = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
RTCPeerConnection.onnegotiationneeded - Web APIs
syntax rtcpeerconnection.onnegotiationneeded = eventhandler; value this should be set to a function you provide which is passed a single parameter: an event object containing the negotiationneeded event.
RTCPeerConnection.onpeeridentity - Web APIs
syntax peerconnection.onpeeridentity = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
RTCPeerConnection.onremovestream - Web APIs
syntax peerconnection.onremovestream = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
RTCPeerConnection.onsignalingstatechange - Web APIs
syntax rtcpeerconnection.onsignalingstatechange = errorhandler; value set this to a function which you provide that receives an event object as input; this contains the signalingstatechange event.
RTCPeerConnection.ontrack - Web APIs
syntax rtcpeerconnection.ontrack = eventhandler; value set ontrack to be a function you provide that accepts as input a rtctrackevent object describing the new track and how it's being used.
RTCPeerConnection.peerIdentity - Web APIs
syntax var identity = rtcpeerconnection.peeridentity; value a javascript promise which resolves to an rtcidentityassertion that describes the remote peer's identity.
RTCPeerConnection.pendingLocalDescription - Web APIs
syntax sessiondescription = rtcpeerconnection.pendinglocaldescription; return value if a local description change is in progress, this is an rtcsessiondescription describing the proposed configuration.
RTCPeerConnection.pendingRemoteDescription - Web APIs
syntax sessiondescription = rtcpeerconnection.pendingremotedescription; return value if a remote description change is in progress, this is an rtcsessiondescription describing the proposed configuration.
RTCPeerConnection.remoteDescription - Web APIs
syntax var sessiondescription = peerconnection.remotedescription; on a more fundamental level, the returned value is the value of rtcpeerconnection.pendingremotedescription if that property isn't null; otherwise, the value of rtcpeerconnection.currentremotedescription is returned.
RTCPeerConnection.removeStream() - Web APIs
syntax rtcpeerconnection.removestream(mediastream); parameters mediastream a mediastream specifying the stream to remove from the connection.
RTCPeerConnection.removeTrack() - Web APIs
syntax pc.removetrack(sender); parameters mediatrack a rtcrtpsender specifying the sender to remove from the connection.
RTCPeerConnection.restartIce() - Web APIs
syntax rtcpeerconnection.restartice(); parameters none.
RTCPeerConnection.sctp - Web APIs
syntax var sctp = rtcpeerconnection.sctp; value a rtcsctptransport object describing the sctp transport being used by the rtcpeerconnection for transmitting and receiving on its data channels, or null if sctp negotiation hasn't happened.
RTCPeerConnection.setIdentityProvider() - Web APIs
syntax pc.setidentityprovider(domainname [, protocol] [, username]); there is no return value for this method.
RTCPeerConnection.setLocalDescription() - Web APIs
syntax apromise = rtcpeerconnection.setlocaldescription(sessiondescription); pc.setlocaldescription(sessiondescription, successcallback, errorcallback); parameters sessiondescription optional an rtcsessiondescriptioninit or rtcsessiondescription which specifies the configuration to be applied to the local end of the connection.
RTCPeerConnection.signalingState - Web APIs
syntax var state = rtcpeerconnection.signalingstate; value the allowed values are those included in the enum rtcsignalingstate.
RTCPeerConnectionIceErrorEvent.address - Web APIs
syntax let address = rtcpeerconnectioniceerrorevent.address; value a domstring which specifies the local ip address of the network connection to the ice server with which negotiations were occurring when the error occurred.
RTCPeerConnectionIceEvent() - Web APIs
syntax var event = new rtcpeerconnectioniceevent(type, options); parameters type is a domstring containing the name of the event, like "icecandidate".
RTCPeerConnectionIceEvent.candidate - Web APIs
syntax var candidate = event.candidate; value an rtcicecandidate object representing the ice candidate that has been received, or null to indicate that there are no further candidates for this negotiation session.
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
syntax let localid = rtcremoteoutboundrtpstreamstats.localid; value a domstring which can be compared to the value of an rtcinboundrtpstreamstats object's remoteid property to see if the two represent statistics for each of the two sides of the same set of data received by the local peer.
RTCRemoteOutboundRtpStreamStats.remoteTimestamp - Web APIs
syntax let remotetimestamp = rtcremoteoutboundrtpstreamstats.remotetimestamp; value a domhighrestimestamp value indicating the timestamp on the remote peer at which it sent these statistics.
RTCRemoteOutboundRtpStreamStats.reportsSent - Web APIs
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.
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.
RTCRtpContributingSource.rtpTimestamp - Web APIs
syntax let rtptimestamp = rtcrtpcontributingsource.rtptimestamp value an integer value specifiying a source-generated timestamp indicating the time at which the media in this packet, scheduled for play out at the time indicated by timestamp, was initially sampled or generated.
RTCRtpContributingSource.source - Web APIs
syntax var sourceid = rtcrtpcontributingsource.source value an unsigned, 32-bit integer value which uniquely identifies the source of rtp packets described by this rtcrtpcontributingsource (in which case the value is a csrc identifier) or rtcrtpsynchronizationsource (the value is an ssrc identifier).
RTCRtpContributingSource.timestamp - Web APIs
syntax var domhighrestimestamp = rtcrtpcontributingsource.timestamp value a domhighrestimestamp which indicates the time at which the most recent rtp packet from the corresponding source was played out.
RTCRtpEncodingParameters.maxBitrate - Web APIs
syntax rtpencodingparameters.maxbitrate = maxbitspersecond; rtpencodingparameters = { maxbitrate: maxbitspersecond }; maxbitspersecond = rtpencodingparameters.maxbitrate; value an unsigned long integer value specifying the maximum bandwidth this encoding is permitted to use for a track of media it encodes in terms of bits per second.
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.getCapabilities() static function - Web APIs
syntax let rtpcapabilities = rtcrtpreceiver.getcapabilities(kind); parameters kind a domstring indicating the type of media for which you wish to get the device's capability to receive.
RTCRtpReceiver.getContributingSources() - Web APIs
syntax var rtcrtpcontributingsources = rtcrtpreceiver.getcontributingsources() parameters none.
RTCRtpReceiver.getParameters() - Web APIs
syntax let rtpreceiveparameters = rtpreceiver.getparameters(); parameters none.
RTCRtpReceiver.getStats() - Web APIs
syntax var promise = rtcrtpreceiver.getstats(); return value a javascript promise which is fulfilled once the statistics are available.
RTCRtpReceiver.getSynchronizationSources() - Web APIs
syntax var rtcrtpcontributingsources = rtcrtpreceiver.getcontributingsources() parameters none.
RTCRtpReceiver.track - Web APIs
syntax var mediastreamtrack = rtcrtpreceiver.track value a mediastreamtrack instance.
RTCRtpReceiver.transport - Web APIs
syntax let transport = rtcrtpreceiver.transport; value an rtcdtlstransport object representing the underlying transport being used by the receiver to exchange packets with the remote peer, or null if the receiver isn't yet connected to a transport.
RTCRtpSendParameters.encodings - Web APIs
syntax sendparameters.encodings = encodingparameterlist; encodingparameterlist = sendparameters.encodings; value an array of objects conforming to the rtcrtpencodingparameters dictionary, each of which contains properties which provide settings and parameters that describe and configure a single codec that could be used to encode the track.
RTCRtpSender.dtmf - Web APIs
WebAPIRTCRtpSenderdtmf
syntax var dtmfsender = rtcrtpsender.dtmf; value an rtcdtmfsender which can be used to send dtmf over the rtp session, or null if the track being carried by the rtp session or the rtcpeerconnection as a whole doesn't support dtmf.
RTCRtpSender.getCapabilities() static function - Web APIs
syntax let rtpcapabilities = rtcrtpsender.getcapabilities(kind); parameters kind a domstring indicating the type of media for which you wish to get the sender's capability to receive.
RTCRtpSender.getParameters() - Web APIs
syntax var rtpsendparameters = rtpsender.getparameters() parameters none.
RTCRtpSender.getStats() - Web APIs
syntax var promise = rtcrtpsender.getstats(); return value a javascript promise which is fulfilled once the statistics are available.
RTCRtpSender.replaceTrack() - Web APIs
syntax trackreplacedpromise = sender.replacetrack(newtrack); parameters newtrack optional a mediastreamtrack specifying the track with which to replace the rtcrtpsender's current source track.
RTCRtpSender.setParameters() - Web APIs
syntax var promise = rtcrtpsender.setparameters(parameters) parameters parameters an object conforming with the rtcrtpsendparameters dictionary, specifying options for the rtcrtpsender; these include potential codecs that could be use for encoding the sender's track.
RTCRtpSender.setStreams() - Web APIs
syntax rtcrtpsender.setstreams(mediastream); rtcrtpsender.setstreams([mediastream...]); parameters mediastream or [mediastream...] optional an mediastream object—or an array of multiple mediastream objects—identifying the streams to which the rtcrtpsender's track belongs.
RTCRtpSender.track - Web APIs
syntax var mediastreamtrack = rtcrtpsender.track value a mediastreamtrack object representing the media associated with the rtcrtpsender.
RTCRtpSender.transport - Web APIs
syntax let transport = rtcrtpsender.transport; value an rtcdtlstransport object representing the underlying transport being used by the sender to exchange packets with the remote peer, or null if the sender isn't yet connected to a transport.
RTCRtpStreamStats.codecId - Web APIs
syntax var codecid = rtcrtpstreamstats.codecid; value a domstring which uniquely identifies the object from which the contents of the stream's rtccodecstats are derived.
RTCRtpStreamStats.firCount - Web APIs
syntax var fircount = rtcrtpstreamstats.fircount; value an integer value indicating how many fir packets have been received by the sender during the current connection.
RTCRtpStreamStats.kind - Web APIs
syntax mediakind = rtcrtpstreamstats.kind; value a domstring whose value is "audio" if the track whose statistics are given by the rtcrtpstreamstats object contains audio, or "video" if the track contains video media.
RTCRtpStreamStats.nackCount - Web APIs
syntax var nackcount = rtcrtpstreamstats.nackcount; value an integer value indicating how many times the receiver sent a nack packet to the sender after detecting that one or more packets were lost during transport.
RTCRtpStreamStats.pliCount - Web APIs
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.
RTCRtpStreamStats.qpSum - Web APIs
syntax var qpsum = rtcrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent or received so far on the track described by the rtcrtpstreamstats object.
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
syntax var ssrc = rtcrtpstreamstats.ssrc; value the synchronization source (ssrc) is a 32-bit integer uniquely identifying the source of the rtp packets whose statistics are covered by the rtcstatsreport object of which this rtcrtpstreamstats object is a component.
RTCRtpStreamStats.trackId - Web APIs
syntax var trackid = rtcrtpstreamstats.trackid; value a domstring which uniquely identifies the rtcmediastreamtrackstats object that provides statistics for the track for which statistics are being collected by this rtcstatsreport.
RTCRtpStreamStats.transportId - Web APIs
syntax var transportid = rtcrtpstreamstats.transportid; value a domstring uniquely identifying the source of the statistics contained the rtctransportstats properties in the rtcstatsreport.
RTCRtpSynchronizationSource.voiceActivityFlag - Web APIs
syntax var voiceactivity = rtcrtpsynchronizationsource.voiceactivityflag value a boolean value which is true if voice activity is present in the most recently received rtp packet played by the associated source, or false if voice activity is not present.
RTCRtpTransceiver.currentDirection - Web APIs
syntax var direction = rtcrtptransceiver.currentdirection value a domstring whose value is one of the strings which are a member of the rtcrtptransceiverdirection enumerated type.
RTCRtpTransceiver.direction - Web APIs
syntax var direction = rtcrtptransceiver.direction value a domstring whose value is one of the strings which are a member of the rtcrtptransceiverdirection enumerated type, indicating the transceiver's preferred direction.
RTCRtpTransceiver.mid - Web APIs
syntax var mediaid = rtcrtptransceiver.mid; value a domstring which uniquely identifies the pairing of source and destination of the transceiver's stream.
RTCRtpTransceiver.receiver - Web APIs
syntax var rtpreceiver = rtcrtptransceiver.receiver; value an rtcrtpreceiver object which is responsible for receiving and decoding incoming media data whose media id is the same as the current value of mid.
RTCRtpTransceiver.sender - Web APIs
syntax var rtpsender = rtcrtptransceiver.sender; value an rtcrtpsender object used to encode and send media whose media id matches the current value of mid.
RTCRtpTransceiver.setCodecPreferences() - Web APIs
syntax rtcrtptransceiver.setcodecpreferences(codecs) parameters codecs an array of rtcrtpcodeccapability objects, in order of preference, each providing the parameters for one of the transceiver's supported codecs.
RTCRtpTransceiver.stop() - Web APIs
syntax rtcrtptransceiver.stop() paramters none.
RTCRtpTransceiver.stopped - Web APIs
syntax var isstopped = rtcrtptransceiver.stopped; value a boolean value which is true if the transceiver's sender will no longer send data, and its receiver will no longer receive data.
RTCSctpTransport.state - Web APIs
syntax var mystate = sctptransport.state; value a string whose value is taken from the rtcsctptransportstate enumerated type.
RTCSessionDescription() - Web APIs
syntax sessiondescription = new rtcsessiondescription(rtcsessiondescriptioninit); values rtcsessiondescriptioninit optional an object providing the default values for the session description; the object conforms to the rtcsessiondescriptioninit dictionary.
RTCSessionDescription.sdp - Web APIs
syntax var value = sessiondescription.sdp; sessiondescription.sdp = value; value the value is a domstring containing an sdp message like this one: v=0 o=alice 2890844526 2890844526 in ip4 host.anywhere.com s= c=in ip4 host.anywhere.com t=0 0 m=audio 49170 rtp/avp 0 a=rtpmap:0 pcmu/8000 m=video 51372 rtp/avp 31 a=rtpmap:31 h261/90000 m=video 53000 rtp/avp 32 a=rtpmap:32 mpv/90000 example // the remote description has been set previously on pc, an rtcpeerconnection alert(pc.remotedescription.sdp); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription.sd...
RTCSessionDescription.toJSON() - Web APIs
syntax var jsonvalue = sd.tojson(); the result value is a json object containing the following values: "type", containing the value of the rtcsessiondescription.type property and can be one of the following values: "offer", "answer", "pranswer" or null.
RTCSessionDescription.type - Web APIs
syntax var value = sessiondescription.type; sessiondescription.type = value; value the possible values are defined by an enum of type rtcsdptype.
RTCSessionDescriptionCallback - Web APIs
syntax rtcsessiondescriptioncallback(description); parameters description an rtcsessiondescriptioninit (or rtcsessiondescription) object describing the session being offered or being accepted.
RTCStats.id - Web APIs
WebAPIRTCStatsid
syntax var id = rtcstats.id; value a domstring which uniquely identifies the object for which this rtcstats-based object provides statistics.
RTCStats.timestamp - Web APIs
syntax var timestamp = rtcstats.timestamp; value a domhighrestimestamp value indicating the time at which the activity described by the statistics in this object was recorded, in milliseconds elapsed since the beginning of january 1, 1970, utc.
RTCStats.type - Web APIs
WebAPIRTCStatstype
syntax var type = rtcstats.type; value a domstring which specifies which type of statistic is represented by the object.
RTCTrackEvent() - Web APIs
syntax trackevent = new rtctrackevent(eventinfo); parameters eventinfo an object based on the rtctrackeventinit dictionary, providing information about the track which has been added to the rtcpeerconnection.
RTCTrackEvent.receiver - Web APIs
syntax var rtpreceiver = trackevent.receiver; value the rtcrtptransceiver which pairs the receiver with a sender and other properties which establish a single bidirectional srtp stream for use by the track associated with the rtctrackevent.
RTCTrackEvent.streams - Web APIs
syntax var streams = trackevent.streams; value an array of mediastream objects, one for each stream that make up the new track.
RTCTrackEvent.track - Web APIs
syntax var track = trackevent.track; value a mediastreamtrack indicating the track which has been added to the rtcpeerconnection.
RTCTrackEvent.transceiver - Web APIs
syntax var rtptransceiver = trackevent.transceiver; value the rtcrtptransceiver which pairs the receiver with a sender and other properties which establish a single bidirectional srtp stream for use by the track associated with the rtctrackevent.
RTCTrackEventInit.receiver - Web APIs
syntax var trackeventinit = { receiver: rtpreceiver, track: mediastreamtrack, streams: [videostream], transceiver: rtptransceiver }; var rtpreceiver = trackeventinit.receiver; value the rtcrtptransceiver which pairs the receiver with a sender and other properties which establish a single bidirectional srtp stream for use by the track associated with the rtctrackevent.
RTCTrackEventInit.streams - Web APIs
syntax var trackeventinit = { receiver: rtpreceiver, track: mediastreamtrack, streams: [videostream], transceiver: rtptransceiver }; var streamlist = trackeventinit.streams; value an array of mediastream objects, one for each stream which make up the track.
RTCTrackEventInit.track - Web APIs
syntax var trackeventinit = { receiver: rtpreceiver, track: mediastreamtrack, streams: [videostream], transceiver: rtptransceiver }; var track = trackeventinit.track; value a mediastreamtrack representing the track with which the event is associated.
RTCTrackEventInit.transceiver - Web APIs
syntax var trackeventinit = { receiver: rtpreceiver, track: mediastreamtrack, streams: [videostream], transceiver: rtptransceiver }; var rtptransceiver = trackeventinit.transceiver; value the rtcrtptransceiver which pairs the receiver with a sender and other properties which establish a single bidirectional srtp stream for use by the track associated with the rtctrackevent.
RadioNodeList.value - Web APIs
syntax value = radionodelist.value; radionodelist.value = string; example html <form> <label><input type="radio" name="color" value="blue">blue</label> <label><input type="radio" name="color" value="red">red</label> </form> javascript // get the form const form = document.forms[0]; // get the form's radio buttons const radios = form.elements['color']; // choose the "red" option radios.value...
Range() - Web APIs
WebAPIRangeRange
syntax range = new range() example in this example we create a new range with the range() constructor, and set its beginning and end positions using the range.setstartbefore() and range.setendafter() methods.
Range.cloneContents() - Web APIs
syntax documentfragment = range.clonecontents(); example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); documentfragment = range.clonecontents(); document.body.appendchild(documentfragment); specifications specification status comment domthe definition of 'range.clonecontents()' in that specification.
Range.cloneRange() - Web APIs
WebAPIRangecloneRange
syntax clone = range.clonerange(); example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); clone = range.clonerange(); specifications specification status comment domthe definition of 'range.clonerange()' in that specification.
Range.collapse() - Web APIs
WebAPIRangecollapse
syntax range.collapse(tostart); parameters tostart optional a boolean value: true collapses the range to its start, false to its end.
Range.collapsed - Web APIs
WebAPIRangecollapsed
syntax iscollapsed = range.collapsed; example let range = document.createrange(); range.setstart(startnode, startoffset); range.setend(endnode, endoffset); iscollapsed = range.collapsed; specifications specification status comment domthe definition of 'range.collapsed' in that specification.
Range.commonAncestorContainer - Web APIs
syntax rangeancestor = range.commonancestorcontainer; example in this example, we create an event listener to handle pointerup events on a list.
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.
Range.compareNode() - Web APIs
WebAPIRangecompareNode
} catch (e) { noderange.selectnodecontents(node); } var nodeisbefore = range.compareboundarypoints(range.start_to_start, noderange) == 1; var nodeisafter = range.compareboundarypoints(range.end_to_end, noderange) == -1; if (nodeisbefore && !nodeisafter) return 0; if (!nodeisbefore && nodeisafter) return 1; if (nodeisbefore && nodeisafter) return 2; return 3; } syntax returnvalue = range.comparenode( referencenode ); parameters referencenode the node to compare with the range.
Range.comparePoint() - Web APIs
syntax returnvalue = range.comparepoint(referencenode, offset) parameters referencenode the node to compare with the range.
Range.createContextualFragment() - Web APIs
syntax documentfragment = range.createcontextualfragment(tagstring) parameters tagstring text that contains text and tags to be converted to a document fragment.
Range.deleteContents() - Web APIs
syntax range.deletecontents() example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); range.deletecontents(); specifications specification status comment domthe definition of 'range.deletecontents()' in that specification.
Range.detach() - Web APIs
WebAPIRangedetach
syntax range.detach(); example var range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); range.detach(); specifications specification status comment domthe definition of 'range.detach()' in that specification.
Range.endContainer - Web APIs
syntax endrangenode = range.endcontainer; example var range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); endrangenode = range.endcontainer; specifications specification status comment domthe definition of 'range.endcontainer' in that specification.
Range.endOffset - Web APIs
WebAPIRangeendOffset
syntax endrangeoffset = range.endoffset; example var range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); endrangeoffset = range.endoffset; specifications specification status comment domthe definition of 'range.endoffset' in that specification.
Range.extractContents() - Web APIs
syntax documentfragment = range.extractcontents(); example basic example var range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); var documentfragment = range.extractcontents(); document.body.appendchild(documentfragment); moving items between containers this example lets you move items between two containers.
Range.getBoundingClientRect() - Web APIs
syntax boundingrect = range.getboundingclientrect() example html <div id="highlight"></div> <p>this example positions a "highlight" rectangle behind the contents of a range.
Range.getClientRects() - Web APIs
syntax rectlist = range.getclientrects() example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); rectlist = range.getclientrects(); specification specification status comment css object model (cssom) view modulethe definition of 'range.getclientrects()' in that specification.
Range.insertNode() - Web APIs
WebAPIRangeinsertNode
syntax range.insertnode(newnode); parameters newnode the node to insert at the start of the range.
Range.intersectsNode() - Web APIs
syntax bool = range.intersectsnode( referencenode ) parameters referencenode the node to compare with the range.
Range.isPointInRange() - Web APIs
syntax bool = range.ispointinrange( referencenode, offset ) parameters referencenode the node to compare with the range.
Range.selectNode() - Web APIs
WebAPIRangeselectNode
syntax range.selectnode(referencenode); parameters referencenode the node to select within a range.
Range.selectNodeContents() - Web APIs
syntax range.selectnodecontents(referencenode); parameters referencenode the node whose contents will be selected within a range.
Range.setEnd() - Web APIs
WebAPIRangesetEnd
syntax range.setend(endnode, endoffset); parameters endnode the node inside which the range should end.
Range.setEndAfter() - Web APIs
WebAPIRangesetEndAfter
syntax range.setendafter(referencenode); parameters referencenode the node to end the range after.
Range.setEndBefore() - Web APIs
syntax range.setendbefore(referencenode); parameters referencenode the node to end the range before.
Range.setStart() - Web APIs
WebAPIRangesetStart
syntax range.setstart(startnode, startoffset); parameters startnode the node where the range should start.
Range.setStartAfter() - Web APIs
syntax range.setstartafter(referencenode); parameters referencenode the node to start the range after.
Range.setStartBefore() - Web APIs
syntax range.setstartbefore(referencenode); parameters referencenode the node before which the range should start.
Range.startContainer - Web APIs
syntax startrangenode = range.startcontainer; example range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); startrangenode = range.startcontainer; specifications specification status comment domthe definition of 'range.endcontainer' in that specification.
Range.startOffset - Web APIs
WebAPIRangestartOffset
syntax startrangeoffset = range.startoffset; example var range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); var startrangeoffset = range.startoffset; specifications specification status comment domthe definition of 'range.startoffset' in that specification.
Range.surroundContents() - Web APIs
syntax range.surroundcontents(newparent); parameters newparent a node with which to surround the contents.
Range.toString() - Web APIs
WebAPIRangetoString
syntax text = range.tostring(); example html <p>this example logs <b>everything</b> between the bold <b>words</b>.
ReadableByteStreamController.byobRequest - Web APIs
syntax var request = readablebytestreamcontroller.byobrequest; value a readablestreambyobrequest object instance, or undefined.
ReadableByteStreamController.close() - Web APIs
syntax readablebytestreamcontroller.close(); parameters none.
ReadableByteStreamController.desiredSize - Web APIs
syntax var desiredsize = readablebytestreamcontroller.desiredsize; value an integer.
ReadableByteStreamController.enqueue() - Web APIs
syntax readablebytestreamcontroller.enqueue(chunk); parameters chunk the chunk to enqueue.
ReadableByteStreamController.error() - Web APIs
syntax readablebytestreamcontroller.error(e); parameters e the error you want future interactions to fail with.
ReadableStream.ReadableStream() - Web APIs
syntax var readablestream = new readablestream(underlyingsource[, queuingstrategy]); parameters underlyingsource an object containing methods and properties that define how the constructed stream instance will behave.
ReadableStream.cancel() - Web APIs
syntax var promise = readablestream.cancel(reason); parameters reason a domstring providing a human-readable reason for the cancellation.
ReadableStream.getReader() - Web APIs
syntax var reader = readablestream.getreader({mode}); parameters {mode} optional an object containing a property mode, which takes as its value a domstring specifying the type of reader to create.
ReadableStream.locked - Web APIs
syntax var locked = readablestream.locked; value a boolean indicating whether or not the readable stream is locked.
ReadableStream.pipeThrough() - Web APIs
syntax var transformedstream = readablestream.pipethrough(transformstream[, options]); parameters transformstream a transformstream (or an object with the structure {writable, readable}) consisting of a readable stream and a writable stream working together to transform some data from one form to another.
ReadableStream.pipeTo() - Web APIs
syntax var promise = readablestream.pipeto(destination[, options]); parameters destination a writablestream that acts as the final destination for the readablestream.
ReadableStream.tee() - Web APIs
syntax var teedstreams = readablestream.tee(); parameters none.
ReadableStreamBYOBReader.ReadableStreamBYOBReader() - Web APIs
syntax var readablestreambyobreader = new readablestreambyobreader(stream); parameters stream the readablestream to be read.
ReadableStreamBYOBReader.cancel() - Web APIs
syntax var promise = readablestreambyobreader.cancel(reason); parameters reason a domstring providing a human-readable reason for the cancellation.
ReadableStreamBYOBReader.closed - Web APIs
syntax var closed = readablestreambyobreader.closed; value a promise.
ReadableStreamBYOBReader.read() - Web APIs
syntax var promise = readablestreambyobreader.read(view); parameters view the view to be read into.
ReadableStreamBYOBReader.releaseLock() - Web APIs
syntax readablestreambyobreader.releaselock(); parameters none.
ReadableStreamBYOBRequest.respond() - Web APIs
the error() method of the readablestreambyobrequest interface xxx syntax readablestreambyobrequestinstance.respond(byteswritten); parameters byteswritten xxx return value void.
ReadableStreamBYOBRequest.respondWithNewView() - Web APIs
the respondwithnewview() method of the readablestreambyobrequest interface xxx syntax readablestreambyobrequestinstance.respondwithnewview(view); parameters view xxx return value void.
ReadableStreamBYOBRequest.view - Web APIs
syntax var view = readablestreambyobrequestinstance.view; value a typed array representing the destination region to which the controller can write generated data.
ReadableStreamDefaultController.close() - Web APIs
syntax readablestreamdefaultcontroller.close(); parameters none.
ReadableStreamDefaultController.desiredSize - Web APIs
syntax var desiredsize = readablestreamdefaultcontroller.desiredsize; value an integer.
ReadableStreamDefaultController.enqueue() - Web APIs
syntax readablestreamdefaultcontroller.enqueue(chunk); parameters chunk the chunk to enqueue.
ReadableStreamDefaultController.error() - Web APIs
syntax readablestreamdefaultcontroller.error(e); parameters e the error you want future interactions to fail with.
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
syntax var readablestreamdefaultreader = new readablestreamdefaultreader(stream); parameters stream the readablestream to be read.
ReadableStreamDefaultReader.cancel() - Web APIs
syntax var promise = readablestreamdefaultreader.cancel(reason); parameters reason optional a domstring providing a human-readable reason for the cancellation.
ReadableStreamDefaultReader.closed - Web APIs
syntax var closed = readablestreamdefaultreader.closed; value a promise.
ReadableStreamDefaultReader.read() - Web APIs
syntax var promise = readablestreamdefaultreader.read(); parameters none.
ReadableStreamDefaultReader.releaseLock() - Web APIs
syntax readablestreamdefaultreader.releaselock(); parameters none.
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.
Report.body - Web APIs
WebAPIReportbody
syntax let reportbody = reportinstance.body returns a reportbody object containing the detailed report information.
Report.type - Web APIs
WebAPIReporttype
syntax let reporttype = reportinstance.type returns a string representing the type of the report.
Report.url - Web APIs
WebAPIReporturl
syntax let reporturl = reportinstance.url returns a string representing the url of the document that generated the report.
ReportingObserver() - Web APIs
syntax new reportingobserver(callback[, options]); parameters callback a callback function that runs when the observer starts to collect reports (i.e.
ReportingObserver.disconnect() - Web APIs
syntax reportingobserverinstance.disconnect() examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); observer.observe() ...
ReportingObserver.observe() - Web APIs
syntax reportingobserverinstance.observe() examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); observer.observe() specifications specification status comment reporting apithe definition of 'reportingobserver.observe()' in that specification.
ReportingObserver.takeRecords() - Web APIs
syntax reportingobserverinstance.takerecords() return value an array of report objects.
Request() - Web APIs
WebAPIRequestRequest
syntax var myrequest = new request(input[, init]); parameters input defines the resource that you wish to fetch.
Request.cache - Web APIs
WebAPIRequestcache
syntax var currentcachemode = request.cache; value a requestcache value.
Request.clone() - Web APIs
WebAPIRequestclone
syntax var newrequest = request.clone(); parameters none.
Request.context - Web APIs
WebAPIRequestcontext
syntax var mycontext = request.context; value a requestcontext value.
Request.credentials - Web APIs
syntax var mycred = request.credentials; value a requestcredentials dictionary value indicating whether the user agent should send cookies from the other domain in the case of cross-origin requests.
Request.destination - Web APIs
syntax var destination = request.destination; value a string from the requestdestination enumerated type which indicates the type of content the request is asking for.
Request.headers - Web APIs
WebAPIRequestheaders
syntax var myheaders = request.headers; value a headers object.
Request.integrity - Web APIs
WebAPIRequestintegrity
syntax var myintegrity = request.integrity; value the subresource integrity value of the request (e.g., sha256-bpfbw7ivv8q2jlit13fxdyae2tjllusrsz273h2nfse=).
Request.method - Web APIs
WebAPIRequestmethod
the method read-only property of the request interface contains the request's method (get, post, etc.) syntax var mymethod = request.method; value a bytestring indicating the method of the request.
Request.mode - Web APIs
WebAPIRequestmode
syntax var mymode = request.mode; value a requestmode value.
Request.redirect - Web APIs
WebAPIRequestredirect
syntax var myredirect = request.redirect; value a requestredirect enum value, which can be one the following strings: follow error manual if not specified when the request is created, it takes the default value of follow.
Request.referrer - Web APIs
WebAPIRequestreferrer
syntax var myreferrer = request.referrer; value a domstring representing the request's referrer.
Request.referrerPolicy - Web APIs
syntax var myreferrerpolicy = request.referrerpolicy; value a domstring representing the request's referrerpolicy.
Request.url - Web APIs
WebAPIRequesturl
syntax var myurl = request.url; value a usvstring indicating the url of the request.
ResizeObserver() - Web APIs
syntax var resizeobserver = new resizeobserver(callback) parameters callback the function called whenever an observed resize occurs.
ResizeObserver.disconnect() - Web APIs
syntax resizeobserver.disconnect(); parameters none.
ResizeObserver.observe() - Web APIs
syntax resizeobserver.observe(target, options); parameters target a reference to an element or svgelement to be observed.
ResizeObserver.unobserve() - Web APIs
syntax void unobserve(target); parameters target a reference to an element or svgelement to be unobserved.
ResizeObserverEntry.borderBoxSize - Web APIs
syntax var myborderboxsize = resizeobserverentry.borderboxsize; value an array containing objects with the new border box size of the observed element.
ResizeObserverEntry.contentBoxSize - Web APIs
syntax var mycontentboxsize = resizeobserverentry.contentboxsize; value an object containing the new content box size of the observed element.
ResizeObserverEntry.contentRect - Web APIs
syntax var contentrect = resizeobserverentry.contentrect; value a domrectreadonly object containing the new size of the element indicated by the target property.
ResizeObserverEntry.target - Web APIs
syntax var element = resizeobserverentry.target; var svgelement = resizeobserverentry.target; value an element or svgelement representing the element being observed.
Response() - Web APIs
WebAPIResponseResponse
syntax var myresponse = new response(body, init); parameters body optional an object defining a body for the response.
Response.clone() - Web APIs
WebAPIResponseclone
in fact, the main reason clone() exists is to allow multiple uses of body objects (when they are one-use only.) syntax var response2 = response1.clone(); parameters none.
Response.error() - Web APIs
WebAPIResponseerror
syntax var errorresponse = response.error(); parameters none.
Response.headers - Web APIs
WebAPIResponseheaders
syntax var myheaders = response.headers; value a headers object.
Response.ok - Web APIs
WebAPIResponseok
syntax var myok = response.ok; value a boolean.
Response.redirect() - Web APIs
WebAPIResponseredirect
syntax var response = response.redirect(url, status); parameters url the url that the new response is to originate from.
Response.redirected - Web APIs
syntax var isredirected = response.redirected; value a boolean which is true if the response indicates that your request was redirected.
Response.status - Web APIs
WebAPIResponsestatus
syntax var mystatus = response.status; value a number (to be precise, an unsigned short).
Response.statusText - Web APIs
syntax var mystatustext = response.statustext; value a bytestring.
Response.type - Web APIs
WebAPIResponsetype
syntax var mytype = response.type; value a responsetype string indicating the type of the response.
Response.url - Web APIs
WebAPIResponseurl
syntax var myurl = response.url; value a usvstring.
Response.useFinalURL - Web APIs
syntax var isfinalurl = response.usefinalurl; value a boolean indicating whether or not the url is final rather than a redirect.
SVGAElement.target - Web APIs
syntax mylink.target = 'value'; value an svganimatedstring indicating the ending resource target that opens the document when the link is activated.
format - Web APIs
syntax string = myglyph.format; myglyph.format = string; value the format values listed below are taken from css2([css2], section15.3.5).
SVGAltGlyphElement.glyphRef - Web APIs
syntax string = myglyph.glyphref; myglyph.glyphref = string; value the return value is a glyph identifier, the value of which depends on the format of the given font.
SVGAngle - Web APIs
WebAPISVGAngle
exceptions on setting: a domexception with code syntax_err is raised if the assigned string cannot be parsed as a valid <angle>.
SVGAnimatedString.animVal - Web APIs
syntax var = object.animval specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation browser compatibility the compatibility table on this page is generated from structured data.
SVGAnimationElement.onbegin - Web APIs
syntax var begineventhandler = someelement.onbegin; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onbegin' in that specification.
SVGAnimationElement.onend - Web APIs
syntax var endeventhandler = someelement.onend; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onend' in that specification.
SVGAnimationElement.onrepeat - Web APIs
syntax var repeateventhandler = someelement.onrepeat; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onrepeat' in that specification.
targetElement - Web APIs
syntax var targetelement = someelement.targetelement; specifications specification status comment svg animations level 2the definition of 'svganimationelement.targetelement' in that specification.
cx - Web APIs
syntax var xcoordinate = element.cx; value an svganimatedlength representing the x-coordinate of the circleʼs center.
cy - Web APIs
syntax var ycoordinate = element.cy; value an svganimatedlength representing the y-coordinate of the circleʼs center.
r - Web APIs
syntax var radius = element.r; value an svganimatedlength representing the radius of the circle.
SVGGeometryElement.getPointAtLength() - Web APIs
syntax dompoint someelement.getpointatlength(float distance); parameters distance a float referring to the distance along the path.
SVGGeometryElement.getTotalLength() - Web APIs
syntax float someelement.gettotallength(); return value a float indicating the total length of the path in user units.
SVGGeometryElement.isPointInFill() - Web APIs
syntax boolean someelement.ispointinfill(dompointinit point); parameters point a dompointinit interpreted as a point in the local coordiante system of the element.
SVGGeometryElement.isPointInStroke() - Web APIs
syntax boolean someelement.ispointinstroke(dompointinit point); parameters point a dompointinit interpreted as a point in the local coordinate system of the element.
SVGGeometryElement.pathLength - Web APIs
syntax var pathlength = someelement.pathlength; specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.pathlength' in that specification.
getBBox() - Web APIs
getbbox returns different values than getboundingclientrect(), as the latter returns value relative to the viewport syntax let bboxrect = object.getbbox(); return value the returned value is a svgrect object, which defines the bounding box.
SVGImageElement.decode - Web APIs
syntax var promise = svgimageelement.decode(); parameters none.
SVGImageElement.decoding - Web APIs
syntax var refstr = svgimageelement.decoding svgimageelement.decoding = refstr; values a domstring representing the decoding hint.
SVGImageElement.height - Web APIs
syntax var height = svgimageelement.height value an svganimatedlength.
SVGImageElement.preserveAspectRatio - Web APIs
syntax var svganimatedpreerveaspectratio = svgimageelement.preserveaspectratio; value an svganimatedpreserveaspectratio.
SVGImageElement.width - Web APIs
syntax var width = svgimageelement.width; value an svganimatedlength.
SVGImageElement.x - Web APIs
WebAPISVGImageElementx
syntax var x = svgimageelement.x; value an svganimatedlength.
SVGImageElement.y - Web APIs
WebAPISVGImageElementy
syntax var y = svgimageelement.y; value an svganimatedlength.
SVGLength - Web APIs
WebAPISVGLength
exceptions on setting: a domexception with code syntax_err is raised if the assigned string cannot be parsed as a valid <length>.
SVGPathElement.getPointAtLength() - Web APIs
syntax svgpoint someelement.getpointatlength(float distance); parameters distance a float referring to the distance along the path.
SVGPathElement.getTotalLength() - Web APIs
syntax float someelement.gettotallength(); return value a float indicating the total length of the path in user units.
SVGPathElement.pathLength - Web APIs
syntax var pathlength = someelement.pathlength; specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpathelement.pathlength' in that specification.
SVGPoint - Web APIs
WebAPISVGPoint
syntax retobject = svgsvgelement.createsvgpoint() value the returned value is an svgpoint object.
The 'X' property - Web APIs
its syntax is the same as that for <length> // rect draws a rectangle with upper left-hand corner at x,y, with width w, and height h, with optional style // standard reference: http://www.w3.org/tr/svg11/shapes.html#rectelement func (svg *svg) rect(x float64, y float64, w float64, h float64, s ...string) { svg.printf(`<rect %s %s`, dim(x, y, w, h, svg.decimals), endstyle(s, emptyclose)) ...
Screen.availHeight - Web APIs
syntax let availheight = window.screen.availheight; value a numeric value indicating the number of css pixels tall the screen's available space is.
Screen.availLeft - Web APIs
WebAPIScreenavailLeft
syntax let availleft = window.screen.availleft; example let setx = window.screen.width - window.screen.availleft; let sety = window.screen.height - window.screen.availtop; window.moveto(setx, sety); notes in most cases, this property returns 0.
Screen.availTop - Web APIs
WebAPIScreenavailTop
syntax let availtop = window.screen.availtop; example let setx = window.screen.width - window.screen.availleft; let sety = window.screen.height - window.screen.availtop; window.moveto(setx, sety); notes in most cases, this property returns 0.
Screen.availWidth - Web APIs
WebAPIScreenavailWidth
syntax var width = window.screen.availwidth example var screenavailwidth = window.screen.availwidth; console.log(screenavailwidth); specifications specification status comment css object model (cssom) view modulethe definition of 'screen.availwidth' in that specification.
Screen.colorDepth - Web APIs
WebAPIScreencolorDepth
syntax bitdepth = window.screen.colordepth; example // check the color depth of the screen if ( window.screen.colordepth < 8) { // use low-color version of page } else { // use regular, colorful page } specification specification status comment css object model (cssom) view modulethe definition of 'screen.colordepth' in that specification.
Screen.height - Web APIs
WebAPIScreenheight
syntax var height = window.screen.height example if (window.screen.availheight !== window.screen.height) { // something is occupying some screen real estate!
Screen.left - Web APIs
WebAPIScreenleft
syntax var left = window.screen.left; ...
Screen.lockOrientation() - Web APIs
syntax lockallowed = window.screen.lockorientation(orientation); parameters orientation the orientation into which to lock the screen.
Screen.mozBrightness - Web APIs
syntax let screenbrightness = window.screen.mozbrightness; specifications not part of specification.
Screen.mozEnabled - Web APIs
WebAPIScreenmozEnabled
syntax let screenenabled = window.screen.mozenabled specifications not part of specification.
Screen.onorientationchange - Web APIs
syntax screen.onorientationchange = funcref; where funcref is a reference to a function.
Screen.orientation - Web APIs
syntax var orientation = window.screen.orientation; return value an instance of screenorientation representing the orientation of the screen.
Screen.pixelDepth - Web APIs
WebAPIScreenpixelDepth
syntax let depth = window.screen.pixeldepth example // if there is not adequate bit depth // choose a simpler color if ( window.screen.pixeldepth > 8 ) { document.style.color = "#faebd7"; } else { document.style.color = "#ffffff"; } specifications specification status comment css object model (cssom) view modulethe definition of 'screen.pixeldepth' in that specification.
Screen.top - Web APIs
WebAPIScreentop
syntax let top = window.screen.top; specifications not part of any current specification.
Screen.unlockOrientation() - Web APIs
syntax var unlocked = window.screen.unlockorientation(); return value returns true if the orientation was successfully unlocked or false if the orientation couldn't be unlocked.
Screen.width - Web APIs
WebAPIScreenwidth
syntax lwidth = window.screen.width example // crude way to check that the screen is at least 1024x768 if (window.screen.width >= 1024 && window.screen.height >= 768) { // resolution is 1024x768 or above } notes note that not all of the width given by this property may be available to the window itself.
ScreenOrientation.angle - Web APIs
syntax angle = screenorientation.angle value an unsigned short integer.
ScreenOrientation.lock() - Web APIs
syntax screenorientation.lock(orientation) parameters orientation an orientation lock type.
ScreenOrientation.onchange - Web APIs
syntax screenorientation.addeventlistener('change', function(e) { ...
ScreenOrientation.type - Web APIs
syntax type = screenorientation.type value a string.
ScreenOrientation.unlock() - Web APIs
syntax screenorientation.unlock() parameters none.
ScriptProcessorNode.bufferSize - Web APIs
syntax var audioctx = new audiocontext(); var scriptnode = audioctx.createscriptprocessor(4096, 1, 1); console.log(scriptnode.buffersize); value an integer.
ScriptProcessorNode.onaudioprocess - Web APIs
syntax var audioctx = new audiocontext(); var scriptnode = audioctx.createscriptprocessor(4096, 1, 1); scriptnode.onaudioprocess = function() { ...
ScrollToOptions.behavior - Web APIs
syntax behavior: scrollbehavior value an enum, the value of which can be one of the following: smooth: the scrolling animates smoothly.
ScrollToOptions.left - Web APIs
syntax left: double value a double.
ScrollToOptions.top - Web APIs
syntax top: double value a double.
SecurityPolicyViolationEvent.SecurityPolicyViolationEvent() - Web APIs
syntax let spvevt = new securitypolicyviolationevent(type, eventinitdict); properties type a domstring representing the type of security policy violation that occurred.
SecurityPolicyViolationEvent.blockedURI - Web APIs
syntax let blockeduri = violationeventinstance.blockeduri; value a usvstring representing the uri of the blocked resource.
SecurityPolicyViolationEvent.columnNumber - Web APIs
syntax let colnum = violationeventinstance.columnnumber; value a number representing the column number where the violation occurred.
SecurityPolicyViolationEvent.disposition - Web APIs
syntax let disposition = violationeventinstance.disposition; value a value defined in the securitypolicyviolationeventdisposition enum representing the uri of the blocked resource.
SecurityPolicyViolationEvent.documentURI - Web APIs
syntax let documenturi = violationeventinstance.documenturi; value a usvstring representing the uri of the document or worker in which the violation was found.
SecurityPolicyViolationEvent.effectiveDirective - Web APIs
syntax let effdir = violationeventinstance.effectivedirective; value a domstring representing the directive whose enforcement uncovered the violation.
SecurityPolicyViolationEvent.lineNumber - Web APIs
syntax let linenumber = violationeventinstance.linenumber; value a number representing the line number at which the violation occurred.
SecurityPolicyViolationEvent.originalPolicy - Web APIs
syntax let origpolicy = violationeventinstance.originalpolicy; value a domstring representing the policy whose enforcement uncovered the violation.
SecurityPolicyViolationEvent.referrer - Web APIs
syntax let referrer = violationeventinstance.referrer; value a usvstring representing the url of the referrer of the violating resources.
SecurityPolicyViolationEvent.sample - Web APIs
syntax let sample = violationeventinstance.sample; value a domstring containing a sample of the resource that caused the violation, usually the first 40 characters.
SecurityPolicyViolationEvent.sourceFile - Web APIs
syntax let source = violationeventinstance.sourcefile; value a usvstring representing the uri of the document or worker in which the violation was found.
SecurityPolicyViolationEvent.statusCode - Web APIs
syntax let status = violationeventinstance.statuscode; value a number representing the status code of the document or worker in which the violation occurred.
SecurityPolicyViolationEvent.violatedDirective - Web APIs
syntax let violateddir = violationeventinstance.violateddirective; value a domstring representing the directive whose enforcement uncovered the violation.
Selection.addRange() - Web APIs
syntax selection.addrange(range); parameters range a range object that will be added to the selection.
Selection.anchorNode - Web APIs
syntax node = sel.anchornode specifications specification status comment selection apithe definition of 'selection.anchornode' in that specification.
Selection.anchorOffset - Web APIs
syntax number = sel.anchoroffset specifications specification status comment selection apithe definition of 'selection.anchoroffset' in that specification.
Selection.collapse() - Web APIs
syntax sel.collapse(node, offset); parameters node the caret location will be within this node.
Selection.collapseToEnd() - Web APIs
syntax sel.collapsetoend() parameters none.
Selection.collapseToStart() - Web APIs
syntax sel.collapsetostart() parameters none.
Selection.containsNode() - Web APIs
syntax sel.containsnode(node, partialcontainment) parameters node the node that is being looked for in the selection.
Selection.deleteFromDocument() - Web APIs
syntax sel.deletefromdocument() parameters none.
Selection.extend() - Web APIs
WebAPISelectionextend
syntax sel.extend(node, offset) parameters node the node within which the focus will be moved.
Selection.focusNode - Web APIs
syntax node = sel.focusnode specifications specification status comment selection apithe definition of 'selection.focusnode' in that specification.
Selection.focusOffset - Web APIs
syntax offset = sel.focusoffset specifications specification status comment selection apithe definition of 'selection.focusoffset' in that specification.
Selection.getRangeAt() - Web APIs
syntax range = sel.getrangeat(index) parameters index the zero-based index of the range to return.
Selection.isCollapsed - Web APIs
syntax bool = sel.iscollapsed specifications specification status comment selection apithe definition of 'selection.iscollapsed' in that specification.
Selection.modify() - Web APIs
WebAPISelectionmodify
syntax sel.modify(alter, direction, granularity) parameters alter the type of change to apply.
Selection.rangeCount - Web APIs
syntax value = sel.rangecount example the following example will show the rangecount every second.
Selection.removeAllRanges() - Web APIs
syntax sel.removeallranges(); parameters none.
Selection.removeRange() - Web APIs
syntax sel.removerange(range) parameters range a range object that will be removed to the selection.
Selection.selectAllChildren() - Web APIs
syntax sel.selectallchildren(parentnode) parameters parentnode all children of parentnode will be selected.
Selection.setBaseAndExtent() - Web APIs
syntax sel.setbaseandextent(anchornode,anchoroffset,focusnode,focusoffset) parameters anchornode the node at the start of the selection.
Selection.toString() - Web APIs
syntax sel.tostring() return value a string representing the selection.
Selection.type - Web APIs
WebAPISelectiontype
syntax value = sel.type value a domstring describing the type of the current selection.
Sensor.activated - Web APIs
WebAPISensoractivated
syntax var boolean = sensorinstance.activated because sensor is a base class, activated may only be read from one of its derived classes.
Sensor.hasReading - Web APIs
WebAPISensorhasReading
syntax var boolean = sensorinstance.hasreading because sensor is a base class, hasreading may only be read from one of its derived classes.
Sensor.onactivate - Web APIs
WebAPISensoronactivate
syntax sensorinstance.onactivate = function sensorinstance.addeventlistener('activate', function() { ...
Sensor.onerror - Web APIs
WebAPISensoronerror
syntax sensorinstance.onerror = function sensorinstance.addeventlistener('error', function() { ...
Sensor.onreading - Web APIs
WebAPISensoronreading
syntax sensorinstance.onreading = function sensorinstance.addeventlistener('reading', function() { ...
Sensor.start() - Web APIs
WebAPISensorstart
syntax sensor.start() parameters none.
Sensor.stop() - Web APIs
WebAPISensorstop
syntax sensor.stop() parameters none.
Sensor.timestamp - Web APIs
WebAPISensortimestamp
syntax var timestamp = sensorinstance.timestamp because sensor is a base class, timestamp may only be read from one of its derived classes.
SensorErrorEvent.SensorErrorEvent() - Web APIs
syntax sensorerrorevent = new sensorerrorevent(type, {error: domexception}); parameters type will always be 'sensorerrorevent'.
SensorErrorEvent.error - Web APIs
syntax var domexception = sensorerrorevent.error; value a domexception.
ServiceWorker.onstatechange - Web APIs
syntax serviceworker.onstatechange = function(statechangeevent) { ...
ServiceWorker.scriptURL - Web APIs
syntax someurl = serviceworker.scripturl value a usvstring (see the webidl definition of usvstring.) examples tbd specifications specification status comment service workersthe definition of 'scripturl' in that specification.
ServiceWorker.state - Web APIs
syntax someurl = serviceworker.state value a serviceworkerstate definition (see the spec.) examples this code snippet is from the service worker registration-events sample (live demo).
ServiceWorker - Web APIs
the service-worker.js file // might be unavailable or contain a syntax error.
ServiceWorkerContainer.controller - Web APIs
syntax var mycontroller = navigator.serviceworker.controller; value a serviceworker object.
ServiceWorkerContainer.getRegistration() - Web APIs
syntax serviceworkercontainer.getregistration(scope).then(function(serviceworkerregistration) { ...
ServiceWorkerContainer.getRegistrations() - Web APIs
syntax serviceworkercontainer.getregistrations().then(function(serviceworkerregistrations) { ...
ServiceWorkerContainer.oncontrollerchange - Web APIs
syntax serviceworkercontainer.oncontrollerchange = function(controllerchangeevent) { ...
ServiceWorkerContainer.onerror - Web APIs
syntax serviceworkercontainer.onerror = function(errorevent) { ...
ServiceWorkerContainer.onmessage - Web APIs
(they used to be represented by serviceworkermessageevent objects, which have now been deprecated.) syntax serviceworkercontainer.onmessage = function(messageevent) { ...
ServiceWorkerContainer.ready - Web APIs
syntax navigator.serviceworker.ready.then(function(serviceworkerregistration) { ...
ServiceWorkerContainer.register() - Web APIs
syntax serviceworkercontainer.register(scripturl, options) .then(function(serviceworkerregistration) { ...
ServiceWorkerContainer.startMessages() - Web APIs
syntax serviceworkercontainer.startmessages(); parameters none.
ServiceWorkerGlobalScope.caches - Web APIs
syntax var mycachestorage = self.caches; value a cachestorage object.
ServiceWorkerGlobalScope.clients - Web APIs
syntax swclients = self.clients value the clients object associated with the specific worker.
ServiceWorkerGlobalScope.onactivate - Web APIs
syntax serviceworkerglobalscope.onactivate = function(event) { ...
ServiceWorkerGlobalScope.oncontentdelete - Web APIs
syntax serviceworkerglobalscope.oncontentdelete = function(event) { ...
ServiceWorkerGlobalScope.onfetch - Web APIs
the onfetch property of the serviceworkerglobalscope interface is an event handler fired whenever a fetch event occurs (usually when the windoworworkerglobalscope.fetch() method is called.) syntax serviceworkerglobalscope.onfetch = function(fetchevent) { ...
ServiceWorkerGlobalScope.oninstall - Web APIs
syntax serviceworkerglobalscope.oninstall = function(event) { ...
ServiceWorkerGlobalScope.onmessage - Web APIs
(they used to be represented by serviceworkermessageevent objects, which have now been deprecated.) syntax serviceworkerglobalscope.onmessage = function(extendablemessageevent) { ...
ServiceWorkerGlobalScope.onnotificationclick - Web APIs
syntax serviceworkerglobalscope.onnotificationclick = function(notificationevent) { ...
onnotificationclose - Web APIs
syntax serviceworkerglobalscope.onnotificationclose = function(notificationevent) { ...
ServiceWorkerGlobalScope.onpush - Web APIs
syntax serviceworkerglobalscope.onpush = function(pushevent) { ...
ServiceWorkerGlobalScope.onpushsubscriptionchange - Web APIs
syntax serviceworkerglobalscope.onpushsubscriptionchange = function() { ...
ServiceWorkerGlobalScope.onsync - Web APIs
syntax serviceworkerglobalscope.onsync = function(syncevent) { ...
ServiceWorkerGlobalScope.registration - Web APIs
syntax serviceworkerregistration = self.registration value a serviceworkerregistration object.
ServiceWorkerGlobalScope.skipWaiting() - Web APIs
syntax serviceworkerglobalscope.skipwaiting().then(function() { //do something }); returns a promise that immediately resolves with undefined.
ServiceWorkerMessageEvent.ServiceWorkerMessageEvent() - Web APIs
syntax var myswme = new serviceworkermessageevent(type, init); parameters type a domstring that defines the type of the message event being created.
ServiceWorkerMessageEvent.data - Web APIs
syntax var mydata = serviceworkermessageeventinstance.data; value any data type.
ServiceWorkerMessageEvent.lastEventId - Web APIs
syntax var mylasteventid = serviceworkermessageeventinstance.lasteventid; value a domstring.
ServiceWorkerMessageEvent.origin - Web APIs
syntax var myorigin = serviceworkermessageeventinstance.origin; value a domstring.
ServiceWorkerMessageEvent.ports - Web APIs
syntax var myports = serviceworkermessageeventinstance.ports; value an array of messageport objects.
ServiceWorkerMessageEvent.source - Web APIs
syntax var mysource = serviceworkermessageeventinstance.source; value a serviceworker or messageport object.
ServiceWorkerRegistration.active - Web APIs
syntax var serviceworker = serviceworkerregistration.active; value a serviceworker object's property, if it is currently in an activated state.
ServiceWorkerRegistration.getNotifications() - Web APIs
syntax s​erviceworkerregistration.getnotifications(options) .then(function(notificationslist) { ...
ServiceWorkerRegistration.index - Web APIs
syntax var a contentindex object = serviceworkerregistration.index; value a contentindex object examples you can access the property from either your main script or the registered service worker.
ServiceWorkerRegistration.installing - Web APIs
syntax var serviceworker = serviceworkerregistration.installing; value a serviceworker object, if it is currently in an installing state.
ServiceWorkerRegistration.navigationPreload - Web APIs
syntax var navigationpreloadmanager = serviceworkerregistration.navigationpreload; value an instance of navigationpreloadmanager.
ServiceWorkerRegistration.onupdatefound - Web APIs
syntax serviceworkerregistration.onupdatefound = function() { ...
ServiceWorkerRegistration.periodicSync - Web APIs
syntax var periodicsyncmanager = serviceworkerregistration.periodicsync; value a periodicsyncmanager object.
ServiceWorkerRegistration.pushManager - Web APIs
syntax var pushmanager = serviceworkerregistration.pushmanager; value a pushmanager object.
ServiceWorkerRegistration.scope - Web APIs
syntax var swscope = serviceworkerregistration.scope; specifications specification status comment service workersthe definition of 'serviceworkerregistration.scope' in that specification.
ServiceWorkerRegistration.showNotification() - Web APIs
syntax ​serviceworkerregistration.shownotification(title, [options]); parameters title the title that must be shown within the notification options optional an object that allows configuring the notification.
ServiceWorkerRegistration.sync - Web APIs
syntax var syncmanager = serviceworkerregistration.sync; value a syncmanager object.
ServiceWorkerRegistration.unregister() - Web APIs
syntax serviceworkerregistration.unregister().then(function(boolean) { }); parameters none.
ServiceWorkerRegistration.update() - Web APIs
syntax serviceworkerregistration.update(); parameters none.
ServiceWorkerRegistration.waiting - Web APIs
syntax var serviceworker = serviceworkerregistration.waiting; value a serviceworker object, if it is currently in an installed state.
ShadowRoot.delegatesFocus - Web APIs
syntax var df = shadowroot.delegatesfocus value a boolean value — true if the shadow root does delegate focus, false if it doesn't.
ShadowRoot.host - Web APIs
WebAPIShadowRoothost
syntax const someelement = shadowroot.host value a dom element.
ShadowRoot.innerHTML - Web APIs
syntax var domstring = shadowroot.innerhtml shadowroot.innerhtml = domstring value a domstring.
ShadowRoot.mode - Web APIs
WebAPIShadowRootmode
syntax var mode = shadowroot.mode value a value defined in the shadowrootmode enum — either open or closed.
SharedWorker.port - Web APIs
WebAPISharedWorkerport
syntax myworker.port; value a messageport object.
SharedWorkerGlobalScope.applicationCache - Web APIs
syntax var nameobj = self.applicationcache; value an applicationcache.
SharedWorkerGlobalScope.close() - Web APIs
syntax self.close(); example if you want to close your worker instance from inside the worker itself, you can call the following: close(); close() and self.close() are effectively equivalent — both represent close() being called from inside the worker's inner scope.
SharedWorkerGlobalScope.name - Web APIs
syntax var nameobj = self.name; value a domstring.
SharedWorkerGlobalScope.onconnect - Web APIs
syntax onconnect = function() { ...
Slottable: assignedSlot - Web APIs
syntax var slotelement = elementinstance.assignedslot value an htmlslotelement instance, or null if the element is not assigned to a slot, or if the associated shadow root was attached with its mode set to closed (see element.attachshadow for further details).
SourceBuffer.abort() - Web APIs
syntax sourcebuffer.abort(); parameters none.
SourceBuffer.appendBuffer() - Web APIs
syntax sourcebuffer.appendbuffer(source); parameters source a buffersource (that is, either an arraybufferview or arraybuffer) which contains the media segment data you want to add to the sourcebuffer.
SourceBuffer.appendBufferAsync() - Web APIs
syntax appendpromise = sourcebuffer.appendbufferasync(source); parameters source a buffersource (that is, either an arraybufferview or arraybuffer) which contains the media segment data you want to add to the sourcebuffer.
SourceBuffer.appendStream() - Web APIs
syntax sourcebuffer.appendstream(stream, maxsize); parameters stream the readablestream that is the source of the media segment data you want to append to the sourcebuffer.
SourceBuffer.appendWindowEnd - Web APIs
syntax var myappendwindowend = sourcebuffer.appendwindowend; sourcebuffer.appendwindowend = 120.0; value a double, indicating the end time of the append window, in seconds.
SourceBuffer.appendWindowStart - Web APIs
syntax var myappendwindowstart = sourcebuffer.appendwindowstart; sourcebuffer.appendwindowstart = 2.0; value a double, indicating the start time of the append window, in seconds.
SourceBuffer.audioTracks - Web APIs
syntax var myaudiotracks = sourcebuffer.audiotracks; value an audiotracklist object.
SourceBuffer.buffered - Web APIs
syntax var mybufferedrange = sourcebuffer.buffered; value a timeranges object.
SourceBuffer.changeType() - Web APIs
syntax sourcebuffer.changetype(type); parameters type a domstring specifying the mime type that future buffers will conform to.
SourceBuffer.mode - Web APIs
WebAPISourceBuffermode
syntax var mymode = sourcebuffer.mode; sourcebuffer.mode = 'sequence'; value a domstring.
SourceBuffer.remove() - Web APIs
syntax sourcebuffer.remove(start, end); parameters start a double representing the start of the time range, in seconds.
SourceBuffer.removeAsync() - Web APIs
syntax removepromise = sourcebuffer.removeasync(start, end); parameters start a double representing the start of the time range, in seconds.
SourceBuffer.textTracks - Web APIs
syntax var mytexttracks = sourcebuffer.texttracks; value an texttracklist object.
SourceBuffer.timestampOffset - Web APIs
syntax var myoffset = sourcebuffer.timestampoffset; sourcebuffer.timestampoffset = 2.5; value a double, with the offset amount expressed in seconds.
SourceBuffer.trackDefaults - Web APIs
syntax var mytrackdefaults = sourcebuffer.trackdefaults; sourcebuffer.trackdefaults = mytrackdefaultlist; value a trackdefaultlist object.
SourceBuffer.updating - Web APIs
syntax var isupdating = sourcebuffer.updating; value a boolean.
SourceBuffer.videoTracks - Web APIs
syntax var myvideotracks = sourcebuffer.videotracks; value an videotracklist object.
SourceBufferList: indexed property getter - Web APIs
[].) syntax var mysourcebuffer = sourcebufferlist[index]; parameters index the index position of the sourcebuffer object you want to return.
SourceBufferList.length - Web APIs
syntax var mylistlength = sourcebufferlist.length; value an unsigned long number.
SpeechGrammar.SpeechGrammar() - Web APIs
syntax var myspeechgrammar = new speechgrammar(); parameters none.
SpeechGrammar.src - Web APIs
WebAPISpeechGrammarsrc
syntax var mygrammar = speechgrammarinstance.src; value a domstring representing the grammar.
SpeechGrammar.weight - Web APIs
syntax var mygrammarweight = speechgrammarinstance.weight; value a float representing the weight of the grammar, in the range 0.0–1.0.
SpeechGrammarList.SpeechGrammarList() - Web APIs
syntax var mygrammarlist = new speechgrammarlist(); parameters none.
SpeechGrammarList.addFromString() - Web APIs
syntax speechgrammarlistinstance.addfromstring(string,weight); returns void.
SpeechGrammarList.addFromURI() - Web APIs
syntax speechgrammarlistinstance.addfromuri(src,weight); returns void.
SpeechGrammarList.length - Web APIs
syntax var mylistlength = speechgrammarlistinstance.length; value a number indicating the number of speechgrammar objects contained in the speechgrammarlist.
SpeechGrammarList - Web APIs
methods speechgrammarlist.item() standard getter — allows individual speechgrammar objects to be retrieved from the speechgrammarlist using array syntax.
SpeechRecognition() - Web APIs
syntax var myrecognition = new speechrecognition(); parameters none.
SpeechRecognition.abort() - Web APIs
syntax myspeechrecognition.abort(); returns void.
SpeechRecognition.continuous - Web APIs
it defaults to single results (false.) syntax var mycontinuous = myspeechrecognition.continuous; myspeechrecognition.continuous = true; value a boolean representing the current speechrecognition's continuous status.
SpeechRecognition.grammars - Web APIs
syntax var mygrammars = myspeechrecognition.grammars; myspeechrecognition.grammars = myspeechgrammarlist; value a speechgrammarlist containing the speechgrammar objects that represent your grammar for your app.
SpeechRecognition.interimResults - Web APIs
syntax var myinterimresult = myspeechrecognition.interimresults; myspeechrecognition.interimresults = false; value a boolean representing the state of the current speechrecognition's interim results.
SpeechRecognition.lang - Web APIs
syntax var mylang = myspeechrecognition.lang; myspeechrecognition.lang = 'en-us'; value a domstring representing the bcp 47 language tag for the current speechrecognition.
SpeechRecognition.maxAlternatives - Web APIs
syntax var mymaxalternativenumber = myspeechrecognition.maxalternatives; myspeechrecognition.maxalternatives = 2; value a number representing the maximum returned alternatives for each result.
SpeechRecognition.onaudioend - Web APIs
the onaudioend property of the speechrecognition interface represents an event handler that will run when the user agent has finished capturing audio (when the audioend event fires.) syntax myspeechrecognition.onaudioend = function() { ...
SpeechRecognition.onaudiostart - Web APIs
the onaudiostart property of the speechrecognition interface represents an event handler that will run when the user agent has started to capture audio (when the audiostart event fires.) syntax myspeechrecognition.onaudiostart = function() { ...
SpeechRecognition.onend - Web APIs
the onend property of the speechrecognition interface represents an event handler that will run when the speech recognition service has disconnected (when the end event fires.) syntax myspeechrecognition.onend = function() { ...
SpeechRecognition.onerror - Web APIs
the onerror property of the speechrecognition interface represents an event handler that will run when a speech recognition error occurs (when the error event fires.) syntax myspeechrecognition.onerror = function() { ...
SpeechRecognition.onnomatch - Web APIs
syntax myspeechrecognition.onnomatch = function() { ...
SpeechRecognition.onresult - Web APIs
the onresult property of the speechrecognition interface represents an event handler that will run when the speech recognition service returns a result — a word or phrase has been positively recognized and this has been communicated back to the app (when the result event fires.) syntax myspeechrecognition.onresult = function() { ...
SpeechRecognition.onsoundend - Web APIs
the onsoundend property of the speechrecognition interface represents an event handler that will run when any sound — recognisable speech or not — has stopped being detected (when the soundend event fires.) syntax myspeechrecognition.onsoundend = function() { ...
SpeechRecognition.onsoundstart - Web APIs
the onsoundstart property of the speechrecognition interface represents an event handler that will run when any sound — recognisable speech or not — has been detected (when the soundstart event fires.) syntax myspeechrecognition.onsoundstart = function() { ...
SpeechRecognition.onspeechend - Web APIs
the onspeechend property of the speechrecognition interface represents an event handler that will run when speech recognised by the speech recognition service has stopped being detected (when the speechend event fires.) syntax myspeechrecognition.onspeechend = function() { ...
SpeechRecognition.onspeechstart - Web APIs
the onspeechstart property of the speechrecognition interface represents an event handler that will run when sound recognised by the speech recognition service as speech has been detected (when the speechstart event fires.) syntax myspeechrecognition.onspeechstart = function() { ...
SpeechRecognition.onstart - Web APIs
the onstart property of the speechrecognition interface represents an event handler that will run when the speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current speechrecognition (when the start event fires.) syntax myspeechrecognition.onstart = function() { ...
SpeechRecognition.serviceURI - Web APIs
syntax var myserviceuri = myspeechrecognition.serviceuri; myspeechrecognition.serviceuri = 'path/to/my/service/'; value a domstring representing the uri of the speech recognition service.
SpeechRecognition.start() - Web APIs
syntax myspeechrecognition.start(); parameters none.
SpeechRecognition.stop() - Web APIs
syntax myspeechrecognition.stop(); returns void.
SpeechRecognitionAlternative.confidence - Web APIs
syntax var myconfidence = speechrecognitionalternativeinstance.confidence; returns a number betwen 0 and 1.
SpeechRecognitionAlternative.transcript - Web APIs
syntax var mytranscript = speechrecognitionalternativeinstance.transcript; returns a domstring.
SpeechRecognitionError.error - Web APIs
syntax var myerror = event.error; value a domstring naming the type of error.
SpeechRecognitionError.message - Web APIs
syntax var myerrormsg = event.message; value a domstring containing more details about the error that was raised.
SpeechRecognitionErrorEvent.error - Web APIs
syntax var myerror = event.error; value a domstring naming the type of error.
SpeechRecognitionErrorEvent.message - Web APIs
syntax var myerrormsg = event.message; value a domstring containing more details about the error that was raised.
SpeechRecognitionEvent.emma - Web APIs
syntax var myemma = event.emma; value a valid xml document.
SpeechRecognitionEvent.interpretation - Web APIs
this might be determined, for instance, through the sisr specification of semantics in a grammar (see semantic interpretation for speech recognition (sisr) version 1.0 for specification and examples.) syntax var myinterpretation = event.interpretation; value the returned value can be of any type.
SpeechRecognitionEvent.results - Web APIs
syntax var myresults = event.results; value a speechrecognitionresultlist object.
SpeechRecognitionResult.isFinal - Web APIs
syntax var myisfinal = speechrecognitionresultinstance.isfinal; returns a boolean.
SpeechRecognitionResult.length - Web APIs
syntax var mylength = speechrecognitionresultinstance.length; returns a number.
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.
SpeechRecognitionResultList.length - Web APIs
syntax var mylength = speechrecognitionresultlistinstance.length; returns a number.
SpeechRecognitionResultList - Web APIs
methods speechrecognitionresultlist.item a standard getter that allows speechrecognitionresult objects in the list to be accessed via array syntax.
SpeechSynthesis.cancel() - Web APIs
syntax speechsynthesisinstance.cancel(); returns void.
SpeechSynthesis.getVoices() - Web APIs
syntax speechsynthesisinstance.getvoices(); parameters none.
SpeechSynthesis.onvoiceschanged - Web APIs
syntax speechsynthesisinstance.onvoiceschanged = function() { ...
SpeechSynthesis.pause() - Web APIs
syntax speechsynthesisinstance.pause(); returns void.
SpeechSynthesis.paused - Web APIs
syntax var amipaused = speechsynthesisinstance.paused; value a boolean.
SpeechSynthesis.pending - Web APIs
syntax var amipending = speechsynthesisinstance.pending; value a boolean.
SpeechSynthesis.resume() - Web APIs
syntax speechsynthesisinstance.resume(); returns void.
SpeechSynthesis.speak() - Web APIs
syntax speechsynthesisinstance.speak(utterance); returns void.
SpeechSynthesis.speaking - Web APIs
syntax var amispeaking = speechsynthesisinstance.speaking; value a boolean.
SpeechSynthesisErrorEvent.error - Web APIs
syntax myerror = event.error; value a domstring containing an error code.
SpeechSynthesisEvent.charIndex - Web APIs
syntax event.charindex; value a number.
SpeechSynthesisEvent.elapsedTime - Web APIs
syntax event.elapsedtime; value a float.
SpeechSynthesisEvent.name - Web APIs
syntax event.name; value a domstring.
SpeechSynthesisEvent.utterance - Web APIs
syntax event.utterance; value a speechsynthesisutterance object.
SpeechSynthesisUtterance.SpeechSynthesisUtterance() - Web APIs
syntax var utterthis = new speechsynthesisutterance(text); parameters text a domstring containing the text that will be synthesized when the utterance is spoken..
SpeechSynthesisUtterance.lang - Web APIs
syntax var mylang = speechsynthesisutteranceinstance.lang; speechsynthesisutteranceinstance.lang = 'en-us'; value a domstring representing a bcp 47 language tag.
SpeechSynthesisUtterance.onboundary - Web APIs
the onboundary property of the speechsynthesisutterance interface represents an event handler that will run when the spoken utterance reaches a word or sentence boundary (when the boundary event fires.) syntax speechsynthesisutteranceinstance.onboundary = function() { ...
SpeechSynthesisUtterance.onend - Web APIs
the onend property of the speechsynthesisutterance interface represents an event handler that will run when the utterance has finished being spoken (when the end event fires.) syntax speechsynthesisutteranceinstance.onend = function() { ...
SpeechSynthesisUtterance.onerror - Web APIs
the onerror property of the speechsynthesisutterance interface represents an event handler that will run when an error occurs that prevents the utterance from being succesfully spoken (when the error event fires.) syntax speechsynthesisutteranceinstance.onerror = function() { ...
SpeechSynthesisUtterance.onmark - Web APIs
the onmark property of the speechsynthesisutterance interface represents an event handler that will run when the spoken utterance reaches a named ssml mark tag (when the mark event fires.) syntax speechsynthesisutteranceinstance.onmark = function() { ...
SpeechSynthesisUtterance.onpause - Web APIs
syntax speechsynthesisutteranceinstance.onpause = function() { ...
SpeechSynthesisUtterance.onresume - Web APIs
syntax speechsynthesisutteranceinstance.onresume = function() { ...
SpeechSynthesisUtterance.onstart - Web APIs
syntax speechsynthesisutteranceinstance.onstart = function() { ...
SpeechSynthesisUtterance.pitch - Web APIs
syntax // default 1 speechsynthesisutteranceinstance.pitch = 1.5; value a float representing the pitch value.
SpeechSynthesisUtterance.rate - Web APIs
syntax var myrate = speechsynthesisutteranceinstance.rate; speechsynthesisutteranceinstance.rate = 1.5; value a float representing the rate value.
SpeechSynthesisUtterance.text - Web APIs
syntax var mytext = speechsynthesisutteranceinstance.text; speechsynthesisutteranceinstance.text = 'hello i am speaking'; value a domstring representing the text to the synthesised.
SpeechSynthesisUtterance.voice - Web APIs
syntax var myvoice = speechsynthesisutteranceinstance.voice; speechsynthesisutteranceinstance.voice = speechsynthesisvoiceinstance; value a speechsynthesisvoice object.
SpeechSynthesisUtterance.volume - Web APIs
syntax var myvolume = speechsynthesisutteranceinstance.volume; speechsynthesisutteranceinstance.volume = 0.5; value a float that represents the volume value, between 0 (lowest) and 1 (highest.) if ssml is used, this value will be overridden by prosody tags in the markup.
SpeechSynthesisVoice.default - Web APIs
syntax var amidefault = speechsynthesisvoiceinstance.default; value a boolean.
SpeechSynthesisVoice.lang - Web APIs
syntax var mylang = speechsynthesisvoiceinstance.lang; value a domstring representing the language of the device.
SpeechSynthesisVoice.localService - Web APIs
syntax var amilocal = speechsynthesisvoiceinstance.localservice; value a boolean.
SpeechSynthesisVoice.name - Web APIs
syntax var voicename = speechsynthesisvoiceinstance.name; value a domstring representing the name of the voice.
SpeechSynthesisVoice.voiceURI - Web APIs
syntax var myvoiceuri = speechsynthesisvoiceinstance.voiceuri; value a domstring representing the uri of the voice.
StaticRange.StaticRange() - Web APIs
syntax var staticrange = new staticrange(rangespec) parameters rangespec the required rangespec parameter is an object adhering to the staticrangeinit dictionary.
StaticRange.collapsed - Web APIs
syntax var iscollpased = staticrange.collapsed value a boolean value which is true if the range is collapsed.
StaticRange.endContainer - Web APIs
syntax var node = staticnode.endcontainer staticnode.endcontainer = endcontainer value the dom node which contains the final character of the range.
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.startContainer - Web APIs
syntax var node = staticnode.startcontainer value the dom node inside which the start position of the range is found.
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.
StaticRange.toRange() - Web APIs
syntax var range = staticrange.torange() parameters none.
StereoPannerNode.StereoPannerNode() - Web APIs
syntax var stereopannernode = stereopannernode(context, options) parameters inherits parameters from the audionodeoptions dictionary.
StereoPannerNode.pan - Web APIs
syntax var audioctx = new audiocontext(); var pannode = audioctx.createstereopanner(); pannode.pan.value = -0.5; returned value an a-rate audioparam containing the panning to apply.
Storage.clear() - Web APIs
WebAPIStorageclear
syntax storage.clear(); return value undefined.
Storage.getItem() - Web APIs
WebAPIStoragegetItem
syntax var avalue = storage.getitem(keyname); parameters keyname a domstring containing the name of the key you want to retrieve the value of.
Storage.key() - Web APIs
WebAPIStoragekey
syntax var akeyname = storage.key(index); parameters index an integer representing the number of the key you want to get the name of.
Storage.length - Web APIs
WebAPIStoragelength
syntax length = storage.length; return value the number of items stored in the storage object.
Storage.removeItem() - Web APIs
syntax storage.removeitem(keyname); parameters keyname a domstring containing the name of the key you want to remove.
Storage.setItem() - Web APIs
WebAPIStoragesetItem
syntax storage.setitem(keyname, keyvalue); parameters keyname a domstring containing the name of the key you want to create/update.
StorageEstimate.quota - Web APIs
syntax quota = storageestimate.quota; value a numeric value specifying an approximation of the total amount of storage space available for use by the application.
StorageEstimate.usage - Web APIs
syntax usage = storageestimate.usage; value a numeric value specifying an approximation of the total amount of storage space available for use by the application.
StorageEvent - Web APIs
syntax storageevent.initstorageevent(type[, canbubble[, cancelable[, key[, oldvalue[, newvalue[, url[, storagearea]]]]]]]) parameters typearg the name of the event.
StorageManager.estimate() - Web APIs
syntax const estimatepromise = storagemanager.estimate(); parameters none.
StorageManager.persist() - Web APIs
syntax navigator.storage.persist().then(function(persistent) { ...
StorageManager.persisted() - Web APIs
syntax navigator.storage.persisted().then(function(persistent) { ...
StorageQuota.queryInfo - Web APIs
syntax storagequota.queryinfo().then(function(storageinfo) { ...
StorageQuota.requestPersistentQuota - Web APIs
syntax storagequota.requestpersistentquota().then(function(storageinfo) { ...
StorageQuota.supportedTypes - Web APIs
syntax var storagetypes = storagequota.supportedtypes value a frozen array of available storage types.
StylePropertyMap.append() - Web APIs
syntax stylepropertymap.append(property,value) parameters property an identifier indicating the stylistic feature (e.g.
StylePropertyMap.clear() - Web APIs
syntax stylepropertmap.clear() parameters none.
StylePropertyMap.delete() - Web APIs
syntax stylepropertymap.delete(property) parameters property an identifier indicating the stylistic feature (e.g.
StylePropertyMap.set() - Web APIs
syntax stylepropertymap.set(property,value) parameters property an identifier indicating the stylistic feature (e.g.
StylePropertyMapReadOnly.entries() - Web APIs
syntax stylepropertymapreadonly.entries() parameters none.
StylePropertyMapReadOnly.forEach() - Web APIs
syntax stylepropertymapreadonly.foreach(function callback(currentvalue[, index[, array]]) { //your code }[, thisarg]); parameters callback the function to execute for each element, taking three arguments: currentvalue the value of the current element being processed.
StylePropertyMapReadOnly.get() - Web APIs
syntax var declarationblock = stylepropertymapreadonly.get(property) parameters property the name of the property to retrieve the value of.
StylePropertyMapReadOnly.getAll() - Web APIs
syntax var cssstylevalues[] = stylepropertymapreadonly.getall(property) parameters property the name of the property to retrieve all values of.
StylePropertyMapReadOnly.has() - Web APIs
syntax var boolean = stylepropertymapreadonly.has(property) parameters property the name of a property.
StylePropertyMapReadOnly.keys() - Web APIs
the stylepropertymapreadonly.keys() method returns a new array iterator containing the keys for each item in stylepropertymapreadonly syntax stylepropertymapreadonly.keys() parameters none.
StylePropertyMapReadOnly.size - Web APIs
syntax var size = stylepropertymapreadonly.size value an unsigned long integer.
StylePropertyMapReadOnly.values() - Web APIs
syntax stylepropertymapreadonly.values() parameters none.
StyleSheet.disabled - Web APIs
syntax bool = stylesheet.disabled example // if the stylesheet is disabled...
Stylesheet.href - Web APIs
WebAPIStyleSheethref
syntax uri = stylesheet.href parameters uri is a string containing the stylesheet's uri.
StyleSheet.ownerNode - Web APIs
syntax noderef = stylesheet.ownernode example <html lang="en"> <head> <link rel="stylesheet" href="example.css"> </head> <body> <button onclick="alert(document.stylesheets[0].ownernode)">show example.css’s ownernode</button> </body> </html> // displays "object htmllinkelement" notes for style sheets that are included by other style sheets, such as with @import, the value of this property is null.
StyleSheet.parentStyleSheet - Web APIs
syntax objref = stylesheet.parentstylesheet example // find the top level stylesheet if (stylesheet.parentstylesheet) { sheet = stylesheet.parentstylesheet; } else { sheet = stylesheet; } notes this property returns null if the current stylesheet is a top-level stylesheet or if stylesheet inclusion is not supported.
StyleSheet.type - Web APIs
WebAPIStyleSheettype
syntax string = stylesheet.type example mystylesheet.type = 'text/css'; specifications specification status comment css object model (cssom)the definition of 'stylesheet: type' in that specification.
SubmitEvent() - Web APIs
syntax let submitevent = new submitevent(type,eventinitdict); parameters type a domstring indicating the event which occurred.
SubmitEvent.submitter - Web APIs
syntax let submitter = submitevent.submitter; value an element, indicating the element that sent the submit event to the form.
SubtleCrypto.decrypt() - Web APIs
syntax const result = crypto.subtle.decrypt(algorithm, key, data); parameters algorithm is an object specifying the algorithm to be used, and any extra parameters as required.
SubtleCrypto.deriveBits() - Web APIs
syntax const result = crypto.subtle.derivebits( algorithm, basekey, length ); parameters algorithm is an object defining the derivation algorithm to use.
SubtleCrypto.digest() - Web APIs
syntax const digest = crypto.subtle.digest(algorithm, data); parameters algorithm is a domstring defining the hash function to use.
SubtleCrypto.encrypt() - Web APIs
syntax const result = crypto.subtle.encrypt(algorithm, key, data); parameters algorithm is an object specifying the algorithm to be used and any extra parameters if required: to use rsa-oaep, pass an rsaoaepparams object.
SubtleCrypto.exportKey() - Web APIs
syntax const result = crypto.subtle.exportkey(format, key); parameters format is a string value describing the data format in which the key should be exported.
SubtleCrypto.sign() - Web APIs
WebAPISubtleCryptosign
syntax const signature = crypto.subtle.sign(algorithm, key, data); parameters algorithm is a string or object that specifies the signature algorithm to use and its parameters: to use rsassa-pkcs1-v1_5, pass the string "rsassa-pkcs1-v1_5" or an object of the form { "name": "rsassa-pkcs1-v1_5" }.
SubtleCrypto.verify() - Web APIs
syntax const result = crypto.subtle.verify(algorithm, key, signature, data); parameters algorithm is a domstring or object defining the algorithm to use, and for some algorithm choices, some extra parameters.
SubtleCrypto.wrapKey() - Web APIs
syntax const result = crypto.subtle.wrapkey( format, key, wrappingkey, wrapalgo ); parameters format is a string describing the data format in which the key will be exported before it is encrypted.
SyncEvent.SyncEvent() - Web APIs
syntax var mysyncevent = new syncevent(type, init) parameters type the type of the event.
SyncEvent.lastChance - Web APIs
syntax var lastchance = syncevent.lastchance value a boolean that indicates whether the user agent will not make further synchronization attempts after the current attempt.
registration - Web APIs
syntax var syncreg = syncevent.registration value a syncregistration object ...
SyncEvent.tag - Web APIs
WebAPISyncEventtag
syntax var tag = syncevent.tag value the developer-defined identifier for this syncevent.
SyncManager.getTags() - Web APIs
syntax syncmanager.gettags().then(function(tags[]) { ...
SyncManager.register() - Web APIs
syntax syncmanager.register([options]).then(function(syncregistration) { ...
TaskAttributionTiming.containerId - Web APIs
syntax var containerid = taskattributiontiming.containerid; value a domstring containing the containers id attribute.
TaskAttributionTiming.containerName - Web APIs
syntax var containername = taskattributiontiming.containername; value a domstring containing the container's name attribute.
TaskAttributionTiming.containerSrc - Web APIs
syntax var containersrc = taskattributiontiming.containersrc; value a domstring containing the container's src attribute.
TaskAttributionTiming.containerType - Web APIs
syntax var containertype = taskattributiontiming.containertype; value a domstring containing the container's type, one of iframe, embed, or object.
Text() - Web APIs
WebAPITextText
syntax text1 = new text(); // create an empty text node text2 = new text("this is a text node"); example let text = new text("test"); specifications specification status comment domthe definition of 'text()' in that specification.
HTMLSlotElement.assignedSlot - Web APIs
WebAPITextassignedSlot
syntax var htmlslotelement = text.assignedslot value a htmlslotelement object.
Text.isElementContentWhitespace - Web APIs
syntax b = textnode.iselementcontentwhitespace; example in the example below, we create a node with mixed display and whitespace characters and the attribute is false.
Text.replaceWholeText() - Web APIs
syntax replacementnode = textnode.replacewholetext(content) example see the example for the text.wholetext property.
Text.splitText() - Web APIs
WebAPITextsplitText
syntax newnode = textnode.splittext(offset) parameters offset the index immediately before which to break the text node.
Text.wholeText - Web APIs
WebAPITextwholeText
syntax str = textnode.wholetext; notes and example suppose you have the following simple paragraph within your webpage (with some whitespace added to aid formatting throughout the code samples here), whose dom node is stored in the variable para: <p>thru-hiking is great!
TextDecoder() - Web APIs
syntax decoder = new textdecoder(utflabel, options); parameters utflabeloptional is a domstring, defaulting to "utf-8", containing the label of the encoder.
TextDecoder.prototype.decode() - Web APIs
syntax b1 = decoder.decode(buffer, options); b2 = decoder.decode(buffer); b3 = decoder.decode(); parameters buffer optional is either an arraybuffer or an arraybufferview containing the text to decode.
TextDecoder.prototype.encoding - Web APIs
syntax var b = decoder.decoding; specifications specification status comment encodingthe definition of 'textdecoder.encoding' in that specification.
TextEncoder() - Web APIs
syntax encoder = new textencoder(); parameters textencoder() takes no parameters since firefox 48 and chrome 53 note: prior to firefox 48 and chrome 53, an encoding type label was accepted as a paramer to the textencoder object, since then both browers have removed support for any encoder type other than utf-8, to match the spec.
TextEncoder.prototype.encode() - Web APIs
syntax b1 = encoder.encode(string); parameters string is a usvstring containing the text to encode.
TextEncoder.prototype.encodeInto() - Web APIs
syntax b1 = encoder.encodeinto(string, uint8array); parameters string is a usvstring containing the text to encode.
TextEncoder.encoding - Web APIs
syntax b = encoder.encoding; specifications specification status comment encodingthe definition of 'textencoder.encoding' in that specification.
TextTrack.mode - Web APIs
WebAPITextTrackmode
syntax var mode = texttrack.mode; texttrack.mode = "disabled" | "hidden" | "showing"; value a domstring which indicates the track's current mode.
getTrackById() - Web APIs
syntax var thetrack = texttracklist.gettrackbyid(id); paramters id a domstring indicating the id of the track to locate within the track list.
TextTrackList.length - Web APIs
syntax var trackcount = texttracklist.length; value a number indicating how many text tracks are included in the texttracklist.
TextTrackList.onaddtrack - Web APIs
syntax texttracklist.onaddtrack = eventhandler; value set onaddtrack to a function that accepts as input a trackevent object which indicates in its track property which video track has been added to the media.
TextTrackList.onchange - Web APIs
syntax texttracklist.onchange = eventhandler; example this snippet establishes a handler for the change event that looks at each of the tracks in the list, calling a function to update the state of a user interface control that indicates the current state of the track.
TextTrackList.onremovetrack - Web APIs
syntax texttracklist.onremovetrack = eventhandler; value set onremovetrack to a function that accepts as input a trackevent object which indicates in its track property which text track has been removed from the media element.
TextTrackList - Web APIs
the individual tracks can be accessed using array syntax or functions such as foreach() for example.
TimeRanges.end() - Web APIs
WebAPITimeRangesend
syntax endtime = timeranges.end(index) parameters index is the range number to return the ending time for.
TimeRanges.length - Web APIs
WebAPITimeRangeslength
syntax length = timeranges.length; example given a video element with the id "myvideo": var v = document.getelementbyid("myvideo"); var buf = v.buffered; var numranges = buf.length; if (buf.length == 1) { // only one range if (buf.start(0) == 0 && buf.end(0) == v.duration) { // the one range starts at the beginning and ends at // the end of the video, so the whole thing is loaded } } this example looks at the time ranges and looks to see if the entire video has been loaded.
TimeRanges.start() - Web APIs
WebAPITimeRangesstart
syntax starttime = timeranges.start(index) parameters index is the range number to return the starting time for.
Touch() - Web APIs
WebAPITouchTouch
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.clientX - Web APIs
WebAPITouchclientX
syntax touchitem.clientx; return value a long representing the x coordinate of the touch point relative to the viewport, not including any scroll offset.
Touch.clientY - Web APIs
WebAPITouchclientY
syntax touchitem.clienty; return value a long value representing the y coordinate of the touch point relative to the viewport, not including any scroll offset.
Touch.force - Web APIs
WebAPITouchforce
syntax touchitem.force; return value a float that represents the amount of pressure the user is applying to the touch surface.
Touch.identifier - Web APIs
WebAPITouchidentifier
syntax touchitem.identifier; return value a long that represents the unique id of the touch object.
Touch.pageX - Web APIs
WebAPITouchpageX
syntax touchitem.pagex; return value a long representing the x coordinate of the touch point relative to the viewport, including any scroll offset.
Touch.pageY - Web APIs
WebAPITouchpageY
syntax touchitem.pagey; return value a long value that representes the y coordinate of the touch point relative to the viewport, including any scroll offset.
Touch.radiusX - Web APIs
WebAPITouchradiusX
syntax var xradius = touchitem.radiusx; return value xradius the x radius of the ellipse that most closely circumscribes the area of contact with the touch surface.
Touch.radiusY - Web APIs
WebAPITouchradiusY
syntax var yradius = touchitem.radiusy; return value yradius the y radius of the ellipse that most closely circumscribes the area of contact with the screen.
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.
Touch.screenX - Web APIs
WebAPITouchscreenX
syntax var x = touchitem.screenx; return value x the x coordinate of the touch point relative to the screen, not including any scroll offset.
Touch.screenY - Web APIs
WebAPITouchscreenY
syntax var y = touchitem.screeny; return value y the y coordinate of the touch point relative to the screen, not including any scroll offset.
Touch.target - Web APIs
WebAPITouchtarget
syntax var el = touchpoint.target; return value el the target element of the touch object.
TouchEvent() - Web APIs
syntax event = new touchevent(typearg, toucheventinit); values typearg is a domstring representing the name of the event.
TouchEvent.altKey - Web APIs
WebAPITouchEventaltKey
syntax var altenabled = touchevent.altkey; return value altenabled true if the alt key is enabled for this event; and false if the alt is not enabled.
TouchEvent.changedTouches - Web APIs
syntax var changes = touchevent.changedtouches; return value changes a touchlist whose touch objects include all the touch points that contributed to this touch event.
TouchEvent.ctrlKey - Web APIs
syntax var ctrlenabled = touchevent.ctrlkey; return value ctrlenabled true if the control key is enabled for this event; and false if the control is not enabled.
TouchEvent.metaKey - Web APIs
syntax var metaenabled = touchevent.metakey; return value metaenabled true if the meta key is enabled for this event; and false if the meta is not enabled.
TouchEvent.shiftKey - Web APIs
syntax var shiftenabled = touchevent.shiftkey; return value shiftenabled true if the shift key is enabled for this event; and false if the shift key is not enabled.
TouchEvent.targetTouches - Web APIs
syntax var touches = touchevent.targettouches; return value touches a touchlist listing all the touch objects for touch points that are still in contact with the touch surface and whose touchstart event occurred inside the same target element as the current target element.
TouchEvent.touches - Web APIs
syntax var touches = touchevent.touches; return value touches a touchlist listing all the touch objects for touch points that are still in contact with the touch surface, regardless of whether or not they've changed or what their target element was at touchstart time.
TouchList.identifiedTouch() - Web APIs
syntax var touchitem = touchlist.identifiedtouch(id); parameters id an integer value identifying the touch object to retrieve from the list.
TouchList.item() - Web APIs
WebAPITouchListitem
syntax var touchpoint = touchlist.item(index); parameters index the index of the touch object to retrieve.
TouchList.length - Web APIs
WebAPITouchListlength
syntax var numtouches = touchlist.length; return value numtouches the number of touch points in touchlist.
TrackDefault.TrackDefault() - Web APIs
syntax var trackdefault = new trackdefault(type, language, label, kinds, bytestreamtrackid); parameters type a domstring specifying a media segment data type for the sourcebuffer to contain.
TrackDefault.byteStreamTrackID - Web APIs
syntax var myid = trackdefault.bytestreamtrackid; value a domstring.
TrackDefault.kinds - Web APIs
syntax var mykinds = trackdefault.kinds; value an array of domstrings.
TrackDefault.label - Web APIs
syntax var mylabel = trackdefault.label; value a domstring.
TrackDefault.language - Web APIs
syntax var mylanguage = trackdefault.language; value a domstring.
TrackDefault.type - Web APIs
WebAPITrackDefaulttype
audio, video, or text track.) syntax var mytype = trackdefault.type; value a domstring — one of audio, video or text.
TrackDefaultList.TrackDefault() - Web APIs
[].) syntax var mytrackdefault = trackdefaultlist[index]; parameters index the index position of the trackdefault object you want to return.
TrackDefaultList.TrackDefaultList() - Web APIs
syntax var trackdefaultlist = new trackdefaultlist(trackdefaults); parameters trackdefaults a sequence (array) of trackdefault objects.
TrackDefaultList.length - Web APIs
syntax var mylistlength = trackdefaultlist.length; value an unsigned long number.
TrackEvent() - Web APIs
syntax trackevent = new trackevent(type, eventinfo); parameters type the type of track event which is described by the object: "addtrack" or "removetrack".
TrackEvent.track - Web APIs
WebAPITrackEventtrack
syntax track = trackevent.track; value an object which is one of the types audiotrack, videotrack, or texttrack, depending on the type of media represented by the track.
TransitionEvent() - Web APIs
syntax transitionevent = new transitionevent(type, {propertyname: apropertyname, elapsedtime : afloat, pseudoelement: apseudoelementname}); arguments the transitionevent() constructor also inherits arguments from event().
TransitionEvent.transitionName - Web APIs
syntax name = transitionevent.transitionname specifications specification status comment css transitionsthe definition of 'transitionevent.transitionname' in that specification.
TransitionEvent.elapsedTime - Web APIs
syntax name = transitionevent.elapsedtime specifications specification status comment css transitionsthe definition of 'transitionevent.elapsedtime' in that specification.
TransitionEvent.initTransitionEvent() - Web APIs
do not use it anymore, use the standard constructor, transitionevent(), to create a synthetic transitionevent syntax transitionevent.inittransitionevent(typearg, canbubblearg, cancelablearg, transitionnamearg, elapsedtimearg); parameters typearg is a domstring identifying the specific type of transition event that occurred.
TransitionEvent.pseudoElement - Web APIs
syntax name = transitionevent.pseudoelement specifications specification status comment css transitionsthe definition of 'transitionevent.pseudoelement' in that specification.
TreeWalker.currentNode - Web APIs
syntax node = treewalker.currentnode; treewalker.currentnode = node; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); root = treewalker.currentnode; // the root element as it is the first element!
TreeWalker.expandEntityReferences - Web APIs
syntax expand = treewalker.expandentityreferences; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); expand = treewalker.expandentityreferences; specifications document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker...
TreeWalker.filter - Web APIs
WebAPITreeWalkerfilter
syntax nodefilter = treewalker.filter; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); nodefilter = treewalker.filter; // document.body in this case specifications specification status comment domthe definition of 'treewalker.filter' in that specification.
TreeWalker.firstChild() - Web APIs
syntax node = treewalker.firstchild; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.firstchild(); // returns the first child of the root element, or null if none specifications specification status comment domthe definition of 'treewalker.firstchild' in that specification.
TreeWalker.lastChild() - Web APIs
syntax node = treewalker.lastchild(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.lastchild(); // returns the last visible child of the root element specifications specification status comment domthe definition of 'treewalker.lastchild' in that specification.
TreeWalker.nextNode() - Web APIs
syntax node = treewalker.nextnode(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.nextnode(); // returns the first child of root, as it is the next node in document order specifications specification status comment domthe definition of 'treewalker.nextnode' in that specification.
TreeWalker.nextSibling() - Web APIs
syntax node = treewalker.nextsibling(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); treewalker.firstchild(); var node = treewalker.nextsibling(); // returns null if the first child of the root element has no sibling specifications specification status comment domthe definition of 'treewalker.nextsibling' in that specification.
TreeWalker.parentNode() - Web APIs
syntax node = treewalker.parentnode(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.parentnode(); // returns null as there is no parent specifications specification status comment domthe definition of 'treewalker.parentnode' in that specification.
TreeWalker.previousNode() - Web APIs
syntax node = treewalker.previousnode(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.previousnode(); // returns null as there is no parent specifications specification status comment domthe definition of 'treewalker.previousnode' in that specification.
TreeWalker.previousSibling() - Web APIs
syntax node = treewalker.previoussibling(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.previoussibling(); // returns null as there is no previous sibiling specifications specification status comment domthe definition of 'treewalker.previoussibling' in that specification.
TreeWalker.root - Web APIs
WebAPITreeWalkerroot
syntax root = treewalker.root; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); root = treewalker.root; // document.body in this case specifications specification status comment domthe definition of 'treewalker.root' in that specification.
TreeWalker.whatToShow - Web APIs
syntax nodetypes = treewalker.whattoshow; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element + nodefilter.show_comment + nodefilter.show_text, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); if( (treewalker.whattoshow == nodefilter.show_all) || (treewalker.whattoshow % (nodefilter.show_comment*2)) >= nodefilter.
UIEvent() - Web APIs
WebAPIUIEventUIEvent
syntax event = new uievent(typearg [, uieventinit]) values typearg is a domstring representing the name of the event.
UIEvent.cancelBubble - Web APIs
syntax event.cancelbubble = bool; var bool = event.cancelbubble; specifications this property is not part of any specification.
UIEvent.initUIEvent() - Web APIs
syntax event.inituievent(type, canbubble, cancelable, view, detail) parameters type is a domstring defining the type of event.
UIEvent.isChar - Web APIs
WebAPIUIEventisChar
syntax var ischar = uievent.ischar; value a boolean which is true if the event produces a character; otherwise false.
UIEvent.layerX - Web APIs
WebAPIUIEventlayerX
syntax var xpos = event.layerx xpos is an integer value in pixels for the x-coordinate of the mouse pointer, when the mouse event fired.
UIEvent.layerY - Web APIs
WebAPIUIEventlayerY
syntax var ypos = event.layery; ypos is an integer value in pixels for the y-coordinate of the mouse pointer, when the mouse event fired.
UIEvent.pageX - Web APIs
WebAPIUIEventpageX
syntax var pos = event.pagex value an integer value, in pixels, indicating the x coordinate at which the mouse pointer was located when the event occurred.
UIEvent.pageY - Web APIs
WebAPIUIEventpageY
syntax var pagey = event.pagey; pagey is an integer value in pixels for the y-coordinate of the mouse pointer, relative to the whole document, when the mouse event fired.
sourceCapabilities - Web APIs
syntax var idc = event.sourcecapabilities value an instance of inputdevicecapabilities.
UIEvent.view - Web APIs
WebAPIUIEventview
syntax var view = event.view; view is a reference to an abstractview object.
URL() - Web APIs
WebAPIURLURL
syntax const url = new url(url [, base]) parameters url a usvstring representing an absolute or relative url.
URL.createObjectURL() - Web APIs
syntax const objecturl = url.createobjecturl(object) parameters object a file, blob, or mediasource object to create an object url for.
URL.hash - Web APIs
WebAPIURLhash
syntax const string = url.hash url.hash = newhash value a usvstring.
URL.host - Web APIs
WebAPIURLhost
syntax const host = url.host url.host = newhost value a usvstring.
URL.hostname - Web APIs
WebAPIURLhostname
syntax const domain = url.hostname url.hostname = domain value a usvstring.
URL.href - Web APIs
WebAPIURLhref
syntax const urlstring = url.href url.href = newurlstring value a usvstring.
URL.origin - Web APIs
WebAPIURLorigin
syntax const originstring = url.origin value a usvstring.
URL.password - Web APIs
WebAPIURLpassword
syntax const passwordstring = url.password url.password = newpassword value a usvstring.
URL.pathname - Web APIs
WebAPIURLpathname
syntax const path = url.pathname url.pathname = newpath value a usvstring.
URL.pathname - Web APIs
syntax const path = url.pathname url.pathname = newpath value a usvstring.
URL.port - Web APIs
WebAPIURLport
syntax const portnumber = url.port url.port = newportnumber value a usvstring.
URL.protocol - Web APIs
WebAPIURLprotocol
syntax const protocol = url.protocol url.protocol = newprotocol value a usvstring.
URL.revokeObjectURL() - Web APIs
syntax url.revokeobjecturl(objecturl) parameters objecturl a domstring representing a object url that was previously created by calling createobjecturl().
URL.search - Web APIs
WebAPIURLsearch
syntax const searchparams = object.search url.search = newsearchparams value a usvstring.
URL.search - Web APIs
WebAPIURLsearch?q=123
syntax const searchparams = object.search url.search = newsearchparams value a usvstring.
URL.searchParams - Web APIs
WebAPIURLsearchParams
syntax const urlsearchparams = url.searchparams value a urlsearchparams object.
URL.toJSON() - Web APIs
WebAPIURLtoJSON
syntax const href = url.tojson() return value a usvstring.
URL.toString() - Web APIs
WebAPIURLtoString
syntax const href = url.tostring() return value a usvstring.
URL.username - Web APIs
WebAPIURLusername
syntax const usernamestring = url.username url.username = newusername value a usvstring.
URLSearchParams() - Web APIs
syntax var urlsearchparams = new urlsearchparams(init); parameters init optional one of: a usvstring, which will be parsed from application/x-www-form-urlencoded format.
URLSearchParams.append() - Web APIs
syntax urlsearchparams.append(name, value) parameters name the name of the parameter to append.
URLSearchParams.delete() - Web APIs
syntax urlsearchparams.delete(name) parameters name the name of the parameter to be deleted.
URLSearchParams.entries() - Web APIs
syntax searchparams.entries(); parameters none.
URLSearchParams.forEach() - Web APIs
syntax searchparams.foreach(callback); parameters callback a callback function that is executed against each parameter, with the param value provided as its parameter.
URLSearchParams.get() - Web APIs
syntax urlsearchparams.get(name) parameters name the name of the parameter to return.
URLSearchParams.getAll() - Web APIs
syntax urlsearchparams.getall(name) parameters name the name of the parameter to return.
URLSearchParams.has() - Web APIs
syntax var hasname = urlsearchparams.has(name) parameters name the name of the parameter to find.
URLSearchParams.keys() - Web APIs
syntax searchparams.keys(); parameters none.
URLSearchParams.set() - Web APIs
syntax urlsearchparams.set(name, value) parameters name the name of the parameter to set.
URLSearchParams.sort() - Web APIs
syntax searchparams.sort(); parameters none.
URLSearchParams.toString() - Web APIs
syntax urlsearchparams.tostring() parameters none.
URLSearchParams.values() - Web APIs
syntax searchparams.values(); parameters none.
URLUtilsReadOnly.hash - Web APIs
syntax string = object.hash; examples // in a web worker, on the page https://developer.mozilla.org/docs/urlutilsreadonly.hash#example var result = window.self.hash; // returns:'#hash' specifications specification status comment urlthe definition of 'urlutilsreadonly.hash' in that specification.
URLUtilsReadOnly.host - Web APIs
syntax string = object.host; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.host var result = window.self.host; // returns:'developer.mozilla.org:80' specifications specification status comment urlthe definition of 'urlutilsreadonly.host' in that specification.
URLUtilsReadOnly.hostname - Web APIs
syntax string = object.hostname; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.hostname var result = window.self.hostname; // returns:'developer.mozilla.org' specifications specification status comment urlthe definition of 'urlutilsreadonly.hostname' in that specification.
URLUtilsReadOnly.href - Web APIs
syntax string = object.href; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.href var result = window.self.href; // returns:'https://developer.mozilla.org/urlutilsreadonly.href' specifications specification status comment urlthe definition of 'urlutilsreadonly.href' in that specification.
URLUtilsReadOnly.origin - Web APIs
syntax string = object.origin; examples // on this page, returns the origin var result = self.location.origin; // returns:'https://developer.mozilla.org:443' specifications specification status comment urlthe definition of 'urlutilsreadonly.origin' in that specification.
URLUtilsReadOnly.pathname - Web APIs
syntax string = object.pathname; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.pathname var result = window.self.pathname; // returns:'/urlutilsreadonly.pathname' specifications specification status comment urlthe definition of 'urlutilsreadonly.pathname' in that specification.
URLUtilsReadOnly.port - Web APIs
syntax string = object.port; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.port var result = window.self.port; // returns:'80' specifications specification status comment urlthe definition of 'urlutilsreadonly.port' in that specification.
URLUtilsReadOnly.protocol - Web APIs
syntax string = object.protocol; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.href var result = window.self.protocol; // returns:'https:' specifications specification status comment urlthe definition of 'urlutilsreadonly.protocol' in that specification.
URLUtilsReadOnly.search - Web APIs
syntax string = object.search; examples // in a web worker, on the page https://developer.mozilla.org/docs/urlutilsreadonly.href?t=67 var result = window.self.search; // returns:'?t=67' specifications specification status comment urlthe definition of 'urlutilsreadonly.search' in that specification.
URLUtilsReadOnly.toString() - Web APIs
syntax string = object.tostring(); examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.href var result = window.self.tostring(); // returns:'https://developer.mozilla.org/urlutilsreadonly.href' browser compatibility the compatibility table in this page is generated from structured data.
USB.getDevices() - Web APIs
WebAPIUSBgetDevices
syntax usb.getdevices() parameters none.
USB.onconnect - Web APIs
WebAPIUSBonconnect
syntax usb.onconnect = connectfunction specifications specification status comment webusbthe definition of 'onconnect' in that specification.
USB.ondisconnect - Web APIs
WebAPIUSBondisconnect
syntax usb.ondisconnect = disconnectfunction specifications specification status comment webusbthe definition of 'ondisconnect' in that specification.
USB.requestDevice() - Web APIs
WebAPIUSBrequestDevice
syntax usb.requestdevice([filters]) parameters filters an array of filter objects for possible devices you would like to pair.
USBConfiguration.USBConfiguration() - Web APIs
syntax var usbconfiguration = new usbconfiguration(device, configurationvalue) parameters device specifies the usbdevice you want to configure.
USBConfiguration.configurationName - Web APIs
syntax var name = usbconfiguration.configurationname value the name provided by the device to describe this configuration.
USBConfiguration.configurationValue - Web APIs
the configurationvalue read-only property of the usbconfiguration interface null syntax var value = usbconfiguration.configurationvalue value the configuration descriptor of the usbdevice specified in the constructor of the current usbconfiguration instance.
USBConfiguration.interfaces - Web APIs
syntax var interfaces[] = usbconfiguration.interfaces value an array containing instances of usbinterface.
USBDevice.deviceClass - Web APIs
syntax var number = usbdevice.deviceclass value a number.
USBDevice.claimInterface() - Web APIs
syntax var promise = usbdevice.claiminterface(interfacenumber) parameters interfacenumber the index of one of the interfaces supported by the device.
USBDevice.clearHalt() - Web APIs
syntax var promise = usbdevice.clearhalt(direction, endpointnumber) parameters direction indicates whether the devices input or output should be cleared.
USBDevice.close() - Web APIs
WebAPIUSBDeviceclose
syntax var promise = usbdevice.close() parameters none.
USBDevice.configuration - Web APIs
syntax var usbconfiguration = usbdevice.configuration value a usbconfiguration object.
USBDevice.configurations - Web APIs
syntax var usbconfiguration[] = usbdevice.configurations value an array of usbconfiguration objects.
USBDevice.controlTransferIn() - Web APIs
syntax var promise = usbdevice.controltransferin(setup, length) parameters setup an object that sets options for .
USBDevice.controlTransferOut() - Web APIs
syntax var promise = usbdevice.controltransferout(setup, data) parameters setup an object that sets options for .
USBDevice.deviceClass - Web APIs
syntax var number = usbdevice.deviceclass value a number.
USBDevice.deviceProtocol - Web APIs
syntax var number = usbdevice.deviceprotocol value a number.
USBDevice.deviceSubclass - Web APIs
syntax var serialnumber = usbdevice.devicesubclass value a number.
USBDevice.deviceVersionMajor - Web APIs
syntax var serialnumber = usbdevice.deviceversionmajor value a number.
USBDevice.deviceVersionMinor - Web APIs
syntax var serialnumber = usbdevice.deviceversionminor value a number.
USBDevice.deviceVersionSubminor - Web APIs
syntax var serialnumber = usbdevice.deviceversionsubminor value a number.
USBDevice.isochronousTransferIn() - Web APIs
syntax var promise = usbdevice.isochronoustransferin(endpointnumber, packetlengths) parameters endpointnumber the number of a device-specific endpoint (buffer).
USBDevice.isochronousTransferOut() - Web APIs
syntax var promise = usbdevice.isochronoustransferout(endpointnumber, data, packetlengths) parameters endpointnumber the number of a device-specific endpoint (buffer).
USBDevice.manufacturerName - Web APIs
syntax var serialnumber = usbdevice.manufacturername value a domstring.
USBDevice.open() - Web APIs
WebAPIUSBDeviceopen
syntax var promise = usbdevice.open() parameters none.
USBDevice.opened - Web APIs
WebAPIUSBDeviceopened
syntax var serialnumber = usbdevice.opened value a boolean.
USBDevice.productID - Web APIs
syntax var serialnumber = usbdevice.productid value the manufacturer-defined code that identifies a usb device.
USBDevice.productName - Web APIs
syntax var serialnumber = usbdevice.productname value the manufacturer-defined name that identifies a usb device.
USBDevice.releaseInterface() - Web APIs
syntax var promise = usbdevice.releaseinterface(interfacenumber) parameters interfacenumber the device-specific index of the currently-claimed interface.
USBDevice.reset() - Web APIs
WebAPIUSBDevicereset
syntax var promise = usbdevice.reset() parameters none.
USBDevice.selectAlternateInterface() - Web APIs
syntax var promise = usbdevice.selectalternateinterface(interfacenumber, alternatesetting) parameters interfacenumber the index of one of the interfaces supported by the device.
USBDevice.selectConfiguration() - Web APIs
syntax var promise = usbdevice.selectconfiguration(configurationvalue) parameters configurationvalue the number of a device-specific configuration.
USBDevice.serialNumber - Web APIs
syntax var serialnumber = usbdevice.serialnumber value the serial number for the specified usb device specifications specification status comment webusbthe definition of 'serialnumber' in that specification.
USBDevice.transferIn() - Web APIs
syntax var promise = usbdevice.transferin(endpointnumber, length) parameters endpointnumber the number of a device-specific endpoint (buffer).
USBDevice.transferOut() - Web APIs
syntax var promise = usbdevice.transferout(endpointnumber, data) parameters endpointnumber the number of a device-specific endpoint (buffer).
USBDevice.usbVersionMajor - Web APIs
syntax var serialnumber = usbdevice.usbversionmajor value the last of three properties that declare the usb protocol version supported by the device.
USBDevice.usbVersionMinor - Web APIs
syntax var serialnumber = usbdevice.usbversionminor value the second of three properties that declare the usb protocol version supported by the device.
USBDevice.usbVersionSubminor - Web APIs
syntax var serialnumber = usbdevice.usbversionsubminor value the first of three properties that declare the usb protocol version supported by the device.
USBDevice.vendorID - Web APIs
syntax var serialnumber = usbdevice.vendorid value the official usg.org-assigned vendor id.
UserProximityEvent.near - Web APIs
syntax var near = userproximityevent.near; value a boolean ...
VTTCue() - Web APIs
WebAPIVTTCueVTTCue
syntax vttcue = new vttcue(starttime, endtime, text); parameters starttime this is a double representing the initial text track cue start time.
ValidityState - Web APIs
typemismatch read only a boolean that is true if the value is not in the required syntax (when type is email or url), or false if the syntax is correct.
VideoPlaybackQuality.corruptedVideoFrames - Web APIs
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
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
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.
VideoPlaybackQuality.totalFrameDelay - Web APIs
syntax value = videoplaybackquality.totalframedelay; example var videoelt = document.getelementbyid('my_vid'); var quality = videoelt.getvideoplaybackquality(); alert(quality.totalframedelay); ...
VideoPlaybackQuality.totalVideoFrames - Web APIs
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.
VideoTrack.id - Web APIs
WebAPIVideoTrackid
syntax var trackid = videotrack.id; value a domstring which identifies the track, suitable for use when calling gettrackbyid() on an videotracklist such as the one specified by a media element's videotracks property.
VideoTrack.kind - Web APIs
WebAPIVideoTrackkind
syntax var trackkind = videotrack.kind; value a domstring specifying the type of content the media represents.
VideoTrack.label - Web APIs
WebAPIVideoTracklabel
syntax var videotracklabel = videotrack.label; value a domstring specifying the track's human-readable label, if one is available in the track metadata.
Videotrack.language - Web APIs
syntax var videotracklanguage = videotrack.language; value a domstring specifying the bcp 47 (rfc 5646) format language tag of the primary language used in the video track, or an empty string ("") if the language is not specified or known, or if the track doesn't contain speech.
VideoTrack.selected - Web APIs
syntax isvideoselected = videotrack.selected; videotrack.selected = true | false; value the selected property is a boolean whose value is true if the track is active.
VideoTrack.sourceBuffer - Web APIs
syntax var sourcebuffer = videotrack.sourcebuffer; value a sourcebuffer or null.
VideoTrack - Web APIs
usage notes to get a videotrack for a given media element, use the element's videotracks property, which returns a videotracklist object from which you can get the individual tracks contained in the media: var el = document.queryselector("video"); var tracks = el.videotracks; you can then access the media's individual tracks using either array syntax or functions such as foreach().
getTrackById - Web APIs
syntax var thetrack = videotracklist.gettrackbyid(id); paramters id a domstring indicating the id of the track to locate within the track list.
VideoTrackList.length - Web APIs
syntax var trackcount = videotracklist.length; value a number indicating how many video tracks are included in the videotracklist.
VideoTrackList.onaddtrack - Web APIs
syntax videotracklist.onaddtrack = eventhandler; value set onaddtrack to a function that accepts as input a trackevent object which indicates in its track property which video track has been added to the media.
VideoTrackList.onchange - Web APIs
syntax videotracklist.onchange = eventhandler; value set onchange to a function that should be called whenever a track is made active.
VideoTrackList.onremovetrack - Web APIs
syntax videotracklist.onremovetrack = eventhandler; value set onremovetrack to a function that accepts as input a trackevent object which indicates in its track property which video track has been removed from the media element.
VideoTrackList.selectedIndex - Web APIs
syntax var index = videotracklist.selectedindex; value a number indicating the index of the currently selected track, if any, or -1 otherwise.
VideoTrackList - Web APIs
the individual tracks can be accessed using array syntax or functions such as foreach() for example.
VisualViewport.height - Web APIs
syntax var height = visualviewport.height value a double.
VisualViewport.offsetTop - Web APIs
syntax var offsettop = visualviewport.offsettop value a double.
VisualViewport.offsetleft - Web APIs
syntax var offsetleft = visualviewport.offsetleft value a double.
VisualViewport.onresize - Web APIs
syntax visualviewport.onresize = function(e) { ...
VisualViewport.onscroll - Web APIs
syntax visualviewport.onscroll = function(e) { ...
VisualViewport.pageLeft - Web APIs
syntax var pageleft = visualviewport.pageleft value a double.
VisualViewport.pageTop - Web APIs
syntax var pagetop = visualviewport.pagetop value a double.
VisualViewport.scale - Web APIs
syntax var scale = visualviewport.scale value a double.
VisualViewport.width - Web APIs
syntax var width = visualviewport.width value a double.
WEBGL_compressed_texture_astc.getSupportedProfiles() - Web APIs
syntax sequence<domstring> ext.getsupportedprofiles(); return value an array of domstring elements indicating which astc profiles are supported by the implementation.
WEBGL_debug_shaders.getTranslatedShaderSource() - Web APIs
syntax gl.getextension('webgl_debug_shaders').gettranslatedshadersource(shader); parameters shader a webglshader to get the translated source from.
WEBGL_draw_buffers.drawBuffersWEBGL() - Web APIs
syntax void gl.getextension('webgl_draw_buffers').drawbufferswebgl(buffers); parameters buffers an array of glenum constants defining drawing buffers.
WEBGL_lose_context.loseContext() - Web APIs
syntax gl.getextension('webgl_lose_context').losecontext(); examples with this method, you can simulate the webglcontextlost event: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextlost', function(e) { console.log(e); }, false); gl.getextension('webgl_lose_context').losecontext(); // webglcontextevent event with type "webglcontextlost" is logged.
WEBGL_lose_context.restoreContext() - Web APIs
syntax gl.getextension('webgl_lose_context').restorecontext(); errors thrown invalid_operation if the context was not lost.
WakeLock.request() - Web APIs
WebAPIWakeLockrequest
syntax var wakelock = navigator.wakelock.request(type); parameters type options are as follows: 'screen': requests a screen wake lock.
WakeLockSentinel.release() - Web APIs
syntax wakelocksentinel.release().then(...); parameters none.
WakeLockSentinel.type - Web APIs
syntax var type = wakelocksentinel.type; value a string representation of the currently acquired wake lock type.
WaveShaperNode.WaveShaperNode() - Web APIs
syntax var waveshapernode = new waveshapernode(context, options) parameters inherits parameters from the audionodeoptions dictionary.
WaveShaperNode.curve - Web APIs
syntax var audioctx = new audiocontext(); var distortion = audioctx.createwaveshaper(); distortion.curve = mycurvedataarray; // mycurvedataarray is a float32array value a float32array.
WaveShaperNode.oversample - Web APIs
syntax distortion.oversample = enumeratedvalue; values distortion is a waveshapernode.
WebGL2RenderingContext.beginQuery() - Web APIs
syntax void gl.beginquery(target, query); parameters target a glenum specifying the target of the query.
WebGL2RenderingContext.beginTransformFeedback() - Web APIs
syntax void gl.begintransformfeedback(primitivemode); parameters primitivemode a glenum specifying the output type of the primitives that will be recorded into the buffer objects that are bound for transform feedback.
WebGL2RenderingContext.bindBufferBase() - Web APIs
syntax void gl.bindbufferbase(target, index, buffer); parameters target a glenum specifying the target for the bind operation.
WebGL2RenderingContext.bindBufferRange() - Web APIs
syntax void gl.bindbufferrange(target, index, buffer, offset, size); parameters target a glenum specifying the target for the bind operation.
WebGL2RenderingContext.bindSampler() - Web APIs
syntax void gl.bindsampler(unit, sampler); parameters unit a gluint specifying the index of the texture unit to which to bind the sampler to.
WebGL2RenderingContext.bindTransformFeedback() - Web APIs
syntax void gl.bindtransformfeedback(target, transformfeedback); parameters target a glenum specifying the target (binding point).
WebGL2RenderingContext.bindVertexArray() - Web APIs
syntax void gl.bindvertexarray(vertexarray); parameters vertexarray a webglvertexarrayobject (vao) object to bind.
WebGL2RenderingContext.blitFramebuffer() - Web APIs
syntax void gl.blitframebuffer(srcx0, srcy0, srcx1, srcy1, dstx0, dsty0, dstx1, dsty1, mask, filter); parameters srcx0, srcy0, srcx1, srcy1 a glint specifying the bounds of the source rectangle.
WebGL2RenderingContext.clearBuffer[fiuv]() - Web APIs
syntax void gl.clearbufferfv(buffer, drawbuffer, values, optional srcoffset); void gl.clearbufferiv(buffer, drawbuffer, values, optional srcoffset); void gl.clearbufferuiv(buffer, drawbuffer, values, optional srcoffset); void gl.clearbufferfi(buffer, drawbuffer, depth, stencil); parameters buffer a glenum specifying the buffer to clear.
WebGL2RenderingContext.clientWaitSync() - Web APIs
syntax glenum gl.clientwaitsync(sync, flags, timeout); parameters sync a webglsync object on which to wait on.
WebGL2RenderingContext.compressedTexSubImage3D() - Web APIs
syntax // read from the buffer bound to gl.pixel_unpack_buffer void gl.compressedtexsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imagesize, offset); void gl.compressedtexsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, arraybufferview srcdata, optional srcoffset, optional srclengthoverride); parameters target a glenum specifying the binding point (target) of the active texture.
WebGL2RenderingContext.copyBufferSubData() - Web APIs
syntax void gl.copybuffersubdata(readtarget, writetarget, readoffset, writeoffset, size); parameters readtarget writetarget a glenum specifying the binding point (target) from whose data store should be read or written.
WebGL2RenderingContext.copyTexSubImage3D() - Web APIs
syntax void gl.copytexsubimage3d(target, level, xoffset, yoffset, zoffset, x, y, width, height); parameters target a glenum specifying the binding point (target) of the active texture.
WebGL2RenderingContext.createQuery() - Web APIs
syntax webglquery gl.createquery(); parameters none.
WebGL2RenderingContext.createSampler() - Web APIs
syntax webglsampler gl.createsampler(); parameters none.
WebGL2RenderingContext.createTransformFeedback() - Web APIs
syntax webgltransformfeedback gl.createtransformfeedback(); parameters none.
WebGL2RenderingContext.createVertexArray() - Web APIs
syntax webglvertexarrayobject gl.createvertexarray(); parameters none.
WebGL2RenderingContext.deleteQuery() - Web APIs
syntax void gl.deletequery(query); parameters query a webglquery object to delete.
WebGL2RenderingContext.deleteSampler() - Web APIs
syntax void gl.deletesampler(sampler); parameters sampler a webglsampler object to delete.
WebGL2RenderingContext.deleteSync() - Web APIs
syntax void gl.deletesync(sync); parameters sync a webglsync object to delete.
WebGL2RenderingContext.deleteTransformFeedback() - Web APIs
syntax void gl.deletetransformfeedback(transformfeedback); parameters transformfeedback a webgltransformfeedback object to delete.
WebGL2RenderingContext.deleteVertexArray() - Web APIs
syntax void gl.deletevertexarray(vertexarray); parameters vertexarray a webglvertexarrayobject (vao) object to delete.
WebGL2RenderingContext.drawArraysInstanced() - Web APIs
syntax void gl.drawarraysinstanced(mode, first, count, instancecount); parameters mode a glenum specifying the type primitive to render.
WebGL2RenderingContext.drawBuffers() - Web APIs
syntax void gl.drawbuffers(buffers); parameters buffers an array of glenum specifying the buffers into which fragment colors will be written.
WebGL2RenderingContext.drawElementsInstanced() - Web APIs
syntax void gl.drawelementsinstanced(mode, count, type, offset, instancecount); parameters mode a glenum specifying the type primitive to render.
WebGL2RenderingContext.drawRangeElements() - Web APIs
syntax void gl.drawrangeelements(mode, start, end, count, type, offset); parameters mode a glenum specifying the type primitive to render.
WebGL2RenderingContext.endQuery() - Web APIs
syntax void gl.endquery(target); parameters target a glenum specifying the target of the query.
WebGL2RenderingContext.endTransformFeedback() - Web APIs
syntax void gl.endtransformfeedback(); parameters none.
WebGL2RenderingContext.fenceSync() - Web APIs
syntax webglsync gl.fencesync(condition, flags); parameters condition a glenum specifying the condition that must be met to set the sync object's state to signaled.
WebGL2RenderingContext.framebufferTextureLayer() - Web APIs
syntax void gl.framebuffertexturelayer(target, attachment, texture, level, layer); parameters target a glenum specifying the binding point (target).
WebGL2RenderingContext.getActiveUniformBlockName() - Web APIs
syntax domstring gl.getactiveuniformblockname(program, uniformblockindex); parameters program a webglprogram containing the uniform block.
WebGL2RenderingContext.getActiveUniformBlockParameter() - Web APIs
syntax any gl.getactiveuniformblockparameter(program, uniformblockindex, pname); parameters program a webglprogram containing the active uniform block.
WebGL2RenderingContext.getActiveUniforms() - Web APIs
syntax any gl.getactiveuniforms(program, uniformindices, pname); parameters program a webglprogram containing the active uniforms.
WebGL2RenderingContext.getBufferSubData() - Web APIs
syntax void gl.getbuffersubdata(target, srcbyteoffset, arraybufferview dstdata, optional dstoffset, optional length); parameters target a glenum specifying the binding point (target).
WebGL2RenderingContext.getFragDataLocation() - Web APIs
syntax glint gl.getfragdatalocation(program, name); parameters program a webglprogram to query.
WebGL2RenderingContext.getIndexedParameter() - Web APIs
syntax any gl.getindexedparameter(target, index); parameters target a glenum specifying the target for which to return information.
WebGL2RenderingContext.getInternalformatParameter() - Web APIs
syntax any gl.getinternalformatparameter(target, internalformat, pname); parameters target a glenum specifying the target renderbuffer object.
WebGL2RenderingContext.getQuery() - Web APIs
syntax webglquery gl.getquery(target, pname); parameters target a glenum specifying the target of the query.
WebGL2RenderingContext.getQueryParameter() - Web APIs
syntax any gl.getqueryparameter(query, pname); parameters query a webglquery object.
WebGL2RenderingContext.getSamplerParameter() - Web APIs
syntax any gl.getsamplerparameter(sampler, pname); parameters sampler a webglsampler object.
WebGL2RenderingContext.getSyncParameter() - Web APIs
syntax any gl.getsyncparameter(sync, pname); parameters sync a webglsync object.
WebGL2RenderingContext.getTransformFeedbackVarying() - Web APIs
syntax webglactiveinfo gl.gettransformfeedbackvarying(program, index); parameters program a webglprogram.
WebGL2RenderingContext.getUniformBlockIndex() - Web APIs
syntax gluint gl.getuniformblockindex(program, uniformblockname); parameters program a webglprogram containing the uniform block.
WebGL2RenderingContext.getUniformIndices() - Web APIs
syntax sequence<gluint> gl.getuniformindices(program, uniformnames); parameters program a webglprogram containing uniforms whose indices to query.
WebGL2RenderingContext.invalidateFramebuffer() - Web APIs
syntax void gl.invalidateframebuffer(target, attachments); parameters target a glenum specifying the binding point (target).
WebGL2RenderingContext.invalidateSubFramebuffer() - Web APIs
syntax void gl.invalidatesubframebuffer(target, attachments, x, y, width, height); parameters target a glenum specifying the binding point (target).
WebGL2RenderingContext.isQuery() - Web APIs
syntax glboolean gl.isquery(query); parameters query a webglquery object to test.
WebGL2RenderingContext.isSampler() - Web APIs
syntax glboolean gl.issampler(sampler); parameters sampler a webglsampler object to test.
WebGL2RenderingContext.isSync() - Web APIs
syntax glboolean gl.issync(sync); parameters sync a webglsync object to test.
WebGL2RenderingContext.isTransformFeedback() - Web APIs
syntax glboolean gl.istransformfeedback(transformfeedback); parameters transformfeedback a webgltransformfeedback object to test.
WebGL2RenderingContext.isVertexArray() - Web APIs
syntax glboolean gl.isvertexarray(vertexarray); parameters vertexarray a webglvertexarrayobject (vao) object to test.
WebGL2RenderingContext.pauseTransformFeedback() - Web APIs
syntax void gl.pausetransformfeedback(); parameters none.
WebGL2RenderingContext.readBuffer() - Web APIs
syntax void gl.readbuffer(src); parameters src a glenum specifying a color buffer.
WebGL2RenderingContext.renderbufferStorageMultisample() - Web APIs
syntax void gl.renderbufferstoragemultisample(target, samples, internalformat, width, height); parameters target a glenum specifying the target renderbuffer object.
WebGL2RenderingContext.resumeTransformFeedback() - Web APIs
syntax void gl.resumetransformfeedback(); parameters none.
WebGL2RenderingContext.samplerParameter[if]() - Web APIs
syntax void gl.samplerparameteri(sampler, pname, param); void gl.samplerparameterf(sampler, pname, param); parameters sampler a webglsampler object.
WebGL2RenderingContext.texImage3D() - Web APIs
syntax void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, glintptr offset); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, htmlcanvaselement source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, htmlimageelement source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, htmlvideoelement source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, imagebitmap source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, t...
WebGL2RenderingContext.texStorage2D() - Web APIs
syntax void gl.texstorage2d(target, levels, internalformat, width, height); parameters target a glenum specifying the binding point (target) of the active texture.
WebGL2RenderingContext.texStorage3D() - Web APIs
syntax void gl.texstorage3d(target, levels, internalformat, width, height, depth); parameters target a glenum specifying the binding point (target) of the active texture.
WebGL2RenderingContext.texSubImage3D() - Web APIs
syntax void gl.texsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, arraybufferview?
WebGL2RenderingContext.transformFeedbackVaryings() - Web APIs
syntax void gl.transformfeedbackvaryings(program, varyings, buffermode); parameters program a webglprogram.
WebGL2RenderingContext.uniformBlockBinding() - Web APIs
syntax void gl.uniformblockbinding(program, uniformblockindex, uniformblockbinding); parameters program a webglprogram containing the active uniform block whose binding to assign.
WebGL2RenderingContext.vertexAttribDivisor() - Web APIs
syntax void gl.vertexattribdivisor(index, divisor); parameters index a gluint specifying the index of the generic vertex attributes.
WebGL2RenderingContext.vertexAttribI4[u]i[v]() - Web APIs
syntax void gl.vertexattribi4i(index, v0, v1, v2, v3); void gl.vertexattribi4ui(index, v0, v1, v2, v3); void gl.vertexattribi4iv(index, value); void gl.vertexattribi4uiv(index, value); parameters index a gluint specifying the position of the vertex attribute to be modified.
WebGL2RenderingContext.vertexAttribIPointer() - Web APIs
syntax void gl.vertexattribipointer(index, size, type, stride, offset); parameters index a gluint specifying the index of the vertex attribute that is to be modified.
WebGL2RenderingContext.waitSync() - Web APIs
syntax void gl.waitsync(sync, flags, timeout); parameters sync a webglsync object on which to wait on.
WebGLRenderingContext.activeTexture() - Web APIs
syntax void gl.activetexture(texture); parameters texture the texture unit to make active.
WebGLRenderingContext.attachShader() - Web APIs
syntax void gl.attachshader(program, shader); parameters program a webglprogram.
WebGLRenderingContext.bindAttribLocation() - Web APIs
syntax void gl.bindattriblocation(program, index, name); parameters program a webglprogram object to bind.
WebGLRenderingContext.bindBuffer() - Web APIs
syntax void gl.bindbuffer(target, buffer); parameters target a glenum specifying the binding point (target).
WebGLRenderingContext.bindFramebuffer() - Web APIs
syntax void gl.bindframebuffer(target, framebuffer); parameters target a glenum specifying the binding point (target).
WebGLRenderingContext.bindRenderbuffer() - Web APIs
syntax void gl.bindrenderbuffer(target, renderbuffer); parameters target a glenum specifying the binding point (target).
WebGLRenderingContext.bindTexture() - Web APIs
syntax void gl.bindtexture(target, texture); parameters target a glenum specifying the binding point (target).
WebGLRenderingContext.blendColor() - Web APIs
syntax void gl.blendcolor(red, green, blue, alpha); parameters red a glclampf for the red component in the range of 0 to 1.
WebGLRenderingContext.blendEquation() - Web APIs
syntax void gl.blendequation(mode); parameters mode a glenum specifying how source and destination colors are combined.
WebGLRenderingContext.blendEquationSeparate() - Web APIs
syntax void gl.blendequationseparate(modergb, modealpha); parameters modergb a glenum specifying how the red, green and blue components of source and destination colors are combined.
WebGLRenderingContext.blendFunc() - Web APIs
syntax void gl.blendfunc(sfactor, dfactor); parameters sfactor a glenum specifying a multiplier for the source blending factors.
WebGLRenderingContext.blendFuncSeparate() - Web APIs
syntax void gl.blendfuncseparate(srcrgb, dstrgb, srcalpha, dstalpha); parameters srcrgb a glenum specifying a multiplier for the red, green and blue (rgb) source blending factors.
WebGLRenderingContext.bufferData() - Web APIs
syntax // webgl1: void gl.bufferdata(target, size, usage); void gl.bufferdata(target, arraybuffer?
WebGLRenderingContext.bufferSubData() - Web APIs
syntax // webgl1: void gl.buffersubdata(target, offset, arraybuffer srcdata); void gl.buffersubdata(target, offset, arraybufferview srcdata); // webgl2: void gl.buffersubdata(target, dstbyteoffset, arraybufferview srcdata, srcoffset, length); parameters target a glenum specifying the binding point (target).
WebGLRenderingContext.canvas - Web APIs
syntax gl.canvas; return value either a htmlcanvaselement or offscreencanvas object or null.
WebGLRenderingContext.checkFramebufferStatus() - Web APIs
syntax glenum gl.checkframebufferstatus(target); parameters target a glenum specifying the binding point (target).
WebGLRenderingContext.clear() - Web APIs
syntax void gl.clear(mask); parameters mask a glbitfield bitwise or mask that indicates the buffers to be cleared.
WebGLRenderingContext.clearColor() - Web APIs
syntax void gl.clearcolor(red, green, blue, alpha); parameters red a glclampf specifying the red color value used when the color buffers are cleared.
WebGLRenderingContext.clearDepth() - Web APIs
syntax void gl.cleardepth(depth); parameters depth a glclampf specifying the depth value used when the depth buffer is cleared.
WebGLRenderingContext.clearStencil() - Web APIs
syntax void gl.clearstencil(s); parameters s a glint specifying the index used when the stencil buffer is cleared.
WebGLRenderingContext.colorMask() - Web APIs
syntax void gl.colormask(red, green, blue, alpha); parameters red a glboolean specifying whether or not the red color component can be written into the frame buffer.
WebGLRenderingContext.commit() - Web APIs
syntax void webglrenderingcontext.commit() examples var htmlcanvas = document.createelement('canvas'); var offscreen = htmlcanvas.transfercontroltooffscreen(); var gl = offscreen.getcontext('webgl'); // ...
WebGLRenderingContext.compileShader() - Web APIs
syntax void gl.compileshader(shader); parameters shader a fragment or vertex webglshader.
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
syntax // webgl 1: void gl.compressedteximage2d(target, level, internalformat, width, height, border, arraybufferview?
WebGLRenderingContext.compressedTexSubImage2D() - Web APIs
syntax // webgl 1: void gl.compressedtexsubimage2d(target, level, xoffset, yoffset, width, height, format, arraybufferview?
WebGLRenderingContext.copyTexImage2D() - Web APIs
syntax void gl.copyteximage2d(target, level, internalformat, x, y, width, height, border); parameters target a glenum specifying the binding point (target) of the active texture.
WebGLRenderingContext.copyTexSubImage2D() - Web APIs
syntax void gl.copytexsubimage2d(target, level, xoffset, yoffset, x, y, width, height); parameters target a glenum specifying the binding point (target) of the active texture.
WebGLRenderingContext.createBuffer() - Web APIs
syntax webglbuffer gl.createbuffer(); parameters none.
WebGLRenderingContext.createFramebuffer() - Web APIs
syntax webglframebuffer gl.createframebuffer(); parameters none.
WebGLRenderingContext.createProgram() - Web APIs
syntax webglprogram gl.createprogram(); parameters none.
WebGLRenderingContext.createRenderbuffer() - Web APIs
syntax webglrenderbuffer gl.createrenderbuffer(); parameters none.
WebGLRenderingContext.createShader() - Web APIs
syntax webglshader gl.createshader(type); parameters type either gl.vertex_shader or gl.fragment_shader examples see webglshader for usage and examples.
WebGLRenderingContext.createTexture() - Web APIs
syntax webgltexture gl.createtexture(); parameters none.
WebGLRenderingContext.cullFace() - Web APIs
syntax void gl.cullface(mode); parameters mode a glenum specifying whether front- or back-facing polygons are candidates for culling.
WebGLRenderingContext.deleteBuffer() - Web APIs
syntax void gl.deletebuffer(buffer); parameters buffer a webglbuffer object to delete.
WebGLRenderingContext.deleteFramebuffer() - Web APIs
syntax void gl.deleteframebuffer(framebuffer); parameters framebuffer a webglframebuffer object to delete.
WebGLRenderingContext.deleteProgram() - Web APIs
syntax void gl.deleteprogram(program); parameters program a webglprogram object to delete.
WebGLRenderingContext.deleteRenderbuffer() - Web APIs
syntax void gl.deleterenderbuffer(renderbuffer); parameters renderbuffer a webglrenderbuffer object to delete.
WebGLRenderingContext.deleteShader() - Web APIs
syntax void gl.deleteshader(shader); parameters shader a webglshader object to delete.
WebGLRenderingContext.deleteTexture() - Web APIs
syntax void gl.deletetexture(texture); parameters texture a webgltexture object to delete.
WebGLRenderingContext.depthFunc() - Web APIs
syntax void gl.depthfunc(func); parameters func a glenum specifying the depth comparison function, which sets the conditions under which the pixel will be drawn.
WebGLRenderingContext.depthMask() - Web APIs
syntax void gl.depthmask(flag); parameters flag a glboolean specifying whether or not writing into the depth buffer is enabled.
WebGLRenderingContext.depthRange() - Web APIs
syntax void gl.depthrange(znear, zfar); parameters znear a glclampf specifying the mapping of the near clipping plane to window or viewport coordinates.
WebGLRenderingContext.detachShader() - Web APIs
syntax void gl.detachshader(program, shader); parameters program a webglprogram.
WebGLRenderingContext.disable() - Web APIs
syntax void gl.disable(cap); parameters cap a glenum specifying which webgl capability to disable.
WebGLRenderingContext.disableVertexAttribArray() - Web APIs
syntax void gl.disablevertexattribarray(index); parameters index a gluint specifying the index of the vertex attribute to disable.
WebGLRenderingContext.drawArrays() - Web APIs
syntax void gl.drawarrays(mode, first, count); parameters mode a glenum specifying the type primitive to render.
WebGLRenderingContext.drawElements() - Web APIs
syntax void gl.drawelements(mode, count, type, offset); parameters mode a glenum specifying the type primitive to render.
WebGLRenderingContext.drawingBufferHeight - Web APIs
syntax gl.drawingbufferheight; examples given this <canvas> element: <canvas id="canvas"></canvas> you can get the height of the drawing buffer with the following lines: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.drawingbufferheight; // 150 specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.drawingbufferheight' in that specification.
WebGLRenderingContext.drawingBufferWidth - Web APIs
syntax gl.drawingbufferwidth; examples given this <canvas> element: <canvas id="canvas"></canvas> you can get the width of the drawing buffer with the following lines: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.drawingbufferwidth; // 300 specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.drawingbufferwidth' in that specification.
WebGLRenderingContext.enable() - Web APIs
syntax void gl.enable(cap); parameters cap a glenum specifying which webgl capability to enable.
WebGLRenderingContext.enableVertexAttribArray() - Web APIs
syntax void gl.enablevertexattribarray(index); parameters index a gluint specifying the index number that uniquely identifies the vertex attribute to enable.
WebGLRenderingContext.finish() - Web APIs
syntax void gl.finish(); parameters none.
WebGLRenderingContext.flush() - Web APIs
syntax void gl.flush(); parameters none.
WebGLRenderingContext.framebufferRenderbuffer() - Web APIs
syntax void gl.framebufferrenderbuffer(target, attachment, renderbuffertarget, renderbuffer); parameters target a glenum specifying the binding point (target) for the framebuffer.
WebGLRenderingContext.framebufferTexture2D() - Web APIs
syntax void gl.framebuffertexture2d(target, attachment, textarget, texture, level); parameters target a glenum specifying the binding point (target).
WebGLRenderingContext.frontFace() - Web APIs
syntax void gl.frontface(mode); parameters mode a glenum type winding orientation.
WebGLRenderingContext.generateMipmap() - Web APIs
syntax void gl.generatemipmap(target); parameters target a glenum specifying the binding point (target) of the active texture whose mipmaps will be generated.
WebGLRenderingContext.getActiveAttrib() - Web APIs
syntax webglactiveinfo gl.getactiveattrib(program,index); parameters program a webglprogram containing the vertex attribute.
WebGLRenderingContext.getActiveUniform() - Web APIs
syntax webglactiveinfo webglrenderingcontext.getactiveuniform(program, index); parameters program a webglprogram specifying the webgl shader program from which to obtain the uniform variable's information.
WebGLRenderingContext.getAttachedShaders() - Web APIs
syntax sequence<webglshader> gl.getattachedshaders(program); parameters program a webglprogram object to get attached shaders for.
WebGLRenderingContext.getAttribLocation() - Web APIs
syntax glint gl.getattriblocation(program, name); parameters program a webglprogram containing the attribute variable.
WebGLRenderingContext.getBufferParameter() - Web APIs
syntax any gl.getbufferparameter(target, pname); parameters target a glenum specifying the target buffer object.
WebGLRenderingContext.getContextAttributes() - Web APIs
syntax gl.getcontextattributes(); return value a webglcontextattributes object that contains the actual context parameters, or null if the context is lost.
WebGLRenderingContext.getError() - Web APIs
syntax glenum gl.geterror(); parameters none.
WebGLRenderingContext.getExtension() - Web APIs
syntax gl.getextension(name); parameters name a string for the name of the webgl extension to enable.
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
syntax any gl.getframebufferattachmentparameter(target, attachment, pname); parameters target a glenum specifying the binding point (target).
WebGLRenderingContext.getParameter() - Web APIs
syntax any gl.getparameter(pname); parameters pname a glenum specifying which parameter value to return.
WebGLRenderingContext.getProgramInfoLog() - Web APIs
syntax gl.getprograminfolog(program); parameters program the webglprogram to query.
WebGLRenderingContext.getProgramParameter() - Web APIs
syntax any gl.getprogramparameter(program, pname); parameters program a webglprogram to get parameter information from.
WebGLRenderingContext.getRenderbufferParameter() - Web APIs
syntax any gl.getrenderbufferparameter(target, pname); parameters target a glenum specifying the target renderbuffer object.
WebGLRenderingContext.getShaderInfoLog() - Web APIs
syntax gl.getshaderinfolog(shader); parameters shader a webglshader to query.
WebGLRenderingContext.getShaderParameter() - Web APIs
syntax any gl.getshaderparameter(shader, pname); parameters shader a webglshader to get parameter information from.
WebGLRenderingContext.getShaderPrecisionFormat() - Web APIs
syntax webglshaderprecisionformat gl.getshaderprecisionformat(shadertype, precisiontype); parameters shadertype either a gl.fragment_shader or a gl.vertex_shader.
WebGLRenderingContext.getShaderSource() - Web APIs
syntax domstring gl.getshadersource(shader); parameters shader a webglshader object to get the source code from.
WebGLRenderingContext.getSupportedExtensions() - Web APIs
syntax gl.getsupportedextensions(); return value an array of strings with all the supported webgl extensions.
WebGLRenderingContext.getTexParameter() - Web APIs
syntax any gl.gettexparameter(target, pname); parameters target a glenum specifying the binding point (target).
WebGLRenderingContext.getUniform() - Web APIs
syntax any gl.getuniform(program, location); parameters program a webglprogram containing the uniform attribute.
WebGLRenderingContext.getUniformLocation() - Web APIs
syntax webgluniformlocation = webglrenderingcontext.getuniformlocation(program, name); parameters program the webglprogram in which to locate the specified uniform variable.
WebGLRenderingContext.getVertexAttrib() - Web APIs
syntax any gl.getvertexattrib(index, pname); parameters index a gluint specifying the index of the vertex attribute.
WebGLRenderingContext.getVertexAttribOffset() - Web APIs
syntax glintptr gl.getvertexattriboffset(index, pname); parameters index a gluint specifying the index of the vertex attribute.
WebGLRenderingContext.hint() - Web APIs
syntax void gl.hint(target, mode); parameters target sets which behavior to be controlled.
WebGLRenderingContext.isBuffer() - Web APIs
syntax glboolean gl.isbuffer(buffer); parameters buffer a webglbuffer to check.
WebGLRenderingContext.isContextLost() - Web APIs
syntax let islost = gl.iscontextlost(); return value a boolean which is true if the context is lost, or false if not.
WebGLRenderingContext.isEnabled() - Web APIs
syntax glboolean gl.isenabled(cap); parameters cap a glenum specifying which webgl capability to test.
WebGLRenderingContext.isFramebuffer() - Web APIs
syntax glboolean gl.isframebuffer(framebuffer); parameters framebuffer a webglframebuffer to check.
WebGLRenderingContext.isProgram() - Web APIs
syntax glboolean gl.isprogram(program); parameters program a webglprogram to check.
WebGLRenderingContext.isRenderbuffer() - Web APIs
syntax glboolean gl.isrenderbuffer(renderbuffer); parameters renderbuffer a webglrenderbuffer to check.
WebGLRenderingContext.isShader() - Web APIs
syntax glboolean gl.isshader(shader); parameters shader a webglshader to check.
WebGLRenderingContext.isTexture() - Web APIs
syntax glboolean gl.istexture(texture); parameters texture a webgltexture to check.
WebGLRenderingContext.lineWidth() - Web APIs
syntax void gl.linewidth(width); parameters width a glfloat specifying the width of rasterized lines.
WebGLRenderingContext.linkProgram() - Web APIs
syntax void gl.linkprogram(program); parameters program the webglprogram to link.
WebGLRenderingContext.makeXRCompatible() - Web APIs
syntax let makecompatpromise = webglrenderingcontext.makexrcompatible(); parameters none.
WebGLRenderingContext.pixelStorei() - Web APIs
syntax void gl.pixelstorei(pname, param); parameters pname a glenum specifying which parameter to set.
WebGLRenderingContext.polygonOffset() - Web APIs
syntax void gl.polygonoffset(factor, units); parameters factor a glfloat which sets the scale factor for the variable depth offset for each polygon.
WebGLRenderingContext.readPixels() - Web APIs
syntax // webgl1: void gl.readpixels(x, y, width, height, format, type, pixels); // webgl2: void gl.readpixels(x, y, width, height, format, type, glintptr offset); void gl.readpixels(x, y, width, height, format, type, arraybufferview pixels, gluint dstoffset); parameters x a glint specifying the first horizontal pixel that is read from the lower left corner of a rectangular block of pixels.
WebGLRenderingContext.renderbufferStorage() - Web APIs
syntax void gl.renderbufferstorage(target, internalformat, width, height); parameters target a glenum specifying the target renderbuffer object.
WebGLRenderingContext.sampleCoverage() - Web APIs
syntax void gl.samplecoverage(value, invert); parameters value a glclampf which sets a single floating-point coverage value clamped to the range [0,1].
WebGLRenderingContext.scissor() - Web APIs
syntax void gl.scissor(x, y, width, height); parameters x a glint specifying the horizontal coordinate for the lower left corner of the box.
WebGLRenderingContext.shaderSource() - Web APIs
syntax void gl.shadersource(shader, source); parameters shader a webglshader object in which to set the source code.
WebGLRenderingContext.stencilFunc() - Web APIs
syntax void gl.stencilfunc(func, ref, mask); parameters func a glenum specifying the test function.
WebGLRenderingContext.stencilFuncSeparate() - Web APIs
syntax void gl.stencilfuncseparate(face, func, ref, mask); parameters face a glenum specifying whether the front and/or back stencil state is updated.
WebGLRenderingContext.stencilMask() - Web APIs
syntax void gl.stencilmask(mask); parameters mask a gluint specifying a bit mask to enable or disable writing of individual bits in the stencil planes.
WebGLRenderingContext.stencilMaskSeparate() - Web APIs
syntax void gl.stencilmaskseparate(face, mask); parameters face a glenum specifying whether the front and/or back stencil writemask is updated.
WebGLRenderingContext.stencilOp() - Web APIs
syntax void gl.stencilop(fail, zfail, zpass); parameters all three parameters accept all constants listed below.
WebGLRenderingContext.stencilOpSeparate() - Web APIs
syntax void gl.stencilopseparate(face, fail, zfail, zpass); parameters the fail, zfail and zpass parameters accept all constants listed below.
WebGLRenderingContext.texImage2D() - Web APIs
syntax // webgl1: void gl.teximage2d(target, level, internalformat, width, height, border, format, type, arraybufferview?
WebGLRenderingContext.texParameter[fi]() - Web APIs
syntax void gl.texparameterf(glenum target, glenum pname, glfloat param); void gl.texparameteri(glenum target, glenum pname, glint param); parameters target a glenum specifying the binding point (target).
WebGLRenderingContext.texSubImage2D() - Web APIs
syntax // webgl 1: void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, arraybufferview?
WebGLRenderingContext.uniform[1234][fi][v]() - Web APIs
syntax void gl.uniform1f(location, v0); void gl.uniform1fv(location, value); void gl.uniform1i(location, v0); void gl.uniform1iv(location, value); void gl.uniform2f(location, v0, v1); void gl.uniform2fv(location, value); void gl.uniform2i(location, v0, v1); void gl.uniform2iv(location, value); void gl.uniform3f(location, v0, v1, v2); void gl.uniform3fv(location, value); void gl.uniform3i(location, v0...
WebGLRenderingContext.uniformMatrix[234]fv() - Web APIs
syntax webglrenderingcontext.uniformmatrix2fv(location, transpose, value); webglrenderingcontext.uniformmatrix3fv(location, transpose, value); webglrenderingcontext.uniformmatrix4fv(location, transpose, value); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
WebGLRenderingContext.useProgram() - Web APIs
syntax void gl.useprogram(program); parameters program a webglprogram to use.
WebGLRenderingContext.validateProgram() - Web APIs
syntax void gl.validateprogram(program); parameters program a webglprogram to validate.
WebGLRenderingContext.vertexAttrib[1234]f[v]() - Web APIs
syntax void gl.vertexattrib1f(index, v0); void gl.vertexattrib2f(index, v0, v1); void gl.vertexattrib3f(index, v0, v1, v2); void gl.vertexattrib4f(index, v0, v1, v2, v3); void gl.vertexattrib1fv(index, value); void gl.vertexattrib2fv(index, value); void gl.vertexattrib3fv(index, value); void gl.vertexattrib4fv(index, value); parameters index a gluint specifying the position of the vertex attribute to be modified.
WebGLRenderingContext.vertexAttribPointer() - Web APIs
syntax void gl.vertexattribpointer(index, size, type, normalized, stride, offset); parameters index a gluint specifying the index of the vertex attribute that is to be modified.
WebGLRenderingContext.viewport() - Web APIs
syntax void gl.viewport(x, y, width, height); parameters x a glint specifying the horizontal coordinate for the lower left corner of the viewport origin.
A simple RTCDataChannel sample - Web APIs
similarly, this example uses arrow functions to simplify syntax.
WebSocket.binaryType - Web APIs
syntax var binarytype = awebsocket.binarytype; value a domstring: "blob" if blob objects are used.
WebSocket.bufferedAmount - Web APIs
syntax var bufferedamount = awebsocket.bufferedamount; value an unsigned long.
WebSocket.extensions - Web APIs
syntax var extensions = awebsocket.extensions; value a domstring.
WebSocket.onclose - Web APIs
WebAPIWebSocketonclose
syntax awebsocket.onclose = function(event) { console.log("websocket is closed now."); }; value an eventlistener.
WebSocket.onerror - Web APIs
WebAPIWebSocketonerror
syntax websocket.onerror = eventhandler; value a function or eventhandler which is executed whenever an error event occurs on the websocket connection.
WebSocket.onmessage - Web APIs
syntax awebsocket.onmessage = function(event) { console.debug("websocket message received:", event); }; value an eventlistener.
WebSocket.onopen - Web APIs
WebAPIWebSocketonopen
syntax awebsocket.onopen = function(event) { console.log("websocket is open now."); }; value an eventlistener.
WebSocket.protocol - Web APIs
syntax var protocol = awebsocket.protocol; value a domstring.
WebSocket.readyState - Web APIs
syntax var readystate = awebsocket.readystate; value one of the following unsigned short values: value state description 0 connecting socket has been created.
WebSocket.url - Web APIs
WebAPIWebSocketurl
syntax var url = awebsocket.url; value a domstring.
Writing WebSocket servers - Web APIs
you're still using xml and its syntax, but you're additionally restricted by a structure you agreed on.
Keyframe Formats - Web APIs
syntax there are two different ways to format keyframes: an array of objects (keyframes) consisting of properties and values to iterate over.
Using the Web Animations API - Web APIs
css animations have a familiar syntax that breaks down nicely for demonstration purposes.
WheelEvent() - Web APIs
syntax var wheelevent = new wheelevent(typearg, wheeleventinit); properties typearg is a domstring representing the name of the event.
WheelEvent.deltaMode - Web APIs
syntax var unit = event.deltamode; example var syntheticevent = new wheelevent("syntheticwheel", {"deltax": 4, "deltamode": 0}); console.log(syntheticevent.deltamode); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltamode' in that specification.
WheelEvent.deltaX - Web APIs
WebAPIWheelEventdeltaX
syntax var dx = event.deltax; example var syntheticevent = new wheelevent("syntheticwheel", {"deltax": 4, "deltamode": 0}); console.log(syntheticevent.deltax); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltax' in that specification.
WheelEvent.deltaY - Web APIs
WebAPIWheelEventdeltaY
syntax var dy = event.deltay; example var syntheticevent = new wheelevent("syntheticwheel", {"deltay": 4, "deltamode": 0}); console.log(syntheticevent.deltay); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltay' in that specification.
WheelEvent.deltaZ - Web APIs
WebAPIWheelEventdeltaZ
syntax var dz = event.deltaz; example var syntheticevent = new wheelevent("syntheticwheel", {"deltaz": 4, "deltamode": 0}); console.log(syntheticevent.deltaz); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltaz' in that specification.
Window.alert() - Web APIs
WebAPIWindowalert
syntax window.alert(message); parameters message optional a string you want to display in the alert dialog, or, alternatively, an object that is converted into a string and displayed.
Window.applicationCache - Web APIs
syntax cache = window.applicationcache parameters cache is an object reference to an offlineresourcelist.
Window.back() - Web APIs
WebAPIWindowback
syntax window.back(); parameters none.
Window.blur() - Web APIs
WebAPIWindowblur
syntax window.blur() example window.blur(); notes the window.blur() method is the programmatic equivalent of the user shifting focus away from the current window.
window.cancelAnimationFrame() - Web APIs
syntax window.cancelanimationframe(requestid); parameters requestid the id value returned by the call to window.requestanimationframe() that requested the callback.
window.cancelIdleCallback() - Web APIs
syntax window.cancelidlecallback(handle); parameters handle the id value returned by window.requestidlecallback() when the callback was established.
Window.clearImmediate() - Web APIs
syntax window.clearimmediate( immediateid ) where immediateid is a id returned by window.setimmediate.
Window.close() - Web APIs
WebAPIWindowclose
syntax window.close(); examples closing a window opened with window.open() this example shows a method which opens a window and a second one which closes the window; this demonstrates how to use window.close() to close a window opened by calling window.open().
Window.closed - Web APIs
WebAPIWindowclosed
syntax const isclosed = windowref.closed; value a boolean.
Window.confirm() - Web APIs
WebAPIWindowconfirm
syntax result = window.confirm(message); parameters message a string you want to display in the alert dialog.
Window.content - Web APIs
WebAPIWindowcontent
syntax var windowobject = window.content; example executing the following code in a chrome xul window with a <browser type="content-primary"/> element in it draws a red border around the first div on the page currently displayed in the browser: content.document.getelementsbytagname("div")[0].style.border = "solid red 1px"; specification none.
Window.controllers - Web APIs
syntax controllers = window.controllers controllers is an object of type xulcontrollers (nsicontrollers).
Window.convertPointFromNodeToPage() - Web APIs
syntax point = window.convertpointfromnodetopage(node, nodepoint); parameters node the node in whose coordinate system the point specified by nodepoint is described.
Window.convertPointFromPageToNode - Web APIs
syntax point = window.convertpointfrompagetonode(node, pagepoint); parameters node the node into whose coordinate system the point is to be converted.
Window.crypto - Web APIs
WebAPIWindowcrypto
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.
Window.defaultStatus - Web APIs
syntax var smsg = window.defaultstatus; window.defaultstatus = smsg; parameters smsg is a string containing the text to be displayed by default in the statusbar.
Window.devicePixelRatio - Web APIs
syntax value = window.devicepixelratio; value a double-precision floating-point value indicating the ratio of the display's resolution in physical pixels to the resolution in css pixels.
Window.dialogArguments - Web APIs
syntax value = window.dialogarguments; ...
Window.directories - Web APIs
syntax var dirbar = window.directories; parameters dirbar is an object of the type barprop.
Window.find() - Web APIs
WebAPIWindowfind
syntax window.find(astring, acasesensitive, abackwards, awraparound, awholeword, asearchinframes, ashowdialog); astring the text string for which to search.
Window.focus() - Web APIs
WebAPIWindowfocus
syntax window.focus() example if (clicked) { window.focus(); } specification specification status comment html living standardthe definition of 'window.focus()' in that specification.
Window.forward() - Web APIs
WebAPIWindowforward
syntax window.forward(); parameters none return value undefined.
Window.frameElement - Web APIs
syntax const frameel = window.frameelement value the element which the window is embedded into.
Window.frames - Web APIs
WebAPIWindowframes
syntax framelist = window.frames; framelist is a list of frame objects.
Window.fullScreen - Web APIs
WebAPIWindowfullScreen
syntax isinfullscreen = windowref.fullscreen; with chrome privileges, the property is read-write, otherwise it is read-only.
Window.getAttention() - Web APIs
syntax window.getattention(); notes on windows, the taskbar button for the window flashes, if this hasn't been disabled by the user.
Window.getComputedStyle() - Web APIs
syntax var style = window.getcomputedstyle(element [, pseudoelt]); element the element for which to get the computed style.
Window.getDefaultComputedStyle() - Web APIs
syntax var style = window.getdefaultcomputedstyle(element [, pseudoelt]); parameters element the element for which to get the computed style.
Window.getSelection() - Web APIs
syntax selection = window.getselection(); return value a selection object.
Window.home() - Web APIs
WebAPIWindowhome
syntax window.home(); example function gohome() { window.home(); } specification dom level 0.
Window.innerHeight - Web APIs
syntax let intviewportheight = window.innerheight; value an integer value indicating the window's layout viewport height in pixels.
Window.innerWidth - Web APIs
WebAPIWindowinnerWidth
syntax let intviewportwidth = window.innerwidth; value an integer value indicating the width of the window's layout viewport in pixels.
Window.isSecureContext - Web APIs
syntax var issecure = window.issecurecontext examples feature detection you can use feature detection to check whether they are in a secure context or not by using the issecurecontext boolean which is exposed on the global scope.
Window.length - Web APIs
WebAPIWindowlength
syntax framescount = window.length; framescount is the number of frames.
window.location - Web APIs
WebAPIWindowlocation
syntax var oldlocation = location; location = newlocation; examples basic example alert(location); // alerts "/docs/web/api/window/location" example #1: navigate to a new page whenever a new value is assigned to the location object, a document will be loaded using the url as if location.assign() had been called with the modified url.
Window.locationbar - Web APIs
syntax objref = window.locationbar example the following complete html example shows how the visible property of the locationbar object is used.
Window.matchMedia() - Web APIs
WebAPIWindowmatchMedia
syntax mqlist = window.matchmedia(mediaquerystring) parameters mediaquerystring a string specifying the media query to parse into a mediaquerylist.
Window.menubar - Web APIs
WebAPIWindowmenubar
syntax objref = window.menubar example the following complete html example demonstrates how the visible property of the menubar object is used.
Window.moveBy() - Web APIs
WebAPIWindowmoveBy
syntax window.moveby(deltax, deltay) parameters deltax is the amount of pixels to move the window horizontally.
Window.moveTo() - Web APIs
WebAPIWindowmoveTo
syntax window.moveto(x, y) parameters x is the horizontal coordinate to be moved to.
Window.mozAnimationStartTime - Web APIs
syntax time = window.mozanimationstarttime; parameters time is the time in milliseconds since the epoch at which animations for the current window should be considered to have started.
Window.mozInnerScreenX - Web APIs
syntax screenx = window.mozinnerscreenx; value screenx stores the window.mozinnerscreenx property value.
Window.mozInnerScreenY - Web APIs
syntax screeny = window.mozinnerscreeny; value screeny stores the window.mozinnerscreeny property value.
Window.mozPaintCount - Web APIs
syntax var paintcount = window.mozpaintcount; paintcount stores the window.mozpaintcount property value.
Window.name - Web APIs
WebAPIWindowname
syntax string = window.name; window.name = string; example <script> // open a tab with a specific browsing context name const othertab = window.open("url1", "_blank"); if (othertab) othertab.name = "other-tab"; </script> <a href="url2" target="other-tab">this link will be opened in the other tab.</a> notes the name of the window is used primarily for setting targets for hyperlinks and forms.
Window.navigator - Web APIs
WebAPIWindownavigator
syntax navigatorobject = window.navigator examples example #1: browser detect and return a string var sbrowser, susrag = navigator.useragent; // the order matters here, and this may report false positives for unlisted browsers.
Window.onappinstalled - Web APIs
syntax window.onappinstalled = function(event) { ...
Window.onbeforeinstallprompt - Web APIs
syntax window.addeventlistener("beforeinstallprompt", function(event) { ...
Window.ondevicelight - Web APIs
syntax window.ondevicelight = funcref where funcref is a function to be called when the devicelight event occurs.
Window.ondevicemotion - Web APIs
syntax window.ondevicemotion = funcref; where funcref is a reference to a function.
window.ondeviceorientation - Web APIs
syntax window.ondeviceorientation = function(event) { ...
Window.ondeviceorientationabsolute - Web APIs
syntax window.ondeviceorientationabsolute = function(event) { ...
Window.ondeviceproximity - Web APIs
syntax window.onuserproximity = funcref where funcref is a function to be called when the deviceproximity event occurs.
Window.ondragdrop - Web APIs
WebAPIWindowondragdrop
syntax window.ondragdrop = funcref; window.addeventlistener("dragdrop", funcref, usecapturing); funcref the event handler function to be registered.
Window.ongamepadconnected - Web APIs
syntax window.ongamepadconnected = function() { ...
Window.ongamepaddisconnected - Web APIs
syntax window.ongamepaddisconnected = function() { ...
Window.onmozbeforepaint - Web APIs
syntax window.onmozbeforepaint = funcref; funcref is the handler function.
Window.onpaint - Web APIs
WebAPIWindowonpaint
syntax window.onpaint = funcref; funcref is a handler function.
Window.onuserproximity - Web APIs
syntax window.onuserproximity = eventhandler ...
Window.open() - Web APIs
WebAPIWindowopen
syntax var window = window.open(url, windowname, [windowfeatures]); parameters url a domstring indicating the url of the resource to be loaded.
Window.openDialog() - Web APIs
WebAPIWindowopenDialog
syntax newwindow = opendialog(url, name, features, arg1, arg2, ...) newwindow the opened window url the url to be loaded in the newly opened window.
Window.opener - Web APIs
WebAPIWindowopener
syntax const openerwindow = window.opener value a window referring to the window that opened the current window (using window.open(), or by a link with target attribute set).
Window.pageYOffset - Web APIs
syntax yoffset = window.pageyoffset; value a floating-point number specifying the number of pixels the document is scrolled vertically within its containing window.
Window.parent - Web APIs
WebAPIWindowparent
syntax var parentwindow = window.parent; example if (window.parent != window.top) { // we're deeper than one down } specifications specification status comment html living standardthe definition of 'window.parent' in that specification.
Window.performance - Web APIs
syntax performancedata = window.performance; value a performance object offering access to the performance and timing-related information offered by the apis it exposes.
Window.personalbar - Web APIs
syntax objref =window.personalbar example fixme: https://bugzilla.mozilla.org/show_bug.cgi?id=790023 the following complete html example shows the way that the visible property of the various "bar" objects is used, and also the change to the privileges necessary to write to the visible property of any of the bars on an existing window.
Window.pkcs11 - Web APIs
WebAPIWindowpkcs11
syntax objref = window.pkcs11 example window.pkcs11.addmodule(smod, secpath, 0, 0); notes see nsidompkcs11 for more information about how to manipulate pkcs11 objects.
Window.print() - Web APIs
WebAPIWindowprint
syntax window.print() specification specification status comment html living standardthe definition of 'print()' in that specification.
Window.prompt() - Web APIs
WebAPIWindowprompt
syntax result = window.prompt(message, default); parameters message optional a string of text to display to the user.
Window.requestAnimationFrame() - Web APIs
syntax window.requestanimationframe(callback); parameters callback the function to call when it's time to update your animation for the next repaint.
Window.requestFileSystem() - Web APIs
syntax this method is prefixed with webkit in all browsers that implement it (that is, google chrome).
window.requestIdleCallback() - Web APIs
syntax var handle = window.requestidlecallback(callback[, options]) return value an id which can be used to cancel the callback by passing it into the window.cancelidlecallback() method.
Window.resizeBy() - Web APIs
WebAPIWindowresizeBy
syntax window.resizeby(xdelta, ydelta) parameters xdelta is the number of pixels to grow the window horizontally.
Window.resizeTo() - Web APIs
WebAPIWindowresizeTo
syntax window.resizeto(width, height) parameters width an integer representing the new outerwidth in pixels (including scroll bars, title bars, etc).
Window.screen - Web APIs
WebAPIWindowscreen
syntax let screenobj = window.screen; example if (screen.pixeldepth < 8) { // use low-color version of page } else { // use regular, colorful page } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screen' in that specification.
Window.screenLeft - Web APIs
WebAPIWindowscreenLeft
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
WebAPIWindowscreenTop
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
WebAPIWindowscreenX
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
WebAPIWindowscreenY
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.
Window.scroll() - Web APIs
WebAPIWindowscroll
syntax window.scroll(x-coord, y-coord) window.scroll(options) parameters x-coord is the pixel along the horizontal axis of the document that you want displayed in the upper left.
Window.scrollBy() - Web APIs
WebAPIWindowscrollBy
syntax window.scrollby(x-coord, y-coord); window.scrollby(options) parameters x-coord is the horizontal pixel value that you want to scroll by.
Window.scrollByLines() - Web APIs
syntax window.scrollbylines(lines) parameters lines is the number of lines to scroll the document by.
Window.scrollByPages() - Web APIs
syntax window.scrollbypages(pages) parameters pages is the number of pages to scroll.
Window.scrollMaxX - Web APIs
WebAPIWindowscrollMaxX
syntax xmax = window.scrollmaxx xmax is the number of pixels.
Window.scrollMaxY - Web APIs
WebAPIWindowscrollMaxY
syntax ymax = window.scrollmaxy ymax is the number of pixels.
Window.scrollTo() - Web APIs
WebAPIWindowscrollTo
syntax window.scrollto(x-coord, y-coord) window.scrollto(options) parameters x-coord is the pixel along the horizontal axis of the document that you want displayed in the upper left.
Window.scrollX - Web APIs
WebAPIWindowscrollX
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
WebAPIWindowscrollY
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.
Window.scrollbars - Web APIs
WebAPIWindowscrollbars
syntax objref = window.scrollbars example the following complete html example shows how the visible property of the scrollbars object is used.
Window.sessionStorage - Web APIs
syntax mystorage = window.sessionstorage; value a storage object which can be used to access the current origin's session storage space.
Window.setImmediate() - Web APIs
syntax var immediateid = setimmediate(func, [param1, param2, ...]); var immediateid = setimmediate(func); where immediateid is the id of the immediate which can be used later with window.clearimmediate.
Window.sizeToContent() - Web APIs
syntax window.sizetocontent() example window.sizetocontent(); specification this feature is not part of any specification.
Window.speechSynthesis - Web APIs
syntax var synth = window.speechsynthesis; value a speechsynthesis object.
Window.status - Web APIs
WebAPIWindowstatus
syntax window.status = string; var value = window.status; specifications specification status comment html living standardthe definition of 'window.status' in that specification.
Window.statusbar - Web APIs
WebAPIWindowstatusbar
syntax objref = window.statusbar example the following complete html example shows a way that the visible property of the various "bar" objects is used, and also the change to the privileges necessary to write to the visible property of any of the bars on an existing window.
Window.stop() - Web APIs
WebAPIWindowstop
syntax window.stop() example window.stop(); specification specification status comment html living standardthe definition of 'window.stop()' in that specification.
Window.toolbar - Web APIs
WebAPIWindowtoolbar
syntax objref = window.toolbar example the following complete html example shows way that the visible property of the various "bar" objects is used, and also the change to the privileges necessary to write to the visible property of any of the bars on an existing window.
Window.top - Web APIs
WebAPIWindowtop
syntax var topwindow = window.top; notes where the window.parent property returns the immediate parent of the current window, window.top returns the topmost window in the hierarchy of window objects.
Window.updateCommands() - Web APIs
syntax window.updatecommands("scommandname") parameters scommandname is a particular string which describes what kind of update event this is (e.g.
Window.visualViewport - Web APIs
syntax var visualviewport = window.visualviewport value a visualviewport object.
WindowClient.focus() - Web APIs
syntax windowclient.focus().then(function(windowclient) { // do something with your windowclient once it has been focused }); parameters none.
WindowClient.focused - Web APIs
syntax var myfocused = windowclient.focused; value a boolean.
WindowClient.navigate() - Web APIs
syntax windowclient.navigate(url).then(function(windowclient) { // do something with your windowclient after navigation }); parameters url the location to navigate to.
WindowClient.visibilityState - Web APIs
syntax var myvisstate = windowclient.visibilitystate; value a domstring (see document.visibilitystate for values).
WindowEventHandlers.onafterprint - Web APIs
syntax window.addeventlistener("afterprint", function(event) { ...
WindowEventHandlers.onbeforeprint - Web APIs
syntax window.addeventlistener("beforeprint", function(event) { ...
WindowEventHandlers.onbeforeunload - Web APIs
syntax window.addeventlistener("beforeunload", function(event) { ...
WindowEventHandlers.onhashchange - Web APIs
syntax using an event handler: window.onhashchange = funcref; using an html event handler: <body onhashchange="funcref();"> using an event listener: to add an event listener, use addeventlistener(): window.addeventlistener("hashchange", funcref, false); parameters funcref a reference to a function.
WindowEventHandlers.onlanguagechange - Web APIs
syntax object.onlanguagechange = function; value function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
WindowEventHandlers.onmessage - Web APIs
syntax window.addeventlistener('message', function(event) { ...
WindowEventHandlers.onmessageerror - Web APIs
syntax window.onmessageerror = function() { ...
WindowEventHandlers.onpopstate - Web APIs
syntax window.onpopstate = funcref; funcref is a handler function.
WindowEventHandlers.onrejectionhandled - Web APIs
syntax window.addeventlistener("rejectionhandled", function(event) { ...
WindowEventHandlers.onstorage - Web APIs
syntax window.onstorage = functionref; value functionref is a function name or a function expression.
WindowEventHandlers.onunhandledrejection - Web APIs
syntax window.onunhandledrejection = function; value function is an eventhandler or function to call when unhandledrejection events are received by the window.
WindowEventHandlers.onunload - Web APIs
syntax window.addeventlistener("unload", function(event) { ...
WindowOrWorkerGlobalScope.atob() - Web APIs
syntax var decodeddata = scope.atob(encodeddata); parameters encodeddata a binary string contains an base64 encoded data.
WindowOrWorkerGlobalScope.btoa() - Web APIs
syntax var encodeddata = scope.btoa(stringtoencode); parameters stringtoencode the binary string to encode.
WindowOrWorkerGlobalScope.caches - Web APIs
syntax var mycachestorage = self.caches; // or just caches value a cachestorage object.
WindowOrWorkerGlobalScope.clearInterval() - Web APIs
syntax scope.clearinterval(intervalid) parameters intervalid the identifier of the repeated action you want to cancel.
WindowOrWorkerGlobalScope.clearTimeout() - Web APIs
syntax scope.cleartimeout(timeoutid) parameters timeoutid the identifier of the timeout you want to cancel.
self.createImageBitmap() - Web APIs
syntax const imagebitmappromise = createimagebitmap(image[, options]); const imagebitmappromise = createimagebitmap(image, sx, sy, sw, sh[, options]); parameters image an image source, which can be an <img>, svg <image>, <video>, <canvas>, htmlimageelement, svgimageelement, htmlvideoelement, htmlcanvaselement, blob, imagedata, imagebitmap, or offscreencanvas object.
WindowOrWorkerGlobalScope.crossOriginIsolated - Web APIs
syntax var mycrossoriginisolated = self.crossoriginisolated; // or just crossoriginisolated value a boolean value examples if(crossoriginisolated) { // post sharedarraybuffer } else { // do something else } specifications specification status comment html living standardthe definition of 'crossoriginisolated' in that specification.
WindowOrWorkerGlobalScope.fetch() - Web APIs
syntax const fetchresponsepromise = fetch(resource [, init]) parameters resource this defines the resource that you wish to fetch.
WindowOrWorkerGlobalScope.indexedDB - Web APIs
syntax var idbfactory = self.indexeddb; value an idbfactory object.
WindowOrWorkerGlobalScope.isSecureContext - Web APIs
syntax var isitsecure = self.issecurecontext; // or just issecurecontext value a boolean.
WindowOrWorkerGlobalScope.origin - Web APIs
syntax var myorigin = self.origin; // or just origin value a usvstring.
WindowOrWorkerGlobalScope.queueMicrotask() - Web APIs
syntax scope.queuemicrotask(function); parameters function a function to be executed when the browser engine determines it is safe to call your code.
Worker.onmessage - Web APIs
WebAPIWorkeronmessage
syntax myworker.onmessage = function(e) { ...
Worker.onmessageerror - Web APIs
syntax worker.onmessageerror = function() { ...
Worker.prototype.postMessage() - Web APIs
syntax worker.postmessage(message, [transfer]); parameters message the object to deliver to the worker; this will be in the data field in the event delivered to the dedicatedworkerglobalscope.onmessage handler.
Worker.terminate() - Web APIs
WebAPIWorkerterminate
syntax myworker.terminate(); parameters none.
WorkerGlobalScope.close() - Web APIs
syntax self.close(); example if you wanted to close your worker instance from inside the worker itself, you could call the following: close(); close() and self.close() are effectively equivalent — both represent close() being called from inside the worker's inner scope.
WorkerGlobalScope.console - Web APIs
syntax var consoleobj = self.console; value a console object.
WorkerGlobalScope.dump() - Web APIs
syntax dump('my message\n'); parameters a domstring containing the message you want to send.
WorkerGlobalScope.importScripts() - Web APIs
syntax self.importscripts('foo.js'); self.importscripts('foo.js', 'bar.js', ...); parameters a comma-separated list of domstring objects representing the scripts to be imported.
WorkerGlobalScope.location - Web APIs
syntax var locationobj = self.location; value a workerlocation object.
WorkerGlobalScope.navigator - Web APIs
syntax var navigatorobj = self.navigator; value a workernavigator object.
WorkerGlobalScope.onclose - Web APIs
syntax self.onclose = function() { ...
WorkerGlobalScope.onerror - Web APIs
syntax self.onerror = function() { ...
WorkerGlobalScope.onlanguagechange - Web APIs
syntax self.onlanguagechange = function() { ...
WorkerGlobalScope.onoffline - Web APIs
syntax self.onoffline = function() { ...
WorkerGlobalScope.ononline - Web APIs
syntax self.ononline = function() { ...
WorkerGlobalScope.performance - Web APIs
syntax var perfobj = self.performance; return value a performance object.
WorkerGlobalScope.self - Web APIs
syntax var selfref = self; value a global scope object (differs depending on the type of worker you are dealing with, as indicated above).
WorkerNavigator.connection - Web APIs
syntax connectioninfo = self.navigator.connection specifications specification status comment network information apithe definition of 'navigator.connection' in that specification.
WorkerNavigator.locks - Web APIs
syntax var lockmanager = navigator.locks value a lockmanager object.
WorkerNavigator.permissions - Web APIs
syntax permissionsobj = self.permissions value a permissions object.
WritableStream.WritableStream() - Web APIs
syntax var writablestream = new writablestream(underlyingsink[, queuingstrategy]); parameters underlyingsink an object containing methods and properties that define how the constructed stream instance will behave.
WritableStream.abort() - Web APIs
syntax var promise = writablestream.abort(reason); parameters reason a domstring providing a human-readable reason for the abort.
WritableStream.getWriter() - Web APIs
syntax var writer = writablestream.getwriter(); parameters none.
WritableStream.locked - Web APIs
syntax var locked = writablestream.locked; value a boolean indicating whether or not the writable stream is locked.
WritableStreamDefaultController.error() - Web APIs
syntax writablestreamdefaultcontroller.error(e); parameters e a domstring representing the error you want future interactions to fail with.
WritableStreamDefaultWriter.WritableStreamDefaultWriter() - Web APIs
syntax var writablestreamdefaultwriter = new writablestreamdefaultwriter(stream); parameters stream the writablestream to be written to.
WritableStreamDefaultWriter.abort() - Web APIs
syntax var promise = writablestreamdefaultwriter.abort(reason); parameters reason optional a domstring representing a human-readable reason for the abort.
WritableStreamDefaultWriter.close() - Web APIs
syntax var promise = writablestreamdefaultwriter.close(); parameters none.
WritableStreamDefaultWriter.closed - Web APIs
syntax var closed = writablestreamdefaultwriter.closed; value a promise.
WritableStreamDefaultWriter.desiredSize - Web APIs
syntax var desiredsize = writablestreamdefaultwriter.desiredsize; value an integer.
WritableStreamDefaultWriter.ready - Web APIs
syntax var promise = writablestreamdefaultwriter.ready; value a promise.
WritableStreamDefaultWriter.releaseLock() - Web APIs
syntax writablestreamdefaultwritere.releaselock() parameters none.
WritableStreamDefaultWriter.write() - Web APIs
syntax var promise = writablestreamdefaultwriter.write(chunk); parameters chunk a block of binary data to pass to the writablestream.
XDomainRequest.abort() - Web APIs
syntax xdr.abort(); example var xdr = new xdomainrequest(); xdr.open("get", "http://example.com/api/method"); xdr.send(); xdr.abort(); specification not part of any specification.
XDomainRequest.onerror - Web APIs
syntax xdr.onerror = funcref; parameters funcref a function to call when an error occurs.
XDomainRequest.onload - Web APIs
syntax xdr.onload = funcref; example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.onload = function(){ //handle response with xdr.responsetext } xdr.send("param1=value1&param2=value2"); specification not part of any specification.
XDomainRequest.onprogress - Web APIs
syntax xdr.onprogress = funcref; parameters funcref a function to call when progress events occur.
XDomainRequest.ontimeout - Web APIs
syntax xdr.ontimeout = funcref; parameters funcref a function to be called when the event times out.
XDomainRequest.open() - Web APIs
syntax xdr.open(method, url); parameters method the http method to use for the request.
XDomainRequest.responseText - Web APIs
syntax var response = xdr.responsetext; this sets response to contain the response body of the request, as a string.
XDomainRequest.send() - Web APIs
syntax xdr.send(data); parameters data the form data to be sent with the request.
XDomainRequest.timeout - Web APIs
syntax xdr.timeout = milliseconds; the default value is 0.
XDomainRequest - Web APIs
syntax var xdr = new xdomainrequest(); returns a new xdomainrequest object, which can then be used to make and manage these requests.
XMLHttpRequest.abort() - Web APIs
syntax xmlhttprequest.abort() parameters none.
XMLHttpRequest.getAllResponseHeaders() - Web APIs
syntax var headers = xmlhttprequest.getallresponseheaders(); parameters none.
XMLHttpRequest.getResponseHeader() - Web APIs
syntax var myheader = xmlhttprequest.getresponseheader(headername); parameters headername a bytestring indicating the name of the header you want to return the text value of.
XMLHttpRequest.onreadystatechange - Web APIs
syntax xmlhttprequest.onreadystatechange = callback; values callback is the function to be executed when the readystate changes.
XMLHttpRequest.open() - Web APIs
syntax xmlhttprequest.open(method, url[, async[, user[, password]]]) parameters method the http request method to use, such as "get", "post", "put", "delete", etc.
XMLHttpRequest.overrideMimeType() - Web APIs
syntax xmlhttprequest.overridemimetype(mimetype) parameters mimetype a domstring specifying the mime type to use instead of the one specified by the server.
XMLHttpRequest.response - Web APIs
syntax var body = xmlhttprequest.response; value an appropriate object based on the value of responsetype.
XMLHttpRequest.responseText - Web APIs
syntax var resulttext = xmlhttprequest.responsetext; value a domstring which contains either the textual data received using the xmlhttprequest or null if the request failed or "" if the request has not yet been sent by calling send().
XMLHttpRequest.responseType - Web APIs
syntax var type = xmlhttprequest.responsetype; xmlhttprequest.responsetype = type; value a string taken from the xmlhttprequestresponsetype enum which specifies what type of data the response contains.
XMLHttpRequest.responseXML - Web APIs
syntax var data = xmlhttprequest.responsexml; value a document from parsing the xml or html received using xmlhttprequest, or null if no data was received or if the data is not xml/html.
XMLHttpRequest.send() - Web APIs
syntax xmlhttprequest.send(body) parameters body optional a body of data to be sent in the xhr request.
XMLHttpRequest.sendAsBinary() - Web APIs
syntax xmlhttprequest.sendasbinary(binarystring); parameters binarystring a domstring which encodes the binary content to be sent.
XMLHttpRequest.setRequestHeader() - Web APIs
syntax xmlhttprequest.setrequestheader(header, value) parameters header the name of the header whose value is to be set.
XMLHttpRequestEventTarget.onabort - Web APIs
syntax xmlhttprequest.onabort = callback; values callback is the function to be executed when the transaction is aborted.
XMLHttpRequestEventTarget.onerror - Web APIs
syntax xmlhttprequest.onerror = callback; values callback is the function to be executed when the request fails.
XMLHttpRequestEventTarget.onload - Web APIs
syntax xmlhttprequest.onload = callback; values callback is the function to be executed when the request completes successfully.
XMLHttpRequestEventTarget.onloadstart - Web APIs
syntax xmlhttprequest.onloadstart = callback; values callback is the function to be called when the transaction begins to transfer data.
XMLHttpRequestEventTarget.onprogress - Web APIs
syntax xmlhttprequest.onprogress = callback; values callback is the function to be called periodically before the request is completed.
XPathEvaluator.createExpression() - Web APIs
syntax xpathexpression xpathevaluator.createexpression(expression, resolver); parameters expression a domstring representing representing the xpath expression to be created.
XPathEvaluator.createNSResolver() - Web APIs
syntax xpathnsresolver xpathevaluator.creatensresolver(noderesolver); parameters noderesolver a node to be used as a context for namespace resolution.
XPathEvaluator.evaluate() - Web APIs
syntax xpathresult xpathevaluator.evaluate(expression, contextnode, resolver, type, result); parameters expression a domstring representing the xpath expression to be parsed and evaluated.
XPathException.code - Web APIs
syntax var exceptioncode = exception.code; value a short number representing the error code.
XPathException - Web APIs
constants constant value description invalid_expression_err 51 if the expression has a syntax error or otherwise is not a legal expression according to the rules of the specific xpathevaluator or contains specialized extension functions or variables not supported by this implementation.
XPathExpression.evaluate() - Web APIs
syntax xpathresult node.evaluate(contextnode, type, result); parameters contextnode a node representing the context to use for evaluating the expression.
XPathNSResolver.lookupNamespaceURI() - Web APIs
syntax domstring xpathnsresolver.lookupnamespaceuri(prefix); parameters prefix a domstring representing the prefix to look for.
XPathResult.booleanValue - Web APIs
syntax var value = result.booleanvalue; return value the return value is the boolean value of the xpathresult returned by document.evaluate().
XPathResult.invalidIteratorState - Web APIs
syntax var iteratorstate = result.invaliditeratorstate; return value a boolean value indicating whether the iterator has become invalid.
XPathResult.iterateNext() - Web APIs
syntax var node = result.iteratenext(); return value the next node within the node set of the xpathresult.
XPathResult.numberValue - Web APIs
syntax var value = result.numbervalue; return value the return value is the numeric value of the xpathresult returned by document.evaluate().
XPathResult.resultType - Web APIs
syntax var resulttype = result.resulttype; return value an integer value representing the type of the result, as defined by the type constants.
XPathResult.singleNodeValue - Web APIs
syntax var value = result.singlenodevalue; return value the return value is the node value of the xpathresult returned by document.evaluate().
XPathResult.snapshotItem() - Web APIs
syntax var node = result.snapshotitem(i); return value the node at the given index within the node set of the xpathresult.
XPathResult.snapshotLength - Web APIs
syntax var snapshotlength = result.snapshotlength; return value an integer value representing the number of nodes in the result snapshot.
XPathResult.stringValue - Web APIs
syntax var value = result.stringvalue; return value the return value is the string value of the xpathresult returned by document.evaluate().
XRBoundedReferenceSpace.boundsGeometry - Web APIs
syntax bounds = xrreferencespace.boundsgeometry; value the boundsgeometry property is an array of dompointreadonly objects, each of which defines one vertex in a polygon inside which the viewer is required to remain.
XRFrame.getPose() - Web APIs
WebAPIXRFramegetPose
syntax var xrpose = xrframe.getpose(space, basespace); parameters space an xrspace specifying the space for which to obtain an xrpose describing the item's position and orientation.
XRFrame.getViewerPose() - Web APIs
syntax var xrviewerpose = xrframe.getviewerpose(referencespace); parameters referencespace an xrreferencespace object specifying the space to use as the reference point or base for the computation of the viewer's current pose.
XRFrame.session - Web APIs
WebAPIXRFramesession
syntax var xrsession = xrframe.session; value a xrsession object representing the webxr session for which this xrframe describes the object positions and orientations.
XRFrameRequestCallback - Web APIs
syntax function xrframerequestcallback(time, xrframe){ // process xrframe here } xrsession.requestanimationframe(xrframerequestcallback) parameters domhighrestimestamp a timestamp corresponding to the returned xrframe.
XRInputSource.gripSpace - Web APIs
syntax var xrspace = xrinputsource.gripspace; value an xrspace object representing the position and orientation of the input device in virtual space, suitable for rendering an image of the device into the scene.
XRInputSource.handedness - Web APIs
syntax let hand = xrinputsource.handedness; value a domstring indicating whether the input controller is held in one of the user's hands, and if it is, which hand.
XRInputSource.profiles - Web APIs
syntax let profilelist = xrinputsource.profiles; value an array of domstring objects, each describing one configuration profile for the input device represented by the xrinputsource object.
XRInputSource.targetRayMode - Web APIs
syntax let raymode = xrinputsource.targetraymode; value a domstring taken from the xrtargetraymode enumerated type, indicating which method to use when generating and presenting the target ray to the user.
XRInputSource.targetRaySpace - Web APIs
syntax let targetrayspace = xrinputsource.targetrayspace; value an xrspace object—typically an xrreferencespace or xrboundedreferencespace—which represents the position and orientation of the input controller's target ray in virtual space.
XRInputSourceArray.entries() - Web APIs
syntax let inputsourceiterator = xrinputsourcearray.entries(); for (let entry of xrinputsourcearray.entries()) { /* ...
XRInputSourceArray.forEach() - Web APIs
syntax xrinputsourcearray.foreach(callback, thisarg); parameters callback a function to execute once for each entry in the array xrinputsourcearray.
XRInputSourceArray.keys() - Web APIs
syntax xrinputsourcearray.keys(); parameters none.
XRInputSourceArray.length - Web APIs
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.values() - Web APIs
syntax xrinputsourcearray.values(); parameters none.
XRInputSourceEvent() - Web APIs
syntax newinputsourceevent = new xrinputsourceevent(type, eventinitdict); parameters type a domstring indicating which of the input source events the new object will represent.
XRInputSourceEvent.frame - Web APIs
syntax let inputframe = xrinputsourceevent.frame; value an xrframe indicating the event frame at which the user input event described by the object took place.
XRInputSourceEvent.inputSource - Web APIs
syntax let inputsource = xrinputsourceevent.inputsource; value an xrinputsource object identifying the source of the user input event.
XRInputSourceEventInit.frame - Web APIs
syntax xrinputsourceeventinit.frame = xrframe; let xrinputsourceeventinit = { frame: xrframe }; let xrinputsourceevent = new xrinputsourceevent(type, { frame: xrframe }); value an xrframe indicating the time at which the event took place, and providing a getpose() method which can be used to map reference spaces to the world reference space.
XRInputSourceEventInit.inputSource - Web APIs
syntax let xrinputsourceeventinit.inputsource = xrinputsource; let xrinputsourceeventinit = { inputsource: xrinputsource }; let xrinputsourceevent = new xrinputsourceevent(type, { inputsource: xrinputsource }); value an xrinputsource object indicating the source of the newly-created xrinputsourceevent to be created.
XRInputSourcesChangeEvent() - Web APIs
syntax newinputsourceschangeevent = new xrinputsourceschangeevent(type, eventinitdict); parameters type a domstring indicating the type of event which has occurred.
XRInputSourcesChangeEvent.added - Web APIs
syntax let addedinputs = xrinputsourceschangeevent.added; value an array of zero or more xrinputsource objects, each representing one input device added to the xr system.
XRInputSourcesChangeEvent.removed - Web APIs
syntax removedinputs = xrinputsourceschangeevent.removed; value an array of zero or more xrinputsource objects, each representing one input device removed from the xr system.
XRInputSourcesChangeEvent.session - Web APIs
syntax let inputssession = xrinputsourceschangeevent.session; value an xrsession indicating the webxr session to which the input source list change applies.
XRInputSourcesChangeEventInit.added - Web APIs
syntax let inputsourceseventinit = { session: xrsession, added: [newdevice1, ..., newdevicen], removed: [removeddevice1, ..., newdevicen], }; myinputsourceschangeevent = new xrinputsourceschangeeventinit("inputsourceschange", inputsourceseventinit); myinputsourceschangeevent = new xrinputsourceschangeeventinit("inputsourceschange", { session: xrsession, added: addeddevicelist, removed: removeddevicelist }); value an arra...
XRInputSourcesChangeEventInit.removed - Web APIs
syntax let inputsourceseventinit = { session: xrsession, added: [newdevice1, ..., newdevicen], removed: [removeddevice1, ..., newdevicen], }; myinputsourceschangeevent = new xrinputsourceschangeeventinit("inputsourceschange", inputsourceseventinit); myinputsourceschangeevent = new xrinputsourceschangeeventinit("inputsourceschange", { session: xrsession, added: addeddevicelist, removed: removeddevicelist }); value an array of zero or more xrinputsource objects, e...
XRInputSourcesChangeEventInit.session - Web APIs
syntax let inputsourceseventinit = { session: xrsession, added: [newdevice1, ..., newdevicen], removed: [removeddevice1, ..., newdevicen], }; myinputsourceschangeevent = new xrinputsourceschangeeventinit("inputsourceschange", inputsourceseventinit); myinputsourceschangeevent = new xrinputsourceschangeeventinit("inputsourceschange", { session: xrsession, added: addeddevicelist, removed: removeddevicelist }); value an xrsession indicating the webxr session to which the input source list change applies.
XRPermissionDescriptor.mode - Web APIs
syntax xrpermissiondescriptor = { mode: xrsessionmode, requiredfeatures: reqfeaturelist, optionalfeatures: optfeaturelist }; xrpermissiondescriptor.mode = xrsessionmode; xrmode = xrpermissiondescriptor.mode; value a domstring whose value is one of the strings found in the xrsessionmode enumerated type: immersive-ar the session's output will be given exclusive access to the immersive device, but the rendered content will be blended with the real-world environment.
XRPermissionDescriptor.optionalFeatures - Web APIs
syntax xrpermissiondescriptor = { mode: xrsessionmode, requiredfeatures: reqfeaturelist, optionalfeatures: optfeaturelist }; xrpermissiondescriptor.optionalfeatures = optfeaturelist; optfeaturelist = xrpermissiondescriptor.optionalfeatures; value an array of strings taken from the xrreferencespacetype enumerated type, indicating set of features that your app would like to use, but can operate without if permission to use them isn't available.
XRPermissionDescriptor.requiredFeatures - Web APIs
syntax xrpermissiondescriptor = { mode: xrsessionmode, requiredfeatures: reqfeaturelist, optionalfeatures: optfeaturelist }; xrpermissiondescriptor.requiredfeatures = reqfeaturelist; reqfeaturelist = xrpermissiondescriptor.requiredfeatures; value an array of strings indicating the webxr features which must be available for use by the app or site.
XRPermissionStatus.granted - Web APIs
syntax grantedfeatures = xrpermissionstatus.granted; value an array of domstring objects, each identifying a single webxr feature which the app or site has been granted permission to use.
XRPose.emulatedPosition - Web APIs
syntax let emulated = xrpose.emulatedposition; value a boolean which is true if the pose's position is computed based on estimates or is derived from sources other than direct sensor data.
XRPose.transform - Web APIs
WebAPIXRPosetransform
syntax let posetransform = xrpose.transform; value an xrrigidtransform which provides the position and orientation of the xrpose relative to the xrframe to which this xrpose is aligned.
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
syntax offsetreferencespace = xrreferencespace.getoffsetreferencespace(originoffset); parameters originoffset an xrrigidtransform specifying the offset to the origin of the new reference space.
XRReferenceSpace.onreset - Web APIs
syntax xrreferencespace.onreset = eventhandler; eventhandler = xrreferencespace.onreset; value an event handler function which will be called whenever the reset event is received by the xrreferencespace.
XRReferenceSpaceEvent() - Web APIs
syntax let refspaceevent = new xrreferencespaceevent(type, eventinitdict); parameters type a domstring indicating the event type which has occurred.
XRReferenceSpaceEvent.referenceSpace - Web APIs
syntax let refspace = xrreferencespaceevent.referencespace; value an xrreferencespace indicating the source of the event.
XRReferenceSpaceEvent.transform - Web APIs
syntax let refspace = xrreferencespaceevent.transform; value an xrrigidtransform object providing a transform that can be used to convert coordinates from the pre-event coordinate system to the post-event coordinate system.
XRReferenceSpaceEventInit.referenceSpace - Web APIs
syntax let eventinitdict = { referencespace: xrreferencespace, transform: xrrigidtransform }); value an xrreferencespace indicating the source of the event.
XRReferenceSpaceEventInit.transform - Web APIs
syntax let eventinitdict = { referencespace: xrreferencespace, transform: xrrigidtransform }); value an xrrigidtransform object providing a transform that can be used to convert coordinates from the pre-event coordinate system to the post-event coordinate system.
XRRenderState.inlineVerticalFieldOfView - Web APIs
syntax var adouble = xrrenderstate.inlineverticalfieldofview; value a number.
XRRenderState.baseLayer - Web APIs
syntax var xrwebgllayer = xrrenderstate.baselayer; value a xrwebgllayer object which is used as the source of the world's contents when rendering each frame of the scene.
XRRenderState.depthFar - Web APIs
syntax var adouble = xrrenderstate.depthfar; value a number.
XRRenderState.depthNear - Web APIs
syntax var adouble = xrrenderstate.depthnear; value a number.
XRRenderState.inlineVerticalFieldOfView - Web APIs
syntax var inlineverticalfieldofview = xrrenderstate.inlineverticalfieldofview; value a number for "inline" sessions, which represents the default field of view, and null for immersive sessions.
XRRigidTransform() - Web APIs
syntax let xrrigidtransform = new xrrigidtransform(position, orientation); parameters position optional an object conforming to dompointinit which specifies the coordinates at which the point or object is located.
XRRigidTransform.inverse - Web APIs
syntax let transforminverse = xrrigidtransform.inverse; value an xrrigidtransform which contains the inverse of the xrrigidtransform on which it's accessed.
XRRigidTransform.matrix - Web APIs
syntax let matrix = xrrigidtransform.matrix; value a float32array containing 16 entries which represents the 4x4 transform matrix which is described by the position and orientation properties.
XRRigidTransform.orientation - Web APIs
syntax let orientation = xrrigidtransform.orientation; value a dompointreadonly object which contains a unit quaternion providing the orientation component of the transform.
XRRigidTransform.position - Web APIs
syntax let pos = xrrigidtransform.position; value a read-only dompointreadonly indicating the 3d position component of the transform matrix.
XRSession.cancelAnimationFrame() - Web APIs
syntax xrsession.cancelanimationframe(handle); parameters handle the unique value returned by the call to requestanimationframe() that previously scheduled the animation callback.
XRSession.end() - Web APIs
WebAPIXRSessionend
syntax xrsession.end(); parameters none.
XRSession.environmentBlendMode - Web APIs
syntax blendmode = xrsession.environmentblendmode; value a domstring whose value is one of the strings found in the enumerated type xrenvironmentblendmode, defining if—and if so, how—virtual, rendered content is overlaid atop the image of the real world.
XRSession.inputSources - Web APIs
syntax inputsources = xrsession.inputsources; value an xrinputsourcearray object listing all of the currently-connected input controllers which are linked specifically to the xr device currently in use.
XRSession.onend - Web APIs
WebAPIXRSessiononend
syntax xrsession.onend = function(event) { ...
XRSession.oninputsourceschange - Web APIs
syntax xrsession.oninputsourceschange = function(event) { ...
XRSession.onselect - Web APIs
syntax xrsession.onselect = selecthandlerfunction; value an event handler function to be invoked when the xrsession receives a select event.
XRSession.onselectend - Web APIs
syntax xrsession.onselectend = function(event) { ...
XRSession.onselectstart - Web APIs
syntax xrsession.onselectstart = function(event) { ...
XRSession.onsqueeze - Web APIs
syntax xrsession.onsqueeze = squeezehandlerfunction; value a function to be invoked whenever the xrsession receives a squeeze event.
XRSession.onsqueezeend - Web APIs
syntax xrsession.onsqueezeend = squeezeendhandlerfunction; value a function to be invoked whenever the xrsession receives a squeezestart event, indicating the ending of a primary squeeze action.
XRSession.onsqueezestart - Web APIs
syntax xrsession.onsqueezestart = squeezestarthandlerfunction; value a function to be invoked whenever the xrsession receives a squeezestart event.
XRSession.onvisibilitychange - Web APIs
syntax xrsession.onvisibilitychange = function(event) { ...
XRSession.renderState - Web APIs
syntax var xrrenderstate = xrsession.renderstate; value an xrrenderstate object describing how to render the scene.
XRSession.requestAnimationFrame() - Web APIs
syntax requestid = xrsession.requestanimationframe(animationframecallback); parameters animationframecallback a function which is called before the next repaint in order to allow you to update and render the xr scene based on elapsed time, animation, user input changes, and so forth.
XRSession.requestReferenceSpace() - Web APIs
syntax refspacepromise = xrsession.requestreferencespace(referencespacetype); parameters type a domstring specifying the type of reference space for which an instance is to be returned.
XRSession.updateRenderState() - Web APIs
syntax xrsession.updaterenderstate(newstate) parameters newstate an object conforming to the xrrenderstateinit dictionary specifying the properties of the session's renderstate to update before rendering the next frame.
XRSession.visibilityState - Web APIs
syntax visibilitystate = xrsession.visibilitystate; value a domstring containing one of the values defined in the enumerated type xrvisibilitystate; this string indicates whether or not the xr content is visible to the user and if it is, whether or not it's currently the primary focus.
XRSessionEvent() - Web APIs
syntax newxrsessionevent = new xrsessionevent(type, eventinitdict); parameters type a domstring indicating which of the events represented by objects of type xrsessionevent this particular object represents.
XRSessionEvent.session - Web APIs
syntax xrsession = xrsessionevent.session; value an xrsession object indicating which webxr session the event refers to.
XRSessionEventInit.session - Web APIs
syntax let sessioneventinit = { session: xrsession }; mysessionevent = new xrsessionevent(type, sessioneventinit); mysessionevent = new xrsessionevent(type, { session: xrsession }); value an xrsession object indicating which webxr session the event is referring to.
XRSystem: isSessionSupported() - Web APIs
syntax var issupportedpromise = xr.issessionsupported(xrsessionmode) parameters xrsessionmode a domstring specifying the webxr session mode for which support is to be checked.
XRSystem: ondevicechange - Web APIs
syntax navigator.xr.ondevicechange = function(event) { ...
XRSystem: requestSession() - Web APIs
syntax var sessionpromise = xr.requestsession(sessionmode, sessioninit) parameters sessionmode a domstring whose value is one of those included in the xrsessionmode enum.
XRView.eye - Web APIs
WebAPIXRVieweye
syntax let eye = xrview.eye; value a domstring whose value is one of the strings enumerated by the xreye type: left the xrview represents the point-of-view of the viewer's left eye.
XRView.projectionMatrix - Web APIs
syntax let projectionmatrix = xrview.projectionmatrix; value a float32array object representing the projection matrix for the view.
XRView.transform - Web APIs
WebAPIXRViewtransform
syntax let viewtransform = xrview.transform; value a xrrigidtransform object specifying the position and orientation of the viewpoint represented by the xrview.
XRViewerPose.views - Web APIs
syntax let viewlist = xrviewerpose.views; value an array of xrview objects, one for each view available as part of the scene for the current viewer pose.
XRViewport.height - Web APIs
WebAPIXRViewportheight
syntax height = xrviewport.height; value the viewport's height in pixels.
XRViewport.width - Web APIs
WebAPIXRViewportwidth
syntax width = xrviewport.width; value the viewport's width in pixels.
XRViewport.x - Web APIs
WebAPIXRViewportx
syntax x = xrviewport.x; value the offset from the left edge of the rendering surface to the left edge of the viewport, in pixels.
XRViewport.y - Web APIs
WebAPIXRViewporty
syntax y = xrviewport.y; value the offset from the bottom edge of the rendering surface to the bottom edge of the viewport, in pixels.
XRWebGLLayer() - Web APIs
syntax let gllayer = new xrwebgllayer(session, context, layerinit); parameters session an xrsession object specifying the webxr session which will be rendered using the webgl context.
XRWebGLLayer.antialias - Web APIs
syntax let antialiasingsupported = xrwebgllayer.antialias; value a boolean value which is true if the webgl rendering layer's frame buffer is configured to support antialiasing.
XRWebGLLayer.framebuffer - Web APIs
syntax let framebuffer = xrwebgllayer.framebuffer; value a webglframebuffer object representing the framebuffer into which the 3d scene is being rendered, or null if the xr compositor is disabled for the session.
XRWebGLLayer.framebufferHeight - Web APIs
syntax let bufferheight = xrwebgllayer.framebufferheight; value the height in pixels of the xr device's framebuffer.
XRWebGLLayer.framebufferWidth - Web APIs
syntax let bufferwidth = xrwebgllayer.framebufferwidth; value the width in pixels of the xr device's framebuffer.
XRWebGLLayer.getNativeFramebufferScaleFactor() static method - Web APIs
syntax let nativescaling = xrwebgllayer.getnativeframebufferscalefactor(session); parameters session the xrsession for which to return the native framebuffer scaling factor.
XRWebGLLayer.getViewport() - Web APIs
syntax let viewport = xrwebgllayer.getviewport(view); parameters view an xrview object indicating the view for which the viewport is to be returned.
XRWebGLLayer.ignoreDepthValues - Web APIs
syntax let ignoringdepthbuffer = xrwebgllayer.ignoredepthvalues; value a boolean value which is true if the webgl context's depth buffer is being used while computing the locations of points in the 3d world.
XRWebGLLayerInit.alpha - Web APIs
syntax let layerinit = { alpha: boolvalue }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { alpha: boolvalue }); value a boolean which can be set to true to request that the new webgl layer for rendering the webxr scene is to have an alpha channel.
XRWebGLLayerInit.antialias - Web APIs
syntax let layerinit = { antialias: boolvalue }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { antialias: boolvalue }); value a boolean value which can be set to true to request anti-aliasing support in the new webgl rendering layer.
XRWebGLLayerInit.depth - Web APIs
syntax let layerinit = { depth: false }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { depth: false }); value a boolean which can be set to false to specify that the new webgl layer should not have a depth buffer.
XRWebGLLayerInit.framebufferScaleFactor - Web APIs
syntax let layerinit = { framebufferscalefactor: scalefactor }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { framebufferscalefactor: scalefactor }); value a floating-point value indicating a multiplier to apply to the default frame buffer resolution in order to determine the resolution of the frame buffer for the xrwebgllayer.
XRWebGLLayerInit.ignoreDepthValues - Web APIs
syntax let layerinit = { ignoredepthvalues: boolvalue }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { ignoredepthvalues: boolvalue }); value a boolean value which can be set to true to disable the use of the depth buffer by the webgl rendering layer created by the xrwebgllayer() constructor.
XRWebGLLayerInit.stencil - Web APIs
syntax let layerinit = { stencil: false }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { stencil: false }); value a boolean which can be set to false to specify that the new webgl layer should not include a stencil buffer.
XSLTProcessor - Web APIs
syntax the constructor has no parameters.
msCaching - Web APIs
WebAPImsCaching
syntax cachestate = object.mscaching values type: domstring property value description auto disables caching for stream or ms-stream data.
msCachingEnabled - Web APIs
syntax var cachestate = xmlhttprequest.mscachingenabled(); parameters cachestate[out, retval] type = boolean.
msCapsLockWarningOff - Web APIs
syntax document.mscapslockwarningoff = true; value type: boolean false: default.
msGetPropertyEnabled - Web APIs
syntax var retval = style.msgetpropertyenabled(name); parameters name [in] type: string the name of the property to enable.
msGetRegionContent - Web APIs
syntax var retval = element.msgetregioncontent(); parameters retval [out, reval] type: msrangecollection the name of the property to enable.
msPutPropertyEnabled - Web APIs
syntax var retval = style.msputpropertyenabled(propertyname, true); parameters name[in]: name of the property.
msRegionOverflow - Web APIs
syntax string = object.msregionoverflow values type:domstring overflow: the region element's content overflows the region's content box.
msWriteProfilerMark - Web APIs
syntax window.mswriteprofilermark("start-render"); parameters bstrprofilermarkname[in] an event name.
mssitemodejumplistitemremoved - Web APIs
syntax event property object.oncandidatewindowhide = handler; addeventlistener method object.addeventlistener("mssitemodejumplistitemremoved", handler, usecapture) general info synchronous no bubbles no cancelable no note this event is raised once for every item that has been removed since the last time mssitemodeshowjumplist was called.
msthumbnailclick - Web APIs
syntax event property object.onmsthumbnailclick = handler; addeventlistener method object.addeventlistener("msthumbnailclick", handler, usecapture) general info synchronous no bubbles no cancelable no note the onmsthumbnailclick event is available only to documents that are launched from a pinned site shortcut.
x-ms-aria-flowfrom - Accessibility
syntax x-ms-aria-flowfrom="elementid"; value the x-ms-aria-flowfrom property value uses an id selector to define which previous element the reading order will flow from.
Web Accessibility: Understanding Colors and Luminance - Accessibility
there are many online tools that can convert rgb to hsl for you, with both the rgb hexidecimal and css function syntax.
:-moz-broken - CSS: Cascading Style Sheets
syntax :-moz-broken examples html <img src="broken.jpg" alt="this image is broken.
:-moz-drag-over - CSS: Cascading Style Sheets
syntax :-moz-drag-over examples html <table border="1"> <tr> <td width="100px" height="100px">drag over</td> </tr> </table> css td:-moz-drag-over { color: red; } result specifications not part of any standard.
:-moz-first-node - CSS: Cascading Style Sheets
syntax :-moz-first-node examples css span:-moz-first-node { background-color: lime; } html <p> <span>this matches!</span> <span>this doesn't match.</span> </p> <p> blahblah.
:-moz-focusring - CSS: Cascading Style Sheets
syntax :-moz-focusring examples html <input /> css input { margin: 5px; } :-moz-focusring { color: red; outline: 2px dotted green; } result specifications not part of any standard.
:-moz-handler-blocked - CSS: Cascading Style Sheets
syntax :-moz-handler-blocked specifications not part of any standard.
:-moz-handler-crashed - CSS: Cascading Style Sheets
syntax :-moz-handler-crashed specifications not part of any standard.
:-moz-handler-disabled - CSS: Cascading Style Sheets
syntax :-moz-handler-disabled specifications not part of any standard.
:-moz-last-node - CSS: Cascading Style Sheets
syntax :-moz-last-node examples css span:-moz-last-node { background-color: lime; } html <p> <span>this does not match.</span> <span>this matches!</span> </p> <p> <span>this doesn't match because it's followed by text.</span> blahblah.
::-moz-list-bullet - CSS: Cascading Style Sheets
syntax li::-moz-list-bullet examples html <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> </ul> css ::-moz-list-bullet { color: red; font-size: 1.5em; } result specifications not part of any standard.
::-moz-list-number - CSS: Cascading Style Sheets
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.
:-moz-loading - CSS: Cascading Style Sheets
syntax :-moz-loading examples setting a background for images that are loading :-moz-loading { background-color: #aaa; background-image: url(loading-animation.gif) center no-repeat; } specifications not part of any standard.
:-moz-locale-dir(ltr) - CSS: Cascading Style Sheets
syntax :-moz-locale-dir(ltr) examples this example doesn't work if you're not using firefox, and may not work even in firefox due to an issue with the selector not working propertly with html content.
:-moz-locale-dir(rtl) - CSS: Cascading Style Sheets
syntax :-moz-locale-dir(rtl) examples this example will not work if you're not using firefox, and might not work properly even in firefox due to an issue with using this selector in html.
:-moz-only-whitespace - CSS: Cascading Style Sheets
(this includes elements with empty text nodes and elements with no child nodes.) syntax syntax not found in db!
:-moz-submit-invalid - CSS: Cascading Style Sheets
syntax syntax not found in db!
:-moz-suppressed - CSS: Cascading Style Sheets
syntax :-moz-suppressed examples styling elements that have been blocked :-moz-suppressed { background: yellow; padding: 8px; } specifications not part of any standard.
:-moz-ui-invalid - CSS: Cascading Style Sheets
syntax syntax not found in db!
:-moz-ui-valid - CSS: Cascading Style Sheets
syntax syntax not found in db!
:-moz-user-disabled - CSS: Cascading Style Sheets
syntax :-moz-user-disabled examples styling user-disabled elements :-moz-user-disabled { background-color: lightgray; padding: 8px; } specifications not part of any standard.
:-moz-window-inactive - CSS: Cascading Style Sheets
syntax :-moz-window-inactive examples this example alters the appearance of a box's background depending on whether its window is active or not.
:-webkit-autofill - CSS: Cascading Style Sheets
syntax :-webkit-autofill specifications not part of any standard.
::-moz-color-swatch - CSS: Cascading Style Sheets
syntax syntax not found in db!
::-moz-focus-inner - CSS: Cascading Style Sheets
syntax syntax not found in db!
::-moz-page-sequence - CSS: Cascading Style Sheets
syntax syntax not found in db!
::-moz-page - CSS: Cascading Style Sheets
syntax syntax not found in db!
::-moz-progress-bar - CSS: Cascading Style Sheets
syntax ::-moz-progress-bar examples html <progress value="30" max="100">30%</progress> <progress max="100">indeterminate</progress> css ::-moz-progress-bar { background-color: red; } /* force indeterminate bars to have zero width */ :indeterminate::-moz-progress-bar { width: 0; } result specifications not part of any standard.
::-moz-range-progress - CSS: Cascading Style Sheets
syntax ::-moz-range-progress examples html <input type="range" min="0" max="100" step="5" value="50"/> css input[type=range]::-moz-range-progress { background-color: green; height: 1em; } result a progress bar using this style might look something like this: specifications not part of any standard.
::-moz-range-thumb - CSS: Cascading Style Sheets
syntax ::-moz-range-thumb examples html <input type="range" min="0" max="100" step="5" value="50"/> css input[type=range]::-moz-range-thumb { background-color: green; } result a progress bar using this style might look something like this: specifications not part of any standard.
::-moz-range-track - CSS: Cascading Style Sheets
syntax ::-moz-range-track examples html <input type="range" min="0" max="100" step="5" value="50"/> css input[type=range]::-moz-range-track { background-color: green; } result a progress bar using this style might look something like this: specifications not part of any standard.
::-moz-scrolled-page-sequence - CSS: Cascading Style Sheets
syntax syntax not found in db!
::-webkit-file-upload-button - CSS: Cascading Style Sheets
syntax selector::-webkit-file-upload-button examples html <form> <label for="fileupload">upload file</label><br> <input type="file" id="fileupload"> </form> css input, label { display: block; } input[type=file]::-webkit-file-upload-button { border: 1px solid grey; background: #fffaaa; } below is the example for you to try.
::-webkit-inner-spin-button - CSS: Cascading Style Sheets
syntax ::-webkit-inner-spin-button examples these examples work only in browsers based on webkit and blink.
::-webkit-meter-bar - CSS: Cascading Style Sheets
syntax ::-webkit-meter-bar specifications not part of any standard.
::-webkit-meter-even-less-good-value - CSS: Cascading Style Sheets
syntax ::-webkit-meter-even-less-good-value specifications not part of any standard.
::-webkit-meter-inner-element - CSS: Cascading Style Sheets
syntax ::-webkit-meter-inner-element specifications not part of any standard.
::-webkit-meter-optimum-value - CSS: Cascading Style Sheets
syntax ::-webkit-meter-optimum-value specifications not part of any standard.
::-webkit-meter-suboptimum-value - CSS: Cascading Style Sheets
syntax ::-webkit-meter-suboptimum-value examples this example will only work in browsers based on webkit or blink.
::-webkit-outer-spin-button - CSS: Cascading Style Sheets
syntax ::-webkit-outer-spin-button examples these examples only works on browsers based on webkit or blink.
::-webkit-progress-bar - CSS: Cascading Style Sheets
syntax ::-webkit-progress-bar examples css content progress { -webkit-appearance: none; } ::-webkit-progress-bar { background-color: orange; } html content <progress value="10" max="50"> result result screenshot if you're not using a webkit or blink browser, the code above results in a progress bar that looks like this: specifications not part of any standard.
::-webkit-progress-inner-element - CSS: Cascading Style Sheets
syntax ::-webkit-progress-inner-element examples these examples work only on blink and webkit.
::-webkit-progress-value - CSS: Cascading Style Sheets
syntax ::-webkit-progress-value examples this example will only work in browsers based on blink or webkit.
::-webkit-scrollbar - CSS: Cascading Style Sheets
syntax syntax not found in db!
::-webkit-search-cancel-button - CSS: Cascading Style Sheets
syntax selector::-webkit-search-cancel-button specifications not part of any standard.
::-webkit-search-results-button - CSS: Cascading Style Sheets
syntax selector::-webkit-search-results-button specifications not part of any standard.
::-webkit-slider-runnable-track - CSS: Cascading Style Sheets
syntax ::-webkit-slider-runnable-track specifications not part of any standard.
::-webkit-slider-thumb - CSS: Cascading Style Sheets
syntax ::-webkit-slider-thumb specifications not part of any standard.
::backdrop - CSS: Cascading Style Sheets
syntax ::backdrop examples styling the backdrop for full-screen video in this example, the backdrop style used when a video is shifted to full-screen mode is configured to be a grey-blue color rather than the black it defaults to in most browsers.
::cue-region - CSS: Cascading Style Sheets
syntax ::cue-region | ::cue-region( <selector> ) permitted properties rules whose selectors include this element may only use the following css properties: background background-attachment background-clip background-color background-image background-origin background-position background-repeat background-size color font font-family font-size font-stretch font-style font-variant fo...
::cue - CSS: Cascading Style Sheets
WebCSS::cue
syntax ::cue | ::cue( <selector> ) permitted properties rules whose selectors include this element may only use the following css properties: background background-attachment background-clip background-color background-image background-origin background-position background-repeat background-size color font font-family font-size font-stretch font-style font-variant font-weight lin...
::grammar-error - CSS: Cascading Style Sheets
allowable properties only a small subset of css properties can be used in a rule with ::grammar-error in its selector: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow syntax ::grammar-error examples simple document grammar check in this example, eventual supporting browsers should highlight any flagged grammatical errors with the styles shown.
::marker - CSS: Cascading Style Sheets
WebCSS::marker
syntax ::marker examples html <ul> <li>peaches</li> <li>apples</li> <li>plums</li> </ul> css ul li::marker { color: red; font-size: 1.5em; } result specifications specification status comment css pseudo-elements level 4the definition of '::marker' in that specification.
::part() - CSS: Cascading Style Sheets
WebCSS::part
custom-element::part(foo) { /* styles to apply to the `foo` part */ } syntax ::part( <ident>+ ) examples html <template id="tabbed-custom-element"> <style type="text/css"> *, ::before, ::after { box-sizing: border-box; padding: 1rem; } :host { display: flex; } </style> <div part="tab active">tab 1</div> <div part="tab">tab 2</div> <div part="tab">tab 3</div> </template> <tabbed-custom-element></tabbed-custom-element> css tabbed-custom-element::part(tab) { color: #0c0c0dcc; border-bottom: transparent solid 2px; } tabbed-custom-element::part(tab):hover { background-color: #0c0c0d19; border-color: #0c0c0d33; } tabbed-custom-element::part(tab):hover:active { ba...
::placeholder - CSS: Cascading Style Sheets
syntax ::placeholder accessibility concerns color contrast contrast ratio placeholder text typically has a lighter color treatment to indicate that it is a suggestion for what kind of input will be valid, and is not actual input of any kind.
::selection - CSS: Cascading Style Sheets
syntax /* legacy firefox syntax (version 61 and below) */ ::-moz-selection ::selection examples html this text has special styles when you highlight it.
::slotted() - CSS: Cascading Style Sheets
WebCSS::slotted
/* selects any element placed inside a slot */ ::slotted(*) { font-weight: bold; } /* selects any <span> placed inside a slot */ ::slotted(span) { font-weight: bold; } syntax ::slotted( <compound-selector-list> )where <compound-selector-list> = <compound-selector>#where <compound-selector> = [ <type-selector>?
::spelling-error - CSS: Cascading Style Sheets
allowable properties only a small subset of css properties can be used in a rule with ::spelling-error in its selector: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow syntax ::spelling-error examples simple document spell check in this example, eventual supporting browsers should highlight any flagged spelling errors with the styles shown.
:active - CSS: Cascading Style Sheets
WebCSS:active
syntax :active examples active links html <p>this paragraph contains a link: <a href="#">this link will turn red while you click on it.</a> the paragraph will get a gray background while you click on it or the link.
:any-link - CSS: Cascading Style Sheets
WebCSS:any-link
/* selects any element that would be matched by :link or :visited */ :any-link { color: green; } syntax :any-link examples html <a href="https://example.com">external link</a><br> <a href="#">internal target link</a><br> <a>placeholder link (won't get styled)</a> css a:any-link { border: 1px solid blue; color: orange; } /* webkit browsers */ a:-webkit-any-link { border: 1px solid blue; color: orange; } result specifications specification status comment ...
:blank - CSS: Cascading Style Sheets
WebCSS:blank
syntax :blank examples simple :blank example in eventual supporting browsers, the :blank pseudo-class will enable developers to highlight in some way input controls that are not required, but still have no content filled in, perhaps as a reminder to users.
:checked - CSS: Cascading Style Sheets
WebCSS:checked
syntax :checked examples basic example html <div> <input type="radio" name="my-input" id="yes"> <label for="yes">yes</label> <input type="radio" name="my-input" id="no"> <label for="no">no</label> </div> <div> <input type="checkbox" name="my-checkbox" id="opt-in"> <label for="opt-in">check me!</label> </div> <select name="my-select" id="fruit"> <option value="opt1">apples</option> ...
:default - CSS: Cascading Style Sheets
WebCSS:default
syntax :default examples html <fieldset> <legend>favorite season</legend> <input type="radio" name="season" id="spring"> <label for="spring">spring</label> <input type="radio" name="season" id="summer" checked> <label for="summer">summer</label> <input type="radio" name="season" id="fall"> <label for="fall">fall</label> <input type="radio" name="season" id="winter"> <label for...
:defined - CSS: Cascading Style Sheets
WebCSS:defined
/* selects any defined element */ :defined { font-style: italic; } /* selects any instance of a specific custom element */ simple-custom:defined { display: block; } syntax :defined examples hiding elements until they are defined the following snippets are taken from our defined-pseudo-class demo (see it live also).
:disabled - CSS: Cascading Style Sheets
WebCSS:disabled
/* selects any disabled <input> */ input:disabled { background: #ccc; } syntax :disabled examples this example shows a basic shipping form.
:empty - CSS: Cascading Style Sheets
WebCSS:empty
/* selects any <div> that contains no content */ div:empty { background: lime; } syntax :empty examples html <div class="box"><!-- i will be lime.
:enabled - CSS: Cascading Style Sheets
WebCSS:enabled
/* selects any enabled <input> */ input:enabled { color: blue; } syntax :enabled examples the following example makes the color of text and button <input>s green when enabled, and gray when disabled.
:first-child - CSS: Cascading Style Sheets
syntax :first-child examples basic example html <div> <p>this text is selected!</p> <p>this text isn't selected.</p> </div> <div> <h2>this text isn't selected: it's not a `p`.</h2> <p>this text isn't selected.</p> </div> css p:first-child { color: lime; background-color: black; padding: 5px; } result styling a list html <ul> <li>item 1</li> <li>item 2</li> <li>item 3 <ul> <li>item 3.1</li> <li>item 3.2</li> ...
:first-of-type - CSS: Cascading Style Sheets
syntax :first-of-type examples styling the first paragraph html <h2>heading</h2> <p>paragraph 1</p> <p>paragraph 2</p> css p:first-of-type { color: red; font-style: italic; } result nested elements this example shows how nested elements can also be targeted.
:first - CSS: Cascading Style Sheets
WebCSS:first
syntax :first examples html <p>first page.</p> <p>second page.</p> <button>print!</button> css @page :first { margin-left: 50%; margin-top: 50%; } p { page-break-after: always; } javascript document.queryselector("button").addeventlistener('click', () => { window.print(); }); result press the "print!" button to print the example.
:focus-visible - CSS: Cascading Style Sheets
syntax :focus-visible examples basic example in this example, the :focus-visible selector uses the ua's behavior to determine when to match.
:focus-within - CSS: Cascading Style Sheets
syntax :focus-within examples in this example, the form will receive special coloring styles when either text input receives focus.
:focus - CSS: Cascading Style Sheets
WebCSS:focus
syntax :focus examples html <input class="red-input" value="i'll be red when focused."><br> <input class="blue-input" value="i'll be blue when focused."> css .red-input:focus { background: yellow; color: red; } .blue-input:focus { background: yellow; color: blue; } result accessibility concerns make sure the visual focus indicator can be seen by people with low vision.
:fullscreen - CSS: Cascading Style Sheets
syntax :fullscreen usage notes the :fullscreen pseudo-class lets you configure your stylesheets to automatically adjust the size, style, or layout of content when elements switch back and forth between full-screen and traditional presentations.
:has() - CSS: Cascading Style Sheets
WebCSS:has
/* selects any <a>, as long as it has an <img> element directly inside it */ /* note that this is not supported in any browser yet */ let test = document.queryselector('a:has(> img)'); syntax :has( <relative-selector-list> )where <relative-selector-list> = <relative-selector>#where <relative-selector> = <combinator>?
:host() - CSS: Cascading Style Sheets
WebCSS:host()
/* selects a shadow root host, only if it is matched by the selector argument */ :host(.special-custom-element) { font-weight: bold; } syntax :host( <compound-selector-list> )where <compound-selector-list> = <compound-selector>#where <compound-selector> = [ <type-selector>?
:host-context() - CSS: Cascading Style Sheets
/* selects a shadow root host, only if it is a descendant of the selector argument given */ :host-context(h1) { font-weight: bold; } :host-context(main article) { font-weight: bold; } /* changes paragraph text color from black to white when a .dark-theme class is applied to the document body */ p { color: #000; } :host-context(body.dark-theme) p { color: #fff; } syntax :host-context( <compound-selector-list> )where <compound-selector-list> = <compound-selector>#where <compound-selector> = [ <type-selector>?
:host - CSS: Cascading Style Sheets
WebCSS:host
/* selects a shadow root host */ :host { font-weight: bold; } syntax :host examples styling the shadow host the following snippets are taken from our host-selectors example (see it live also).
:hover - CSS: Cascading Style Sheets
WebCSS:hover
syntax :hover examples basic example html <a href="#">try hovering over this link.</a> css a { background-color: powderblue; transition: background-color .5s; } a:hover { background-color: gold; } result image gallery you can use the :hover pseudo-class to build an image gallery with full-size images that show only when the mouse moves over a thumbnail.
:in-range - CSS: Cascading Style Sheets
WebCSS:in-range
in the absence of such a limitation, the element can neither be "in-range" nor "out-of-range." syntax :in-range examples html <form action="" id="form1"> <ul>values between 1 and 10 are valid.
:indeterminate - CSS: Cascading Style Sheets
/* selects any <input> whose state is indeterminate */ input:indeterminate { background: lime; } elements targeted by this selector are: <input type="checkbox"> elements whose indeterminate property is set to true by javascript <input type="radio"> elements, when all radio buttons with the same name value in the form are unchecked <progress> elements in an indeterminate state syntax :indeterminate examples checkbox & radio button this example applies special styles to the labels associated with indeterminate form fields.
:invalid - CSS: Cascading Style Sheets
WebCSS:invalid
syntax :invalid examples this example presents a simple form that colors elements green when they validate and red when they don't.
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
WebCSS:is
n with :-*-any() and :matches() (it is not possible to group selectors into single rule, because presence of invalid selector would invalidate whole rule.) */ :-webkit-any(header, main, footer) p:hover { color: red; cursor: pointer; } :-moz-any(header, main, footer) p:hover { color: red; cursor: pointer; } :matches(header, main, footer) p:hover { color: red; cursor: pointer; } syntax :is( <complex-selector-list> )where <complex-selector-list> = <complex-selector>#where <complex-selector> = <compound-selector> [ <combinator>?
:lang() - CSS: Cascading Style Sheets
WebCSS:lang
syntax formal syntax :lang( <language-code> ) parameter <language-code> a <string> representing the language you want to target.
:last-child - CSS: Cascading Style Sheets
syntax :last-child examples basic example html <div> <p>this text isn't selected.</p> <p>this text is selected!</p> </div> <div> <p>this text isn't selected.</p> <h2>this text isn't selected: it's not a `p`.</h2> </div> css p:last-child { color: lime; background-color: black; padding: 5px; } result styling a list html <ul> <li>item 1</li> <li>item 2</li> <li>item 3 <ul> <li>item 3.1</li> <li>item 3.2</li> <l...
:last-of-type - CSS: Cascading Style Sheets
syntax :last-of-type examples styling the last paragraph html <h2>heading</h2> <p>paragraph 1</p> <p>paragraph 2</p> css p:last-of-type { color: red; font-style: italic; } result nested elements this example shows how nested elements can also be targeted.
:left - CSS: Cascading Style Sheets
WebCSS:left
syntax :left examples setting a margin for left-hand pages @page :left { margin: 2in 3in; } specifications specification status comment css paged media module level 3the definition of ':left' in that specification.
:link - CSS: Cascading Style Sheets
WebCSS:link
syntax :link examples by default, most browsers apply a special color value to visited links.
:only-child - CSS: Cascading Style Sheets
syntax :only-child examples basic example html <div> <div>i am an only child.</div> </div> <div> <div>i am the 1st sibling.</div> <div>i am the 2nd sibling.</div> <div>i am the 3rd sibling, <div>but this is an only child.</div></div> </div> css div:only-child { color: red; } div { display: inline-block; margin: 6px; outline: 1px solid; } result a list example html <ol> ...
:only-of-type - CSS: Cascading Style Sheets
syntax :only-of-type examples styling elements with no siblings of the same type html <main> <div>i am `div` #1.</div> <p>i am the only `p` among my siblings.</p> <div>i am `div` #2.</div> <div>i am `div` #3.
:optional - CSS: Cascading Style Sheets
WebCSS:optional
syntax :optional examples see :invalid for an example.
: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:...
:placeholder-shown - CSS: Cascading Style Sheets
/* selects any element with an active placeholder */ :placeholder-shown { border: 2px solid silver; } syntax :placeholder-shown examples basic example this example applies special font and border styles when the placeholder is shown.
:read-only - CSS: Cascading Style Sheets
input:read-only, textarea:read-only { background-color: #ccc; } p:read-only { background-color: #ccc; } syntax :read-only examples confirming form information in read-only/read-write controls one use of readonly form controls is to allow the user to check and verify information that they may have entered in an earlier form (for example, shipping details), while still being able to submit the information along with the rest of the form.
:read-write - CSS: Cascading Style Sheets
input:read-write, textarea:read-write { background-color: #bbf; } p:read-write { background-color: #bbf; } syntax :read-write examples confirming form information in read-only/read-write controls one use of readonly form controls is to allow the user to check and verify information that they may have entered in an earlier form (for example, shipping details), while still being able to submit the information along with the rest of the form.
:required - CSS: Cascading Style Sheets
WebCSS:required
syntax :required examples see :invalid for an example.
:right - CSS: Cascading Style Sheets
WebCSS:right
syntax :right examples setting margins for right-hand pages @page :right { margin: 2in 3in; } specifications specification status comment css paged media module level 3the definition of ':right' in that specification.
:root - CSS: Cascading Style Sheets
WebCSS:root
/* selects the root element of the document: <html> in the case of html */ :root { background: yellow; } syntax :root examples declaring global css variables :root can be useful for declaring global css variables: :root { --main-color: hotpink; --pane-padding: 5px 42px; } specifications specification status comment selectors level 4the definition of ':root' in that specification.
:scope - CSS: Cascading Style Sheets
WebCSS:scope
syntax :scope examples identity match in this simple example, we demonstrate that using the :scope pseudo-class from the element.matches() method matches the element on which it's called.
:state() - CSS: Cascading Style Sheets
WebCSS:state
custom-element:state(foo) { /* styles to apply when `custom-element` is in the `foo` state */ } syntax syntax not found in db!
:target - CSS: Cascading Style Sheets
WebCSS:target
nt with an id matching the current url's fragment */ :target { border: 2px solid black; } for example, the following url has a fragment (denoted by the # sign) that points to an element called section2: http://www.example.com/index.html#section2 the following element would be selected by a :target selector when the current url is equal to the above: <section id="section2">example</section> syntax :target examples a table of contents the :target pseudo-class can be used to highlight the portion of a page that has been linked to from a table of contents.
:valid - CSS: Cascading Style Sheets
WebCSS:valid
syntax :valid examples indicating valid and invalid form fields in this example, we use structures like this, which include extra <span>s to generate content on; we'll use these to provide indicators of valid/invalid data: <div> <label for="fname">first name *: </label> <input id="fname" name="fname" type="text" required> <span></span> </div> to provide these indicators, we use the following c...
:visited - CSS: Cascading Style Sheets
WebCSS:visited
syntax :visited examples properties that would otherwise have no color or be transparent cannot be modified with :visited.
:where() - CSS: Cascading Style Sheets
WebCSS:where
syntax :where( <complex-selector-list> )where <complex-selector-list> = <complex-selector>#where <complex-selector> = <compound-selector> [ <combinator>?
-moz-device-pixel-ratio - CSS: Cascading Style Sheets
syntax <number> the number of device pixels per css pixel.
-webkit-animation - CSS: Cascading Style Sheets
syntax the -webkit-animation media feature is a boolean whose value is true if the vendor-prefixed css animation properties are supported.
-webkit-device-pixel-ratio - CSS: Cascading Style Sheets
syntax the -webkit-device-pixel-ratio feature is specified as a <number> value.
-webkit-transform-2d - CSS: Cascading Style Sheets
syntax -webkit-transform-2d is a boolean css media feature whose value is true if the browser supports -webkit prefixed css 2d transforms.
-webkit-transform-3d - CSS: Cascading Style Sheets
syntax -webkit-transform-3d is a boolean css media feature whose value is true if the browser supports -webkit prefixed css 3d transforms.
-webkit-transition - CSS: Cascading Style Sheets
syntax @media (-webkit-transition) { /* css to use if transitions are supported */ } examples use @supports instead do not use the -webkit-transition media feature.
any-hover - CSS: Cascading Style Sheets
WebCSS@mediaany-hover
syntax the any-hover feature is specified as a keyword value chosen from the list below.
any-pointer - CSS: Cascading Style Sheets
syntax the any-pointer feature is specified as a keyword value chosen from the list below.
aspect-ratio - CSS: Cascading Style Sheets
syntax the aspect-ratio feature is specified as a <ratio> value representing the width-to-height aspect ratio of the viewport.
aural - CSS: Cascading Style Sheets
WebCSS@mediaaural
syntax the aural css media type—which has been deprecated in favor of the speech media type—was used to specify a block of css that applied only when the content is being presented using a speech synthesis device.
color-gamut - CSS: Cascading Style Sheets
syntax the color-gamut feature is specified as a keyword value chosen from the list below.
color-index - CSS: Cascading Style Sheets
syntax the color-index feature is specified as an <integer> value representing the number of entries in the output device's color lookup table.
color - CSS: Cascading Style Sheets
WebCSS@mediacolor
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.
device-aspect-ratio - CSS: Cascading Style Sheets
syntax the device-aspect-ratio feature is specified as a <ratio>.
device-height - CSS: Cascading Style Sheets
syntax the device-height feature is specified as a <length> value.
device-width - CSS: Cascading Style Sheets
syntax the device-width feature is specified as a <length> value.
display-mode - CSS: Cascading Style Sheets
syntax the display-mode feature is specified as a keyword value chosen from the list below.
forced-colors - CSS: Cascading Style Sheets
syntax the forced-colors media feature indicates whether or not the browser is currently in forced-colors mode.
grid - CSS: Cascading Style Sheets
WebCSS@mediagrid
syntax the grid feature is specified as a <mq-boolean> value (0 or 1) representing whether or not the ouput device is grid-based.
height - CSS: Cascading Style Sheets
WebCSS@mediaheight
syntax the height feature is specified as a <length> value representing the viewport height.
hover - CSS: Cascading Style Sheets
WebCSS@mediahover
syntax the hover feature is specified as a keyword value chosen from the list below.
inverted-colors - CSS: Cascading Style Sheets
syntax the inverted-colors feature is specified as a keyword value chosen from the list below.
light-level - CSS: Cascading Style Sheets
syntax dim the device is used in a dim environment, where excessive contrast and brightness would be distracting or uncomfortable to the reader.
monochrome - CSS: Cascading Style Sheets
WebCSS@mediamonochrome
syntax the monochrome feature is specified as an <integer> representing the number of bits per pixel in the monochrome frame buffer.
orientation - CSS: Cascading Style Sheets
syntax the orientation feature is specified as a keyword value chosen from the list below.
overflow-block - CSS: Cascading Style Sheets
syntax the overflow-block feature is specified as a keyword value chosen from the list below.
overflow-inline - CSS: Cascading Style Sheets
syntax the overflow-inline feature is specified as a keyword value chosen from the list below.
pointer - CSS: Cascading Style Sheets
WebCSS@mediapointer
syntax the pointer feature is specified as a keyword value chosen from the list below.
prefers-color-scheme - CSS: Cascading Style Sheets
syntax light indicates that user has notified the system that they prefer an interface that has a light theme, or has not expressed an active preference.
prefers-contrast - CSS: Cascading Style Sheets
syntax no-preference indicates that the user has made no preference known to the system.
prefers-reduced-data - CSS: Cascading Style Sheets
syntax no-preference indicates that the user has made no preference known to the system.
prefers-reduced-motion - CSS: Cascading Style Sheets
syntax no-preference indicates that the user has made no preference known to the system.
prefers-reduced-transparency - CSS: Cascading Style Sheets
syntax no-preference indicates that the user has made no preference known to the system.
resolution - CSS: Cascading Style Sheets
WebCSS@mediaresolution
syntax the resolution feature is specified as a <resolution> value representing the pixel density of the output device.
scan - CSS: Cascading Style Sheets
WebCSS@mediascan
syntax the scan feature is specified as a single keyword value chosen from the list below.
scripting - CSS: Cascading Style Sheets
WebCSS@mediascripting
syntax the scripting feature is specified as a keyword value chosen from the list below.
shape - CSS: Cascading Style Sheets
WebCSS@mediashape
syntax the shape descrete feature is specified as one of two acceptable strings, either rect reprsenting a rectangular screen or round representing a circular, oval or elliptical screen.
update - CSS: Cascading Style Sheets
syntax the update feature is specified as a single keyword value chosen from the list below.
width - CSS: Cascading Style Sheets
WebCSS@mediawidth
syntax the width feature is specified as a <length> value representing the viewport width.
Adjacent sibling combinator - CSS: Cascading Style Sheets
/* paragraphs that come immediately after any image */ img + p { font-weight: bold; } syntax former_element + target_element { style properties } examples css li:first-of-type + li { color: red; } html <ul> <li>one</li> <li>two!</li> <li>three</li> </ul> result specifications specification status comment selectors level 4the definition of 'next-sibling combinator' in that specification.
Attribute selectors - CSS: Cascading Style Sheets
<a> elements with an href matching "https://example.org" */ a[href="https://example.org"] { color: green; } /* <a> elements with an href containing "example" */ a[href*="example"] { font-size: 2em; } /* <a> elements with an href ending ".org" */ a[href$=".org"] { font-style: italic; } /* <a> elements whose class attribute contains the word "logo" */ a[class~="logo"] { padding: 2px; } syntax [attr] represents elements with an attribute name of attr.
Using CSS animations - CSS: Cascading Style Sheets
examples note: some older browsers (pre-2017) may need prefixes; the live examples you can click to see in your browser include the -webkit prefixed syntax.
Using feature queries - CSS: Cascading Style Sheets
syntax css feature queries are part of the css conditional rules module, which also contains the media query @media rule; when you use feature queries, you will find they behave in a similar way to media queries.
Subgrid - CSS: Cascading Style Sheets
if you have four lines in your subgrid, to name them all you could use the syntax grid-template-columns: subgrid [line1] [line2] [line3] [line4] lines specified on the subgrid are added to any lines specified on the parent so you can use either or both.
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
.box { border-end-start-radius: 1em; border-end-end-radius: 0; border-start-end-radius: 20px; border-start-start-radius: 40px; } indicating logical values for the 4-value shorthand syntax the specification makes a suggestion for the four-value shorthands such as the margin property, however the final decision on how this should be indicated is as yet unresolved, and is discussed in this issue.
CSS Overflow - CSS: Cascading Style Sheets
working draft changed syntax to allow one or two keywords instead of only one css level 2 (revision 1)the definition of 'overflow' in that specification.
Browser compatibility and Scroll Snap - CSS: Cascading Style Sheets
the main things to note are as follows: the scroll-snap-type-x and scroll-snap-type-y properties have been dropped the scroll-snap-type property has become a longhand, so the old shorthand syntax like scroll-snap-type:mandatory will stop working can i use the old implementation as a fallback?
Using CSS transitions - CSS: Cascading Style Sheets
ration: 2s; transition-delay: 4s; transition-timing-function: ease-in-out; } function updatetransition() { var el = document.queryselector("div.box"); if (el) { el.classname = "box1"; } else { el = document.queryselector("div.box1"); el.classname = "box"; } return el; } var intervalid = window.setinterval(updatetransition, 7000); the shorthand css syntax is written as follows: div { transition: <property> <duration> <timing-function> <delay>; } examples simple example this example performs a four-second font size transition with a two-second delay between the time the user mouses over the element and the beginning of the animation effect: #delay { font-size: 14px; transition-property: font-size; transition-duration: 4s; transitio...
CSS data types - CSS: Cascading Style Sheets
WebCSSCSS Types
in formal syntax, data types are denoted by a keyword placed between the inequality signs "<" and ">".
Child combinator - CSS: Cascading Style Sheets
syntax selector1 > selector2 { style properties } examples css span { background-color: white; } div > span { background-color: dodgerblue; } html <div> <span>span #1, in the div.
Class selectors - CSS: Cascading Style Sheets
/* all elements with class="spacious" */ .spacious { margin: 2em; } /* all <li> elements with class="spacious" */ li.spacious { margin: 2em; } /* all <li> elements with a class list that includes both "spacious" and "elegant" */ /* for example, class="elegant retro spacious" */ li.spacious.elegant { margin: 2em; } syntax .class_name { style properties } note that this is equivalent to the following attribute selector: [class~=class_name] { style properties } examples css .red { color: #f33; } .yellow-bg { background: #ffa; } .fancy { font-weight: bold; text-shadow: 4px 4px 3px #77f; } html <p class="red">this paragraph has red text.</p> <p class="red yellow-bg">this paragraph has red text and a...
Column combinator - CSS: Cascading Style Sheets
/* table cells that belong to the "selected" column */ col.selected || td { background: gray; } syntax column-selector || cell-selector { /* style properties */ } examples html <table border="1"> <colgroup> <col span="2"/> <col class="selected"/> </colgroup> <tbody> <tr> <td>a <td>b <td>c </tr> <tr> <td colspan="2">d</td> <td>e</td> </tr> <tr> <td>f</td> <td colspan="2">g</td> </tr> </tbody> </table> css col.selected || td { background: gray; color: white; font-weight: bold; } result specifications ...
Descendant combinator - CSS: Cascading Style Sheets
syntax selector1 selector2 { /* property declarations */ } examples css li { list-style-type: disc; } li li { list-style-type: circle; } html <ul> <li> <div>item 1</div> <ul> <li>subitem a</li> <li>subitem b</li> </ul> </li> <li> <div>item 2</div> <ul> <li>subitem a</li> <li>subitem b</li> </ul> </li> </ul> result specifications ...
General sibling combinator - CSS: Cascading Style Sheets
/* paragraphs that are siblings of and subsequent to any image */ img ~ p { color: red; } syntax former_element ~ target_element { style properties } examples css p ~ span { color: red; } html <span>this is not red.</span> <p>here is a paragraph.</p> <code>here is some code.</code> <span>and here is a red span!</span> <code>more code...</code> <span>and this is a red span!</span> result specifications specification status comment selectors level 4the definition of 'subsequent-sibling combinator' in that specification.
ID selectors - CSS: Cascading Style Sheets
/* the element with id="demo" */ #demo { border: red 2px solid; } syntax #id_value { style properties } note that syntactically (but not specificity-wise), this is equivalent to the following attribute selector: [id=id_value] { style properties } examples css #identified { background-color: skyblue; } html <div id="identified">this div has a special id on it!</div> <div>this is just a regular div.</div> result specifications specification status comment selectors level 4the definition of 'id selectors' in that specification.
Media queries - CSS: Cascading Style Sheets
reference at-rules @import @media guides using media queries introduces media queries, their syntax, and the operators and media features which are used to construct media query expressions.
Selector list - CSS: Cascading Style Sheets
syntax element, element, element { style properties } examples single line grouping grouping selectors in a single line using a comma-separated lists.
Linear-gradient Generator - CSS: Cascading Style Sheets
+'deg)'; this.axis.style.webkittransform = 'rotate('+ -this.angle +'deg)'; }; gradientaxis.prototype.updategradient = function updategradient() { var p = this.firstpoint; if (p === null) return; this.gradient = p.cssvalue; p = p.nextpoint; while(p) { this.gradient += ', ' + p.cssvalue; p = p.nextpoint; }; axesmanager.updatecssgradient(); }; // this is the standard syntax gradientaxis.prototype.getcssgradient = function getcssgradient() { return 'linear-gradient('+ (-this.angle + 90 | 0) +'deg, ' + this.gradient + ')'; }; /** * axesmanager */ var axesmanager = (function axesmanager() { var lg_axes = []; var activeaxis = null; var activeshortcut = null; var axes_menu = null; var gradient_container = null; var add_axis_btn; var delete_axis_...
Type selectors - CSS: Cascading Style Sheets
*/ a { color: red; } syntax element { style properties } examples css span { background-color: skyblue; } html <span>here's a span with some text.</span> <p>here's a p with some text.</p> <span>here's a span with more text.</span> result specifications specification status comment selectors level 4the definition of 'type (tag name) selector' in that specification.
Universal selectors - CSS: Cascading Style Sheets
/* selects all elements */ * { color: green; } beginning with css3, the asterisk may be used in combination with namespaces: ns|* - matches all elements in namespace ns *|* - matches all elements |* - matches all elements without any declared namespace syntax * { style properties } the asterisk is optional with simple selectors.
<alpha-value> - CSS: Cascading Style Sheets
syntax the value of an <alpha-value> is given as either a <number> or a <percentage>.
<angle-percentage> - CSS: Cascading Style Sheets
syntax refer to the documentation for <angle> and <percentage> for details of the individual syntaxes allowed by this type.
<angle> - CSS: Cascading Style Sheets
WebCSSangle
syntax the <angle> data type consists of a <number> followed by one of the units listed below.
<blend-mode> - CSS: Cascading Style Sheets
syntax the <blend-mode> data type is defined using a keyword value chosen from the list below.
<custom-ident> - CSS: Cascading Style Sheets
syntax the syntax of <custom-ident> is similar to css identifiers (such as property names), except that it is case-sensitive.
<dimension> - CSS: Cascading Style Sheets
WebCSSdimension
syntax the syntax of <dimension> is a <number> immediately followed by a unit which is an identifier.
<display-box> - CSS: Cascading Style Sheets
syntax valid <display-box> values: contents these elements don't produce a specific box by themselves.
<display-internal> - CSS: Cascading Style Sheets
syntax valid <display-internal> values: table-row-group these elements behave like <tbody> html elements.
element() - CSS: Cascading Style Sheets
WebCSSelement
syntax element(id) where: id the id of an element to use as the background, specified using the html attribute #id on the element.
blur() - CSS: Cascading Style Sheets
syntax blur(radius) parameters radius the radius of the blur, specified as a <length>.
brightness() - CSS: Cascading Style Sheets
syntax brightness(amount) parameters amount the brightness of the result, specified as a <number> or a <percentage>.
contrast() - CSS: Cascading Style Sheets
syntax contrast(amount) parameters amount the contrast of the result, specified as a <number> or a <percentage>.
drop-shadow() - CSS: Cascading Style Sheets
syntax drop-shadow(offset-x offset-y blur-radius color) the drop-shadow() function accepts a parameter of type <shadow> (defined in the box-shadow property), with the exception that the inset keyword and spread parameters are not allowed.
grayscale() - CSS: Cascading Style Sheets
syntax grayscale(amount) parameters amount the amount of the conversion, specified as a <number> or a <percentage>.
hue-rotate() - CSS: Cascading Style Sheets
syntax hue-rotate(angle) parameters angle the relative change in hue of the input sample, specified as an <angle>.
invert() - CSS: Cascading Style Sheets
syntax invert(amount) parameters amount the amount of the conversion, specified as a <number> or a <percentage>.
opacity() - CSS: Cascading Style Sheets
syntax opacity(amount) parameters amount the amount of the conversion, specified as a <number> or a <percentage>.
saturate() - CSS: Cascading Style Sheets
syntax saturate(amount) parameters amount the amount of the conversion, specified as a <number> or a <percentage>.
sepia() - CSS: Cascading Style Sheets
syntax sepia(amount) parameters amount the amount of the conversion, specified as a <number> or a <percentage>.
<filter-function> - CSS: Cascading Style Sheets
syntax the <filter-function> data type is specified using one of the filter functions listed below.
fit-content() - CSS: Cascading Style Sheets
syntax the fit-content() function accepts a <length> or a <percentage> as an argument.
<flex> - CSS: Cascading Style Sheets
syntax the <flex> data type is specified as a <number> followed by the unit fr.
<frequency-percentage> - CSS: Cascading Style Sheets
syntax the value of a <frequency-percentage> is either a <frequency> or a <percentage>; see their individual reference pages for details about their syntaxes.
<frequency> - CSS: Cascading Style Sheets
WebCSSfrequency
syntax the <frequency> data type consists of a <number> followed by one of the units listed below.
<gradient> - CSS: Cascading Style Sheets
WebCSSgradient
syntax the <gradient> data type is defined with one of the function types listed below.
ident - CSS: Cascading Style Sheets
WebCSSident
syntax the syntax of <custom-ident> is similar to css identifiers (such as property names), except that it is case-sensitive.
image-set() - CSS: Cascading Style Sheets
WebCSSimage-set
syntax image-set() = image-set( <image-set-option># ) where <image-set-option> = [ <image> | <string> ] <resolution> and <string> is an <url> values most commonly you'll see an url() <string> value, but the <image> can be any image type except for an image set.
<image> - CSS: Cascading Style Sheets
WebCSSimage
syntax the <image> data type can be represented with any of the following: an image denoted by the <url> data type a <gradient> data type a part of the webpage, defined by the element() function an image, image fragment or solid patch of color, defined by the image() function a blending of two or more images defined by the cross-fade() function.
<integer> - CSS: Cascading Style Sheets
WebCSSinteger
syntax the <integer> data type consists of one or several decimal digits, 0 through 9 inclusive, optionally preceded by a single + or - sign.
<length-percentage> - CSS: Cascading Style Sheets
syntax refer to the documentation for <length> and <percentage> for details of the individual syntaxes allowed by this type.
<length> - CSS: Cascading Style Sheets
WebCSSlength
syntax the <length> data type consists of a <number> followed by one of the units listed below.
linear-gradient() - CSS: Cascading Style Sheets
syntax /* a gradient tilted 45 degrees, starting blue and finishing red */ linear-gradient(45deg, blue, red); /* a gradient going from the bottom right to the top left corner, starting blue and finishing red */ linear-gradient(to left top, blue, red); /* color stop: a gradient going from the bottom to top, starting blue, turning green at 40% of its length, and finishing red */ linear-grad...
<number> - CSS: Cascading Style Sheets
WebCSSnumber
syntax the syntax of <number> extends the syntax of <integer>.
paint() - CSS: Cascading Style Sheets
WebCSSpaint
syntax paint(workletname, parameters) where: workletname the name of the registered worklet.
<percentage> - CSS: Cascading Style Sheets
syntax the <percentage> data type consists of a <number> followed by the percentage sign (%).
radial-gradient() - CSS: Cascading Style Sheets
syntax /* a gradient at the center of its container, starting red, changing to blue, and finishing green */ radial-gradient(circle at center, red 0, blue, green 100%) values <position> the position of the gradient, interpreted in the same way as background-position or transform-origin.
<ratio> - CSS: Cascading Style Sheets
WebCSSratio
syntax in media queries level 3, the <ratio> data type consisted of a strictly positive <integer> followed by a forward slash ('/', unicode u+002f solidus) and a second strictly positive <integer>.
repeat() - CSS: Cascading Style Sheets
WebCSSrepeat
[col-start] minmax(100px, 1fr) [col-end]) repeat(auto-fill, 10px [col-start] 30% [col-middle] 400px [col-end]) /* <fixed-repeat> values */ repeat(4, 250px) repeat(4, [col-start] 250px [col-end]) repeat(4, [col-start] 60% [col-end]) repeat(4, [col-start] minmax(100px, 1fr) [col-end]) repeat(4, [col-start] fit-content(200px) [col-end]) repeat(4, 10px [col-start] 30% [col-middle] 400px [col-end]) syntax values <length> a positive integer length.
<resolution> - CSS: Cascading Style Sheets
syntax the <resolution> data type consists of a strictly positive <number> followed by one of the units listed below.
<string> - CSS: Cascading Style Sheets
WebCSSstring
syntax the <string> data type is composed of any number of unicode characters surrounded by either double (") or single (') quotes.
symbols() - CSS: Cascading Style Sheets
WebCSSsymbols
syntax symbols() = symbols( <symbols-type>?
<time-percentage> - CSS: Cascading Style Sheets
syntax refer to the documentation for <time> and <percentage> for details of the individual syntaxes allowed by this type.
<time> - CSS: Cascading Style Sheets
WebCSStime
syntax the <time> data type consists of a​ ​​​​​​<number> followed by one of the units listed below.
matrix() - CSS: Cascading Style Sheets
syntax the matrix() function is specified with six values.
matrix3d() - CSS: Cascading Style Sheets
syntax the matrix3d() function is specified with 16 values.
perspective() - CSS: Cascading Style Sheets
syntax the perspective distance used by perspective() is specified by a <length> value, which represents the distance between the user and the z=0 plane.
rotate() - CSS: Cascading Style Sheets
syntax the amount of rotation created by rotate() is specified by an <angle>.
rotate3d() - CSS: Cascading Style Sheets
syntax the amount of rotation created by rotate3d() is specified by three <number>s and one <angle>.
rotateX() - CSS: Cascading Style Sheets
syntax the amount of rotation created by rotatex() is specified by an <angle>.
rotateY() - CSS: Cascading Style Sheets
syntax the amount of rotation created by rotatey() is specified by an <angle>.
rotateZ() - CSS: Cascading Style Sheets
syntax the amount of rotation created by rotatez() is specified by an <angle>.
scale() - CSS: Cascading Style Sheets
syntax the scale() function is specified with either one or two values, which represent the amount of scaling to be applied in each direction.
scale3d() - CSS: Cascading Style Sheets
syntax the scale3d() function is specified with three values, which represent the amount of scaling to be applied in each direction.
scaleX() - CSS: Cascading Style Sheets
syntax scalex(s) values s is a <number> representing the scaling factor to apply on the abscissa of each point of the element.
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.
scaleZ() - CSS: Cascading Style Sheets
syntax scalez(s) values s is a <number> representing the scaling factor to apply on the z-coordinate of each point of the element.
skew() - CSS: Cascading Style Sheets
syntax the skew() function is specified with either one or two values, which represent the amount of skewing to be applied in each direction.
skewX() - CSS: Cascading Style Sheets
syntax skewx(a) values a is an <angle> representing the angle to use to distort the element along the abscissa.
skewY() - CSS: Cascading Style Sheets
syntax skewy(a) values a is an <angle> representing the angle to use to distort the element along the ordinate.
translate3d() - CSS: Cascading Style Sheets
syntax translate3d(tx, ty, tz) values tx is a <length> or <percentage> representing the abscissa of the translating vector.
translateZ() - CSS: Cascading Style Sheets
syntax translatez(tz) values tz a <length> representing the z-component of the translating vector.
<transform-function> - CSS: Cascading Style Sheets
syntax the <transform-function> data type is specified using one of the transformation functions listed below.
<url> - CSS: Cascading Style Sheets
WebCSSurl
syntax the <url> data type is specified using the url() functional notation.
exsl:node-set() - EXSLT
WebEXSLTexslnode-set
syntax exsl:node-set(object) parameters object the object for which to return the corresponding node-set.
exsl:object-type() - EXSLT
syntax exsl:object-type(object) parameters object the object whose type is to be returned.
math:highest() - EXSLT
WebEXSLTmathhighest
syntax math:highest(nodeset) parameters nodeset the node-set whose highest value is to be returned.
math:lowest() - EXSLT
WebEXSLTmathlowest
syntax math:lowest(nodeset) parameters nodeset the node-set whose lowest value is to be returned.
math:max() - EXSLT
WebEXSLTmathmax
syntax math:max(nodeset) parameters nodeset the node-set whose highest value is to be returned.
math:min() - EXSLT
WebEXSLTmathmin
note: syntax math:min(nodeset) parameters nodeset the node-set whose lowest value is to be returned.
regexp:match() - EXSLT
WebEXSLTregexpmatch
syntax regexp:match(targetstring, regexpstring[, flagsstring]) parameters targetstring the string to perform regular expression matching upon.
regexp:replace() - EXSLT
WebEXSLTregexpreplace
syntax regexp:replace(originalstring, regexpstring, flagsstring, replacestring) parameters originalstring the string perform a search-and-replace operation upon.
regexp:test() - EXSLT
WebEXSLTregexptest
syntax regexp:test(teststring, regexpstring[, flagsstring]) parameters teststring the string to test..
set:difference() - EXSLT
WebEXSLTsetdifference
syntax set:difference(nodeset1, nodeset2) parameters nodeset1 the node-set from which to subtract nodes.
set:distinct() - EXSLT
WebEXSLTsetdistinct
syntax set:distinct(nodeset) parameters nodeset the node-set in which to find unique nodes.
set:has-same-node() - EXSLT
syntax set:has-same-node(nodeset1, nodeset2) parameters nodeset1 the first node set to check.
set:intersection() - EXSLT
syntax set:intersection(nodeset1, nodeset2) arguments nodeset1 the first node-set.
set:leading() - EXSLT
WebEXSLTsetleading
syntax set:leading(nodeset1, nodeset2) parameters nodeset1 the node set to find nodes in that precede the first node in the second node set.
set:trailing() - EXSLT
WebEXSLTsettrailing
syntax set:trailing(nodeset1, nodeset2) parameters nodeset1 the node set to find nodes in that follow the first node in the second node set.
str:concat() - EXSLT
WebEXSLTstrconcat
syntax str:concat(nodeset) parameters nodeset the node-set whose nodes' string values should be concatenated into one string.
str:split() - EXSLT
WebEXSLTstrsplit
syntax str:split(string, pattern) parameters string the string to split.
str:tokenize() - EXSLT
WebEXSLTstrtokenize
syntax str:tokenize(string, delimiters) parameters string the string to tokenize.
Ajax - Developer guides
WebGuideAJAX
xpath xpath stands for xml path language, it uses a non-xml syntax that provides a flexible way of addressing (pointing to) different parts of an xml document.
Audio and Video Delivery - Developer guides
a time range is specified using the syntax: #t=[starttime][,endtime] the time can be specified as a number of seconds (as a floating-point value) or as an hours/minutes/seconds time separated with colons (such as 2:05:01 for 2 hours, 5 minutes, and 1 second).
Writing forward-compatible websites - Developer guides
you can't assume that the syntax of the final version will be the same as the syntax of any of the prefixed versions.
<a>: The Anchor element - HTML: Hypertext Markup Language
WebHTMLElementa
see rfc 3966 for syntax, additional features, and other details about the tel: url scheme.
<big>: The Bigger Text element - HTML: Hypertext Markup Language
WebHTMLElementbig
examples here we see examples showing the use of <big> followed by an example showing how to accomplish the same results using modern css syntax instead.
<content>: The Shadow DOM Content Placeholder element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementcontent
these have the same syntax as css selectors.
<input type="color"> - HTML: Hypertext Markup Language
WebHTMLElementinputcolor
in particular, you can't use css's standardized color names, or any css function syntax, to set the value.
<input type="email"> - HTML: Hypertext Markup Language
WebHTMLElementinputemail
or empty events change and input supported common attributes autocomplete, list, maxlength, minlength, multiple, name,pattern, placeholder, readonly, required, size, and type idl attributes list and value methods select() value the <input> element's value attribute contains a domstring which is automatically validated as conforming to e-mail syntax.
<input type="password"> - HTML: Hypertext Markup Language
WebHTMLElementinputpassword
<label for="userpassword">password: </label> <input id="userpassword" type="password" required> <input type="submit" value="submit"> specifying an input mode if your recommended (or required) password syntax rules would benefit from an alternate text entry interface than the standard keyboard, you can use the inputmode attribute to request a specific one.
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
additional attributes in addition to the attributes common to all <input> elements, time inputs offer the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options max the latest time to accept, in the syntax described under time value format min the earliest time to accept as a valid input readonly a boolean attribute which, if present, indicates that the contents of the time input should not be user-editable step the stepping interval to use both for user interfaces purposes and during constraint validation unlike many data types, time values have a periodi...
<kbd>: The Keyboard Input element - HTML: Hypertext Markup Language
WebHTMLElementkbd
<p>if a syntax error occurs, the tool will output the initial command you typed for your review:</p> <blockquote> <samp><kbd>custom-git ad my-new-file.cpp</kbd></samp> </blockquote> representing onscreen input options nesting a <samp> element inside a <kbd> element represents input which is based on text presented by the system, such as the names of menus and menu items, or the names of buttons displayed ...
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
examples including a stylesheet to include a stylesheet in a page, use the following syntax: <link href="style.css" rel="stylesheet"> providing alternative stylesheets you can also specify alternative style sheets.
<mark>: The Mark Text element - HTML: Hypertext Markup Language
WebHTMLElementmark
don't use <mark> for syntax highlighting purposes; instead, use the <span> element with appropriate css applied to it.
lang - HTML: Hypertext Markup Language
language tag syntax the full bcp47 syntax is in-depth enough to mark extremely specific language dialects, but most usage is much simpler.
x-ms-acceleratorkey - HTML: Hypertext Markup Language
syntax <button x-ms-acceleratorkey="[explanation of key combination]">…</button> value the accelerator key combination.
x-ms-format-detection - HTML: Hypertext Markup Language
syntax <html x-ms-format-detection="none"> value all all supported data formats are detected.
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
microformats2 is an update to microformats that provides a simpler way of annotating html structured syntax & vocabularies than previous approaches of using rdfa and microdata which require learning new attributes.
Using the application cache - HTML: Hypertext Markup Language
all resources served using this mime type must follow the syntax for an application cache manifest, as defined in this section.
HTML: Hypertext Markup Language
WebHTML
introduction to html this module sets the stage, getting you used to important concepts and syntax such as looking at applying html to text, how to create hyperlinks, and how to use html to structure a web page.
HTTP authentication - HTTP
the syntax for these headers is the following: www-authenticate: <type> realm=<realm> proxy-authenticate: <type> realm=<realm> here, <type> is the authentication scheme ("basic" is the most common scheme and introduced below).
MIME types (IANA media types) - HTTP
the syntax of different formats allows file-type inference by looking at their byte structure.
Resource URLs - HTTP
syntax resource urls are composed of two parts: a prefix (resource:), and a url pointing to the resource you want to load: resource://<url> an example: resource://gre/res/svg.css when arrows are found in the resource url's ('->'), it means that the first file loaded the next one: resource://<file-loader> -> <file-loaded> please refer to identifying resources on the web for more general details.
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
access-control-allow-origin a returned resource may have one access-control-allow-origin header, with the following syntax: access-control-allow-origin: <origin> | * access-control-allow-origin specifies either a single origin, which tells browsers to allow that origin to access the resource; or else — for requests without credentials — the "*" wildcard, to tell browsers to allow any origin to access the resource.
Content Security Policy (CSP) - HTTP
WebHTTPCSP
violation report syntax the report json object contains the following data: blocked-uri the uri of the resource that was blocked from loading by the content security policy.
Feature Policy - HTTP
types of policy-controlled features though feature policy provides control of multiple features using a consistent syntax, the behavior of policy controlled features varies and depends on several factors.
Accept-CH-Lifetime - HTTP
syntax accept-ch-lifetime: <age> examples accept-ch: viewport-width, dpr accept-ch-lifetime: 86400 ...
Accept-CH - HTTP
syntax accept-ch: <list of client hints> examples accept-ch: dpr, viewport-width accept-ch: width accept-ch-lifetime: 86400 vary: dpr, viewport-width, width note: remember to vary the response based on the accepted client hints.
Accept-Charset - HTTP
header type request header forbidden header name yes syntax accept-charset: <charset> // multiple types, weighted with the quality value syntax: accept-charset: utf-8, iso-8859-1;q=0.5 directives <charset> a character encoding name, like utf-8 or iso-8859-15.
Accept-Encoding - HTTP
header type request header forbidden header name yes syntax accept-encoding: gzip accept-encoding: compress accept-encoding: deflate accept-encoding: br accept-encoding: identity accept-encoding: * // multiple algorithms, weighted with the quality value syntax: accept-encoding: deflate, gzip;q=1.0, *;q=0.5 directives gzip a compression format using the lempel-ziv coding (lz77), with a 32-bit crc.
Accept-Language - HTTP
syntax accept-language: <language> accept-language: * // multiple types, weighted with the quality value syntax: accept-language: fr-ch, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5 directives <language> a language tag (which is sometimes referred to as a "locale identifier").
Accept-Patch - HTTP
header type response header forbidden header name yes syntax accept-patch: application/example, text/example accept-patch: text/example;charset=utf-8 accept-patch: application/merge-patch+json directives none examples accept-patch: application/example, text/example accept-patch: text/example;charset=utf-8 accept-patch: application/merge-patch+json specifications specification title rfc 5789, section 3.1: accept-patch http...
Accept-Ranges - HTTP
header type response header forbidden header name no syntax accept-ranges: <range-unit> accept-ranges: none directives <range-unit> defines the range unit the server supports.
Accept - HTTP
WebHTTPHeadersAccept
syntax accept: <mime_type>/<mime_subtype> accept: <mime_type>/* accept: */* // multiple types, weighted with the quality value syntax: accept: text/html, application/xhtml+xml, application/xml;q=0.9, image/webp, */*;q=0.8 directives <mime_type>/<mime_subtype> a single, precise mime type, like text/html.
Access-Control-Allow-Credentials - HTTP
header type response header forbidden header name no syntax access-control-allow-credentials: true directives true the only valid value for this header is true (case-sensitive).
Access-Control-Allow-Headers - HTTP
header type response header forbidden header name no syntax access-control-allow-headers: <header-name>[, <header-name>]* access-control-allow-headers: * directives <header-name> the name of a supported request header.
Access-Control-Allow-Methods - HTTP
header type response header forbidden header name no syntax access-control-allow-methods: <method>, <method>, ...
Access-Control-Allow-Origin - HTTP
header type response header forbidden header name no syntax access-control-allow-origin: * access-control-allow-origin: <origin> access-control-allow-origin: null directives * for requests without credentials, the literal value "*" can be specified, as a wildcard; the value tells browsers to allow requesting code from any origin to access the resource.
Access-Control-Expose-Headers - HTTP
header type response header forbidden header name no syntax access-control-expose-headers: <header-name>, <header-name>, ...
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.
Access-Control-Request-Headers - HTTP
header type request header forbidden header name yes syntax access-control-request-headers: <header-name>, <header-name>, ...
Access-Control-Request-Method - HTTP
header type request header forbidden header name yes syntax access-control-request-method: <method> directives <method> one of the http request methods, for example get, post, or delete.
Age - HTTP
WebHTTPHeadersAge
header type response header forbidden header name no syntax age: <delta-seconds> directives <delta-seconds> a non-negative integer, representing time in seconds the object has been in a proxy cache.
Allow - HTTP
WebHTTPHeadersAllow
header type entity header forbidden header name no syntax allow: <http-methods> directives <http-methods> the comma-separated list of allowed http request methods.
Alt-Svc - HTTP
WebHTTPHeadersAlt-Svc
syntax alt-svc: clear alt-svc: <protocol-id>=<alt-authority>; ma=<max-age> alt-svc: <protocol-id>=<alt-authority>; ma=<max-age>; persist=1 clear the special value ''clear" indicates that the origin requests all alternatives for that origin to be invalidated.
Authorization - HTTP
header type request header forbidden header name no syntax authorization: <type> <credentials> directives <type> authentication type.
Cache-Control - HTTP
header type general header forbidden header name no cors-safelisted response header yes syntax caching directives have the following rules to be valid: case-insensitive, but lowercase is recommended.
Clear-Site-Data - HTTP
header type response header forbidden header name no syntax the clear-site-data header accepts one or more directives.
Connection - HTTP
header type general header forbidden header name yes syntax connection: keep-alive connection: close directives close indicates that either the client or the server would like to close the connection.
Content-Encoding - HTTP
header type entity header forbidden header name no syntax content-encoding: gzip content-encoding: compress content-encoding: deflate content-encoding: identity content-encoding: br // multiple, in the order in which they were applied content-encoding: gzip, identity content-encoding: deflate, gzip directives gzip a format using the lempel-ziv coding (lz77), with a 32-bit crc.
Content-Language - HTTP
syntax content-language: de-de content-language: en-us content-language: de-de, en-ca directives language-tag multiple language tags are separated by comma.
Content-Location - HTTP
header type entity header forbidden header name no syntax content-location: <url> directives <url> a relative (to the request url) or absolute url.
Content-Range - HTTP
header type response header forbidden header name no cors-safelisted response-header no syntax content-range: <unit> <range-start>-<range-end>/<size> content-range: <unit> <range-start>-<range-end>/* content-range: <unit> */<size> directives <unit> the unit in which ranges are specified.
CSP: base-uri - HTTP
syntax one or more sources can be allowed for the base-uri policy: content-security-policy: 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...
CSP: block-all-mixed-content - HTTP
syntax content-security-policy: block-all-mixed-content; examples content-security-policy: block-all-mixed-content; <meta http-equiv="content-security-policy" content="block-all-mixed-content"> to disallow http assets on a more granular level, you can also set individual directives to https:.
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.
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.
CSP: default-src - HTTP
lowing directives that are absent, the user agent looks for the default-src directive and uses this value for it: child-src connect-src font-src frame-src img-src manifest-src media-src object-src prefetch-src script-src script-src-elem script-src-attr style-src style-src-elem style-src-attr worker-src 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.
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.
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.
CSP: frame-ancestors - HTTP
syntax one or more sources can be set for the frame-ancestors policy: content-security-policy: frame-ancestors <source>; content-security-policy: frame-ancestors <source> <source>; sources <source> can be one of the following: the frame-ancestors directive’s syntax is similar to a source list of other directives (e.g.
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.
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.
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.
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.
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.
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.
CSP: plugin-types - HTTP
syntax one or more mime types can be set for the plugin-types policy: content-security-policy: plugin-types <type>/<subtype>; content-security-policy: plugin-types <type>/<subtype> <type>/<subtype>; <type>/<subtype> a valid mime type.
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.
CSP: referrer - HTTP
syntax content-security-policy: referrer <referrer-policy>; where <referrer-policy> can be one of the following values: "no-referrer" the referer header will be omitted entirely.
CSP: report-to - HTTP
syntax content-security-policy: report-to <json-field-value>; examples see content-security-policy-report-only for more information and examples.
CSP: report-uri - HTTP
syntax content-security-policy: report-uri <uri>; content-security-policy: report-uri <uri> <uri>; <uri> a uri where to post the report to.
CSP: require-sri-for - HTTP
syntax content-security-policy: require-sri-for script; content-security-policy: require-sri-for style; content-security-policy: require-sri-for script style; script requires sri for scripts.
CSP: sandbox - HTTP
syntax content-security-policy: sandbox; content-security-policy: sandbox <value>; where <value> can optionally be one of the following values: allow-downloads-without-user-activation allows for downloads to occur without a gesture from the user.
CSP: script-src-attr - HTTP
syntax one or more sources can be allowed for the script-src-attr policy: content-security-policy: 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-...
CSP: script-src-elem - HTTP
syntax one or more sources can be allowed for the script-src-elem policy: content-security-policy: 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-...
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.
CSP: style-src-attr - HTTP
syntax one or more sources can be allowed for the style-src-attr policy: content-security-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> ...
CSP: style-src-elem - HTTP
syntax one or more sources can be allowed for the style-src-elem policy: content-security-policy: 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-sourc...
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.
CSP: trusted-types - HTTP
syntax content-security-policy: trusted-types; content-security-policy: trusted-types <policyname>; content-security-policy: trusted-types <policyname> <policyname> 'allow-duplicates'; <domstring> any string can be a trusted type policy name.
CSP: upgrade-insecure-requests - HTTP
syntax content-security-policy: upgrade-insecure-requests; examples // header content-security-policy: upgrade-insecure-requests; // meta tag <meta http-equiv="content-security-policy" content="upgrade-insecure-requests"> with the above header set on a domain example.com that wants to migrate from http to https, non-navigational insecure resource requests are automatically upgraded (first-party as...
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.
Content-Security-Policy - HTTP
header type response header forbidden header name no syntax content-security-policy: <policy-directive>; <policy-directive> where <policy-directive> consists of: <directive> <value> with no internal punctuation.
Content-Type - HTTP
syntax content-type: text/html; charset=utf-8 content-type: multipart/form-data; boundary=something directives media-type the mime type of the resource or the data.
Cookie - HTTP
WebHTTPHeadersCookie
header type request header forbidden header name yes syntax cookie: <cookie-list> cookie: name=value cookie: name=value; name2=value2; name3=value3 <cookie-list> a list of name-value pairs in the form of <cookie-name>=<cookie-value>.
Cross-Origin-Embedder-Policy - HTTP
header type response header forbidden header name no syntax cross-origin-embedder-policy: unsafe-none | require-corp directives unsafe-none this is the default value.
Cross-Origin-Opener-Policy - HTTP
header type response header forbidden header name no syntax cross-origin-opener-policy: unsafe-none | same-origin-allow-popups | same-origin directives unsafe-none this is the default value.
Cross-Origin-Resource-Policy - HTTP
header type response header forbidden header name no syntax cross-origin-resource-policy: same-site | same-origin | cross-origin examples the response header below will cause compatible user agents to disallow cross-origin no-cors requests: cross-origin-resource-policy: same-origin for more examples, see https://resourcepolicy.fyi/.
DNT - HTTP
WebHTTPHeadersDNT
header type request header forbidden header name yes syntax dnt: 0 dnt: 1 dnt: null directives 0 the user prefers to allow tracking on the target site.
DPR - HTTP
WebHTTPHeadersDPR
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.
Date - HTTP
WebHTTPHeadersDate
note that date is listed in the forbidden header names in the fetch spec - so this code will not send date header: fetch('https://httpbin.org/get', { 'headers': { 'date': (new date()).toutcstring() } }) header type general header forbidden header name yes syntax date: <day-name>, <day> <month> <year> <hour>:<minute>:<second> gmt directives <day-name> one of "mon", "tue", "wed", "thu", "fri", "sat", or "sun" (case-sensitive).
Device-Memory - HTTP
syntax the amount of device ram can be used as a fingerprinting variable, so values for the header are intentionally coarse to reduce the potential for its misuse.
Digest - HTTP
WebHTTPHeadersDigest
header type response header forbidden header name no syntax digest: <digest-algorithm>=<digest-value> digest: <digest-algorithm>=<digest-value>,<digest-algorithm>=<digest-value> directives <digest-algorithm> supported digest algorithms are defined in rfc 3230 and rfc 5843, and include sha-256 and sha-512.
ETag - HTTP
WebHTTPHeadersETag
header type response header forbidden header name no syntax etag: w/"<etag_value>" etag: "<etag_value>" directives w/ optional 'w/' (case-sensitive) indicates that a weak validator is used.
Early-Data - HTTP
header type request header forbidden header name no syntax early-data: 1 examples get /resource http/1.0 host: example.com early-data: 1 specifications specification title rfc 8470, section 5.1: the early-data header field using early data in http ...
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.
Expect - HTTP
WebHTTPHeadersExpect
header type request header forbidden header name yes syntax no other expectations except "100-continue" are specified currently.
Expires - HTTP
WebHTTPHeadersExpires
header type response header forbidden header name no cors-safelisted response header yes syntax expires: <http-date> directives <http-date> an http-date timestamp.
Feature-Policy: accelerometer - HTTP
syntax feature-policy: accelerometer <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: ambient-light-sensor - HTTP
syntax feature-policy: ambient-light-sensor <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: autoplay - HTTP
syntax feature-policy: autoplay <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: battery - HTTP
syntax feature-policy: battery <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: camera - HTTP
syntax feature-policy: camera <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: display-capture - HTTP
syntax feature-policy: display-capture <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: document-domain - HTTP
syntax feature-policy: document-domain <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: encrypted-media - HTTP
syntax feature-policy: encrypted-media <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: fullscreen - HTTP
syntax feature-policy: fullscreen <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: geolocation - HTTP
syntax feature-policy: geolocation <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: gyroscope - HTTP
syntax feature-policy: gyroscope <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: layout-animations - HTTP
syntax feature-policy: layout-animations <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: legacy-image-formats - HTTP
syntax feature-policy: legacy-image-formats <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: magnetometer - HTTP
syntax feature-policy: magnetometer <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: microphone - HTTP
syntax feature-policy: microphone <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: midi - HTTP
syntax feature-policy: midi <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: oversized-images - HTTP
syntax feature-policy: oversized-images <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: picture-in-picture - HTTP
syntax feature-policy: picture-in-picture <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: publickey-credentials-get - HTTP
syntax feature-policy: publickey-credentials-get <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: screen-wake-lock - HTTP
syntax feature-policy: screen-wake-lock <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: sync-xhr - HTTP
syntax feature-policy: sync-xhr <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: unoptimized-images - HTTP
syntax feature-policy: unoptimized-images <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: unsized-media - HTTP
syntax feature-policy: unsized-media <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: usb - HTTP
syntax feature-policy: usb <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: vibrate - HTTP
syntax feature-policy: vibrate <allowlist>; <vibrate> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: wake-lock - HTTP
syntax feature-policy: wake-lock <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
web-share - HTTP
syntax feature-policy: web-share <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy: xr-spatial-tracking - HTTP
syntax feature-policy: xr-spatial-tracking <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
Feature-Policy - HTTP
header type response header forbidden header name yes syntax feature-policy: <directive> <allowlist> <directive> the feature policy directive to apply the allowlist to.
Forwarded - HTTP
header type request header forbidden header name no syntax forwarded: by=<identifier>;for=<identifier>;host=<host>;proto=<http|https> directives <identifier> an identifier disclosing the information that is altered or lost when using a proxy.
From - HTTP
WebHTTPHeadersFrom
header type request header forbidden header name no syntax from: <email> directives <email> a machine-usable email address.
If-Match - HTTP
WebHTTPHeadersIf-Match
header type request header forbidden header name no syntax if-match: <etag_value> if-match: <etag_value>, <etag_value>, … directives <etag_value> entity tags uniquely representing the requested resources.
If-Modified-Since - HTTP
header type request header forbidden header name no syntax if-modified-since: <day-name>, <day> <month> <year> <hour>:<minute>:<second> gmt directives <day-name> one of "mon", "tue", "wed", "thu", "fri", "sat", or "sun" (case-sensitive).
If-None-Match - HTTP
header type request header forbidden header name no syntax if-none-match: "<etag_value>" if-none-match: "<etag_value>", "<etag_value>", … if-none-match: * directives <etag_value> entity tags uniquely representing the requested resources.
If-Range - HTTP
WebHTTPHeadersIf-Range
header type request header forbidden header name no syntax if-range: <day-name>, <day> <month> <year> <hour>:<minute>:<second> gmt if-range: <etag> directives <etag> an entity tag uniquely representing the requested resource.
If-Unmodified-Since - HTTP
header type request header forbidden header name no syntax if-unmodified-since: <day-name>, <day> <month> <year> <hour>:<minute>:<second> gmt directives <day-name> one of "mon", "tue", "wed", "thu", "fri", "sat", or "sun" (case-sensitive).
Large-Allocation - HTTP
header type response header forbidden header name no syntax large-allocation: 0 large-allocation: <megabytes> directives 0 0 is a special value which represents uncertainty as to what the size of the allocation is.
Last-Modified - HTTP
header type response header forbidden header name no cors-safelisted response header yes syntax last-modified: <day-name>, <day> <month> <year> <hour>:<minute>:<second> gmt directives <day-name> one of "mon", "tue", "wed", "thu", "fri", "sat", or "sun" (case-sensitive).
Link - HTTP
WebHTTPHeadersLink
syntax link: < uri-reference >; param1=value1; param2="value2" <uri-reference> the uri reference, must be enclosed between < and >.
Location - HTTP
WebHTTPHeadersLocation
header type response header forbidden header name no syntax location: <url> directives <url> a relative (to the request url) or absolute url.
NEL - HTTP
WebHTTPHeadersNEL
header type response header forbidden header name no syntax nel: { "report_to": "name_of_reporting_group", "max_age": 12345, "include_subdomains": false, "success_fraction": 0.0, "failure_fraction": 1.0 } specifications specification network error logging ...
Origin - HTTP
WebHTTPHeadersOrigin
header type request header forbidden header name yes syntax origin: null origin: <scheme> "://" <hostname> [ ":" <port> ] directives <scheme> the protocol that is used.
Pragma - HTTP
WebHTTPHeadersPragma
forbidden header name no cors-safelisted response header yes syntax pragma: no-cache directives no-cache same as cache-control: no-cache.
Proxy-Authenticate - HTTP
header type response header forbidden header name no syntax proxy-authenticate: <type> realm=<realm> directives <type> authentication type.
Proxy-Authorization - HTTP
header type request header forbidden header name no syntax proxy-authorization: <type> <credentials> directives <type> authentication type.
Public-Key-Pins-Report-Only - HTTP
header type response header forbidden header name no syntax public-key-pins-report-only: pin-sha256="<pin-value>"; max-age=<expire-time>; includesubdomains; report-uri="<uri>" directives pin-sha256="<pin-value>" the quoted string is the base64 encoded subject public key information (spki) fingerprint.
Public-Key-Pins - HTTP
header type response header forbidden header name no syntax public-key-pins: pin-sha256="<pin-value>"; max-age=<expire-time>; includesubdomains; report-uri="<uri>" directives pin-sha256="<pin-value>" the quoted string is the base64 encoded subject public key information (spki) fingerprint.
Range - HTTP
WebHTTPHeadersRange
header type request header forbidden header name no syntax range: <unit>=<range-start>- range: <unit>=<range-start>-<range-end> range: <unit>=<range-start>-<range-end>, <range-start>-<range-end> range: <unit>=<range-start>-<range-end>, <range-start>-<range-end>, <range-start>-<range-end> range: <unit>=-<suffix-length> directives <unit> the unit in which ranges are specified.
Referer - HTTP
WebHTTPHeadersReferer
header type request header forbidden header name yes syntax referer: <url> directives <url> an absolute or partial address of the previous web page from which a link to the currently requested page was followed.
Referrer-Policy - HTTP
header type response header forbidden header name no syntax the original header name referer is a misspelling of the word "referrer".
Retry-After - HTTP
header type response header forbidden header name no syntax retry-after: <http-date> retry-after: <delay-seconds> directives <http-date> a date after which to retry.
Save-Data - HTTP
syntax save-data: <sd-token> directives <sd-token> a numerical value indicating whether the client wants to opt in to reduced data usage mode.
Sec-Fetch-Dest - HTTP
header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted request header syntax sec-fetch-dest: audio sec-fetch-dest: audioworklet sec-fetch-dest: document sec-fetch-dest: embed sec-fetch-dest: empty sec-fetch-dest: font sec-fetch-dest: image sec-fetch-dest: manifest sec-fetch-dest: nested-document sec-fetch-dest: object sec-fetch-dest: paintworklet sec-fetch-dest: report sec-fetch-dest: script sec-fetch-dest: serviceworker sec-fetch-dest: sharedworker sec-fetch-dest: style sec-fetch-dest: track sec-fetch-dest: video sec-fetch-dest: worker sec-fetch-dest: xslt sec-fetch-dest: a...
Sec-Fetch-Mode - HTTP
header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted request header syntax sec-fetch-mode: cors sec-fetch-mode: navigate sec-fetch-mode: nested-navigate sec-fetch-mode: no-cors sec-fetch-mode: same-origin sec-fetch-mode: websocket values cors navigate nested-navigate no-cors same-origin websocket examples todo specifications specification title fetch metadata request headers the sec-fetch-mode http request header ...
Sec-Fetch-Site - HTTP
header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted response header cors-safelisted request header syntax sec-fetch-site: cross-site sec-fetch-site: same-origin sec-fetch-site: same-site sec-fetch-site: none values cross-site same-origin same-site none this request does not relate to any context like site, origin, or frame.
Sec-Fetch-User - HTTP
header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted request header syntax sec-fetch-user: ?0 sec-fetch-user: ?1 values the value is a boolean structured header.
Sec-WebSocket-Accept - HTTP
header type response header forbidden header name no syntax sec-websocket-accept: <hashed key> directives <hashed key> the server takes the value of the sec-websocket-key sent in the handshake request, appends 258eafa5-e914-47da-95ca-c5ab0dc85b11, takes sha-1 of the new value, and is then base64 encoded.
Server-Timing - HTTP
header type response header forbidden header name no syntax the syntax of the server-timing header allows you to communicate metrics in different ways: server metric name only, metric with value, metric with value and description, and metric with description.
Server - HTTP
WebHTTPHeadersServer
header type response header forbidden header name no syntax server: <product> directives <product> the name of the software or product that handled the request.
Set-Cookie - HTTP
header type response header forbidden header name no forbidden response-header name yes syntax set-cookie: <cookie-name>=<cookie-value> set-cookie: <cookie-name>=<cookie-value>; expires=<date> set-cookie: <cookie-name>=<cookie-value>; max-age=<non-zero-digit> set-cookie: <cookie-name>=<cookie-value>; domain=<domain-value> set-cookie: <cookie-name>=<cookie-value>; path=<path-value> set-cookie: <cookie-name>=<cookie-value>; secure set-cookie: <cookie-name>=<cookie-value>; httponly set-cook...
Set-Cookie2 - HTTP
header type response header forbidden header name no syntax set-cookie2: <cookie-name>=<cookie-value> set-cookie2: <cookie-name>=<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-coo...
SourceMap - HTTP
header type response header forbidden header name no syntax sourcemap: <url> x-sourcemap: <url> (deprecated) directives <url> a relative (to the request url) or absolute url pointing to a source map file.
Strict-Transport-Security - HTTP
header type response header forbidden header name no syntax strict-transport-security: max-age=<expire-time> strict-transport-security: max-age=<expire-time>; includesubdomains strict-transport-security: max-age=<expire-time>; preload directives max-age=<expire-time> the time, in seconds, that the browser should remember that a site is only to be accessed using https.
Timing-Allow-Origin - HTTP
header type response header forbidden header name no syntax timing-allow-origin: * timing-allow-origin: <origin>[, <origin>]* directives * the server may specify "*" as a wildcard, thereby allowing any origin to see timing resources.
Tk - HTTP
WebHTTPHeadersTk
header type response header forbidden header name no syntax tk: !
Upgrade-Insecure-Requests - HTTP
header type request header forbidden header name no syntax upgrade-insecure-requests: 1 examples a client's request signals to the server that it supports the upgrade mechanisms of upgrade-insecure-requests: get / http/1.1 host: example.com upgrade-insecure-requests: 1 the server can now redirect to a secure version of the site.
User-Agent - HTTP
header type request header forbidden header name no syntax user-agent: <product> / <product-version> <comment> common format for web browsers: user-agent: mozilla/5.0 (<system-information>) <platform> (<platform-details>) <extensions> directives <product> a product identifier — its name or development codename.
Vary - HTTP
WebHTTPHeadersVary
header type response header forbidden header name no syntax vary: * vary: <header-name>, <header-name>, ...
WWW-Authenticate - HTTP
header type response header forbidden header name no syntax www-authenticate: <type> realm=<realm>[, charset="utf-8"] directives <type> authentication type.
Want-Digest - HTTP
header type general header forbidden header name no syntax want-digest: <digest-algorithm> // multiple algorithms, weighted with the quality value syntax: want-digest: <digest-algorithm><q-value>,<digest-algorithm><q-value> directives <digest-algorithm> supported digest algorithms are defined in rfc 3230 and rfc 5843, and include sha-256 and sha-512.
Warning - HTTP
WebHTTPHeadersWarning
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.
X-Content-Type-Options - HTTP
header type response header forbidden header name no syntax x-content-type-options: nosniff directives nosniff blocks a request if the request destination is of type: "style" and the mime type is not text/css, or "script" and the mime type is not a javascript mime type enables cross-origin read blocking (corb) protection for the mime-types: text/html text/plain text/json, application/json or any other type with a json extension...
X-DNS-Prefetch-Control - HTTP
header type response header forbidden header name no syntax x-dns-prefetch-control: on x-dns-prefetch-control: off directives on enables dns prefetching.
X-Forwarded-For - HTTP
header type request header forbidden header name no syntax x-forwarded-for: <client>, <proxy1>, <proxy2> directives <client> the client ip address <proxy1>, <proxy2> if a request goes through multiple proxies, the ip addresses of each successive proxy is listed.
X-Forwarded-Host - HTTP
header type request header forbidden header name no syntax x-forwarded-host: <host> directives <host> the domain name of the forwarded server.
X-Forwarded-Proto - HTTP
header type request header forbidden header name no syntax x-forwarded-proto: <protocol> directives <protocol> the forwarded protocol (http or https).
X-Frame-Options - HTTP
header type response header forbidden header name no syntax there are two possible directives for x-frame-options: x-frame-options: deny x-frame-options: sameorigin directives if you specify deny, not only will attempts to load the page in a frame fail when loaded from other sites, attempts to do so will fail when loaded from the same site.
X-XSS-Protection - HTTP
header type response header forbidden header name no syntax x-xss-protection: 0 x-xss-protection: 1 x-xss-protection: 1; mode=block x-xss-protection: 1; report=<reporting-uri> 0 disables xss filtering.
HTTP Messages - HTTP
WebHTTPMessages
the http/2 framing mechanism adds a new intermediate layer between the http/1.x syntax and the underlying transport protocol, without fundamentally modifying it: building upon proven mechanisms.
CONNECT - HTTP
WebHTTPMethodsCONNECT
request has body no successful response has body yes safe no idempotent no cacheable no allowed in html forms no syntax connect www.example.com:443 http/1.1 example some proxy servers might need authority to create a tunnel.
DELETE - HTTP
WebHTTPMethodsDELETE
request has body may successful response has body may safe no idempotent yes cacheable no allowed in html forms no syntax delete /file.html http/1.1 example request delete /file.html http/1.1 responses if a delete method is successfully applied, there are several response status codes possible: a 202 (accepted) status code if the action will likely succeed but has not yet been enacted.
GET - HTTP
WebHTTPMethodsGET
request has body no successful response has body yes safe yes idempotent yes cacheable yes allowed in html forms yes syntax get /index.html specifications specification title rfc 7231, section 4.3.1: get hypertext transfer protocol (http/1.1): semantics and content ...
HEAD - HTTP
WebHTTPMethodsHEAD
request has body no successful response has body no safe yes idempotent yes cacheable yes allowed in html forms no syntax head /index.html specifications specification title rfc 7231, section 4.3.2: head hypertext transfer protocol (http/1.1): semantics and content ...
OPTIONS - HTTP
WebHTTPMethodsOPTIONS
request has body no successful response has body yes safe yes idempotent yes cacheable no allowed in html forms no syntax options /index.html http/1.1 options * http/1.1 examples identifying allowed request methods to find out which request methods a server supports, one can use the curl command-line program to issue an options request: curl -x options https://example.org -i the response then contains an allow header that holds the allowed methods: http/1.1 204 no content allow: options, get, head, post cache-control: max-ag...
PATCH - HTTP
WebHTTPMethodsPATCH
request has body yes successful response has body yes safe no idempotent no cacheable no allowed in html forms no syntax patch /file.txt http/1.1 example request patch /file.txt http/1.1 host: www.example.com content-type: application/example if-match: "e0023aa4e" content-length: 100 [description of changes] response a successful response is indicated by any 2xx status code.
PUT - HTTP
WebHTTPMethodsPUT
request has body yes successful response has body no safe no idempotent yes cacheable no allowed in html forms no syntax put /new.html http/1.1 example request put /new.html http/1.1 host: example.com content-type: text/html content-length: 16 <p>new file</p> responses if the target resource does not have a current representation and the put request successfully creates one, then the origin server must inform the user agent by sending a 201 (created) response.
TRACE - HTTP
WebHTTPMethodsTRACE
request has body no successful response has body no safe no idempotent yes cacheable no allowed in html forms no syntax trace /index.html specifications specification title rfc 7231, section 4.3.8: trace hypertext transfer protocol (http/1.1): semantics and content ...
103 Early Hints - HTTP
WebHTTPStatus103
syntax 103 early hints specifications specification status comments rfc 8297: 103 early hints ietf rfc initial definition browser compatibility the compatibility table in this page is generated from structured data.
400 Bad Request - HTTP
WebHTTPStatus400
the hypertext transfer protocol (http) 400 bad request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
422 Unprocessable Entity - HTTP
WebHTTPStatus422
the hypertext transfer protocol (http) 422 unprocessable entity response status code indicates that the server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
HTTP response status codes - HTTP
WebHTTPStatus
client error responses 400 bad request the server could not understand the request due to invalid syntax.
CSS Houdini
properties registered using this api are provided with a parse syntax that defines a type, inheritance behaviour, and an initial value.
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.
JavaScript data types and data structures - JavaScript
with the object literal syntax, a limited set of properties are initialized; then properties can be added and removed.
Control flow and error handling - JavaScript
catch (catchid) { statements } the catch block specifies an identifier (catchid in the preceding syntax) that holds the value specified by the throw statement.
Details of the object model - JavaScript
the class syntax does not introduce a new object-oriented inheritance model to javascript.
Unicode property escapes - JavaScript
syntax the following section is also duplicated on this cheatsheet.
Regular expressions - JavaScript
regexp.prototype.sticky to include a flag with the regular expression, use this syntax: var re = /pattern/flags; or var re = new regexp('pattern', 'flags'); note that the flags are an integral part of a regular expression.
JavaScript Guide - JavaScript
chapters this guide is divided into several chapters: introduction about this guide about javascript javascript and java ecmascript tools hello world grammar and types basic syntax & comments declarations variable scope variable hoisting data structures and types literals control flow and error handling if...else switch try/catch/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 & parame...
Inheritance and the prototype chain - JavaScript
dosomething.prototype.foo: " + dosomething.prototype.foo); this results in the following: dosomeinstancing.prop: some value dosomeinstancing.foo: bar dosomething.prop: undefined dosomething.foo: undefined dosomething.prototype.prop: undefined dosomething.prototype.foo: bar different ways to create objects and the resulting prototype chain objects created with syntax constructs var o = {a: 1}; // the newly created object o has object.prototype as its [[prototype]] // o has no own property named 'hasownproperty' // hasownproperty is an own property of object.prototype.
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.
About the JavaScript reference - JavaScript
statements and declarations javascript applications consist of statements with an appropriate syntax.
extends - JavaScript
syntax class childclass extends parentclass { ...
static - JavaScript
syntax static methodname() { ...
Warning: String.x is deprecated; use String.prototype.x instead - JavaScript
examples deprecated syntax var num = 15; string.replace(num, /5/, '2'); standard syntax var num = 15; string(num).replace(/5/, '2'); shim the following is a shim to provide support to non-supporting browsers: /*globals define*/ // assumes all supplied string instance methods already present // (one may use shims for these if not available) (function() { 'use strict'; var i, // we could also build the array ...
Default parameters - JavaScript
syntax function [name]([param1[ = defaultvalue1 ][, ..., paramn[ = defaultvaluen ]]]) { statements } description in javascript, function parameters default to undefined.
arguments[@@iterator]() - JavaScript
syntax arguments[symbol.iterator]() examples iteration using for...of loop function f() { // your browser must support for..of loop // and let-scoped variables in for loops for (let letter of arguments) { console.log(letter); } } f('w', 'y', 'k', 'o', 'p'); specifications specification ecmascript (ecma-262)the definition of 'createunmappedargumentsobject' in that specification.
arguments.callee - JavaScript
for example, this syntax worked: function factorial (n) { return !(n > 1) ?
AggregateError() constructor - JavaScript
syntax new aggregateerror(errors[, message]) parameters errors an iterable of errors, may not actually be error instances.
get Array[@@species] - JavaScript
syntax array[symbol.species] return value the array constructor.
Array.prototype.reduce() - JavaScript
syntax arr.reduce(callback( accumulator, currentvalue, [, index[, array]] )[, initialvalue]) parameters callback a function to execute on each element in the array (except for the first, if no initialvalue is supplied).
Array.prototype.reduceRight() - JavaScript
syntax arr.reduceright(callback(accumulator, currentvalue[, index[, array]])[, initialvalue]) parameters callback function to execute on each value in the array, taking four arguments: accumulator the value previously returned in the last invocation of the callback, or initialvalue, if supplied.
Array.prototype.concat() - JavaScript
syntax const new_array = old_array.concat([value1[, value2[, ...[, valuen]]]]) parameters valuen optional arrays and/or values to concatenate into a new array.
Array.prototype.copyWithin() - JavaScript
syntax arr.copywithin(target[, start[, end]]) parameters target zero-based index at which to copy the sequence to.
Array.prototype.entries() - JavaScript
syntax array.entries() return value a new array iterator object.
Array.prototype.fill() - JavaScript
syntax arr.fill(value[, start[, end]]) parameters value value to fill the array with.
Array.prototype.filter() - JavaScript
syntax let newarray = arr.filter(callback(element[, index, [array]])[, thisarg]) parameters callback function is a predicate, to test each element of the array.
Array.prototype.find() - JavaScript
syntax arr.find(callback(element[, index[, array]])[, thisarg]) parameters callback function to execute on each value in the array, taking 3 arguments: element the current element in the array.
Array.prototype.findIndex() - JavaScript
syntax arr.findindex(callback( element[, index[, array]] )[, thisarg]) parameters callback a function to execute on each value in the array until the function returns true, indicating that the satisfying element was found.
Array.prototype.flatMap() - JavaScript
syntax var new_array = arr.flatmap(function callback(currentvalue[, index[, array]]) { // return element for new_array }[, thisarg]) parameters callback function that produces an element of the new array, taking three arguments: currentvalue the current element being processed in the array.
Array.prototype.forEach() - JavaScript
syntax arr.foreach(callback(currentvalue [, index [, array]])[, thisarg]) parameters callback function to execute on each element.
Array.prototype.includes() - JavaScript
syntax arr.includes(valuetofind[, fromindex]) parameters valuetofind the value to search for.
Array.prototype.indexOf() - JavaScript
syntax arr.indexof(searchelement[, fromindex]) parameters searchelement element to locate in the array.
Array.isArray() - JavaScript
array.isarray([1, 2, 3]); // true array.isarray({foo: 123}); // false array.isarray('foobar'); // false array.isarray(undefined); // false syntax array.isarray(value) parameters value the value to be checked.
Array.prototype.join() - JavaScript
syntax arr.join([separator]) parameters separator optional specifies a string to separate each pair of adjacent elements of the array.
Array.prototype.keys() - JavaScript
syntax arr.keys() return value a new array iterator object.
Array.prototype.lastIndexOf() - JavaScript
syntax arr.lastindexof(searchelement[, fromindex]) parameters searchelement element to locate in the array.
Array.of() - JavaScript
array.of(7); // [7] array.of(1, 2, 3); // [1, 2, 3] array(7); // array of 7 empty slots array(1, 2, 3); // [1, 2, 3] syntax array.of(element0[, element1[, ...[, elementn]]]) parameters elementn elements used to create the array.
Array.prototype.push() - JavaScript
syntax arr.push([element1[, ...[, elementn]]]) parameters elementn the element(s) to add to the end of the array.
Array.prototype.shift() - JavaScript
syntax arr.shift() return value the removed element from the array; undefined if the array is empty.
Array.prototype.slice() - JavaScript
syntax arr.slice([start[, end]]) parameters start optional zero-based index at which to start extraction.
Array.prototype.splice() - JavaScript
syntax let arrdeleteditems = array.splice(start[, deletecount[, item1[, item2[, ...]]]]) parameters start the index at which to start changing the array.
Array.prototype.toLocaleString() - JavaScript
syntax arr.tolocalestring([locales[, options]]); parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
Array.prototype.toSource() - JavaScript
syntax arr.tosource() return value a string representing the source code of the array.
Array.prototype.toString() - JavaScript
syntax arr.tostring() return value a string representing the elements of the array.
Array.prototype.unshift() - JavaScript
syntax arr.unshift(element1[, ...[, elementn]]) parameters elementn the elements to add to the front of the arr.
Array.prototype.values() - JavaScript
syntax arr.values() return value a new array iterator object.
ArrayBuffer() constructor - JavaScript
syntax new arraybuffer(length) parameters length the size, in bytes, of the array buffer to create.
ArrayBuffer.isView() - JavaScript
syntax arraybuffer.isview(value) parameters value the value to be checked.
ArrayBuffer.prototype.slice() - JavaScript
syntax arraybuffer.slice(begin[, end]) parameters begin zero-based byte index at which to begin slicing.
AsyncFunction - JavaScript
it can be obtained with the following code: object.getprototypeof(async function(){}).constructor syntax new asyncfunction([arg1[, arg2[, ...argn]],] functionbody) parameters arg1, arg2, ...
Atomics.add() - JavaScript
syntax atomics.add(typedarray, index, value) parameters typedarray an integer typed array.
Atomics.and() - JavaScript
syntax atomics.and(typedarray, index, value) parameters typedarray an integer typed array.
Atomics.compareExchange() - JavaScript
syntax atomics.compareexchange(typedarray, index, expectedvalue, replacementvalue) parameters typedarray an integer typed array.
Atomics.exchange() - JavaScript
syntax atomics.exchange(typedarray, index, value) parameters typedarray an integer typed array.
Atomics.isLockFree() - JavaScript
syntax atomics.islockfree(size) parameters size the size in bytes to check.
Atomics.load() - JavaScript
syntax atomics.load(typedarray, index) parameters typedarray an integer typed array.
Atomics.notify() - JavaScript
syntax atomics.notify(typedarray, index, count) parameters typedarray a shared int32array.
Atomics.or() - JavaScript
syntax atomics.or(typedarray, index, value) parameters typedarray an integer typed array.
Atomics.store() - JavaScript
syntax atomics.store(typedarray, index, value) parameters typedarray an integer typed array.
Atomics.sub() - JavaScript
syntax atomics.sub(typedarray, index, value) parameters typedarray an integer typed array.
Atomics.wait() - JavaScript
syntax atomics.wait(typedarray, index, value[, timeout]) parameters typedarray a shared int32array.
Atomics.xor() - JavaScript
syntax atomics.xor(typedarray, index, value) parameters typedarray an integer typed array.
BigInt() constructor - JavaScript
syntax bigint(value); parameters value the numeric value of the object being created.
BigInt.asIntN() - JavaScript
syntax bigint.asintn(width, bigint); parameters width the amount of bits available for the integer size.
BigInt.asUintN() - JavaScript
syntax bigint.asuintn(width, bigint); parameters width the amount of bits available for the integer size.
BigInt.prototype.toLocaleString() - JavaScript
syntax bigintobj.tolocalestring([locales [, options]]) parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
BigInt.prototype.toString() - JavaScript
syntax bigintobj.tostring([radix]) parameters radixoptional optional.
BigInt.prototype.valueOf() - JavaScript
syntax bigintobj.valueof() return value a bigint representing the primitive value of the specified bigint object.
BigInt64Array - JavaScript
once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).
BigUint64Array - JavaScript
once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).
Boolean() constructor - JavaScript
syntax new boolean([value]) parameters value optional the initial value of the boolean object.
Boolean.prototype.toSource() - JavaScript
syntax booleanobj.tosource() boolean.tosource() return value a string representing the source code of the object.
Boolean.prototype.toString() - JavaScript
syntax bool.tostring() return value a string representing the specified boolean object.
Boolean.prototype.valueOf() - JavaScript
syntax bool.valueof() return value the primitive value of the given boolean object description the valueof() method of boolean returns the primitive value of a boolean object or literal boolean as a boolean data type.
DataView() constructor - JavaScript
syntax new dataview(buffer [, byteoffset [, bytelength]]) parameters buffer an existing arraybuffer or sharedarraybuffer to use as the storage backing the new dataview object.
DataView.prototype.getBigInt64() - JavaScript
syntax dataview.getbigint64(byteoffset [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view to read the data from.
DataView.prototype.getBigUint64() - JavaScript
syntax dataview.getbiguint64(byteoffset [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view to read the data from.
DataView.prototype.getFloat32() - JavaScript
syntax dataview.getfloat32(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data.
DataView.prototype.getFloat64() - JavaScript
syntax dataview.getfloat64(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data.
DataView.prototype.getInt16() - JavaScript
syntax dataview.getint16(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data.
DataView.prototype.getInt32() - JavaScript
syntax dataview.getint32(byteoffset [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view where to read the data.
DataView.prototype.getInt8() - JavaScript
syntax dataview.getint8(byteoffset) parameters byteoffset the offset, in byte, from the start of the view where to read the data.
DataView.prototype.getUint16() - JavaScript
syntax dataview.getuint16(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data.
DataView.prototype.getUint32() - JavaScript
syntax dataview.getuint32(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data.
DataView.prototype.getUint8() - JavaScript
syntax dataview.getuint8(byteoffset) parameters byteoffset the offset, in byte, from the start of the view where to read the data.
DataView.prototype.setBigInt64() - JavaScript
syntax dataview.setbigint64(byteoffset, value [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view to store the data from.
DataView.prototype.setBigUint64() - JavaScript
syntax dataview.setbiguint64(byteoffset, value [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view to store the data from.
DataView.prototype.setFloat32() - JavaScript
syntax dataview.setfloat32(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
DataView.prototype.setFloat64() - JavaScript
syntax dataview.setfloat64(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
DataView.prototype.setInt16() - JavaScript
syntax dataview.setint16(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
DataView.prototype.setInt32() - JavaScript
syntax dataview.setint32(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
DataView.prototype.setInt8() - JavaScript
syntax dataview.setint8(byteoffset, value) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
DataView.prototype.setUint16() - JavaScript
syntax dataview.setuint16(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
DataView.prototype.setUint32() - JavaScript
syntax dataview.setuint32(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
DataView.prototype.setUint8() - JavaScript
syntax dataview.setuint8(byteoffset, value) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
Date.prototype[@@toPrimitive] - JavaScript
syntax date()[symbol.toprimitive](hint); return value the primitive value of the given date object.
Date() constructor - JavaScript
syntax new date() new date(value) new date(datestring) new date(year, monthindex [, day [, hours [, minutes [, seconds [, milliseconds]]]]]) note: the only correct way to instantiate a new date object is by using the new operator.
Date.UTC() - JavaScript
syntax since ecmascript 2017: date.utc(year[, month[, day[, hour[, minute[, second[, millisecond]]]]]]) ecmascript 2016 and earlier: (month used to be required) date.utc(year, month[, day[, hour[, minute[, second[, millisecond]]]]]) parameters year a full year.
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.getFullYear() - JavaScript
syntax dateobj.getfullyear() return value a number corresponding to the year of the given date, according to local time.
Date.prototype.getHours() - JavaScript
syntax dateobj.gethours() return value an integer number, between 0 and 23, representing the hour for the given date according to local time.
Date.prototype.getMilliseconds() - JavaScript
syntax dateobj.getmilliseconds() return value a number, between 0 and 999, representing the milliseconds for the given date according to local time.
Date.prototype.getMinutes() - JavaScript
syntax dateobj.getminutes() return value an integer number, between 0 and 59, representing the minutes in the given date according to local time.
Date.prototype.getMonth() - JavaScript
syntax dateobj.getmonth() return value an integer number, between 0 and 11, representing the month in the given date according to local time.
Date.prototype.getSeconds() - JavaScript
syntax dateobj.getseconds() return value an integer number, between 0 and 59, representing the seconds in the given date according to local time.
Date.prototype.getTime() - JavaScript
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.getTimezoneOffset() - JavaScript
syntax dateobj.gettimezoneoffset() return value a number representing the time-zone offset, in minutes, from the date based on current host system settings to utc.
Date.prototype.getUTCDate() - JavaScript
syntax dateobj.getutcdate() return value an integer number, between 1 and 31, representing the day of the month in the given date according to universal time.
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.getUTCFullYear() - JavaScript
syntax dateobj.getutcfullyear() return value a number representing the year in the given date according to universal time.
Date.prototype.getUTCHours() - JavaScript
syntax dateobj.getutchours() return value an integer number, between 0 and 23, representing the hours in the given date according to universal time.
Date.prototype.getUTCMilliseconds() - JavaScript
syntax dateobj.getutcmilliseconds() return value an integer number, between 0 and 999, representing the milliseconds portion of the given date object.
Date.prototype.getUTCMinutes() - JavaScript
syntax dateobj.getutcminutes() return value an integer number, between 0 and 59, representing the minutes in the given date according to universal time.
Date.prototype.getUTCMonth() - JavaScript
syntax dateobj.getutcmonth() return value an integer number, between 0 and 11, corresponding to the month of the given date according to universal time.
Date.prototype.getUTCSeconds() - JavaScript
syntax dateobj.getutcseconds() return value an integer number, between 0 and 59, representing the seconds in the given date according to universal time.
Date.prototype.getYear() - JavaScript
syntax dateobj.getyear() return value a number representing the year of the given date, according to local time, minus 1900.
Date.now() - JavaScript
syntax var timeinms = date.now(); return value a number representing the milliseconds elapsed since the unix epoch.
Date.parse() - JavaScript
syntax direct call: date.parse(datestring) implicit call: new date(datestring) parameters datestring a string representing a simplification of the iso 8601 calendar date extended format.
Date.prototype.setDate() - JavaScript
syntax dateobj.setdate(dayvalue) parameters dayvalue an integer representing the day of the month.
Date.prototype.setFullYear() - JavaScript
syntax dateobj.setfullyear(yearvalue[, monthvalue[, datevalue]]) parameters yearvalue an integer specifying the numeric value of the year, for example, 1995.
Date.prototype.setHours() - JavaScript
syntax dateobj.sethours(hoursvalue[, minutesvalue[, secondsvalue[, msvalue]]]) versions prior to javascript 1.3 dateobj.sethours(hoursvalue) parameters hoursvalue ideally, an integer between 0 and 23, representing the hour.
Date.prototype.setMilliseconds() - JavaScript
syntax dateobj.setmilliseconds(millisecondsvalue) parameters millisecondsvalue a number between 0 and 999, representing the milliseconds.
Date.prototype.setMinutes() - JavaScript
syntax dateobj.setminutes(minutesvalue[, secondsvalue[, msvalue]]) versions prior to javascript 1.3 dateobj.setminutes(minutesvalue) parameters minutesvalue an integer between 0 and 59, representing the minutes.
Date.prototype.setMonth() - JavaScript
syntax dateobj.setmonth(monthvalue[, dayvalue]) versions prior to javascript 1.3 dateobj.setmonth(monthvalue) parameters monthvalue a zero-based integer representing the month of the year offset from the start of the year.
Date.prototype.setSeconds() - JavaScript
syntax dateobj.setseconds(secondsvalue[, msvalue]) versions prior to javascript 1.3 dateobj.setseconds(secondsvalue) parameters secondsvalue an integer between 0 and 59, representing the seconds.
Date.prototype.setTime() - JavaScript
syntax dateobj.settime(timevalue) parameters timevalue an integer representing the number of milliseconds since 1 january 1970, 00:00:00 utc.
Date.prototype.setUTCDate() - JavaScript
syntax dateobj.setutcdate(dayvalue) parameters dayvalue an integer from 1 to 31, representing the day of the month.
Date.prototype.setUTCFullYear() - JavaScript
syntax dateobj.setutcfullyear(yearvalue[, monthvalue[, dayvalue]]) parameters yearvalue an integer specifying the numeric value of the year, for example, 1995.
Date.prototype.setUTCHours() - JavaScript
syntax dateobj.setutchours(hoursvalue[, minutesvalue[, secondsvalue[, msvalue]]]) parameters hoursvalue an integer between 0 and 23, representing the hour.
Date.prototype.setUTCMilliseconds() - JavaScript
syntax dateobj.setutcmilliseconds(millisecondsvalue) parameters millisecondsvalue a number between 0 and 999, representing the milliseconds.
Date.prototype.setUTCMinutes() - JavaScript
syntax dateobj.setutcminutes(minutesvalue[, secondsvalue[, msvalue]]) parameters minutesvalue an integer between 0 and 59, representing the minutes.
Date.prototype.setUTCMonth() - JavaScript
syntax dateobj.setutcmonth(monthvalue[, dayvalue]) parameters monthvalue an integer between 0 and 11, representing the months january through december.
Date.prototype.setUTCSeconds() - JavaScript
syntax dateobj.setutcseconds(secondsvalue[, msvalue]) parameters secondsvalue an integer between 0 and 59, representing the seconds.
Date.prototype.setYear() - JavaScript
syntax dateobj.setyear(yearvalue) parameters yearvalue an integer.
Date.prototype.toDateString() - JavaScript
syntax dateobj.todatestring() return value a string representing the date portion of the given date object in human readable form in english.
Date.prototype.toGMTString() - JavaScript
syntax dateobj.togmtstring() return value a string representing the given date following the internet greenwich mean time (gmt) convention.
Date.prototype.toISOString() - JavaScript
syntax dateobj.toisostring() return value a string representing the given date in the iso 8601 format according to universal time.
Date.prototype.toJSON() - JavaScript
syntax dateobj.tojson() return value a string representation of the given date.
Date.prototype.toLocaleDateString() - JavaScript
syntax dateobj.tolocaledatestring([locales [, options]]) parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
Date.prototype.toLocaleString() - JavaScript
syntax dateobj.tolocalestring([locales[, options]]) parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
Date.prototype.toLocaleTimeString() - JavaScript
syntax dateobj.tolocaletimestring([locales[, options]]) parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
Date.prototype.toSource() - JavaScript
syntax dateobj.tosource() date.tosource() return value a string representing the source code of the given date object.
Date.prototype.toString() - JavaScript
syntax dateobj.tostring() return value a string representing the given date.
Date.prototype.toTimeString() - JavaScript
syntax dateobj.totimestring() return value a string representing the time portion of the given date in human readable form in american english.
Date.prototype.toUTCString() - JavaScript
syntax dateobj.toutcstring() return value a string representing the given date using the utc time zone.
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.
Error() constructor - JavaScript
syntax new error([message[, filename[, linenumber]]]) parameters messageoptional a human-readable description of the error.
Error.prototype.toSource() - JavaScript
syntax e.tosource() return value a string containing the source code of the error.
Error.prototype.toString() - JavaScript
syntax e.tostring() return value a string representing the specified error object.
Error - JavaScript
syntaxerror creates an instance representing a syntax error.
EvalError() constructor - JavaScript
syntax new evalerror([message[, filename[, linenumber]]]) parameters message optional.
FinalizationRegistry() constructor - JavaScript
syntax new finalizationregistry([callback]); parameters callback optional the callback function this registry should use.
FinalizationRegistry.prototype.register() - JavaScript
syntax registry.register(target, heldvalue, [unregistertoken]); parameters target the target object to register.
FinalizationRegistry.prototype.unregister() - JavaScript
syntax registry.unregister(unregistertoken); parameters unregistertoken the token used with the register method when registering the target object.
Float32Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Float64Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Function() constructor - JavaScript
syntax new function([arg1 [, arg2 [, ...argn]] ,] functionbody) parameters arg1, arg2, ...
Function.arguments - JavaScript
description the syntax function.arguments is deprecated.
Function.prototype.bind() - JavaScript
syntax let boundfunc = func.bind(thisarg[, arg1[, arg2[, ...argn]]]) parameters thisarg the value to be passed as the this parameter to the target function func when the bound function is called.
Function.prototype.toSource() - JavaScript
syntax function.tosource(); return value a string representing the source code of the object.
Function.prototype.toString() - JavaScript
syntax function.tostring() return value a string representing the source code of the function.
Generator.prototype.next() - JavaScript
syntax gen.next(value) parameters value the value to send to the generator.
Generator.prototype.return() - JavaScript
syntax gen.return(value) parameters value the value to return.
Generator.prototype.throw() - JavaScript
syntax gen.throw(exception) parameters exception the exception to throw.
GeneratorFunction - JavaScript
object.getprototypeof(function*(){}).constructor syntax new generatorfunction ([arg1[, arg2[, ...argn]],] functionbody) parameters arg1, arg2, ...
Int16Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Int32Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Int8Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
InternalError() constructor - JavaScript
syntax new internalerror([message[, filename[, linenumber]]]) parameters message optional.
Intl.Collator() constructor - JavaScript
syntax new intl.collator([locales[, options]]) parameters locales optional.
Intl.Collator.prototype.compare() - JavaScript
syntax collator.compare(string1, string2) parameters string1 string2 the strings to compare against each other.
Intl.Collator.prototype.resolvedOptions() - JavaScript
syntax collator.resolvedoptions() return value a new object with properties reflecting the locale and collation options computed during the initialization of the given collator object.
Intl.Collator.supportedLocalesOf() - JavaScript
syntax intl.collator.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
Intl.DateTimeFormat() constructor - JavaScript
syntax new intl.datetimeformat([locales[, options]]) parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
Intl.DateTimeFormat.prototype.format() - JavaScript
syntax datetimeformat.format(date) parameters date the date to format.
Intl.DateTimeFormat.prototype.formatRange() - JavaScript
syntax intl.datetimeformat.prototype.formatrange(startdate, enddate) examples basic formatrange usage this method receives two dates and formats the date range in the most concise way based on the locale and options provided when instantiating intl.datetimeformat.
Intl.DateTimeFormat.prototype.formatRangeToParts() - JavaScript
syntax intl.datetimeformat.prototype.formatrangetoparts(startdate, enddate) examples basic formatrangetoparts usage this method receives two dates and returns an array of objects containing the locale-specific tokens representing each part of the formatted date range.
Intl.DateTimeFormat.prototype.formatToParts() - JavaScript
syntax datetimeformat.formattoparts(date) parameters date optional the date to format.
Intl.DateTimeFormat.prototype.resolvedOptions() - JavaScript
syntax datetimeformat.resolvedoptions() return value a new object with properties reflecting the locale and date and time formatting options computed during the initialization of the given datetimeformat object.
Intl.DateTimeFormat.supportedLocalesOf() - JavaScript
syntax intl.datetimeformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
Intl.DisplayNames() constructor - JavaScript
syntax new intl.displaynames([locales[, options]]) parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
Intl.DisplayNames.prototype.of() - JavaScript
syntax displaynames.of(code); parameters code the code to provide depends on the type: if the type is "region", code should be either an iso-3166 two letters region code, or a three digits un m49 geographic regions.
Intl.DisplayNames.prototype.resolvedOptions() - JavaScript
syntax displaynames.resolvedoptions() return value an object with properties reflecting the locale and formatting options computed during the construction of the given displaynames object.
Intl.DisplayNames.supportedLocalesOf() - JavaScript
syntax intl.displaynames.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
Intl.ListFormat() constructor - JavaScript
syntax new intl.listformat([locales[, options]]) parameters locales optional.
Intl​.ListFormat.prototype​.format() - JavaScript
syntax listformat.format([list]); parameters list an iterable object, such as an array return value a language-specific formatted string representing the elements of the list description the format() method returns a string that has been formatted based on parameters provided in the intl.listformat object.
Intl​.List​Format​.prototype​.formatToParts() - JavaScript
syntax intl.listformat.prototype.formattoparts(list) parameters list an array of values to be formatted according to a locale.
Intl​.List​Format​.prototype​.resolvedOptions() - JavaScript
syntax listformat.resolvedoptions() return value an object with properties reflecting the locale and formatting options computed during the construction of the given listformat object.
Intl.ListFormat.supportedLocalesOf() - JavaScript
syntax intl.listformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
Intl.Locale() constructor - JavaScript
syntax new intl.locale(tag [, options]) parameters tag the unicode locale identifier string.
Intl.Locale.prototype.maximize() - JavaScript
syntax locale.maximize() return value a locale instance whose basename property returns the result of the add likely subtags algorithm executed against locale.basename.
Intl.Locale.prototype.minimize() - JavaScript
syntax locale.minimize() return value a locale instance whose basename property returns the result of the remove likely subtags algorithm executed against locale.basename.
Intl.Locale.prototype.toString() - JavaScript
syntax locale.tostring() return value the locale's unicode locale identifier string.
Intl.NumberFormat() constructor - JavaScript
syntax new intl.numberformat([locales[, options]]) parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
Intl.NumberFormat.prototype.format() - JavaScript
syntax numberformat.format(number) parameters number a number or bigint to format.
Intl.NumberFormat.prototype.formatToParts() - JavaScript
syntax intl.numberformat.prototype.formattoparts(number) parameters number optional a number or bigint to format.
Intl.NumberFormat.prototype.resolvedOptions() - JavaScript
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.
Intl.NumberFormat.supportedLocalesOf() - JavaScript
syntax intl.numberformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
Intl.PluralRules() constructor - JavaScript
syntax new intl.pluralrules([locales[, options]]) parameters locales optional.
Intl.PluralRules.prototype.resolvedOptions() - JavaScript
syntax pluralrule.resolvedoptions() return value a new object with properties reflecting the locale and plural formatting options computed during the initialization of the given pluralrules object.
Intl.PluralRules.select() - JavaScript
syntax pluralcategory = pluralrule.select(number) parameters number the number to get a plural rule for.
Intl.PluralRules.supportedLocalesOf() - JavaScript
syntax intl.pluralrules.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
Intl.RelativeTimeFormat() constructor - JavaScript
syntax new intl.relativetimeformat([locales[, options]]) parameters locales optional.
Intl.RelativeTimeFormat.prototype.format() - JavaScript
syntax relativetimeformat.format(value, unit) parameters value numeric value to use in the internationalized relative time message.
Intl.RelativeTimeFormat.prototype.formatToParts() - JavaScript
syntax relativetimeformat.formattoparts(value, unit) parameters value numeric value to use in the internationalized relative time message.
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.
Intl.RelativeTimeFormat.supportedLocalesOf() - JavaScript
syntax intl.relativetimeformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
Intl.getCanonicalLocales() - JavaScript
syntax intl.getcanonicallocales(locales) parameters locales a list of string values for which to get the canonical locale names.
Map.prototype[@@iterator]() - JavaScript
syntax mymap[symbol.iterator] return value the map iterator function, which is the entries() function by default.
Map.prototype[@@toStringTag] - JavaScript
property attributes of map.prototype[@@tostringtag] writable no enumerable no configurable yes syntax map[symbol.tostringtag] examples using tostringtag object.prototype.tostring.call(new map()) // "[object map]" specifications specification ecmascript (ecma-262)the definition of 'map.prototype[@@tostringtag]' in that specification.
Map() constructor - JavaScript
syntax new map([iterable]) parameters iterable an array or other iterable object whose elements are key-value pairs.
Map.prototype.clear() - JavaScript
syntax mymap.clear(); return value undefined.
Map.prototype.delete() - JavaScript
syntax mymap.delete(key); parameters key the key of the element to remove from the map object.
Map.prototype.entries() - JavaScript
syntax mymap.entries() return value a new map iterator object.
Map.prototype.get() - JavaScript
syntax mymap.get(key) parameters key the key of the element to return from the map object.
Map.prototype.has() - JavaScript
syntax mymap.has(key) parameters key the key of the element to test for presence in the map object.
Map.prototype.keys() - JavaScript
syntax mymap.keys() return value a new map iterator object.
Map.prototype.set() - JavaScript
syntax mymap.set(key, value) parameters key the key of the element to add to the map object.
Map.prototype.values() - JavaScript
syntax mymap.values() return value a new map iterator object.
Map - JavaScript
kvarray = [['key1', 'value1'], ['key2', 'value2']] // use the regular map constructor to transform a 2d key-value array into a map let mymap = new map(kvarray) mymap.get('key1') // returns "value1" // use array.from() to transform a map into a 2d key-value array console.log(array.from(mymap)) // will show you exactly the same array as kvarray // a succinct way to do the same, using the spread syntax console.log([...mymap]) // or use the keys() or values() iterators, and convert them to an array console.log(array.from(mymap.keys())) // ["key1", "key2"] cloning and merging maps just like arrays, maps can be cloned: let original = new map([ [1, 'one'] ]) let clone = new map(original) console.log(clone.get(1)) // one console.log(original === clone) // false (useful for shallow com...
Math.abs() - JavaScript
syntax math.abs(x) parameters x a number.
Math.acos() - JavaScript
syntax math.acos(x) parameters x a number representing a cosine, where x is between -1 and 1.
Math.acosh() - JavaScript
syntax math.acosh(x) parameters x a number.
Math.asin() - JavaScript
syntax math.asin(x) parameters x a number.
Math.asinh() - JavaScript
syntax math.asinh(x) parameters x a number.
Math.atan() - JavaScript
syntax math.atan(x) parameters x a number.
Math.atan2() - JavaScript
syntax math.atan2(y, x) parameters y the y coordinate of the point.
Math.atanh() - JavaScript
syntax math.atanh(x) parameters x a number.
Math.cbrt() - JavaScript
syntax math.cbrt(x) parameters x a number.
Math.ceil() - JavaScript
syntax math.ceil(x) parameters x a number.
Math.clz32() - JavaScript
syntax math.clz32(x) parameters x a number.
Math.cos() - JavaScript
syntax math.cos(x) parameters x the angle in radians for which to return the cosine.
Math.cosh() - JavaScript
syntax math.cosh(x) parameters x a number.
Math.exp() - JavaScript
syntax math.exp(x) parameters x a number.
Math.expm1() - JavaScript
syntax math.expm1(x) parameters x a number.
Math.floor() - JavaScript
syntax math.floor(x) parameters x a number.
Math.fround() - JavaScript
syntax var singlefloat = math.fround(doublefloat); parameters doublefloat a number.
Math.hypot() - JavaScript
syntax math.hypot([value1[, value2[, ...]]]) parameters value1, value2, ...
Math.imul() - JavaScript
syntax var product = math.imul(a, b); parameters a first number.
Math.log() - JavaScript
syntax math.log(x) parameters x a number.
Math.log10() - JavaScript
syntax math.log10(x) parameters x a number.
Math.log1p() - JavaScript
syntax math.log1p(x) parameters x a number.
Math.log2() - JavaScript
syntax math.log2(x) parameters x a number.
Math.max() - JavaScript
syntax math.max([value1[, value2[, ...]]]) parameters value1, value2, ...
Math.min() - JavaScript
syntax math.min([value1[, value2[, ...]]]) parameters value1, value2, ...
Math.pow() - JavaScript
syntax math.pow(base, exponent) parameters base the base number.
Math.random() - JavaScript
syntax math.random() return value a floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).
Math.random() - JavaScript
syntax math.random() return value a floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).
Math.round() - JavaScript
syntax math.round(x) parameters x a number.
Math.sign() - JavaScript
syntax math.sign(x) parameters x a number.
Math.sin() - JavaScript
syntax math.sin(x) parameters x a number (given in radians).
Math.sinh() - JavaScript
syntax math.sinh(x) parameters x a number.
Math.sqrt() - JavaScript
syntax math.sqrt(x) parameters x a number.
Math.tan() - JavaScript
syntax math.tan(x) parameters x a number representing an angle in radians.
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.
Math.trunc() - JavaScript
syntax math.trunc(x) parameters x a number.
Number() constructor - JavaScript
syntax new number(value) parameters value the numeric value of the object being created.
Number.isFinite() - JavaScript
syntax number.isfinite(value) parameters value the value to be tested for finiteness.
Number.isInteger() - JavaScript
syntax number.isinteger(value) parameters value the value to be tested for being an integer.
Number.isNaN() - JavaScript
syntax number.isnan(value) parameters value the value to be tested for nan.
Number.isSafeInteger() - JavaScript
syntax number.issafeinteger(testvalue) parameters testvalue the value to be tested for being a safe integer.
Number.parseFloat() - JavaScript
syntax number.parsefloat(string) parameters string the value to parse.
Number.parseInt() - JavaScript
syntax number.parseint(string,[ radix]) parameters string the value to parse.
Number.prototype.toExponential() - JavaScript
syntax numobj.toexponential([fractiondigits]) parameters fractiondigits optional.
Number.prototype.toFixed() - JavaScript
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.
Number.prototype.toLocaleString() - JavaScript
syntax numobj.tolocalestring([locales [, options]]) parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
Number.prototype.toPrecision() - JavaScript
syntax numobj.toprecision([precision]) parameters precision optional an integer specifying the number of significant digits.
Number.prototype.toSource() - JavaScript
syntax numobj.tosource() number.tosource() return value a string representing the source code of the object.
Number.prototype.toString() - JavaScript
syntax numobj.tostring([radix]) parameters radix optional.
Number.prototype.valueOf() - JavaScript
syntax numobj.valueof() return value a number representing the primitive value of the specified number object.
Number - JavaScript
literal syntax 123 // one-hundred twenty-three 123.0 // same 123 === 123.0 // true function syntax number('123') // returns the number 123 number('123') === 123 // true number("unicorn") // nan number(undefined) // nan constructor number() creates a new number value.
Object() constructor - JavaScript
syntax new object() new object(value) parameters value any value.
Object.prototype.__lookupGetter__() - JavaScript
syntax obj.__lookupgetter__(sprop) parameters sprop a string containing the name of the property whose getter should be returned.
Object.prototype.__lookupSetter__() - JavaScript
syntax obj.__lookupsetter__(sprop) parameters sprop a string containing the name of the property whose setter should be returned.
Object.assign() - JavaScript
syntax object.assign(target, ...sources) parameters target the target object — what to apply the sources’ properties to, which is returned after it is modified.
Object.create() - JavaScript
syntax object.create(proto, [propertiesobject]) parameters proto the object which should be the prototype of the newly-created object.
Object.defineProperties() - JavaScript
syntax object.defineproperties(obj, props) parameters obj the object on which to define or modify properties.
Object.entries() - JavaScript
syntax object.entries(obj) parameters obj the object whose own enumerable string-keyed property [key, value] pairs are to be returned.
Object.freeze() - JavaScript
syntax object.freeze(obj) parameters obj the object to freeze.
Object.fromEntries() - JavaScript
syntax object.fromentries(iterable); parameters iterable an iterable such as array or map or other objects implementing the iterable protocol.
Object.getOwnPropertyDescriptor() - JavaScript
syntax object.getownpropertydescriptor(obj, prop) parameters obj the object in which to look for the property.
Object.getOwnPropertyDescriptors() - JavaScript
syntax object.getownpropertydescriptors(obj) parameters obj the object for which to get all own property descriptors.
Object.getOwnPropertyNames() - JavaScript
syntax object.getownpropertynames(obj) parameters obj the object whose enumerable and non-enumerable properties are to be returned.
Object.getOwnPropertySymbols() - JavaScript
syntax object.getownpropertysymbols(obj) parameters obj the object whose symbol properties are to be returned.
Object.getPrototypeOf() - JavaScript
syntax object.getprototypeof(obj) parameters obj the object whose prototype is to be returned.
Object.prototype.hasOwnProperty() - JavaScript
syntax obj.hasownproperty(prop) parameters prop the string name or symbol of the property to test.
Object.is() - JavaScript
syntax object.is(value1, value2); parameters value1 the first value to compare.
Object.isExtensible() - JavaScript
syntax object.isextensible(obj) parameters obj the object which should be checked.
Object.isFrozen() - JavaScript
syntax object.isfrozen(obj) parameters obj the object which should be checked.
Object.prototype.isPrototypeOf() - JavaScript
syntax prototypeobj.isprototypeof(object) parameters object the object whose prototype chain will be searched.
Object.isSealed() - JavaScript
syntax object.issealed(obj) parameters obj the object which should be checked.
Object.keys() - JavaScript
syntax object.keys(obj) parameters obj the object of which the enumerable's own properties are to be returned.
Object.preventExtensions() - JavaScript
syntax object.preventextensions(obj) parameters obj the object which should be made non-extensible.
Object.prototype.propertyIsEnumerable() - JavaScript
syntax obj.propertyisenumerable(prop) parameters prop the name of the property to test.
Object.prototype.__proto__ - JavaScript
see: object initializer / literal syntax.
Object.seal() - JavaScript
syntax object.seal(obj) parameters obj the object which should be sealed.
Object.setPrototypeOf() - JavaScript
syntax object.setprototypeof(obj, prototype) parameters obj the object which is to have its prototype set.
Object.prototype.toLocaleString() - JavaScript
syntax obj.tolocalestring() return value a string representing the object.
Object.prototype.toSource() - JavaScript
syntax object.tosource(); obj.tosource(); return value a string representing the source code of the object.
Object.prototype.toString() - JavaScript
syntax obj.tostring() return value a string representing the object.
Object.prototype.valueOf() - JavaScript
syntax object.valueof() return value the primitive value of the specified object.
Object.values() - JavaScript
syntax object.values(obj) parameters obj the object whose enumerable own property values are to be returned.
Promise() constructor - JavaScript
syntax new promise(executor) parameters executor a function to be executed by the constructor, during the process of constructing the promiseobj.
Promise.all() - JavaScript
syntax promise.all(iterable); parameters iterable an iterable object such as an array.
Promise.allSettled() - JavaScript
syntax promise.allsettled(iterable); parameters iterable an iterable object, such as an array, in which each member is a promise.
Promise.any() - JavaScript
syntax promise.any(iterable); parameters iterable an iterable object, such as an array.
Promise.prototype.catch() - JavaScript
syntax p.catch(onrejected); p.catch(function(reason) { // rejection }); parameters onrejected a function called when the promise is rejected.
Promise.prototype.finally() - JavaScript
syntax p.finally(onfinally); p.finally(function() { // settled (fulfilled or rejected) }); parameters onfinally a function called when the promise is settled.
Promise.race() - JavaScript
syntax promise.race(iterable); parameters iterable an iterable object, such as an array.
Promise.reject() - JavaScript
syntax promise.reject(reason); parameters reason reason why this promise rejected.
Promise.resolve() - JavaScript
syntax promise.resolve(value); parameters value argument to be resolved by this promise.
handler.apply() - JavaScript
syntax const p = new proxy(target, { apply: function(target, thisarg, argumentslist) { } }); parameters the following parameters are passed to the apply() method.
handler.construct() - JavaScript
syntax const p = new proxy(target, { construct: function(target, argumentslist, newtarget) { } }); parameters the following parameters are passed to the construct() method.
handler.defineProperty() - JavaScript
syntax const p = new proxy(target, { defineproperty: function(target, property, descriptor) { } }); parameters the following parameters are passed to the defineproperty() method.
handler.deleteProperty() - JavaScript
syntax const p = new proxy(target, { deleteproperty: function(target, property) { } }); parameters the following parameters are passed to the deleteproperty() method.
handler.get() - JavaScript
syntax const p = new proxy(target, { get: function(target, property, receiver) { } }); parameters the following parameters are passed to the get() method.
handler.getOwnPropertyDescriptor() - JavaScript
syntax const p = new proxy(target, { getownpropertydescriptor: function(target, prop) { } }); parameters the following parameters are passed to the getownpropertydescriptor() method.
handler.getPrototypeOf() - JavaScript
syntax const p = new proxy(obj, { getprototypeof(target) { ...
handler.has() - JavaScript
syntax const p = new proxy(target, { has: function(target, prop) { } }); parameters the following parameters are passed to has() method.
handler.isExtensible() - JavaScript
syntax const p = new proxy(target, { isextensible: function(target) { } }); parameters the following parameter is passed to the isextensible() method.
handler.ownKeys() - JavaScript
syntax const p = new proxy(target, { ownkeys: function(target) { } }); parameters the following parameter is passed to the ownkeys() method.
handler.preventExtensions() - JavaScript
syntax const p = new proxy(target, { preventextensions: function(target) { } }); parameters the following parameter is passed to the preventextensions() method.
handler.set() - JavaScript
syntax const p = new proxy(target, { set: function(target, property, value, receiver) { } }); parameters the following parameters are passed to the set() method.
handler.setPrototypeOf() - JavaScript
syntax const p = new proxy(target, { setprototypeof: function(target, prototype) { } }); parameters the following parameters are passed to the setprototypeof() method.
Proxy() constructor - JavaScript
syntax new proxy(target, handler) parameters target a target object to wrap with proxy.
Proxy.revocable() - JavaScript
syntax proxy.revocable(target, handler); parameters target a target object to wrap with proxy.
RangeError() constructor - JavaScript
syntax new rangeerror([message[, filename[, linenumber]]]) parameters message optional human-readable description of the error.
ReferenceError() constructor - JavaScript
syntax new referenceerror([message[, filename[, linenumber]]]) parameters message optional optional.
Reflect.apply() - JavaScript
syntax reflect.apply(target, thisargument, argumentslist) parameters target the target function to call.
Reflect.defineProperty() - JavaScript
syntax reflect.defineproperty(target, propertykey, attributes) parameters target the target object on which to define the property.
Reflect.deleteProperty() - JavaScript
syntax reflect.deleteproperty(target, propertykey) parameters target the target object on which to delete the property.
Reflect.getOwnPropertyDescriptor() - JavaScript
syntax reflect.getownpropertydescriptor(target, propertykey) parameters target the target object in which to look for the property.
Reflect.getPrototypeOf() - JavaScript
syntax reflect.getprototypeof(target) parameters target the target object of which to get the prototype.
Reflect.has() - JavaScript
syntax reflect.has(target, propertykey) parameters target the target object in which to look for the property.
Reflect.isExtensible() - JavaScript
syntax reflect.isextensible(target) parameters target the target object which to check if it is extensible.
Reflect.ownKeys() - JavaScript
syntax reflect.ownkeys(target) parameters target the target object from which to get the own keys.
Reflect.preventExtensions() - JavaScript
syntax reflect.preventextensions(target) parameters target the target object on which to prevent extensions.
Reflect.setPrototypeOf() - JavaScript
syntax reflect.setprototypeof(target, prototype) parameters target the target object of which to set the prototype.
RegExp.prototype[@@match]() - JavaScript
syntax regexp[symbol.match](str) parameters str a string that is a target of the match.
RegExp.prototype[@@matchAll]() - JavaScript
syntax regexp[symbol.matchall](str) parameters str a string that is a target of the match.
RegExp.prototype[@@replace]() - JavaScript
syntax regexp[symbol.replace](str, newsubstr|function) parameters str a string that is a target of the replacement.
RegExp.prototype[@@search]() - JavaScript
syntax regexp[symbol.search](str) parameters str a string that is a target of the search.
RegExp() constructor - JavaScript
syntax literal, constructor, and factory notations are possible: /pattern/flags new regexp(pattern[, flags]) regexp(pattern[, flags]) parameters pattern the text of the regular expression.
RegExp.prototype.compile() - JavaScript
syntax regexobj.compile(pattern, flags) parameters pattern the text of the regular expression.
RegExp.prototype.exec() - JavaScript
syntax regexobj.exec(str) parameters str the string against which to match the regular expression.
RegExp.lastMatch ($&) - JavaScript
you can not use the shorthand alias with the dot property accessor (regexp.$&), because the parser expects an expression with "&" in that case and a syntaxerror is thrown.
RegExp.lastParen ($+) - JavaScript
you can not use the shorthand alias with the dot property accessor (regexp.$+), because the parser expects an expression with "+" in that case and a syntaxerror is thrown.
RegExp.leftContext ($`) - JavaScript
you can not use the shorthand alias with the dot property accessor (regexp.$`), because the parser expects a starting template string in that case and a syntaxerror is thrown.
RegExp.rightContext ($') - JavaScript
you can not use the shorthand alias with the dot property accessor (regexp.$'), because the parser expects a starting string in that case and a syntaxerror is thrown.
RegExp.prototype.test() - JavaScript
syntax regexobj.test(str) parameters str the string against which to match the regular expression.
RegExp.prototype.toSource() - JavaScript
syntax regexobj.tosource() return value a string representing the source code of the given regexp object.
RegExp.prototype.toString() - JavaScript
syntax regexobj.tostring(); return value a string representing the given object.
Set.prototype[@@iterator]() - JavaScript
syntax myset[symbol.iterator] return value the set iterator function, which is the values() function by default.
Set() constructor - JavaScript
syntax new set([iterable]) parameters iterable optional if an iterable object is passed, all of its elements will be added to the new set.
Set.prototype.add() - JavaScript
syntax myset.add(value); parameters value the value of the element to add to the set object.
Set.prototype.clear() - JavaScript
syntax myset.clear(); return value undefined.
Set.prototype.delete() - JavaScript
syntax myset.delete(value); parameters value the value to remove from myset.
Set.prototype.entries() - JavaScript
syntax myset.entries() return value a new iterator object that contains an array of [value, value] for each element in the given set, in insertion order.
Set.prototype.forEach() - JavaScript
syntax myset.foreach(callback[, thisarg]) parameters callback function to execute for each element, taking three arguments: currentvalue, currentkey the current element being processed in the set.
Set.prototype.has() - JavaScript
syntax myset.has(value); parameters value the value to test for presence in the set object.
Set.prototype.values() - JavaScript
syntax myset.values(); return value a new iterator object containing the values for each element in the given set, in insertion order.
SharedArrayBuffer() constructor - JavaScript
syntax new sharedarraybuffer([length]) parameters length the size, in bytes, of the array buffer to create.
SharedArrayBuffer.prototype.slice() - JavaScript
syntax sab.slice() sab.slice(begin) sab.slice(begin, end) parameters begin optional zero-based index at which to begin extraction.
String.prototype[@@iterator]() - JavaScript
syntax str[symbol.iterator] return value a new iterator object.
String() constructor - JavaScript
syntax new string(thing) string(thing) parameters thing anything to be converted to a string.
String.prototype.anchor() - JavaScript
syntax str.anchor(name) parameters name a string representing a name value to put into the generated <a name="..."> start tag.
String.prototype.big() - JavaScript
syntax str.big() return value a string containing a <big> html element.
String.prototype.blink() - JavaScript
syntax str.blink() return value a string containing a <blink> html element.
String.prototype.bold() - JavaScript
syntax str.bold() return value a string containing a <b> html element.
String.prototype.charAt() - JavaScript
syntax let character = str.charat(index) parameters index an integer between 0 and str.length - 1.
String.prototype.charCodeAt() - JavaScript
syntax str.charcodeat(index) parameters index an integer greater than or equal to 0 and less than the length of the string.
String.prototype.codePointAt() - JavaScript
syntax str.codepointat(pos) parameters pos position of an element in str to return the code point value from.
String.prototype.concat() - JavaScript
syntax str.concat(str2 [, ...strn]) parameters str2 [, ...strn] strings to concatenate to str.
String.prototype.endsWith() - JavaScript
syntax str.endswith(searchstring[, length]) parameters searchstring the characters to be searched for at the end of str.
String.prototype.fixed() - JavaScript
syntax str.fixed() return value a string representing a <tt> html element.
String.prototype.fontcolor() - JavaScript
syntax str.fontcolor(color) parameters color a string expressing the color as a hexadecimal rgb triplet or as a string literal.
String.prototype.fontsize() - JavaScript
syntax str.fontsize(size) parameters size an integer between 1 and 7, a string representing a signed integer between 1 and 7.
String.fromCharCode() - JavaScript
syntax string.fromcharcode(num1[, ...[, numn]]) parameters num1, ..., numn a sequence of numbers that are utf-16 code units.
String.fromCodePoint() - JavaScript
syntax string.fromcodepoint(num1[, ...[, numn]]) parameters num1, ..., numn a sequence of code points.
String.prototype.includes() - JavaScript
syntax str.includes(searchstring[, position]) parameters searchstring a string to be searched for within str.
String.prototype.indexOf() - JavaScript
syntax str.indexof(searchvalue [, fromindex]) parameters searchvalue the string value to search for.
String.prototype.italics() - JavaScript
syntax str.italics() return value a string containing a <i> html element.
String.prototype.lastIndexOf() - JavaScript
syntax str.lastindexof(searchvalue[, fromindex]) parameters searchvalue a string representing the value to search for.
String.prototype.link() - JavaScript
syntax str.link(url) parameters url any string that specifies the href attribute of the <a> tag; it should be a valid url (relative or absolute), with any & characters escaped as &amp;, and any " characters escaped as &quot;.
String.prototype.localeCompare() - JavaScript
syntax referencestr.localecompare(comparestring[, locales[, options]]) parameters comparestring the string against which the referencestr is compared.
String.prototype.match() - JavaScript
syntax str.match(regexp) parameters regexp a regular expression object.
String.prototype.matchAll() - JavaScript
syntax str.matchall(regexp) parameters regexp a regular expression object.
String.prototype.normalize() - JavaScript
syntax str.normalize([form]) parameters form optional one of "nfc", "nfd", "nfkc", or "nfkd", specifying the unicode normalization form.
String.prototype.padEnd() - JavaScript
syntax str.padend(targetlength [, padstring]) parameters targetlength the length of the resulting string once the current str has been padded.
String.prototype.padStart() - JavaScript
syntax str.padstart(targetlength [, padstring]) parameters targetlength the length of the resulting string once the current str has been padded.
String.prototype.repeat() - JavaScript
syntax str.repeat(count) parameters count an integer between 0 and +infinity, indicating the number of times to repeat the string.
String.prototype.replace() - JavaScript
syntax const newstr = str.replace(regexp|substr, newsubstr|function) parameters regexp (pattern) a regexp object or literal.
String.prototype.replaceAll() - JavaScript
syntax const newstr = str.replaceall(regexp|substr, newsubstr|function) when using a `regexp` you must have to set the global ("g") flag; otherwise, it will throw a typeerror: "replaceall must be called with a global regexp".
String.prototype.search() - JavaScript
syntax str.search(regexp) parameters regexp a regular expression object.
String.prototype.slice() - JavaScript
syntax str.slice(beginindex[, endindex]) parameters beginindex the zero-based index at which to begin extraction.
String.prototype.small() - JavaScript
syntax str.small() return value a string containing a <small> html element.
String.prototype.split() - JavaScript
syntax str.split([separator[, limit]]) parameters separator optional the pattern describing where each split should occur.
String.prototype.startsWith() - JavaScript
syntax str.startswith(searchstring[, position]) parameters searchstring the characters to be searched for at the start of this string.
String.prototype.strike() - JavaScript
syntax str.strike() return value a string containing a <strike> html element.
String.prototype.sub() - JavaScript
syntax str.sub() return value a string containing a <sub> html element.
String.prototype.substr() - JavaScript
syntax str.substr(start[, length]) parameters start the index of the first character to include in the returned substring.
String.prototype.substring() - JavaScript
syntax str.substring(indexstart[, indexend]) parameters indexstart the index of the first character to include in the returned substring.
String.prototype.sup() - JavaScript
syntax str.sup() return value a string containing a <sup> html element.
String.prototype.toLocaleLowerCase() - JavaScript
syntax str.tolocalelowercase() str.tolocalelowercase(locale) str.tolocalelowercase([locale, locale, ...]) parameters locale optional the locale parameter indicates the locale to be used to convert to lower case according to any locale-specific case mappings.
String.prototype.toLocaleUpperCase() - JavaScript
syntax str.tolocaleuppercase() str.tolocaleuppercase(locale) str.tolocaleuppercase([locale, locale, ...]) parameters locale optional the locale parameter indicates the locale to be used to convert to upper case according to any locale-specific case mappings.
String.prototype.toLowerCase() - JavaScript
syntax str.tolowercase() return value a new string representing the calling string converted to lower case.
String.prototype.toSource() - JavaScript
syntax string.tosource() str.tosource() return value a string representing the source code of the calling object.
String.prototype.toString() - JavaScript
syntax str.tostring() return value a string representing the calling object.
String.prototype.toUpperCase() - JavaScript
syntax str.touppercase() return value a new string representing the calling string converted to upper case.
String.prototype.trim() - JavaScript
syntax str.trim() return value a new string representing the str stripped of whitespace from both ends.
String.prototype.trimEnd() - JavaScript
syntax str.trimend(); str.trimright(); return value a new string representing the calling string stripped of whitespace from its (right) end.
String.prototype.trimStart() - JavaScript
syntax str.trimstart(); str.trimleft(); return value a new string representing the calling string stripped of whitespace from its beginning (left end).
String.prototype.valueOf() - JavaScript
syntax str.valueof() return value a string representing the primitive value of a given string object.
Symbol.prototype[@@toPrimitive] - JavaScript
syntax symbol()[symbol.toprimitive](hint) return value the primitive value of the specified symbol object.
Symbol.for() - JavaScript
syntax symbol.for(key); parameters key string, required.
Symbol.keyFor() - JavaScript
syntax symbol.keyfor(sym); parameters sym symbol, required.
Symbol.prototype.toSource() - JavaScript
syntax symbol.tosource() var sym = symbol() sym.tosource() return value a string representing the source code of the object.
Symbol.prototype.toString() - JavaScript
syntax symbol().tostring() return value a string representing the specified symbol object.
Symbol.prototype.valueOf() - JavaScript
syntax symbol().valueof() return value the primitive value of the specified symbol object.
TypeError() constructor - JavaScript
syntax new typeerror([message[, filename[, linenumber]]]) parameters message optional optional.
TypedArray.prototype[@@iterator]() - JavaScript
syntax arr[symbol.iterator]() return value the array iterator function, which is the values() function by default.
TypedArray.prototype.copyWithin() - JavaScript
syntax typedarray.copywithin(target, start[, end = this.length]) parameters target target start index position where to copy the elements to.
TypedArray.prototype.entries() - JavaScript
syntax arr.entries() return value a new array iterator object.
TypedArray.prototype.fill() - JavaScript
syntax typedarray.fill(value[, start = 0[, end = this.length]]) parameters value value to fill the typed array with.
TypedArray.prototype.find() - JavaScript
syntax typedarray.find(callback[, thisarg]) parameters callback function to execute on each value in the typed array, taking three arguments: element the current element being processed in the typed array.
TypedArray.prototype.findIndex() - JavaScript
syntax typedarray.findindex(callback[, thisarg]) parameters callback function to execute on each value in the typed array, taking three arguments: element the current element being processed in the typed array.
TypedArray.prototype.forEach() - JavaScript
syntax typedarray.foreach(callback[, thisarg]) parameters callback function that produces an element of the new typed array, taking three arguments: currentvalue the current element being processed in the typed array.
TypedArray.from() - JavaScript
syntax typedarray.from(source[, mapfn[, thisarg]]) where typedarray is one of: int8array uint8array uint8clampedarray int16array uint16array int32array uint32array float32array float64array bigint64array biguint64array parameters source an array-like or iterable object to convert to a typed array.
TypedArray.prototype.includes() - JavaScript
syntax typedarray.includes(searchelement[, fromindex]); parameters searchelement the element to search for.
TypedArray.prototype.indexOf() - JavaScript
syntax typedarray.indexof(searchelement[, fromindex = 0]) parameters searchelement element to locate in the typed array.
TypedArray.prototype.join() - JavaScript
syntax typedarray.join([separator = ',']); parameters separator optional.
TypedArray.prototype.keys() - JavaScript
syntax arr.keys() return value a new array iterator object.
TypedArray.prototype.lastIndexOf() - JavaScript
syntax typedarray.lastindexof(searchelement[, fromindex = typedarray.length]) parameters searchelement element to locate in the typed array.
TypedArray.prototype.map() - JavaScript
syntax typedarray.map(mapfn[, thisarg]) parameters mapfn a callback function that produces an element of the new typed array, taking three arguments: currentvalue the current element being processed in the typed array.
TypedArray.of() - JavaScript
syntax typedarray.of(element0[, element1[, ...[, elementn]]]) where typedarray is one of: int8array uint8array uint8clampedarray int16array uint16array int32array uint32array float32array float64array bigint64array biguint64array parameters elementn elements of which to create the typed array.
TypedArray.prototype.reduce() - JavaScript
syntax typedarray.reduce(callback[, initialvalue]) parameters callback function to execute on each value in the typed array, taking four arguments: previousvalue the value previously returned in the last invocation of the callback, or initialvalue, if supplied (see below).
TypedArray.prototype.reduceRight() - JavaScript
syntax typedarray.reduceright(callback[, initialvalue]) parameters callback function to execute on each value in the typed array, taking four arguments: previousvalue the value previously returned in the last invocation of the callback, or initialvalue, if supplied (see below).
TypedArray.prototype.reverse() - JavaScript
syntax typedarray.reverse(); return value the reversed array.
TypedArray.prototype.set() - JavaScript
syntax typedarray.set(array[, offset]) typedarray.set(typedarray[, offset]) parameters array the array from which to copy values.
TypedArray.prototype.slice() - JavaScript
syntax typedarray.slice([begin[, end]]) parameters begin optional zero-based index at which to begin extraction.
TypedArray.prototype.sort() - JavaScript
syntax typedarray.sort([comparefunction]) parameters comparefunction optional specifies a function that defines the sort order.
TypedArray.prototype.subarray() - JavaScript
syntax typedarray.subarray([begin [,end]]) parameters begin optional element to begin at.
TypedArray.prototype.toLocaleString() - JavaScript
syntax typedarray.tolocalestring([locales [, options]]); parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
TypedArray.prototype.toString() - JavaScript
syntax typedarray.tostring() return value a string representing the elements of the typed array.
TypedArray.prototype.values() - JavaScript
syntax arr.values() return value a new array iterator object.
URIError() constructor - JavaScript
syntax new urierror([message[, filename[, linenumber]]]) parameters message optional optional.
Uint16Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Uint32Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Uint8Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Uint8ClampedArray - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
WeakMap() constructor - JavaScript
syntax new weakmap([iterable]) parameters iterable iterable is an array or other iterable object whose elements are key-value pairs (2-element arrays).
WeakMap.prototype.clear() - JavaScript
syntax wm.clear(); examples using the clear method var wm = new weakmap(); var obj = {}; wm.set(obj, 'foo'); wm.set(window, 'bar'); wm.has(obj); // true wm.has(window); // true wm.clear(); wm.has(obj) // false wm.has(window) // false specifications not part of any standard.
WeakMap.prototype.delete() - JavaScript
syntax wm.delete(key); parameters key the key of the element to remove from the weakmap object.
WeakMap.prototype.get() - JavaScript
syntax wm.get(key); parameters key required.
WeakMap.prototype.has() - JavaScript
syntax wm.has(key); parameters key required.
WeakMap.prototype.set() - JavaScript
syntax wm.set(key, value); parameters key required.
WeakRef() constructor - JavaScript
syntax new weakref(targetobject); parameters targetobject the target object the weakref should refer to (also called the referent).
WeakRef.prototype.deref() - JavaScript
syntax obj = ref.deref(); return value the target object of the weakref, or undefined if the object has been garbage-collected.
WeakSet() constructor - JavaScript
syntax new weakset([iterable]); parameters iterable if an iterable object is passed, all of its elements will be added to the new weakset.
WeakSet.prototype.add() - JavaScript
syntax ws.add(value); parameters value required.
WeakSet.prototype.clear() - JavaScript
syntax ws.clear(); examples using the clear method var ws = new weakset(); ws.add(window); ws.has(window); // true ws.clear(); ws.has(window); // false specifications not part of any standard.
WeakSet.prototype.delete() - JavaScript
syntax ws.delete(value); parameters value required.
WeakSet.prototype.has() - JavaScript
syntax ws.has(value); parameters value required.
WebAssembly.CompileError() constructor - JavaScript
syntax new webassembly.compileerror(message, filename, linenumber) parameters message optional human-readable description of the error.
WebAssembly.Global() constructor - JavaScript
syntax new webassembly.global(descriptor, value); parameters descriptor a globaldescriptor dictionary object, which contains two properties: value: a usvstring representing the data type of the global.
WebAssembly.Instance() constructor - JavaScript
syntax important: since instantiation for large modules can be expensive, developers should only use the instance() constructor when synchronous instantiation is absolutely required; the asynchronous webassembly.instantiatestreaming() method should be used at all other times.
WebAssembly.LinkError() constructor - JavaScript
syntax new webassembly.linkerror(message, filename, linenumber) parameters message optional human-readable description of the error.
WebAssembly.Memory() constructor - JavaScript
syntax new webassembly.memory(memorydescriptor); parameters memorydescriptor an object that can contain the following members: initial the initial size of the webassembly memory, in units of webassembly pages.
WebAssembly.Memory.prototype.grow() - JavaScript
syntax memory.grow(number); parameters number the number of webassembly pages you want to grow the memory by (each one is 64kib in size).
WebAssembly.Module() constructor - JavaScript
syntax important: since compilation for large modules can be expensive, developers should only use the module() constructor when synchronous compilation is absolutely required; the asynchronous webassembly.compilestreaming() method should be used at all other times.
WebAssembly.Module.exports() - JavaScript
syntax webassembly.module.exports(module); parameters module a webassembly.module object.
WebAssembly.Module.imports() - JavaScript
syntax webassembly.module.imports(module); parameters module a webassembly.module object.
WebAssembly.RuntimeError() constructor - JavaScript
syntax new webassembly.runtimeerror(message, filename, linenumber) parameters message optional human-readable description of the error.
WebAssembly.Table() constructor - JavaScript
syntax new webassembly.table(tabledescriptor); parameters tabledescriptor an object that can contain the following members: element a string representing the type of value to be stored in the table.
WebAssembly.Table.prototype.get() - JavaScript
syntax table.get(index); parameters index the index of the function reference you want to retrieve.
WebAssembly.Table.prototype.grow() - JavaScript
syntax table.grow(number); parameters number the number of elements you want to grow the table by.
WebAssembly.Table.prototype.length - JavaScript
syntax table.length; examples using length the following example creates a new webassembly table instance with an initial size of 2 and a maximum size of 10.
WebAssembly.Table.prototype.set() - JavaScript
syntax table.set(index, value); parameters index the index of the function reference you want to mutate.
WebAssembly.compile() - JavaScript
syntax promise<webassembly.module> webassembly.compile(buffersource); parameters buffersource a typed array or arraybuffer containing the binary code of the .wasm module you want to compile.
WebAssembly.compileStreaming() - JavaScript
syntax promise<webassembly.module> webassembly.compilestreaming(source); parameters source a response object or a promise that will fulfill with one, representing the underlying source of a .wasm module you want to stream and compile.
WebAssembly.instantiate() - JavaScript
syntax primary overload — taking wasm binary code promise<resultobject> webassembly.instantiate(buffersource, importobject); parameters buffersource a typed array or arraybuffer containing the binary code of the .wasm module you want to compile.
WebAssembly.instantiateStreaming() - JavaScript
syntax promise<resultobject> webassembly.instantiatestreaming(source, importobject); parameters source a response object or a promise that will fulfill with one, representing the underlying source of a .wasm module you want to stream, compile, and instantiate.
WebAssembly.validate() - JavaScript
syntax webassembly.validate(buffersource); parameters buffersource a typed array or arraybuffer containing webassembly binary code to be validated.
decodeURI() - JavaScript
syntax decodeuri(encodeduri) parameters encodeduri a complete, encoded uniform resource identifier.
decodeURIComponent() - JavaScript
syntax decodeuricomponent(encodeduri) parameters encodeduri an encoded component of a uniform resource identifier.
encodeURI() - JavaScript
syntax encodeuri(uri) parameters uri a complete uri.
encodeURIComponent() - JavaScript
syntax encodeuricomponent(str); parameters str string.
escape() - JavaScript
syntax escape(str) parameters str a string to be encoded.
globalThis - JavaScript
property attributes of globalthis writable yes enumerable no configurable yes description historically, accessing the global object has required different syntax in different javascript environments.
isFinite() - JavaScript
syntax isfinite(testvalue) parameters testvalue the value to be tested for finiteness.
isNaN() - JavaScript
syntax isnan(value) parameters value the value to be tested.
null - JavaScript
syntax null description the value null is written with a literal: null.
parseInt() - JavaScript
syntax parseint(string [, radix]) parameters string the value to parse.
undefined - JavaScript
syntax undefined description undefined is a property of the global object.
unescape() - JavaScript
syntax unescape(str) parameters str a string to be decoded.
uneval() - JavaScript
syntax uneval(object) parameters object a javascript expression or statement.
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.
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 ...
Assignment (=) - JavaScript
syntax operator: x = y examples simple assignment and chaining // assuming the following variables // x = 5 // y = 10 // z = 25 x = y // x is 10 x = y = z // x, y and z are all 25 specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Bitwise AND (&) - JavaScript
syntax a & b description the operands are converted to 32-bit integers and expressed by a series of bits (zeroes and ones).
Bitwise AND assignment (&=) - JavaScript
syntax operator: x &= y meaning: x = x & y examples using bitwise and assignment let a = 5; // 5: 00000000000000000000000000000101 // 2: 00000000000000000000000000000010 a &= 2; // 0 specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Bitwise NOT (~) - JavaScript
syntax ~a description the operands are converted to 32-bit integers and expressed by a series of bits (zeroes and ones).
Bitwise OR (|) - JavaScript
syntax a | b description the operands are converted to 32-bit integers and expressed by a series of bits (zeroes and ones).
Bitwise OR assignment (|=) - JavaScript
syntax operator: x |= y meaning: x = x | y examples using bitwise or assignment let a = 5; a |= 2; // 7 // 5: 00000000000000000000000000000101 // 2: 00000000000000000000000000000010 // ----------------------------------- // 7: 00000000000000000000000000000111 specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Bitwise XOR (^) - JavaScript
syntax a ^ b description the operands are converted to 32-bit integers and expressed by a series of bits (zeroes and ones).
Bitwise XOR assignment (^=) - JavaScript
syntax operator: x ^= y meaning: x = x ^ y examples using bitwise xor assignment let a = 5; // 00000000000000000000000000000101 a ^= 3; // 00000000000000000000000000000011 console.log(a); // 00000000000000000000000000000110 // 6 let b = 5; // 00000000000000000000000000000101 b ^= 0; // 00000000000000000000000000000000 console.log(b); // 00000000000000000000000000000101 /...
Comma operator (,) - JavaScript
syntax expr1, expr2, expr3...
Conditional (ternary) operator - JavaScript
syntax condition ?
Decrement (--) - JavaScript
syntax operator: x-- or --x description if used postfix, with operator after operand (for example, x--), the decrement operator decrements and returns the value before decrementing.
Division (/) - JavaScript
syntax operator: x / y examples basic division 1 / 2 // 0.5 math.floor(3 / 2) // 1 1.0 / 2.0 // 0.5 division by zero 2.0 / 0 // infinity 2.0 / 0.0 // infinity, because 0.0 === 0 2.0 / -0.0 // -infinity specifications specification ecmascript (ecma-262)the definition of 'division operator' in that specification.
Division assignment (/=) - JavaScript
syntax operator: x /= y meaning: x = x / y examples using division assignment // assuming the following variable // bar = 5 bar /= 2 // 2.5 bar /= 'foo' // nan bar /= 0 // infinity specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Equality (==) - JavaScript
syntax x == y description the equality operators (== and !=) use the abstract equality comparison algorithm to compare two operands.
Exponentiation assignment (**=) - JavaScript
syntax operator: x **= y meaning: x = x ** y examples using exponentiation assignment // assuming the following variable // bar = 5 bar **= 2 // 25 bar **= 'foo' // nan specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Greater than (>) - JavaScript
syntax x > y description the operands are compared using the abstract relational comparison algorithm.
Greater than or equal (>=) - JavaScript
syntax x >= y description the operands are compared using the abstract relational comparison algorithm.
Grouping operator ( ) - JavaScript
syntax ( ) description the grouping operator consists of a pair of parentheses around an expression or sub-expression to override the normal operator precedence so that expressions with lower precedence can be evaluated before an expression with higher priority.
Increment (++) - JavaScript
syntax operator: x++ or ++x description if used postfix, with operator after operand (for example, x++), the increment operator increments and returns the value before incrementing.
Inequality (!=) - JavaScript
syntax x != y description the inequality operator checks whether its operands are not equal.
Left shift (<<) - JavaScript
syntax a << b description this operator shifts the first operand the specified number of bits to the left.
Left shift assignment (<<=) - JavaScript
syntax operator: x <<= y meaning: x = x << y examples using left shift assignment let a = 5; // 00000000000000000000000000000101 bar <<= 2; // 20 // 00000000000000000000000000010100 specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Less than (<) - JavaScript
syntax x < y description the operands are compared using the abstract relational comparison algorithm, which is roughly summarised below: first, objects are converted to primitives using symbol.toprimitive.
Less than or equal (<=) - JavaScript
syntax x <= y description the operands are compared using the abstract relational comparison algorithm.
Logical AND (&&) - JavaScript
syntax expr1 && expr2 description if expr1 can be converted to true, returns expr2; else, returns expr1.
Logical AND assignment (&&=) - JavaScript
syntax expr1 &&= expr2 description short-circuit evaluation the logical and operator is evaluated left to right, it is tested for possible short-circuit evaluation using the following rule: (some falsy expression) && expr is short-circuit evaluated to the falsy expression; short circuit means that the expr part above is not evaluated, hence any side effects of doing so do not take effect (e.g., if expr is a function call, the calling never takes place).
Logical NOT (!) - JavaScript
syntax !expr description returns false if its single operand can be converted to true; otherwise, returns true.
Logical OR (||) - JavaScript
syntax expr1 || expr2 description if expr1 can be converted to true, returns expr1; else, returns expr2.
Logical OR assignment (||=) - JavaScript
syntax expr1 ||= expr2 description short-circuit evaluation the logical or operator works like this: x || y; // returns x when x is truthy // returns y when x is not truthy the logical or operator short-circuits: the second operand is only evaluated if the first operand doesn’t already determine the result.
Logical nullish assignment (??=) - JavaScript
syntax expr1 ??= expr2 description short-circuit evaluation the nullish coalescing operator is evaluated left to right, it is tested for possible short-circuit evaluation using the following rule: (some expression that is neither null nor undefined) ??
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.
Multiplication assignment (*=) - JavaScript
syntax operator: x *= y meaning: x = x * y examples using multiplication assignment // assuming the following variable // bar = 5 bar *= 2 // 10 bar *= 'foo' // nan specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Pipeline operator (|>) - JavaScript
the result is syntactic sugar in which a function call with a single argument can be written like this: let url = "%21" |> decodeuri; the equivalent call in traditional syntax looks like this: let url = decodeuri("%21"); syntax expression |> function the value of the specified expression is passed into the function as its sole parameter.
Remainder (%) - JavaScript
syntax operator: var1 % var2 examples remainder with positive dividend 12 % 5 // 2 1 % -2 // 1 1 % 2 // 1 2 % 3 // 2 5.5 % 2 // 1.5 remainder with negative dividend -12 % 5 // -2 -1 % 2 // -1 -4 % 2 // -0 remainder with nan nan % 2 // nan specifications specification ecmascript (ecma-262)the definition of 'remainder operator' in that specification.
Remainder assignment (%=) - JavaScript
syntax operator: x %= y meaning: x = x % y examples using remainder assignment // assuming the following variable // bar = 5 bar %= 2 // 1 bar %= 'foo' // nan bar %= 0 // nan specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Right shift (>>) - JavaScript
syntax a >> b description this operator shifts the first operand the specified number of bits to the right.
Right shift assignment (>>=) - JavaScript
syntax operator: x >>= y meaning: x = x >> y examples using right shift assignment let a = 5; // (00000000000000000000000000000101) a >>= 2; // 1 (00000000000000000000000000000001) let b = -5; // (-00000000000000000000000000000101) b >>= 2; // -2 (-00000000000000000000000000000010) specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Strict equality (===) - JavaScript
syntax x === y description the strict equality operators (=== and !==) use the strict equality comparison algorithm to compare two operands.
Strict inequality (!==) - JavaScript
syntax x !== y description the strict inequality operator checks whether its operands are not equal.
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.
Subtraction assignment (-=) - JavaScript
syntax operator: x -= y meaning: x = x - y examples using subtraction assignment // assuming the following variable // bar = 5 bar -= 2 // 3 bar -= 'foo' // nan specifications specification ecmascript (ecma-262)the definition of 'assignment operators' 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.
Unary plus (+) - JavaScript
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.
Unsigned right shift (>>>) - JavaScript
syntax a >>> b description this operator shifts the first operand the specified number of bits to the right.
Unsigned right shift assignment (>>>=) - JavaScript
syntax operator: x >>>= y meaning: x = x >>> y examples using unsigned right shift assignment let a = 5; // (00000000000000000000000000000101) a >>>= 2; // 1 (00000000000000000000000000000001) let b = -5; // (-00000000000000000000000000000101) b >>>= 2; // 1073741822 (00111111111111111111111111111110) specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that...
await - JavaScript
syntax [rv] = await expression; expression a promise or any value to wait for.
in operator - JavaScript
syntax prop in object parameters prop a string or symbol representing a property name or array index (non-symbols will be coerced to strings).
instanceof - JavaScript
syntax object instanceof constructor parameters object the object to test.
new operator - JavaScript
syntax new constructor[([arguments])] parameters constructor a class or function that specifies the type of the object instance.
new.target - JavaScript
syntax new.target description the new.target syntax consists of the keyword new, a dot, and the identifier target.
super - JavaScript
syntax super([arguments]); // calls the parent constructor.
this - JavaScript
syntax this value a property of an execution context (global, function or eval) that, in non–strict mode, is always a reference to an object and in strict mode can be any value.
yield* - JavaScript
syntax yield* expression; expression the expression which returns an iterable object.
continue - JavaScript
syntax continue [label]; label identifier associated with the label of the statement.
debugger - JavaScript
syntax debugger; examples using the debugger statement the following example shows code where a debugger statement has been inserted, to invoke a debugger (if one exists) when the function is called.
do...while - JavaScript
syntax do statement while (condition); statement a statement that is executed at least once and is re-executed each time the condition evaluates to true.
for await...of - JavaScript
syntax for await (variable of iterable) { statement } variable on each iteration a value of a different property is assigned to variable.
for...in - JavaScript
syntax for (variable in object) statement variable a different property name is assigned to variable on each iteration.
for...of - JavaScript
syntax for (variable of iterable) { statement } variable on each iteration a value of a different property is assigned to variable.
for - JavaScript
syntax for ([initialization]; [condition]; [final-expression]) statement initialization an expression (including assignment expressions) or variable declaration evaluated once before the loop begins.
function declaration - JavaScript
syntax function name([param[, param,[..., param]]]) { [statements] } name the function name.
import.meta - JavaScript
syntax import.meta description the syntax consists of the keyword import, a dot, and the identifier meta.
return - JavaScript
syntax return [[expression]]; expression the expression whose value is to be returned.
throw - JavaScript
syntax throw expression; expression the expression to throw.
try...catch - JavaScript
syntax try { try_statements } [catch (exception_var_1 if condition_1) { // non-standard catch_statements_1 }] ...
while - JavaScript
syntax while (condition) statement condition an expression evaluated before each pass through the loop.
with - JavaScript
syntax with (expression) statement expression adds the given expression to the scope chain used when evaluating the statement.
Transitioning to strict mode - JavaScript
differences from non-strict to strict syntax errors when adding 'use strict';, the following cases will throw a syntaxerror before the script is executing: octal syntax var n = 023; with statement using delete on a variable name delete myvariable; using eval or arguments as variable or function argument name using one of the newly reserved keywords (in prevision for ecmascript 2015): implements, interface, let, package, private, pro...
JavaScript reference - JavaScript
alue properties infinity nan undefined 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 arr...
JavaScript
however, the two programming languages have a very different syntax, semantic, and use.
<mfrac> - MathML
WebMathMLElementmfrac
syntax <mfrac>numerator denominator</mfrac> attributes bevelled specifies the way the fraction is displayed.
<mmultiscripts> - MathML
mathml uses a special syntax to describe subscripts and superscripts for both, postscripts and prescripts, attached to a base expression: <mmultiscripts> base (subscript superscript)* [ <mprescripts/> (presubscript presuperscript)* ] </mmultiscripts> after the base expression you can specify a postsubscript and a postsuperscript.
<mover> - MathML
WebMathMLElementmover
use the following syntax: <mover> base overscript </mover> attributes accent if true the over-script is an accent, which is drawn closer to the base expression.
<mroot> - MathML
WebMathMLElementmroot
two arguments are accepted, which leads to the syntax: <mroot> base index </mroot>.
<msqrt> - MathML
WebMathMLElementmsqrt
the square root accepts only one argument, which leads to the following syntax: <msqrt> base </msqrt>.
<msub> - MathML
WebMathMLElementmsub
it uses the following syntax: <msub> base subscript </msub>.
<msubsup> - MathML
it uses the following syntax: <msubsup> base subscript superscript </msubsup>.
<msup> - MathML
WebMathMLElementmsup
it uses the following syntax: <msup> base superscript </msup>.
<munder> - MathML
WebMathMLElementmunder
it uses the following syntax: <munder> base underscript </munder> attributes accentunder if true, the element is an accent, which is drawn closer to the base expression.
<munderover> - MathML
it uses the following syntax: <munderover> base underscript overscript </munderover> attributes accent if true, the overscript is an accent, which is drawn closer to the base expression.
MathML element reference - MathML
mathml presentation elements a to z math <math> (top-level element) a <maction> (binded actions to sub-expressions) <maligngroup> (alignment group) <malignmark> (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) ...
Image file type and format guide - Web media technologies
svg support 4 12 3 9 10 (presto) 15 (blink) 3.2 svg as image (<img> etc) 28 12 4 9 10 (presto) 15 (blink) 9 maximum dimensions unlimited supported color modes colors in svg are specified using css color syntax.
Web video codec guide - Web media technologies
for example, each coding tree unit (ctu)—similar to the macroblock used in previous codecs—consists of a tree of luma values for each sample as well as a tree of chroma values for each chroma sample used in the same coding tree unit, as well as any required syntax elements.
Using dns-prefetch - Web Performance
the cross-origin domain is then specified in the href attribute: syntax <link rel="dns-prefetch" href="https://fonts.gstatic.com/" > examples <html> <head> <link rel="dns-prefetch" href="https://fonts.gstatic.com/"> <!-- and all other head elements --> </head> <body> <!-- your page content --> </body> </html> you should place dns-prefetch hints in the <head> element any time your site references resources on cross-origin domains, but there ar...
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
registering the service worker we'll start by looking at the code that registers a new service worker, in the app.js file: note : we're using the es6 arrow functions syntax in the service worker implementation if('serviceworker' in navigator) { navigator.serviceworker.register('./pwa-examples/js13kpwa/sw.js'); }; if the service worker api is supported in the browser, it is registered against the site using the serviceworkercontainer.register() method.
alphabetic - SVG: Scalable Vector Graphics
it has the same syntax and semantics as the baseline descriptor within an @font-face.
begin - SVG: Scalable Vector Graphics
WebSVGAttributebegin
the time syntax is based upon the syntax defined in iso 8601.
cap-height - SVG: Scalable Vector Graphics
note: it was specified to share the syntax and semantics of the obsolete cap-height descriptor of the @font-face at-rule defined in an early version of css 2.
class - SVG: Scalable Vector Graphics
WebSVGAttributeclass
the following is a template for an ebnf grammar describing the <list-of-ts> syntax: list-of-ts ::= t | t, list-of-ts within the svg dom, values of a <list-of-ts> type are represented by an interface specific for the particular type t.
clip-path - SVG: Scalable Vector Graphics
note: for more details on the clip-path syntax, see the css property clip-path reference page.
clip - SVG: Scalable Vector Graphics
WebSVGAttributeclip
value auto | rect() default value auto animatable yes the value auto defines a clipping path along the bounds of the viewport created by the given element.the value rect() defines a clipping rectangle following the following syntax: rect(<top>, <right>, <bottom>, <left>).
cursor - SVG: Scalable Vector Graphics
WebSVGAttributecursor
the syntax for this reference is the same as the css uri.
descent - SVG: Scalable Vector Graphics
WebSVGAttributedescent
note: it was specified to share the syntax and semantics of the obsolete descent descriptor of the @font-face at-rule defined in an early version of css 2.
end - SVG: Scalable Vector Graphics
WebSVGAttributeend
the time syntax is based upon the syntax defined in iso 8601.
font-stretch - SVG: Scalable Vector Graphics
working draft adds the <percentage> syntax for variable fonts.
id - SVG: Scalable Vector Graphics
WebSVGAttributeid
a stand-alone svg document uses xml 1.0 syntax, which specifies that valid ids only include designated characters (letters, digits, and a few punctuation marks), and do not start with a digit, a full stop (.) character, or a hyphen-minus (-) character.
mask - SVG: Scalable Vector Graphics
WebSVGAttributemask
extends its syntax by making it a shorthand for the new mask-* properties defined in that specification.
name - SVG: Scalable Vector Graphics
WebSVGAttributename
unlike the syntax allowed between the parentheses of the local(…) clause in an @font-face rule src descriptor, the font name specified in this attribute is not surrounded in single or double quotes.
preserveAspectRatio - SVG: Scalable Vector Graphics
idth="160" height="60"> <title>none</title> </rect> <svg viewbox="0 0 100 100" width="160" height="60" preserveaspectratio="none" x="0" y="30"> <use href="#smiley" /> </svg> </svg> path { fill: yellow; stroke: black; stroke-width: 8px; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; } rect:hover, rect:active { outline: 1px solid red; } syntax preserveaspectratio="<align> [<meetorslice>]" its value is made of one or two keywords: a required alignment value and an optional "meet or slice" reference as described below: alignment value the alignment value indicates whether to force uniform scaling and, if so, the alignment method to use in case the aspect ratio of the viewbox doesn't match the aspect ratio of the viewport.
style - SVG: Scalable Vector Graphics
WebSVGAttributestyle
html,body,svg { height:100% } <svg viewbox="0 0 100 60" xmlns="http://www.w3.org/2000/svg"> <rect width="80" height="40" x="10" y="10" style="fill: skyblue; stroke: cadetblue; stroke-width: 2;"/> </svg> usage notes value <style> default value none animatable no <style> the syntax of style data depends on the style sheet language.
<animateMotion> - SVG: Scalable Vector Graphics
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.
<metadata> - SVG: Scalable Vector Graphics
WebSVGElementmetadata
example <svg width="400" viewbox="0 0 400 300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <metadata> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:connect="http://www.w3.org/1999/08/29-svg-connections-in-rdf#"> <rdf:description about="#cablea"> <connect:ends rdf:resource="#socket1"/> <connect:ends rdf:resource="#computera"/> </rdf:description> <rdf:description about="#cableb"> <connect:ends rdf:resource="#socket2"/> <connect:ends rdf:resource="#computerb"/> </rd...
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
you can find some basic examples of svg syntax and usage in the w3c svg test suite.
Fills and Strokes - SVG: Scalable Vector Graphics
you can also use things like the :hover pseudo class to create rollover effects: #myrect:hover { stroke: black; fill: blue; } you can also specify an external stylesheet for your css rules through normal xml-stylesheet syntax: <?xml version="1.0" standalone="no"?> <?xml-stylesheet type="text/css" href="style.css"?> <svg width="200" height="150" xmlns="http://www.w3.org/2000/svg" version="1.1"> <rect height="10" width="10" id="myrect"/> </svg> where style.css looks something like: #myrect { fill: red; stroke: black; } « previousnext » ...
Getting started - SVG: Scalable Vector Graphics
however, there may be syntax changes necessary to conform to the html5 specification.
Paths - SVG: Scalable Vector Graphics
WebSVGTutorialPaths
an example of this syntax is shown below, and in the figure to the left the specified control points are shown in red, and the inferred control point in blue.
Using custom elements - Web Components
a custom element's class object is written using standard es 2015 class syntax.
Web Components
the basic approach for implementing a web component generally looks something like this: create a class in which you specify your web component functionality, using the ecmascript 2015 class syntax (see classes for more information).
boolean - XPath
syntax boolean( expression ) arguments expression the expression to be evaluated.
ceiling - XPath
syntax ceiling(number ) arguments number the number to be evaluated.
choose - XPath
syntax choose( boolean , object1, object2 ) arguments boolean the boolean operation to use when determining which object to return.
concat - XPath
syntax concat(string1 ,string2 [,stringn]* ) arguments stringn this function accepts two or more arguments.
contains - XPath
syntax contains(haystack, needle) arguments haystack the string to be searched needle the string to look for as a substring of haystack returns true if haystack contains needle.
count - XPath
WebXPathFunctionscount
syntax count(node-set ) arguments node-set the node set to be counted.
document - XPath
syntax document(uri [,node-set] ) arguments uri an absolute or relative uri of the document to be retrieved.
element-available - XPath
syntax element-available(qname ) arguments qname must evaluate to a valid qname.
false - XPath
WebXPathFunctionsfalse
syntax false() returns boolean false.
floor - XPath
WebXPathFunctionsfloor
syntax floor( number ) arguments number the decimal number to be evaluated.
format-number - XPath
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.
function-available - XPath
syntax function-available(name ) arguments name the name of the function to test.
generate-id - XPath
syntax generate-id( [node-set] ) arguments node-set (optional) an id will be generated for the first node in this node-set.
id - XPath
WebXPathFunctionsid
syntax id(expression ) arguments expression if expression is a node-set, then the string value of each node in the node-set is treated as an individual id.
key - XPath
WebXPathFunctionskey
syntax key(keyname ,value ) arguments keyname a string containing the name of the xsl:key element to be used.
lang - XPath
WebXPathFunctionslang
syntax lang(string ) arguments string the language code or localization (language and country) code to be matched.
last - XPath
WebXPathFunctionslast
syntax last() returns an integer equal to the context size from the expression evaluation context.
local-name - XPath
syntax local-name( [node-set] ) arguments node-set (optional) the local name of the first node in this node-set will be returned.
name - XPath
WebXPathFunctionsname
syntax name( [node-set] ) arguments node-set (optional) the qname of the first node in this node-set will be returned.
namespace-uri - XPath
syntax namespace-uri( [node-set] ) arguments node-set (optional) the namespace uri of the first node in this node-set will be returned.
normalize-space - XPath
syntax normalize-space( [string] ) arguments string (optional) the string to be normalized.
not - XPath
WebXPathFunctionsnot
syntax not(expression ) arguments expression the expression is evaluated exactly as if it were passed as an argument to the boolean() function.
number - XPath
syntax number( [object] ) arguments object(optional) the object to be converted to a number.
position - XPath
syntax position() returns an integer equal to the context position from the expression evaluation context.
round - XPath
WebXPathFunctionsround
syntax round(decimal ) arguments decimal the decimal number to be rounded.
starts-with - XPath
syntax starts-with(haystack, needle) arguments haystack the string to look in.
string-length - XPath
syntax string-length( [string] ) arguments string(optional) the string to evaluate.
string - XPath
syntax string( [object] ) arguments object(optional) the object to convert to a string.
substring-after - XPath
syntax substring-after(haystack ,needle ) arguments haystack the string to be evaluated.
substring-before - XPath
syntax substring-before(haystack ,needle ) arguments haystack the string to be evaluated.
substring - XPath
syntax substring(string ,start [,length] ) arguments string the string to evaluate.
sum - XPath
WebXPathFunctionssum
syntax sum(node-set ) arguments node-set the node-set to be evaluated.
system-property - XPath
syntax system-property(name) arguments name (optional) the name of the system property.
translate - XPath
syntax translate(string, abc, xyz) arguments string the string to evaluate.
true - XPath
WebXPathFunctionstrue
syntax true() returns boolean true.
unparsed-entity-url - XPath
syntax string unparsed-entity-url(string) arguments the name of the unparsed entity.
Functions - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the following is an annotated list of core xpath functions and xslt-specific additions to xpath, including a description, syntax, a list of arguments, result-type, source in the appropriate w3c recommendation, and degree of present gecko support.
Index - XPath
WebXPathIndex
it uses a non-xml syntax to provide a flexible way of addressing (pointing to) different parts of an xml document.
XPath snippets - XPath
it avoids the more complex syntax of document.evaluate() for cases when it is not required as well as the need to use the special iterators on xpathresult (by returning an array instead).
<xsl:apply-imports> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:apply-imports/> required attributes none.
<xsl:apply-templates> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:apply-templates select=expression mode=name> <xsl:with-param> [optional] <xsl:sort> [optional] </xsl:apply-templates> required attributes none.
<xsl:attribute-set> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:attribute-set name=name use-attribute-sets=list-of-names> <xsl:attribute> </xsl:attribute-set> required attributes name specifies the name of the attribute set.
<xsl:attribute> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:attribute name=name namespace=uri> template </xsl:attribute> required attributes name specifies the name of the attribute to be created in the output document.
<xsl:call-template> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:call-template name=name> <xsl:with-param> [optional] </xsl:call-template> required attribute name specifies the name of the template you wish to invoke.
<xsl:choose> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementchoose
syntax <xsl:choose> <xsl:when test="[whatever to test1]"></xsl:when> <xsl:when test="[whatever to test2]"></xsl:when> <xsl:otherwise></xsl:otherwise> [optional] </xsl:choose> required attributes none.
<xsl:comment> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementcomment
syntax <xsl:comment> template </xsl:comment> required attributes none.
<xsl:copy-of> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementcopy-of
syntax <xsl:copy-of select=expression /> required attributes select uses an xpath expression that specifies what is to be copied.
<xsl:copy> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementcopy
syntax <xsl:copy use-attribute-sets=list-of-names> template </xsl:copy> required attributes none.
<xsl:decimal-format> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:decimal-format name=name decimal-separator=character grouping-separator=character infinity=string minus-sign=character nan=string percent=character per-mille=charater zero-digit=character digit=character pattern-separator=character /> required attributes none.
<xsl:element> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementelement
syntax <xsl:element name=name namespace=uri use-attribute-sets=list-of-names > template </xsl:element> required attributes name specifies the desired name of the output element.
<xsl:fallback> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementfallback
syntax <xsl:fallback> template </xsl:fallback> required attributes none.
<xsl:for-each> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementfor-each
syntax <xsl:for-each select=expression> <xsl:sort> [optional] template </xsl:for-each> required attributes select uses an xpath expression to select nodes to be processed.
<xsl:if> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementif
syntax <xsl:if test=expression> template </xsl:if> required attributes test contains an xpath expression that can be evaluated (using the rules defined for boolean( ) if necessary) to a boolean value.
<xsl:import> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementimport
syntax <xsl:import href=uri /> required attributes href specifies the uri of the stylesheet to import.
<xsl:include> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementinclude
syntax <xsl:include href=uri /> required attributes href specifies the uri of the stylesheet to include.
<xsl:key> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementkey
syntax <xsl:key name=name match=expression use=expression /> required attributes name specifies a name for this key.
<xsl:message> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementmessage
syntax <xsl:message terminate="yes" | "no" > template </xsl:message> required attributes none.
<xsl:namespace-alias> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:namespace-alias stylesheet-prefix=name result-prefix=name /> required attributes stylesheet-prefix specifies the temporary namespace.
<xsl:number> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementnumber
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.
<xsl:otherwise> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:otherwise> template </xsl:otherwise> required attributes none.
<xsl:output> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementoutput
syntax <xsl:output method="xml" | "html" | "text" version=string encoding=string omit-xml-declaration="yes" | "no" standalone="yes" | "no" doctype-public=string doctype-system=string cdata-section-elements=list-of-names indent="yes" | "no" media-type=string /> required attributes none.
<xsl:param> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementparam
syntax <xsl:param name=name select=expression> template </xsl:param> required attributes name names the parameter.
<xsl:preserve-space> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:preserve-space elements=list-of-element-names /> required attributes elements specifies the elements for which whitespace should be preserved.
<xsl:processing-instruction> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:processing-instruction name=name> template </xsl:processing-instruction> required attributes name specifies the name of this processing instruction.
<xsl:sort> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementsort
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.
<xsl:strip-space> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:strip-space elements=list-of-element-names /> required attributes elements specifies a space-separated list of elements in the source whose whitespace-only text nodes should be removed.
<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.
<xsl:template> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementtemplate
syntax <xsl:template match=pattern name=name mode=name priority=number> <xsl:param> [optional] template </xsl:template> required attributes none.
<xsl:text> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementtext
syntax <xsl:text disable-output-escaping="yes" | "no"> text </xsl:text> required attributes none.
<xsl:value-of> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementvalue-of
syntax <xsl:value-of select=expression disable-output-escaping="yes" | "no" /> required attributes select specifies the xpath expression to be evaluated and written to the output tree.
<xsl:variable> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementvariable
because xslt permits no side-effects, once the value of the variable has been established, it remains the same until the variable goes out of scope syntax <xsl:variable name=name select=expression > template </xsl:variable> required attributes name gives the variable a name.
<xsl:when> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementwhen
syntax <xsl:when test=expression> template </xsl:when> required attributes test specifies a boolean expression to be evaluated.
<xsl:with-param> - XSLT: Extensible Stylesheet Language Transformations
syntax <xsl:with-param name=name select=expression> template </xsl:with-param> required attributes name gives this parameter a name.
XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElement
for example, assume that a variable "image-dir" is defined as follows: <xsl:variable name="image-dir">/images</xsl:variable> the expression to be evaluated is placed inside curly brackets: <img src="{$image-dir}/mygraphic.jpg"/> this would result in the following: <img src="/images/mygraphic.jpg"/> the element annotations that follow include a description, a syntax listing, a list of required and optional attributes, a description of type and position, its source in the w3c recommendation and an explanation of the degree of present gecko support.
An Overview - XSLT: Extensible Stylesheet Language Transformations
unlike css, which has its own specialized syntax, an xslt stylesheet is an xml document, which must conform to all xml rules, including well-formedness.
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
resources the following reflect the interface of the xsltprocessor object: nsixsltprocessor.idl xsltprocessor.webidl using xsltprocessor from xpcom components instantiating an xsltprocessor from an xpcom component requires a different syntax as the constructor is not defined inside components.
Web technology for developers
mathml the mathematical markup language makes it possible to display complex mathematical equations and syntax.